text
stringlengths
1
1.04M
language
stringclasses
25 values
- Kids Nutrition (2-15 Yrs) Diacerein+Glucosamine is used in the treatment of osteoarthritis. Side Effects of Cartidin gm are Nausea, Diarrhea, Constipation, Urine discoloration, Heartburn. Diacerein + Glucosamine is a combination of two medicines: Diacerein + Glucosamine1 and Diacerein + Glucosamine2, which relieves osteoarthritis symptoms. It helps in the formation of cartilage (the soft tissue that cushions the joints) and keep the joints lubricated for better movement and flexibility. Q. Is it safe to take Cartidin gm 50 mg/500 mg Tablet if I have diabetes? Some early researches suggest that the presence of glucosamine in this drug might worsen insulin resistance which can lead to an increase in blood sugar in people with type 2 diabetes. So, it is important that you inform your doctor if have diabetes. But now, according to recent studies it has been seen that even though glucosamine is a type of sugar, it does not appear to affect blood sugar levels or insulin sensitivity. However, it is advised to consult your doctor before taking this medicine. Q. How long will Cartidin gm 50 mg/500 mg Tablet take to show an effect? You may need to take Cartidin gm 50 mg/500 mg Tablet for four to six weeks before you notice any improvement. If your symptoms do not improve by that time, then it is advisable for you to talk to your doctor about other ways of managing your arthritis. Q. Are there any special precautions that need to be taken while taking Cartidin gm 50 mg/500 mg Tablet? Yes, people taking blood-thinning medicines, such as warfarin, should talk to their doctor before taking Cartidin gm 50 mg/500 mg Tablet as it may increase the risk of bleeding. Q. What are the instructions for the storage and disposal of Cartidin gm 50 mg/500 mg Tablet? Keep this medicine in the packet or the container it came in, tightly closed. Store it according to the instructions mentioned on the pack or label. Dispose of the unused medicine. Make sure it is not consumed by pets, children and other people. Q. Does the use of Cartidin gm 50 mg/500 mg Tablet increase the chances of developing glaucoma? According to some recent studies, it has been found that using Cartidin gm 50 mg/500 mg Tablet has been linked with increased ocular pressure (IOP) in patients with a history of ocular hypertension. This is due to the presence of glucosamine in this medicine. However, it is advised to consult your doctor before taking this medicine.
english
<filename>package.json { "name": "react-native-adyenpay", "version": "0.1.0", "description": "Adyen Support For React Native Library", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [ "android", "ios", "react", "native", "react-native", "native-modules", "adyen", "rnpm" ], "repository": { "type": "git", "url": "https://github.com/renganatha10/react-native-adyenpay.git" }, "homepage": "https://github.com/renganatha10/react-native-adyenpay#readme", "author": "Renganatha <https://twitter.com/renganatha10>", "license": "MIT", "readmeFilename": "README.md", "devEngines": { "node": "8.x || 9.x" }, "peerDependencies": { "react": ">=16.0.0-alpha.3", "react-native": ">=0.46.0" } }
json
package application; /** * classe abstraite representant les objets * @author Purple */ public abstract class Objet { /** * represente l'abscisse de l'objet dans le labyrinthe */ private int x; /** * represente l'ordonnee de l'objet dans le labyrinthe */ private int y; /* * permet d'instancier un objet a partir de coordonnees * @param dx abscisse de l'objet * @param dy ordonnee de l'objet */ public Objet(int dx, int dy) { this.x = dx; this.y = dy; } /** * renvoit l'abscisse de l'objet * @return x */ public int getX() { return x; } /** * renvoit l'ordonnee de l'objet * @return y */ public int getY() { return y; } }
java
<reponame>Frodo45127/rpfm_test_updater //---------------------------------------------------------------------------// // Copyright (c) 2017-2020 <NAME>. All rights reserved. // // This file is part of the Rusted PackFile Manager (RPFM) project, // which can be found here: https://github.com/Frodo45127/rpfm. // // This file is licensed under the MIT license, which can be found here: // https://github.com/Frodo45127/rpfm/blob/master/LICENSE. //---------------------------------------------------------------------------// /*! Module that defines the games this lib supports. This module defines the list of games this lib support for any `Game-Specific` feature. You should have no business here, except for supporting a new game. !*/ use indexmap::IndexMap; use crate::packfile::PFHVersion; // Display Name for all the Supported Games. pub const DISPLAY_NAME_TROY: &str = "Troy"; pub const DISPLAY_NAME_THREE_KINGDOMS: &str = "Three Kingdoms"; pub const DISPLAY_NAME_WARHAMMER_2: &str = "Warhammer 2"; pub const DISPLAY_NAME_WARHAMMER: &str = "Warhammer"; pub const DISPLAY_NAME_THRONES_OF_BRITANNIA: &str = "Thrones of Britannia"; pub const DISPLAY_NAME_ATTILA: &str = "Attila"; pub const DISPLAY_NAME_ROME_2: &str = "Rome 2"; pub const DISPLAY_NAME_SHOGUN_2: &str = "Shogun 2"; pub const DISPLAY_NAME_NAPOLEON: &str = "Napoleon"; pub const DISPLAY_NAME_EMPIRE: &str = "Empire"; pub const DISPLAY_NAME_ARENA: &str = "Arena"; // Key for all the supported games. pub const KEY_TROY: &str = "troy"; pub const KEY_THREE_KINGDOMS: &str = "three_kingdoms"; pub const KEY_WARHAMMER_2: &str = "warhammer_2"; pub const KEY_WARHAMMER: &str = "warhammer"; pub const KEY_THRONES_OF_BRITANNIA: &str = "thrones_of_britannia"; pub const KEY_ATTILA: &str = "attila"; pub const KEY_ROME_2: &str = "rome_2"; pub const KEY_SHOGUN_2: &str = "shogun_2"; pub const KEY_NAPOLEON: &str = "napoleon"; pub const KEY_EMPIRE: &str = "empire"; pub const KEY_ARENA: &str = "arena"; /// This struct represents the list of games supported by this lib. pub type SupportedGames = IndexMap<&'static str, GameInfo>; /// This struct holds all the info needed for a game to be "supported" by RPFM features. #[derive(Clone, Debug)] pub struct GameInfo { /// This is the name it'll show up for the user. The *pretty name*. For example, in a dropdown (Warhammer 2). pub display_name: &'static str, /// This is the PFHVersion used at the start of every PackFile for that game. pub pfh_version: Vec<PFHVersion>, /// This is the full name of the schema file used for the game. For example: `schema_wh2.ron`. pub schema: String, /// These are the PackFiles from where we load the data for db references. Since 1.0, we use data.pack or equivalent for this. pub db_packs: Vec<String>, /// These are the PackFiles from where we load the data for loc special stuff. pub loc_packs: Vec<String>, /// This is the `SteamID` used by the game, if it's on steam. If not, it's just None. pub steam_id: Option<u64>, /// This is the **type** of raw files the game uses. -1 is "Don't have Assembly Kit". 0 is Empire/Nappy. 1 is Shogun 2. 2 is anything newer than Shogun 2. pub raw_db_version: i16, /// This is the file containing the processed data from the raw db files from the Assembly Kit. If no Asskit is released for the game, set this to none. pub pak_file: Option<String>, /// This is the file used for checking scripts with Kailua. If there is no file, set it as None. pub ca_types_file: Option<String>, /// If we can save `PackFile` files for the game. pub supports_editing: bool, /// Name of the icon used to display the game as `Game Selected`, in an UI. pub game_selected_icon: String, /// Name of the big icon used to display the game as `Game Selected`, in an UI. pub game_selected_big_icon: String, } /// This function returns a `SupportedGames` struct with the list of all games supported by this lib inside. pub fn get_supported_games_list() -> SupportedGames { let mut list = SupportedGames::new(); // Troy list.insert(KEY_TROY, GameInfo { display_name: DISPLAY_NAME_TROY, pfh_version: vec![PFHVersion::PFH5], schema: "schema_troy.ron".to_owned(), db_packs: vec!["data.pack".to_owned()], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_br.pack".to_owned(), // Brazilian "local_cz.pack".to_owned(), // Czech "local_ge.pack".to_owned(), // German "local_sp.pack".to_owned(), // Spanish "local_fr.pack".to_owned(), // French "local_it.pack".to_owned(), // Italian "local_kr.pack".to_owned(), // Korean "local_pl.pack".to_owned(), // Polish "local_ru.pack".to_owned(), // Russian "local_tr.pack".to_owned(), // Turkish "local_cn.pack".to_owned(), // Simplified Chinese "local_zh.pack".to_owned(), // Traditional Chinese ], steam_id: None, raw_db_version: 2, pak_file: Some("troy.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_troy.png".to_owned(), game_selected_big_icon: "gs_big_troy.png".to_owned(), }); // Three Kingdoms list.insert(KEY_THREE_KINGDOMS, GameInfo { display_name: DISPLAY_NAME_THREE_KINGDOMS, pfh_version: vec![PFHVersion::PFH5], schema: "schema_3k.ron".to_owned(), db_packs: vec!["database.pack".to_owned()], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_br.pack".to_owned(), // Brazilian "local_cz.pack".to_owned(), // Czech "local_ge.pack".to_owned(), // German "local_sp.pack".to_owned(), // Spanish "local_fr.pack".to_owned(), // French "local_it.pack".to_owned(), // Italian "local_kr.pack".to_owned(), // Korean "local_pl.pack".to_owned(), // Polish "local_ru.pack".to_owned(), // Russian "local_tr.pack".to_owned(), // Turkish "local_cn.pack".to_owned(), // Simplified Chinese "local_zh.pack".to_owned(), // Traditional Chinese ], steam_id: Some(779_340), raw_db_version: 2, pak_file: Some("3k.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_3k.png".to_owned(), game_selected_big_icon: "gs_big_3k.png".to_owned(), }); // Warhammer 2 list.insert(KEY_WARHAMMER_2, GameInfo { display_name: DISPLAY_NAME_WARHAMMER_2, pfh_version: vec![PFHVersion::PFH5], schema: "schema_wh2.ron".to_owned(), db_packs: vec!["data.pack".to_owned()], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_br.pack".to_owned(), // Brazilian "local_cz.pack".to_owned(), // Czech "local_ge.pack".to_owned(), // German "local_sp.pack".to_owned(), // Spanish "local_fr.pack".to_owned(), // French "local_it.pack".to_owned(), // Italian "local_kr.pack".to_owned(), // Korean "local_pl.pack".to_owned(), // Polish "local_ru.pack".to_owned(), // Russian "local_tr.pack".to_owned(), // Turkish "local_cn.pack".to_owned(), // Simplified Chinese "local_zh.pack".to_owned(), // Traditional Chinese ], steam_id: Some(594_570), raw_db_version: 2, pak_file: Some("wh2.pak".to_owned()), ca_types_file: Some("ca_types_wh2".to_owned()), supports_editing: true, game_selected_icon: "gs_wh2.png".to_owned(), game_selected_big_icon: "gs_big_wh2.png".to_owned(), }); // Warhammer list.insert(KEY_WARHAMMER, GameInfo { display_name: DISPLAY_NAME_WARHAMMER, pfh_version: vec![PFHVersion::PFH4], schema: "schema_wh.ron".to_owned(), db_packs: vec![ "data.pack".to_owned(), // Central data PackFile "data_bl.pack".to_owned(), // Blood DLC Data "data_bm.pack".to_owned() // Beastmen DLC Data ], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_br.pack".to_owned(), // Brazilian "local_cz.pack".to_owned(), // Czech "local_ge.pack".to_owned(), // German "local_sp.pack".to_owned(), // Spanish "local_fr.pack".to_owned(), // French "local_it.pack".to_owned(), // Italian "local_kr.pack".to_owned(), // Korean "local_pl.pack".to_owned(), // Polish "local_ru.pack".to_owned(), // Russian "local_tr.pack".to_owned(), // Turkish "local_cn.pack".to_owned(), // Simplified Chinese "local_zh.pack".to_owned(), // Traditional Chinese ], steam_id: Some(364_360), raw_db_version: 2, pak_file: Some("wh.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_wh.png".to_owned(), game_selected_big_icon: "gs_big_wh.png".to_owned(), }); // Thrones of Britannia list.insert(KEY_THRONES_OF_BRITANNIA, GameInfo { display_name: DISPLAY_NAME_THRONES_OF_BRITANNIA, pfh_version: vec![PFHVersion::PFH4], schema: "schema_tob.ron".to_owned(), db_packs: vec!["data.pack".to_owned()], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_br.pack".to_owned(), // Brazilian "local_cz.pack".to_owned(), // Czech "local_ge.pack".to_owned(), // German "local_sp.pack".to_owned(), // Spanish "local_fr.pack".to_owned(), // French "local_it.pack".to_owned(), // Italian "local_kr.pack".to_owned(), // Korean "local_pl.pack".to_owned(), // Polish "local_ru.pack".to_owned(), // Russian "local_tr.pack".to_owned(), // Turkish "local_cn.pack".to_owned(), // Simplified Chinese "local_zh.pack".to_owned(), // Traditional Chinese ], steam_id: Some(712_100), raw_db_version: 2, pak_file: Some("tob.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_tob.png".to_owned(), game_selected_big_icon: "gs_big_tob.png".to_owned(), }); // Attila list.insert(KEY_ATTILA, GameInfo { display_name: DISPLAY_NAME_ATTILA, pfh_version: vec![PFHVersion::PFH4], schema: "schema_att.ron".to_owned(), db_packs: vec!["data.pack".to_owned()], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_br.pack".to_owned(), // Brazilian "local_cz.pack".to_owned(), // Czech "local_ge.pack".to_owned(), // German "local_sp.pack".to_owned(), // Spanish "local_fr.pack".to_owned(), // French "local_it.pack".to_owned(), // Italian "local_kr.pack".to_owned(), // Korean "local_pl.pack".to_owned(), // Polish "local_ru.pack".to_owned(), // Russian "local_tr.pack".to_owned(), // Turkish "local_cn.pack".to_owned(), // Simplified Chinese "local_zh.pack".to_owned(), // Traditional Chinese ], steam_id: Some(325_610), raw_db_version: 2, pak_file: Some("att.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_att.png".to_owned(), game_selected_big_icon: "gs_big_att.png".to_owned(), }); // Rome 2 list.insert(KEY_ROME_2, GameInfo { display_name: DISPLAY_NAME_ROME_2, pfh_version: vec![PFHVersion::PFH4], schema: "schema_rom2.ron".to_owned(), db_packs: vec!["data_rome2.pack".to_owned()], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_br.pack".to_owned(), // Brazilian "local_cz.pack".to_owned(), // Czech "local_ge.pack".to_owned(), // German "local_sp.pack".to_owned(), // Spanish "local_fr.pack".to_owned(), // French "local_it.pack".to_owned(), // Italian "local_kr.pack".to_owned(), // Korean "local_pl.pack".to_owned(), // Polish "local_ru.pack".to_owned(), // Russian "local_tr.pack".to_owned(), // Turkish "local_cn.pack".to_owned(), // Simplified Chinese "local_zh.pack".to_owned(), // Traditional Chinese ], steam_id: Some(214_950), raw_db_version: 2, pak_file: Some("rom2.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_rom2.png".to_owned(), game_selected_big_icon: "gs_big_rom2.png".to_owned(), }); // Shogun 2 list.insert(KEY_SHOGUN_2, GameInfo { display_name: DISPLAY_NAME_SHOGUN_2, pfh_version: vec![PFHVersion::PFH3, PFHVersion::PFH2], schema: "schema_sho2.ron".to_owned(), db_packs: vec!["data.pack".to_owned()], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_br.pack".to_owned(), // Brazilian "local_cz.pack".to_owned(), // Czech "local_ge.pack".to_owned(), // German "local_sp.pack".to_owned(), // Spanish "local_fr.pack".to_owned(), // French "local_it.pack".to_owned(), // Italian "local_kr.pack".to_owned(), // Korean "local_pl.pack".to_owned(), // Polish "local_ru.pack".to_owned(), // Russian "local_tr.pack".to_owned(), // Turkish "local_cn.pack".to_owned(), // Simplified Chinese "local_zh.pack".to_owned(), // Traditional Chinese ], steam_id: Some(34330), raw_db_version: 1, pak_file: Some("sho2.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_sho2.png".to_owned(), game_selected_big_icon: "gs_big_sho2.png".to_owned(), }); // Napoleon list.insert(KEY_NAPOLEON, GameInfo { display_name: DISPLAY_NAME_NAPOLEON, pfh_version: vec![PFHVersion::PFH0], schema: "schema_nap.ron".to_owned(), db_packs: vec![ // NOTE: Patches 5 and 7 has no table changes, so they should not be here. "data.pack".to_owned(), // Main DB PackFile "patch.pack".to_owned(), // First Patch "patch2.pack".to_owned(), // Second Patch "patch3.pack".to_owned(), // Third Patch "patch4.pack".to_owned(), // Fourth Patch "patch6.pack".to_owned(), // Six Patch ], loc_packs: vec![ "local_en.pack".to_owned(), // English "local_en_patch.pack".to_owned(), // English Patch "local_br.pack".to_owned(), // Brazilian "local_br_patch.pack".to_owned(), // Brazilian Patch "local_cz.pack".to_owned(), // Czech "local_cz_patch.pack".to_owned(), // Czech Patch "local_ge.pack".to_owned(), // German "local_ge_patch.pack".to_owned(), // German Patch "local_sp.pack".to_owned(), // Spanish "local_sp_patch.pack".to_owned(), // Spanish Patch "local_fr.pack".to_owned(), // French "local_fr_patch.pack".to_owned(), // French Patch "local_it.pack".to_owned(), // Italian "local_it_patch.pack".to_owned(), // Italian Patch "local_kr.pack".to_owned(), // Korean "local_kr_patch.pack".to_owned(), // Korean Patch "local_pl.pack".to_owned(), // Polish "local_pl_patch.pack".to_owned(), // Polish Patch "local_ru.pack".to_owned(), // Russian "local_ru_patch.pack".to_owned(), // Russian Patch "local_tr.pack".to_owned(), // Turkish "local_tr_patch.pack".to_owned(), // Turkish Patch "local_cn.pack".to_owned(), // Simplified Chinese "local_cn_patch.pack".to_owned(), // Simplified Chinese Patch "local_zh.pack".to_owned(), // Traditional Chinese "local_zh_patch.pack".to_owned(), // Traditional Chinese Patch ], steam_id: Some(34030), raw_db_version: 0, pak_file: Some("nap.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_nap.png".to_owned(), game_selected_big_icon: "gs_big_nap.png".to_owned(), }); // Empire list.insert(KEY_EMPIRE, GameInfo { display_name: DISPLAY_NAME_EMPIRE, pfh_version: vec![PFHVersion::PFH0], schema: "schema_emp.ron".to_owned(), db_packs: vec![ "main.pack".to_owned(), // Main DB PackFile "models.pack".to_owned(), // Models PackFile (contains model-related DB Tables) "patch.pack".to_owned(), // First Patch "patch2.pack".to_owned(), // Second Patch "patch3.pack".to_owned(), // Third Patch "patch4.pack".to_owned(), // Fourth Patch "patch5.pack".to_owned(), // Fifth Patch ], loc_packs: vec![ "local_en.pack".to_owned(), // English "patch_en.pack".to_owned(), // English Patch "local_br.pack".to_owned(), // Brazilian "patch_br.pack".to_owned(), // Brazilian Patch "local_cz.pack".to_owned(), // Czech "patch_cz.pack".to_owned(), // Czech Patch "local_ge.pack".to_owned(), // German "patch_ge.pack".to_owned(), // German Patch "local_sp.pack".to_owned(), // Spanish "patch_sp.pack".to_owned(), // Spanish Patch "local_fr.pack".to_owned(), // French "patch_fr.pack".to_owned(), // French Patch "local_it.pack".to_owned(), // Italian "patch_it.pack".to_owned(), // Italian Patch "local_kr.pack".to_owned(), // Korean "patch_kr.pack".to_owned(), // Korean Patch "local_pl.pack".to_owned(), // Polish "patch_pl.pack".to_owned(), // Polish Patch "local_ru.pack".to_owned(), // Russian "patch_ru.pack".to_owned(), // Russian Patch "local_tr.pack".to_owned(), // Turkish "patch_tr.pack".to_owned(), // Turkish Patch "local_cn.pack".to_owned(), // Simplified Chinese "patch_cn.pack".to_owned(), // Simplified Chinese Patch "local_zh.pack".to_owned(), // Traditional Chinese "patch_zh.pack".to_owned(), // Traditional Chinese Patch ], steam_id: Some(10500), raw_db_version: 0, pak_file: Some("emp.pak".to_owned()), ca_types_file: None, supports_editing: true, game_selected_icon: "gs_emp.png".to_owned(), game_selected_big_icon: "gs_big_emp.png".to_owned(), }); // NOTE: There are things that depend on the order of this list, and this game must ALWAYS be the last one. // Otherwise, stuff that uses this list will probably break. // Arena list.insert(KEY_ARENA, GameInfo { display_name: DISPLAY_NAME_ARENA, pfh_version: vec![PFHVersion::PFH5, PFHVersion::PFH4], schema: "schema_are.ron".to_owned(), db_packs: vec!["wad.pack".to_owned()], loc_packs: vec!["local_ex.pack".to_owned()], steam_id: None, raw_db_version: -1, pak_file: None, ca_types_file: None, supports_editing: false, game_selected_icon: "gs_are.png".to_owned(), game_selected_big_icon: "gs_big_are.png".to_owned(), }); list }
rust
<filename>iocage/main.py """The main CLI for ioc.""" from __future__ import print_function import glob import imp import locale import logging import os import stat import sys import click from iocage.lib.ioc_check import IOCCheck # This prevents it from getting in our way. from click import core core._verify_python3_env = lambda: None user_locale = os.environ.get("LANG", "en_US.UTF-8") locale.setlocale(locale.LC_ALL, user_locale) def print_version(ctx, param, value): """Prints the version and then exits.""" if not value or ctx.resilient_parsing: return print("Version\t0.9.7 2017/03/08") sys.exit() @click.group(help="A jail manager.") @click.option("--version", "-v", is_flag=True, callback=print_version, help="Display iocage's version and exit.") @click.pass_context def cli(ctx, version): """The placeholder for the calls.""" mod = ctx.obj[ctx.invoked_subcommand] try: if mod.__rootcmd__: if "--help" not in sys.argv[1:]: if os.geteuid() != 0: sys.exit("You need to have root privileges" " to run {}!".format(mod.__name__)) except AttributeError: pass IOC_LIB = os.path.dirname(os.path.abspath(__file__)) PATH = os.path.join("{}/cli".format(IOC_LIB)) MODULES = {} for lib in glob.glob("{}/*.py".format(PATH)): if "__init__.py" in lib: continue replace = lib.split("/")[-1].replace(".py", "") _file, pathname, description = imp.find_module(replace, [PATH]) module = imp.load_module(replace, _file, pathname, description) MODULES[replace] = module cli.add_command(getattr(module, module.__cmdname__)) def main(): log_file = os.environ.get("IOCAGE_LOGFILE", "/dev/stdout") mode = "a" if not stat.S_ISCHR(os.stat(log_file).st_mode) else "w" for arg in sys.argv: key, _, val = arg.partition("=") if "IOCAGE_LOGFILE" in key: if val: log_file = val # If IOCAGE_LOGFILE is supplied on activate AFTER the pool name, # hilarity ensues. Let's avoid that. sys.argv.remove(arg) logging.basicConfig(filename=log_file, filemode=mode, level=logging.DEBUG, format='%(message)s') skip_check = False skip_check_cmds = ["--help", "activate", "deactivate", "-v", "--version"] try: if "iocage" in sys.argv[0] and len(sys.argv) == 1: skip_check = True for arg in sys.argv[1:]: if arg in skip_check_cmds: skip_check = True elif "clean" in arg: skip_check = True IOCCheck(silent=True) if not skip_check: IOCCheck() cli(obj=MODULES) except RuntimeError as err: exit(err) if __name__ == '__main__': main()
python
<reponame>projectweekend/3spot import json from time import sleep from boto import sqs from boto.dynamodb2.table import Table from boto.dynamodb2.exceptions import ConditionalCheckFailedException from worker import config from worker.models import Account from worker.logs import get_logger LOGGER = get_logger() FEED_ITEMS = Table('feed_items') def add_feed_item(new_feed_item): try: FEED_ITEMS.put_item(data=new_feed_item) except ConditionalCheckFailedException: message = "Feed item already exists for {0} on {1}".format( new_feed_item['spotify_username'], new_feed_item['date_posted']) LOGGER.exception(message) return False except: message = "Failed to add feed item for {0}".format(new_feed_item['spotify_username']) LOGGER.exception(message) return False return True def process_message(m): try: data = json.loads(m.get_body()) except ValueError: LOGGER.exception("Invalid JSON message") return date_to_process = data['date_to_process'] spotify_username = data['spotify_username'] try: account = Account(spotify_username) except: message = "Failed to load account for {0}".format(spotify_username) LOGGER.exception(message) return new_feed_item = account.feed_item(date_to_process) if new_feed_item: item_added = add_feed_item(new_feed_item) if item_added: account.update_last_processed(date_to_process) def main(): conn = sqs.connect_to_region(config.SQS_REGION) q = conn.create_queue(config.SQS_QUEUE_NAME) while True: messages = q.get_messages( num_messages=5, wait_time_seconds=config.SQS_WAIT_TIME) if messages: for m in messages: process_message(m) m.delete() else: sleep(config.SLEEP_TIME) if __name__ == '__main__': main()
python
Murray Futterman : Goddamn foreign TV. I told ya we should've got a Zenith. Murray Futterman : [turning to Billy and Kate] You got-you gotta watch out for them forgeiners cuz they plant gremlins in their machinery. Murray Futterman : It's the same gremlins that brought down our planes in the big one. Murray Futterman : [turning round] that's right! World war two. Murray Futterman : Good old WWII. Murray Futterman : [Murray tries to start his car] Y'know their still shippin them over here. They put em in cars, they put em in yer tv. They put em in stereos and those little radios you stick in your ears. They even put em in watches, they have teeny gremlins for our watches! Murray Futterman : Goddamn foreign cars. Sheila Futterman : Murray, did you hear from the noodle factory? Murray Futterman : Sheila, the noodle factory is not going to reopen. Sheila Futterman : [looks at him] Ever? Murray Futterman : Mrs. Deagle closed it down for good. Murray Futterman : I guess that's the end of my career in noodles. Sheila Futterman : [smiles] There's more to life than macaroni. Murray Futterman : Hey Billy, what's the matter? You need a jump? Billy Peltzer : No, thanks, Mr. Futterman. I'm pretty much late for work as it is. Murray Futterman : These goddamn foreign cars - they always freeze up on you. You don't find American machinery doing that. Our stuff can take anything. See that plow? 15 years old. Hasn't given me a day's trouble in years. You know why? Kentucky Harvester. It ain't some foreign piece of crap you pick up these days. That's a Kentucky Harvester!
english
- 53 min ago 50th GST Council Meet: Cancer Medicine Price May Be Reduced; How Can It Benefit Patients? - 7 hrs ago From Genetics To Climate: Is The Dengue Virus Changing? Salt is an essential part of our days - at least the majority of us. In addition to its use in the culinary side, salt has certain beauty benefits too. Yeap, it can be used for your skin and even hair. You may be surprised to learn that sea salt contains a number of minerals and nutrients that your skin is deficient in. It is also a good source of magnesium, calcium, sodium, and potassium, which enhance the texture and moisture of your skin. It is important to note that sea salt differs significantly from ordinary salt in terms of its mineral content. Sea salt is rich in minerals, such as magnesium, calcium, sodium, and potassium, all of which play an important role in the health, function, and communication of our skin cells [1][2]. So, when we say salt for skin, we mean sea salt for skin. Salt For Skincare: How To Use It? In addition to cleansing pores deeply, salt also balances oil production and inhibits the growth of bacteria that can cause breakouts and acne. - In a small spray bottle, combine one teaspoon of sea salt with four ounces of warm water. - Mix until the salt dissolves. - Spritz on clean, dry skin, avoiding the eyes. - Use once a week. The anti-inflammatory properties of salt and honey help soothe skin and soothe breakouts and irritations. They also help retain hydration in the layers of the skin where it is most needed. - To make a spreadable paste, combine two teaspoons of sea salt, preferably finely ground, with four teaspoons of raw honey. - Apply evenly to clean, dry skin, avoiding the eye area. - Let it sit on the skin for 10 to 15 minutes. - Soak a washcloth in very warm water, and gently squeeze it out. - For 30 seconds, place a warm washcloth on your face. - In a circular motion, gently exfoliate your skin with your fingers while rinsing it thoroughly with tepid water. For those with pale skin and flaky patches, sea salt is great for hydrating the skin. It can also enhance the glow of your skin when mixed with oil. - In a bowl, combine one teaspoon sea salt, one teaspoon olive oil, and one teaspoon coconut oil. - Combine them well, then gently scrub them on your skin for 2-3 minutes. - After that, wash it with a face wash to remove any excess oil. According to experts, washing your face with salt water can be irritating and harsh, and overuse can compromise the integrity of your skin. Some skin conditions, such as acne and eczema, may be worsened or may even lead to hyperpigmentation and scarring as a result [3]. So make sure you limit your use of salt for skincare. - healthReasons Why You Should Reduce Your Salt Intake; Does Salt Intake Affect Men And Women Differently? - wellnessWorld ORS Day 2021: Can Oral Rehydration Solution (ORS) Speed Up Recovery From COVID-19? - wellness8 Daily Habits You Could Be Following That Can Shorten Your Life Span!
english
<reponame>brianhuangxp/my-dojo package com.demo.lottery; import com.demo.lottery.handler.AbstractRandomHandler; import com.demo.lottery.handler.RandomAlwaysOneHandler; import com.demo.lottery.handler.RandomOneOrNullHandler; import com.demo.lottery.utils.AssertUtils; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ThreadLocalRandom; /** * Created by brian.huang on 14-8-14. */ public class RandomProvider { private static final Map<RandomStrategy.RandomStrategyEnum, AbstractRandomHandler> ABSTRACT_RANDOM_HANDLER_MAP; static { ABSTRACT_RANDOM_HANDLER_MAP = new HashMap<>(); ABSTRACT_RANDOM_HANDLER_MAP.put(RandomStrategy.RandomStrategyEnum.ONE_OR_NULL, new RandomOneOrNullHandler()); ABSTRACT_RANDOM_HANDLER_MAP.put(RandomStrategy.RandomStrategyEnum.ALWAYS_ONE, new RandomAlwaysOneHandler()); } private ThreadLocalRandom random; public <T> T lotteryItem(List<LotteryItem> weightItems, RandomStrategy randomStrategy) { return lotteryItem(weightItems, randomStrategy, null); } private AbstractRandomHandler buildRandomHandler(RandomStrategy randomStrategy) { return ABSTRACT_RANDOM_HANDLER_MAP.get(randomStrategy.getRandomStrategyEnum()); } public <T> T lotteryItem(List<LotteryItem> weightItems, RandomStrategy randomStrategy, Integer totalWeight) { AbstractRandomHandler abstractRandomHandler = buildRandomHandler(randomStrategy); AssertUtils.notNull(abstractRandomHandler, "Random strategy doesn't support."); abstractRandomHandler.validate(weightItems); List<LotteryItem> soredItems = abstractRandomHandler.sortItems(weightItems, randomStrategy); if (random != null) { randomStrategy.setRandom(random); } if (totalWeight != null) { return abstractRandomHandler.lotteryItem(soredItems, totalWeight, randomStrategy); } else { return abstractRandomHandler.lotteryItem(soredItems, randomStrategy); } } public void setRandom(ThreadLocalRandom random) { this.random = random; } }
java
<gh_stars>1000+ import * as React from 'react'; export interface MenuItemUnstyledComponentsPropsOverrides {} export interface MenuItemOwnerState extends MenuItemUnstyledProps { disabled: boolean; focusVisible: boolean; } export interface MenuItemUnstyledProps { children?: React.ReactNode; className?: string; onClick?: React.MouseEventHandler<HTMLElement>; /** * If `true`, the menu item will be disabled. * @default false */ disabled?: boolean; component?: React.ElementType; components?: { Root?: React.ElementType; }; componentsProps?: { root?: React.ComponentPropsWithRef<'li'> & MenuItemUnstyledComponentsPropsOverrides; }; /** * A text representation of the menu item's content. * Used for keyboard text navigation matching. */ label?: string; }
typescript
Your Mac's sheer ease of use is a blessing and a curse. On the one hand, kids love it. On the other... kids love it. That gives parents an interesting challenge: encouraging our children's computer use without letting them cause chaos. However, the good news is that it doesn't take much effort to protect your Mac from inquisitive young minds. The single best thing you can do is give everybody their own login in System Preferences > Accounts. That keeps everybody's files, folders, applications and iLife libraries separate, so there's no danger of anyone meddling with the family photos. It enables you to limit the applications and websites your children can use. And it gives everybody their own space that they can tweak things to suit their personal preferences. Give everyone a password - if you don't, anyone can log in as anyone else - and use System Preferences > Security > General to password-lock your screensaver, sleep mode and System Preferences. Childproofing your Mac is also about simplicity. You can disable Spaces in System Preferences to avoid confusion, and you can also use OS X's Parental Controls to activate the stripped-down Simple Finder mode and prevent changes to the Dock. Third-party software can help here too: for example, Lockey (£4.33) disables your Mac's keyboard to prevent accidental keystrokes interrupting movies and TV shows, KidsMenu (£12.38) provides a kid-friendly program launcher and both AlphaBaby (Free) and BabySafe II (£12.38) create safe spaces for babies to interact with sounds, shapes and colours. Last but definitely not least, make regular backups of everything important. Accidents can happen, disaster can strike and hard disks can and do fail. If it matters to you, make sure you have another copy that's in a safe place should anything happen to your Mac. iTunes has excellent parental controls. Go to iTunes Preferences > Parental Controls dialog to disable access to iTunes' features and content ratings. For example, you can prevent your kids accessing your podcasts, other Macs' shared libraries, Ping or the iTunes Store. For content you've bought from the iTunes Store, you can enforce age ratings - so you can limit movies to PG only or block access to apps rated for adult content, say. However, note that such ratings don't apply to content from elsewhere, such as ripped DVDs or CDs. If you use iTunes' sharing options (Preferences > Sharing) and share specific playlists, other users can access those playlists from iTunes when they log in to their own account. So, for instance, you can share music but not movies, TV shows or podcasts. Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team.
english
<reponame>LiuHaolan/models import oneflow as flow import oneflow.nn as nn class Down2d(nn.Module): def __init__(self, in_channel, out_channel, kernel, stride, padding): super(Down2d, self).__init__() self.c1 = nn.Conv2d( in_channel, out_channel, kernel_size=kernel, stride=stride, padding=padding ) self.n1 = nn.InstanceNorm2d(out_channel) self.c2 = nn.Conv2d( in_channel, out_channel, kernel_size=kernel, stride=stride, padding=padding ) self.n2 = nn.InstanceNorm2d(out_channel) def forward(self, x): x1 = self.c1(x) x1 = self.n1(x1) x2 = self.c2(x) x2 = self.n2(x2) x3 = x1 * flow.sigmoid(x2) return x3 class Up2d(nn.Module): def __init__(self, in_channel, out_channel, kernel, stride, padding): super(Up2d, self).__init__() self.c1 = nn.ConvTranspose2d( in_channel, out_channel, kernel_size=kernel, stride=stride, padding=padding ) self.n1 = nn.InstanceNorm2d(out_channel) self.c2 = nn.ConvTranspose2d( in_channel, out_channel, kernel_size=kernel, stride=stride, padding=padding ) self.n2 = nn.InstanceNorm2d(out_channel) def forward(self, x): x1 = self.c1(x) x1 = self.n1(x1) x2 = self.c2(x) x2 = self.n2(x2) x3 = x1 * flow.sigmoid(x2) return x3 class Generator(nn.Module): def __init__(self): super(Generator, self).__init__() self.downsample = nn.Sequential( Down2d(1, 32, (3, 9), (1, 1), (1, 4)), Down2d(32, 64, (4, 8), (2, 2), (1, 3)), Down2d(64, 128, (4, 8), (2, 2), (1, 3)), Down2d(128, 64, (3, 5), (1, 1), (1, 2)), Down2d(64, 5, (9, 5), (9, 1), (1, 2)), ) self.up1 = Up2d(9, 64, (9, 5), (9, 1), (0, 2)) self.up2 = Up2d(68, 128, (3, 5), (1, 1), (1, 2)) self.up3 = Up2d(132, 64, (4, 8), (2, 2), (1, 3)) self.up4 = Up2d(68, 32, (4, 8), (2, 2), (1, 3)) self.deconv = nn.ConvTranspose2d(36, 1, (3, 9), (1, 1), (1, 4)) def forward(self, x, c): x = self.downsample(x) c = c.view(c.size(0), c.size(1), 1, 1) c1 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c1], dim=1) x = self.up1(x) c2 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c2], dim=1) x = self.up2(x) c3 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c3], dim=1) x = self.up3(x) c4 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c4], dim=1) x = self.up4(x) c5 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c5], dim=1) x = self.deconv(x) return x class Discriminator(nn.Module): def __init__(self): super(Discriminator, self).__init__() self.d1 = Down2d(5, 32, (3, 9), (1, 1), (1, 4)) self.d2 = Down2d(36, 32, (3, 8), (1, 2), (1, 3)) self.d3 = Down2d(36, 32, (3, 8), (1, 2), (1, 3)) self.d4 = Down2d(36, 32, (3, 6), (1, 2), (1, 2)) self.conv = nn.Conv2d(36, 1, (36, 5), (36, 1), (0, 2)) self.pool = nn.AvgPool2d((1, 64)) def forward(self, x, c): c = c.view(c.size(0), c.size(1), 1, 1) c1 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c1], dim=1) x = self.d1(x) c2 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c2], dim=1) x = self.d2(x) c3 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c3], dim=1) x = self.d3(x) c4 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c4], dim=1) x = self.d4(x) c5 = c.repeat(1, 1, x.size(2), x.size(3)) x = flow.cat([x, c5], dim=1) x = self.conv(x) x = self.pool(x) x = flow.squeeze(x) x = flow.tanh(x) return x class DomainClassifier(nn.Module): def __init__(self): super(DomainClassifier, self).__init__() self.main = nn.Sequential( Down2d(1, 8, (4, 4), (2, 2), (5, 1)), Down2d(8, 16, (4, 4), (2, 2), (1, 1)), Down2d(16, 32, (4, 4), (2, 2), (0, 1)), Down2d(32, 16, (3, 4), (1, 2), (1, 1)), nn.Conv2d(16, 4, (1, 4), (1, 2), (0, 1)), nn.AvgPool2d((1, 16)), nn.LogSoftmax(), ) def forward(self, x): x = x[:, :, 0:8, :] x = self.main(x) x = x.view(x.size(0), x.size(1)) return x
python
Artificial Intelligence is slowly being integrated into mainstream consumer applications solutions. Ingenious developers like Fahad Hanif are working long hours to make devices work with as little human intervention as possible. Hanif is a licensed app developer who has been developing mobile applications for over four years. He has helped make many ground-breaking ideas a possibility and has worked in tandem with development studios to create a working app for consumers. He recently published an AI-based selfie app that is topping the charts on Google Play Store and is ranked among the top three competitors for the world’s top AI projects. Topi AI is a huge project for Hanif as it automatically generates a singing selfie after scanning the user’s face and performing a few one-time scans. This app can be found on Google Play Store. Hanif was drawn to computers and loved exploring the apps on his Android device. He always wanted to learn app development and when he realized how convenient it was to create one, he began playing with the SDK and started creating basic apps. He has been developing apps since the age of 15 and has created small utility apps before jumping to AI-powered solutions that automate the work for the users. He also owns a YouTube channel that has over 133,000 followers who frequent the channel to gain information and be entertained at the same time. He recently received the coveted ‘Silver Play Button’ for completion of the 100,000 subscribers’ milestone, and is working tirelessly to grow his audience with the help of trending yet meaningful content. (ThePrint ValueAd Initiative content is a paid-for, sponsored article. Journalists of ThePrint are not involved in reporting or writing it. )
english
Genshin Impact finally enters the conclusion of Fontaine's main story arc, as the update itself has been titled "Masquerade of the Guilty." Many players will recognize these words from the first-ever trailer in 2020, where HoYoverse termed the Fontaine arc with a similar title. It seems that almost three years later, the community will get to experience the story that has been three years in the making. To lay out all the details, HoYoverse will be holding a scheduled special program, revealing all upcoming characters, events, locations, and a few Primogems in the process. This article focuses on the Primogems from the livestream, as free premium Gacha currencies are always a treat for the community. The total number of Primogems from each livestream adds up to 300, equivalent to one free pull on any banner. Here is a list of all redeem codes revealed from the Genshin Impact 4.2 livestream: VA97KJNF24UV: 100 Primogems and 10 Enhancement Ores. NTQP2KPEJMUH: 100 Primogems and 5 Hero's Wit. 9T96KJNE2LVM: 100 Primogems and 50,000 Mora. Receiving all of the aforementioned codes will collectively grant players 300 Primogems, 5 Hero's Wit, 5 Enhancement Materials, and 50,000 Mora. Note that the aforementioned codes can be acquired via HoYoverse's official website or in-game settings. Here is a detailed guide on how to get the codes: - Head to the official code redemption page to start the process. - Log in using the active credentials tied to servers and your character. - Select the preferred/active with the created character. - Paste the code in the blank space that says "Enter Redemption Code." - Click on the "Redeem" option to acquire the codes. Head inside the game and look for the rewards within the in-game email. With the method via the official website being out of the way, here is a brief guide on the redemption guide via in-game settings: - Launch the game and load it through your created character on any server. - Open the in-game Paimon Menu, the main menu in the top-left corner beside the minimap. - Head to the Settings tab, which can be accessed by clicking the cogwheel icon on the left. - Select the "Accounts" tab located at the very bottom. - Click on the "Redeem Code" tab under the Accounts section, located on the right of your screen. - Paste one of the three codes mentioned above, provided during the livestream, and click on "Redeem." - The rewards tied to the code will be sent via in-game mail. Each code has a 16-hour window until it expires, leading players to be very quick in redeeming them.
english
It was a chaotic day yesterday (20. 12. 2018) after actor Vishal was arrested for trying to break the lock of the Tamil Film Producers Council building in order to enter his office premises. The Nadigar Sangam General Secretary subsequently went on to issue a strong statement saying he would see to it that the planned event for ‘Maestro’ Ilaiyaraaja would be conducted in February while also taking further efforts to ensure a better life ahead for producers in distress. Tensions began when few members from Vishal's rival camp had locked the TFPC building forcing the star, who is also the Tamil Film Producers Council President to resort to such an action. After being held at a marriage hall by the Chennai Police for the entirety of the day, Vishal had addressed the media and stated he would seek justice from the Court. Meanwhile, the Madras High Court today issued an order ordering the removal of the seal on the TFPC building premises while also questioning the police on their decision to obstruct the elected members from entering their respective offices. Now, actor turned politician Kamal Haasan has issued a statement on his Twitter page lauding the Madras High Court’s decision for giving Vishal the justice he had sought. - Vishal 34: Vishal's third film with blockbuster director Hari begins rolling, music director Devi Sri Prasad onboard - OFFICIAL ANNOUNCEMENT!
english
983 Statt. by Minister Ram Janam Bhoomi-Babri [Sh. Lal K. Advani] the U.P. Government, the National integration Council or the promises made in public or the promises made by us here, have been violated, I could not find it anywhere. In a way , in was a matter of satisfaction forme. I talked to the Chief Minister, Shri Kalyan Singh ji at noon and told him that I have seen the statement which was made in the Rajya Sabha, I can tell you that if you were asked, you would also have given the same reply. There is nothing against the U.P. Government in the statement. The day before yesterday he said that they evading and not giving any reply. But in the statement he has made a mentiion of every bit of correspondence made between the two Governments. Just now he made a mention of the Standing Committee of the National Integration Council which would visit the site. He has complained that the U.P. Government has not given the reply to this effect. I will enquire into the matter as to why they have not given the reply. What is the matter? Had there been any thing lacking in Uttar Pradesh Government the day before yesterday, yesterday or even today, it would have definitely been mentioned in these four pages. But nothing of the sort has been mentioned. I feel that the difference between the Home Minister of the day before the yesterday and that of today is clearly visible to this House as well as to the other House, and it is perhaps his last speech to complete the above statement. I would only say that in this provocative speech he has finally given a pices of advice to the House. "I appeal to all the members to keep in mind the complex and sensitive nature of the Ram Janam Bhoomi Babri Masjid dispute. In all that we say to do, we must avoid emotional outbursts or statements which could further aggravate the problem. On the other hand, we must xhibit calm and restrain when discussing this matter so that an acceptable solution of the problem can be found." Masjid Issue 984 Let him go through his last speech that he made in the morning yesterday. Is that a restrained and calm approah and appeal? At the concluding part of it he says that he would dismiss the State Government and would not hesitate to do so. After all, if any Government is violating the Constitution, whether it is the Uttar Pradesh Government, the Andhra Pradesh Government or the Government of "West Bengal, they have a right to dismiss it. But in a 4 page statement there is not even the slightest mention of their fault. Later on he says that they have done so and so and created tension. Is it proper on the part of the Home Minister? It could be proper for any of his colleagues. (Interrruptions) Our hon. friends can do so but I do not expect this thing from the Home Minister. I would request him that if there is any violation of any court order or violation of any article of of the constitution, he should tell us. He should tell the Government of Uttar Pradesh. He should not uilise this Parliament to defame any State Government without facts. SHRI S.B. CHAVAN: Mr. Speaker, Sir, I would only say that Article 356 of the Constitution is used sparingly where the Government feels that there is no other alternative left. In such a case alone, it is definitely used. I will not be able to give my opinion here today. Let the delegation which is leaving for Ayodhya meet me after its return. Then only I will take a final decision in this regard. MR. SPEAKER: I think, today the House is sitting beyonf 6 O' clock also, until all the Members who are present in the House and want to speak, and who are given the opportunity to speak. I am told by the Parliamen
english
<reponame>radityagumay/BenchmarkSentimentAnalysis_2<filename>com/radityalabs/Python/origin/movie/16641.html <HTML><HEAD> <TITLE>Review for Amistad (1997)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0118607">Amistad (1997)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Bob+Bloom"><NAME></A></H3><HR WIDTH="40%" SIZE="4"> <P> Amistad (1997) 3 1/2 stars out of 4. Starring <NAME>, <NAME>, <NAME> and <NAME>. Directed by <NAME>.</P> <P> The first scene is an extreme close-up of a man's sweaty face as he struggles mightily to loosen a bolt.</P> <P> You neither know who the man is nor the reason for his actions.</P> <P> In quick succession, the man successfully loosens the bolt, frees himself from shackles and then frees others, who gather weapons, attack the crew of the ship on which they are being held and capture the ship after a short, but bloody, skirmish.</P> <P> These are the opening images of Amistad, Steven Spielberg's film based on a little-known event in American history.</P> <P> The year is 1839 and 53 kidnapped Africans are being transported from Cuba to begin lives as slaves in America.</P> <P> After their shipboard revolt, the Africans spare two crew members and order them to turn the ship east and head back to Africa. During the day, the sailors steer into the sun, but at night, when their captors sleep, the sailors turn the ship toward North America.</P> <P> Eventually, the ship winds up off the coast of Long Island, where a U.S. naval vessel captures the Africans.</P> <P> Brought to trial in the United States, the Africans are charged with murder. However, the situation becomes a political tinderbox as the Spanish government claims them as property and wants them returned.</P> <P> The whirlwind that surrounds this event eventually lands at the doorstep of the U.S. Supreme Court, and involves an incumbent president, <NAME>, and a former chief executive, <NAME>.</P> <P> Amistad is an earnest examination of one race's fight for their rights and their freedom. Led by Cinque (<NAME>), the Africans are confused and frightened by the international uproar they have unwittingly created. Yet, they only want one thing - to go home.</P> <P> Coming to their defense is a property lawyer, <NAME> (Matthew McConaughey), whose initial success in winning the Africans their freedom is sabotaged for political expediency by President Van Buren's minions.</P> <P> A reluctant and retired Adams (Anthony Hopkins) must then present their case before the Supreme Court, seven of whose nine justices are Southerners.</P> <P> This sounds like rather dry material for movie fare, but Spielberg gives it a deep emotional core. He makes you care about these uprooted people and their wretched plight. You do more than pity them - you root and pray for their success.</P> <P> The heart of the picture is Cinque. Newcomer Hounsou, a former model whose previous acting experience includes a Janet Jackson music video, gives a towering performance.</P> <P> A man of great strength and dignity, Cinque finds it difficult to grasp the various complications and ramifications being woven around him and his fellow Africans. To Cinque, there is only right or wrong, justice and injustice.</P> <P> Hounsou learned the Mende dialect of West Africa for his role. And though he speaks an unfamiliar tongue, Hounsou is able to display Cinque's courage, as well as his vulnerability.</P> <P> McConaughey is adequate as Baldwin. Even though his New England accent comes and goes, he captures the lawyer's passion and fire to do his best for his clients.</P> <P> Hopkins, as Adams, buried under old-man makeup, reveals the spark and righteousness that age could not dim.</P> <P> <NAME>, however, is given little to do as leader of the abolitionists who adopt the Africans' cause as their own.</P> <P> Spielberg's strength, as it was in Schindler's List, is showing the cruelty one human being can inflict upon another. His recreation of the Middle Passage, the deadly journey that transported captured Africans from their homeland across the Atlantic, is as harrowing and horrifying a series of images as ever put on film.</P> <P> And, to his credit, Spielberg has not fallen into the trap of other filmmakers who have told black history from a white person's viewpoint. Most of the story and much of the action is told and shown through the eyes of Cinque and his people.</P> <P> In a film in which the lines between right and wrong, good and evil, seem defined, Spielberg and screenwriter <NAME> do not stoop to stereotypical villains to further their cause.</P> <P> His antagonists are not villains, per se, but rather flawed men who value political expediency above morality. They are amoral politicians who feel they are doing what they must to preserve their country.</P> <P> Amistad has its slow moments. Overall, though, it is a riveting examination of a piece of American history ignored in the textbooks. But it makes a powerful statement about the value of freedom.</P> <P> <NAME> is the film critic at the Journal and Courier in Lafayette, Ind. He can be reached by e-mail at <A HREF="mailto:<EMAIL>"><EMAIL></A> or <A HREF="mailto:<EMAIL>"><EMAIL></A></P> <HR><P CLASS=flush><SMALL>The review above was posted to the <A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR> The Internet Movie Database accepts no responsibility for the contents of the review and has no editorial control. Unless stated otherwise, the copyright belongs to the author.<BR> Please direct comments/criticisms of the review to relevant newsgroups.<BR> Broken URLs inthe reviews are the responsibility of the author.<BR> The formatting of the review is likely to differ from the original due to ASCII to HTML conversion. </SMALL></P> <P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P> </P></BODY></HTML>
html
# 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. import mock import testtools from openstack.telemetry.v2 import sample SAMPLE = { 'id': None, 'metadata': {'1': 'one'}, 'meter': '2', 'project_id': '3', 'recorded_at': '4', 'resource_id': '5', 'source': '6', 'timestamp': '7', 'type': '8', 'unit': '9', 'user_id': '10', 'volume': '11.1', } OLD_SAMPLE = { 'counter_name': '1', 'counter_type': '2', 'counter_unit': '3', 'counter_volume': '4', 'message_id': None, 'project_id': '5', 'recorded_at': '6', 'resource_id': '7', 'resource_metadata': '8', 'source': '9', 'timestamp': '10', 'user_id': '11', } class TestSample(testtools.TestCase): def test_basic(self): sot = sample.Sample(SAMPLE) self.assertIsNone(sot.resource_key) self.assertIsNone(sot.resources_key) self.assertEqual('/meters/%(meter)s', sot.base_path) self.assertEqual('metering', sot.service.service_type) self.assertTrue(sot.allow_create) self.assertFalse(sot.allow_retrieve) self.assertFalse(sot.allow_update) self.assertFalse(sot.allow_delete) self.assertTrue(sot.allow_list) def test_make_new(self): sot = sample.Sample(SAMPLE) self.assertIsNone(sot.id) self.assertEqual(SAMPLE['metadata'], sot.metadata) self.assertEqual(SAMPLE['meter'], sot.meter) self.assertEqual(SAMPLE['project_id'], sot.project_id) self.assertEqual(SAMPLE['recorded_at'], sot.recorded_at) self.assertEqual(SAMPLE['resource_id'], sot.resource_id) self.assertIsNone(sot.sample_id) self.assertEqual(SAMPLE['source'], sot.source) self.assertEqual(SAMPLE['timestamp'], sot.generated_at) self.assertEqual(SAMPLE['type'], sot.type) self.assertEqual(SAMPLE['unit'], sot.unit) self.assertEqual(SAMPLE['user_id'], sot.user_id) self.assertEqual(SAMPLE['volume'], sot.volume) def test_make_old(self): sot = sample.Sample(OLD_SAMPLE) self.assertIsNone(sot.id) self.assertIsNone(sot.sample_id), self.assertEqual(OLD_SAMPLE['counter_name'], sot.meter) self.assertEqual(OLD_SAMPLE['counter_type'], sot.type) self.assertEqual(OLD_SAMPLE['counter_unit'], sot.unit) self.assertEqual(OLD_SAMPLE['counter_volume'], sot.volume) self.assertEqual(OLD_SAMPLE['project_id'], sot.project_id) self.assertEqual(OLD_SAMPLE['recorded_at'], sot.recorded_at) self.assertEqual(OLD_SAMPLE['resource_id'], sot.resource_id) self.assertEqual(OLD_SAMPLE['resource_metadata'], sot.metadata) self.assertEqual(OLD_SAMPLE['source'], sot.source) self.assertEqual(OLD_SAMPLE['timestamp'], sot.generated_at) self.assertEqual(OLD_SAMPLE['user_id'], sot.user_id) def test_list(self): sess = mock.Mock() resp = mock.Mock() resp.body = [SAMPLE, OLD_SAMPLE] sess.get = mock.Mock(return_value=resp) path_args = {'meter': 'name_of_meter'} found = sample.Sample.list(sess, path_args=path_args) self.assertEqual(2, len(found)) first = found[0] self.assertIsNone(first.id) self.assertIsNone(first.sample_id) self.assertEqual(SAMPLE['metadata'], first.metadata) self.assertEqual(SAMPLE['meter'], first.meter) self.assertEqual(SAMPLE['project_id'], first.project_id) self.assertEqual(SAMPLE['recorded_at'], first.recorded_at) self.assertEqual(SAMPLE['resource_id'], first.resource_id) self.assertEqual(SAMPLE['source'], first.source) self.assertEqual(SAMPLE['timestamp'], first.generated_at) self.assertEqual(SAMPLE['type'], first.type) self.assertEqual(SAMPLE['unit'], first.unit) self.assertEqual(SAMPLE['user_id'], first.user_id) self.assertEqual(SAMPLE['volume'], first.volume) def test_create(self): sess = mock.Mock() resp = mock.Mock() resp.body = [SAMPLE] sess.post = mock.Mock(return_value=resp) data = {'id': None, 'meter': 'temperature', 'project_id': 'project', 'resource_id': 'resource', 'type': 'gauge', 'unit': 'instance', 'volume': '98.6'} new_sample = sample.Sample.new(**data) new_sample.create(sess) url = '/meters/temperature' sess.post.assert_called_with(url, service=new_sample.service, json=[data]) self.assertIsNone(new_sample.id)
python
Technical know-how is necessary but not sufficient for executing an effective digital information operations campaign. A spy service would ideally possess a subtle sociological and political understanding of their target, and of its media environment. An ex-FBI agent once told me that key to solving cases was understanding that people were "sublimated in their cultures"--that they were operating in a kind of cognitive matrix that might be very different than yours, and that you, too, were saturated in an encompassing culture. This isn't only a problem for intelligence services, of course, but it's an acute problem when you're trying to *influence* another country's domestic politics or foreign policy. Inhabiting the deep culture of your target is hard. This opens up all kinds of interpretive difficulties when we're trying to judge the ultimate purpose of an electoral influence campaign. Is it straightforwardly in service of a particular candidate? Is there some kind of double or triple game at play? Did the intelligence service *want* to get caught, even while retaining deniability, to show how vulnerable the target country is? What are the sociological "hop points" from disinformation campaign "x" to foreign policy goal "y"? Alternatively: does that spy service have a superficial understanding of the society of the targeted country, because of their own circumscribed access to information, ideological indoctrination, and communal/national biases? These options aren't necessarily mutually exclusive, but I think the latter aspect doesn't get enough attention. We search for ultimate objectives and motives while discounting deficiencies in the author service's own understanding of their target. Anyhow: yet again, this is a long-winded way for me to underline my belief that all espionage, including cyber-espionage, is ultimately an exercise in the humanities.
english
The 'Kanna Laddu Thinna Aasaya' team is back with a composer who received glorious accolades for his work in, 'Andala Rakshashi'. Once again it's the brand, Santhanam, who is shouldering all the responsibilities to market the movie. Radhan does help him to some extent with his teen-friendly numbers. In the era of Auto tunes, the composer has tried to make a mix of various genres within the boundaries of it. The song does not sound too easy initially. Initial rap portion is good, but the tune disappoints and mars the flow of rap portion. What could have been a rhythmic electronica takes lot of u-turn and falls flat at the end. 2. Ice Cream Penne (Remix) The rap portion from the first song gets a foot tapping remix. Radhan gets the tune and vocals pitch perfect this time. The rhythm and composition gets a solid pace and it stays the same till the end. Radhan does have the potential to throw interesting surprises by going out of the tune for a while with a different instrument altogether and merges the prelude again. The busiest singer in the K-town makes his presence felt in this album too. A joyous number filled with lyrics from recent fast numbers. Bala puts in lot of effort to sound different in his own genre itself. Radhan makes the song, a typical dance number by playing regular kuthu instruments around it. This song will find a place in the wedding receptions for sure. The album gets a much needed respite in the form of melody after three fast beats. Radhan gets everything in place right from the start. Bobo Shashi, the man who composed for 'Kulir 100' has evoked the emotions perfectly. Veena's short burst is too sweet and magical. The first interludes of violin and fast paced 'veena' in the second are worth mentioning. Radhan has saved the best for the last in the album. Mukesh & Blazee complement each other really well. The lyrics do give an idea about the storyline. The way tune paves way for Mukesh to render the lyrics and Blazee to rock his rap verses very well. The chorus which combines together with the rock portion in the last 20 seconds is fabulous. Though the album starts off with a below average number it does steadies itself from the third song. Radhan has tried to be imaginative within the given themes. He gets good support from, Na. Muthukumar, Madhan Karky, and his choice of singers to deliver a fun filled album. Hope he recreates a magic like, 'Andala Rakshashi' in the near future for Tamil listeners too.
english
Shiromani Akali Dal leader chief Sukhbir Singh Badal has claimed that the Akali-BSP alliance will make a clean sweep in Punjab, winning more than 80 seats. Amid a multi-cornered contest, polling is in progress today for all 117 constituencies of Punjab. The Congress, which ended the decade-long rule of the Akali-BJP alliance in 2017, is hoping for a second term in power. The Akali Dal, which split from longtime alliance partner BJP last year amid the farmers' anger over the contentious farm laws, has tied up with Mayawati's party in hope of having the backing of the Dalits. It was a counter to the Congress's choice of a Dalit Chief Minister, Charanjit SIngh Channi, in the state for the first time. Sukhbir Badal -- who is contesting from Jalalabad in Punjab Assembly elections -- cast his vote at the Badal village in Muktsar district along with his wife and former Union Minister Harsimrat Kaur Badal and Parkash Singh Badal, Shiromani Akali Dal patron and five-time Chief Minister of the state. "We will get 80 plus seats," he told reporters after casting his vote. "We have been standing firm at one place for the last three generations. While many others have moved to other parties on not getting election tickets, like Captain Amarinder Singh," said Parkash Singh Badal. "Today people want a stable, strong government," added Harsimrat Kaur Badal. "As a border state, Punjab has many challenges. I'm sure there's going to be clean sweep in favour of a tried and tested local, regional party that understands the aspirations of the local people," she said. The state is witnessing a multi-corner contest this time with Arvind Kejriwal's Aam Aadmi Party and former chief minister Amarinder Singh's Punjab Lok Congress also in the fray. While AAP is seen as the key challenger to the Congress, Amarinder Singh, who was dropped from the top post last year amid a year-long tussle with Navjot Sidhu, has joined hands with the BJP. The counting of votes will take place on March 10.
english
var utils = require("../../lib/utils"); var common = require("../../common"); var config = require("../../config/config"); var fs = require('fs'); var path = require('path'); //idfv=$openid,User-Agent=weixinWeb:${用户微信用户名},如梁椿是用户,则是weixinWeb:Newsqueak, function postOptions(weixinAccount, url, data, isFullUrl) { var _url = !isFullUrl ? config.selfApiURL + url : url; var options = { url: _url, headers: { "User-Agent": "weixinWeb:" + weixinAccount.nickname, "idfv": "" + weixinAccount.openid }, form: data }; return options; } exports.queryPage = function (req, res, next) { res.render("query"); }; exports.carsPage = function (req, res, next) { common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/car/booking.do', req.body), function (e, r, result) { if (e) { next(e); } else { var json = JSON.parse(result); if (json.code != 0) { var err = new Error(json.msg); err.code = json.code; return next(err); } //console.log("json.cars:"+json.cars) res.render("cars", {data: json, type: req.body.JIEJI_SONGJI}); } }); }; exports.addressesPage = function (req, res, next) { //页面post传吗? 这个我觉得应该是get传过来的,req.query去取,到立即订车的时候整个才是post //是post;get直观,但post url简洁相对能安全一些,应用里如果没有url跳转要求时,习惯用post, var postData = {}; postData.book_date = req.query.book_date; postData.flight_no = req.query.flight_no; postData.JIEJI_SONGJI = req.query.JIEJI_SONGJI; //0:接机 1:送机 //console.log(req.query); var options = { url: config.selfApiURL + '/1/baseinfo/flight_and_places.do', headers: { "User-Agent": "test", "idfv": "kdjfkdkflsdkfjdkfjkdjf" }, form: postData }; common.RemoteAPI.post(options, function (e, r, result) { console.log(result); if (e) { console.log('查询目标酒店错误'); res.status(412).end("查询目标酒店错误") } else { var j = JSON.parse(result); if (j.code != 0) { console.log(j.msg); res.status(412).end(j.msg) } else { res.json(j) } } }); }; //开通城市 exports.openCitiesPage = function (req, res, next) { common.RemoteAPI.get(config.selfApiURL + "/1/open_cities", function (e, r, body) { if (e) { return next(e); } else { var dataObj = JSON.parse(body); delete dataObj.countries; delete dataObj.country_count; return res.render("openCities", {data: dataObj}); } }); }; /**************订单相关**********************/ //订单填写 exports.orderFillingPage = function (req, res, next) { var temOrderStr = req.cookies.temOrder; if (!temOrderStr) { return next(new Error("请重新下单")); } //ar temOrderObj = JSON.parse(temOrderStr); //var airlineObj = JSON.parse(req.cookies.airline); //res.render("orderFilling", {temOrder: temOrderObj, airline: airlineObj}); res.render("orderFilling"); //把航班号、接送机区分的标识、预订日期、大人小孩数等等放到 input type=hidden 的隐藏域的value中 //,用户提交订单时要一起表单提交过来,提交的action目标页面是收银台页面,然后收银台页面action方法去访问creation.do的接口,注意接口参数很多, // 要准备全了,全了,全了,了,了!!!!!!!!!!!!!!!! }; //订单详情 exports.orderDetailsPage = function (req, res, next) { if (req.query.order_no != undefined && req.query.order_no != "") { common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/order/details.do', {order_no: req.query.order_no}), function (e, r, result) { if (e) { return next(e); } else { /* 请求成功:{ "code" : 0, "pay_status": "-1", //订单状态 0是未支付,1是支付成功,-1是取消或退单 "service_tel_abroad": "-1" //境外供应商的中文客服电话,“-1”表示还没有确定 //不是“-1”就是有确定值 } 请求失败:{ "code": 1, "msg": "缺少必要的接口参数" //失败类型及原因很多,详见上文错误码 } */ //console.log(result); var json = JSON.parse(result); console.log(json) return res.render("orderDetails", json); //json.code=0 有正确返回 ,json.code==2 无效凭证 } }) } else { next(new Error("找不到订单")); } }; //订单取消 ajax /* 6. 用户主动取消订单,或者未支付的订单过期时客户端主动发送的接口 url:http://api.laobingke.com:9000/1/order/cancelling.do 请求方式:POST 数据格式:表单 字段: order_no = "mxyc123456890,mxyc787822938,mxyc6235898326" //订单号,逗号分隔 调用说明:未支付状态才能取消,支付成功后只能退单,在后台的退单状态码是-2,订单取消是-1 响应: 请求成功:{ "code" : 0 } 请求失败:{ "code": 4, "msg": "参数不符合规范或者业务条款" //失败类型及原因很多,详见上文错误码 } */ exports.orderCancel = function (req, res, next) { if (req.query.order_no != undefined && req.query.order_no != "") { common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/order/cancelling.do', {order_no: req.query.order_no}), function (e, r, result) { if (e) { return res.status(412).end(e) } else { var json = JSON.parse(result); console.log(json) return res.json(json); //json.code=0 有正确返回 ,json.code==2 无效凭证 } }) } } //我的订单列表 exports.orderListPage = function (req, res, next) { if (req.cookies.token && req.cookies.token != "" && req.cookies.token != undefined) { console.log('a'); common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/order/list.do', {token: req.cookies.token}), function (e, r, result) { if (e) { return next(e); } else { //console.log(result); var json = JSON.parse(result); return res.render("orders", json); //json.code=0 有正确返回 ,json.code==2 无效凭证 } }) } else { return res.render("orders", {code: 3}); //未登录 } }; //收银台 exports.paymentPage = function (req, res, next) { var temOrderStr = req.cookies.temOrder; if (!temOrderStr) { return next(new Error("请重新下单")); } var temOrderObj = JSON.parse(temOrderStr); //console.log(temOrderObj) if (temOrderObj.order_no != undefined) {//已经存的订单 return res.render("pay", {data: temOrderObj}); } else {//新订单 var token = req.cookies.token; if (token != undefined) { temOrderObj.token = token; } common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/order/creation.do', temOrderObj), function (e, r, result) { if (e) { return next(e); } else { var json = JSON.parse(result); if (json.code != 0) { var err = new Error(json.msg); err.code = json.code; return next(err); } console.log(json); return res.render("pay", {data: json}); } }); } }; exports.weixinPlanPayPage = function (req, res, nex) { return res.render("weixin") } /*---------------用户相关-----------------*/ exports.myCenterPage = function (req, res, next) { if (req.cookies.token && req.cookies.token != "" && req.cookies.token != undefined) { common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/sync_profile.do', {token: req.cookies.token}), function (e, r, result) { if (e) { return res.status(412).end(e) } else { //console.log(result); var json = JSON.parse(result); return res.render("my", {data: json}); } }) } else { return res.redirect("login"); } }; //用户设置 /* exports.settingsPage = function (req, res, next) { res.render("settings"); }; */ //用户信息更新 ajax exports.userinfoUpdate = function (req, res, next) { if (req.cookies.token && req.cookies.token != "" && req.cookies.token != undefined) { var postData = {}; console.log(req.body) postData.token = req.cookies.token; postData.fields = req.body.field; postData[req.body.field] = req.body.value; console.log(postData) common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/send_profile.do', postData), function (e, r, result) { if (e) { return res.status(412).end(e) } else { return res.json(JSON.parse(result)); } }) } else { return res.redirect("login"); } }; //登录页 exports.loginPage = function (req, res, next) { return res.render("login") } //登录action ajax exports.login = function (req, res, next) { console.log(req.body); common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/login.do', req.body), function (e, r, result) { if (e) { res.status(412).end(e) } else { //console.log(result); var json = JSON.parse(result); if (json.code == 0) { res.cookie("token", json.token, {maxAge: 5 * 365 * 24 * 60 * 60, path: '/', httpOnly: true}) } else { res.cookie("token", json.token, {maxAge: -1, path: '/', httpOnly: true}) } return res.json(json); } }) }; //用户工具界面 exports.userCogPage = function (req, res, next) { res.render("myCog") }; //退出action ajax exports.logoutPage = function (req, res, next) { res.cookie("token", "", {maxAge: -1, path: '/', httpOnly: true}); res.redirect("login"); }; //用户注册 exports.registerPage = function (req, res, next) { res.render("register"); }; //用户注册 submit ajax /* 1.注册 url:http://api.laobingke.com:9000/1/user/signup.do 请求方式:POST 数据格式:表单 字段: phone = "13581897657" country_code = "86" password = "<PASSWORD>" 调用说明: 手机嵌入手机号验证的SDK后,一旦验证成功就发送这个接口,相当于验证通过之后的服务器回调 响应: 请求成功:{ "code" : 0, "token" : "<KEY>" } 请求失败:{ "code": 1, "msg": "错误原因" //原因比如: 用户名已存在 } * */ exports.registerSubmit = function (req, res, next) { //服务器验证短信 common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/existence.do', req.body), function (e, r, result) { if (e) { return res.status(412).end(e) } else { var json = JSON.parse(result); if (json.code == 1) { res.json({code: 1, msg: json.msg}); } else if (json.code = 0 && json.is_existing == 1) { res.json({code: 2, msg: json.msg}); } else { common.RemoteAPI.post(postOptions((req.weixinAccount || {}), 'http://authcode.laobingke.com:9000/1/auth_code/verifying', req.body, true), function (ee, rr, rresult) { if (ee) { return res.status(412).end(ee) } else { var smsjson = JSON.parse(rresult); console.log(rresult); if (smsjson.code == 0) { common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/signup.do', req.body), function (eee, rrr, rrresult) { if (eee) { res.status(412).end(eee) } else { var json = JSON.parse(rrresult); if (json.code == 0) { res.cookie("token", json.token, { maxAge: 5 * 365 * 24 * 60 * 60, path: '/', httpOnly: true }) } res.json(json); } }) } else { return res.json(smsjson); } } //var smsJson = {code:1:msg:"短信发送失败"} }) } } } ) }; //发送注册短信 ajax /* http://authcode.laobingke.com:9000/1/auth_code/emitting 发送短信 参数 { country_code :86, phone: 13659985656 } 成功返回 { "code": 0 } http://authcode.laobingke.com:9000/1/auth_code/verifying 验证短信验证码 参数 { country_code :86, phone: 13659985656, captcha: 54886 //这个就是验证码 } 成功返回: { "code": 0 } 失败返回示例一{ "code": 121, "msg": "验证码超时失效" } */ exports.registerSendSMS = function (req, res, next) { //check User Existing /* phone = "13581897657" country_code = "86" * */ common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/existence.do', req.body), function (e, r, result) { if (e) { return res.status(412).end(e) } else { var json = JSON.parse(result); if (json.code == 1) { res.json({code: 1, msg: json.msg}); } else if (json.code = 0 && json.is_existing == 1) { res.json({code: 2, msg: json.msg}); } else { req.body.phone = parseInt(req.body.phone, 10); req.body.country_code = parseInt(req.body.country_code, 10); //接口服务器发送短信 common.RemoteAPI.post(postOptions((req.weixinAccount || {}), 'http://authcode.laobingke.com:9000/1/auth_code/emitting', req.body, true), function (ee, rr, rresult) { if (ee) { console.log(ee); return res.status(412).end(ee) } else { var smsjson = JSON.parse(rresult); console.log(smsjson); res.json(smsjson); } //var smsJson = {code:1:msg:"短信发送失败"} }); } } }); }; exports.editPswPage = function (req, res, next) { if (req.cookies.token && req.cookies.token != "" && req.cookies.token != undefined) { res.render("editPsw"); } else { return res.redirect("login"); } }; exports.editPswSubmitPage = function (req, res, next) { req.body.token = req.cookies.token delete req.body.renew_password; common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/update_password.do', req.body), function (e, r, result) { if (e) { return res.status(412).end(e) } else { var json = JSON.parse(result); if (json.code == 103) { json.msg = "原密码错误" } res.json(json); } }); }; exports.repsw2Page = function (req, res, next) { res.render("psw2"); }; exports.losePswPage = function (req, res, next) { if(req.cookies.losePsw){ //req.cookies.losePsw=null; res.cookie("losePsw",{},{maxAge: -1,httpOnly:true}); } return res.render("losePsw"); }; exports.lostPsw_phone = function (req, res, next) { //request send sms var data={phone:req.body.phone,country_code:req.body.country_code}; common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/existence.do', data), function (e, r, result) { if (e) { return res.status(412).end(e) } else { var json = JSON.parse(result); if (json.code == 0) { res.cookie("losePsw",data,{httpOnly:true}); } return res.json(json); } }); }; exports.lostPsw_sendsms = function (req, res, next) { if(!req.cookies.losePsw || !req.cookies.losePsw.phone){ return res.json({code:11,msg:"请重新开始"}) }else{ var data = req.cookies.losePsw; //接口服务器发送短信 common.RemoteAPI.post(postOptions((req.weixinAccount || {}), 'http://authcode.laobingke.com:9000/1/auth_code/emitting', data, true), function (ee, rr, rresult) { if (ee) { console.log(ee); return res.status(412).end(ee) } else { var smsjson = JSON.parse(rresult); console.log(smsjson); return res.json(smsjson); } //var smsJson = {code:1:msg:"短信发送失败"} }); } }; exports.lostPsw_verifysms = function (req, res, next) { if(!req.cookies.losePsw || !req.cookies.losePsw.phone){ return res.json({code:11,msg:"请重新开始"}) }else{ var data = { phone:req.cookies.losePsw.phone, country_code :req.cookies.losePsw.country_code , captcha:req.body.captcha }; common.RemoteAPI.post(postOptions((req.weixinAccount || {}), 'http://authcode.laobingke.com:9000/1/auth_code/verifying', data, true), function (ee, rr, rresult) { if (ee) { return res.status(412).end(ee) } else { var smsjson = JSON.parse(rresult); console.log(smsjson); return res.json(smsjson) } }) } }; exports.lostPsw_reset = function (req, res, next) { if(!req.cookies.losePsw || !req.cookies.losePsw.phone){ return res.json({code:11,msg:"请重新开始"}) }else{ var data = { phone:req.cookies.losePsw.phone, country_code :req.cookies.losePsw.country_code , new_password :<PASSWORD> }; common.RemoteAPI.post(postOptions((req.weixinAccount || {}), '/1/user/forget_password.do', data, false), function (ee, rr, rresult) { if (ee) { return res.status(412).end(ee) } else { var smsjson = JSON.parse(rresult); console.log(smsjson); return res.json(smsjson) } }) return res.json({code:0,msg:""}) } };
javascript
@charset "utf-8"; /*@font-face { font-family: 'PingFang';src: url('PingFang.ttf');}*/ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form, input, textarea, p, table, th, td, button, a { padding: 0; margin: 0; list-style: none } body { min-width: 320px; overflow-x: hidden; -webkit-overflow-scrolling: touch; } body, button, input, select, textarea { font-family: 'helvetica neue', tahoma, 'hiragino sans gb', stheiti, 'wenquanyi micro hei', \5FAE\8F6F\96C5\9ED1, \5B8B\4F53, sans-serif } h1, h2, h3, h4, h5, h6, th, strong { font-weight: normal; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer } * { -webkit-tap-highlight-color: rgba(255, 255, 255, 0) } table { border-collapse: collapse; border-spacing: 0; } td, th { word-break: break-all; } ol, ul { list-style: none; } h1, h2, h3, h4, h5, h6 { font-size: 100%; text-align: left; } img, button { border: 0px none; } a { text-decoration: none; outline: none; color: #232326; } :focus { outline: 0; } button { cursor: pointer; line-height: normal !important; } input, button, select, textarea { outline: none; border-radius: 0px; border: none; } textarea { resize: none; } .cl { float: none !important; clear: both !important; height: 0px !important; _height: 1px !important; line-height: 0px !important; margin: 0px !important; padding: 0px !important; width: 0 !important; border: none !important; overflow: auto !important; zoom: 1; background: none !important; } .tl { text-align: left !important; } .tr { text-align: right !important; } .fl { float: left; } .fr { float: right !important; } i { font-style: normal; } .mt-10 { margin-top: 10px; } .loading { width: 100%; z-index: 1001; position: fixed; overflow: hidden; display: block; height: 100%; background: url(../../admin/images/loading.gif) no-repeat center center; display: none; } /*弹出框*/ .jd_win { width: 100%; height: 100%; position: fixed; top: 0; left: 0; background: rgba(0, 0, 0, .6); z-index: 99999; display: none } .jd_win_box { width: 80%; padding: 0 10px; border-radius: 4px; background-color: #fff; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%) } .jd_win .jd_win_tit { border-bottom: 1px solid #ccc; line-height: 32px; padding: 17px 0 15px 0; text-align: center; font-size: 18px } .jd_btn { width: 100%; display: block; padding: 10px 0 } .f_left { float: left } .f_right { float: right } .jd_btn span { line-height: 36px; width: 45%; text-align: center; border-radius: 4px; margin-bottom: 10px } .jd_win .cancle { margin-right: 8%; border: 1px solid #ccc } .jd_win .submit { background: #F23030; color: #fff; border: 1px solid #f23030 } /*请求加载中*/ .wx_loading { position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; background-color: transparent } .wx_loading_inner { text-align: center; background-color: rgba(0, 0, 0, .5); color: #fff; position: fixed; top: 50%; left: 50%; margin-left: -70px; margin-top: -48px; width: 140px; border-radius: 6px; font-size: 14px; padding: 58px 0 10px } .wx_loading_icon { position: absolute; top: 15px; left: 50%; margin-left: -16px; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 24px; -webkit-animation: gif 1s infinite linear; animation: gif 1s infinite linear; clip: rect(0 auto 12px 0) } @keyframes gif { 0% { -webkit-transform: rotate(0); transform: rotate(0) } to { -webkit-transform: rotate(1turn); transform: rotate(1turn) } } @-webkit-keyframes gif { 0% { -webkit-transform: rotate(0) } to { -webkit-transform: rotate(1turn) } } /*加入购物车*/ .message-floor { width: 100%; height: 100%; position: fixed; top: 0; left: 0; text-align: center; z-index: 99999 } .message-floor .messge-box { width: 145px; background: rgba(0, 0, 0, .8); border-radius: 8px; text-align: center; position: absolute; top: 50%; left: 50% } .messge-box .messge-box-icon { width: 26px; height: 26px; display: inline-block; margin: 18px 0 9px 0; position: relative; overflow: hidden; vertical-align: middle } .message-toast-icon { background: url(../images/5.4/message-toast-icon.png) no-repeat; background-size: 28px 60px } .messge-box .messge-box-content { font-size: 15px; line-height: 15px; color: #fff; padding: 0 10px 21px 10px } .succee-icon { display: inline-block; height: 26px; width: 26px; background-position: -1px -29px } .error-icon { display: inline-block; height: 26px; width: 26px; background-position: -1px -1px; } /*header*/ .header { position: fixed; top: 0; left: 0; width: 100%; height: 44px; line-height: 44px; font-size: 16px; text-align: center; z-index: 666; background-color: #fff; border-bottom: 1px solid #F6F6F4; } .header a.left { position: absolute; left: 0; top: 0px; width: 40px; height: 44px; z-index: 999; background: url(../images/arrow-left.png) no-repeat center center; background-size: 50% } .near-box { max-width: 640px; overflow: hidden; margin: 0 auto; } .bigbox { width: 100%; float: left; margin-top: 45px; } ::-webkit-scrollbar { height: 0px; width: 0px; } /*头部*/ .kaola-bottom { width: 100%; position: fixed; bottom: 0px; left: 0px; z-index: 99; height: 50px; background: #FFF; border-top: 1px solid #DCDCDC; } .kaola-bottom-box1 { width: 25%; height: 50px; float: left; text-align: center; } .kaola-bottom-img1 { width: 21px; height: 21px; display: inline-block; margin-top: 5px; } .kaola-bottom-img1 img { width: 21px; height: 21px; float: left; } .kaola-bottom-text1 { width: 100%; float: left; font-size: 13px; } .text2 { color: #FF9201; }
css
package it.nextworks.sol006_tmf_translator.sol006_tmf_translator.commons.exception; public class MissingEntityOnSourceException extends Exception { public MissingEntityOnSourceException() { super(); } public MissingEntityOnSourceException(String msg) { super(msg); } }
java
<filename>docs/undocumented.json { "warnings": [ ], "source_directory": "/Users/alex/Developer/opensource/bundle-info-versioning" }
json
export default function CardHeader(props) { return( <div className="card-header clickable" onClick={props.onClick}> <p className="card-header-title">{props.text}</p> <button className="card-header-icon" aria-label="see more"> <span className="icon"> <i className={`fas ${props.icon}`} aria-hidden="true"></i> </span> </button> </div> ) }
javascript
If there’s one set of product categories that define the CES experience, it is televisions and monitors. Each January, TV and monitor manufacturers from LG to Panasonic and Samsung to TCL unveil their product ranges for the year. These sets and monitors will reach electronic retailers and computer store showrooms in a few months. At CES 2022, we saw a wide variety of TVs, monitors, and new technologies, including QD-OLED, mini LED, micro LED, and even shape-shifting panels. Whether you prefer large or small TVs, want 4K or 8K, or need 120Hz or curved screens for gaming, these are the best TVs and monitors we saw at CES 2022. Asus debuted two oversized Swift gaming monitors at CES 2022, including the 42-inch PG42UQ and the 48-inch PG48UQ. These OLED panels are among the first to include a micro-texture coating to help with visuals and reduce glare. Each panel offers 4K resolution at 120Hz and boasts an incredible 1 million to one contrast ratio, 0.1ms response time, 10-bit color, and 98% DCI-P3 color gamut. Asus pre-calibrates them to Delta E > 2 color accuracy at the factory. Asus says the Swift gaming monitors were designed to control thermals and have custom heatsinks and optimized internal airflow to keep performance at its best. The company claims this helps maintain internal temperatures below 50°C while allowing for a peak brightness of 900 nits. Connectivity includes two HDMI 2.1 and two HDMI 2.0 ports, DisplayPort 1.4, and a USB hub. Pricing and availability were not announced. The Hisense U9H is a premium mini LED offering that delivers the best combination of size and picture quality. Starting with the dimensions, this TV offers a 75-inch viewing experience that brings the movie theater right to your living room. Of course, it packs 4K resolution at a 120Hz native refresh rate. Hisense says the U9H reaches 2,000 nits of peak brightness and includes more than 1,280 full-array local dimming zones controlled by an all-new processor. The processor is able to deliver performance upgrades across the board, such as automatic brightness and contrast adjustments in real-time. This Quantum Dot-equipped TV offers both Dolby Vision and Dolby Vision IQ, as well as low-latency HDR for gaming. Dedicated modes for gaming, variable refresh rate, and FreeSync ensure a solid gaming performance no matter the console. Moreover, Hisense upgraded the audio and added more speakers to provide for 2.1.2 audio performance with Dolby Atmos. Availability is slated for late summer, and the MSRP is expected to run about $3,200. LG often thinks outside the box, and nowhere is that more evident than with its DualUp monitor. This unique screen is twice the height of a standard 16:9 monitor under the guise of offering more workspace. LG calls it a “multitasking powerhouse.” It includes a vertical split-view function that allows users to see more on a single screen. It ships with an adjustable LG Ergo stand that LG claims saves space by clamping onto the back of desks and tables. Moreover, the doubled height of the screen should reduce head movement, which can lead to neck pain. The DualUp is a nano IPS display with an atypical 16:18 aspect ratio. The Square Double QHD resolution measures 2,560 x 2,880 pixels, which is kind of like having two 21.5-inch 2K displays on top of one another. The DualUp covers 98% of the DCI-P3 color gamut, but it puts out just 300 nits, which is fairly low on the brightness scale. Connectivity includes two HDMI ports, as well as three USB-C ports. Pricing and availability have not been revealed. What makes the 42C2 unique is its size. It’s a 42-inch OLED TV set, the smallest in LG’s C2 line, which is also available in 48-, 55-, 65-, 77-, and 83-inch sizes. The more compact nature of the 42C2 makes it a better option for TVs that need to pull double duty as solid television sets and gaming monitors. At 42 inches, it may be a bit of a stretch for many desks, but it just makes the cut for those who want a giant monitor. This C-Series OLED features the same Alpha a9 Gen 5 processor of its larger stablemates and packs the standard 4K resolution, 120Hz refresh rate, and HDMI 2.1 ports. Other features include LG’s AI Sound Pro, which helps the TV’s built-in speakers produce virtual 7.1.2 surround sound, and webOS 22, which introduces personal profiles so owners can customize their viewing experiences. Availability is slated for before summer, but pricing isn’t yet known. Panasonic announced the LZ2000 OLED TV at CES 2022. This flagship TV will come in 55-inch, 65-inch, and — for the first time — a 77-inch size. The TV supports critical HDMI 2.1 features such as high frame rate and variable refresh rate at 120Hz in 4K resolution. Panasonic claims to have reduced input lag for 60Hz games via its new 60Hz Refresh Mode. Panasonic added more speakers to the LZ2000 OLED TV to further enhance the audio experience available to viewers in their living rooms. It now features audio firing across the bottom as well as on the top and sides. The Game Control Board is a new feature, and it acts a lot like similar features on gaming phones. It puts all the pertinent game settings and controls in a single spot and makes them available in an overlay accessible via one click on the remote control. Panasonic said the LZ2000 OLED TV will be available in Europe, Asia, and Japan. The TV’s availability and price will vary by country as a result. The Samsung Odyssey Ark is one of the more interesting monitors announced at CES 2022. Too bad Samsung barely said anything about it. This is a rotating 55-inch OLED monitor that Samsung claims can handle just about any aspect ratio content you care to throw at it. For example, the Samsung Multi View feature, along with the included wireless controller, allows you to add multiple inputs to the screen and adjust their size and aspect ratio. For example, when it is oriented vertically, it will fit three 16:9-shaped stacked windows for the ultimate in multitasking games, video content, and productivity tasks. There’s no word on pricing or availability. Samsung had a bit more to say about the Odyssey Neo G8 monitor, which is a follow-up to last year’s G9. Samsung claims the G8 is the first monitor to feature a 4K curved 1000R screen with a 240Hz refresh rate and 1ms response time. It is intended to deliver razor-sharp performance for PC-based gamers. It includes features such as Quantum Mini LEDs, Quantum HDR 2000, with a 2,000-nit peak brightness and a million to one contrast ratio. As far as appearances go, the Neo G8 has the same futuristic-looking white exterior with CoreSync lighting for the latest in ambient experiences. Samsung has not said anything about pricing or availability. Samsung marched out a successor to last year’s vaunted QN900A called the QN900B 8K Neo QLED TV. The big improvement in this year’s set is the Samsung Neo Quantum Processor, which adds features such as Object Depth Enhancer to help separate foreground and background objects. The Neo Quantum Processor introduces advanced contrast mapping with a backlight unit, increasing the brightness level from a 12-bit to a 14-bit gradation. Another fresh tool called EyeComfort View automatically adjusts the screen’s brightness and tone based on a built-in light sensor — much like today’s smartphones. There’s also a new home screen UI for controlling the TV’s systems and features. The QN900B will reach the market later this year. The Skyworth W82 is one of the more unique TV sets at CES 2022. At first blush, this 64-inch 4K 120Hz OLED TV might look like any other, but it’s hiding a secret. The W82 can be adjusted from a standard flat screen to a curved display with a click of the included remote. It has two basic curved settings and can also be set to whatever curve radius the owner prefers. The idea is the have a TV that works well as a regular set and a gaming machine at the press of a button. See also: Do curved TVs still exist? Should you buy one? Of course, it includes support for Dolby Vision, HDR10, and the latest in Google Smart TV functions. It also packs the Skyworth Audio Drum for a superior audio experience. Skyworth is aiming for a summer release of the W82. The Sony Master Series A95K comes in 55- and 65-inch sizes and runs down the feature checklist as if it were on a mission. This is a 4K 120Hz HDR OLED TV with Google TV built-in. It even includes Apple AirPlay 2 support for native casting. With Sony, there’s always a veritable wall of marketing speak with its products, and that’s the case with the A95K. It has a new Cognitive Processor XR that Sony says understands how people see and hear, allowing it to adjust parameters on the fly depending on the content being played. It offers XR OLED Contrast Pro for adjusting brightness and XR Triluminos Max for scanning through the color palette. The QD-OLED panel boosts color brightness by up to 200%, and the Acoustic Surface Audio uses special actuators to turn the screen itself into a multi-channel speaker. Availability is set for later this year, and there’s no word on pricing. The Bravia Z9K carries over many of the features of the A95K but relies on mini LED rather than QD-OLED. This one is offered in resolutions up to 8K. It supports 4K/120Hz gaming mode with VRR and the latest HDMI 2.1 ports. It includes the same Cognitive Processor XR, which helps control the BackLight Master Drive to handle the mini LED backlights for improved contrast and brightness. Other features include XR Trilumonis Pro, X-Anti Reflection, Bravia Core Calibrated Mode, Acoustic Multi-Audio, Bravia Cam, and Ambient Optimization Pro. It’s cool that both Sony television sets can be configured to accommodate narrow furniture or soundbars. Availability is set for later this year, and there’s no word on pricing. Features include a 4K 120Hz picture with wide color powered by QLED tech. It has an AiPQ Engine to intelligently enhance the picture as you watch and a contrast control zone to maximize contrast on the fly. There are plenty of smarts on board, including hands-free access to Google Assistant or Amazon Alexa. There’s an automatic game mode with 4K/120Hz VRR, Chromecast, built-in digital TV tuner, as well as Wi-Fi6, ethernet, and four HDMI ports. The TCL XL Class 98-inch set is priced at $7,999 and will go on sale later this year. That completes our roundup of the best TVs and monitors at CES 2022. For more roundups of CES launches, check out our other hubs below:
english
{"word":"troweled","definition":"Formed with a trowel; smoothed with a trowel; as, troweled stucco, that is, stucco laid on and ready for the reception of paint. [Written also trowelled.]"}
json
Teja is on cloud nine as his new film Nene Raju Nene Mantri has been declared a huge hit all over. With this hit Teja has made huge comeback in his career. Apparently he is on cloud nine and speaking to the media on a happy note. The talented director said that he watched the film along with Venky and he didnt speak much about the film and left silently. But he also added that once he left and called at night 10 Am and said that he couldnt sleep the whole night and praised how Rana impressed him with his acting. Nene Raju Nene Mantri has Kajal and is produced by Suresh Productions.
english
<reponame>jzheaux/multi-tenant-security-samples package sample.issuers.webflux.inbox.user; /** * @author <NAME> */ public class User { private Long id; private String email; private String password; private String firstName; private String lastName; private String alias; public User() {} public User(User user) { this(user.getId(), user.getEmail(), user.getPassword(), user.getFirstName(), user.getLastName()); this.alias = user.getAlias(); } public User(Long id, String email, String password, String firstName, String lastName) { this.id = id; this.email = email; this.password = password; this.firstName = firstName; this.lastName = lastName; } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return this.password; } public void setPassword(String password) { this.password = password; } public String getFirstName() { return this.firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return this.lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getAlias() { return this.alias; } public void setAlias(String alias) { this.alias = alias; } }
java
<reponame>mehtakaran9/blibli-backend-framework package com.blibli.oss.backend.newrelic.aspect.service.util; import lombok.experimental.UtilityClass; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @Slf4j @UtilityClass public class AspectHelper { public static String constructSegmentName(JoinPoint joinPoint, SegmentType segmentType) { return String.format( segmentType.getStringFormat(), joinPoint.getTarget().getClass().getSimpleName(), joinPoint.getSignature().toShortString() ); } public static boolean retValIsType(Object retVal, RetValType type) { switch (type) { case FLUX: return retVal instanceof Flux; case MONO: return retVal instanceof Mono; case MONO_OR_FLUX: return retVal instanceof Flux || retVal instanceof Mono; default: throw new IllegalArgumentException("RetValType is unknown"); } } }
java
import path from 'path' import type { Path } from 'path' import fs from 'fs' import solc from 'solc' const contrctPath: Path = path.resolve(__dirname, 'Incrementer.sol') const source: File = fs.readFileSync(contrctPath, 'utf8') const input = { language: 'Solidity', sources: { 'Incrementer.sol': { content: source } }, settings: { outputSelection: { '*': { '*': ['*'] } } } } const tempFile = JSON.parse(solc.compile(JSON.stringify(input))) const contrctFile = tempFile.contracts['Incrementer.sol']['Incrementer'] export { contrctFile }
typescript
#include <cstring> #include <iostream> #include <stdint.h> #include <math.h> #include "sass.h" // implement sign indicator (-1, 0, 1) inline double sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : 0; } // implement factorial unsigned int fact(unsigned int x) { unsigned int value = 1; for(unsigned int i = 2; i <= x; i++) { value = value * i; } return value; } // these functions are not available directly in C inline double csc(double x) { return 1.0 / sin(x); } inline double sec(double x) { return 1.0 / cos(x); } inline double cot(double x) { return 1.0 / tan(x); } inline double csch(double x) { return 1.0 / sinh(x); } inline double sech(double x) { return 1.0 / cosh(x); } inline double coth(double x) { return 1.0 / tanh(x); } inline double acsc(double x) { return 1.0 / asin(x); } inline double asec(double x) { return 1.0 / acos(x); } inline double acot(double x) { return 1.0 / atan(x); } inline double acsch(double x) { return 1.0 / asinh(x); } inline double asech(double x) { return 1.0 / acosh(x); } inline double acoth(double x) { return 1.0 / atanh(x); } // most functions are very simple #define IMPLEMENT_1_ARG_FN(fn) \ union Sass_Value* fn_##fn(const union Sass_Value* s_args, Sass_Function_Entry cb, struct Sass_Compiler* comp) \ { \ if (!sass_value_is_list(s_args)) { \ return sass_make_error("Invalid arguments for " #fn); \ } \ if (sass_list_get_length(s_args) != 1) { \ return sass_make_error("Exactly one arguments expected for " #fn); \ } \ const union Sass_Value* inp = sass_list_get_value(s_args, 0); \ if (!sass_value_is_number(inp)) { \ return sass_make_error("You must pass a number into " #fn); \ } \ double inp_nr = sass_number_get_value(inp); \ const char* inp_unit = sass_number_get_unit(inp); \ return sass_make_number(fn(inp_nr), inp_unit); \ } // math/numeric IMPLEMENT_1_ARG_FN(sign) // math/exponentiation IMPLEMENT_1_ARG_FN(exp) IMPLEMENT_1_ARG_FN(log) IMPLEMENT_1_ARG_FN(log2) IMPLEMENT_1_ARG_FN(log10) IMPLEMENT_1_ARG_FN(sqrt) IMPLEMENT_1_ARG_FN(cbrt) IMPLEMENT_1_ARG_FN(fact) // math/trigonometry IMPLEMENT_1_ARG_FN(sin) IMPLEMENT_1_ARG_FN(cos) IMPLEMENT_1_ARG_FN(tan) IMPLEMENT_1_ARG_FN(csc) IMPLEMENT_1_ARG_FN(sec) IMPLEMENT_1_ARG_FN(cot) // math/hyperbolic IMPLEMENT_1_ARG_FN(sinh) IMPLEMENT_1_ARG_FN(cosh) IMPLEMENT_1_ARG_FN(tanh) IMPLEMENT_1_ARG_FN(csch) IMPLEMENT_1_ARG_FN(sech) IMPLEMENT_1_ARG_FN(coth) // math/inverse-trigonometry IMPLEMENT_1_ARG_FN(asin) IMPLEMENT_1_ARG_FN(acos) IMPLEMENT_1_ARG_FN(atan) IMPLEMENT_1_ARG_FN(acsc) IMPLEMENT_1_ARG_FN(asec) IMPLEMENT_1_ARG_FN(acot) // math/inverse-hyperbolic IMPLEMENT_1_ARG_FN(asinh) IMPLEMENT_1_ARG_FN(acosh) IMPLEMENT_1_ARG_FN(atanh) IMPLEMENT_1_ARG_FN(acsch) IMPLEMENT_1_ARG_FN(asech) IMPLEMENT_1_ARG_FN(acoth) // so far only pow has two arguments #define IMPLEMENT_2_ARG_FN(fn) \ union Sass_Value* fn_##fn(const union Sass_Value* s_args, Sass_Function_Entry cb, struct Sass_Compiler* comp) \ { \ if (!sass_value_is_list(s_args)) { \ return sass_make_error("Invalid arguments for" #fn); \ } \ if (sass_list_get_length(s_args) != 2) { \ return sass_make_error("Exactly two arguments expected for" #fn); \ } \ const union Sass_Value* value1 = sass_list_get_value(s_args, 0); \ const union Sass_Value* value2 = sass_list_get_value(s_args, 1); \ if (!sass_value_is_number(value1) || !sass_value_is_number(value2)) { \ return sass_make_error("You must pass numbers into" #fn); \ } \ double value1_nr = sass_number_get_value(value1); \ double value2_nr = sass_number_get_value(value2); \ const char* value1_unit = sass_number_get_unit(value1); \ const char* value2_unit = sass_number_get_unit(value2); \ if (value2_unit && *value2_unit != 0) { \ return sass_make_error("Exponent to " #fn " must be unitless"); \ } \ return sass_make_number(fn(value1_nr, value2_nr), value1_unit); \ } \ // one argument functions IMPLEMENT_2_ARG_FN(pow) // return version of libsass we are linked against extern "C" const char* ADDCALL libsass_get_version() { return libsass_version(); } // entry point for libsass to request custom functions from plugin extern "C" Sass_Function_List ADDCALL libsass_load_functions() { // create list of all custom functions Sass_Function_List fn_list = sass_make_function_list(33); // math/numeric functions sass_function_set_list_entry(fn_list, 0, sass_make_function("sign($x)", fn_sign, 0)); // math/exponentiation functions sass_function_set_list_entry(fn_list, 1, sass_make_function("exp($x)", fn_exp, 0)); sass_function_set_list_entry(fn_list, 2, sass_make_function("log($x)", fn_log, 0)); sass_function_set_list_entry(fn_list, 3, sass_make_function("log2($x)", fn_log2, 0)); sass_function_set_list_entry(fn_list, 4, sass_make_function("log10($x)", fn_log10, 0)); sass_function_set_list_entry(fn_list, 5, sass_make_function("sqrt($x)", fn_sqrt, 0)); sass_function_set_list_entry(fn_list, 6, sass_make_function("cbrt($x)", fn_cbrt, 0)); sass_function_set_list_entry(fn_list, 7, sass_make_function("fact($x)", fn_fact, 0)); sass_function_set_list_entry(fn_list, 8, sass_make_function("pow($base, $power)", fn_pow, 0)); // math/trigonometry sass_function_set_list_entry(fn_list, 9, sass_make_function("sin($x)", fn_sin, 0)); sass_function_set_list_entry(fn_list, 10, sass_make_function("cos($x)", fn_cos, 0)); sass_function_set_list_entry(fn_list, 11, sass_make_function("tan($x)", fn_tan, 0)); sass_function_set_list_entry(fn_list, 12, sass_make_function("csc($x)", fn_csc, 0)); sass_function_set_list_entry(fn_list, 13, sass_make_function("sec($x)", fn_sec, 0)); sass_function_set_list_entry(fn_list, 14, sass_make_function("cot($x)", fn_cot, 0)); // math/hyperbolic sass_function_set_list_entry(fn_list, 15, sass_make_function("sinh($x)", fn_sinh, 0)); sass_function_set_list_entry(fn_list, 16, sass_make_function("cosh($x)", fn_cosh, 0)); sass_function_set_list_entry(fn_list, 17, sass_make_function("tanh($x)", fn_tanh, 0)); sass_function_set_list_entry(fn_list, 18, sass_make_function("csch($x)", fn_csch, 0)); sass_function_set_list_entry(fn_list, 19, sass_make_function("sech($x)", fn_sech, 0)); sass_function_set_list_entry(fn_list, 20, sass_make_function("coth($x)", fn_coth, 0)); // math/inverse-trigonometry sass_function_set_list_entry(fn_list, 21, sass_make_function("asin($x)", fn_asin, 0)); sass_function_set_list_entry(fn_list, 22, sass_make_function("acos($x)", fn_acos, 0)); sass_function_set_list_entry(fn_list, 23, sass_make_function("atan($x)", fn_atan, 0)); sass_function_set_list_entry(fn_list, 24, sass_make_function("acsc($x)", fn_acsc, 0)); sass_function_set_list_entry(fn_list, 25, sass_make_function("asec($x)", fn_asec, 0)); sass_function_set_list_entry(fn_list, 26, sass_make_function("acot($x)", fn_acot, 0)); // math/inverse-hyperbolic sass_function_set_list_entry(fn_list, 27, sass_make_function("asinh($x)", fn_asinh, 0)); sass_function_set_list_entry(fn_list, 28, sass_make_function("acosh($x)", fn_acosh, 0)); sass_function_set_list_entry(fn_list, 29, sass_make_function("atanh($x)", fn_atanh, 0)); sass_function_set_list_entry(fn_list, 30, sass_make_function("acsch($x)", fn_acsch, 0)); sass_function_set_list_entry(fn_list, 31, sass_make_function("asech($x)", fn_asech, 0)); sass_function_set_list_entry(fn_list, 32, sass_make_function("acoth($x)", fn_acoth, 0)); // return the list return fn_list; } // create a custom header to define to variables Sass_Import_List custom_header(const char* cur_path, Sass_Importer_Entry cb, struct Sass_Compiler* comp) { // create a list to hold our import entries Sass_Import_List incs = sass_make_import_list(1); // create our only import entry (must make copy) incs[0] = sass_make_import_entry("[math]", strdup( "$E: 2.718281828459045235360287471352 !global;\n" "$PI: 3.141592653589793238462643383275 !global;\n" "$TAU: 6.283185307179586476925286766559 !global;\n" ), 0); // return imports return incs; } // entry point for libsass to request custom headers from plugin extern "C" Sass_Importer_List ADDCALL libsass_load_headers() { // allocate a custom function caller Sass_Importer_Entry c_header = sass_make_importer(custom_header, 5000, (void*) 0); // create list of all custom functions Sass_Importer_List imp_list = sass_make_importer_list(1); // put the only function in this plugin to the list sass_importer_set_list_entry(imp_list, 0, c_header); // return the list return imp_list; }
cpp
// Question: // 0 - 1 Knapsack Problem : // You are given weights and values of N items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. // Note that we have only one quantity of each item. // Example 1: // Input: // N = 3 // W = 4 // values[] = {1,2,3} // weight[] = {4,5,1} // Output: 3 // Example 2: // Input: // N = 3 // W = 3 // values[] = {1,2,3} // weight[] = {4,5,6} // Output: 0 //Approch followed: memoization // Memoization: Make a choice digram for recursion, // this will consist of if you can include the element in the knapsack or not, // check if the weight of current item is less than or equal to toal weight, // if it is, return the max of recursive call of the same function including // the element (reduce the max Weight and n) or don;t include the element, // this will oonly reduce n. And if the element's weight is more than current. don't include // and call the function again with onoly n-1. for the DP part, initialize a global matrix and memset it to -1 // in the main code. whenever you are going in any condition, make the matrix on basis of the dimension of the varibale // inputs of the recurisie function. Here it will be W and n, make a matrix of W+1 and n+1 dimension and for every recurvie // return, instead, store that value insdie that matrix, before going into any call, check if // the value foor that W and n is soomething else than the initalize mem set value of the matrix, if so directly return that // { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int t[1001][1001]; int solve(int W, int wt[], int val[], int n){ if(t[n][W]!=-1){ return t[n][W]; } if(W==0 || n==0){ t[n][W]=0; return 0; } if(wt[n-1]<=W){ t[n][W]=max(val[n-1]+solve(W-wt[n-1],wt,val,n-1),solve(W,wt,val,n-1)); return t[n][W]; } else { t[n][W]=solve(W,wt,val,n-1); return t[n][W]; } } //Function to return max value that can be put in knapsack of capacity W. int knapSack(int W, int wt[], int val[], int n) { memset(t,-1,sizeof(t)); return solve(W,wt,val,n); // Your code here } }; // { Driver Code Starts. int main() { //taking total testcases int t; cin>>t; while(t--) { //reading number of elements and weight int n, w; cin>>n>>w; int val[n]; int wt[n]; //inserting the values for(int i=0;i<n;i++) cin>>val[i]; //inserting the weights for(int i=0;i<n;i++) cin>>wt[i]; Solution ob; //calling method knapSack() cout<<ob.knapSack(w, wt, val, n)<<endl; } return 0; } // } Driver Code Ends
cpp
<gh_stars>1-10 /** * * @author : <NAME> * @version : 1.0 */ import {Record} from 'immutable'; import actionTypes from '../action-types'; const userState = new Record({ userName: '', email: '', emailErrorInfo: '', password: '', secondPsd: '', secondPsdErrorInfo: '', isSignUpFulfilled: false }); export default function (state= new userState(), {type,payload}) { switch (type) { case actionTypes.SIGN_UP_FULFILLED: return state.merge({ isSignUpFulfilled: true }); case actionTypes.CHECK_USER_NAME_FULFILLED: return state.merge({ userName: payload.userName }); case actionTypes.CHECK_EMAIL_FULFILLED: return state.merge({ email: payload.email, emailErrorInfo: payload.emailErrorInfo }); case actionTypes.PASSWORD_CHANGE: return state.merge({ password: payload.password }); case actionTypes.SECOND_PASSWORD_CHANGE: return state.merge({ secondPsd: payload.secondPsd, secondPsdErrorInfo: payload.secondPsdErrorInfo }); default: return state; } }
javascript
Decorating the Christmas Tree is the best part of Xmas celebrations. This year, amid the Covid-19 pandemic it's best to stick to indoor Christmas activities and what's better than making gifts at home and putting up the Christmas Tree together with the young and old in the family. On Christmas Eve today, go online and share the excitement of decorating the Christmas Tree with friends. People have been posting pictures of their Christmas Tree on social media. The Christmas baubles, wreaths, glittering stars, mistletoe, candy canes and fairy lights have an inherent cheerfulness that makes people happy and brings in the festive spirit. Each of these Christmas decorations is very significant and symbolize peace and harmony. Millions of people across continents have embraced the tradition of decorating the Christmas Tree. Even though it is still a symbol of Christianity, many associate it with year-end celebrations. The Christmas Star symbolizes the 'Star of Bethlehem'. According to the Biblical story, the Christmas Star guided the three wise men, to the baby Jesus. The Star also stands for hope for humanity. Christmas Tree: Candles represent the 'Star of Bethlehem'. People used candles before the electric Christmas tree lights came in. Fairy lights and coloured tiny bulbs are an inseparable part of Christmas Tree decorations. Christmas Tree: Wreaths symbolize eternal love and rebirth. The Holly on the wreaths stands for immortality, strength and generosity. Christmas is a time for sharing happiness. Christmas Tree: Mistletoe plants are traditionally known for their romantic overtones. According to the history. com, the "plant's history as a symbolic herb dates back thousands of years and ancient cultures prized mistletoe for its healing properties. " The mistletoe could blossom even during the harsh winter months and the Druids saw it as symbol of vivacity. Christmas Tree: Gifts are traditionally wrapped and tied with colourful ribbon bows. It is believed that the bow is a sign of unity and happiness in the holiday season. Red and green are the traditional Christmas colours. While green signifies light and life, red represents blood or the sacrifice of Christ. On Winter Solstice, as we formally step in to the Christmas season, go ahead and decorate your Christmas Tree with your family. Wishing you a safe and happy Christmas and New Year celebrations!
english
Ahmedabad Fire and Emergency Services (AFES) officials are deeply concerned about the state of fire safety measures in government-owned high-rise buildings,be it of the central government,the state government or their own parent authority the city municipal corporation. According to officials,90 per cent of fire safety equipments in a little over 50 high-rise structures in the city where government offices are functioning are non-operative due to lack of technical knowledge. One problem with majority of these buildings as officials observe is that their fire safety has been entrusted to their electrical department personnel of CPWD or Roads and Buildings Department,which they say is a wrong practice. As per the guidelines of the National Fire Protection Association of India and the National Building Code,only technically qualified crew should be appointed for fire safety monitoring and this requirement can be met simply by inducting ex-fire service personnel, said an AFES official. The present system of hiring electrical department personnel leads to nowhere because they are mostly price and quality conscious,and secondly,they can hardly stand any technical argument,as they are used to the cut and paste culture when preparing reports and recommendations,the official added. Another issue that is harmful to the government high-rise structures is that barely 10 per cent of them respond to notices issued by AFES for non-implementation of fire safety measures. In the case of private buildings,most do not revert back,officials say. AFES has got no powers to declare such buildings unsafe as is the practice in cities like Delhi and Mumbai. Municipal commissioner Dr Guruprasad Mohapara said given sealing powers to fire brigade was no solution. What these buildings should do is carry out fire drills on a regular basis and ensure that smoke alarms were working properly. It is not true to say that we are helpless. AMC can always seal such buildings that are found violating norms. In fact,the government is coming out with a set of rules shortly in fire safety,we are beginning with hospitals,survey for which will begin soon, he said. Central government: BSNL buildings at C G Road,Railwaypura,Naranpura,Bhadra,Regional Passport Office (plus its three residential buildings),Accountant Ganerals Office,Excise Bhavan,LIC buildings (four),State Bank of India (two buildings),Central Bank of India,Union Bank of India,Bank of India,Bank of Baroda,Bank of Baroda Training College,Dena Bank,United Commercial Bank,NABARD towers (four),Vimanagar (six towers),Reserve Bank of India (two buildings),EPF Office,United India Insurance Company,National Insurance Company. State government: B J Medical College,Civil Hospital trauma centre,Ravishankar Raval Art Gallery,Multistory Building,District Panchayat Office. AMC: New headquarters building,New West Zone Office,East Zone Office,Sales Tax Building,Shardaben Hospital,V S Hospital trauma centre,L G Medical College,and U N Mehta Hospital.
english
<reponame>Arthurdshan/Engenharia-de-software-1<filename>Backend/src/main/java/com/arthurhan/backend/http/domain/request/SurveyVoteRequest.java package com.arthurhan.backend.http.domain.request; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class SurveyVoteRequest { private Integer optionId; private Integer userId; }
java
<reponame>PompaDonpa/FSW-React-Calculator<filename>node_modules/.cache/babel-loader/dabb00291ca0bb0fe2903089f45b0f55.json<gh_stars>0 {"ast":null,"code":"/**\n * THIS FILE IS AUTO-GENERATED\n * DON'T MAKE CHANGES HERE\n */\nimport { addDependencies } from './dependenciesAdd.generated.js';\nimport { compareDependencies } from './dependenciesCompare.generated.js';\nimport { divideDependencies } from './dependenciesDivide.generated.js';\nimport { partitionSelectDependencies } from './dependenciesPartitionSelect.generated.js';\nimport { typedDependencies } from './dependenciesTyped.generated.js';\nimport { createMedian } from '../../factoriesAny.js';\nexport var medianDependencies = {\n addDependencies: addDependencies,\n compareDependencies: compareDependencies,\n divideDependencies: divideDependencies,\n partitionSelectDependencies: partitionSelectDependencies,\n typedDependencies: typedDependencies,\n createMedian: createMedian\n};","map":{"version":3,"sources":["/Users/macpro/GITHUB/REPOS/Calculator/node_modules/mathjs/lib/esm/entry/dependenciesAny/dependenciesMedian.generated.js"],"names":["addDependencies","compareDependencies","divideDependencies","partitionSelectDependencies","typedDependencies","createMedian","medianDependencies"],"mappings":"AAAA;AACA;AACA;AACA;AACA,SAASA,eAAT,QAAgC,gCAAhC;AACA,SAASC,mBAAT,QAAoC,oCAApC;AACA,SAASC,kBAAT,QAAmC,mCAAnC;AACA,SAASC,2BAAT,QAA4C,4CAA5C;AACA,SAASC,iBAAT,QAAkC,kCAAlC;AACA,SAASC,YAAT,QAA6B,uBAA7B;AACA,OAAO,IAAIC,kBAAkB,GAAG;AAC9BN,EAAAA,eAAe,EAAfA,eAD8B;AAE9BC,EAAAA,mBAAmB,EAAnBA,mBAF8B;AAG9BC,EAAAA,kBAAkB,EAAlBA,kBAH8B;AAI9BC,EAAAA,2BAA2B,EAA3BA,2BAJ8B;AAK9BC,EAAAA,iBAAiB,EAAjBA,iBAL8B;AAM9BC,EAAAA,YAAY,EAAZA;AAN8B,CAAzB","sourcesContent":["/**\n * THIS FILE IS AUTO-GENERATED\n * DON'T MAKE CHANGES HERE\n */\nimport { addDependencies } from './dependenciesAdd.generated.js';\nimport { compareDependencies } from './dependenciesCompare.generated.js';\nimport { divideDependencies } from './dependenciesDivide.generated.js';\nimport { partitionSelectDependencies } from './dependenciesPartitionSelect.generated.js';\nimport { typedDependencies } from './dependenciesTyped.generated.js';\nimport { createMedian } from '../../factoriesAny.js';\nexport var medianDependencies = {\n addDependencies,\n compareDependencies,\n divideDependencies,\n partitionSelectDependencies,\n typedDependencies,\n createMedian\n};"]},"metadata":{},"sourceType":"module"}
json
<filename>exercicios/ex001/index.html <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Meu primeiro exercício</title> </head> <body> <h1>Olá, Mundo!</h1> <hr> <p> Esse é o meu primeiro documento em HTML! Estou muito feliz! </p> <p> Este é um momento único! Estou criando um site! </p> <h2>Subtítulo</h2> <hr> <p> Este é o primeiro parágrafo do subtítulo. </p> <p> Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quaerat deleniti ut illo distinctio veniam commodi minima. Est <br> aspernatur cum saepe molestias minus. Repellendus explicabo id neque, iure architecto veniam. </p> <hr> </body> </html>
html
package com.networknt.taiji.event; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface EventSubscriber { String id() default ""; SubscriberDurability durability() default SubscriberDurability.DURABLE; SubscriberInitialPosition readFrom() default SubscriberInitialPosition.BEGINNING; boolean progressNotifications() default false; }
java
Peralatan yang dikendalikan dengan baik, krew pendapatan pakar, dan perkhidmatan selepas jualan yang lebih baik;Kami juga merupakan keluarga utama yang bersatu, sesiapa sahaja kekal dengan nilai organisasi "penyatuan, keazaman, toleransi" untuk motor tork besar berkelajuan rendah,Win Tambat Marin, Win Hidraulik Dipasang Secara Dalaman, Motor Perjalanan Slewing Transmisi Hidraulik,Kren Marin Alas.Kami mempunyai pengetahuan produk profesional dan pengalaman yang kaya dalam pembuatan.Kami biasanya membayangkan kejayaan anda adalah perusahaan perniagaan kami!Produk ini akan membekalkan ke seluruh dunia, seperti Eropah, Amerika, Australia, Romania, Cancun, New Zealand, Angola. Tumpuan kami pada kualiti produk, inovasi, teknologi dan perkhidmatan pelanggan telah menjadikan kami salah satu pemimpin yang tidak dipertikaikan di seluruh dunia dalam bidang ini. .Membawa konsep "Kualiti Didahulukan, Pelanggan Diutamakan, Keikhlasan dan Inovasi" dalam fikiran kami, Kami telah mencapai kemajuan yang besar pada tahun-tahun lalu.Pelanggan dialu-alukan untuk membeli produk standard kami, atau menghantar permintaan kepada kami.Anda pasti kagum dengan kualiti dan harga kami.Sila hubungi kami sekarang!
english
The startup will use the fresh capital to enhance its growth by developing new business functions, advance innovation of its platform, strengthen its product, engineering, and design teams in India, and go-to-market teams in the US, the UK, Europe, Middle East and Africa (EMEA) and Asia Pacific. Hubilo CEO and cofounder Vaibhav Jain said the investment—one of the largest in the event technology category—signals the revolution in ways by which people connect, engage, share experiences, and create opportunities at a time when uncertainty about Covid-19 and its variants have resulted in cancelled events and delayed a return to traditional office environments. "We will be expanding our sales, partnerships, and business development divisions and setting up a complete Research and Development division that will conduct a series of experiments to ensure that Hubilo is building a completely future-proofed platform," Jain told PTI. The company was a nominee in the 'Covid-led Business Transformation' category of ET Startup Awards 2021. Launched in 2015 as a cloud-based offline event management platform, Hubilo pivoted to a virtual event platform in February last year, after the offline event industry came to a grinding halt due to the Covid-19 pandemic. The company reworked its technology in 26 days and designed an event platform. "We believe strongly in the global distributed workforce being a megatrend that will impact all of us in the future. It is clear that the way we collaborate and connect will need to be re-architected in order for any global player to succeed," Abhi Arun, Managing Partner at Alkeon Capital, said. Guru Chahal, Partner at Lightspeed Venture Partners, said businesses spend over one trillion dollars of direct spending on events. "In the last couple of years, 15-20 per cent of the enterprise events budget has permanently moved to digital events...I expect in the next few years that Hubilo will be broadly acknowledged as a market leader in the space," Chahal added. In February, Hubilo raised $23.5 million in Series A funding led by Lightspeed Venture Partners and Balderton Capital.
english
<reponame>MadManRises/Madgine<gh_stars>1-10 #include "python3lib.h" #include "python3streamredirect.h" #include "Meta/keyvalue/metatable_impl.h" #include "util/pyobjectutil.h" METATABLE_BEGIN(Engine::Scripting::Python3::Python3StreamRedirect) FUNCTION(write, text) METATABLE_END(Engine::Scripting::Python3::Python3StreamRedirect) namespace Engine { namespace Scripting { namespace Python3 { Python3StreamRedirect::Python3StreamRedirect(std::streambuf *buf) : mBuf(buf) { } Python3StreamRedirect::~Python3StreamRedirect() { while (!mOldStreams.empty()) { reset(mOldStreams.begin()->first); } } void Python3StreamRedirect::redirect(std::string_view name) { if (!mOldStreams[name]) { mOldStreams[name] = PySys_GetObject(name.data()); // borrowed } PySys_SetObject(name.data(), Scripting::Python3::toPyObject(TypedScopePtr { this })); } void Python3StreamRedirect::reset(std::string_view name) { auto it = mOldStreams.find(name); if (it != mOldStreams.end()) { Py_DECREF(PySys_GetObject(name.data())); PySys_SetObject(name.data(), it->second); mOldStreams.erase(it); } } int Python3StreamRedirect::write(std::string_view text) { return mBuf->sputn(text.data(), text.size()); } void Python3StreamRedirect::setBuf(std::streambuf *buf) { mBuf = buf; } std::streambuf* Python3StreamRedirect::buf() const { return mBuf; } } } }
cpp
<filename>sri/draggabilly/1.0.5.json {"draggabilly.js":"sha256-yL62Fl9FT8NFOSeIbJVPvhoRYLhvNHLUCYwxtMc1194=","draggabilly.min.js":"sha256-zHRxemsywzM0fe8ugXpdvEYVVEE5P4ZRHHV5o2nabK8="}
json
{"id":931,"category":{"name":"PvP","subset":"Frontline"},"help":{"de":"An 30 Kämpfen an der Carteneauer Front teilgenommen.","en":"Participate in 30 Frontline campaigns.","fr":"Participer à 30 batailles du Front.","jp":"アウトロー戦区に計30回参戦する"},"img":"000000/000259.png"}
json
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from django.views.decorators.csrf import csrf_exempt from .views import PaymillView urlpatterns = patterns('', url(r'^webhook/$', csrf_exempt(PaymillView.as_view()), name='paymill_webhook_callback'), )
python
Agartala, Jan 30 (PTI) A tribal leader of Tripura, Rajeswar Debbarma, has resigned from the BJP for its "failure" to implement poll promises, made during 2018 Assembly election, for the development of the indigenous people of the state. Debbarma also demanded scrapping of the Citizenship (Amendment) Bill-2016 as it posed a threat to the indigenous people of Tripura. He submitted his resignation to party president of the state unit, Biplab Kumar Deb, on Tuesday. Deb is also the Chief Minister of Tripura and is currently out of the state. "I am quite unhappy with the performance of the BJP- led NDA government in the state as it is ignoring the indigenous people of Tripura. Not a single poll pledge, the party had made before last year's Assembly election, has been implemented," Debbarma said. Debbarma, a former MLA of the Indigenous Nationalist Party of Twipra (INPT), a regional tribal party, had joined the BJP before the Assembly election in Tripura last year. "The BJP gave a clear assurance in its vision document before the last election that more power would be granted to tribal council, which would be named as 'Tipraland State Council' but the party did not look into the matter. "Recently the Union Cabinet announced its decision to upgrade the tribal council into a territorial council, which will not fulfil the aspirations of the indigenous people of the state," he said. On the Citizenship Bill, which was passed in the Lok Sabha on January 8, Debbarma said "It is anti-tribal and the indigenous people would be marginalised if Hindus from Bangladesh enter the state. " He also voiced his protest against police firing on Citizenship Bill protestors at Madhabbari in West Tripura district on January 8, the day the Bill was passed in the Lok Sabha. The proposed legislation seeks to provide Indian citizenship to non-Muslim nationals from Bangladesh, Pakistan and Afghanistan after six years of residence in India. A Tripura State Rifles (TSR) personnel and six members of Twipra Student Federation (TSF), who were protesting against the Bill, were injured when police opened fire and resorted to lathicharge to disperse the gathering on January 8. The present coalition government of Tripura, led by the BJP, has "totally failed" to deliver good governance in the last ten months and lost its credibility, he said.
english
mod portio; mod handler; pub use portio::Portio; pub use handler::Handler;
rust
[{"liveId":"5a1c0c470cf2b9e38360ea07","title":"黄楚茵的电台","subTitle":"聊聊握手会","picPath":"/mediasource/live/1511787571259Y4A450Qg1P.png,/mediasource/live/1511787591753i638xGs2JB.jpg","startTime":1511787591943,"memberId":607515,"liveType":2,"picLoopTime":30000,"lrcPath":"/mediasource/live/lrc/5a1c0c470cf2b9e38360ea07.lrc","streamPath":"http://livepull.48.cn/pocket48/gnz48_huang_chuyin_lerrw.flv","screenMode":0},{"liveId":"5a1c08910cf2b9e38360ea05","title":"徐晗的直播间","subTitle":"✨✨❤️","picPath":"/mediasource/live/15117866413999e6KuLIYFR.jpg","startTime":1511786641625,"memberId":2470,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5a1c08910cf2b9e38360ea05.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3401441.flv","screenMode":0},{"liveId":"5a1c07160cf267aa15bbcd53","title":"王奕的直播间","subTitle":"我没化妆.","picPath":"/mediasource/live/1511786262111xpBE39gFss.jpg","startTime":1511786262077,"memberId":594003,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5a1c07160cf267aa15bbcd53.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3401412.flv","screenMode":0},{"liveId":"5a1c05ea0cf2b9e38360ea04","title":"林芝的直播间","subTitle":"输入神秘代码","picPath":"/mediasource/live/1511785962429Ih0plXYrUY.jpg","startTime":1511785962635,"memberId":607523,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5a1c05ea0cf2b9e38360ea04.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3401366.flv","screenMode":0},{"liveId":"5a1c04aa0cf267aa15bbcd52","title":"郑洁丽的直播间","subTitle":"快跑吧","picPath":"/mediasource/live/15117796640276ucluTW1F8.jpg","startTime":1511785642529,"memberId":480676,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5a1c04aa0cf267aa15bbcd52.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3401333.flv","screenMode":0},{"liveId":"5a1c025e0cf267aa15bbcd51","title":"林歆源的直播间","subTitle":"耶","picPath":"/mediasource/live/1511066340907SUelf79tAh.jpg","startTime":1511785054577,"memberId":541132,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5a1c025e0cf267aa15bbcd51.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3401266.flv","screenMode":0},{"liveId":"5a1c020c0cf2b9e38360ea03","title":"梁婉琳的电台","subTitle":"一个很温柔的电台:-)","picPath":"/mediasource/live/1511784971352gCokkk0Xzl.jpg,/mediasource/live/15117849714705Z6q5DuMd1.jpg,/mediasource/live/1511784971635dRosn47Q44.jpg,/mediasource/live/1511784971911ilW4Hn3w4i.jpg","startTime":1511784972185,"memberId":601302,"liveType":2,"picLoopTime":30000,"lrcPath":"/mediasource/live/lrc/5a1c020c0cf2b9e38360ea03.lrc","streamPath":"http://livepull.48.cn/pocket48/gnz48_liang_wanlin_xhcad.flv","screenMode":0},{"liveId":"5a1c01a90cf2b9e38360ea01","title":"何梦瑶的直播间","subTitle":"(˶‾᷄ ⁻̫ ‾᷅˵)\n","picPath":"/mediasource/live/15117848735697ef78d99ZN.jpg","startTime":1511784873768,"memberId":607516,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5a1c01a90cf2b9e38360ea01.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3401251.flv","screenMode":0},{"liveId":"5a1bffcb0cf267aa15bbcd4f","title":"郑丹妮的电台","subTitle":"其实我不敢出声","picPath":"/mediasource/live/1511784395762ot1eeJ7kcV.jpg,/mediasource/live/1510760902338cEpB42sfG6.jpg,/mediasource/live/15107609024887xzfX9u7Rt.jpg,/mediasource/live/15107609026104Bu41n9Wzp.jpg,/mediasource/live/15107609027656KXRq0V3q8.jpg,/mediasource/live/1510760902983xF7sXnH8RU.jpg,/mediasource/live/15107609031556Bl9hpZ62C.jpg,/mediasource/live/15107609033105dbx91RZ5e.jpg,/mediasource/live/15107609034847DJ3Y86gnc.jpg","startTime":1511784395837,"memberId":327575,"liveType":2,"picLoopTime":30000,"lrcPath":"/mediasource/live/lrc/5a1bffcb0cf267aa15bbcd4f.lrc","streamPath":"http://livepull.48.cn/pocket48/gnz48_zheng_danni_cgwjt.flv","screenMode":0},{"liveId":"5a1bfef00cf2b9e38360ea00","title":"罗雪丽的直播间","subTitle":"💗","picPath":"/mediasource/live/1511784176027Vp6XI3jPmu.jpg","startTime":1511784176231,"memberId":327589,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5a1bfef00cf2b9e38360ea00.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3401177.flv","screenMode":0},{"liveId":"5a1bfcc70cf267aa15bbcd4e","title":"冯思佳的直播间","subTitle":"啦啦啦\n","picPath":"/mediasource/live/1505916887013Z7EB95re52.png","startTime":1511783619494,"memberId":327587,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5a1bfcc70cf267aa15bbcd4e.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3401113.flv","screenMode":0}]
json
<gh_stars>1-10 {"2010":"","2016":"","AdditionalNote":"","Department":"Західний апеляційний господарський суд","Link":"https://drive.google.com/open?id=0BygiyWAl79DMVjZ0Y1ZTOFdqWDA","Link 2015":"","Name":"<NAME>","Note":"У меня","Position":"Суддя Західного апеляційного господарського суду","Region":"Львівська область","Youtube":"","analytics":[{"fc":1,"fi":84698.95,"fl":6500,"fla":1,"i":320639.83,"k":106,"ka":1,"y":2013},{"fc":1,"fi":42294.63,"fl":6500,"fla":1,"i":315174.5,"k":106,"ka":1,"y":2014},{"fc":1,"fi":72094,"fl":6500,"fla":1,"i":270565,"j":4,"k":53,"ka":1,"y":2015},{"b":2004,"fc":1,"fi":73317,"fl":6500,"fla":1,"i":506847,"k":53,"ka":1,"y":2016},{"b":30013,"fc":1,"fi":72084,"fl":6500,"fla":1,"i":741043,"k":53,"ka":1,"y":2017},{"b":560032,"fc":1,"fi":121029,"fl":6500,"fla":1,"i":2086632,"k":53,"ka":1,"y":2018},{"b":1194419,"fc":1,"fi":2455519,"fl":6500,"fla":1,"k":53,"ka":1,"m":133884,"y":2019},{"y":2020}],"declarationsLinks":[{"id":"vulyk_73_138","provider":"declarations.com.ua.opendata","url":"http://static.declarations.com.ua/declarations/chosen_ones/judges_batch/1139_myrutenko_oleksandr_leontiiovych.pdf","year":2013},{"id":"vulyk_68_113","provider":"declarations.com.ua.opendata","url":"http://static.declarations.com.ua/declarations/chosen_ones/mega_batch/myrutenko_oleksandr_leontiiovych.pdf","year":2014},{"id":"nacp_b40d7eba-b4bf-46cc-ae9c-77b768f3a8b9","provider":"declarations.com.ua.opendata","year":2015},{"id":"nacp_843273ee-f513-47b6-9f4b-b4381bed7b59","provider":"declarations.com.ua.opendata","year":2016},{"id":"nacp_d404ddee-a983-4e4c-ad94-fbef13f3f9b6","provider":"declarations.com.ua.opendata","year":2017},{"id":"nacp_0e5065fb-6bdd-46ab-9d88-a12b3dcfc1f3","provider":"declarations.com.ua.opendata","year":2018},{"id":"nacp_cd2a3ca4-2555-436e-98fb-64a711876b49","provider":"declarations.com.ua.opendata","year":2019},{"id":"nacp_d52410fc-3211-4018-84bf-80640d37325f","provider":"declarations.com.ua.opendata","year":2020}],"field8":"","field9":"","key":"mirutenko_oleksandr_leontiyovich","type":"judge","Декларація доброчесності судді подано у 2016 році (вперше)":"http://vkksu.gov.ua/userfiles/declaracii-suddiv/agslviv/myrutenkool.PDF","Декларація родинних зв’язків судді подано у 2016 році":"http://vkksu.gov.ua/userfiles/declaracii-suddiv/agslviv/myrutenkoolrz.PDF","Декларації 2013":"","Декларації 2014":"","Декларації 2015":"","Декларації 2016":"","Клейма":"3","Кількість дисциплінарних стягнень":"","Кількість скарг":"4","Кількість справ":"","Оскаржені":"","ПІБ2":"","Фото":"http://picua.org/img/2018-07/06/l6j24z8ok9x5ckq8yg9da2ikm.jpg","Як живе":"","декларації 2015":"","судові рішення по справах Майдану":""}
json
{ "type":"fail", "buildTargetPHID":"PHID-not-real", "unit":[ { "name":"TestCreateFile", "result":"pass", "namespace":"visualization", "engine":"Jenkins", "duration":0 }, { "name":"TestCreateFileOverwriteExisting", "result":"pass", "namespace":"visualization", "engine":"Jenkins", "duration":0 }, { "name":"TestGenerateFlameGraph", "result":"pass", "namespace":"visualization", "engine":"Jenkins", "duration":0 }, { "name":"TestGenerateFlameGraphPrintsToStdout", "result":"pass", "namespace":"visualization", "engine":"Jenkins", "duration":0 }, { "name":"TestGenerateFlameGraphExecError", "result":"pass", "namespace":"visualization", "engine":"Jenkins", "duration":0 }, { "name":"TestRunPerlScriptDoesExist", "result":"pass", "namespace":"visualization", "engine":"Jenkins", "duration":0 }, { "name":"TestRunPerlScriptDoesNotExist", "result":"pass", "namespace":"visualization", "engine":"Jenkins", "duration":0 }, { "name":"TestNewVisualizer", "result":"fail", "namespace":"visualization", "details":"1. It fails ", "engine":"Jenkins", "duration":0 } ], "__conduit__":{ "token":"<PASSWORD>" } }
json
package main func reverseWords(s string) string { lenS := len(s) if lenS == 0 { return s } // 1. remove redundant spaces lastIsWord := false nextToReplace := 0 runes := []rune(s) for _, r := range runes { if r == ' ' && lastIsWord { lastIsWord = false runes[nextToReplace] = r nextToReplace++ } if r != ' ' { lastIsWord = true runes[nextToReplace] = r nextToReplace++ } } // rid of trailing space runes = runes[:nextToReplace] lenR := len(runes) if lenR == 0 { return "" } if runes[len(runes)-1] == ' ' { runes = runes[:len(runes)-1] } lenR = len(runes) if lenR == 0 { return "" } // 2. reverse whole string reverseRunes(runes, 0, lenR) // 3. reverse single words nextToReverse := 0 for i, r := range runes { if i == lenR-1 { reverseRunes(runes, nextToReverse, lenR) break } if r == ' ' { reverseRunes(runes, nextToReverse, i) nextToReverse = i + 1 } } return string(runes) } func reverseRunes(runes []rune, left, right int) { for i, j := left, right-1; i < j; { runes[i], runes[j] = runes[j], runes[i] i++ j-- } } func main() { println(reverseWords(" a good example s ") + "|") }
go
In a bid to check rising bad loans and failure of restructured loans, the Reserve Bank of India (RBI) has come out with a more stringent strategic debt restructuring (SDR) scheme incorporating features like majority (51 per cent) stake for banks in stressed companies, faster conversion of debt into equity and bringing in a new promoter. Banks that decide to recast a company’s debt under the proposed “strategic debt restructuring” scheme must hold 51 per cent or more of the equity after the debt-for-share conversion, the RBI said in a notification. At the time of initial restructuring, the joint lenders forum (JLF) must incorporate an option to convert the entire loan (including unpaid interest), or part thereof, into shares in the company in the event the borrower is not able to achieve the viability milestones and adhere to ‘critical conditions’ as stipulated in the restructuring package, it said. “The decision on invoking the SDR by converting the whole or part of the loan into equity shares should be taken by the JLF as early as possible but within 30 days from the review of the account. Such decision should be well documented and approved by the majority of the JLF members (minimum of 75 per cent of creditors by value and 60 per cent of creditors by number),” the RBI said. Corporate debt restructuring (CDR) packages of 44 firms with a debt of Rs 27,015 crore have failed during the fiscal ended March 2015. On the other hand, only five companies with debt of Rs 1,399 crore managed to exit the CDR successfully. Outstanding CDR failures almost doubled to Rs 56,995 crore from Rs 29,980 in March 2014. In order to achieve the change in ownership, the lenders under the JLF should collectively become the majority shareholder by conversion of their dues from the borrower into equity, it said. The conversion of debt into equity as approved under the SDR should be completed within a period of 90 days from the date of approval of the SDR package by the JLF, the RBI said. The measure was part of a set of guidelines announced by the RBI on Monday on the SDR scheme, which provides a more flexible process for lenders to recover bad loans. In addition, lenders who acquire shares of a listed company under a restructuring will be exempted from making an open offer, as per rules from Securities and Exchange Board of India (SEBI), the RBI said. “JLF should closely monitor the performance of the company and consider appointing suitable professional management to run the affairs of the company,” it said. JLF and lenders should divest their holdings in the equity of the company as soon as possible. On divestment of banks’ holding in favour of a ‘new promoter’, the asset classification of the account may be upgraded to ‘standard’.
english
18 The sons of Noah who came out of the ·boat [ark] with him were Shem, Ham, and Japheth. (Ham was the father of Canaan.) 19 These three men were Noah’s sons, and all the people on earth ·came [spread out; C see the genealogy in ch. 10] from these three sons. 20 Noah ·became a farmer [L was the first man of the ground/soil] and planted a vineyard. 21 When he drank ·wine made from his grapes [L the wine], he became drunk and lay ·naked [uncovered] in his tent. 22 Ham, the father of Canaan, looked at his naked father and told his [L two] brothers outside [C an act of disrespect; he should have helped his father, as in the next verse]. 23 Then Shem and Japheth got a coat and, carrying it on both their shoulders, they walked backwards into the tent and covered [L the nakedness of] their father. They turned their faces away so that they did not see their father’s nakedness [C they acted appropriately according to ancient custom]. 24 Noah ·was sleeping because of the wine. When he woke up [woke up from his wine] and ·learned [L he knew] what his youngest son, Ham, had done to him, 25 he said, “May there be a curse on Canaan [C the ancestor and representative of the inhabitants of Palestine that Israel displaced at the time of the conquest of the Promised Land; Josh. 1–12]! 26 Noah also said, “May the Lord, the God of Shem, be ·praised [blessed]! May Canaan be Shem’s ·slave [servant; L Shem is the ancestor of Israel]. 27 May God ·give more land to [make space for; C the verb sounds like his name] Japheth. May Japheth live in Shem’s tents, 28 After the flood Noah lived 350 years. 29 ·He lived a total of [L All the days of Noah were] 950 years, and then he died. 10 ·This is the family history [L These are the generations; 2:4] of Shem, Ham, and Japheth, the sons of Noah. After the flood ·these three men had sons [L sons were born to them]. 2 The sons of Japheth were Gomer, Magog, Madai [C ancestor of the Medes], Javan, Tubal, Meshech, and Tiras. 3 The sons of Gomer [C ancestor of the Cimmerians] were Ashkenaz [C ancestor of the Scythians], Riphath, and Togarmah. 4 The sons of Javan were Elishah, Tarshish, Kittim [C ancestor of the people of Cyprus], and ·Rodanim [L Dodanim; see 1 Chr. 1:7]. 5 ·Those who lived in the lands around the Mediterranean Sea [L The people of the coastlands] ·came [spread] from these sons of Japheth. All the ·families [clans] grew and became different nations, each nation with its own land and its own language. 6 The sons of Ham [C ancestors of near neighbors and rivals of Israel] were Cush [C ancestor of the Ethiopians], Mizraim [C ancestor of the Egyptians], Put [C perhaps ancestor of the Libyans], and Canaan. 7 The sons of Cush were Seba, Havilah, Sabtah, Raamah, and Sabteca. The sons of Raamah were Sheba and Dedan [C some of their descendants were the people around the Red Sea and southern Arabia]. 8 Cush also had a descendant named Nimrod, who became a very powerful man on earth. 9 He was a ·great [mighty] hunter before the Lord, which is why people say someone is “like Nimrod, a ·great [mighty] hunter before the Lord.” 10 ·At first Nimrod’s kingdom covered [L The beginning of his kingdom was] Babylon, ·Erech [or Uruk], Akkad, and Calneh [C well-known cities in southern Mesopotamia] in the land of ·Babylonia [L Shinar]. 11 From there he went to Assyria [C in northern Mesopotamia], where he built the cities of Nineveh, ·Rehoboth Ir [or that is a great city], and Calah. 12 He also built Resen, the great city between Nineveh and Calah. 13 Mizraim [10:6] was the father of the ·Ludites [C probably the Lydians], Anamites, Lehabites, Naphtuhites, 14 Pathrusites, Casluhites, and the ·people of Crete [L Caphtorites]. (The Philistines came from the ·Casluhites [or Caphtorites].) 15 Canaan [C the son of Ham whom Noah cursed; 9:25–27] was the father of Sidon [C name of a famous coastal city in Syria], his first son, and of Heth [C ancestor of the Hittites, important inhabitants of Asia Minor]. 16 He was also the father of the Jebusites [C pre-Israelite inhabitants of Jerusalem], Amorites, Girgashites, 17 Hivites, Arkites, Sinites, 18 Arvadites, Zemarites, and Hamathites [C peoples who lived in Syria-Palestine before the Israelites]. The ·families [clans] of the Canaanites scattered. 19 Their land reached from Sidon to Gerar as far as Gaza, and then to Sodom, Gomorrah, Admah, and Zeboiim, as far as Lasha. 20 All these people were the sons of Ham, and all these ·families [clans] had their own languages, their own lands, and their own nations. 21 Shem, Japheth’s older brother, also had sons. One of his descendants was the father of all the sons of Eber [C the Israelites were descended from Shem through Eber]. 22 The sons of Shem were Elam [C a country east of Mesopotamia], Asshur [C in northern Mesopotamia], Arphaxad, Lud, and Aram [C north of Israel in Syria]. 23 The sons of Aram were Uz, Hul, Gether, and Meshech. 24 Arphaxad was the father of Shelah, who was the father of Eber. 25 Eber was the father of two sons—one named Peleg [C related to the Hebrew word for “divided”], because the earth was divided during his life, and the other was named Joktan. 26 Joktan was the father of Almodad, Sheleph, Hazarmaveth, Jerah, 27 Hadoram, Uzal, Diklah, 28 Obal, Abimael, Sheba, 29 Ophir, Havilah, and Jobab. All these people were the sons of Joktan. 30 They lived in the area between Mesha and Sephar in the hill country in the East. 31 These are the people from the ·family [clans] of Shem, arranged by ·families [clans], languages, countries, and nations. 32 This is the list of the ·families [clans] from the sons of Noah, arranged according to their nations. From these ·families [clans] came all the nations who ·spread [branched out] across the earth after the flood.
english
<gh_stars>0 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isEmail = isEmail; exports.fileext = fileext; exports.formatSize = formatSize; exports.uniqueNumber = uniqueNumber; exports.randomNumber = randomNumber; exports.methodStringify = methodStringify; exports.pCloudUrl = pCloudUrl; exports.generateRandomString = generateRandomString; function isEmail(email) { var re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(\s".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } function fileext(filename) { return filename.split(".").pop(); } function formatSize(sizebytes, prec) { if (prec === undefined) { prec = 1; } sizebytes = parseInt(sizebytes, 10); if (sizebytes >= 1099511627776) { return (sizebytes / 1099511627776).toFixed(prec) + " Tb"; } else if (sizebytes >= 1073741824) { return (sizebytes / 1073741824).toFixed(prec) + " Gb"; } else if (sizebytes >= 1048576) { return (sizebytes / 1048576).toFixed(prec) + " Mb"; } else if (sizebytes >= 1024) { return (sizebytes / 1024).toFixed(prec) + " Kb"; } else { return sizebytes.toFixed(prec) + " B"; } } var start = 0; function uniqueNumber() { return ++start; } function randomNumber() { var chars = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10; return Math.random() * (10 << chars); } function methodStringify(method, params) { return JSON.stringify({ method: method, params: params }); } function pCloudUrl(data) { return "http://localhost:3000/pcloud.api" + data.path; } function generateRandomString(length) { var strArr = []; var base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for (var i = 0; i < length; i++) { strArr.push(base[Math.floor(Math.random() * 100)]); } return strArr.join(""); }
javascript
<reponame>westonsteimel/advisory-database-github { "schema_version": "1.2.0", "id": "GHSA-98r6-gj55-v6cw", "modified": "2022-05-01T17:50:30Z", "published": "2022-05-01T17:50:30Z", "aliases": [ "CVE-2007-1120" ], "details": "The (1) Import.LoadFromURL and (2) Export.asText.SaveToFile functions in TeeChart Pro ActiveX control (TeeChart7.ocx) allow remote attackers to download a crafted .tee file to an arbitrary location. NOTE: the provenance of this information is unknown; the details are obtained solely from third party information.", "severity": [ ], "affected": [ ], "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-1120" }, { "type": "WEB", "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/32694" }, { "type": "WEB", "url": "http://osvdb.org/33534" }, { "type": "WEB", "url": "http://secunia.com/advisories/24263" }, { "type": "WEB", "url": "http://www.securityfocus.com/bid/22689" } ], "database_specific": { "cwe_ids": [ ], "severity": "HIGH", "github_reviewed": false } }
json
Women and girls face particular challenges as migrants, whatever their reason for leaving their country of origin. UN agencies are learning more about these difficulties, and how to address them. Women and girls face particular challenges as migrants, whatever their reason for leaving their country of origin. UN agencies are learning more about these difficulties, and how to address them. Action to reverse the depletion and degradation of the environment across Asia and the Pacific is a top priority if the region is to stay on course to meet the Sustainable Development Goals (SDGs), according to a new United Nations report launched online, for the first time, on Tuesday. The people and government of the US state of Hawaii will reach “beyond the possible” to make the Sustainable Development Goals (SDGs) a reality; The SDGs are a set of targets agreed by countries around the world to reduce poverty, protect the planet and ensure peace and prosperity for all, by 2030. Hawaii introduced its own initiative, Sustainable Hawaii, in 2016 in support of the SDGs. Confronted with widespread human, social, and economic ramifications surrounding COVID-19, the President of the United Nations Economic and Social Council (ECOSOC) stressed the priority of ensuring “the health and safety of people”. As all eyes, hearts and minds focus on the COVID-19 coronavirus pandemic, the Sustainable Development Goals (SDGs) garnered attention on Tuesday when a new UN report revealed that only ten countries in the European region have levels of air pollution below the World Health Organization (WHO) recommended limit. Farmers who gather flowers from the Espinhaço Mountain Range in Brazil received well-deserved recognition on Wednesday for their crucial role in enhancing biodiversity and preserving traditional knowledge. The number of young people around the world who are neither employed, studying or in some kind of training, is on the rise, according to a new report released on Monday by the International Labour Organization (ILO). The benefits of gender equality are not just for women and girls, but “for everyone whose lives will be changed by a fairer world”, the chief of UN Women said in her message for International Women’s Day (IWD) at UN Headquarters on Friday, being celebrated in New York, ahead of the official day. Women's Rights in Review, 25 years after Beijing takes stock of how the landmark gender equality plan, the Beijing Platform for Action, is being implemented and calls for greater parity and justice. Despite decades of progress in closing the gender equality gap, close to nine out of 10 men and women around the world, hold some sort of bias against women, according to new findings published on Thursday from the UN Development Programmme (UNDP).
english
<reponame>magic-stone/Markdown-Document-Processor<filename>src/main/java/edu/neu/ccs/cs5004/assignment10/ConcreteHeaderProcessor.java package edu.neu.ccs.cs5004.assignment10; /** * Represents a concrete header numbering interface. * Created by yanxu on 4/2/17. */ class ConcreteHeaderProcessor implements HeaderProcessor { HeaderNumbering num; public ConcreteHeaderProcessor() { num = HeaderNumbering.create(); } @Override public String process(String header) { int index = 0; while (header.charAt(index) == '#') { index++; } String numbering = num.add(header.substring(0, index)); return numbering + header.substring(index); } }
java
/* * Copyright (c) 2018, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ import { create, isUndefined, keys } from '@lwc/shared'; import { createVM, connectRootElement, disconnectRootElement, getAttrNameFromPropName, getComponentInternalDef, isAttributeLocked, LightningElement, } from '@lwc/engine-core'; import { renderer } from '../renderer'; type ComponentConstructor = typeof LightningElement; type HTMLElementConstructor = typeof HTMLElement; /** * This function builds a Web Component class from a LWC constructor so it can be * registered as a new element via customElements.define() at any given time. * * @deprecated since version 1.3.11 * * @example * ``` * import { buildCustomElementConstructor } from 'lwc'; * import Foo from 'ns/foo'; * const WC = buildCustomElementConstructor(Foo); * customElements.define('x-foo', WC); * const elm = document.createElement('x-foo'); * ``` */ export function deprecatedBuildCustomElementConstructor( Ctor: ComponentConstructor ): HTMLElementConstructor { if (process.env.NODE_ENV !== 'production') { /* eslint-disable-next-line no-console */ console.warn( 'Deprecated function called: "buildCustomElementConstructor" function is deprecated and it will be removed.' + `Use "${Ctor.name}.CustomElementConstructor" static property of the component constructor to access the corresponding custom element constructor instead.` ); } return Ctor.CustomElementConstructor; } export function buildCustomElementConstructor(Ctor: ComponentConstructor): HTMLElementConstructor { const def = getComponentInternalDef(Ctor); // generating the hash table for attributes to avoid duplicate fields and facilitate validation // and false positives in case of inheritance. const attributeToPropMap: Record<string, string> = create(null); for (const propName in def.props) { attributeToPropMap[getAttrNameFromPropName(propName)] = propName; } return class extends def.bridge { constructor() { super(); createVM(this, def, { mode: 'open', owner: null, tagName: this.tagName, renderer, }); } connectedCallback() { connectRootElement(this); } disconnectedCallback() { disconnectRootElement(this); } attributeChangedCallback(attrName: string, oldValue: string, newValue: string) { if (oldValue === newValue) { // Ignore same values. return; } const propName = attributeToPropMap[attrName]; if (isUndefined(propName)) { // Ignore unknown attributes. return; } if (!isAttributeLocked(this, attrName)) { // Ignore changes triggered by the engine itself during: // * diffing when public props are attempting to reflect to the DOM // * component via `this.setAttribute()`, should never update the prop // Both cases, the setAttribute call is always wrapped by the unlocking of the // attribute to be changed return; } // Reflect attribute change to the corresponding property when changed from outside. (this as any)[propName] = newValue; } // Specify attributes for which we want to reflect changes back to their corresponding // properties via attributeChangedCallback. static observedAttributes = keys(attributeToPropMap); }; }
typescript
/* * Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file * * 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 source import ( "fmt" "github.com/gardener/controller-manager-library/pkg/logger" "github.com/gardener/controller-manager-library/pkg/resources" "k8s.io/api/core/v1" ) //////////////////////////////////////////////////////////////////////////////// // EventFeedback //////////////////////////////////////////////////////////////////////////////// type EventFeedback struct { source resources.Object events map[string]string } func NewEventFeedback(obj resources.Object, events map[string]string) DNSFeedback { return &EventFeedback{obj, events} } func (this *EventFeedback) Ready(logger logger.LogContext, dnsname, msg string, state *DNSState) { if msg == "" { msg = fmt.Sprintf("dns entry is ready") } this.event(logger, dnsname, msg) } func (this *EventFeedback) Pending(logger logger.LogContext, dnsname, msg string, state *DNSState) { if msg == "" { msg = fmt.Sprintf("dns entry is pending") } this.event(logger, dnsname, msg) } func (this *EventFeedback) Failed(logger logger.LogContext, dnsname string, err error, state *DNSState) { if err == nil { err = fmt.Errorf("dns entry is errornous") } this.event(logger, dnsname, err.Error()) } func (this *EventFeedback) Invalid(logger logger.LogContext, dnsname string, msg error, state *DNSState) { if msg == nil { msg = fmt.Errorf("dns entry is invalid") } this.event(logger, dnsname, msg.Error()) } func (this *EventFeedback) Deleted(logger logger.LogContext, dnsname string, msg string, state *DNSState) { if msg == "" { msg = fmt.Sprintf("dns entry deleted") } this.event(logger, dnsname, msg) } func (this *EventFeedback) Succeeded(logger logger.LogContext) { } func (this *EventFeedback) event(logger logger.LogContext, dnsname, msg string) { if this.events == nil || msg != this.events[dnsname] { key := this.source.ClusterKey() this.events[dnsname] = msg if dnsname != "" { logger.Infof("event for %q(%s): %s", key, dnsname, msg) this.source.Event(v1.EventTypeNormal, "dns-annotation", fmt.Sprintf("%s: %s", dnsname, msg)) } else { logger.Infof("event for %q: %s", key, msg) this.source.Event(v1.EventTypeNormal, "dns-annotation", msg) } } }
go
<reponame>cKauan/happy-web #dashboard-orphanages { background: #ebf2f5; min-height: calc(100vh - 80px); display: grid; grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); padding: 30px 60px; justify-items: center; row-gap: 20px; } #dashboard-orphanages .orphanages { margin-top: 40px; height: 350px; width: 550px; border-radius: 20px; display: flex; background-color: white; flex-direction: column; border: 1px solid #dde3f0; } #dashboard-orphanages .orphanage-map { height: 75%; width: 100%; border-radius: 20px; } #dashboard-orphanages .orphanage-actions { background-color: white; display: flex; flex: 1; border-radius: 0 0 20px 20px; color: #4d6f80; justify-content: space-between; align-items: center; font-size: 22px; padding: 10px 30px; } #dashboard-orphanages .orphanage-actions .actions { display: flex; gap: 10px; align-items: center; } #dashboard-orphanages .orphanage-actions .actions button, #dashboard-orphanages .orphanage-actions .actions a { background-color: #ebf2f5; padding: 10px; border: 0; display: flex; align-items: center; justify-content: center; border-radius: 15px; cursor: pointer; } #dashboard-orphanages .orphanages .orphanage-map { position: relative; } #dashboard-orphanages .orphanages .orphanage-map .skeleton { max-width: 90%; margin: 5px 30px; } #dashboard-orphanages .orphanages .orphanage-map .skeleton:first-child { margin-top: 40px; } /* #dashboard-orphanages { background: #ebf2f5; min-height: calc(100vh - 80px); } #dashboard-orphanages main { padding: 60px; padding-top: 40px; max-width: 1100px; margin: 0 auto; } #dashboard-orphanages main span { display: flex; justify-content: space-between; align-items: center; padding: 0px 20px; } #dashboard-orphanages main span small { color: #16202c; } #dashboard-orphanages main span a { border: 0; display: flex; justify-content: center; align-items: center; background-color: #ffd666; padding: 15px; border-radius: 15px; cursor: pointer; } #dashboard-orphanages main ul li { list-style: none; background-color: #fff; margin-top: 20px; border-radius: 20px; padding: 20px 40px; color: #16202c; display: flex; justify-content: space-between; align-items: center; border: 1px solid #ccc; } #dashboard-orphanages main ul li img { max-height: 70px; border-radius: 10px; border: 2px solid #aaa; } #dashboard-orphanages main ul li h4 { font-size: 24px; font-weight: normal; } #dashboard-orphanages main ul li svg { cursor: pointer; } /* popup */ /* popup */ /* popup */ /* popup */ /* popup */ /* popup */ /* popup */ /* dark mode */ /* dark mode */ /* dark mode */ /* dark mode */ /* dark mode */ /* dark mode */ /* dark mode */ #dashboard-orphanages.dark { background-color: #16202c; } #dashboard-orphanages.dark main span small { color: #d5e0e6; } #dashboard-orphanages.dark main span a { background-color: #d5e0e6; } #dashboard-orphanages.dark main ul li { background-color: #192734; color: #d5e0e6; border: 2px solid #0000005f; } #dashboard-orphanages.dark .orphanages .orphanage-map .skeleton { background-color: #16202c; background-image: linear-gradient( 90deg, #0000000f, #0000003f, #0000005f ); background-size: 200px 100%; } #dashboard-orphanages.dark .orphanages { background-color: #192734; border: 1px solid #16202c; box-shadow: 1px 1px 5px #0000003f; } #dashboard-orphanages.dark .orphanage-actions { background-color: #192734; color: #dde3f0; } #dashboard-orphanages.dark .orphanage-actions .actions button, #dashboard-orphanages.dark .orphanage-actions .actions a { background-color: #16202c; } /* delete component */ /* delete component */ /* delete component */ /* delete component */ /* delete component */ /* delete component */ #dashboard-delete { width: 100vw; height: 100vh; background-color: #ff669d; } #dashboard-delete main { display: flex; justify-content: space-evenly; height: 100%; align-items: center; } #dashboard-delete main section { display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 40px; } #dashboard-delete main section button { border: 0; background: none; cursor: pointer; } #dashboard-delete main section h1 { font-size: 76px; color: #fff; } #dashboard-delete main section p { font-size: 24px; text-align: center; margin-bottom: 10px; } #dashboard-delete main section p + button { border: 0; background-color: #d6487b; padding: 20px 40px; border-radius: 20px; color: #fff; font-weight: bold; cursor: pointer; }
css
Mumbai: Actress Elnaaz Norouzi says with so many web series and films being made, it is very important to be sure of picking the right projects. “I have always been picky. That’s always how I’ve worked. Right now, everything is on halt and when things settle down a bit there will be too many scripts and stories for everyone to tell. So, you have to be picky as there is a lot of content out there. Now, there are a lot more films and web series happening and, therefore, more than ever you’ve to be picky now,” she told IANS. Talking about the kind of role she wants to play, the actress says: “I really always wanted to do an action film. I really want to do a strong boss lady sort of a character. Also, I always wanted to be a part of a thriller. The role I’m already playing in ‘Sangeen’ is something of that type. I would want to do an action film next,” she says.
english
Two transactions over the past 20 days put mid-sized Indian information technology services companies under the limelight. On March 18, engineering giant Larsen & Toubro Ltd launched a hostile bid to take over Mindtree Ltd for as much as $1.56 billion. And on Sunday, buyout firm Baring Private Equity Asian unveiled its plan to buy a majority stake in NIIT Technologies Ltd for $709 million. In some ways, the two transactions couldn’t be more different. Mindtree’s founders have strongly opposed L&T’s bid saying it would destroy their company’s culture while the parent of NIIT Technologies welcomed Baring’s involvement and believes it will help take the company to the next level of growth. The different reactions aside, the twin deals undoubtedly reflect continued interest from PE firms as well as strategic buyers in mid-tier IT companies in India where market conditions have been evolving over the last five years reducing the relative disadvantage in growth. According to a report from Kotak Institutional Securities, the interest in IT companies could be many—the easy entry of digital services, attracting the right kind of managerial talent and PE firms seeing these IT companies as high, free-cash generating machines with steady growth prospects in the near term. “The slowdown in the growth rate of tier-1 IT companies has constrained career growth and ESOP-led wealth creation for managerial talent. Many senior management professionals from tier-1 IT organisations are happy to move to mid-tier firms for a better profile, higher compensation (especially ESOPs) and a greater say in the business,” Kawaljeet Saluja and Sathishkumar S, analysts from Kotak Institutional Securities, explained as part of the report. This, the analysts believe, gives mid-tier companies an edge as senior professionals from such large organisations not only bring in clients but also best practices. L&T Infotech, Mphasis and Hexaware are beneficiaries of such talent acquisition, they said. Shrinking deal sizes and improved ability to participate in large transactions are other reasons PE players are attracted to IT firms. “Mid-tier companies have augmented delivery capabilities over time. In addition, they have stepped up engagement with external consultants, sourcing advisories and industry analysts to sharpen their request for proposal skills for large deal leads and for right positioning,” Saluja and Sathishkumar explained. They added that since average deal sizes are shrinking, multi-year mega deals (over $500 million) are fewer, thus bringing to the fore smaller cheques—for example, $50 million—and tenure-based deals, which fall in the sweet spot for most mid-tier firms. Interestingly, the analysts also believe that digital transformation has altered the sourcing mindset of organisations (clients and customers). “Clients are willing to experiment and engage with new vendors. They look for vendors with next-generation capabilities and the nimbleness to work with ecosystem partners. A few mid-tier companies have successfully competed against large players in their focus segments,” the analysts said. They added that smaller projects should mostly augur well for mid-tier IT firms, and if they successfully implement such projects or pilots, they may become beneficiaries to large customer accounts. In fact, the analysts said that mid-tier companies have outperformed their larger peers in the last couple of years on revenue growth and are likely to do so again in the financial year 2020. India’s IT industry, dominated at the top by TCS, Infosys, Wipro and HCL, has attracted investments from mid-tier PE firms over the past few years. According to data from research platform VCCEdge, the Indian IT/ITes and BPO industry has seen a total of 138 PE deals in the last 20 years with a deal median value of $16.50 million. While 2009 saw the maximum number of deals being processed, 2018 saw the highest deal activity in terms of value. In 2018, Swiss PE firm Partners Group acquired 48% stake in GlobalLogic from Apax Partners for $960 million. In 2016, US-based PE firm Blackstone bought a majority stake in Mphasis from HP for $1 billion. Earlier in 2015, Baring Asia had bought CMS Info Systems Ltd from Blackstone and CMS Computers Ltd for $300 million. In the same year, Blackstone India had acquired business process outsourcing firm Intelenet for $385 million from UK-based Serco Group. The PE firm had sold Intelenet to Serco in 2007. French company Teleperformance bought Intelenet from Blackstone for an enterprise value of $1 billion in June last year. In 2014, Bain Capital had picked up a 25.5% stake in business process management and technology services company Genpact for $850 million. Baring’s buyout of NIIT marks the first transaction in recent times that was carried out with a forward multiple of more than 15X for an Indian-listed IT services company by a PE player, Saluja and Satishkumar said. While Hexaware was acquired at a 10X multiple, Mphasis was offered 13X on forward earnings. Also, according to the analysts, most PE players follow a template when looking to invest in IT firms but NIIT Technologies seems to be an aberration. “The template that seemed to emerge from the two deals viz. Hexaware and Mphasis was to acquire companies at inexpensive valuations. The PE players improved capital allocation (increased payout ratio), put in place a good management team with aligned incentive structures and offered access to portfolio companies for business (more in the case of Blackstone),” they said. However, NIIT Technologies seems to be reasonably well run with an accelerating growth rate and improving margins, they explained. Speculation has emerged that Baring may merge NIIT Technologies with Hexaware. While Hexaware’s management has shown no interest in a merger, a report from investment firm Motilal Oswal claims that the merger will see the formation of a $1.2-billion IT services company with over 40% of revenue being generated from BFSI and approximately 17% of revenue coming from the transportation sector.
english
<gh_stars>10-100 {"title": "Robust Text Classification in the Presence of Confounding Bias.", "fields": ["confounding", "causal inference", "covariate", "test data", "class variable"], "abstract": "As text classifiers become increasingly used in real-time applications, it is critical to consider not only their accuracy but also their robustness to changes in the data distribution. In this paper, we consider the case where there is a confounding variable Z that influences both the text features X and the class variable Y . For example, a classifier trained to predict the health status of a user based on their online communications may be confounded by socioeconomic variables. When the influence of Z changes from training to testing data, we find that classifier accuracy can degrade rapidly. Our approach, based on Pearl's back-door adjustment, estimates the underlying effect of a text variable on the class variable while controlling for the confounding variable. Although our goal is prediction, not causal inference, we find that such adjustments are essential to building text classifiers that are robust to confounding variables. On three diverse text classifications tasks, we find that covariate adjustment results in higher accuracy than competing baselines over a range of confounding relationships (e.g., in one setting, accuracy improves from 60% to 81%).", "citation": "Citations (5)", "departments": ["Illinois Institute of Technology", "Illinois Institute of Technology"], "authors": ["<NAME>.....http://dblp.org/pers/hd/r/Reis:Virgile_Landeiro_Dos", "Aron Culotta.....http://dblp.org/pers/hd/c/Culotta:Aron"], "conf": "aaai", "year": "2016", "pages": 8}
json
<gh_stars>1-10 package com.example.bonvoyage; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.gms.tasks.Task; import com.google.firebase.FirebaseException; import com.google.firebase.auth.AuthCredential; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.auth.PhoneAuthCredential; import com.google.firebase.auth.PhoneAuthProvider; import com.google.firebase.firestore.DocumentReference; import com.google.firebase.firestore.DocumentSnapshot; import com.google.firebase.firestore.FirebaseFirestore; import com.hbb20.CountryCodePicker; import java.util.concurrent.TimeUnit; /** * SignInPhoneActivity implements phone number authentication sign in. * Source code used: https://firebase.google.com/docs/auth/android/phone-auth. * https://www.youtube.com/watch?v=KVnJCOBsWGQ. */ public class SignInPhoneActivity extends AppCompatActivity { private final String TAG = "SignInPhoneActivity"; //Instance variables private CountryCodePicker ccp; private EditText phoneText; private EditText codeText; private Button continueNextBtn; private String checker = ""; private String phoneNumber = ""; private RelativeLayout relativeLayout; private PhoneAuthProvider.OnVerificationStateChangedCallbacks mCallbacks; private FirebaseAuth mAuth; private String mVerificationId; private PhoneAuthProvider.ForceResendingToken mResendToken; private ProgressDialog loadingBar; private FirebaseFirestore db; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sign_in_phone); mAuth = FirebaseAuth.getInstance(); mAuth.setLanguageCode("it"); loadingBar = new ProgressDialog(SignInPhoneActivity.this); db = FirebaseFirestore.getInstance(); phoneText = findViewById(R.id.phoneText); codeText = findViewById(R.id.codeText); continueNextBtn = findViewById(R.id.continueNextButton); relativeLayout = findViewById(R.id.phoneAuth); ccp = (CountryCodePicker) findViewById(R.id.ccp); ccp.registerCarrierNumberEditText(phoneText); continueNextBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (continueNextBtn.getText().equals("Submit") || checker.equals("Code Sent")){ String verifcationCode = codeText.getText().toString(); if (verifcationCode.equals("")){ toastMessage("Please write verification code."); }else { loadingBar.setTitle("SMS Code Verification"); loadingBar.setMessage("Please wait, while we verify your SMS Code."); loadingBar.setCanceledOnTouchOutside(false); loadingBar.show(); PhoneAuthCredential credential = PhoneAuthProvider.getCredential(mVerificationId, verifcationCode); signInWithPhoneAuthCredential(credential); } }else { phoneNumber = ccp.getFullNumberWithPlus(); if (!phoneNumber.equals("")){ loadingBar.setTitle("Phone Number Verification"); loadingBar.setMessage("Please wait, while we verify your phone number."); loadingBar.setCanceledOnTouchOutside(false); loadingBar.show(); PhoneAuthProvider.getInstance().verifyPhoneNumber(phoneNumber, 60, TimeUnit.SECONDS, SignInPhoneActivity.this,mCallbacks); //send SMS code }else { toastMessage("Invalid Phone Number, Please Try Again!"); } } } }); mCallbacks = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() { /** * onVerificationCompleted checks if the SMS code entered is correct. * @param phoneAuthCredential */ @Override public void onVerificationCompleted(@NonNull PhoneAuthCredential phoneAuthCredential) { signInWithPhoneAuthCredential(phoneAuthCredential); } /** * onVerifcationFailed is called when an invalid phone number is entered. * @param e */ @Override public void onVerificationFailed(@NonNull FirebaseException e) { toastMessage("Invalid Phone Number"); loadingBar.dismiss(); relativeLayout.setVisibility(View.VISIBLE); continueNextBtn.setText("Continue"); codeText.setVisibility(View.GONE); } /** * onCodeSent is called when the SMS code is sent to the user. * @param s * @param forceResendingToken */ @Override public void onCodeSent(@NonNull String s, @NonNull PhoneAuthProvider.ForceResendingToken forceResendingToken) { super.onCodeSent(s, forceResendingToken); mVerificationId = s; mResendToken = forceResendingToken; relativeLayout.setVisibility(View.GONE); checker = "Code Sent"; continueNextBtn.setText("Submit"); codeText.setVisibility(View.VISIBLE); loadingBar.dismiss(); toastMessage("SMS Code Sent!"); } }; } /** * signInWithPhoneAuthCredential verifies the SMS code entered is correct, * and sucessfully signs the user in. * @param credential */ private void signInWithPhoneAuthCredential(PhoneAuthCredential credential) { mAuth.signInWithCredential(credential) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { // Sign in success, update UI with the signed-in user's information //Log.d(TAG, "signInWithCredential:success"); //FirebaseUser user = task.getResult().getUser(); loadingBar.dismiss(); //toastMessage("Login Successful"); sendUserToMainActivity(); } else { // Sign in failed, display a message and update the UI Log.w(TAG, "signInWithCredential:failure", task.getException()); if (task.getException() instanceof FirebaseAuthInvalidCredentialsException) { // The verification code entered was invalid toastMessage("Verification code entered was invalid"); }else { toastMessage("Error: " + task.getException().toString()); } } } }); } private void sendUserToMainActivity(){ toastMessage("Error in Login"); } /** * toastMessage generates a toast message. * @param message */ public void toastMessage(String message){ Toast.makeText(this,message,Toast.LENGTH_SHORT).show(); } }
java
<filename>items/3347.json {"limit":100,"name":"Blamish red shell (round)","value":150,"highalch":90,"id":3347,"lowalch":60,"name_pt":"Concha avermelhada (redonda)","price":1423,"last":1423}
json
<gh_stars>1-10 {"special_features": ["code", "description", "#container_id"], "containers": ["id", "dimensions", "manufacturer", "unique_key", "#container_size_code", "#container_type_code"], "containers_sizes": ["code", "description"], "containers_types": ["code", "name"]}
json
The Air Force is sick of packing the military's crap. So it's starting to contract it out -- to robots. The Air Force is responsible for lugging around the rest of the military's gear. Pallets are the workhorses that crews use to get the job done. They're flat planks that support cargo and allow it to be tied down, pushed along and generally moved around onto transport vehicles like the C-130. Moving, stacking, and coordinating all those pallets takes a more than a few foot-tons of back-breaking work. So, a while back, the Air Force proposed building an "intelligent robopallet" that would do let the cargo load itself. The air service recently awarded contracts to two companies -- HStar Technologies and Stratom -- to start making it happen. Hstar's attempt at a self-packing luggage system, dubbed "i-Pbot" in Apple-style, would use omnidirectional wheels and hydraulic actuators to allow the pallets to move themselves around wherever they're needed. The system would also feature a wireless sensor network to allow it to communicate with other pallets, to ensure efficient movement. Stratom's roboloader is based on the standard 463L pallet and will use an automated, guided vehicle to lug around up to five tons. It'll also have a wireless network that allows it to phone home to a central command location and coordinate with its fellow roboloaders. Pallets aren't the only part of the military cargo and transport worlds getting mechanized as the Pentagon tries to save manpower -- and trips to the chiropractor -- in its logistical tail. Cargo-carrying drones are already a reality. In the air, there’s the K-MAX helicopter drone which can carry three tons. On the ground, there’s BigDog, the robotic pack mule able to haul up to 300 pounds. The Air Force and Marine Corps already are working getting their own airborne cargo drones, and the Navy wants to build software that would allow the cargo-bots to ferry the wounded by voice command, without the aid of pilots. The Israelis have been working on a robotic ambulance for years. The military has also bankrolled the development of superstrength exoskeletons that can haul giant loads. Think Sigourney Weaver in Aliens. HULC, or the Human Universal Load Carrier, is Lockheed's offering in the supersuit category. It allows troops to carry up to 200-pound loads on a march and run up to 7 mph. XOS 2, built by Sarcos and Raytheon and often compared to the Iron Man suit, allows users to bear enormous burdens, too, saving all kinds of back-breaking labor. Of course, if the pallets loaded themselves, then the superhero suits would be freed up for more heroic duty. See Also:
english
Aljamain Sterling is grateful to the referee for saving him from himself after he was illegally kneed by Petr Yan at UFC 259. Sterling claims that he did not quit and is grateful to the referee for not allowing him to continue. 'The Funkmaster' also believes referees should be more severe in punishing illegal strikes. In a recent appearance on The MMA Hour, Sterling told Ariel Helwani ahead of his UFC 273 rematch against Yan: Watch Sterling's interview with Helwani below: Aljamain Sterling challenged Petr Yan for the bantamweight title at UFC 259 in March last year. Yan was leading on two of the judges' scorecards when he landed a devastating illegal knee on his downed opponent in round four. Referee Mark Smith called the contest at 04:29 of the round, deeming Sterling unable to continue after consultation with the ringside doctor. 'The Funkmaster' earned a DQ win over the Russian and became the first in UFC history to be crowned champ via disqualification. Aljamain Sterling and Petr Yan were previously scheduled to meet at UFC 267 last year. However, 'The Funkmaster' pulled out to undergo neck surgery. He was replaced by Cory Sandhagen, who 'No Mercy' dominated in the interim title bid. Sterling and Yan will now clash in a title unification bout that will serve as the co-headliner at UFC 273. Sterling is not only confident about winning the bout but is looking to dominate Yan in their upcoming encounter. Responding to a critic, the 32-year old wrote on Twitter: “It’s fascinating how terrified humans are to try to excel in life. Your fears are NOT mine. Your thoughts and shit opinions, also are NOT mine. I will win and I will dominate. Half you thumb pushers will never relate to confidence in the work you put in. Enjoy the show." Check out the tweet below:
english
<filename>src/main/java/uk/ac/ebi/subs/data/objects/Submitter.java<gh_stars>0 package uk.ac.ebi.subs.data.objects; import lombok.Getter; import lombok.Setter; import lombok.ToString; @Getter @Setter @ToString public class Submitter { private String email; }
java
import { createLocalVue, mount } from '@vue/test-utils' import SearchColumnFilterComponent from '@/components/common/SearchColumnFilterComponent.vue' import Vuetify from 'vuetify' import Vuex from 'vuex' import { headerSearch } from '../../test-data/mock-search-headers' describe('SearchColumnFilterComponent.vue', () => { const localVue = createLocalVue() localVue.use(Vuex) const vuetify = new Vuetify({}) const value = headerSearch it('renders component', () => { const wrapper: any = mount(SearchColumnFilterComponent, { vuetify, localVue, propsData: { value: value } }) expect(wrapper.find('[data-test="menu-search-column-filter"]').exists()).toBeTruthy() expect(wrapper.vm.selectedHeaderSearchList).toBe(value) }) })
typescript
Kajal Aggarwal is as of now enjoying her parenthood process with child Neil Kitchlu. The actor has been treating fans with astonishing pics since she declared pregnancy. In spite of the fact that she hasn’t uncovered her child kid’s face, Kajal frequently shares his pics. Presently, Kajal Aggarwal’s sister Nisha shared a cute pic of Neil on her Instagram handle. Nisha shared a pic of embracing Neil and called it Sukoon. Sharing, the pic, Nisha stated, “#Sukoon @kajalaggarwalofficial just send my bundle quickly to me. ” Kajal Aggarwal reposted the pic on her Instagram story and responded with kiss emoticons. On the event of Mother’s Day, Kajal had posted a cute image of her baby boy. In the photograph, Kajal was resting on the bed, and her child was on top of her, resting on her chest. along with it, Kajal had discussed the moment she had embraced her child, and how her life had changed after it. A couple of days prior, Kajal likewise shared a lovable pic of her significant other Gautam, and son Neil, which was really charming. Gautam is seen performing ‘papa duties’ and we cannot get enough of the photo. In the meantime, on the work front, Kajal Aggarwal was the main female lead in Chiranjeevi’s Acharya, which performed poorly in the cinematic world however later it was uncovered that her scenes, which she shot before pregnancy were edited from the film. Kajal and her husband Gautam Kitchlu were blessed with their first child on April 19.
english
Arrested just before 1 a. m. on Nov. 6 hours before the rest of Sri Lanka's team flew out, Gunathilaka has been charged with four counts of sexual intercourse without consent after allegedly assaulting a 29-year-old woman in Sydney's eastern suburbs. Sri Lankan batter Danushka Gunathilaka has been suspended from all forms of cricket after the international cricketer was arrested and charged with sexual assault of a woman in Australia during the 2022 edition of the T20 World Cup on Sunday. The Sri Lanka cricketer has been reportedly taken into custody by the Sydney police amid the 2022 edition of the ICC World T20 on Sunday. SL vs AFG: Danushka Gunathilaka and Rashid Khan got into a heated fight during Sri Lanka's Super 4 win vs Afghanistan in Sharjah on Saturday. Gunathilaka played his last Test game in 2018 with his eight appearances bringing him 299 runs.
english
Shillong: The Hynniwtrep National Youth Front (HNYF) has expressed grave concern over the unabated movement of cattle heads towards the Indo-Bangladesh border. These cattle heads are usually meant for smuggling through the porous unfenced area of the international boundary. Claiming of having intercepted many trucks laden with cattle, the HNYF leaders told newsmen on Wednesday that they had to take matters into their hands and seize the trucks as these do not have any official challan. HNYF general secretary F Khrmujai said, “How can these cattle heads without the official tag of the Department of Veterinary and Animal Husbandry travel such a long distance. There is a serious lapse in the entire monitoring process. ” Note mentioning that movement of cattle in the hinterland is no crime till they reached the international borders. The BSF has been doing it own job by seizing the bovines meant to be smuggled. Moreover, the HNYF leaders felt that the transportation of cattle originating from Morigaon in Assam towards the Meghalaya stretch of the international border has also cost the beef eating of the State dearly. “The bovines that should end up in the State for domestic consumption are being smuggled to Bangladesh and it is for this that the price of beef shoots up” stated the HNYF leader.
english
After being benched for six matches, Shaw returned to form with a brilliant half-century against the Punjab Kings, giving a befitting reply to his critics. He notched up his 13th IPL fifty while playing at the HPCA Stadium in Dharamshala on Wednesday, 17 May. Shaw scored his fifty in just 36 balls, helping Delhi Capitals get off to a flying start against Shikhar Dhawan’s side. Shaw’s performance was especially remarkable considering his lackluster start to the season. He had only scored 47 runs in six IPL matches prior to his comeback. But he was able to turn things around and show off his trademark timing on the day, taking on Arshdeep Singh early in the innings. It wasn’t an easy match for either team, with the ball bouncing a little extra on the lively Dharamshala track in the first few overs. Both Shaw and his teammate David Warner had to face off against Kagiso Rabada in his first over, where the pacer showed some brilliant wicket-to-wicket bowling. But Shaw was able to break out of his shackles when Warner started attacking from the other end, taking on the Punjab Kings pacers with some exquisite timing. Shaw departed after scoring 54 runs, trying to hook Sam Curran. Unfortunately, he wasn’t able to get enough distance and placed a catch in the hands of Atharva Taide, who was standing at the edge of the ground at deep fine-leg. Despite his early exit, Shaw’s half-century helped Delhi Capitals secure a much-needed victory.
english
This Friday, movie enthusiasts have three movies belonging to different genres to choose from. Science fiction action-thriller 'Elysium' will clash with the hilarious 'Gambit' and the crime thriller 'Prisoners'. The film was premiered at the 2013 Telluride Film Festival. The film 'Elysium' happens on ravaged Earth and a plush space habitat called Elysium. Directed by Neill Blomkamp, 'Elysium' features Matt Damon, Jodie Foster, Sharlto Copley in pivotal roles. 'Elysium' puts forth both political and sociological themes like overpopulation, immigration, health care and class exploitation. 'Gambit', which has been directed by Michael Hoffman, features Colin Firth, Cameron Diaz, Alan Rickman and Stanley Tucci in pivotal roles. 'Gambit' revolves around British art curator Harry Deane who plans to avenge his obnoxious boss Lord Shabandar by tricking him into purchasing a fake Monet ('Haystacks at Dusk'). 'Gambit' is a remake of the 1966 film of the same name. The original film had starred Shirley MacLaine and Michael Caine. 'Prisoners' is a 2013 American thriller drama film directed by Denis Villeneuve. The film stars Hugh Jackman, Jake Gyllenhaal, Viola Davis, Terrence Howard, and Paul Dano.
english
<gh_stars>10-100 import * as React from 'react'; declare namespace User { interface UserProps extends React.HTMLProps<User> { alt?: string ellipsis?: boolean description?: React.ReactNode extendedDescription?: React.ReactNode missingImage?: 'avatar' | 'letter' image?: string showName?: boolean } } declare class User extends React.Component<User.UserProps>{ } export = User
typescript
{ "Timestamp":1631622914, "UpdatedTime":"2021-09-14T12:35:14.580230Z", "ClusterName":"Default", "HostName":"kubearmor-dev", "NamespaceName":"multiubuntu", "PodName":"ubuntu-1-deployment-5d6b975744-rrkhh", "ContainerID":"67f0a1cdf83f9899ce2d4d77e9e81b220b49b2a2c29e7007dedac6b611b01c5f", "ContainerName":"ubuntu-1-container", "HostPID":32322, "PPID":29888, "PID":100, "PolicyName":"ksp-group-1-proc-path-block", "Severity":"5", "Message":"block the sleep command", "Type":"MatchedPolicy", "Source":"bash", "Operation":"Process", "Resource":"/bin/sleep 1", "Data":"syscall=SYS_EXECVE", "Action":"Block", "Result":"Permission denied" }
json
<reponame>YvetteGwen/ConfigCrusher {"configuration":["NUMBERICSORT","REVERSE"],"regionsToProcessedPerformance":{"cf0973a4-2ff7-4a05-9c80-db66fb4f5943":4833224912,"program":935800}}
json
<gh_stars>10-100 package org.spincast.plugins.gson.serializers; import java.lang.reflect.Type; import java.util.Map.Entry; import org.spincast.core.json.JsonObject; import org.spincast.core.json.JsonObjectFactory; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonParseException; import com.google.inject.Inject; public class JsonObjectDeserializer implements JsonDeserializer<JsonObject> { private final JsonObjectFactory jsonObjectFactory; @Inject public JsonObjectDeserializer(JsonObjectFactory jsonObjectFactory) { this.jsonObjectFactory = jsonObjectFactory; } protected JsonObjectFactory getJsonObjectFactory() { return this.jsonObjectFactory; } @Override public JsonObject deserialize(JsonElement jsonElement, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { com.google.gson.JsonObject gsonObj = jsonElement.getAsJsonObject(); if (gsonObj == null) { return null; } JsonObject jsonObject = getJsonObjectFactory().create(); for (Entry<String, JsonElement> entry : gsonObj.entrySet()) { String key = entry.getKey(); JsonElement gsonSubObj = entry.getValue(); jsonObject.set(key, gsonSubObj); } return jsonObject; } }
java
<gh_stars>0 import sys with open(sys.argv[1], 'r') as f: for line in f.readlines(): if line: line = line.strip() # find the last space and trim last_space = line[::-1].find(' ') line = line[:-last_space-1] # find the next last space and trim # if needed. last_space = line[::-1].find(' ') if last_space == -1: print line else: print line[-last_space:]
python
const file = jsUtils.file; const hex = require('./scripts/hex.js'); //const readfile = require('./scripts/read_file.js'); const viewStatus = require('./scripts/view_status.js'); //const atomTable = require('./scripts/mp4/atom_table.js'); let mp4data; let fileData; let selected_atom = {type: '', payload: '', parentInfo: {}}; function openFileDialog() { const dialog = require('electron').remote.dialog; const filenames = dialog.showOpenDialog(null, { properties: ['openFile'], title: 'select a data file', defaultPath: '.', filters: [ {name: 'movie file', extensions: ['mp4', 'm4a', 'm4v', 'mov', 'avi', 'wav']} ]}); if (filenames && filenames.length > 0) { document.getElementById('data_path').value = filenames[0]; fileLoader.load(filenames[0], output); } } function makeAtomListId(index_array) { return 'atom_item' + index_array.toString().replace(/,/g, '-'); } function activeListItem(index_array) { const list_items = document.getElementsByClassName('atom_list'); for (var i=0; i<list_items.length; i++) { list_items[i].style.backgroundColor = ''; } document.getElementById(makeAtomListId(index_array)).style = "background: hsl(0, 0%, 96%);"; } function outputChild(data) { var tag = ""; tag += '<ul>'; for (var i=0; i<data.length; i++) { tag += '<li id="' + makeAtomListId(data[i].index) + '" class="atom_list">'; tag += '<a href="javascript:showPayload([' + data[i].index.toString() + '])">' + data[i].type + '</a>'; tag += ' (' + data[i].payload.length + ')</li>'; if (data[i].children.length !== 0) { tag += outputChild(data[i].children); } } tag += '</ul>'; return tag; } function output(atoms, binary) { mp4data = atoms; fileData = binary; var str = '<div class="content">' + outputChild(atoms) + '</div>'; // var str = "Atom size: " + data.atom_size + '<br>\n' // + "Type: " + data.type + '<br>\n' // + "Version: " + data.version + '<br>\n' // viewStatus.setStatus(data.status); // viewStatus.setSize(data.size); viewStatus.setStructure(str); } function switchPayloadViewMode(selected) { document.getElementById('payload_view_preview').classList.remove('is-active'); document.getElementById('payload_view_hex').classList.remove('is-active'); document.getElementById(selected).classList.add('is-active'); viewStatus.setPayload(makePayloadElem(selected_atom)); } function previewAtom(atom) { const tb = atomTable.atom[atom.type]; if (!tb) { return 'unknown atom type'; } return tb.parser ? tb.display(tb.parser(atom.payload, atom.parentInfo)) : 'unable to preview'; } function makeDisplay(atom) { if (document.getElementById('payload_view_preview').classList.contains('is-active')) { return previewAtom(atom); } else if (document.getElementById('payload_view_hex').classList.contains('is-active')) { return hex.outputHex(atom.payload); } else { return 'missing preview mode'; } } function makePayloadElem(atom) { const type = atom.type; const broken_notice = atom.maybe_broken ? makeBrokenNotice() : ''; return { title: type, description: atomTable.atom[type] ? atomTable.atom[type].description : '', preview: broken_notice + makeDisplay(atom) }; } function makeBrokenNotice() { return "<p class='notification is-danger'><i class='fas fa-exclamation-triangle'></i> selected atom may be damaged</p>"; } function showPayload(index) { var get_atom = mp4data[index[0]]; for (var i=1; i<index.length; i++) { get_atom = get_atom.children[index[i]]; } selected_atom = get_atom; activeListItem(index); viewStatus.setPayload(makePayloadElem(get_atom)); } function downloadAtom() { const path = require('path'); const filename = path.basename(fileLoader.getFileName()) + "." + selected_atom.type + ".bin"; file.saveBlob(selected_atom.payload, filename); } function downloadPirtial(offset, size) { const path = require('path'); const filename = path.basename(fileLoader.getFileName()) + "_" + offset + '-' + (offset + size) + ".bin"; file.saveBlob(fileData.slice(offset, offset + size), filename); }
javascript
Tennis great Serena Williams expects Lewis Hamilton to overtake Michael Schumacher as Formula One’s most successful driver of all time as both she and the Briton chase their own sporting records. Williams has her sights on a record-equalling 24th Grand Slam title at the French Open while six-times world champion Hamilton has his first chance to match Schumacher’s record 91 wins at this weekend’s Russian Grand Prix. “He is for me the greatest driver that our generation has seen. I’m confident that he will break the record of Michael Schumacher, who was also a fabulous driver,” Williams told reporters on Saturday. The pair are long-standing friends and mutual supporters, and both Serena and her sister Venus have attended grands prix in the past. As far back as 2016 Hamilton spoke of how he was “mesmerised” by Serena’s achievements as an athlete and inspired by her as a human being. Both grew up with little money and no family background in their sports but with determined fathers pushing them on. “Lewis and I are super close. I’ve known him for years. I love that guy. He’s a really good friend of mine. The guy is such a champion, has such a champion’s mindset,” said Williams on the eve of the Roland Garros tournament. “I look at what he does training, physically, his job, it’s really no words for it, to be honest. “Lewis is so intense. If you know anything, even if you’re a fan, you know he lives his life on his sleeve. He’s very emotional. He says what he says,” continued the American. “That’s just who he is. He doesn’t care who you are. “That’s one thing I’ve grown to really appreciate about him, as well. ”(This story has not been edited by News18 staff and is published from a syndicated news agency feed - Reuters)
english
var implicitReferenced = "Implicit Referenced";
typescript
package com.herokuapp.erpmesbackend.erpmesbackend.exceptions; public class EntitiesConflictException extends RuntimeException { public EntitiesConflictException() { super(); } public EntitiesConflictException(String msg) { super(msg); } }
java
Rabri Devi on Saturday claimed that Nitish Kumar offered to make her son Tejashwi Yadav Bihar's Chief Minister in 2020 Assembly elections on a condition that Mr Kumar be made Mahagathbandhan's prime ministerial candidate in the ongoing General elections. The former Chief Minister said, "Nitish is not being valued by NDA, Prime Minister (Narendra) Modi and BJP. He is under BJP's pressure which is why he is coming back to us. Prashant Kishor came at least five times. Nitish Kumar had said that he wants to see Tejashwi as Chief Minister in 2020 if we (Mahagathbandhan) declare him the prime ministerial candidate". Mr Kishor, who hails from Bihar, worked with Nitish Kumar during the Bihar assembly election in 2015. He formally joined the Janata Dal (United) in 2018 and has been credited with devising successful political campaigns for Nitish Kumar. Speaking about the grand alliance (Mahagathbandhan) forged to defeat the BJP in Lok Sabha elections, Rabri Devi said: "Lalu ji is not here that is why I am saying 400 seats will come to Mahagathbandhan. Why Lalu ji is in jail? Why is he in jail? They did not find anything in Manju Verma case. He had no involvement in the fodder scam. He gave voice to poor people but despite being thankful to him, people blamed him for the scam. " Tejaswi Yadav, meanwhile, said that Nitish Kumar should clarify whether he had asked Mr Kishor to visit them. He said: "Lalu's book ''Gopalganj to Raisina'' has revealed the truth. Mr Kishor is not active but he keeps coming on Twitter. Has he taken permission from Nitish ji? He should take his permission first. " On Nitish Kumar's ''willingness'' to join Mahagathbandhan, Tejaswi Yadav added, "This is the truth and no one can deny it. Nitish ji should come forward and tell what had happened that made him make many attempts to rejoin the grand alliance within six months of reuniting with the National Democratic Alliance in 2017. " Speaking on Rabri Devi's claim that Mr Kishor had met them five times, Tejaswi Yadav said, "We have said it earlier also that Kishor had met us, Lalu ji and several Congress leaders. " Earlier, former JD(U) leader Sharad Yadav, who is contesting Lok Sabha polls from Madhepura on RJD ticket also confirmed that Nitish Kumar had tried to patch up with the grand alliance. The Lok Sabha polls for 40 parliamentary seats in Bihar began on April 11 and it is staggered in all seven phases till May 19. The results will be declared on May 23.
english
import { Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import { StudyState } from '@core/store/project/project.interfaces'; import { Store } from '@ngrx/store'; import { State } from '@core/store'; import { getCurrentStudyState } from '@core/store/project/project.selectors'; @Component({ selector: 'app-optimizations', templateUrl: './optimizations.component.html', styleUrls: ['./optimizations.component.scss'], }) export class OptimizationsComponent implements OnInit { study$: Observable<StudyState>; constructor(private store: Store<State>) {} ngOnInit(): void { this.study$ = this.store.select(getCurrentStudyState); } }
typescript
{"template":{"small":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/1.0","medium":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/2.0","large":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/3.0"},"channels":{"crimsonnn":{"title":"Crimsonnn","channel_id":15025961,"link":"http://twitch.tv/crimsonnn","desc":null,"plans":{"$4.99":"8342","$9.99":"24706","$24.99":"24707"},"id":"crimsonnn","first_seen":null,"badge":"https://static-cdn.jtvnw.net/badges/v1/41060eb1-3732-41ac-8318-7005cf6dcc08/1","badge_starting":"https://static-cdn.jtvnw.net/badges/v1/41060eb1-3732-41ac-8318-7005cf6dcc08/3","badge_3m":"https://static-cdn.jtvnw.net/badges/v1/1c835083-f516-4e25-941f-e0bb6d07825f/3","badge_6m":"https://static-cdn.jtvnw.net/badges/v1/9a862091-ea89-45cc-b4be-a6905fdae756/3","badge_12m":"https://static-cdn.jtvnw.net/badges/v1/2091fd0a-b7e7-4b9b-8da4-ef9e13aeff28/3","badge_24m":"https://static-cdn.jtvnw.net/badges/v1/92982fa1-c05a-4334-9af6-41355daec107/3","badges":{"0":{"image_url_1x":"https://static-cdn.jtvnw.net/badges/v1/41060eb1-3732-41ac-8318-7005cf6dcc08/1","image_url_2x":"https://static-cdn.jtvnw.net/badges/v1/41060eb1-3732-41ac-8318-7005cf6dcc08/2","image_url_4x":"https://static-cdn.jtvnw.net/badges/v1/41060eb1-3732-41ac-8318-7005cf6dcc08/3","description":"Subscriber","title":"Subscriber","click_action":"subscribe_to_channel","click_url":""},"3":{"image_url_1x":"https://static-cdn.jtvnw.net/badges/v1/1c835083-f516-4e25-941f-e0bb6d07825f/1","image_url_2x":"https://static-cdn.jtvnw.net/badges/v1/1c835083-f516-4e25-941f-e0bb6d07825f/2","image_url_4x":"https://static-cdn.jtvnw.net/badges/v1/1c835083-f516-4e25-941f-e0bb6d07825f/3","description":"3-Month Subscriber","title":"3-Month Subscriber","click_action":"subscribe_to_channel","click_url":""},"6":{"image_url_1x":"https://static-cdn.jtvnw.net/badges/v1/9a862091-ea89-45cc-b4be-a6905fdae756/1","image_url_2x":"https://static-cdn.jtvnw.net/badges/v1/9a862091-ea89-45cc-b4be-a6905fdae756/2","image_url_4x":"https://static-cdn.jtvnw.net/badges/v1/9a862091-ea89-45cc-b4be-a6905fdae756/3","description":"6-Month Subscriber","title":"6-Month Subscriber","click_action":"subscribe_to_channel","click_url":""},"12":{"image_url_1x":"https://static-cdn.jtvnw.net/badges/v1/2091fd0a-b7e7-4b9b-8da4-ef9e13aeff28/1","image_url_2x":"https://static-cdn.jtvnw.net/badges/v1/2091fd0a-b7e7-4b9b-8da4-ef9e13aeff28/2","image_url_4x":"https://static-cdn.jtvnw.net/badges/v1/2091fd0a-b7e7-4b9b-8da4-ef9e13aeff28/3","description":"1-Year Subscriber","title":"1-Year Subscriber","click_action":"subscribe_to_channel","click_url":""},"24":{"image_url_1x":"https://static-cdn.jtvnw.net/badges/v1/92982fa1-c05a-4334-9af6-41355daec107/1","image_url_2x":"https://static-cdn.jtvnw.net/badges/v1/92982fa1-c05a-4334-9af6-41355daec107/2","image_url_4x":"https://static-cdn.jtvnw.net/badges/v1/92982fa1-c05a-4334-9af6-41355daec107/3","description":"2-Year Subscriber","title":"2-Year Subscriber","click_action":"subscribe_to_channel","click_url":""}},"bits_badges":null,"cheermote1":"https://d3aqoihi2n8ty8.cloudfront.net/partner-actions/15025961/5769ebb2-a81c-4a0f-8956-052e4b207f7e/1/dark/animated/3/514cb024d9a65e15e60443d5eabaa73dfb11cb38.gif","cheermote100":"https://d3aqoihi2n8ty8.cloudfront.net/partner-actions/15025961/5769ebb2-a81c-4a0f-8956-052e4b207f7e/100/light/animated/3/085f7381673667669aa50650a56234213f40d588.gif","cheermote1000":"https://d3aqoihi2n8ty8.cloudfront.net/partner-actions/15025961/5769ebb2-a81c-4a0f-8956-052e4b207f7e/1000/light/animated/3/8366e6720cd22a81e174c47d9e309848f49c984a.gif","cheermote5000":"https://d3aqoihi2n8ty8.cloudfront.net/partner-actions/15025961/5769ebb2-a81c-4a0f-8956-052e4b207f7e/5000/light/animated/3/0dec1c0c72824c65d32fce9b69c5911c0c003006.gif","cheermote10000":"https://d3aqoihi2n8ty8.cloudfront.net/partner-actions/15025961/5769ebb2-a81c-4a0f-8956-052e4b207f7e/10000/light/animated/3/0dec1c0c72824c65d32fce9b69c5911c0c003006.gif","set":8342,"emotes":[{"code":"crimsRage","image_id":41695,"set":8342},{"code":"crimsSkip","image_id":131668,"set":8342},{"code":"crimsNoSkip","image_id":131669,"set":8342},{"code":"crimsParty","image_id":39956,"set":8342},{"code":"crimsNap","image_id":43490,"set":8342},{"code":"crimsLove","image_id":70220,"set":8342},{"code":"crimsCheese","image_id":137685,"set":8342}]}}}
json
<reponame>AtlantisUnited/tinkoff-api export * from './payments'
typescript
Instagram has been testing new ways to push more people into buying a verification badge. The Meta-owned company has allowed users to select what feed they would prefer to see based on all the people they are following or only a few favourites. However, according to Instagram head Adam Mosseri's broadcast channel on Instagram, the company may soon allow users to view posts only from verified users. The feature is currently being tested, and Instagram is seeking feedback from users to develop it further. On his broadcast channel, Instagram head Adam Mosseri posted a picture which shows three choices of how a user would prefer their feed to be. The three options include a feed from Following, Favourites and Meta Verifies users. According to his post, this will be a new way to make businesses and creators increase their visibility. The new feature, which allows users to watch Instagram reels and posts from only Meta Verified accounts, is in the testing phase and is available only to select users. The company has not revealed who will be the users to get access to this test feature. It is also unclear if this feature will be limited to a few regions or globally. Based on the feedback received, the company would further make changes to the new feature. However, this step could be a way to push more accounts to switch to a verified account. According to Meta's recent policies, anyone can opt to pay and buy the verified badge at a nominal subscription fee. An official announcement by the company stated that Meta Verified could be purchased for mobile apps at a monthly subscription for Rs. 699 on iOS and Android, while the price is fixed at Rs. 599 for verification on the web version. In order to be Meta Verified on Instagram in India, one has to be at or above 18 years of age. They also need to have an official government ID where the name and photo match that on the Instagram or Facebook account. Affiliate links may be automatically generated - see our ethics statement for details.
english
<filename>src/BayesFilters/src/EstimatesExtraction.cpp #include "BayesFilters/EstimatesExtraction.h" using namespace bfl; using namespace Eigen; EstimatesExtraction::EstimatesExtraction(EstimatesExtraction&& estimate_extraction) noexcept : extraction_method_(estimate_extraction.extraction_method_), hist_buffer_(std::move(estimate_extraction.hist_buffer_)), sm_weights_(std::move(estimate_extraction.sm_weights_)), wm_weights_(std::move(estimate_extraction.wm_weights_)), em_weights_(std::move(estimate_extraction.em_weights_)) { estimate_extraction.extraction_method_ = ExtractionMethod::emode; } EstimatesExtraction& EstimatesExtraction::operator=(EstimatesExtraction&& estimate_extraction) noexcept { if (this != &estimate_extraction) { extraction_method_ = estimate_extraction.extraction_method_; estimate_extraction.extraction_method_ = ExtractionMethod::emode; hist_buffer_ = std::move(estimate_extraction.hist_buffer_); sm_weights_ = std::move(estimate_extraction.sm_weights_); wm_weights_ = std::move(estimate_extraction.wm_weights_); em_weights_ = std::move(estimate_extraction.em_weights_); } return *this; } bool EstimatesExtraction::setMethod(const ExtractionMethod& extraction_method) { extraction_method_ = extraction_method; return true; } bool EstimatesExtraction::setMobileAverageWindowSize(const int window) { if (window > 0) return hist_buffer_.setHistorySize(window); else return false; } VectorXf EstimatesExtraction::extract(const Ref<const MatrixXf>& particles, const Ref<const VectorXf>& weights) { VectorXf out_particle(7); switch (extraction_method_) { case ExtractionMethod::mean : out_particle = mean(particles, weights); break; case ExtractionMethod::smean : out_particle = simpleAverage(particles, weights, Statistics::mean); break; case ExtractionMethod::wmean : out_particle = weightedAverage(particles, weights, Statistics::mean); break; case ExtractionMethod::emean : out_particle = exponentialAverage(particles, weights, Statistics::mean); break; case ExtractionMethod::mode : out_particle = mode(particles, weights); break; case ExtractionMethod::smode : out_particle = simpleAverage(particles, weights, Statistics::mode); break; case ExtractionMethod::wmode : out_particle = weightedAverage(particles, weights, Statistics::mode); break; case ExtractionMethod::emode : out_particle = exponentialAverage(particles, weights, Statistics::mode); break; } return out_particle; } bool EstimatesExtraction::clear() { return hist_buffer_.clear(); } std::vector<std::string> EstimatesExtraction::getInfo() const { std::vector<std::string> info; info.push_back("<| Current window size: " + std::to_string(hist_buffer_.getHistorySize()) + " |>"); info.push_back("<| Available estimate extraction methods: " + std::string(extraction_method_ == ExtractionMethod::mean ? "1) mean <-- In use; " : "1) mean; " ) + std::string(extraction_method_ == ExtractionMethod::smean ? "2) smean <-- In use; " : "2) smean; ") + std::string(extraction_method_ == ExtractionMethod::wmean ? "3) wmean <-- In use; " : "3) wmean; ") + std::string(extraction_method_ == ExtractionMethod::emean ? "4) emean <-- In use; " : "4) emean; ") + std::string(extraction_method_ == ExtractionMethod::mode ? "5) mode <-- In use; " : "5) mode; " ) + std::string(extraction_method_ == ExtractionMethod::smode ? "6) smode <-- In use; " : "6) smode; ") + std::string(extraction_method_ == ExtractionMethod::wmode ? "7) wmode <-- In use; " : "7) wmode; ") + std::string(extraction_method_ == ExtractionMethod::emode ? "8) emode <-- In use; " : "8) emode" ) + " |>"); return info; } VectorXf EstimatesExtraction::mean(const Ref<const MatrixXf>& particles, const Ref<const VectorXf>& weights) const { VectorXf out_particle = VectorXf::Zero(7); float s_ang = 0; float c_ang = 0; for (int i = 0; i < particles.cols(); ++i) { out_particle.head<3>() += weights(i) * particles.col(i).head<3>(); out_particle.middleRows<3>(3) += weights(i) * particles.col(i).middleRows<3>(3); s_ang += weights(i) * std::sin(particles(6, i)); c_ang += weights(i) * std::cos(particles(6, i)); } float versor_norm = out_particle.middleRows<3>(3).norm(); if (versor_norm >= 0.99) out_particle.middleRows<3>(3) /= versor_norm; else out_particle.middleRows<3>(3) = mode(particles, weights).middleRows<3>(3); out_particle(6) = std::atan2(s_ang, c_ang); return out_particle; } VectorXf EstimatesExtraction::mode(const Ref<const MatrixXf>& particles, const Ref<const VectorXf>& weights) const { MatrixXf::Index maxRow; MatrixXf::Index maxCol; weights.maxCoeff(&maxRow, &maxCol); return particles.col(maxRow); } VectorXf EstimatesExtraction::simpleAverage(const Ref<const MatrixXf>& particles, const Ref<const VectorXf>& weights, const Statistics& base_est_ext) { VectorXf cur_estimates; if (base_est_ext == Statistics::mean) cur_estimates = mean(particles, weights); else if (base_est_ext == Statistics::mode) cur_estimates = mode(particles, weights); hist_buffer_.addElement(cur_estimates); MatrixXf history = hist_buffer_.getHistoryBuffer(); if (sm_weights_.size() != history.cols()) sm_weights_ = VectorXf::Ones(history.cols()) / history.cols(); return mean(history, sm_weights_); } VectorXf EstimatesExtraction::weightedAverage(const Ref<const MatrixXf>& particles, const Ref<const VectorXf>& weights, const Statistics& base_est_ext) { VectorXf cur_estimates; if (base_est_ext == Statistics::mean) cur_estimates = mean(particles, weights); else if (base_est_ext == Statistics::mode) cur_estimates = mode(particles, weights); hist_buffer_.addElement(cur_estimates); MatrixXf history = hist_buffer_.getHistoryBuffer(); if (wm_weights_.size() != history.cols()) { wm_weights_.resize(history.cols()); for (unsigned int i = 0; i < history.cols(); ++i) wm_weights_(i) = history.cols() - i; wm_weights_ /= wm_weights_.sum(); } return mean(history, wm_weights_); } VectorXf EstimatesExtraction::exponentialAverage(const Ref<const MatrixXf>& particles, const Ref<const VectorXf>& weights, const Statistics& base_est_ext) { VectorXf cur_estimates; if (base_est_ext == Statistics::mean) cur_estimates = mean(particles, weights); else if (base_est_ext == Statistics::mode) cur_estimates = mode(particles, weights); hist_buffer_.addElement(cur_estimates); MatrixXf history = hist_buffer_.getHistoryBuffer(); if (em_weights_.size() != history.cols()) { em_weights_.resize(history.cols()); for (unsigned int i = 0; i < history.cols(); ++i) em_weights_(i) = std::exp(-(static_cast<double>(i) / history.cols())); em_weights_ /= em_weights_.sum(); } return mean(history, em_weights_); }
cpp
In an attempt to draw attention of the voters, Lok Satta Party candidates in the fray for municipal polls has come out with reports establishing supply of poor quality of drinking water to the urban areas. The contestants, accompanied by their supporters, carried out a scientific study on the drinking water being supplied by the Machilipatnam Municipality and explained the voters about the failure of its rival political parties in ensuring the supply of safe drinking water. The LSP supporters also put up the details of the possible health hazards due to the consumption of the ‘unhealthy’ drinking water on display, apart from several other civic issues that were plaguing the localities. The MLA aspirants in Machilipatnam Assembly constituency also joined the campaign to promote their Councillor candidates in municipal wards.
english
package com.example.a10835.easyweather.json; import android.content.Context; import android.content.res.AssetManager; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * Created by 10835 on 2017/10/9. */ public class WeatherAssest { private static final String TAG = "WeatherAssest"; private String FLODER="weather"; private List<WeatherPic> weatherPic; private AssetManager assetManaget; public WeatherAssest(Context context) { weatherPic = new ArrayList<>(); assetManaget=context.getAssets(); try { String[] pics=assetManaget.list(FLODER); for (int i = 0; i <pics.length ; i++) { String mAssets=FLODER+"/"+pics[i]; WeatherPic weathpic=new WeatherPic(mAssets); weatherPic.add(weathpic); } } catch (IOException e) { e.printStackTrace(); } } }
java
from abc import ABC, abstractmethod from core import occurs_dispatch, unify_dispatch, extend_substitution, Term, Mismatch from variable import Var from typing import Any, Optional # For now, assume constraints can't contain variables. # We can say things like >0 or >10 & <20, but not <X. class Constraint(ABC): @abstractmethod def check(self, value: Term) -> bool: pass @abstractmethod def combine(self, other) -> Optional["Constraint"]: pass @unify_dispatch.register(swap=True) def unify_constraints(u: Constraint, v: Any, s): if u.check(v): return s raise Mismatch(u, v) @unify_dispatch.register() def unify_constraints(u: Constraint, v: Var, s): # It's tricky... # after walking, a variable associated with a constraint is replaced by the constraint. # so how can we update the constraint here? raise NotImplementedError() @unify_dispatch.register() def unify_constraints(u: Constraint, v: Constraint, s): if not u.combine(v): raise Mismatch(u, v) return s @occurs_dispatch.register def occurs_constraint(v: Constraint, x, s): return False
python
/** * @author: <NAME> * @description: create user dto */ import { ApiProperty } from "@nestjs/swagger" export class CreatePostTypeDto { @ApiProperty({ // default: "post-name", description: "Post type name", type: String }) name: String @ApiProperty({ // default: "http:iconimage/example", description: "Post type icon image url", type: String }) iconImage: String @ApiProperty({ // default: Date, description: "Post type creation date", type: Date }) createdAt: Date @ApiProperty({ // default: Date, description: "Last updates are mode on", type: Date }) updatedAt: Date }
typescript
ICDS was launched on October 2, 1975 with only 1 urban (Khidirpur of Kolkata) and 1 rural (Manbazar of Purulia) project in West Bengal. At present, in West Bengal 576 projects (423 – rural, 75 – urban, 78 – tribal projects) are operational. It is a centrally sponsored scheme run by the State Govt. / UT through AWCs. Integrated Child Development Services (ICDS) Scheme, a centrally sponsored one, constitutes one of the principal planks in the Nation’s Strategy to provide to children from the deprived sections of the society, the basic services for a better start in life. The Scheme provides services in an integrated manner to children below the age of 6 years. Restricting the coverage to children less than 6 years is based on the consideration that the pre-school age can be considered as a definite phase in the development of the child. Since the mother has a key role in the physical, psychological and social development of the child, nursing and expectant mothers and other women of 14-45 years are brought under this scheme which aims at the welfare of the child.
english
{ "name": "@ciscospark/storage-adapter-local-forage", "version": "0.7.55", "description": "", "license": "MIT", "author": "<NAME> <<EMAIL>>", "main": "dist/index.js", "devMain": "src/index.js", "repository": "https://github.com/ciscospark/spark-js-sdk/tree/master/packages/storage-adapter-local-forage", "dependencies": { "@ciscospark/common": "^0.7.52", "@ciscospark/spark-core": "^0.7.55", "babel-runtime": "^6.3.19", "localforage": "^1.4.2", "lodash": "^4.13.1" }, "devDependencies": { "@ciscospark/storage-adapter-spec": "^0.7.50", "@ciscospark/test-helper-mocha": "^0.7.34", "babel-polyfill": "^6.20.0" }, "engines": { "node": ">=4" } }
json
<filename>src/main/java/com/hgys/iptv/model/OrderCpWithCp.java package com.hgys.iptv.model; import javax.persistence.*; import java.sql.Timestamp; /** * 结算类型-CP定比例与CP关系表(cp_order_cp) * * @author tjq * @version 1.0.0 2019-05-05 */ @Entity @Table(name="cp_order_cp") public class OrderCpWithCp implements java.io.Serializable{ /** 版本号 */ private static final long serialVersionUID = 8162579340244908011L; /** 主键 */ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id", unique = true, nullable = false, length = 11) private Integer id; /** cp名称*/ @Column(name = "cpname", nullable = true, length = 50) private String cpname; /** code*/ @Column(name = "code", nullable = true, length = 50) private String code; /** cp的CODE */ @Column(name = "cpcode", nullable = true, length = 50) private String cpcode; /** 结算方式 */ @Column(name = "settleaccounts", nullable = true, length = 2) private Integer settleaccounts; @Column(name = "createtime", nullable = true, length = 6) /** 创建时间*/ private Timestamp createtime; @Column(name = "note", nullable = true, length = 255) /** 备注 */ private String note; /** 结算类型-CP定比例表名称 */ @Column(name = "ocname", nullable = true, length = 50) private String ocname; /** 结算类型-CP定比例表的CODE */ @Column(name = "occode", nullable = true, length = 50) private String occode; /** 权重 */ @Column(name = "weight", nullable = true, length = 30) private String weight; /** 金额 */ @Column(name = "money", nullable = true, length = 11) private Integer money; /** 备用字段3 */ @Column(name = "col3", nullable = true, length = 50) private String col3; /** 是否删除 */ @Column(name = "isdelete", nullable = true, length = 2) private Integer isdelete; public Integer getId() { return id; } public String getCpname() { return cpname; } public Integer getMoney() { return money; } public void setMoney(Integer money) { this.money = money; } public Timestamp getCreatetime() { return createtime; } public void setCreatetime(Timestamp createtime) { this.createtime = createtime; } public String getNote() { return note; } public String getWeight() { return weight; } public void setOccode(String occode) { this.occode = occode; } public void setWeight(String weight) { this.weight = weight; } public String getCol3() { return col3; } public Integer getIsdelete() { return isdelete; } public void setId(Integer id) { this.id = id; } public void setCpname(String cpname) { this.cpname = cpname; } public void setCpcode(String cpcode) { this.cpcode = cpcode; } public void setSettleaccounts(Integer settleaccounts) { this.settleaccounts = settleaccounts; } public String getCpcode() { return cpcode; } public Integer getSettleaccounts() { return settleaccounts; } public String getOccode() { return occode; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getOcname() { return ocname; } public void setNote(String note) { this.note = note; } public void setOcname(String ocname) { this.ocname = ocname; } public void setCol3(String col3) { this.col3 = col3; } public void setIsdelete(Integer isdelete) { this.isdelete = isdelete; } }
java
from openalpr import Alpr import cv2 import re import os alpr = Alpr("eu", "/etc/openalpr/openalpr.conf","/home/pi/openalpr/runtime_data") if not alpr.is_loaded(): print('Erro ao carregar ALPR') sys.exit(1) alpr.set_top_n(200) #alpr.set_default_region('md') #Trabalhando com imagens img = ('/home/pi/Pictures/celular01.jpg') print('Started...') cap = cv2.VideoCapture(0) cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1024) cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1280) if cap.isOpened(): ret, frame = cap.read() else: ret = False cv2.imwrite(img, frame) cap.release() print("Finish") #seleciona a imagem results = alpr.recognize_file(img) i=0 placa = "" for plate in results['results']: i+=1 print('Plate #%d' %i) print(" %12s %12s" % ("Plate","Cofidence")) for candidate in plate['candidates']: prefix = "-" if candidate['matches_template']: prefix= "*" print(" %s %12s%12f" % (prefix, candidate['plate'],candidate['confidence'])) teste = candidate['plate'] x = re.search('^[A-Z]{3}[0-9]{1}[A-Z]{1}[0-9]{2}',teste) if(x): placa = candidate['plate'] break if(placa != ""): print(placa) alpr.unload()
python