text
stringlengths
1
1.04M
language
stringclasses
25 values
Tottenham Hotspur will take on fellow top-four aspirants West Ham United in a match that could have serious ramifications in the race for Champions League qualification. Tottenham Hotspur put up a good fight but ultimately fell to a 3-2 defeat against Manchester United last weekend. However, they were able to follow that up with a 2-0 win over a struggling Brighton & Hove Albion in midweek. Harry Kane scored Spurs' second goal on the night and has now become the player to score the most number of away goals in the history of the Premier League. Kane surpassed Premier League legend Wayne Rooney's record with his 12th league goal of the season. The win has placed them in seventh in the Premier League table and they trail Arsenal in fourth by just three points now. However, the Gunners have a game in hand over their North London rivals. Spurs have been in freescoring form of late, netting 13 times in their last four Premier League games. They will be hoping to carry that form into Sunday's game against West Ham. David Moyes oversaw a historic night for the Hammers on Thursday as they overturned a 1-0 deficit from the first leg to beat Sevilla 2-1 on aggregate at the London Stadium. Tomas Soucek and Andriy Yarmolenko got on the scoresheet for West Ham as they progressed to the quarter-finals of the Europa League. The London Stadium erupted in joy as the final whistle blew but Moyes' men have no time to rest on their laurels as they travel to take on Spurs on Sunday. The Hammers are presently sixth in the Premier League table, with 50 points from 29 games. This is a must-win game for them as far as the Premier League top-four race is concerned. - West Ham United have won just two of their last 19 Premier League away games against Tottenham Hotspur. They've lost 10 and drawn seven. - West Ham United registered wins in their last two Premier League outings against Spurs. But both those wins came at home. - The Hammers will be looking to do their first league double over Spurs since the 2013-14 season. - Tottenham Hotspur have lost five of their seven Premier League London derby games this season. - West Ham United have won three of their last four Premier League London derbies. Neither Spurs nor the Hammers are well-rested going into Sunday's game. Antonio Conte's men have generally struggled when they've had less than six days of rest between games. West Ham United need to be wary of the fact that Spurs will be quite a propositon at their home ground as opposed to Sevilla at the London Stadium. Spurs have scored plenty of goals in recent weeks and Jarrod Bowen's absence will adversely affect West Ham United. This will be a tight contest but we expect Spurs to take all three points.
english
Team India captain Rohit Sharma and senior batter Virat Kohli celebrated together after the hosts defeated Australia by six wickets in the third T20I in Hyderabad on Sunday, September 25. With the victory, the Men in Blue clinched the three-match series by a 2-1 margin. Chasing 187, Suryakumar Yadav (69 off 36) and Virat Kohli (63 off 48) featured in a brilliant century stand to pave the way for India’s win. After things got tight at the end, all-rounder Hardik Pandya (25* off 16) once again chipped in with a valuable cameo. It was Pandya who hit the winning runs, getting a thick edge on a wide delivery from Daniel Sams. As the ball raced to the boundary behind the wickets, Kohli and Rohit reacted in unison and let out a victory cheer. The duo then exchanged a warm hug as Kohli patted his captain on the back. Rohit won the toss and invited Australia to bat in the decider. The visitors put up an impressive 186 for seven on the board, built around quick-fire fifties from Cameron Green (52 off 21) and Tim David (54 off 27). The Men in Blue lost Rohit (17) and KL Rahul (one) early in the chase. However, Kohli and Suryakumar featured in a terrific partnership before Hardik came in and put the finishing touches. Kohli has displayed terrific form since returning to international cricket after a short break. He was India’s leading run-scorer in the Asia Cup and came up with a crucial performance in the decider against Australia on Sunday. One of the standout aspects of the 33-year-old’s knock was the clarity with which he took on leg-spinner Adam Zampa, who has been his nemesis a number of times in the past. The bowler had cleaned him up in the previous match as well. Admitting that he made a conscious effort to attack Zampa, Kohli said after the game: “I have to utilize my experience and give the team what the team wants. I got off to a good start then I had to take down Zampa because he's an important bowler through the middle. On his current form, the former India captain asserted: While Kohli played a significant knock, Suryakumar was deservedly named Player of the Match for taking the game away from Australia with some breathtaking strokeplay.
english
The Essex vs Derbyshire match of the Royal London One-day Cup 2022 will be played on 5th August. Michael Pepper has scored the most runs for Essex in the last year in T20 cricket with 439 runs from 14 innings at an average of 36. Paul Walter has also contributed with 404 runs from 13 innings. He has batted at an average of 44 in the last year. Matt Critchley is likely to be the top wicket-taker for Essex in the Royal London One-day Cup 2022 and has taken 15 wickets from his last 10 T20 innings over the last one year. He has had a bowling average of 17. Derbyshire lost their first match of the Royal London One-day Cup 2022. MH McKiernan is the top run-scorer for Derbyshire with 43 runs at a strike rate of 75. He has struck 7 fours. TA Wood has also made 18 runs at a strike rate of 78. BW Aitchison has been the best bowler for Derbyshire and has picked up one wicket while bowling at an average of 14 and an economy rate of 2.33. Top Batter (Runs Scored) – Tom Westley (Essex), Billy Godleman (Derbyshire) Top Bowler (Wickets taken) – Shane Snater (Essex), Samuel Conners (Derbyshire) Most Sixes – Tom Westley (Essex), Billy Godleman (Derbyshire) *NB these predictions may be changed nearer the start of the match once the final starting teams have been announced and we will be running ‘In-Play’ features, so stay tuned.
english
<filename>decompile/output/app/src/main/java/android/support/v4/app/ActivityOptionsCompatJB.java package android.support.v4.app; import android.app.ActivityOptions; import android.content.Context; import android.graphics.Bitmap; import android.os.Bundle; import android.view.View; class ActivityOptionsCompatJB { private final ActivityOptions mActivityOptions; private ActivityOptionsCompatJB(ActivityOptions paramActivityOptions) { mActivityOptions = paramActivityOptions; } public static ActivityOptionsCompatJB makeCustomAnimation(Context paramContext, int paramInt1, int paramInt2) { return new ActivityOptionsCompatJB(ActivityOptions.makeCustomAnimation(paramContext, paramInt1, paramInt2)); } public static ActivityOptionsCompatJB makeScaleUpAnimation(View paramView, int paramInt1, int paramInt2, int paramInt3, int paramInt4) { return new ActivityOptionsCompatJB(ActivityOptions.makeScaleUpAnimation(paramView, paramInt1, paramInt2, paramInt3, paramInt4)); } public static ActivityOptionsCompatJB makeThumbnailScaleUpAnimation(View paramView, Bitmap paramBitmap, int paramInt1, int paramInt2) { return new ActivityOptionsCompatJB(ActivityOptions.makeThumbnailScaleUpAnimation(paramView, paramBitmap, paramInt1, paramInt2)); } public Bundle toBundle() { return mActivityOptions.toBundle(); } public void update(ActivityOptionsCompatJB paramActivityOptionsCompatJB) { mActivityOptions.update(mActivityOptions); } }
java
<filename>docs/data/leg-t1/0ZP/0ZP01023.json<gh_stars>100-1000 {"nom":"Hiva-Oa","circ":"1ère circonscription","dpt":"Polynésie française","inscrits":1889,"abs":897,"votants":992,"blancs":5,"nuls":11,"exp":976,"res":[{"nuance":"UDI","nom":"<NAME>","voix":508},{"nuance":"DVD","nom":"<NAME>","voix":367},{"nuance":"REG","nom":"<NAME>, <NAME>","voix":41},{"nuance":"DVG","nom":"<NAME>","voix":38},{"nuance":"ECO","nom":"M. <NAME>","voix":10},{"nuance":"FN","nom":"<NAME>","voix":7},{"nuance":"FI","nom":"<NAME>","voix":4},{"nuance":"DIV","nom":"<NAME>","voix":1}]}
json
Islamabad, April 6 (IANS): The Pakistan Cricket Board has adopted a strategy of preparing bouncy wickets to help its national team prepare for the ICC Champions Trophy in England in June. According to official sources, the PCB authorities have ordered the preparation of special pitches, matching English conditions, to be used in the training camp to help batsmen who struggle at the bouncy pitches, Xinhua reports. Pakistan players, especially batsmen, who are usually groomed up while playing at slow, dry and dull tracks face problems when they play on bouncy, grassy and fast pitches abroad, like in South Africa, Australia, England and New Zealand. Pakistan had a harsh experience of such fast track recently in their South African tour where they lost six out of nine international matches including two series: Test by 3-0 and One-day International by 3-2 during January-March. After the woeful episode in South Africa where national team slumped at its lowest ever Test total of 49 runs, the PCB authorities decided to take quick and practical steps to make players aware of English conditions during the practice sessions at home. “The authorities have observed that during the South Africa tour batsmen struggled and considering the venue of the Champions Trophy in England it was decided that special pitches would be prepared to help players’ training,” a PCB release said. The PCB has planned to organise a 10-day training camp in the northwestern city of Abbottabad where a 30-man probable squad will report for screening for the final team selection. The PCB has also hired the services of legendary former fast bowler Wasim Akram to support the pacemen in the camp. Pakistan have been placed in the Group B along with India, West Indies and South Africa for the eight-nation tournament while Group A comprises defending champion Australia, England, New Zealand and Sri Lanka. It is the seventh and final ICC Champions Trophy tournament of its kind that will be held from June 6 to 23 in three British cities: London, Birmingham and Cardiff. Besides England, Pakistan is the only team that has never won the title.
english
It doesn’t make any sense. Neither in reverse: How the ball almost levels with the ground as it ‘comes out’ of the goal net, suddenly dips, as if missing two steps in a staircase, inclines and crashes ‘back’ to its origin. If you think playing the scene in its natural order and time stamp makes things easier, it doesn’t. The sheer power in Mbappé’s shot is one thing. But with a swivel that was Bolshoi after receiving a sliding pass from Marcus Thuram from the left, there was momentum and torque and something else in the midstream dropshot. We don’t know what that was yet – perhaps the same force that makes ships disappear into the Bermuda Triangle. Mbappé took a bit of time to Mbappé up. But that is what hyper-expectations have made us do – make 11 minutes into a World Cup knock-out round game seem ‘a bit of time’. That surge down the left flank, past winger Przemyslaw Frankowski left standing like the boy on the burning deck, was breathsucking to behold. This was very heavy shades of Ronaldo – Ronaldo of Brazil and his turf-ploughing runs -- for the 21st century. For empiricists, Doha’s Al Thumama stadium screen showed that Mbappé had ran and ran and ran at 35 kph in that burst. Usain Bolt’s top recorded speed is 43.99 kph. But the runner didn’t have the ball tied by invisible superyarn to his feet. And that was just one time that Poland was caught in the 23-year-old’s slipstream. Through the game, Mbappé dropped the shoulder, went short and then long, the ball – a little world -- at his feet all the while. France’s key weapon is this World Cup’s most complete footballer. Armed with Mbappé’s skill, strength, speed and sense of space, he can be criminally indefensible when Les Bleus are in play. In 2018, during the World Cup in Russia, the-then 19-year-old trailed only Ronaldo – the one you have to add ‘Brazil’ in Google searches so that the other one doesn’t pop up – in a Financial Times’ goalscoring rate list by players under 20. At 19, Mbappé had scored 52 club goals (Monaco and Paris Saint-Germain); Messi at Barcelona had scored 25. So, the closest one can explain this extraordinary player is, by his own reckoning: Kylian Mbappé is muscle memory remembered over 90-plus minutes of game, 6-second bull runs, non-reversible timelined midstream dropshots... muscle memory made and recollected with variations over and over again. The chances of him making things even more memorable for all of us on December 18, two days before his 24th birthday France makes it to the final, is exceedingly high – with no signs of exceedingly odd plateauing or dipping showing. Download The Economic Times News App to get Daily Market Updates & Live Business News. Subscribe to The Economic Times Prime and read the ET ePaper online.
english
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Avadhesh</title> <link rel="stylesheet" href="index.css"> <link rel="icon" href="favicon.ico"> <link href="https://fonts.googleapis.com/css?family=Merriweather|Montserrat|Sacramento&display=swap" rel="stylesheet"> <body> <div class="top-container"> <img class ="top-cloud" src="cloud.png" alt="cloud-img"> <h1>Hey I am Avadhesh.</h1> <h2 class="programmer">a <span class="pro">pro</span>grammer</h2> <img class ="bottom-cloud" src="cloud.png" alt="cloud-img"> <img class="montain" src="mountain.png" alt="mountain-img"> </div> <div class="middle-container"> <div class="profile"> <img class ="profile-pic" src="circle-cropped.png" alt="Avadhesh pic"> <h2>Hello.</h2> <p class="intro">I am a full stack web Developer.And I knows many programming languages such as JAVA,C++,c and I ❤ to watch sports.</p> </div> <hr> <div class="skills"> <h2>My Skills.</h2> <div class="skill-row"> <img class="my-skill" src="https://image.flaticon.com/icons/svg/2762/2762535.svg" alt="my skill"> <h3>Design and Development</h3> <p>I started learning to code when I was in class 12th.I have gained a wealth of designing websites,creating databases,data structures & algorithms,system software and the knowledge about software development process</p> </div> <div class="skill-row"> <img class="computer-skill" src="https://image.flaticon.com/icons/svg/426/426332.svg" alt="webdesigner"> <h3>Soft skills</h3> <p> I am Having a positive attitude and the initiative to work well.and I always try to avoid distraction because they have nothing to do with my goals..I am a self motivated person.</p> <p>I always belive in teamwork because many can solve the problem in less time.</p> </div> </div> <hr class="hr"> <div class="contact-me"> <h2>Get In Touch</h2> <h3>Small bussiness websites creation</h3> <p class="contact-msg">If you Influenced by my work Do contact me. link given below.</p> <a class="btn" href="mailto:<EMAIL>">CONTACT ME</a> </div> </div> <div class="bottom-container"> <a class="footer-link" href= "https://www.facebook.com/avadhesh.pratapsingh.33">Facebook</a> <a class="footer-link" href="https://www.instagram.com/avadheshsingh18/">Instagram</a> <a class="footer-link" href="https://ava68.github.io/mycv/">Website</a> <p class="copyright">© 2018 <NAME>.</p> </div> </body> </html>
html
M. Srinivasan (81), retired Chemical Engineer at Karnataka Engineering Research Centre, KRS and a resident of Kuvempunagar, passed away yesterday in city. He leaves behind his wife, one son, one daughter and a host of relatives and friends. Last rites were performed yesterday evening, according to family sources. RDPR Minister inspects Lakes, holds meeting at ZP Hall in city Out of 136 Lakes in Mysuru taluk, only 49 Lakes developed Mysore/Mysuru: “Give more importance to Lakes. Identify Lakes without water in the district and take steps to develop them before the onset monsoon,” said Rural Development and Panchayat Raj (RDPR) Minister K. S. Eshwarappa…. Mysore/Mysuru: A fortnight after Chief Minister B. S. Yediyurappa announced a Rs. 1,610 crore relief package for the distressed working class during COVID-19 lockdown, auto drivers of the city have demanded relaxation in conditions set by the Government for getting Rs. 5,000 one-time compensation under the package. Speaking to ‘Star of Mysore’, Mysuru Autorickshaw Drivers Association President M….
english
<reponame>liyun48/cabinet /* 滚动条样式 */ ::-webkit-scrollbar {/*滚动条整体样式*/ width: 10px; /*高宽分别对应横竖滚动条的尺寸*/ height: 1px; } ::-webkit-scrollbar-thumb {/*滚动条里面小方块*/ border-radius: 10px; -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2); background: #1c3148; } ::-webkit-scrollbar-track {/*滚动条里面轨道*/ -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2); border-radius: 10px; background: #0f1a2c; } /* 全局背景颜色 */ body { background: #0f1a2c; } .el-table tr { background-color:#0f1a2c; } .app-main[data-v-6beed8bc]{ color: #c6eaff } .el-button--primary.is-plain{ background-color: #19283b; color: #85b5d3; border-color:#2a506e } .el-input__inner{ background-color: #112034 } .el-range-editor--medium .el-range-input{ background-color: #112034 } .el-range-editor--mini .el-range-input{ background-color: #112034 } .el-loading-mask{ background-color: rgba(19, 38, 59, 0.7) } .el-input.is-disabled .el-input__inner{ border-color: #2a506e } .el-input-number.is-disabled .el-input-number__decrease{ border-color: #2a506e; color: #c6eaff } .el-input-number.is-disabled .el-input-number__increase{ border-color: #2a506e; color: #c6eaff } .el-dialog__title{ color: #c6eaff } .el-switch.is-checked .el-switch__core{ border-color: #355e76 !important; background-color: #355e76 !important; } .el-table--enable-row-hover .el-table__body tr:hover>td{ background-color: #355e76 !important; } .el-dropdown-menu__item--divided{ border:none; margin:0; padding: 0 } .el-dropdown-menu--medium .el-dropdown-menu__item.el-dropdown-menu__item--divided { margin-top: 0 } .el-select-dropdown__item.hover{ background-color: #355e76 } .el-textarea__inner{ background-color: #112034 } .el-scrollbar__view{ height: 100% }
css
from django import forms from data.models import RadiosondeMeasurement, WeatherMeasurement, MeasuringDevice from django.forms.widgets import SelectDateWidget from datetime import date, time from visuo_open_source.widgets import SelectTimeWidget, ColumnCheckboxSelectMultiple class WeatherMeasurementForm(forms.Form): """ Form to download weather measurements """ def __init__(self,*args,**kwargs): super(WeatherMeasurementForm,self).__init__(*args,**kwargs) if MeasuringDevice.objects.filter(type = 'S').exists() & WeatherMeasurement.objects.exists(): firstdate = WeatherMeasurement.objects.values_list('date', flat=True).order_by('date').first() self.fields['start_date_weather'].initial = firstdate self.fields['end_date_weather'].initial = date.today() measuring_device_values = [(device.id, device) for device in MeasuringDevice.objects.all() if device.type == 'S'] self.fields['measuring_device_weather'].choices = measuring_device_values self.fields['measuring_device_weather'].initial = [c[0] for c in measuring_device_values] YEARS = range(date.today().year-10, date.today().year+1) start_date_weather = forms.DateField(label = 'Start date', widget = SelectDateWidget(years = YEARS)) end_date_weather = forms.DateField(label = 'End date', widget = SelectDateWidget(years = YEARS)) start_time_weather = forms.TimeField(label = 'Start time', widget=SelectTimeWidget(), initial = time(0,0,0,0)) end_time_weather = forms.TimeField(label = 'End time', widget=SelectTimeWidget(), initial = time(23,59,59)) measuring_device_weather = forms.ChoiceField(label = 'Device') fields_values = [('temperature', 'Temperature (C)'), ('humidity', 'Humidity (%)'), ('dew_point', 'Dew point (C)'), ('wind_speed', 'Wind speed (m/s)'), ('wind_direction', 'Wind direction (deg)'), ('pressure', 'Pressure (hPa)'), ('rainfall_rate', 'Rainfall rate (mm/hr)'), ('solar_radiation', 'Solar radiation (W/m2)'), ('uv_index', 'UV Index')] fields_weather = forms.MultipleChoiceField(fields_values, label = 'Fields', widget = ColumnCheckboxSelectMultiple(columns=1, css_class="inner-table-1"), initial = [c[0] for c in fields_values]) def clean(self): """ Adding check on the dates and the number of rows to the data cleaning """ cleaned_data = super(WeatherMeasurementForm, self).clean() start_date = cleaned_data.get("start_date_weather") end_date = cleaned_data.get("end_date_weather") start_time = cleaned_data.get("start_time_weather") end_time = cleaned_data.get("end_time_weather") measuring_device = cleaned_data.get("measuring_device_weather") err = False if start_date is not None and end_date is not None and start_time is not None and end_time is not None: if end_date < start_date: err = True raise forms.ValidationError("End date must be after start date.") if end_time < start_time: err = True raise forms.ValidationError("End time must be after start time.") else: err = True if not err: nbRes = WeatherMeasurement.objects.filter(date__gte = start_date, date__lte = end_date, time__gte = start_time, time__lte = end_time, device__in = measuring_device).count() if nbRes < 1: raise forms.ValidationError("No entry in the database.") if nbRes > 50000: raise forms.ValidationError("Max. number of entries (50'000) reached.") return cleaned_data class RadiosondeMeasurementForm(forms.Form): """ Form to download radiosonde measurements """ def __init__(self,*args,**kwargs): super(RadiosondeMeasurementForm,self).__init__(*args,**kwargs) if MeasuringDevice.objects.filter(type = 'R').exists() & RadiosondeMeasurement.objects.exists(): firstdate = RadiosondeMeasurement.objects.values_list('date', flat=True).order_by('date').first() self.fields['start_date_radiosonde'].initial = firstdate self.fields['end_date_radiosonde'].initial = date.today() YEARS = range(date.today().year-10, date.today().year+1) start_date_radiosonde = forms.DateField(label = 'Start date', widget = SelectDateWidget(years = YEARS)) end_date_radiosonde = forms.DateField(label = 'End date', widget = SelectDateWidget(years = YEARS)) time_values = [('AM', 'Morning'), ('PM', 'Afternoon')] time_radiosonde = forms.MultipleChoiceField(time_values, label = 'Time', widget = ColumnCheckboxSelectMultiple(columns=2, css_class="inner-table-2"), initial = [c[0] for c in time_values]) fields_values = [('pressure', 'Atmospheric pressure (hPa)'), ('height', 'Geopotential height (m)'), ('temperature', 'Temperature (C)'), ('dew_point', 'Dewpoint temperature (C)'), ('rel_humidity', 'Relative humidity (%)'), ('wind_direction', 'Wind direction (deg)'), ('wind_speed', 'Wind speed (m/s)')] fields_radiosonde = forms.MultipleChoiceField(fields_values, label = 'Fields', widget = ColumnCheckboxSelectMultiple(columns=1, css_class="inner-table-1"), initial = [c[0] for c in fields_values]) def clean_time_radiosonde(self): data = self.cleaned_data['time_radiosonde'] if data is None: raise forms.ValidationError("Minimum one field is required.") return data def clean(self): """ Adding check on the dates and the number of rows to the data cleaning """ cleaned_data = super(RadiosondeMeasurementForm, self).clean() start = cleaned_data.get("start_date_radiosonde") end = cleaned_data.get("end_date_radiosonde") time = cleaned_data.get("time_radiosonde") if start is not None and end is not None: if end < start: raise forms.ValidationError("End date must be after start date.") elif time is not None: nbRes = RadiosondeMeasurement.objects.filter(date__gte = start, date__lte = end, time__in = time).count() if nbRes < 1: raise forms.ValidationError("No entry in the database.") if nbRes > 50000: raise forms.ValidationError("Max. number of entries (50'000) reached.") return cleaned_data
python
/** * SECTION * * A way to break up long pages or add visual interest. * * HTML LAYOUT: * Hero: * * <section class="hero"> * <div class="con"> * <h1>Your Hero Content</h1> * </div> * </section> * * Diagonal: * * <section class="diagonal"> * <div class="con pv4 tc"> * <h2 class="mt0">Example diagonal section</h2> * <p class="lead">Your text.</p> * </div> * </section> * * <section class="diagonal diagonal-dark"> * <div class="con pv4 tc"> * <h2 class="mt0">Another example diagonal section</h2> * <p class="lead">Your text.</p> * </div> * </section> * * @format */ /* Hero section */ .hero { margin: $hero-margin; padding: $hero-padding; color: $hero-text-color; background: $hero-background; } .hero-dark { background: $hero-dark-background; } /* Diagonal section */ .diagonal { background-color: $diagonal-background-color; &::before, &::after { display: block; width: 100%; height: $diagonal-hight; background-image: $diagonal-image; background-repeat: no-repeat; background-size: 100% 100%; content: ''; @media $l { @if $diagonal-hight-l != $diagonal-hight { height: $diagonal-hight-l; } } } &::after { transform: scale(-1); } } .diagonal-dark { color: $diagonal-dark-text-color; background-color: $diagonal-dark-background-color; a { color: $diagonal-dark-link-color; } label, strong { color: $diagonal-dark-text-color; } .input, .select, .text-area { border: $diagonal-dark-input-border; } .form-help { color: inherit; } .invalid-feedback { color: $diagonal-dark-input-invalid-color; } } /* reverse the diagonal angle; top left to bottom right */ .diagonal-reverse { &::before { transform: scaleX(-1); } &::after { transform: scaleY(-1); } }
css
<filename>subprojects/38k.naef/src/main/java/naef/dto/NaefObjectTypeDto.java package naef.dto; public class NaefObjectTypeDto extends NaefDto { public NaefObjectTypeDto() { } }
java
An awareness campaign on electoral literacy and dropout of students was organized by the extension and awareness cell of Sadiya College in collaboration with Department of Political Science, IQAC and NSS Unit, Sadiya College at an event ‘Ankuran’ of Tarani Parijat LP School, Sadiya recently. TINSUKIA : An awareness campaign on electoral literacy and dropout of students was organized by the extension and awareness cell of Sadiya College in collaboration with Department of Political Science, IQAC and NSS Unit, Sadiya College at an event ‘Ankuran’ of Tarani Parijat LP School, Sadiya recently. In the programme 7 faculty members of the college participated as resource persons which was attended by the students the school, their guardians and local villagers. The programme initiated by Dilip Borah, Head Teacher of Tarani Parijat L. P. School was addressed by Dipendra Kr. Khanal, Assistant Professor, Dept. of Political Science, Sadiya College, who emphasized importance of each vote in democracy and enrolment of public in the electoral roll. Nakul Neog, Assistant Professor & Programme Officer, NSS Unit, Sadiya College spoke on the NEP-2020 and its relevance in school education. Monmi Kalita, Assistant Professor, Dept. of Assamese, Sadiya College gave a speech on importance of girl education. The students of the school also organized a cultural event for the guests. The programme ended with the vote of thanks by Bornali Borah, Assistant Teacher, Tarani Parijat LP School. Also Watch:
english
Hyderabad, June 14: Two persons were killed and two others were injured when a truck ran amok in Vanasthalipuram area on the outskirts of Hyderabad. The incident occurred near Sushma Theatre when a milk-laden truck ran over few two-wheelers in front of it before ramming into a roadside shop. Two persons died on the spot while two others were injured in the incident. The injured were shifted to a hospital. Police suspect the incident occurred due to brake failure. Police said they have registered a case and took up investigation.
english
Felipe Massa has seen better Grand Prix weekends. The Brazilian racer was involved in not one, but two near-identical shunts on the streets of Monte Carlo. The first of the two incidents took place during the final practice on Saturday morning when his car’s tyres locked and he crashed into the barriers at approximately 170mph. As a result, he had to drop out of the qualifying rounds immediately and start the race from the initial grid point. But, immediately after crossing the lap 29, he once again collided with the barriers at St. Devote. Massa, 32, was rushed to the hospital for a check-up and was soon given the ‘all clear’ sign. Ferrari had initially asserted that mechanical failure was not the reason for the crash but on further inspection of the wrecked F138, it was revealed that part of the left-front suspension had broken during the first crash. ‘The findings validated the first impressions of the engineers, confirming that the accident was caused by an element of the front left suspension breaking,” Ferrari said on their website.
english
import { AppRegistry } from 'react-native'; import { renderToString } from 'react-dom/server'; import { Provider } from 'react-redux'; import express from 'express'; import bodyParser from 'body-parser'; import App from './containers/App'; import config from './config'; import initialState from './constants/initialState'; import Store from './store/configureStore'; const app = express(); function renderFullPage(html, preloadedState) { return (` <!doctype html> <html> <head> <title>PolyRides</title> </head> <body> <div id='root'>${html}</div> <script> // WARNING: See the following for Security isues with this approach: // http://redux.js.org/docs/recipes/ServerRendering.html#security-considerations window.PRELOADED_STATE = ${JSON.stringify(preloadedState)} </script> <script src="/bundle.js"></script> </body> </html> `); } function handleRender(req, res) { const store = new Store(initialState); // register the app AppRegistry.registerComponent('App', () => App); // prerender the app const { element, stylesheet } = AppRegistry.getApplication('App', { /* Initial props */ }); const html = ReactDOMServer.renderToString(element); const html = renderToString( <Provider store={ store }> <App /> </Provider> ); // Grab the initial state from our Redux store const preloadedState = store.getState(); // Send the rendered page back to the client res.send(renderFullPage(html, preloadedState)); } app.set('env', process.env.NODE_ENV || 'development'); app.set('port', process.env.port || config.http); app.use(bodyParser.json()); app.use(handleRender); app.listen(app.get('port'), () => { console.log(`Server started: http://localhost:${app.get('port')}/`); });
javascript
#pragma once #include "event.hpp" #include "listener.hpp" namespace Calamity::EventSystem { class BaseDispatcher { // Constructors // // ---------------------- // public: BaseDispatcher(); BaseDispatcher(Ref<BaseListener>& listener); virtual ~BaseDispatcher() = default; // Accessors and mutators // // -------------------------------- // virtual Ref<Event> get_event(usize index) const; virtual Ref<BaseListener> get_listener() const; virtual void set_event(Scope<Event> event, usize index); virtual void add_event(Scope<Event> event); virtual void bind(Ref<BaseListener> listener); // Dispatcher functions // // ------------------------------ // virtual void dispatch(Scope<Event> event); virtual void dispatch(Scope<Event> event, Ref<BaseListener> listener); // Debugging methods // // --------------------------- // std::string to_string() const; friend inline std::ostream& operator<<(std::ostream& os, const BaseDispatcher& ds) { return os << ds.to_string(); } // Bound variables // // ------------------------- // private: Ref<BaseListener> m_listener; // TODO: make this a queue or a map // since we might have distinct listener for many events std::vector<Ref<Event>> m_events; }; } // namespace Calamity::EventSystem
cpp
<reponame>pengkangzaia/JavaMonitor<filename>JavaMonitor/src/main/java/com/github/onblog/java_monitor/h2/entity/ThreadEntity.java package com.github.onblog.java_monitor.h2.entity; import lombok.Data; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; /** * Create by <EMAIL> 2018/11/12 0012 21:32 */ @Data @Entity @Table(name = "thread_table") public class ThreadEntity { @Id @GeneratedValue private Integer id; private String name; //进程ID private String date; //x:时间 private int total; private int RUNNABLE; private int TIMED_WAITING; private int WAITING; }
java
<gh_stars>0 { "name": "<NAME>", "description": "Saccharoses Kleidung. Eine Alchimisten-Uniform der Ritter des Ordo Favonius, die für Saccharose angepasst wurde.", "isdefault": true, "character": "Saccharose" }
json
How to Plan a Romantic Vacation in Gangtok? Gangtok is the capital city of Sikkim, a beautiful state in North-East India. People from all across the world come to witness its beauty and capture the essence of nature. Gangtok comes under the Himalayan Tour of India. It is a nature-friendly as well as a budget-friendly place to visit. We’ll be looking at the most famous places in Gangtok to visit. If you are looking forward to a romantic vacation, then Gangtok is the best option. Full of mountains passes, and rivers, everything romanticizes and fits with each other. Stay hooked to know more about the city! Gangtok, as the name suggests, the word Gangtok means a hilltop. It is one of the most magnificent hill stations in the country, and it attracts interest from people around the world. Gangtok is often said to be heaven on earth. The city gives us a clear view of the third-highest mountain range in the world, Mount Kanchenjunga. Gangtok and Darjeeling are the most famous and beautiful places in the heart of the land of peace and tranquility: Sikkim. The locals of Gangtok are very kind and polite adding beauty to this breathtaking city. The view of the hills and the fields are mesmerizing in Gangtok! Gangtok is known for its scenic beauty, and for any couple who loves mountains or is a nature-lover, Gangtok is the correct choice. You can even witness the huge Mount Kanchenjunga from this city. Gangtok has mild weather throughout the year, making it a great tourist hub. Gangtok is known for its scenic beauty. It allows us to look at the great Mount Kanchenjunga, tea gardens, rivers, bridges, and many more. So here, we have collected a list of some of the most beautiful places you should visit in Gangtok with your beloved partner. This is a natural waterfall located in Gangtok at a huge height of 100 ft. This waterfall is located amongst temples and caves, and it is located in a very calm place. This waterfall has a lot of drops, and as it lowers, it spreads even widely near the cascade. As a couple, both of you can take a swim at the cascade. This way, you’ll get to visit this amazing waterfall and will also have a memorable time over there. A lush green background surrounds this beautiful waterfall. Gangtok Ropeway starts from the Deorali Bazaar and ends at the Namnang station. It is a mountain cable car which is very famous in Gangtok. From this ropeway, you can experience the beauty of the whole city at once as it gives a 360° view of the entire place. Even the snow-capped mountain peaks are visible. It would be best if you went for this ropeway in the early hours of the day as it is amazing and fantasizing to experience mist all around you. A natural waterfall in India that originates from the Ratey Chu mountain is one of the most splendid waterfalls in Gangtok. As a couple, you should visit this place as you can click superb pictures in front of this waterfall. You can also take pictures from the footbridge located near the cascade. There are no restrictions on bathing under this waterfall. This is a very scenic background to take pictures with. Tourists love to spend their time over here. After paying visits to these splendid waterfalls, you might want to party at a club. So, we have found the best casino in town. You should spare some time to spend an entire night at this casino once in your lifetime. This casino is open 24/7, and couples have an entry discount. If you like, then you try your hand at your luck by playing cards or even by gambling. You can have delicious food and drinks in this casino, and you can also sing live. If you’re an introverted couple and do not like to party, this is the appropriate place. You’ll find peace, serenity, and most of all, privacy over here. This lake is located at a high altitude, and you will be 17,004 ft above the actual sea level. It is considered the best place for romantic couples to spend their privacy. Snow-covered mountains are located all around the lake. You will be able to see a frozen lake in the winter. You can camp and enjoy it over here. This is a UNESCO World Heritage site and a biosphere reserve in Gangtok. You can have an amazing view of Mount Kanchenjunga through this National Park. Both of you can go on trekking trails on five different trekking routes. It has a huge lodging facility for adventurous people, whereas nature lovers get to spend a week surrounded by trees, birds, etc. Being surrounded by water, mountains, and stone roads will help you look at life’s bright side. These places are very beautiful and are visited by every couple. Now that we have talked about the famous places of Gangtok, we will talk about the different adventures you will encounter on your journey from your hometown to Gangtok. Walking with your loved one in the midst of a strange, beautiful city is a surreal feeling. Here, we bring you some of the most famous places in Gangtok that you must visit. We have compiled a list of the most famous and romantic activities couples continue to enjoy in Gangtok, so here are some of the romantic things to do in Gangtok. If you’re in Gangtok for your honeymoon, you should spend some time in the Emerald Tea Garden. This is one of the most important places to visit in the city. The serenity and the tranquility of the place will make you fall in love with the huge garden. Go for a romantic walk with your partner and enjoy the essence of nature. Admiring the fantastic views of the city from the Rumtek Monastery is a must-do thing if you’re in Gangtok for the first time with your partner. This monastery allows the couple to spend some amazing moments together. The monastery is filled with positivity and tranquility. Express your gratitude over there. This monastery depicts the best architecture of Tibet, and this monastery is a replica of the monastery located in Tibet originally. If you are out on a honeymoon in North-east India then it cannot be considered complete until and unless you go for a Yak ride. The Yak ride at Tsomgo Lake is one of the most famous and recommended things to do in the city. The Tsomgo Lake will become a perfect backdrop while you create memories with your beloved. Remember to click pictures with the Yaks. Since it is very cold at Tsomgo Lake, you can go for a Tibetan Hot Noodle Soup available near the Yak rides. The nightlife of the city feels like a dream come true. Gangtok is a lively city with clubs that run 24/7 and shops that keep running through the night. Walking with the love of your life under the star-studded sky is an inexplicable feeling. If you visit Gangtok, don’t forget to experience the late hours of the night. Gangtok is the capital of Sikkim due to many reasons. The liveliness of this place and the politeness of the people here are one of the major reasons. A visit with the love of your life will add more glamour to your life, and both of you will become euphoric with the impressive and enthusiastic nightlife of this city. One of the most popular markets of Gangtok is the MG Road. It is also known as the Mahatma Gandhi Road. From antiques to all kinds of foods, you will find everything. Benches are laid on the sides of the streets, and the lights in the market, the excellent restaurants, lively clubs, and impressive shops will take you in awe. The MG Road steals the show completely with its sanitation and cleanliness. No vehicles are allowed on this road, hence one can stroll freely on the road. Littering and spitting on the MG Road is strictly prohibited, adding to its cleanliness and beauty. MG Road is one of the most famous markets in the town. The treks of Gangtok provide people with a kick of serotonin, which proves to be very exhilarating and fun. The city is famous for its scenic beauty, and that’s what attracts tourists from all over the world. It is a worldwide belief that Gangtok is a place for romantic treks which are full of adventure and involve huge rushes of adrenaline. Hence, a lot of international tourists come here. Most of the thrilling and exciting treks pass through the Rhododendron forests, calm and serene lakes, orchid beds, lively rivers, and a lush green surrounding. Trekking also allows people to connect with spirituality in a better way. There are many beautiful monasteries that come in the way while trekking. The most important treks of the city include the Kanchenjunga Base Camp Trek, which allows you to test your capabilities and capacity. Tinjure trek takes you to jungles. Singalila trek shows you a large number of peaks on its way to the top. The Yuksom-Dzongri attracts many trekkers because of the amazing sunset views. Tinjure Trek is a relatively easier trek than the other treks in Gangtok. This trek passes through the Fambong Lho wildlife sanctuary. This trek is rated as a difficult trek by experts. It covers up to 90 kilometers. The Trek starts and ends at the same point- Yuksom. These treks are best enjoyed with good company, and if you have your partner, you will need no one else. Walking under a clear sky is a feeling no less than love. The level of satisfaction after you complete a trek with your partner is the most underrated feeling. So, we’ll emphasize that you should go on these famous treks with your beloved at least once in a lifetime. Gangtok has pleasant weather during the summer season. The temperature revolves around 18°C-25°C. If you wish to beat the summer heat, then Gangtok is where you should be. In summers, Gangtok is filled with a dazzling ray of sunshine mixed with a cool breeze which is bound to remind you of the place time and again. You can cover the whole city of Gangtok in about three days but, if you wish to enjoy and live every moment to its fullest, then you must plan a trip at least for a week. Gangtok is a lively city where you can enjoy it 24/7. Gangtok is known as the city of scenic beauty and is filled with people with huge hearts. You can also look at Mount Kanchenjunga from here. If you are planning a romantic getaway with your partner to this city, then you are going the right way! Gangtok is full of beautiful places, and one must go there with their loved ones at least once in a lifetime! We hope that this article motivated you to pay a visit to the beautiful capital city of Sikkim!
english
It has become a protocol to conduct a big pre-release event for every big film. The films like Waltair Veerayya and Veera Simha Reddy do not need grand pre-release events. The openings will come by default. These functions are only to pump in adrenaline for the fans at a cost of crores of rupees. Because of functions like these, there have been heavy traffic issues in Hyderabad. So, such events are restricted only to certain function halls. To break the routine, the makers are going to Warangal, Khammam , Kurnool, Visakha and Anantapur. Now the events are planned in Ongole and Visakhapatnam but the permissions are not given yet. The police are saying to celebrate any such events only in open grounds far away from towns. Fans do come to any place indeed. The recent stampede deaths in Kandukur and Guntur caused by CBN's road rallies also added fuel for this strict decision by the police. But the filmmakers also should think about the need for these events in this digital world. Everything is being watched online. The celebrities are anyway addressing and interacting with the fans through their social media accounts. Trailers and Teasers are getting millions of views online. Then what is the need of grand pre release events? It's a mere waste of producers' money and people's time.
english
Astro's MJ pens heartbreaking note for Moonbin after his death: ‘It still doesn’t feel real, I’m so angry at myself' Astro member MJ shared an old photo with late K-pop artist Moonbin, who died recently. MJ was serving in the army, when the incident happened. K-pop group Astro's member MJ took to Instagram and poured his heart out in an emotional post for Moonbin. Also a member of Astro, Moonbin was founded dead at his apartment on April 19. MJ, who is currently serving in the army, might not be able to visit Moonbin's memorial site in Seoul any time soon, but paid a tribute to him on social media. Also read: Moonbin's sister Moon Sua pens heartbreaking note at memorial, Astro's MJ says 'I'm sorry I couldn't protect you' MJ posted a throwback photo of himself, clicked right before he enlisted for military service. In the photo, Moonbin is seen saluting MJ. Taking a walk down memory lane, MJ revealed how he and Moonbin had planned to live together once he was done with his mandatory service. "Sometimes when you’d call and say you would come to visit me in the army, just how happy I was and how much I anticipated for that day to come… It’s still so vivid, your voice back then… Do you remember? We called and talked about how we should live together after I was discharged from the army. When I said that, you laughed and said you’d think about it and let me know… Seems like I’m unable to receive a response in the end^^. I want to hear it even in my dreams, so please visit me and tell me. “How kindly and hardworkingly have you lived your life up to now that you have so many people on your side? I’m so proud of you, my cool dongsaeng^^. Promise me one thing! Don’t be in pain up there, and live more happy than anyone else. And be making a house for us to live in, for when we meet again ><. You’ve worked so hard all this while. Thank you for being a singer. I love you, my dongsaeng, Bin-ah. -MJ,” the note ended. Astro originally consists of six members and debuted in February 2016. Earlier this year, member Rocky's exit from the group was announced following the expiration of his contract with the agency. With Moonbin's death, it has only MJ, JinJin, Cha Eunwoo, and Sanha.
english
{ "@metadata": { "authors": [ "Jawadywn" ] }, "tooltip-pt-notifications-alert": "Pengenjuktahuan {{GENDER:|dulur}}" }
json
{ "word": "Trichomoniasis", "definitions": [ "An infection caused by parasitic trichomonads, chiefly affecting the urinary tract, vagina, or digestive system." ], "parts-of-speech": "Noun" }
json
package dev.kir.sync.mixin; import com.google.common.collect.ImmutableList; import dev.kir.sync.client.render.CustomGameRenderer; import dev.kir.sync.client.render.CustomVertexFormats; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.render.GameRenderer; import net.minecraft.client.render.Shader; import net.minecraft.client.render.VertexFormat; import net.minecraft.client.render.VertexFormats; import net.minecraft.resource.ResourceManager; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import oshi.util.tuples.Triplet; import java.io.IOException; import java.util.Map; import java.util.function.Consumer; @Environment(EnvType.CLIENT) @Mixin(GameRenderer.class) public class GameRendererMixin { @Unique private static final ImmutableList<Triplet<String, VertexFormat, Consumer<Shader>>> CUSTOM_SHADERS = ImmutableList.of( new Triplet<String, VertexFormat, Consumer<Shader>>("rendertype_entity_translucent_partially_textured", VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, CustomGameRenderer::setRenderTypeEntityTranslucentPartiallyTexturedShader), new Triplet<String, VertexFormat, Consumer<Shader>>("rendertype_voxel", CustomVertexFormats.POSITION_COLOR_OVERLAY_LIGHT_NORMAL, CustomGameRenderer::setRenderTypeVoxelShader) ); @Final @Shadow private Map<String, Shader> shaders; @Inject(method = "loadShaders", at = @At("TAIL")) private void loadCustomShaders(ResourceManager manager, CallbackInfo ci) throws IOException { for (Triplet<String, VertexFormat, Consumer<Shader>> entry : CUSTOM_SHADERS) { Shader shader = new Shader(manager, entry.getA(), entry.getB()); this.shaders.put(shader.getName(), shader); entry.getC().accept(shader); } } }
java
1 Nidugah di pamhod* Hiyah ne agape hinan hapit di iGreece. Ama tu'un ditu'u, at hiyanan imbilang ditu'uh imbaluyna! Ya immannung an imbaluy ditu'u! Ya nan tatagun nappuhiy pangatdah tun luta ya agguyda inilay aat Apo Dios an unudon tu'u, at hiyaat unda agguy inilay aat tu'u goh. 2 Ya da'yun i'ibba' an popohdo' ya ditu'uy imbabaluy Apo Dios ad ugwan. Mu awni ta udum hi algaw ya wada goh di nob'on hi aat tu'u ti hay nangiyimbaluyan Apo Dios ay ditu'u, mu mid inila tu'uh aatnad ugwan. Mu hay inila tu'u ya hi pidwah pumbangngadan Kristu at mahukatan di aat tu'u ta mipaddung tu'un Hiya ti ihamad tu'un mannig ay Hiyah aatna. 3 Ya heten aton Kristun ditu'uh pidwa ya mahapul di hiyay edenol tu'un mamannod ta ihamad tu'uy ugali tu'u ta umat hi ugalin Kristun nahamad. 4 Ya nan tagun mabaholan di adi mangunud hinan Uldin Apo Dios ti hay aat di bahol ya nan adi pangunudan hinan Uldin. 5 Ya inilayun immalih Kristu ta way atonan mangaliw hi bahol di tatagu, ya inilayu goh an mid ah baholna. 6 At an amin di munnonong ay Hiya ya adida itugtugan mabahobaholan. Mu nan tatagun mangitugtugan mabahobaholan ya diday agguy nanginnilah aat Jesus, ya agguyda inimmatunan di aatna. 7 Imbabaluy'u, elanyu ta adi da'yu balbaliyan hinan mangitudtuduh nahinnu! Nan tatagun mangamangat hi nahamad ya diday nahamad di ugalina an umat ay Kristun nahamad di ugalina. 8 Mu nan tatagun mangitugtugan mabahobaholan ya diday mun'immapit ay Satanas ti nete"ah din hopapna ya nabaholan hi Satanas ta engganad ugwan. At hiyaat un immali ahan han Imbaluy Apo Dios ta way atonan mangabak hinan ato'aton Satanas. 9 An amin nan nibilang hi imbaluy Apo Dios ya adida itugtugan mabahobaholan ti binoltanda nan ugalin Apo Dios. Ya diday inyimbaluy Apo Dios, at adi mabalin unda itugtugan mabahobaholan. 10 Ya ma'innilah un imbaluy Apo Dios nan tagu unu imbaluy Satanas ti an amin di tagun adi mangat hi maphod unu mid pamhoddah i'ibbada ya diday imbabaluy Satanas. 11 Hay dengngolyuh tugun hidin hopap di nitudtudun da'yu ya alyonay mahapul an mumpopohhodan† Hiyah ne agape hinan hapit di iGreece. tu'u. 12 Ya adi tu'u aton din inat Cain ti nun'immapit ay Satanas, at hiyanan pinatoynay agina. Ya manu ay pimmatoy ti hiya ya nappuhiy ina'inatna, mu maphod di ina'inat din agina.‡ Gen. 4:1-8. Hay ngadan agin Cain ya hi Abel. 13 At umat goh ay da'yu, i'ibba', at adi ayu manoh'ah un da'yu boholon hinan tataguh tun luta ti gagangaynan nipaddungdan Cain. 14 Ya inila tu'un adi tu'u milahhin ay Apo Dios ti un tu'u mi'tagun Hiyah mid pogpogna, ya hay pangimmatunan ya waday pamhod tu'uh i'ibba tu'u. Ti an amin di mid pamhodnah nan i'ibbana ya diday nilahhin ay Apo Dios. 15 Ya an amin di mamohol hi i'ibbana ya nipaddung hinan pimmatoy, ya inilayu an adi mi'tagun Apo Dios nan pumatoy, at umat goh hinan mamohol hinan i'ibbana. 16 Ya hiyah te panginnilaan tu'uh aat di nahamad an pamhod ti inila tu'uy inat Jesus an nangiyatoy ay ditu'u. Ya maphod hi un tu'u goh baliwan di i'ibba tu'uh unda mahapul di badang tu'u an ta"on hi un tu'u iyatoy! 17 Ya gulat ta tigon nan adangyan an taguy ibbanan munhapul hi badang ta mid gohgohnan hiya at undan mah way pamhodnan Apo Dios? 18 Da'yun imbabaluy'u, hay pangipattigan tu'uh pamhod tu'uh i'ibba tu'u ya bo'on hay hapit ya anggay ti nan ato'aton tu'un maphod ay dida ti hiyay nahamad hi pangipattigan hi pamhod. 19 Ya aton tu'u ay hana ta nahamad di pamhod tu'uh i'ibba tu'u at hiyah ne panginnilaan an immannung an niddum tu'uh nan Nahamad an Tugun, ya adi tu'u bumain hi idduman tu'un Apo Dios. 20 Ya gulat ta numanomnom nan ohan kimmulug ti alyonah nomnomnay, “Ini, agguy nahamad nin di nidduma' ay Kristu, at bo'ona' Kristiano!” mu inilan Apo Dios di aatna tuwali ti inilanan amin di logom, at gapu ta waday nahamad an pamhodnah nan i'ibbana at hiyay pangipattigan hi niddumanan Apo Dios. Mattig an abakon Apo Dios nan numanomnoman tu'u!§ Hin'umu'uddum ya nidugah di punle'nan nan kimmulug an dumalat nan abaholana, at hiyaat un gun minomnoman. Mu mattig an abuluton Apo Dios damdama ti inilana an nahamad di nangabulutanan Hiyah nitaguana. 21 Ya da'yun i'ibba an popohdo', gulat ta adi tu'u numanomnom hi un way bahol tu'u at adi tu'u goh bumain hinan idduman tu'un Apo Dios. 22 Ya an amin di ibaga tu'un Hiya ya midat ay ditu'u ti unu'unudon tu'uy intuguna, ya ato'aton tu'uy mangipadenol ay Hiya. 23 Ya hay intugun Apo Dios ay ditu'u ya ta kulugon tu'u han Imbaluynan hi Jesu Kristu, ya ta mumpopohhodan tu'u ti hiyana goh din intugun Kristu. 24 An amin tu'un nangunud hinan intugun Apo Dios di nun'immapit ay Hiya, ya nun'immapit goh hi Apo Dios ay ditu'u. Ya hay panginnilaan ya niyo'odol nan Na'abuniyanan an Lennawan ditu'un hennag Apo Dios. *3:1 Hiyah ne agape hinan hapit di iGreece. †3:11 Hiyah ne agape hinan hapit di iGreece. ‡3:12 Gen. 4:1-8. Hay ngadan agin Cain ya hi Abel. §3:20 Hin'umu'uddum ya nidugah di punle'nan nan kimmulug an dumalat nan abaholana, at hiyaat un gun minomnoman. Mu mattig an abuluton Apo Dios damdama ti inilana an nahamad di nangabulutanan Hiyah nitaguana.
english
Our organization insists all along the quality policy of "product quality is base of business survival; purchaser gratification is the staring point and ending of an business; persistent improvement is eternal pursuit of staff" as well as the consistent purpose of "reputation 1st, purchaser first" for two piece biker shorts set, Sport Yoga Pants , Long Sleeves Crop Top , Custom Tee Shirts ,Oversized Sweatshirt . Welcome worldwide customers to contact us for business and long-term cooperation. We will be your reliable partner and supplier. The product will supply to all over the world, such as Europe, America, Australia,New Delhi , Uzbekistan ,European , Tunisia .After 13 years of researching and developing products, our brand can represent wide range of products with outstanding quality in world market. We have completed big contracts from many countries such as Germany, Israel, Ukraine, United Kingdom, Italy, Argentina, France, Brazil, and so on. You probably feel secure and satisfy when copperate with us.
english
from ConfigSpace import ConfigurationSpace, CategoricalHyperparameter import time import warnings import os import numpy as np import pickle as pkl from sklearn.metrics.scorer import balanced_accuracy_scorer from solnml.utils.logging_utils import get_logger from solnml.components.evaluators.base_evaluator import _BaseEvaluator from solnml.components.evaluators.evaluate_func import validation from solnml.components.feature_engineering.task_space import get_task_hyperparameter_space from solnml.components.feature_engineering.parse import parse_config, construct_node from solnml.components.utils.topk_saver import CombinedTopKModelSaver from solnml.components.utils.class_loader import get_combined_candidtates from solnml.components.models.regression import _regressors, _addons from solnml.components.utils.constants import * def get_estimator(config, estimator_id): regressor_type = estimator_id config_ = config.copy() config_['%s:random_state' % regressor_type] = 1 hpo_config = dict() for key in config_: key_name = key.split(':')[0] if regressor_type == key_name: act_key = key.split(':')[1] hpo_config[act_key] = config_[key] _candidates = get_combined_candidtates(_regressors, _addons) estimator = _candidates[regressor_type](**hpo_config) if hasattr(estimator, 'n_jobs'): setattr(estimator, 'n_jobs', 1) return regressor_type, estimator def get_hpo_cs(estimator_id, task_type=REGRESSION): _candidates = get_combined_candidtates(_regressors, _addons) if estimator_id in _candidates: rgs_class = _candidates[estimator_id] else: raise ValueError("Algorithm %s not supported!" % estimator_id) cs = rgs_class.get_hyperparameter_search_space() return cs def get_cash_cs(include_algorithms=None, task_type=REGRESSION): _candidates = get_combined_candidtates(_regressors, _addons) if include_algorithms is not None: _candidates = set(include_algorithms).intersection(set(_candidates.keys())) if len(_candidates) == 0: raise ValueError("No algorithms included! Please check the spelling of the included algorithms!") cs = ConfigurationSpace() algo = CategoricalHyperparameter('algorithm', list(_candidates)) cs.add_hyperparameter(algo) for estimator_id in _candidates: estimator_cs = get_hpo_cs(estimator_id) parent_hyperparameter = {'parent': algo, 'value': estimator_id} cs.add_configuration_space(estimator_id, estimator_cs, parent_hyperparameter=parent_hyperparameter) return cs def get_fe_cs(task_type=REGRESSION, include_image=False, include_text=False, include_preprocessors=None): cs = get_task_hyperparameter_space(task_type=task_type, include_image=include_image, include_text=include_text, include_preprocessors=include_preprocessors) return cs def get_combined_cs(task_type=REGRESSION, include_image=False, include_text=False, include_preprocessors=None): cash_cs = get_cash_cs(task_type) fe_cs = get_fe_cs(task_type, include_image=include_image, include_text=include_text, include_preprocessors=include_preprocessors) for hp in fe_cs.get_hyperparameters(): cash_cs.add_hyperparameter(hp) for cond in fe_cs.get_conditions(): cash_cs.add_condition(cond) for bid in fe_cs.get_forbiddens(): cash_cs.add_forbidden_clause(bid) return cash_cs class RegressionEvaluator(_BaseEvaluator): def __init__(self, fixed_config=None, scorer=None, data_node=None, task_type=REGRESSION, resampling_strategy='cv', resampling_params=None, timestamp=None, output_dir=None, seed=1): self.resampling_strategy = resampling_strategy self.resampling_params = resampling_params self.fixed_config = fixed_config self.scorer = scorer if scorer is not None else balanced_accuracy_scorer self.task_type = task_type self.data_node = data_node self.output_dir = output_dir self.seed = seed self.onehot_encoder = None self.logger = get_logger(self.__module__ + "." + self.__class__.__name__) self.continue_training = False self.train_node = data_node.copy_() self.val_node = data_node.copy_() self.timestamp = timestamp def __call__(self, config, **kwargs): start_time = time.time() return_dict = dict() self.seed = 1 downsample_ratio = kwargs.get('resource_ratio', 1.0) # Convert Configuration into dictionary if not isinstance(config, dict): config = config.get_dictionary().copy() else: config = config.copy() if self.fixed_config is not None: config.update(self.fixed_config) self.estimator_id = config['algorithm'] if 'holdout' in self.resampling_strategy: # Prepare data node. with warnings.catch_warnings(): warnings.filterwarnings("ignore") if self.resampling_params is None or 'test_size' not in self.resampling_params: test_size = 0.33 else: test_size = self.resampling_params['test_size'] from sklearn.model_selection import ShuffleSplit ss = ShuffleSplit(n_splits=1, test_size=test_size, random_state=self.seed) for train_index, test_index in ss.split(self.data_node.data[0], self.data_node.data[1]): _x_train, _x_val = self.data_node.data[0][train_index], self.data_node.data[0][test_index] _y_train, _y_val = self.data_node.data[1][train_index], self.data_node.data[1][test_index] self.train_node.data = [_x_train, _y_train] self.val_node.data = [_x_val, _y_val] data_node, op_list = parse_config(self.train_node, config, record=True) _val_node = self.val_node.copy_() _val_node = construct_node(_val_node, op_list) _x_train, _y_train = data_node.data _x_val, _y_val = _val_node.data config_dict = config.copy() # regression gadgets regressor_id, clf = get_estimator(config_dict, self.estimator_id) score = validation(clf, self.scorer, _x_train, _y_train, _x_val, _y_val, random_state=self.seed) if np.isfinite(score): model_path = CombinedTopKModelSaver.get_path_by_config(self.output_dir, config, self.timestamp) if not os.path.exists(model_path): with open(model_path, 'wb') as f: pkl.dump([op_list, clf, score], f) else: with open(model_path, 'rb') as f: _, _, perf = pkl.load(f) if score > perf: with open(model_path, 'wb') as f: pkl.dump([op_list, clf, score], f) self.logger.info("Model saved to %s" % model_path) elif 'cv' in self.resampling_strategy: with warnings.catch_warnings(): warnings.filterwarnings("ignore") if 'cv' in self.resampling_strategy: if self.resampling_params is None or 'folds' not in self.resampling_params: folds = 5 else: folds = self.resampling_params['folds'] from sklearn.model_selection import KFold kfold = KFold(n_splits=folds, random_state=self.seed, shuffle=False) scores = list() for train_index, test_index in kfold.split(self.data_node.data[0], self.data_node.data[1]): _x_train, _x_val = self.data_node.data[0][train_index], self.data_node.data[0][test_index] _y_train, _y_val = self.data_node.data[1][train_index], self.data_node.data[1][test_index] self.train_node.data = [_x_train, _y_train] self.val_node.data = [_x_val, _y_val] data_node, op_list = parse_config(self.train_node, config, record=True) _val_node = self.val_node.copy_() _val_node = construct_node(_val_node, op_list) _x_train, _y_train = data_node.data _x_val, _y_val = _val_node.data config_dict = config.copy() # regressor gadgets regressor_id, clf = get_estimator(config_dict, self.estimator_id) _score = validation(clf, self.scorer, _x_train, _y_train, _x_val, _y_val, random_state=self.seed) scores.append(_score) score = np.mean(scores) elif 'partial' in self.resampling_strategy: # Prepare data node. with warnings.catch_warnings(): warnings.filterwarnings("ignore") if self.resampling_params is None or 'test_size' not in self.resampling_params: test_size = 0.33 else: test_size = self.resampling_params['test_size'] from sklearn.model_selection import ShuffleSplit ss = ShuffleSplit(n_splits=1, test_size=test_size, random_state=self.seed) for train_index, test_index in ss.split(self.data_node.data[0], self.data_node.data[1]): _x_train, _x_val = self.data_node.data[0][train_index], self.data_node.data[0][test_index] _y_train, _y_val = self.data_node.data[1][train_index], self.data_node.data[1][test_index] self.train_node.data = [_x_train, _y_train] self.val_node.data = [_x_val, _y_val] data_node, op_list = parse_config(self.train_node, config, record=True) _val_node = self.val_node.copy_() _val_node = construct_node(_val_node, op_list) _x_train, _y_train = data_node.data if downsample_ratio != 1: down_ss = ShuffleSplit(n_splits=1, test_size=downsample_ratio, random_state=self.seed) for _, _val_index in down_ss.split(_x_train, _y_train): _act_x_train, _act_y_train = _x_train[_val_index], _y_train[_val_index] else: _act_x_train, _act_y_train = _x_train, _y_train _val_index = list(range(len(_x_train))) _x_val, _y_val = _val_node.data config_dict = config.copy() # Regressor gadgets regressor_id, clf = get_estimator(config_dict, self.estimator_id) score = validation(clf, self.scorer, _act_x_train, _act_y_train, _x_val, _y_val, random_state=self.seed) if np.isfinite(score) and downsample_ratio == 1: model_path = CombinedTopKModelSaver.get_path_by_config(self.output_dir, config, self.timestamp) if not os.path.exists(model_path): with open(model_path, 'wb') as f: pkl.dump([op_list, clf, score], f) else: with open(model_path, 'rb') as f: _, _, perf = pkl.load(f) if score > perf: with open(model_path, 'wb') as f: pkl.dump([op_list, clf, score], f) self.logger.info("Model saved to %s" % model_path) else: raise ValueError('Invalid resampling strategy: %s!' % self.resampling_strategy) try: self.logger.info('Evaluation<%s> | Score: %.4f | Time cost: %.2f seconds | Shape: %s' % (regressor_id, self.scorer._sign * score, time.time() - start_time, _x_train.shape)) except: pass # Turn it into a minimization problem. return_dict['objective_value'] = -score return -score
python
const mysql = require('mysql'); //create MYSQL Connection const db = mysql.createConnection({ host:'localhost', user: 'root', password: '', database: 'crystal' }); // connect db.connect(function(err) { if (err) { console.error('error connecting: ' + err.stack); return; } console.log('connected as id ' + db.threadId); }); module.exports = db; module.exports.getUserByUsername= function (username, callback) { var query = {username:username}; User.findOne(query,callback); }; module.exports.getUserById = function (id, callback) { User.findById(id,callback); }; module.exports.comparePassword = function (candidatePassword,hash,callback) { bcrypt.compare(candidatePassword, hash, function(err, isMatch) { if(err) throw err; callback(null,isMatch); }); };
javascript
<reponame>H1d3r/argc #[macro_export] macro_rules! snapshot { ( $source:expr, $args:expr, ) => { let runner = argc::Runner::new($source); let (stdout, stderr) = match runner.run($args).unwrap() { Ok(stdout) => (stdout, String::new()), Err(stderr) => (String::new(), stderr), }; let args = $args.join(" "); let output = format!( r###"RUN {} STDOUT {} STDERR {} "###, args, stdout, stderr ); insta::assert_snapshot!(output); }; } #[macro_export] macro_rules! plain { ( $source:expr, $args:expr, $(stdout: $stdout:expr,)? $(stderr: $stderr:expr,)? ) => { let result = match argc::run($source, $args).unwrap() { Ok(stdout) => (stdout, String::new()), Err(stderr) => (String::new(), stderr), }; $({ assert_eq!(result.0.as_str(), $stdout); })? $({ assert_eq!(result.1.as_str(), $stderr); })? }; } #[macro_export] macro_rules! fatal { ( $source:expr, $args:expr, $err:expr ) => { let err = argc::run($source, $args).unwrap_err(); assert_eq!(err.to_string().as_str(), $err); }; }
rust
<filename>projects/Button/disable-change-color/docs/en.json<gh_stars>1-10 { "name": "DisableChangeColor", "desc": "Disable the button", "tags": ["Button", "UIState", "DISABLED", "state"], "preview": "preview.png", "category": "Button", "order": 1, "width": 800, "height": 600 }
json
Former Indian team captain MS Dhoni is currently on a holiday in Himachal Pradesh with wife Sakshi Singh and their daughter Ziva. Sakshi and Ziva's Instagram accounts are filled with incredible pictures from the vacation captured in various quaint locations. Moreover, Dhoni is seen sporting a 'new look' with a fuller moustache, much to the surprise of his fans. The pictures and a couple of videos in Sakshi's Instagram handle also feature their vacation residence against a picturesque backdrop of the hills. In response to a comment about their vacation spot, Sakshi mentioned that they were staying in Ratnari, an Apple Orchard Bungalow close to Shimla. The former Indian skipper has been enjoying his family time ever since the midway suspension of the Indian Premier League (IPL) due to Covid-19. Dhoni apparently chose to spend his holidays in Himachal Pradesh as the state government had eased their lockdown norms. The Chennai Super Kings captain led his team to the second spot on the points table, having secured 5 wins of 7 matches, before the tournament was suspended midway over concerns due to the pandemic. The matches will resume from the third week of September in the United Arab Emirates (UAE), as per a statement by the BCCI. Follow us on Google News and stay updated with the latest!
english
import tensorflow as tf from tensorflow.keras import layers from tensorflow.keras.models import Model as tf_Model from Model import Model from PreprocessingParameters import PreprocessingParameters from DataProperties import DataProperties class VGG19Model(Model): def __init__(self, **kwargs): super().__init__(**kwargs) def construct_model(self): # inputs = layers.Input( # shape = PreprocessingParameters.target_shape + \ # PreprocessingParameters.n_color_channels # ) # resize = tf.keras.layers.Lambda( # lambda image: tf.image.resize( # image, # (224, 224), # preserve_aspect_ratio = True # ) # )(inputs) # x = Conv2D(input_shape = (224, 224, 3), filters = 64, kernel_size = (3, 3), activation = 'relu', padding = 'same')(resize) # x = Conv2D(filters = 64, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = MaxPooling2D(pool_size = (2, 2), strides = (2, 2))(x) # x = Conv2D(filters = 128, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 128, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = MaxPooling2D(pool_size = (2, 2), strides = (2, 2))(x) # x = Conv2D(filters = 256, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 256, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 256, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 256, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = MaxPooling2D(pool_size = (2, 2), strides = (2, 2))(x) # x = Conv2D(filters = 512, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 512, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 512, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 512, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = MaxPooling2D(pool_size = (2, 2), strides = (2, 2))(x) # x = Conv2D(filters = 512, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 512, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 512, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = Conv2D(filters = 512, kernel_size = (3, 3), activation = 'relu', padding = 'same')(x) # x = MaxPooling2D(pool_size = (2, 2), strides = (2, 2))(x) # x = Flatten()(x) # x = Dense(units = 4096, activation = 'relu')(x) # x = Dense(units = 4096, activation = 'relu')(x) # predictions = Dense(units = DataProperties.n_classes, activation = 'softmax')(x) # self.model = tf_Model(inputs = inputs, outputs = predictions) model = tf.keras.models.Sequential() model.add(layers.Conv2D(64, kernel_size = (3,3), padding = 'same', activation = 'relu', input_shape = (224, 224, 3), kernel_initializer = 'he_normal')) model.add(layers.Conv2D(64, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.MaxPooling2D(pool_size = (2,2), strides = (2,2))) model.add(layers.Conv2D(128, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(128, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.MaxPooling2D(pool_size = (2,2), strides = (2,2))) model.add(layers.Conv2D(256, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(256, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(256, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(256, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.MaxPooling2D(pool_size = (2,2), strides = (2,2))) model.add(layers.Conv2D(512, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(512, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(512, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(512, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.MaxPooling2D(pool_size = (2,2), strides = (2,2))) model.add(layers.Conv2D(512, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(512, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(512, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.Conv2D(512, kernel_size = (3,3), padding = 'same', activation = 'relu', kernel_initializer = 'he_normal')) model.add(layers.MaxPooling2D(pool_size = (2,2), strides = (2,2))) model.add(layers.Flatten()) model.add(layers.Dense(4096, activation = 'relu')) model.add(layers.Dropout(0.5)) model.add(layers.Dense(4096, activation = 'relu')) model.add(layers.Dropout(0.5)) model.add(layers.Dense(3, activation = 'softmax')) self.model = model
python
<gh_stars>0 .layout-inner { max-width: 1000px; padding: 50px; margin: 0 auto; }
css
Don’t Miss Out on the Latest Updates. Subscribe to Our Newsletter Today! Ayodhya: Big news for devotees of Lord Ram, the Ram Temple in Ayodhya will be opened on the occasion of Makar Sankranti in January 2024 after the installation of the idol of Ram Lalla in the sanctum sanctorum. The temple will be earthquake-resistant and sturdy enough to last over 1,000 years. This information was shared by Ram Janmabhoomi Teerth Kshetra Trust general secretary Champat Rai. The temple is being built at a cost of Rs 1,800 crore and 50 per cent of the construction work has been completed, added Champat Rai. The temple will have 392 pillars and 12 doors and is being constructed without using iron bars. Instead of iron, copper chips are being used to join stones, said Rai. The sanctum sanctorum will have 160 pillars while the first floor will have 82. In all, the structure will have 12 entry gates made of teak wood while a majestic main entrance, the “Singh Dwar”, on the first floor will lead to the “dance”, “colour” and “esoteric” pavilions. The dimension of the main temple will be 350×250 ft. On the suggestion of Prime Minister Narendra Modi, a study is being done to assess the impact of the footfall on the five km area around the temple once it is opened. “We are satisfied with the speed and the quality of the work being done,” he added. Granite stones brought from Rajasthan are being used in the construction of the temple which is spread over an area of 2. 7 acres. Project manager Jagdish Aphale said the sanctum sanctorum has been constructed in a way that sun rays fall on Ram Lalla’s statue on Ram Navami. For breaking news and live news updates, like us on Facebook or follow us on Twitter and Instagram. Read more on Latest Uttar Pradesh News on India. com.
english
Hyderabad: Telangana State, being seven years in existence, came up trumping even as the Covid crisis engulfed the country in the first wave of the pandemic. Telangana’s GSDP share in national GDP at current prices increased by 5 percent in 2020-21, and also recorded a 1. 5 percent growth in GSDP, besides putting the brakes on the unemployment rate. Union Ministry of Statistics and Program Implementation (MoSPI) in its reports quoted the improvement of Telangana. MoSPI said, Telangana’s GSDP share of national GDP at current prices increased significantly from 4. 1 percent in 2014-15 to 4. 4 percent in 2017-18 and is placed at 5 percent in 2020-21 despite the adverse impact of the pandemic. At constant prices, the State GSDP growth has been higher than that of the national GDP since 2015-16. While the State GSDP grew by 11. 6 percent in 2015-16, it decreased to 7. 9 percent in 2019-20 and contracted to 1. 26 percent in 2020-21 due to the Covid-19 pandemic. On the other hand, the national GDP, which grew by 8 percent in 2015-16, decreased to 4 percent in 2019-20 and fell sharply to minus 8 percent in 2020-21. GSDP increase relates to the State’s performance in the primary sector, comprising agriculture, dairy, and poultry among others, which recorded a growth of 17. 7 percent in 2020-21. The secondary and services sectors contracted to 5. 2 percent and 1. 9 percent, respectively. “The agriculture sector grew by an impressive 20. 9 percent in 2020-21, cushioning the impact of Covid-19. This was due to measures taken by the State government to stimulate the rural economy. Although industrial and services growth contracted, the contraction was less severe than at the national level,” Finance Department officials told. According to the International Monetary Fund, the global economy is estimated to have contracted by 4. 4 percent in 2020 (compared to 2019). The second advance estimates released by the MoSPI reveal that the national economic output, measured by GDP, will shrink by 8 percent at current prices in 2020-21. However, Telangana’s GSDP grew by 1. 35 percent at current (2020-21 base) prices. The pandemic saw the unemployment rate rise and fall in business activity across the country, leading to a sharp contraction of the economy during the lockdown period. Telangana was no exception, but the State’s economy displayed far more resilience than the rest of the country. The government moves obviously resulted in better insulation of its citizens against the impact of the pandemic. India faced unemployment during the lockdown with the national unemployment rate shooting up from 7. 8 percent in February last to 9. 1 percent in December. Centre reported, Monitoring Indian Economy (CMIE), Telangana had put up a better performance. The unemployment rate, which was 8. 3 percent in the State in February last, dropped to 7 percent in December last. Though the unemployment in India peaked at 23. 5 percent in April and 21. 7 percent in May during the lockdown, the increase in the unemployment rate was delayed in Telangana and the peak was much lower at 14. 7 percent.
english
import { ChakraField } from '@/components/common/index' import { useCreateSubredditMutation } from '@/generated/graphql' import { CategorySchema } from '@/types/Category/schemas' import { CategoryInputType } from '@/types/Category/types' import { convertToErrorMap } from '@/utils/index' import { gql } from '@apollo/client' import { Button, chakra, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, IconButton, Tooltip, useColorModeValue, useDisclosure, useToast, } from '@chakra-ui/react' import { Form, Formik } from 'formik' import { useRouter } from 'next/router' import { useRef } from 'react' import { MdCreateNewFolder } from 'react-icons/md' function CreateCategoryDrawer() { const drawerBG = useColorModeValue('whitesmoke', 'gray.900') const router = useRouter() const { isOpen, onOpen, onClose } = useDisclosure() const toast = useToast() const buttonColor = useColorModeValue('purple', 'blue') const [createCategory, { loading }] = useCreateSubredditMutation() const btnRef = useRef<HTMLButtonElement | null>(null) return ( <> <Tooltip hasArrow label="Create Subreddit" fontSize="md" bg="black" color="whitesmoke" > <chakra.span> <IconButton variant="ghost" aria-label="Create a Subreddit" icon={<MdCreateNewFolder size="1.5em" />} ref={btnRef} size="md" onClick={onOpen} /> </chakra.span> </Tooltip> <Drawer isOpen={isOpen} placement="right" onClose={onClose} finalFocusRef={btnRef} > <DrawerOverlay /> <DrawerContent bg={drawerBG}> <DrawerCloseButton /> <DrawerHeader>Create Subreddit</DrawerHeader> <Formik initialValues={CategoryInputType} validationSchema={CategorySchema} onSubmit={async (values, actions) => { actions.setSubmitting(false) let response try { response = await createCategory({ variables: { data: { name: values.name, }, }, update(cache, { data }) { if (!data?.createCategory.errors) { cache.modify({ fields: { categories(existingCategories = []) { const newCategoryRef = cache.writeFragment({ data: data?.createCategory.category, fragment: gql` fragment NewCategory on Category { id name } `, }) return [newCategoryRef, ...existingCategories] }, }, }) } }, }) } catch (ex) { console.log(ex) } if (response?.data?.createCategory?.category) { toast({ id: `${response.data.createCategory.category.name}-category`, title: `${response.data.createCategory.category.name}!`, description: 'Your subreddit/category was created successfully.', status: 'success', duration: 9000, isClosable: true, }) router.push(`/r/${response?.data.createCategory.category.name}`) onClose() } else if (response?.data?.createCategory.errors) { actions.setErrors( convertToErrorMap(response.data.createCategory.errors) ) } }} > {({ isSubmitting }) => { return ( <Form> <DrawerBody> <ChakraField id="name" name="name" label="Name/Title" /> </DrawerBody> <DrawerFooter> <Button variant="outline" mr={3} onClick={onClose}> Cancel </Button> <Button type="submit" isLoading={isSubmitting || loading} colorScheme={buttonColor} > Submit </Button> </DrawerFooter> </Form> ) }} </Formik> </DrawerContent> </Drawer> </> ) } export default CreateCategoryDrawer
typescript
{ "name": "nodeverify", "version": "1.0.0", "description": "NodeVerify is used to perform some generic work in testing orchestrators performance and overhead.", "main": "server.js", "scripts": { "test": "return 1", "dev": "node ./src/server.js", "devvscode": "node --nolazy --inspect=5858 ./src/server.js", "start": "node ./src/server.js", "lint": "eslint src" }, "repository": { "type": "git", "url": "https://github.com/jmhardison/nodeverify" }, "author": "<NAME> <<EMAIL>>", "license": "MIT", "bugs": { "url": "https://github.com/jmhardison/nodeverify" }, "homepage": "https://github.com/jmhardison/nodeverify", "dependencies": { "express": "^4.17.1", "request": "^2.88.2", "uuid": "^8.3.2" } }
json
package com.pranav.commons.exception; public class DependencyException extends Exception{ /** * */ private static final long serialVersionUID = 8829994558750752066L; public DependencyException() { super("Service Exception"); } public DependencyException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } public DependencyException(String message, Throwable cause) { super(message, cause); } public DependencyException(String message) { super(message); } public DependencyException(Throwable cause) { super("Service Exception", cause); } }
java
The victory of the Bharatiya Janata Party-led National Democratic Alliance in the 2019 Lok Sabha election was historic because of two factors: The number of seats the BJP took, as well as the enormity of the margin by which several leaders won. For example, Darshana V Jardosh from the Surat Lok Sabha constituency won with the biggest vote share: She got 74. 4 per cent (790,000) of the vote. Running her close was C R Patil from the Navsari Lok Sabha constituency: He secured a vote share of 74. 3 per cent and got more than 900,000 votes. But some successful candidates had low vote shares. Mohammad Akbar Lone of the the National Conference contested from the Baramulla seat and got only 29. 4 per cent of the vote but was elected. Hasnain Masoodi (National Conference, Anantnag) got just 31 per cent of the vote. TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH. What you get on Business Standard Premium? - Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app. - Pick your 5 favourite companies, get a daily email with all news updates on them. - Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006. - Preferential invites to Business Standard events. - Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more.
english
<gh_stars>0 /** * index.scss * - Add any styles you want here! */ /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } * { box-sizing: border-box; } h1 { display: inline; color: #fff; font-size: 30px; display: block; text-align: center; } a { text-decoration: none; color: #fff; transition: all 0.35s ease-in; } a:hover { color: gold; } form { display: inline-block; margin: 0 auto; } label { text-align: left; margin-bottom: 20px; margin-right: auto; margin-left: auto; display: block; } input { margin-bottom: 70px; width: 400px; height: 50px; border: none; font-size: 20px; padding: 20px; display: block; } .container { display: block; overflow: hidden; margin: 0 auto; width: 80%; max-width: 1200px; position: relative; } .100Height { height: 100%; } body { background: #f5f5f5; font-family: Arial; font-size: 18px; } .navigation { z-index: 100; position: absolute; top: 0; width: 100%; padding: 50px 0; background-color: rgba(0, 0, 0, 0.6); overflow: hidden; text-transform: uppercase; } .navigation-links { padding: 10px; border-top: 2px solid #fff; border-bottom: 2px solid #fff; font-size: 24px; text-align: center; } .logo { height: 120px; display: block; margin: 0 auto; margin-top: 10px; margin-bottom: 70px; } .link { display: inline-block; margin-right: 60px; color: #fff; } .hero { z-index: 10; padding-top: 120px; position: relative; background-color: #dedede; background-image: url(../Images/bar.jpeg); background-repeat: no-repeat; background-size: cover; background-position: center; height: 980px; box-shadow: 0px 25px 20px 5px rgba(0, 0, 0, 0.4); } .form { z-index: 0; position: relative; height: 1200px; background-color: green; background-repeat: no-repeat; background-position: center; background-size: cover; background-image: url(../Images/background-texture.jpeg); padding-top: 150px; } .notify { text-align: center; color: #fff; font-size: 24px; color: gold; padding: 80px 30px; position: absolute; top: 58%; left: 50%; background-color: rgba(0, 0, 0, 0.75); -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); width: 70%; border-radius: 4px; max-width: 700px; margin: 0 auto; } #HearAboutUs { height: 150px; }
css
Hey, DeFi enthusiast! Are you tired of searching various platforms for borrowing, lending, and exchange? Then Instadapp is the best option for you. It provides all features on a single platform. Let's get into InstaDapp and its clone. What is InstaDapp? InstaDapp is a decentralized application (DApp) built on the Ethereum (ETH) network that integrates various decentralized finance (DeFi) protocols. It incorporates other DApps and platform, protocols for customers to manage all of their funds. The DeFi Smart Layer (DSL), is a foundational element of InstaDapp that enables the aggregation of DeFi protocols from various platforms. InstaDapp Clone Script: InstaDapp clone script is an application that resembles InstaDapp with existing features. It provides a replica of the features in your clone scripts. Developing a platform from scratch is more time-consuming and expensive. Clone script provides an immediate launch with your own ideas. How Does InstaDapp Work? To use InstaDapp, users need to have a Web3-enabled Ethereum wallet, like MetaMask, that connects to InstaDapp via the dashboard. Following the connection, users can access a platform with all of InstaDapp's available features. The platform integrated "DeFi Smart Accounts (DSAs)" by InstaDapp. Users can manage, assign, and optimize funds from several protocols using DSAs. To provide account holders with more cross-protocol transactions, developers can build on top of the DSAs. DeFi Smart Layer: The DeFi Smart Layer (DSL), which was established by InstaDapp, is the foundational architecture that enables the aggregation of DeFi protocols from various platforms. The three parts of the DSL are as follows: Smart accounts are used by users to hold assets and carry out transactions through connectors. Connectors are described as standardized components that communicate with DeFi protocols and provide smart contracts access to DeFi services. Developers create smart contracts, which are used to carry out DeFi transactions across different protocols. Authority is given to users who can assign managers, automation bots, or guardians to oversee their DSAs. Users can configure customized permissions based on the standardized modules so that the addresses covered by those modules can only carry out those functions. In the InstaDapp clone script, the integrated Defi smart layer provides similar features. Platform integration: The platforms that are currently integrated with the InstaDapp clone script include Uniswap (UNI), Compound Finance (COMP), and MakerDAO (DAI). Users can lend, borrow, swap, manage liquidity pools, and generate collateralized debt positions (CDP) via the dashboard by integrating these services into InstaDapp. Integration of compound finance protocol into InstaDapp, which provides borrowing and lending features in the application. Uniswap is integrated into InstaDapp which provides exchange in the application. MakerDAO enables the creation of collateralized debt. Other protocols integrated are the Hop protocol, Aave, and Morpho protocol. Before InstaDapp: Before InstaDapp, users would manually keep track of their assets and determine the best interest rates, collateralization ratios, and other factors for each platform. Due to its intricacy, users could discover that manual monitoring demands a lot of work. This is made easier by the entry of InstaDapp's DSA into the DeFi space, which links the various protocols, gathers the relevant data, and summarises everything into a single view on the dashboard. Users can manage their cross-protocol assets with ease as a result. In addition, users would have to do different actions on each platform before using InstaDapp to transfer assets. Primary Features of InstaDapp: Through the use of smart contracts, InstaDapp automates the above procedures, requiring users to merely alter the settings and carry out the transfers with a few mouse clicks. Users are not charged by InstaDapp for the transfers. To transport assets through the Ethereum network, users only need to have a small amount of money put aside for the gas fee. The DApp uses non-custodial wallets to store assets, so users always have access to their funds and InstaDapp has no way of getting ownership of them. InstaDapp transparently holds immutable records regarding transactions and assets on the blockchain, much like all blockchain-based applications. Why invest in an InstaDapp clone? If you are interested in investing in the latest technologies, like blockchains then InstaDapp clone scripts are the best option to scale as a startup. The InstaDapp clone provides vast features and provides solutions to market requirements. It integrates multiple protocols, platforms, and features. Why WeAlwin for InstaDapp clone? As a DeFi development company WeAlwin provides customer-based support based on your requirements we provide customized solutions. Our experts have more than 5+ years of experience in the blockchain and DeFi fields. For your dream comes true with your customized ideas, join with WeAlwin.
english
ASUS India has finally launched (the company had earlier put a teaser of the same on its site) the Fonepad tablet in the Indian market. The tablet runs on the Android operating system and will be available for a price of Rs 15,999 across Croma stores and select ASUS authorized retail outlets starting April 30, 2013. Here is a look at the specifications of the device. The Fonepad sports a 7 inch WXGA LED backlit IPS HD touchscreen display (1280x800 pixel resolution) and runs on the Android 4.1 Jelly Bean operating system. It is powered by a 1.2 GHz Intel Atom Z2420 processor and has 1GB of RAM. The internal memory of the device is 8GB, which can be further expanded up to 32GB with a microSD card. Users also get 5GB of free lifetime ASUS WebStorage with the tablet for syncing and sharing data with other devices. On the camera front, it features a 3 megapixel autofocus rear camera that can also record high definition videos (720p), and a 1.2-megapixel front facing camera for video calling. On the connectivity front, it has Wi-Fi, Bluetooth 3.0, as well as a microSD card slot. The device is 10.4mm in thickness and its weight is 340 grams. The company has provided a 4,270 mAh battery that it claims will provide up to nine hours of battery life. The tablet also has ASUS's SonicMaster audio technology for better sound quality. The device has micro-SIM support, and comes with built-in 3G for mobile data and telephony, hence it can be used for voice calling. The company has also provided a number of apps in the device that includes Floating app- for easy management of running apps and multi-tasking; SuperNote- for handwritten notes and drawing; and WebStorage Office Online- for editing of Microsoft Office compatible documents. ASUS has also provided an optional accessory (a wraparound cover) called VersaSleeve 7 for the tablet that will be available in four colors. "Users now want a better screen with entertainment, social media and other online activities. By incorporating 3G mobile data connectivity with full telephony support, we have made ASUS Fonepad a combination of a tablet and smartphone," said Peter Chang, regional director- South Asia and country manager, System Business Group at ASUS India. In the same price range, the tablet will compete with iBall Slide 3G (Rs 15,990), Lenovo Ideapad A1 (Rs 15,628), Samsung Galaxy Tab 2 (Rs 15,990), Viewsonic ViewPad 7 (Rs 14,790) and ASUS's own Google Nexus 7 (Rs 15,999), among others. Although most of these tablets do not support 3G and voice calling, hence the Fonepad scores a brownie point there. People looking for a mid-price range tablet can give it a chance, but don't blame us if others find you weird holding a 7 inch tablet to your ears.
english
46 1 The destruction of Babylon and of their idols. 3 He calleth the Jews to the consideration of his works. 1 Bel is bowed down: [a]Nebo is fallen: their idols were upon their [b]beasts, and upon the cattle: they which did bear you, were laden with a weary burden. 2 [c]They are bowed down, and fallen together, for they could not rid them of the burden, and their [d]soul is gone into captivity. 3 Hear ye me, O house of Jacob, and all that remain of the house of Israel, which are [e]born of me from the womb, and brought up of me from the birth. 4 Therefore unto [f]old age, I the same, even I will bear you until the hoary hairs: I have made you: I will also bear you, and I will carry you, and I will deliver you. 5 ¶ To whom will ye make me like, or make me equal, or [g]compare me that I should be like him? 6 They draw gold out of the bag, and weigh silver in the balance, and hire a goldsmith to make a god of it, and they bow down and worship it. 7 They bear it upon the shoulders: they carry him and set him in his place: so doth he stand, and cannot remove from his place. Though one cry unto him, yet can he not answer, nor deliver him out of his tribulation. 8 Remember this, and be ashamed: bring it again to [h]mind, O you transgressors. 9 Remember the former things of old: for I am God, and there is none other God, and there is nothing like me, 10 Which declare the last thing from the beginning, and from of old: the things that were not done, saying, My counsel shall stand, and I will do whatsoever I will. 11 I call a [i]bird from the East, and the man of my [j]counsel from far: as I have spoken, so will I bring it to pass: I have purposed it, and I will do it. 12 Hear me ye stubborn hearted, that are far from [k]justice. 13 I bring [l]near my justice: it shall not be far off, and my salvation shall not tarry: for I will give salvation in Zion, and my glory unto Israel. - Isaiah 46:1 These were the chief idols of Babylon. - Isaiah 46:1 Because they were of gold and silver, the Medes and Persians carried them away. - Isaiah 46:2 The beasts that carried the idols, fell down under their burden. - Isaiah 46:2 He derideth the idols, which had neither soul nor sense. - Isaiah 46:3 He showeth the difference between the idols and the true God: for they must be carried of others, but God himself carrieth his, as Deut. 32:11. - Isaiah 46:4 Seeing I have begotten you, I will nourish and preserve you forever. - Isaiah 46:5 The people of God, setting their own calamity, and the flourishing estate of the Babylonians, should be tempted to think that their God was not so mighty as the idols of their enemies: therefore he describeth the original of all the idols to make them to be abhorred of all men: showing that the most that can be spoken in their commendation, is but to prove them vile. - Isaiah 46:8 Become wise, meaning, that all idolaters are without wit or sense, like mad men. - Isaiah 46:11 That is, Cyrus, which shall come as swift as a bride, and fight against Babylon. - Isaiah 46:11 Him by whom I have appointed to execute that which I have determined. - Isaiah 46:12 Which by your incredulity would let the performance of my promise. - Isaiah 46:13 He showeth that man’s incredulity cannot abolish the promise of God, Rom. 3:3. Geneva Bible, 1599 Edition. Published by Tolle Lege Press. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, without written permission from the publisher, except in the case of brief quotations in articles, reviews, and broadcasts.
english
F1 expert Mark Hughes recently gave his views on how bad Mercedes' season went in 2023. Even though the Silver Arrows secured second place in the constructors' championship, beating Ferrari, Hughes believes that their season has been worse than the Italian giants for several reasons. Speaking on The Race F1 podcast, the F1 pundit said how Mercedes' faith in a failed concept lingered for far too long into the season, which caused them to lose a lot of development time. "Mercedes narrowly beat Ferrari to second place in the constructors' championship. I'd argue that they had an even more disappointing season than Ferrari. Failing to win a race first time in 12 years, the concept they kept faith in, it just did not work," he said. Furthermore, Hughes pointed out that races such as the 2023 F1 Brazilian GP were where the team fell, even when they were making good progress on other race weekends. This showcased the W14's inconsistencies. "And worse even than that, everytime it looked like they made progress, there was a race like Brazil where they were nowhere. So even late into the season, they were still capable of blindsided by this car," he said. Though Mark Hughes underlined some good aspects of the Mercedes W14, he claimed that they were not enough, and the overall performance of their car must have utterly shaken the team. "It had its good points; the right medium-speed corner speed range was pretty good. It treated its tires well in a stint, but they are just crumbs from the table, really. Terrible discrepancy and one which would have shaken the team to it's core," he commented. Mercedes team boss Toto Wolff is well aware of how quickly a dominant team can switch their focus to the next year's car. His team enjoyed such privileges when they were dominating in F1. Hence, he speculated that Red Bull would have started working on their 2024 F1 car way before everyone else. Speaking to the media at the season finale in Abu Dhabi, Wolff said (via PlanetF1.com): “I’m sure that Red Bull has probably switched off – there is no such thing as switching off [completely], but they will have started next year’s car way ahead of everybody else. "If we were in this situation, looking at our historic strategy, we would probably have been all hands on deck by July on next year’s car."
english
package io.gitlab.allenb1.todolist; import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.support.design.widget.Snackbar; import android.support.v7.app.AlertDialog; import android.util.Log; import android.view.View; import android.view.Window; import java.io.IOException; import java.util.function.Function; public class TaskHelper { public static interface DeleteCallback { public void ondelete(TodoTask task); } public static void deleteTask(final Activity ctx, final TodoTask.TodoList todoList, final int position, final DeleteCallback ondelete) { final TodoTask task = todoList.get(position); AlertDialog dialog = new AlertDialog.Builder(ctx) .setTitle(R.string.dialog_delete_title) .setMessage(R.string.dialog_delete_message) .setPositiveButton(R.string.dialog_delete_button_delete, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int i) { try { todoList.remove(position); todoList.save(); if(ondelete != null) ondelete.ondelete(task); } catch(IOException e) { Snackbar.make(ctx.findViewById(android.R.id.content), R.string.generic_error, Snackbar.LENGTH_LONG).show(); } } }) .setNegativeButton(R.string.dialog_button_cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int i) { dialog.cancel(); } }) .create(); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.show(); } }
java
<reponame>Datenschule/schulscraper-data {"name":"<NAME>","id":"HE-7129-0","official_id":"7129","address":"Am Kirchgarten 5, 34132 Kassel","school_type":"Grundschule","school_type_entity":"Grundschule","fax":" 0561/92001649","state":"HE","phone":" 0561/406280","full_time_school":false,"lon":9.434886,"lat":51.278982}
json
Tehelka magazine editor Tarun Tejpal spent the night at a police lock-up here with two murder accused and an anti-social person, after he was arrested by the Crime Branch. Mr. Tejpal, who was arrested in a sexual assault case, was referred for mandatory medical check-up at Goa Medical College near Panaji at 12:30 midnight. He was taken to Panaji police lock-up at around 2 a. m. , after his medical check-up. Police sources said that Mr. Tejpal will share the lock-up with three more people including two accused of murder and one arrested under preventive action. The Crime Branch sleuths had posted their guards outside the lock-up. The dingy lock-up is located inside the Police Headquarters in Panaji, overlooking the office of the Director General of Police (DGP). Police sources added that he remained calm after his arrest, during medical check-up and also in the lock-up. The 50-year-old-journalist refused to talk to the media after his medical check-up, when he emerged from Goa Medical College. He was accompanied by his lawyer and his family joined him outside the Police Headquarters, before he was taken to the lock-up. He was supplied with a new pair of clothes by his family, as allowed by the Court. Mr. Tejpal would be taken for remand early on Sunday morning. A lady journalist, employed with Tehelka, had accused Mr. Tejpal of sexually assaulting her twice on November 7 and 8 in Goa. He has been booked under Section 354A (outraging the modesty of a woman) and 376 (2)(K) (custodial rape) of IPC.
english
<filename>bit/keygen.py from multiprocessing import Event, Process, Queue, cpu_count from bit.base58 import BASE58_ALPHABET from bit.crypto import ( DEFAULT_BACKEND, SECP256K1, gen_privkey, derive_privkey ) from bit.format import point_to_public_key, public_key_to_address from bit.utils import int_to_hex def derive_private_key(num): return derive_privkey(num, SECP256K1, DEFAULT_BACKEND) def generate_private_key(): return gen_privkey(SECP256K1, DEFAULT_BACKEND) def generate_key_address_pair(): private_key = generate_private_key() public_key = point_to_public_key( private_key.public_key().public_numbers(), compressed=True ) address = public_key_to_address(public_key) return int_to_hex(private_key.private_numbers().private_value), address def generate_matching_address(prefix, cores='all'): # pragma: no cover for char in prefix: if char not in BASE58_ALPHABET: raise ValueError('{} is an invalid base58 encoded ' 'character.'.format(char)) if not prefix: return generate_key_address_pair() elif not prefix.startswith('1'): prefix = '1' + prefix available_cores = cpu_count() if cores == 'all': cores = available_cores elif 0 < cores <= available_cores: cores = cores else: cores = 1 queue = Queue() match = Event() workers = [] for _ in range(cores): workers.append( Process(target=stream_key_address_pairs, args=(queue, match)) ) for worker in workers: worker.start() while True: private_value, address = queue.get() if address.startswith(prefix): match.set() for worker in workers: worker.join() return int_to_hex(private_value), address def stream_key_address_pairs(queue, event): # pragma: no cover while True: private_key = generate_private_key() public_key = point_to_public_key( private_key.public_key().public_numbers(), compressed=True ) address = public_key_to_address(public_key) queue.put_nowait((private_key.private_numbers().private_value, address)) if event.is_set(): return
python
Priyanka Chopra is a busy girl. After presenting at the Oscars last month she had to rush to Miami to start shooting for Hollywood debut film ‘Baywatch’. Her hard work and dedication can be seen in the first look of hers from the film. The writers of ‘Baywatch’, Damian Shannon & Mark Swift, shared the glamorous look of the actress, who plays Victoria. Priyanka dressed in white, can be seen posing while talking over phone. The actress, who will play the main villain in the film, seems to be in the skin of the character. Priyanka’s thigh high slit dress and the high heels compliment well with the character . ‘Baywatch’ revolves around the leader of an elite group of lifeguards (Dwayne Johnson), who is forced to team up with a young, hotshot former Olympian (Zac Efron) to save their beloved bay. Priyanka plays villainous Victoria Deeds. The film is scheduled to release on May 19, 2017.
english
<filename>Source/SpaceShoot/SPBulletEmitter.cpp // Fill out your copyright notice in the Description page of Project Settings. #include "SpaceShoot.h" #include "SPBulletEmitter.h" #include "SPEntity.h" #include "SPBullet.h" #include "TimerManager.h" #include "SPGameMode.h" #include "EmitterDataRow.h" #include "EngineUtils.h" #include <PaperFlipbook.h> USPBulletEmitter::USPBulletEmitter(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) , Owner_(nullptr) , ID_(0) , bPause_(true) , bLoop_(true) , TickIndex_(0) { //static ConstructorHelpers::FObjectFinderOptional<UDataTable> Asset(TEXT("/Game/SpaceShoot/Data/Emitter")); //if (Asset.Succeeded()) //{ // Table = Asset.Get(); //} BulletLife = 5.0f; BulletCount = 1; BulletIDs.Add(1); InnerInterval = 0.5f; } USPBulletEmitter::~USPBulletEmitter() { } bool USPBulletEmitter::Init(ASPEntity *Owner, int32 ID) { Owner_ = Owner; ID_ = ID; //if(Table == nullptr) //{ // return false; //} //Data_ = Table->FindRow<FEmitterDataRow>(*FString::FromInt(ID), TEXT("Message For Load")); //if(Data_ == nullptr) //{ // return false; //} return true; } void USPBulletEmitter::Start() { bPause_ = false; if(Owner_) { Owner_->GetWorldTimerManager().SetTimer(TimerHandle_, this, &USPBulletEmitter::OnTimerEmit, 0.01f, false); } } void USPBulletEmitter::Stop() { bPause_ = true; if(Owner_ && TimerHandle_.IsValid()) { Owner_->GetWorldTimerManager().ClearTimer(TimerHandle_); TimerHandle_.Invalidate(); } } void USPBulletEmitter::OnTimerEmit() { TimerHandle_.Invalidate(); if(bPause_) { return; } float Delay = InnerInterval; if(FMath::IsNearlyZero(Delay)) { for (; TickIndex_ < BulletCount; ++TickIndex_) { Emit(); } } else { Emit(); ++TickIndex_; } if(TickIndex_ >= BulletCount) { if(!bLoop_) { Stop(); OnFinished.ExecuteIfBound(); return; } else { TickIndex_ = 0; Delay += OuterInterval; } } Delay = FMath::Max(Delay, 0.001f); Owner_->GetWorldTimerManager().SetTimer(TimerHandle_, this, &USPBulletEmitter::OnTimerEmit, Delay, false); } void USPBulletEmitter::Emit() { ASPGameMode *GameMode = Cast<ASPGameMode>(UGameplayStatics::GetGameMode(Owner_)); if(nullptr == GameMode || GameMode->IsGamePause()) { return; } int32 nBullets = BulletIDs.Num(); if (nBullets <= 0) { return; } int32 BulletID = BulletIDs[TickIndex_ % nBullets]; FRotator Rotation = Owner_->GetActorRotation(); Rotation.Pitch += AngleOffset * TickIndex_; FVector Position = Owner_->GetActorLocation() + Position_ + PosOffset * TickIndex_; ASPBullet *Bullet = Owner_->GetWorld()->SpawnActor<ASPBullet>(Position, Rotation); if(Bullet != nullptr) { UPaperFlipbook *FlipBook = LoadObject<UPaperFlipbook>(nullptr, TEXT("/Game/SpaceShoot/Sprites/Bullet/2/am")); if(FlipBook != nullptr) { Bullet->GetRenderComponent()->SetFlipbook(FlipBook); } Bullet->Camp = Owner_->Camp; Bullet->Index = TickIndex_; Bullet->LifeTime = BulletLife; Bullet->MotionInfo = BulletMotionInfo; OnBulletSpawned(Bullet); } }
cpp
Candidates can download their hall tickets from the official website districts.ecourts.gov.in from December 10 onwards. Bihar Civil Court has released the exam schedule for the post of Court Reader-cum-Deposition Writer. As per the notification, the exam will be held on December 17, 2023. Eligible candidates will be able to download their hall tickets from the official website districts.ecourts.gov.in from December 10 onwards. “Candidates shall appear in the examination at their own cost at the allotted examination centre on the date/ shift and time indicated in their respective admit cards. Admit cards shall not be dispatched to the candidates individually. The Committee shall not be responsible for any loss/ injury caused to the candidates in course of appearing in the examination,” reads the notification. Here’s the official notification. The recruitment drive aims to fill up a total of 7692 vacancies at Bihar Civil Courts. Clerk, Peon, Court Reader: Preliminary Test, written test, interview. Stenographer: Preliminary Test, written test, steno test and viva voce. For more details, candidates are advised to visit the official website here.
english
'''Program to read a number and check whether it is duck number or not. Hint: A duck number is a number which has zeros present in it, but no zero present in the begining of the number. Input Format a number from the user Constraints n>=0 Output Format Yes or No Sample Input 0 123 Sample Output 0 No Sample Input 1 140 Sample Output 1 Yes''' #solution def duck(num): num.lstrip('0') if num.count('0')>0: return "Yes" return "No" print(duck(input()))
python
- #CoronavirusHow Dogs Can Help Us Detect COVID-19 And Other Diseases? Gangtok, July 26: The Sikkim government has extended the statewide lockdown till August 1 to curb the spread of the novel coronavirus, according to a notification. A complete, six-day lockdown, imposed by the hilly state, was scheduled to end on Sunday. "After careful consideration of the situation, it has been decided to extend the period of lockdown in the entire state of Sikkim till 6 am of August 1, 2020," a notification issued by Chief Secretary S C Gupta said. The state reported its first COVID-19 death on Sunday after a 74-year-old man succumbed to the disease at a state-run hospital here, the official said. Sikkim has 357 active cases of COVID-19, while the total cases stand at 499, a senior health official said. As many as 142 people have recovered from the disease.
english
In this Daana Veera Soora Karna 1977 film, N.t.rama Rao, Jayaprabha played the primary leads. The Daana Veera Soora Karna 1977 was released in theaters on 14 Jan 1977. Movies like Thandel, Bhimaa, Guntur Kaaram and others in a similar vein had the same genre but quite different stories. The soundtracks and background music were composed by Pendyala Mageshwara Rao for the movie Daana Veera Soora Karna 1977. The movie Daana Veera Soora Karna 1977 belonged to the Drama, genre.
english
<reponame>mjchow/kingsoft-dict { "manifest_version": "1", "api_version": "1", "name": "Kingsoft Dict", "description": "Kingsoft Dictionary from En to Cn", "developer_name": "Chenjsa", "icon": "images/icon.png", "options": { "query_debounce": 0.5 }, "preferences": [ { "id": "keyword", "type": "keyword", "name": "Kingsoft Dict", "description": "Find in Kingsoft Dict", "default_value": "ks" } ] }
json
GUWAHATI: Chief Minister Himanta Biswa Sarma has directed the Home Department to streamline the deployment of PSOs (personal security officials) and house guards attached to senior police officers. This direction came close on the heels of the department streamlining the PSO deployment of ministers, MLAs, political leaders, businessmen and others. The Chief Minister directed the Home Department to make sure that battalion commandants and superintendents of police do not deploy any PSO/house guard to any senior police officer without approval from the competent authority. He said, "It has come to my notice that various police officers of different ranks have suo motto taken PSOs, house guards and static guards. " The Chief Minister asked the DGP to issue instructions at all levels for needful compliance and ensure a monitoring mechanism regarding the deployment of PSOs, house guards and others. The directive further said, "All battalion commandants and SPs have to give an undertaking not to attach any battalion personnel with an officer without permission from the authority. They will also not attach any battalion personnel with any officer for PSO/house guard, static duty or other household duties. " The Chief Minister said, "We have withdrawn 700 PSOs from ministers, MLAs, political leaders and others. We have specified the number of PSOs for ministers, MLAs and others. It will lead to the withdrawal of 700 other PSOs. We will withdraw around 600 other PSOs from various individuals. We will withdraw around 2,000 PSOs in all. It is equal to the strength of two battalions. "If we get any proof of police officers engaging their PSOs/house guards in their household works, we will deduct the salaries of the PSOs concerned from the salaries of the police officers concerned. " Police officers availing services of PSOs/house guards more than the permitted number is a common practice in the state. A section of police officers also uses PSOs/house guards for their household works like marketing, escorting children to schools etc. This practice goes on with an understanding between a section of SPs and battalion commandants. There are examples of a section of seniors police officers from outside Assam engaging house guards and static guards for household work in their home states. According to DGP Bhaskar Jyoti Mahanta, getting instruction from the Chief Minister in this way is politically a big thing. "We implemented it as part of the Assam Police reforms," he said. Also Watch:
english
Huawei is the world's third-largest phone manufacturer behind Apple and Samsung, and while it has ambitious plans to overtake its competitors, that's now seeming very unlikely, with a new report from The New York Times indicating that the Chinese giant is considering throwing in the towel when it comes to cracking the US market. According to anonymous sources, Huawei has reportedly laid off five key US employees, including William B. Plummer, vice president of external affairs at Huawei and the lead lobbyist in charge of winning over the US government. The latter has repeatedly accused Huawei of secretly spying on behalf of China. The Times' report follows numerous setbacks in the company's quest to sell its products in America, including telco AT&T backing out of its Huawei US deal and retailer Best Buy announcing it won't sell the Mate 10 Pro or other Huawei devices anymore. A threat to national security? Plummer had been with the company for eight years and was its most senior, non-Chinese national employed in the US. His dismissal, along with the four other US-based employees, seems to suggest that Huawei is giving up on what is increasingly looking like a futile fight to get its products into the hands of stateside tech enthusiasts. To make matters worse for the Chinese phone-maker, the US Federal Communications Commission has voted in favor of introducing new rules on Tuesday which would prohibit federal funds from being spent on companies considered to be a threat to national security. Huawei isn't the only Chinese tech company facing major interference from Washington — ZTE has also joined Huawei in the US government's doghouse. Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team. Stephen primarily covers phones and entertainment for TechRadar's Australian team, and has written professionally across the categories of tech, film, television and gaming in both print and online for over a decade. He's obsessed with smartphones, televisions, consoles and gaming PCs, and has a deep-seated desire to consume all forms of media at the highest quality possible. He's also likely to talk a person’s ear off at the mere mention of Android, cats, retro sneaker releases, travelling and physical media, such as vinyl and boutique Blu-ray releases. Right now, he's most excited about QD-OLED technology, The Batman and Hellblade 2: Senua's Saga.
english
{ "actors": [], "countries": [], "enb_end_date": "11-Jun-10", "enb_long_title": "Bonn Climate Change Talks - May/June 2010", "enb_short_title": "AWGs", "enb_start_date": "31-May-10", "enb_url": "http://www.iisd.ca/vol12/enb12472e.html", "id": "enb12472e_56", "section_title": "SBI Conclusions", "sentences": [ "In its conclusions (FCCC/SBI/2010/L.13), the SBI: indicates that parties considered, but could not fully capture, additional issues suggested for inclusion in the TORs; identifies the need for COP/MOP 6 to consider the interim institutional arrangements of the AF; and recommends that COP/MOP 6 consider reviewing all matters related to the AF at COP/MOP 7 and that COP/MOP 6 take measures to facilitate this process.", "The SBI also forwarded draft TORs for the initial review of the AF." ], "subtype": "", "topics": [], "type": "" }
json
<reponame>psunde/primefaces<filename>primefaces/src/main/type-definitions/specs/components/ExportClassGenerics/input.js /** * Tests generics on a class * @template T1 type T1 * @template {keyof T1} T2 type T2 * @template [T3=T1] type T3 * @template {T3} [T4=T3] type T4 */ ({ })
javascript
<gh_stars>1-10 # Trapping Rain Water Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For example, Given `[0,1,0,2,1,0,1,3,2,1,2,1]`, return 6. ![](rainwatertrap.png) The above elevation map is represented by array `[0,1,0,2,1,0,1,3,2,1,2,1]`. In this case, 6 units of rain water (blue section) are being trapped. **Solution:** ```java public class Solution { public int trap(int[] height) { if (height == null || height.length == 0) { return 0; } int n = height.length; int max = 0; // scan from left int[] lmax = new int[n]; for (int i = 0; i < n; i++) { lmax[i] = max; max = Math.max(max, height[i]); } // scan from right max = 0; int[] rmax = new int[n]; for (int i = n - 1; i >= 0; i--) { rmax[i] = max; max = Math.max(max, height[i]); } // final scan int res = 0; for (int i = 0; i < n; i++) { int water = Math.min(lmax[i], rmax[i]) - height[i]; res += water >= 0 ? water : 0; } return res; } } ```
markdown
<reponame>deepennyway/weaver-hunter <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta property="og:image" content="/images/twitter-card-3000w.webp" /> <meta property="og:title" content="Skills | Torment of the Grey Mage"> <meta property="og:description" content="&lt;p&gt;Skills are the bread and butter of &lt;em&gt;Torment of the Grey Mage&lt;/em&gt;, if there’s a bread and butter. If you want to do something and..."> <meta name="twitter:title" content="Skills | Torment of the Grey Mage"> <meta name="twitter:image" content="/images/twitter-card-3000w.webp"> <meta name="twitter:card" content="summary"> <meta name="twitter:description" content="&lt;p&gt;Skills are the bread and butter of &lt;em&gt;Torment of the Grey Mage&lt;/em&gt;, if there’s a bread and butter. If you want to do something and..."> <link rel="manifest" href="/manifest.json"> <link rel="apple-touch-icon" href="/app-icons/1332.png"> <link rel="icon" href="/images/favicon-1332w.webp"> <title>Skills | Torment of the Grey Mage</title> <link rel="stylesheet" href="/css/style.css"> <link href="/css/print.css" media="print" rel="stylesheet" /> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin=""> <link href="https://fonts.googleapis.com/css2?family=Iceland:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=El Messiri:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Karla:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Karla:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Yanone Kaffeesatz:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> </head> <body> <texture class="recolor"></texture> <grid class="nav"> <button class="mobile" onclick="$('.nav').fadeToggle();">Directory</button> <aside class="toc"> <h1 class="title"><a href="/"><picture class="title"> <source type="image/webp" srcset="/images/logo-600w.webp 600w" sizes="(min-width: 1024px) 100vw, 50vw"> <img src="/images/logo-600w.webp" width="600" height="214" alt="Torment of the Grey Mage" loading="lazy" decoding="async"> </picture></a></h1> <h2>Chapters:</h2> <nav class="toc"> <ol> <li> <a href="/introduction/">Introduction</a> </li> <li> <a href="/echoes/">Story: The Buried Echoes</a> </li> <li> <a href="/character-creation/">Creating A Character</a> </li> <li> <a href="/how-to-play/">How to Play the Game</a> </li> <li> <a href="/weaver/">Playing With a Weaver</a> </li> <li> <a href="/advanced/">Advanced Rules</a> </li> <li> <a href="/escape/">The Final Escape</a> </li> </ol> </nav> </aside> <aside class="toc"> <nav class="toc"> <h2>On This Page:</h2> <nav class="toc"> <ol> <li><a href="#confidence">Confidence</a> </li> <li><a href="#pulling-punches">Pulling Punches</a> </li> </ol> </nav> </nav> </aside> </grid> <grid class="main"> <main> <texture class="page"></texture> <aside class="breadcrumb"> <p> <ul class="breadcrumb"><li><a href="/">Torment of the Grey Mage</a></li> <li><a href="/advanced/">Advanced Rules</a></li></ul> | <span class="current">Skills</span> </p></aside> <article> <header><h1>Skills</h1> </header> <p>Skills are the bread and butter of <em>Torment of the Grey Mage</em>, if there’s a bread and butter. If you want to do something and there are stakes involved, you have to use a skill. This ensures that your character is doing things you want them to do, and it also ensures that you get to roll dice every once in a while.</p> <ul> <li>You can have any number of skills.</li> <li>Each skill has the following attributes: <ul> <li><strong>Rating:</strong> An abstraction of your skill level. The higher your Rating, the bigger the die (d4, d6, d8, d10, d12, or d20). You can always choose to use a smaller die.</li> <li><strong>Knack:</strong> If the skill is in your strong suit, you can spend a <strong>Fortune</strong> to roll it twice and choose which roll to use.</li> </ul> </li> <li>Most skills will have a Rating of d6, at least to begin with.</li> </ul> <p>When you use a skill, you (usually, probably) want a high number. A high number lets you avoid dire consequences through a kind of banded success:</p> <ul> <li><strong>1:</strong> You get taken out of the scene, and you have to spend time regrouping. Reduce that skill’s Confidence by 1.</li> <li><strong>2-3:</strong> You get hurt. Lose 1 health, and reduce that skill’s Confidence by 1.</li> <li><strong>4-5:</strong> You compromise yourself. Lock that skill, and reduce its Confidence by 1.</li> <li><strong>6 or higher:</strong> You suffer no consequences. Add 1 to that skill’s Confidence.</li> </ul> <p>Note that in all of these cases, you do what you set out to do; the roll just tells you what happens to you as a result.</p> <p>You can only do something if it maps to one of your skills. If you want to do something and it doesn’t map to a skill you have, you have to add it to your character as a new skill.</p> <h2 id="confidence" tabindex="-1">Confidence</h2> <p>The more you use a skill successfully, the more confident you become in its use. But too much confidence can lead to mistakes. While a skill’s Confidence is 5, replace the “6 or higher” result for that skill with the following:</p> <ul> <li><strong>6 or higher:</strong> You overextend yourself. Lock that skill. Reset its Confidence to 0. <strong>Something bad happens.</strong></li> </ul> <p>Confidence does nothing else for you. It cannot be reduced below 0.</p> <p>Your Confidence is reduced any time you roll a 5 or lower,</p> <h2 id="pulling-punches" tabindex="-1">Pulling Punches</h2> <p>When you use a skill, your rating tells you the biggest size of die you can roll. You can always choose to roll a smaller one, though, if you notice that your Confidence is getting too high. Doing this costs you nothing, but it does carry increased risk to your health.</p> </article> <aside class="breadcrumb"> <p> <ul class="breadcrumb"><li><a href="/">Torment of the Grey Mage</a></li> <li><a href="/advanced/">Advanced Rules</a></li></ul> | <span class="current">Skills</span> </p></aside> </main> </grid> <script type="module"> // Import the functions you need from the SDKs you need import { initializeApp } from "https://www.gstatic.com/firebasejs/9.0.2/firebase-app.js"; // TODO: Add SDKs for Firebase products that you want to use // https://firebase.google.com/docs/web/setup#available-libraries // Your web app's Firebase configuration const firebaseConfig = { apiKey: "<KEY>", authDomain: "buried-echoes.firebaseapp.com", projectId: "buried-echoes", storageBucket: "buried-echoes.appspot.com", messagingSenderId: "441349712432", appId: "1:441349712432:web:f360d6a92a8b0989b71bf5" }; // Initialize Firebase const app = initializeApp(firebaseConfig); </script></body> </html>
html
{ "description": "Scalable Vector Graphics, or SVGs, are the new big thing in web design today, and for a good reason. With the proliferation of retina screens and high resolution displays, we need to adopt techniques that allow us to serve graphics that look good on all screens in all circumstances. Since SVGs offer resolution-independent, fully scalable and crystal clear graphics, it is safe to say that they are the future graphics format of the web.\n\nIn her talk Sara will demonstrate how SVGs can be styled with CSS, and how they can be animated using CSS animations and transitions. She will share her knowledge about the gotchas, bugs, and tips to help you get started with CSS and SVGs and to save you moments of frustration as you deal with SVGs using CSS. Sara will cover responsifying SVGs and using CSS media queries with them. Last but not least she will dive into code and walk through it all the way from styling and animating to responsifying SVGs.\n\n<NAME>\n\n<NAME> is a freelance web developer from Lebanon. She is known in the CSS scene for her great demos and in-depth writing for A List Apart, Dev.Opera and Codrops.\n\nhttps://twitter.com/sarasoueidan\nhttp://sarasoueidan.com/", "favorite": "0", "length": "29:17", "likes": "346", "recorded": "2014-09-12", "speakers": [ "sara-soueidan" ], "tags": [], "thumbnail_url": "https://i.ytimg.com/vi/lf7L8X6ZBu8/hqdefault.jpg", "title": "Styling and Animating Scalable Vector Graphics with CSS", "videos": [ { "code": "lf7L8X6ZBu8", "type": "youtube" } ], "views": "20421" }
json
Maharashtra Navnirman Sena (MNS) workers, known for their hooliganism, on Tuesday once again assaulted non-Maharashtrians in Thane district’s Ambernath, after ABS international fired three Marathi-speaking people. MNS workers gathered outside the company gate and assaulted non-Maharashtrian workers and the video of the assault went viral on the internet. However, MNS defended this act and said that they assaulted others in the interest of Marathi people. While speaking to Mumbai Live, MNS leader Avinash Jadhav said that this company has fired three Marathi people and earlier, removed 50 of them. Jadhav accused this company of giving preference to outsiders and not Marathi people. He further informed that they reported this matter to the local police and company’s management committee but no action was taken regarding the same which forced them to intervene. However, in this case, the police and the company administration have not clarified their stand.
english
<reponame>openiod/fiware-idm var express = require('express'); var router = express(); // Load API Controllers var api_controller = require('../../controllers/api/index') var api_appl_controller = api_controller.applications; var api_user_controller = api_controller.users; var api_org_controller = api_controller.organizations; var api_check_perm_controller = api_controller.check_permissions; var api_role_controller = api_controller.roles; var api_perm_controller = api_controller.permissions; var api_peppx_controller = api_controller.pep_proxies; var api_iota_controller = api_controller.iot_agents; var api_role_pem_assign_controller = api_controller.role_permission_assignments; var api_role_user_assign_controller = api_controller.role_user_assignments; var api_role_org_assign_controller = api_controller.role_organization_assignments; var api_trusted_app_controller = api_controller.trusted_applications; // Load application with :applicationId or :trustedApplicationId parameter and check permissions of user in request router.param('applicationId', api_appl_controller.load_application); router.param('trustedApplicationId', api_trusted_app_controller.load_trusted_application); // Load other params router.param('roleId', api_role_controller.load_role); router.param('permissionId', api_perm_controller.load_permission); router.param('iotAgentId', api_iota_controller.load_iota); router.param('userId', api_user_controller.load_user); router.param('organizationId', api_org_controller.load_organization); router.param('organizationRoleId', api_org_controller.load_organization_role); // Routes for applications router.post('/', api_check_perm_controller.check_request, api_appl_controller.create); router.get('/', api_check_perm_controller.check_request, api_appl_controller.index); router.get('/:applicationId', api_appl_controller.info); router.patch('/:applicationId', api_appl_controller.update); router.delete('/:applicationId', api_appl_controller.delete); // Routes for pep_proxies router.all('/:applicationId/pep_proxies', api_peppx_controller.search_pep_proxy) router.get('/:applicationId/pep_proxies', api_peppx_controller.info); router.post('/:applicationId/pep_proxies', api_peppx_controller.create); router.patch('/:applicationId/pep_proxies', api_peppx_controller.update); router.delete('/:applicationId/pep_proxies', api_peppx_controller.delete); // Routes for iot agents router.get('/:applicationId/iot_agents', api_iota_controller.index); router.post('/:applicationId/iot_agents', api_iota_controller.create); router.get('/:applicationId/iot_agents/:iotAgentId', api_iota_controller.info); router.patch('/:applicationId/iot_agents/:iotAgentId', api_iota_controller.update); router.delete('/:applicationId/iot_agents/:iotAgentId', api_iota_controller.delete); // Routes for roles router.get('/:applicationId/roles', api_role_controller.index); router.post('/:applicationId/roles', api_role_controller.create); router.get('/:applicationId/roles/:roleId', api_role_controller.info); router.patch('/:applicationId/roles/:roleId', api_role_controller.update); router.delete('/:applicationId/roles/:roleId', api_role_controller.delete); // Routes for permissions router.get('/:applicationId/permissions', api_perm_controller.index); router.post('/:applicationId/permissions', api_perm_controller.create); router.get('/:applicationId/permissions/:permissionId', api_perm_controller.info); router.patch('/:applicationId/permissions/:permissionId', api_perm_controller.update); router.delete('/:applicationId/permissions/:permissionId', api_perm_controller.delete); // Routes for role_permission_assignments router.get('/:applicationId/roles/:roleId/permissions', api_role_pem_assign_controller.index); router.post('/:applicationId/roles/:roleId/permissions/:permissionId', api_role_pem_assign_controller.create); router.delete('/:applicationId/roles/:roleId/permissions/:permissionId', api_role_pem_assign_controller.delete); // Routes for role_user_assignments router.get('/:applicationId/users', api_role_controller.search_changeable_roles, api_role_user_assign_controller.index_users); router.get('/:applicationId/users/:userId/roles', api_role_controller.search_changeable_roles, api_role_user_assign_controller.index_user_roles); router.put('/:applicationId/users/:userId/roles/:roleId', api_role_controller.search_changeable_roles, api_role_user_assign_controller.addRole); router.delete('/:applicationId/users/:userId/roles/:roleId', api_role_controller.search_changeable_roles, api_role_user_assign_controller.removeRole); // POST endpoint is deprecated - maintained for backwards compatibility router.post('/:applicationId/users/:userId/roles/:roleId', api_role_controller.search_changeable_roles, api_role_user_assign_controller.addRole); // Routes for role_organization_assignments router.get('/:applicationId/organizations', api_role_controller.search_changeable_roles, api_role_org_assign_controller.index_organizations); router.get('/:applicationId/organizations/:organizationId/roles', api_role_controller.search_changeable_roles, api_role_org_assign_controller.index_organization_roles); router.put('/:applicationId/organizations/:organizationId/roles/:roleId/organization_roles/:organizationRoleId', api_role_controller.search_changeable_roles, api_role_org_assign_controller.addRole); router.delete('/:applicationId/organizations/:organizationId/roles/:roleId/organization_roles/:organizationRoleId', api_role_controller.search_changeable_roles, api_role_org_assign_controller.removeRole); // POST endpoint is deprecated - maintained for backwards compatibility router.post('/:applicationId/organizations/:organizationId/roles/:roleId/organization_roles/:organizationRoleId', api_role_controller.search_changeable_roles, api_role_org_assign_controller.addRole); // Routes for trusted applications router.get('/:applicationId/trusted_applications', api_trusted_app_controller.index); router.put('/:applicationId/trusted_applications/:trustedApplicationId', api_trusted_app_controller.addTrusted); router.delete('/:applicationId/trusted_applications/:trustedApplicationId', api_trusted_app_controller.removeTrusted); // POST endpoint is deprecated - maintained for backwards compatibility router.post('/:applicationId/trusted_applications/:trustedApplicationId', api_trusted_app_controller.addTrusted); module.exports = router;
javascript
Gaming has come a long way since its inception and involves many more variables than it ever did. The gaming industry is booming, and we’re here to witness it in its full glory. Likewise, gaming is practically incomplete without certain utilities and applications. To make your gaming experience more convenient, we have compiled a list of the top 5 apps for gaming that every PC gamer should use. Be it communication, recording clips of a heated round, or getting the maximum performance out of your PC, we have it covered. Here are the top 5 applications that can improve your gaming sessions. It is indeed an excellent time to be a gamer right now. Here are some of the best apps that you should consider installing: Afterburner is among the most renowned applications used by gamers. It has an extensive catalog of features and can prove to be helpful in more than one way. For starters, you can use MSI Afterburner to overclock your GPU. Yes, you can even overclock non-MSI GPUs. However, be very careful while overclocking your GPU, as things can go south in an instant if you don’t know what you’re doing. Overclocking can primarily result in better performance of your GPU as long as you don’t overdo it. Moreover, you can use MSI Afterburner to display the statistics of your system as on overlay while playing games. You can choose from a long list of stats, including FPS, CPU/GPU usage, CPU/GPU temperatures, and RAM usage. It is a great tool overall for benchmarks and monitoring your PC while gaming. NVIDIA GeForce Experience is NVIDIA’s offering for PC gamers with NVIDIA GPUs. It’s a handy utility that manages your GPU drivers, optimizes games for the best performance, and the recording utility called ShadowPlay. ShadowPlay is the recording part of the application which lets you capture, record, and share clips of your games. You can learn more about ShadowPlay and how to use it. The overall package is among the top apps for gaming. Note: GeForce Experience will only work for most NVIDIA graphic cards. For AMD graphic cards, consider using Radeon Software that offers a similar set of features to the GeForce Experience. Over the past few years, Discord has gained insane popularity among gamers and other users. Initially, Discord started as an app that provided “voice chat for gamers,” but now it’s more of a community app. That said, Discord is the perfect utility for gamers playing multiplayer games with a team. It provides an excellent voice chat feature where you can set up a server just for you and your friends. Moreover, it has fancy text features as well. If you play multiplayer games often, it’s something you should consider installing. To learn more about Discord, check out our Discord guides. CPU-Z is a handy utility that tells you all the hardware-related information about your PC that you need to know. It is a worthy addition to the list of top apps for gaming. Likewise, all the details, including CPU, memory, graphics, and mainboard, are available within the app. You can also export your device’s specification report and share it externally. WizTree is a very underrated application that can make your life easier. Being a gamer can be challenging to keep track of all installed games and worry about storage space. Hence, WizTree came to the rescue. If you can’t figure out what’s taking up space on your drives, you can use WizTree to know precisely what. To clarify, the app scans your drives and highlights all the files on the disk along with the disk space they’re using. The app also offers a block diagram where you can view folders by size to make it easier. It is a must-have app for all Windows users. Finally, these are some of the top apps that could make your gaming sessions more convenient. Moreover, you can check out our detailed guide on how to fix high CPU and memory usage windows 10 here. If you have any suggestions, feel free to drop them in the comments below.
english
<filename>lib/node_modules/@stdlib/datasets/spam-assassin/data/easy-ham-1/02314.608313fbd690f2d120b68c894333a134.json {"id":"02314","group":"easy-ham-1","checksum":{"type":"MD5","value":"608313fbd690f2d120b68c894333a134"},"text":"From <EMAIL> Mon Oct 7 12:05:06 2002\nReturn-Path: <<EMAIL>>\nDelivered-To: yyyy<EMAIL>assassin.taint.org\nReceived: from localhost (jalapeno [127.0.0.1])\n\tby jmason.org (Postfix) with ESMTP id 411AD16F18\n\tfor <jm@localhost>; Mon, 7 Oct 2002 12:03:42 +0100 (IST)\nReceived: from jalapeno [127.0.0.1]\n\tby localhost with IMAP (fetchmail-5.9.0)\n\tfor jm@localhost (single-drop); Mon, 07 Oct 2002 12:03:42 +0100 (IST)\nReceived: from dogma.slashnull.org (localhost [127.0.0.1]) by\n dogma.slashnull.org (8.11.6/8.11.6) with ESMTP id g9780gK23266 for\n <<EMAIL>>; Mon, 7 Oct 2002 09:00:42 +0100\nMessage-Id: <<EMAIL>>\nTo: yyyy@<EMAIL>int.org\nFrom: gamasutra <<EMAIL>>\nSubject: GDC 2002: Game Scripting in Python\nDate: Mon, 07 Oct 2002 08:00:42 -0000\nContent-Type: text/plain; encoding=utf-8\n\nURL: http://www.newsisfree.com/click/-0,8613669,159/\nDate: 2002-10-06T18:12:51+01:00\n\nScripting languages allow rapid development of game behavior without the \npitfalls that await the unwary C++ programmer. Using an existing scripting \nlanguage saves the time and cost of developing a custom language, and typically \ngives you a far more powerful language than you could create on your own. \nPython is an excellent choice for a game scripting language because it is \npowerful, easily embedded, can seamlessly be extended with C/C++ code\n\n\n"}
json
<reponame>tanusreevidya/project package com.cts.training.initialpublicofferingsservice; import java.util.List; import com.cts.training.initialpublicofferingsservice.InitialPublicOffering; public interface InitialPublicOfferingService { //public IPO insert(IPO id); public InitialPublicOffering addIpo(InitialPublicOffering ipo); public void deleteIpo(int id); public InitialPublicOffering updateIpo(InitialPublicOffering ipo); public List<InitialPublicOffering> getAllIpos(); public InitialPublicOffering getIpoById(int id); }
java
In recent times, two cases have drawn our attention to India’s omnibus anti-terror law, the Unlawful Activities (Prevention) Act (UAPA), 1967. In 2021, Muhammad Manan Dar, a young Kashmiri photojournalist, was arrested and imprisoned for documenting the daily lives of common Kashmiris with his camera. A year earlier, another journalist, Sidheeque Kappan, was charged with participating in a plot to ignite rioting in Hathras, Uttar Pradesh. In reality, no riots occurred in Hathras, and Kappan was detained even before he arrived there. In the past few weeks, the courts have granted bail to the two journalists. Since the passage of the Terrorist and Disruptive Activities (Prevention) Act (TADA) in 1985, and the Prevention of Terrorism Act (POTA) in 2002, the extraordinary nature of anti-terror laws has remained a matter of intense political debate. TADA and POTA were known for their lengthy pretrial detention, in-custody torture, false prosecutions, and forced confessions. Minority community members, in particular, paid a heavy price. The 2004 version of UAPA was supposed to be a more humane variant of its predecessors. While repealing POTA in 2004, the UPA government stated that POTA “was a slur on our democracy” and not needed as “there was no dearth of laws for prevention of terrorism”. The government dusted off UAPA, enacted in 1967 to declare illegal any organisation questioning India’s sovereignty, and turned the act into an anti-terror law. Since then, the law has undergone three significant revisions — 2008, 2013 and 2019. Each modification has made it more stringent. The law has not only expanded beyond its original purpose but is proving to be more oppressive than TADA and POTA ever were. In no liberal democracy will the act of clicking pictures of security personnel invoke provisions of an anti-terror law. There appears to be a significant difference between what India considers to be terrorism and what other democracies like the UK, Australia, Canada and the US do. Ironically, Indian anti-terror measures were inspired by legislation from these countries and United Nations Security Council resolutions. The government has prosecuted political dissidents under anti-terror laws. But on the global stage, in 2022, India objected to the inclusion of “right-wing extremism” and “violent nationalism” in the definition of terrorism in the UN General Assembly Global Counter-Terrorism Strategy. Far-right extremism is not terrorism, according to the current government, but left-wing extremism is. The Indian government’s current understanding is at odds with its approach in the past. While introducing POTA in Parliament, former Deputy PM L K Advani justified the legislation to deal with the “war-like situation created by state-sponsored cross-border terrorism”. TADA and POTA were never meant to address ordinary crimes already covered by existing penal statutes. Advani accepted in Parliament that TADA was misused and pitched POTA as a better version of TADA. UAPA was supposed to further remedy POTA’s violations of human rights and liberties. How did we end up in a situation where an anti-terror statute has transformed into an instrument of terror? The Supreme Court, through judicial interventions, had evolved many safeguards (both procedural and substantive) in how TADA and POTA were applied. Categorising TADA detainees into four different brackets to grant bail (Shaheen Welfare Association v Union of India, 1996 ) and setting up state and central review committees to prevent the misuse of TADA were two such major judicial innovations (Kartar Singh v State of Punjab, 1994). But in the UAPA era, the court has been unable to provide adequate safeguards against arbitrary arrests, malicious prosecutions and long pre-trial detentions. The Court’s ruling in NIA v Zahoor Ahmad Shah Watali (2020) has made the grant of bail almost impossible. Not long after he retired, Justice Rohinton Nariman urged the SC to strike down “the offensive portions of the UAPA”. However, the debate on UAPA needs to be taken beyond the validity of a few select provisions. The law’s very purpose and scope need careful examination. The main question is of proportionality which is a fundamental principle of our Constitution. Does UAPA violate the fundamental justice, due process, and individual liberty that are the cornerstones of our democracy? The Court must determine whether the breadth and consequences of UAPA are substantially out of proportion to its declared goals. Terms like “terrorist act”, “unlawful activity”, “advocacy”, “conspiracy”, “likely to threaten”, and “likely to strike terror” have been framed vaguely and seem to give agencies arbitrary powers. There is a lack of standards for prosecution. Instead, the act allows for a blind reliance on police cases. Even though terms like “terrorist act” are subjective and difficult to define, one can nevertheless establish the appropriate limits for judicial judgement. The key is to have a law that effectively combat terrorism and still conform to the imperatives of our Constitution. The ability to identify, neutralise, and bring terrorists to justice should be a priority. However, the authorities must be subject to stringent, clear controls and impartial oversight. A few petitions are pending before the SC, challenging the validity of the 2019 amendment by which the government can now designate individuals as terrorists. The Court must seize the opportunities presented by these challenges to spell out precisely the objectives of the law. UAPA has one of the worst records for prosecution success. According to a PUCL report in 2022, less than 3 per cent of arrests made under the UAPA resulted in convictions between 2015 and 2020. Only 1,080 of the 4,690 people detained under the UAPA between 2018 and 2020 received bail, according to the report. Unlike TADA and POTA, UAPA has never been constitutionally reviewed. Its repeated abuse is a blot on our democracy.
english
Kushalnagar: Opposition leader B. S. Yeddyurappa visited the flood affected areas in town yesterday and took stock of the gravity of calamity. Yeddyurappa visited Sai Layout and Kuvempu Extension accompanied by MPs Pratap Simha and Shobha Karandlaje and other officials. He gathered information on the extent of damage due to floods, relief measures undertaken and facility at relief centres. He also visited the relief centres opened at Kodava Samaja and Government Model Primary School and obtained primary informations on the facilities provided there. Union Minister D. V. Sadananda Gowda also visited the two aforementioned relief centres last evening. The victims of flood housed at the centres aired their grievances before the Minister. “Though Kodagu has been devastated by rain and flood, the State Government is rather slow in implementing relief measures,” alleged Yeddyurappa. After visiting flood-hit areas in Kushalanagar and Suntikoppa, Yeddyurappa arrived in Madikeri and obtained information on flood havoc and relief measures taken by the Deputy Commissioner. Speaking on the occasion, Yeddyurappa opined that once the rains recede completely, the Government should take up permanent relief measures to rehabilitate the flood victims. He asked the DC to identify places to permanently rehabilitate the flood victims. He thanked the people for rushing food items to the flood victims but advised them not to send too much of food items as they would perish on long standing. Yeddyurappa further said that farmers in Kodagu district have experienced heavy damage to cash crops like cardamom and coffee. He opined that a detailed report on damages caused should be prepared and sent to the Government to seek due compensation. He also suggested District Administration to take measures to thwart attempts of theft by miscreants cashing in on the helpless situation of the flood victims. MP Shobha Karandlaje added that the Government has not taken the flood havoc in Kodagu on a priority basis as the Chief Minister had paid only a casual visit to Kodagu. She suggested the District Administration to deploy enough cooks at relief centres and also to ensure cleanliness of premises at relief centres.
english
[{"code":"015","name":"伊勢崎","name_kana":"イセサキ"},{"code":"023","name":"伊勢崎東","name_kana":"イセサキヒガシ"},{"code":"064","name":"岩槻","name_kana":"イワツキ"},{"code":"209","name":"伊勢崎西","name_kana":"イセサキニシ"},{"code":"926","name":"インターネット","name_kana":"インタ-ネツト"}]
json
New Delhi : Samsung’s Galaxy Note 8 has finally launched in India. Samsung’s latest big-screen smartphoner arrives in India just on the day Apple is scheduled to unveil its next iPhone, likely to be called iPhone 8 or iPhonex X, at an event in the US. Successor to the last year’s ill-fated Galaxy Note 7, Note 8 is the first smartphone from the company to sport a dual rear camera setup. The device is claimed to be one of the most powerful smartphones made by Samsung so far. The smartphone will hit the retail shelves on September 15 in the US. Though the company has not yet announced the India availability of the phone, it is likely to launch at same time in the country too (going by the company’s past track record). The Samsung Galaxy Note 8 comes with a price tag of Rs 67,900 and will be available online on Amazon and on all the authorised retail stores in the country. The device will come in classic midnight black and Metal gray colour options. The device will go on pre-booking starting September 21. The customers who pre-book the device will get free wireless charger and one time screen replacement. The Samsung Galaxy Note 8 comes with a 6.3-inch Quad HD+ Super AMOLED ‘Infinity’ display with 2960×1440. The device runs Android 7.1.1 Nougat update and is powered by an octa-core Qualcomm Snapdragon 835 processor. The Samsung Galaxy Note 8 comes with the company’s home-brewed Bixby digital assistant, rival to Apple Siri and Microsoft Cortana. The company claims that Bixby can do much more than its rivals, including being able to handle any smartphone-related task that is managed by touch. The voice assistant will initially be integrated with Samsung’s native applications including Camera, Contacts, Gallery, Messages and Settings. The company has incorporated a dedicated button for the virtual assistant and users can also say ‘Hey Bixby’ to launch the app. The Bixby capability will roll out in India starting September 30 for both Note 8 and the Samsung Galaxy S8 and S8+. The device comes equipped with a fingerprint sensor, facial recognition and iris scanner along with this it also offers support for Samsung Pay, which was launched by the company earlier this year. If you want to buy an iPhone and were waiting for a nice offer, then we have a piece of good news for you! Amazon Summer Sale May 2022 has begun and they are offering major discounts on various smartphones, laptops, and smart TVs, among others. The sale is live now on the e-commerce platform with no-cost EMI options and exchange discounts on various products. In addition to this, Amazon has also partnered with several banks including ICICI, Kotak Bank, and RBL so that customers get instant discounts of up to 10% using their cards and EMI transactions. Customers can easily enjoy this summer sale and get massive discounts on iPhones. They can also compare prices on Flipkart Big Saving Days Sale 2022 before making a purchase. Apple’s coveted phone model iPhone 13 in the 128 GB storage model will be available during the Amazon Summer Sale May 2022 for Rs 64,900. The MRP of the phone is Rs 79,900. This means that the customers will be able to enjoy a discount of up to Rs 15,000 on the purchase of the iPhone 13. If you have an old iPhone in working condition then you will also be eligible to receive another additional discount worth up to Rs 17,000 on the iPhone 13. The iPhone is powered by an A15 Bionic processor with 6 core CPU. Apart from this, it has 16 core neural engines. With the iPhone 13, up to 512 GB of storage will be available. The iPhone 13 has a 6.1-inch Retina XDR display with 1000 nits brightness. The iPhone 13 has a 12-megapixel dual rear camera setup. This time a new wide-angle camera has been given, whose aperture is f/1.6. With this, there is support for sensor optical stabilisation. Night mode has been made better than before. The second lens is also 12 megapixels ultra-wide and has an aperture of f/2.4.
english
<filename>Assets/Resources/Traduction/localizedText_French.json<gh_stars>1-10 { "items":[ {"key" :"[PressX]","value":"Appuyer sur X pour jouer"}, {"key" :"[ChooseMode]","value":"Choisissez votre mode de jeu"}, {"key" :"[VersusBtn]","value":"VERSUS"}, {"key" :"[TrainingBtn]","value":"ENTRAINEMENT"}, {"key" :"[OptionsBtn]","value":"OPTIONS"}, {"key" :"[LeaveBtn]","value":"QUITTER"}, {"key" :"[Host]","value":"Héberger"}, {"key" :"[Join]","value":"Rejoindre"}, {"key" :"[ServerIp]","value":"IP du serveur…"}, {"key" :"[Tips]","value":"Pour jouer avec vos amis, un doit héberger la partie, l'autre doit la rejoindre. L'ip est localhost si vous êtes sur le même réseau, sinon c'est l'ip de la personne qui héberge."}, {"key" :"[Back]","value":"RETOUR"}, {"key" :"[ChooseCharacter]","value":"CHOISISSEZ VOTRE PERSONNAGE"}, {"key" :"[BackToMainMenu]","value":"RETOUR AU MENU PRINCIPAL"}, {"key" :"[Play]","value":"JOUER"}, {"key" :"[TipsTraining]","value":"Il s'agit d'un mode de jeu solo pour s'entrainer avec les chans et tester les compétences et les méchaniques du jeu."} ]}
json
Serena Williams' former coach Patrick Mouratoglou has stated that Novak Djokovic will not have an easy ride at the 2023 Australian Open. The Serbian has set foot in Australia for the first time since his deportation from the country last year. His refusal to take the COVID-19 vaccination meant he was denied the chance to compete in the 2022 edition of the year's first Grand Slam. Speaking to Eurosport, Mouratoglou said that Djokovic will be feeling a lot of 'emotional baggage' and will have a difficult time in Melbourne. The Frenchman also hoped that the former World No. 1 does not lose the plot as he did in the 2021 US Open final when he smashed his racquet in frustration after missing an opportunity to get a service break against Daniil Medvedev. "It's going to be tough for Novak in Australia, that's for sure. You are going to carry a lot of emotional baggage. He's been through a lot, emotionally speaking. Nobody is immune. It will be difficult. I hope he doesn't fall apart like he did at the 2021 US Open," he said. The former World No. 1 is currently competing at the Adelaide International 1 to prepare himself for a charge at the Australian Open and win his 10th title at the event. In the same interview, Partick Mouratoglou pointed out that playing in Adelaide will be a good foundation for the first Major of the year for Novak Djokovic. The 52-year-old mentioned that the 21-time Grand Slam champion would be well rested, which could help him when the Australian Open gets underway. "It's pre-season and there's no competition stress yet. So he'll be emotionally rested, which is good. It doesn't start directly with the Australian Open, so he'll have time to get used to the environment," he said. Serena Williams' former coach also hoped that the Australian fans would give the 35-year-old a warm welcome on his return. "I hope the Australians give him a good welcome because everything that has been said about him is very undeserved in my opinion. I would like them to have respect for the champions. When you walk into a tennis stadium and see Djokovic playing, the least you can do is respect these great champions, whether you like them or not, agree with them or not. I think that's the bare minimum," he expressed.
english
// SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2002 Ramshankar (aka Teknomancer). // Copyright (c) 2011 <NAME>. // All rights reserved. #include "SelectDirPanel.h" #include <Button.h> #include <Window.h> #include <Path.h> #include <String.h> // gcc2 #include <cstdlib> // gcc2 SelectDirPanel::SelectDirPanel(file_panel_mode mode, BMessenger* target, const entry_ref* start_directory, uint32 node_flavors, bool allow_multiple_selection, BMessage* message, BRefFilter* filter, bool modal, bool hide_when_done) : BFilePanel(mode, target, start_directory, B_DIRECTORY_NODE, allow_multiple_selection, message, filter, modal, hide_when_done), m_buttonLabel(NULL), m_buttonName(strdup("bzr:special_button")) { (void)node_flavors; // UNUSED_PARAM Window()->LockLooper(); BButton* cancelBtn = (BButton*)Window()->FindView("cancel button"); m_curDirBtn = new BButton(BRect(cancelBtn->Frame().left - 20 - 185, cancelBtn->Frame().top, cancelBtn->Frame().left - 20, cancelBtn->Frame().bottom), m_buttonName, NULL, message, B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE); m_curDirBtn->SetTarget(target->Target(NULL)); // Tweak the default button (turn it off) so <ENTER> doesn't select the folder, instead // enters the folder in the BFilePanel's list ((BButton*)Window()->FindView("default button"))->MakeDefault(false); Window()->ChildAt(0L)->AddChild(m_curDirBtn); Window()->UnlockLooper(); UpdateButton(); } SelectDirPanel::~SelectDirPanel() { free(m_buttonLabel); free(m_buttonName); } void SelectDirPanel::SetCurrentDirButton(const char* label) { if (label) m_buttonLabel = strdup(label); UpdateButton(); } void SelectDirPanel::SelectionChanged() { UpdateButton(); BFilePanel::SelectionChanged(); } void SelectDirPanel::Refresh() { UpdateButton(); BFilePanel::Refresh(); } void SelectDirPanel::UpdateButton() { entry_ref dirRef; GetPanelDirectory(&dirRef); BPath dirPath(&dirRef); BString btnLabel = m_buttonLabel; btnLabel << " " << '\'' << dirPath.Leaf() << '\''; Window()->LockLooper(); BButton* curDirBtn = (BButton*)Window()->FindView(m_buttonName); if (curDirBtn) { curDirBtn->SetLabel(btnLabel.String()); BMessage* msg = curDirBtn->Message(); if (msg) { msg->RemoveName("refs"); msg->AddRef("refs", &dirRef); } } Window()->UnlockLooper(); } void SelectDirPanel::SetMessage(BMessage* msg) { BMessage* curDirMsg = new BMessage(*msg); m_curDirBtn->SetMessage(curDirMsg); UpdateButton(); BFilePanel::SetMessage(msg); } void SelectDirPanel::SendMessage(const BMessenger* target, BMessage* message) { // Bug-fix: 0.07 -- a possibility because BFilePanel has a "Favourites" menu that lists // files also, and apparently BFilePanel sends the message when a file is selected from Favs, // this is fixed here entry_ref ref; message->FindRef("refs", &ref); BEntry entry(&ref, true); if (entry.IsDirectory() == true) return BFilePanel::SendMessage(target, message); }
cpp
<filename>infrastructure/package.json { "name": "infrastructure", "version": "0.1.1", "description": "AWS CDK Demo", "private": true, "scripts": { "test": "sst test", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix", "start": "sst start", "build": "sst build", "deploy": "sst deploy", "remove": "sst remove" }, "repository": { "type": "git", "url": "https://github.com/pashamakhilkumarreddy/serverless-notes-app-api.git" }, "keywords": [ "aws", "cdk" ], "author": { "name": "<NAME>", "email": "<EMAIL>", "url": "https://github.com/pashamakhilkumarreddy" }, "bugs": { "url": "https://github.com/pashamakhilkumarreddy/serverless-notes-app-api/issues" }, "homepage": "https://github.com/pashamakhilkumarreddy/serverless-notes-app-api#readme", "devDependencies": { "@aws-cdk/assert": "1.94.1", "@typescript-eslint/eslint-plugin": "^4.19.0", "@typescript-eslint/parser": "^4.19.0", "eslint": "^7.22.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-plugin-import": "^2.22.1" }, "dependencies": { "@aws-cdk/aws-cognito": "1.94.1", "@aws-cdk/aws-dynamodb": "1.94.1", "@aws-cdk/aws-iam": "1.94.1", "@aws-cdk/aws-s3": "1.94.1", "@aws-cdk/core": "1.94.1", "@serverless-stack/cli": "0.10.4", "@serverless-stack/resources": "0.10.4" } }
json
import matplotlib import matplotlib.pyplot as plt import numpy as np from PySide2.QtWidgets import QVBoxLayout, QWidget from traitlets import HasTraits, Instance, Bool, directional_link from regexport.model import AppState from regexport.views.utils import HasWidget matplotlib.use('Qt5Agg') from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT from matplotlib.figure import Figure class PlotModel(HasTraits): selected_data = Instance(np.ndarray, allow_none=True) data = Instance(np.ndarray, allow_none=True) show = Bool(default_value=True) def register(self, model: AppState): self.model = model model.observe(self.update, ['cells', 'selected_cells', 'column_to_plot', 'show_plots']) directional_link((model, 'show_plots'), (self, 'show')) def update(self, change): model = self.model if model.selected_cells is None or model.selected_cells[model.column_to_plot].dtype.name == 'category': self.selected_data = None else: self.data = model.cells[model.column_to_plot].values self.selected_data = model.selected_cells[model.column_to_plot].values class PlotView(HasWidget): # Code from https://www.pythonguis.com/tutorials/plotting-matplotlib/ def __init__(self, model: PlotModel, width=5, height=4, dpi=100): # Make a figure, turn it into a canvas widget widget = QWidget() layout = QVBoxLayout() widget.setLayout(layout) HasWidget.__init__(self, widget=widget) self.fig, self.axes = plt.subplots(ncols=2, figsize=(width, height), dpi=dpi) self.canvas = FigureCanvasQTAgg(figure=self.fig) layout.addWidget(self.canvas) self.toolbar = NavigationToolbar2QT(self.canvas, widget) layout.addWidget(self.toolbar) self.model = model self.model.observe(self.render) def render(self, change): if self.model.show: for ax in self.axes: ax.cla() if change.new is None: return else: selected_data = self.model.selected_data if selected_data is not None: data = selected_data _, edges = np.histogram(data[data > 0], bins='auto') all_edges = np.concatenate([[0, 1], edges]) self.axes[0].hist( data, bins=all_edges, cumulative=False, # density=True, ) data = self.model.data ax: plt.Axes = self.axes[1] ax.hist( data, bins=50, cumulative=True, density=True, ) if selected_data is not None: ax.vlines(selected_data.max(), 0, 1, colors='black', linestyles='dotted') # self.axes[1].set_ylim(0, 1) self.canvas.draw()
python
{ "name": "MCAnimationView", "version": "1.0", "summary": "UIImageView alternative for animations that does not load all the images in memory at once and provide a callback when animation is done.", "homepage": "https://github.com/mirego/MCAnimationView", "license": "BSD 3-Clause", "authors": { "Mirego, Inc.": "<EMAIL>" }, "source": { "git": "https://github.com/mirego/MCAnimationView.git", "tag": "1.0" }, "social_media_url": "https://twitter.com/Mirego", "platforms": { "ios": "7.0", "tvos": "9.0" }, "dependencies": { "MCUIImageAdvanced": [ ] }, "requires_arc": true, "source_files": "MCAnimationView/Classes/*.{h,m}" }
json
let ws let pro_chart let pro_chart_data let phd_chart let phd_chart_data let pro_table_data let phd_table_data //记录“我”的投票数据 let phd_voting_data // 记录当前投票的博士后列表 let phd_voting_list // 最大可投赞成票数 let my_vote_max // 当前已经投赞成票数 let my_vote_yes // 当前已经投反对票数 let my_vote_no // 当前未投票数 let my_vote_remain // 专家名称 (real) let my_name // 专家登录名称 let my_login_name function refresh_data() { var req={} req.method='votingman'; //!总是voting req.voting = 1; // var uri = window.location.href; // if( uri.indexOf('voting') >= 0) { // req.voting = 1; // } else if(uri.indexOf('dashboard') >= 0) { // req.dashboard = 1; // } //console.log(uri); update_pro_name(); ws.send(JSON.stringify(req)) setTimeout(() => { refresh_data(); }, 5000); } $(()=>{ var url = "ws://" + window.location.hostname + ":15679"; ws = new WebSocket(url); ws.onopen =function(ev){ refresh_data(); }; ws.onmessage = (ev)=>{ //console.log(ev.data) ret = JSON.parse(ev.data) if(ret == null) return; //console.log(ret) if (ret.type !== undefined && ret.type == 'error') { // popup error message var notify = Metro.notify; var msg = ret.error; if(!msg) msg = "未知错误"; notify.create(msg, "发生错误", { cls:'alert', animation: 'easeInSine', duration:500, keepOpen: true }); } else if(ret.method == 'dashboard') { //console.log(ret.result.data.length) var pro_count = ret.pro_list.length; var phd_count = ret.phd_list.length; var obj = document.querySelector("#voting_status"); if(obj) { if(ret.voting_status == 1) { obj.innerText = '开始投票'; obj.classList.remove('fg-red'); obj.classList.add('fg-green'); } else { obj.innerText = '停止投票'; obj.classList.remove('fg-geen'); obj.classList.add('fg-red'); } } obj = document.querySelector('#pro_count'); if(obj) { if(obj.innerText != pro_count) { console.log('change pro_count:', obj.innerText, pro_count) obj.innerText = pro_count; } } obj = document.querySelector('#phd_count'); if(obj) { if(obj.innerText != phd_count) { obj.innerText = phd_count; } } var total_voting = ret.pro_list.length * ret.max_pro_num; var remain = total_voting; var vote_yes = 0 var vote_no = 0 if(ret.voting_data) { ret.voting_data.forEach((pro, i, ar) => { if(pro.result) { pro.result.forEach( (phd, j, ar) => { //phd.vote //console.log(phd) if(phd.vote == 1){ vote_yes += 1; remain -= 1; } else if(phd.vote == 2){ vote_no += 1; } }) } }); } var vote_count = vote_yes + vote_no; obj=document.querySelector("#total_voting"); if(obj) { if(obj.innerText != total_voting){ obj.innerText = total_voting; } } obj = document.querySelector("#remain_voting"); if(obj) { if(obj.innerText != remain) { obj.innerText = remain; } } obj = document.querySelector("#vote_yes"); if(obj) { if(obj.innerText != vote_yes) { obj.innerText = vote_yes; } } obj = document.querySelector("#vote_yes_rate"); if(obj) { var rate = 0.0; if(vote_count > 0) { rate = vote_yes / vote_count*100; } var val = Number(rate).toFixed(2) + '%'; if(obj.innerText != val) { obj.innerText = val; } } obj = document.querySelector("#vote_no"); if(obj) { if(obj.innerText != vote_no) { obj.innerText = vote_no; } } obj = document.querySelector("#vote_no_rate"); if(obj) { var rate = 0.0; if(vote_count > 0) { rate = vote_no / vote_count*100; } var val = Number(rate).toFixed(2) + '%'; if(obj.innerText != val) { obj.innerText = val; } } //投票进度报告 obj = document.querySelector("#pro_dashboard"); if(obj) { var data={}; data.labels=[]; data.datasets=[]; var dataset={}; dataset.label="专家投票数"; dataset.data=[]; dataset.backgroundColor=[]; dataset.borderWidth=1; dataset.borderColor=[] colors = []; colors.push('rgba(255, 99, 132, 0.2)'); colors.push('rgba(255, 159, 64, 0.2)'); colors.push('rgba(255, 205, 86, 0.2)'); colors.push('rgba(75, 192, 192, 0.2)'); colors.push('rgba(54, 162, 235, 0.2)'); colors.push('rgba(153, 102, 255, 0.2)'); colors.push('rgba(201, 203, 207, 0.2)'); //pro 投票数 var pro_vote_count={}; ret.voting_data.forEach((pro_voting)=>{ var pro_name = pro_voting.pro_name; var count = 0; if(pro_voting.result) { count = pro_voting.result.length; } pro_vote_count[pro_name]=count; }) //labels and data ret.pro_list.forEach( (pro, idx, ar) => { const fake_pro_name = '专家' + (idx+1); //data.labels.push( pro[1] ) data.labels.push( fake_pro_name ) dataset.data.push( pro_vote_count[ pro[1] ] | 0 ); color_idx = idx % colors.length; var back_color = colors[color_idx]; var border_color = back_color.replace('0.2', '1'); //console.log(back_color, border_color); dataset.backgroundColor.push( back_color ); dataset.borderColor.push( border_color ); //pro.result.forEach((phd, idx2, ar2)=> { //}) }) data.datasets.push(dataset) if (!pro_chart) { pro_chart_data = JSON.stringify(data); pro_chart = new Chart(obj.getContext('2d'), { type: 'bar', data: data, options: { scales: { yAxes: [{ ticks: { beginAtZero: true } }] } } }); } else { var json_2 = JSON.stringify(data); if( pro_chart_data != json_2) { console.log(pro_chart_data) pro_chart_data = json_2; pro_chart.data = data; pro_chart.update(); } } } // 博士后得票情况 obj = document.querySelector("#phd_dashboard"); if(obj) { var data={}; data.labels=[]; data.datasets=[{}, {}]; var dataset1=data.datasets[0] dataset1.label="赞成票得票数"; dataset1.backgroundColor= 'rgb(255, 99, 132)', dataset1.borderColor= 'rgb(255, 99, 132)', dataset1.data= [10, 23, 5, 99, 67, 43, 0], dataset1.fill= false, dataset1.pointRadius= 5, dataset1.pointHoverRadius= 10, dataset1.showLine= true // no line shown var dataset2=data.datasets[1] dataset2.label="反对票得票数"; dataset2.backgroundColor= 'rgb(54, 162, 235)', dataset2.borderColor= 'rgb(54, 162, 235)', dataset2.data= [10, 73, 15, 33, 0, 13, 0], dataset2.fill= false, dataset2.pointRadius= 5, dataset2.pointHoverRadius= 10, dataset2.showLine= true // no line shown var phd_labels=[]; var phd_vote_yes=[]; var phd_vote_no=[]; ret.phd_list.forEach((phd)=>{ phd_labels.push(phd[2]); phd_vote_yes.push(0); phd_vote_no.push(0); }); ret.voting_data.forEach((pro_voting)=>{ var pro_name = pro_voting.pro_name; var count = 0; if(pro_voting.result) { count = pro_voting.result.length; pro_voting.result.forEach((phd_voting)=>{ var vote_yes = phd_voting.vote == 1? 1:0; var vote_no = vote_yes == 1?0:1; phd_labels.forEach((phd_name,idx) =>{ if (phd_name == phd_voting.phd_name) { phd_vote_yes[idx] += vote_yes; phd_vote_no[idx] += vote_no; } }); }) } }) data.labels = phd_labels dataset1.data = phd_vote_yes dataset2.data = phd_vote_no if(!phd_chart) { phd_chart_data = JSON.stringify(data); phd_chart = new Chart(obj.getContext('2d'), { type: 'line', data:data, options: { responsive: true, legend: { display: true }, elements: { point: { pointStyle: 'rectRot' } }, scales: { yAxes: [{ ticks: { beginAtZero: true, min:0 } }] } } }); } else { var json_2 = JSON.stringify(data); if(phd_chart_data != json_2) { phd_chart_data = json_2; phd_chart.data = data; phd_chart.update(); } } } // 更新时间 obj=document.querySelector("#time_start"); if(obj) { var tm = ret.time_start*1000; var d = new Date(); //console.log('time', ret.time_start); d.setTime(tm); obj.innerText = d.format('%Y-%m-%d %H:%M:%S'); } obj=document.querySelector("#time_now"); if(obj) { var d = new Date(); obj.innerText = d.format('%Y-%m-%d %H:%M:%S'); } obj=document.querySelector("#time_duration"); if(obj) { var tstart = ret.time_start; var tstop = ret.time_stop; var dur = parseInt(tstop - tstart); var days = parseInt(dur / 86400); var hours = parseInt( (dur % 86400) / 3600 ); var mins = parseInt( (dur % 3600 ) / 60 ); var secs = parseInt( (dur % 60)); obj.innerText = days + " " + hours + ":" + mins + ":" + secs } obj=document.querySelector("#time_remain"); if(obj) { var tstop = ret.time_stop; var tnow = new Date().getTime()/1000; var dur = parseInt(tstop - tnow); if (dur < 0) { obj.innerText = '0' } else { var days = parseInt(dur / 86400); var hours = parseInt( (dur % 86400) / 3600 ); var mins = parseInt( (dur % 3600 ) / 60 ); var secs = parseInt( (dur % 60)); obj.innerText = days + " " + hours + ":" + mins + ":" + secs } } //更新列表 obj = document.querySelector("#pro_table"); if(obj) { var table = $("#pro_table").data("table"); if(table) { var data={} data.header=[] data.data=[] var col1={} col1.name="id" col1.title = '序号' col1.size=100 col1.sortable=true col1.sortDir='asc' col1.format='number' data.header.push(col1) var col2={} col2.name = 'name' col2.title='姓名' col2.size=200 col2.sortable=true data.header.push(col2) var col3={} col3.name = 'org' col3.title='工作单位' col3.size=400 col3.sortable=true data.header.push(col3) var col4={} col4.name="status" col4.title='投票状态' col4.size=200 col4.sortable=true data.header.push(col4) ret.pro_list.forEach( (pro, idx) =>{ const fake_pro_name = '专家' + (idx+1); dt = [] dt.push(idx + 1) //dt.push( pro[1] ) dt.push( fake_pro_name ) dt.push( pro[0] ) var dt_voting_done = false ret.voting_data.forEach( (pro_voting)=>{ if(pro[1] == pro_voting.pro_name) { if(pro_voting.voting_status == 1) { dt.push('正在投票') } else if(pro_voting.voting_status ==2) { dt.push('完成投票') } else { dt.push('未开始投票') } dt_voting_done = true; } }) if(!dt_voting_done) { dt.push('未开始投票') } data.data.push(dt) }); var json_2 = JSON.stringify(data) if(pro_table_data != json_2) { pro_table_data = json_2 //console.log('reload pro_table') //console.log(table) table.deleteItem(1, (val)=>{ console.log('del item', val) return true;}); table.header={} table.data = data table._createItemsFromJSON(table.data); table.currentPage=1; table.resetView(); } } } //博士后列表 obj = document.querySelector("#phd_table"); if(obj) { var table = $("#phd_table").data('table'); if(table) { var data={} data.header=[] data.data=[] var col1={} col1.name="id" col1.title = '序号' col1.size=100 col1.sortable=true col1.sortDir='asc' col1.format='number' data.header.push(col1) var col2={} col2.name = 'name' col2.title='姓名' col2.size=200 col2.sortable=true data.header.push(col2) var col3={} col3.name = 'org' col3.title='毕业院校' col3.size=400 col3.sortable=true data.header.push(col3) ret.phd_list.forEach( (phd, idx) =>{ dt = [] dt.push(idx + 1) dt.push( phd[2] ) dt.push( phd[8] ) data.data.push(dt) }); var json_2 = JSON.stringify(data) if(phd_table_data != json_2) { phd_table_data = json_2 //console.log('reload pro_table') //console.log(table) table.deleteItem(1, (val)=>{ //console.log('del item', val) return true;}); table.header=[] table.data = data table._createItemsFromJSON(table.data); table.currentPage=1; table.resetView(); } } } } // dashboard else if (ret.method == 'voting') { //console.log(ret); { // 更新全局状态 my_vote_max = ret.max_pro_num; my_vote_yes=0; my_vote_no = 0; my_vote_remain = ret.phd_list.length; ret.voting_data.forEach((item)=>{ if(item.pro_name == my_name) { if(item.result !== undefined) { item.result.forEach((vote)=>{ if(vote.vote == 1) { my_vote_yes += 1; } else { my_vote_no += 1; } my_vote_remain -= 1; }) } } }); // 更新提示信息 update_vote_status(); } var obj_list = document.querySelector('#voting_phd_list'); var obj_detail = document.querySelector('#voting_phd_detail'); if(obj_list && obj_detail) { var my_vote=[] var my_vote_data ={} var phd_list=[] if( ret.voting_data ) { ret.voting_data.forEach((item)=>{ if (item.pro_name == my_name) { my_vote = item.result; } }) } ret.phd_list.forEach((phd) =>{ var name = phd[2]; var value = 0; phd_list.push(name); my_vote.forEach( (vote)=>{ if(vote.phd_name == name) { value=vote.vote; } }) my_vote_data[name]=value; }) var json_phd_list = JSON.stringify(phd_list); var json_2 = JSON.stringify(my_vote_data); //博士后列表是否不同 不同则重新构建所有内容 if(json_phd_list != phd_voting_list) { phd_voting_list = json_phd_list; phd_voting_data = json_2; // 1.清除现有数据 navview = $('div[data-role="navview"]'); //console.log(navview); pane = navview.children('.navview-pane'); content = navview.children('.navview-content'); menu_container = pane.children(".navview-menu-container"); menu = menu_container.children('.navview-menu'); menu.clear(); content.children('div').remove(); // 2. 重新生成菜单 和内容 var menu_template=` <li class="item-header"><a href="#" id="menu_checkbox_clear" class="fg-blue">清除选择</a></li> `; var menu_item = $(menu_template); menu_item.appendTo(menu); ret.phd_list.forEach((phd,idx) =>{ var phd_info={ index:idx, name:phd[2], birth:phd[3], date:phd[4], credit:phd[5], order:phd[0], order_college:phd[1], teacher:phd[6], teacher2:phd[7], org:phd[8], org2:phd[9], class:phd[11], detail:phd[10], college:phd[12] }; gen_phd_id(phd_info); var phd_detail = `<div class="grid border bd-cyan no-gap"> <div class="row border no-gap"> <div class="cell-1 border bg-lightGray">姓名</div> <div class="cell-2 border ">${phd_info.name}</div> <div class="cell-2 border bg-lightGray">院系</div> <div class=" ">${phd_info.college}</div> <!-- <div class="cell-1 bg-lightGray">出生年月</div> <div class="cell-2">${phd_info.birth}</div> <div class="cell-2 bg-lightGray">博士毕业时间</div> <div class="cell-2">${phd_info.date}</div> <div class="cell bg-lightGray">当前身份</div> <div class="cell-2">${phd_info.credit}</div> --> </div> <!-- <div class="row"> <div class="cell-1 bg-gray">推荐顺序</div> <div class="cell-1">${phd_info.order}</div> <div class="cell-1 bg-gray">院系顺序</div> <div class="cell-2">${phd_info.order_college}</div> <div class="cell-2 bg-gray">博士导师</div> <div class="cell-2">${phd_info.teacher}</div> <div class="cell-1 bg-gray">合作导师</div> <div class="cell-2">${phd_info.teacher2}</div> </div> --> <div class="row border no-gap"> <!-- <div class="cell-1 border bg-lightGray">学位授予机构</div> <div class="cell-1 border ">${phd_info.org}</div> --> <!-- <div class="cell-1 border bg-lightGray">目前所属单位</div> <div class="cell-2 border ">${phd_info.org2}</div> <div class="cell-2 border bg-lightGray">所属一级学科</div> <div class=" ">${phd_info.class}</div> --> </div> <!-- <div class="row"> <div class="cell-1 bg-lightGray">详细信息</div> <div class="p-6">${phd_info.detail}</div> </div> --> </div> `; var button_detail =` <button class="command-button icon-right success m-1"> <span class="mif-checkmark icon"></span> <span class="caption"> 同意 <small>单击更改推荐结果</small> </span> </button> <button class="command-button icon-right alert m-1 "> <span class="mif-cross icon"></span> <span class="caption"> 不同意 <small>单击更改推荐结果</small> </span> </button> `; var phd_panel = `<div data-role="panel" data-cls-panel=“no-border-left” data-title-caption="详细资料" data-collapsible="true" data-cls-title="bg-gray fg-white" data-cls-title-icon="bg-cyan" data-title-icon="<span class=\'mif-user\'></span>"> ${phd_detail} </div> <div data-role="panel" data-title-caption="是否推荐给予${phd_info.name}博雅博士后项目资助" data-collapsible="false" data-cls-title="bg-gray fg-white" data-cls-title-icon="bg-cyan" data-title-icon="<span class=\'mif-rocket\'></span>" > ${button_detail} </div> `; var node2 = $('<div>'); node2.attr('id', phd_info.id); $(phd_panel).appendTo(node2); node2.appendTo( $('#voting_phd_detail') ); //obj_detail.appendChild(node2); if(idx > 0) node2.hide(); // 生成菜单 var mif_class=''; var vote_status = 0; try { my_vote.forEach((vote)=>{ if(vote.phd_name == phd_info.name) { vote_status = vote.vote; throw new Error('done'); } }) } catch(e) { if(e.message != 'done') throw e; } if(vote_status == 0) { //未投票 mif_class ='fg-orange mif-tablet'; //caption.addClass('fg-orange'); } else if(vote_status == 1) { //赞成票 mif_class = 'fg-green mif-checkmark'; } else { //反对票 mif_class ='fg-red mif-cross'; } const menu_template = ` <li> <a href="#" name="${phd_info.id}" real_name="${encodeURI(phd_info.name)}"> <span class="icon"> <input type="checkbox"><span class="${mif_class}" ></span> </span> <span class="caption"> ${phd_info.name} </span> <div class="badges"> <span class="badge inline">${phd_info.college}</span> <span class="badge inline bg-black fg-white">推荐顺序 ${phd_info.order_college}</span> </div> </a> </li> <li class="item-separator"></li> ` //console.log(template) var menu_item = $(menu_template); menu_item.appendTo(menu); menu_item.on('click','a', (e)=>{ // hide all var anchor = $(e.target); while(anchor.prop('tagName') != 'A') { anchor = anchor.parent(); } //console.log(anchor); var phd_id = anchor.attr('name'); //var phd_name =decodeURI( anchor.attr('real_name') ); //console.log(phd_id); var content = $('#' + phd_id ); content.parent().children('div').hide(); content.show(); }); }); // 3. 更新菜单高度 calcMenuHeight=(a_menu, a_container)=>{ var elements_height = 0; $.each(a_menu.prevAll(), function(){ elements_height += $(this).outerHeight(true); }); $.each(a_menu.nextAll(), function(){ elements_height += $(this).outerHeight(true); }); a_container.css({ height: "calc(100% - "+(elements_height)+"px)" }); } calcMenuHeight(menu, menu_container); // 4. 绑定按钮事件 $('button.command-button').on('click', (e)=>{ var button = $(e.target); var action_yes = false; var req={}; req.method="votingman"; req.update_vote=1; req.pro_name = my_name; req.user_name = my_login_name // 1. 判断当前操作类型 同意, 不同意 while(button !== undefined) { console.log(button.prop('tagName')); if(button.prop('tagName') == 'BUTTON') { action_yes = button.hasClass('success'); break; } button = button.parent(); } // 找不到按钮 if(button === undefined) { return; } // 2. 判断是否多选 const batch = $('span.icon input[type="checkbox"]:checked'); if(batch.length > 0) { // 2.1. 统计当前选择 var count_cur_yes = 0; var count_cur_no = 0; const anchor_list = batch.parent().parent(); anchor_list.each((idx, oanchor)=>{ const phd_id = oanchor.getAttribute('name'); const anchor = $(oanchor); const phd_name =decodeURI( anchor.attr('real_name') ); var mif = anchor.children('span.icon').children('span'); var cur_yes = mif.hasClass('fg-green'); var cur_no = mif.hasClass('fg-red'); if(!cur_yes) { count_cur_yes += 1; } if(!cur_no) { count_cur_no += cur_no; } console.log(phd_name, phd_id); }); // 2.2. 判断赞成票最大值 if (action_yes) { if(my_vote_yes+count_cur_yes > my_vote_max) { Metro.dialog.create({ title: "您的选择超过本次项目赞成票最大值", content: `<div class="mt-2 p-2"> <h5>本次会议每位专家最大推荐名额: ${my_vote_max} </h5> </div>`, closeButton: true, actions: [ { caption: "确定", cls: "js-dialog-close alert" } ] }); return; } } if(action_yes) req.vote = 1; else req.vote = 2; anchor_list.each((idx, oanchor)=>{ const phd_id = oanchor.getAttribute('name'); const anchor = $(oanchor); const phd_name =decodeURI( anchor.attr('real_name') ); var mif = anchor.children('span.icon').children('span'); var cur_yes = mif.hasClass('fg-green'); var cur_no = mif.hasClass('fg-red'); req.phd_name = phd_name; req.phd_id = phd_id; if(action_yes && !cur_yes) { mif.removeClass('mif-tablet mif-cross mif-checkmark fg-red fg-orange fg-green') mif.addClass('fg-green mif-checkmark'); ws.send(JSON.stringify(req)); update_vote_status(); } else if(!action_yes && !cur_no) { mif.removeClass('mif-tablet mif-cross mif-checkmark fg-red fg-orange fg-green') mif.addClass('fg-red mif-cross'); ws.send(JSON.stringify(req)); update_vote_status(); } }); console.log('button action + ', batch.length); batch.prop('checked', false); return; } // 3. 无多选,进入当前对象操作 const phd_obj = button.parent().parent().parent(); const phd_id = phd_obj.attr('id'); const anchor = $('a[href="#"][name="'+phd_id +'"]'); if(anchor) { const phd_name =decodeURI( anchor.attr('real_name') ); var mif = anchor.children('span.icon').children('span'); var cur_yes = mif.hasClass('fg-green'); var cur_no = mif.hasClass('fg-red'); var req={}; req.method="votingman"; req.update_vote=1; req.pro_name = my_name; req.user_name = my_login_name req.phd_name = phd_name; req.phd_id = phd_id; if(action_yes && !cur_yes) { if(my_vote_yes + 1 > my_vote_max) { Metro.dialog.create({ title: "您已经达到本次项目赞成票最大值", content: `<div class="mt-2 p-2"> <h5>本次会议每位专家最大推荐名额: ${my_vote_max} </h5> </div>`, closeButton: true, actions: [ { caption: "确定", cls: "js-dialog-close alert" } ] }); return; } mif.removeClass('mif-tablet mif-cross mif-checkmark fg-red fg-orange fg-green') mif.addClass('fg-green mif-checkmark'); req.vote = 1; ws.send(JSON.stringify(req)); update_vote_status(); } else if(!action_yes && !cur_no) { mif.removeClass('mif-tablet mif-cross mif-checkmark fg-red fg-orange fg-green') mif.addClass('fg-red mif-cross'); req.vote = 2; ws.send(JSON.stringify(req)); update_vote_status(); } } }); $('#menu_checkbox_clear').on('click', (e)=>{ $('span.icon input[type="checkbox"]:checked').prop('checked', false); }); return; } //我的投票状态已经改变,更新投票状态 //if(json_2 != phd_voting_data) //总是更新 if(true) { phd_voting_data = json_2; const menu_list = $('ul.navview-menu li a[href="#"]'); //console.log('update status'); //console.log(my_vote_data); menu_list.each((idx, el)=>{ const phd_name = decodeURI(el.getAttribute('real_name')); var el_icon = $(el).find('span.icon span'); //console.log(el_icon) if(my_vote_data[phd_name] === undefined || my_vote_data[phd_name] == 0) { // 未投票 if(!el_icon.hasClass('fg-orange mif-tablet')) { el_icon.clearClasses().addClass("fg-orange mif-tablet"); //console.log('un', phd_name); } } else if (my_vote_data[phd_name] == 1) { // 赞成票 if(!el_icon.hasClass('fg-green mif-checkmark')) { el_icon.clearClasses().addClass("fg-green mif-checkmark"); //console.log('yes', phd_name); } } else { // 反对票 if(!el_icon.hasClass('fg-red mif-cross')) { el_icon.clearClasses().addClass("fg-red mif-cross"); //console.log('no', phd_name); } } }) } else { //没有任何改变, do-nothing } } } }; ws.onclose= (ev)=>{ }; ws.onerror = (ev)=>{ }; var tile_voting_done = document.querySelector("#voting_done"); if(tile_voting_done) { tile_voting_done.onclick = function(ev){ // var vote_yes=$('ul.navview-menu li a span span.fg-green').length; var vote_no=$('ul.navview-menu li a span span.fg-red').length; var vote_remain =$('ul.navview-menu li a span span.fg-orange').length; Metro.dialog.create({ title: '提交投票结果', content: '<div>请确认是否完成投票?</div><hr>' + '<h4 class="fg-green">'+vote_yes +'票赞成</h4>' + '<h4 class="fg-red">'+vote_no+ '票反对</h4>' + '<h4 class="fg-orange">'+vote_remain + '票剩余</h4>', actions: [ { caption: "确认提交", cls: "js-dialog-close success", onclick: function(){ req = {} req.method='votingman'; req.finish_vote=1; req.pro_name = my_name; req.user_name = my_login_name; ws.send(JSON.stringify(req)); window.location.href = "done.html"; } }, { caption: "返回修改", cls: "js-dialog-close", onclick: function(){ //do nothing } } ], clsDialog: 'alert' }); }; } /* --- Dashboard --- */ window.chartColors = { red: 'rgb(255, 99, 132)', orange: 'rgb(255, 159, 64)', yellow: 'rgb(255, 205, 86)', green: 'rgb(75, 192, 192)', blue: 'rgb(54, 162, 235)', purple: 'rgb(153, 102, 255)', grey: 'rgb(201, 203, 207)' }; }) var obj = document.querySelector("#voting_pro_name"); if(obj) { var cookie = document.cookie; var ca = cookie.split(';'); var user_name = '' // console.log(cookie); ca.forEach((it) =>{ var item = it.trimLeft(); if(item.indexOf('user_name=') == 0) { user_name = decodeURIComponent(item.substr(10)); } }); obj.innerText = user_name } function update_pro_name() { var cookie = document.cookie; var ca = cookie.split(';'); //console.log(cookie); ca.forEach((it) => { var item = it.trimLeft(); if (item.indexOf('pro_name=') == 0) { //console.log() my_name = decodeURIComponent(item.substr(9)); } else if (item.indexOf('user_name=') == 0) { my_login_name = decodeURIComponent(item.substr(10)); } }); } function gen_phd_id(phd_info) { var id_str = phd_info.name + '_index' + phd_info.index; //console.log(id_str); id_str = id_str.replace(/(\[|\]|\(|\)\{|\}|\||\\|\'|\"|\;|\:|\.|\>|\,|\<|\@|\#|\$|\%|\^|\&|\*|\-|\`|\~|\?|\/|\+|\=| )/g, '_'); //console.log(id_str); phd_info.id = id_str; return phd_info; } function update_vote_status() { my_vote_yes=$('ul.navview-menu li a span span.fg-green').length; my_vote_no=$('ul.navview-menu li a span span.fg-red').length; my_vote_remain =$('ul.navview-menu li a span span.fg-orange').length; var obj = $('#pro_voting_summary'); const status_text = `投票统计:最大可投赞成票${my_vote_max} 已投同意票${my_vote_yes}, 已投反对票数${my_vote_no}, 尚待投票人数${my_vote_remain}`; if(obj.text() != status_text) { obj.text(status_text); } }
javascript
The short documentary, The Martha Mitchell Effect, now running for the Oscars, is a compelling damnation of the Watergate scandal that saw US President Richard Nixon’s resignation. In one of the first scenes, he tells interviewer David Frost that “I am convinced if it hadn’t been for Martha, there’d have been no Watergate. ” He was bang on. The Watergate scandal, as we all know, led to the disgrace of the world’s most powerful man. The interview is filled with Nixon’s obsession over Martha Mitchell, wife of Attorney General John Mitchell, The second most powerful man in America. Nixon ridicules her, a habit that he had cultivated over the years. It came to a point when generations who came after the scandal broke into animated discussions at the mere mention of Martha. Martha married John, a hotshot New York lawyer, much before he and the President merged their law firms in 1966. When Nixon took office in 1968, he appointed John as his Attorney-General. The husband and wife shifted to Washington. “Nixon quips in the documentary: She’s always a pain in the ass,” an excerpt used in the film. “It scares me. I just can’t stand it. ” She eventually told the Press that she was a captive, but the White House countered it with a story that she was mentally sick and an alcoholic. Something which happens even in this day and age. Be that as it may, Martha was in a large way responsible for alerting the media about Watergate. Despite denials by the highest office, history proved that she was right.
english
<article class="post"> <!-- want to cut here as post-header --> <header class="post-header"> <h1 class="post-title">{{ page.title }}</h1> <section class="post-meta"> <time class="post-date" date-time="{{ page.date }}">{{ page.date | date_to_long_string }}</time> {% unless page.tags == empty %} {% assign tags_list = page.tags %} {% include custom/tags_list %} {% endunless %} </section> </header> <section class="post-content"> {{ content }} </section> <!-- want to cut here as post-footer --> <footer class="post-footer"> <a href="/" class="menu-button"> <span class="word">← Home</span> </a> </footer> </article>
html
package algoteg.controlador; public class BotonEnviar { }
java
#include "sendplanepositionscommobj.h" #include <QMessageBox> #include "viewmodels/planespositionsviewmodel.h" #include "multiplayerround.h" bool SendPlanePositionsCommObj::makeRequest() { if (m_GlobalData->m_UserData.m_UserName.isEmpty()) { QMessageBox msgBox(m_ParentWidget); msgBox.setText("No user logged in"); msgBox.exec(); return false; } PlanesPositionsViewModel planesPositionsData; planesPositionsData.m_GameId = m_GlobalData->m_GameData.m_GameId; planesPositionsData.m_RoundId = m_GlobalData->m_GameData.m_RoundId; planesPositionsData.m_OwnUserId = m_GlobalData->m_UserData.m_UserId; planesPositionsData.m_OpponentUserId = m_GlobalData->m_GameData.m_OtherUserId; Plane pl1; Plane pl2; Plane pl3; m_MultiRound->getPlayerPlaneNo(0, pl1); m_MultiRound->getPlayerPlaneNo(1, pl2); m_MultiRound->getPlayerPlaneNo(2, pl3); planesPositionsData.m_Plane1X = pl1.row(); planesPositionsData.m_Plane1Y = pl1.col(); planesPositionsData.m_Plane1Orient = pl1.orientation(); planesPositionsData.m_Plane2X = pl2.row(); planesPositionsData.m_Plane2Y = pl2.col(); planesPositionsData.m_Plane2Orient = pl2.orientation(); planesPositionsData.m_Plane3X = pl3.row(); planesPositionsData.m_Plane3Y = pl3.col(); planesPositionsData.m_Plane3Orient = pl3.orientation(); //qDebug() << "Plane 1 " << pl1.row() << " " << pl1.col() << " " << (int)pl1.orientation(); //qDebug() << "Plane 2 " << pl2.row() << " " << pl2.col() << " " << (int)pl2.orientation(); //qDebug() << "Plane 3 " << pl3.row() << " " << pl3.col() << " " << (int)pl3.orientation(); m_RequestData = planesPositionsData.toJson(); makeRequestBasis(true); return true; } void SendPlanePositionsCommObj::finishedRequest() { QJsonObject retJson; if (!finishRequestHelper(retJson)) return; bool roundCancelled = retJson.value("cancelled").toBool(); if (roundCancelled) { m_MultiRound->setRoundCancelled(); //activateStartGameTab(); emit roundCancelled; return; } bool otherPositionsExist = retJson.value("otherExist").toBool(); if (otherPositionsExist) { int plane1_x = retJson.value("plane1_x").toInt(); int plane1_y = retJson.value("plane1_y").toInt(); int plane1_orient = retJson.value("plane1_orient").toInt(); int plane2_x = retJson.value("plane2_x").toInt(); int plane2_y = retJson.value("plane2_y").toInt(); int plane2_orient = retJson.value("plane2_orient").toInt(); int plane3_x = retJson.value("plane3_x").toInt(); int plane3_y = retJson.value("plane3_y").toInt(); int plane3_orient = retJson.value("plane3_orient").toInt(); //qDebug() << "Plane 1 from opponent " << plane1_x << " " << plane1_y << " " << plane1_orient; //qDebug() << "Plane 2 from opponent" << plane2_x << " " << plane2_y << " " << plane2_orient; //qDebug() << "Plane 3 from opponent" << plane3_x << " " << plane3_y << " " << plane3_orient; bool setOk = m_MultiRound->setComputerPlanes(plane1_x, plane1_y, (Plane::Orientation)plane1_orient, plane2_x, plane2_y, (Plane::Orientation)plane2_orient, plane3_x, plane3_y, (Plane::Orientation)plane3_orient); if (!setOk) { QMessageBox msgBox(m_ParentWidget); msgBox.setText("Planes positions from opponent are not valid"); msgBox.exec(); return; } emit opponentPlanePositionsReceived(); } else { m_MultiRound->setCurrentStage(AbstractPlaneRound::GameStages::WaitForOpponentPlanesPositions); emit waitForOpponentPlanePositions(); } } bool SendPlanePositionsCommObj::validateReply(const QJsonObject& reply) { if (!((reply.contains("otherExist") && reply.contains("cancelled") && reply.contains("plane1_x") && reply.contains("plane1_y") && reply.contains("plane1_orient") && reply.contains("plane2_x") && reply.contains("plane2_y") && reply.contains("plane2_orient") && reply.contains("plane3_x") && reply.contains("plane3_y") && reply.contains("plane3_orient")))) return false; if (!reply.value("otherExist").isBool() || !reply.value("cancelled").isBool()) return false; if (!reply.value("plane1_x").isDouble() || !reply.value("plane1_y").isDouble() && !reply.value("plane1_orient").isDouble() || !reply.value("plane2_x").isDouble() || !reply.value("plane2_y").isDouble() || !reply.value("plane2_orient").isDouble() || !reply.value("plane3_x").isDouble() || !reply.value("plane3_y").isDouble() || !reply.value("plane3_orient").isDouble()) return false; if (!checkInt(reply.value("plane1_x")) || !checkInt(reply.value("plane1_y")) && !checkInt(reply.value("plane1_orient")) || !checkInt(reply.value("plane2_x")) || !checkInt(reply.value("plane2_y")) || !checkInt(reply.value("plane2_orient")) || !checkInt(reply.value("plane3_x")) || !checkInt(reply.value("plane3_y")) || !checkInt(reply.value("plane3_orient"))) return false; return true; }
cpp
// @flow import * as React from 'react' import { StyleSheet, Text, View } from 'react-native' import { Gradient } from '../../modules/UI/components/Gradient/Gradient.ui.js' import { nightText } from '../../styles/common/textStyles.js' import { THEME } from '../../theme/variables/airbitz' type Props = { icon?: React.Node, text: string } /** * A blue header row in a settings scene. */ export function SettingsHeaderRow(props: Props) { const { icon, text } = props return ( <Gradient style={styles.row}> {icon != null ? <View style={styles.padding}>{icon}</View> : undefined} <Text style={styles.text}>{text}</Text> </Gradient> ) } const rawStyles = { row: { // Layout: minHeight: THEME.rem(3), paddingLeft: THEME.rem(0.5), paddingRight: THEME.rem(0.5), // Children: alignItems: 'center', flexDirection: 'row', justifyContent: 'flex-start' }, text: { ...nightText('row-left'), flexGrow: 1, fontSize: THEME.rem(1.125), padding: THEME.rem(0.5) }, padding: { padding: THEME.rem(0.5) } } const styles: typeof rawStyles = StyleSheet.create(rawStyles)
javascript
We geeks all have the same platonic prosthesis ideal: Luke Skywalker's badass Star Wars mech-hand. We're getting there, bit by bit. Dennis Aabo Sørensen's new hand is almost there; it let him feel again. The hand is the subject of an in-depth paper published in the journal Science Translational Medicine today, and has been tested on Sørensen and Sørensen alone. The mecha-gripper works by tapping right into Sørensen's nerves via electrodes in his arm that are stimulated by sensitive pressor sensors on the hand's fingertips. The result? Touch. Touch that Sørensen says feels an awful lot like what he can get out of his good hand. Silvestro Micera, a neural engineer at the Scuola Superiore Sant'Anna in Italy and the Swiss Federal Institute of Technology Lausanne in Switzerland, lead the team of researchers responsible for the touchy-feely mitt and considers it "certainly a major step in the right direction." The catch? Since the study focused on a single person, it's hard to really draw any conclusions about how mechanical hands like these could work on a larger scale. Not to mention there's the issue of using it for long periods of time; Sørensen only used this one off and on.
english
Nikola and General Motors today announced a strategic partnership. Through the deal, GM gets 11% ownership in startup Nikola, and will, in turn, produce Nikola’s wild fuel cell pickup truck by the end of 2022. Both companies’ shares jumped on the news, with Nikola trading up 45% and GM up 11% in pre-market trading. The deal nets GM a $2 billion stake in Nikola, one of the hottest vehicle startups. Along with the financial stake, GM gains one seat on Nikola’s board of directors in exchange for in-kind services. General Motors CEO Mary Barra said that she sees this as another path to deploy GM’s battery and fuel cell systems. The partnership names GM as the exclusive fuel cell supplier for Nikola’s upcoming class 7/8 trucks. For Nikola, this deal nets the startup a significant partner as it moves closer to production. GM will “engineer, validate, homologate and build the Nikola Badger” electric and fuel cell pickup. General Motors will also take over the manufacturing of the pickup. The deal enables Nikola to hit the market faster by offloading the manufacturing duties to one of the world’s largest vehicle manufacturers. This, in turn, returns value to Nikola’s investors quicker, and with likely less risk. For GM, at least on paper, the automaker gains a significant asset that has serious momentum.
english
import React from 'react'; import DisneyLogin from './components/DisneyLogin'; import Welcome from './components/Welcome'; import { BrowserRouter as Router, Route } from 'react-router-dom'; import BuggieList from './components/BuggieList'; function App() { return ( <Router> <Route exact path = '/' component={DisneyLogin}/> <Route path = '/welcome' component={Welcome} /> <Route path = '/buggielist' component={BuggieList}/> </Router> ); } export default App;
javascript
It was an unusual year for sports with the coronavirus pandemic halting tournaments for an extended period or leading them to be cancelled. Football clubs across the globe suffered huge losses with wage cuts and empty stadiums becoming the new normal. However, there was plenty to cheer for Indian football in particular after two of the biggest clubs Mohun Bagan and East Bengal made their entry into the Indian Super League. Kolkata giant Mohun Bagan announced a merger with Indian Super League club ATK FC to form ATK Mohun Bagan. The merger also meant that the 131-year-old club brought its massive fan base to the Indian top-flight. Canadian forward Christine Sinclair became the all-time top scorer in international football, breaking the mark held by American Abby Wambach when she netted her 185th goal against St. Kitts and Nevis. ATK FC won its third ISL title before it merged with Mohun Bagan by beating Chennaiyin FC 3-1 in the final. Antonio Lopez Habas' men were imperious in the summit clash as Javi Hernandez scored twice and Edu Garcia got on the scoresheet. Golden Boot winner Nerijus Valskis scored for Chennaiyin, but it proved to be just a consolation. Black Lives Matter protests spread across the globe following the death of George Floyd under police custody in the United States, with active sportspersons also joining the battle against racial inequality. Borussia Monchegladbach forward Marcus Thuram was among the first few footballers to show his solidarity for the movement after scoring his first goal in the Bundesliga against Union Berlin. The league did not charge the youngster for his action, with FIFA also requesting federations to not sanction players for their support. Chelsea was awarded the Women's Super League title by England's Football Association (FA) after the season was ended due to the COVID-19 pandemic. The Blues were second in the table behind Manchester City but was announced champion due to superior points per game. Liverpool was confirmed as the champion of England for the first time in the Premier League era, its first English top flight title in 30 years after Chelsea beat Manchester City. Jurgen Klopp's men were also the quickest to the title, sealing it with five matches to spare. Real Madrid sealed its 34th La Liga title with a 2-1 win over Villarreal, its first in the past three years. Zinedine Zidane's side showed determination and grit to record 10 wins on the run, while arch rival Barcelona fell flat during key moments after the league resumed in May. For the first time since its inception in 1956, the prestigious Ballon d’Or awards were cancelled due to the disruption caused by the coronavirus pandemic. German giant Bayern Munich became the second team in history after Barcelona, to complete a continental treble twice by winning the league, domestic cup and Champions League. After sealing the Bundesliga and the DFB Pokal, Hansi Flick's side beat a tough Paris Saint-Germain 1-0 in the final with Kingsley Coman's 59th minute strike. After spending his entire career in Catalonia and winning 34 major trophies with FC Barcelona, Lionel Messi's fallout with the then club president Josep Maria Bartomeu had an unprecedented outcome. The club captain sent a fax to the club saying he wished to exercise a clause in his contract, allowing him to leave for free with immediate effect. However, La Liga clarified that the extension of 2019-20 season due to COVID-19 means the Argentine cannot be a free agent. Not interested in taking his boyhood club to the court, Messi decided to stay for one more season and see out his contract which ends in June 2021. Five successive European titles is a feat that has only been achieved once -- by Real Madrid in the 1950s, when Alfredo Di Stefano was the star in Spain. Olympique Lyonnias beat Wolfsburg 3-1 in the UEFA Women's Champions League final to clinch its seventh title overall and fifth in a row. Kolkata giant East Bengal, which celebrated 100 years since foundation in August, completed its move to the ISL from the I-League with a little less than two months before the start of the competition. Shree Cement East Bengal Foundation acquired a majority stake at the club, and with their successful bid the Red and Golds entered the top flight as the eleventh team in the competition. Five-time Ballon d'Or winner Cristiano Ronaldo joined an elite club of six footballers who completed 700 goals for both club and country when he scored in Portugal's Euro qualifying match against Ukraine. He is behind legends such as Gerd Muller (735), Ferenc Puskas (746), Pele (767), Romario (772) and Josef Bican (805) on the all-time list. The seventh season of the ISL kicked off in a bio-secure environment in Goa, marking the return of top-level sport in the country for the first time since the COVID-19 outbreak. Newly-formed ATK Mohun Bagan beat Kerala Blasters 1-0 in the opening match after captain Roy Krishna scored in the 68th minute. Football legend Diego Maradona, who led Argentina to the 1986 World Cup title, passed away due to cardiac arrest. Maradona, who had struggled with drug addiction and several health issues during his life, was under observation after undergoing a brain surgery early in November. Professional women footballers are to be guaranteed 14-week maternity leave under new rules approved by FIFA with the clubs obliged to provide adequate medical support and reintegrate them into the team afterwards. Poland and Bayern Munich striker Robert Lewandowski was voted the FIFA Best Men’s player of the year as he beat Cristiano Ronaldo and Lionel Messi to the top honour. The forward scored 55 goals in 46 games in the 2019-20 season as Bayern Munich won the continental treble. England’s Lucy Bronze was voted the women’s player of the year beating Wendi Renard and Pernille Harder to the prize. Bronze, who won the treble with Lyon, became the first full back across both genders and the first female English player to win the award. Lionel Messi scored his 644th goal for Barcelona to surpass Pele's tally of 643 for Santos as the all-time record scorer for a single club.
english
During the days when there were no rush in the lives of people, no deadlines for the youngsters and no pressure on the children, something worse was sitting on the backs of every youngster and elderly. There prevailed a feeling of fear even amongst the most fearless souls. None was to be blamed. The times were tough and so was the humility. Belonging from one of the colonies of the sahebs wasn't something not to worry about. Nitai, the son of a farmer and a down to earth homemaker had a vast imagination in his mind. Not about the sufferings but about the possibilities. Not about the saddening news of the humiliation, but about the new dressing sense and new ideologies which he never saw before in his motherland. Often his mother found him trying to speak English in the accent of the sahebs, trying to know more about their language. Nitai often observed his friends were scared to talk about the colonizers. And their parents often scolded them a lot for even talking about them. Nitai was never able to understand why was it this way. His parents never talked to him about the sahebs. He just saw a smile on their face when he used to derive his hopes from them. He always wanted to be educated in their language and wanted to teach the villagers. He often tried different home remedies of his mother to get the light skin. He wanted a moustache like the sahebs. His parents never discouraged him. Maybe they loved the way their child's dreams sparked every time. "Rakshas hein kya woh log?", often Nitai questioned his friends but his friends would reply with a nod. That was it. And he tried his level best to prove them wrong with the points he had observed. "Unke zevar,tevar itne aache,itne alag...kabhi jaake hum bhi unse milenge. Baat karenge. Humko bhi saheb banna hein" Nitai's eyes sparkled with motivation and innocence while he said these words while not knowing how beautifully his innocence had covered up his mind. And when Nitai was lost in his words, his friends just looked at him with a numb face and questioned out of a sudden,"Woh saheb jaise banna hein tujhe?tujhe bharat maa pasand nahi?". Nitai was confused. He was completely unaware of what his friends were talking. "Are pyaara hein unko bharat maa isiliye na aaye hein,unka seva karne". He tried his best to convince them. His friends, without talking any further about this topic started leaving the place while Nitai was still having a smile on his face. While going, one of his friends looked back at Nitai and said "Pyaar karte toh mere baapu ko ghar aane dete. Aur Ramu ke maa ka laaj na cheente unse. Samajh ja. Tu bhi karega aise kaam?". Nitai didn't pay attention. He was convinced sahebs weren't that bad. They just wanted to punish the wrongdoers. They must have done something. Maybe ignored the sahebs. And who likes ignorance? "Galati unki nahi hogi" he reminded himself while walking towards home. Nitai's home was still far away. On his way, he often sat near the lake or started playing with some other children. Trying to copy the sahebs or just trying to pull his sisters' legs and laughing his heart out. He loved it all. And walking amidst the open sky and the fields on both side were his favourite. But while he was enjoying the view and walking towards his home, he saw something he had a wish to see but would never want to see. A Saheb riding a horse. He was excited to see the saheb come towards him but then he saw all his neighbours bowing down before them. His neighbour, Ramesh dadu had severe backache but Nitai was shocked to see him bowing down while he could feel it was hurting dadu badly. The saheb.got down from the horse. Nitai decided to hide behind the bushes to see what was happening. But something wasn't right. Even the elderly people bowing down, the woman crippled in fear, the man trying to stay as close as he could to his woman and the children bowing while holding on to their mother's saree. The saheb was walking past each of them, observing them. Looking at the man bowing down with utmost concentration. Nitai thought he felt sympathy for the man bowing down and wanted to help him out...but suddenly the saheb landed his foot on the man's back as if it was nothing but just a wooden stool. The man shouted in pain but the saheb started putting more pressure on his back until he started begging to leave him. His children got up and rushed towards him but as soon as they tried coming close to him the saheb took his whip out and started beating them as if they were the wild to be tamed. Nitai had no words. In a moment his innocence was ripped apart. His eyes were teary and his skin was safe from the humiliation but had more of goosebumps while his body was trembling with fear. He was not able to breathe properly. He was in shock. The man was still bowing down and was under the saheb's foot. His wife was crying her heart out but didn't have the courage to raise her head in front of the colonizer. Her hands were trembling and her fear overpowered her emotions while her husband was pulled by his hair, forced to stand up and was dragged behind a tree. The children sat numb and dumb with the bruises which were deeper than they looked while they asked their mother to stand up. To revolt. To save their father. But the woman was scared to death. Nitai thought of coming out of the bushes to comfort the woman. But he saw dadu, still bowing down with his ache holding his daughter in law's hands as if asking her not to get up. Just then there were sounds of whip falling like a beast on the man's skin as his screams traumatized every human in that place. His screams were more than agony, more than just pain and more than death. The saheb dragged his body in front of his family while Nitai saw him being alive somehow, looking helplessly at his wife. The saheb burst into laughter. Enjoying the scenario. He came towards the woman, dragged her up and made her sit on the horse while he got up and was about to leave the place but he did so just after shooting the man to death. The children were crying. Dadu was beating his chest while his son was lying dead with more pain he didn't deserve. After an hour Nitai finally got the courage to stand up. Decided to run as fast as he could. He wanted to hug his maa and pour his heart out. He was breathless. Helpless. That's how he felt. As soon as he reached towards his home he felt a second of relief as he saw a crowd near his house but then.."maa baba!" He shouted as he noticed there was a huge crowd near his home. "Kaku, maa kaha hein? baba hein na andar? aap sab yaha kyu hein?". He was trembling. None could answer the child's innocence. He searched for his mother and father in the crowd. That sense of security was needed by him but he was not able to find it. He went on to ask everyone what happened until he felt a warm wind..a loo...a heatwave. He turned his head to find out his house set on fire. His parents to be found nowhere. He heard the crowd saying that his family had the courage to refuse the sahebs and they had to pay the price for it. They weren't scared so they made to feel the fear. Nitai was reminded of the family he saw on his way back home. They weren't courageous but still, they were made to feel scared. Was it not a question of courage? Or was it killing and agonizing people just for fun. If yes, why? They were burnt alive said the crowd. He was pale and sat on the ground. No tears, no fear. He could just see his innocence, hopes, motivation, family burning in front of him..ALIVE. He knew his role models were the real culprits. They were more of demons for him now. His innocence was burned and he couldn't react to it. A child's heart was again, defeated by an adult's intentions. And he learned how culture was a weapon to cover someone's uncultured approach.
english
New Delhi, July 28 (AGENCY): Singer and actor Aditya Narayan, who is set to resume his hosting duties on ‘Sa Re Ga Ma Pa’, said he has achieved a lot from this show in his career, just like many contestants who have become singing sensations of the country. Aditya had hosted the 30th season of ‘Sa Re Ga Ma Pa 2021’, which aired from October 16, 2021 to March 6, 2022. However, the actor had bid adieu to the hosting duties, soon after the grand finale. He had announced the same through a social media post. The winner of that season was Neelanjana Ray. Meanwhile, he sang ‘Ji Huzoor’ in the Ranbir Kapoor-starrer ‘Shamshera’. Aditya and his wife, actress Shweta Agarwal had welcomed their first child, a baby girl in March 2022. Aditya, who has been hosting the show since 2007, will be once again seen as the host for the upcoming season, alongside judges - Himesh Reshammiya, Neeti Mohan, and Anu Malik. Aditya has always been a talented host whose charm and singing ability were spotted at a tender age by ‘Sa Re Ga Ma Pa’. He has only grown in popularity with each passing season and is back to captivate the audience with his impeccable wit, and easy-going camaraderie with judges and contestants alike. “I got my first offer to host ‘Sa Re Ga Ma Pa’ in 2007 and the rest is history. This show has given me so much love, I don’t think I can express in words what I feel for it. It’s been 16 years since I hosted my first season of the show, and here I am set to host another one. It is nothing but the pure love that makes me come back, 'Sa Re Ga Ma Pa' is like home to me,” added Aditya. The on-ground auditions have been held in cities like Guwahati, Kolkata, Bengaluru, Lucknow, Jaipur, and Chandigarh already, with a huge number of talented singers vying for their spot in the Mega Audition round. The auditions are yet to take place in Mumbai, Delhi, Vadodara, and Pune. The show will premiere soon on Zee TV.
english
1 Aretaq xb'antaj ronojel wa', te' xinwilo k'o jun porta jaqtal pa ri kaj, te k'u ri' xinta ri Jun ri xinuch'ab'ej loq nab'e ri je' ta ne u ch'ab'al jun nimalaj tun, xub'ij k'u chwe: Chatpaqal loq je wa', kink'ut k'u na chawäch ri rajwaxik käb'antaj na aretaq e b'antajinaq chi ronojel wa' we ri', —xcha chwe. 2 Chanim k'ut xchaptaj ri wanima' rumal ru chuq'ab' ri Loq'alaj Espíritu. Te' xinwilo k'o jun je'lalaj t'uyulib'al kojom pa ri kaj. K'o k'u Jun t'uyul chila'. 3 Ri Jun ri t'uyul pa ri je'lalaj t'uyulib'al ri' je' u b'antajik jas jun je'lalaj ab'aj re jaspe,* Konojel ri ab'aj ri keb'ix waral, e are' ab'aj wa' ri paqal kajil. o junam ruk' jun ab'aj re cornalina ri sib'alaj käjuluwik. K'o jun räxkiäq'ab' ri sib'alaj käjuluwik chrij ri je'lalaj t'uyulib'al je' jas jun ab'aj re esmeralda. 4 Xuquje' chrij ri je'lalaj t'uyulib'al ri' e k'o chi juwinaq kiejeb' je'lalaj taq t'uyulib'al chik ri e t'uyut'oj wi juwinaq kiejeb' k'amal taq ki b'e ri kojonelab'. Ri tata'ib' ki kojom saq katz'iaq, k'o jujun corona re q'än puaq chkijolom. 5 Che ri nab'e je'lalaj t'uyulib'al kel loq kaypa', wojojem, xuquje' kiäqulja. Chuwäch ri je'lalaj t'uyulib'al e k'o wuqub' chäj ri kenikowik. E are k'u wa' ri wuqub' espíritus rech ri Dios. 6 Chuwäch ri je'lalaj t'uyulib'al xuquje' k'o jun mar ri je' ta ne vidrio ri kuya' käka'y jun chupam. Pu nik'iajal ronojel, jawije' k'o wi ri je'lalaj t'uyulib'al xuquje' chrij ri t'uyulib'al e k'o kiejeb' ri je' kepe ángeles, ri k'o k'ia ki waq'äch chkiwäch xuquje' chkij. 7 Ri nab'e chke je' käpe jun koj. Ri ukab' je' käpe jun ama' wakäx. Ri urox junam u ka'yeb'al ruk' jun winaq. Ri ukaj je' käpe jun nimalaj xik ri tajin kärapapik. 8 Ri kiejeb' awaj k'o waqib' ki xik' chkijujunal, nojinaq k'u ri rij xuquje' ri u xe' ri ki xik' che waq'ächaj. Paq'ij chi chaq'ab' man ketäni tä chub'ixik: ri Qajaw Dios ri k'o ronojel u wäch chuq'ab' ruk', ri k'o ojer, ri k'o kämik, ri xuquje' käpe na, —kecha ri'. 9 Amaq'el aretaq ri kiejeb' ri je' kepe ángeles käkinimarisaj u q'ij, käkiya u q'ij, käkiya k'u maltioxinik che ri Jun ri t'uyul pa ri je'lalaj t'uyulib'al ri xaq tajin wi k'asal pa taq ri q'ij ri junab' ri kepetik, 10 are chi' kexuki ri juwinaq kiejeb' k'amal taq ki b'e ri kojonelab' chuwäch ri Jun ri k'o pa ri je'lalaj t'uyulib'al, käkesaj ri ki corona chuwäch ri t'uyulib'al, käkiq'ijilaj k'ut, käkib'ij: 11 Qajaw xuquje' qa Dios, taqalik chi känimarisax q'ij la, ronojel ri k'olik, xuquje' xeb'anik, —kecha ri e are'. *4:3 Konojel ri ab'aj ri keb'ix waral, e are' ab'aj wa' ri paqal kajil.
english
A Bangladeshi national, AKM Sufiul Anam, is among the five United Nations staff members who have been abducted in southern Yemen, family said. Sufiul Anam works as a UN security observer in Yemen. Another Bangladeshi top UN official told Prothom Alo, quoting the family. The top UN official talked to Sufiul Anam’s family on Sunday afternoon. He informed Prothom Alo about the development on behalf of Sufiul Anam’s family. According to a Reuters report, five UN staff have been abducted in southern Yemen while returning to Aden after a field mission, the UN said on Saturday. However, details of the staff abducted were not disclosed. Speaking to Prothom Alo, the UN official said Sufiul Anam is a former army officer and has been working at the UN for 20 years. He was with an UN security team in Yemen. The remaining four abductees are Yemen citizens. Quoting the family, the official said the UN is in regular contact with the family. The UN has collected medical prescriptions that Sufiul Anam requires. The family has been told that Sufiul Anam is in a good health and he has been taken hostage by a local group, the official added. The Bangladeshi top UN official said the wife of Sufiul Anam lives in Dhaka. The couple has a son and a daughter, both expatriates. Sufiul Anam, who is over 60, joined the UN 20 years ago and was likely to retire soon. Prothom Alo contacted an official of the security department at the UN office in Dhaka. Official declined comment. Russell Geekie, a spokesperson for the top UN official in Yemen, told Reuters the five staff were abducted on Friday in the Abyan governorate "The United Nations is in close contact with the authorities to secure their release," he said. Yemen has been mired in violence since the Iran-aligned Houthi movement ousted the government from the capital Sanaa in late 2014, prompting a military coalition led by Saudi Arabia to intervene months later. The war has killed tens of thousands of people and displaced millions others.
english
{ "name": "SoundEffect", "version": "0.0.1", "summary": "Sound Effect is a sample class for quickly incorporating sound effects in iOS, OS X and tvOS apps.", "homepage": "https://github.com/TheDarkCode/SoundEffect", "license": "MIT", "authors": { "<NAME>": "<EMAIL>" }, "source": { "git": "https://github.com/TheDarkCode/SoundEffect.git", "tag": "0.0.1" }, "social_media_url": "https://twitter.com/dryverless", "platforms": { "ios": "8.0" }, "requires_arc": true, "source_files": "Pod/Classes/**/*" }
json
Tamil Nadu crushed Vidarbha by 113 runs and stormed into the Super League of the Syed Mushtaq Ali Trophy cricket tournament on Sunday. Tamil Nadu topped Group-B with 20 points with its fifth win of the tournament. A close match appeared on the cards when Vidarbha restricted Tamil Nadu to a much lesser total than it threatened at the half-way stage of the innings. However, it turned out to be a no- contest in the end as the Tamil Nadu bowlers bundled out the Ranji Trophy champion for a paltry 55. Left-arm spinner R. Sai Kishore once again turned out to be Tamil Nadu’s hero with three wickets. Vijay Shankar made a significant contribution with his knock of 26 and three wickets. Captain Dinesh Karthik (58) and B. Aparajith (33) added 83 runs for the third wicket after openers M. Vijay and Washington Sundar were dismissed cheaply. The highlight of Tamil Nadu’s innings was Karthik’s excellent batting against Vidarbha’s spinners. Karthik mauled off-spinner Akshay Wakhare as Tamil Nadu raced to 93 for two at the end of 10 overs. However, Akshay Karnewar dismissed both Aparajith and Karthik in the 13th over to bring Vidarbha back into the match. TN lost its momentum but a few big hits from Vijay Shankar and Shahrukh Khan helped prop up the total. Sai Kishore varied his pace and lured the Vidarbha batsmen to their doom. Jitesh Sharma’s aggressive intent off Sai Kishore’s third ball ended in the hands of Vijay Shankar at long-on. The dismissal set the trend for the rest of the innings as the Vidarbha batsmen perished to poor shots. In his second spell Sai Kishore dismissed Karnewar to complete a resounding win for Tamil Nadu.
english
Main Vandan Karta Aaya Hu song is a Hindi devotional song from the Avighna Ganesh released on 2014. Music of Main Vandan Karta Aaya Hu song is composed by Madan Mohan Shankar. Main Vandan Karta Aaya Hu was sung by Madan Mohan Shankar. Download Main Vandan Karta Aaya Hu song from Avighna Ganesh on Raaga.com.
english
# Generated by Django 3.1.8 on 2021-06-21 13:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('speechdb', '0018_auto_20210621_0958'), ] operations = [ migrations.AddField( model_name='work', name='lang', field=models.CharField(choices=[('greek', 'Greek'), ('latin', 'Latin')], default='latin', max_length=8), preserve_default=False, ), ]
python
<reponame>yupferris/makeshift extern crate minifb; extern crate time; extern crate image; use minifb::{Key, Scale, WindowOptions, Window}; use image::{GenericImage, Pixel, Rgb}; use std::f64::consts::PI; use std::fs::File; use std::io::Write; fn main() { const WIDTH: usize = 320; const HEIGHT: usize = 200; let mut buffer = vec![0; WIDTH * HEIGHT].into_boxed_slice(); let mut window = Window::new( "BG stuff", WIDTH, HEIGHT, WindowOptions { borderless: false, title: true, resize: false, scale: Scale::X2, }).unwrap(); const CHAR_SIZE: usize = 8; const TILE_SIZE: usize = 16; let tile_image = image::open("brogicoma-thick.png").unwrap(); let mut palette = Vec::new(); // Force palette for easier ramps in the intro palette.push(Rgb { data: [255, 255, 255] }); palette.push(Rgb { data: [0, 0, 0] }); /*palette.push(Rgb { data: [64, 49, 141] }); palette.push(Rgb { data: [139, 63, 150] }); palette.push(Rgb { data: [103, 182, 189] }); palette.push(Rgb { data: [255, 255, 255] });*/ let mut tiles = Vec::new(); for y in 0..TILE_SIZE { let mut acc = 0; for x in 0..TILE_SIZE { let p = tile_image.get_pixel(x as _, y as _).to_rgb(); /*if !palette.contains(&p) { palette.push(p); }*/ let c = palette.iter().position(|x| x.data == p.data).unwrap() as u16; acc >>= 1; acc |= c << 15; } tiles.push((acc >> 8) as u8); tiles.push(acc as u8); } { let mut file = File::create("../tiles.bin").unwrap(); file.write(&tiles).unwrap(); } let mut charset = Vec::new(); for pos_y in 0..16 { for pos_x in 0..16 { let shift_x = pos_x & 0x0f; let shift_y = pos_y & 0x0f; for char_y in 0..CHAR_SIZE { let mut acc = 0; for char_x in 0..CHAR_SIZE { let offset_x = (char_x + shift_x) % TILE_SIZE; let offset_y = (char_y + shift_y) % TILE_SIZE; let tiles_index = ((offset_y as usize)) * 2; let tiles_row = ((tiles[tiles_index] as u16) << 8) | (tiles[tiles_index + 1] as u16); let tiles_row_shift = offset_x; let c = ((tiles_row >> tiles_row_shift) as u8) & 0x01; acc <<= 1; acc |= c; } charset.push(acc); } } } { let mut file = File::create("../charset.bin").unwrap(); file.write(&charset).unwrap(); } let mut dynamic_tab = Vec::new(); for i in 0..256 { let x = ((((i as f64) / 256.0 * 2.0 * 2.0 * PI).sin() * 31.0) as i32) + ((((((i + 40) as f64) / 256.0 * 3.0 * 2.0 * PI).sin() * 31.0) as i32) << 4); dynamic_tab.push(x as u8); } { let mut file = File::create("../dynamic-tab.bin").unwrap(); file.write(&dynamic_tab).unwrap(); } let start_time = time::precise_time_s(); while window.is_open() && !window.is_key_down(Key::Escape) { let time = time::precise_time_s() - start_time; // Simulate 50fps by quantizing to 20ms intervals let frame_index = (time / 0.020) as i32; for tile_y in 0..(HEIGHT / CHAR_SIZE) as i32 { for tile_x in 0..(WIDTH / CHAR_SIZE) as i32 { let constant = (tile_x * 8 + ((tile_y * 8) << 4)) as u8; let dynamic_index = (frame_index + ((tile_x / 2 + tile_y) & 0xff)) & 0xff; let dynamic = dynamic_tab[dynamic_index as usize]; let char_index = constant + dynamic; let char_offset = (char_index as usize) * 8; for y in 0..CHAR_SIZE { for x in 0..CHAR_SIZE { let c = (charset[char_offset + y] >> (7 - x)) & 0x01; let color = palette[c as usize]; buffer[((tile_y * (CHAR_SIZE as i32) + (y as i32)) * (WIDTH as i32) + tile_x * (CHAR_SIZE as i32) + (x as i32)) as usize] = 0xff000000 | ((color.data[0] as u32) << 16) | ((color.data[1] as u32) << 8) | (color.data[2] as u32); } } } } window.update_with_buffer(&buffer); } println!("Hello, world!"); }
rust
package com.chain.project.config; import com.chain.utils.FileDirectoryUtils; import com.chain.utils.RandomStringUtils; import com.chain.utils.crypto.CryptoFactoryBean; import com.chain.project.common.converter.ObjectToJsonStringConverter; import com.chain.project.common.converter.StringToJsonMapConverter; import com.chain.project.common.exception.ChainProjectRuntimeException; import com.chain.project.common.formatter.CarServerDateFormatter; import com.chain.project.common.intercepter.JsonStringInterceptor; import com.chain.project.common.intercepter.MeasurementInterceptor; import com.chain.project.common.intercepter.MonitorRequestInterceptor; import com.chain.project.common.utils.ChainProjectUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.converter.Converter; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.format.Formatter; import org.springframework.format.FormatterRegistry; import org.springframework.format.support.FormattingConversionServiceFactoryBean; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.validation.MessageCodesResolver; import org.springframework.validation.Validator; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodReturnValueHandler; import org.springframework.web.servlet.HandlerExceptionResolver; import org.springframework.web.servlet.config.annotation.*; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Date; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @Configuration //一个web项目,最重要的就是Mvc相关的控制 //这里启用WebMvcConfigurer的自定义配置,即不使用WebMvcAutoConfiguration @EnableWebMvc @AutoConfigureAfter({WebConfig.class}) public class MvcConfig implements WebMvcConfigurer { private Logger logger = LoggerFactory.getLogger(MvcConfig.class); @Bean public AppConfig appConfig() { return new AppConfig(); } @Override public void configurePathMatch(PathMatchConfigurer pathMatchConfigurer) { } @Override public void configureContentNegotiation(ContentNegotiationConfigurer contentNegotiationConfigurer) { } @Override public void configureAsyncSupport(AsyncSupportConfigurer asyncSupportConfigurer) { } @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer defaultServletHandlerConfigurer) { // defaultServletHandlerConfigurer.enable(); } @Override public void addFormatters(FormatterRegistry formatterRegistry) { formatterRegistry.addConverter(stringToJsonMapConverter()); } @Override public void addInterceptors(InterceptorRegistry registry) { logger.info("add interceptors"); //注意是有先后顺序的 //MonitorRequestInterceptor自定义拦截器 registry.addInterceptor(monitorRequestInterceptor()).addPathPatterns("/**"); //MeasurementInterceptor自定义拦截器 registry.addInterceptor(measurementInterceptor()).addPathPatterns("/**"); //JsonStringInterceptor自定义拦截器 registry.addInterceptor(jsonStringInterceptor()).addPathPatterns("/**"); } @Bean public MonitorRequestInterceptor monitorRequestInterceptor() { return new MonitorRequestInterceptor(); } @Bean public MeasurementInterceptor measurementInterceptor() { return new MeasurementInterceptor(); } @Override public void addResourceHandlers(ResourceHandlerRegistry resourceHandlerRegistry) { } @Override public void addCorsMappings(CorsRegistry corsRegistry) { } @Override public void addViewControllers(ViewControllerRegistry viewControllerRegistry) { } @Override public void configureViewResolvers(ViewResolverRegistry viewResolverRegistry) { } @Override public void addArgumentResolvers(List<HandlerMethodArgumentResolver> list) { } @Override public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> list) { } //拦截器的加载再contextLoader之前,所以需要先获取bean @Bean public JsonStringInterceptor jsonStringInterceptor() { return new JsonStringInterceptor(); } @Override public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { } @Override public void extendMessageConverters(List<HttpMessageConverter<?>> converters) { logger.info("extendMessageConverters"); for (int i = 0; i < converters.size(); i++) { HttpMessageConverter<?> httpMessageConverter = converters.get(i); if (httpMessageConverter.getClass().equals(MappingJackson2HttpMessageConverter.class)) { converters.set(i, objectToJsonStringConverter()); } } } @Override public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> list) { } @Override public void extendHandlerExceptionResolvers(List<HandlerExceptionResolver> list) { } @Override public Validator getValidator() { return null; } @Override public MessageCodesResolver getMessageCodesResolver() { return null; } @Bean public ObjectToJsonStringConverter objectToJsonStringConverter() { return new ObjectToJsonStringConverter(); } @Bean(name = "conversionService") public ConversionService conversionService() { logger.info("create bean conversionService"); FormattingConversionServiceFactoryBean conversionServiceFactoryBean = new FormattingConversionServiceFactoryBean(); Set<Converter> converters = new LinkedHashSet<>(); Set<Formatter> formatters = new LinkedHashSet<>(); converters.add(stringToJsonMapConverter()); conversionServiceFactoryBean.setConverters(converters); formatters.add(carServerDateFormatter()); conversionServiceFactoryBean.setFormatters(formatters); return conversionServiceFactoryBean.getObject(); } @Bean public CarServerDateFormatter carServerDateFormatter() { return new CarServerDateFormatter(); } @Bean public StringToJsonMapConverter stringToJsonMapConverter() { return new StringToJsonMapConverter(); } @Bean public CryptoFactoryBean cryptoFactoryBean() { logger.info("create cryptoFactoryBean"); AppConfig appConfig = appConfig(); CryptoFactoryBean cryptoFactoryBean = new CryptoFactoryBean(); String rsaPublicKeyFile = appConfig.getProperty("app.crypto.rsa-public-key"); String rsaPrivateKeyFile = appConfig.getProperty("app.crypto.rsa-private-key"); String desFirstKeyFile = appConfig.getProperty("app.crypto.des-first-key"); String desSecondKeyFile = appConfig.getProperty("app.crypto.des-second-key"); String desThirdKeyFile = appConfig.getProperty("app.crypto.des-third-key"); String aesKeyFile = appConfig.getProperty("app.crypto.aes-key"); String aesIvFile = appConfig.getProperty("app.crypto.aes-iv-key"); String CLASS_PATH_STRING = "classpath:"; String CLASS_PATH2_STRING = "classpath*:"; if (!ChainProjectUtils.isEmpty(rsaPublicKeyFile) && !ChainProjectUtils.isEmpty(rsaPrivateKeyFile)) { rsaPublicKeyFile = getFilePath(rsaPublicKeyFile, CLASS_PATH_STRING, CLASS_PATH2_STRING); rsaPrivateKeyFile = getFilePath(rsaPrivateKeyFile, CLASS_PATH_STRING, CLASS_PATH2_STRING); cryptoFactoryBean.setRsaPublicKeyFilePath(rsaPublicKeyFile); cryptoFactoryBean.setRsaPrivateKeyFilePath(rsaPrivateKeyFile); } if (!ChainProjectUtils.isEmpty(desFirstKeyFile) && !ChainProjectUtils.isEmpty(desSecondKeyFile) && !ChainProjectUtils.isEmpty(desThirdKeyFile)) { desFirstKeyFile = getFilePath(desFirstKeyFile, CLASS_PATH_STRING, CLASS_PATH2_STRING); desSecondKeyFile = getFilePath(desSecondKeyFile, CLASS_PATH_STRING, CLASS_PATH2_STRING); desThirdKeyFile = getFilePath(desThirdKeyFile, CLASS_PATH_STRING, CLASS_PATH2_STRING); cryptoFactoryBean.setDesFirstKeyFilePath(desFirstKeyFile); cryptoFactoryBean.setDesSecondKeyFilePath(desSecondKeyFile); cryptoFactoryBean.setDesThirdKeyFilePath(desThirdKeyFile); } if (!ChainProjectUtils.isEmpty(aesKeyFile) && !ChainProjectUtils.isEmpty(aesIvFile)) { aesKeyFile = getFilePath(aesKeyFile, CLASS_PATH_STRING, CLASS_PATH2_STRING); aesIvFile = getFilePath(aesIvFile, CLASS_PATH_STRING, CLASS_PATH2_STRING); cryptoFactoryBean.setAesKeyFilePath(aesKeyFile); cryptoFactoryBean.setAesIvFilePath(aesIvFile); } return cryptoFactoryBean; } private String getFilePath(String s, String CLASS_PATH_STRING, String CLASS_PATH2_STRING) { String classpath = null; if (s.startsWith(CLASS_PATH_STRING) || s.startsWith(CLASS_PATH2_STRING)) { //将jar包内的文件写到jar包外,才能获取到文件的路径 s = s.replaceAll(CLASS_PATH_STRING, ""); s = writeFileIntoTempDir(s); } return s; } private String writeFileIntoTempDir(String s) { ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); //写在jar包外,以便读取 FileOutputStream os = null; InputStream in = null; try { File logs = new File("logs" + File.separator + "temp"); if (logs.exists() && logs.isDirectory()) { long lastModified = logs.lastModified(); long nowtime = new Date().getTime(); //10分钟 if (nowtime - lastModified > 1000 * 60 * 10) FileDirectoryUtils.emptyDirectory(logs); } if (!logs.exists()) { logs.mkdirs(); } boolean isJar = false; //非Jar内,常规读取 in = this.getClass().getClassLoader().getResourceAsStream(File.separator + s); if (in == null) { //Jar内,让Spring来读取 in = resolver.getResource(File.separator + s).getInputStream(); isJar = true; } if (isJar) { File f = new File("logs" + File.separator + "temp" + File.separator + RandomStringUtils.generateString(10)); os = new FileOutputStream(f); byte[] buf = new byte[8 * 1024]; int len = -1; while ((len = in.read(buf)) != -1) { os.write(buf, 0, len); } os.flush(); s = f.getAbsolutePath(); } else { Resource res = resolver.getResource(File.separator + s); s = res.getFile().getAbsolutePath(); } } catch (IOException e) { logger.error("!!! *** IO EXCEPTION, please check if this program has " + "the permission to write or read on disk at your system *** !!!"); throw new ChainProjectRuntimeException(e); } finally { if (in != null) try { in.close(); } catch (IOException e) { logger.error("io exception", e); } if (os != null) { try { os.close(); } catch (IOException e) { logger.error("io exception", e); } } } return s; } }
java
# Install/Start To install this project you need to run: ``` make install ``` And to start the project you need to run ``` make start ```
markdown