text
stringlengths
1
1.04M
language
stringclasses
25 values
The chief minister said his government has no problem with a floor test after the BJP urged the governor to convene a special session of the Assembly. Madhya Pradesh Chief Minister Kamal Nath on Monday agreed to the Bharatiya Janata Party’s demand for a floor test in the Assembly after the saffron party claimed that the Congress government was now in minority. The BJP requested Madhya Pradesh Governor Anandiben Patel to convene a special session of the Assembly to discuss pressing issues, Hindustan Times reported. News reports claimed that the BJP would ask the Congress government to prove its majority. Leader of the Opposition Gopal Bhargava told ANI that the state government would collapse on its own. “I do not believe in horse-trading, but I feel its [end to Congress administration] time has come and it will have to go soon,” he added. News agency PTI quoted Bhargava as saying that the saffron party wants to test the government’s strength. Meanwhile, the Congress accused the BJP of attempting to destabilise the government with “corrupt practices”, PTI reported. “They are trying to negate the mandate of people of Madhya Pradesh given in favour of the Congress in the Assembly elections held a few months ago and people will not forgive them for this,” said Deepak Babariya, Congress general secretary in charge of the party’s affairs in Madhya Pradesh. Babariya claimed that the BJP had lost the Assembly election in December because of its maladministration. The Congress was two short of a majority after the election, but formed the government with the help of Mayawati’s Bahujan Samaj Party and the Samajwadi Party. The Congress has 114 legislators in the 230-member Assembly, while the BSP has two and the Samajwadi Party one. The BJP has 109 MLAs. Madhya Pradesh was one of the three BJP-ruled states that the Congress managed to win last year. The party replaced the BJP and formed the government in Rajasthan and Chhattisgarh as well. However, Mayawati threatened to withdraw support to the Madhya Pradesh government in April after her candidate from Guna Lok Sabha seat joined the Congress. “The Congress will have to pay a heavy price for this when time comes,” she had said.
english
Alongside "Oppenheimer," Peacock will also offer a collection of Nolan-directed films available for streaming starting February 1. These films include "Batman Begins," "The Dark Knight," "The Dark Knight Rises," "Dunkirk," "Inception," and "Memento." 'Tiger 3' follows the success of its theatrical release, earning a worldwide box office collection of Rs 464 crore. The movie, which also stars Emraan Hashmi, features special appearances by Shah Rukh Khan and Hrithik Roshan. Tiger 3 OTT Release Date: The third installment of the Tiger franchise has captured the audience's attention worldwide. The latest buzz surrounding the film indicates a shift from the silver screen to the digital realm, as 'Tiger 3' is reportedly set to premiere on a OTT platform in mid-December. However, there is no official confirmation about the same.
english
Q: Who is the music director of Shamshera? A: The music of Shamshera has been composed by Mithoon. Q: Who is the lyricist of Shamshera? A: The lyricist of Shamshera is Mithoon,Karan Malhotra,Piyush Mishra. Q: Who are the singers of Shamshera? A: No Data Found.. Q: How many songs does the album Shamshera have? A: There are a total of 6 songs in Shamshera.
english
public class TwoDTester { public static void main(String[] args) { Integer[][] firstArray = {{2,3}, {3,4}, {4,5}}; Integer[][] secondArray = {{2,3}, {3,4}, {4,5}}; TwoDArray first = new TwoDArray(firstArray); System.out.println(first.equals(secondArray)); String[][] thirdArray = {{"Hello", "Goodbye"}, {"Hola", "Adios"}, {"Bonjour", "Au revoir"}}; String[][] fourthArray = {{"Hello", "Goodbye"}, {"Ciao", "Addio"}, {"Bonjour", "Au revoir"}}; TwoDArray third = new TwoDArray(thirdArray); System.out.println(third.equals(fourthArray)); } }
java
<reponame>lemkova/Yorozuya<filename>library/ATF/_qry_case_update_guildmaster.hpp // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> START_ATF_NAMESPACE #pragma pack(push, 4) struct _qry_case_update_guildmaster { unsigned int in_guildserial; unsigned int tmp_guildindex; unsigned int in_guild_prev_masterSerial; char in_guild_prev_masterPrevGrade; unsigned int in_guild_new_masterSerial; char in_guild_new_masterPrevGrade; public: int size(); }; #pragma pack(pop) static_assert(ATF::checkSize<_qry_case_update_guildmaster, 24>(), "_qry_case_update_guildmaster"); END_ATF_NAMESPACE
cpp
<filename>resources/il/tel-aviv-university.json {"name":"<NAME>","alt_name":"Universitat Tel Aviv","country":"Israel","state":null,"address":{"street":"POB 39040","city":"Ramat-Aviv","province":null,"postal_code":"69978"},"contact":{"telephone":"+972(3) 6408-111","website":"http:\/\/www.tau.ac.il","email":"<EMAIL>","fax":"+972(3) 6407-174"},"funding":"Public","languages":null,"academic_year":"October to June (October-January; March-June)","accrediting_agency":"Council for Higher Education"}
json
<table class="table small table-striped"> <caption> Sample HTML content for the Caelum prototype </caption> <thead class="table-primary"> <tr> <th>File</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>Default.master</td> <td>Default master page for the site</td> </tr> <tr> <td>Default.aspx</td> <td>Site home page</td> </tr> <tr> <td>blog\jjameson\BlogPost.master</td> <td>Master page used for viewing individual blog posts</td> </tr> <tr> <td>blog\jjameson\Default.aspx</td> <td>Blog home page</td> </tr> <tr> <td>blog\jjameson\archive\2011\08\22\leaving-microsoft.aspx</td> <td>Sample post</td> </tr> <tr> <td>blog\jjameson\archive\2011\09\02\last-day-with-microsoft.aspx</td> <td>Sample post</td> </tr> <tr> <td>blog\jjameson\archive\2011\09\02\new-blog-location.aspx</td> <td>Sample post</td> </tr> </tbody> </table>
html
Adani Group is one the most famous business conglomerates in the current times. The reason behind the same is their rapid expansion and multiple business acquisitions in a small period of time. The wealth increase for the shareholders, promoters etc. for Adani’s public companies has been stellar. The increase in wealth is so outraging that it has made Gautam Adani the third richest person in the world leaving Jeff Bezos and Elon Musk ahead of him. The recent acquisition that has been into highlights is regarding the NDTV media. The NDTV company has been caught into a deal that it made a decade back and currently has no legal leg to support the majority stake of promoters in the company. In other words the company is facing the issue of a hostile takeover. For understanding the scenario let’s go back in the past. The entire scenario goes back to 2008. In 2008 VCPL was established. VCPL or Vishva Pradhan Commercial Private Limited was set up as a consultancy firm. The company was set up with no assets or income of its own. The entire capital was an unsecured loan from another company named Shinano retail. Now Shinano retail is funded via an unsecured loan through Mukesh Ambani held reliance group of Industries. In 2009 the promoters of NDTV, Pranay Roy and Radhika Roy transferred a part of their stake to RRPR. RRPR is Radhika Roy Pranay Roy Group. So from 55% stake in NDTV the stake of 29.18% was transferred to RRPR. RRPR group is a company through which VCPL gave loans for 403.85 Crore Rs to NDTV. The loan given was interest free but in return the shares transferred to RRPR were kept as a warrant which can be converted into equity shares. Thus VCPL can acquire the stake of 29.18% lying with RRPR if it wanted to in future course of time. In 2012 Shinano company relinquished its stake to two entities associated with Mahendra Nahata who is currently a director at Jio. Thus Nahata is closely associated with the Ambanis and Reliance Group. Thus now VCPL is the main company with whom the warrants are lying. In 2022 Adani group acquired VCPL. The company took control of VCPL through its media arm AGM Media networks Limited. With immediate effect they took control over its warrants and converted them to equity shares. With a surprise the valuation of the stake sold was close to 113 Crore Rs. This is a great discount price to the current share price of NDTV. With such a takeover the NDTV group reported that Adani group did not take the company’s consent before converting the warrants to shares. With such a conversion the Adani group made an announcement of an open offer for another 26% stake in the company. This would make the Adani company a major promoter in the NDTV Channel. The offer made by Adani group is of 294 Rs per share at a discount of more than 40% than the current share price. Post the takeover major critics have said that this takeover will result in an improper influence over the transparency of news for the public. The Adani group has been currently working into major sectors and this control will result in an unfair advantage for the company to hide its bad affairs from the public. The current media sector results show that NDTV is the third largest media company in India behind Reliance owned Network 18 and TV18. These rankings are based on the market capitalisation of the companies. Thus it is feared that the undue influence of corporations on the media companies will result in unfair trade practices in Indian Democracy. The Rankings based on the market capitalisation are : Since the news for the takeover has been in public the share prices of NDTV have rocketed by almost 250 Rs in 15 trading sessions. With the news the share has given a 600% return in one year time period. The share price of NDTV was at 77 Rs in September 2021. The current price for the same is 518 Rs. The high posted by the share was almost 546 Rs. Thus the investors have made a stellar 600% gains since the last 1 year. However attractive the prices are, Adani’s open offer places a serious question in the minds of investors. The open offer will get active in mid October and will conclude by 1st November. The price is 294 Rs per share. The promoters of NDTV are in a fierce battle with the 3rd richest man in the world to keep power and the fate of their company.
english
import React, {useEffect} from 'react' import { useSelector, useDispatch } from 'react-redux' import { getPosts } from './postsSlice' const Posts = () => { // const posts = useSelector((state) => state.posts.entities); const dispatch = useDispatch(); const posts = useSelector((state) => state.posts); useEffect (() => { dispatch(getPosts()); }, [dispatch]); return ( <div> <h2>Posts Components</h2> <h4>{posts.status}</h4> {posts.status === 'loading' ? (<h6>Loading</h6>) : posts.status === 'failed' ? (<h6>Error in Loading</h6>) : ( <ul> {posts.entities.map(item => ( <li key={item.id} className="list-inline"> <span>{item.id}</span>: <span>{item.title}</span> </li> ))} </ul> ) } </div> ) } export default Posts; // ({posts.entities.map(item => (<p>{item.title}</p>))}) // <div>{posts.status === 'loading' ? 'Loading: {{posts.status}}' : 'Loaded: {{posts.status}}'}</div>
javascript
package com.example.shoppingcart.service.mapper; import com.example.shoppingcart.domain.Item; import com.example.shoppingcart.service.model.ItemDto; import org.mapstruct.Mapper; import org.springframework.stereotype.Component; import java.util.Collection; import java.util.List; /** * @author Arman * Date: 4/3/21 * Time: 7:13 PM **/ @Mapper(componentModel = "spring") @Component public interface ItemMapper { ItemDto map(Item item); Item map(ItemDto item); List<ItemDto> mapItems(Collection<Item> items); List<Item> mapItemsDto(Collection<ItemDto> items); }
java
{"WeHaveThoseToo": ["FishOutOfWater", "TruthInTelevision", "TechnologyLevels", "CallARabbitASmeerp", "NotRareOverThere", "WorthlessYellowRocks", "RunningGag", "FaceFault", "BlackKnight", "SarcasmMode", "TruthInTelevision", "GargleBlaster", "TruthInTelevision", "RiddlefortheAges", "GoMadFromTheRevelation", "SmugSnake", "RuleOfThree", "SufficientlyAdvancedAliens", "SmugSnake", "UnusualEuphemism", "CouldntFindALighter", "TotemPoleTrench", "TimeTravel", "UnusualEuphemism", "CouldntFindALighter"]}
json
<filename>src/modules/user/useCases/UpdateProfileUser/IUpdateProfileUserDTO.ts interface IProfileUpdateUserDTO { name: string email: string current_password: string owner_id: string } export { IProfileUpdateUserDTO }
typescript
Amit Shah remembers Ahilyabai Holkar on her 297th birth anniversary for service to 'Sanatan Dharma' Union Home Minister Amit Shah on Tuesday remembered the warrior queen of the Maratha empire, Ahilyabai Holkar on her 297th birth anniversary for her service to 'Sanatan Dharma' by renovating many temples from Somnath to Kashi. Union Home Minister Amit Shah on Tuesday remembered the warrior queen of the Maratha empire, Ahilyabai Holkar on her 297th birth anniversary for her service to 'Sanatan Dharma' by renovating many temples from Somnath to Kashi. "There is an incomparable contribution of Lokmata Ahilyabai Holkar ji in the preservation of Sanatan culture," the Home Minister said in a tweet. "She did a wonderful service to 'Sanatan Dharma' by renovating many temples from Somnath to Kashi. As a 'Prajavatsal' ruler, she also set many excellent examples of women empowerment and public welfare," Shah tweeted in Hindi. Maharani Ahilyabai Holkar was born on May 31, 1725, in the village of Chaundi (current day Ahmednagar), Maharashtra. Today marks the 297th birth anniversary of the Queen, regarded as one of the finest female rulers in Indian history. She was known for her wisdom and administrative skills. Every year, her birth anniversary is celebrated on May 31st. As a prominent ruler of the Malwa kingdom, Ahilyabai Holkar spread the message of 'dharma', promoted industrialization, and built many Hindu temples and Dharamshalas across India. Her father, Mankoji Sindhia (Shinde), a scion of the Dhangar family, was the Patil of the Village. At a time when women were not allowed to go to school, Ahilyabai Holkar's father taught her to read and write. On his way to Pune, Malhar Rao Holkar, a commander of Peshwa Balaji Baji Rao in the Malwa territory, spotted an eight-year-old Ahilyabai at a temple service feeding the hungry and poor. Impressed by her, he married his son Khanderao to her in 1733. In 1748, she broke societal norms by marrying her daughter to Yashwantrao - a poor but a brave man. Ahilyabai ruled for nearly three decades and was given the title of 'The Philosopher Queen' by a British historian John Keyas. The warrior queen passed away on August 13, 1795, at the age of 70 in Rameswaram. ( With inputs from ANI )
english
{"title":"浜風と磯風の爆乳Hai Phut Hon18歳以上!","author":"mikuline39","description":"浜風と磯風のおっぱい動画です。<br>普通サイズ寄りのおっぱいはFantiaで<br>Twitterundefined<aundefinedhref='https://twitter.com/mikuline39'>https://twitter.com/mikuline39</a><br>Fantiaundefined<aundefinedhref='http://fantia.jp/mikuline39'>http://fantia.jp/mikuline39</a>","thumb":"//i.iwara.tv/sites/default/files/styles/thumbnail/public/videos/thumbnails/2227988/thumbnail-2227988_0006.jpg?itok=YupRb-bk","download":"https://ecchi.iwara.tv/api/video/ekrjrimvmgfmzmm1w","origin":"https://ecchi.iwara.tv/videos/ekrjrimvmgfmzmm1w"}
json
In a recent poll that asked AI to predict who will break Aaron Judge's record of 62 home runs in a regular MLB season, the computer program named new Los Angeles Dodgers star Shohei Ohtani second on the list. In a question asked to artificial intelligence about the next MLB player to break Judge's home run record, it named Juan Soto first, closely followed by Ohtani. This has left Dodgers fans delighted as they too believe that their new Japanese is more than capable of breaking the record if he sticks to one side of the ball. Aaron Judge had a record-breaking campaign in 2022 when he broke the single-season home run record of 61 home runs set by Roger Maris in the 1961 MLB season. He has since been considered among the greatest sluggers the game has ever seen and the world is eager to see who will be the next player to top it. According to a recent question put forward to artificial intelligence technology, Judge's home run record of 62 home runs in a single regular season is most likely to be beaten by Juan Soto or Shohei Ohtani. While Soto has already signed for the Yankees with one year remaining on his contract, Ohtani has signed a 10-year deal with the Dodgers. This is cause for celebration for Los Angeles fans as without him risking injuries through pitching, Ohtani is well placed to break the standing record set by Judge. New York Yankees captain Aaron Judge ran into New York Giants quarterback Tommy Devito during dinner recently and picked up the youngster's tab for the night. This left the 25-year-old quarterback in awe and asking, "This guy knows who I am?' Judge is a hero to almost every athlete in the US and even more so to a young NFL star who is still making a name for himself in the big league. Hence, it is no wonder that DeVito was left starstruck by Judge's classy act ahead during the holiday season in New York. Click here for 2023 MLB Free Agency Tracker Updates. Follow Sportskeeda for latest news and updates on MLB.
english
package ASTNodes; import ASTNodes.Interfaces.SymbolTableCreatable; import SymbolTables.SymbolTable; import java.util.Vector; public class Repeat implements SymbolTableCreatable { public Block block; public Expr expr; public Repeat(Block block, Expr expr) { this.block = block; this.expr = expr; } @Override public void createSymbolTable(Vector<SymbolTable> symbolTableVector) { } }
java
import math import os import re import numpy as np from BluPrintTriboSys import TriboSys from Constants import PltOpts, SubDir, TexTempl, UnitTex, Unit, PrintOpts, \ PreSol from cartesian_plot_functions import plt_profile, plt_contact, plt_3d, \ plt_2d_scatt_line, \ plt_energy_ring_on_ring, plt_profile_approx from generate_latex_output import get_calc_specific_latex_template from hertz_equations import hertz_displ from influ_matrix_management import load_influ_mat, cache_influ_mat from solve_half_space import solve_half_space, pre_solve_half_space from system_functions import print_it, to_preci, exit_program, save_to_matlab class RingOnRing(TriboSys): """Global tribosystem data""" def __init__(self, num_planets, sun, planet, global_force, setup_name='ring-on-ring'): super().__init__(setup_name, global_force, None) self.num_planets = num_planets self.sun = sun self.planet = planet self.sun.norm_forces = None self.init_force = None self.planet_slip = None self.rot_velocity = None self.rot_velocity2 = None self.sun_rot_vel = None self.planet_rot_vel = None self.sliding_vel = None self.sun.press = None self.sun.max_press = None self.sun.rot_vel = None self.planet.rot_vel = None self.sun.omega = None self.planet.omega = None self.sun.vel = None self.planet.vel = None self.slip = None self.rel_vel = None self.pv = None self.influ_mat_db_1 = None self.press_zone_len = None def calc_load_distribution(self, ui=None, res_dir=None): """Calculate load distribution""" print_it("calculating load distribution") self.sun.norm_forces = np.multiply(np.ones(self.num_planets), self.global_force / self.num_planets) self.init_force = self.global_force def get_grid_size(self, ui, res_dir): """Determine grid size by running (quick) simulation with simplified contact bodies""" print_it('determining grid size', PrintOpts.lvl1.value) self.sun.simple_clone() self.sun.clone.make_profile(PreSol.res_x.value, PreSol.res_y.value, self.init_force) self.planet.simple_clone() self.planet.clone.make_slave_to(self.sun.clone) init_displ = hertz_displ(self.sun.clone.e, self.planet.e, self.sun.clone.ny, self.planet.ny, self.sun.clone.r_hertz_x, self.sun.clone.r_hertz_y, self.planet.clone.r_hertz_x, self.planet.clone.r_hertz_y, self.sun.norm_forces[0]) too_many_els_in_y = 1 too_many_els_in_x = 1 contact_width_y = 0.05 contact_width_x = 0.05 while too_many_els_in_y != 0 or \ too_many_els_in_x != 0: self.sun.clone.make_profile(self.sun.clone.res_x, self.sun.clone.res_y, self.init_force, contact_width=contact_width_y, contact_length=contact_width_x) self.planet.clone.make_slave_to(self.sun.clone) pressure, init_displ = \ pre_solve_half_space(self.sun.clone.profile, self.planet.clone.profile, self.sun.clone.x_axis, self.sun.clone.y_axis, self.sun.clone.res_x, self.sun.clone.res_y, self.sun.clone.delta_x, self.sun.clone.delta_y, self.sun.clone.e, self.planet.clone.e, self.sun.clone.ny, self.planet.clone.ny, self.sun.norm_forces[0], init_displ=init_displ, print_prog=False) pressure_els_y = sum( pressure[math.floor(self.sun.clone.res_y / 2), :] > 0) too_many_els_in_y = self.sun.clone.res_y - pressure_els_y - 2 if too_many_els_in_y: contact_width_y += -np.sign( too_many_els_in_y) * contact_width_y / 25 pressure_els_x = sum( pressure[:, math.floor(self.sun.clone.res_x / 2)] > 0) too_many_els_in_x = self.sun.clone.res_x - pressure_els_x - 2 if too_many_els_in_x: contact_width_x += -np.sign( too_many_els_in_x) * contact_width_x / 25 self.sun.make_profile(self.sun.res_x, self.sun.res_y, self.init_force, contact_width=contact_width_y, contact_length=contact_width_x) self.planet.make_slave_to(self.sun) return init_displ def calc_contact_pressure(self, ui=None, res_dir=None): """Calculate contact pressure distribution between sun and planet ring(s)""" print_it('calculating 1 pressure distribution') init_displ = self.get_grid_size(ui, res_dir) [self.influ_mat_db_1] = load_influ_mat(ui, res_dir, 1) print_it('solving first half space', PrintOpts.lvl1.value) self.sun.press, self.influ_mat_db_1 = \ solve_half_space(self.sun.profile, self.planet.profile, self.sun.x_axis, self.sun.y_axis, self.sun.res_x, self.sun.res_y, self.sun.delta_x, self.sun.delta_y, self.sun.e, self.planet.e, self.sun.ny, self.planet.ny, self.sun.norm_forces[0], res_dir, init_displ=init_displ, influ_mat_db=self.influ_mat_db_1) cache_influ_mat(ui, [self.influ_mat_db_1], res_dir) self.sun.max_press = np.amax(self.sun.press, axis=1) dat_dict = dict(x_axis=self.sun.x_axis, y_axis=self.sun.y_axis, contact_pressure=self.sun.press) save_to_matlab(dat_dict, res_dir, 'pressure_field') def calc_kinematics(self, rot_vel1, rot_vel2, ui=None, res_dir=None): """Calculate tribosystem kinematics based on rotational velocities of sun and planet(s)""" print_it("calculating kinematics") self.sun.rot_vel = rot_vel1 self.planet.rot_vel = rot_vel2 self.sun.omega = self.sun.rot_vel / 60 self.planet.omega = self.planet.rot_vel / 60 self.sun.vel = self.sun.diameter * math.pi * self.sun.omega self.planet.vel = self.planet.diameter * math.pi * self.planet.omega self.slip = (self.sun.vel - self.planet.vel) / self.sun.vel self.rel_vel = np.ones(self.sun.res_x) * ( self.sun.vel - self.planet.vel) self.sun.footpr_vel = \ 2 * math.pi * self.sun.diameter / 2 * self.sun.omega self.planet.footpr_vel = \ 2 * math.pi * self.planet.diameter / 2 * self.planet.omega try: self.sun.overroll_t_incr = self.sun.delta_y / self.sun.footpr_vel self.planet.overroll_t_incr = \ self.planet.delta_y / self.planet.footpr_vel except ZeroDivisionError: exit_program( 'rotational velocities of sun and planet must not be 0') self.press_zone_len = (self.sun.press > 0).sum(1) * self.sun.delta_y self.sun.overroll_t = np.divide(self.press_zone_len, self.sun.footpr_vel) self.planet.overroll_t = np.divide(self.press_zone_len, self.planet.footpr_vel) self.sun.no_overroll_t = np.divide( (2 * math.pi * (self.sun.diameter / 2) - self.num_planets * self.press_zone_len) / self.num_planets, self.sun.footpr_vel) self.planet.no_overroll_t = np.divide( (2 * math.pi * (self.planet.diameter / 2) - self.press_zone_len), self.planet.footpr_vel) def calc_pv(self, ui=None, res_dir=None): """Calculate product of local maximum pressure and local maximum relative velocity""" print_it("calculating pv_rel") self.pv = np.multiply(abs(self.rel_vel), self.sun.max_press) / 1000 dat_dict = dict(x_axis=self.sun.x_axis, pv_rel=self.pv) save_to_matlab(dat_dict, res_dir, 'pv-rel') def calc_e_akin(self, ui=None, res_dir=None): """"Calculate the kinetic friction energy accumulation in W per m^2""" print_it("calculating e_a,kin") pv_local = np.multiply(self.sun.press.sum(1), self.rel_vel) self.sun.e_akin = np.absolute( np.divide(np.multiply(pv_local, self.sun.overroll_t_incr), self.sun.no_overroll_t)) / 1000 self.planet.e_akin = np.absolute( np.divide(np.multiply(pv_local, self.planet.overroll_t_incr), self.planet.no_overroll_t)) / 1000 def plot_it(self, ui=None, res_dir=None): """Orchestrate output plot generation""" print_it("plotting results") plt_profile(self.sun, PltOpts.DD.value, res_dir, SubDir.profiles.value) plt_profile(self.sun, PltOpts.DDD.value, res_dir, SubDir.profiles.value) plt_profile(self.planet, PltOpts.DD.value, res_dir, SubDir.profiles.value) plt_profile(self.planet, PltOpts.DDD.value, res_dir, SubDir.profiles.value) plt_profile_approx(res_dir, SubDir.profiles.value) plt_contact(self.sun, self.planet, PltOpts.DD.value, res_dir, SubDir.contacts.value) plt_contact(self.sun, self.planet, PltOpts.DDD.value, res_dir, SubDir.contacts.value) plt_3d(self.sun.x_axis, self.sun.y_axis, self.sun.press, self.sun.x_label, self.sun.y_label, 'pressure in MPa', 'contact_pressure_sun', res_dir, SubDir.pressures.value, 'contact_pressure_sun') plt_2d_scatt_line(self.sun.x_axis, self.pv, self.sun.x_axis, self.pv, self.sun.x_label, 'pv_rel in {}'.format(Unit.pvrel.value), 'pv_rel', res_dir, SubDir.energy.value, 'pv_rel') plt_2d_scatt_line(self.sun.x_axis, self.sun.e_akin, self.sun.x_axis, self.sun.e_akin, self.sun.x_label, 'e_akin in {}'.format(Unit.eakin.value), 'e_akin', res_dir, SubDir.energy.value, 'sun.e_akin') plt_2d_scatt_line(self.planet.x_axis, self.planet.e_akin, self.planet.x_axis, self.planet.e_akin, self.planet.x_label, 'e_akin in {}'.format(Unit.eakin.value), 'e_akin', res_dir, SubDir.energy.value, 'planet.e_akin') plt_energy_ring_on_ring(self, res_dir, SubDir.energy.value, 'e-akin-vs-pv-rel') def generate_latex_output(self, calc_spec_tex_file_handle, sim, ui=None, res_dir=None): """Generate calculation-specific part of the LaTeX output file""" average_pressure = np.mean(self.sun.press[self.sun.press > 0]) numeric_output_data = [ ('pressure, max.', to_preci(np.amax(self.sun.press), 4), UnitTex.pressure.value, 'unverified'), ('pressure, av.', to_preci(average_pressure, 4), UnitTex.pressure.value, 'unverified'), ('e_a,kin sun, max.', to_preci(np.amax(self.sun.e_akin), 4), UnitTex.eakin.value, 'unverified'), ('e_a,kin planet, max.', to_preci(np.amax(self.planet.e_akin), 4), UnitTex.eakin.value, 'unverified'), ('pv_rel, max.', to_preci(np.amax(self.pv), 4), UnitTex.pvrel.value, 'unverified'), ('contact area', to_preci(self.sun.get_area(self.sun.press), 4), UnitTex.area.value, 'unverified')] table_calc_summary = [] for key, value, unit, status in sorted(numeric_output_data): table_calc_summary.append( (re.sub('_', '\_', key), value, unit, status)) latex_variables = {'table_calc_summary': table_calc_summary, 'contact_plot1': '{}{}contact1.png'.format( SubDir.tex_figs_rel_to_tex_file.value, '/'), 'pressure_plot1': '{}{}pressure1.png'.format( SubDir.tex_figs_rel_to_tex_file.value, '/'), 'energy_plot1': '{}{}energy1.png'.format( SubDir.tex_figs_rel_to_tex_file.value, '/')} template_calc_specific = get_calc_specific_latex_template( TexTempl.RingOnRing.value, sim) with open(calc_spec_tex_file_handle, 'w') as f: f.write(template_calc_specific.render(latex_variables)) def generate_latex_figures(self, ui=None, res_dir=None): """Generate calculation-specific figures for LaTeX report""" plt_contact(self.sun, self.planet, PltOpts.DDD.value, res_dir, SubDir.tex_figs.value, 'contact1') plt_profile_approx(res_dir, SubDir.tex_figs.value) plt_3d(self.sun.x_axis, self.sun.y_axis, self.sun.press, self.sun.x_label, self.sun.y_label, 'pressure in MPa', 'contact_pressure_sun', res_dir, SubDir.tex_figs.value, 'pressure1') plt_energy_ring_on_ring(self, res_dir, SubDir.tex_figs.value, 'energy1')
python
The UFC women's flyweight division, which currently looks mundane without serious contention to Valentina Shevchenko, now has a prized prospect - Taila Santos. The 25-year-old earned her second successive victory in the UFC on UFC Fight Night: Thompson vs. Neal, comfortably overpowering a tough opponent in Gillian Robertson. Blue belt in mixed martial arts, Taila Santos picked up an interest in combat sports at the age of 16 when her father - a Muay Thai coach - introduced her to the discipline. Prior to that, Santos was fascinated with playing soccer along with the boys. However, after developing an interest in Muay Thai, Santos' father enlisted her in Muay Thai tournaments, where she achieved fair success. The 25-year-old then turned her attention towards Brazilian Jiu Jitsu, and resolutely thought of competing in professional mixed martial arts. Santos eventually went on to fight at Aspera FC, and became a champion there without being defeated once. In only her third UFC outing, Taila Santos defeated her No. 13 ranked opponent, Gillian Robertson. Both the fighters were not originally meant to face each other, as their opponents were forced to pull out after testing positive for COVID-19. Robertson entered into the bout as favorite, but Santos' superior striking game was too much for the Canadian. Best known for her grappling skills, Robertson tried to submit Santos via armbar in all three rounds, but the latter would repeatedly scramble out of danger and land heavy punches on Robertson. The judges scored the contest 30-26, 30-26, 29-28 in the Brazilian's favour. Before Santos found her way into the UFC, she was undefeated at Aspera FC, and boasted a phenomenal record of 16-0. Santos put on an impressive display against Estafani Almeida in the Dana White Contenders Series, going on to make her UFC debut in a losing effort against Mara Romero Borella. She then faced Molly McCann in July 2020, earning her first victory in the promotion. Santos is considered to have mastered her striking skills, and with this win over Robertson, it is likely that she has catapulted her way into the top 15 of the women's bantamweight division.
english
If the past couple of weeks is anything to go by, then Bollywood’s reigning fashionista Sonam Kapoor may have found herself some company in Vaani Kapoor. Be it a minimal make-up look or a diva look, they have more often than not, never let us down. The beautiful actresses who recently made appearances at different events — Sonam Kapoor at an awards function and Vaani Kapoor on the sets of a reality show for the promotions of her upcoming release — looked like a million bucks! Sonam looked downright ethereal in this hot pink sequinned strapless gown at an awards function in Mumbai. Her stunning gown – by designer Caroline Hayden – came complete with a floor hugging long train that sculpted her body. To ease the effect that the engulfing pink monotone had on the eyes, she paired her attire with beautiful turquoise earrings and a ring from Farah Khan Fine Jewellery. With her hair swept back and loose, Kapoor looked every bit divine! Just a couple of days back, Vaani tread the experimental path in a molten wire dress by Rimzim Dadu. The Befikre actress looked stunning in the fiery orange piece, which she teemed with black lace-up heels from Salvatore Ferragamo. The actress, who had earlier wowed up with her amazing fashion sense, was at the Masterchef India sets to promote her upcoming release, co-starring Ranveer Singh. With her minimal make-up and mid-parted, wavy hair with loose curls, she chose to keep it simple and let her attire do all the talking. ALSO READ | After a fab style run, Vaani Kapoor’s cover pic for this magazine is SO awkward! Which actress’ look did you like the most? Let us know in the comments section below.
english
Delhi Development Authority, the primary landowner and developer of the city, has failed in its basic duty of providing affordable housing. Land pooling policy will enable residents to partner with private developers to build and sell homes. Last week, Delhi moved a step ahead in enforcing the land pooling policy by notifying 89 rural villages as urban. The residents here will now be able to pool their farmlands and partner with private developers to build and sell homes. This could be good news for those looking for a legitimate residential address in Delhi. Despite rising incomes, many city dwellers have already been priced out of Delhi into the National Capital Region. Many others have settled for “cheaper” illegal homes in the city’s unauthorised colonies. Clearly, Delhi Development Authority, the primary landowner and developer of the city, failed in its basic duty of providing affordable housing. The agency’s policy of locking up huge tracts of land and not developing them held up the housing supply. A study by K Srirangan in 1997 found that this forced buyers to shift to the illegal market where they could pick plots in different sizes, at cheaper rates, in desired time and on flexible payment and construction terms. To make matters worse, from 2001 onwards, the DDA stopped building big projects despite a boom in the property market. According to a 2014 working paper by Jatinder S. Bedi for the National Council of Applied Economic Research (NCAER), local builders, who didn’t have the sanction to acquire and develop large plots like their counterparts in the NCR, converted single or double storey houses into multi-storey buildings. This again helped property dealers more than the final users. While the share of self-owned households increased from 67. 4% in 2001 to 69. 2% in 2011, property prices increased more than 10 times in a span of fewer than 10 years, the study found. For many years, the DDA was criticised for being too controlling. It now draws flak for becoming too market-oriented. A panel constituted by the NDA government for restructuring the DDA (its report is yet to be made public) recommended that its key functions be handed over to other agencies. This would not only bring back focus but also open up areas for redevelopment. Unlike common perception, Delhi doesn’t have too much vacant land to develop new housing units. At least 60% of the city’s area is already built-up. Of the rest, sizeable portions are natural conservation zones and not available for urbanisation. Much of Delhi has, anyway, spilled over to the NCR towns. But suburbanisation is problematic if most residents are commuting long distances for work and education. It demands heavy investments in flyovers, expressways and mass-transit, and also leads to increased dependence on private cars. The zones identified for land pooling are also on Delhi’s periphery. Some of these areas are not connected to the mass-transit yet. Many others are already water stressed. Not so long ago, the DDA built Vasant Kunj and Dwarka, which got their piped water supply much after they got inhabited. Narela remained a ghost town in the absence of connectivity and other civic facilities. To counter suburbanisation, many cities are opting for redevelopment and densification. The current Master Plan also calls for transit-oriented development, dense commercial and residential growth along the new metro corridors, so that people work, live and shop in the same neighbourhoods. This could cover 40% of Delhi’s housing and commercial needs. Similarly, illegal colonies and urbanised villages could create 15% additional housing if made liveable. At least 40% of Delhi’s housing needs could be met through the renewal of old areas that are long past their expiry. Reviving Delhi is a professional’s job. Instead of leaving it to DDA, the restructuring panel suggests hiring experts and appointing a special purpose vehicle. Now that the land agency is itself in withdrawal mode, it’s time the government made some bold administrative overhaul. Unless it believes that the good, old promise of Roti, Kapda aur Makaan has lost political currency.
english
# terraform-google-service-account
markdown
{ "_information": { "title": "COM_AKEEBA_CONFIG_ENGINE_POSTPROC_DROPBOX2_TITLE", "description": "COM_AKEEBA_CONFIG_ENGINE_POSTPROC_DROPBOX2_DESCRIPTION" }, "engine.postproc.common.after_part": { "default": "0", "type": "bool", "title": "COM_AKEEBA_CONFIG_POSTPROCPARTS_TITLE", "description": "COM_AKEEBA_CONFIG_POSTPROCPARTS_DESCRIPTION" }, "engine.postproc.common.delete_after": { "default": "1", "type": "bool", "title": "COM_AKEEBA_CONFIG_DELETEAFTER_TITLE", "description": "COM_AKEEBA_CONFIG_DELETEAFTER_DESCRIPTION" }, "engine.postproc.dropbox2.chunk_upload": { "default": "1", "type": "bool", "title": "COM_AKEEBA_CONFIG_BOX_CHUNKUPLOAD_ENABLE" }, "engine.postproc.dropbox2.chunk_upload_size": { "default": "20", "type": "integer", "min": "5", "max": "100", "shortcuts": "5|10|20|40|60|80", "scale": "1", "uom": "MB", "title": "COM_AKEEBA_CONFIG_BOX_CHUNKUPLOAD_SIZE" }, "engine.postproc.dropbox2.openoauth": { "default": "", "type": "button", "title": "COM_AKEEBA_CONFIG_BOX_OPENOAUTH_TITLE", "description": "COM_AKEEBA_CONFIG_BOX_OPENOAUTH_DESC", "hook": "akconfig_dropbox2_openoauth" }, "engine.postproc.dropbox2.team": { "default": "0", "type": "bool", "title": "COM_AKEEBA_CONFIG_DROPBOX_TEAM_TITLE", "description": "COM_AKEEBA_CONFIG_DROPBOX_TEAM_DESC" }, "engine.postproc.dropbox2.directory": { "default": "\/", "type": "string", "title": "COM_AKEEBA_CONFIG_DROPBOXDIRECTORY_TITLE", "description": "COM_AKEEBA_CONFIG_DROPBOXDIRECTORY_DESCRIPTION" }, "engine.postproc.dropbox2.access_token": { "default": "", "type": "string", "title": "COM_AKEEBA_CONFIG_DROPBOXTOKEN_TITLE", "description": "COM_AKEEBA_CONFIG_DROPBOXTOKEN_DESCRIPTION" } }
json
# Copyright 2018 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Partial response utilities for an Endpoints v1 over webapp2 service. Grammar of a fields partial response string: fields: selector [,selector]* selector: path [(fields)]? path: name [/name]* name: [A-Za-z_][A-Za-z0-9_]* | \* Examples: fields=a Response includes the value of the "a" field. fields=a,b Response includes the values of the "a" and "b" fields. fields=a/b Response includes the value of the "b" field of "a". If "a" is an array, response includes the values of the "b" fields of every element in the array. fields=a/*/c For every element or field of "a", response includes the value of that element or field's "c" field. fields=a(b,c) Equivalent to fields=a/b union fields=a/c. """ class ParsingError(Exception): """Indicates an error during parsing. Fields: index: The index the error occurred at. message: The error message. """ def __init__(self, index, message): super(ParsingError, self).__init__('%d: %s' % (index, message)) self.index = index self.message = message def _merge(source, destination): """Recursively merges the source dict into the destination dict. Args: source: A dict whose values are source dicts. destination: A dict whose values are destination dicts. """ for key, value in source.iteritems(): if destination.get(key): _merge(value, destination[key]) else: destination[key] = value class _ParsingContext(object): """Encapsulates parsing information. Attributes: accumulator: A list of field name characters accumulated so far. expecting_name: Whether or not a field name is expected. fields: A dict of accumulated fields. """ def __init__(self): """Initializes a new instance of ParsingContext.""" # Pointer to the subfield dict of the last added field. self._last = None self.accumulator = [] self.expecting_name = True self.fields = {} def accumulate(self, char): """Accumulates the given char. Args: char: The character to accumulate. """ # Accumulate all characters even if they aren't allowed by the grammar. # In the worst case there will be extra keys in the fields dict which will # be ignored when the mask is applied because they don't match any legal # field name. It won't cause incorrect masks to be applied. The exception is # / which has special meaning. See add_field below. Note that * has special # meaning while applying the mask but not while parsing. See _apply below. self.accumulator.append(char) def add_field(self, i): """Records the field name in the accumulator then clears the accumulator. Args: i: The index the parser is at. """ # Reset the index to the start of the accumulated string. i -= len(self.accumulator) path = ''.join(self.accumulator).strip() if not path: raise ParsingError(i, 'expected name') # Advance i to the first non-space char. for char in self.accumulator: if char != ' ': break i += 1 # / has special meaning; a/b/c is shorthand for a(b(c)). Add subfield dicts # recursively. E.g. if the fields dict is empty then parsing a/b/c is like # setting fields["a"] = {"b": {"c": {}} and pointing last to c's value. pointer = self.fields for part in path.split('/'): if not part: raise ParsingError(i, 'empty name in path') pointer = pointer.setdefault(part, {}) # Increment the index by the length of this part as well as the /. i += len(part) + 1 self._last = pointer self.accumulator = [] def add_subfields(self, subfields): """Adds the given subfields to the last added field. Args: subfields: A dict of accumulated subfields. Returns: False if there was no last added field to add subfields to, else True. """ if self._last is None: return False _merge(subfields, self._last) return True def _parse(fields): """Parses the given partial response string into a partial response mask. Args: fields: A fields partial response string. Returns: A dict which can be used to mask another dict. Raises: ParsingError: If fields wasn't a valid partial response string. """ stack = [_ParsingContext()] i = 0 while i < len(fields): # Invariants maintained below. # Stack invariant: The stack always has at least one context. assert stack, fields # Accumulator invariant: Non-empty accumulator implies expecting a name. assert not stack[-1].accumulator or stack[-1].expecting_name, fields if fields[i] == ',': # If we just returned from a lower context, no name is expected. if stack[-1].expecting_name: stack[-1].add_field(i) stack[-1].expecting_name = True elif fields[i] == '(': # Maintain accumulator invariant. # A name must occur before any (. stack[-1].add_field(i) stack[-1].expecting_name = False # Enter a new context. When we return from this context we don't expect to # accumulate another name. There must be , or a return to a higher context # (or the end of the string altogether). stack.append(_ParsingContext()) elif fields[i] == ')': # If we just returned from a lower context, no name is expected. if stack[-1].expecting_name: stack[-1].add_field(i) # Return to a higher context. Maintain stack invariant. subfields = stack.pop().fields if not stack: # Mismatched (). raise ParsingError(i, 'unexpected )') # See accumulator invariant maintenance above. assert not stack[-1].expecting_name, fields if not stack[-1].add_subfields(subfields): # ) before any field. raise ParsingError(i, 'unexpected (') else: # If we just returned from a lower context, no name is expected. if not stack[-1].expecting_name: raise ParsingError(i, 'unexpected name') stack[-1].accumulate(fields[i]) i += 1 if len(stack) != 1: # Mismatched (). raise ParsingError(i, 'expected )') # If we just returned from a lower context, no name is expected. if stack[-1].expecting_name: stack[-1].add_field(i) return stack[0].fields def _apply(response, partial): """Applies the given partial response dict to the given response. Args: response: A dict to be updated in place. partial: A partial response dict as returned by _parse. May be modified, but will not have its masking behavior changed. Returns: The masked response. """ for key, value in response.items(): pointer = None if key in partial: if partial[key]: # If the subfield dict is non-empty, include all of *'s subfields. _merge(partial.get('*', {}), partial[key]) pointer = partial[key] elif '*' in partial: pointer = partial['*'] if pointer is None: response.pop(key) elif pointer: if isinstance(value, dict) and value: _apply(value, pointer) if not value: # No subfields were kept, remove this field. response.pop(key) elif isinstance(value, list) and value: new_values = [] for v in value: # In a dict constructed from a protorpc.message.Message list elements # always have the same type. Here we allow list elements to have mixed # types and only recursively apply the mask to dicts. if isinstance(v, dict): _apply(v, pointer) if v: # Subfields were kept, include this element. new_values.append(v) else: # Non-dict, include this element. new_values.append(v) response[key] = new_values if not new_values: # No elements were kept, remove this field. response.pop(key) return response def mask(response, fields): """Applies the given fields partial response string to the given response. Args: response: A dict encoded using protorpc.protojson.ProtoJson.encode_message to be updated in place. fields: A fields partial response string. Returns: The masked response. Raises: ParsingError: If fields wasn't a valid partial response string. """ return _apply(response, _parse(fields))
python
{"packages":{"wpackagist-plugin\/tweetmeme-button":{"1.8.2":{"name":"wpackagist-plugin\/tweetmeme-button","version":"1.8.2","version_normalized":"1.8.2.0","uid":362243,"dist":{"type":"zip","url":"https:\/\/downloads.wordpress.org\/plugin\/tweetmeme-button.zip?timestamp=1273786027"},"source":{"type":"svn","url":"https:\/\/plugins.svn.wordpress.org\/tweetmeme-button\/","reference":"trunk"},"homepage":"https:\/\/wordpress.org\/plugins\/tweetmeme-button\/","require":{"composer\/installers":"~1.0"},"type":"wordpress-plugin"},"dev-trunk":{"name":"wpackagist-plugin\/tweetmeme-button","version":"dev-trunk","version_normalized":"9999999-dev","uid":362244,"time":"2010-05-13 21:27:07","dist":{"type":"zip","url":"https:\/\/downloads.wordpress.org\/plugin\/tweetmeme-button.zip?timestamp=1273786027"},"source":{"type":"svn","url":"https:\/\/plugins.svn.wordpress.org\/tweetmeme-button\/","reference":"trunk"},"homepage":"https:\/\/wordpress.org\/plugins\/tweetmeme-button\/","require":{"composer\/installers":"~1.0"},"type":"wordpress-plugin"}}}}
json
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License in the LICENSE-APACHE file or at: // https://www.apache.org/licenses/LICENSE-2.0 //! Data list example (indirect representation) //! //! This is a variant of `data-list` using the [`ListView`] widget to create a //! dynamic view over a lazy, indirect data structure. Maximum data length is //! thus only limited by the data types used (specifically the `i32` type used //! to calculate the maximum scroll offset). use kas::event::ChildMsg; use kas::prelude::*; use kas::updatable::*; use kas::widgets::view::{Driver, ListView}; use kas::widgets::*; use std::cell::RefCell; use std::collections::HashMap; #[derive(Clone, Debug, VoidMsg)] enum Control { Set(usize), Dir, } #[derive(Clone, Debug, VoidMsg)] enum Button { Decr, Incr, Set, } #[derive(Clone, Debug, VoidMsg)] enum EntryMsg { Select, Update(String), } #[derive(Debug)] struct MyData { len: usize, // (active index, map of strings) data: RefCell<(usize, HashMap<usize, String>)>, handle: UpdateHandle, } impl MyData { fn new(len: usize) -> Self { MyData { len, data: Default::default(), handle: UpdateHandle::new(), } } fn set_len(&mut self, len: usize) -> (Option<String>, UpdateHandle) { self.len = len; let mut new_text = None; let mut data = self.data.borrow_mut(); if data.0 >= len && len > 0 { let active = len - 1; data.0 = active; drop(data); new_text = Some(self.get(active).1); } (new_text, self.handle) } fn get_active(&self) -> usize { self.data.borrow().0 } // Note: in general this method should update the data source and return // self.handle, but for our uses this is sufficient. fn set_active(&mut self, active: usize) -> String { self.data.borrow_mut().0 = active; self.get(active).1 } fn get(&self, index: usize) -> (bool, String) { let data = self.data.borrow(); let is_active = data.0 == index; let text = data.1.get(&index).cloned(); let text = text.unwrap_or_else(|| format!("Entry #{}", index + 1)); (is_active, text) } } impl Updatable for MyData { fn update_handle(&self) -> Option<UpdateHandle> { Some(self.handle) } } impl UpdatableHandler<usize, EntryMsg> for MyData { fn handle(&self, key: &usize, msg: &EntryMsg) -> Option<UpdateHandle> { match msg { EntryMsg::Select => { self.data.borrow_mut().0 = *key; Some(self.handle) } EntryMsg::Update(text) => { self.data.borrow_mut().1.insert(*key, text.clone()); Some(self.handle) } } } } impl ListData for MyData { type Key = usize; type Item = (usize, bool, String); fn len(&self) -> usize { self.len } fn contains_key(&self, key: &Self::Key) -> bool { *key < self.len } fn get_cloned(&self, key: &Self::Key) -> Option<Self::Item> { let (is_active, text) = self.get(*key); Some((*key, is_active, text)) } fn update(&self, _: &Self::Key, _: Self::Item) -> Option<UpdateHandle> { unimplemented!() } fn iter_vec(&self, limit: usize) -> Vec<(Self::Key, Self::Item)> { (0..limit.min(self.len)) .map(|n| (n, self.get_cloned(&n).unwrap())) .collect() } fn iter_vec_from(&self, start: usize, limit: usize) -> Vec<(Self::Key, Self::Item)> { (start..self.len.min(start + limit)) .map(|n| { let (is_active, text) = self.get(n); (n, (n, is_active, text)) }) .collect() } } // TODO: it would be nicer to use EditBox::new(..).on_edit(..), but that produces // an object with unnamable type, which is a problem. #[derive(Clone, Debug)] struct ListEntryGuard; impl EditGuard for ListEntryGuard { type Msg = EntryMsg; fn edit(entry: &mut EditField<Self>, _: &mut Manager) -> Option<Self::Msg> { Some(EntryMsg::Update(entry.get_string())) } } widget! { // The list entry #[derive(Clone, Debug)] #[widget{ layout = column: *; }] #[handler(msg=EntryMsg)] struct ListEntry { #[widget_core] core: CoreData, #[widget] label: StringLabel, #[widget] radio: RadioBox<EntryMsg>, #[widget] entry: EditBox<ListEntryGuard>, } } #[derive(Debug)] struct MyDriver { radio_group: UpdateHandle, } impl Driver<(usize, bool, String)> for MyDriver { type Msg = EntryMsg; type Widget = ListEntry; fn new(&self) -> Self::Widget { // Default instances are not shown, so the data is unimportant ListEntry { core: Default::default(), label: Label::new(String::default()), radio: RadioBox::new("display this entry", self.radio_group) .on_select(move |_| Some(EntryMsg::Select)), entry: EditBox::new(String::default()).with_guard(ListEntryGuard), } } fn set(&self, widget: &mut Self::Widget, data: (usize, bool, String)) -> TkAction { let label = format!("Entry number {}", data.0 + 1); widget.label.set_string(label) | widget.radio.set_bool(data.1) | widget.entry.set_string(data.2) } fn get(&self, _widget: &Self::Widget) -> Option<(usize, bool, String)> { None // unused } } fn main() -> Result<(), kas::shell::Error> { env_logger::init(); let controls = make_widget! { #[widget{ layout = row: *; }] #[handler(msg = Control)] struct { #[widget] _ = Label::new("Number of rows:"), #[widget(map_msg = activate)] edit: impl HasString = EditBox::new("3") .on_afl(|text, _| text.parse::<usize>().ok()), #[widget(map_msg = button)] _ = TextButton::new_msg("Set", Button::Set), #[widget(map_msg = button)] _ = TextButton::new_msg("−", Button::Decr), #[widget(map_msg = button)] _ = TextButton::new_msg("+", Button::Incr), #[widget] _ = TextButton::new_msg("↓↑", Control::Dir), n: usize = 3, } impl Self { fn activate(&mut self, _: &mut Manager, n: usize) -> Control { self.n = n; Control::Set(n) } fn button(&mut self, mgr: &mut Manager, msg: Button) -> Control { let n = match msg { Button::Decr => self.n.saturating_sub(1), Button::Incr => self.n.saturating_add(1), Button::Set => self.n, }; *mgr |= self.edit.set_string(n.to_string()); self.n = n; Control::Set(n) } } }; let driver = MyDriver { radio_group: UpdateHandle::new(), }; let data = MyData::new(3); type MyList = ListView<Direction, MyData, MyDriver>; let list = ListView::new_with_dir_driver(Direction::Down, driver, data); let window = Window::new( "Dynamic widget demo", make_widget! { #[widget{ layout = column: *; }] #[handler(msg = VoidMsg)] struct { #[widget] _ = Label::new("Demonstration of dynamic widget creation / deletion"), #[widget(use_msg = control)] controls -> Control = controls, #[widget] _ = Label::new("Contents of selected entry:"), #[widget] display: StringLabel = Label::from("Entry #0"), #[widget] _ = Separator::new(), #[widget(use_msg = set_radio)] list: ScrollBars<MyList> = ScrollBars::new(list).with_bars(false, true), } impl Self { fn control(&mut self, mgr: &mut Manager, control: Control) { match control { Control::Set(len) => { let (opt_text, handle) = self.list.data_mut().set_len(len); if let Some(text) = opt_text { *mgr |= self.display.set_string(text); } mgr.trigger_update(handle, 0); } Control::Dir => { let dir = self.list.direction().reversed(); *mgr |= self.list.set_direction(dir); } } } fn set_radio(&mut self, mgr: &mut Manager, msg: ChildMsg<usize, EntryMsg>) { match msg { ChildMsg::Select(_) | ChildMsg::Deselect(_) => (), ChildMsg::Child(n, EntryMsg::Select) => { let text = self.list.data_mut().set_active(n); *mgr |= self.display.set_string(text); } ChildMsg::Child(n, EntryMsg::Update(text)) => { if n == self.list.data().get_active() { *mgr |= self.display.set_string(text); } } } } } }, ); let theme = kas::theme::ShadedTheme::new(); kas::shell::Toolkit::new(theme)?.with(window)?.run() }
rust
<reponame>suxinde2009/ImageStone<gh_stars>0 #include "stdafx.h" #include "002.h" #include "dlg_effect_lib.h" //------------------------------------------------------------------------------------- void DlgEffectLib::CEffectThumb::SetImage (HBITMAP hBmp) { BITMAP bm = {0} ; if (GetObject (hBmp, sizeof(bm), &bm)) { m_img.Attach (CreateCompatibleBitmap (CClientDC(NULL), bm.bmWidth, bm.bmHeight)) ; FCImageDrawDC::DrawBitmap (FCImageDrawDC(m_img), CRect(0, 0, bm.bmWidth, bm.bmHeight), hBmp) ; } } //------------------------------------------------------------------------------------- void DlgEffectLib::CEffectThumb::DrawTitle (CDC& dc, CRect rcItemOnDC) { dc.FillSolidRect (rcItemOnDC, ::GetSysColor(COLOR_3DFACE)) ; dc.FillSolidRect (CRect(rcItemOnDC.TopLeft(), CSize(rcItemOnDC.Width(),1)), RGB(160,160,160)) ; dc.DrawText (m_text, rcItemOnDC, DT_SINGLELINE|DT_VCENTER|DT_CENTER) ; } //------------------------------------------------------------------------------------- void DlgEffectLib::CEffectThumb::DrawThumb (CDC& dc, CRect rcItemOnDC) { if (IsMouseHovering()) { dc.FillSolidRect (rcItemOnDC, RGB(220,241,253)) ; FrameRect (dc, rcItemOnDC, CBrush(RGB(51,153,255))) ; } CRect rcTxt = rcItemOnDC ; rcTxt.top = rcTxt.bottom - 20 ; CRect rcImg = rcItemOnDC ; rcImg.bottom = rcTxt.top ; rcImg.DeflateRect(8,8,8,0) ; if (m_img.GetSafeHandle()) { FCImageDrawDC::DrawBitmap (dc, rcImg, m_img) ; } dc.DrawText (m_text, rcTxt, DT_SINGLELINE|DT_VCENTER|DT_CENTER) ; } //------------------------------------------------------------------------------------- void DlgEffectLib::CEffectThumb::OnPaint_Item (CDC& dc) { CRect rcItemOnDC (CPoint(0,0), GetItemSize()) ; if (m_command_id) { DrawThumb(dc, rcItemOnDC) ; } else { DrawTitle(dc, rcItemOnDC) ; } } //------------------------------------------------------------------------------------- void DlgEffectLib::CThumbLayout::Layout_ListItem (CWnd* pWnd, std::deque<FCListItem_Base*>& item_list) { CRect rcClient ; pWnd->GetClientRect(rcClient) ; CSize item_size ; item_size.cx = rcClient.Width() / 2 ; item_size.cy = 100 ; int nCurrY = 0 ; BOOL nLineIndex = 0 ; CRect rcBound (0,0,0,0) ; for (size_t i=0 ; i < item_list.size() ; i++) { CEffectThumb * pItem = (CEffectThumb*)item_list[i] ; CRect rc ; BOOL bNewLine = FALSE ; if (pItem->m_command_id) { rc = CRect(CPoint(nLineIndex * item_size.cx,nCurrY), item_size) ; nLineIndex++ ; if (nLineIndex == 2) bNewLine = TRUE ; if (i < item_list.size()-1) { if (!((CEffectThumb*)item_list[i+1])->m_command_id) bNewLine = TRUE ; } } else { // title item rc = CRect(CPoint(0,nCurrY), CSize(rcClient.Width(),26)) ; bNewLine = TRUE ; } if (bNewLine) { nCurrY += rc.Height() ; nLineIndex = 0 ; } pItem->SetRectOnCanvas (rc) ; rcBound.UnionRect (rcBound, rc) ; } SetVScrollRange (pWnd, rcBound.Height()) ; } //------------------------------------------------------------------------------------- DlgEffectLib::CEffectList::CEffectList() { m_thread = NULL ; SetLayoutHandler(new CThumbLayout()) ; AddThumb (ID_EFFECT_COLORTONE, NULL) ; AddThumb (ID_EFFECT_GRAYSCALE, NULL) ; AddThumb (ID_EFFECT_SOFTGLOW, NULL) ; AddThumb (ID_EFFECT_SOFT_PORTRAIT, NULL) ; AddThumb (ID_EFFECT_MOSAIC, NULL) ; AddThumb (ID_EFFECT_INVERT, NULL) ; AddThumb (ID_EFFECT_SMOOTHEDGE, NULL) ; AddThumb (ID_EFFECT_BLURMOTION, NULL) ; AddThumb (ID_EFFECT_BLURRADIAL, NULL) ; AddThumb (ID_EFFECT_BLURZOOM, NULL) ; AddThumb (0, GetPureMenuText(L"s_3_0")) ; AddThumb (ID_EFFECT_NOISIFY, NULL) ; AddThumb (ID_EFFECT_OILPAINT, NULL) ; AddThumb (ID_EFFECT_EMBOSS, NULL) ; AddThumb (ID_EFFECT_SPLASH, NULL) ; AddThumb (ID_EFFECT_POSTERIZE, NULL) ; AddThumb (ID_EFFECT_TEXTURE, NULL) ; AddThumb (ID_EFFECT_3DGRID, NULL) ; AddThumb (ID_EFFECT_PENCILSKETCH, NULL) ; AddThumb (0, GetPureMenuText(L"s_3_1")) ; AddThumb (ID_EFFECT_SHIFT, NULL) ; AddThumb (ID_EFFECT_RIBBON, NULL) ; AddThumb (ID_EFFECT_BULGE, NULL) ; AddThumb (ID_EFFECT_TWIST, NULL) ; AddThumb (ID_EFFECT_ILLUSION, NULL) ; AddThumb (ID_EFFECT_WAVE, NULL) ; AddThumb (ID_EFFECT_RIPPLE, NULL) ; AddThumb (0, GetPureMenuText(L"s_3_2")) ; AddThumb (ID_EFFECT_LENSFLARE, NULL) ; AddThumb (ID_EFFECT_SUPERNOVA, NULL) ; AddThumb (ID_EFFECT_GLASSTILE, NULL) ; AddThumb (ID_EFFECT_BLINDS, NULL) ; AddThumb (ID_EFFECT_RAISEFRAME, NULL) ; AddThumb (0, GetPureMenuText(L"s_3_3")) ; AddThumb (ID_EFFECT_HALFTONE, NULL) ; AddThumb (ID_EFFECT_THRESHOLD, NULL) ; AddThumb (ID_EFFECT_SOLARIZE, NULL) ; AddThumb (ID_EFFECT_OLDPHOTO, NULL) ; AddThumb (0, GetPureMenuText(L"s_3_4")) ; AddThumb (ID_EFFECT_FILLGRID, NULL) ; AddThumb (ID_EFFECT_VIDEO, NULL) ; } //------------------------------------------------------------------------------------- DlgEffectLib::CEffectList::~CEffectList() { // first destroy window to cancel SendMessage, wait thread finish DestroyWindow() ; if (m_thread) { WaitForSingleObject (m_thread, INFINITE) ; CloseHandle(m_thread) ; } } //------------------------------------------------------------------------------------- CString DlgEffectLib::CEffectList::GetPureMenuText (LPCWSTR sName) { CString s = theApp.GetText(L"MENU_TEXT", sName) ; int n = s.Find(L"(&") ; if (n != -1) { s = s.Left(n) ; } s.Replace (L"&", L"") ; return s ; } //------------------------------------------------------------------------------------- void DlgEffectLib::CEffectList::AddThumb (int nCommand, LPCWSTR sText) { CString s ; if (nCommand) { s = theApp.GetMenuPureText(nCommand) ; } else { s = (sText ? sText : L"") ; } AddListItem (new CEffectThumb(nCommand, s)) ; } //------------------------------------------------------------------------------------- LRESULT DlgEffectLib::CEffectList::WindowProc (UINT msg, WPARAM wParam, LPARAM lParam) { if (msg == WM_PAINT) { // create sample when paint if (!m_thread) { THREAD_PARAM * p = new THREAD_PARAM ; p->m_wnd = m_hWnd ; for (int i=0 ; i < GetListItemCount() ; i++) { p->m_cmd.push_back( ((CEffectThumb*)GetListItem(i))->m_command_id ) ; } m_thread = CreateThread (NULL, 0, MakeThumbThread, p, 0, NULL) ; if (!m_thread) { ASSERT(FALSE) ; delete p ; } } } if (msg == WM_OXO_EFFECT_THUMB_FINISH) { for (int i=0 ; i < GetListItemCount() ; i++) { CEffectThumb * pItem = (CEffectThumb*)GetListItem(i) ; if (pItem->m_command_id == (int)wParam) { pItem->SetImage((HBITMAP)lParam) ; break; } } Invalidate() ; return 0x11228899 ; } if (msg == WM_LBUTTONDOWN) { CEffectThumb * pItem = (CEffectThumb*)HitTestListItem(lParam) ; if (pItem && pItem->m_command_id) { AfxGetMainWnd()->PostMessage(WM_COMMAND, MAKEWPARAM(pItem->m_command_id,0)) ; } } return FCListWindow::WindowProc(msg, wParam, lParam) ; } //------------------------------------------------------------------------------------- FCImageEffect* DlgEffectLib::CEffectList::CreateEffect (int nCommandID) { switch (nCommandID) { case ID_EFFECT_COLORTONE : return new FCEffectColorTone(FCColor(255,187,0),160) ; case ID_EFFECT_GRAYSCALE : return new FCEffectGrayscale ; case ID_EFFECT_SOFTGLOW : return new FCEffectSoftGlow(10,10,10) ; case ID_EFFECT_SOFT_PORTRAIT : return new FCEffectSoftPortrait(5,0,20) ; case ID_EFFECT_MOSAIC : return new FCEffectMosaic(6) ; case ID_EFFECT_INVERT : return new FCEffectInvert ; case ID_EFFECT_SMOOTHEDGE : return new FCEffectSmoothEdge(15) ; case ID_EFFECT_BLURMOTION : return new FCEffectBlur_Motion(20,0) ; case ID_EFFECT_BLURRADIAL : return new FCEffectBlur_Radial(10) ; case ID_EFFECT_BLURZOOM : return new FCEffectBlur_Zoom(100) ; case ID_EFFECT_NOISIFY : return new FCEffectNoisify(50,false) ; case ID_EFFECT_OILPAINT : return new FCEffectOilPaint(3,30) ; case ID_EFFECT_EMBOSS : return new FCEffectEmboss(0) ; case ID_EFFECT_SPLASH : return new FCEffectSplash(10) ; case ID_EFFECT_POSTERIZE : return new FCEffectPosterize(2) ; case ID_EFFECT_TEXTURE : { FCObjImage * pImg = new FCObjImage ; pImg->LoadResource (IDR_PNG_TEXTURE_CANVAS_2, L"PNG", IMG_PNG) ; pImg->ConvertTo24Bit() ; return new FCEffectFillPattern(pImg, 0xFF, true) ; } case ID_EFFECT_3DGRID : return new FCEffect3DGrid(16,128) ; case ID_EFFECT_PENCILSKETCH : return new FCEffectPencilSketch(2,7) ; case ID_EFFECT_SHIFT : return new FCEffectShift(10) ; case ID_EFFECT_RIBBON : return new FCEffectRibbon(30,30) ; case ID_EFFECT_BULGE : return new FCEffectBulge(100) ; case ID_EFFECT_TWIST : return new FCEffectTwist(20,200) ; case ID_EFFECT_ILLUSION : return new FCEffectIllusion(3) ; case ID_EFFECT_WAVE : return new FCEffectWave(6,6) ; case ID_EFFECT_RIPPLE : return new FCEffectRipple(38,15,true) ; case ID_EFFECT_LENSFLARE : return new FCEffectLensFlare(CPoint(50,30)) ; case ID_EFFECT_SUPERNOVA : return new FCEffectSupernova(CPoint(50,30),FCColor(255,255,60),10,100) ; case ID_EFFECT_GLASSTILE : return new FCEffectTileReflection(20,10) ; case ID_EFFECT_BLINDS : return new FCEffectBlinds(FCEffectBlinds::BLIND_X,10,100,FCColor(255,255,255)) ; case ID_EFFECT_RAISEFRAME : return new FCEffectRaiseFrame(10) ; case ID_EFFECT_HALFTONE : return new FCEffectHalftoneM3 ; case ID_EFFECT_THRESHOLD : return new FCEffectThreshold(128) ; case ID_EFFECT_SOLARIZE : return new FCEffectSolarize(128) ; case ID_EFFECT_OLDPHOTO : return new FCEffectOldPhoto(2) ; case ID_EFFECT_FILLGRID : return new FCEffectFillGrid(FCColor(0,128,255),FCColor(255,255,255),16,128) ; case ID_EFFECT_VIDEO : return new FCEffectVideo(FCEffectVideo::VIDEO_TRIPED) ; } return NULL ; } //------------------------------------------------------------------------------------- DWORD WINAPI DlgEffectLib::CEffectList::MakeThumbThread (LPVOID lpParameter) { FCObjImage demo_img ; demo_img.LoadResource (IDR_PNG_EXAMPLE, L"PNG", IMG_PNG) ; demo_img.ConvertTo32Bit() ; std::auto_ptr<THREAD_PARAM> r ((THREAD_PARAM*)lpParameter) ; for (size_t i=0 ; i < r->m_cmd.size() ; i++) { int nCommandID = r->m_cmd[i] ; std::auto_ptr<FCImageEffect> eff (CreateEffect(nCommandID)) ; if (!eff.get()) continue ; FCObjImage img = demo_img ; img.ApplyEffect (*eff) ; img.ApplyEffect (FCEffectFillBackGround(FCColor(0xFF,0xFF,0xFF,0xFF))) ; LRESULT l = ::SendMessage (r->m_wnd, WM_OXO_EFFECT_THUMB_FINISH, (WPARAM)nCommandID, (LPARAM)(HBITMAP)img) ; if (l != 0x11228899) break; } return 0 ; } //------------------------------------------------------------------------------------- void DlgEffectLib::Create (CMDIFrameWnd* pMainFrame) { CDialogBar::Create (pMainFrame, IDD_EFFECT_LIB, CBRS_LEFT|CBRS_RIGHT|CBRS_SIZE_DYNAMIC, ID_EFFECT_LIB_VISIBLE) ; m_sizeDefault.cx = 200 ; m_sizeDefault.cy = GetSystemMetrics(SM_CYFULLSCREEN) - 200 ; SetWindowText(L"Effect Lib") ; pMainFrame->ShowControlBar (this, FALSE, FALSE) ; // hide at first EnableDocking (CBRS_ALIGN_LEFT | CBRS_ALIGN_RIGHT) ; pMainFrame->DockControlBar (this, AFX_IDW_DOCKBAR_RIGHT) ; } //------------------------------------------------------------------------------------- CSize DlgEffectLib::CalcDynamicLayout(int nLength, DWORD dwMode) { if (dwMode & LM_VERTDOCK) { CSize sz = m_sizeDefault ; sz.cy = GetSystemMetrics(SM_CYFULLSCREEN) ; return sz ; } return CDialogBar::CalcDynamicLayout (nLength, dwMode) ; } //------------------------------------------------------------------------------------- void DlgEffectLib::ShowList() { if (!m_list.get()) { m_list.reset(new CEffectList) ; CRect rc (CPoint(0,0), m_sizeDefault) ; rc.DeflateRect(4,5,3,10) ; m_list->Create(rc, this, 0, WS_VISIBLE) ; } } //------------------------------------------------------------------------------------- void DlgEffectLib::HideList() { m_list.reset() ; } //------------------------------------------------------------------------------------- LRESULT DlgEffectLib::WindowProc (UINT msg, WPARAM wParam, LPARAM lParam) { if ((msg == WM_WINDOWPOSCHANGED) && lParam) { WINDOWPOS * p = (WINDOWPOS*)lParam ; if (p->flags & SWP_SHOWWINDOW) { ShowList() ; } if (p->flags & SWP_HIDEWINDOW) { HideList() ; } } return CDialogBar::WindowProc(msg, wParam, lParam) ; }
cpp
/* * main.cpp * * Created on: Sep 10, 2021 * Author: djek-sweng */ #include "Command.h" #include "CommandGetVersion.h" #include "CommandGetSessionId.h" #include "CommandFlashUnlock.h" #include "CommandFlashLock.h" #include "CommandFlashErase.h" #include "CommandMemoryRead.h" #include "CommandMemoryWrite.h" #include "CommandSystemReset.h" using namespace Bootloader; int main(int argc, char** argv) { for (int i=0; i<argc; ++i) { cout << argv[i] << endl; } char* device = argv[1]; int select = atoi(argv[2]); int param_0 = 0;/* argv[3] */ int param_1 = 0;/* argv[4] */ uint32_t baudRate = 115200; Command* command; int result; switch (select) { case 1: { command = new CommandGetSessionId(device, baudRate); break; } case 2: { command = new CommandFlashUnlock(device, baudRate); break; } case 3: { command = new CommandFlashLock(device, baudRate); break; } case 4: { param_0 = 0x20000000; param_1 = 0x40; command = (Command*)(new CommandMemoryRead(device, baudRate)) ->SetAddress(param_0) ->SetLength(param_1); break; } case 5: { param_0 = 4; param_1 = 4; command = (Command*)(new CommandFlashErase(device, baudRate)) ->SetSector(param_0) ->SetTotalNumber(param_1); break; } case 6: { param_0 = 2000; command = (Command*)(new CommandSystemReset(device, baudRate)) ->SetDelay(param_0); break; } case 7: { param_0 = 0x08010000; param_1 = 4; uint8_t buffer[4] = {0xde, 0xad, 0xbe, 0xef}; command = (Command*)(new CommandMemoryWrite(device, baudRate)) ->SetAddress(param_0) ->SetLength(param_1) ->SetBuffer(&buffer[0]); break; } case 0: default: { command = new CommandGetVersion(device, baudRate); break; } } result = command->Execute(); command->Close(); return result; }
cpp
{ "doctext": "\" the extra ##dit ##able ##s , \" the armed branch of the med ##elli ##n cartel have claimed responsibility for the murder of two employees of bogota ' s daily el es ##pe ##cta ##dor per ##pet ##rated today in med ##elli ##n , a source from that newspaper told e ##fe . miguel sole ##r rodriguez , el es ##pe ##cta ##tor ' s circulation manager and <NAME> , the correspondent ' s office administrator , were killed today in separate attacks carried out by gunmen in med ##elli ##n , colombia ' s second largest city and capital of the anti ##o ##qui ##a department . shortly after the murders , an anonymous call was received at el es ##pe ##cta ##dor ' s office in med ##elli ##n , threatening to kill all the editors and office personnel who do not resign in 3 days . \" the extra ##dit ##able ##s , \" the voice said , \" do not want that newspaper circulating in anti ##o ##qui ##a anymore . \" <NAME> , 35 , who worked for el es ##pe ##cta ##dor 11 years , was killed by two men on motorcycles who intercepted her car at a corner and shot her several times . at the moment of the attack , she was accompanied by her mother <NAME> oro ##z ##co de lopez , who was wounded . sole ##r , who was 45 - years old and had worked for 25 years at el es ##pe ##cta ##tor , was also killed by unidentified individuals while he was on his way back to his residence . sole ##r , who was in charge of advertising and circulation of el es ##pe ##cta ##dor in med ##elli ##n and the northwestern area of colombia , was married and the father of three children . the main offices in bogota of el es ##pe ##cta ##dor , the newspaper most threatened by colombia ' s drug trafficking mafia , were partially destroyed on 2 september when a car bomb explosion injured over 90 people . newspaper director guillermo can ##o was murdered as he was leaving his office on 17 december 1986 . this crime was attributed to the med ##elli ##n cartel , which together with the cal ##i cartel , is considered to be among the most important organizations in the world involved in the trafficking and distribution of cocaine . newspaper attorney and journalist hector gi ##ral ##do gal ##vez , who was the civil prosecutor in the investigation into guillermo can ##o ' s homicide , was also murdered in bogota on 29 march . el es ##pe ##cta ##dor has characterized itself by rejecting and condemning drug trafficking and other criminal activities involving ma ##fi ##oso ##s .", "pred_seq": "attack [SEP] gunmen gunmen [SEP] the ##s [SEP] [SEP] <NAME> <NAME>z martha lopez martha lopez martha lopez [SEP] car bomb [SEP] [unused0] bombing [SEP] men men [SEP] the ##s [SEP] [SEP] guillermo ##o hector ##vez [SEP] car bomb [SEP] [unused0] bombing [SEP] drug mafia [SEP] the ##s [SEP] main offices offices offices main offices main offices main offices main offices main offices main offices main offices main offices main offices main offices main [CLS]", "pred_templates": [ { "incident_type": "attack", "PerpInd": [["gunmen"]], "PerpOrg": [["extraditables"]], "Target": [], "Victim": [ ["<NAME>"], ["<NAME>"], ["<NAME>"] ], "Weapon": [["car bomb"]] }, { "incident_type": "bombing", "PerpInd": [["men"]], "PerpOrg": [["extraditables"]], "Target": [], "Victim": [["guillermo cano"], ["<NAME>"]], "Weapon": [["car bomb"]] } ], "gold_templates": [ { "incident_type": "attack", "PerpInd": [ ["extraditables"], ["gunmen", "men", "two men on motorcycles", "men on motorcycles"], ["unidentified individuals"] ], "PerpOrg": [["extraditables", "medellin cartel"]], "Target": [], "Victim": [ ["<NAME>"], ["<NAME>"], ["<NAME>"] ], "Weapon": [] }, { "incident_type": "attack", "PerpInd": [["extraditables"]], "PerpOrg": [["extraditables", "medellin cartel"]], "Target": [], "Victim": [], "Weapon": [] }, { "incident_type": "bombing", "PerpInd": [["drug trafficking mafia"]], "PerpOrg": [], "Target": [["main offices in bogota of el espectador"]], "Victim": [], "Weapon": [["car bomb"]] } ], "docid": "30046" }
json
module.exports = function (router) { var v = "dm3" router.get('/'+v+'/data-upload/courses/goto-validation', function (req, res) { req.session.data['dm3courses-deleted'] = []; req.session.data['dm3courses-resolved'] = []; req.session.data['dm3courses-errorcount'] = 6; // this needs to become dynamic res.redirect('/'+v+'/data-upload/courses/validation'); }) // User choice on how to handle errors in upload router.post('/'+v+'/data-upload/courses/validation', function (req, res) { if (req.session.data['course-validation'] == "resolve"){ res.redirect('/'+v+'/data-upload/courses/resolve'); } else if (req.session.data['course-validation'] == "upload"){ res.redirect('/'+v+'/data-upload/courses'); } else if (req.session.data['course-validation'] == "delete"){ delete req.session.data['dm3courses-deleted']; delete req.session.data['dm3courses-resolved']; res.redirect('/'+v+'/data-upload/courses/delete'); } }) router.post('/'+v+'/data-upload/courses/resolve/delete', function (req, res) { // convert the row to be deleted from a string to a number so it matches the row count on the resolve screen req.session.data['dm3courses-deleted'].push( parseInt(req.session.data['deleterow']) ); // remove variable that contains row to be deleted delete req.session.data['deleterow']; // Check to see if there are still errors and redirect accordingly if (req.session.data['dm3courses-errorcount'] == (parseInt(req.session.data['dm3courses-deleted'].length) + parseInt(req.session.data['dm3courses-resolved'].length))){ res.redirect('/'+v+'/data-upload/courses/checkandpublish'); } else { res.redirect('/'+v+'/data-upload/courses/resolve'); } }) router.get('/'+v+'/data-upload/courses/resolve/showcourse', function (req, res) { var coursestartdate = req.session.data['dm3courses'][req.session.data['row']-1].START_DATE; req.session.data["coursestartdate"] = coursestartdate.split('/'); res.redirect('/'+v+'/data-upload/courses/resolve/course'); }) router.post('/'+v+'/data-upload/courses/resolve/course', function (req, res) { // convert the row to be deleted from a string to a number so it matches the row count on the resolve screen req.session.data['dm3courses-resolved'].push( parseInt(req.session.data['resolverow']) ); // remove variable that contains row to be deleted delete req.session.data['resolverow']; // Check to see if there are still errors and redirect accordingly if (req.session.data['dm3courses-errorcount'] == (parseInt(req.session.data['dm3courses-deleted'].length) + parseInt(req.session.data['dm3courses-resolved'].length))){ res.redirect('/'+v+'/data-upload/courses/checkandpublish'); } else { res.redirect('/'+v+'/data-upload/courses/resolve'); } }) router.post('/'+v+'/data-upload/courses/checkandpublish', function (req, res) { req.session.data['dm3courses-published'] = parseInt(req.session.data['dm3courses'].length) - parseInt(req.session.data['dm3courses-deleted'].length); delete req.session.data['dm3courses-deleted']; delete req.session.data['dm3courses-resolved']; res.redirect('/'+v+'/data-upload/courses/success'); }) router.post('/'+v+'/data-upload/courses/cancel', function (req, res) { delete req.session.data['dm3courses-errorcount']; delete req.session.data['dm3courses-deleted']; delete req.session.data['dm3courses-resolved']; res.redirect('/'+v+'/data-upload/courses/cancel/success'); }) }
javascript
<reponame>wwadge/swagger-codegen { "lang" : "java", "inputSpec" : "swagger.yaml", "outputDir" : "src/gen/java", "verbose" : true, "skipOverwrite" : true, "templateDir" : "src/main/resources", "auth" : "hello:world", "apiPackage" : "io.something.api", "modelPackage" : "io.something.models", "invokerPackage" : "io.something.invoker", "groupId" : "io.something", "artifactId" : "awesome-api", "artifactVersion" : "1.2.3", "library" : "jersey2", "ignoreFileOverride": "/path/to/override/.swagger-codegen-ignore", "systemProperties" : { "systemProp1" : "value1" }, "instantiationTypes" : { "hello" : "world" }, "typeMappings" : { "foo" : "bar" }, "additionalProperties" : { "addtProp1" : "value2" }, "importMappings" : { "type1" : "import1" }, "languageSpecificPrimitives" : [ "rolex" ], "localVariablePrefix" : "_" }
json
The program’s learning methods are an assortment of regular class discussions, case studies, group work, live presentations and action-learning opportunities like management games and short consultancy assignments. A significant proportion of the program is undertaken in teams to further enhance the dynamic learning experience. The program unfolds in 8 terms through more than 1030 classroom contact hours, spread across 3 campuses during the 12 month period. It starts with an “Ice breaking session and Breakthrough Management” in IIM-Calcutta with a thrust on the "Big Picture" perspective. The primary focus lies on how to build a strategy based on core competencies and then to integrate an organization to execute this strategy and achieve the desired outcome. The next two terms impart management knowledge in diverse areas ranging from Business Strategy, Marketing, Finance, Operations, People Management and Global Business scenario. Various modules on Supply Chain Management, Customer-centric approach, Lean methodologies, New Product Design & Development, SAP ERP, ISO 9001: Auditor training and some high-end technology related courses like Advanced Materials, Robotics, Ergonomics are being taught in IIT-Kanpur and IIT-Madras campuses. The final term at IIM-Calcutta puts special emphasis on Leadership and Change Management with key focus on building an Entrepreneurial and Innovative culture. The terms also stress on the needs and nuances of Ethics and Ethical behaviour for today’s managers who compete a rapidly globalizing world.
english
<filename>packages/test-helpers/package.json<gh_stars>0 { "name": "@makerdao/test-helpers", "description": "test helpers for the monorepo", "version": "0.3.0", "license": "MIT", "main": "dist/index.js", "browser": "umd/index.js", "unpkg": "umd/index.js", "dependencies": { "node-fetch": "^2.6.0" }, "scripts": { "build": "yarn clean && yarn build:cjs && yarn build:umd", "build:cjs": "../../scripts/build.sh && cp src/testAccounts.json dist", "build:umd": "webpack --config ../../webpack.config.js", "clean": "rm -rf ./dist ./umd", "prepublishOnly": "yarn build", "test": "jest" }, "files": [ "package.json", "LICENSE", "dist/**/*", "umd/*" ] }
json
{ "citations" : [ { "textCitation" : "[See zfreg on Metamath](http://us.metamath.org/mpegif/zfreg.html)" } ], "names" : [ "zfreg" ], "language" : "METAMATH_SET_MM", "lookupTerms" : [ "#T_cA", "#T_wcel", "#T_cvv", "#T_cA", "#T_wne", "#T_c0", "#T_wi", "#T_wrex--1", "#T_vx", "#T_wrex--2", "#T_cA", "#T_vx", "#T_cin", "#T_cA", "#T_wceq", "#T_c0", "#T_cA", "#T_vx" ], "metaLanguage" : "METAMATH", "remarks" : " The Axiom of Regularity using abbreviations. Axiom 6 of [TakeutiZaring] p. 21. This is called the \"weak form.\" There is also a \"strong form,\" not requiring that ` A ` be a set, that can be proved with more difficulty (see ~ zfregs ). (Contributed by NM, 26-Nov-1995.) ", "statement" : "zfreg.1 $e |- A e. _V $.\nzfreg $p |- ( A =/= (/) -> E. x e. A ( x i^i A ) = (/) ) $.\n$d A x $." }
json
<reponame>ikhomyn/keycloak-admin-ui<filename>public/resources/no/users-help.json { "temporaryLocked": "Brukeren kan ha blitt låst på grunn av at innloggingsforsøk har feilet for mange ganger.", "emailVerified": "Har brukerens e-post blitt verifisert?", "requiredUserActions": "Krev en handling når brukeren logger inn. 'Verifiser e-post' sender en e-post til brukeren for å verifisere deres e-postadresse. 'Oppdater profil' krever at bruker legger inn personlig informasjon. 'Oppdater passord' krever at bruker skriver inn et nytt passord. 'Konfigurer OTP' krever installasjon av en passordgenerator for mobil.", "groups": "Gruppen som brukeren er medlem av. Velg en gruppe på listen og klikk på 'Forlat' for å forlate gruppen." }
json
[{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"アケボノ","town_name":"あけぼの","zip_code":"8113220"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"アゼマチ","town_name":"畦町","zip_code":"8113202"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"アラジ","town_name":"在自","zip_code":"8113301"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ウチドノ","town_name":"内殿","zip_code":"8113205"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"オオイシ","town_name":"大石","zip_code":"8113302"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"オダケ","town_name":"小竹","zip_code":"8113226"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"カツウラ","town_name":"勝浦","zip_code":"8113521"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"カミサイゴウ","town_name":"上西郷","zip_code":"8113207"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"コウヨウダイ","town_name":"光陽台","zip_code":"8113223"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"コウヨウダイミナミ","town_name":"光陽台南","zip_code":"8113228"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"サクラガワ","town_name":"桜川","zip_code":"8113229"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"シャリクラ","town_name":"舎利蔵","zip_code":"8113204"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"スダタ","town_name":"須多田","zip_code":"8113303"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"タカヒラ","town_name":"高平","zip_code":"8113227"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"チュウオウ","town_name":"中央","zip_code":"8113217"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ツマル","town_name":"津丸","zip_code":"8113222"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ツヤザキ","town_name":"津屋崎","zip_code":"8113304"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"テビカ","town_name":"手光","zip_code":"8113224"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"テビカミナミ","town_name":"手光南","zip_code":"8113218"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ニシフクマ","town_name":"西福間","zip_code":"8113219"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ヌヤマ","town_name":"奴山","zip_code":"8113522"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ハナミガオカ","town_name":"花見が丘","zip_code":"8113214"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ハナミガハマ","town_name":"花見が浜","zip_code":"8113216"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ハナミノサト","town_name":"花見の里","zip_code":"8113215"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ヒガシフクマ","town_name":"東福間","zip_code":"8113225"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ヒサスエ","town_name":"久末","zip_code":"8113206"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ヒマキノ","town_name":"日蒔野","zip_code":"8113209"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"フクマエキヒガシ","town_name":"福間駅東","zip_code":"8113208"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"フクマミナミ","town_name":"福間南","zip_code":"8113212"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ホシガオカ","town_name":"星ケ丘","zip_code":"8113308"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ミヤジ","town_name":"宮司","zip_code":"8113305"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ミヤジガオカ","town_name":"宮司ヶ丘","zip_code":"8113312"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ミヤジハマ","town_name":"宮司浜","zip_code":"8113311"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ミヤジモトマチ","town_name":"宮司元町","zip_code":"8113309"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"モトギ","town_name":"本木","zip_code":"8113203"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ヤツナミ","town_name":"八並","zip_code":"8113201"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ユクエ","town_name":"生家","zip_code":"8113306"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ユミノサト","town_name":"有弥の里","zip_code":"8113211"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ワカギダイ","town_name":"若木台","zip_code":"8113221"},{"prefecture_jis_code":"40","city_jis_code":"40224","town_name_kana":"ワタリ","town_name":"渡","zip_code":"8113307"}]
json
<reponame>Draww/FulcrumResourceAPI package com.volmit.fulcrum.world.scm; public enum PermutationType { NONE, VERTICAL_AXIS, ANY_AXIS }
java
<filename>model/com/hys/exam/model/CVSet.java package com.hys.exam.model; import java.io.Serializable; import java.util.Date; import java.util.List; public class CVSet implements Serializable { /** * boy */ private static final long serialVersionUID = 3299179869424516827L; private Long id; private String name; private Integer forma;//项目类型 1 远程 , 3 面授 private String code; private List<PropUnit> courseList; private List<UserImage> userImageList; private List<ExpertInfo> managerList; private List<ExpertInfo> teacherList; private List<ExpertInfo> otherTeacherList; private List<PeixunOrg> organizationList; private List<ExamProp> xueKeList; private Integer studentNum; private String introduction; private String announcement; private String file_path; private String knowledge_needed; private String knowledge_base; private String reference; private String reference_lately; private List<CVSchedule> CVScheduleList; private List<SystemSite> siteList; private String serial_number; private Integer level; private Double score; private String serial_number_str;//项目预览专用 private String level_score_str;//项目预览专用 private String start_end_date_str;//项目预览专用 private String cost_sort; private String score_sort; private String recent_create; private String serverName; private Integer edtionId; private Integer propId; private String propName; private List<CV> cvList;// 课程列表 private List<ExamProp> examPropList;//所属学科 private List<CVSetScheduleFaceTeach> faceList;// 面授详情 //学习进度 private double studyProgress; //最近学习章节 private String lastUnitName; //项目评价 add by han. 2017-01-26 private Double critiqueScore1; private Double critiqueScore2; private Double critiqueScore3; private Double critiqueScore4; //书籍推荐 private List<BaseProjectRefModel> refereeBookList; //指南共识 private List<BaseProjectRefModel> knowledgeBaseList; //最新文献 private List<BaseProjectRefModel> referencelatelyList; //0 免费,1 学习卡 ,2 收费(默认都为免费)--tl private Integer cost_type;//0 免费,1 学习卡 ,2 收费(默认都为免费)--tl //项目类型 0继续项目;1乡医培训 private Integer cv_set_type; private boolean commentType; //0 未评价 1,已评价 private Long userProvinceCode; public boolean isCommentType() { return commentType; } public void setCommentType(boolean commentType) { this.commentType = commentType; } public Long getUserProvinceCode() { return userProvinceCode; } public void setUserProvinceCode(Long userProvinceCode) { this.userProvinceCode = userProvinceCode; } public String getSerial_number_str() { return serial_number_str; } public void setSerial_number_str(String serial_number_str) { this.serial_number_str = serial_number_str; } public String getLevel_score_str() { return level_score_str; } public void setLevel_score_str(String level_score_str) { this.level_score_str = level_score_str; } public String getStart_end_date_str() { return start_end_date_str; } public void setStart_end_date_str(String start_end_date_str) { this.start_end_date_str = start_end_date_str; } public Double getCritiqueScore1() { return critiqueScore1; } public void setCritiqueScore1(Double critiqueScore1) { this.critiqueScore1 = critiqueScore1; } public Double getCritiqueScore2() { return critiqueScore2; } public void setCritiqueScore2(Double critiqueScore2) { this.critiqueScore2 = critiqueScore2; } public Double getCritiqueScore3() { return critiqueScore3; } public void setCritiqueScore3(Double critiqueScore3) { this.critiqueScore3 = critiqueScore3; } public Double getCritiqueScore4() { return critiqueScore4; } public void setCritiqueScore4(Double critiqueScore4) { this.critiqueScore4 = critiqueScore4; } public String getLastUnitName() { return lastUnitName; } public void setLastUnitName(String lastUnitName) { this.lastUnitName = lastUnitName; } public double getStudyProgress() { return studyProgress; } public void setStudyProgress(double studyProgress) { this.studyProgress = studyProgress; } public List<ExamProp> getExamPropList() { return examPropList; } public List<CVSetScheduleFaceTeach> getFaceList() { return faceList; } public void setFaceList(List<CVSetScheduleFaceTeach> faceList) { this.faceList = faceList; } public void setExamPropList(List<ExamProp> examPropList) { this.examPropList = examPropList; } public List<CV> getCvList() { return cvList; } public void setCvList(List<CV> cvList) { this.cvList = cvList; } public String getPropName() { return propName; } public void setPropName(String propName) { this.propName = propName; } public List<ExamProp> getXueKeList() { return xueKeList; } public void setXueKeList(List<ExamProp> xueKeList) { this.xueKeList = xueKeList; } public Integer getPropId() { return propId; } public void setPropId(Integer propId) { this.propId = propId; } public Integer getEdtionId() { return edtionId; } public void setEdtionId(Integer edtionId) { this.edtionId = edtionId; } public String getServerName() { return serverName; } public void setServerName(String serverName) { this.serverName = serverName; } public String getRecent_create() { return recent_create; } public void setRecent_create(String recent_create) { this.recent_create = recent_create; } private Double cost; private Integer type; private Integer status; private String maker; private Date start_date; private Date end_date; private Date create_date; private Date deli_date; private Long break_days; private String sign; //标签 private Long provinceId; private Long cityId; private String deli_man; private String opinion; private String opinionType; private String flag; private Integer studyTimes; private Double grade; public Double getGrade() { return grade; } public void setGrade(Double grade) { this.grade = grade; } public Integer getStudyTimes() { return studyTimes; } public void setStudyTimes(Integer studyTimes) { this.studyTimes = studyTimes; } public String getScore_sort() { return score_sort; } public void setScore_sort(String score_sort) { this.score_sort = score_sort; } public String getCost_sort() { return cost_sort; } public void setCost_sort(String cost_sort) { this.cost_sort = cost_sort; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getForma() { return forma; } public void setForma(Integer forma) { this.forma = forma; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public List<UserImage> getUserImageList() { return userImageList; } public void setUserImageList(List<UserImage> userImageList) { this.userImageList = userImageList; } public List<ExpertInfo> getManagerList() { return managerList; } public void setManagerList(List<ExpertInfo> managerList) { this.managerList = managerList; } public List<ExpertInfo> getTeacherList() { return teacherList; } public void setTeacherList(List<ExpertInfo> teacherList) { this.teacherList = teacherList; } public List<ExpertInfo> getOtherTeacherList() { return otherTeacherList; } public void setOtherTeacherList(List<ExpertInfo> otherTeacherList) { this.otherTeacherList = otherTeacherList; } public String getIntroduction() { return introduction; } public void setIntroduction(String introduction) { this.introduction = introduction; } public String getAnnouncement() { return announcement; } public void setAnnouncement(String announcement) { this.announcement = announcement; } public String getFile_path() { return file_path; } public void setFile_path(String file_path) { this.file_path = file_path; } public String getKnowledge_base() { return knowledge_base; } public void setKnowledge_base(String knowledge_base) { this.knowledge_base = knowledge_base; } public String getReference() { return reference; } public void setReference(String reference) { this.reference = reference; } public String getReference_lately() { return reference_lately; } public void setReference_lately(String reference_lately) { this.reference_lately = reference_lately; } public List<CVSchedule> getCVScheduleList() { return CVScheduleList; } public void setCVScheduleList(List<CVSchedule> cVScheduleList) { CVScheduleList = cVScheduleList; } public List<SystemSite> getSiteList() { return siteList; } public void setSiteList(List<SystemSite> siteList) { this.siteList = siteList; } public String getSerial_number() { return serial_number; } public void setSerial_number(String serial_number) { this.serial_number = serial_number; } public Integer getLevel() { return level; } public void setLevel(Integer level) { this.level = level; } public Double getScore() { return score; } public void setScore(Double score) { this.score = score; } public Double getCost() { return cost; } public void setCost(Double cost) { this.cost = cost; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public Date getStart_date() { return start_date; } public void setStart_date(Date start_date) { this.start_date = start_date; } public Date getEnd_date() { return end_date; } public void setEnd_date(Date end_date) { this.end_date = end_date; } public Long getBreak_days() { return break_days; } public void setBreak_days(Long break_days) { this.break_days = break_days; } public String getKnowledge_needed() { return knowledge_needed; } public void setKnowledge_needed(String knowledge_needed) { this.knowledge_needed = knowledge_needed; } public List<PropUnit> getCourseList() { return courseList; } public void setCourseList(List<PropUnit> courseList) { this.courseList = courseList; } public Integer getStatus() { return status; } public void setStatus(Integer cVSetStatus) { this.status = cVSetStatus; } public String getMaker() { return maker; } public void setMaker(String maker) { this.maker = maker; } public String getDeli_man() { return deli_man; } public void setDeli_man(String deli_man) { this.deli_man = deli_man; } public Date getCreate_date() { return create_date; } public void setCreate_date(Date create_date) { this.create_date = create_date; } public Date getDeli_date() { return deli_date; } public void setDeli_date(Date deli_date) { this.deli_date = deli_date; } public String getSign() { return sign; } public void setSign(String sign) { this.sign = sign; } public String getOpinion() { return opinion; } public void setOpinion(String opinion) { this.opinion = opinion; } public Long getProvinceId() { return provinceId; } public void setProvinceId(Long provinceId) { this.provinceId = provinceId; } public Long getCityId() { return cityId; } public void setCityId(Long cityId) { this.cityId = cityId; } public String getOpinionType() { return opinionType; } public void setOpinionType(String opinionType) { this.opinionType = opinionType; } public List<PeixunOrg> getOrganizationList() { return organizationList; } public void setOrganizationList(List<PeixunOrg> organizationList) { this.organizationList = organizationList; } public String getFlag() { return flag; } public void setFlag(String flag) { this.flag = flag; } public Integer getStudentNum() { return studentNum; } public void setStudentNum(Integer studentNum) { this.studentNum = studentNum; } public List<BaseProjectRefModel> getRefereeBookList() { return refereeBookList; } public void setRefereeBookList(List<BaseProjectRefModel> refereeBookList) { this.refereeBookList = refereeBookList; } public List<BaseProjectRefModel> getKnowledgeBaseList() { return knowledgeBaseList; } public void setKnowledgeBaseList(List<BaseProjectRefModel> knowledgeBaseList) { this.knowledgeBaseList = knowledgeBaseList; } public List<BaseProjectRefModel> getReferencelatelyList() { return referencelatelyList; } public void setReferencelatelyList(List<BaseProjectRefModel> referencelatelyList) { this.referencelatelyList = referencelatelyList; } public Integer getCost_type() { return cost_type; } public void setCost_type(Integer cost_type) { this.cost_type = cost_type; } public Integer getCv_set_type() { return cv_set_type; } public void setCv_set_type(Integer cv_set_type) { this.cv_set_type = cv_set_type; } }
java
<reponame>Pirate5946/techframework package test.base; import org.junit.Test; import org.junit.Before; import org.junit.After; /** * Test Tester. * * @author <Authors name> * @since <pre>5月 1, 2020</pre> * @version 1.0 */ public class TestTest { base.Test test; @Before public void before() throws Exception { test = new base.Test(); } @After public void after() throws Exception { } /** * * Method: testCtl() * */ @Test public void testTestCtl() throws Exception { //TODO: Test goes here... test.testCtl(); } /** * * Method: main(String[] args) * */ @Test public void testMain() throws Exception { //TODO: Test goes here... } /** * * Method: getBinaryFromInt(int i) * */ @Test public void testGetBinaryFromInt() throws Exception { //TODO: Test goes here... } /** * * Method: test1(int i) * */ @Test public void testTest1() throws Exception { //TODO: Test goes here... } /** * * Method: test2() * */ @Test public void testTest2() throws Exception { //TODO: Test goes here... } /** * * Method: workerCountOf(int c) * */ @Test public void testWorkerCountOf() throws Exception { //TODO: Test goes here... /* try { Method method = Test.getClass().getMethod("workerCountOf", int.class); method.setAccessible(true); method.invoke(<Object>, <Parameters>); } catch(NoSuchMethodException e) { } catch(IllegalAccessException e) { } catch(InvocationTargetException e) { } */ } /** * * Method: ctlOf(int rs, int wc) * */ @Test public void testCtlOf() throws Exception { //TODO: Test goes here... /* try { Method method = Test.getClass().getMethod("ctlOf", int.class, int.class); method.setAccessible(true); method.invoke(<Object>, <Parameters>); } catch(NoSuchMethodException e) { } catch(IllegalAccessException e) { } catch(InvocationTargetException e) { } */ } // 测试 git rebase 1 // 测试 git rebase 222 }
java
Pegasus camp is situated near Pondicherry on sea beach. It is a professional camp which organises training camp for organisations varying from schools to giant corporates. We went in a team of 25 people for 2 days, 2 nights. We left Chennai for the camp and reached by 7 pm. We were accomodated into our beautiful sheds,followed by coffee and snacks. All activities were scheduled to start next day. After relaxing for a while, we headed for dining hall to have very delicious chicken😀. They provide three meals a day during stay and the quality of food was really good. The premise of the camp is spread in huge area, and it's very naturally planned and is very close to nature, and seemed more like a spiritual site, where only noise was of soothing sea waves. Next morning we woke up early to experience sunrise from beach. The beach was totally sort of unmanned and super clean unlike beaches in Chennai which are crowded and dirty. We spent a beautiful morning at beach. As the day proceeded, we were surprised to get involved in quantum of quality team activities which were super fun and brought significant corporate learning with each activity as well. The activities were the most beautiful and fun part of Pegasus trip. We learnt a lot and had very memorable time together as a team. We had around 3 major activities each day, which required a dedicated team effort mentally and physically. The activities constantly questioned our perspectives about life and work, and we came out of the camp as a more matured person for sure, both personally as well as professionally.
english
<filename>fedml_api/distributed/fedavg_robust/FedAvgRobustAPI.py from mpi4py import MPI from fedml_api.distributed.fedavg_robust.FedAvgRobustAggregator import FedAvgRobustAggregator from fedml_api.distributed.fedavg_robust.FedAvgRobustClientManager import FedAvgRobustClientManager from fedml_api.distributed.fedavg_robust.FedAvgRobustServerManager import FedAvgRobustServerManager from fedml_api.distributed.fedavg_robust.FedAvgRobustTrainer import FedAvgRobustTrainer def FedML_init(): comm = MPI.COMM_WORLD process_id = comm.Get_rank() worker_number = comm.Get_size() return comm, process_id, worker_number def FedML_FedAvgRobust_distributed(process_id, worker_number, device, comm, model, train_data_num, train_data_global, test_data_global, train_data_local_num_dict, train_data_local_dict, test_data_local_dict, poisoned_train_loader, targetted_task_test_loader, num_dps_poisoned_dataset, args): if process_id == 0: init_server(args, device, comm, process_id, worker_number, model, train_data_num, train_data_global, test_data_global, train_data_local_dict, test_data_local_dict, train_data_local_num_dict, targetted_task_test_loader) else: init_client(args, device, comm, process_id, worker_number, model, train_data_num, train_data_local_num_dict, train_data_local_dict, poisoned_train_loader, num_dps_poisoned_dataset) def init_server(args, device, comm, rank, size, model, train_data_num, train_data_global, test_data_global, train_data_local_dict, test_data_local_dict, train_data_local_num_dict, targetted_task_test_loader): # aggregator worker_num = size - 1 aggregator = FedAvgRobustAggregator(train_data_global, test_data_global, train_data_num, train_data_local_dict, test_data_local_dict, train_data_local_num_dict, worker_num, device, model, targetted_task_test_loader, args) # start the distributed training server_manager = FedAvgRobustServerManager(args, aggregator, comm, rank, size) server_manager.send_init_msg() server_manager.run() def init_client(args, device, comm, process_id, size, model, train_data_num, train_data_local_num_dict, train_data_local_dict, poisoned_train_loader, num_dps_poisoned_dataset): # trainer client_index = process_id - 1 trainer = FedAvgRobustTrainer(client_index, train_data_local_dict, train_data_local_num_dict, train_data_num, device, model, poisoned_train_loader, num_dps_poisoned_dataset, args) client_manager = FedAvgRobustClientManager(args, trainer, comm, process_id, size) client_manager.run()
python
<reponame>clemsos/fabric-node-deploy #!/usr/bin/env python # -*- coding: utf-8 -*- from fabric.api import * from fabric.contrib import files import os from settings import * # create RUN_DIR=os.path.join(HOME_DIR, "run") LOG_DIR=os.path.join(HOME_DIR, "log") REMOTE_REPO_DIR = os.path.join(HOME_DIR, APP_NAME) OUT_LOG_FILE = os.path.join(LOG_DIR, 'out.log') ERROR_LOG_FILE = os.path.join(LOG_DIR, 'error.log') def uptime(): """ Show number of active connections on the server """ run('uptime') def remote_info(): """ Get name and info of remote host """ run('uname -a') def local_info(): """ Get name and info of local host """ local('uname -a') def create_dirs(): """ Create directory to store logs, PID, etc """ run("mkdir -p %s"%RUN_DIR) run("mkdir -p %s"%LOG_DIR) def update_code_from_git(): """ Download latest version of the code from git """ if not files.exists(REMOTE_REPO_DIR): with cd(HOME_DIR): run("git clone %s" % MAIN_GITHUB_REP ) with cd(REMOTE_REPO_DIR): run("git pull") def update_requirements(): """ Update external dependencies on host """ with cd(REMOTE_REPO_DIR): cmd = ['npm install'] # cmd += ['--requirement %s' % os.path.join(CODE_DIR,'requirements.txt')] run(' '.join(cmd)) def start(): with cd(REMOTE_REPO_DIR): cmd = "export PORT=%s && forever start -o %s -e %s -a index.js -p %s"%( APP_PORT, OUT_LOG_FILE, ERROR_LOG_FILE, RUN_DIR) run(cmd) def stop(): with cd(REMOTE_REPO_DIR): cmd = "forever stop -l %s -a index.js -p %s"%(APP_PORT, RUN_DIR) run(cmd) def restart(): with cd(REMOTE_REPO_DIR): cmd = "forever restart -l %s -a index.js -p %s"%(APP_PORT, RUN_DIR) run(cmd) def error_log(): run("tail -200 %s"%ERROR_LOG_FILE) def out_log(): run("tail -200 %s"%OUT_LOG_FILE) def init(): """ Init setup of the project """ pass def deploy(): """ Update the project """ create_dirs() update_code_from_git() update_requirements() restart()
python
Alaya Furniturewalla is good at everything and her face-painting skills are particularly impressive - there's proof on her Instagram. Alaya's grandfather, veteran actor Kabir Bedi, thinks so too. For Halloween recently, Alaya Furniturewalla decided to sport a spooky look on half of her face and picked up the brush and paint in order to do so. She shared the final result in a brief Instagram video, writing: "I still have black paint stuck in my nails. " Kabir Bedi was one of the first ones to drop a comment, who clearly loved Alaya's Halloween look and wrote: "WOW! That is so brilliant, Alaya! Great! " Needless to say that Alaya's Instafam also loved her Halloween persona and showered her with a whole lot of love in the comments section. What do you think of Alaya Furniturewalla's Halloween look? We love it. Alaya Furniturewalla's face-painting spree kicked in when she "ran out of art sheets" and had to use her face as canvas. She captioned another face-painting video this way: "SOS: Send help or art sheets. . . both will do me good. " Among other things, Alaya Furniturewalla takes her paintings very seriously. Here's what she posted on Earth Day: "This drawing of mine took a lot of time and I think it's my favourite one so far! My little tribute to Mother Earth. " The wanderers of life are made of earth and sky. They see the universe with stars in their eyes. . This drawing of mine took a lot of time and I think it's my favourite one so far! My little tribute to Mother Earth🤍 (Swipe to the other images to see it close up and the process) Made only with fine liner pens (sizes 0. 05-2) Alaya Furniturewalla made her Bollywood debut this year with Jawaani Jaaneman, in which she co-starred with Saif Ali Khan and Tabu. Alaya is the daughter of Pooja Bedi and her ex-husband Farhan Furniturewalla - the former couple divorced in 2003.
english
{"t":"koemihay","h":[{"d":[{"f":"(指物體內部)鬆弛,鬆軟,糠心。"},{"f":"鬆弛的,鬆軟的,糠心的。","e":["`Koemih~`ay~ `ko~ `kamaro'an~ `ako~.我的座位很鬆軟。","`Koemih~`ay~ `koni~ `a~ `tefos~.這根甘蔗是糠心的。","`Koemih~`ay~ `a~ `saytaw~.糠心蘿蔔。"]}]}],"stem":"koemih"}
json
<gh_stars>10-100 //! Checks that the task priority is reset whenever a task is activated. use r3::{ hunk::Hunk, kernel::{prelude::*, traits, Cfg, StaticTask}, }; use super::Driver; use crate::utils::SeqTracker; pub trait SupportedSystem: traits::KernelBase + traits::KernelTaskSetPriority + traits::KernelStatic { } impl<T: traits::KernelBase + traits::KernelTaskSetPriority + traits::KernelStatic> SupportedSystem for T { } pub struct App<System: SupportedSystem> { task2: StaticTask<System>, seq: Hunk<System, SeqTracker>, } impl<System: SupportedSystem> App<System> { pub const fn new<C, D: Driver<Self>>(b: &mut Cfg<C>) -> Self where C: ~const traits::CfgBase<System = System> + ~const traits::CfgTask, { StaticTask::define() .start(task1_body::<System, D>) .priority(1) .active(true) .finish(b); let task2 = StaticTask::define() .start(task2_body::<System, D>) .priority(2) .active(true) .finish(b); let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, seq } } } fn task1_body<System: SupportedSystem, D: Driver<App<System>>>() { // `task1` executes first because it has a higher priority. D::app().seq.expect_and_replace(0, 1); assert_eq!(D::app().task2.priority(), Ok(2)); assert_eq!(D::app().task2.effective_priority(), Ok(2)); // Raise `task2`'s priority to higher than `task1`. `task2` will start // executing. D::app().task2.set_priority(0).unwrap(); // Back from `task2`... D::app().seq.expect_and_replace(2, 3); // Activate `task2` again. Its priority is back to the initial value // (lower than `task1`). This time we don't raise its priority, so the // system won't perform a context switch until `task1` exits. D::app().task2.activate().unwrap(); D::app().seq.expect_and_replace(3, 4); assert_eq!(D::app().task2.priority(), Ok(2)); assert_eq!(D::app().task2.effective_priority(), Ok(2)); // Exit from `task1`, relinquishing the control to `task2`. } fn task2_body<System: SupportedSystem, D: Driver<App<System>>>() { match D::app().seq.get() { 1 => { D::app().seq.expect_and_replace(1, 2); assert_eq!(D::app().task2.priority(), Ok(0)); assert_eq!(D::app().task2.effective_priority(), Ok(0)); } _ => { D::app().seq.expect_and_replace(4, 5); D::success(); } } }
rust
Davos: Reflecting an acute shortage of skilled labour force and difficult business conditions, India has slipped 11 places to rank 89th on a global index of talent competitiveness, a list which has been topped by Switzerland. Switzerland is followed by Singapore, Luxembourg, the US and Denmark in the top five positions on the annual Global Talent Competitiveness Index (GTC) released today by INSEAD business school in partnership with Adecco Group and the Human Capital Leadership Institute of Singapore. India's ranking is worst among the five BRICS countries, with China leading the pack with a global rank of 48. Last year, India was ranked 78th on the index that measures a nation's competitiveness based on the quality of talent it can produce, attract and retain. It is released every year on the first day of the World Economic Forum (WEF) Annual Meeting here. Stating that India and China remain a net exporter of talent, the study said many emerging countries that have invested in higher education have neglected vocational education. "In both China and India skill shortage in vocational talent shows up clearly in the GTCI scores, as it also does in South Africa. "This last year has seen a cooling off in the growth of emerging markets, and indeed we note the relative decline in the talent competitiveness of all BRICS countries except Russia," the study said. It noted that this is particularly the case in Brazil, where talent capabilities show signs of weakening on all fronts despite relatively low scores in vocational skills, China continues to strengthen in growing talent. "In India, there are no signs of an improved regulatory and market landscape to enable the 'Make in India' campaign. This gap in terms of vocational skills, however, is not limited to BRICs and emerging economies: GTCI data shows that it extends to a number of high-income countries, such as Ireland, Belgium or Spain," the report noted. According to the report, another challenge for countries such as China and India is to attract talent from abroad, particularly in the context of large emigration rates of high-skilled people in the past. "China has a low performance in terms of Attract (71st), and India shows one of the worst scores (103rd) - particularly affected by the lack of international students and, unlike China, by not being able to attract and retain global talent (so being more at risk of a brain drain despite the connection with the diasporas working the IT sector)," it added. The improvement of India would have the greatest impact in terms of the pool of talent not only in the region but also globally, the report said. The report noted that mobility has become key to talent development and creative talent cann't be developed if international mobility and 'brain circulation' are not encouraged. Adecco Group CEO Alain Dehaze said the world of work is changing faster than ever, bringing both great opportunities and challenges. "200 million people are unemployed and about 1 in 2 jobs are at risk due to automation. . . Employers should foster talent mobility and invest in hyper-connectivity to capitalize on technology, harness the opportunities offered by the global economy and create jobs," he added. (This story has not been edited by NDTV staff and is auto-generated from a syndicated feed. )
english
<filename>server/EHR/MongoDB/getHospital.js const { mongoose } = require("./mongoose"); const { Hospital } = require("../models/Hospital"); let getHospitalName = id => { return new Promise((resolve, reject) => { Hospital.findById({ _id: id }).then(doc => { let data = {}; data.name = doc.HospitalName; data.StaffName = doc.StaffName; resolve(data); }); }); }; // getHospitalName("HS12345").then(data => { // console.log(data); // }); // let newHospital = new Hospital({ // _id: "HS12345", // HospitalName: "Civil Hospital Solapur", // StaffId: "DOC12345", // StaffName: "<NAME>" // }) // .save() // .then(doc => { // console.log("done"); // }); module.exports = { getHospitalName };
javascript
Hall of Famer and TNT analyst Charles Barkley trolls the LA Lakers, asking LeBron James’ eldest son Bronny James to join the team. Charles Barkley went on a rant against the Lakers post their embarrassing loss against the Clippers. The former MVP even refused to call the team by its name, addressing it as the team from Southern California. The Chuckster was in no mood to talk about the team. The Lakers continue to be the face of social media trolls and memes with their string of poor performances. The latest was against the Clippers, who completed a 4-0 season sweep against the Lakers. The loss came against a Clippers team devoid of Kawhi Leonard and Paul George. Thus Barkley was having no more of the Lakers, making it evident. The Inside the NBA analyst has been skeptical about their 2021-22 revamped roster, going to the extent of calling them, old geezers. Thus with the season turning out to be a potential bust, Barkley didn’t hesitate to mock the Lakers. The Chuckster asked his co-panelists Shaquille O’Neal, Kenny Smith, and Ernie Johnson if Bronny James gets on the team this season would he come off the bench or start. Charles Barkley asks Bronny James to save his father’s team. The Lakers are eight games below +500 and are two losses away from being out of the play-in contention. Nothing seems to be clicking for the purple and gold at this time. Anthony Davis’ injury-prone nature and Russell Westbrook’s underperformance have cost the team. On the other hand, a 37-year old LeBron James continues to be the sole engine of the team. During the All-Star break, James had spoken about teaming up with his son Bronny. Thus after the loss against the Clippers, Barkley wondered if Bronny was going to join the team this season. “Bronny, c’mon, we need you out of Sierra Canyon,” said Barkley. The purple and gold team traded a lot of its young core boasting Kyle Kuzma, KCP, and Motrezl Harrell to accommodate Westbrook. This front office signed a group of seasoned veterans in Dwight Howard, Carmelo Anthony, and Trevor Ariza. However, none of the moves have paid dividends so far. There is no denying it would be an incredible sight to watch Bronny and LeBron hoop together, making them the first father-son duo in the history of the NBA.
english
Ace Kiwi speedster Trent Boult has not been named in the New Zealand squad for the T20I and ODI series against India, slated to begin on Friday, November 18. The pacer has not been included as he had opted out of his central contract earlier this year, and the management felt that players who have central or domestic contracts need to be given priority now. It is important to note that Boult was a part of New Zealand's T20 World Cup squad, and the side's campaign saw their exit from semis. Head coach Gary Stead spoke further about why Boult has not been named in the squad after the team was announced. When Trent opted out of his NZC contract in August, we indicated that priority would be given to those players with either central or domestic contracts, and that's been the case here," Stead said in an official release issued by New Zealand Cricket. "We're all aware of Trent's world-class ability, but at this time - as we build towards more global events, we want to give opportunities and experiences to others," he added. New Zealand host fellow T20 World Cup semi-finalists India in three T20s starting in Wellington on Friday. The teams then play three ODI matches from Nov. 25. Fast bowlers Ben Sears and Kyle Jamieson were not considered for selection due to back injuries. New Zealand were runners-up to England at the 50-over World Cup in 2019. India host the next one in October/November in 2023.
english
<reponame>parameter1/base-cms<filename>packages/marko-web/components/marko.json<gh_stars>0 { "taglib-imports": [ "./document/marko.json", "./element/marko.json", "./load-more/marko.json", "./node/marko.json", "./node-list/marko.json", "./page/marko.json", "./resolve/marko.json", "./rss/marko.json" ], "<marko-web-browser-component>": { "template": "./browser-component.marko", "@name": { "type": "string", "required": true }, "@hydrate": "boolean", "@ssr": "boolean", "@tag": "string", "@class": "string", "@attrs": "object", "@props": "object" } }
json
Lahore: Citing the reason for rising sugar prices in the domestic market, the Progressive Group composed of the members of the Lahore Chamber has urged the government to ban sugar exports, reports Pakistani media. The Group has issued a statement stating that the rising sugar prices are affecting industries as well as consumers and the sugar mafia as well as hoarders are behind the rising sugar prices. They have demanded the government take immediate steps to keep a check on the hoarders and ensure that the sugar prices in the market are not rising. They have expressed fear that an increase in the export of sugar would lead to a shortage of the commodity in the domestic market further fuelling price rise.
english
Every application of language and speech technology deals with real text, where numeric, temporal and web expressions are very common.Identification of these expressions becomes an essential and important task. Automation of their identification requires building of a dedicated module. The paper describes the pattern matching scheme to identify numerical, temporal and web expression in Hindi text.
english
There’s a general malaise growing around IoT. After years of hype, more hype and even more hype, people are now starting to wonder: Where is this shiny, artificially intelligent, fully connected future of things we were promised? Certainly a botnet of hacked IoT devices launching one of the largest DDoS attacks ever seen has not helped. Part of the problem, like with any massive transformation, is because of the nature of exponential growth curves: Change takes time, and will come more slowly at first. But the other problem is us: Our stubborn attachment to a label that, for example, places wind turbine vibration sensors in the same jargon-bucket as a voice-activated home speaker that can control our lights. This giant market we call the “Internet of Things,” encompassing everything from wearables to autonomous vehicles to smart homes/factories/cities, simply does not exist. Yes, there is change afoot, transforming our industries, lives and world. Change driven by fundamental technological shifts: cheaper, more powerful hardware; nearly ubiquitous connectivity; cloud computing. But there is no broad, homogeneous set of applications that we can call IoT. Instead, there are many, varied sets of applications, each enabled by the same tech trends, but manifesting themselves in different ways. In order for us to ensure that we develop a world where the benefits of connected devices outweigh their risks, we need to start looking more closely at what is going on. We are witnessing an evolution of computing, as it expands from mainframes (one computer for many people) to desktops (one computer per person) to mobile (multiple computers per person) to the phenomenon we see today (one-to-many computers per “thing”). We are entering a new wave of computing ... one driven by a world of connected devices. But the devices in this latest computing wave are different in an important way from the ones before it: They’re incredibly diverse. PCs were nearly identical, almost all running the same OS (if you remember, we even called them “clones”). Mobile-phone hardware is somewhat more varied, but we’re down to two operating systems (and the need for app developers to have a consistent set of APIs has reduced hardware variability even more). “IoT” devices, however, are defined by a variety of constraints: available power, connectivity/bandwidth, computation, cost. Often these constraints are entwined: less available power → lower power data transmission (or longer duty cycles between engaging the radio) → low available bandwidth. These constraints are set by the environment within which these devices are serving. For example, connected home products are often not energy limited (powered via electrical outlet) and enjoy high bandwidth (via Wi-Fi/Ethernet), but may be cost-constrained by consumer budgets. On the other hand, sensors used in oil and gas may have a larger budget, but with limited power and network access because of the remote nature of the work. These constraints can also translate into entirely different network topologies. For example, your Amazon Echo talks directly to the internet via Wi-Fi. But in a factory, low-powered sensors can communicate via a low-power protocol (e.g. Zigbee) to a local gateway, which then could use Wi-Fi/Ethernet to communicate upstream. And in a remote mine, sensors may communicate via multi-hop mesh back to a gateway, which may then use a cellular network to transmit upstream. And of course, these environments can also lead to entirely different businesses: e.g. a direct-to-consumer or retail model for consumer products, an enterprise sales model for industrial sensors or an RFP-driven process for smart-city devices. There is a rich diversity at work here, far greater than what we have seen before in PCs or mobile phones. These “Internet of Things” devices represent a broad spectrum of reds, greens, blues, violets; yet we continue to lump them all under a bland white umbrella, losing what makes each color so unique. And this hampers our ability to understand and serve these markets. Let’s be clear: We are entering a new wave of computing, one that will engender even more change than the ones before, one driven by a world of connected devices. But let’s also recognize that this phenomenon is enabling change in many different ways, each of which is its own precious little snowflake: smart home, connected vehicles, preventive maintenance, precision agriculture, asset tracking, fleet management and so on. I have no crystal ball: I don’t know how long it will take for this phenomenon to gestate across these various applications, nor which of these trees will bear fruit sooner rather than later. The sooner we expand our language, the sooner we expand our world. Thanks to Mike Freedman and Andrew Staller for reading drafts of this article.
english
<reponame>xzhan96/chromium.src // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "blimp/client/test/contents/mock_blimp_contents_observer.h" namespace blimp { namespace client { MockBlimpContentsObserver::MockBlimpContentsObserver(BlimpContents* contents) : BlimpContentsObserver(contents) {} MockBlimpContentsObserver::~MockBlimpContentsObserver() = default; } // namespace client } // namespace blimp
cpp
<reponame>gridbugs/shadowcast<filename>src/shadowcast.rs use crate::octants::*; use coord_2d::{Coord, Size}; pub use direction::DirectionBitmap; use num_traits::Zero; #[cfg(feature = "serialize")] use serde::{Deserialize, Serialize}; use std::cmp; use std::mem; use std::ops::Sub; pub trait InputGrid { type Grid; type Opacity; fn size(&self, grid: &Self::Grid) -> Size; fn get_opacity(&self, grid: &Self::Grid, coord: Coord) -> Self::Opacity; } pub trait VisionDistance: Copy { fn in_range(self, delta: Coord) -> bool; } pub mod vision_distance { use super::VisionDistance; use coord_2d::Coord; #[cfg(feature = "serialize")] use serde::{Deserialize, Serialize}; use std::cmp; #[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))] #[derive(Debug, Clone, Copy)] pub struct Circle { distance_squared: u32, } impl Circle { pub const fn new_squared(distance_squared: u32) -> Self { Self { distance_squared } } pub const fn new(distance: u32) -> Self { Self::new_squared(distance * distance) } pub const fn distance_squared(self) -> u32 { self.distance_squared } } impl VisionDistance for Circle { fn in_range(self, delta: Coord) -> bool { ((delta.x * delta.x + delta.y * delta.y) as u32) <= self.distance_squared } } #[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))] #[derive(Debug, Clone, Copy)] pub struct Square { distance: u32, } impl Square { pub const fn new(distance: u32) -> Self { Self { distance } } pub const fn distance(self) -> u32 { self.distance } } impl VisionDistance for Square { fn in_range(self, delta: Coord) -> bool { cmp::max(delta.x.abs(), delta.y.abs()) as u32 <= self.distance } } #[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))] #[derive(Debug, Clone, Copy)] pub struct Diamond { distance: u32, } impl Diamond { pub const fn new(distance: u32) -> Self { Self { distance } } pub const fn distance(self) -> u32 { self.distance } } impl VisionDistance for Diamond { fn in_range(self, delta: Coord) -> bool { ((delta.x.abs() + delta.y.abs()) as u32) <= self.distance } } } #[derive(Debug, Clone, Copy)] struct Gradient { lateral: i32, depth: i32, } impl PartialEq for Gradient { fn eq(&self, other: &Self) -> bool { self.lateral * other.depth == self.depth * other.lateral } } impl Gradient { fn new(lateral: i32, depth: i32) -> Self { Self { lateral, depth } } } struct StaticParams<'a, I: 'a + InputGrid, Visibility, VisDist> { centre: Coord, vision_distance: VisDist, input_grid: &'a I, grid: &'a I::Grid, width: i32, height: i32, initial_visibility: Visibility, } impl<'a, I: InputGrid, Visibility, VisDist> StaticParams<'a, I, Visibility, VisDist> { fn get_opacity(&self, coord: Coord) -> I::Opacity { self.input_grid.get_opacity(&self.grid, coord) } } #[derive(Clone, Debug)] struct ScanParams<Visibility> { min_gradient: Gradient, max_gradient: Gradient, min_inclusive: bool, depth: i32, visibility: Visibility, } impl<Visibility> ScanParams<Visibility> { fn octant_base(visibility: Visibility) -> Self { Self { min_gradient: Gradient::new(0, 1), max_gradient: Gradient::new(1, 1), min_inclusive: true, depth: 1, visibility, } } } struct CornerInfo<Visibility> { bitmap: DirectionBitmap, coord: Coord, visibility: Visibility, } fn scan<I, Visibility, O, VisDist, F>( octant: &O, next: &mut Vec<ScanParams<Visibility>>, params: ScanParams<Visibility>, static_params: &StaticParams<I, Visibility, VisDist>, f: &mut F, ) -> Option<CornerInfo<Visibility>> where I: InputGrid, O: Octant, Visibility: Copy + Zero + PartialOrd<I::Opacity> + PartialOrd + Sub<I::Opacity, Output = Visibility>, VisDist: VisionDistance, F: FnMut(Coord, DirectionBitmap, Visibility), { let ScanParams { mut min_gradient, max_gradient, mut min_inclusive, depth, visibility, } = params; let depth_index = if let Some(depth_index) = octant.depth_index(static_params.centre, depth) { depth_index } else { // depth puts this strip out of bounds within the current octant return None; }; // the distance in half-cells between the centre of the row being scanned // and the centre of the eye let mid_gradient_depth = depth * 2; let front_gradient_depth = mid_gradient_depth - 1; let back_gradient_depth = mid_gradient_depth + 1; let effective_gradient_depth = mid_gradient_depth; let lateral_min = { // We're interested in the width in half-cells of the right triangle which is // similar to min_gradient, and whose depth is effective_gradient_depth. Since the // eye is in the centre of a cell, the lateral min index will be half of (this // width + 1). It's incremented to account for the eye being in the centre of its // cell (ie. 1 half-cell to the right of the left edge of the cell. It's halved // because the computed width will be in half-cells. // // Similar triangles: // width_half_cells / effective_gradient_depth = // min_gradient.lateral / min_gradient.depth // // Thus: // width_half_cells = (min_gradient.lateral * effective_gradient_depth) / // min_gradient.depth // // Since the eye is in the centre of a cell: // offset_half_cells = 1 + width_half_cells // = 1 + ((min_gradient.lateral * effective_gradient_depth) / // min_gradient.depth) // = (min_gradient_depth + (min_gradient.lateral * // effectivte_gradient_depth)) / min_gradient.depth // // So the offset in cells is: // offset_cells = offset_half_cells / 2 // = (min_gradient_depth + // (min_gradient.lateral * effective_gradient_depth)) / // (min_gradient.depth * 2) // // Finally, if this section is not min_inclusive, we skip the first index, // increment the result by 1. ((min_gradient.depth + (min_gradient.lateral * effective_gradient_depth)) / (min_gradient.depth * 2)) + ((!min_inclusive) as i32) }; let lateral_max = { // This computation is much the same as for lateral_min above. Notable // differences: - subtract 1 before dividing, to make sure that if the strip ends // exactly on a left corner of a cell, that cell is not included in the scanned // range - there is no max_inclusive analog of min_inclusive. All ranges are // effectively max inclusive, so there is no need to change the result accordingly (max_gradient.depth + (max_gradient.lateral * effective_gradient_depth) - 1) / (max_gradient.depth * 2) }; // prevent scanning off the edge of the octant let lateral_max = cmp::min(lateral_max, octant.lateral_max(static_params.centre)); let mut prev_visibility = Zero::zero(); let mut prev_opaque = false; for lateral_index in lateral_min..=lateral_max { let coord = octant.make_coord(static_params.centre, lateral_index, depth_index); if coord.x < 0 || coord.x >= static_params.width || coord.y < 0 || coord.y >= static_params.height { break; }; let opacity = static_params.get_opacity(coord); // check if cell is in visible range let in_range = static_params .vision_distance .in_range(coord - static_params.centre); let gradient_lateral = lateral_index * 2 - 1; let mut direction_bitmap = DirectionBitmap::empty(); let (cur_visibility, cur_opaque) = if visibility > opacity { (visibility - opacity, false) } else { (Zero::zero(), true) }; // handle changes in opacity if lateral_index != lateral_min && cur_visibility != prev_visibility { let gradient_depth = if cur_visibility < prev_visibility { // getting more opaque back_gradient_depth } else { // getting less opaque front_gradient_depth }; let gradient = Gradient::new(gradient_lateral, gradient_depth); if !prev_opaque { // see beyond the previous section unless it's opaque next.push(ScanParams { min_gradient, max_gradient: gradient, min_inclusive, depth: depth + 1, visibility: prev_visibility, }); } min_gradient = gradient; min_inclusive = false; // If the current cell is opaque, then the previous cell was not opaque and so // we can see the across edge through the previous cell. // If the current cell is transparent, we can see the entire cell (including // the across edge), so setting it again here doesn't hurt. direction_bitmap |= octant.across_bitmap(); } if cur_opaque { // check if we can actually see the facing side if max_gradient.lateral * front_gradient_depth > gradient_lateral * max_gradient.depth { direction_bitmap |= octant.facing_bitmap(); } else if direction_bitmap.is_empty() { // only set the corner as visible if no edge is already visible direction_bitmap |= octant.facing_corner_bitmap(); } } else { direction_bitmap |= DirectionBitmap::all(); }; // handle final cell if lateral_index == lateral_max { if !cur_opaque && min_gradient != max_gradient { // see beyond the current section next.push(ScanParams { min_gradient, max_gradient, min_inclusive, depth: depth + 1, visibility: cur_visibility, }); } if in_range && lateral_index == depth { // Intentionally don't invoke the callback on the final cell of // the scan, if it's along the diagonal between two octants. // The result of both octant scans is required to determine the // visibility of this cell. It is handled in // Context::observe_octant. return Some(CornerInfo { bitmap: direction_bitmap, coord, visibility, }); } } if in_range && octant.should_see(lateral_index) { f(coord, direction_bitmap, visibility); } prev_visibility = cur_visibility; prev_opaque = cur_opaque; } None } #[derive(Clone, Debug)] pub struct Context<Visibility> { queue_a: Vec<ScanParams<Visibility>>, queue_a_swap: Vec<ScanParams<Visibility>>, queue_b: Vec<ScanParams<Visibility>>, queue_b_swap: Vec<ScanParams<Visibility>>, } impl<Visibility> Default for Context<Visibility> { fn default() -> Self { Self { queue_a: Vec::new(), queue_a_swap: Vec::new(), queue_b: Vec::new(), queue_b_swap: Vec::new(), } } } #[cfg(feature = "serialize")] impl<Visibility> Serialize for Context<Visibility> { fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> { ().serialize(s) } } #[cfg(feature = "serialize")] impl<'a, Visibility> Deserialize<'a> for Context<Visibility> { fn deserialize<D: serde::Deserializer<'a>>(d: D) -> Result<Self, D::Error> { let () = Deserialize::deserialize(d)?; Ok(Self::default()) } } impl<Visibility> Context<Visibility> { fn observe_octant<I, A, B, VisDist, F>( &mut self, octant_a: A, octant_b: B, static_params: &StaticParams<I, Visibility, VisDist>, f: &mut F, ) where I: InputGrid, Visibility: Copy + Zero + PartialOrd<I::Opacity> + PartialOrd + Sub<I::Opacity, Output = Visibility>, A: Octant, B: Octant, VisDist: VisionDistance, F: FnMut(Coord, DirectionBitmap, Visibility), { self.queue_a .push(ScanParams::octant_base(static_params.initial_visibility)); self.queue_b .push(ScanParams::octant_base(static_params.initial_visibility)); loop { let mut corner_bitmap = DirectionBitmap::empty(); let mut corner_coord = None; let mut corner_visibility = Zero::zero(); for params in self.queue_a.drain(..) { if let Some(corner) = scan(&octant_a, &mut self.queue_a_swap, params, static_params, f) { corner_bitmap |= corner.bitmap; corner_coord = Some(corner.coord); if corner.visibility > corner_visibility { corner_visibility = corner.visibility; } } } for params in self.queue_b.drain(..) { if let Some(corner) = scan(&octant_b, &mut self.queue_b_swap, params, static_params, f) { corner_bitmap |= corner.bitmap; corner_coord = Some(corner.coord); if corner.visibility > corner_visibility { corner_visibility = corner.visibility; } } } if let Some(corner_coord) = corner_coord { if !(corner_bitmap.is_full() || (corner_bitmap & DirectionBitmap::all_cardinal()).is_empty()) { // if one of the scans saw a corner only but the other saw // the entire edge, just keep the edge. corner_bitmap &= DirectionBitmap::all_cardinal(); } f(corner_coord, corner_bitmap, corner_visibility); } if self.queue_a_swap.is_empty() && self.queue_b_swap.is_empty() { break; } mem::swap(&mut self.queue_a, &mut self.queue_a_swap); mem::swap(&mut self.queue_b, &mut self.queue_b_swap); } } pub fn for_each_visible<I, V, F>( &mut self, coord: Coord, input_grid: &I, grid: &I::Grid, vision_distance: V, initial_visibility: Visibility, mut f: F, ) where I: InputGrid, V: VisionDistance, F: FnMut(Coord, DirectionBitmap, Visibility), Visibility: Copy + Zero + PartialOrd<I::Opacity> + PartialOrd + Sub<I::Opacity, Output = Visibility>, { let size = input_grid.size(grid); if coord.is_valid(size) { f(coord, DirectionBitmap::all(), initial_visibility); } let width = size.x() as i32; let height = size.y() as i32; let params: StaticParams<I, _, _> = StaticParams { centre: coord, vision_distance, input_grid, grid, width, height, initial_visibility, }; self.observe_octant(TopLeft, LeftTop, &params, &mut f); self.observe_octant(RightTop { width }, TopRight { width }, &params, &mut f); self.observe_octant( LeftBottom { height }, BottomLeft { height }, &params, &mut f, ); self.observe_octant( BottomRight { width, height }, RightBottom { width, height }, &params, &mut f, ); } }
rust
* Push (including Force Push) got and get in the way one way or the other. Do we need those permissions for our repos? If no one objects, I'll start removing them on 2014-04-28. Best regards, TL;DR: When consuming EventLogging data, only rely on the 'log' database available from m2 replicas, like analytics-store.eqiad.wmnet. may (on purpose) give you unvalidated data. wanted to put my current understanding of it up for public discussion. wrong or does not match your use of EventLogging data. This database is the best place to consume EventLogging data from. Only validated events enter the database. cleanup of historic data, or live fixes. Entries are JSON objects. Only validated events get written. In case of bugs, historic data does not get fixed. decoded at all. hot-fixes reach those files. * Kafka: EventLogging data is no longer fed into Kafka since 2014-06-12 [3]. The EventLogging data in Kafka had no users. Turning it on again is tracked in bug 66528 [4]. * MongoDB: EventLogging data is no longer fed into MongoDB since 2014-02-13 [5]. The EventLogging data in MongoDB did not appear to get used. I am not aware of plans to revive feeding the data into MongoDB. * ZMQ: ZMQ is available from vanadium. In case of bugs, historic data cannot get fixed :-) and need not see hot-fixes. 8600) is validated. Have fun, analytics-store.eqiad.wmnet (aka “The one machine to rule them all”) has risen to >12 hours for s1 replicas. Other replicas are fine. So on analytics-store.eqiad.wmnet: * enwiki is affected. * log (EventLogging) is affected. analytics-store.eqiad.wmnet are /not/ affected. as drop in replacement. enwiki and log are not lagging there. I filed RT ticket 8032: Best regards, Hi all, unfamiliar with the logs on Vanadium. turnaround time. Steven Walling, the general Wikimania Hackathon in London. a researcher, or would ever want to be one, come with questions, answers, data, code, crazy ideas... or just your insatiable curiosity." Local participation will occur at Wikimania London and in Philadelphia, PA, community members globally. sign-up details. Further questions may be directed to Aaron Halfaker (ahalfaker(a)wikimedia.org) name or misdirects emails to the WMF Executive Director. Dan Andreescu and I are hosting a local hackathon in Philadelphia, research on Wikipedia, wikis, and other open collaborations to meet, just your insatiable curiosity. People will be working on attributing credit to authors of wiki content, and female newcomers, and more. Join them or work on your own idea! other groups around the world. access any data that you might need (optional). appear down. The corresponding bug is 68743: Best regards, following query should be mutually exclusive (registered on Android app, and registered not on mobile), but the number returned is nonzero. SELECT count(*) AND userAgent like 'WikipediaApp%' thought I should at least report it so you're aware. starting today, ending August 5. You can see the sprint here: regular velocity. - Story 67128 has been completed since the previous sprint ended. continue on them. - Issue 68519 is new. into account when committing to in a sprint.
english
<gh_stars>0 /* * Copyright 2019 - 2020 <NAME>, <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "LoopStats.hpp" using namespace llvm; using namespace llvm::noelle; void LoopStats::collectStatsOnNoelleIVs (Hot *profiles, LoopDependenceInfo &LDI, Stats *statsForLoop) { auto loopStructure = LDI.getLoopStructure(); auto ivManager = LDI.getInductionVariableManager(); auto ivs = ivManager->getInductionVariables(*loopStructure); statsForLoop->numberOfIVs = ivs.size(); for (auto iv : ivs) { auto phiNode = iv->getLoopEntryPHI(); statsForLoop->numberOfDynamicIVs += profiles->getTotalInstructions(phiNode); } auto GIV = ivManager->getLoopGoverningIVAttribution(*loopStructure); if (GIV != nullptr){ statsForLoop->isGovernedByIV = 1; statsForLoop->numberOfDynamicGovernedIVs = profiles->getTotalInstructions(GIV->getHeaderCmpInst()); } return ; } void LoopStats::collectStatsOnLLVMIVs (Hot *profiles, ScalarEvolution &SE, Loop &llvmLoop, Stats *statsForLoop) { /* * Note: LLVM does not provide a way to collect all instructions used in computing IVs */ for (auto &phi : llvmLoop.getHeader()->phis()) { bool llvmLoopValidForInductionAnalysis = phi.getBasicBlockIndex(llvmLoop.getLoopPreheader()) >= 0; if (llvmLoopValidForInductionAnalysis && llvmLoop.isAuxiliaryInductionVariable(phi, SE)) { statsForLoop->numberOfIVs++; } statsForLoop->numberOfDynamicIVs = profiles->getTotalInstructions(&phi); } auto governingIV = llvmLoop.getInductionVariable(SE); if (governingIV != nullptr){ statsForLoop->isGovernedByIV = 1; } return ; }
cpp
""" License ------- The MIT License (MIT) Copyright (c) 2018 Snappy2 Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Created on Sat Dec 16 22:46:28 2017 @author: <NAME> @Source: Github.com/Barqawiz """ import cv2 from keras.models import load_model import numpy as np from utils.Utility import Utility import os class Detector: """ Common class to detect areas of interest from images Developed by: github.com/barqawiz """ def __init__(self): base_folder = os.path.dirname(__file__) self.face_cascade = cv2.CascadeClassifier( os.path.join(base_folder,'../resource/haarcascades/haarcascade_frontalface_default.xml')) self.model = load_model(os.path.join(base_folder, '../resource/models/keras_cv_base_model_1_avg.h5')) def detect_faces(self, gray_human_image): """ Detect faces in image and return list of faces with related properties :param gray_human_image: numpy gray image :return: face_properties a list of dictionary with following information (face, loc, size) """ face_properties = [] faces = self.face_cascade.detectMultiScale(gray_human_image, 1.2, 7, minSize=(30, 30)) if len(faces) == 0: faces = self.face_cascade.detectMultiScale(gray_human_image, 1.1, 8, minSize=(30, 30)) for (x, y, w, h) in faces: # 1- detect face area roi_image = gray_human_image[y:y + h, x:x + w] face_properties.append({'face': roi_image, 'loc': (x, y), 'size': (w, h)}) return face_properties def detect_key_points(self, face_properties, network_in_size=96): """ Detect key points areas in the face using neural network. - key points for eyes, noise and mouth :param face_properties: :param network_in_size: :return: key_properties a list of dictionary with following information (keys_x, keys_y, face_index) """ key_properties = [] index = 0 for face in face_properties: # 0- get face information roi_image = face['face'] x,y = face['loc'] w, h = face['size'] # 1- pre process # prepare face image roi_image = cv2.resize(roi_image, (network_in_size, network_in_size)) # scale pixel values to [0, 1] roi_image = roi_image / 255 # reshape for netowork format roi_image = roi_image.reshape(roi_image.shape[0], roi_image.shape[1], 1) roi_image = np.array([roi_image]) # 2- predict face key points y_predict = self.model.predict(roi_image)[0] # map to original coordinates values y_predict = Utility.reverse_nn_normalization(y_predict) # 3- extract information # get value within the original image x_axis = y_predict[0::2] y_axis = y_predict[1::2] x_scale_factor = (w / 96) y_scale_factor = (h / 96) x_axis = x_axis * x_scale_factor + x y_axis = y_axis * y_scale_factor + y key_properties.append({'keys_x': x_axis, 'keys_y': y_axis, 'face_x': x, 'face_y': y, 'face_w': w, 'face_h': h, 'face_index': index}) index += 1 return key_properties
python
<reponame>razakal/Qora<filename>Qora/src/network/PeerManager.java package network; import java.net.InetAddress; import java.util.List; import java.util.logging.Logger; import database.DBSet; import settings.Settings; public class PeerManager { private static final int DATABASE_PEERS_AMOUNT = 1000; private static PeerManager instance; public static PeerManager getInstance() { if(instance == null) { instance = new PeerManager(); } return instance; } private PeerManager() { } public List<Peer> getKnownPeers() { //ASK DATABASE FOR A LIST OF PEERS List<Peer> knownPeers = DBSet.getInstance().getPeerMap().getKnownPeers(DATABASE_PEERS_AMOUNT); Logger.getGlobal().info("Peers retrieved from database : " + knownPeers.size()); //IF PEERS LESS THEN DATABASE_PEERS_AMOUNT ALSO LOAD FROM SETTINGS if(knownPeers.size() < DATABASE_PEERS_AMOUNT) { List<Peer> settingsPeers = Settings.getInstance().getKnownPeers(); settingsPeers.addAll(knownPeers); Logger.getGlobal().info("Peers retrieved after settings : " + settingsPeers.size()); return settingsPeers; } //RETURN return knownPeers; } public void addPeer(Peer peer) { //NO NEED TO INSERT PEER INTO DATABASE IF IT IS ALREADY IN SETTINGS for(Peer knownPeer: Settings.getInstance().getKnownPeers()) { if(knownPeer.getAddress().equals(peer.getAddress())) { return; } } //ADD TO DATABASE DBSet.getInstance().getPeerMap().addPeer(peer); } public void blacklistPeer(Peer peer) { DBSet.getInstance().getPeerMap().blacklistPeer(peer); } public boolean isBlacklisted(InetAddress address) { return DBSet.getInstance().getPeerMap().isBlacklisted(address); } public boolean isBlacklisted(Peer peer) { return DBSet.getInstance().getPeerMap().isBlacklisted(peer.getAddress()); } }
java
^ ga ^jT ja 5 da ? da 3" ba "ET gha H jha 5" dha IT dha *T bha 5 na >T na W na •! na JT ma T ya ^ ra C^ la 3" va 5T sa ? sha ^T sa ^ ha Observe the devanagarT characters used for 3T and its derivatives in the sixteen sakti, and the consonants f?T and W; observe also the transliteration for r r 1 1, the anusvara, s and s. These are also shown on page xxxvi (facing page 1) of the dictionary. Monier-Williams distinguishes between a 'true' anusvara (n) which is inherent in the word from its dhatu and is found in such words as 3TTT (ansa) and l^-H (hinsa), and the 'substitute' anusvara (m) which arises through the operation of the rules of grammar, as for example "H <H +^TR => "H'HK (samsara). This distinction is peculiar to Monier-Williams (the standard is to use m throughout), and may be ignored: simply treat m and n as synonymous with the anusvara. 12.3 Fundamental Structure The dictionary is arranged on etymological principles, and it is this that makes it such a powerful tool. The two main advantages of this arrangement are, firstly, that cognate words derived from the same dhatu are gathered together, and this facilitates a broad understanding of the word, together with its applications and uses; secondly, it becomes a trivial matter to trace the word back to its dhatu, thus allowing a penetrating insight into the very essence of the word. This combination, giving both breadth and depth to the understanding of a word, is immensely valuable in the penetrating study of the scriptures.
english
Half-centuries by Jalaj Saxena (68) and Vinoop Sheela Manoharan (77) helped Kerala recover from 155 for six to 291 for seven at stumps against Delhi. THIRUVANANTHAPURAM: Half-centuries by Jalaj Saxena (68) and Vinoop Sheela Manoharan (77) helped Kerala recover from 155 for six to 291 for seven at stumps against Delhi on the opening day of their Ranji Trophy Elite Group B match. Electing to bat after winning the toss, the hosts suffered an early blow when opener V A Jagadeesh was bowled by Akash Sudan for a duck. The second-wicket partnership didn’t last long as one-drop batsman Vatsal (4) edged a delivery from Vikas Mishra to ‘keeper Anuj Rawat to leave Kerala at 17 for two. Sanju Samson looked good during his knock of 24 before falling to offspinner Shivam Mishra in the 22nd over, and he struck again in the same over to send back captain Sachin Baby even before he could open his account. Opener P Rahul (77), however, held firm and added 51 runs for the fifth wicket with Vishnu Vinod (24) to stabilise the innings. At lunch, Kerala were 109 for four, and lost Vishnu Vinod (24) to Shivank Vasisth a little after resumption. Rahul, who hit 10 fours and two sixes, was involved in a 46-run stand with Manoharan before being dismissed by Mishra (4 for 78). Saxena and Manoharan played cautiously initially before going on to play some handsome shots. The experienced Saxena showed a lot of intent and made 68 off 113 balls before falling to Mishra in the final over of the day, handing back the advantage to Delhi. Manoharan, meanwhile, played a patient knock to help Kerala recover from a spot of bother to a respectable score. Mishra was the best performer for Delhi, beginning life in the post-Gautam Gambhir era, with a good spell that saw him get the key wickets of Samson, Baby and Saxena. Kerala made two changes, handing Vatsal a debut in place of K B Arun Karthick and Vinoop Manoharan for Akshay Chandran. Brief scores: Kerala 291 for 7 in 89. 3 overs (Jalaj Saxena 68, Vinoop Sheela Manoharan 77 batting, P Rahul 77, Shivam Mishra 4 for 78) vs Kerala.
english
<filename>mqtt-p5-template/style.css canvas{ position:absolute; z-index:-3; } body{ margin:0; padding:0; min-height:100vh; min-width:100vw; }
css
{ "brief": "the pain of childbirth, severe agony", "long": "the pain of childbirth, acute pain, severe agony, a snare." }
json
<gh_stars>0 { "name": "herodote-user", "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, "axios": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { "follow-redirects": "^1.3.0", "is-buffer": "^1.1.5" } }, "commander": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", "integrity": "<KEY> }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "<KEY> "requires": { "ms": "2.0.0" } }, "follow-redirects": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.6.1.tgz", "integrity": "<KEY> "requires": { "debug": "=3.1.0" } }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "<KEY> }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-<KEY> }, "promise": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.2.tgz", "integrity": "<KEY> "requires": { "asap": "~2.0.6" } } } }
json
Federal Interior Minister Rana Sana Ullah Khan said that Prime Minister Shehbaz Sharif along with his economic team is making sincere efforts to steer the country out of current economic crisis. Addressing the inaugural ceremony of a new NADRA Center in Faisalabad, he said previous government, which first inked agreements with IMF and then backed out from its commitments which landed Pakistan into a very in alarming situation. Rana Sanaullah said if the present government backs out from these conditionalities, then our economic survival will become next to impossible and even our friendly countries cannot extend financial help to us. He said that some elements are intentionally creating uncertainty for their ulterior political motives. He said that he is also working on plan to establish desks of Passport Office in NADRA Centers so that people could get this facility in a hustle-free environment. He assured that he would also try to get more funds to undertake maximum development projects in his constituency.
english
<filename>sdk/package.json { "name": "crownpeak-dxm-angular-sdk", "version": "3.5.1", "description": "Crownpeak Digital Experience Management (DXM)Software Development Kit (SDK) for Angular has been constructed to assist the Single Page App developer in developing client-side applications that leverage DXM for content management purposes.", "repository": "https://github.com/Crownpeak/DXM-Angular-SDK", "main": "dist/entry.js", "author": "Crownpeak Technology, inc.", "license": "MIT", "dependencies": { "@angular/animations": "~9.1.11", "@angular/common": "~9.1.11", "@angular/compiler": "~9.1.11", "@angular/core": "~9.1.11", "@angular/forms": "~9.1.11", "@angular/platform-browser": "~9.1.11", "@angular/platform-browser-dynamic": "~9.1.11", "@angular/router": "~9.1.11", "@babel/parser": "^7.9.4", "crownpeak-dxm-sdk-core": "^3.5.1", "dotenv": "^8.2.0", "rxjs": "~6.5.4", "tslib": "^1.10.0", "zone.js": "~0.10.2" }, "bin": { "crownpeak": "./classes/crownpeak/cmsify.js" }, "devDependencies": { "@angular-devkit/build-angular": "~0.901.8", "@angular/cli": "~9.1.8", "@angular/compiler-cli": "~9.1.11", "mocha": "^8.2.0", "prettier": "^2.0.5", "tslint": "^6.1.2", "tslint-config-prettier": "^1.18.0", "typescript": "^3.9.5" }, "scripts": { "build": "tsc", "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"", "lint": "tslint -p tsconfig.json", "test": "mocha" } }
json
const router = require('express').Router() const OrderList = require('../db/models/orderList') const Product = require('../db/models/product') const Cart = require('../db/models/cart') router.get('/', async (req, res, next) => { try { const orderLists = await OrderList.findAll({ where: {cartId: req.cart.id}, include: Product }) res.send(orderLists) } catch (err) { next(err) } }) router.get('/:id', async (req, res, next) => { try { console.log('req.params', req.params.id) const orderList = await OrderList.findByPk(req.params.id, { include: Product }) res.send(orderList) } catch (err) { next(err) } }) router.post('/', async (req, res, next) => { try { // created indicates whether or not this is a new orderList or a pre-existing one // if the order doesn't exist create it let [orderList, created] = await OrderList.findOrCreate({ where: {cartId: req.cart.id, productId: req.body.productId} }) // otherwise the order already existed - update it if (!created) { const quantity = orderList.quantity + 1 await orderList.update({quantity}) } // eager load the product const orderListWithProduct = await orderList.reload({include: Product}) res.send(orderListWithProduct) } catch (err) { next(err) } }) router.put('/', async (req, res, next) => { try { if (req.user) { await OrderList.update( {orderId: req.body.orderId}, {where: {cartId: req.cart.id}} ) } const newCart = await Cart.create() req.session.cartId = newCart.id req.cart = newCart res.sendStatus('200') } catch (err) { next(err) } }) router.put('/:id', async (req, res, next) => { try { await OrderList.update( {quantity: req.body.quantity - 1}, {where: {id: req.params.id}} ) if (req.body.quantity === 1) { await OrderList.destroy({where: {id: req.params.id}}) res.sendStatus('200') } else { res.sendStatus('200') } } catch (err) { next(err) } }) module.exports = router
javascript
<filename>src/services/ProjectService.ts import { getAuth, User } from "firebase/auth"; import { addDoc, collection, doc, DocumentData, DocumentReference, Firestore, getDoc, getDocs, getFirestore, onSnapshot, query, setDoc, Timestamp, Unsubscribe, where, } from "firebase/firestore"; import { StorageReference } from "firebase/storage"; export enum ProjectCategory { DESIGN = "Design", ENGINEERING = "Engineering", MARKETING = "Marketing", OPERATIONS = "Operations", OTHER = "Other", } export enum ProjectType { SOFTWARE = "Software", PRODUCT = "Product", SERVICE = "Service", BUSINESS = "Business", OTHER = "Other", } export enum IssueType { TASK = "task", BUG = "bug", STORY = "story", } export enum IssueStatus { TODO = "todo", INPROGRESS = "inprogress", DONE = "done", } export enum IssuePriority { HIGHEST = "5", HIGH = "4", MEDIUM = "3", LOW = "2", LOWEST = "1", } export interface IssueComment { id?: string; body: string; createdAt: Date; updatedAt: Date; createdBy: string; updatedBy: string; issueId: string; } export interface Issue { id?: string; title: string; status: IssueStatus; priority: IssuePriority; listPosition: number; description: string | null; descriptionText: string | null; estimate: number | null; timeSpent: number | null; timeRemaining: number | null; createdAt: Date; updatedAt: Date; reporterId: string; projectId: string; assignees: string[]; comments: IssueComment[]; } export interface Project { id?: string; name: string; description: string | null; category: ProjectCategory; type: ProjectType; icon: StorageReference | null; createdAt: Date; updatedAt: Date; createdBy: string; collaborators: string[]; issues: Issue[]; } export class ProjectService { private static instance: ProjectService; private database: Firestore = getFirestore(); private auth = getAuth(); private constructor() {} public static getInstance(): ProjectService { if (!ProjectService.instance) { ProjectService.instance = new ProjectService(); } return ProjectService.instance; } public async getProject(id: string): Promise<Project> { const docRef = doc(this.database, `projects/${id}`); const project = await getDoc(docRef); const data = project.data() as Project; data.id = project.id; return data; } public async getProjects(): Promise<Project[]> { const collobratedProjects = ( await getDocs( query( collection(this.database, "projects"), where("collaborators", "array-contains", this.auth.currentUser.uid) ) ) ).docs.map((doc) => { const data = doc.data() as Project; data.id = doc.id; return data; }); const myProjects = ( await getDocs( query( collection(this.database, "projects"), where("createdBy", "==", this.auth.currentUser.uid) ) ) ).docs.map((doc) => { const data = doc.data() as Project; data.id = doc.id; return data; }); return [...collobratedProjects, ...myProjects]; // return snapshot.docs.map((doc) => { // const data = doc.data() as Project; // data.id = doc.id; // return data; // }); } public async createProject(project: Project): Promise<DocumentReference> { const docRef = await addDoc(collection(this.database, `projects`), { name: project.name, description: project.description, category: project.category, type: project.type, createdAt: new Date().toUTCString(), updatedAt: new Date().toUTCString(), createdBy: project.createdBy, collaborators: project.collaborators, }); return docRef; } public async updateProject(project: Project): Promise<void> { const docRef = doc(this.database, `projects/${project.id}`); await setDoc( docRef, { name: project.name, description: project.description, category: project.category, type: project.type, createdAt: project.createdAt ?? new Date().toUTCString(), updatedAt: new Date().toUTCString(), createdBy: project.createdBy, collaborators: project.collaborators, }, { merge: true, } ); } public async getIssues(project: Project): Promise<Issue[]> { const issues = await getDocs( collection(this.database, `projects/${project.id}/issues`) ); return issues.docs.map((doc) => { const data = doc.data() as Issue; data.id = doc.id; return data; }); } public async getIssue(project: Project, issueId: string): Promise<Issue> { const docRef = doc( this.database, `projects/${project.id}/issues/${issueId}` ); const issue = await getDoc(docRef); const data = issue.data() as Issue; data.id = issue.id; data.comments = []; return data; } public async createIssue( project: Project, issue: Issue ): Promise<DocumentReference> { const issues = await getDocs( query( collection(this.database, `projects/${project.id}/issues`), where("status", "==", IssueStatus.TODO) ) ); const docRef = await addDoc( collection(this.database, `projects/${project.id}/issues`), { ...issue, createdAt: new Date().toUTCString(), updatedAt: new Date().toUTCString(), status: IssueStatus.TODO, projectId: project.id, listPosition: issues.docs.length, } ); return docRef; } public async updateIssue(project: Project, issue: Issue): Promise<void> { const docRef = doc( this.database, `projects/${project.id}/issues/${issue.id}` ); await setDoc( docRef, { ...issue, updatedAt: new Date().toUTCString(), }, { merge: true, } ); } public observeProject( id: string, callback: (project: Project) => void ): Unsubscribe { return onSnapshot(doc(this.database, `projects/${id}`), (doc) => { const data = doc.data() as Project; data.id = doc.id; callback(data); }); } public observeIssues( project: Project, callback: (issues: Issue[]) => void ): Unsubscribe { return onSnapshot( collection(this.database, `projects/${project.id}/issues`), (snapshot) => { if ( snapshot.docChanges().filter((change) => change.type === "added") .length > 0 ) { callback( snapshot.docs.map((doc) => { const data = doc.data() as Issue; data.id = doc.id; return data; }) ); } } ); } }
typescript
<reponame>kennethsequeira/Hello-world<filename>Python/sum_prime.py<gh_stars>1000+ ''' Write a function sumprimes(l) that takes as input a list of integers l and retuns the sum of all the prime numbers in l. Here are some examples to show how your function should work. >>> sumprimes([3,3,1,13]) 19 ''' def sumprimes(l): prime_sum = int() for num in l: if is_prime(num): prime_sum = prime_sum + num return prime_sum def is_prime(n): factor_list = [] for num in range(2, n+1): if n % num == 0: factor_list = factor_list + [num] return len(factor_list) == 1
python
<gh_stars>0 package netboxapi type Rack struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` FacilityID string `json:"facility_id,omitempty"` DisplayName string `json:"display_name,omitempty"` Site Short `json:"site,omitempty"` Group Short `json:"group,omitempty"` Tenant Short `json:"tenant,omitempty"` Status ValueLabel `json:"status,omitempty"` Role int `json:"role,omitempty"` Serial string `json:"string,omitempty"` AssetTag string `json:"asset_tag,omitempty"` Type ValueLabel `json:"type,omitempty"` Width ValueLabel `json:"width,omitempty"` HeightUnits int `json:"u_height,omitempty"` DescendingUnits bool `json:"desc_units,omitempty"` OuterWidth int `json:"outer_width,omitempty"` OuterDepth int `json:"outer_depth,omitempty"` OuterUnit ValueLabel `json:"outer_unit,omitempty"` Comments string `json:"comments,omitempty"` Tags []string `json:"tags,omitempty"` CustomFields interface{} `json:"custom_fields,omitempty"` Created string `json:"created,omitempty"` LastUpdated string `json:"last_updated,omitempty"` } func (n *NetboxConnection) GetRacks() ([]Rack, error) { var racks []Rack err := n.getAPI("/api/dcim/racks/", &racks) return racks, err }
go
<filename>pkg/apis/operator/v1alpha1/knativeserving_lifecycle_test.go /* Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 import ( "testing" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" ) func TestKnativeServingGroupVersionKind(t *testing.T) { r := &KnativeServing{} want := schema.GroupVersionKind{ Group: GroupName, Version: SchemaVersion, Kind: Kind, } if got := r.GroupVersionKind(); got != want { t.Errorf("got: %v, want: %v", got, want) } } func TestAssumeDepsInstalled(t *testing.T) { ks := &KnativeServingStatus{} ks.InitializeConditions() assertEqual(t, ks.GetCondition(DependenciesInstalled).IsUnknown(), true) assertEqual(t, ks.GetCondition(DependenciesInstalled).IsTrue(), false) ks.MarkInstallSucceeded() assertEqual(t, ks.GetCondition(DependenciesInstalled).IsUnknown(), false) assertEqual(t, ks.GetCondition(DependenciesInstalled).IsTrue(), true) assertEqual(t, ks.IsInstalled(), true) assertEqual(t, ks.IsFullySupported(), true) } func assertEqual(t *testing.T, actual, expected interface{}) { if actual == expected { return } t.Fatalf("Expected: %v\nActual: %v", expected, actual) } func TestKnativeServingStatusGetCondition(t *testing.T) { ks := &KnativeServingStatus{} if a := ks.GetCondition(InstallSucceeded); a != nil { t.Errorf("empty ServingStatus returned %v when expected nil", a) } mc := &apis.Condition{ Type: InstallSucceeded, Status: corev1.ConditionTrue, } ks.MarkInstallSucceeded() if diff := cmp.Diff(mc, ks.GetCondition(InstallSucceeded), cmpopts.IgnoreFields(apis.Condition{}, "LastTransitionTime")); diff != "" { t.Errorf("GetCondition refs diff (-want +got): %v", diff) } } func TestKnativeServingInstallFailed(t *testing.T) { reason := "Error" message := "Waiting on deployments" ks := &KnativeServingStatus{} mc := &apis.Condition{ Type: EventingConditionReady, Status: corev1.ConditionFalse, Reason: reason, Message: "Install failed with message: " + message, } ks.MarkInstallFailed(message) if diff := cmp.Diff(mc, ks.GetCondition(EventingConditionReady), cmpopts.IgnoreFields(apis.Condition{}, "LastTransitionTime")); diff != "" { t.Errorf("GetCondition refs diff (-want +got): %v", diff) } } func TestKnativeServingDeploymentNotReady(t *testing.T) { reason := "NotReady" message := "Waiting on deployments" ks := &KnativeServingStatus{} mc := &apis.Condition{ Type: DeploymentsAvailable, Status: corev1.ConditionFalse, Reason: reason, Message: message, } ks.MarkDeploymentsNotReady() if diff := cmp.Diff(mc, ks.GetCondition(DeploymentsAvailable), cmpopts.IgnoreFields(apis.Condition{}, "LastTransitionTime")); diff != "" { t.Errorf("GetCondition refs diff (-want +got): %v", diff) } } func TestKnativeServingDeploymentsAvailable(t *testing.T) { ks := &KnativeServingStatus{} mc := &apis.Condition{ Type: DeploymentsAvailable, Status: corev1.ConditionTrue, } ks.MarkDeploymentsAvailable() if diff := cmp.Diff(mc, ks.GetCondition(DeploymentsAvailable), cmpopts.IgnoreFields(apis.Condition{}, "LastTransitionTime")); diff != "" { t.Errorf("GetCondition refs diff (-want +got): %v", diff) } } func TestKnativeServingDependenciesInstalled(t *testing.T) { ks := &KnativeServingStatus{} mc := &apis.Condition{ Type: DependenciesInstalled, Status: corev1.ConditionTrue, } ks.MarkDependenciesInstalled() if diff := cmp.Diff(mc, ks.GetCondition(DependenciesInstalled), cmpopts.IgnoreFields(apis.Condition{}, "LastTransitionTime")); diff != "" { t.Errorf("GetCondition refs diff (-want +got): %v", diff) } } func TestKnativeServingInitializeConditions(t *testing.T) { tests := []struct { name string ke *KnativeServingStatus want *KnativeServingStatus }{{ name: "empty", ke: &KnativeServingStatus{}, want: &KnativeServingStatus{ Status: duckv1.Status{ Conditions: []apis.Condition{{ Type: DependenciesInstalled, Status: corev1.ConditionUnknown, }, { Type: DeploymentsAvailable, Status: corev1.ConditionUnknown, }, { Type: InstallSucceeded, Status: corev1.ConditionUnknown, }, { Type: "Ready", Status: corev1.ConditionUnknown, }}, }, }, }} for _, test := range tests { t.Run(test.name, func(t *testing.T) { test.ke.InitializeConditions() if diff := cmp.Diff(test.want, test.ke, ignoreAllButTypeAndStatus); diff != "" { t.Errorf("unexpected conditions (-want, +got) = %v", diff) } }) } }
go
LA Lakers legend Magic Johnson played an instrumental role in helping the franchise sign LeBron James in the 2018 NBA free agency. Johnson was the Lakers' President of basketball operations at the time. However, in a surprising turn of events, the all-time great stepped down from his position in April 2019. Magic Johnson declared his resignation in an impromptu press conference right before the LA Lakers' last game of the season. Jeanie Buss, the team's controlling owner at the time, and star player LeBron James were both unaware of the decision. In a recent interview with New York Times, Johnson said not talking to Buss or James about his resignation was one of his biggest mistakes as an executive. “The only thing I probably would’ve did was probably talked to LeBron before I stepped down, because I felt that I owed him that, so that’s probably the only mistake I made was not talking to Jeanie and talking to LeBron before I actually did it. So, yes, I would do that different,” said Johnson. The LA Lakers signed Magic Johnson as an executive in February 2017. They failed to make the playoffs during his tenure with the team. After the end of LeBron James' first season with the franchise, Johnson decided to leave the Lakers and returned to his role as an NBA ambassador. Three months after Magic Johnson's shocking resignation, the LA Lakers managed to acquire long-term target Anthony Davis via trade. In their first season post Johnson's departure as an executive, the Lakers not only ended up qualifying for the playoffs, but they also won their 17th NBA title. LeBron James was named the finals MVP after the Lakers defeated his former team, the Miami Heat, in six games in the Orlando Bubble. The Lakers have been one of the top favorites for three straight seasons to lift the title since the 2019-20 campaign. This year they managed to add another superstar to their ranks in the form of Russell Westbrook. The 2017 NBA MVP has formed one of the league's newest big threes alongside LeBron James and Anthony Davis as the Lakers aim to win a record 18th NBA title. Also Read: Who is Magic Johnson's wife, Cookie Johnson?
english
The Karni Sena, never known to shy away from controversies, has now gotten into action against Prakash Jha’s series Aashram on MX Player, featuring Bobby Deol as a fraudulent debauched Godman. We are not very sure what “negative goodwill” means. But it definitely is something dangerous and sinister. The Karni Sena had earlier accused Sanjay Leela Bhansali and Deepika Padukone of denigrating the Hindi religion in Padmaavat and had even threatened to cut off her nose. We are waiting to know which part of Prakash Jha’s anatomy the Sena would like to relieve him of. Catch us for latest Bollywood News, New Bollywood Movies update, Box office collection, New Movies Release , Bollywood News Hindi, Entertainment News, Bollywood Live News Today & Upcoming Movies 2024 and stay updated with latest hindi movies only on Bollywood Hungama.
english
Kotak Mahindra Bank's latest FD rates are effective from today: What’s new now? As of today, February 27, 2023, Kotak Mahindra Bank's fixed deposit interest rates are in effect. As of today, February 27, 2023, Kotak Mahindra Bank's fixed deposit interest rates are in effect. The revised interest rates are valid for domestic, NRO, and NRE fixed deposits with the option of a premature withdrawal. The bank is offering interest rates on fixed deposits with maturities ranging from seven days to ten years that range from 2.75% to 6.20% for the general public and 3.25% to 6.70% for senior citizens. With effect from today, deposits maturing in 390 days (12 months 25 days) to less than 2 years will earn a maximum interest rate of 7.70% for elderly individuals and 7.20% for non-senior citizens.
english
RCB vs GT Dream11 Prediction: On match number 67 of Tata IPL 2022, 5th placed RCB faceoff the table-toppers Gujarat Titans at Wankhede Stadium. This is the last league match for both teams. GT has already qualified for the playoffs in flying colors, but RCB needs this win to qualify. Although this win will not guarantee their spot in the playoffs, losing this match will almost seal their elimination. Faf and co are all prepped up to beat the mighty Titans. Let’s take a look at the Dream 11 prediction of the match. |On matchday, the temperature is forecast to be approximately 30°C, with 72 percent humidity and a wind speed of 11 km/hr. During the game, there are no chances of rain. |It is going to be a batting pitch. The surface is flat and suits fast bowlers. |Bowling first is the ideal choice as Wankhede suits chasing. Wriddhiman Saha(wk), Shubman Gill, Matthew Wade, Hardik Pandya©, David Miller, Rahul Tewatia, Rashid Khan, Ravisrinivasan Sai Kishore, Alzarri Joseph, Yash Dayal, Mohammad Shami. Wriddhiman Saha, Faf du Plessis (c), Shubman Gill, Dinesh Karthik, David Miller, Glenn Maxwell, R Sai Kishore, Harshal Patel, Rashid Khan, Wanindu Hasaranga (VC), Mohammed Shami. Wriddhiman Saha (c), Faf du Plessis, Shubman Gill, Dinesh Karthik, Rajat Patidar, Glenn Maxwell, Rahul Tewatia, Harshal Patel (VC), Rashid Khan, Wanindu Hasaranga, Mohammed Shami. Dinesh Karthik: Though Saha is also in fine form, Karthik was consistent and brilliant the whole season. His motivation and excellence is matched by none. Faf du Plessis: Not a magnificent season for the Protean opener, but Faf has led the team quite well as a captain as well as a batsman. Glenn Maxwell: An above-average season from Glenn Maxwell. He once again delivered for RCB as the utility all-rounder. Rashid Khan: Rashid Khan was amazing as always. Batsmen are still yet to crack the mystery behind his hands. Wanindu Hasaranga: The Sri Lankan leg-spinner has proved to be the best buy of RCB at the auction. He is currently second in the purple cap race. Harshal Patel: Harshal has lately found his 2021 form. The right-arm fast bowler is acing his flowers at the death. Who will win today’s IPL match? RCB is playing under pressure. This is probably their most important match of the season. GT is the strongest team of the season and it is going to be a goliath task for RCB to beat them. There are chances that GT might try out the players from their bench which will make the team a little weaker. KreedOn predicts a 60-40 chance for GT to win this match.
english
def condensate_to_gas_equivalence(api, stb): "Derivation from real gas equation" Tsc = 519.57 # standard temp in Rankine psc = 14.7 # standard pressure in psi R = 10.732 rho_w = 350.16 # water density in lbm/STB so = 141.5 / (api + 131.5) # so: specific gravity of oil (dimensionless) Mo = 5854 / (api - 8.811) # molecular weight of oil n = (rho_w * so) / Mo V1stb = ((n * R * Tsc) / psc) V = V1stb * stb return(V) def general_equivalence(gamma, M): "Calculate equivalence of 1 STB of water/condensate to scf of gas" # gamma: specific gravity of condensate/water. oil specific gravity use formula: so=141.5/(api+131.5). water specific gravity = 1 # M: molecular weight of condensate/water. oil: Mo = 5854 / (api - 8.811). water: Mw = 18 V1stb = 132849 * (gamma / M) return(V1stb)
python
New Kinpo Group is an odd company. Its CEO popped into our New York City offices the other week ostensibly to speak about its XYZ brand, whose budget 3D printers have shot to the top of the top spot in global market share. Then it busted out the HiMirror. It’s a smart bathroom mirror. It examines your skin, gives you metrics, tells you what you can do to improve. I will happily acknowledge that this device probably isn’t for me. Frankly, I’m too self-conscious to step on one of those smart bathroom scales that calculates your body fat (which the company also makes), so the idea of starting into a mirror that will examine every flaw with robot precision doesn’t sound like my idea of a fun way to spend a Monday morning – or $189 of my hard-earned cash. For those who are looking to smartify their beautify regimen, the product is designed to be a companion piece to a larger over all electronic ecosystem, syncing up with the aforementioned Smart Body Scale ($79) to give users an overall picture of their health/beauty. The smart mirror measures 11 x 16.4 inches. At first glance, it looks a bit like an electronic terminal – or maybe one of those teleconferencing robots you see zooming up and down the halls of convention centers for people who can’t be bothered to leave the office. That image was, no doubt, helped along by the fact that the company brought the mirror in on a pole. You can also hang it on a wall or prop it up on a table if you have the space. The system uses facial recognition and underlying technology to track and log skin firmness, texture, clarity, brightness and health over the course of hours and days. There are a lot of lingering question about how well it does its job, and the demo was fairly brief, though the company assured me that it can take into account things like complexion and ethnic background when assessing a face. There’s also a barcode scanner to input different skin care products into the system. Honestly, the most compelling bit from where I stand (directly in front of the mirror, wondering where I’ve gone wrong) is the incorporation of notifications, serving up weather, calendar alerts, notifications and Spotify playback on the mirror. Necessary? No. Cool. Sure. There are some privacy concerns here as well. After all, you’re essentially bringing an internet connected camera into your home. The company’s added a lens cap feature you can twist to close, but the mere notion its presence on a bathroom wall may be enough to deter a lot of users. The HiMirror is the first offering from the NKG brand of the same name, arriving alongside the company’s new scale. Perhaps most surprising of all, the product actually has a definite ship date here in the States. It’s arriving on October 17, which gives you a few days to weigh the pluses and minuses – before you go weighing yourself.
english
El Salvador's largest newspaper is now available on wireless Web-enabled phones and Palm Pilots. But Salvadorans aren't ready to toss out their paper subscriptions yet. Only 1 percent of this Central American country, which has a population of 6 million, has desktop Internet access, says Fabricio Altamirano, the publisher of El Diario de Hoy. The number of Salvadorans with Web-enabled handheld devices is comparable, he said. But with telecom giants Telefonica, Millicom and France Telecom fiercely competing with each other to offer Salvadorans cellular phone service and Internet access, Altamirano predicts the paper's WAP and Palm pilot editions will soon become part of the country's landscape. What makes El Salvador such a hot destination for telecom companies? It's one of a handful of Latin American countries with a telecommunications industry free from invasive government regulation. "El Salvador has one of the most competitive structures of telecommunications in the world," Altamirano said. "It's cheaper to call from El Salvador to the United States than (from) the United States to El Salvador." Altamirano's paper, which is 65 years old, has always been ahead of its time. In 1995, it became the first Central American newspaper to go online. And its coveted domain name, ElSalvador.com, means that the paper is easy to find -- particularly north of the border. Eighty-nine percent of its 3 million monthly pageviews can be traced to the desktop computers of Salvadorans living in the United States. The online edition of the paper has survived on its own advertising revenue. Brother, can you spare a cell phone? Wireless technology aficionados, who constantly upgrade their gear, might consider donating their old cell phones to this Wireless Foundation program. DonateaPhone.com gives the phones to victims of domestic violence. Where am I? Wireless technology developer Airbiquity plans to release, by the end of the year, a GPS (global positioning system) accessory that will let users get directions to practically anywhere. Nokia wireless phone users can attach the accessory -- which contains a GPS and an antenna -- to the phone like a battery. They then press a button in the back of the phone so that an operator can track their location to tell them, for example, where the nearest restaurant lies. Dialing around: AT&T's (T) declining long distance revenue has caused its credit rating to be lowered by Standard & Poors. A reduced rating means higher borrowing costs for the company.... Lucent Technologies (LU) plans to cut 240 jobs to restructure its sales and service divisions. The company is still looking for a new CEO.... The Spanish government will award GSM (global system for mobile) communications mobile licenses to two new operators early next year.... Folks interested in buying a Nextel (NXTL) phone can now use online resource Ask Jeeves (ASKJ) to determine the best calling plan.... Capslock, a San Jose, California, company that makes any Web content available on handheld devices, just released a software that ensures a "secure channel" for transferring data over any wireless network. The "Secure Wireless Access Technology" encrypts information so that it appears jumbled for anyone who is not intended to receive the information.
english
{"remainingRequest":"/home/mrchoi87/farmosV2/ui/node_modules/vue-loader/lib/index.js??vue-loader-options!/home/mrchoi87/farmosV2/ui/src/components/chart/bulletVue.vue?vue&type=script&lang=js&","dependencies":[{"path":"/home/mrchoi87/farmosV2/ui/src/components/chart/bulletVue.vue","mtime":1607499348989},{"path":"/home/mrchoi87/farmosV2/ui/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/mrchoi87/farmosV2/ui/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/mrchoi87/farmosV2/ui/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/home/mrchoi87/farmosV2/ui/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/mrchoi87/farmosV2/ui/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n props: {\n xScale: {\n required: false,\n type: Function,\n default: Function\n },\n yScale: {\n required: false,\n type: Function,\n default: Function\n },\n parameters: {\n required: false,\n type: Object,\n default: Object\n },\n xScaleFunction: {\n type: Function,\n default: function name (params) {\n return params\n }\n }\n },\n methods: {\n classObject (item) {\n if (item.bulletStyle === undefined) {\n return 'dot'\n } else {\n return item.bulletStyle\n }\n },\n x (x) {\n return this.xScale(this.xScaleFunction(x))\n },\n y (y) {\n return this.yScale(y)\n }\n }\n}\n",{"version":3,"sources":["bulletVue.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"bulletVue.vue","sourceRoot":"src/components/chart","sourcesContent":["<template>\n <g>\n <template v-for=\"(item,index) in parameters.data\">\n <circle\n v-if=\"item.isDot\"\n :name=\"parameters.name\"\n :x=\"item.x\"\n :y=\"item.y\"\n :class=\"classObject(item)\"\n :key=\"index\"\n :cx=\"x(item.x)\"\n :cy=\"y(item.y)\"\n r=\"6\"\n />\n </template>\n </g>\n</template>\n<script>\nexport default {\n props: {\n xScale: {\n required: false,\n type: Function,\n default: Function\n },\n yScale: {\n required: false,\n type: Function,\n default: Function\n },\n parameters: {\n required: false,\n type: Object,\n default: Object\n },\n xScaleFunction: {\n type: Function,\n default: function name (params) {\n return params\n }\n }\n },\n methods: {\n classObject (item) {\n if (item.bulletStyle === undefined) {\n return 'dot'\n } else {\n return item.bulletStyle\n }\n },\n x (x) {\n return this.xScale(this.xScaleFunction(x))\n },\n y (y) {\n return this.yScale(y)\n }\n }\n}\n</script>\n\n<style scoped>\n.dot {\n fill: rgb(51, 156, 255);\n stroke: rgb(255, 255, 255);\n stroke-width: 2px;\n transition: all 1s;\n}\n\n.dot:hover {\n fill: orange;\n}\n\n.dot.active {\n fill: orange;\n}\n\n@-webkit-keyframes moving-dashes {\n 100% {\n stroke-dashoffset: -31px;\n }\n}\n\n@keyframes moving-dashes {\n 100% {\n stroke-dashoffset: -31px;\n }\n}\n\n.lastBullet {\n stroke-width: 2px;\n fill: red;\n stroke: red;\n transition: all 1s;\n -webkit-animation: pulsating 1s ease-out infinite;\n animation: pulsating 1s ease-out infinite;\n}\n\n@-webkit-keyframes pulsating {\n 0% {\n stroke-opacity: 1;\n stroke-width: 0;\n }\n\n 100% {\n stroke-opacity: 0;\n stroke-width: 30px;\n }\n}\n\n@keyframes pulsating {\n 0% {\n stroke-opacity: 1;\n stroke-width: 0;\n }\n\n 100% {\n stroke-opacity: 0;\n stroke-width: 30px;\n }\n}\n</style>\n"]}]}
json
Apple WWDC events are mainly synonymous with upcoming software developments from the company; however, we have seen some notable launches in the past. From the first Intel-powered Mac Pro to Apple HomePod, the event has seen the debut of impressive hardware aside from software announcements. This year, Apple is again rumoured to bring a new MacBook Pro, but with its in-house M1 chipset along with iOS and iPadOS 15, macOS 12, and more. The event will take place tonight at 10:30 PM IST, and you can watch the event live on Apple YouTube or catch live updates on News18. Apple Mac Pro (2006): Apple launched its first Intel-powered Mac Pro at WWDC 2006, after introducing the Apple Power Mac G5 with a 'cheese grater' grille body three years ago. While it retained the design from the predecessor, the Mac Pro (2006) came with dual-2. 6GHz Xeon dual-core Mac Pro with 1GB RAM, Geforce 7300 GT (256 MB VRAM) graphics, and a SuperDrive. Even then, it remained an expensive product, carrying a price tag of $2,499 (then approx Rs 1,13,200). Image: (YouTube / Sven88bac) Apple iPhone 3G: At the WWDC 2008, Apple launched the iPhone 3G that featured 3G connectivity over 2G. The smartphone came with the new store called 'App Store' — Apple's new distribution platform for third-party applications. The iPhone 3G rolled out with iPhone OS 2 and carried a price tag of $199 (then roughly Rs 9,000). Apple iPhone 4 (2010): Two years later at WWDC 2010, Apple unveiled the iPhone 4 that was a big hit among customers. It brought a significant redesign for the iPhone with a combination of stainless steel and glass. With the iPhone 4, the company also introduced the retina display and a front camera with FaceTime. Its price started at $199 (then roughly Rs 9,100). Apple HomePod (2017): Fast-forward to WWDC 2017, Apple introduced the Siri-powered HomePod speakers to enhance users' smart home controls. However, given its pricing and rising competition from Amazon, the HomePod failed to resonate with customers until the launch of the HomePod mini last year. It came out with a price tag of Rs 19,900 in White and Space Grey colour options. Apple Mac Pro (2019): Following intense criticism of the trashcan" design (Mac Pro 2013), Apple launched the Mac Pro (2019) professional desktop workstation with an all-new design at the WWDC 2019. Though it echoed similarities with the original Apple Mac Pro (2006), it now featured a steel body, a mesh front panel, and handles at the top. It also came with up to a 24-core Intel Xeon processor, up to 1. 5TB storage, and AMD Radeon Vega II GPUs. It came with a price tag of starting at $5,999 (approximately Rs. 4,14,400).
english
{"type1": "fire", "type2": "NULL", "weight": "95.0", "height": "1.7", "name": "rapidash", "location": "Kindle Road,Mt. Ember", "summary": "It can gallop at a top speed of 150 miles per hour. It can race as fast as a bullet train while ablaze.", "exclusivity": "BOTH", "id": "78"}
json
<reponame>jlebar/Apollo-Expeditions-to-the-Moon <html> <head> <title>Apollo Expeditions to the Moon: Chapter 10</title> <script id="_fed_an_js_tag" type="text/javascript" src="../../../../gacommon/js/Federated-Analytics.js?agency=NASA"></script> </head> <body background="tapete.gif"> <basefont size=4> <center> <br><hr><br> <h4>Apollo Expeditions to the Moon</h4> <h3>CHAPTER 10.1</h3> <hr><br> </center> <h2>Getting lt All Together</h2> <h4>By <NAME></h4> <br> <center> <table border=0><tr><td> <img src="i10-1.jpg" ALT=""> </table> <table border=0 width=70%><tr><td>&nbsp;<tr><td align=center><font size=2> Gleaming in the sunlight, Spider and Gumdrop are hard-docked while two of the three-man crew venture outside. CM pilot <NAME>, breathing through an umbilical connection, pokes his head out the command-module hatch. The picture was taken by LM pilot <NAME> (who wore an independent life-support pack) while perched on the lunar module's "front porch". </table> </center> <br><br> The Apollo 9 and 10 missions were the learning phase of the program, coming as they did between the first tests of the command module in deep space on Apollo 8 and the lunar landing of Apollo 11. <br><br> Apollo 9 and 10 were missions designed to rehearse all the steps and reproduce all the events of the Apollo 11 mission with the single exception of the lunar touchdown, stay, and liftoff. The command and service modules and the lunar module were used in flight procedures identical to those that would later take similar vehicles to the Moon and a landing. The flight mechanics, the mission support systems, the communications, the recording of data - all these techniques and components were tested in a final round of verification. <br><br> We learned from those two missions how to develop our flight procedures. They are complex, at best, and for future missions we wanted to know exactly what alternatives we would have under a wide variety of circumstances to assure the safety of the astronauts and the success of the missions, in that order. Fortunately we had very few problems on both missions. Three reasons for that good fortune were the extensive ground tests, the simulation exercises which provided the crews with high-fidelity training for every phase of the flight, and the critical design review procedures. <br><br> The crews rehearsed and re-rehearsed their movements in ground simulators and in conditions of inflight weightlessness produced by parabolic flights in a converted Air Force KC-135 tanker and by neutral buoyancy simulations. They had started this kind of training as a crew months before the flight, gradually working toward proficiency and a degree of automatic response to the checklists, the pilots' shorthand notes that were developed simultaneously. By the time they were ready for their actual missions, they had run through all the normal routines many times, and had thoroughly rehearsed emergency procedures for every imaginable trouble or failure. <br><br> The critical design reviews were fundamental to the testing and simulation programs. What we actually did was to go over every single part of the spacecraft to make sure that we understood how it worked, how it might go wrong, and what alternative procedure or backup system we had in case it did go wrong. The overriding consideration was, of course, crew safety; there always had to be at least one way back from orbit or from the Moon if something went wrong. These design reviews were done by a number of task groups, because there were too many spacecraft systems for any single group to consider, let alone understand to the required degree. <br><br> One of my areas of special interest lay in what we called software - the computer programs that provided the intelligence and control functions onboard the spacecraft and at the ground stations. General Phillips asked me to form a special software review group that met for several months and initiated some disciplines which, I believe, finally made it possible for the Apollo 11 lunar landing to take place when it did. <br><br> An interesting point about the Apollo 10 flight is that it did fail to do one of the steps that was later done on the Apollo 11 and which caused some brief moments of tension just before the lunar landing. On Apollo 10, the landing radar and the rendezvous radar never were operated at the same time. They are used for two different procedures, and at two different altitudes, so that there didn't seem to be any need for simultaneous operation of the pair. But on Apollo 11, they wanted to check the operation of the high-altitude gate radar as they approached the surface of the Moon, and so it was left on. That radar and the landing radar were feeding information directly into the onboard computer in the Apollo 11 lunar module. Although the data from the altitude radar was not being used, it nevertheless was driving the input registers of the computer and thus forcing the central processor to decide at each cycle that the radar data were not germane. <P><HR> <CENTER> <A HREF="ch-9-7.html"><IMG SRC="iprev.gif" ALT="Previous" ALIGN=left></A> <A HREF="ch-10-2.html"><IMG SRC="inext.gif" ALT="Next" ALIGN=right></A> <A HREF="toc.html"><IMG SRC="itoc.gif" ALT="Index"></A> </CENTER> <HR><P> <!-- ADA TEAM 2001 --> </body> </HTML>
html
{"stationName": "revolution","colorsObj": {"colors":["#54940c","#24590c","#ecc605","#e20f47","#e20f47","#040404"]},"songList": ["<NAME> - Uncle <NAME>","<NAME> - For What Its Worth (DEEJAYTARNZ Remix)","DJ Prince - Come Together (Beatles Remix)","Imagine Dragons - Believer","Immortal Technique - Tell The Truth (Feat. Mos Def)","Jetta - I'd Love To Change The World (Matstubs Remix)","Jurassic 5 - Freedom","<NAME> & <NAME> - Immigrant Song","<NAME> - Are You Gonna Go My Way (Sunday Soulman & Chris Child Remix)","<NAME> - Dig In","Metallica - For Whom The Bell Tolls (Bassnectar Remix)","MixMasterG - ACAB Swing","MixMasterG - Skinhead Ruiner","Nas & D<NAME> - Leaders (feat Stephen Marley)","<NAME> - Beast","<NAME> - Feeling Good (Bassnectar Remix)","Rage Against The Machine - Guerrilla Radio","Rage Against The Machine - Maggie's Farm","Rage Against The Machine - New Millennium Homes","Rage Against The Machine - Sleep Now In The Fire","The Clash - I Fought The Law (Mikkim and EAC DJs Remix)","The Funk Hunters & Chali 2na - Get Involved (feat Defunk)","The Redwalls - Colorful Revolution","The Who - Eminence Front (Zen Remix)","WAR - Why Cant We Be Friends"]}
json
package main func main() { // s := "BBC ABCDAB ABCDABCDABDE" // p := "ABCDABD" // fmt.Println(violentMatch(s, p)) // kmp2() kmp3() }
go
<reponame>westonsteimel/advisory-database-github<gh_stars>100-1000 { "schema_version": "1.2.0", "id": "GHSA-cr6q-w9jh-63pg", "modified": "2022-05-02T03:58:43Z", "published": "2022-05-02T03:58:43Z", "aliases": [ "CVE-2009-4839" ], "details": "Multiple cross-site scripting (XSS) vulnerabilities in Basic Analysis and Security Engine (BASE), possibly 1.4.4 and earlier, allow remote attackers to inject arbitrary web script or HTML via unspecified parameters to (1) admin/base_roleadmin.php, (2) admin/base_useradmin.php, (3) base_conf_contents.php, (4) base_qry_sqlcalls.php, and (5) base_ag_main.php.", "severity": [ ], "affected": [ ], "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-4839" }, { "type": "WEB", "url": "http://secureideas.cvs.sourceforge.net/viewvc/secureideas/base-php4/admin/base_roleadmin.php?view=log" }, { "type": "WEB", "url": "http://secureideas.cvs.sourceforge.net/viewvc/secureideas/base-php4/admin/base_useradmin.php?view=log" }, { "type": "WEB", "url": "http://secureideas.cvs.sourceforge.net/viewvc/secureideas/base-php4/base_ag_main.php?view=log" }, { "type": "WEB", "url": "http://secureideas.cvs.sourceforge.net/viewvc/secureideas/base-php4/base_conf_contents.php?view=log" }, { "type": "WEB", "url": "http://secureideas.cvs.sourceforge.net/viewvc/secureideas/base-php4/base_qry_sqlcalls.php?view=log" } ], "database_specific": { "cwe_ids": [ "CWE-79" ], "severity": "MODERATE", "github_reviewed": false } }
json
Microsoft on Tuesday announced it's rolling out its collaborative inking Whiteboard app on Windows 10, starting with a private preview now available on Surface Hub. The app should be available on more Windows 10 devices, including the Surface Studio and Surface Pro, later this year. The app offers collaborative inking, geometry recognition, table conversion and automatic table shading, as well as exclusive capabilities for Office 365 subscribers. While the new app coincides with Microsoft's updates to the Surface Pro, it comes as the whiteboard market gets increasingly competitive. Google on Tuesday started selling its Jamboard, which comes with an app that combines handwriting, freeform sketching, photos and other functionalities. In addition to the app, Microsoft on Tuesday announced new improvements to its inking technology. With the new Surface Pen, for instance, the ink reacts a user's touch with pressure sensitivity of 4,096 pressure points -- up from 1,024 pressure points. Additionally, the thickness and texture of your ink adjusts, based on the angle of your pen. The new Surface Pen offers "almost zero latency" when used with Office apps, Microsoft says. Meanwhile, Word, Excel and PowerPoint users will have more ink effects to choose from, such as rainbow, galaxy, lava, ocean, gold and silver. New Office apps also include a gallery for your favorite pens, pencils and highlighters, which roams when you move across apps and devices. Related stories:
english
The Starz show Counterpart is about a world that exists next to another, identical world. Well, almost. There’s the dimension we take to be the real one in addition to an alternate version where people look just like us, but have an entirely different agenda. When season two of the show kicks off, the main character, and his counterpart, are in a very confusing circumstance indeed. J.K. Simmons plays both versions of that man, Howard. In one dimension, Howard is a spy whose job is to traverse and police the crossing between the two Earths. In the other world, he’s much less important. Over the course of season one, the two men met and a whole slew of complicated problems were uncovered. As one may expect, both Howards are now having to deal with the repercussions, a situation illustrated very well in this trailer for season two. Here’s the official description: At The Office of Interchange, those who have high enough access safeguard a crossing into a parallel dimension not unlike our own. And if their world is like ours, who are we over there? Are we better? Are we different? Season 2 finds Howard and his counterpart living out these questions. With the Crossing closed and each of them stranded in the other’s world, they have to adapt for survival. Howard Prime takes on his other’s life: going to his job, living in his home... with his wife. Howard Alpha is locked in a mysterious black site known as Echo, cut off from everyone he knows. As a cold war escalates between worlds deepening a fickle divide, both men find themselves growing increasingly like their other. Counterpart comes back to Starz on December 9.
english
The Democratic campaign committee that works to elect pro-choice Democrats to state legislatures around the country has spoken out against the Supreme Court's decision to overturn federal protections for abortion, saying it will work alongside state-elected Democrats who will be "turning out voters in droves" for the midterm elections. In a statement shared with Fox News Digital, Gabrielle Chew, vice president of communications for the Democratic Legislative Campaign Committee (DLCC), insisted Americans are "alarmed" over the court's ruling and state-level Republican politicians who are "declaring open season on our fundamental rights. " "The court’s antiquated, politically-transparent decision strips women of the right to control their own bodies and will lead to unnecessary death," Chew said. "This decision caters to a hyper-vocal, fringe minority and not the eight in 10 Americans who support the legal right to abortion, while opening the door to attacks on the right to contraception and marriage equality. "Americans across the political spectrum are alarmed at the Supreme Court and Republicans in state legislatures declaring open season on our fundamental rights. State Democrats will respond to this attack on our freedom to decide if and when to have a family by turning out voters in droves come this November. " The court's decision to overturn the protections, which were granted in the 1973 landmark decision Roe v. Wade, now provides the states the opportunity to determine whether to legalize the procedure within their respective borders. The ruling in Dobbs v. Jackson Women’s Health Organization came more than a month after a leaked draft opinion from Justice Samuel Alito suggested the court would overturn federal protections for abortion. Other national campaign committees, including the Democratic Congressional Campaign Committee (DCCC) and the Democratic Senatorial Campaign Committee (DSCC), are also warning of the ruling's effects on the midterm elections. "Today’s decision dramatically escalates the stakes of the 2022 elections, and we’re making sure Americans have the tools they need to channel their anger into action," said Christie Roberts, executive director for the DSCC. "This on-the-ground organizing work will help elect Democrats who will fight to protect women’s right to make their own health care decisions and ensure the GOP’s cruel agenda to making abortion illegal and punish women is front and center for voters across the Senate battlegrounds. " Tim Persico, executive director for the DCCC, said the stakes for the November elections "couldn't be higher. " "MAGA Republicans are fixated on controlling people’s lives, forcing their backwards ideology onto everyone and throwing folks in jail who don’t agree with them," Persico said. "This organizing campaign will give outraged voters a way to help elect the pro-choice Democrats who are the last line of defense against Republicans' plan to ban abortion nationwide. " In remarks following the Supreme Court's ruling, President Biden said voters must elect more Democratic politicians to enshrine abortion protections in federal law. "This fall, Roe is on the ballot," he said. The DLCC's counterpart, the Republican State Leadership Committee (RSLC), did not immediately respond to Fox News Digital's inquiry about the ruling.
english
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is a COM aware array class. * * The Initial Developer of the Original Code is * Netscape Communications Corp. * Portions created by the Initial Developer are Copyright (C) 2002 * the Initial Developer. All Rights Reserved. * * Contributor(s): * <NAME> <<EMAIL>> * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #include "nsCOMArray.h" #include "nsCOMPtr.h" PR_STATIC_CALLBACK(PRBool) ReleaseObjects(void* aElement, void*); // implementations of non-trivial methods in nsCOMArray_base // copy constructor - we can't just memcpy here, because // we have to make sure we own our own array buffer, and that each // object gets another AddRef() nsCOMArray_base::nsCOMArray_base(const nsCOMArray_base& aOther) { // make sure we do only one allocation mArray.SizeTo(aOther.Count()); AppendObjects(aOther); } nsCOMArray_base::~nsCOMArray_base() { PRInt32 count = Count(), i; for (i = 0; i < count; ++i) { nsISupports* obj = ObjectAt(i); NS_IF_RELEASE(obj); } } PRInt32 nsCOMArray_base::IndexOfObject(nsISupports* aObject) const { NS_ENSURE_TRUE(aObject, -1); nsCOMPtr<nsISupports> supports = do_QueryInterface(aObject); NS_ENSURE_TRUE(supports, -1); PRInt32 i, count; PRInt32 retval = -1; count = mArray.Count(); for (i = 0; i < count; ++i) { nsCOMPtr<nsISupports> arrayItem = do_QueryInterface(NS_REINTERPRET_CAST(nsISupports*,mArray.ElementAt(i))); if (arrayItem == supports) { retval = i; break; } } return retval; } PRBool nsCOMArray_base::InsertObjectAt(nsISupports* aObject, PRInt32 aIndex) { PRBool result = mArray.InsertElementAt(aObject, aIndex); if (result) NS_IF_ADDREF(aObject); return result; } PRBool nsCOMArray_base::InsertObjectsAt(const nsCOMArray_base& aObjects, PRInt32 aIndex) { PRBool result = mArray.InsertElementsAt(aObjects.mArray, aIndex); if (result) { // need to addref all these PRInt32 count = aObjects.Count(); for (PRInt32 i = 0; i < count; ++i) { NS_IF_ADDREF(aObjects.ObjectAt(i)); } } return result; } PRBool nsCOMArray_base::ReplaceObjectAt(nsISupports* aObject, PRInt32 aIndex) { // its ok if oldObject is null here nsISupports *oldObject = NS_REINTERPRET_CAST(nsISupports*, mArray.SafeElementAt(aIndex)); PRBool result = mArray.ReplaceElementAt(aObject, aIndex); // ReplaceElementAt could fail, such as if the array grows // so only release the existing object if the replacement succeeded if (result) { // Make sure to addref first, in case aObject == oldObject NS_IF_ADDREF(aObject); NS_IF_RELEASE(oldObject); } return result; } PRBool nsCOMArray_base::RemoveObject(nsISupports *aObject) { PRBool result = mArray.RemoveElement(aObject); if (result) NS_IF_RELEASE(aObject); return result; } PRBool nsCOMArray_base::RemoveObjectAt(PRInt32 aIndex) { nsISupports* element = ObjectAt(aIndex); if (element) { PRBool result = mArray.RemoveElementAt(aIndex); if (result) NS_IF_RELEASE(element); return result; } return PR_FALSE; } // useful for destructors PRBool ReleaseObjects(void* aElement, void*) { nsISupports* element = NS_STATIC_CAST(nsISupports*, aElement); NS_IF_RELEASE(element); return PR_TRUE; } void nsCOMArray_base::Clear() { mArray.EnumerateForwards(ReleaseObjects, nsnull); mArray.Clear(); }
cpp
<gh_stars>100-1000 {"nom":"Mont-Louis","circ":"3ème circonscription","dpt":"Pyrénées-Orientales","inscrits":140,"abs":63,"votants":77,"blancs":5,"nuls":4,"exp":68,"res":[{"nuance":"REM","nom":"<NAME>","voix":40},{"nuance":"FN","nom":"<NAME>","voix":28}]}
json
There are some features that were gradually added into this almost 20-year-old game that shaped its current form in particular. It may be the readily recognizable elements you know and love, milestones that determined the new direction the game would take, or simply mechanics that substantially improved the game. In this light, several expansions in the history of WoW have been especially prolific. Here are some exceptional chapters. What we now refer to as “World of Warcraft” first emerged in the form of Vanilla — the game’s inaugural incarnation in 2004. During this era, players were introduced to the fantastical realm of Azeroth, which was divided into two warring factions: the Alliance and the Horde. It was centered around three main pillars: quests, Dungeon Crawl (DC) and Player-vs-Player (PvP) combat. It was world filled with adventures, incredible fights, and inexhaustible exploration. The Vanilla experience provided players with the foundation upon which the game would evolve over the years. The iconic races, classes, and the immersive storyline set the stage for what would become a gaming phenomenon. On heels of Vanilla’s popularity, Blizzard Entertainment stepped out to make their game expansions that would forever set World Of Warcraft apart. These were not only updates to the graphics but also allowed for entirely new continents, races, and classes, greatly enhancing the storyline for those who wanted an extra challenge. “The Burning Crusade” was one of the most noteworthy expansions, taking players deep into the shattered Outland and introducing them to the denizens of the Burning Legion. It brought forth the introduction of two new playable races: the Bloodsail Buccaneers; the Broken; the Earthen Ring; the Forsaken; The Horde; the Night Elves; the Outland Titans; the Quilboar and the Scorched 3D models. Burning Crusade was the first attempt by Blizzard to expand the story of the game. By popular account, it was one of the best expansions they ever released, in fact. It was the first expansion to introduce a whole new location, the Outland. This set the tone for later expansions. With The Burning Crusade, players gained the ability to take to the skies on their flying mounts. This game-changing addition expanded the scope of exploration and altered the dynamics of player-versus-player combat and world traversal, ushering in a new era of freedom in Azeroth. With the release of Wrath of the Lich King, the Dungeon Finder feature revolutionized the way players formed groups for dungeons and raids. This tool streamlined the process, matching players from different realms, and offered quick access to group content, fostering a more accessible and efficient gameplay experience. Wrath of the Lich King introduced the Achievement System, providing players with a comprehensive set of goals and milestones to achieve in-game. The system added an extra layer of depth to player progression and encouraged exploration and completionism. Mists of Pandaria marked a significant shift by introducing Cross-Realm Play, allowing players from different realms to interact more freely. This feature expanded the player pool for dungeons, raids, and battlegrounds, enhancing social connectivity and collaboration in the World of Warcraft. The Pet Battle System was introduced in Mists of Pandaria, adding a delightful and strategic minigame to the WoW universe. Players could collect and train companion pets, engaging in turn-based battles against other players or wild pets across Azeroth, creating a new layer of gameplay depth and nostalgia. Legion introduced the concept of Artifact Weapons, iconic and powerful weapons tailored for each class and specialization. These weapons evolved alongside players, Offering Unique Abilities and appearances. They played a central role in the expansion’s narrative and gameplay, creating each character’s compelling sense of identity. In a significant change to the leveling experience, Legion implemented Level Scaling across Azeroth. Zones dynamically adjusted to a player’s level, providing a more engaging and challenging leveling process. This feature encouraged exploration and allowed players to tackle content at their own pace. Shadowlands introduced the Covenant System, a pivotal feature that allowed players to align with one of four powerful factions, each offering unique abilities, storylines, and rewards. The Covenant choice significantly influenced gameplay, adding depth to character customization and narrative engagement. At the heart of Shadowlands was Torghast, Tower of the Damned, an innovative and highly dangerous dungeon that was a very popular target of the World of Warcraft boosting for a while. This challenging, roguelike content featured dynamic layouts, potent enemies, and ever-increasing difficulty. It was basically the next step in the dungeon development for the game, and some of the later locations were modeled on this place. One of the most enduring aspects of World of Warcraft’s evolution has been its vibrant and dedicated community. Guilds, friendships, and rivalries formed in Azeroth have transcended the virtual realm, creating a global community of passionate players. Moreover, World of Warcraft has left an indelible mark on the world of eSports. The game’s competitive scene, particularly in player-versus-player combat, has given rise to thrilling tournaments and professional gaming careers, further solidifying its position in gaming history. The Evolution of World of Warcraft from Vanilla to Shadowlands is a testament to the enduring appeal of this iconic MMORPG. From its beginnings to the expansive world of Shadowlands, players have witnessed a remarkable journey filled with epic battles, memorable characters, and endless adventures. As Azeroth continues to evolve, one thing remains constant—the unwavering passion of the players who call this virtual world home. The post Tracing the Evolution of World of Warcraft from Vanilla to Shadowlands appeared first on NogenTech- a Tech Blog for Latest Updates & Business Ideas.
english
<filename>_includes/01-name.md ## BigFish
markdown
Hyperbole aside, ONE Championship has produced some of the most vicious and dramatic KO’s in the last 10 months at ONE Fight Nights. ONE Championship CEO and Chairman Chatri Sityodtong and his team exceeded expectations over the last year, in putting together a terrific roster of unmatched talent month after month on Amazon Prime Video. No stranger to martial arts himself, Sityodtong understands first-hand that what keeps people coming back for more, is the quality of knockouts at ONE Championship. Since August 2022, there have been a great number of knockouts that have changed the course of history. Beginning with Demetrious Johnson’s insane knee KO of Adriano Moraes at ONE on Prime Video 1, to Rodtang’s finishing blow over Edgar Tabares at ONE Fight Night 10, fans have seen some of the most memorable fights yet from their favorite fighters. As ONE gears up for its eleventh installment of ONE Fight Night on Friday, June 9, get lit from some of the best knockouts from 1-10 below: Starting next month, ONE Championship is ready for the next big thing. From this moment of publication, the CEO said that he plans to “deepen and broaden” their reach to higher levels as a result of the success of their first U. S. event in Colorado. But one goal remains consistent in ONE, which is to continue creating the most unique and very best matchups that the world has ever seen. In light of ONE Fight Night 11, which sees ‘The Immortal’ Regian Eersel defend the ONE lightweight Muay Thai world title over Dmitry Menshikov, check out all ONE Fight Night cards for free on Prime Video in North America.
english
Before the Nepali brand became a brand in the UK, Province 1 was said to be branding Millet Alcohol. The then social development minister of the province, Usha Kala Rai, had formed a task force to make Millet Alcohol as brand. The task force formed last April is studying the branding, marketing and promotion of the alcohol in the eastern hill. Vice Chancellor of Gandaki University Professor Ganeshman Gurung, informed that the university is conducting research on how to brand the alcohol. The university, which has been focusing on study, research and innovation since its inception, has been teaching pharmacy, IT and sports. He said that an innovation center is being set up and research is being done on alcohol. “In Gandaki, Gurung, Magar and other tribes make and drink alcohol,” he said. Gurung said that samples of alcohol has been brought from Kaski, Syangja, Myagdi, Lamjung and Nawalpur and sent to Kathmandu for food laboratory. He also said that the marcha were taken to the laboratory of Rampur Agriculture Campus for testing. “We have sent samples of alcohol and marcha for the tests but the results are being delayed,” he said. He said that the laboratory report will find out the amount of ethanol, methanol and carbohydrates in alcohol. Then it will be easier to study whether it meets the criteria set by the World Health Organization and the Government of Nepal. Chief Minister Krishnachandra Nepali Pokharel informed that the province is working to bring the items related to the culture of the people of the province under law. ‘Gandaki is a multi-ethnic province. So alcohol is a substance associated with culture, ‘he said.
english
<gh_stars>0 --- title: 配置传入呼叫的客户端身份验证-Azure 事件网格 IoT Edge |Microsoft Docs description: 配置 IoT Edge 上的事件网格公开的 API 协议。 author: VidyaKukke manager: rajarv ms.author: vkukke ms.reviewer: spelluru ms.date: 10/03/2019 ms.topic: article ms.service: event-grid services: event-grid ms.openlocfilehash: 3363db4557dd19e8d72747ccd62bb535abb7b1e2 ms.sourcegitcommit: 849bb1729b89d075eed579aa36395bf4d29f3bd9 ms.translationtype: MT ms.contentlocale: zh-CN ms.lasthandoff: 04/28/2020 ms.locfileid: "76841785" --- # <a name="configure-client-authentication-of-incoming-calls"></a>配置传入呼叫的客户端身份验证 本指南提供事件网格模块的可能的客户端身份验证配置示例。 事件网格模块支持两种类型的客户端身份验证: * 基于共享访问签名(SAS)密钥 * 基于证书 有关所有可能的配置,请参阅[安全性和身份验证](security-authentication.md)指南。 ## <a name="enable-certificate-based-client-authentication-no-self-signed-certificates"></a>启用基于证书的客户端身份验证,无自签名证书 ```json { "Env": [ "inbound__clientAuth__sasKeys__enabled=false", "inbound__clientAuth__clientCert__enabled=true", "inbound__clientAuth__clientCert__source=IoTEdge", "inbound__clientAuth__clientCert__allowUnknownCA=false" ] } ``` ## <a name="enable-certificate-based-client-authentication-allow-self-signed-certificates"></a>启用基于证书的客户端身份验证,允许自签名证书 ```json { "Env": [ "inbound__clientAuth__sasKeys__enabled=false", "inbound__clientAuth__clientCert__enabled=true", "inbound__clientAuth__clientCert__source=IoTEdge", "inbound__clientAuth__clientCert__allowUnknownCA=true" ] } ``` >[!NOTE] >仅在测试环境中将属性**inbound__clientAuth__clientCert__allowUnknownCA**设置为**true** ,因为通常可以使用自签名证书。 对于生产工作负荷,我们建议将此属性设置为**false** ,并将证书颁发机构(CA)。 ## <a name="enable-certificate-based-and-sas-key-based-client-authentication"></a>启用基于证书和基于 sas 密钥的客户端身份验证 ```json { "Env": [ "inbound__clientAuth__sasKeys__enabled=true", "inbound__clientAuth__sasKeys__key1=<some-secret1-here>", "inbound__clientAuth__sasKeys__key2=<some-secret2-here>", "inbound__clientAuth__clientCert__enabled=true", "inbound__clientAuth__clientCert__source=IoTEdge", "inbound__clientAuth__clientCert__allowUnknownCA=true" ] } ``` >[!NOTE] >基于 SAS 密钥的客户端身份验证允许非 IoT edge 模块执行管理和运行时操作,假设可以在 IoT Edge 网络外部访问 API 端口。
markdown
For the first time in its history, Krishnapuram Residents’ Association had missed its annual general meeting, with the question of conducting it dragging on for a year. Thanks to the pandemic, the 30-year-old RWA in Ambattur could not conduct its AGM, supposed to have been conducted in September 2020. “There was no way we would get a quorum as COVID-19 cases were still high in Chennai,” says S Muralikrishna, advisor to the Association. The department of registration came to the rescue of many such RWAs like Krishnapuram that are registered under the Tamil Nadu Societies Registration Act, 1975, by extending the deadline till December 2020. “Early this year, January and February was the ideal time to conduct this annual exercise but we could not hold it for various reasons,” says Muralikrishna. The Association has more than 600 members and as the bye-laws mandate that the AGM should be conducted with one-third strength, the task before the organising committee was not easy. A 21-day notice period needs to be given to members before conducting the meeting. “Audited balance sheet must be ready besides submitting Form 6,7,” says Muralikrishna, adding that there is a lot of paper work of be done. Later, with the second wave and the subsequent lockdown, members could not initiate the meeting. The Federation of Virugambakkam Residents Welfare Association, which is an umbrella body of 22 residents’ welfare associations, is in the same situation. The challenge that goes with gathering all the members at one place is the reason we could not conduct the AGM, says S Arumainathan, member of the Association. The old team continues to manage operations that need immediate attention. In these uncertain times, he says, the department must extend the time for RWAs to submit their returns. So, why are AGMs important? A registered association is duty-bound to conduct the AGM, which facilitates a discussion on assessment of the work done by the RWA and where plans are proposed for the upcoming year. Revision of minutes from the last AGM and discussion relating to expenditure and savings of the outgoing year are among other matters that have to be addressed. Based on the returns and documents submitted by the RWA, the Department renews the registration. Muralikrishna says having the tag of a registered association has its own perks. Some years ago, the Greater Chennai Corporation recognised RWAs that did exemplary work by offering them awards. The one major criterion for entering the fray for this award is to be a registered RWA, says Muralikrishna. “Representing your colony’s grievances from a letterhead that states that your association is registered, always carries credibility,” he says. What next? Most of the RWAs that have postponed their AGM have to cough up a fine. An auditor for a couple of gated communities and a member of Mahalingapuram Residents Association says as long as members are on the same page it is okay to defer the annual general meeting during such circumstances. “If there is not much conflict among members or legal complications RWAs need not hurry up in these times,” he says. Otherwise the fine amount is small for RWAs, he says. “The fine amount depends on the balance sheet,” he says. V. Ramesh, secretary, Krishnapuram Residents’ Association, says they are now exploring the option of a virtual AGM. Last December, residents of Jains Inseli Park Owners’ Association in Padur made a new beginning conducting its annual general meeting on a virtual platform and announcing a new team. There was a clear sense of urgency to host an e-meeting because a new committee had taken over in January 2020 and various changes had been brought in, and these had to be communicated to members. But an order from the department of registration that AGMs cannot be held online had put the brakes on this exercise. Later, the exercise was initiated after the gated community received a clarification through a government notice. This was based on requests from housing societies to the Government to conduct AGM under the Tamil Nadu Societies Registration Act, 1975 through virtual means in view of the COVID-19 outbreak and lockdowns. “The act neither requires physical presence of the person nor specifies a particular place for conducting the said meeting, and hence there is no bar to conduct AGMs through virtual or electronic platforms,” read the notice shared with The Hindu . Based on this circular, the Owners’ Association wrote and sought permission. The e-meeting was held on Zoom and went on for close to three hours. MyGate app was used to communicate to people the date and time of the AGM. “A digital platform is good for one set of people, especially NRI owners that comprise 20-30 per cent of our community who could log in from any part of the world and take part in the deliberations,” says Arun Dhanaraj, secretary, Jains Inseli Park, which has nearly 500 occupied flats. The Zoom meeting recording and other documents were later submitted to the department of registration. “We know they received our file but we are waiting to get the certificate,” says Arun. In March 2021, an extraordinary general meeting (EGM) was conducted, again virtually. “As we were a new team and big budgets had to be approved we conducted an EGM,” says Arun. Going forward, will this be an option they will explore, post-COVID? Arun says digital platforms are an option worth exploring and also for the promise of greater attendance.
english
<reponame>cuba-platform/cuba-thesis<filename>modules/core/src/com/haulmont/cuba/core/jmx/LockManagerMBean.java /* * Copyright (c) 2008-2013 Haulmont. All rights reserved. * Use is subject to license terms, see http://www.cuba-platform.com/license for details. */ package com.haulmont.cuba.core.jmx; /** * JMX interface for {@link com.haulmont.cuba.core.app.LockManagerAPI}. * * @author krivopustov * @version $Id$ */ public interface LockManagerMBean { int getLockCount(); String showLocks(); void reloadConfiguration(); }
java
<gh_stars>0 #! /usr/bin/env python3 """ Flip a coin that has heads 30% 10, 100, and 1000 time. Repeat and average the results. Does the averages converge toward n * p? """ from random import random from prettytable import PrettyTable def flip_coin(chance_of_heads): return random() <= chance_of_heads def run_trial(flips, chance_of_heads): '''Flip <flips> times, return heads''' heads = 0 for n in range(flips): if flip_coin(chance_of_heads): heads += 1 return heads def repeat_trials(trials, flips, chance_of_heads): '''Repeat <trials> trials.''' result = [] for n in range(trials): result.append(run_trial(flips, chance_of_heads)) return result def predict_heads(flips, chance_of_heads): return flips * chance_of_heads def show_results(chance): flips = [10, 100, 1000] trials = 1000 results = [repeat_trials(trials, flip, chance) for flip in flips] total = [0] * 3 table = PrettyTable(['Trials'] + ['n=%d' % n for n in flips] + ['n=%d (Avg)' % n for n in flips]) table.float_format = '0.1' table.align = 'r' table.add_row(['(n*p)'] + [int(predict_heads(n, chance)) for n in flips] + [predict_heads(n, chance) for n in flips]) for num, row in enumerate(zip(*results)): total = [t + n for t, n in zip(total, row)] average = [t / float(num + 1) for t in total] str_num = str(num + 1) if str_num[1:] == "0" * (len(str_num) - 1): table.add_row([num + 1] + list(row) + average) print(table) show_results(0.3)
python
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- start the processing --> <html> <head> <link rel="stylesheet" type="text/css" href="./../docs/css/style.css"/> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="author" value="Apache JMeter Project"> <meta name="email" value="dev.AT.jmeter.DOT.apache.DOT.org"> <title>Apache JMeter - Mailing Lists</title> </head> <body bgcolor="#ffffff" text="#000000" link="#525D76"> <table border="0" cellspacing="0"> <tr> <td align="left"> <a href="http://www.apache.org"><img title="Apache Software Foundation" width="387" height="100" src="./../docs/images/asf-logo.gif" border="0"/></a> </td> <td align="right"> <a href="http://jmeter.apache.org/"><img width="182" height="88" src="./../docs/images/logo.jpg" alt="Apache JMeter" title="Apache JMeter" border="0"/></a> </td> </tr> </table> <table border="0" cellspacing="4"> <tr><td> <hr noshade size="1"/> </td></tr> <tr> <td align="left" valign="top"> <br> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica,sanserif"> <strong>Mailing Lists - Guidelines</strong></font> </td></tr> <tr><td> <blockquote> <p> <strong> Before subscribing to any of the mailing lists, please make sure that you have read and understand the <a href="mail.html"> guidelines </a> </strong> . </p> <p> Please note that usage of these mailing lists is subject to the <a href="http://www.apache.org/foundation/public-archives.html"> Public Forum Archive Policy </a> . </p> <p> For details of how to subscribe/unsubscribe please read <a href="http://www.apache.org/foundation/mailinglists.html#subscribing"> Subscribing and Unsubscribing </a> </p> </blockquote> </p> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica,sanserif"> <strong>JMeter lists and archives at the ASF</strong></font> </td></tr> <tr><td> <blockquote> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica,sanserif"> <a name="JMeterUser"><strong>Apache JMeter User</strong></a> </font> </td></tr> <tr><td> <blockquote> <p> This is the list where users of Apache JMeter meet and discuss issues. </p> <p> Developers are also expected to be lurking on this list to offer support to users of JMeter. </p> <p> This list starts part-way through Nov 2011, when JMeter became an independent Apache project. For earlier postings, please see the Jakarta JMeter User list, below. </p> <ul> <li> Subscribe at <a href="mailto:<EMAIL>"> <EMAIL> </a> </li> <li> Unsubscibe at <a href="mailto:<EMAIL>"> <EMAIL> </a> </li> <li> All old mails at <a href="http://mail-archives.apache.org/mod_mbox/jmeter-user/"> jmeter-user Archive </a> </li> </ul> </blockquote> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica,sanserif"> <a name="JakartaJMeterUser"><strong>Jakarta JMeter User</strong></a> </font> </td></tr> <tr><td> <blockquote> <ul> <li> All old mails at <a href="http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/"> jakarta-jmeter-user Archive </a> </li> </ul> </blockquote> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica,sanserif"> <a name="JMeterDev"><strong>Apache JMeter Developer</strong></a> </font> </td></tr> <tr><td> <blockquote> <p> This is the list where participating developers meet and discuss issues, code changes/additions etc. </p> <p> <table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2"> <tr><td>Please do not send usage questions to this list, see user list above. </td></tr> </table> </p> <p> This list also collects Wiki update messages. </p> <p> This list starts part-way through Nov 2011, when JMeter became an independent Apache project. For earlier postings, please see below. </p> <ul> <li> Subscribe at <a href="mailto:<EMAIL>"> <EMAIL> </a> </li> <li> Unsubscribe at <a href="mailto:<EMAIL>"> <EMAIL> </a> </li> <li> All old mails at <a href="http://mail-archives.apache.org/mod_mbox/jmeter-dev/"> jmeter-dev Archive </a> </li> </ul> </blockquote> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica,sanserif"> <a name="JMeterCommits"><strong>Apache JMeter Commits</strong></a> </font> </td></tr> <tr><td> <blockquote> <p> SVN commit messages are sent here. </p> <ul> <li> Subscribe at <a href="mailto:<EMAIL>"> <EMAIL> </a> </li> <li> Subscribe at <a href="mailto:<EMAIL>"> <EMAIL> </a> </li> <li> All old mails at <a href="http://mail-archives.apache.org/mod_mbox/jmeter-commits/"> jmeter-commits Archive </a> </li> </ul> </blockquote> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica,sanserif"> <a name="JMeterIssues"><strong>Apache JMeter Issues</strong></a> </font> </td></tr> <tr><td> <blockquote> <p> Bugzilla messages are sent here. </p> <p> Prior to Nov 2011, they were sent to the Jakarta Notifications list, see below. </p> <ul> <li> Subscribe at <a href="mailto:<EMAIL>"> <EMAIL> </a> </li> <li> Unsubscribe at <a href="mailto:<EMAIL>"> <EMAIL> </a> </li> <li> All old mails at <a href="http://mail-archives.apache.org/mod_mbox/jmeter-issues/"> jmeter-issues Archive </a> </li> </ul> </blockquote> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica,sanserif"> <a name="JakartaDev"><strong>Jakarta Developer</strong></a> </font> </td></tr> <tr><td> <blockquote> <p> Combined Jakarta developer list, April 2010 to November 2011 </p> <ul> <li> All old mails at <a href="http://mail-archives.apache.org/mod_mbox/jakarta-dev/"> jakarta-dev Archive </a> </li> </ul> </blockquote> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica,sanserif"> <a name="JakartaJMeterDev"><strong>Jakarta JMeter Developer</strong></a> </font> </td></tr> <tr><td> <blockquote> <ul> <li> All old mails at <a href="http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-dev/"> jakarta-jmeter-dev Archive </a> </li> </ul> </blockquote> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#828DA6"> <font color="#ffffff" face="arial,helvetica,sanserif"> <a name="JakartaNotif"><strong>Jakarta Notifications</strong></a> </font> </td></tr> <tr><td> <blockquote> <ul> <li> All old mails at <a href="http://mail-archives.apache.org/mod_mbox/jakarta-notifications/"> jakarta-notifications Archive </a> </li> </ul> </blockquote> </td></tr> <tr><td><br></td></tr> </table> </blockquote> </p> </td></tr> <tr><td><br></td></tr> </table> <table border="0" cellspacing="0" cellpadding="2" width="100%"> <tr><td bgcolor="#525D76"> <font color="#ffffff" face="arial,helvetica,sanserif"> <strong>Other Archives and Searching</strong></font> </td></tr> <tr><td> <blockquote> <p> There are several 3rd party sites that archive and provide searching for our mailing lists: </p> <p> <ul> <li> <a href="http://mail-archives.apache.org/mod_mbox/"> mail-archives.apache.org </a> </li> <li> <a href="http://jmeter.markmail.org/"> Mark Mail </a> </li> <li> <a href="http://www.mail-archive.com/"> mail-archive.com </a> </li> <li> <a href="http://marc.theaimsgroup.com/"> marc.theaimsgroup.com </a> </li> </ul> </p> </blockquote> </p> </td></tr> <tr><td><br></td></tr> </table> <br> </td> </tr> <tr><td> <hr noshade size="1"/> </td></tr> <tr> <td> <table width=100%> <tr> <td align="center"> <font color="#525D76" size="-1"><em> Copyright &copy; 1999-2015, Apache Software Foundation </em></font> </td> </tr> <tr><td colspan="2"> <div align="center"><font color="#525D76" size="-1"> Apache, Apache JMeter, JMeter, the Apache feather, and the Apache JMeter logo are trademarks of the Apache Software Foundation. </font> </div> </td></tr> </table> </td> </tr> </table> </body> </html> <!-- end the processing -->
html
<reponame>kimskovhusandersen/Social-Network import React, { useRef, useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { socket } from "../socket"; // Views import MessageItem from "../components/message-item"; // Style import { MessagesWrapper, StyledTextArea } from "../style/messages"; const Messages = ({ profileId }) => { const dispatch = useDispatch(); const messages = useSelector(state => state && state.messages); const selectedThread = useSelector(state => state && state.selectedThread); console.log(messages, selectedThread); const chatWrapper = useRef(); const keyCheck = e => { e.preventDefault(); if (e.key == "Enter") { console.log("BEFORE INSERT OF MESSAGE", selectedThread); socket.emit("addMessage", e.target.value, selectedThread); e.target.value = ""; } }; useEffect(() => { dispatch(getMessages(selectedThread)); }, [selectedThread]); useEffect(() => { if (messages) { let { clientHeight, scrollHeight } = chatWrapper.current; chatWrapper.current.scrollTop = scrollHeight - clientHeight; } }, [messages]); if (!messages) { return null; } return ( <React.Fragment> <MessagesWrapper ref={chatWrapper}> {!!messages && messages.map(message => ( <MessageItem key={`${message.id}/${message.senderId}`} message={message} senderId={message.senderId} profileId={profileId} /> ))} </MessagesWrapper> <StyledTextArea placeholder="Type a message..." onKeyUp={e => keyCheck(e)} ></StyledTextArea> </React.Fragment> ); }; export default Messages;
javascript
<reponame>nohupped/structype_derive #[test] fn tests() { let t = trybuild::TestCases::new(); t.pass("tests/parse_pass.rs"); // We are using this test just to make sure this is parsed. }
rust