text
stringlengths
1
1.04M
language
stringclasses
25 values
A double-amputee was rescued by border patrol agents from an island on the Rio Grande River in Texas on Wednesday while he was trying to make his way into the U. S. U. S. Customs and Border Protection said in a news release that U. S. Border Patrol Agents from the Eagle Pass Station marine unit saw the man in a wheelchair by himself on the island in the center of the river. Agents went out to the island and identified the man as a 37-year-old Guatemalan. The man claimed he crossed to the island on his own, but was unable to continue the crossing. Officials said the man was determined to be in the U. S. illegally and was assisted to the shore for medical attention and processing. The incident on Wednesday came after two other encounters with people this week who had special needs due to mental or physical limitations. On Tuesday, officials said a 41-year-old Honduran male was apprehended crossing the Rio Grande. Agents quickly realized that he could neither hear nor speak, making communication a challenge, according to CBP. The day before, a 36-year-old Honduran woman was arrested entering the United States illegally with her stepbrother. "She was found to have a mental impairment that causes her to become agitated and inconsolable," the agency said. "The female was calmed by her stepbrother, so processing could be completed. " All those apprehended this week were offered and received medical attention, as appropriate, before being processed by federal authorities.
english
<gh_stars>10-100 { "PWD_REPLACE/generated.test": [ "PWD_REPLACE/main.js" ], "PWD_REPLACE/main.js": [ "PWD_REPLACE/m1.js", "PWD_REPLACE/m2.js" ] }
json
Priced at a low $49.95, the Fitbug Orb tracks sleep, steps, and counts calories, but is tricky to operate. On the surface, the Fitbug Orb fitness tracker appears to be a pretty excellent deal. For just $49.95 the gadget promises to let users count their steps, and calculate both calories burned through exercise and consumed in their meals. Additionally the device can push activity data to compatible smartphones over a wireless Bluetooth connection. Unfortunately, reality is that the Orb's complicated setup, confusing phone software, and messy online tools make it hard to recommend. For just $10 more, the Fitbit Zip can tackle almost everything the Orb can, plus it has some key abilities the Orb can't touch. These include having a real screen and being able to enter the food you eat into a mobile app. Also, operating the Zip is a breeze by comparison. A round, fat disc, the Fitbug Orb is about the width of a quarter and as thick as two bottle caps stacked back-to-back. To me it almost looks like an oversize Mentos candy or a smashed glass marble. Aside from the standard black, the Orb also comes in tasty pink and white colors. The gadget's smooth glossy surface doesn't give away any clues to its purpose, either. That's because the Orb lacks a screen and the product's only indicators or controls are a small oval light and tiny button. Sitting in between the button and light, both positioned on the Orb's front face, is a short purple stripe. Don't get too excited, though, this rounded line doesn't serve any function other than ornamental. I have to say that picking up the Orb right after spending plenty of quality time with the Fitbit Force, made me really miss having a true alphanumeric display. Even the tiny, belt-clipped Fitbit Zip has an LCD that showcases steps and calorie info when your smartphone isn't handy. The Nike FuelBand SE takes the cake, though, with its huge LED array that shows your activity status in larger-than-life technicolor fireworks. Unlike other high-tech pedometers on the market such as the Fitbit Force and Jawbone Up, users have two ways to wear the Orb right out of the box. A rubbery wrist strap lets you latch the device onto your wrist, and a soft, flexible clip pins the Orb to belts or pockets. I opted to use the wristband method since the clip, while it grabs clothing tightly, doesn't lock or snap completely shut. By contrast, the Orb's wristband has metal teeth on one end that pop securely into holes designed to accept them. As a result, once fastened together the Orb stayed put around my arm no matter how active I was or how many times I changed coats or adjusted long-sleeve shirts. The Orb's strap was easier to fasten than the Force's, too. I also found the Orb's 1.1-ounce weight (with wrist strap) to be light and comfortable enough to wear for days on end. One thing the Fitbug Orb shares with the Fitbit Zip is that it uses a standard coin-size watch battery (CR2032 3V), which the company claims will power the gadget for four to six months. The Zip, however, has the Orb beat in terms of water resistance. Like the Nike FuelBand SE, and all Fitbit trackers, the Zip is fully able to withstand showers and soaking deluges of rain. Heck, I've even accidentally thrown the Zip in the wash and the device survived without any hiccups. I don't recommend doing the same to the Orb, which Fitbug explains is merely rated to deal with the occasional splash, say, when scrubbing dirty dishes. In my experience, the Fitbug Orb's setup process wasn't as easy as getting up and running on other platforms. Trackers such as the Fitbit Force, Basis Band, and Jawbone Up enjoy a streamlined initiation by creating an account with basic body stats and then linking with phones, either physically or by pairing via Bluetooth. On the other hand, the Orb requires you to do these tasks and also asks you to punch in your stride length, which you'll need to compute manually. Sure, it's not a huge detractor, but it's the first fancy fitness gadget I've reviewed so far to ask this of me. Another drag is that you must enter a special subscription code printed on the Orb's packaging in order to proceed with Fitbug account creation. Lose that box (and code) before doing so, and you may be in hot water. I tested the Orb's companion mobile app on an iPhone 5C, but it's also available on Android. That said, it's only technically compatible with Samsung Galaxy handsets such as the GS4 and GS4 Mini. When you boil it down, the Fitbug Orb's primary function is to measure the steps you take throughout the day. Based on this, the Fitbug platform then calculates how many calories you've torched. Unlike the Fitbit and Nike systems, the Orb doesn't let you select your own goals for movement. Instead the tracker and Fitbug solution monitor your behavior over a week to get an accurate baseline assessment of your activity. From there the app and Web-based interface will calculate specific step goals tailored to you personally. In my case the Orb suggested a total step count target of 9,600 footfalls. The tracker and companion Kik iOS mobile app broke things down further, splitting out what it calls "Aerobic" steps from my current movement stats. It then set a goal of 2,700 target steps that I should ideally make daily. It's similar to what the Fitbit Force does, logging your "Active Minutes" with the default goal of 30 minutes per day. I did notice that the Orb tended to award me a higher number of total steps compared with what other wrist-born trackers gave me. For instance on one afternoon, the device stated I had marched 8,483 steps, whereas the Fitbit Force registered a more down-to-earth 6,758 steps. The Basis Band, which is very stingy with its step counting, reported a reading of 5,269. I wore both simultaneously with the Orb. The Orb has the ability to log the length and quality of your sleep. To kick the device into sleep mode you must push the Orb's only button three times in quick succession. After that the gadget's light will flash green fives times to alert you that sleep mode is active. To disengage the function, tap the button again when you rise in the morning. The Orb will also automatically stop sleep tracking in the morning after you've taken 50 steps. In practice, though, I found the Orb's sleep-tracking skills less than ideal. For instance since the product's button is so small and feels a bit mushy, it was difficult to push the key down all the way. Also, while the Orb and Kik app will list basic data such as sleep efficiency (in percentage), Fitbit devices and the Jawbone Up provide graphs detailing restless periods versus deep slumber. Keep in mind that the Fitbit Zip can't track sleep, the only product in the company's line with this deficiency. What the Orb can't tackle, either, is counting the stairs you climb, or functioning as a silent alarm -- skills in both the Fitbit Force's and Jawbone Up's tool bags. That said, the more reasonably priced Fitbit Zip lacks these features, too. Where the Zip (and Fitbit's other products) trumps the Orb is by providing a USB dongle that allows the tracker to sync wirelessly with Macs and PCs. Fitbug offers the dongle option, but for an extra $14.99. Fitbit, Jawbone, and Basis all boast online and mobile tools that have smooth navigation and intuitive interfaces. Sadly the Fitbug UI, and especially the company's desktop site, was anything but. In truth, the Fitbug mobile app has a certain level of beauty, with clean fonts and large numbers. Unfortunately, the icons for flipping through the app's main features are extremely small and hard to tap. That's mysterious since the icons that run along the bottom have plenty of white space around them. The Fitbug site is worse, a confused mess of tabs, boxes, icons, and eye-jarring colors. Like many personal fitness products, the Fitbug Orb allows users to enter meals to better predict if all their physical toil will offset what they've eaten. Unlike Fitbit's mobile application, which has the power to log food on the fly, the Kik app lacks this ability. Even so, users can use the Fitbug Web site to punch in meals they've enjoyed. However, this forces you to interact with the Fitbug site's cluttered interface, something I'd rather not do often. As with many budget products, a rock-bottom price doesn't translate into a sweet deal. As the saying goes, you get what you pay for, and the Fitbug Orb proves the adage correct. For just $49.95, yes, the Orb provides a functional solution to track steps and basic energy expenditure throughout the day. It also has the ability to log how long you sleep, a trick its nearest competitor (the $59.95 Fitbit Zip) can't perform. What the Zip can do (and what I think is much more valuable) is offer a simpler setup process, plus a mobile app that's both more powerful and easier to use. Of course the Zip can't be strapped around the wrist like the Orb. But if this is your main criteria for a fitness gadget, you're much better served splurging on the $129.95 Fitbit Force. And with its genuine LED screen, the Force acts as a watch, too.
english
<reponame>aisenyi/metactical<filename>metactical/metactical/print_format/pick_lis_barcode_test/pick_lis_barcode_test.json { "align_labels_right": 0, "creation": "2021-11-09 04:39:38.283603", "css": "<style>\n.print-format {\n margin-left:05mm;\n margin-top:05mm;\n margin-right:05mm;\n margin-bottom:05mm;\n page-size: A6;\n}\n.print-format td, .print-format th {\n vertical-align: top !important;\n padding: 0.5px !important;\n}\n@media screen {\n .print-format {\n /*PRINTABLE WIDTH: 21.0cm */\n width: 4in;\n /*PRINTABLE HEIGHT: 29.7cm*/\n /*PADDING FROM MARGINS: 0.9cm, .354331in */\n padding: 0.5cm;\n }\n }\n.float-container {\n border: 3px solid #fff;\n padding: 2px;\n}\n\n.float-child {\n width: 50%;\n float: left;\n padding: 2px;\n border-bottom: 1px solid black;\n}\n.blue{\n text-align:right;\n}\n.float-child-2{\n width: 50%;\n float:left;\n padding:2px;\n}\n.float-container-2 {\n padding: 5px;\n}\n.head-section{\n border-bottom: 1px solid black;\n}\n</style>", "custom_format": 1, "default_print_language": "en", "disabled": 0, "doc_type": "Pick List", "docstatus": 0, "doctype": "Print Format", "font": "Default", "html": "<head>\n<style>\n.print-format {\n margin-left:05mm;\n margin-top:05mm;\n margin-right:05mm;\n margin-bottom:05mm;\n}\n</style>\n</head>\n<div class=\"head-text\" style=\"float: left; width: 100%;\">\n <b>SVG Barcode</b><br>\n {{ doc.ais_test_utf_barcode }} <br><br>\n <b>Larger SVG Barcode</b><br>\n {{ doc.ais_test_larger_barcode}} <br><br>\n <b>Larger SVG in smaller Container</b><br>\n <div style=\"width: 50%\">{{doc.ais_test_larger_barcode}}</div>\n <b>PNG Image Barcode</b><br>\n <img src=\"{{ doc.ais_test_barcode_png_image }}\" /> <br><br>\n <b>PNG Image in 50% Container</b>\n <div style=\"width: 50%;\"><img src=\"{{ doc.ais_test_barcode_png_image }}\" /></div> <br><br>\n <b>SVG Image Barcode</b><br>\n <img src=\"{{ doc.ais_test_barcode_svg_image }}\" /> <br><br>\n <b>Larger PNG Image Barcode</b><br>\n <img src=\"{{ doc.ais_test_barcode_larger_image }}\" />\n</div>", "idx": 0, "line_breaks": 0, "modified": "2021-11-09 06:38:42.976914", "modified_by": "Administrator", "module": "Metactical", "name": "Pick Lis Barcode Test", "owner": "Administrator", "print_format_builder": 0, "print_format_type": "Jinja", "raw_printing": 0, "show_section_headings": 0, "standard": "Yes" }
json
Alzarri Joseph to Harry Brook, out Harry Brook Run Out!! Oh that's close. WI are celebrating. Bad call for a single, Brook hesitates, then responds, and he's struggling. Joseph makes a direct hit and Brook is short despite a dive. More trouble for England as they lose their fourth. Joseph did brilliantly there. The ball was defended into the on-side and he charged after it before collecting, turning and making a direct hit. Harry Brook run out (Alzarri Joseph) 1(3)
english
<reponame>Daredevil3722/CS-Assignments import mysql.connector as connector from prettytable import PrettyTable from prettytable import from_db_cursor import time db = connector.connect(host = "localhost", user = "root", passwd = "<PASSWORD>!", database = 'assignments') if(db): print("SQL Connectivity Successful") else: print("SQL Conncectivity Failed") curs = db.cursor(buffered = True) curs.execute("drop table if exists SPORTS") print("1. Create Table SPORTS") curs.execute('''create table SPORTS( GCode int primary key, GameName varchar(70), No_Players int, PrizeMoney int );''') curs.execute("desc SPORTS;") print("Table: \n") table = from_db_cursor(curs) print(table) print("\n \n") print("2. Insert Values Into table SPORTS") curs.execute('''insert into SPORTS values (101, 'Carrom Board', 2, 5000), (102, 'Table Tennis', 2, 12000), (103, 'Lawn Tennis', 4, 8000), (105, 'Chess', 2, 9000), (108, 'Table Tennis', 4, 25000); ''') inserted_table = from_db_cursor(curs) curs.execute("select * from SPORTS;") inserted_table = from_db_cursor(curs) print(inserted_table) print("\n \n") print("3. Display count of players enrolled for each game") curs.execute("select sum(No_Players) from SPORTS where GameName = 'Carrom Board';") carrom_sum = (curs.fetchone()) carrom_sum = int(carrom_sum[0]) curs.execute("select sum(No_Players) from SPORTS where GameName = 'Table Tennis';") table_tennis_sum = (curs.fetchone()) table_tennis_sum = int(table_tennis_sum[0]) curs.execute("select sum(No_Players) from SPORTS where GameName = 'Lawn Tennis';") lawn_tennis_sum = (curs.fetchone()) lawn_tennis_sum = int(lawn_tennis_sum[0]) curs.execute("select sum(No_Players) from SPORTS where GameName = 'Chess';") chess_sum = (curs.fetchone()) chess_sum = int(chess_sum[0]) inserted_table.clear() inserted_table.field_names = ["Game", "Number Of Players"] table_list = {("Carrom Board", carrom_sum), ("Table Tennis", table_tennis_sum), ("Lawn Tennis", lawn_tennis_sum), ("Chess", chess_sum) } for i in table_list: inserted_table.add_row(i) print(inserted_table) print("\n \n") print("4. Alter table to add column Date") curs.execute("alter table SPORTS add Date date;") curs.execute('''update SPORTS set Date = "2020-03-14" where GCode = 101;''') curs.execute('''update SPORTS set Date = "2021-12-03" where GCode = 102;''') curs.execute('''update SPORTS set Date = "2020-03-05" where GCode = 103;''') curs.execute('''update SPORTS set Date = "2020-09-03" where GCode = 105;''') curs.execute('''update SPORTS set Date = "2020-08-12" where GCode = 108;''') curs.execute('select * from SPORTS') inserted_table = from_db_cursor(curs) print(inserted_table) print("\n \n") print("5. Display total count, sum of PrizeMoney of players of Table Tennis") curs.execute('''select GameName, sum(No_Players) as Total_No_Player, sum(PrizeMoney) as Total_Prize_Money from SPORTS where GameName = "Table Tennis"''') inserted_table = from_db_cursor(curs) print(inserted_table) print("\n\n") print("6. Display records in descending order based on PrizeMoney") curs.execute("Select * from SPORTS order by PrizeMoney desc") inserted_table = from_db_cursor(curs) print(inserted_table) print("\n\n") print("### Assignment Completed ###")
python
import * as React from 'react'; import { StyleSheet, View, Text } from 'react-native'; import { requestAuthorization, AuthorizationStatus, addFocusStatusChangeListener, getCurrentFocusStatus, } from 'react-native-focus'; export default function App() { const [authorization, setAuthorization] = React.useState< AuthorizationStatus | undefined >(); const [focused, setFocused] = React.useState<boolean | undefined>( getCurrentFocusStatus() ); const authorizationText = React.useMemo<string>(() => { switch (authorization) { case AuthorizationStatus.Authorized: return 'Authorized'; case AuthorizationStatus.Denied: return 'Denied'; case AuthorizationStatus.NotDetermined: return 'Not Determined'; case AuthorizationStatus.Restricted: return 'Restricted'; default: return ''; } }, [authorization]); React.useEffect(() => { requestAuthorization().then(setAuthorization); }, []); React.useEffect(() => { const unsubscribe = addFocusStatusChangeListener(setFocused); return () => { unsubscribe(); }; }, []); return ( <View style={styles.container}> <Text>Authorization: {authorizationText}</Text> <Text>Status: {focused ? 'Focused' : 'Not Focused'}</Text> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', justifyContent: 'center', }, box: { width: 60, height: 60, marginVertical: 20, }, });
typescript
<gh_stars>0 import { Kudo, ModelKudoConnection } from "@slashkudos/kudos-api"; import { ApiResponse } from "./ApiResponse"; export class ListKudosResponse extends ApiResponse<ModelKudoConnection> { }
typescript
<reponame>tommilligan/cargo-raze use ThreadPoolBuilder; use {scope, Scope}; use rand::{Rng, SeedableRng, XorShiftRng}; use std::cmp; use std::iter::once; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Mutex; use std::vec; use unwind; #[test] fn scope_empty() { scope(|_| { }); } #[test] fn scope_result() { let x = scope(|_| 22); assert_eq!(x, 22); } #[test] fn scope_two() { let counter = &AtomicUsize::new(0); scope(|s| { s.spawn(move |_| { counter.fetch_add(1, Ordering::SeqCst); }); s.spawn(move |_| { counter.fetch_add(10, Ordering::SeqCst); }); }); let v = counter.load(Ordering::SeqCst); assert_eq!(v, 11); } #[test] fn scope_divide_and_conquer() { let counter_p = &AtomicUsize::new(0); scope(|s| s.spawn(move |s| divide_and_conquer(s, counter_p, 1024))); let counter_s = &AtomicUsize::new(0); divide_and_conquer_seq(&counter_s, 1024); let p = counter_p.load(Ordering::SeqCst); let s = counter_s.load(Ordering::SeqCst); assert_eq!(p, s); } fn divide_and_conquer<'scope>(scope: &Scope<'scope>, counter: &'scope AtomicUsize, size: usize) { if size > 1 { scope.spawn(move |scope| divide_and_conquer(scope, counter, size / 2)); scope.spawn(move |scope| divide_and_conquer(scope, counter, size / 2)); } else { // count the leaves counter.fetch_add(1, Ordering::SeqCst); } } fn divide_and_conquer_seq(counter: &AtomicUsize, size: usize) { if size > 1 { divide_and_conquer_seq(counter, size / 2); divide_and_conquer_seq(counter, size / 2); } else { // count the leaves counter.fetch_add(1, Ordering::SeqCst); } } struct Tree<T: Send> { value: T, children: Vec<Tree<T>>, } impl<T: Send> Tree<T> { pub fn iter<'s>(&'s self) -> vec::IntoIter<&'s T> { once(&self.value) .chain(self.children.iter().flat_map(|c| c.iter())) .collect::<Vec<_>>() // seems like it shouldn't be needed... but prevents overflow .into_iter() } pub fn update<OP>(&mut self, op: OP) where OP: Fn(&mut T) + Sync, T: Send { scope(|s| self.update_in_scope(&op, s)); } fn update_in_scope<'scope, OP>(&'scope mut self, op: &'scope OP, scope: &Scope<'scope>) where OP: Fn(&mut T) + Sync { let Tree { ref mut value, ref mut children } = *self; scope.spawn(move |scope| { for child in children { scope.spawn(move |scope| child.update_in_scope(op, scope)); } }); op(value); } } fn random_tree(depth: usize) -> Tree<u32> { assert!(depth > 0); let mut seed = <XorShiftRng as SeedableRng>::Seed::default(); (0..).zip(seed.as_mut()).for_each(|(i, x)| *x = i); let mut rng = XorShiftRng::from_seed(seed); random_tree1(depth, &mut rng) } fn random_tree1(depth: usize, rng: &mut XorShiftRng) -> Tree<u32> { let children = if depth == 0 { vec![] } else { (0..rng.gen_range(0, 4)) // somewhere between 0 and 3 children at each level .map(|_| random_tree1(depth - 1, rng)) .collect() }; Tree { value: rng.gen_range(0, 1_000_000), children: children, } } #[test] fn update_tree() { let mut tree: Tree<u32> = random_tree(10); let values: Vec<u32> = tree.iter().cloned().collect(); tree.update(|v| *v += 1); let new_values: Vec<u32> = tree.iter().cloned().collect(); assert_eq!(values.len(), new_values.len()); for (&i, &j) in values.iter().zip(&new_values) { assert_eq!(i + 1, j); } } /// Check that if you have a chain of scoped tasks where T0 spawns T1 /// spawns T2 and so forth down to Tn, the stack space should not grow /// linearly with N. We test this by some unsafe hackery and /// permitting an approx 10% change with a 10x input change. #[test] fn linear_stack_growth() { let builder = ThreadPoolBuilder::new().num_threads(1); let pool = builder.build().unwrap(); pool.install(|| { let mut max_diff = Mutex::new(0); let bottom_of_stack = 0; scope(|s| the_final_countdown(s, &bottom_of_stack, &max_diff, 5)); let diff_when_5 = *max_diff.get_mut().unwrap() as f64; scope(|s| the_final_countdown(s, &bottom_of_stack, &max_diff, 500)); let diff_when_500 = *max_diff.get_mut().unwrap() as f64; let ratio = diff_when_5 / diff_when_500; assert!(ratio > 0.9 && ratio < 1.1, "stack usage ratio out of bounds: {}", ratio); }); } fn the_final_countdown<'scope>(s: &Scope<'scope>, bottom_of_stack: &'scope i32, max: &'scope Mutex<usize>, n: usize) { let top_of_stack = 0; let p = bottom_of_stack as *const i32 as usize; let q = &top_of_stack as *const i32 as usize; let diff = if p > q { p - q } else { q - p }; let mut data = max.lock().unwrap(); *data = cmp::max(diff, *data); if n > 0 { s.spawn(move |s| the_final_countdown(s, bottom_of_stack, max, n - 1)); } } #[test] #[should_panic(expected = "Hello, world!")] fn panic_propagate_scope() { scope(|_| panic!("Hello, world!")); } #[test] #[should_panic(expected = "Hello, world!")] fn panic_propagate_spawn() { scope(|s| s.spawn(|_| panic!("Hello, world!"))); } #[test] #[should_panic(expected = "Hello, world!")] fn panic_propagate_nested_spawn() { scope(|s| s.spawn(|s| s.spawn(|s| s.spawn(|_| panic!("Hello, world!"))))); } #[test] #[should_panic(expected = "Hello, world!")] fn panic_propagate_nested_scope_spawn() { scope(|s| s.spawn(|_| scope(|s| s.spawn(|_| panic!("Hello, world!"))))); } #[test] fn panic_propagate_still_execute_1() { let mut x = false; match unwind::halt_unwinding(|| { scope(|s| { s.spawn(|_| panic!("Hello, world!")); // job A s.spawn(|_| x = true); // job B, should still execute even though A panics }); }) { Ok(_) => panic!("failed to propagate panic"), Err(_) => assert!(x, "job b failed to execute"), } } #[test] fn panic_propagate_still_execute_2() { let mut x = false; match unwind::halt_unwinding(|| { scope(|s| { s.spawn(|_| x = true); // job B, should still execute even though A panics s.spawn(|_| panic!("Hello, world!")); // job A }); }) { Ok(_) => panic!("failed to propagate panic"), Err(_) => assert!(x, "job b failed to execute"), } } #[test] fn panic_propagate_still_execute_3() { let mut x = false; match unwind::halt_unwinding(|| { scope(|s| { s.spawn(|_| x = true); // spanwed job should still execute despite later panic panic!("Hello, world!"); }); }) { Ok(_) => panic!("failed to propagate panic"), Err(_) => assert!(x, "panic after spawn, spawn failed to execute"), } } #[test] fn panic_propagate_still_execute_4() { let mut x = false; match unwind::halt_unwinding(|| { scope(|s| { s.spawn(|_| panic!("Hello, world!")); x = true; }); }) { Ok(_) => panic!("failed to propagate panic"), Err(_) => assert!(x, "panic in spawn tainted scope"), } }
rust
# Chinese-word-library- Chinese word library
markdown
<filename>fbwiki/mediawiki/extensions/ParserFunctions/i18n/mrh.json { "@metadata": { "authors": [ "Laitei", "<NAME>" ] }, "pfunc_expr_unrecognised_word": "Palâsana pâpa: Apy leipa châfâ \"$1\".", "pfunc_expr_missing_operand": "Palâsana pâpa: $1 châta operand leipa", "pfunc_expr_unrecognised_punctuation": "Palâsapa adoleina:A py leipa chârohna ngiana\"$1\"." }
json
<filename>.github/PULL_REQUEST_TEMPLATE.md # Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. Fixes # (issue) # Checklist: - [ ] I have performed a self-review of my own changes - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings
markdown
<gh_stars>1-10 iraf_install script README ================= It would be better if you have installed tcsh and downloaded iraf-linux.tar.gz before you run this script. And this script will NOT create a new user iraf ref: http://astroleaks.lamost.org/?p=1563 (Chinese) http://geco.phys.columbia.edu/~rubab/iraf/iraf_step_by_step_installation
markdown
It is noteworthy that Prime Minister Narendra Modi plans to move major events and festivities out of the national capital region to different parts of the country. New Delhi: A report on Tuesday said that authorities have decided to hold this year's Navy Day celebrations outside Visakhapatnam. News agency PTI mentioned sources as saying that Mumbai is being considered as a new venue, but it has not yet been decided. Sources said earlier in the day that next year's Army Day Parade, traditionally held at Cariappa Parade Ground in Delhi Cantonment, will be moved to a place that falls under the force's Southern Command. According to the Indian Army's website, the Southern Command officially came into existence on April 1, 1895, with its headquarters in Pune. Notably, Indian Air Force (IAF) officials had recently said that the Air Force Day on October 8 will take place outside its usual venue of Hindon Airbase in Ghaziabad. “This year, the Indian Air Force has decided that the major Air Force Day festivities on October 8 like the flypast and parade would be held in Chandigarh. The idea is that more and more people should watch the air show and people from all parts of the country should see what their Air Force is and know its capabilities,” senior government officials told news agency ANI. When asked if Navy Day celebrations will be held outside Visakhapatnam, a naval source replied, "Yes", but added that "the new venue has not been finalised yet". "The country celebrates December 4 every year as Navy Day in commemoration of Operation Trident when the ships of the Indian Navy delivered a lethal and powerful missiles attack on Karachi harbour, paving way for a great victory for India during the 1971 Indo-Pak war and in memory of those who made supreme sacrifice," as per the Indian Navy's website. Every year, a large number of Indian Navy ships and other vessels of different classes and capabilities gather in Visakhapatnam to mark the historical day. In 2021, India celebrated the golden jubilee of the victory of the 1971 war as 'Swarnim Vijay Varsh'.
english
<filename>1-Project/frontend/node_modules/.cache/babel-loader/8533532e461ccf5ab8b016c4c38ba36e.json {"remainingRequest":"E:\\Projects\\vue-library-master\\1-Project\\frontend\\node_modules\\babel-loader\\lib\\index.js!E:\\Projects\\vue-library-master\\1-Project\\frontend\\node_modules\\eslint-loader\\index.js??ref--13-0!E:\\Projects\\vue-library-master\\1-Project\\frontend\\src\\main.js","dependencies":[{"path":"E:\\Projects\\vue-library-master\\1-Project\\frontend\\src\\main.js","mtime":1641838496006},{"path":"E:\\Projects\\vue-library-master\\1-Project\\frontend\\babel.config.js","mtime":1641838494433},{"path":"E:\\Projects\\vue-library-master\\1-Project\\frontend\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1641838763341},{"path":"E:\\Projects\\vue-library-master\\1-Project\\frontend\\node_modules\\babel-loader\\lib\\index.js","mtime":1641838769328},{"path":"E:\\Projects\\vue-library-master\\1-Project\\frontend\\node_modules\\eslint-loader\\index.js","mtime":1641838766164}],"contextDependencies":[],"result":["import \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"E:\\\\Projects\\\\vue-library-master\\\\1-Project\\\\frontend\\\\node_modules\\\\@babel\\\\runtime\\\\helpers\\\\esm\\\\asyncToGenerator.js\";\nimport '@/shared/plugins/element';\nimport Vue from 'vue';\nimport Vuex from 'vuex';\nimport Router from 'vue-router';\nimport { setupComponentsFiltersDirectivesAndMixins, storeAsync, routerAsync } from '@/app-module';\nimport app from '@/app.vue';\nimport { SettingsService } from '@/modules/settings/settings-service';\nimport ProgressBar from '@/shared/progress-bar/progress-bar';\nimport { i18n } from '@/i18n';\n\n_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n document.title = i18n('app.title');\n ProgressBar.start();\n _context.next = 4;\n return SettingsService.fetchAndApply();\n\n case 4:\n Vue.use(Router);\n Vue.config.productionTip = process.env.NODE_ENV === 'production';\n Vue.use(Vuex);\n setupComponentsFiltersDirectivesAndMixins(); // eslint-disable-next-line\n\n new Vue({\n store: storeAsync(),\n router: routerAsync(),\n render: function render(h) {\n return h(app);\n }\n }).$mount('#app');\n\n case 9:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n}))();",{"version":3,"sources":["E:/Projects/vue-library-master/1-Project/frontend/src/main.js"],"names":["Vue","Vuex","Router","setupComponentsFiltersDirectivesAndMixins","storeAsync","routerAsync","app","SettingsService","ProgressBar","i18n","document","title","start","fetchAndApply","use","config","productionTip","process","env","NODE_ENV","store","router","render","h","$mount"],"mappings":";;AAAA,OAAO,0BAAP;AACA,OAAOA,GAAP,MAAgB,KAAhB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,MAAP,MAAmB,YAAnB;AACA,SACEC,yCADF,EAEEC,UAFF,EAGEC,WAHF,QAIO,cAJP;AAKA,OAAOC,GAAP,MAAgB,WAAhB;AACA,SAASC,eAAT,QAAgC,qCAAhC;AACA,OAAOC,WAAP,MAAwB,oCAAxB;AACA,SAASC,IAAT,QAAqB,QAArB;;AAEA,wDAAC;AAAA;AAAA;AAAA;AAAA;AACCC,UAAAA,QAAQ,CAACC,KAAT,GAAiBF,IAAI,CAAC,WAAD,CAArB;AACAD,UAAAA,WAAW,CAACI,KAAZ;AAFD;AAAA,iBAGOL,eAAe,CAACM,aAAhB,EAHP;;AAAA;AAKCb,UAAAA,GAAG,CAACc,GAAJ,CAAQZ,MAAR;AACAF,UAAAA,GAAG,CAACe,MAAJ,CAAWC,aAAX,GACEC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAD3B;AAEAnB,UAAAA,GAAG,CAACc,GAAJ,CAAQb,IAAR;AACAE,UAAAA,yCAAyC,GAT1C,CAWC;;AACA,cAAIH,GAAJ,CAAQ;AACNoB,YAAAA,KAAK,EAAEhB,UAAU,EADX;AAENiB,YAAAA,MAAM,EAAEhB,WAAW,EAFb;AAGNiB,YAAAA,MAAM,EAAE,gBAACC,CAAD;AAAA,qBAAOA,CAAC,CAACjB,GAAD,CAAR;AAAA;AAHF,WAAR,EAIGkB,MAJH,CAIU,MAJV;;AAZD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAD","sourcesContent":["import '@/shared/plugins/element';\nimport Vue from 'vue';\nimport Vuex from 'vuex';\nimport Router from 'vue-router';\nimport {\n setupComponentsFiltersDirectivesAndMixins,\n storeAsync,\n routerAsync,\n} from '@/app-module';\nimport app from '@/app.vue';\nimport { SettingsService } from '@/modules/settings/settings-service';\nimport ProgressBar from '@/shared/progress-bar/progress-bar';\nimport { i18n } from '@/i18n';\n\n(async function() {\n document.title = i18n('app.title');\n ProgressBar.start();\n await SettingsService.fetchAndApply();\n\n Vue.use(Router);\n Vue.config.productionTip =\n process.env.NODE_ENV === 'production';\n Vue.use(Vuex);\n setupComponentsFiltersDirectivesAndMixins();\n\n // eslint-disable-next-line\n new Vue({\n store: storeAsync(),\n router: routerAsync(),\n render: (h) => h(app),\n }).$mount('#app');\n})();\n"]}]}
json
<reponame>tgaudin/gryffin #!/usr/bin/env python __author__ = '<NAME>' #======================================================================== import numpy as np from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize ext_modules = [ Extension( 'kernel_evaluations', ['BayesianNetwork/kernel_evaluations.pyx'], include_dirs = [np.get_include(), '.'], extra_compile_args = ['-fopenmp'], extra_link_args = ['-fopenmp'], ), Extension( 'kernel_prob_reshaper', ['BayesianNetwork/kernel_prob_reshaping.pyx'], include_dirs = [np.get_include(), '.'], extra_compile_args = ['-fopenmp'], extra_link_args = ['-fopenmp'], ), ] setup( name = 'Phoenics', ext_modules = cythonize(ext_modules) )
python
In the latest strain in ties between New Delhi and Dhaka, onions have taken centre stage. Bangladesh has officially conveyed its “deep concern” over India’s abrupt decision to ban the export of onions. This has been communicated through a note verbale by the Bangladesh Foreign Ministry to the Indian High Commission in Dhaka. Bangladesh Foreign Minister A K Abdul Momen Thursday said the Indian Ministry of External Affairs is very “repentant” for not informing Bangladesh beforehand while imposing a ban on onion exports. “I heard that the Indian Ministry of External Affairs is very repentant. Because they didn’t know about the sudden ban,” he told reporters at his office, soon after his return from Turkey. Bangladesh expects a positive outcome regarding its request to withdraw the ban on onion export soon, sources said. Momen said that there was an understanding between the two countries that information would be conveyed in advance when it comes to such steps. It would have been better had Bangladesh been informed about the abrupt decision beforehand, he said. According to estimates, Bangladesh’s monthly requirement of onions is about 2 lakh tonnes. The country has a stock of around 5. 6 lakh tonnes of the bulb and import of 11,000 tonnes is under process, authorities in Dhaka said. Bangladesh has reached out to Turkey to compensate for the onion shortage that may be caused by India’s ban. Earlier, Bangladesh shared its “deep concern” with India at the sudden ban, which comes after discussions in October last year and January this year. The latest abrupt announcement of the Government of India “undermines” the discussions that took place in 2019 and 2020 between the two friendly countries on the matter and the understanding shared, the Bangladesh Ministry of Foreign Affairs wrote to Indian High Commission in Dhaka on September 15. The letter said that the Bangladesh side, during the meeting, had requested India to inform Dhaka “ahead of time” in case of any event necessitating such a restriction. Bangladesh referred to the commerce secretary-level meeting between the two countries on January 15-16, 2020, and VVIP visit to India in October last year. Last October, Prime Minister Sheikh Hasina had lamented India’s ban on onion exports. “I wish you had informed us before suddenly putting a halt in export of onions. I had to tell my cook I have no other option but to have my food without onions. I would request India to please inform us beforehand while taking such an action. After all, we are neighbours,” the Bangladesh Prime Minister Hasina had said in Hindi at a programme in India.
english
Sometime soon, perhaps this week, Facebook will turn the year-old Facebook Platform into an open source project, multiple sources have told us. The immediate effect will be to allow any social network to become Facebook Platform compatible – meaning application developers can easily take their Facebook applications and have them run on those social networks, too. Bebo already licenses the Facebook Platform, which allows third parties to make their Facebook applications work on Bebo, too. With the new announcement, social networks won’t need to go through the hassle of doing a deal with Facebook. They’ll simply map their existing APIs to Facebook Platform (which isn’t trivial) and go. Expect to see the four major technical pieces of Facebook Platform – FMBL (markup language), FQL (query language), FJS (Javascript library) and the Facebook API to be open sourced and made available to anyone. If they mirror the Open Social approach, third parties will be free to change the Facebook Platform components for their own use and deploy them on their own sites. To have those changes be incorporated into the official versions of Facebook Platform, however, would require Facebook’s approval. This is a nearly inevitable response to Open Social, which is backed by Google, MySpace and Yahoo. Open Social is also an open source platform, run by the Open Social Foundation. Facebook has been looking more and more like a walled garden of late, and they are being regularly out maneuvered by competitors. Time to fight back.
english
<filename>src/models/person.js import name from 'models/shared/name' import phone from 'models/shared/phone' import email from 'models/shared/email' import address from 'models/shared/locations/address' import { relationshipOptions } from 'constants/enums/relationshipOptions' import { DEFAULT_LATEST } from 'constants/dateLimits' const person = { Name: { presence: true, model: { validator: name }, }, Dates: (value, attributes, attributeName, options = {}) => { const { applicantBirthdate } = options return { presence: true, daterange: { earliest: applicantBirthdate, latest: DEFAULT_LATEST }, } }, Rank: (value, attributes) => { if (attributes.RankNotApplicable && attributes.RankNotApplicable.applicable === false) return {} return { presence: true, hasValue: true, } }, Relationship: { presence: true, array: { validator: { presence: true, inclusion: relationshipOptions, }, length: { minimum: 1 }, }, }, RelationshipOther: (value, attributes) => { if (attributes.Relationship && attributes.Relationship.values && attributes.Relationship.values.some(i => i === 'Other')) { return { presence: true, hasValue: true, } } return {} }, MobileTelephone: (value, attributes) => { const requireNumber = !!(attributes.OtherTelephone && attributes.OtherTelephone.noNumber) return { presence: true, model: { validator: phone, requireNumber }, } }, OtherTelephone: (value, attributes) => { const requireNumber = !!(attributes.MobileTelephone && attributes.MobileTelephone.noNumber) return { presence: true, model: { validator: phone, requireNumber }, } }, Email: (value, attributes) => { if (attributes.EmailNotApplicable && attributes.EmailNotApplicable.applicable === false) return {} return { presence: true, model: { validator: email }, } }, Address: { presence: true, location: { validator: address }, }, } export default person
javascript
Actor Siddharth pens adorable B'day wish for Kamal Haasan, calls him 'guru' Chennai, Nov 7 Actor Siddharth, who considers director Mani Ratnam and actor Kamal Haasan his gurus, has penned an adorable birthday wish for the Ulaganayagan, who turned 68 on Monday. Posting a picture of himself with Kamal Haasan on Instagram, Siddharth wrote, "My favourite actor since I was a baby. " The actor also shared the privilege that took 20 years for him to earn, "My guru from a distance my whole working life. It has taken me 20 years as an actor to finally earn the privilege of calling you my co-actor, my Indian forever! " "Thank you for everything Kamal sir. Hopefully, I will earn more of your love, kindness, wisdom and guidance as your follower this coming year. Happy Birthday Greatest! "P. S - my teachers Mani Ratnam and Kamal Haasan are coming back together. As a student, this is an all time high for me! Can't wait to see what the OG dreamers of Tamil Cinema create for the world to marvel at," he added.
english
{ "name": "homebridge-valetudo-xiaomi-vacuum", "version": "0.1.9-beta.2", "description": "A Homebridge plugin for Xiaomi Vacuum Cleaner 1st gen (Mi Robot) and 2nd gen (Roborock S50), with Valetudo installed.", "license": "MIT", "keywords": [ "homebridge-plugin", "xiaomi", "mi robot", "vacuum cleaner", "roborock s50", "xiaomi vacuum gen1", "xiaomi vacuum gen2" ], "repository": { "type": "git", "url": "git+https://github.com/onfoot/homebridge-valetudo-xiaomi-vacuum.git" }, "bugs": { "url": "https://github.com/onfoot/homebridge-valetudo-xiaomi-vacuum/issues" }, "homepage": "https://github.com/onfoot/homebridge-valetudo-xiaomi-vacuum", "engines": { "node": ">=10.0.0", "homebridge": ">=0.4.45" }, "devDependencies": { "eslint": "^7.23.0", "eslint-config-airbnb": "^18.2.1", "eslint-config-airbnb-base": "^14.2.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-react": "^7.23.1", "eslint-plugin-react-hooks": "^1.7.0" } }
json
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.language.objectivec.plugins; import org.gradle.api.Incubating; import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.nativeplatform.plugins.NativeComponentPlugin; /** * A plugin for projects wishing to build native binary components from Objective-C sources. * * <p>Automatically includes the {@link ObjectiveCLangPlugin} for core Objective-C support and the {@link org.gradle.nativeplatform.plugins.NativeComponentPlugin} for native component support.</p> * * <li>Creates a {@link org.gradle.language.objectivec.tasks.ObjectiveCCompile} task for each {@link org.gradle.language.objectivec.ObjectiveCSourceSet} to compile the Objective-C sources.</li> */ @Incubating public class ObjectiveCPlugin implements Plugin<Project> { @Override public void apply(Project project) { project.getPluginManager().apply(NativeComponentPlugin.class); project.getPluginManager().apply(ObjectiveCLangPlugin.class); } }
java
- #CoronavirusHow Dogs Can Help Us Detect COVID-19 And Other Diseases? Can a pregnant woman spread the coronavirus to her foetus? Rome, July 16: Can a pregnant woman spread the coronavirus to her foetus? It's possible, but it seems to be relatively rare and scientists think they know why that is. Many viruses can cross the placenta and infect a foetus in the womb, and evidence has been growing that the coronavirus sometimes can too. Researchers in Italy studied 31 women with COVID-19 who delivered babies in March and April and found signs of the virus in several samples of umbilical cord blood, the placenta and, in one case, breast milk. But this sort of testing can just detect bits of genetic material - it doesn't mean there is virus capable of causing infection in those places. In one case, there was strong evidence suggesting the newborn had the virus at birth because signs of it were found in umbilical cord blood and in the placenta. In another, a newborn had certain coronavirus antibodies that are unable to cross the placenta, so they could not have come from the mother. A report from France gave even stronger evidence of in-the-womb infection, and that newborn was very ill at birth. Meanwhile, research led by the National Institutes of Health gives a possible reason for why foetuses aren't infected more often: cells in the placenta rarely make the two tools that the coronavirus typically uses to gain entry. In contrast, they found plenty of what Zika and another type of virus use. Most research so far has been on women who were in late stages of pregnancy when they got the virus; more research is needed on what happens if infection occurs earlier in pregnancy. The advice to pregnant women remains the same: wear a mask in public, wash hands often and stay at least six feet away from others to avoid infection.
english
#pragma once namespace Prova { class Vector2; class Rect { public: Rect(); Rect(float left, float top, float width, float height); float left; float top; float width; float height; Vector2 GetTopLeft(); Vector2 GetTopRight(); Vector2 GetBottomLeft(); Vector2 GetBottomRight(); }; }
cpp
<gh_stars>0 li { list-style-type: none } input.chat { position: fixed; bottom: 0; } .example-1 { background: url("https://cdn.discordapp.com/attachments/745844596176715806/789417627718123560/unknown.png"); } .Message.right .Bubble { background-color: #0084ff; color: white; } .Message.left .Bubble { background-color: #eee; } .Bubble { padding: 7px 20px; }
css
{ "device_automation": { "condition_type": { "is_bat_low": "Bateria {entity_name} jest roz\u0142adowana", "is_cold": "{entity_name} wykrywa zimno", "is_connected": "{entity_name} jest po\u0142\u0105czone", "is_gas": "{entity_name} wykrywa gaz", "is_hot": "{entity_name} wykrywa gor\u0105co", "is_light": "{entity_name} wykrywa \u015bwiat\u0142o", "is_locked": "{entity_name} jest zamkni\u0119te", "is_moist": "{entity_name} wykrywa wilgo\u0107", "is_motion": "{entity_name} wykrywa ruch", "is_moving": "{entity_name} porusza si\u0119", "is_no_gas": "{entity_name} nie wykrywa gazu", "is_no_light": "{entity_name} nie wykrywa \u015bwiat\u0142a", "is_no_motion": "{entity_name} nie wykrywa ruchu", "is_no_problem": "{entity_name} nie wykrywa problemu", "is_no_smoke": "{entity_name} nie wykrywa dymu", "is_no_sound": "{entity_name} nie wykrywa d\u017awi\u0119ku", "is_no_vibration": "{entity_name} nie wykrywa wibracji", "is_off": "{entity_name} jest wy\u0142\u0105czone", "is_on": "{entity_name} jest w\u0142\u0105czone" } } }
json
{"url": "https://web.archive.org/web/20081022203056/http://www.plannedparenthoodaction.org/campaigns/john-mccain-his-own-words-135.htm", "text": "<NAME> In His Own Words\n\nMcCain has voted consistently against women's health, and he supports overturning the landmark U.S. Supreme Court ruling, Roe v. Wade. These positions will make it difficult for him to win over moderate pro-choice voters in the general election.\n\n\n\nLearn more about McCain's positions on the following issues:\n\n\n\nIn February 2007, the Associated Press quoted McCain as saying, \"I do not support Roe versus Wade. It should be overturned.\"In May 2007, during an appearance on Meet the Press, Sen. McCain reiterated his support for overturning Roe v. Wade, saying, \"I have stated time after time after time that Roe v. Wade was a bad decision, that I support a woman \u0097 the, the rights of the unborn.\" He went on to say, \"My position has been consistently in my voting record, pro-life, and I continue to maintain that position and voting record.\"In 2005, McCain voted NO to allocate $100 million to expand access to preventive health care services that reduce the numbers of unintended and teen pregnancies and reduce the number of abortions. McCain opposed legislation requiring that abstinence-only programs be medically accurate and scientifically based.\n\nMcCain voted NO on legislation that would help reduce the number of teen pregnancies by providing funding for programs to teach comprehensive, medically accurate sexuality education and other programs to prevent unintended teen pregnancies.In 1990, McCain voted NO on legislation to extend the Title X federal family planning program, which provides low-income and uninsured women and families with health care services ranging from breast and cervical cancer screening to birth control.In 2003, McCain voted NO on legislation to improve the availability of contraceptives for women and to require insurance coverage of prescription birth control.In an interview aboard the \"Straight Talk Express,\" McCain struggled to answer questions about comprehensive sex education and HIV prevention. He also stated that he thought he supported \"the president's policy\" on sex education.In 2005, McCain voted NO on legislation to overturn the \"global gag rule,\" which bars non-U.S. nongovernmental organizations from receiving U.S. family planning assistance if the organization (using its own, non-U.S. funds) provides abortion services or information or advocates for pro-choice laws and policies in its own country.\n\nThe word is starting to get out about McCain's rigid anti-woman's health record, but more women across the country need to know the truth.", "images": ["https://web.archive.org/web/20081022203056im_/http://www.plannedparenthoodaction.org/images/hd-other-campaigns.gif", "https://web.archive.org/web/20081022203056im_/http://www.plannedparenthoodaction.org/images/hd-join-network.png", "https://web.archive.org/web/20081022203056im_/http://www.plannedparenthoodaction.org/images/080912-md-McCain.jpg", "https://web.archive.org/web/20081022203056im_/http://www.plannedparenthoodaction.org/images/hd-search.png"], "top_img": "https://web.archive.org/web/20081022203056im_/http://www.plannedparenthoodaction.org/images/080912-md-McCain.jpg", "keywords": [], "authors": [], "canonical_link": "", "title": "Planned Parenthood\u00ae Action Center", "meta_data": {}, "movies": [], "publish_date": null, "source": "https://web.archive.org", "summary": ""}
json
<reponame>Strajk/setup { "alfredsnippet": { "uid": "4cd8ebc4-3783-5b5c-814a-b14b5ae90039", "name": "browser: non-standard properties on window", "snippet": "document.body.appendChild(document.createElement(\"div\")).innerHTML = \"<iframe id='_INJECTED_' style='display:none'></iframe>\"\nObject.keys(window).filter(a => !(a in window.frames[window.frames.length - 1])).sort().forEach((a, i) => console.log(i, a, window[a]))\ndocument.body.removeChild($$(\"#_INJECTED_\")[0].parentNode)\n" } }
json
The Cabinet subcommittee, entrusted with the formulation of a rehabilitation plan for Keralites returning from Gulf countries, is considering plans to make available loans of up to Rs. 20 lakh each for self-employment ventures to groups of five. The committee, which met here on Tuesday, decided to collect information on the kind projects that the Gulf returnees preferred before finalising the scheme. Another round of discussions would be held after contacting applicants and eliciting their interests. Then the proposals would go to the Cabinet for approval. Finance Minister K. M. Mani and Minister for Non-resident Keralites Affairs K. C. Joseph told the media that more than 15,000 applications had already been received for assistance under the rehabilitation scheme. Their tastes were not fully known though many of them wanted to run taxis. Mr. Joseph noted that the banks in the State had NRK deposits of more than Rs. 6,000 crore. So, they would be requested to provide loans under the rehabilitation scheme. The State Financial Enterprises already had a scheme for NRKs. The applicant was to make deposits for five years while working in the Gulf countries. On their return, they would be eligible to receive twice the amount as loans for starting self-employment ventures.
english
At the recently-concluded Asian Games Test event in Jakarta, the 400m women’s relay team was left in a quandary after one of the main runners pulled out at the final moment. The coaches were left with no option but to send Hima Das, who had arrived to compete primarily in the 200m event. It was her first major tournament in the 400m category and her performance caught the eye of the national coaches. Just a month later, competing against the country’s finest 400m runners at the Federation Cup on Tuesday, Das clocked a gold medal effort of 51. 97s, 0. 03s better than the Athletics Federation of India’s CWG qualifying guideline. She also outran the likes of double Asian Games medallist MR Poovamma, who finished third and Vijayakumari, who took the second spot with 53. 03s on the clock. “I am a bit surprised myself. I thought I had completed my race in the 52-second range but finishing under it has me really excited,” said Das, whose pet events just months back were the 100 and 200m. The athlete, who hails from Nagaon district of Assam where her parents work as farmers, was included in the national camp in October. Basant Singh, who assists head coach Galina Bukharina at the 400m camp, said they were looking to build a young team for the 4×400 relay event at the Asian Games and Das would be at the core of it. Das, who finished 5th in the 200m at the 2017 U-18 Worlds in Nairobi, initially wanted to become a footballer. She played as a striker and was in great demand among local village clubs who would utilise her services in return for Rs 500 per match. But Das soon realised football was not her calling as she found it difficult to progress to the next level. “I could not see myself wearing an Indian jersey anytime soon. But here in athletics, with just two years of competition, that dream seems possible,” she said. Das decided to switch to 400m at the insistence of the national camp coaches. “They felt her running style and stride length was much more suited to the 400m event,” explained Nabajit Malakar, one of Das’s former coaches. The switch seems to have paid dividends so far as she has earned a ticket to the CWG at Gold Coast when least expected. “I asked her if she was confident to compete in 400m where we have some really experienced runners. She said she didn’t care. That’s when I fully backed her,” coach Basant says. Apart from football, one of Das’s greatest passions is music and she’s a huge fan of Assamese singer Zubeen Garg. Just before her race at the U-18 Worlds, she yelled out Majuli, her favourite song, in front of the cameras. Months later, she was surprised to receive a call from the singer himself. “I am just going to go to my room and listen to Zubeen da’s songs. Future ko future mein dekh lenge,” she said when asked what her future plans were. The country’s premier javelin thrower, Neeraj Chopra came up with a massive effort of 85. 94m to rewrite the meet record (85. 63m). It was the second-best throw of his career. Neeraj, who had already hit the AFI qualification mark (81. 80m) for the CWG in the first leg of the Indian Grand Prix, feels this throw will give him a lot of confidence ahead of the Gold Coast event. “I feel I am back in my zone. These kinds of throws boost your confidence,” said Chopra. His throw would have earned him a gold at the 2014 Commonwealth Games where Julius Yego was the champion with a best throw of 83. 87m. Keshorn Walcott, who had topped the qualifying round with an effort of 85. 28m, settled for silver as he could manage just 82. 67m in the finals. Neeraj, who has recently returned from a training stint in Germany reputed coach Werner Daniels, had a jam-packed 2017 season which included the World Championships where he was left disappointed at not making the finals. He also suffered a groin injury that forced him to pull out midway at the Zurich Diamond League. But things are falling back into place, Neeraj believes. “I am planning to train under Uwe (Hohn) sir for a while and see how it goes. I have been working extra hard to keep myself injury-free and perform more consistently,” he added. Shot putter Tejinder Pal Toor too made the CWG cut, hurling the iron ball to a distance of 20. 24m, . 04m further than AFI’s guidelines. In the absence of Inderjeet Singh, serving a doping ban, Toor is India’s best bet at the Commonwealth Games. Having missed the World Championship qualification mark last year by a margin of 10cm, Toor was eager to confirm his ticket to Australia. However, he was a little disappointed at not crossing his target of 21m. A fine performance was witnessed in the men’s long jump event where Sreeshankar managed a best jump of 7. 99m, just 1cm short of the 8m AFI qualifying guideline. The 18-year-old also crossed the junior national record of 7. 94m set by Prem Kumar in 2012. “I am really happy with my performance. I won’t be disappointed even if I don’t make the grade for CWG. I think about the long run,” he said.
english
The result is a book that, rather than trying to compare India and China (or include dragons on the cover), tells the story of how the country arrived at this particular moment in the Xi Jinping era – and what that might mean for New Delhi. Scroll.in spoke to Krishnan about this summer’s tensions on the disputed border between the two countries, how trade has not led to closer connections and why he set out to convey a sense of the plurality of voices that are present in China. To get a weekly Q&A with authors, scholars and experts on Indian politics, policy and more, sign up to the Political Fix, Scroll.in’s newsletter on Indian current affairs. Are India and China going to war? You know, the very fact that I can’t give you an answer with full certainty, saying that we are not going to war, is something that I never thought I would have to say in the year 2020. Honestly, I know a lot of people have been saying that they expected the current crisis. I didn’t. I thought that after Doklam [when Indian and Chinese troops had a two-month border face-off in 2017], as I mentioned in the book, I thought that that was as bad as things would get. And I thought that what we saw in the two years after Doklam was an effort by both sides to try and fix some of these problems in the relationship. So the fact that you’re asking me, are we going to war, and I can’t with certainty say no shows you how bad the situation on the boundary is. I have no doubt that it’s the biggest challenge we are facing since 1962. And I don’t think we’re anywhere near the end of it. Did the time around the Doklam crisis, when you were there, feel so volatile? Because right now it feels like it could escalate at any moment. The funny thing is, with Doklam – I was in Beijing – there was a lot more sound and fury from China than we’re seeing today. At that time, there were literally threats of war. There were commentaries from the PLA Daily and the People’s Daily, which have been very silent about the current crisis. And those are the two most authoritative Communist Party media organs. So it’s quite strange that there was a lot more on them then than now. But I will say that the current crisis is of a far greater magnitude, because it’s not one spark, as it was, in the case of Doklam. But it is something that is over multiple areas along the stretch of the Line of Actual Control and Ladakh. And the fact that unlike in Doklam, this is something that has gone to the very fundamentals of the four border agreements that India and China have put a lot of faith in since 1993. And now it seems that many of the core founding principles of the border agreements are being disregarded, which is something that leaves me very concerned. Not just about this current crisis, but about where the relationship goes from here. And where actually the boundary question goes from here as well. I think that since 1988 both sides have agreed on this principle – that they shelve the boundary issue and focus on other areas of the relationship. But I think that after the summer of 2020, the big change is that the boundary is back, front and centre in this relationship, and that really is not a good thing. You include a section in the book making the case that not only should the boundary be settled, but that India should make a bigger pitch for it. How has your thinking on this changed? It is something that I had believed in for a long time, even as many crises have come and gone. And I still think that settling the boundary...I don’t think this summer’s events have changed my fundamental belief that unless the boundary question is settled, it’s not going to be possible to insulate the relationship from it, which is the argument that I make. And I think that this summer’s events have only underscored that, that it was something of an illusion to think that you can keep such a very difficult fundamental question in a small little compartment and work on other areas. And I think that, especially as the relationship has evolved – we’re looking at closer investment relations, a different kind of trading relationship – I think the fact that you have a very unresolved security dilemma at the heart of the relationship is something that can’t be kept away. The point that I make is that the biggest obstacle to the boundary being resolved is this Chinese view that the boundary can be leveraged to some extent and settling it is giving something away to India that they can’t use later. I think that that’s a very deep ingrained sentiment in the Chinese thinking, which is one big obstacle to settlement. Their view is, for example, if you look at the India-China-US triangle, India may say that, okay, we want better relations with China and that can be a case to settle the boundary. The Chinese thinking is, we are giving away something concrete to the Indians, that they can then go back on, that you have no way of holding them to. So why should we give away this leverage that we have? That’s a very deep, ingrained thing in China. The second big difference, I think, is on how India and China see the boundary question. The Indian view is that settling the boundary should be a prerequisite to better relations. But the Chinese view is, the boundary can only be settled if we are in a better place in the relationship. So I think those are very fundamentally contradictory views in how both sides look at the boundary. But having said all that, I think that the point that I make in “The Case For Settling” [a chapter in the book] is we haven’t really had an honest national debate about this. We still look at the boundaries as sacred, even though the fact that any sane, rational person will tell you that the only feasible boundary settlement is going to be along the current status quo, which means India giving up this part of territory that we’ve been told, since we were kids, has always been a part of India. I think it is important for us to actually have a very cold, objective, national conversation on what the costs of settlement are, but also what are the costs of not settling? I think that that’s something that we must really think about. When it comes to Pakistan, India seems to have a good understanding of the shadow theatre, so you can have a situation where Balakot happens and both sides declare victory, and this can happen in part because Delhi and Islamabad understand each other’s domestic constituencies well. Do the people who are making decisions in Delhi and Beijing – or the people who are briefing them – have as good of an understanding? That’s a great question, and I think they don’t, I think that’s a great comparison that you made and a very valid one. And I really think that on both sides of the boundary between India and China, we don’t get how the other is thinking, we don’t really get what the driving impulses behind decision-making are. And I think it’s a China problem, actually, because a lot of countries dealing with China have that problem, simply because of the way in which the policy in China is. The fact that, especially when it comes to strategic issues, there isn’t really a very huge diversity of opinion I’d say now in China as in compared to 10 years ago, when I first moved there. Even during the current crisis, I’ve been struck by the fact that many of the Chinese strategic experts that I speak to, whether off record or on record, to get a sense of what they are thinking – they’ve all been unwilling to speak. And I think it’s part of this change that we’ve seen in China after Xi Jinping took over. And I think it’s not just an India-centric problem. I think you’ve seen that if you look at Americans or Europeans dealing with China or anyone else, for that matter, getting a sense of what drives their policymaking, what the internal debates...I think with India and Pakistan, a lot of that plays out in the open, besides the fact that you do have a cultural commonality that you don’t have with China, which makes it even more complicated. Despite all the opening up we’ve seen over the last couple decades in China, I’d say over the last few years after Xi took over it is regressing on this count, which is something that I certainly came away with when I left in 2018. From the Indian side a lot of it seems like Kremlinology, but for Beijing – trying to figure out, is it Beijing being threatened, is it Article 370, is it a weaker India. How do you see the Indian attempts to figure out what China is thinking? Honestly, I think that looking at all the Indian commentaries, we spend too much time and energy trying to focus on the intention behind actions, rather than looking at what those actions are, what those outcomes are, and how do we deal with that going forward. I think we expend too much energy focusing on things that we may never know with certainty. And my rule of thumb is, and I would say this is worthwhile for anyone interested in China, is when you see somebody declaring with certainty what China’s intentions are on a particular action, be very wary in taking that at face value. I think there’s no way of saying with certainty that Article 370 was a primary reason for China to do what it did in Ladakh. But I think perhaps one reason why a lot of Indian commentators have put that forward is because they have their own grievances with Article 370 and the way that it was done. I think there’s a little bit of projection going on here. So, it’s very possible that Article 370 could be one of many reasons fuelling Chinese insecurities vis a vis India’s actions in Ladakh, whether it was recent upgradation of infrastructure or other things that India is doing. It is very, very possible. [But]...I just think that I always am very careful with not saying with certainty that X, Y, or Z, was the intention behind Chinese action. At the end of the day, I think that is far less important than looking at the outcomes of those actions and how we deal with that. And the funny thing is that you’ve also seen, even though there’s been so much debate and noise about why China is doing things, I think that has taken primary focus over what they’re doing. And I think that we shouldn’t get distracted by that beyond a certain point. You’ve mentioned that Beijing has become harder to read over the Xi era. What about from India’s side of things, has Narendra Modi – who was sold as knowing China, having an informal relationship with Xi – shown that New Delhi has a better understanding of Beijing? If your question is, is there a fundamentally better capacity or capacity building under this government in dealing with China, I would say no. One thing that’s marked this government’s foreign policy, not just China, but even in the neighbourhood or with other countries – a lot of people have pointed to a lack of consistency. Part of it is true with China as well, where you lurch from one crisis to a summit meeting, and is marked by, I think, maybe not the government but the ruling party overselling outcomes. For example, I think Doklam was oversold as this great standing up to China, when I think that the jury’s still out if you look at China’s current positions on the Doklam plateau vis a vis the status quo that we’ve maintained on a very small specific site. Doklam was oversold. I think the informal summits were oversold as well. Even if the diplomats were very careful in saying that the informal summits were the means and not an end and that this is just a part of a conversation, I think there were people associated with the government whose talking points made the summits seem far more significant than they were. Which has now led to very valid questions about why this current crisis is happening if Modi and Xi really reached an agreement as was claimed at the time. I finally don’t think that our capacity to understand China or deal with China has been enhanced in a very great way. And I’ll just give another example: All the moves taken on Chinese apps, for instance, were recently done citing data security and privacy concerns as a reason for taking the actions. But the fact is, I think those of us who have been following China know that the Modi government was in fact courting investment from China, was very happy to have Chinese investment in startups. I saw the number of investor events in Beijing from 2015-2016 onwards, but now, I think they are doing a 180-degree turn because of the boundary crisis, which may be a good reason to do so. But again, I think it goes back to the fact that there isn’t a long-term strategy in dealing with China, either by this government or previous governments as well. What about beyond the government. Are we paying attention to China better? I think that what hasn’t changed is the fact that we tend to pay attention when there’s a crisis, like this year, whether it’s the border crisis, or because of Covid-19. I think that I can speak of the media, given that I’m a part of the media, that we really haven’t bothered much investing in having reporters on the ground in China, which I think is a huge tragedy. Or for example, when sending reporters to China in investing in training them in the language, which is a basic thing that every international publication does. But the Indian media doesn’t do this, they’re quite happy with the journalists relying on English language, Chinese media, and working in a limited way. At the time of this twin crisis of the pandemic and the boundary, we only had two Indian reporters who are based in China working for Indian media organisations, for PTI and for the Hindustan Times. That really tells you it’s quite a sad state of affairs, that there should be paying 15-20 journalists on the ground covering the place from there. We are quite happy to be in our studios, having a conversation about what’s happening there without investing any resources in this exercise. And among the Chinese, is there a mental image of India? You mentioned that talk around Doklam was much louder than this time, is that for a domestic audience? In terms of Chinese media, obviously, the big difference is the fact that it is, broadly speaking, under Communist Party control, even though there are varying degrees of control. So you have some outlets that are given more leeway than others, which is something that I think often gets lost over here. For example, Global Times is given slightly more leeway to be more hawkish and threaten countries. And so it’s less authoritative in that sense in representing the government’s or party’s thinking than, say, the People’s Daily. So I for one would take the People’s Daily editorial on India far more seriously. And something the Global Times says, sometimes only in its English language edition, is essentially trolling to get eyeballs from the Indian public. I think that the biggest difference is that the Chinese public’s consumption of news about India is mediated through party censorship. So a lot of things that they get would be through perhaps an overly nationalistic sense of coverage in China, like the current crisis, or for instance, trying to show India in a bad light, for instance, its inability to contain the Covid pandemic, which is something that’s got a lot of coverage in China over the past few months. And I think that social media in China, mainly WeChat, and Weibo, are playing an increasingly important role as platforms for people to share to share stories about India, which can be good and bad, good in the sense that there’s more on-the-ground perspectives from Chinese who live in India, which sometimes get a lot of attention, and I think should be welcomed, and bad in the sense that you get lots of the equivalent of WhatsApp University-type coverage that goes viral very fast. And when it shows India in a bad light, the censors are quite happy to let it run. What struck me reading the book was the sheer scale of trading between these two countries. China is India’s biggest trading partner, you write of 4 lakh Indians turning up in the business town of Yiwu, and yet those connections have not led to a broader sense of each other. The trade has been going on since the early 2000s. What I wondered is why this did not create the kind of understanding and links there as it did with China-Japan or China-South Korea. Because when China-Korea and China-Japan trade took off, you also had things like a huge increase in flights, for example. And that led to a huge boost in tourism, of the Chinese going to these two countries, of the Chinese sending their kids to study in these two countries. But it didn’t really happen with us. And I think that part of the reason was that this was a very lopsided and one-sided relationship. We didn’t have Indian companies go to China to invest the way that European, even Korean, companies played in China’s economy taking off. For us, it was more about Indians sourcing things from China, and I think about Chinese companies wanting to sell in India, or coming to India to execute projects and then leave. This is a very superficial and surface-level trade trading relationship. It began to change, I think, when China’s outward investment took off, in the 2013-2016 period. India was really at the top of the list. As part of the huge amount of Chinese money going overseas, because Chinese companies looked at India’s tech sector in one place and saw this huge potential, I think that changed the relationship a little bit to make China more invested in India, more invested in the Indian market. I did see some positives come out of that, for example, the Indian tech sector has far more awareness of China than it did a while ago. During my time in Beijing I met a lot of people from Indian tech startups who were coming to Beijing, looking for investment and strategic relationships. I think a lot of that is now thrown into uncertainty and doubt, after this summer and the boundary events, as well as what seems to be a big return to the Indian government not wanting to have these kinds of links with China. Back when things were good, was part of the idea that the problems being solved by Indian and Chinese tech companies similar, and so there was space for connections? I think the view in China was their market kind of reaching saturation, with Alibaba, Tencent. And Baidu. They defined India as the next big thing to Chinese companies because of the sheer size of the market, because of the fact that it is a very similar market to sell to. A common thing that I heard from Chinese tech entrepreneurs was that India now was like China 10 years ago. So they really felt that this was a country that was poised for this huge big leap, and that they were in the best position rather than the Facebooks and Googles to make this change because of what China went through with its big population. They felt that very strongly. And that’s why I think they were investing huge amounts of money over the last few years. And I think we genuinely thought that this was going to be a long-term thing. I honestly think that neither the Indian tech sector nor the Chinese tech sector foresaw the Chinese military moves this summer. I think someone pointed out on Twitter that the PLA is single handedly demolishing the long-term plans of Chinese tech companies in India. May be an exaggeration, but I think that there is a lot of truth to that. You say several times in the book that it’s folly to predict the future of China. But if you had to peer into your crystal ball, where do you see this trading relationship going? I think there will be more of India trying to dilute a little bit of its economic ties with China. I think there was the sense that even before the boundary clash happened in April: We amended the rules to tighten possible takeovers from Chinese companies with Indian companies that may be struggling because of the pandemic economy. So we were seeing this trend even before the boundary crisis happened in early May. One common perception I heard that I tend to agree with is the pandemic seems to be sharpening trends rather than really reversing them. Maybe accelerating trends that would have taken four, five, six years to evolve. I think that as far as India-China relations are concerned, I find it difficult to see us going back to this idea that we can work together and find these areas where we do big things, that are completely insulated from our problems. I think that entire model, which lasted 30 years, and did a fairly good job for 30 years, is now gone. We’re at a very interesting and uncertain time, where we will be looking to find a new way of engaging China, I don’t think we have found that right balance yet where we are going to be more openly and directly confronting these issues such as the boundary, while at the same time trying to manage other areas of the relationship. I don’t think we have found that answer yet. I think we certainly are at a very interesting time, and the beginning of a new phase in the relationship. A big part of the utility of the book for me was that it was a non-Western voice telling us about China. I was curious, did you have access to other non-Chinese, non-Western voices? Say African ones, or other Asian ones? I think there are not so many, and that’s a bad thing. There’s so much interesting journalism and scholarship being done by the Japanese. Some of the sharpest followers of Chinese politics whom I met in Beijing were Japanese journalists. But unfortunately, a lot of their work isn’t accessible to us for linguistic reasons. But more broadly speaking, I don’t think there is enough being done. For example, African scholarship, which you mentioned, maybe it is our own failing if we don’t pay attention to it. But I’m also pretty sure that something that I heard from African journalists colleagues was they’re in the same boat as us, where they feel that their own country has not invested in trying to come up with their own understanding of the place. They are seeking to get context, as a result of which we’re all pretty much living on the same sources. I don’t see that changing. Unfortunately, if you look at India’s own example, you’d think that given the fact that in Asia we have one of the biggest media industries, one of the wealthiest media industries in Asia, the fact that we have done so little in investing in covering the biggest relationship, the most important relationship – whichever way it goes, whether positive or negative – I think, really, it’s a pretty sad indictment of how little we are looking beyond our borders in the kind of journalism that we do. We can only hope this changes. Does that make us more susceptible to a Western view of China, which comes with its own biases and interests? I think it cuts both ways. It makes us more susceptible to, as you say, Western readings of China, but also, it makes us more susceptible to say the kind of interpretations about China that the Chinese government is trying to share at the other end of the spectrum. And I do see both of these competing trends and influences making themselves felt in the way that our academics, journalists look at China. So I think it’s all the more important for us to invest our own resources in trying to come up with understanding the place in a way that’s relevant to us to and our contexts. I tried to avoid doing an India-China comparison book. I think enough of those books have been done. Because I feel that oftentimes things that apply to a Chinese context just don’t apply to an Indian context, because we have very different political systems, economies, societies, histories, cultures. But at the same time, I think that is from my own example of travelling and living in China, there’s so much that we can learn from specific things that they’ve done and there are some specific things that they’ve done that India shouldn’t repeat. For example, if you look at pollution and climate change, and the mistakes that they’ve made, that we are repeating. So I think that it’s so important for us to look at them with our own eyes. And I can only hope we do this in a better way going forward. I think the book is great at showing us the plurality of China, compared to what many people believe is a monolithic space. But I wondered whether you worried about leaning too far towards the other side, showing a place full of debate and dissent, which may not be accurate to the mundane reality of China. That’s a great question. I think it’s always difficult to strike a balance. How do you capture a place with so many different voices? I would only say that my limited takeaway is, even if you don’t see a diversity of opinions being expressed in the Chinese press, because it’s fundamentally different in being under Party control, I don’t think we should assume that the Chinese press is reflective of what people are thinking. Things that people might tell you in confidence may be very different, but they can’t express their views. So the point that I wanted to make in the book was to say that let’s not assume that everyone speaks in the same voice, as they seem to do. So I think a lot of my writing was reacting to those stereotypes. But it’s a fair point that I think in trying to claim a diversity of voices, are you going too far? It’s a good question. But I would rather err on the side of making the point that there are more views in China than less if that makes sense. Is there one thing that you see among Indian scholars, media, even fellow experts that you think is the biggest misconception when it comes to China? I’d say that one pet peeve of mine is, it’s not really a deep misconception, but I wish we would stop paying as much attention to the Global Times as we do every day. It’s understandable, given the fact that there aren’t many English-language sources from China. But the idea that everything that they say is signed off by the top leadership is something I find quite amusing. When you went over the time you spent there in writing the book, was there something that jumped out to you that you wanted to underline? I think the question that you asked previously really hit the nail on the head in terms of what I was trying to do, which was trying to ease out the reality of voices that I encountered while I was in China, which made things very unsettling for me in trying to understand the place and trying to come up with easy arguments to explain the changes that I witnessed over the last nine years. What I really hoped to do was try and bring out a flavour of this. In that sense, it was a very personal challenge for me. I met people who were constantly making me question my own assumptions about the place. Tell us about the newsletter you write. That’s just a weekly foreign affairs newsletter where we try and put together the best foreign affairs coverage the paper has to offer, which sometimes is scattered across different sections of the paper. The idea is to try to give people a sense of what we’ve covered over the past week, some of the best analysis that we have. Right now, it’s something that is focused mostly on our own coverage of foreign affairs, just trying to make it presentable for people. But hopefully we’ll try and expand it going forward, and then why not sources beyond our own. What three reading recommendations would you make to people interested in China and beyond? - I have to recommend this magazine piece which is some of the best journalism I’ve read all year (and has a China angle too): How My Mother and I Became Chinese Propaganda by Jiayang Fan. - The best China podcast out there in my view: The Sinica Podcast. - I am currently reading Superpower Showdown by Bob Davis and Wei Lingling, which is a great account of the US-China trade war and how things got to where they are today.
english
<reponame>MichaelDylan77/PrintTags # -*- coding: utf-8 -*- from datetime import datetime from .colors import Colors from typing import List, Tuple, TextIO, Optional, Callable, Any def _get_datetime() -> str: return datetime.now().strftime('%d-%b-%Y %I:%M:%S%p') def _print_with_color(args: Tuple[Any, ...], color_fn: Callable[[str], str], add_datetime: bool, prefixes: Tuple[Optional[str], ...], sep: str, end: str, closed_ok: bool, file: Optional[TextIO], flush: bool) -> None: _args: List[str] = [str(arg) for arg in args] for prefix in reversed(prefixes): if prefix is None: continue # Add a space to the end of the prefix if is doesn't already have one _args[0] = f'{prefix}{_args[0]}' if prefix.endswith(' ') else f'{prefix} {_args[0]}' if add_datetime: _args[0] = f'{_get_datetime()} {_args[0]}' _args = [color_fn(arg) for arg in _args] try: print(*_args, sep=color_fn(sep), end=color_fn(end), file=file, flush=flush) except ValueError: if closed_ok: pass else: raise def black(*args: Any, add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Prints values in black. Args: add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (any, optional): A string interpolatable value that should be prepended to the print. Default `None`. sep (str, optional): String inserted between values, default is a space. Default `' '`. end (str, optional): String appended after the last value, default is a newline. Default `\n`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file: A file-like object (stream, optional): Defaults to the current sys.stdout. Default `None`. flush (bool, optional): Whether to forcibly flush the stream. Default `False`. """ _print_with_color(args, Colors.black, add_datetime, (prefix,), sep, end, closed_ok, file, flush) def red(*args: Any, add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Prints values in red. Args: add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (any, optional): A string interpolatable value that should be prepended to the print. Default `None`. sep (str, optional): String inserted between values, default is a space. Default `' '`. end (str, optional): String appended after the last value, default is a newline. Default `\n`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file: A file-like object (stream, optional): Defaults to the current sys.stdout. Default `None`. flush (bool, optional): Whether to forcibly flush the stream. Default `False`. """ _print_with_color(args, Colors.red, add_datetime, (prefix,), sep, end, closed_ok, file, flush) def green(*args: Any, add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Prints values in green. Args: add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (any, optional): A string interpolatable value that should be prepended to the print. Default `None`. sep (str, optional): String inserted between values, default is a space. Default `' '`. end (str, optional): String appended after the last value, default is a newline. Default `\n`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file: A file-like object (stream, optional): Defaults to the current sys.stdout. Default `None`. flush (bool, optional): Whether to forcibly flush the stream. Default `False`. """ _print_with_color(args, Colors.green, add_datetime, (prefix,), sep, end, closed_ok, file, flush) def yellow(*args: Any, add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Prints values in yellow. Args: add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (any, optional): A string interpolatable value that should be prepended to the print. Default `None`. sep (str, optional): String inserted between values, default is a space. Default `' '`. end (str, optional): String appended after the last value, default is a newline. Default `\n`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file: A file-like object (stream, optional): Defaults to the current sys.stdout. Default `None`. flush (bool, optional): Whether to forcibly flush the stream. Default `False`. """ _print_with_color(args, Colors.yellow, add_datetime, (prefix,), sep, end, closed_ok, file, flush) def blue(*args: Any, add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Prints values in blue. Args: add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (any, optional): A string interpolatable value that should be prepended to the print. Default `None`. sep (str, optional): String inserted between values, default is a space. Default `' '`. end (str, optional): String appended after the last value, default is a newline. Default `\n`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file: A file-like object (stream, optional): Defaults to the current sys.stdout. Default `None`. flush (bool, optional): Whether to forcibly flush the stream. Default `False`. """ _print_with_color(args, Colors.blue, add_datetime, (prefix,), sep, end, closed_ok, file, flush) def magenta(*args: Any, add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Prints values in magenta. Args: add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (any, optional): A string interpolatable value that should be prepended to the print. Default `None`. sep (str, optional): String inserted between values, default is a space. Default `' '`. end (str, optional): String appended after the last value, default is a newline. Default `\n`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file: A file-like object (stream, optional): Defaults to the current sys.stdout. Default `None`. flush (bool, optional): Whether to forcibly flush the stream. Default `False`. """ _print_with_color(args, Colors.magenta, add_datetime, (prefix,), sep, end, closed_ok, file, flush) def cyan(*args: Any, add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Prints values in cyan. Args: add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (any, optional): A string interpolatable value that should be prepended to the print. Default `None`. sep (str, optional): String inserted between values, default is a space. Default `' '`. end (str, optional): String appended after the last value, default is a newline. Default `\n`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file: A file-like object (stream, optional): Defaults to the current sys.stdout. Default `None`. flush (bool, optional): Whether to forcibly flush the stream. Default `False`. """ _print_with_color(args, Colors.cyan, add_datetime, (prefix,), sep, end, closed_ok, file, flush) def white(*args: Any, add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Prints values in white. Args: add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (any, optional): A string interpolatable value that should be prepended to the print. Default `None`. sep (str, optional): String inserted between values, default is a space. Default `' '`. end (str, optional): String appended after the last value, default is a newline. Default `\n`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file: A file-like object (stream, optional): Defaults to the current sys.stdout. Default `None`. flush (bool, optional): Whether to forcibly flush the stream. Default `False`. """ _print_with_color(args, Colors.white, add_datetime, (prefix,), sep, end, closed_ok, file, flush) # MARK: Tagged color printouts def info(*args: Any, tag_text: Optional[str] = 'info', add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Used for printing basic information. Args: tag_text (str, optional): The text content of the tag that will be prepended to the print. `None` for no tag. Default `'info'`. add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (str, optional): A string interpolatable value that will be prepended to the print. Default `None`. sep (str, optional): string inserted between values, default is a space. Default `' '`. end (str, optional): string appended after the last value, default is a newline. Default `'\n'`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file (TextIO, optional): defaults to the current sys.stdout. Default `None`. flush (bool, optional): whether to forcibly flush the stream. Default `False`. """ tag: Optional[str] = tag_text if tag_text is None else f'[{tag_text}]' _print_with_color(args, Colors.cyan, add_datetime, (prefix, tag), sep, end, closed_ok, file, flush) def success(*args: Any, tag_text: Optional[str] = 'success', add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Used to indicate successful execution. Args: tag_text (str, optional): The text content of the tag that will be prepended to the print. `None` for no tag. Default `'success'`. add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (str, optional): A string interpolatable value that will be prepended to the print. Default `None`. sep (str, optional): string inserted between values, default is a space. Default `' '`. end (str, optional): string appended after the last value, default is a newline. Default `'\n'`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file (TextIO, optional): defaults to the current sys.stdout. Default `None`. flush (bool, optional): whether to forcibly flush the stream. Default `False`. """ tag: Optional[str] = tag_text if tag_text is None else f'[{tag_text}]' _print_with_color(args, Colors.green, add_datetime, (prefix, tag), sep, end, closed_ok, file, flush) def notice(*args: Any, tag_text: Optional[str] = 'notice', add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Used to print important information. Args: tag_text (str, optional): The text content of the tag that will be prepended to the print. `None` for no tag. Default `'notice'`. add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (str, optional): A string interpolatable value that will be prepended to the print. Default `None`. sep (str, optional): string inserted between values, default is a space. Default `' '`. end (str, optional): string appended after the last value, default is a newline. Default `'\n'`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file (TextIO, optional): defaults to the current sys.stdout. Default `None`. flush (bool, optional): whether to forcibly flush the stream. Default `False`. """ tag: Optional[str] = tag_text if tag_text is None else f'[{tag_text}]' _print_with_color(args, Colors.blue, add_datetime, (prefix, tag), sep, end, closed_ok, file, flush) def timeout(*args: Any, tag_text: Optional[str] = 'timeout', add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Used to indicate a timeout. Args: tag_text (str, optional): The text content of the tag that will be prepended to the print. `None` for no tag. Default `'timeout'`. add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (str, optional): A string interpolatable value that will be prepended to the print. Default `None`. sep (str, optional): string inserted between values, default is a space. Default `' '`. end (str, optional): string appended after the last value, default is a newline. Default `'\n'`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file (TextIO, optional): defaults to the current sys.stdout. Default `None`. flush (bool, optional): whether to forcibly flush the stream. Default `False`. """ tag: Optional[str] = tag_text if tag_text is None else f'[{tag_text}]' _print_with_color(args, Colors.yellow, add_datetime, (prefix, tag), sep, end, closed_ok, file, flush) def warn(*args: Any, tag_text: Optional[str] = 'warn', add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Used to highlight that there may be an issue, or that code has improperly executed. Args: tag_text (str, optional): The text content of the tag that will be prepended to the print. `None` for no tag. Default `'warn'`. add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (str, optional): A string interpolatable value that will be prepended to the print. Default `None`. sep (str, optional): string inserted between values, default is a space. Default `' '`. end (str, optional): string appended after the last value, default is a newline. Default `'\n'`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file (TextIO, optional): defaults to the current sys.stdout. Default `None`. flush (bool, optional): whether to forcibly flush the stream. Default `False`. """ tag: Optional[str] = tag_text if tag_text is None else f'[{tag_text}]' _print_with_color(args, Colors.magenta, add_datetime, (prefix, tag), sep, end, closed_ok, file, flush) def error(*args: Any, tag_text: Optional[str] = 'error', add_datetime: bool = False, prefix: Optional[str] = None, sep: str = ' ', end: str = '\n', closed_ok: bool = False, file: Optional[TextIO] = None, flush: bool = False) -> None: """ Can be used to print the description or message associated with an exception. Args: tag_text (str, optional): The text content of the tag that will be prepended to the print. `None` for no tag. Default `'error'`. add_datetime (bool, optional): Whether or not a datetime timestamp should be printed. Default `False`. prefix (str, optional): A string interpolatable value that will be prepended to the print. Default `None`. sep (str, optional): string inserted between values, default is a space. Default `' '`. end (str, optional): string appended after the last value, default is a newline. Default `'\n'`. closed_ok (bool, optional): Whether or not the ValueError raised by a closed stdout should be suppressed. Default `False`. file (TextIO, optional): defaults to the current sys.stdout. Default `None`. flush (bool, optional): whether to forcibly flush the stream. Default `False`. """ tag: Optional[str] = tag_text if tag_text is None else f'[{tag_text}]' _print_with_color(args, Colors.red, add_datetime, (prefix, tag), sep, end, closed_ok, file, flush) if __name__ == "__main__": pass
python
{ "clbid": "0000091300", "credits": 1.0, "crsid": "0000000629", "department": "HIST", "description": [ "This seminar covers the emergence and development of Roman civilization from the founding of Rome to the end of the Western Empire. Students explore such topics as the Greek and Etruscan legacy, evolution from republic to autocracy, the Augustan Age, Pax Romana, social and intellectual trends, the triumph of Christianity and Rome's final transformation. Prerequisite: History 190 or 204 or permission of instructor. May be repeated if topics are different. Offered periodically. Counts toward ancient studies major." ], "enrolled": 20, "gereqs": [ "WRI" ], "instructors": [ "<NAME>" ], "learningmode": "S", "level": 300, "max": 17, "name": "Sem: <NAME>", "number": 303, "offerings": [ { "day": "Mo", "end": "22:00", "location": "HH 515", "start": "19:00" } ], "pn": false, "prerequisites": "History 190 or 204 or permission of instructor. May be repeated if topics are different. Offered periodically. Counts toward ancient studies major.", "revisions": [ { "_updated": "2018-02-02T23:57:17.971497+00:00", "prerequisites": "Prerequisite: History 190 or 204 or permission of instructor. May be repeated if topics are different. Offered periodically. Counts toward ancient studies major." }, { "_updated": "2018-07-12T16:51:12.399378+00:00", "enroll": null, "max": null }, { "_updated": "2018-08-07T14:48:06.370240+00:00", "enroll": "20", "max": "17" }, { "_updated": "2020-10-15T15:23:48.953131+00:00", "learningmode": null } ], "semester": 1, "status": "C", "term": 20131, "title": "Roman Civilization", "type": "Seminar", "year": 2013 }
json
function include(scriptUrl) { document.write('<script src="' + scriptUrl + '"></script>'); } function isIE() { var myNav = navigator.userAgent.toLowerCase(); return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false; }; /* Jquery 2.1.1.js ========================================================*/ include('js/jquery-2.1.1.js'); /* Bootstrap min ========================================================*/ include('js/bootstrap.min.js');
javascript
/* * The MIT License * * Copyright 2018 WildBees Labs. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.wildbeeslabs.jentle.algorithms.genetics.knapsack; import com.wildbeeslabs.jentle.collections.utils.CUtils; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Objects; import lombok.AccessLevel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.Setter; import lombok.ToString; /** * * Custom member set implementation * * @author Alex * @version 1.0.0 * @since 2017-08-07 * @param <T> */ @Data @EqualsAndHashCode @ToString public class CMemberSet<T extends CMember> { /** * Default member set */ @Setter(AccessLevel.NONE) protected final List<T> members; public CMemberSet(int initialSize, boolean isNew) { assert (initialSize > 0); members = new ArrayList<>(initialSize); if (isNew) { createNewPopulation(initialSize); } } protected T getFittest() { T fittest = this.members.get(0); for (int i = 0; i < this.members.size(); i++) { if (fittest.getFitness() <= this.getMember(i).getFitness()) { fittest = getMember(i); } } return fittest; } private void createNewPopulation(int size) { final Class<? extends T> clazz = (Class<? extends T>) this.members.getClass(); for (int i = 0; i < size; i++) { final T person = CUtils.getInstance(clazz); this.members.add(i, person); } } public T getMember(int index) { assert (index > 0); if (Objects.nonNull(this.members) && index < this.members.size()) { return this.members.get(index); } return null; } public void setMember(int index, final T value) { assert (index > 0); if (Objects.nonNull(this.members) && index < this.members.size()) { this.members.set(index, value); } } public void setMembers(final Collection<T> members) { this.members.clear(); if (Objects.nonNull(members)) { this.members.addAll(members); } } public void addMember(final T member) { if (Objects.nonNull(member)) { this.members.add(member); } } public void removeMember(final T member) { if (Objects.nonNull(member)) { this.members.remove(member); } } }
java
As a player at the Texas Christian University (TCU), British Tennis player Cameron Norrie once ran a 10km marathon post his training session. The 27-year-old, who has competed in marathon five-setters on the ATP Tour circuit in the past, got the better of world number two Carlos Alcaraz of Spain with a 4-6, 6-4, 7-5 win in the final of the Rio Open in Argentina to claim his fifth ATP Tour title. Norrie, who had reached Wimbledon semi-finals last year, before his loss against Novak Djokovic, is known for his fitness drills in the tennis circuit and that’s what his coach Devin Bowen had recalled. “On his day off, he loves to run. He loves long-distance running as a hobby. There was a 10K in town and he just went and he didn’t text, he just did it. He ran the 10K and won it. It was like, ‘Yes, that’s great that you did that, but the whole point of today was to rest your body and we’re going to start up again. ’ So he won the Fort Worth 10k, and that was just on a day off. It kind of gives you an idea of what kind of animal you’re dealing with,” Devin Bowen, assistant coach at TCU had told ATP Tour in an interview earlier. Born to a Scottish father and a Welsh mother in Johannesburg in South Africa, a young Norrie grew up in Auckland and also represented New Zealand at the junior level. According to his mother Helen as reported by The Guardian, the youngster’s first tennis racket was a refurbished squad racket and Norrie played with it at the age of six in their backyard in their home in Auckland. Norrie moved to London having pledging allegiance to Britain at the age of 16 and was chosen for a scholarship at the Texas Christian University supported by London Tennis Association. He spent more than four years in the USA before turning professional in 2017. Within an year, Norrie won his first Davis Cup match with a win over the then world number 23 Roberto Bautista Agut with former British Davis Cup captain John Lloyd terming his debut as one of the most impressive debuts in Davis Cup. The year also saw him making his Wimbledon main draw debut, where he lost to Jo-Wifried Tsonga in the first round before he made a second round appearance in the US Open. Starting 2021 at a world ranking of 74th, Corrie had 52 single’s wins on the ATP Tour with two titles resulting in his rise to world number 12. Norrie broke into the top-1 in world rankings last year with his fourth ATP Tour title in Lyon, France before he reached the Wimbledon semi-finals with a 3-6, 7-5, 2-6, 6-3, 7-5 win over David Goffin. Though he lost to eventual champion Djokovic in the semi-finals in a four-set match, Norrie termed the quarter-final win against Goffin as a crazy day. He would also cycle from his London home to Wimbledon courts during the tournament. “Not had too much time for it to sink in, but it was just a crazy day, and to do it in the way that I did in five sets, coming back from two-sets-to-one, I can’t really describe it. Just a lot of emotions, and a pretty sick match to get through. I’m just glad they (his parents) got to witness it and they definitely deserve a glass of wine each. ” Norrie had told Sky Sports post the match. Last December, Norrie scored a 3-6, 6-3, 6-4 win over former world number one Rafael Nadal in a United Cup match. He had never won a set against Nadal in their four previous matches but his win gave Great Britain a 1-0 lead in the tie. Sunday’s title was Norrie’s fifth title on the ATP Tour and the 27-year-old won the match with an ace in the final set to win his second title on clay. “It’s so special to win this one especially after losing a couple of finals already this year. I had to do it the tough way, I was a set and a break down and 0-30 on my serve. I managed to flick a switch and turn it around, so it was a good day. ” Norrie said post the win. The 27-year-old also plans to run marathons post his tennis career. On being asked about his love for running, he had shared his views on running marathons post his tennis career. “I would maybe like to after tennis. I quite enjoy running, but I haven’t been able to do that much. I feel like when I’m resting, I have to chill and relax rather than I think maybe three years ago my team were like, ‘All right, rest’, and then I’ll go the next day and run a little bit. I feel like now I’ve been a bit better with that and not really going out and running too much. I’m able to kind of rest and maybe do something different, try to play golf or do something like that rather than go out and run. ” Corrie had told ATP Tour earlier.
english
["blob-log","cordova-plugin-amplify-pay","cordova-plugin-amplify-payment","cordova-plugin-require-bluetoothle","fekitvm","generator-neoui-react","generator-tinper-bee","http-download","logiblock-launchupdate","midiplex","npm-2","npm-beta","npm-for-cnpm","npm2","omegapm","piece-storage","piece-verification","qmb","repo-npm","rinh-node-tar","rsa-stream","salty","sillyscope","tar","tar-edison","tar-fixed","tj-npm","yapm"]
json
.footer { height: 55px; }
css
A free program for iPhone, by Bhalala Hiren Bharatbai. A full version program for iPhone, by GM APPDEV LIMITED. Junkyard Keeper - Manage Your Own Junkyard! A full version program for iPhone, by 思语 明.
english
<gh_stars>100-1000 { "resource": "/{proxy+}", "path": "/hello/world", "httpMethod": "POST", "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "cache-control": "no-cache", "CloudFront-Forwarded-Proto": "https", "CloudFront-Is-Desktop-Viewer": "true", "CloudFront-Is-Mobile-Viewer": "false", "CloudFront-Is-SmartTV-Viewer": "false", "CloudFront-Is-Tablet-Viewer": "false", "CloudFront-Viewer-Country": "US", "Content-Type": "application/json", "headerName": "headerValue", "Host": "gy415nuibc.execute-api.us-east-1.amazonaws.com", "Postman-Token": "<PASSWORD>", "User-Agent": "PostmanRuntime/2.4.5", "Via": "1.1 d98420743a69852491bbdea73f7680bd.cloudfront.net (CloudFront)", "X-Amz-Cf-Id": "pn-PWIJc6thYnZm5P0NMgOUglL1DYtl0gdeJky8tqsg8iS_sgsKD1A==", "X-Forwarded-For": "172.16.17.32, 172.16.58.3", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" }, "queryStringParameters": { "name": "me" }, "pathParameters": { "proxy": "hello/world" }, "stageVariables": { "stageVariableName": "stageVariableValue" }, "requestContext": { "accountId": "12345678912", "resourceId": "roq9wj", "stage": "testStage", "requestId": "deef4878-7910-<PASSWORD>", "identity": { "cognitoIdentityPoolId": null, "accountId": null, "cognitoIdentityId": null, "caller": null, "apiKey": null, "sourceIp": "192.168.196.186", "cognitoAuthenticationType": null, "cognitoAuthenticationProvider": null, "userArn": null, "userAgent": "PostmanRuntime/2.4.5", "user": null }, "resourcePath": "/{proxy+}", "httpMethod": "POST", "apiId": "gy415nuibc" }, "body": "{\"inputMsg\": \"ping\"}" }
json
// // Copyright © 2021 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #pragma once #include "NeonBaseWorkload.hpp" #include <arm_compute/core/Error.h> #include <arm_compute/runtime/NEON/functions/NECast.h> namespace armnn { arm_compute::Status NeonCastValidate(const TensorInfo& input, const TensorInfo& output); class NeonCastWorkload : public NeonBaseWorkload<CastQueueDescriptor> { public: NeonCastWorkload(const CastQueueDescriptor& descriptor, const WorkloadInfo& info); virtual void Execute() const override; private: mutable arm_compute::NECast m_CastLayer; }; } // namespace armnn
cpp
<reponame>alopatindev/cargo-lim use cargo_metadata::diagnostic::{Diagnostic, DiagnosticLevel, DiagnosticSpan}; use getset::Getters; use serde::{Deserialize, Serialize}; use std::path::{Path, PathBuf}; #[derive(Deserialize, Serialize, Getters)] pub struct EditorData { #[get = "pub"] workspace_root: PathBuf, files: Vec<SourceFile>, } #[derive(Deserialize, Serialize)] pub struct SourceFile { path: PathBuf, line: usize, column: usize, message: String, level: DiagnosticLevel, } impl EditorData { pub fn new(workspace_root: &Path, source_files_in_consistent_order: Vec<SourceFile>) -> Self { let workspace_root = workspace_root.to_path_buf(); Self { workspace_root, files: source_files_in_consistent_order, } } } impl SourceFile { pub fn new(span: DiagnosticSpan, diagnostic: &Diagnostic, workspace_root: &Path) -> Self { let path = PathBuf::from(span.file_name); let path = if path.is_relative() { workspace_root.join(&path) } else { path }; Self { path, line: span.line_start, column: span.column_start, message: diagnostic.message.clone(), level: diagnostic.level, } } }
rust
GREEN BAY, Wis. 2 May (AP/UNB) — Patrons fled a Wisconsin casino after gunshots broke out Saturday evening, with one witness saying at least two people were shot. The attack happened around 7:30 p.m. at the Oneida Casino, operated by the Oneida Nation on the western side of Green Bay. Tribe spokeswoman Bobbi Webster said “individuals” had been shot, but she didn’t have information on how many or their conditions. Attorney General Josh Kaul tweeted shortly before 10 p.m. that the scene “is contained. There is no longer a threat to the community.” He gave no other details and an agency spokeswoman didn’t immediately respond to a message. Green Bay police and the Brown County Sheriff’s Office told The Associated Press they had no details on the casino incident. Jawad Yatim, a witness, said at least two people were shot. Yatim said the shooting began in a casino restaurant. “We got the hell out of there, thank God we’re OK, but obviously we wish the best for everybody who’s been shot,” he said. Webster said the casino is connected to a large hotel and conference center, the Radisson, also owned by the Oneida Nation. Gambler Max Westphal said he was standing outside after being evacuated for what he thought was a minor issue. Gov. Tony Evers issued a statement late Saturday saying he was “devastated” to hear about the shooting, but gave no details. The Oneida tribe’s reservation lies on the west side of the Green Bay area. Associated Press writer Doug Glass contributed from Minneapolis; Mayuko Ono contributed from London.
english
Bhubaneswar: Ahead of Dussehra, the state cabinet Monday raised the monthly remunerations of all contractual employees by 50 per cent. Briefing media after the meeting, Law Minister Pratap Jena said contractual employees will now be called ‘Initial Appointees’ and their existing remuneration will be increased by 50 per cent from the first year of appointment till regularization of their services. Their appointments would be made permanent after six years, he said. The employees will also receive medical reimbursement benefits like permanent employees. All contractual employees of Groups-B, C and D categories will benefit from the move, Jena said. The cabinet decided to make necessary amendments to the (Contractual Appointment) Rules, 2013 for this purpose. The government will have to bear an additional Rs250 crore every year towards the enhanced remuneration, said Jena. As per the decision, a Group-B contractual employee will now receive `25,300 per month from existing `16,880. Similarly, Group-C employees who get `8,750 and `10,000 per month on the first year of appointment will now draw `13,100 and `15,000 respectively. Moreover, the monthly salary of contractual Group-D employees (first year of service) has been increased to `12,100 for those getting `8,070 now and `12,600 for those drawing `8,390. Keeping in view the rate of inflation, the government has decided to revise the remuneration of such employees, an official said. Three tenders containing six mega drinking water projects worth `1,282. 01 crore under Jal Jeevan Mission (JMM) were also approved by the cabinet, said Jena. The projects would be implemented in Ganjam, Rayagada, Boudh and Kandhamal districts. All six projects are targeted for completion within a period of 24 months, he said. Individual households in blocks like Rangeilunda, Ganjam, Khalikote, Kashipur, Rayagada, Harbhanga, Phiringia, Phulbani, Chakadapada, Khajuripada and K Nuagaon would get piped water supply through these projects. Two rural piped water supply projects worth `325. 75 crore have been approved for 86 GPs of Ganjam district, another two projects of `657. 57 crore approved for 71 GPs in Boudh and Kandhamal districts. Besides, two drinking water supply projects will be executed in 28 GPs of Rayagada district at a cost of Rs. 298. 69 crore. The panel has given its approval for laying the annual report of the Lokayukta for 2020 in the state Assembly.
english
Will Pique move to the USA to join David Beckham’s upcoming MLS franchise after his Barcelona career With the January transfer window around the corner, the media is abuzz with transfer rumours flying thick and fast. There has been a buzz around many a player and club, some needing reinforcements, others seeking moves away from their respective clubs for more than a single reason. Nonetheless, the January window is poised to give us some interesting news. Here are the top transfer news and rumours of the day from leagues around Europe. Turin giants Juventus are reported to be keen on landing Borussia Dortmund midfield enforcer Ilkay Gundogan. The German International has a contract which extends til 2017 but is rumored to be content on waiting till the end of the season to make a decision on his next move. Former England, Chelsea and Arsenal left back Ashley Cole is said to be looking for a fresh lease of life as he is linked to a move to the MLS after a disastrous spell with AS Roma. It has been suggested that Cole is likely to join former England captain Steven Gerard at LA Galaxy in the USA. AC Milan duo Antonio Nocerino and Diego Lopez have reportedly been placed on the transfer list by the club. It has been understood that the pair have fallen out of manager Sinisa Mihajlovic’s plans and that there was no way back for the duo. Former Real Madrid keeper Lopez is said to be the target for Premier League clubs and while Genoa are keen on Nocerino. Gerard Pique has been invited by former Real Madrid and Manchester United winger David Beckham to join his upcoming MLS Miami franchise after the defender winds up his career at the Nou Camp. Though the defender has not given his confirmation to the former England captain, it is being reported that Pique’s reaction has been ‘positive’. It is also understood that Pique as always dreamed of a move to the MLS during the twilight of his career and feels the United States is the perfect place for his post-retirement business plans. In an astonishing development, it has been reported that Real Madrid star James Rodriguez is set to be a target for 20-time Premier League champions Manchester United. The Columbian is said to have a strained relationship with Los Blancos manager Rafael Benitez and wants a move away from Spain. United are said to be very interested in signing the 24-year-old and have funds available to bring the midfielder to the Premier League in January. Ukraine winger Andriy Yarmalenko has emerged as a surprise target for Spanish powerhouses Real Madrid. The star who has been with Dynamo Kyiv 2007 was a potential target for Real’s arch-rivals Barcelona, but the Catalans have dropped their interest in the Ukrainian International. A number of Premier League clubs have also been credited with an interest, but it is thought that the Ukrainian favours a move to Spain. Benfica are reportedly close to securing the services of Barcelona youngster Alex Grimaldo. It is believed that the 20-year-old is highly regarded at Camp Nou, but he is yet to make a senior appearance for the Catalans. In a sensational move, Arsene Wenger is reportedly keen to sign former Manchester United striker Javier Hernandez from German side Bayer Leverkusen for a fee of 13. 2 million pounds. The Mexican has been in sensational form for the Bundesliga outfit this season. With Arsenal in the market for a quality striker, they are expected move ahead and try to sign him in the winter transfer window. Wenger is also on the hunt for a defensive midfielder following injuries to Santi Cazorla and Francis Coquelin and has reportedly sent scouts to Porto to check out the 24-year-old FC Porto midfielder Danilo Pereira. Reportedly, Arsenal have been impressed by the Portuguese international and are now ready to make a swoop for him next month. Porto are likely to be reluctant sellers, having only signed Pereira from Maritimo last summer, but may be tempted by a big-money offer. Radamel Falcao is set to leave Chelsea after another disastrous spell in England. The Colombian, still on loan from Monaco, has flopped at both Manchester United last season and now Chelsea and is a major January target for Mexican side Club America. Arsenal are set to send Calum Chambers back to Southampton on a six-month loan deal in January. The 20-year-old who was bought from the Saints in 2014, has found first-team opportunities hard to come by in north London and Wenger feels he needs more experience. Manchester City are set to land Bayern Munich manager Pep Guardiola after offering him the most lucrative contract in the history of football. The Spanish coach is said to be offered a record-shattering €25 million (£18m) per season to manage the Citizens next season. Ever since Guardiola has announced his decision to not extend his contract with the Bavarians after this season, he has been linked with almost all the big Premier League clubs including Manchester United, Chelsea and Arsenal. However, it appears that City have stolen a march ahead of their league rivals in landing the most sought-after manager in Europe. Liverpool manager Jurgen Klopp has reportedly enhanced his interest in Schalke 04 defender Joel Matip. Recent speculation had claimed that Klopp was prepared to wait until the summer to sign the 24-year-old when his contract with his current club is due to expire. However, having lost both Martin Skrtel and Dejan Lovren to injuries in recent days, the Liverpool boss is now short of options in the centre of defence and will make a move for the defender next month. Paris Saint-Germain are set to tie down Italian midfielder Marco Verratti to a new five-year contract, as the Ligue 1 champions attempt to hold onto one of their prized assets. Veratti has been one of the best young talents in the world and has impressed with his consistent performances for club and country. Though the 23-year-old is contracted with the club until 2019, the French Champions are reportedly trying to ward off potential interest in the youngster with an improved five-year deal.
english
Why is Imlie fame Sumbul Touqeer Khan's educational qualification being discussed online? Sumbul Touqueer Khan is all set for his next show. However, the actress ended up getting trolled for her onscreen character. Sumbul Touqueer Khan was seen in a small role in the historic drama Jodha Akbar and the romantic drama Isharon Isharon Mein. However, her breakthrough role could well be considered as the village girl Imlie in the romantic drama Imlie opposite Gashmeer Mahajani, Fahmaan Khan and Mayuri Deshmukh who were seen essaying the role of Aditya, Aryan and Malini respectively. Sumbul courted praise for her gorgeous looks, fine acting chops and endearing screen presence. The 19-year-old got further praised for her sizzling chemistry with the male leads too. After a successful stint in Imlie, she went on to participate in the controversial yet popular reality show Bigg Boss season 16. Things were not easy for her as a teenager but she managed to come through and emerged as a semi-finalist. Recently it was announced that Imlie fame actress would be seen on Kavya. Following this news, while her presence is much awaited, she also got trolled and here’s the reason why. The Imlie fame actress has also featured in two romantic videos Ishq Ho Gaya Hai where she was reunited with her Imlie co-star Fahmaan Khan and Saazishen opposite Radha Krishna fame Sumedh Mugdhakar. After her mother’s death, the 19-year-old decided to take over the responsibilities of her household in order to give a better life to her family. Apart from acting, Sumbul also excels in poetry and dance for which she was praised on Bigg Boss 16. Sumbul Touqueer Khan is known for her roles in Ishaaron Ishaaron Mein and Imlie. She also featured in the Bollywood film Article 15. She was last seen in Bigg Boss season 16. NET Worth: ~ 41.7 MN USD (RS 345 cr)
english
package org.diskfish.effective.java.ch2.render; public interface RenderProvider { RenderService newRender(); }
java
<filename>credential/source/deprecated/src/main/java/org/wildfly/security/credential/source/CredentialStoreCredentialSource.java /* * JBoss, Home of Professional Open Source. * Copyright 2016 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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 org.wildfly.security.credential.source; import java.io.IOException; import java.security.GeneralSecurityException; import java.security.spec.AlgorithmParameterSpec; import org.wildfly.common.Assert; import org.wildfly.security.FixedSecurityFactory; import org.wildfly.security.SecurityFactory; import org.wildfly.security.auth.SupportLevel; import org.wildfly.security.credential.Credential; import org.wildfly.security.credential.store.CredentialStore; import org.wildfly.security.credential.store.UnsupportedCredentialTypeException; import static org.wildfly.security.credential.source.ElytronMessages.log; /** * A credential source which is backed by an entry in a credential store. * * @author <a href="mailto:<EMAIL>"><NAME></a> * @author <a href="mailto:<EMAIL>"><NAME></a> * @deprecated Use {@link org.wildfly.security.credential.source.impl.CredentialStoreCredentialSource} instead */ @Deprecated public final class CredentialStoreCredentialSource implements CredentialSource { private final SecurityFactory<CredentialStore> credentialStoreFactory; private final String alias; /** * Construct a new instance. * * @param credentialStoreFactory the credential store factory (must not be {@code null}) * @param alias the credential store factory alias (must not be {@code null}) */ public CredentialStoreCredentialSource(final SecurityFactory<CredentialStore> credentialStoreFactory, final String alias) { Assert.checkNotNullParam("credentialStoreFactory", credentialStoreFactory); Assert.checkNotNullParam("alias", alias); this.credentialStoreFactory = credentialStoreFactory; this.alias = alias; } /** * Construct a new instance. * * @param credentialStore the literal credential store (must not be {@code null}) * @param alias the credential store factory alias (must not be {@code null}) */ public CredentialStoreCredentialSource(final CredentialStore credentialStore, final String alias) { this(new FixedSecurityFactory<>(Assert.checkNotNullParam("credentialStore", credentialStore)), alias); } public SupportLevel getCredentialAcquireSupport(final Class<? extends Credential> credentialType, final String algorithmName, final AlgorithmParameterSpec parameterSpec) throws IOException { Assert.checkNotNullParam("credentialType", credentialType); try { final CredentialStore credentialStore = credentialStoreFactory.create(); return credentialStore.exists(alias, credentialType) ? SupportLevel.POSSIBLY_SUPPORTED : SupportLevel.UNSUPPORTED; } catch (UnsupportedCredentialTypeException e) { return SupportLevel.UNSUPPORTED; } catch (GeneralSecurityException e) { throw log.unableToReadCredential(e); } } public <C extends Credential> C getCredential(final Class<C> credentialType, final String algorithmName, final AlgorithmParameterSpec parameterSpec) throws IOException { Assert.checkNotNullParam("credentialType", credentialType); try { final CredentialStore credentialStore = credentialStoreFactory.create(); if (log.isTraceEnabled()) { log.tracef("CredentialStoreCredentialSource: obtaining credential: type = %s algorithm = %s exists = %b", alias, credentialType, credentialStore.exists(alias, credentialType)); } return credentialStore.retrieve(alias, credentialType, algorithmName, parameterSpec); } catch (UnsupportedCredentialTypeException e) { return null; } catch (GeneralSecurityException e) { throw log.unableToReadCredential(e); } } }
java
import unittest from unittest import mock from unittest.mock import PropertyMock from prompt_toolkit.clipboard import ClipboardData from prompt_toolkit.document import Document from prompt_toolkit.selection import SelectionState, SelectionType from docengine import Doc from document_editor import DocumentEditor @unittest.mock.patch("document_editor.get_app") @unittest.mock.patch("document_editor.MessageService") def test_document_editor_do_cut(mock_msg_service, mock_get_app): # get sample patches doc = Doc() doc.site = 0 test_str = "Test string, quite a long one! Yeah, sure..." patches = [] for idx, c in enumerate(test_str): patches.append(doc.insert(idx, c)) msg_srv_instance = mock_msg_service.return_value() mock_msg_service.return_value.prepare_send_request.return_value = None mock_msg_service.return_value.put_message.return_value = None document_editor = DocumentEditor(msg_srv_instance) for patch in patches: document_editor.update_text(patch) document_editor.text_field.buffer.selection_state = \ SelectionState(4, SelectionType.CHARACTERS) document_editor.do_cut() # check if only Test word left assert document_editor.doc.text == "Test" cut_data = mock_get_app.return_value.clipboard.set_data\ .call_args[0][0] # check if correct text was sent to clipboard assert cut_data.text == ' string, quite a long one! Yeah, sure...' @unittest.mock.patch("document_editor.MessageService") def test_document_editor_do_del(mock_msg_service): # get sample patches doc = Doc() doc.site = 0 test_str = "Test string, quite a long one! Yeah, sure..." patches = [] for idx, c in enumerate(test_str): patches.append(doc.insert(idx, c)) msg_srv_instance = mock_msg_service.return_value() mock_msg_service.return_value.prepare_send_request.return_value = None mock_msg_service.return_value.put_message.return_value = None document_editor = DocumentEditor(msg_srv_instance) for patch in patches: document_editor.update_text(patch) document_editor.text_field.buffer.selection_state = \ SelectionState(4, SelectionType.CHARACTERS) document_editor.do_delete() assert document_editor.doc.text == "Test" @unittest.mock.patch("document_editor.get_app") @unittest.mock.patch("document_editor.MessageService") def test_document_editor_do_copy(mock_msg_service, mock_get_app): # get sample patches doc = Doc() doc.site = 0 test_str = "Test string, quite a long one! Yeah, sure..." patches = [] for idx, c in enumerate(test_str): patches.append(doc.insert(idx, c)) msg_srv_instance = mock_msg_service.return_value() mock_msg_service.return_value.prepare_send_request.return_value = None mock_msg_service.return_value.put_message.return_value = None document_editor = DocumentEditor(msg_srv_instance) for patch in patches: document_editor.update_text(patch) document_editor.text_field.buffer.selection_state = \ SelectionState(4, SelectionType.CHARACTERS) document_editor.do_copy() # assert that document remains unchanged assert document_editor.doc.text == "Test string, quite a long one!" \ " Yeah, sure..." copied_data = mock_get_app.return_value.clipboard.set_data \ .call_args[0][0] # check if correct text was sent to clipboard assert copied_data.text == ' string, quite a long one! Yeah, sure...' @unittest.mock.patch("document_editor.get_app") @unittest.mock.patch("document_editor.MessageService") def test_document_editor_do_paste(mock_msg_service, mock_get_app): # get sample patches doc = Doc() doc.site = 0 test_str = "Test string, quite a long one! Yeah, sure..." patches = [] for idx, c in enumerate(test_str): patches.append(doc.insert(idx, c)) msg_srv_instance = mock_msg_service.return_value() mock_msg_service.return_value.prepare_send_request.return_value = None mock_msg_service.return_value.put_message.return_value = None document_editor = DocumentEditor(msg_srv_instance) for patch in patches: document_editor.update_text(patch) document_editor.text_field.buffer.selection_state = \ SelectionState(4, SelectionType.CHARACTERS) mock_get_app.return_value.clipboard.get_data.return_value = \ ClipboardData("TEST") document_editor.do_paste() # assert that document remains unchanged assert document_editor.doc.text == "Test string, quite a long one!" \ " Yeah, sure...TEST"
python
<filename>aliyun-java-sdk-retailbot/src/main/java/com/aliyuncs/retailbot/model/v20210224/ListIndustryPackagesResponse.java /* * 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 com.aliyuncs.retailbot.model.v20210224; import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.retailbot.transform.v20210224.ListIndustryPackagesResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class ListIndustryPackagesResponse extends AcsResponse { private String requestId; private Boolean success; private String code; private String message; private PackagePage packagePage; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public PackagePage getPackagePage() { return this.packagePage; } public void setPackagePage(PackagePage packagePage) { this.packagePage = packagePage; } public static class PackagePage { private Integer nextToken; private Integer maxResults; private Integer totalCount; private List<_Package> packages; public Integer getNextToken() { return this.nextToken; } public void setNextToken(Integer nextToken) { this.nextToken = nextToken; } public Integer getMaxResults() { return this.maxResults; } public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } public Integer getTotalCount() { return this.totalCount; } public void setTotalCount(Integer totalCount) { this.totalCount = totalCount; } public List<_Package> getPackages() { return this.packages; } public void setPackages(List<_Package> packages) { this.packages = packages; } public static class _Package { private String packageName; private String packageCode; private String packageType; private String packageDescription; private String createTime; private String modifyTime; private String createUserId; private String modifyUserId; public String getPackageName() { return this.packageName; } public void setPackageName(String packageName) { this.packageName = packageName; } public String getPackageCode() { return this.packageCode; } public void setPackageCode(String packageCode) { this.packageCode = packageCode; } public String getPackageType() { return this.packageType; } public void setPackageType(String packageType) { this.packageType = packageType; } public String getPackageDescription() { return this.packageDescription; } public void setPackageDescription(String packageDescription) { this.packageDescription = packageDescription; } public String getCreateTime() { return this.createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public String getModifyTime() { return this.modifyTime; } public void setModifyTime(String modifyTime) { this.modifyTime = modifyTime; } public String getCreateUserId() { return this.createUserId; } public void setCreateUserId(String createUserId) { this.createUserId = createUserId; } public String getModifyUserId() { return this.modifyUserId; } public void setModifyUserId(String modifyUserId) { this.modifyUserId = modifyUserId; } } } @Override public ListIndustryPackagesResponse getInstance(UnmarshallerContext context) { return ListIndustryPackagesResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
java
{"rating": "5", "uuid": "404", "review_date": "2012-12-15", "helpful": "1", "reviewer_id": "AP4UV32MDRGML", "not_helpful": "1", "review_text": "This little machine works like a breeze. Well made and easy clean up. The biggest problem I have noticed is that relatively few people know how cold their freezer is (as well as their fridge). I bought a device to show me the temps and now i keep my freezer at 0F and my fridge at 34F-35F - and I have not had any problems keeping the bowl cold enough to freeze up the cream. So easy and fast - as well as fresh good ingredients have made possessing this machine a delight. I highly recommend it as well as recommending all of us periodically checking the temps in both our freezers and fridges.There are 2 main reasons for failure to get the ice cream to freeze - first is your freezer is not cold enough to freeze the bowl through and through. The 2nd reason is inappropriate ingredients that prevent the cream from freezing. Some of these ingredients are anything with alcohol, fresh citrus fruits (orange, lemon, grapefruit, etc) and kiwi - amongst some others. Seems to me that anything that will prevent jello from 'setting' will also prevent ice cream from freezing properly. The ice cream when it is done will also not be hard, like the ice cream you get in stores, but of the soft variety that you get from like a Diary Queen - soft ice cream. If you want it firmer or harder, put it into a different container and put it back in the freezer. Now get creative and enjoy the fruits of your labors :)", "summary": "Make sure your freezer is COLD enough", "product_name": "Cuisinart ICE-20 Automatic 1-1/2-Quart Ice Cream Maker, White", "product_id": "B00000JGRT"}
json
try: from django.utils.deprecation import MiddlewareMixin except ImportError: # no-op class for Django < 1.10 class MiddlewareMixin(object): pass class BrokenRequestMiddleware(MiddlewareMixin): def process_request(self, request): raise ImportError('request') class BrokenResponseMiddleware(MiddlewareMixin): def process_response(self, request, response): raise ImportError('response') class BrokenViewMiddleware(MiddlewareMixin): def process_view(self, request, func, args, kwargs): raise ImportError('view') class MetricsNameOverrideMiddleware(MiddlewareMixin): def process_response(self, request, response): request._elasticapm_transaction_name = 'foobar' return response
python
import * as Contract$WonderLog from "../../../../../../../node_modules/wonder-log/lib/es6_global/src/Contract.js"; import * as StateDataMain$Wonderjs from "../../../state/main/data/StateDataMain.js"; import * as ArrayMapService$Wonderjs from "../../../atom/ArrayMapService.js"; import * as IsDebugMainService$Wonderjs from "../../../state/main/state/IsDebugMainService.js"; function addMaterialWithoutDuplicate(shaderIndex, material, record) { var materialsMap = record[/* materialsMap */3]; ArrayMapService$Wonderjs.addValueWithoutDuplicate(shaderIndex, material, materialsMap); return Contract$WonderLog.ensureCheck((function (param) { var materialsMap = param[/* materialsMap */3]; return ArrayMapService$Wonderjs.checkDuplicate("material should only use the same shaderIndex once", shaderIndex, material, materialsMap); }), IsDebugMainService$Wonderjs.getIsDebug(StateDataMain$Wonderjs.stateData), record); } export { addMaterialWithoutDuplicate , } /* Contract-WonderLog Not a pure module */
javascript
<filename>lib/bids-matlab/schema/suffixes/cbv.json { "name": "Cerebral blood volume image", "description": "Cerebral Blood Volume contrast (specialized T2\\* weighting or difference between T1 weighted images)\n" }
json
import angular from 'angular'; import { SearchComponent } from './search.component'; import { SearchResultsComponent } from './search-results/search-results.component'; import { SearchResultsItemComponent } from './search-results/search-results-item.component'; import { SearchService } from './search.service.js'; import './search.css'; export const SearchModule = angular .module('search', []) .constant('RUBYGEM_API', '/api/v1') .component('search', SearchComponent) .component('searchResults', SearchResultsComponent) .component('searchResultsItem', SearchResultsItemComponent) .service('SearchService', SearchService) .name;
javascript
<filename>utils/src/utils/testAccounts.ts<gh_stars>1-10 import { MnemonicKey } from '@terra-money/terra.js'; import { bombay } from './terra'; const mk1 = new MnemonicKey({ mnemonic: process.env.TEST_MNEMONIC_1 }); export const wallet1 = bombay.wallet(mk1); const mk2 = new MnemonicKey({ mnemonic: process.env.TEST_MNEMONIC_2, }); export const wallet2 = bombay.wallet(mk2);
typescript
<reponame>dubenju/javay /* * Copyright (C) 2011 in-somnia * * This file is part of JAAD. * * JAAD is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 3 of the * License, or (at your option) any later version. * * JAAD is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General * Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. * If not, see <http://www.gnu.org/licenses/>. */ package net.sourceforge.jaad.aac.ps2; interface FilterbankTables { float[] FILTER_20_2 = { 0.0f, 0.01899487526049f, 0.0f, -0.07293139167538f, 0.0f, 0.30596630545168f, 0.5f }; float[][][] FILTER_20_8 = { {{-0.005275603f, 0.005275603f}, {-0.008688525f, 0.020975955f}, {2.7841524E-18f, 0.04546866f}, {0.027806213f, 0.06713013f}, {0.06989827f, 0.06989827f}, {0.108959675f, 0.045132574f}, {0.125f, -0.0f}}, {{0.005275603f, 0.005275603f}, {0.020975955f, -0.008688525f}, {-8.352457E-18f, -0.04546866f}, {-0.06713013f, -0.027806213f}, {-0.06989827f, 0.06989827f}, {0.045132574f, 0.108959675f}, {0.125f, -0.0f}}, {{0.005275603f, -0.005275603f}, {-0.020975955f, -0.008688525f}, {1.3920761E-17f, 0.04546866f}, {0.06713013f, -0.027806213f}, {-0.06989827f, -0.06989827f}, {-0.045132574f, 0.108959675f}, {0.125f, -0.0f}}, {{-0.005275603f, -0.005275603f}, {0.008688525f, 0.020975955f}, {-1.9489067E-17f, -0.04546866f}, {-0.027806213f, 0.06713013f}, {0.06989827f, -0.06989827f}, {-0.108959675f, 0.045132574f}, {0.125f, -0.0f}}, {{-0.005275603f, 0.005275603f}, {0.008688525f, -0.020975955f}, {2.5057372E-17f, 0.04546866f}, {-0.027806213f, -0.06713013f}, {0.06989827f, 0.06989827f}, {-0.108959675f, -0.045132574f}, {0.125f, -0.0f}}, {{0.005275603f, 0.005275603f}, {-0.020975955f, 0.008688525f}, {-1.1139424E-16f, -0.04546866f}, {0.06713013f, 0.027806213f}, {-0.06989827f, 0.06989827f}, {-0.045132574f, -0.108959675f}, {0.125f, -0.0f}}, {{0.005275603f, -0.005275603f}, {0.020975955f, 0.008688525f}, {-4.4574583E-17f, 0.04546866f}, {-0.06713013f, 0.027806213f}, {-0.06989827f, -0.06989827f}, {0.045132574f, -0.108959675f}, {0.125f, -0.0f}}, {{-0.005275603f, -0.005275603f}, {-0.008688525f, -0.020975955f}, {-1.2253085E-16f, -0.04546866f}, {0.027806213f, -0.06713013f}, {0.06989827f, -0.06989827f}, {0.108959675f, -0.045132574f}, {0.125f, -0.0f}} }; float[][][] FILTER_34_12 = { {{2.4990022E-18f, 0.0408118f}, {0.009868281f, 0.036828928f}, {0.025724541f, 0.04455621f}, {0.04525364f, 0.04525364f}, {0.064331084f, 0.03714157f}, {0.07824335f, 0.020965243f}, {0.083333336f, -0.0f}}, {{-7.497006E-18f, -0.0408118f}, {-0.026960645f, -0.026960645f}, {-0.051449083f, 6.300696E-18f}, {-0.04525364f, 0.04525364f}, {4.5485305E-18f, 0.07428314f}, {0.057278108f, 0.057278108f}, {0.083333336f, -0.0f}}, {{4.8743166E-17f, 0.0408118f}, {0.036828928f, 0.009868281f}, {0.025724541f, -0.04455621f}, {-0.04525364f, -0.04525364f}, {-0.064331084f, 0.03714157f}, {0.020965243f, 0.07824335f}, {0.083333336f, -0.0f}}, {{-1.7493014E-17f, -0.0408118f}, {-0.036828928f, 0.009868281f}, {0.025724541f, 0.04455621f}, {0.04525364f, -0.04525364f}, {-0.064331084f, -0.03714157f}, {-0.020965243f, 0.07824335f}, {0.083333336f, -0.0f}}, {{2.2491018E-17f, 0.0408118f}, {0.026960645f, -0.026960645f}, {-0.051449083f, 1.8902086E-17f}, {0.04525364f, 0.04525364f}, {-1.3645591E-17f, -0.07428314f}, {-0.057278108f, 0.057278108f}, {0.083333336f, -0.0f}}, {{-9.998534E-17f, -0.0408118f}, {-0.009868281f, 0.036828928f}, {0.025724541f, -0.04455621f}, {-0.04525364f, 0.04525364f}, {0.064331084f, -0.03714157f}, {-0.07824335f, 0.020965243f}, {0.083333336f, -0.0f}}, {{-4.0009294E-17f, 0.0408118f}, {-0.009868281f, -0.036828928f}, {0.025724541f, 0.04455621f}, {-0.04525364f, -0.04525364f}, {0.064331084f, 0.03714157f}, {-0.07824335f, -0.020965243f}, {0.083333336f, -0.0f}}, {{-2.54974E-16f, -0.0408118f}, {0.026960645f, 0.026960645f}, {-0.051449083f, 1.228954E-16f}, {0.04525364f, -0.04525364f}, {8.871933E-17f, 0.07428314f}, {-0.057278108f, -0.057278108f}, {0.083333336f, -0.0f}}, {{-1.7500593E-16f, 0.0408118f}, {-0.036828928f, -0.009868281f}, {0.025724541f, -0.04455621f}, {0.04525364f, 0.04525364f}, {-0.064331084f, 0.03714157f}, {-0.020965243f, -0.07824335f}, {0.083333336f, -0.0f}}, {{-1.1997735E-16f, -0.0408118f}, {0.036828928f, -0.009868281f}, {0.025724541f, 0.04455621f}, {-0.04525364f, 0.04525364f}, {-0.064331084f, -0.03714157f}, {0.020965243f, -0.07824335f}, {0.083333336f, -0.0f}}, {{-2.0017278E-17f, 0.0408118f}, {-0.026960645f, 0.026960645f}, {-0.051449083f, 4.410487E-17f}, {-0.04525364f, -0.04525364f}, {-3.1839714E-17f, -0.07428314f}, {0.057278108f, -0.057278108f}, {0.083333336f, -0.0f}}, {{-1.2997337E-16f, -0.0408118f}, {0.009868281f, -0.036828928f}, {0.025724541f, -0.04455621f}, {0.04525364f, -0.04525364f}, {0.064331084f, -0.03714157f}, {0.07824335f, -0.020965243f}, {0.083333336f, -0.0f}} }; float[][][] FILTER_34_8 = { {{-0.011070998f, 0.011070998f}, {-0.014361023f, 0.034670576f}, {3.3175017E-18f, 0.054178912f}, {0.032210633f, 0.07776334f}, {0.07288393f, 0.07288393f}, {0.11292073f, 0.0467733f}, {0.125f, -0.0f}}, {{0.011070998f, 0.011070998f}, {0.034670576f, -0.014361023f}, {-9.952505E-18f, -0.054178912f}, {-0.07776334f, -0.032210633f}, {-0.07288393f, 0.07288393f}, {0.0467733f, 0.11292073f}, {0.125f, -0.0f}}, {{0.011070998f, -0.011070998f}, {-0.034670576f, -0.014361023f}, {1.6587507E-17f, 0.054178912f}, {0.07776334f, -0.032210633f}, {-0.07288393f, -0.07288393f}, {-0.0467733f, 0.11292073f}, {0.125f, -0.0f}}, {{-0.011070998f, -0.011070998f}, {0.014361023f, 0.034670576f}, {-2.3222512E-17f, -0.054178912f}, {-0.032210633f, 0.07776334f}, {0.07288393f, -0.07288393f}, {-0.11292073f, 0.0467733f}, {0.125f, -0.0f}}, {{-0.011070998f, 0.011070998f}, {0.014361023f, -0.034670576f}, {2.9857514E-17f, 0.054178912f}, {-0.032210633f, -0.07776334f}, {0.07288393f, 0.07288393f}, {-0.11292073f, -0.0467733f}, {0.125f, -0.0f}}, {{0.011070998f, 0.011070998f}, {-0.034670576f, 0.014361023f}, {-1.327336E-16f, -0.054178912f}, {0.07776334f, 0.032210633f}, {-0.07288393f, 0.07288393f}, {-0.0467733f, -0.11292073f}, {0.125f, -0.0f}}, {{0.011070998f, -0.011070998f}, {0.034670576f, 0.014361023f}, {-5.311356E-17f, 0.054178912f}, {-0.07776334f, 0.032210633f}, {-0.07288393f, -0.07288393f}, {0.0467733f, -0.11292073f}, {0.125f, -0.0f}}, {{-0.011070998f, -0.011070998f}, {-0.014361023f, -0.034670576f}, {-1.460036E-16f, -0.054178912f}, {0.032210633f, -0.07776334f}, {0.07288393f, -0.07288393f}, {0.11292073f, -0.0467733f}, {0.125f, -0.0f}} }; float[][][] FILTER_34_4 = { {{1.0853208E-17f, 0.059082113f}, {0.034446694f, 0.034446694f}, {-0.0f, 0.0f}, {-0.055003885f, 0.055003885f}, {1.009495E-17f, 0.16486304f}, {0.16461344f, 0.16461344f}, {0.25f, -0.0f}}, {{-3.2559626E-17f, -0.059082113f}, {-0.034446694f, 0.034446694f}, {-0.0f, 0.0f}, {0.055003885f, 0.055003885f}, {-3.0284846E-17f, -0.16486304f}, {-0.16461344f, 0.16461344f}, {0.25f, -0.0f}}, {{1.5921696E-16f, 0.059082113f}, {-0.034446694f, -0.034446694f}, {-0.0f, 0.0f}, {0.055003885f, -0.055003885f}, {5.0474746E-17f, 0.16486304f}, {-0.16461344f, -0.16461344f}, {0.25f, -0.0f}}, {{2.897846E-17f, -0.059082113f}, {0.034446694f, -0.034446694f}, {-0.0f, 0.0f}, {-0.055003885f, -0.055003885f}, {-7.066465E-17f, -0.16486304f}, {0.16461344f, -0.16461344f}, {0.25f, -0.0f}} }; }
java
#/usr/bin/env python # Script to read the result of the benchmark program and plot the results. # Options: # `-i arg` : input file (benchmark result) # `-o arg` : html output for the plot # Notes: After the script runs the plot will automatically be shown in a browser. # Tested with python 3 only. import argparse import itertools import collections import pandas as pd import matplotlib.pyplot as plt import re from bokeh.layouts import gridplot from bokeh.palettes import Spectral11 from bokeh.plotting import figure, show, output_file # Given a file at the start of a test result (on the header line) # Return a data frame for the test result and leave the file one past # the blank line at the end of the result def to_data_frame(header, it): column_labels = re.split(' +', header.strip()) columns = [[] for i in range(len(column_labels))] for l in it: l = l.strip() if not l: break fields = l.split() if len(fields) != len(columns): raise Exception('Bad file format, line: {}'.format(l)) for c, f in zip(columns, fields): c.append(float(f)) d = {k: v for k, v in zip(column_labels, columns)} return pd.DataFrame(d, columns=column_labels[1:], index=columns[0]) def to_data_frames(f): trial = '' result = {} for l in f: if l and l[0] == '#': continue if l and l[0] == ' ' and l.strip(): if trial: # Remove anything in parens trial = re.sub('\([^\)]*\)', '', trial) result[trial] = to_data_frame(l, f) trial = '' continue if trial: trial += ' ' # Handle multi-line labels trial += l.strip() return result def bokeh_plot(title, df): numlines = len(df.columns) palette = Spectral11[0:numlines] p = figure( width=500, height=400, title=title, x_axis_label='DB Items', y_axis_label='Ops/Sec.') for col_idx in range(numlines): p.line( x=df.index.values, y=df.iloc[:, col_idx], legend=df.columns[col_idx], line_color=palette[col_idx], line_width=5) return p def run_main(result_filename, plot_output): with open(result_filename) as f: dfd = to_data_frames(f) plots = [] for k, v in dfd.items(): plots.append(bokeh_plot(k, v)) output_file(plot_output, title="NuDB Benchmark") show(gridplot(*plots, ncols=2, plot_width=500, plot_height=400)) return dfd # for testing def parse_args(): parser = argparse.ArgumentParser( description=('Plot the benchmark results')) parser.add_argument( '--input', '-i', help=('input'), ) parser.add_argument( '--output', '-o', help=('output'), ) return parser.parse_args() if __name__ == '__main__': args = parse_args() result_filename = args.input plot_output = args.output if not result_filename: print('No result file specified. Exiting') elif not plot_output: print('No output file specified. Exiting') else: run_main(result_filename, plot_output)
python
<gh_stars>1-10 {"word":"zeeman effect","definition":"The widening and duplication, triplication, etc., of spectral lines when the radiations emanate in a strong magnetic field, first observed in 1896 by <NAME>, a Dutch physicist, and regarded as an important confirmation of the electromagnetic theory of light."}
json
Amid protests against the Citizenship Amendment Act (CAA), which turned violent on Sunday Chief Minister Arvind Kejriwal urged protestors to remain peaceful stating that any kind of violence is unacceptable. Amid protests against the Citizenship Amendment Act (CAA), which turned violent on Sunday Chief Minister Arvind Kejriwal urged protestors to remain peaceful stating that any kind of violence is unacceptable. "No one should indulge in violence. Any kind of violence is unacceptable. Protests should remain peaceful," Kejriwal tweeted after three DTC buses were set on fire in Bharat Nagar area of the national capital. Aam Aadmi Party (AAP) leader Sanjay Singh also toed party chief's line condemning the violence. "There is no place for violence in a democracy, The protestors should not indulge in any kind of violence. They should raise their issues in a democratic manner. The violence incident in Delhi is condemnable," Singh said on Twitter. Three DTC buses were set on fire near the Bharat Nagar area as demonstrations turned violent. Protestors also vandalized a fire tender that was sent to douse the fire and also injured two firemen inside the vehicle. Damage to other buses and vehicles was also caused by the protestors. Police have, meanwhile, taken control of the situation and fire tenders have been rushed to control the damage caused in different areas. Police detained protesters from outside Jamia Millia Islamia University's Gate no. 1. Following the incidents of violence the Delhi Metro Rail Corporation (DMRC) on Sunday decided not to halt trains at four stations on its Magenta line. Earlier today, protestors, including students of Jamia Milia Islamia University, had carried out demonstrations in the Kalindi Kunj area against the Citizenship Act.
english
window.appName = 'NichePractice'; // console.log(window.appName); // $(window).load(function(){ // console.log("loading"); // setTimeout(function () { // runAuthAction(); // }, 1000); // }); $(document.body).on('click', '.connect-auth', function() { var type = $(this).attr("data-type").toLowerCase(); var baseUrl = $('#hfBaseUrl').val(); if(type) { var id = 'auth-manager-modal'; var html = ''; html += '<div class="social-module">'; html += '<div class="'+type+'-connect-icon"></div>'; html += '<div class="social-modal-content">'; html += '<h3>Authorize '+window.appName+' on '+type.charAt(0).toUpperCase() + type.substr(1).toLowerCase()+'</h3>'; html += '<div class="social-list">'; html += '<label>By connecting your account, you will be able to:</label>'; html += '<ul>'; html += '<li>Receive viral content recommendations from '+window.appName+' and share them to your '+type.charAt(0).toUpperCase() + type.substr(1).toLowerCase()+' profile.</li>'; html += '<li>Monitor activity and manage posts.</li>'; html += '</ul>'; html += '</div>'; html += '</div>'; html +='</div>'; loadModal(id); $('#'+id).addClass('confirmation-modal'); $('.modal-dialog', '#'+id).addClass('modal-lg modal-dialog-centered'); $(".modal-title",'#'+id).remove(); $('.modal-body', '#'+id).html(html); html = ''; html +='<div class="modal-footer">'; html +='<button type="button" class="btn '+type+'-widget-btn connect-in" data-type="'+type+'">'; html += 'Connect ' + type.charAt(0).toUpperCase() + type.substr(1).toLowerCase(); html +='</button>'; html +='</div>'; $('.modal-content', '#'+id).append(html); } }); $(document.body).on('click', '.connect-in', function() { showPreloader(); // var type = $(this).attr("data-type"); var type = $("#actionRequest").val(); var baseUrl = $('#hfBaseUrl').val(); var currentPage = $('#currentPage').val(); var business_id = $('#business_id').val(); if(type) { if(currentPage === 'social_post_settings' || currentPage === 'get_started') { location.href = baseUrl + '/auth-manager?type='+type+'&referType='+currentPage+'&business_id='+business_id; } else if(currentPage === 'promotions') { location.href = baseUrl + '/auth-manager?type='+type+'&referType='+currentPage+'&business_id='+business_id+'&promotion='+window.btoa(window.templateId); } else { location.href = baseUrl + '/auth-manager?type='+type+'&business_id='+business_id; } } }); $(document.body).on('hidden.bs.modal', '#auth-manager-modal', function() { var modelId = $("#auth-manager-modal"); // $(".modal-header .modal-title", modelId).remove(); modelId.removeClass("confirmation-modal"); $(".modal-dialog", modelId).removeClass("modal-lg modal-dialog-centered"); $(".modal-footer", modelId).remove(); }); function runAuthAction() { // console.log("runAuthAction"); var accessTokenSelector = $('#auth-response'); var accessToken = accessTokenSelector.val(); var actionType = accessTokenSelector.attr("data-type"); var message = ''; // console.log("runnng " + accessToken); // console.log("actionType " + actionType); if(accessTokenSelector.length === 1) { if(accessToken === 'success') { message = actionType + ' successfully connected.'; //swal("", message, "success"); swal({ title: "", text: message, type: 'success', },function(){ var uri = window.location.toString(); if (uri.indexOf("?") > 0) { var clean_uri = uri.substring(0, uri.indexOf("?")); window.history.replaceState({}, document.title, clean_uri); } }); } else { message = accessTokenSelector.attr("data-message"); //swal("", message, "error"); swal({ title: "", text: message, type: 'error', },function(){ var uri = window.location.toString(); if (uri.indexOf("?") > 0) { var clean_uri = uri.substring(0, uri.indexOf("?")); window.history.replaceState({}, document.title, clean_uri); } }); } } }
javascript
Supreme Court Justice Neil Gorsuch refused to wear a mask during in-person proceedings despite his colleague Justice Sonia Sotomayor’s concerns about COVID-19, a new reports revealed Tuesday. His defiance led Sotomayor, who is a diabetes patient and has high risk of illness from the coronavirus, to attend the hearings remotely. Despite a request from Chief Justice John Roberts, Gorsuch, who sits next to Sotomayor, refused to wear a mask, NPR Supreme Court reporter Nina Totenberg reported, citing court sources. Sotomayor was the only justice to wear a mask when the in-person proceedings in courtrooms resumed last year. “With the surge of the highly transmissible omicron variant in the winter, however, Sotomayor felt unsafe sitting next to unmasked people,” the NPR report reads. Chief Justice asked the all justices to wear masks an Gorsuch, one of the three justices nominated by former President Donald Trump, was the only one to refuse. All nine justices have been vaccinated and received boosters for COVID-19. He had also refused to wear a mask during the justices’ weekly conferences. Along with Sotomayor, Justice Stephen Breyer, the oldest in the court, also attended the hearing remotely. Bayer, as per his spokesperson, had received the results of a COVID-19 test that was later determined to be a false positive. The justices heard two cases. The first one was a dispute over Boston’s denial of a conservative group’s bid to fly a flag bearing a cross outside City Hall. Then they heard a case that involved the family of a Holocaust survivor attempting to recover a painting by impressionist master Camille Pissarro that had been stolen by the Nazis.
english
This is starting period of Shani's Sade Sati. In this period Saturn will be transiting in 12th house from the Moon. It generally indicates financial loss, problems by hidden enemies, aimless travel, disputes, and poverty. During this period, Amisha Patel may face problems created by Amisha Patel's hidden enemies. Relationship with Amisha Patel's colleagues will not good enough and they will create problems in Amisha Patel's work environment. Amisha Patel may also face challenges on Amisha Patel's domestic front. This may create pressure and tension. Amisha Patel needs to exercise control over Amisha Patel's spending otherwise it be lead to bigger financial problems. Long distance travels may not be fruitful during this period. Saturn's nature is of delay and dejection, but generally Amisha Patel will get results eventually, so be patient and wait for Amisha Patel's turn. Take this period as learning period, put Amisha Patel's hard work and things will fall in place. Amisha Patel advised not to take high risks in business matters in this period. This is the peak of Shani's Sade Sati. Generally this phase of Saturn is the most difficult one. Saturn transiting over natal Moon indicates health problems, character assassination, problems in relationship, mental afflictions, and sorrows. Amisha Patel will find it difficult to achieve success in this period. Amisha Patel may not get results of Amisha Patel's hard work and feel restricted. Amisha Patel's constitution and immune system will not be strong. As first house is the house of health, Amisha Patel should start exercising and taking care of Amisha Patel's health, otherwise Amisha Patel can be caught by chronic diseases. Amisha Patel may suffer from depression, unknown fear or phobia. Amisha Patel's will lack clarity in thinking, action, and decision making. Amisha Patel will be spiritually inclined and will be attracted by intricacies of nature. Acceptance and doing basics right will sail Amisha Patel out of this period. This is 'setting' period of Shani's Sade Sati. Saturn will be transiting in the 2nd house from the natal Moon, which indicates difficulty on financial and domestic front. Amisha Patel will start feeling slight relief after having two difficult phases of Sade Sati. Still, misunderstandings and financial stress can be seen during this period. Expenses may keep soaring high and Amisha Patel need to continue exercising control. Sudden financial losses and fear of theft is also a possibility. Amisha Patel may be pessimistic in thinking, Amisha Patel is advised to deal with matters enthusiastically. Amisha Patel will require paying good attention to family and personal front, otherwise those can also lead to a bigger problem. For students, education may be slightly affected and they will have to work harder to hold on to their existing level. Results will be slow and almost always with the delay. This is a period which indicates danger and apart from other things, Amisha Patel need to be careful while driving. If possible, stay away from non-veg and Amisha Patel's drinking habits to keep Saturn happy. Amisha Patel will be able to sail through this period by intelligently handling Amisha Patel's domestic and financial matters.
english
<html lang="{{ page.lang | default: site.lang | default: "en-US" }}"> {% include head.html %} <body class="site"> {% if site.google_tag_manager %} <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ site.google_tag_manager }}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> {% endif %} {% include header.html %} <div class="hero lazyload" data-bg="{{site.url}}/assets/img/queens-tower.jpg"> <div class="hero__wrap"> <h1 class="hero__title">Imperial College Christian Union</h1> <p class="hero__meta">Giving every student at Imperial an opportunity to hear about and respond to the good news of Jesus</p> <p style="display"> <a href="https://www.imperialcollegeunion.org/activities/a-to-z/222"><button style="text-overflow: wrap; white-space: normal">Join (requires Imperial login)</button></a> </p> </div> </div> <div class="hero lazyload" data-bg="{{site.url}}/assets/img/group-photo.jpg"> <div class="hero__wrap"> <h1 class="hero__title">Freshers</h1> <p class="hero__meta">Welcome to Imperial! Congratulations on making it here. We're super excited to see you all and whether you're a Christian or not, we'd love for you to check out the <a href="{{site_url}}/events">events</a> we're holding for Freshers Week and beyond. If you have any questions, do <a href="{{site_url}}/contact">get in touch</a> with us!</p> </div> </div> <div class="hero lazyload" data-bg="{{site.url}}/assets/img/weekend_away.png"> <div class="hero__wrap"> <h1 class="hero__title">Our Mission</h1> <p class="hero__meta">We exist to share the message of Jesus on campus, and explore how this message relates to each and every one of us as we go through university together. Find out more about <a href="{{site_url}}/about">who we are.</a></p> <iframe src="https://www.youtube.com/embed/YWyKGul9bz4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> </div> <main class="site__content"> <section class="blog"> <div class="container"> <div class="post-list" itemscope="" itemtype="http://schema.org/Blog"> {% for tile in site.data.home_tiles %} {% include card.html %} {% endfor %} <!-- {% include pagination.html %} --> </div> </div> <!-- <div id="home-text" class="lazyload" data-bg="{{site.url}}/assets/img/group-photo.jpg"> <div class="container"> <h2> We exist to share the message of Jesus on campus, and explore how this message relates to each and every one of us as we go through university together. </h2> <p> ICCU is a community that believes that the message Jesus spoke is true: that he himself is God, and we can personally know him. We believe that knowing Jesus is essential for all things including life and death. That's why we want to introduce him to everyone. </p> <p> Whether you'd call yourself a Christian, or wouldn't but are interested in the Christian faith, we'd love to welcome you to our events on campus! Have a look around, <a href="{{site_url}}/events">find out about our events</a> and <a href="{{site_url}}/about">explore the message that Jesus spoke and what we believe as a society</a>. </p> </div> </div> --> </section> </main> {% include footer.html %} </body> </html>
html
Anyone who has the Samsung Q850T soundbar in their home theater system may have struggled to get their audio kit working, after a mid-September firmware update appears to have impacted the speakers’ functionality. A number of Samsung customers have taken to the company’s US forums to complain about issues with the Q850T – a 5.1.2 channel speaker system with Dolby Atmos audio – specifically when connecting the soundbar to rear speakers. User Roberband posted in September about an update over Wi-Fi that went wrong, with the Samsung SmartThings app failing to fully finish the update: This issue is corroborated by a handful of other users, with others saying that the HW-Q900T (the next model up) suffers from the same issue, and that trying to install over either Wi-Fi or USB is a no-go. “I am having the exact same issue. Seems to have started after the 9/15/21 firmware update,” one user states. A new firmware update (1021.0) was released on September 30, seemingly to address the above issues. Another user claims that they successfully updated the firmware over USB, while others continue to flounder trying to do so over Wi-Fi through the SmartThings app. One user writes that “Tried to perform an update via the SmartThings app but it indicated there was no update available. As a result I downloaded the firmware Zip file and copied its content to the root of a flashdrive. Connected this flashdrive to the Q850T sound bar service port, with the sound bar on, and after a few seconds the sound bar began flashing UPDATE. We can see the 1021.0 version available on Samsung’s support site here, though it seems like using a USB is the way to go to implement the fix. We’re waiting to hear back from Samsung on the continuing issues over Wi-Fi, though, so hope to be able to update this article with more information soon. Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team. Henry is a freelance technology journalist, and former News & Features Editor for TechRadar, where he specialized in home entertainment gadgets such as TVs, projectors, soundbars, and smart speakers. Other bylines include Edge, T3, iMore, GamesRadar, NBC News, Healthline, and The Times.
english
@ atsamdam : This forum is for writer Sujatha only right? Go and check torrents. I don't know why u guys keep asking other writer's works here. Go and Google ur self.
english
/* * Copyright (C) 2007 The Android Open Source Project * * 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. */ #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <limits.h> #include <string.h> #include <sys/stat.h> #include <sys/wait.h> #include <unistd.h> #include <setjmp.h> #include <sys/mount.h> #include "common.h" #include "install.h" #include "mincrypt/rsa.h" #include "minui/minui.h" #include "minzip/SysUtil.h" #include "minzip/Zip.h" #include "mtdutils/mounts.h" #include "mtdutils/mtdutils.h" #include "roots.h" #include "verifier.h" #include "ui.h" extern RecoveryUI* ui; #define ASSUMED_UPDATE_BINARY_NAME "META-INF/com/google/android/update-binary" #define PUBLIC_KEYS_FILE "/res/keys" // Default allocation of progress bar segments to operations static const int VERIFICATION_PROGRESS_TIME = 60; static const float VERIFICATION_PROGRESS_FRACTION = 0.25; static const float DEFAULT_FILES_PROGRESS_FRACTION = 0.4; static const float DEFAULT_IMAGE_PROGRESS_FRACTION = 0.1; static jmp_buf jb; static void sig_bus(int sig) { longjmp(jb, 1); } // If the package contains an update binary, extract it and run it. static int try_update_binary(const char* path, ZipArchive* zip, bool* wipe_cache) { const ZipEntry* binary_entry = mzFindZipEntry(zip, ASSUMED_UPDATE_BINARY_NAME); if (binary_entry == NULL) { mzCloseZipArchive(zip); return INSTALL_CORRUPT; } const char* binary = "/tmp/update_binary"; unlink(binary); int fd = creat(binary, 0755); if (fd < 0) { mzCloseZipArchive(zip); LOGE("Can't make %s\n", binary); return INSTALL_ERROR; } bool ok = mzExtractZipEntryToFile(zip, binary_entry, fd); close(fd); mzCloseZipArchive(zip); if (!ok) { LOGE("Can't copy %s\n", ASSUMED_UPDATE_BINARY_NAME); return INSTALL_ERROR; } int pipefd[2]; pipe(pipefd); // When executing the update binary contained in the package, the // arguments passed are: // // - the version number for this interface // // - an fd to which the program can write in order to update the // progress bar. The program can write single-line commands: // // progress <frac> <secs> // fill up the next <frac> part of of the progress bar // over <secs> seconds. If <secs> is zero, use // set_progress commands to manually control the // progress of this segment of the bar. // // set_progress <frac> // <frac> should be between 0.0 and 1.0; sets the // progress bar within the segment defined by the most // recent progress command. // // firmware <"hboot"|"radio"> <filename> // arrange to install the contents of <filename> in the // given partition on reboot. // // (API v2: <filename> may start with "PACKAGE:" to // indicate taking a file from the OTA package.) // // (API v3: this command no longer exists.) // // ui_print <string> // display <string> on the screen. // // wipe_cache // a wipe of cache will be performed following a successful // installation. // // clear_display // turn off the text display. // // enable_reboot // packages can explicitly request that they want the user // to be able to reboot during installation (useful for // debugging packages that don't exit). // // - the name of the package zip file. // const char** args = (const char**)malloc(sizeof(char*) * 5); args[0] = binary; args[1] = EXPAND(RECOVERY_API_VERSION); // defined in Android.mk char* temp = (char*)malloc(10); sprintf(temp, "%d", pipefd[1]); args[2] = temp; args[3] = (char*)path; args[4] = NULL; pid_t pid = fork(); if (pid == 0) { umask(022); close(pipefd[0]); execv(binary, (char* const*)args); fprintf(stdout, "E:Can't run %s (%s)\n", binary, strerror(errno)); _exit(-1); } close(pipefd[1]); *wipe_cache = false; char buffer[1024]; FILE* from_child = fdopen(pipefd[0], "r"); while (fgets(buffer, sizeof(buffer), from_child) != NULL) { char* command = strtok(buffer, " \n"); if (command == NULL) { continue; } else if (strcmp(command, "progress") == 0) { char* fraction_s = strtok(NULL, " \n"); char* seconds_s = strtok(NULL, " \n"); float fraction = strtof(fraction_s, NULL); int seconds = strtol(seconds_s, NULL, 10); ui->ShowProgress(fraction * (1-VERIFICATION_PROGRESS_FRACTION), seconds); } else if (strcmp(command, "set_progress") == 0) { char* fraction_s = strtok(NULL, " \n"); float fraction = strtof(fraction_s, NULL); ui->SetProgress(fraction); } else if (strcmp(command, "ui_print") == 0) { char* str = strtok(NULL, "\n"); if (str) { ui->PrintOnScreenOnly("%s", str); } else { ui->PrintOnScreenOnly("\n"); } fflush(stdout); } else if (strcmp(command, "wipe_cache") == 0) { *wipe_cache = true; } else if (strcmp(command, "clear_display") == 0) { ui->SetBackground(RecoveryUI::NONE); } else if (strcmp(command, "enable_reboot") == 0) { // packages can explicitly request that they want the user // to be able to reboot during installation (useful for // debugging packages that don't exit). ui->SetEnableReboot(true); } else { LOGE("unknown command [%s]\n", command); } } fclose(from_child); int status; waitpid(pid, &status, 0); if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { if (WEXITSTATUS(status) != 7) { LOGE("Installation error in %s\n(Status %d)\n", path, WEXITSTATUS(status)); } else { LOGE("Failed to install %s\n", path); LOGE("Please take note of all the above lines for reports\n"); } return INSTALL_ERROR; } return INSTALL_SUCCESS; } #ifdef USE_MDTP static int mdtp_update() { const char** args = (const char**)malloc(sizeof(char*) * 2); if (args == NULL) { LOGE("Failed to allocate memory for MDTP FOTA app arguments\n"); return 0; } args[0] = "/sbin/mdtp_fota"; args[1] = NULL; int status = 0; ui->Print("Running MDTP integrity verification and update...\n"); /* Make sure system partition is mounted, so MDTP can process its content. */ mkdir("/system", 0755); status = mount("/dev/block/bootdevice/by-name/system", "/system", "ext4", MS_NOATIME | MS_NODEV | MS_NODIRATIME | MS_RDONLY, ""); if (status) { LOGE("Failed to mount the system partition, error=%s.\n", strerror(errno)); free(args); return 0; } status = 0; pid_t pid = fork(); if (pid == 0) { execv(args[0], (char* const*)args); LOGE("Can't run %s (%s)\n", args[0], strerror(errno)); _exit(-1); } if (pid > 0) { LOGE("Waiting for MDTP FOTA to complete...\n"); pid = waitpid(pid, &status, 0); LOGE("MDTP FOTA completed, status: %d\n", status); } /* Leave the system partition unmounted before we finish. */ umount("/system"); free(args); return (status > 0) ? 1 : 0; } #endif /* USE_MDTP */ static int really_install_package(const char *path, bool* wipe_cache, bool needs_mount) { ui->SetBackground(RecoveryUI::INSTALLING_UPDATE); ui->Print("Finding update package...\n"); // Give verification half the progress bar... ui->SetProgressType(RecoveryUI::DETERMINATE); ui->ShowProgress(VERIFICATION_PROGRESS_FRACTION, VERIFICATION_PROGRESS_TIME); // Resolve symlink in case legacy /sdcard path is used // Requires: symlink uses absolute path char new_path[PATH_MAX]; if (strlen(path) > 1) { char *rest = strchr(path + 1, '/'); if (rest != NULL) { int readlink_length; int root_length = rest - path; char *root = (char *)malloc(root_length + 1); strncpy(root, path, root_length); root[root_length] = 0; readlink_length = readlink(root, new_path, PATH_MAX); if (readlink_length > 0) { strncpy(new_path + readlink_length, rest, PATH_MAX - readlink_length); path = new_path; } free(root); } } LOGI("Update location: %s\n", path); // Map the update package into memory. ui->Print("Opening update package...\n"); if (path && needs_mount) { if (path[0] == '@') { ensure_path_mounted(path+1); } else { ensure_path_mounted(path); } } MemMapping map; if (sysMapFile(path, &map) != 0) { LOGE("failed to map file\n"); return INSTALL_CORRUPT; } int numKeys; Certificate* loadedKeys = load_keys(PUBLIC_KEYS_FILE, &numKeys); if (loadedKeys == NULL) { LOGE("Failed to load keys\n"); return INSTALL_CORRUPT; } LOGI("%d key(s) loaded from %s\n", numKeys, PUBLIC_KEYS_FILE); ui->Print("Verifying update package...\n"); int err; // Because we mmap() the update file which is backed by FUSE, we get // SIGBUS when the host aborts the transfer. We handle this by using // setjmp/longjmp. signal(SIGBUS, sig_bus); if (setjmp(jb) == 0) { err = verify_file(map.addr, map.length, loadedKeys, numKeys); } else { err = VERIFY_FAILURE; } signal(SIGBUS, SIG_DFL); free(loadedKeys); LOGI("verify_file returned %d\n", err); if (err != VERIFY_SUCCESS) { LOGE("signature verification failed\n"); sysReleaseMap(&map); return INSTALL_CORRUPT; } /* Try to open the package. */ ZipArchive zip; err = mzOpenZipArchive(map.addr, map.length, &zip); if (err != 0) { LOGE("Can't open %s\n(%s)\n", path, err != -1 ? strerror(err) : "bad"); sysReleaseMap(&map); return INSTALL_CORRUPT; } /* Verify and install the contents of the package. */ ui->Print("Installing update...\n"); ui->SetEnableReboot(false); int result = try_update_binary(path, &zip, wipe_cache); ui->SetEnableReboot(true); ui->Print("\n"); sysReleaseMap(&map); #ifdef USE_MDTP /* If MDTP update failed, return an error such that recovery will not finish. */ if (result == INSTALL_SUCCESS) { if (!mdtp_update()) { ui->Print("Unable to verify integrity of /system for MDTP, update aborted.\n"); return INSTALL_ERROR; } ui->Print("Successfully verified integrity of /system for MDTP.\n"); } #endif /* USE_MDTP */ return result; } int install_package(const char* path, bool* wipe_cache, const char* install_file, bool needs_mount) { modified_flash = true; FILE* install_log = fopen_path(install_file, "w"); if (install_log) { fputs(path, install_log); fputc('\n', install_log); } else { LOGE("failed to open last_install: %s\n", strerror(errno)); } int result; if (setup_install_mounts() != 0) { LOGE("failed to set up expected mounts for install; aborting\n"); result = INSTALL_ERROR; } else { result = really_install_package(path, wipe_cache, needs_mount); } if (install_log) { fputc(result == INSTALL_SUCCESS ? '1' : '0', install_log); fputc('\n', install_log); fclose(install_log); } return result; }
cpp
Henry Cejudo thinks Aljamain Sterling should listen to Daniel Cormier’s suggestion for the next bantamweight title contender. Sterling defended the bantamweight title for a second time after finishing TJ Dillashaw at UFC 280. With several contenders just one win away from a title shot, a debate about who deserves to be the next challenger has begun. Cormier appeared on the UFC 280 post-event show, where he had this to say about Cejudo potentially fighting ‘Funk Master’: “If Henry Cejudo is coming back and he gets into the USADA pool, and he can get down to the weight, there is no reason why he shouldn’t be the guy that fights Aljamain Sterling. He’s the guy that left as the double champion and walked into retirement. Now he’s on his way back. Him vs. Aljo is the fight I wanna see." Cejudo saw Cormier’s comments and responded on Twitter by saying: Cejudo’s rumored return has shaken up the bantamweight division. Some have speculated Sean O’Malley could get the next title shot. But another win against a top contender would make sense given that 'Sugar' won far from convincingly against Petr Yan at the recently concluded UFC 280. ‘Triple C’ still needs to be cleared by USADA before a fight can become official. Watch Daniel Cormier's comments and Henry Cejudo responding on Twitter below: Aljamain Sterling’s win against T.J. Dillashaw was somewhat anti-climatic due to the former champion exacerbating an existing shoulder injury during the bout. Henry Cejudo was keeping a close eye on the UFC 280 co-main event. He harked back to 'Aljo's disqualification win over Petr Yan to become the champion in a fight Sterling was clearly losing: "If we're gonna go there, you're only champ 'cause of your Academy Award-winning performance. Congrats on beating a junkie with one arm who I finished in 32 seconds. If I fought you with two broken arms and a broken freakin' neck, I'd still hear 'And New.' Your time's almost up." Dana White mentioned Cejudo when asked about what’s next for Sterling. That said, things can change quickly due to the depth of bantamweight division. ‘Triple C’ being injected into the division makes 135 pounds even more intriguing. Watch Dana White mention Cejudo fighting Sterling below:
english
<reponame>ahribori-deploy/shoppingpartner {"title":"아크메드라비반팔 순위 랭킹 10","description":"최근 들어 아크메드라비반팔 순위를 검색하시는 분들이 많습니다.\n검색어 추이를 분석하다보면 현재 많은 분들이 어떤 제품에 관심이 많은지 조금이나마 유추할 수 있는데요,\n이러한 데이터를 기반으로 해당 카테고리에서 수많은 분들이 구매하셨고 리뷰를 남겨주신, 선택하셔도 후회 없을만한 제품들을 소개해드리고자 합니다.\n목록에서 여러가지 제품들을 직접 살펴보시고 리뷰도 읽어보시고 결정하세요:)","date":"2022-02-19 11:30:00","category":"","products":[{"productId":1716618130,"productName":"아타르 [5차입고]엔젤샤론 오버핏 반팔 티셔츠","productPrice":21500,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/f71d/6c83a807d30a5a346a9742cba5890d84bc694c923efe2673686157268204.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=1716618130&itemId=2921750274&vendorItemId=70910414230&traceid=V0-153-34d99ec762ae0630","keyword":"아크메드라비반팔","rank":1,"isRocket":false,"isFreeShipping":true},{"productId":2040455221,"productName":"[아타르] [8차입고]엔젤 오버핏 반팔 티셔츠 화이트","productPrice":21500,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/fbe4/47be5d6d894091d4e47212736c61d21026afdfcf90663be6ba73a33ee616.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2040455221&itemId=3468932990&vendorItemId=71455278206&traceid=V0-153-dc61882a3e5b33f4","keyword":"아크메드라비반팔","rank":2,"isRocket":false,"isFreeShipping":true},{"productId":2072310924,"productName":"손목 잉어 자수 후드티","productPrice":70000,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/4b5d/d9aea2d7cb037f0d7297fb3bbe45fd8b1c8eeaadd8e994d500b9309bcf92.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2072310924&itemId=3521082776&vendorItemId=71507172427&traceid=V0-153-97ec032dfe3462b3","keyword":"아크메드라비반팔","rank":3,"isRocket":false,"isFreeShipping":true},{"productId":2063242161,"productName":"애니메이션 캐릭터 손모양 프린팅 티셔츠","productPrice":46300,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/f5fa/3e7bd8c876c0b71d4a84582bf33c2752a85824c0b3e3fa5d22b49fcb32d6.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2063242161&itemId=3506257463&vendorItemId=71492422213&traceid=V0-153-142d10e44d4222be","keyword":"아크메드라비반팔","rank":4,"isRocket":false,"isFreeShipping":true},{"productId":2072298121,"productName":"용 자수 후드티","productPrice":70000,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/71cc/a9443c84d12fb6fbb3e5de8a99612e3d7b9520bd14eb77b52acb2514703d.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2072298121&itemId=3521058877&vendorItemId=71507148659&traceid=V0-153-20261ca5478b7660","keyword":"아크메드라비반팔","rank":5,"isRocket":false,"isFreeShipping":true},{"productId":2265953383,"productName":"남성 레인보우 타이 다이 디자인 센스 백 윙 탑 루즈 후드 스웨터","productPrice":71000,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/a0ff/1c6da549af3b452da56d102e7859449338395e2e4660d54dbdb8f51b28c7.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2265953383&itemId=3883672793&vendorItemId=71868309192&traceid=V0-153-dc94af1f7381bdc2","keyword":"아크메드라비반팔","rank":6,"isRocket":false,"isFreeShipping":true},{"productId":2063202537,"productName":"핑크 애니메이션 후드티","productPrice":44300,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/8855/ee99f4e159161531904bf370fb7362f9f2f03e6ea7b88751f67c61596bcc.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2063202537&itemId=3506183154&vendorItemId=71492348404&traceid=V0-153-96c4fed03c2b18a2","keyword":"아크메드라비반팔","rank":7,"isRocket":false,"isFreeShipping":true},{"productId":2344673358,"productName":"FDSK Nervous Cyberpunk Technology Trend Steam Wave Oversize Boyfriend Couple Hooded","productPrice":111900,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/49e5/bd411d7b87958905e5bf55dd25affc8fc0740eee7658ce62c24d531ffab7.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2344673358&itemId=4063888621&vendorItemId=72047975969&traceid=V0-153-789bf9b2e10de888","keyword":"아크메드라비반팔","rank":8,"isRocket":false,"isFreeShipping":true},{"productId":2294451241,"productName":"뚱이 패치 코튼 후드 스웨터","productPrice":84800,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/a31f/006e199a99ac2ef07eace964758e4d80cd027299887aaeac3cb41aee9cfa.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2294451241&itemId=3949837366&vendorItemId=71934269388&traceid=V0-153-8628166144b2f9aa","keyword":"아크메드라비반팔","rank":9,"isRocket":false,"isFreeShipping":true},{"productId":2103175323,"productName":"무지개 후드티","productPrice":50700,"productImage":"https://static.coupangcdn.com/image/vendor_inventory/1c87/da37707b5f246797f475803d1015cbd050bcd11e7558f841aa4549f9a1de.jpg","productUrl":"https://link.coupang.com/re/AFFSDP?lptag=AF7122381&pageKey=2103175323&itemId=3572968269&vendorItemId=71558804145&traceid=V0-153-9bb1084498ce014d","keyword":"아크메드라비반팔","rank":10,"isRocket":false,"isFreeShipping":true}],"keyword":"아크메드라비반팔"}
json
<filename>datasets/2D/SIGN/writer1007/sessionC/diagonal_downLeft-1-13.json {"name":"diagonal_downLeft","subject":1007,"date":"1412010-012637","paths":{"Pen":{"strokes":[{"x":700,"y":-942,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":0,"stroke_id":0},{"x":700,"y":-942,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":1,"stroke_id":0},{"x":710,"y":-944,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":2,"stroke_id":0},{"x":706,"y":-955,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":3,"stroke_id":0},{"x":706,"y":-955,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":4,"stroke_id":0},{"x":706,"y":-955,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":5,"stroke_id":0},{"x":706,"y":-955,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":6,"stroke_id":0},{"x":706,"y":-955,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":7,"stroke_id":0},{"x":706,"y":-955,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":8,"stroke_id":0},{"x":706,"y":-955,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":9,"stroke_id":0},{"x":706,"y":-955,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":10,"stroke_id":0},{"x":693,"y":-946,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":11,"stroke_id":0},{"x":683,"y":-930,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":12,"stroke_id":0},{"x":668,"y":-906,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":13,"stroke_id":0},{"x":647,"y":-875,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":14,"stroke_id":0},{"x":616,"y":-832,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":15,"stroke_id":0},{"x":576,"y":-780,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":16,"stroke_id":0},{"x":527,"y":-719,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":17,"stroke_id":0},{"x":467,"y":-647,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":18,"stroke_id":0},{"x":397,"y":-565,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":19,"stroke_id":0},{"x":316,"y":-473,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":20,"stroke_id":0},{"x":229,"y":-376,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":21,"stroke_id":0},{"x":134,"y":-275,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":22,"stroke_id":0},{"x":34,"y":-171,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":23,"stroke_id":0},{"x":-74,"y":-67,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":24,"stroke_id":0},{"x":-188,"y":37,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":25,"stroke_id":0},{"x":-300,"y":136,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":26,"stroke_id":0},{"x":-407,"y":226,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":27,"stroke_id":0},{"x":-506,"y":306,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":28,"stroke_id":0},{"x":-600,"y":373,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":29,"stroke_id":0},{"x":-675,"y":431,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":30,"stroke_id":0},{"x":-739,"y":473,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":31,"stroke_id":0},{"x":-786,"y":504,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":32,"stroke_id":0},{"x":-818,"y":526,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":33,"stroke_id":0},{"x":-838,"y":538,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":34,"stroke_id":0},{"x":-849,"y":545,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":35,"stroke_id":0},{"x":-849,"y":545,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":36,"stroke_id":0},{"x":-855,"y":535,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":37,"stroke_id":0},{"x":-861,"y":522,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":38,"stroke_id":0},{"x":-862,"y":503,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":39,"stroke_id":0},{"x":-863,"y":478,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":40,"stroke_id":0},{"x":-861,"y":440,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":41,"stroke_id":0}]}},"device":{"osBrowserInfo":"Fujitsu-Siemens Lenovo X61 Tablet PC","resolutionHeight":null,"resolutionWidth":null,"windowHeight":null,"windowWidth":null,"pixelRatio":null,"mouse":false,"pen":true,"finger":false,"acceleration":false,"webcam":false}}
json
<gh_stars>1-10 const caches = {} export const getCache = id => { if (!caches[id]) { caches[id] = {} } const cache = caches[id] return { getSourceKey: (targetKey, sourceKey) => getSourceKey(cache, targetKey, sourceKey), } } const getSourceKey = (cache, targetKey, sourceKey) => { const key = targetKey in cache ? resolveKey(targetKey, cache) : resolveKey(sourceKey, cache) cache[targetKey] = key return key } const resolveKey = (targetKey, cache) => { const checkedKeys = {} let key = targetKey while (cache[key] && !(cache[key] in checkedKeys)) { checkedKeys[key] = true key = cache[key] } return key }
typescript
Former Pakistan leg-spinner Danish Kaneria has noted that Cheteshwar Pujara should be the batter making way for the returning Virat Kohli in the second Test against New Zealand. The series is poised at 0-0 and the contest in Mumbai is set to be the decider. Kaneria noted that the team management should give Ajinkya Rahane another chance. There is a lot of pressure on the under-performing middle-order batter, especially when the candidates on the sidelines are resting their case with consistent performances. While speaking on his YouTube channel, Kaneria said: "I will definitely go with Ajinkya Rahane in the playing XI and leave out Pujara. Kohli comes in for Pujara. It is important to give Rahane this Test match. He is a class of a player. "Rahane, who is already under a lot of pressure, must also be knowing that it could be the final Test of his career. It is difficult to make a comeback after being dropped. " Apart from the shuffle in the batting unit, Kaneria also wishes to see a change in the bowling department. He believes that Mohammed Siraj is better suited to bowl on the Wankhede surface and should make it to the playing XI at the expense of Ishant Sharma. The 40-year-old added: "There needs to be a change in the bowling department, it is an important match so experience is required, so Prasidh Krishna is not a choice. "I would rest Ishant Sharma and play Mohammad Siraj. He would be able to reverse the ball as well. He will also be able to get some movement with the sea breeze. " Ishant Sharma was the least used bowler in the Kanpur Test. He could not claim a wicket in the fixture across the 20 overs he bowled. New Zealand head into the contest on the back of an exceptional survival feat. Kaneria notes that their batting does not require a tweak, but they should change their three-spinner approach. He feels that Wagner should be an inclusion in Wankhede, given his aggression and ability to extract bounce. "Wagner should be an inclusion. He is an attacking bowler, if you give him a six-over burst, he might leak runs, but he can get wickets as well. He will get a lot of bounce from the Mumbai wicket. The pace trio of Wagner, Southee and Jamieson would be lethal. No need for any change in their batting," Kaneria said. The second Test between India and New Zealand is slated to start on December 3 (Friday) at the Wankhede Stadium in Mumbai.
english
Ryk Fortuna is known for Snow White and the Huntsman (2012), Avatar (2009) and G.I. Joe: Retaliation (2013). Known for: - Costume Department(Ironhead Studios) - Special Effects(Weta Workshop) - Costume Department(Ironhead Studios) - Makeup Department(Skull Island) How much have you seen? Keep track of how much of Ryk Fortuna’s work you have seen. Go to your list.
english
<reponame>sjfricke/gapid<filename>gapii/cc/gles_extras.cpp /* * Copyright (C) 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "gapii/cc/gles_spy.h" #include "gapii/cc/gles_exports.h" #include "gapii/cc/gles_types.h" #define ANDROID_NATIVE_MAKE_CONSTANT(a,b,c,d) \ (((unsigned)(a)<<24)|((unsigned)(b)<<16)|((unsigned)(c)<<8)|(unsigned)(d)) #define ANDROID_NATIVE_WINDOW_MAGIC \ ANDROID_NATIVE_MAKE_CONSTANT('_','w','n','d') #define ANDROID_NATIVE_BUFFER_MAGIC \ ANDROID_NATIVE_MAKE_CONSTANT('_','b','f','r') namespace gapii { // getProgramInfo returns a ProgramInfo, populated with the details of all the // attributes and uniforms exposed by program. std::shared_ptr<ProgramInfo> GlesSpy::GetProgramInfoExtra(CallObserver* observer, std::shared_ptr<Context> ctx, ProgramId program) { bool gles30 = ctx->mConstants.mMajorVersion >= 3; // Allocate temporary buffer large enough to hold any of the returned strings. int32_t infoLogLength = 0; mImports.glGetProgramiv(program, GLenum::GL_INFO_LOG_LENGTH, &infoLogLength); int32_t activeAttributeMaxLength = 0; mImports.glGetProgramiv(program, GLenum::GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &activeAttributeMaxLength); int32_t activeUniformMaxLength = 0; mImports.glGetProgramiv(program, GLenum::GL_ACTIVE_UNIFORM_MAX_LENGTH, &activeUniformMaxLength); int32_t activeUniformBlockMaxNameLength = 0; mImports.glGetProgramiv(program, GLenum::GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH, &activeUniformBlockMaxNameLength); const int strSize = std::max( std::max(infoLogLength, activeAttributeMaxLength), std::max(activeUniformMaxLength, activeUniformBlockMaxNameLength)) + 16 /* extra space for sprintf */ + 1 /* null-terminator */; char* str = observer->getScratch()->create<char>(strSize); auto pi = std::shared_ptr<ProgramInfo>(new ProgramInfo()); int32_t linkStatus = 0; mImports.glGetProgramiv(program, GLenum::GL_LINK_STATUS, &linkStatus); pi->mLinkStatus = linkStatus; mImports.glGetProgramInfoLog(program, strSize, &infoLogLength, str); pi->mInfoLog = std::string(str, infoLogLength); if (linkStatus == GLbooleanLabels::GL_TRUE) { int32_t activeUniforms = 0; mImports.glGetProgramiv(program, GLenum::GL_ACTIVE_UNIFORMS, &activeUniforms); for (uint32_t i = 0; i < activeUniforms; i++) { ActiveUniform au{}; int32_t nameLength = 0; mImports.glGetActiveUniform(program, i, strSize, &nameLength, &au.mArraySize, &au.mType, str); au.mName = std::string(str, nameLength); au.mBlockIndex = -1; if (gles30) { int32_t blockIndex = -1; mImports.glGetActiveUniformsiv(program, 1, &i, GLenum::GL_UNIFORM_BLOCK_INDEX, &blockIndex); au.mBlockIndex = blockIndex; mImports.glGetActiveUniformsiv(program, 1, &i, GLenum::GL_UNIFORM_OFFSET, &au.mOffset); mImports.glGetActiveUniformsiv(program, 1, &i, GLenum::GL_UNIFORM_ARRAY_STRIDE, &au.mArrayStride); mImports.glGetActiveUniformsiv(program, 1, &i, GLenum::GL_UNIFORM_MATRIX_STRIDE, &au.mMatrixStride); mImports.glGetActiveUniformsiv(program, 1, &i, GLenum::GL_UNIFORM_IS_ROW_MAJOR, &au.mIsRowMajor); } if (au.mBlockIndex == -1) { au.mLocation = mImports.glGetUniformLocation(program, str); au.mLocations[0] = mImports.glGetUniformLocation(program, str); if (nameLength >= 3 && strcmp(str + nameLength - 3, "[0]") == 0) { nameLength -= 3; // Remove the "[0]" suffix of array } for (int32_t j = 1; j < au.mArraySize; j++) { sprintf(str + nameLength, "[%i]", j); // Append array suffix au.mLocations[j] = mImports.glGetUniformLocation(program, str); } } pi->mActiveUniforms[i] = au; } int32_t activeAttributes = 0; mImports.glGetProgramiv(program, GLenum::GL_ACTIVE_ATTRIBUTES, &activeAttributes); for (int32_t i = 0; i < activeAttributes; i++) { ActiveAttribute aa{}; int32_t nameLength = 0; mImports.glGetActiveAttrib(program, i, strSize, &nameLength, &aa.mArraySize, &aa.mType, str); aa.mName = std::string(str, nameLength); aa.mLocation = mImports.glGetAttribLocation(program, str); pi->mActiveAttributes[i] = aa; } int32_t activeUniformBlocks = 0; if (gles30) { mImports.glGetProgramiv(program, GLenum::GL_ACTIVE_UNIFORM_BLOCKS, &activeUniformBlocks); for (int32_t i = 0; i < activeUniformBlocks; i++) { ActiveUniformBlock aub{}; int32_t nameLength = 0; mImports.glGetActiveUniformBlockName(program, i, strSize, &nameLength, str); aub.mName = std::string(str, nameLength); mImports.glGetActiveUniformBlockiv(program, i, GLenum::GL_UNIFORM_BLOCK_BINDING, &aub.mBinding); mImports.glGetActiveUniformBlockiv(program, i, GLenum::GL_UNIFORM_BLOCK_DATA_SIZE, &aub.mDataSize); int32_t referencedByVS = 0; mImports.glGetActiveUniformBlockiv(program, i, GLenum::GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER, &referencedByVS); aub.mReferencedByVertexShader = referencedByVS != 0; int32_t referencedByFS = 0; mImports.glGetActiveUniformBlockiv(program, i, GLenum::GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER, &referencedByFS); aub.mReferencedByFragmentShader = referencedByFS != 0; pi->mActiveUniformBlocks[i] = aub; } } GAPID_DEBUG("Created ProgramInfo: LinkStatus=GL_TRUE ActiveUniforms=%i ActiveAttributes=%i ActiveUniformBlocks=%i", activeUniforms, activeAttributes, activeUniformBlocks); } else { GAPID_DEBUG("Created ProgramInfo: LinkStatus=GL_FALSE InfoLog=\"%s\"", pi->mInfoLog.data()); } observer->encodeAndDelete(pi->toProto()); return pi; } std::shared_ptr<AndroidNativeBufferExtra> GlesSpy::GetAndroidNativeBufferExtra(CallObserver* observer, void* ptr) { #if TARGET_OS == GAPID_OS_ANDROID struct android_native_base_t { int magic; int version; void* reserved[4]; void (*incRef)(android_native_base_t* base); void (*decRef)(android_native_base_t* base); }; struct ANativeWindowBuffer { android_native_base_t common; int width; int height; int stride; int format; int usage; void* reserved[2]; void* handle; void* reserved_proc[8]; }; auto buffer = reinterpret_cast<ANativeWindowBuffer*>(ptr); if (buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) { GAPID_WARNING("Unknown EGLClientBuffer with magic: 0x%x", buffer->common.magic); return nullptr; } std::shared_ptr<AndroidNativeBufferExtra> extra(new AndroidNativeBufferExtra( buffer->width, buffer->height, buffer->stride, buffer->format, buffer->usage )); GAPID_DEBUG("Created AndroidNativeBufferExtra: width=%i, height=%i", buffer->width, buffer->height); observer->encodeAndDelete(extra->toProto()); return extra; #else return nullptr; #endif // TARGET_OS == GAPID_OS_ANDROID } // TODO: When gfx api macros produce functions instead of inlining, move this logic // to the gles.api file. bool GlesSpy::getFramebufferAttachmentSize(CallObserver* observer, uint32_t* width, uint32_t* height) { std::shared_ptr<Context> ctx = Contexts[observer->getCurrentThread()]; if (ctx == nullptr) { return false; } auto framebuffer = ctx->mBound.mReadFramebuffer; if (framebuffer == nullptr) { return false; } auto attachment = framebuffer->mColorAttachments.find(0); if (attachment == framebuffer->mColorAttachments.end()) { return false; } switch (attachment->second.mType) { case GLenum::GL_TEXTURE: { auto t = attachment->second.mTexture; auto level = t->mLevels.find(attachment->second.mTextureLevel); if (level == t->mLevels.end()) { return false; } auto layer = level->second.mLayers.find(attachment->second.mTextureLayer); if (layer == level->second.mLayers.end()) { return false; } auto image = layer->second; if (image == nullptr) { return false; } *width = uint32_t(image->mWidth); *height = uint32_t(image->mHeight); return true; } case GLenum::GL_RENDERBUFFER: { auto r = attachment->second.mRenderbuffer; *width = uint32_t(r->mWidth); *height = uint32_t(r->mHeight); return true; } } return false; } bool GlesSpy::observeFramebuffer(CallObserver* observer, uint32_t* w, uint32_t* h, std::vector<uint8_t>* data) { if (!getFramebufferAttachmentSize(observer, w, h)) { return false; // Could not get the framebuffer size. } data->resize((*w) * (*h) * 4); GlesSpy::mImports.glReadPixels(0, 0, int32_t(*w), int32_t(*h), GLenum::GL_RGBA, GLenum::GL_UNSIGNED_BYTE, data->data()); return true; } } #undef ANDROID_NATIVE_MAKE_CONSTANT #undef ANDROID_NATIVE_WINDOW_MAGIC #undef ANDROID_NATIVE_BUFFER_MAGIC
cpp
/* * Copyright (c) 2021 LZUOSS * ChimataMS is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. * See the Mulan PSL v2 for more details. */ package main import ( "ChimataMS/scheduler" "ChimataMS/updater" "ChimataMS/worker" "log" "os" "os/signal" "syscall" ) func main() { progQuit := make(chan os.Signal) worker.InitializeConfig() scheduler.InitScheduler() mirrorsEvent, mirrorsError := updater.InitMirrorUpdater(worker.Config.Base.MirrorConfigPath) baseEvent, baseError := updater.InitBaseUpdater(worker.ConfigPath) signal.Notify(progQuit, syscall.SIGINT, syscall.SIGTERM) for { select { case <-progQuit: { scheduler.StopScheduler() updater.CloseMirrorUpdater() updater.CloseBaseUpdater() os.Exit(0) } case <-mirrorsEvent: { worker.LoadMirrorConfig() scheduler.UpdateScheduler() } case err := <-mirrorsError: { log.Fatalln("mirrorWatcher Error: " + err.Error()) } case <-baseEvent: { worker.LoadBaseConfig() } case err := <-baseError: { log.Fatalln("baseWatcher Error: " + err.Error()) } } } }
go
#include "renderer.h" namespace sge { #if 0 template<typename T> T* SGEDevice::requestResource() { sgeAssert(false); return nullptr; } #endif #define SGE_Impl_request_resource(T, RT) \ template <> \ T* SGEDevice::requestResource<T>() { \ return static_cast<T*>(requestResource(RT)); \ } SGE_Impl_request_resource(Buffer, ResourceType::Buffer); SGE_Impl_request_resource(Texture, ResourceType::Texture); SGE_Impl_request_resource(FrameTarget, ResourceType::FrameTarget); SGE_Impl_request_resource(Shader, ResourceType::Shader); SGE_Impl_request_resource(ShadingProgram, ResourceType::ShadingProgram); SGE_Impl_request_resource(RasterizerState, ResourceType::RasterizerState); SGE_Impl_request_resource(DepthStencilState, ResourceType::DepthStencilState); SGE_Impl_request_resource(BlendState, ResourceType::BlendState); SGE_Impl_request_resource(SamplerState, ResourceType::Sampler); SGE_Impl_request_resource(Query, ResourceType::Query); } // namespace sge
cpp
<gh_stars>1-10 [{"namaKab":"KOTA TARAKAN","originalFilename":"FOTO IRWAN NASIR.jpg","namaPartai":"Persatuan Indonesia","id":15064,"noUrut":1,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA TARAKAN","originalFilename":"FOTO SATYA DHARMA (2).jpg","namaPartai":"Persatuan Indonesia","id":15080,"noUrut":2,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA TARAKAN","originalFilename":"FOTO DAYANG ERNAWATI.jpg","namaPartai":"Persatuan Indonesia","id":94568,"noUrut":3,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"KOTA TARAKAN","originalFilename":"FOTO MOCTHARUDDIN.jpg","namaPartai":"Persatuan Indonesia","id":94282,"noUrut":4,"nama":"MOCHTARUDDIN","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA TARAKAN","originalFilename":"FOTO PATHAM.jpg","namaPartai":"Persatuan Indonesia","id":92434,"noUrut":5,"nama":"PATHAM","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA TARAKAN","originalFilename":"FOTO RAMLAH.jpg","namaPartai":"Persatuan Indonesia","id":66315,"noUrut":6,"nama":"RAMLAH","stringJenisKelamin":"Perempuan"},{"namaKab":"KOTA TARAKAN","originalFilename":"FOTO ARY SARDY.jpg","namaPartai":"Persatuan Indonesia","id":94048,"noUrut":7,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA TARAKAN","originalFilename":"FOTO USMIN.jpg","namaPartai":"Persatuan Indonesia","id":29546,"noUrut":8,"nama":"USMIN","stringJenisKelamin":"Laki-Laki"},{"namaKab":"<NAME>","originalFilename":"FOTO SITI RODIAH.jpg","namaPartai":"Persatuan Indonesia","id":29324,"noUrut":9,"nama":"<NAME>","stringJenisKelamin":"Perempuan"}]
json
# -*- test-case-name: twisted.scripts.test.test_tap2rpm -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. import sys, os, shutil, time, glob import subprocess import tempfile import tarfile from StringIO import StringIO from twisted.python import usage, log ################################# # data that goes in /etc/inittab initFileData = '''\ #!/bin/sh # # Startup script for a Twisted service. # # chkconfig: - 85 15 # description: Start-up script for the Twisted service "%(tap_file)s". PATH=/usr/bin:/bin:/usr/sbin:/sbin pidfile=/var/run/%(rpm_file)s.pid rundir=/var/lib/twisted-taps/%(rpm_file)s/ file=/etc/twisted-taps/%(tap_file)s logfile=/var/log/%(rpm_file)s.log # load init function library . /etc/init.d/functions [ -r /etc/default/%(rpm_file)s ] && . /etc/default/%(rpm_file)s # check for required files if [ ! -x /usr/bin/twistd ] then echo "$0: Aborting, no /usr/bin/twistd found" exit 0 fi if [ ! -r "$file" ] then echo "$0: Aborting, no file $file found." exit 0 fi # set up run directory if necessary if [ ! -d "${rundir}" ] then mkdir -p "${rundir}" fi case "$1" in start) echo -n "Starting %(rpm_file)s: twistd" daemon twistd \\ --pidfile=$pidfile \\ --rundir=$rundir \\ --%(twistd_option)s=$file \\ --logfile=$logfile status %(rpm_file)s ;; stop) echo -n "Stopping %(rpm_file)s: twistd" kill `cat "${pidfile}"` status %(rpm_file)s ;; restart) "${0}" stop "${0}" start ;; *) echo "Usage: ${0} {start|stop|restart|}" >&2 exit 1 ;; esac exit 0 ''' ####################################### # the data for creating the spec file specFileData = '''\ Summary: %(description)s Name: %(rpm_file)s Version: %(version)s Release: 1 License: Unknown Group: Networking/Daemons Source: %(tarfile_basename)s BuildRoot: %%{_tmppath}/%%{name}-%%{version}-root Requires: /usr/bin/twistd BuildArch: noarch %%description %(long_description)s %%prep %%setup %%build %%install [ ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] \ && rm -rf "$RPM_BUILD_ROOT" mkdir -p "$RPM_BUILD_ROOT"/etc/twisted-taps mkdir -p "$RPM_BUILD_ROOT"/etc/init.d mkdir -p "$RPM_BUILD_ROOT"/var/lib/twisted-taps cp "%(tap_file)s" "$RPM_BUILD_ROOT"/etc/twisted-taps/ cp "%(rpm_file)s.init" "$RPM_BUILD_ROOT"/etc/init.d/"%(rpm_file)s" %%clean [ ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] \ && rm -rf "$RPM_BUILD_ROOT" %%post /sbin/chkconfig --add %(rpm_file)s /sbin/chkconfig --level 35 %(rpm_file)s /etc/init.d/%(rpm_file)s start %%preun /etc/init.d/%(rpm_file)s stop /sbin/chkconfig --del %(rpm_file)s %%files %%defattr(-,root,root) %%attr(0755,root,root) /etc/init.d/%(rpm_file)s %%attr(0660,root,root) /etc/twisted-taps/%(tap_file)s %%changelog * %(date)s %(maintainer)s - Created by tap2rpm: %(rpm_file)s (%(version)s) ''' ############################### class MyOptions(usage.Options): optFlags = [["unsigned", "u"], ['quiet', 'q']] optParameters = [ ["tapfile", "t", "twistd.tap"], ["maintainer", "m", "tap2rpm"], ["protocol", "p", None], ["description", "e", None], ["long_description", "l", "Automatically created by tap2rpm"], ["set-version", "V", "1.0"], ["rpmfile", "r", None], ["type", "y", "tap", "type of configuration: 'tap', 'xml, " "'source' or 'python'"], ] compData = usage.Completions( optActions={"type": usage.CompleteList(["tap", "xml", "source", "python"]), "rpmfile": usage.CompleteFiles("*.rpm")} ) def postOptions(self): """ Calculate the default values for certain command-line options. """ # Options whose defaults depend on other parameters. if self['protocol'] is None: base_tapfile = os.path.basename(self['tapfile']) self['protocol'] = os.path.splitext(base_tapfile)[0] if self['description'] is None: self['description'] = "A TCP server for %s" % (self['protocol'],) if self['rpmfile'] is None: self['rpmfile'] = 'twisted-%s' % (self['protocol'],) # Values that aren't options, but are calculated from options and are # handy to have around. self['twistd_option'] = type_dict[self['type']] self['release-name'] = '%s-%s' % (self['rpmfile'], self['set-version']) type_dict = { 'tap': 'file', 'python': 'python', 'source': 'source', 'xml': 'xml', } ########################## def makeBuildDir(): """ Set up the temporary directory for building RPMs. Returns: buildDir, a randomly-named subdirectory of baseDir. """ tmpDir = tempfile.mkdtemp() # set up initial directory contents os.makedirs(os.path.join(tmpDir, 'RPMS', 'noarch')) os.makedirs(os.path.join(tmpDir, 'SPECS')) os.makedirs(os.path.join(tmpDir, 'BUILD')) os.makedirs(os.path.join(tmpDir, 'SOURCES')) os.makedirs(os.path.join(tmpDir, 'SRPMS')) log.msg(format="Created RPM build structure in %(path)r", path=tmpDir) return tmpDir def setupBuildFiles(buildDir, config): """ Create files required to build an RPM in the build directory. """ # Create the source tarball in the SOURCES directory. tarballName = "%s.tar" % (config['release-name'],) tarballPath = os.path.join(buildDir, "SOURCES", tarballName) tarballHandle = tarfile.open(tarballPath, "w") sourceDirInfo = tarfile.TarInfo(config['release-name']) sourceDirInfo.type = tarfile.DIRTYPE sourceDirInfo.mode = 0755 tarballHandle.addfile(sourceDirInfo) tapFileBase = os.path.basename(config['tapfile']) initFileInfo = tarfile.TarInfo( os.path.join( config['release-name'], '%s.init' % config['rpmfile'], ) ) initFileInfo.type = tarfile.REGTYPE initFileInfo.mode = 0755 initFileRealData = initFileData % { 'tap_file': tapFileBase, 'rpm_file': config['release-name'], 'twistd_option': config['twistd_option'], } initFileInfo.size = len(initFileRealData) tarballHandle.addfile(initFileInfo, StringIO(initFileRealData)) tapFileHandle = open(config['tapfile'], 'rb') tapFileInfo = tarballHandle.gettarinfo( arcname=os.path.join(config['release-name'], tapFileBase), fileobj=tapFileHandle, ) tapFileInfo.mode = 0644 tarballHandle.addfile(tapFileInfo, tapFileHandle) tarballHandle.close() log.msg(format="Created dummy source tarball %(tarballPath)r", tarballPath=tarballPath) # Create the spec file in the SPECS directory. specName = "%s.spec" % (config['release-name'],) specPath = os.path.join(buildDir, "SPECS", specName) specHandle = open(specPath, "w") specFileRealData = specFileData % { 'description': config['description'], 'rpm_file': config['rpmfile'], 'version': config['set-version'], 'tarfile_basename': tarballName, 'tap_file': tapFileBase, 'date': time.strftime('%a %b %d %Y', time.localtime(time.time())), 'maintainer': config['maintainer'], 'long_description': config['long_description'], } specHandle.write(specFileRealData) specHandle.close() log.msg(format="Created RPM spec file %(specPath)r", specPath=specPath) return specPath def run(options=None): # parse options try: config = MyOptions() config.parseOptions(options) except usage.error, ue: sys.exit("%s: %s" % (sys.argv[0], ue)) # create RPM build environment tmpDir = makeBuildDir() specPath = setupBuildFiles(tmpDir, config) # build rpm job = subprocess.Popen([ "rpmbuild", "-vv", "--define", "_topdir %s" % (tmpDir,), "-ba", specPath, ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout, _ = job.communicate() # If there was a problem, show people what it was. if job.returncode != 0: print stdout # copy the RPMs to the local directory rpmPath = glob.glob(os.path.join(tmpDir, 'RPMS', 'noarch', '*'))[0] srpmPath = glob.glob(os.path.join(tmpDir, 'SRPMS', '*'))[0] if not config['quiet']: print 'Writing "%s"...' % os.path.basename(rpmPath) shutil.copy(rpmPath, '.') if not config['quiet']: print 'Writing "%s"...' % os.path.basename(srpmPath) shutil.copy(srpmPath, '.') # remove the build directory shutil.rmtree(tmpDir) return [os.path.basename(rpmPath), os.path.basename(srpmPath)]
python
<reponame>music-brain88/dotfiles #!/usr/bin/env python3 """ Fork from https://github.com/yoshimoto/i3-alt-tab.py """ """ i3-alt-tab.py -- Add the following lines to your ``.i3/config``: Switch only on current workspace only (default) ``` set $i3t_alt_tab path/to/i3-alt-tab.py n set $i3t_alt_shift_tab path/to/i3-alt-tab.py p bindsym Mod1+Tab exec exec $i3t_alt_tab bindsym Mod1+Shift+Tab exec $i3t_alt_shift_tab ``` Switch all windows ``` set $i3t_alt_tab path/to/i3-alt-tab.py n all set $i3t_alt_shift_tab path/to/i3-alt-tab.py p all bindsym Mod1+Tab exec exec $i3t_alt_tab bindsym Mod1+Shift+Tab exec $i3t_alt_shift_tab ``` """ import subprocess import json ignore_name = ['__i3'] ignore_type = ['dockarea'] class Windows(object): def __init__(self): self.ws = {} self.cur_id = None self.cur_wsname = None def add(self, wsname, node): if wsname in self.ws: self.ws[wsname].append(node) else: self.ws[wsname] = [node] if node['focused']: self.cur_id = node['id'] self.cur_wsname = wsname def parse(self, tree, wsname): if tree['name'] in ignore_name: return if tree['type'] in ignore_type: return if 'nodes' in tree and len(tree['nodes']): for node in tree['nodes']: if node['type'] == 'workspace': wsname = node['name'] self.parse(node, wsname) else: if tree['window'] is not None: self.add(wsname, tree) def select_window_id(windows, reverse_mode=False, current_workspace_only=True): if current_workspace_only: ws = windows.ws[windows.cur_wsname] else: ws = [] for v in windows.ws.values(): ws += v if reverse_mode: ws.reverse() selected = ws[-1] for node in ws: if node['id'] == windows.cur_id: break selected = node return selected['window'] def main(argv=None): output = subprocess.check_output(['i3-msg', '-t', 'get_tree']) tree = json.loads(output) wins = Windows() wins.parse(tree, 'root') argv_len = len(argv) reverse_mode = True current_workspace_only = True if argv_len >= 2: cmd = argv[1].lower() if cmd[0] == 'n': reverse_mode = True elif cmd[0] == 'p': reverse_mode = False else: raise ValueError('specify [n]ext or [p]rev') if argv_len >= 3: cmd = argv[2].lower() if cmd[0] == 'c': current_workspace_only = True elif cmd[0] == 'a': current_workspace_only = False else: raise ValueError('specify [c]urrent or [a]ll') id = select_window_id(wins, reverse_mode, current_workspace_only) subprocess.check_call(['i3-msg', '[id="%d"] focus' % (id)]) if __name__ == '__main__': import sys sys.exit(main(argv=sys.argv))
python
The European Tour has announced the Maybank Championship and the China Open have been postponed due to the coronavirus. Both tournaments were set to be held in Asia during April, though it is still hoped they may be rescheduled for later in the season. The Saujana Golf and Country Club in Kuala Lumpur was to host the Maybank Championship from April 16-19, a week before the China Open at Genzon Golf Club. "The well-being of our players, spectators and staff is always our absolute priority," Keith Pelley, chief executive of the European Tour, said in a statement. "While it is therefore regrettable that the Maybank Championship and China Open have been postponed, we feel this is the correct course of action at this time. "We are currently investigating alternative dates for both events." The outbreak of the coronavirus - given the name Covid-19 - has caused the postponement of several major sporting events, including Formula One's Chinese Grand Prix. The World Athletics Indoor Championships in Nanjing will now take place next year instead, while domestic football at all levels in China has been halted in order to help control the spread of the virus. However, Tokyo 2020 organisers remain confident the Olympic Games will go ahead as planned.
english
<gh_stars>1-10 /***************************************************************************** * FILE: slide_sheet.js * DATE: May 15, 2018 * AUTHOR: nswain * COPYRIGHT: (c) Aquaveo 2018 * LICENSE: *****************************************************************************/ /***************************************************************************** * LIBRARY WRAPPER *****************************************************************************/ var SLIDE_SHEET = (function() { // Wrap the library in a package function "use strict"; // And enable strict mode for this library /************************************************************************ * MODULE LEVEL / GLOBAL VARIABLES *************************************************************************/ var public_interface; // Slide sheet var open_slide_sheet, close_slide_sheet; /************************************************************************ * PRIVATE FUNCTION IMPLEMENTATIONS *************************************************************************/ open = function(id) { // Check that id is not empty if (id.length) { $('#' + id + '.slide-sheet').addClass('show'); } }; close = function(id) { // Check that id is not empty if (id.length) { $('#' + id + '.slide-sheet').removeClass('show'); } }; /************************************************************************ * DEFINE PUBLIC INTERFACE *************************************************************************/ public_interface = { open: function(id) { open(id); }, close: function(id) { close(id); }, }; /************************************************************************ * INITIALIZATION / CONSTRUCTOR *************************************************************************/ // Initialization: jQuery function that gets called when // the DOM tree finishes loading $(document).ready(function(){}); return public_interface; }()); // End of package wrapper // NOTE: that the call operator (open-closed parenthesis) is used to invoke the library wrapper // function immediately after being parsed.
javascript
<reponame>Kushagra-0801/sidescrolling-shooter<filename>src/enemy.rs use ggez::{graphics, Context, GameResult}; use super::{Point, SCREEN_SIZE}; const ENEMY_SPEED: f32 = SCREEN_SIZE.0 / 150.0; pub const ENEMY_SIZE: f32 = 20.0; pub const ENEMY_SPAWN_RATE: f64 = 0.4; #[derive(Debug, Clone)] pub struct Enemy { pub pos: Point, } impl Enemy { pub fn new(pos: Point) -> Self { Self { pos } } pub fn update(&mut self, ctx: &mut Context) { self.pos.x -= ENEMY_SPEED; } pub fn draw(&self, ctx: &mut Context) -> GameResult { let enemy = graphics::Mesh::new_rectangle( ctx, graphics::DrawMode::fill(), graphics::Rect { x: self.pos.x - ENEMY_SIZE / 2.0, y: self.pos.y - ENEMY_SIZE / 2.0, w: ENEMY_SIZE, h: ENEMY_SIZE, }, graphics::WHITE, )?; graphics::draw(ctx, &enemy, graphics::DrawParam::default()) } }
rust
{ "repo_name": "vovo", "repo_url": "https://vovolinux.com.br/vovomazon/packages/var/lib/mzphp/unreleased/", "repo_dirlib": "/var/lib/mzphp/", "folder": "libraries/", "name": "libdv", "version": "1.0.0-1", "maintainer": "<NAME>", "license": "GPL", "url": "https://sourceforge.net/libdv", "deps": "popt, sdl", "file_mz": "libdv-1.0.0-1.mz", "file_desc": "libdv-1.0.0-1.mz.desc", "file_sha256": "libdv-1.0.0-1.mz.sha256", "file_json": "libdv-1.0.0-1.mz.json", "desc": "The Quasar DV Codec (libdv) is a software CODEC for DV video, \nthe encoding format used by most digital camcorders. It can be used \nto copy videos from camcorders using a firewire (IEEE 1394) connection." }
json
{ "id": "the_color_of_the_wind", "originalId": 372301, "rarity": 3, "name": "\"<NAME>\"", "description": "Pohon yang mudah ditemukan di Mondstadt. Dikatakan bahwa pohon-pohon yang berada di wilayah Mondstadt ini, ditiup angin selama ribuan tahun dan beberapa di antaranya telah terpengaruh oleh Elemental Particle. Itulah alasan kenapa Anemo Slime kadang ditemukan sedang tertidur di dahan pohonnya.", "load": 150, "energy": 20, "exp": 40, "category": [ { "id": 10003, "category": "Pohon", "type": "Exterior" } ], "recipe": [ { "id": "fragrant_cedar_wood", "name": "Fragrant Cedar Wood", "amount": 20 } ] }
json
{ "name": "DHT sensor library", "version": "1.3.0", "keywords": "sensor, humidity, temperature, dht, unified", "description": "Arduino library for DHT11, DHT22, etc Temp & Humidity Sensors", "repository": { "type": "git", "url": "https://github.com/adafruit/DHT-sensor-library.git" }, "dependencies": [ { "name": "Adafruit Unified Sensor", "frameworks": "arduino" } ], "frameworks": "arduino", "platforms": "atmelavr" }
json
const set = require('regenerate')();set.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F); module.exports = set;
javascript
Vivo announced its partnership with the FIFA World Cup Qatar 2022 as the official sponsor. vivo has been the Official Smartphone of the FIFA World Cup™ since 2017. Through this partnership, vivo will leverage its rights to the FIFA World Cup, including the Official Emblem, Official Brand Identities, and run unique promotions to connect with passionate football fans globally. Looking ahead, vivo strives to grow internationally by creating immersive customer experiences and advancing its groundbreaking smartphone technology. READ ALSO:
english
from conductor.client.http.models.task import Task from conductor.client.http.models.task_result import TaskResult from conductor.client.http.models.task_result_status import TaskResultStatus from conductor.client.worker.worker_interface import WorkerInterface from ctypes import cdll class CppWrapper: def __init__(self, file_path='./lib.so'): self.cpp_lib = cdll.LoadLibrary(file_path) def get_sum(self, X: int, Y: int) -> int: return self.cpp_lib.get_sum(X, Y) class SimpleCppWorker(WorkerInterface): cpp_wrapper = CppWrapper() def execute(self, task: Task) -> TaskResult: execution_result = self.cpp_wrapper.get_sum(1, 2) task_result = self.get_task_result_from_task(task) task_result.add_output_data( 'sum', execution_result ) task_result.status = TaskResultStatus.COMPLETED return task_result
python
<filename>src/components/Platform/EditorPlatformWorkAbstract.ts import { EditorSettings } from "@/model/Editor/EditorSettings"; /** * 编辑器依赖于平台的功能抽离 */ export interface EditorPlatformWorkAbstract { init: () => void; writeFile: (path: string, data : string, callback: () => void) => void; readFile: (path: string, callback: (data : string, err : Error|string) => void) => void; windowControl: (act : string) => void; editorAction: (cmd: string, ...data : any) => void; editorNotifyCallback: (callback : EditorNotifyCallback) => void; openFileDialog: (callback: (paths: string[], files : File[]) => void) => void; saveFileDialog: (fileName: string,callback: (path: string) => void) => void; loadSettings: (settings : EditorSettings) => void; saveSettings: (settings : EditorSettings) => void; loadRecentList: (loadRecentListToMenu : (data : any) => void) => void; saveRecentList: (data : object) => void; } export type EditorNotifyCallback = (message: string, data: any, backCallback ?: Function) => void;
typescript
- Kids Nutrition (2-15 Yrs) Flavour (2) Pack Size (2) Care plan members get extra discounts, free shipping, rapid delivery, free premium doctor consultation and more. Okay, got it! Absolute Nutrition Whey Isolate is the best health supplement for muscle recovery and bodybuilding. Absolute Nutrition - Whey Isolate powder consists of 100% Whey Isolate that makes it a recommended Sports nutrition supplement. Whey Isolate powder offers 24.75g Protein, with digestive enzymes in one serving. Key Ingredients: Key Benefits: Directions For Use: Use as directed by the physician. Safety Information: Key Ingredients: Key Benefits: - It assists in gaining weight and is suitable for both gym goers and people with sedentary lifestyle (both male and female) Directions For Use: Use as directed by the physician. Safety Information:
english
export const CommentLogRepository = jest.fn().mockReturnValue({ create: jest.fn().mockResolvedValue({ Id: 1, EntryDate: '2021-11-09T21:26:46.534Z', Comments: 'test comment', UserId: 1, RequestId: 1, }), });
typescript
import { Component } from '@angular/core'; import { Toasty } from '@imagene.me/nativescript-toast'; @Component({ selector: 'demo-nativescript-toast', templateUrl: 'nativescript-toast.component.html' }) export class NativescriptToastComponent { constructor() { } ngOnInit() { } shortToast(): void { new Toasty({ text: 'Default short toast' }).show(); } longToast() { new Toasty({ text: 'Default long toast', duration: ToastDuration.Long }).show(); } errorToast() { new Toasty({ text: 'Default error toast', variant: ToastVariant.Error }).show(); } customToast() { new Toasty({ text: 'Custom toast', customVariantParams: { backgroundColor: '#ccc123', textColor: '#aa22ff' } }).show(); } } export enum ToastVariant { 'Success' = 'success', 'Error' = 'error', } export enum ToastDuration { 'Short' = 'short', 'Long' = 'long' }
typescript
{ "directions": [ "Line a 9x9-inch square pan with parchment paper. Place 1/2 cup of butter into the top half of a double boiler, and melt over simmering water. Stir in the sugar and cocoa powder until the mixture is smooth and the sugar has dissolved. Whisk in the beaten egg and gently cook, whisking constantly, until the mixture thickens up, about 1 minute. Remove the double boiler top from the heat, and stir in the cookie crumbs until very well mixed. Press the crust into the prepared dish, and refrigerate until chilled, at least 30 minutes.", "In a mixing bowl, beat together 1/2 cup of butter with the vanilla pudding powder and cream with an electric mixer until the mixture is fluffy. Slowly beat in the confectioners' sugar, and continue beating until the mixture is very creamy and pale yellow, about 2 minutes. Spread the filling over the crust, and return to the refrigerator for at least 30 more minutes.", "Melt semisweet chocolate chips with vegetable oil in the top of a double boiler over hot water, and stir until the mixture is very smooth. Remove the chocolate mixture from the heat, allow to cool slightly, and pour over the vanilla layer. Use a spatula to spread the chocolate completely over the vanilla layer. Place the dish in the refrigerator to cool until the chocolate loses its gloss but is not completely hard, about 30 minutes.", "With a sharp knife, cut into 5 rows by 5 rows (25 squares), return to refrigerator, and chill at least 15 minutes to overnight. Serve cold." ], "ingredients": [ "1/2 cup butter", "1/4 cup white sugar", "1/4 cup cocoa powder", "1 egg, beaten", "1 1/4 cups crushed chocolate cream-filled sandwich cookies (such as OREO\u00ae Cookies)", "1/2 cup butter", "2 tablespoons instant vanilla pudding mix", "3 tablespoons heavy cream", "2 cups confectioners' sugar", "1 cup semisweet chocolate chips", "1 tablespoon vegetable oil" ], "language": "en-US", "source": "allrecipes.com", "tags": [], "title": "Chocolate Cookie Nanaimo Bars", "url": "http://allrecipes.com/recipe/213582/chocolate-cookie-nanaimo-bars/" }
json
<filename>javasource/donotuse_concurrency_donotuse/proxies/ResultEnum.java // This file was generated by Mendix Modeler. // // WARNING: Code you write here will be lost the next time you deploy the project. package donotuse_concurrency_donotuse.proxies; public enum ResultEnum { Executed_And_Rollback(new java.lang.String[][] { new java.lang.String[] { "en_US", "Executed And Rollback" }, new java.lang.String[] { "nl_NL", "Uitgevoerd en rollback" } }), Executed_Lock_Object(new java.lang.String[][] { new java.lang.String[] { "en_US", "Executed Lock Object" }, new java.lang.String[] { "nl_NL", "Slotobject uitgevoerd" } }), Other_Executed(new java.lang.String[][] { new java.lang.String[] { "en_US", "Other Executed" }, new java.lang.String[] { "nl_NL", "Ander heeft uitgevoerd" } }), Other_Executed_Before_Start(new java.lang.String[][] { new java.lang.String[] { "en_US", "Other Executed Before Start" }, new java.lang.String[] { "nl_NL", "Ander heeft uitgevoerd voordat gestart" } }), Out_Of_Sequence(new java.lang.String[][] { new java.lang.String[] { "en_US", "Out Of Sequence" }, new java.lang.String[] { "nl_NL", "Uit volgorde" } }), Start(new java.lang.String[][] { new java.lang.String[] { "en_US", "Start" }, new java.lang.String[] { "nl_NL", "Start" } }), Timeout(new java.lang.String[][] { new java.lang.String[] { "en_US", "Timeout" }, new java.lang.String[] { "nl_NL", "Timeout" } }), Protection_Clears_Lock(new java.lang.String[][] { new java.lang.String[] { "en_US", "Protection Clears Lock" }, new java.lang.String[] { "nl_NL", "Bescherming geeft slot vrij" } }), Unlock_Without_Server_Lock(new java.lang.String[][] { new java.lang.String[] { "en_US", "Unlock Without Server Lock" }, new java.lang.String[] { "nl_NL", "Slot vrijgeven zonder serverslot" } }), Startup_Server(new java.lang.String[][] { new java.lang.String[] { "en_US", "Startup Server" }, new java.lang.String[] { "nl_NL", "Opstarten server" } }), Shutdown_Server(new java.lang.String[][] { new java.lang.String[] { "en_US", "Shutdown Server" }, new java.lang.String[] { "nl_NL", "Stoppen server" } }), Simulated_Crash(new java.lang.String[][] { new java.lang.String[] { "en_US", "Simulated Crash" }, new java.lang.String[] { "nl_NL", "Gesimuleerde crash" } }), Simulated_Hang(new java.lang.String[][] { new java.lang.String[] { "en_US", "Simulated Hang" }, new java.lang.String[] { "nl_NL", "Gesimuleerd hangen" } }), Continue_After_Hang(new java.lang.String[][] { new java.lang.String[] { "en_US", "Continue After Hang" }, new java.lang.String[] { "nl_NL", "Verder na hangen" } }), Continue_After_Crash(new java.lang.String[][] { new java.lang.String[] { "en_US", "Continue After Crash" }, new java.lang.String[] { "nl_NL", "Verder na crash" } }), History_On(new java.lang.String[][] { new java.lang.String[] { "en_US", "History On" }, new java.lang.String[] { "nl_NL", "Geschiedenis aan" } }), History_Off(new java.lang.String[][] { new java.lang.String[] { "en_US", "History Off" }, new java.lang.String[] { "nl_NL", "Geschiedenis uit" } }), History_Truncated(new java.lang.String[][] { new java.lang.String[] { "en_US", "History Truncated" }, new java.lang.String[] { "nl_NL", "Geschiedenis gewist" } }); private java.util.Map<java.lang.String, java.lang.String> captions; private ResultEnum(java.lang.String[][] captionStrings) { this.captions = new java.util.HashMap<java.lang.String, java.lang.String>(); for (java.lang.String[] captionString : captionStrings) captions.put(captionString[0], captionString[1]); } public java.lang.String getCaption(java.lang.String languageCode) { if (captions.containsKey(languageCode)) return captions.get(languageCode); return captions.get("en_US"); } public java.lang.String getCaption() { return captions.get("en_US"); } }
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.ql.ddl.table.constraint; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.antlr.runtime.TokenRewriteStream; import org.antlr.runtime.tree.Tree; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.common.TableName; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.SQLCheckConstraint; import org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint; import org.apache.hadoop.hive.metastore.api.SQLForeignKey; import org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint; import org.apache.hadoop.hive.metastore.api.SQLPrimaryKey; import org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint; import org.apache.hadoop.hive.ql.ErrorMsg; import org.apache.hadoop.hive.ql.exec.ColumnInfo; import org.apache.hadoop.hive.ql.exec.FunctionRegistry; import org.apache.hadoop.hive.ql.parse.ASTNode; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.HiveParser; import org.apache.hadoop.hive.ql.parse.ParseDriver; import org.apache.hadoop.hive.ql.parse.RowResolver; import org.apache.hadoop.hive.ql.parse.SemanticException; import org.apache.hadoop.hive.ql.parse.type.ExprNodeTypeCheck; import org.apache.hadoop.hive.ql.parse.type.TypeCheckCtx; import org.apache.hadoop.hive.ql.parse.UnparseTranslator; import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc; import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils; import com.google.common.collect.ImmutableList; /** * Utilities for constraints. */ public final class ConstraintsUtils { private ConstraintsUtils() { throw new UnsupportedOperationException("ConstraintsUtils should not be instantiated!"); } private static class ConstraintInfo { final String colName; final String constraintName; final boolean enable; final boolean validate; final boolean rely; final String defaultValue; ConstraintInfo(String colName, String constraintName, boolean enable, boolean validate, boolean rely, String defaultValue) { this.colName = colName; this.constraintName = constraintName; this.enable = enable; this.validate = validate; this.rely = rely; this.defaultValue = defaultValue; } } public static void processPrimaryKeys(TableName tableName, ASTNode child, List<SQLPrimaryKey> primaryKeys) throws SemanticException { List<ConstraintInfo> primaryKeyInfos = generateConstraintInfos(child); constraintInfosToPrimaryKeys(tableName, primaryKeyInfos, primaryKeys); } public static void processPrimaryKeys(TableName tableName, ASTNode child, List<String> columnNames, List<SQLPrimaryKey> primaryKeys) throws SemanticException { List<ConstraintInfo> primaryKeyInfos = generateConstraintInfos(child, columnNames, null, null); constraintInfosToPrimaryKeys(tableName, primaryKeyInfos, primaryKeys); } private static void constraintInfosToPrimaryKeys(TableName tableName, List<ConstraintInfo> primaryKeyInfos, List<SQLPrimaryKey> primaryKeys) { int i = 1; for (ConstraintInfo primaryKeyInfo : primaryKeyInfos) { primaryKeys.add(new SQLPrimaryKey(tableName.getDb(), tableName.getTable(), primaryKeyInfo.colName, i++, primaryKeyInfo.constraintName, primaryKeyInfo.enable, primaryKeyInfo.validate, primaryKeyInfo.rely)); } } /** * Process the unique constraints from the ast node and populate the SQLUniqueConstraint list. */ public static void processUniqueConstraints(TableName tableName, ASTNode child, List<SQLUniqueConstraint> uniqueConstraints) throws SemanticException { List<ConstraintInfo> uniqueInfos = generateConstraintInfos(child); constraintInfosToUniqueConstraints(tableName, uniqueInfos, uniqueConstraints); } public static void processUniqueConstraints(TableName tableName, ASTNode child, List<String> columnNames, List<SQLUniqueConstraint> uniqueConstraints) throws SemanticException { List<ConstraintInfo> uniqueInfos = generateConstraintInfos(child, columnNames, null, null); constraintInfosToUniqueConstraints(tableName, uniqueInfos, uniqueConstraints); } private static void constraintInfosToUniqueConstraints(TableName tableName, List<ConstraintInfo> uniqueInfos, List<SQLUniqueConstraint> uniqueConstraints) { int i = 1; for (ConstraintInfo uniqueInfo : uniqueInfos) { uniqueConstraints.add(new SQLUniqueConstraint(tableName.getCat(), tableName.getDb(), tableName.getTable(), uniqueInfo.colName, i++, uniqueInfo.constraintName, uniqueInfo.enable, uniqueInfo.validate, uniqueInfo.rely)); } } public static void processCheckConstraints(TableName tableName, ASTNode child, List<String> columnNames, List<SQLCheckConstraint> checkConstraints, final ASTNode typeChild, final TokenRewriteStream tokenRewriteStream) throws SemanticException { List<ConstraintInfo> checkInfos = generateConstraintInfos(child, columnNames, typeChild, tokenRewriteStream); constraintInfosToCheckConstraints(tableName, checkInfos, checkConstraints); } private static void constraintInfosToCheckConstraints(TableName tableName, List<ConstraintInfo> checkInfos, List<SQLCheckConstraint> checkConstraints) { for (ConstraintInfo checkInfo : checkInfos) { checkConstraints.add(new SQLCheckConstraint(tableName.getCat(), tableName.getDb(), tableName.getTable(), checkInfo.colName, checkInfo.defaultValue, checkInfo.constraintName, checkInfo.enable, checkInfo.validate, checkInfo.rely)); } } public static void processDefaultConstraints(TableName tableName, ASTNode child, List<String> columnNames, List<SQLDefaultConstraint> defaultConstraints, final ASTNode typeChild, TokenRewriteStream tokenRewriteStream) throws SemanticException { List<ConstraintInfo> defaultInfos = generateConstraintInfos(child, columnNames, typeChild, tokenRewriteStream); constraintInfosToDefaultConstraints(tableName, defaultInfos, defaultConstraints); } private static void constraintInfosToDefaultConstraints(TableName tableName, List<ConstraintInfo> defaultInfos, List<SQLDefaultConstraint> defaultConstraints) { for (ConstraintInfo defaultInfo : defaultInfos) { defaultConstraints.add(new SQLDefaultConstraint(tableName.getCat(), tableName.getDb(), tableName.getTable(), defaultInfo.colName, defaultInfo.defaultValue, defaultInfo.constraintName, defaultInfo.enable, defaultInfo.validate, defaultInfo.rely)); } } public static void processNotNullConstraints(TableName tableName, ASTNode child, List<String> columnNames, List<SQLNotNullConstraint> notNullConstraints) throws SemanticException { List<ConstraintInfo> notNullInfos = generateConstraintInfos(child, columnNames, null, null); constraintInfosToNotNullConstraints(tableName, notNullInfos, notNullConstraints); } private static void constraintInfosToNotNullConstraints(TableName tableName, List<ConstraintInfo> notNullInfos, List<SQLNotNullConstraint> notNullConstraints) { for (ConstraintInfo notNullInfo : notNullInfos) { notNullConstraints.add(new SQLNotNullConstraint(tableName.getCat(), tableName.getDb(), tableName.getTable(), notNullInfo.colName, notNullInfo.constraintName, notNullInfo.enable, notNullInfo.validate, notNullInfo.rely)); } } /** * Get the constraint from the AST and populate the cstrInfos with the required information. */ private static List<ConstraintInfo> generateConstraintInfos(ASTNode child) throws SemanticException { ImmutableList.Builder<String> columnNames = ImmutableList.builder(); for (int j = 0; j < child.getChild(0).getChildCount(); j++) { Tree columnName = child.getChild(0).getChild(j); BaseSemanticAnalyzer.checkColumnName(columnName.getText()); columnNames.add(BaseSemanticAnalyzer.unescapeIdentifier(columnName.getText().toLowerCase())); } return generateConstraintInfos(child, columnNames.build(), null, null); } private static final int CONSTRAINT_MAX_LENGTH = 255; /** * Get the constraint from the AST and populate the cstrInfos with the required information. * @param child The node with the constraint token * @param columnNames The name of the columns for the primary key * @param typeChildForDefault type of column used for default value type check */ private static List<ConstraintInfo> generateConstraintInfos(ASTNode child, List<String> columnNames, ASTNode typeChildForDefault, TokenRewriteStream tokenRewriteStream) throws SemanticException { // The ANTLR grammar looks like : // 1. KW_CONSTRAINT idfr=identifier KW_PRIMARY KW_KEY pkCols=columnParenthesesList // constraintOptsCreate? // -> ^(TOK_PRIMARY_KEY $pkCols $idfr constraintOptsCreate?) // when the user specifies the constraint name. // 2. KW_PRIMARY KW_KEY columnParenthesesList // constraintOptsCreate? // -> ^(TOK_PRIMARY_KEY columnParenthesesList constraintOptsCreate?) // when the user does not specify the constraint name. // Default values String constraintName = null; //by default if user hasn't provided any optional constraint properties // it will be considered ENABLE and NOVALIDATE and RELY=true boolean enable = true; boolean validate = false; boolean rely = true; String checkOrDefaultValue = null; int childType = child.getToken().getType(); for (int i = 0; i < child.getChildCount(); i++) { ASTNode grandChild = (ASTNode) child.getChild(i); int type = grandChild.getToken().getType(); if (type == HiveParser.TOK_CONSTRAINT_NAME) { constraintName = BaseSemanticAnalyzer.unescapeIdentifier(grandChild.getChild(0).getText().toLowerCase()); } else if (type == HiveParser.TOK_ENABLE) { enable = true; // validate is false by default if we enable the constraint // TODO: A constraint like NOT NULL could be enabled using ALTER but VALIDATE remains // false in such cases. Ideally VALIDATE should be set to true to validate existing data validate = false; } else if (type == HiveParser.TOK_DISABLE) { enable = false; // validate is false by default if we disable the constraint validate = false; rely = false; } else if (type == HiveParser.TOK_VALIDATE) { validate = true; } else if (type == HiveParser.TOK_NOVALIDATE) { validate = false; } else if (type == HiveParser.TOK_RELY) { rely = true; } else if (type == HiveParser.TOK_NORELY) { rely = false; } else if (childType == HiveParser.TOK_DEFAULT_VALUE) { // try to get default value only if this is DEFAULT constraint checkOrDefaultValue = getDefaultValue(grandChild, typeChildForDefault, tokenRewriteStream); } else if (childType == HiveParser.TOK_CHECK_CONSTRAINT) { checkOrDefaultValue = tokenRewriteStream.toOriginalString(grandChild.getTokenStartIndex(), grandChild.getTokenStopIndex()); } } // metastore schema only allows maximum 255 for constraint name column if (constraintName != null && constraintName.length() > CONSTRAINT_MAX_LENGTH) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Constraint name: " + constraintName + " exceeded maximum allowed length: " + CONSTRAINT_MAX_LENGTH)); } // metastore schema only allows maximum 255 for constraint value column if (checkOrDefaultValue!= null && checkOrDefaultValue.length() > CONSTRAINT_MAX_LENGTH) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Constraint value: " + checkOrDefaultValue + " exceeded maximum allowed length: " + CONSTRAINT_MAX_LENGTH)); } // NOT NULL constraint could be enforced/enabled if (enable && childType != HiveParser.TOK_NOT_NULL && childType != HiveParser.TOK_DEFAULT_VALUE && childType != HiveParser.TOK_CHECK_CONSTRAINT) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("ENABLE/ENFORCED feature not supported yet. " + "Please use DISABLE/NOT ENFORCED instead.")); } if (validate) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("VALIDATE feature not supported yet. " + "Please use NOVALIDATE instead.")); } List<ConstraintInfo> constraintInfos = new ArrayList<>(); if (columnNames == null) { constraintInfos.add(new ConstraintInfo(null, constraintName, enable, validate, rely, checkOrDefaultValue)); } else { for (String columnName : columnNames) { constraintInfos.add(new ConstraintInfo(columnName, constraintName, enable, validate, rely, checkOrDefaultValue)); } } return constraintInfos; } private static final int DEFAULT_MAX_LEN = 255; /** * Validate and get the default value from the AST. * @param node AST node corresponding to default value * @return retrieve the default value and return it as string */ private static String getDefaultValue(ASTNode node, ASTNode typeChild, TokenRewriteStream tokenStream) throws SemanticException{ // first create expression from defaultValueAST TypeCheckCtx typeCheckCtx = new TypeCheckCtx(null); ExprNodeDesc defaultValExpr = ExprNodeTypeCheck.genExprNode(node, typeCheckCtx).get(node); if (defaultValExpr == null) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Invalid Default value!")); } //get default value to be be stored in metastore String defaultValueText = tokenStream.toOriginalString(node.getTokenStartIndex(), node.getTokenStopIndex()); if (defaultValueText.length() > DEFAULT_MAX_LEN) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Invalid Default value: " + defaultValueText + " .Maximum character length allowed is " + DEFAULT_MAX_LEN +" .")); } // Make sure the default value expression type is exactly same as column's type. TypeInfo defaultValTypeInfo = defaultValExpr.getTypeInfo(); TypeInfo colTypeInfo = TypeInfoUtils.getTypeInfoFromTypeString(BaseSemanticAnalyzer.getTypeStringFromAST(typeChild)); if (!defaultValTypeInfo.equals(colTypeInfo)) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Invalid type: " + defaultValTypeInfo.getTypeName() + " for default value: " + defaultValueText + ". Please make sure that " + "the type is compatible with column type: " + colTypeInfo.getTypeName())); } // throw an error if default value isn't what hive allows if (!isDefaultValueAllowed(defaultValExpr)) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Invalid Default value: " + defaultValueText + ". DEFAULT only allows constant or function expressions")); } return defaultValueText; } private static boolean isDefaultValueAllowed(ExprNodeDesc defaultValExpr) { while (FunctionRegistry.isOpCast(defaultValExpr)) { defaultValExpr = defaultValExpr.getChildren().get(0); } if (defaultValExpr instanceof ExprNodeConstantDesc) { return true; } if (defaultValExpr instanceof ExprNodeGenericFuncDesc) { for (ExprNodeDesc argument : defaultValExpr.getChildren()) { if (!isDefaultValueAllowed(argument)) { return false; } } return true; } return false; } public static void processForeignKeys(TableName tableName, ASTNode node, List<SQLForeignKey> foreignKeys) throws SemanticException { // The ANTLR grammar looks like : // 1. KW_CONSTRAINT idfr=identifier KW_FOREIGN KW_KEY fkCols=columnParenthesesList // KW_REFERENCES tabName=tableName parCols=columnParenthesesList // enableSpec=enableSpecification validateSpec=validateSpecification relySpec=relySpecification // -> ^(TOK_FOREIGN_KEY $idfr $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec) // when the user specifies the constraint name (i.e. child.getChildCount() == 7) // 2. KW_FOREIGN KW_KEY fkCols=columnParenthesesList // KW_REFERENCES tabName=tableName parCols=columnParenthesesList // enableSpec=enableSpecification validateSpec=validateSpecification relySpec=relySpecification // -> ^(TOK_FOREIGN_KEY $fkCols $tabName $parCols $relySpec $enableSpec $validateSpec) // when the user does not specify the constraint name (i.e. child.getChildCount() == 6) String constraintName = null; boolean enable = true; boolean validate = true; boolean rely = false; int fkIndex = -1; for (int i = 0; i < node.getChildCount(); i++) { ASTNode grandChild = (ASTNode) node.getChild(i); int type = grandChild.getToken().getType(); if (type == HiveParser.TOK_CONSTRAINT_NAME) { constraintName = BaseSemanticAnalyzer.unescapeIdentifier(grandChild.getChild(0).getText().toLowerCase()); } else if (type == HiveParser.TOK_ENABLE) { enable = true; // validate is true by default if we enable the constraint validate = true; } else if (type == HiveParser.TOK_DISABLE) { enable = false; // validate is false by default if we disable the constraint validate = false; } else if (type == HiveParser.TOK_VALIDATE) { validate = true; } else if (type == HiveParser.TOK_NOVALIDATE) { validate = false; } else if (type == HiveParser.TOK_RELY) { rely = true; } else if (type == HiveParser.TOK_TABCOLNAME && fkIndex == -1) { fkIndex = i; } } if (enable) { throw new SemanticException(ErrorMsg.INVALID_FK_SYNTAX.getMsg("ENABLE feature not supported yet. " + "Please use DISABLE instead.")); } if (validate) { throw new SemanticException(ErrorMsg.INVALID_FK_SYNTAX.getMsg("VALIDATE feature not supported yet. " + "Please use NOVALIDATE instead.")); } int ptIndex = fkIndex + 1; int pkIndex = ptIndex + 1; if (node.getChild(fkIndex).getChildCount() != node.getChild(pkIndex).getChildCount()) { throw new SemanticException(ErrorMsg.INVALID_FK_SYNTAX.getMsg( " The number of foreign key columns should be same as number of parent key columns ")); } TableName parentTblName = BaseSemanticAnalyzer.getQualifiedTableName((ASTNode) node.getChild(ptIndex)); for (int j = 0; j < node.getChild(fkIndex).getChildCount(); j++) { SQLForeignKey sqlForeignKey = new SQLForeignKey(); sqlForeignKey.setFktable_db(tableName.getDb()); sqlForeignKey.setFktable_name(tableName.getTable()); Tree fkgrandChild = node.getChild(fkIndex).getChild(j); BaseSemanticAnalyzer.checkColumnName(fkgrandChild.getText()); sqlForeignKey.setFkcolumn_name(BaseSemanticAnalyzer.unescapeIdentifier(fkgrandChild.getText().toLowerCase())); sqlForeignKey.setPktable_db(parentTblName.getDb()); sqlForeignKey.setPktable_name(parentTblName.getTable()); Tree pkgrandChild = node.getChild(pkIndex).getChild(j); sqlForeignKey.setPkcolumn_name(BaseSemanticAnalyzer.unescapeIdentifier(pkgrandChild.getText().toLowerCase())); sqlForeignKey.setKey_seq(j+1); sqlForeignKey.setFk_name(constraintName); sqlForeignKey.setEnable_cstr(enable); sqlForeignKey.setValidate_cstr(validate); sqlForeignKey.setRely_cstr(rely); foreignKeys.add(sqlForeignKey); } } public static void validateCheckConstraint(List<FieldSchema> columns, List<SQLCheckConstraint> checkConstraints, Configuration conf) throws SemanticException{ // create colinfo and then row resolver RowResolver rr = new RowResolver(); for (FieldSchema column : columns) { ColumnInfo ci = new ColumnInfo(column.getName(), TypeInfoUtils.getTypeInfoFromTypeString(column.getType()), null, false); rr.put(null, column.getName(), ci); } TypeCheckCtx typeCheckCtx = new TypeCheckCtx(rr); // TypeCheckProcFactor expects typecheckctx to have unparse translator UnparseTranslator unparseTranslator = new UnparseTranslator(conf); typeCheckCtx.setUnparseTranslator(unparseTranslator); for (SQLCheckConstraint cc : checkConstraints) { try { ParseDriver parseDriver = new ParseDriver(); ASTNode checkExprAST = parseDriver.parseExpression(cc.getCheck_expression()); validateCheckExprAST(checkExprAST); Map<ASTNode, ExprNodeDesc> genExprs = ExprNodeTypeCheck.genExprNode(checkExprAST, typeCheckCtx); ExprNodeDesc checkExpr = genExprs.get(checkExprAST); if (checkExpr == null) { throw new SemanticException( ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Invalid type for CHECK constraint: ") + cc.getCheck_expression()); } if (checkExpr.getTypeInfo().getTypeName() != serdeConstants.BOOLEAN_TYPE_NAME) { throw new SemanticException( ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Only boolean type is supported for CHECK constraint: ") + cc.getCheck_expression() + ". Found: " + checkExpr.getTypeInfo().getTypeName()); } validateCheckExpr(checkExpr); } catch (Exception e) { throw new SemanticException(ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Invalid CHECK constraint expression: ") + cc.getCheck_expression() + ". " + e.getMessage(), e); } } } // given an ast node this method recursively goes over checkExpr ast. If it finds a node of type TOK_SUBQUERY_EXPR // it throws an error. // This method is used to validate check expression since check expression isn't allowed to have subquery private static void validateCheckExprAST(ASTNode checkExpr) throws SemanticException { if (checkExpr == null) { return; } if (checkExpr.getType() == HiveParser.TOK_SUBQUERY_EXPR) { throw new SemanticException( ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Subqueries are not allowed in Check Constraints")); } for (int i = 0; i < checkExpr.getChildCount(); i++) { validateCheckExprAST((ASTNode)checkExpr.getChild(i)); } } // recursively go through expression and make sure the following: // * If expression is UDF it is not permanent UDF private static void validateCheckExpr(ExprNodeDesc checkExpr) throws SemanticException { if (checkExpr instanceof ExprNodeGenericFuncDesc) { ExprNodeGenericFuncDesc funcDesc = (ExprNodeGenericFuncDesc)checkExpr; boolean isBuiltIn = FunctionRegistry.isBuiltInFuncExpr(funcDesc); boolean isPermanent = FunctionRegistry.isPermanentFunction(funcDesc); if (!isBuiltIn && !isPermanent) { throw new SemanticException( ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Temporary UDFs are not allowed in Check Constraints")); } if (FunctionRegistry.impliesOrder(funcDesc.getFuncText())) { throw new SemanticException( ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Window functions are not allowed in Check Constraints")); } } if (checkExpr.getChildren() == null) { return; } for (ExprNodeDesc childExpr:checkExpr.getChildren()) { validateCheckExpr(childExpr); } } public static boolean hasEnabledOrValidatedConstraints(List<SQLNotNullConstraint> notNullConstraints, List<SQLDefaultConstraint> defaultConstraints, List<SQLCheckConstraint> checkConstraints) { if (notNullConstraints != null) { for (SQLNotNullConstraint nnC : notNullConstraints) { if (nnC.isEnable_cstr() || nnC.isValidate_cstr()) { return true; } } } if (defaultConstraints != null && !defaultConstraints.isEmpty()) { return true; } if (checkConstraints != null && !checkConstraints.isEmpty()) { return true; } return false; } }
java
<reponame>deathcleaver/swizzle<gh_stars>1-10 #ifndef SCRIPT_HPP #define SCRIPT_HPP #include "Api.hpp" namespace script { class SWIZZLE_API Script { public: Script(); virtual ~Script(); void load(const char* binary); void loadFromFile(const char* binaryFile); void compile(const char* source); void compileFromFile(const char* sourceFile); }; } #endif
cpp
On social networking sites, people often share photos of adventure activities they undertake. But it’s not just their friends and family but also insurers who might be interested in such images. Imagine someone going to buy a life insurance and being asked to pay higher premium just because he or she posted such images on social media. This is not future. It is already happening in the developed countries and could soon become a reality in India. The digital world is built on free service in exchange of user information. When you install a free app or use a free service, it exchanges your personal data with other companies to deliver customised products or advertisements. Increasingly, it’s becoming difficult for individuals to protect their personal information from being shared. “In India, it’s even worse. While developed world is enacting laws in this area, there is no dedicated law in India that deals with data protection or user privacy despite the country having a huge base of mobile and internet,” says Pavan Duggal, a cyber-law expert. Duggal said Indian smartphone and internet users are exposed to service providers using their personal data for various purposes, as there are no dedicated laws. The IT Act of 2000 is also silent on the issue of user privacy. “The moment a person agrees to the terms and condition of the app or service provider, he or she has no control left on the way information will be used. The companies cannot be held accountable thereafter,” says Amit Jaju, executive director, fraud investigation and dispute services, EY India. Some big companies do invest in protecting the individual data but in today’s world no one is safe from hackers as it was seen in the case of Yahoo, where hackers breached the system to get access to data of millions of users. Convenience, safety or discount? While it may not be possible to entirely protect your data, you can take several steps to keep your identity and information safe. “Avoid sharing your real data. You should rather use nicknames, incorrect date of birth and if possible make a separate e-mail address for such apps and services. Don’t share your phone number,” said an expert. There are many online services that rate apps based on the information they collect from users and how they use it. You can see the ranking before downloading the apps. If you want to fiercely guard your information, it’s always advisable to go for a paid service or app rather than using the free one. But paid does not mean privacy protection every time. “One must read the terms and conditions (T&C) that the provider mentions before signing up, which covers the data that they will take from you, how they will use it and how long they will store it,” said Jaju. It is safer to download apps of the operating system maker, like Google Play for Android. That, however, may not completely take care of the privacy concerns. Experts point out example of an app that lets you use the phone flash light as a torch. For this simple function, it asks user to give access to the location, text messages, contacts, etc. Delete unnecessary apps from your phone and use the one that you actually need. Many phones these days allow you to control the permission you give to individual apps. You should customise the permissions.
english
Islamabad, May 7 (PTI) Pakistan’s Chief Justice Umar Ata Bandial said on Sunday that the Supreme Court judges were duty-bound to follow the Constitution and must not “blink” their eyes while enforcing its provision of holding polls within 90 days of an assembly’s dissolution. Speaking at a conference on minority rights in Lahore, the chief justice said he was optimistic that the country’s leaders, institutions and people were all committed to the Constitution. “When it comes to constitutional enforcement we must not blink our eyes. If it says 90 days for holding elections, it is our duty to say that and not our choice, instead of finding a reason why we should avoid saying that,” he said. His statement came as the May 14 deadline set by the apex court for holding elections in the Punjab province was approaching fast even as the country’s Election Commission and the government have shown inability to organise the polls. It is feared that the court may hold the government or some individual responsible for contempt for violating the orders, leading to disqualification of the person(s) held responsible. The chief justice rejected that the apex court verdict of April 4 to hold elections was controversial. “You must support the Supreme Court if you stand up for the law and the Constitution and not [for] any individual,” he said. He said when the Supreme Court speaks on merit, then its judgement has moral authority. Bandial said the issue of elections has deeply divided Pakistani politics as the coalition government wants to hold elections for the federal and provincial assemblies on the same date after the current national assembly completes its term on August 13. Last month, the Supreme Court, while hearing a petition of the country’s main opposition party Pakistan Tehreek-e-Insaf (PTI), directed the Election Commission of Pakistan (ECP) to hold general elections to the Punjab Assembly on May 14. However, the coalition government rejected the apex court’s orders. After repeated back and forth last week, the Supreme Court on April 20 afforded a temporary respite to the country’s main political parties, giving them time till April 26 to develop a consensus on the date for elections to the provincial and national assemblies, so they could be held simultaneously across the country. Negotiations subsequently followed between the government and the PTI but remained inconclusive. Referring to the negotiations between the government and the PTI, the chief justice said the apex court was informed that they had not concluded yet. “We have nothing to do with that but at least they are conscious that they have a duty to comply [with] the Constitution and we are there to support that effort otherwise our judgement is there, it has a force of its own,” he was quoted as saying by the Dawn newspaper. “It may not be implemented today but it will last to the test of time and shall be implemented tomorrow,” the chief justice pointed out. Speaking about minority rights, he said the Constitution assured freedom to profess religion and to manage religious institutions subject to public order and morality. This report is auto-generated from PTI news service. ThePrint holds no responsibility for its content.
english
New Delhi : Had an argument with a friend? Sitting under blue lighting can help you calm down and alleviate such psychosocial stress, scientists claim. Scientists including those from the University of Granada (UGR) in Spain have proven, by means of an objective evaluation using electrophysiological measurements, that blue lighting accelerates the relaxation process in comparison with conventional white lighting. Psychosocial stress is a kind of short-term stress that occurs during social or interpersonal relationships, for example while arguing with a friend or when someone pressures you to finish a certain task as soon as possible. The researchers note that psychosocial stress produces some physiological responses that can be measured by means of bio-signals. This stress is very common and negatively affects people’s health and quality of life. For the study published in the journal PLOS One, the researchers induced stress in twelve volunteers using MIST – a well-described method to cause stress in humans. The session elicited a uniform level of stress in all participants. After a training period of three minutes, the MIST lasted six minutes. Participants lay down in a room with no stimulus but either a blue or white lighting. Diverse bio-signals, such as heart rate and brain activity, were measured throughout the whole session using an electrocardiogram and an electroencephalogram, respectively. ily foods, spicy dishes, fried fares… Done it all and regretting it? If you’re suffering from acid reflux, you probably know what to eat and what to avoid. But is there anything to relieve you from such digestive issues? Well, there are certain drinks for acidity to improve your digestive health, if you consume them regularly. Ready to find out? Let’s go! In an Instagram video, nutritionist and health coach Neha Ranglani has suggested that to calm your acid reflux, you need to help your food get digested well. This can be done by improving your stomach acid production and healing your stomach cells. And these drinks that she has suggested, can help with just that, allowing you to digest your food well without the burn. Here are 6 drinks for acidity: Cucumber is a favourite salad ingredient in summer because of its cooling properties. Consuming cucumber juice can be really beneficial for relievingacid reflux because it is highly nutritious as it provides your body with both fibre and water which is needed for better digestion and has a low calorie volume. What’s more? It can also keep you full and help you avoid reaching out to junk foods! Lemon can do you a world of good! Being rich in vitamin C and B and minerals such as phosphorus, calcium, and magnesium—drinking lemon water regularly will not only help you burn fat but will resolve your digestive issues such as acidity. Moreover, lemon water contains laxative properties that can help improve your bowel movements and clear toxins from the body, keeping you hydrated. Ginger aka adrak, is a very well known ingredient that has been used for ages to help relieve acidity and gas. Also, if you are facing digestive issues due to overeating or undigested food, consuming ginger water can help in emptying your stomach. You can also consume it by adding it to soups, subzi or curry, and even tea. Remember that you’re not allowed to consume ginger in excess amounts.
english
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sky/viewer/internals.h" #include "mojo/edk/js/core.h" #include "mojo/edk/js/handle.h" #include "mojo/edk/js/support.h" #include "mojo/public/cpp/application/connect.h" #include "mojo/public/interfaces/application/shell.mojom.h" #include "sky/engine/public/web/WebFrame.h" #include "sky/engine/public/web/WebView.h" #include "sky/viewer/document_view.h" #include "v8/include/v8.h" #include <limits> namespace sky { gin::WrapperInfo Internals::kWrapperInfo = {gin::kEmbedderNativeGin}; // static gin::Handle<Internals> Internals::Create( v8::Isolate* isolate, DocumentView* document_view) { gin::Handle<Internals> internals = gin::CreateHandle(isolate, new Internals(document_view)); v8::Handle<v8::Object> object = internals.ToV8().As<v8::Object>(); object->Set(gin::StringToV8(isolate, "core"), mojo::js::Core::GetModule(isolate)); object->Set(gin::StringToV8(isolate, "support"), mojo::js::Support::GetModule(isolate)); return internals; } Internals::Internals(DocumentView* document_view) : document_view_(document_view->GetWeakPtr()) { mojo::ConnectToService(document_view->imported_services(), &test_harness_); } Internals::~Internals() { } gin::ObjectTemplateBuilder Internals::GetObjectTemplateBuilder( v8::Isolate* isolate) { return Wrappable<Internals>::GetObjectTemplateBuilder(isolate) .SetMethod("renderTreeAsText", &Internals::RenderTreeAsText) .SetMethod("contentAsText", &Internals::ContentAsText) .SetMethod("contentAsMarkup", &Internals::ContentAsMarkup) .SetMethod("notifyTestComplete", &Internals::NotifyTestComplete) .SetMethod("connectToService", &Internals::ConnectToService); } std::string Internals::RenderTreeAsText() { if (!document_view_) return std::string(); return document_view_->web_view()->mainFrame()->renderTreeAsText().utf8(); } std::string Internals::ContentAsText() { if (!document_view_) return std::string(); return document_view_->web_view()->mainFrame()->contentAsText( 1024*1024).utf8(); } std::string Internals::ContentAsMarkup() { if (!document_view_) return std::string(); return document_view_->web_view()->mainFrame()->contentAsMarkup().utf8(); } void Internals::NotifyTestComplete(const std::string& test_result) { test_harness_->OnTestComplete(test_result); } mojo::Handle Internals::ConnectToService( const std::string& application_url, const std::string& interface_name) { if (!document_view_) return mojo::Handle(); mojo::ServiceProviderPtr service_provider; document_view_->shell()->ConnectToApplication( application_url, mojo::GetProxy(&service_provider)); mojo::MessagePipe pipe; service_provider->ConnectToService(interface_name, pipe.handle1.Pass()); return pipe.handle0.release(); } } // namespace sky
cpp