text
stringlengths
1
1.04M
language
stringclasses
25 values
<filename>lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-March/005896.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <TITLE> [whatwg] diffed versions (CVS) </TITLE> <LINK REL="Index" HREF="index.html" > <LINK REL="made" HREF="mailto:whatwg%40lists.whatwg.org?Subject=Re%3A%20%5Bwhatwg%5D%20diffed%20versions%20%28CVS%29&In-Reply-To=%3C4405641B.9070008%40inkedblade.net%3E"> <META NAME="robots" CONTENT="index,nofollow"> <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> <LINK REL="Next" HREF="005904.html"> </HEAD> <BODY BGCOLOR="#ffffff"> <H1>[whatwg] diffed versions (CVS)</H1> <!--htdig_noindex--> <B>fantasai</B> <A HREF="mailto:whatwg%40lists.whatwg.org?Subject=Re%3A%20%5Bwhatwg%5D%20diffed%20versions%20%28CVS%29&In-Reply-To=%3C4405641B.9070008%40inkedblade.net%3E" TITLE="[whatwg] diffed versions (CVS)">fantasai.lists at inkedblade.net </A><BR> <I>Wed Mar 1 01:06:35 PST 2006</I> <P><UL> <LI>Next message: <A HREF="005904.html">[whatwg] diffed versions (CVS) </A></li> <LI> <B>Messages sorted by:</B> <a href="date.html#5896">[ date ]</a> <a href="thread.html#5896">[ thread ]</a> <a href="subject.html#5896">[ subject ]</a> <a href="author.html#5896">[ author ]</a> </LI> </UL> <HR> <!--/htdig_noindex--> <!--beginarticle--> <PRE><NAME> wrote: &gt;<i> Would it be possible to use (public) CVS or Subversion for the drafts that are </I>&gt;<i> created so its easier to track changes in the document? Given that the document </I>&gt;<i> is quite large it makes it hard to track fixes and additions. As a </I>&gt;<i> reader/reviewer, I would have no idea what was done in the draft of 24 February </I>&gt;<i> as opposed to the one from 22 February 2006... </I>&gt;<i> </I>&gt;<i> Best thing would be if there was some list to which CVS diff-logs would be </I>&gt;<i> e-mailed or so. Would make it a lot easier to track changes. </I> DreamHost does have cvs, so putting it in CVS is straightforward and quite easy. Making the diffs available would be harder: DreamHost only allows access over ssh, so anonymous access isn't possible. Bonsai could one option. Another would be to make CVS mail the diffs to an archived announcement list, and that's probably easier to set up quickly. I would appreciate CVS diffs, too. ~fantasai </PRE> <!--endarticle--> <!--htdig_noindex--> <HR> <P><UL> <!--threads--> <LI>Next message: <A HREF="005904.html">[whatwg] diffed versions (CVS) </A></li> <LI> <B>Messages sorted by:</B> <a href="date.html#5896">[ date ]</a> <a href="thread.html#5896">[ thread ]</a> <a href="subject.html#5896">[ subject ]</a> <a href="author.html#5896">[ author ]</a> </LI> </UL> <hr> <a href="http://lists.whatwg.org/listinfo.cgi/whatwg-whatwg.org">More information about the whatwg mailing list</a><br> <!--/htdig_noindex--> </body></html>
html
{ "word": "Resilience", "definitions": [ "The capacity to recover quickly from difficulties; toughness.", "The ability of a substance or object to spring back into shape; elasticity." ], "parts-of-speech": "Noun" }
json
Follow us for all the LIVE updates from the final of Senior Women's T20 between Railways and Maharastra. The mighty Railways, searching for their tenth title, take on the underdogs Maharashtra led by the charismatic Smriti Mandhana in the final of the Senior Women's T20 Trophy. Will Maharashtra break the runners up curse to lift their first-ever title? Or will the Railways extend their domination? Stay tuned for all the latest updates! Dayalan Hemalatha has completely turned this in favour of Railways from a very balanced position. Maharashtra needs wickets, and they need them in abundance to stay afloat. Hemalatha on the charge! Dayalan Hemalatha has taken it upon herself, it seems. She has pocketed 14 runs off MR Magre's first five balls in the match, but the bowler has bounced back and has prized out S Meghana with the final delivery of the over. An eventful over that! That's it then. This is the equation at halfway stage of the second innings - 84 off 60 for the Railways to win. They seem to be well in control of the chase with Meghana going all guns blazing. Hemalatha has looked good too and has pocketed a couple of boundaries as well. 50* S Meghana! Railways have scored just 63 so far, and 50 of them have come from the willow of S Meghana. A beautiful innings from the opener until now. Reaches there with a single. Half-century in just 29 deliveries. Sonawane strikes! Sonwane strikes just at the right time for Maharashtra. Nuzhat Parween cannot repeat her heroics from the last match and has to depart for a mere 10 off 17. Out walks Dayalan Hemalatha to partner Meghna for Railways. End of Powerplay! End of the powerplay and Maharashtra bowlers have taken a proper beating. Can they break this opening partnership soon enough to stay in the game? Maharashtra had scored 53 in the powerplay. So, nothing much to separate both sides so far. Stunning start for Railways! S Meghana has started from where she left off in the semis and Railways have raced to 47 for no loss in 5 overs. Meghana is batting on 39 off 21. Maharashtra reaches 160! Maharashtra have touched the 160 mark, thanks to Vaidya and Lonkar. They end exactly at 160 and Railways, whose majority of bowlers looked clueless, have a mountain to climb.
english
<filename>docs/api/properties/358.json { "@context": "https://iiif.dl.itc.u-tokyo.ac.jp/repo/api-context", "@id": "https://iiif.dl.itc.u-tokyo.ac.jp/repo/api/properties/358", "@type": "o:Property", "o:comment": "", "o:id": 358, "o:label": "Title B", "o:local_name": "titleB", "o:term": "koumin:titleB", "o:vocabulary": { "@id": "https://iiif.dl.itc.u-tokyo.ac.jp/repo/api/vocabularies/11", "o:id": 11 } }
json
<filename>src/utils/logger.js import config from '../../config' import fs from 'fs' import winston from 'winston' import 'winston-daily-rotate-file' const logDir = 'srcLogs' if ( !fs.existsSync( logDir ) ) { fs.mkdirSync( logDir ) } const tsFormat = () => ( new Date() ).toLocaleTimeString() export const logger = ( message ) => { new winston.Logger({ transports: [ new winston.transports.Console({ timestamp: tsFormat, colorize : true }), new winston.transports.DailyRotateFile({ filename : `${logDir}/error.log`, timestamp : tsFormat, datePattern: 'YYYY-MM-DD' }) ] }).error( message ) } logger.stream = { write: function(message, encoding) { // use the 'info' log level so the output will be picked up by both transports (file and console) logger.info(message); }, };
javascript
<reponame>masonium/twinkle #include <util/filesystem.h> #include <fstream> namespace filesystem { bool exists(const std::string& filename) { std::ifstream ifs(filename.c_str()); return ifs; } }
cpp
Cupertino (California), Feb 9 Apple has announced to introduce 'Tap to Pay' on newer iPhones that will help millions of merchants to use their devices to seamlessly and securely accept Apple Pay, contactless credit and debit cards, and other digital wallets with no additional hardware or payment terminal needed. Tap to Pay on iPhone will be available for payment platforms and app developers to integrate into their iOS apps and offer as a payment option to their business customers in the US first, Apple said in a statement late on Tuesday. Stripe will be the first payment platform to offer Tap to Pay on iPhone to their business customers, including the Shopify Point of Sale app this spring and additional payment platforms and apps will follow later this year. "Tap to Pay on iPhone will provide businesses with a secure, private, and easy way to accept contactless payments and unlock new checkout experiences using the power, security, and convenience of iPhone," said Jennifer Bailey, Apple's vice president of Apple Pay and Apple Wallet. Once Tap to Pay on iPhone becomes available, merchants will be able to unlock contactless payment acceptance through a supporting iOS app on an iPhone XS or later device. At checkout, the merchant will simply prompt the customer to hold their iPhone or Apple Watch to pay with Apple Pay, their contactless credit or debit card, or other digital wallet near the merchant's iPhone, and the payment will be securely completed using NFC technology, said the company. Apple Pay is already accepted at more than 90 per cent of US retailers. Tap to Pay on iPhone will also roll out to Apple Store locations in the US later this year. Apple said that with Tap to Pay on iPhone, customers' payment data is protected by the same technology that makes Apple Pay private and secure. "All transactions made using Tap to Pay on iPhone are encrypted and processed using the Secure Element, and as with Apple Pay, Apple doesn't know what is being purchased or who is buying it," the company said. Tap to Pay on iPhone will be available to participating payment platforms and their app developer partners to leverage in their software developer kits (SDKs) in an upcoming iOS software beta. Apple said it will work closely with leading payment platforms and app developers across the payments and commerce industry to offer Tap to Pay on iPhone to millions of merchants in the US.
english
export * from './dataStore'
typescript
<gh_stars>10-100 {"title": "Efficient cohesive subgraphs detection in parallel.", "fields": ["bounded function", "power graph analysis", "peta", "truss", "partition"], "abstract": "A cohesive subgraph is a primary vehicle for massive graph analysis, and a newly introduced cohesive subgraph, k-truss, which is motivated by a natural observation of social cohesion, has attracted more and more attention. However, the existing parallel solutions to identify the k-truss are inefficient for very large graphs, as they still suffer from huge communication cost and large number of iterations during the computation. In this paper, we propose a novel parallel and efficient truss detection algorithm, called PeTa. The PeTa produces a triangle complete subgraph ( TC-subgraph ) for every computing node. Based on the TC-subgraphs, PeTa can detect the local k-truss in parallel within a few iterations. We theoretically prove, within this new paradigm, the communication cost of PeTa is bounded by three times of the number of triangles, the total computation complexity of PeTa is the same order as the best known serial algorithm and the number of iterations for a given partition scheme is minimized as well. Furthermore, we present a subgraph-oriented model to efficiently express PeTa in parallel graph computing systems. The results of comprehensive experiments demonstrate, compared with the existing solutions, PeTa saves 2X to 19X in communication cost, reduces 80% to 95% number of iterations and improves the overall performance by 80% across various real-world graphs.", "citation": "Citations (13)", "year": "2014", "departments": ["Peking University", "Hong Kong University of Science and Technology", "Peking University"], "conf": "sigmod", "authors": ["<NAME>.....http://dblp.org/pers/hd/s/Shao:Yingxia", "<NAME>.....http://dblp.org/pers/hd/c/Chen_0002:Lei", "<NAME>.....http://dblp.org/pers/hd/c/Cui_0001:Bin"], "pages": 12}
json
{ "replace": false, "values": [ "mysticalagriculture:air_seeds", "mysticalagriculture:earth_seeds", "mysticalagriculture:water_seeds", "mysticalagriculture:fire_seeds", "mysticalagriculture:inferium_seeds", "mysticalagriculture:stone_seeds", "mysticalagriculture:dirt_seeds", "mysticalagriculture:wood_seeds", "mysticalagriculture:ice_seeds", "mysticalagriculture:nature_seeds", "mysticalagriculture:dye_seeds", "mysticalagriculture:nether_seeds", "mysticalagriculture:coal_seeds", "mysticalagriculture:coral_seeds", "mysticalagriculture:honey_seeds", "mysticalagriculture:pig_seeds", "mysticalagriculture:chicken_seeds", "mysticalagriculture:cow_seeds", "mysticalagriculture:sheep_seeds", "mysticalagriculture:squid_seeds", "mysticalagriculture:fish_seeds", "mysticalagriculture:slime_seeds", "mysticalagriculture:turtle_seeds", "mysticalagriculture:iron_seeds", "mysticalagriculture:nether_quartz_seeds", "mysticalagriculture:glowstone_seeds", "mysticalagriculture:redstone_seeds", "mysticalagriculture:obsidian_seeds", "mysticalagriculture:prismarine_seeds", "mysticalagriculture:zombie_seeds", "mysticalagriculture:skeleton_seeds", "mysticalagriculture:creeper_seeds", "mysticalagriculture:spider_seeds", "mysticalagriculture:rabbit_seeds", "mysticalagriculture:gold_seeds", "mysticalagriculture:lapis_lazuli_seeds", "mysticalagriculture:end_seeds", "mysticalagriculture:experience_seeds", "mysticalagriculture:blaze_seeds", "mysticalagriculture:ghast_seeds", "mysticalagriculture:enderman_seeds", "mysticalagriculture:diamond_seeds", "mysticalagriculture:emerald_seeds", "mysticalagriculture:netherite_seeds", "mysticalagriculture:wither_skeleton_seeds", "mysticalagriculture:sulfur_seeds", "mysticalagriculture:aluminum_seeds", "mysticalagriculture:copper_seeds", "mysticalagriculture:tin_seeds", "mysticalagriculture:bronze_seeds", "mysticalagriculture:zinc_seeds", "mysticalagriculture:brass_seeds", "mysticalagriculture:silver_seeds", "mysticalagriculture:lead_seeds", "mysticalagriculture:steel_seeds", "mysticalagriculture:nickel_seeds", "mysticalagriculture:electrum_seeds", "mysticalagriculture:invar_seeds", "mysticalagriculture:tungsten_seeds", "mysticalagriculture:titanium_seeds", "mysticalagriculture:chrome_seeds", "mysticalagriculture:platinum_seeds", "mysticalagriculture:nikolite_seeds", "mysticalagriculture:antimony_seeds", "mysticalagriculture:sky_stone_seeds", "mysticalagriculture:certus_quartz_seeds", "mysticalagriculture:fluix_seeds", "mysticalagriculture:rubber_seeds", "mysticalagriculture:ruby_seeds", "mysticalagriculture:sapphire_seeds", "mysticalagriculture:peridot_seeds", "mysticalagriculture:iridium_seeds", "mysticalagriculture:adamantite_seeds", "mysticalagriculture:aetherium_seeds", "mysticalagriculture:aquarium_seeds", "mysticalagriculture:banglum_seeds", "mysticalagriculture:carmot_seeds", "mysticalagriculture:kyber_seeds", "mysticalagriculture:midas_gold_seeds", "mysticalagriculture:mythril_seeds", "mysticalagriculture:orichalcum_seeds", "mysticalagriculture:osmium_seeds", "mysticalagriculture:prometheum_seeds", "mysticalagriculture:quadrillum_seeds", "mysticalagriculture:runite_seeds", "mysticalagriculture:starrite_seeds", "mysticalagriculture:stormyx_seeds", "mysticalagriculture:tantalite_seeds", "mysticalagriculture:truesilver_seeds", "mysticalagriculture:ur_seeds", "mysticalagriculture:metite_seeds", "mysticalagriculture:stellum_seeds", "mysticalagriculture:asterite_seeds", "mysticalagriculture:galaxium_seeds" ] }
json
The gatherings are run by a local charity called the Ghetto Foundation in conjunction with a community radio station, with similar events also hosted by churches. They aim to support efforts aimed at bringing peace and reconciliation among those living in Nairobi’s giant Mathare slum which suffered brutal attacks in late 2007 and early 2008. The violence that erupted across Kenya followed the disputed outcome of a presidential election held on December 27, 2007. Political grievances quickly descended into ethnic conflict, leading to the death of more than 1,100 people nationwide and forcing more than 650,000 others from their homes. In Mathare, which has a population of around 500,000 whole neighbourhoods were burnt down, hundreds killed or injured, and women and girls were raped. Similar meetings to discuss the 2007-08 violence take place in neighbouring slums, but they have not been widely replicated in this format elsewhere in Kenya. The country’s president, Uhuru Kenyatta and his deputy, William Ruto, have been charged with orchestrating the conflict and are currently facing trial at the International Criminal Court (ICC) in The Hague. A former journalist, Joshua arap Sang, is also charged. But very few of the thousands who committed atrocities have been prosecuted in Kenya’s national courts. The government has been heavily criticised for failing to set up a special tribunal to put mid and lower-level suspects on trial. And experts say other efforts at justice have fallen well short. Catherine, 24, lives in a village in Mathare. During the 2008 unrest, she was on her way to collect firewood when she was beaten up by two local men whom she knew. A large scar on her face serves as a permanent reminder of the attack. As the violence spread, Catherine and her family were forced to flee their home and take shelter at a local church. When Catherine heard about the meetings, she decided to go along. Each event is attended by between 25 and 50 people. Participants gather in a temporary marquee, where invited speakers discuss what happened in 2008 and debate broader issues around conflict. They use photographs and video clips to inform and prompt discussion. The participants are then given a chance to speak about their own experiences of the bloodshed. Everyone who attends is assured that nothing said at the meeting will be made public. For Catherine, recalling what happened to her is particularly painful because she knows her attackers. But she says that speaking out at meetings has helped her move forward from the horror of 2008.
english
<reponame>onnoo/Node-project-web-game var msg = 'HelloWorld'; console.log(msg);
javascript
""" This module defines functions to install c extensions for all the platforms into Kolibri. It is required to have pip version greater than 19.3.1 to run this script. Usage: > python build_tools/install_cexts.py --file "requirements/cext.txt" --cache-path "/cext_cache" It reads the package name and version from requirements/cext.txt file and installs the package and its dependencies using `pip install` with cache_path as the cache directory. It installs from PyPi for platforms such as manylinux, Windows and Piwheels for platforms such as ARM Linux. Please check the description of the function `parse_package_page` to see the platforms we skip downloading. When Kolibri starts, the function `prepend_cext_path` in `env.py` will calculate the c extension path based on system information and add it to sys.path so Kolibri can import the c extension. The cache directory is mainly used to stabilize the installation of c extensions from Piwheels website for the builds on Buildkite. If the directory of the cache_path passed into the function is not writable, a folder named `cext_cache` will be created under the directory where the script runs to store the cache data. """ import argparse import os import shutil import subprocess import sys import requests from bs4 import BeautifulSoup DIST_CEXT = os.path.join( os.path.dirname(os.path.realpath(os.path.dirname(__file__))), "kolibri", "dist", "cext", ) PYPI_DOWNLOAD = "https://pypi.python.org/simple/" PIWHEEL_DOWNLOAD = "https://www.piwheels.org/simple/" def get_path_with_arch(platform, path, abi, implementation, python_version): """ Calculate package path according to the platform. """ # Split the platform into two parts. # For example: manylinux1_x86_64 to Linux, x86_64 platform_split = ( platform.replace("manylinux1", "Linux").replace("linux", "Linux").split("_", 1) ) # Windows 32-bit's machine name is x86. if platform_split[0] == "win32": return os.path.join(path, "Windows", "x86") # Windows 64-bit elif platform_split[0] == "win": return os.path.join(path, "Windows", "AMD64") # Prior to CPython 3.3, there were two ABI-incompatible ways of building CPython # There could be abi tag 'm' for narrow-unicode and abi tag 'mu' for wide-unicode if implementation == "cp" and int(python_version) < 33: return os.path.join(path, platform_split[0], abi, platform_split[1]) return os.path.join(path, platform_split[0], platform_split[1]) def run_pip_install( path, platform, version, implementation, abi, name, pk_version, index_url, cache_path, ): """ Install the package and its dependencies according to platform, python version, implementation and abi using `pip install` with cache_path as the cache directory. """ return_code = subprocess.call( [ "pip", "install", "-q", "-t", path, "--platform", platform, "--python-version", version, "--implementation", implementation, "--abi", abi, "-i", index_url, "--cache-dir", cache_path, "--only-binary=:all:", "--no-deps", "{}=={}".format(name, pk_version), ] ) return return_code def install_package(package_name, package_version, index_url, info, cache_path): """ Install packages based on the information we gather from the index_url page """ for item in info: platform = item["platform"] implementation = item["implementation"] python_version = item["version"] abi = item["abi"] filename = "-".join([package_name, package_version, abi, platform]) # Calculate the path that the package will be installed into version_path = os.path.join(DIST_CEXT, implementation + python_version) package_path = get_path_with_arch( platform, version_path, abi, implementation, python_version ) print("Installing package {}...".format(filename)) # Install the package using pip with cache_path as the cache directory install_return = run_pip_install( package_path, platform, python_version, implementation, abi, package_name, package_version, index_url, cache_path, ) # Ignore Piwheels installation failure because the website is not always stable if install_return == 1 and index_url == PYPI_DOWNLOAD: sys.exit("\nInstallation failed for package {}.\n".format(filename)) else: # Clean up .dist-info folders dist_info_folders = os.listdir(package_path) for folder in dist_info_folders: if folder.endswith(".dist-info"): shutil.rmtree(os.path.join(package_path, folder)) def parse_package_page(files, pk_version, index_url, cache_path): """ Parse the PYPI and Piwheels links for the package information. We are not going to install the packages if they are: * not a whl file * not the version specified in requirements.txt * not python versions that kolibri does not support * not macosx * not win_x64 with python 3.6 """ result = [] for file in files.find_all("a"): # Skip if not a whl file if not file.string.endswith("whl"): continue file_name_chunks = file.string.split("-") package_version = file_name_chunks[1] package_name = file_name_chunks[0] python_version = file_name_chunks[2][2:] platform = file_name_chunks[4].split(".")[0] implementation = file_name_chunks[2][:2] abi = file_name_chunks[3] if package_version != pk_version: continue if python_version == "26": continue if "macosx" in platform: continue if "win_amd64" in platform and python_version != "36": continue # Cryptography builds for Linux target Python 3.4+ but the only existing # build is labeled 3.4 (the lowest version supported). # Expand the abi3 tag here. e.g. cp34 abi3 is expanded to cp34m, cp35m, cp36m, cp37m # https://cryptography.io/en/latest/faq/#why-are-there-no-wheels-for-python-3-6-on-linux-or-macos if abi == "abi3": for actual_version in range(int(python_version), 38): actual_version = str(actual_version) actual_abi = "".join([implementation, actual_version, "m"]) info = { "platform": platform, "implementation": implementation, "version": actual_version, "abi": actual_abi, } result.append(info) else: info = { "platform": platform, "implementation": implementation, "version": python_version, "abi": abi, } result.append(info) install_package(package_name, pk_version, index_url, result, cache_path) def parse_pypi_and_piwheels(name, pk_version, cache_path): """ Start installing from the pypi and piwheels pages of the package. """ links = [PYPI_DOWNLOAD, PIWHEEL_DOWNLOAD] for link in links: r = requests.get(link + name) if r.status_code == 200: files = BeautifulSoup(r.content, "html.parser") parse_package_page(files, pk_version, link, cache_path) else: sys.exit("\nUnable to find package {} on {}.\n".format(name, link)) def check_cache_path_writable(cache_path): """ If the defined cache path is not writable, change it to a folder named cext_cache under the current directory where the script runs. """ try: check_file = os.path.join(cache_path, "check.txt") with open(check_file, "w") as f: f.write("check") os.remove(check_file) return cache_path except (OSError, IOError): new_path = os.path.realpath("cext_cache") print( "The cache directory {old_path} is not writable. Changing to directory {new_path}.".format( old_path=cache_path, new_path=new_path ) ) return new_path def parse_requirements(args): """ Parse the requirements.txt to get packages' names and versions, then install them. """ # pip version needs to be greater than 19.3.1 to run this script # see https://github.com/pypa/pip/issues/6070 pip_version = str(subprocess.check_output(["pip", "--version"])) pip_version_major = int(str(pip_version).split(".")[0].split("pip")[1].strip()) if pip_version_major < 20: sys.exit( "pip version is lower or equal to 19.3.1. Please upgrade the pip version to run this script." ) with open(args.file) as f: cache_path = os.path.realpath(args.cache_path) cache_path = check_cache_path_writable(cache_path) for line in f: char_list = line.split("==") if len(char_list) == 2: # Parse PyPi and Piwheels pages to install package according to # its name and version parse_pypi_and_piwheels( char_list[0].strip(), char_list[1].strip(), cache_path ) # Ignore comments elif not line.startswith("#"): sys.exit( "\nName format in cext.txt is incorrect. Should be 'packageName==packageVersion'.\n" ) if __name__ == "__main__": # Parsing the requirement.txt file argument parser = argparse.ArgumentParser( description="Downloading and installing Python C extensions tool." ) parser.add_argument( "--file", required=True, help="The name of the requirements.txt" ) parser.add_argument( "--cache-path", default="/cext_cache", help="The path in which pip cache data is stored", ) args = parser.parse_args() parse_requirements(args)
python
The cricket season is upon us, so where's the sun? You will notice a number of what purport to be live TV apps tailored towards letting you download feeds of cricket matches on your GALAXY Note II on Google Play – alas, these are, as you might imagine, too good to be true, at least in the UK – they're aimed squarely at the massive sub-continental market. In the UK, we pretty much have to rely on Sky Sports for our cricket coverage these days, and if you're a customer but are spending a lot of time on the go, then downloading the Sky Go app is a must. If you're not a customer, there is a standalone Sky Sports app, which streams just the broadcaster's sports channels to your GALAXY Note II and costs £4.99 per month. Beware, though: it does take a while to set the service up. BBC Radio 5 Live and Sports Extra are the best repositories for radio cricket commentary, and you can, of course, get both via the BBC iPlayer. Another often-overlooked aspect of cricket is that it lends itself beautifully to fantasy league-type games, what with its demarcation of bowlers, batsmen, wicket-keepers, spinners, pacemen and all-rounders. A tad surprisingly, nobody has ever been sufficiently enterprising to create a fantasy league app specifically for Android (there you go, all you developers looking for a gap in the market). But that's no drawback for GALAXY Note II owners, who are well used to speedy web surfing and have the added bonus of being able to use the S Pen to traverse text-heavy web pages. If your politics are left-of-centre, mind, you might have to swallow your principles, as there's no doubt that the daddy of all fantasy leagues is Telegraph Fantasy Cricket, which will take you through a full County Championship season; later on in the season, it will also spawn a sibling that concentrates on the Friends Provident T20. And if the Indian Premier League is more to your taste, then Cricket Inc's Fantasy IPL 2013 should satisfy – if you really know your stuff, there are even cash prizes up for grabs. All that remains now is to pray for blue skies and baking hot sunshine. But even if those fail to materialise, you'll still be able to add a considerable edge to your enjoyment of the sport which more than any other supports a range of skills and provides an unparalleled mix of subtlety and brutality – with the help of your GALAXY Note II. Get the hottest deals available in your inbox plus news, reviews, opinion, analysis, deals and more from the TechRadar team.
english
package com.djs.learn.spring_sample.aop; import java.util.Date; import org.apache.log4j.Logger; public class DeliverImpl implements DeliverInterface { private final Logger log = Logger.getLogger(DeliverImpl.class); private AirMail airMail; public DeliverImpl(){ log.trace("Enter..."); } public AirMail getAirMail(){ return airMail; } public void setAirMail(AirMail airMail){ airMail.setTransactionId(System.currentTimeMillis()); this.airMail = airMail; log.trace("AirMail = " + airMail); } @Override public String deliver() throws Exception{ if (log.isDebugEnabled()) { log.debug("Enter 1..."); } String date; if (log.isTraceEnabled()) { log.trace("AirMail = " + airMail); } date = new Date().getTime() + " / " + new Date().toString(); if (log.isTraceEnabled()) { log.trace("Transaction date = " + date); } if (log.isDebugEnabled()) { log.debug("Leave 1..."); } return date; } @Override public String deliver(AirMail airMail) throws Exception{ if (log.isDebugEnabled()) { log.debug("Enter 2..."); } String date; if (log.isTraceEnabled()) { log.trace("AirMail = " + airMail); } date = new Date().getTime() + " / " + new Date().toString(); if (log.isTraceEnabled()) { log.trace("Transaction date = " + date); } if (log.isDebugEnabled()) { log.debug("Leave 2..."); } return date; } }
java
<filename>database/rows/790.json {"id": 790, "links": ["https://legis.senado.leg.br/sdleg-getter/documento/download/de1eb244-364b-4c56-b8a7-6e1edcad0c05", "https://senadofederal-my.sharepoint.com/:f:/g/personal/cpipandemia_arquivos_senado_leg_br/Ernq65QLcgFMuHGVm4XhojkBJ4Qaa4MJ3Jd3XlZX-RR9XQ?e=8f5m2U"], "data_recebimento": "07/06/2021", "remetente": "Prefeitura de Cama\u00e7ari", "origem": "\nOf\u00edcio n\u00b0 00665.1301.2021\n07/06/2021\n", "descricao": "\nEncaminha os of\u00edcios n. 059/2021-SEDES e 426/2021-SESAU, contendo documenta\u00e7\u00e3o referente aos Requerimentos n\u00bas 139 e 342/2021-CPIPANDEMIA.\n\n\t\t\t\t\t\t\tDocumenta\u00e7\u00e3o contendo:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t folha(s).\n\t\t\t\t\t\t\t\n", "caixa": " 1 ", "em_resposta": " 1 "}
json
<filename>docsify/0.0.5.json {"docsify.js":"<KEY>,"docsify.min.js":"<KEY>,"docsify.pack.js":"<KEY>,"docsify.pack.min.js":"sha512-0KM5XOLHj3PG3CcusNxaUJ4kiWDHE9qPgTVykg/ABhGi5X979+BfNUN9+726PbdO25iTkehsIZOCKu/J4HKT/w==","plugins/nav.js":"<KEY>}
json
from itertools import groupby class Solution: def countAndSay(self, n): def gen(s): return "".join(str(len(list(g))) + k for k, g in groupby(s)) s, i = "1", 1 while i < n: s = gen(s) i += 1 return s
python
“Don’t push children to give answers. Instead nudge them to ask questions!”, VP appeals to the parents and educators. Posted On: The Vice President, Shri M. Venkaiah Naidu today expressed happiness over the fact that India is on the verge of releasing its own indigenous COVID vaccine. He also complimented the hard-working scientists who have made this possible. Addressing the concluding session of the India International Science Festival from Hyderabad through virtual mode, Shri Naidu lauded the dedication of Indian scientists in making India self-reliant in the production of PPEs and Covid-19 testing kits. The Vice President said that India had negligible production capacity of PPEs, ventilators and testing kits at the beginning of the pandemic but within a short span we are now able to export PPEs. Observing that false information on the nature of the coronavirus, medication and the vaccine has caused panic and anxiety among the people, Shri Naidu said that this ‘infodemic’ also reinforces the importance of scientific temper in our lives. Emphasizing that a citizen who thinks critically will be immune to such misinformation or fake news, he called for promoting the spirit of inquiry. “It is not vaccines or drugs that can defeat the ‘infodemic’, but a rational outlook among people’, he said. Calling science as the lifeline of human progress, the Vice President noted that science is about the spirit of rational inquiry that can guide us in our lives. Mentioning that our Constitution lists the development of scientific temper as one of our Fundamental Duties, he said that if we imbibe this temper, we can apply scientific methodology to every endeavour of life and make informed decisions. “In our eternal search for truth, let us imbibe the rigour of a scientist, the wisdom of our ancestors, and the inquisitiveness of a child”, the Vice President added. Referring to India’s rich background in science, Shri Naidu emphasised that even in the field of science, India’s core philosophy has always been ‘share and care’ and ‘VasudaivaKutumbakam’. Mentioning that the famed scientist, Shri JC Bose never filed a single patent despite the many inventions and discoveries he made, the Vice President said that it is in the same spirit that we have not only become the pharmaceutical hub of the world, but we have been extensively sharing these life-saving drugs with the rest of the developing world. Regretting that most Indians are not even aware of our own rich history in science, Shri Naidu called for celebrating our scientific achievements. He also called for encouraging children to take up careers in science and making India a world leader in scientific research. “Don’t push children to give answers. Instead nudge them to ask questions!”, he appealed to the parents and educators. Calling for an end to rote learning, he said that students should be encouraged to ‘discover’ rather than be ‘told’. He expressed happiness over an exclusive event on toys and games in the science festival and said that games and puzzles are an important component to nurture inquisitiveness and kindle creativity in children. He called for more research by designers and child psychologists in this area. The Vice President emphasized that an important lesson taught by this pandemic is that we need to invest and sustain R&D and strive to become self-reliant. Our space programme is a sterling example of how self-reliance can be achieved, he underlined. He also called upon the private sector to partner with various institutes to promote innovation in the country to make India self-reliant in critical sectors like electronics and defence. Drawing attention to the imminent fourth industrial revolution, Shri Naidu expressed the need to capitalize on our demographic dividend, skill our youth, and ride this revolution to make our unique mark in the world of science. On this occasion, Shri Naidu emphasized the need for a holistic and inter-disciplinary approach in science education and called for making environmental sustainability an intrinsic part of scientific research. He also opined that science and technology should address the pressing needs of the common man. In the end, science is all about making people’s lives comfortable and happier, VP added. Noting that December, 25th is the birth anniversary of former Prime Minister, Shri Atal Bihari Vajpayee ji and Pt. Madan Mohan Malviya ji, the Vice President said that we must take inspiration from their lives. Wishing the people a Merry Christmas, he said that Christmas is the festival of peace & love, and the peace as the prerequisite of progress. “We all should work for peace”, Shri Naidu said and added that advancements in science are very useful in strengthening peace. The Vice President appreciated the India International Science Festival for furthering the cause of science and scientific thought. He also complimented the organizers for successfully organizing the festival in a virtual format. This year’s science festival was themed on – “Science for Self-Reliant India and Global Welfare” and was organized by CSIR and Vijnana Bharathi in coordination with various ministries. Dr. Harsh Vardhan, Union Minister of Science & Technology, Earth Sciences and Health & Family Welfare, Dr. Shekhar C Mande, Chairman, IISF-2020, Director General, CSIR, Prof. Ashutosh Sharma, Secretary, Department of Science & Technology (DST), Dr.Renu Swarup, Secretary, Department of Biotechnology (DBT), Dr. M Rajeevan, Secretary, Ministry of Earth Sciences (MOES), Dr. Vijay P Bhatkar, President, Vijnana Bharati, Shri Jayant Sahastrabuddhe, National Organising Secretary, Vijnana Bharati and Dr. Ranjana Aggarwal, Chief Coordinator, IISF-2020, Director, CSIR-NISTADS and CSIR-NISCAIR were among the dignitaries who attended the virtual event. “Dear sisters and brothers, I am very glad to be present with you virtually at the concluding session of the India International Science Festival. With a noble intent to further scientific spirit among common people and to showcase India’s scientific achievements, many events were meticulously organized over the past few days. It is heartening to note that this unique annual celebration of science avoided a break this year by utilizing the virtual format. I congratulate CSIR, various ministries and Vijnana Bharathi for this outstanding success. I wish this event continued success in the future too. There is a two-fold purpose for organizing events like these, and both are equally important. The first is to appreciate and make people aware of what science and scientists are doing for us. Science is the lifeline of human progress. Hardworking scientists gave us many things-- from a light bulb to an aeroplane, to vaccines that can fight deadly diseases. In fact, we are on the verge of releasing our own indigenous COVID vaccine. It is science and hard-working scientists that have made this possible. Beginning with very few testing kits at the beginning of the pandemic, in a span of a few months, we have developed cheaper and rapid diagnostics, ventilators, and PPEs. Today, we are even able to export PPEs. It is in this context that people have to be made aware of scientific developments of the day and the work of the dedicated scientists. In my opinion, there is a second and a more important purpose for this event. Science is not just about natural laws and state of the art technology. Science is also about the spirit of rational inquiry that can guide us in our lives. This is even recognized by our Constitution, which identifies the development of scientific temper as one of our Fundamental Duties. If we imbibe this temper, we can apply scientific methodology to every endeavour of life and make informed decisions. The methodology is simple: enquire, investigate, reason, and when satisfied, accept. The pandemic has also reinforced the importance of scientific temper in our lives. One of the major challenges in this pandemic has been the prevalence of the ‘infodemic’. False information on the nature of the virus, medication and the vaccine caused panic and anxiety among the people. It is not vaccines or drugs that can defeat the infodemic, but a rational outlook among people. A citizenry that can think critically will be immune to such misinformation or fake news. This spirit of inquiry must be taken to the people and I commend India International Science Festival for its efforts in this regard. India has a very ancient background in science. We had stalwarts in every field of science. Their discoveries were truly amazing and much ahead of their time. But even long before these pioneers, our Indus Valley civilization had such expertise in city planning and construction that was unheard of at that time and still puzzles the modern mind. Even in the field of science, India’s core philosophy has always been ‘share and care’. Our decimal system was borrowed by Arab traders, which later spread to medieval Europe. It is in the same spirit that we have not only become the pharmaceutical hub of the world, but we have been extensively sharing these life-saving drugs with the rest of the developing world. We believe in the concept of ‘VasudaivaKutumbakam’-- the world is one big family. That is perhaps why the great botanist, physicist, and the ‘Father of Radio Science’ JC Bose never filed a single patent despite the many inventions and discoveries he made. It is an understatement to say that India has had a long and glorious history of science and scientists, but it is appalling that we don’t know our own rich history. This should change. We must celebrate our scientific achievements, recognise our people excelling in STEM (Science, Technology, Engineering, Mathematics) - be it in India or abroad and encourage our children to take up careers in science. India must be a world leader in scientific research once again. Brothers and Sisters, There is a need to inculcate scientific temper at a young age. Children have an inherent curiosity. How we channelize that curiosity is very important. If we encourage them to ask questions and think critically, they will become confident, self-assured, and fearless for the rest of their lives. A confident generation means a confident nation! On the other hand, if we discourage them from asking questions and curtail their imagination, they will forever be dependent on others’ solutions and remain and unsure of themselves. That is why I suggest this to parents and educators: Don’t push children to give answers. Instead nudge them to ask questions! Children should be encouraged to ‘do’ experiments and not merely read about them in a textbook. Students should be encouraged to ‘discover’ rather than be ‘told’. Rote memorization should be discouraged. An important component to nurture inquisitiveness and kindle creativity in children is the innovative use of games and puzzles. Much more research should be done by designers and child psychologists in this area. I am happy to notice an exclusive event on toys and games in this event. Dear sisters and brothers, Science lays the path to progress and create material wealth for the country. If there is one thing that the pandemic has taught us, it is that we need to invest and sustain R&D and to strive to become self-reliant. Our space programme is a sterling example of how self-reliance can be achieved. I am happy that IISF 2020 has taken forward the Prime Minister, Shri Narendra Modi’s exhortation for AtmaNirbhar Bharat through its theme – “Science for Self-Reliant India and Global Welfare”. To this extent, I also call upon the private sector to partner with various institutes to promote innovation in the country. We should also aim to first achieve self-reliance in critical sectors like electronics and defence. With the third-largest startup ecosystem in the world and nearly 10,000 technology-led startups, India has great potential to become AtmaNirbhar in many sectors. We must also recognise that the fourth industrial revolution is underway and we cannot afford to miss the opportunity this time. We must quickly capitalize on our demographic dividend, skill our youth, and ride this revolution to make our unique mark in the world of science. Brothers and sisters, Before concluding, I would like to give three advises on how science and scientific thinking should progress in the coming years: Firstly, we must increase the focus on science education, as I mentioned earlier. I am referring to both-- education in science (STEM) and in scientific thinking. We must encourage our children to pursue a career in STEM, improve the quality of research in our institutes, increase R&D investments, and encourage diversity in the field. As regards scientific-thinking, there is no quick fix but to nurture critical thinking from a young age through a revamped pedagogy. Secondly, sustainability should be an intrinsic part of scientific research. We cannot afford to look at sustainability and technology in silos. We need to go for a holistic and inter-disciplinary approach in science education that addresses ecological concerns. In this regard, I am pleased to see that many topics such as Bio-Diversity, Clean air, Energy, Waste & Sanitation, and Water have been highlighted in IISF. Thirdly, science and technology should address the pressing needs of the common man. Cutting edge advancements like nanotechnology are strategically important, but what is critical is recognizing micro-innovations in agriculture, handicrafts, education, and health. For instance, a reliable low-cost water-purifier could potentially save millions of lives. A resilient seed variety can benefit an entire farming community. In the end, science has to make common man’s life comfortable. Once again, I am very happy to be here with you all today. The India International Science Festival is gradually developing into a mammoth exercise of public engagement in science. I compliment the organizers for the success in the virtual format. They must utilize the learning from this format to host future events in a mixed format. I wish IISF many more years of success in furthering the cause of science and scientific thought. My dear friends, In our eternal search for truth, let us imbibe the rigour of a scientist, the wisdom of our ancestors, and the inquisitiveness of a child. This is all the more relevant in the current times of the infodemic. I would like to conclude with a very popular Telugu poem from Sumatisatakam that espouses a timely message on the spirit of rational thinking: Which translates like this: “Listen to anyone and everyone, Analyze it and reason it out!" Thank you.
english
# # Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright notice, this # list of conditions and the following disclaimer in the documentation and/or # other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # from gtk import ScrolledWindow,Table,Label,POLICY_NEVER,POLICY_ALWAYS,EXPAND,FILL,Entry,CheckButton import gobject import sys from mdspluswidget import MDSplusWidget from mdspluserrormsg import MDSplusErrorMsg from MDSplus import TreeNode,Data try: import glade guibuilder=True except: guibuilder=False class props(object): __gproperties__= { 'putOnApply' : (gobject.TYPE_BOOLEAN, 'putOnApply','put when apply button pressed',True,gobject.PARAM_READWRITE), 'nidOffset' : (gobject.TYPE_INT, 'nidOffset','Offset of nid in tree',-1,100000,-1,gobject.PARAM_READWRITE), 'numChannels' : (gobject.TYPE_INT, 'numChannels','number of channels',1,1000,8,gobject.PARAM_READWRITE), 'nodesPerChannel' : (gobject.TYPE_INT, 'nodesPerChannel','number of nodes per digitizer channel',3,1000,3,gobject.PARAM_READWRITE), 'dataNidOffset' : (gobject.TYPE_INT, 'dataNidOffset','nid offset to digitizer channel data node',0,1000,1,gobject.PARAM_READWRITE), 'startIdxNidOffset' : (gobject.TYPE_INT, 'startIdxNidOffset','nid offset to digitizer channel startIdx node',0,1000,2,gobject.PARAM_READWRITE), 'endIdxNidOffset' : (gobject.TYPE_INT, 'endIdxNidOffset','nid offset to digitizer channel endIdx node',0,1000,3,gobject.PARAM_READWRITE), 'incNidOffset' : (gobject.TYPE_INT, 'incNidOffset','nid offset to digitizer channel increment node',-1,1000,-1,gobject.PARAM_READWRITE), } class MDSplusDigChansWidget(props,MDSplusWidget,ScrolledWindow): __gtype_name__ = 'MDSplusDigChansWidget' __gproperties__= props.__gproperties__ def resetPart(self,channel,field): try: channel[field].set_text(str(channel[field+'Node'].record.decompile())) except Exception: channel[field].set_text('') def reset(self): if not hasattr(self,'channels'): self.setupChannels() if hasattr(self,'channels'): for channel in self.channels: try: channel['on'].set_active(channel['dataNode'].on) except Exception: channel['on'].set_active(True) self.resetPart(channel,'startIdx') self.resetPart(channel,'endIdx') if self.incNidOffset > -1: self.resetPart(channel,'inc') try: channel['path'].set_label(str(channel['dataNode'].minpath)) except Exception: channel['path'].set_label('') def applyPart(self,channel,field,idx): value=channel[field].get_text() if value == '': value=None else: try: value=Data.compile(value) except Exception: MDSplusErrorMsg('Invalid value','Error compiling %s for channel %d\n\n%s\n\n%s' % (field,idx,value,sys.exc_info())) raise try: if channel[field+'Node'].compare(value) != 1: channel[field+'Node'].record=value except Exception: MDSplusErrorMsg('Error storing value','Error storing value %s for channel %d\n\n\%s' % (field,idx,sys.exc_info())) def apply(self): if self.putOnApply: idx=0 for channel in self.channels: idx=idx+1 if channel['dataNode'].on != channel['on'].get_active(): try: channel['dataNode'].on=channel['on'].get_active() except Exception: if channel['on'].get_active(): state='on' else: state='off' MDSplusErrorMsg('Error setting node on/off state','Error turning node %s %s\n\n%s' % (channel['dataNode'].minpath,state,sys.exc_info())) raise self.applyPart(channel,'startIdx',idx) self.applyPart(channel,'endIdx',idx) if self.incNidOffset > -1: self.applyPart(channel,'inc',idx) def adj_changed(self,adj): newstep=adj.upper/self.numChannels if adj.step_increment != newstep: adj.step_increment = newstep def setupChannels(self): for child in self.table.get_children(): child.destroy() if self.incNidOffset > -1: columns=6 else: columns=5 self.table.resize(self.numChannels+1,columns) self.table.attach(Label(""),0,1,0,1,0,0,10,0) self.table.attach(Label("On"),1,2,0,1,0,0,10,0) self.table.attach(Label("StartIdx"),2,3,0,1,EXPAND|FILL,0,10,0) self.table.attach(Label("EndIdx"),3,4,0,1,EXPAND|FILL,0,10,0) if self.incNidOffset > -1: self.table.attach(Label("Increment"),4,5,0,1,EXPAND|FILL,0,10,0) self.table.attach(Label("Path"),columns-1,columns,0,1,0,0,10,0) self.channels=list() for chan in range(self.numChannels): channel=dict() self.channels.append(channel) channel['number']=Label("%d"% (chan+1,)) self.table.attach(channel['number'],0,1,chan+1,chan+2,0,0,10,0) channel['on']=CheckButton('') self.table.attach(channel['on'],1,2,chan+1,chan+2,0,0,10,0) channel['startIdx']=Entry() self.table.attach(channel['startIdx'],2,3,chan+1,chan+2,EXPAND|FILL,0,10,0) channel['endIdx']=Entry() self.table.attach(channel['endIdx'],3,4,chan+1,chan+2,EXPAND|FILL,0,10,0) if self.incNidOffset > -1: channel['inc']=Entry() self.table.attach(channel['inc'],4,5,chan+1,chan+2,EXPAND|FILL,0,10,0) channel['path']=Label(' ') self.table.attach(channel['path'],columns-1,columns,chan+1,chan+2,0,0,10,0) self.show_all() if not guibuilder: for chan in range(self.numChannels): chanNidOffset=self.node.nid+chan*self.nodesPerChannel channel=self.channels[chan] channel['dataNode']=TreeNode(chanNidOffset+self.dataNidOffset,self.node.tree) channel['startIdxNode']=TreeNode(chanNidOffset+self.startIdxNidOffset,self.node.tree) channel['endIdxNode']=TreeNode(chanNidOffset+self.endIdxNidOffset,self.node.tree) if self.incNidOffset > -1: channel['incNode']=TreeNode(chanNidOffset+self.incNidOffset,self.node.tree) def __init__(self): ScrolledWindow.__init__(self) MDSplusWidget.__init__(self) self.numChannels=4 self.nodesPerChannel=3 self.dataNidOffset=1 self.startIdxNidOffset=2 self.endIdxNidOffset=3 self.incNidOffset=-1 self.table=Table(homogeneous=False) self.table.set_row_spacings(0) self.add_with_viewport(self.table) self.set_policy(POLICY_NEVER,POLICY_ALWAYS) adj=self.get_vadjustment() if adj is not None: adj.connect("changed",self.adj_changed) def show(self): self.show_all() gobject.type_register(MDSplusDigChansWidget) if guibuilder: class MDSplusDigChansWidgetAdaptor(glade.get_adaptor_for_type('GtkTable')): __gtype_name__='MDSplusDigChansWidgetAdaptor' def do_set_property(self,widget,prop,value): if prop == 'nidOffset': widget.nidOffset=value elif prop == 'putOnApply': widget.putOnApply=value elif prop == 'startIdxNidOffset': widget.startIdxNidOffset=value elif prop == 'endIdxNidOffset': widget.endIdxNidOffset=value elif prop == 'incNidOffset': widget.incNidOffset=value widget.setupChannels() elif prop == 'dataNidOffset': widget.dataNidOffset=value elif prop == 'nodesPerChannel': widget.nodesPerChannel=value elif prop == 'numChannels': if value > 0: widget.numChannels=value widget.setupChannels()
python
GUWAHATI, August 14: Minister of State for Railways Rajen Gohain has called a review meeting with NF Railway officials on August 16 to take stock of the freight and parcel traffic scerio in NF Railway. The meeting will be attended by senior officials of the Railway Board – the topmost policy-making body of Indian Railways – including member traffic Md. Jamshed, advisor (coaching) Purushottam Guha and executive director (PG) Utpalpar Hazarika. From NF Railway’s side, General Mager Chahatey Ram, General Mager (Construction) HK Jaggi, all principal heads of departments and other senior officials will be present at the meeting to be held at NF Railway Headquarters in Maligaon from 10. 30 am. According to an NF Railway press release, as a result of the strong impetus of Ministry of Railways under Suresh Prabhakar Prabhu, on expansion of rail connectivity in the Northeast, almost 550 km track has been commissioned last year and many new loading termils have been opened in Barak Valley and Tripura. The recent success of movement of POL to Tripura by RO RO mode to tide over the fuel crisis in the state is a case in point to indicate the emphasis being attached for development of freight traffic in the region. The meeting being convened in NFR headquarters by Rajen Gohain will work out ways and means of achieving tangible results in the field of further improvement of freight movement in Assam and the Northeast with special emphasis on parcel movement from the region. With a number of local items like bamboo, betel nut, dry fish, tea etc. , having very good market outside the region, strengthening of parcel traffic will fuel rapid economic growth here. Apart from discussing the freight traffic scerio, the meeting is also likely to discuss the status of the ongoing railway projects in the region and steps for timely completion of the projects. It may be mentioned that the Minister had announced in a public meeting on July 30 in Manipur that he would ensure timely completion of all railway projects in the Northeast and would persolly monitor the progress of developmental projects in the region.
english
#![allow(non_snake_case)] use crate::native::{common, new_fn, JNIEnv, JNINativeMethod, JNIResult}; use crate::oop::{self, ClassKind, Oop, ValueType}; use crate::runtime::{self, require_class2, require_class3, JavaThread}; use crate::types::{ClassRef, MethodIdRef}; use crate::util; use classfile::{constant_pool, consts as cls_consts, flags as acc}; use std::collections::HashMap; use std::sync::{Arc, RwLock}; pub fn get_primitive_class_mirror(key: &str) -> Option<Oop> { //todo: avoid mutex lock, it's only read let mirrors = PRIM_MIRROS.read().unwrap(); mirrors.get(key).map(|it| it.clone()) } pub fn get_native_methods() -> Vec<JNINativeMethod> { vec![ new_fn("registerNatives", "()V", Box::new(jvm_registerNatives)), new_fn( "desiredAssertionStatus0", "(Ljava/lang/Class;)Z", Box::new(jvm_desiredAssertionStatus0), ), new_fn( "getPrimitiveClass", "(Ljava/lang/String;)Ljava/lang/Class;", Box::new(jvm_getPrimitiveClass), ), new_fn( "getDeclaredFields0", "(Z)[Ljava/lang/reflect/Field;", Box::new(jvm_getDeclaredFields0), ), new_fn("getName0", "()Ljava/lang/String;", Box::new(jvm_getName0)), new_fn( "forName0", "(Ljava/lang/String;ZLjava/lang/ClassLoader;Ljava/lang/Class;)Ljava/lang/Class;", Box::new(jvm_forName0), ), new_fn("isPrimitive", "()Z", Box::new(jvm_isPrimitive)), new_fn( "isAssignableFrom", "(Ljava/lang/Class;)Z", Box::new(jvm_isAssignableFrom), ), new_fn("isInterface", "()Z", Box::new(jvm_isInterface)), new_fn( "getDeclaredConstructors0", "(Z)[Ljava/lang/reflect/Constructor;", Box::new(jvm_getDeclaredConstructors0), ), new_fn("getModifiers", "()I", Box::new(jvm_getModifiers)), new_fn( "getSuperclass", "()Ljava/lang/Class;", Box::new(jvm_getSuperclass), ), new_fn("isArray", "()Z", Box::new(jvm_isArray)), new_fn( "getComponentType", "()Ljava/lang/Class;", Box::new(jvm_getComponentType), ), new_fn( "getEnclosingMethod0", "()[Ljava/lang/Object;", Box::new(jvm_getEnclosingMethod0), ), new_fn( "getDeclaringClass0", "()Ljava/lang/Class;", Box::new(jvm_getDeclaringClass0), ), new_fn( "isInstance", "(Ljava/lang/Object;)Z", Box::new(jvm_isInstance), ), new_fn( "getDeclaredMethods0", "(Z)[Ljava/lang/reflect/Method;", Box::new(jvm_getDeclaredMethods0), ), new_fn( "getInterfaces0", "()[Ljava/lang/Class;", Box::new(jvm_getInterfaces0), ), new_fn("getRawAnnotations", "()[B", Box::new(jvm_getRawAnnotations)), new_fn( "getConstantPool", "()Lsun/reflect/ConstantPool;", Box::new(jvm_getConstantPool), ), new_fn( "getDeclaredClasses0", "()[Ljava/lang/Class;", Box::new(jvm_getDeclaredClasses0), ), new_fn( "getGenericSignature0", "()Ljava/lang/String;", Box::new(jvm_getGenericSignature0), ), ] } #[derive(Copy, Clone, PartialEq)] enum ClassMirrorState { NotFixed, Fixed, } lazy_static! { static ref MIRROR_STATE: RwLock<ClassMirrorState> = { RwLock::new(ClassMirrorState::NotFixed) }; static ref PRIM_MIRROS: RwLock<HashMap<String, Oop>> = { let hm = HashMap::new(); RwLock::new(hm) }; static ref SIGNATURE_DIC: HashMap<&'static str, &'static str> = { let dic: HashMap<&'static str, &'static str> = [ ("byte", "B"), ("boolean", "Z"), ("char", "C"), ("short", "S"), ("int", "I"), ("float", "F"), ("long", "J"), ("double", "D"), ("void", "V"), ] .iter() .cloned() .collect(); dic }; static ref DELAYED_MIRROS: RwLock<Vec<String>> = { let v = vec![ "I", "Z", "B", "C", "S", "F", "J", "D", "V", "[I", "[Z", "[B", "[C", "[S", "[F", "[J", "[D", ]; let v: Vec<String> = v.iter().map(|it| it.to_string()).collect(); RwLock::new(v) }; static ref DELAYED_ARY_MIRROS: RwLock<Vec<ClassRef>> = { let v = vec![]; RwLock::new(v) }; } pub fn init() { lazy_static::initialize(&MIRROR_STATE); lazy_static::initialize(&SIGNATURE_DIC); lazy_static::initialize(&PRIM_MIRROS); lazy_static::initialize(&DELAYED_MIRROS); lazy_static::initialize(&DELAYED_ARY_MIRROS); } pub fn create_mirror(cls: ClassRef) { let is_fixed = { let s = MIRROR_STATE.write().unwrap(); *s == ClassMirrorState::Fixed }; if is_fixed { let mirror = Oop::new_mirror(cls.clone()); let mut cls = cls.write().unwrap(); trace!("mirror created: {}", unsafe { std::str::from_utf8_unchecked(cls.name.as_slice()) }); cls.set_mirror(mirror); } else { let cls_back = cls.clone(); let cls = cls.read().unwrap(); let name = String::from_utf8_lossy(cls.name.as_slice()).to_string(); warn!("mirror create delayed: {}", name); match cls.kind { oop::class::ClassKind::Instance(_) => { let mut mirrors = DELAYED_MIRROS.write().unwrap(); mirrors.push(name); } _ => { let mut mirrors = DELAYED_ARY_MIRROS.write().unwrap(); mirrors.push(cls_back); } } } } /* called after 'java/lang/Class' inited in init_vm.rs */ pub fn create_delayed_mirrors() { let names: Vec<String> = { let mirros = DELAYED_MIRROS.read().unwrap(); mirros.clone() }; { let mut s = MIRROR_STATE.write().unwrap(); *s = ClassMirrorState::Fixed; } for name in names { if name.len() > 2 { //java.lang.XXX let target = require_class3(None, name.as_bytes()).unwrap(); create_mirror(target); } else { let is_prim_ary = name.as_bytes()[0] == b'['; let (vt, target) = if is_prim_ary { let vt = ValueType::from(&name.as_bytes()[1]); let target = require_class3(None, name.as_bytes()).unwrap(); (vt, Some(target)) } else { (ValueType::from(&name.as_bytes()[0]), None) }; let mirror = Oop::new_prim_mirror(vt, target.clone()); if is_prim_ary { let target = target.unwrap(); let mut cls = target.write().unwrap(); // warn!("set_mirror name={}", String::from_utf8_lossy(cls.name.as_slice())); cls.set_mirror(mirror.clone()); } let mut mirrors = PRIM_MIRROS.write().unwrap(); mirrors.insert(name.to_string(), mirror); } } } /* called after 'java/lang/Class' inited in init_vm.rs */ pub fn create_delayed_ary_mirrors() { let classes: Vec<ClassRef> = { let mirros = DELAYED_ARY_MIRROS.read().unwrap(); mirros.clone() }; for cls in classes { let value_type = { let cls = cls.read().unwrap(); match &cls.kind { oop::class::ClassKind::ObjectArray(obj_ary) => obj_ary.value_type, oop::class::ClassKind::TypeArray(typ_ary) => typ_ary.value_type, _ => unreachable!(), } }; let mirror = Oop::new_ary_mirror(cls.clone(), value_type); let mut cls = cls.write().unwrap(); cls.set_mirror(mirror); } } fn jvm_registerNatives(_jt: &mut JavaThread, _env: JNIEnv, _args: Vec<Oop>) -> JNIResult { Ok(None) } fn jvm_desiredAssertionStatus0(_jt: &mut JavaThread, _env: JNIEnv, _args: Vec<Oop>) -> JNIResult { Ok(Some(Oop::new_int(0))) } fn jvm_getPrimitiveClass(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let v = args.get(0).unwrap(); let v = util::oop::extract_str(v); match SIGNATURE_DIC.get(v.as_str()) { Some(&s) => Ok(get_primitive_class_mirror(s)), _ => unreachable!("Unknown primitive type: {}", v), } } fn jvm_getDeclaredFields0(jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { //parse args let mirror_target = { let arg0 = args.get(0).unwrap(); let arg0 = util::oop::extract_ref(arg0); let arg0 = arg0.read().unwrap(); match &arg0.v { oop::RefKind::Mirror(mirror) => mirror.target.clone().unwrap(), _ => unreachable!(), } }; let public_only = { let arg1 = args.get(1).unwrap(); util::oop::extract_int(arg1) == 1 }; //fixme: super fields //obtain inst&static fields let (inst_fields, static_fields) = { let cls = mirror_target.read().unwrap(); match &cls.kind { oop::class::ClassKind::Instance(inst) => { (inst.inst_fields.clone(), inst.static_fields.clone()) } _ => unreachable!(), } }; //build fields ary let mut fields = Vec::new(); for (_, it) in inst_fields { if public_only && !it.field.is_public() { continue; } let v = common::reflect::new_field(jt, it); fields.push(v); } for (_, it) in static_fields { if public_only && !it.field.is_public() { continue; } let v = common::reflect::new_field(jt, it); fields.push(v); } //build oop field ar let ary_cls = require_class3(None, b"[Ljava/lang/reflect/Field;").unwrap(); Ok(Some(Oop::new_ref_ary2(ary_cls, fields))) } fn jvm_getName0(jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let (target, vt) = { let arg0 = args.get(0).unwrap(); let arg0 = util::oop::extract_ref(arg0); let arg0 = arg0.read().unwrap(); match &arg0.v { oop::RefKind::Mirror(mirror) => (mirror.target.clone(), mirror.value_type), _ => unreachable!(), } }; let name = { match target { Some(target) => { let cls = target.read().unwrap(); cls.name.clone() } None => { let v = vt.into_primitive_name(); Arc::new(Vec::from(v)) } } }; let name = String::from_utf8_lossy(name.as_slice()); let name = name.replace("/", "."); let v = util::oop::new_java_lang_string2(jt, &name); Ok(Some(v)) } fn jvm_forName0(jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let arg0 = args.get(0).unwrap(); let java_name = util::oop::extract_str(arg0); let initialize = { let arg1 = args.get(1).unwrap(); util::oop::extract_int(arg1) != 0 }; let java_cls_loader = args.get(2).unwrap(); { match java_cls_loader { Oop::Null => (), _ => unimplemented!("app class loader, unimpl"), } } let _caller_mirror = args.get(3).unwrap(); if java_name.contains("/") { let msg = Some(java_name); let ex = runtime::exception::new(jt, cls_consts::J_CLASS_NOT_FOUND, msg); return Err(ex); } let java_name = java_name.replace(".", "/"); let cls = { if java_name == "sun/nio/cs/ext/ExtendedCharsets" { //fixme: skip, cause jvm start very slow None } else { require_class3(None, java_name.as_bytes()) } }; match cls { Some(cls) => { { let mut cls = cls.write().unwrap(); cls.init_class(jt); // trace!("finish init_class: {}", String::from_utf8_lossy(*c)); } if initialize { oop::class::init_class_fully(jt, cls.clone()); } let mirror = { cls.read().unwrap().get_mirror() }; Ok(Some(mirror)) } None => { error!("forName0, NotFound: {}", java_name); let msg = Some(java_name); let ex = runtime::exception::new(jt, cls_consts::J_CLASS_NOT_FOUND, msg); Err(ex) } } } fn jvm_isPrimitive(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let v = args.get(0).unwrap(); let v = util::oop::extract_ref(v); let v = v.read().unwrap(); let v = match &v.v { oop::RefKind::Mirror(mirror) => { if mirror.target.is_none() { 1 } else { 0 } } _ => unreachable!(), }; Ok(Some(Oop::new_int(v))) } fn jvm_isAssignableFrom(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let l = args.get(0).unwrap(); let r = args.get(1).unwrap(); let (lt, ltyp) = { let l = util::oop::extract_ref(l); let v = l.read().unwrap(); match &v.v { oop::RefKind::Mirror(mirror) => (mirror.target.clone(), mirror.value_type), _ => unreachable!(), } }; let (rt, rtyp) = { let r = util::oop::extract_ref(r); let v = r.read().unwrap(); match &v.v { oop::RefKind::Mirror(mirror) => (mirror.target.clone(), mirror.value_type), _ => unreachable!(), } }; let v = if lt.is_none() && rt.is_none() { if ltyp == rtyp { 1 } else { 0 } } else { let lt = lt.unwrap(); let rt = rt.unwrap(); if runtime::cmp::instance_of(rt, lt) { 1 } else { 0 } }; Ok(Some(Oop::new_int(v))) } fn jvm_isInterface(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let v = args.get(0).unwrap(); let v = util::oop::extract_ref(v); let v = v.read().unwrap(); let v = match &v.v { oop::RefKind::Mirror(mirror) => match &mirror.target { Some(target) => { if target.read().unwrap().is_interface() { 1 } else { 0 } } None => 0, }, _ => unreachable!(), }; Ok(Some(Oop::new_int(v))) } fn jvm_getDeclaredConstructors0(jt: &mut JavaThread, env: JNIEnv, args: Vec<Oop>) -> JNIResult { get_declared_method_helper(true, jt, env, args) } pub fn jvm_getModifiers(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let v = args.get(0).unwrap(); let v = util::oop::extract_ref(v); let v = v.read().unwrap(); let v = match &v.v { oop::RefKind::Mirror(mirror) => match &mirror.target { Some(target) => target.read().unwrap().acc_flags, None => acc::ACC_ABSTRACT | acc::ACC_FINAL | acc::ACC_PUBLIC, }, _ => unreachable!(), }; Ok(Some(Oop::new_int(v as i32))) } fn jvm_getSuperclass(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let mirror = args.get(0).unwrap(); let mirror = util::oop::extract_ref(mirror); let v = mirror.read().unwrap(); match &v.v { oop::RefKind::Mirror(mirror) => match &mirror.target { Some(target) => { let cls = target.read().unwrap(); match &cls.super_class { Some(super_cls) => { let cls = super_cls.read().unwrap(); let mirror = cls.get_mirror(); Ok(Some(mirror)) } None => Ok(Some(oop::consts::get_null())), } } None => Ok(Some(oop::consts::get_null())), }, _ => unreachable!(), } } fn jvm_isArray(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let v = args.get(0).unwrap(); let mirror_cls = { let v = util::oop::extract_ref(v); let v = v.read().unwrap(); match &v.v { oop::RefKind::Mirror(mirror) => match &mirror.target { Some(target) => target.clone(), None => return Ok(Some(Oop::new_int(0))), }, _ => unreachable!(), } }; let cls = mirror_cls.read().unwrap(); let v = match cls.kind { oop::class::ClassKind::Instance(_) => 0, oop::class::ClassKind::TypeArray(_) => 1, ClassKind::ObjectArray(_) => 1, }; Ok(Some(Oop::new_int(v))) } fn jvm_getComponentType(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let cls_mirror = args.get(0).unwrap(); let cls = { let cls_mirror = util::oop::extract_ref(cls_mirror); let cls = cls_mirror.read().unwrap(); match &cls.v { oop::RefKind::Mirror(mirror) => mirror.target.clone().unwrap(), _ => unreachable!(), } }; let cls = cls.read().unwrap(); let v = match &cls.kind { oop::class::ClassKind::TypeArray(type_ary_cls) => { let vt = type_ary_cls.value_type.into(); let key = unsafe { std::str::from_utf8_unchecked(vt) }; let mirrors = PRIM_MIRROS.read().unwrap(); mirrors.get(key).map(|it| it.clone()) } oop::class::ClassKind::ObjectArray(obj_ary_cls) => { let component = obj_ary_cls.component.clone().unwrap(); let cls = component.read().unwrap(); Some(cls.get_mirror()) } _ => unreachable!(), }; Ok(v) } fn jvm_getEnclosingMethod0(jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let mirror = args.get(0).unwrap(); let target = { let mirror = util::oop::extract_ref(mirror); let v = mirror.read().unwrap(); match &v.v { oop::RefKind::Mirror(mirror) => mirror.target.clone(), _ => return Ok(Some(oop::consts::get_null())), } }; let (cls_file, em) = match target { Some(target) => { let cls = target.read().unwrap(); match &cls.kind { ClassKind::Instance(cls) => match &cls.enclosing_method { Some(em) => (cls.class_file.clone(), em.clone()), None => return Ok(Some(oop::consts::get_null())), }, _ => return Ok(Some(oop::consts::get_null())), } } None => return Ok(Some(oop::consts::get_null())), }; //push EnclosingMethod class mirror if em.class_index == 0 { panic!(); } let em_class = require_class2(em.class_index, &cls_file.cp).unwrap(); let em_class_mirror = { let cls = em_class.read().unwrap(); cls.get_mirror() }; let mut elms = Vec::with_capacity(3); elms.push(em_class_mirror); //push EnclosingMethod name&desc if em.method_index != 0 { let (name, desc) = constant_pool::get_name_and_type(&cls_file.cp, em.method_index as usize); let name = name.unwrap(); let name = unsafe { std::str::from_utf8_unchecked(name.as_slice()) }; let desc = desc.unwrap(); let desc = unsafe { std::str::from_utf8_unchecked(desc.as_slice()) }; elms.push(util::oop::new_java_lang_string2(jt, name)); elms.push(util::oop::new_java_lang_string2(jt, desc)); } else { elms.push(oop::consts::get_null()); elms.push(oop::consts::get_null()); } let ary = require_class3(None, b"[Ljava/lang/Object;").unwrap(); let ary = Oop::new_ref_ary2(ary, elms); Ok(Some(ary)) } fn jvm_getDeclaringClass0(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let mirror = args.get(0).unwrap(); let target = { let mirror = util::oop::extract_ref(mirror); let v = mirror.read().unwrap(); match &v.v { oop::RefKind::Mirror(mirror) => mirror.target.clone(), _ => return Ok(Some(oop::consts::get_null())), } }; let (cls_file, target, inner_classes) = match target { Some(target) => { let cls = target.read().unwrap(); match &cls.kind { ClassKind::Instance(cls) => match &cls.inner_classes { Some(inner_classes) => ( cls.class_file.clone(), target.clone(), inner_classes.clone(), ), None => return Ok(Some(oop::consts::get_null())), }, _ => return Ok(Some(oop::consts::get_null())), } } None => return Ok(Some(oop::consts::get_null())), }; for it in inner_classes.iter() { if it.inner_class_info_index == 0 { continue; } let inner_class = require_class2(it.inner_class_info_index, &cls_file.cp).unwrap(); if Arc::ptr_eq(&inner_class, &target) { return if it.outer_class_info_index == 0 { Ok(Some(oop::consts::get_null())) } else { let outer_class = require_class2(it.outer_class_info_index, &cls_file.cp).unwrap(); let v = outer_class.read().unwrap(); Ok(Some(v.get_mirror())) }; } } return Ok(Some(oop::consts::get_null())); } fn jvm_isInstance(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let target = args.get(0).unwrap(); let obj = args.get(1).unwrap(); let target_cls = { let v = util::oop::extract_ref(target); let v = v.read().unwrap(); match &v.v { oop::RefKind::Inst(inst) => inst.class.clone(), oop::RefKind::Mirror(mirror) => mirror.target.clone().unwrap(), _ => unreachable!(), } }; let obj_cls = { let obj = util::oop::extract_ref(obj); let v = obj.read().unwrap(); match &v.v { oop::RefKind::Inst(inst) => inst.class.clone(), _ => unreachable!(), } }; let v = if runtime::cmp::instance_of(obj_cls, target_cls) { 1 } else { 0 }; Ok(Some(Oop::new_int(v))) } fn jvm_getDeclaredMethods0(jt: &mut JavaThread, env: JNIEnv, args: Vec<Oop>) -> JNIResult { get_declared_method_helper(false, jt, env, args) } fn jvm_getInterfaces0(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let mirror = { let arg0 = args.get(0).unwrap(); extract_mirror_target(arg0) }; let v = mirror.read().unwrap(); let elms = match &v.kind { oop::ClassKind::Instance(inst) => { let mut elms = Vec::with_capacity(inst.class_file.interfaces.len()); let cp = &inst.class_file.cp; inst.class_file.interfaces.iter().for_each(|it| { let cls = require_class2(*it, cp).unwrap(); let cls = cls.read().unwrap(); elms.push(cls.get_mirror()); }); elms } ClassKind::ObjectArray(_ary) => { let cls_cloneable = require_class3(None, cls_consts::J_CLONEABLE).unwrap(); let cls_serializable = require_class3(None, cls_consts::J_SERIALIZABLE).unwrap(); let mut elms = Vec::with_capacity(2); { let cls = cls_cloneable.read().unwrap(); elms.push(cls.get_mirror()); } { let cls = cls_serializable.read().unwrap(); elms.push(cls.get_mirror()); } elms } ClassKind::TypeArray(_) => unimplemented!("type array getInterfaces0"), }; let clazz = require_class3(None, b"[Ljava/lang/Class;").unwrap(); let ary = Oop::new_ref_ary2(clazz, elms); Ok(Some(ary)) } fn jvm_getRawAnnotations(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let cls = args.get(0).unwrap(); let annotations = match cls { Oop::Ref(rf) => { let rf = rf.read().unwrap(); match &rf.v { oop::RefKind::Mirror(mirror) => { let cls = mirror.target.clone().unwrap(); let cls = cls.read().unwrap(); let raw = cls.get_annotation(); match raw { Some(raw) => Oop::new_byte_ary2(raw.to_vec()), None => oop::consts::get_null(), } } _ => unimplemented!(), } } _ => oop::consts::get_null(), }; Ok(Some(annotations)) } fn jvm_getConstantPool(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let this = args.get(0).unwrap(); let cp_oop = match this { Oop::Ref(rf) => { let rf = rf.read().unwrap(); match &rf.v { oop::RefKind::Mirror(_mirror) => { let cp_cls = require_class3(None, b"sun/reflect/ConstantPool").unwrap(); let cp_oop = Oop::new_inst(cp_cls.clone()); let cls = cp_cls.read().unwrap(); let fid = cls.get_field_id(b"constantPoolOop", b"Ljava/lang/Object;", false); //todo: reimpl maybe, create one JNIHandles, like jdk cls.put_field_value(cp_oop.clone(), fid, this.clone()); cp_oop } _ => unimplemented!(), } } _ => oop::consts::get_null(), }; // unreachable!(); Ok(Some(cp_oop)) } fn jvm_getDeclaredClasses0(_jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let _this = args.get(0).unwrap(); unimplemented!(); let r = oop::consts::get_null(); Ok(Some(r)) } fn jvm_getGenericSignature0(jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>) -> JNIResult { let this = args.get(0).unwrap(); let v = match this { Oop::Ref(rf) => { let rf = rf.read().unwrap(); match &rf.v { oop::RefKind::Mirror(mirror) => { let vt = mirror.value_type; if vt == ValueType::OBJECT { let target = mirror.target.clone().unwrap(); let cls = target.read().unwrap(); let sig = cls.get_attr_signatrue(); sig.map_or_else( || oop::consts::get_null(), |v| { let sig = unsafe { std::str::from_utf8_unchecked(v.as_slice()) }; util::oop::new_java_lang_string2(jt, sig) }, ) } else { oop::consts::get_null() } } _ => unreachable!(), } } _ => unreachable!(), }; Ok(Some(v)) } fn get_declared_method_helper( want_constructor: bool, jt: &mut JavaThread, _env: JNIEnv, args: Vec<Oop>, ) -> JNIResult { //parse args let mirror_target = { let arg0 = args.get(0).unwrap(); extract_mirror_target(arg0) }; let arg1 = args.get(1).unwrap(); let public_only = util::oop::extract_int(arg1) == 1; //fixme: super methods let all_methods = { let cls = mirror_target.read().unwrap(); match &cls.kind { oop::class::ClassKind::Instance(inst) => inst.all_methods.clone(), oop::class::ClassKind::ObjectArray(_ary) => HashMap::new(), t => unreachable!("{:?}", t), } }; fn select_method(want_constructor: bool, m: &MethodIdRef) -> bool { return if want_constructor { m.method.name.as_slice() == b"<init>" && !m.method.is_static() } else { m.method.name.as_slice() != b"<init>" }; } let mut selected_methods = Vec::new(); for (_, m) in all_methods { if select_method(want_constructor, &m) { if !public_only || m.method.is_public() { selected_methods.push(m.clone()); } } } //build methods ary let mut methods = Vec::new(); for m in selected_methods { let v = if want_constructor { common::reflect::new_method_ctor(jt, m) } else { common::reflect::new_method_normal(jt, m) }; methods.push(v); } //build oop methods ary let ary_cls = if want_constructor { require_class3(None, b"[Ljava/lang/reflect/Constructor;").unwrap() } else { require_class3(None, b"[Ljava/lang/reflect/Method;").unwrap() }; Ok(Some(Oop::new_ref_ary2(ary_cls, methods))) } fn extract_mirror_target(v: &Oop) -> ClassRef { let v = util::oop::extract_ref(v); let v = v.read().unwrap(); match &v.v { oop::RefKind::Mirror(mirror) => mirror.target.clone().unwrap(), _ => unreachable!(), } }
rust
Wednesday January 18, 2017, You know that game where you flip a card, see the face and turn it back over, then try to find the match? Write down your values. I told Jairek mine. I had three. Jairek is a life coach. And Tony Robbins is his dad. But that doesn’t matter. Because Tony didn’t invest in his son’s strengths. He invested in weakness. That’s key. That’s how you become a superhero. “I didn’t really have an understanding of what real hard work was,” Jairek said. So in college, Jairek went to Canada and stacked lumber. “I’ll tell you how we find those,” he said. So here’s the card game... Imagine you have all the cards face down on the carpet. Every card has a match. One shows your values. The other shows your time. You have to match them up to win. Because values = time. Time is values. But almost everyone struggles with this. I struggle with this. Jairek gave an example. But it made me wonder... maybe your brain’s idea of values is wrong. Maybe your “values” are really your expectations... This is my experience: misery sinks in when expectations are higher than reality. I’m not in his head. I don’t have a life coach. I have a therapist. So if you’re reading this and thinking, “No he doesn’t,” then at least you know what’s true for you. Jairek has helped thousands of people. His home life was suffering. So here’s the formula: disconnect, then connect. Part A) Disconnect: Sometimes I’m emailing about work at midnight. That’s how habits start. They creep in when my guard is down, when I’m not connected to anything I love. Jairek switched his coaching methods a few years ago. He used to coach on performance. Now it’s relationships. Because it’s the relationships in our lives that increase our performance. “No, usually they suck and I’m annoyed at them.” I had plans to see them in a few hours. Then Jairek hypnotized me. He had me repeat the process. Catch a memory. Then another. You can do this about your spouse, family, someone who’s hurt your or you’ve hurt. And when I flipped the cards, I found a match. → Ask me a question on Quora...I answer questions daily! (Disclaimer: The views and opinions expressed in this article are those of the author and do not necessarily reflect the views of YourStory.)
english
RE: The Love of My Life Forever & Always! I am so sorry to hear about what happened to your wife, Mr. Cornell. The name Deborah has a Hebrew origin and means worker like a bee, so when you walk through your garden of beautiful flowers and you see a worker bee, remember your brave and strong wife. It is hard to lose a loved one and more if you lived with her 36 years, but you have to be strong, be brave and keep moving forward on this road called life. You must be convinced to appreciate and delight in the generation of children and grandchildren that you and your wife built and with the hope that you mention between the lines of this publication, that someday you will see each other again. I will pray for you today that God will give you peace and strength my friend Cornell. Use translate for this comment.
english
Former England captain Michael Vaughan doesn’t rate the Indian T20I team, which is currently playing a 5-match series against England, too highly. The Eoin Morgan-led visitors are 2-1 up in the five-match series after hammering the hosts by eight wickets in the third T20I in Ahmedabad on Tuesday. Michael Vaughan has said that India are committing the same mistakes - constant chopping and changing - that England did in the Test series. He told Cricbuzz in this regard: Michael Vaughan felt that the decision to move Ishan Kishan and Virat Kohli down to number three and four respectively in the batting order was a mistake, saying: India have been constantly making changes to their batting order. While Shikhar Dhawan opened the batting with KL Rahul in the first T20I, Ishan Kishan did so in the second and Rohit Sharma in the third. Moreover, they dropped Suryakumar Yadav from the third T20I, a game after he made his debut in which he did not get a chance to bat. Michael Vaughan has also reckoned that India are sorely missing their senior campaigners, pacer Jasprit Bumrah and all-rounder Ravindra Jadeja, who add a lot of stability and substance to the team. While Bumrah is on leave, as he recently got married, Jadeja is recovering from a fractured thumb. The former England player said in this regard: Incidentally, all three matches in the ongoing T20I series have been won by the team winning the toss. The fourth T20I between India and England starts in Ahmedabad on Thursday.
english
Mass Maharaja Ravi Teja’s upcoming film Krack is gearing up for Sankranthi release. Shruti Haasan is playing the female lead in this cop thriller based on real events. Director Gopichand Malineni is teaming up with Ravi for the third time with Krack after the blockbusters of Don Seenu and Balupu. The team has released the lyrical video of the third song Korameesam Polisoda on Friday on Youtube. This romantic song is shot on a uniform-clad Ravi and Shruti sensually with romantic lyrics penned by Ramajogayya Sastry. Thaman’s tune is catchy and the visuals are stunning. Krack is bankrolled by B. Madhu under Saraswathi Films Division banner and distributed by T-Series Films. While G.K Vishnu is handling the camera for it, Naveen Nooli is performing the editor’s duties.
english
Los Angeles, commonly referred to by the initialism L. A. , is the largest city in California. With a 2020 population of 3,898,747, it is the second-largest city in the United States, following New York City. Business : Entertainment : Entertainment : Russell Crowe quips about starring in 'Gladiator 2' as buried corpse! Entertainment : Lifestyle : Steve McQueen says his film on Grenfell Tower disaster will leave audiences 'disturbed' Entertainment : International : International :
english
A massive fire that broke out yesterday in a three-storey commercial building left at least 27 killed and, a search operation is still underway. Times Now gets you special coverage of every small detail of the incident and, talks to one of the victim's daughters. Girl breaks down into tears while reciting her story. She claimed that doctors could not save the life of her father who sustained severe injuries during the fire. Her sister is still fighting for her life in the hospital. More than a dozen people are still untraced, however, the blaze is now controlled. Listen in to know more.
english
Laura (Layla) H. Kwong is Assistant Professor of Environmental Health Sciences, University of California, Berkeley. Laura (Layla) H. Kwong's contributions to The Conversation are being republished at Britannica.com under a Creative Commons license. Primary Contributions (1)
english
<reponame>AeonFlor/HYU_CSE2024<filename>models/enemy/birds.py import os from random import choice, randint from pygame.sprite import Group from pygame import image from .base import Enemy from .explosions import BirdExplosion, BirdBossExplosion class Bird(Enemy): DEFAULT_COUNT = 0 def __init__(self, pos_x, pos_y): super().__init__('birds') self.pos_x = pos_x self.pos_y = pos_y self.health_point = 1 self.explosion = BirdExplosion self.is_reverse = True def set_images(self, image_path) -> None: if self.is_reverse: os.chdir(os.path.join(self.IMAGE_ROOT, os.path.join(self.name, f'{image_path}_left'))) self.lefts = [image.load(element) for element in sorted(os.listdir())] os.chdir(os.path.join(self.IMAGE_ROOT, os.path.join(self.name, f'{image_path}_right'))) self.rights = [image.load(element) for element in sorted(os.listdir())] self.images = self.rights else: os.chdir(os.path.join(self.IMAGE_ROOT, os.path.join(self.name, f'{image_path}'))) self.images = [image.load(element) for element in sorted(os.listdir())] self.image = self.images[self.image_index] self.rect = self.image.get_rect() if self.pos_x or self.pos_y: self.rect.x, self.rect.y = self.pos_x, self.pos_y class SmileBird(Bird): DEFAULT_COUNT = 5 # DEFAULT_COUNT = 1 def __init__(self, pos_x, pos_y): super().__init__(pos_x, pos_y) self.speed = 4 self.set_images('smile_bird') self.score = 10 class PoisonedBird(Bird): DEFAULT_COUNT = 8 # DEFAULT_COUNT = 1 def __init__(self, pos_x, pos_y): super().__init__(pos_x, pos_y) self.speed = 6 self.set_images('poisoned_bird') self.score = 30 class CircledBird(Bird): DEFAULT_COUNT = 10 # DEFAULT_COUNT = 1 def __init__(self, pos_x, pos_y): super().__init__(pos_x, pos_y) self.speed = 6 self.set_images('circled_bird') self.score = 50 class OldBird(Bird): DEFAULT_COUNT = 15 # DEFAULT_COUNT = 1 def __init__(self, pos_x, pos_y): super().__init__(pos_x, pos_y) self.speed = 2 self.set_images('old_bird') self.score = 60 class CrazyBird(Bird): DEFAULT_COUNT = 1 COOLDOWN = 500 HEALTH_POINT = 15 def __init__(self, pos_x, pos_y): super().__init__(pos_x, pos_y) self.speed = 8 self.explosion = BirdBossExplosion self.health_point = self.HEALTH_POINT self.set_images('crazy_bird') self.birds = [SmileBird, PoisonedBird, CircledBird, OldBird] self.children = Group() self.is_boss = True self.coll_down_count = 0 self.score = 500 def update(self, *args, **kwargs) -> None: self.coll_down_count += 1 super().update() self.children.update() def move(self) -> None: if 0 > self.rect.x or 640 - self.image.get_width() < self.rect.x: self.speed *= -1 self.rect.x += self.speed
python
<reponame>JRL-CARI-CNR-UNIBS/online_replanner<gh_stars>1-10 #include <ros/ros.h> #include <graph_core/parallel_moveit_collision_checker.h> #include <graph_replanning/trajectory.h> #include <moveit/robot_state/robot_state.h> #include <graph_replanning/replanner.h> int main(int argc, char **argv) { ros::init(argc, argv, "node_test_replanner"); ros::AsyncSpinner spinner(4); spinner.start(); ros::NodeHandle nh; // //////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::string group_name = "cartesian_arm"; std::string last_link = "end_effector"; moveit::planning_interface::MoveGroupInterface move_group(group_name); robot_model_loader::RobotModelLoader robot_model_loader("robot_description"); robot_model::RobotModelPtr kinematic_model = robot_model_loader.getModel(); planning_scene::PlanningScenePtr planning_scene = std::make_shared<planning_scene::PlanningScene>(kinematic_model); const robot_state::JointModelGroup* joint_model_group = move_group.getCurrentState()->getJointModelGroup(group_name); std::vector<std::string> joint_names = joint_model_group->getActiveJointModelNames(); unsigned int dof = joint_names.size(); Eigen::VectorXd lb(dof); Eigen::VectorXd ub(dof); for (unsigned int idx = 0; idx < dof; idx++) { const robot_model::VariableBounds& bounds = kinematic_model->getVariableBounds(joint_names.at(idx)); //bounds dei joints definito in urdf e file joints limit if (bounds.position_bounded_) { lb(idx) = bounds.min_position_; ub(idx) = bounds.max_position_; } } // //////////////////////////////////////////UPDATING PLANNING SCENE//////////////////////////////////////////////////////// ros::ServiceClient ps_client=nh.serviceClient<moveit_msgs::GetPlanningScene>("/get_planning_scene"); if (!ps_client.waitForExistence(ros::Duration(10))) { ROS_ERROR("unable to connect to /get_planning_scene"); return 1; } moveit_msgs::GetPlanningScene ps_srv; if (!ps_client.call(ps_srv)) { ROS_ERROR("call to srv not ok"); return 1; } if (!planning_scene->setPlanningSceneMsg(ps_srv.response.scene)) { ROS_ERROR("unable to update planning scene"); return 0; } // //////////////////////////////////////////PATH PLAN & VISUALIZATION//////////////////////////////////////////////////////// pathplan::MetricsPtr metrics = std::make_shared<pathplan::Metrics>(); pathplan::CollisionCheckerPtr checker = std::make_shared<pathplan::ParallelMoveitCollisionChecker>(planning_scene, group_name); pathplan::DisplayPtr disp = std::make_shared<pathplan::Display>(planning_scene,group_name,last_link); disp->clearMarkers(); ros::Duration(1).sleep(); pathplan::Trajectory trajectory = pathplan::Trajectory(nh,planning_scene,group_name); std::vector<pathplan::PathPtr> path_vector; Eigen::VectorXd start_conf(3); start_conf << 0.0,0.0,0.0; Eigen::VectorXd goal_conf(3); goal_conf << 0.8,0.8,0.8; int id=100; int id_wp = 1000; for (unsigned int i =0; i<2; i++) { pathplan::SamplerPtr sampler = std::make_shared<pathplan::InformedSampler>(start_conf, goal_conf, lb, ub); pathplan::BiRRTPtr solver = std::make_shared<pathplan::BiRRT>(metrics, checker, sampler); pathplan::PathPtr solution = trajectory.computePath(start_conf, goal_conf,solver,1); path_vector.push_back(solution); std::vector<double> marker_color; if(i==0) marker_color = {0.5,0.5,0.0,1.0}; if(i==1) marker_color = {0.0f,0.0f,1.0,1.0}; disp->displayPathAndWaypoints(solution,id,id_wp,"pathplan",marker_color); id +=1; id_wp +=50; ros::Duration(0.5).sleep(); } pathplan::PathPtr current_path = path_vector.front(); std::vector<pathplan::PathPtr> other_paths = {path_vector.at(1)}; Eigen::VectorXd parent = current_path->getConnections().at(2)->getParent()->getConfiguration(); Eigen::VectorXd child = current_path->getConnections().at(2)->getChild()->getConfiguration(); Eigen::VectorXd current_configuration = parent + (child-parent)*0.5; current_path->getConnections().at(3)->setCost(std::numeric_limits<double>::infinity()); current_path->cost(); // ///////////////////////////////////////// VISUALIZATION OF CURRENT NODE /////////////////////////////////////////////////////////// std::vector<double> marker_color_sphere_actual = {1.0,0.0,1.0,1.0}; disp->displayNode(std::make_shared<pathplan::Node>(current_configuration),id,"pathplan",marker_color_sphere_actual); id++; // //////////////////////////////////////// REPLANNING & TEST //////////////////////////////////////////////////////////////// pathplan::SamplerPtr samp = std::make_shared<pathplan::InformedSampler>(start_conf, goal_conf, lb, ub); pathplan::BiRRTPtr solver = std::make_shared<pathplan::BiRRT>(metrics, checker, samp); solver->config(nh); pathplan::Replanner replanner = pathplan::Replanner(current_configuration, current_path, other_paths, solver, metrics, checker, lb, ub); double time_repl = 1.0; bool success = replanner.informedOnlineReplanning(time_repl); std::vector<double> marker_color = {1.0,1.0,0.0,1.0}; std::vector<double> marker_color_sphere_new_curr_conf = {0.0,0.0,0.0,1.0}; int id_new_curr_conf = 1678; if(success) { ROS_WARN("SUCCESS"); std::vector<double> marker_scale(3,0.01); disp->changeConnectionSize(marker_scale); disp->displayPath(replanner.getReplannedPath(),id,"pathplan",marker_color); } else { return 0; } int idx_replanned_path_start; pathplan::PathPtr replanned_path = replanner.getReplannedPath()->clone(); pathplan::ConnectionPtr replanned_path_conn = current_path->findConnection(replanned_path->getWaypoints().at(0),idx_replanned_path_start); pathplan::NodePtr parent_node,child_node; Eigen::VectorXd new_current_configuration; // disp->nextButton("Starting replanned path from conf1 -> press NEXT"); parent_node = replanned_path_conn->getParent(); child_node = replanned_path_conn->getChild();; new_current_configuration = parent_node->getConfiguration()+0.3*(child_node->getConfiguration()-parent_node->getConfiguration()); replanner.startReplannedPathFromNewCurrentConf(new_current_configuration); disp->displayPath(replanner.getReplannedPath(),id,"pathplan",marker_color); disp->displayNode(std::make_shared<pathplan::Node>(new_current_configuration),id_new_curr_conf,"pathplan",marker_color_sphere_new_curr_conf); replanner.setReplannedPath(replanned_path->clone()); // disp->nextButton("Starting replanned path from conf2 -> press NEXT"); parent_node = current_path->getConnections().at(0)->getParent(); child_node = current_path->getConnections().at(0)->getChild(); new_current_configuration = current_path->getWaypoints().at(0)+0.3*(current_path->getWaypoints().at(1)-current_path->getWaypoints().at(0)); replanner.startReplannedPathFromNewCurrentConf(new_current_configuration); disp->displayPath(replanner.getReplannedPath(),id,"pathplan",marker_color); disp->displayNode(std::make_shared<pathplan::Node>(new_current_configuration),id_new_curr_conf,"pathplan",marker_color_sphere_new_curr_conf); replanner.setReplannedPath(replanned_path->clone()); // disp->nextButton("Starting replanned path from conf3 -> press NEXT"); parent_node = replanned_path->getConnections().at(0)->getParent(); child_node = replanned_path->getConnections().at(0)->getChild(); new_current_configuration = parent_node->getConfiguration()+0.3*(child_node->getConfiguration()-parent_node->getConfiguration()); replanner.startReplannedPathFromNewCurrentConf(new_current_configuration); disp->displayPath(replanner.getReplannedPath(),id,"pathplan",marker_color); disp->displayNode(std::make_shared<pathplan::Node>(new_current_configuration),id_new_curr_conf,"pathplan",marker_color_sphere_new_curr_conf); replanner.setReplannedPath(replanned_path->clone()); // disp->nextButton("Starting replanned path from conf4 -> press NEXT"); parent_node = replanned_path->getConnections().at(1)->getParent(); child_node = replanned_path->getConnections().at(1)->getChild(); new_current_configuration = parent_node->getConfiguration()+0.3*(child_node->getConfiguration()-parent_node->getConfiguration()); replanner.startReplannedPathFromNewCurrentConf(new_current_configuration); disp->displayPath(replanner.getReplannedPath(),id,"pathplan",marker_color); disp->displayNode(std::make_shared<pathplan::Node>(new_current_configuration),id_new_curr_conf,"pathplan",marker_color_sphere_new_curr_conf); replanner.setReplannedPath(replanned_path->clone()); // disp->nextButton("Starting replanned path from conf5 -> press NEXT"); parent_node = current_path->getConnections().at(idx_replanned_path_start+1)->getParent(); child_node = current_path->getConnections().at(idx_replanned_path_start+1)->getChild(); new_current_configuration = parent_node->getConfiguration()+0.3*(child_node->getConfiguration()-parent_node->getConfiguration()); replanner.startReplannedPathFromNewCurrentConf(new_current_configuration); disp->displayPath(replanner.getReplannedPath(),id,"pathplan",marker_color); disp->displayNode(std::make_shared<pathplan::Node>(new_current_configuration),id_new_curr_conf,"pathplan",marker_color_sphere_new_curr_conf); return 0; }
cpp
{"topic_56": {"num_tags": 8, "name": "topic_56", "full_name": "topic_56", "num_included_tokens": 8}, "topic_33": {"num_tags": 21, "name": "topic_33", "full_name": "topic_33", "num_included_tokens": 21}, "topic_29": {"num_tags": 3, "name": "topic_29", "full_name": "topic_29", "num_included_tokens": 3}, "topic_22": {"num_tags": 1, "name": "topic_22", "full_name": "topic_22", "num_included_tokens": 1}, "topic_23": {"num_tags": 35, "name": "topic_23", "full_name": "topic_23", "num_included_tokens": 35}, "topic_92": {"num_tags": 7, "name": "topic_92", "full_name": "topic_92", "num_included_tokens": 7}, "topic_83": {"num_tags": 6, "name": "topic_83", "full_name": "topic_83", "num_included_tokens": 6}, "topic_79": {"num_tags": 6, "name": "topic_79", "full_name": "topic_79", "num_included_tokens": 6}, "topic_85": {"num_tags": 20, "name": "topic_85", "full_name": "topic_85", "num_included_tokens": 20}, "topic_90": {"num_tags": 1, "name": "topic_90", "full_name": "topic_90", "num_included_tokens": 1}, "topic_61": {"num_tags": 21, "name": "topic_61", "full_name": "topic_61", "num_included_tokens": 21}, "topic_71": {"num_tags": 16, "name": "topic_71", "full_name": "topic_71", "num_included_tokens": 16}, "topic_70": {"num_tags": 2, "name": "topic_70", "full_name": "topic_70", "num_included_tokens": 2}}
json
A potential spoiler for the upcoming AEW World Championship match between Jon Moxley and Bryan Danielson has been unearthed thanks to betting odds for the match being released ahead of this week's Grand Slam edition of Dynamite. The two Blackpool Combat Club members fought through the Tournament of Champions to reach the final that will take place on September 21st at Arthur Ashe Stadium in Queens, New York. Danielson defeated two former AEW World Champions in Hangman Page and Chris Jericho, while Moxley beat three-time TNT Champion Sammy Guevara, having received a bye in the first round. Fans in New York are guaranteed to see a new AEW World Champion crowned, but who will it be? Based on betting odds released by Betonline. com, it seems that things are looking good for the "American Dragon," as he is currently the -300 favorite. Jon Moxley is currently coming in as a +200 underdog, with many fans believing that the two-time AEW World Champion will be taking some much-needed time off in the coming weeks. However, everything could change in the next few days. One narrative through-line in the Tournament of Champions for Bryan Danielson is that he is avenging previous losses sustained in AEW. He has already avenged his loss over Hangman Page from the January 5th, 2022 edition of Dynamite, as well as his loss to Chris Jericho at All Out 2022, but will Jon Moxley be next? Moxley picked up a sneaky victory over Danielson at the Revolution pay-per-view in March 2022, rolling up the American Dragon while he was trying to lock in a submission. Suppose Danielson picks up the win over Moxley on Dynamite. In that case, he will have successfully avenged all four of his singles losses in his AEW career, with his recent wins over Hangman, Jericho, and Daniel Garcia being the other three. Who will walk out of Arthur Ashe Stadium as the new AEW World Champion? Let us know in the comments section down below!
english
<reponame>SilverIceKey/opencvDemo import cv2 isClose = False # cap = cv2.VideoCapture(0) modelFile = "opencv_face_detector_uint8.pb" configFile = "opencv_face_detector.pbtxt" tensorflowNet = cv2.dnn.readNetFromTensorflow(modelFile, configFile) # Input image img = cv2.imread('1.jpg') noDelImg = cv2.imread('1.jpg') rows, cols, channels = img.shape # Show the image with a rectagle surrounding the detected objects # cv2.namedWindow('frame', 0) # cv2.resizeWindow('frame', 640, 480) # while (cap.isOpened()): # ret, frame = cap.read() # rows, cols, channels = frame.shape # # # Use the given image as input, which needs to be blob(s). # tensorflowNet.setInput(cv2.dnn.blobFromImage(frame, size=(300, 300), swapRB=True, crop=False)) # # # Runs a forward pass to compute the net output # networkOutput = tensorflowNet.forward() # # # Loop on the outputs # for detection in networkOutput[0,0]: # # score = float(detection[2]) # if score > 0.9: # left = detection[3] * cols # top = detection[4] * rows # right = detection[5] * cols # bottom = detection[6] * rows # # # draw a red rectangle around detected objects # cv2.rectangle(frame, (int(left), int(top)), (int(right), int(bottom)), (0, 255, 0), thickness=1) # print('{0}'.format(detection)) # cv2.imshow('frame', frame) # if cv2.waitKey(1) & 0xFF == ord('q'): # cap.release() # cv2.destroyAllWindows() # break # ret, frame = img.read() rows, cols, channels = img.shape # Use the given image as input, which needs to be blob(s). tensorflowNet.setInput(cv2.dnn.blobFromImage(img, size=(300, 300), swapRB=True, crop=False)) # Runs a forward pass to compute the net output networkOutput = tensorflowNet.forward() # Loop on the outputs for detection in networkOutput[0, 0]: score = float(detection[2]) if score > 0.9: left = detection[3] * cols top = detection[4] * rows right = detection[5] * cols bottom = detection[6] * rows # draw a red rectangle around detected objects cv2.rectangle(img, (int(left), int(top)), (int(right), int(bottom)), (0, 255, 0), thickness=3) # print('{0}'.format(detection)) # cv2.imshow('frame', img) result = cv2.blur(noDelImg,(3,3)) result1 = cv2.erode(result,(1,1)) result2 = cv2.addWeighted(result1,0,result,1,0) # result2 = cv2.absdiff(result,result1) binary = cv2.adaptiveThreshold(cv2.cvtColor(result2,cv2.COLOR_RGB2GRAY), 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C,cv2.THRESH_BINARY, 25, 10) contours = cv2.findContours(binary,cv2.RETR_LIST,cv2.CHAIN_APPROX_NONE) bigIndex = 0 area = cv2.contourArea(contours[0][0]) for index,contour in enumerate(contours[0]): if cv2.contourArea(contour) > 100.0: area = cv2.contourArea(contour) bigIndex = index print(cv2.contourArea(contour)) cv2.drawContours(noDelImg,contour,-1,(0,255,0),thickness=3) cv2.imshow('frame1', cv2.cvtColor(result2,cv2.COLOR_RGB2GRAY)) if cv2.waitKey(0) & 0xFF == ord('q'): cv2.destroyAllWindows()
python
/** * Grid for use with GeoExt map panels. */ Ext.define('DMPlanner.ux.map.MapFeatureGrid', { extend: 'Ext.grid.Panel', alias: 'widget.dmpfeaturegrid', requires: [ 'Ext.grid.Panel',// 'Ext.data.Model',// 'GeoExt.data.FeatureStore',// 'GeoExt.selection.FeatureModel',// 'Ext.grid.plugin.CellEditing'// ], layer: undefined, /** * @cfg {GeoExt.data.FeatureStore} store (required) * The {@link GeoExt.data.FeatureStore Store} the grid should use as its data source. */ store: undefined, initComponent: function() { var me = this; Ext.applyIf(me, { itemId: 'featureGrid', store: Ext.create('GeoExt.data.FeatureStore', { storeId: 'PlanFeatures', layer: me.layer, autoLoad: false, autoDestroy: true, fields: [ { name: 'fid', convert: function(value, record) { // record.raw a OpenLayers.Feature.Vector instance if (record.raw instanceof OpenLayers.Feature.Vector) { return record.raw.fid; } else { return "This is not a Feature"; } } }, {name: 'projectid', type: 'int', useNull: true}, {name: 'name', type: 'mystring', useNull: true}, {name: 'comment', type: 'mystring', useNull: true} ], sorters: [ 'name' ] }), height: 175, //split: true, autoScroll: true, title: 'Feature List', columns: [ { xtype: 'gridcolumn', dataIndex: 'name', flex: 1, text: 'Name', editor: { xtype: 'textfield', allowBlank: false } }, { xtype: 'gridcolumn', dataIndex: 'comment', flex: 2, text: 'Description', editor: { xtype: 'textfield', allowBlank: false } } ], selModel: Ext.create('GeoExt.selection.FeatureModel',{ //autoPanMapOnSelection: true, selectControl: { id: 'dmplanner-select-row' } }), selType: 'featuremodel', plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { pluginId: 'cellEdit', clicksToEdit: 1 }) ] }); me.callParent(arguments); me.on('viewready',function(view) { var ctl, addId, sel = view.getSelectionModel().selectControl, //hover = this.up('dmpmappanel').down('dmpmap').map.getControlsBy('id','dmp-select-hover')[0], store = view.getStore(), edit = view.getPlugin('cellEdit'); sel.onSelect = function(feature) { ctl = this.map.getControlsBy('id','dmp-modify-feature')[0]; if(ctl.active) { ctl.selectFeature(feature); } }; /*sel.unSelect = function(feature) { ctl = this.map.getControlsBy('id','dmp-modify-feature')[0]; if(ctl.active) { ctl.unselectfeature(feature); } };*/ //add the planId to new records addId = function(store, records) { Ext.each(records, function(r) { r.beginEdit(); r.set('planid',view.up('dmpmappanel').planId); r.endEdit(); }); }; //register listeners to update records store.on({ add: addId, load: addId }); //don't allow editing or selecting records marked for deletion edit.on({ beforeedit: function(editor, e) { if(e.record.raw.state === OpenLayers.State.DELETE) { return false; } } }); view.ownerCt.on({ beforeselect: function(grid, rec) { if(rec.raw.state === OpenLayers.State.DELETE) { return false; } } }); view.on({ //view listeners to highlight features on mouse over/out itemmouseenter: function(view, rec) { if(view.ownerCt.getPlugin('cellEdit').activeRecord !== rec) { var ctl = rec.raw.layer.map.getControlsBy('id','dmp-select-hover')[0]; ctl.overFeature(rec.raw, true); } }, itemmouseleave: function(view, rec) { var ctl, layer = rec.raw.layer, map = layer.map; if(view.ownerCt.getPlugin('cellEdit').activeRecord !== rec) { ctl = map.getControlsBy('id','dmp-select-hover')[0]; ctl.outFeature(rec.raw); } else{ //map.getControlsBy('id','dmp-select-hover')[0].highlight(rec.raw); layer.drawFeature(rec.raw, 'select'); } }, //remove the add/load listeners from the store destroy: function(view) { store.un('add',addId, store); store.un('load',addId, store); }, scope: this }); }); me.on('deselect', function(rm, rec, idx) { var cell = rm.view.ownerCt.getPlugin('cellEdit'); cell.completeEdit(); rm.selectControl.unselect(rec.raw); }); } });
javascript
Justin Herbert and the Los Angeles Chargers ended their three-game losing streak with a 6-0 win over the New England Patriots in Week 13 and were hoping to continue in their winning ways when they hosted the Denver Broncos in Week 14. However, their hopes were dashed in the second quarter when Herbert suffered a finger injury that required medical aid and a trip to the locker room. Chargers HC revealed after the game that Herbert fractured a finger on his throwing hand after being tackled to the turf by Broncos defensive end Zach Allen. The Chargers stated that the quarterback's return to the game was initially ruled questionable but was later changed to out. Backup quarterback Easton Stick replaced Herbert under center. The Chargers quarterback was having a rough day against the Broncos' defense before his exit from the game. He completed only nine of 17 pass attempts for 96 yards and tossed an interception. The Broncos took full advantage of the short field and scored the game's first touchdown. The Broncos' defense stifled Justin Herbert in the pocket and sacked him four times before he suffered the finger injury that left him needing medical assistance. Denver went into the halftime break leading 10-0. Justin Herbert returned to the sideline in the second half in a hoodie and hid in his hand inside the pocket to avoid revealing the extent of his injury. Following the Chargers' 24-7 loss, head coach Brandon Staley announced that the quarterback had suffered a fractured right index finger. With the Chargers falling to 5-8, it's unlikely the team will risk rushing Herbert back and expose the quarterback to a potentially severe injury. He'll probably sit out of the team's Week 15 matchup against the Las Vegas Raiders. UPDATE: Herbert has been ruled out for the rest of the 2023 season. While there are four games left in the season, the Chargers' playoff hopes are likely over. They are mathematically alive. However, with Herbert's injury and needing a slew of results going their way, their playoff dreams are a bridge too far. Staley and the rest of the coaching staff's positions will be under scrutiny in the offseason, and the Chargers' performance in their final four games will play a crucial role in determining whether they retain their jobs next season.
english
Om in wrâldwiid respekteare fabryk foar hûsdoarren en Windows-yndustry te wurden. Ikebana is in prachtige eigentiidske arsjitektoanysk ûntwurpen Japansk-ynspirearre ûntwikkeling leit oan 'e râne fan' e Melbourne CBD perfekt pleatst om te genietsjen fan de opwining fan 'e stêd út in plak fan rêst. Dit prachtige appartemint bestiet út ljochte libbene, iten, moderne iepen keuken, in fonkeljende badkeamer, waskfoarsjenningen en in terras bûten. Mei glêzen foargevel fan flier oant plafond, gepolijst flierplanken, kookplaten mei fjouwer baarnen, ôfwaskmasjine, elektryske oven, afzuigkap, stiennen banken mei in eettafel taheakke, en ruten mei dûbeld glês. Geboufoarsjenningen omfetsje in befeiligingsyngong, fideotafersjoch, en foarsjenningen op it dak. Minuten rinnen nei Flagstaff Station en binnen maklike berik fan Queen Victoria Market en in ferskaat oan restaurants. Funksionen fan dit apartmentName: - In feilige pallet parkeargaraazje NET STACKER! - Privee klub op it dak, ynklusyf in binnen- / bûtenlounge, teppanyaki-grill, karaoke-lounge, in fjoerplak, en privee itengebieten. - Beheard en begeliede troch Ikebana Team yn har hiele amtstermyn. It- Altyd populêr west yn 'e hiermerk en komt mei in befeilige hierhier. Wês fluch om te ynspektearjen om jo eksklusyf appartemint hjoed te befeiligjen! Produkten dy hjire: Aluminium glêzen unitized muorre, in aluminium finster, en doar systeem, 3800 SQM. As earste begripe wy dat technyske ynput yn ûntwerpûntwikkeling kritysk is foar projektgebouwen. Us WJW-team hat oerfloedich ûnderfiningen en is spesjalisearre yn it leverjen fan wiidweidige ûntwerp-assistinsje en ûntwerp-bou tsjinsten en budzjetten fan it begjin ôf. Us Engineering-team sil in profesjonele berekkeningsbasis meitsje op 'e pleatslike wynlast en krekte boubetingsten, en materiaaleasken om fleksibele ûntwerpoplossingen te meitsjen om oan ús kliïnt te foldwaan ’S verwachtings. Foar alle gebou gevel projekten, gerdyn muorre systemen, unitized gerdyn muorren, aluminium Finsters & doarren systeem basisynformaasje binne: Hichwizing teken, Planne teken, Sesje tekenring, Lokale wind- laad. Kwalifisearre materialen en goede fabrikaazje binne heul wichtich foar in goed projekt, ús prosessen binne sertifisearre troch ISO 9001 noarmen. Us foarsjenningen omfetsje neistlizzende ûntwerp- en produksjegebieten, dy't bydrage oan de dynamyk fan ynnovaasje en gearwurking troch gearwurkingsferbannen mei materiaalferkeapers en produktleveransiers. Unôfhinklike tredden fiere alle kwaliteitskontrôletests út neffens de klant ’s easken, manufacturing proses giet troch strange kwaliteit kontrôle oefeningen sawol troch minsklik en kompjûterisearre testen. WJW leveret tsjinsten foar teamynstallaasje en tsjinsten foar ynstallaasjebegelieding helpe de ûntwerpyntinsje oerset nei it bouwen fan realiteit op tiid en klant ’S koste yn beguit. Projektteams omfetsje erfarne projektmanagers, projektyngenieurs, sidemanagers en foarman / sideoperaasjelieder, Teamynstallaasjetsjinsten kinne ús kliïnten helpe om tydige en suksesfolle projektútfiering te garandearjen. Sûnens en feiligens binne it wichtichste foar al ús projekten, en spesifike metoade-ferklearrings en risiko-evaluaasjes wurde levere foar praktyk.
english
Opposition party of AP, YSRC is now strategically planning to corner TDP. It is known that this party is trying to focus more on the Farmer loan waiver scheme. YSRC leader Jagan mentioned that the loan waiver is not exactly possible and hence they didn’t include it in their manifesto during elections time. YSRC stated that TDP misleaded people showing this scheme and won the elections. Now, YSRC is set to join hands with Farmers and DWCRA women to fight against TDP in getting the money from the government. Lady leaders sentiment turned out to be a plus point for YSRC. YS Vijayamma, Sharmila and Roja’s image in YSRC is helping the party to raise expectations among women in the state. DWCRA is a group of self employed women and hence they can be influenced easily by the women leaders in YSRC. On the other hand, TDP doesn’t have such power and it is becoming weak in this area. Looks like YSRC is concentrating on the right areas to corner TDP strategically!
english
<gh_stars>0 package com.aoc.days2015.day09; public class CityDistance { private String start; private String end; private int distance; CityDistance(final String start, final String end, final int distance) { this.start = start; this.end = end; this.distance = distance; } public String getStart() { return start; } public void setStart(final String start) { this.start = start; } public String getEnd() { return end; } public void setEnd(final String end) { this.end = end; } public int getDistance() { return distance; } public void setDistance(final int distance) { this.distance = distance; } @Override public String toString() { return this.start + " to " + this.end + " = " + this.distance; } }
java
/* * zentity * Copyright © 2018-2021 <NAME> * https://zentity.io * * 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 io.zentity.model; import org.junit.Test; public class IndexFieldTest { public final static String VALID_OBJECT = "{\"attribute\":\"foo\",\"matcher\":\"bar\",\"quality\":1.0}"; //// "indices".INDEX_NAME."fields" /////////////////////////////////////////////////////////////////////////////// @Test public void testValid() throws Exception { new IndexField("index_name", "index_field_name", VALID_OBJECT); } @Test(expected = ValidationException.class) public void testInvalidUnexpectedField() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"matcher\":\"bar\",\"quality\":1.0,\"foo\":\"bar\"}"); } //// "indices".INDEX_NAME."fields".INDEX_FIELD_NAME ////////////////////////////////////////////////////////////// @Test(expected = ValidationException.class) public void testInvalidNameEmpty() throws Exception { new IndexField("index_name", " ", VALID_OBJECT); } //// "indices".INDEX_NAME."fields".INDEX_FIELD_NAME."attribute" ////////////////////////////////////////////////// @Test(expected = ValidationException.class) public void testInvalidAttributeMissing() throws Exception { new IndexField("index_name", "index_field_name", "{\"matcher\":\"bar\"}"); } @Test(expected = ValidationException.class) public void testInvalidAttributeEmpty() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\" \",\"matcher\":\"bar\"}"); } @Test(expected = ValidationException.class) public void testInvalidAttributeTypeArray() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":[],\"matcher\":\"bar\"}"); } @Test(expected = ValidationException.class) public void testInvalidAttributeTypeBoolean() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":true,\"matcher\":\"bar\"}"); } @Test(expected = ValidationException.class) public void testInvalidAttributeTypeFloat() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":1.0,\"matcher\":\"bar\"}"); } @Test(expected = ValidationException.class) public void testInvalidAttributeTypeInteger() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":1,\"matcher\":\"bar\"}"); } @Test(expected = ValidationException.class) public void testInvalidAttributeTypeNull() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":null,\"matcher\":\"bar\"}"); } @Test(expected = ValidationException.class) public void testInvalidAttributeTypeObject() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":{},\"matcher\":\"bar\"}"); } //// "indices".INDEX_NAME."fields".INDEX_FIELD_NAME."matcher" //////////////////////////////////////////////////// /** * Valid because matchers are optional for index fields. * See: https://zentity.io/docs/advanced-usage/payload-attributes/ */ @Test public void testValidMatcherMissing() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\"}"); } /** * Valid because matchers are optional for index fields. * See: https://zentity.io/docs/advanced-usage/payload-attributes/ */ @Test public void testValidMatcherTypeNull() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"matcher\":null}"); } @Test(expected = ValidationException.class) public void testInvalidMatcherEmpty() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"matcher\":\" \"}"); } @Test(expected = ValidationException.class) public void testInvalidMatcherTypeArray() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"matcher\":[]}"); } @Test(expected = ValidationException.class) public void testInvalidMatcherTypeBoolean() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"matcher\":true}"); } @Test(expected = ValidationException.class) public void testInvalidMatcherTypeFloat() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"matcher\":1.0}"); } @Test(expected = ValidationException.class) public void testInvalidMatcherTypeInteger() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"matcher\":1}"); } @Test(expected = ValidationException.class) public void testInvalidMatcherTypeObject() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"matcher\":{}}"); } //// "indices".INDEX_NAME."fields".INDEX_FIELD_NAME."quality" //////////////////////////////////////////////////// @Test public void testValidQualityValue() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":0.0}"); new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":0.5}"); new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":1.0}"); new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":0}"); new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":1}"); new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":null}"); } /** * Valid because the "quality" field is optional. */ @Test public void testValidQualityMissing() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\"}"); } /** * Valid because the "quality" field is optional. */ @Test public void testValidQualityTypeNull() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":null}"); } @Test public void testValidQualityTypeIntegerOne() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":1}"); } @Test public void testValidQualityTypeIntegerZero() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":0}"); } @Test(expected = ValidationException.class) public void testInvalidQualityTypeArray() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":[]}"); } @Test(expected = ValidationException.class) public void testInvalidQualityTypeBoolean() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":true}"); } @Test(expected = ValidationException.class) public void testInvalidQualityTypeInteger() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":10}"); } @Test(expected = ValidationException.class) public void testInvalidQualityTypeFloatNegative() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":-1.0}"); } @Test(expected = ValidationException.class) public void testInvalidQualityTypeObject() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":{}}"); } @Test(expected = ValidationException.class) public void testInvalidQualityValueTooHigh() throws Exception { new IndexField("index_name", "index_field_name", "{\"attribute\":\"foo\",\"quality\":100.0}"); } }
java
<filename>back_end/models/admin.go package models import "time" //Admin 管理员 type Admin struct { ID int64 `db:"id" json:"id"` Username string `db:"username" json:"username"` Password string `db:"password" json:"password"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
go
I was introduced to Charlie Chaplin at a very young age. My father took me to a local store at Christmastime that sold VHS tapes and purchased a set of Chaplin films. The Kid, The Circus, Limelight, The Gold Rush, The Great Dictator, Modern Times, so many of them. When I asked my father why he was buying all of them at once, he said 'Need to fill up your Christmas stocking.' Modern Times was one of my favourite films out of the lot, which I would play several times on the VHS player. I remember bursting into laughter at all the slapstick gags. Technology evolved. VHS almost became obsolete and life took over. A few years later, my father brought home a collection of 250 DVDs. To my pleasant surprise, the collection that boasted of titles like Children of Heaven, Bicycle Thieves, and so on, also had most of my favourite Chaplin films too! It was during this time, I rediscovered the genius of Chaplin and Modern Times. It is almost a silent film yet it makes so many statements. The gags that made me laugh out loud in my childhood amazed me once again: this time, through their wit. Layer after layer, with each viewing of the film, I noticed a different nuance. An initial title in the film reads, 'Humanity crusading in the pursuit of happiness'. One of the most striking images of the film is seen at the very beginning: one sees a herd of sheep crossing the frame, which is intercut with a herd of men walking out of a subway. The juxtaposition is a hallmark of a very evolved storyteller. The visual language of the film is outstanding. That one sequence where Chaplin gets trapped inside a huge machine as he rolls over from one part to another is simply breathtaking. Remember Modern Times was released in 1936. Such marvellous imagery was conceived and shot in those days. Modern Times is the story of a factory production line worker, played by Chaplin himself, who will never be able to access what he makes. In one of the opening sequences of the film, we see the President of the company seated in his sprawling cabin killing time by playing a board game as the less fortunate workers grind themselves to achieve the target of the factory. In another scene, a group of men proudly walk in to present to the President a feeding machine that can feed the staff hands-free so they can work even during the lunch time. And in that way the company can stay ahead of their competitors. The scene where the machine misfires is pure genius. And Chaplin the actor too nails it with his innocent yet charming performance. In one more scene, Chaplin is holding a flag in his hand as he waves to the truck driving past. The flag had accidentally fallen off the same truck. The Police identify him as a communist leader and take him to task. Don't we live in such (or even worse) Modern Times even today? Visually and philosophically the film is filled with such poignant ironies that make you marvel at the sheer genius of Sir Charlie Chaplin, who so effortlessly made statements through visuals and sugar-coated them with his trademark slapstick humour. Much to my surprise none of the major OTT platforms seem to be streaming Chaplin movies. However, Modern Times is easily accessible on YouTube.
english
<gh_stars>0 export const PRODUCTS_PER_PAGE = 24; export const PRODUCT_SELECTOR = 'product'; const product = num => ` <a href="/?product=${num}" class="${PRODUCT_SELECTOR}" data-product-num="${num}">Product #${num}</a> `; const products = ({ offset = 1, productsCount = PRODUCTS_PER_PAGE } = {}) => Array(productsCount) .fill('') .map((val, ndx) => product((offset - 1) * productsCount + ndx + 1)); export default products;
javascript
<gh_stars>10-100 package ru.croc.ctp.jxfw.reporting.xslfo.renderer.core.common; import org.apache.commons.lang.StringUtils; import java.awt.Color; import java.util.HashMap; import java.util.Map; import java.util.concurrent.locks.ReentrantReadWriteLock; /** * Класс инкапсулирующий обработку аттрибута color в класс Windows.Drawing.Color. * Created by vsavenkov on 28.07.2017. */ public class FoColor { /** * Значение цвета по умолчанию. */ public static Color DEFAULT_COLOR = new Color(0, true); /** * длина полной формы записи цвета в шестнадцатиричном формате - 7 символов. */ private static final int COLOR_HEX_FULL_LEN = 7; /** * длина краткой формы записи цвета в шестнадцатиричном формате - 4 символов. */ private static final int COLOR_HEX_MIN_LEN = 4; /** * длина краткой формы записи цвета в формате RGB - 10 символов. */ private static final int COLOR_RGB_MIN_LEN = 10; /** * Кэш цветов. */ private static final Map<String, Color> COLOR_CACHE = new HashMap<>(); /** * объект для блокировки. */ private static final ReentrantReadWriteLock REENTRANT_LOCK = new ReentrantReadWriteLock(); /** * Проверка на то, что указанный цвет является пустым. * К сожалению, ТОЛЬКО ТАК нужно проверять, ибо в Aspose ухитряются инициировать так, * что сравнение с Color.Empty == false, oColor.isEmpty == false * @param color - Сравниваемый цвет * @return boolean - возвращает true, если цвет пустой и false в противном случае */ public static boolean isEmpty(Color color) { if (color == null) { return true; } return color.getRGB() == 0; } /** * Преобразование строкового значения цвета в системное. * @param colorValue - принимает в качестве параметра значение атрибута color * @return Color - возвращает системное значение цвета */ public static Color parse(String colorValue) { if (StringUtils.isBlank(colorValue)) { return DEFAULT_COLOR; } Color color; // Пытаемся сначала получить значение из кэша REENTRANT_LOCK.readLock().lock(); try { if (COLOR_CACHE.containsKey(colorValue)) { return COLOR_CACHE.get(colorValue); } } finally { REENTRANT_LOCK.readLock().unlock(); } color = getColorFromString(colorValue); if (isEmpty(color)) { return color; } REENTRANT_LOCK.writeLock().lock(); try { COLOR_CACHE.put(colorValue, color); } finally { REENTRANT_LOCK.writeLock().unlock(); } return color; } /** * Метод для получения цвета из строки. * @param color - Цвет, заданный в виде строки * @return Color - возвращает цвет */ private static Color getColorFromString(String color) { if (StringUtils.isEmpty(color) || StringUtils.equalsIgnoreCase(color, "null" )) { return DEFAULT_COLOR; } // основание для шестандцатиричной системы исчислений final int hexRadix = 16; int length = color.length(); //если первый символ '#' - значит цвет представлен в виде #rgb либо #rrggbb if (length > 0 && color.charAt(0) == GlobalData.NUMBER_CHAR) { //цвет представлен в виде #rgb переведем это представление в #rrggbb if (length == COLOR_HEX_MIN_LEN) { // просто дублируем каждую составляющую цвета color = new String( new char[] { GlobalData.NUMBER_CHAR, color.charAt(1), color.charAt(1), color.charAt(2), color.charAt(2), color.charAt(3), color.charAt(3) }); length = COLOR_HEX_FULL_LEN; } //цвет представлен в виде #rrggbb if (length == COLOR_HEX_FULL_LEN) { // получаем красную составляющую int red = Integer.valueOf(color.substring(1, 3), hexRadix); // получаем зеленую составляющую int green = Integer.valueOf(color.substring(3, 5), hexRadix); // получаем синюю составляющую int blue = Integer.valueOf(color.substring(5, 7), hexRadix); // теперь остается только вернуть значение цвета return new Color(red, green, blue); } length = 0; } if (length >= COLOR_RGB_MIN_LEN && color.startsWith(GlobalData.RGB)) { //если значение начинается с "rgb" - значит цвет представлен в виде rgb(0,0,0) или rgb(0%,0%,0%) color = color.substring(4, color.length() - 5); // удаление rgb( и ) String[] rgb = StringUtils.split(color, GlobalData.COMMA_CHAR); if (rgb.length == 3) { // получаем красную составляющую float red = HelpFuncs.isPercentValue(rgb[0]) ? HelpFuncs.getPercentValueAsFloat(rgb[0]) * 255 / 100 : HelpFuncs.getValueFromString(rgb[0]); // получаем зеленую составляющую float green = HelpFuncs.isPercentValue(rgb[1]) ? HelpFuncs.getPercentValueAsFloat(rgb[1]) * 255 / 100 : HelpFuncs.getValueFromString(rgb[1]); // получаем синюю составляющую float blue = HelpFuncs.isPercentValue(rgb[2]) ? HelpFuncs.getPercentValueAsFloat(rgb[2]) * 255 / 100 : HelpFuncs.getValueFromString(rgb[2]); // составляем цвет return new Color((int)red, (int)green, (int)blue); } length = 0; } if (length > 0) { // теперь можно попробовать узнать совпадает ли значение цвета со значениями определенными в системе Color returnValue = Color.decode(color); if (null != returnValue) { return returnValue; } } // если мы добрались до этой строки - значит цвет был неверно задан. return DEFAULT_COLOR; } }
java
"I believe at the moment that if Rafa recovers, it doesn't have to affect him mentally" Nick Kyrgios has landed a high-profile job during the Australian Open, while he has spoken on Rafael Nadal's injury. Rafael Nadal has made his Australian Open withdrawal call in order to spare what could be his final clay swing according to one pundit. Rafael Nadal has hinited that he is focusing on getting back to his best for the clay court season, which gets underway in April. Rafael Nadal’s Australian Open dream is over – is this the end of his glorious career? Nadal has suffered a shattering blow as he confirmed his withdrawal from the Australian Open. Nadal is keeping his fingers crossed he will be able to play in the Australian Open. Rafael Nadal has dropped some hints on the direction his career could take after retirement from playing. Rafael Nadal has provided insight into the physical issue that arose in his loss to Jordan Thompson. A worrying injury issue appeared to surface for Rafael Nadal as he lost a Brisbane International thriller. Toni Nadal has discussed Rafael Nadal's comeback so far and looked ahead to the Australian Open.
english
Reviews = new Mongo.Collection("review"); Meteor.methods({ review: function(id, version, text) { version == null ? "1.0" : version; Reviews.upsert({ contentId: id, ownerId: Meteor.userId(), version: version }, { contentId: id, ownerId: Meteor.userId(), owner: Meteor.user().profile.name, version: version, reviewDate: new Date(), review: text }) } });
javascript
{ "name": "nodeJs-crud", "description": "This app creates crud operations using node, mongo and ejs", "keywords": ["nodejs", "express","ejs","mongodb"] }
json
1. These appeals have an identical point and are therefore disposed of by this common judgment. 2. Challenge in each case is to the final judgment and order dated 29.1.2002 passed by a Division Bench of the Punjab and Haryana High Court. Writ Petitions filed by the appellant in each case were dismissed. Challenge in the Writ Petitions was to the award of solatium at the rate of 30% of the market value and other amounts permissible under Sections 23(1-A) and 28 of the Land Acquisition Act, 1894 (in short the 'Act'). According to the appellant the benefits were not available to the respondents because of the specific provisions of Section 30(1) of the Land Acquisition (Amendment) Act, 1984 (in short the 'Amendment Act'). The High Court relying on some earlier judgments dismissed the writ petitions. 3. Learned counsel for the appellant submitted that in view of the decision of this Court in Union of India and Ors. v. Filip Tiago De Gama of Vedem Vasco De Gama (1990 (1) SCC 277) and Kashiben Bhikabai and Ors. v. Special Land Acquisition Officer and Anr. (2002 (2) SCC 605) no amount was payable as provisions of under Section 23(1-A) are not applicable. Reference is also made to Section 30(1) of the Amendment Act for the purpose which reads as follows: "30.Transitional provisions. - (1) The provisions of subsection (1-A) of Section 23 of the principal Act, as inserted by clause (a) of Section 15 of this Act, shall apply, and shall be deemed to have applied, also to, and in relation to, - (a) every proceeding for the acquisition of any land under the principal Act pending on the 30th day of April, 1982 [the date of introduction of the Land Acquisition (Amendment) Bill, 1982, in the House of the People, in which no award has been made by the Collector before that date; (b) every proceeding for the acquisition of any land under the principal Act commenced after that date, whether or not an award has been made by the Collector .before the date of commencement of this Act. (2) xxx xxx xxx (3) xxx xxx xxx." 4. It is pointed out that since there was no enhancement of compensation in excess of the award of the Collector, the benefits under Section 28 of the Act are also not applicable. Reliance is placed on The State of Punjab and Anr. v. Jagir Singh etc. (JT 1995 (9) SC 1) . 5. Learned counsel for the respondents on the other hand supported the judgment of the High Court. 6. In Filip Tiago's case (supra) it was inter-alia observed at para 21 as follows: "Entitlement of additional amount provided under Section 23(1-A) depends upon pendency of acquisition proceedings as on April 30, 1982 or commencement of acquisition proceedings after that date. Section 30 sub-section (1)(a) provides that additional amount provided under Section 23(1-A) shall be applicable to acquisition proceedings pending before the Collector as on April 30, 1982 in which he has not made the award before that date. If the Collector has made the award before that date then, that additional amount cannot be awarded. Section 30, sub- section (1)(b) provides that Section 23(1-A) shall be applicable to every acquisition proceedings commenced after April 30, 1982 irrespective of the fact whether the Collector has made an award or not before September 24, 1984. The final point to note is that Section 30 sub-section (1) does not refer to court award and the court award is used only in Section 30 sub-section (2)." 7. Similarly, in Kashiben's case (supra) it was observed as follows: "17. Counsel appearing for the claimants contended that the claimants would be entitled to an additional compensation @ 12% as provided under Section 23(1-A) of the Act. This contention cannot be accepted in view of a Bench decision of this Court in Union of India v. Filip Tiago De Gama of Vedem Vasco De Gama which held that additional compensation under Section 23(1-A) of the Act would not be available to a claimant in which the acquisition proceedings commenced and the award was made by the Collector prior to 30-4-1982. If the Collector made the award before 30-4-1982 then the additional amount under Section 23(1-A) cannot be awarded. The pendency of the acquisition proceedings on 30- 4-1982 before the Collector was essential for attracting the benefit under Section 23(1-A) of the Act. It was held: (SCC pp. 286-87, para 21) '21. Entitlement of additional amount provided under Section 23(1-A) depends upon pendency of acquisition proceedings as on 30-4- 1982 or commencement of acquisition proceedings after that date. Section 30 sub-section (1)(a) provides that additional amount provided under Section 23(1-A) shall be applicable to acquisition proceedings pending before the Collector as on 30-4-1982 in which he has not made the award before that date. If the Collector has made the award before that date then, that additional amount cannot be awarded. Section 30 subsection (1)(b) provides that Section 23(1-A) shall be applicable to every acquisition proceedings commenced after 30-4-1982 irrespective of the fact whether the Collector has made an award or not before 24-9-1984. The final point to note is that Section 30 sub-section (1) does not refer to court award and the court award is used only in Section 30 sub-section (2).' No judgment taking a contrary view to the above-referred case was cited before us. Accordingly, it is held that the appellants would not be entitled to the additional compensation provided under Section 23(1-A) of the Act." 8. In Jagir's case (supra) it was observed as follows: "It would thus be seen that the legislative animation is clear that the Civil Court on reference under Section 18, or the High Court or in some States District Judge exercising appellate power under section 54 or civil court under Section 26, as the case may be, awards compensation in excess of the amount awarded by the Collector, then it gets jurisdiction and power to award additional benefits envisaged in sub-section (I-A) of section 23, sub-section (2) of Section 23 and Section 28 of the Act. In other words, enhancement of the compensation in excess of the award of the collector under Section 11 is a condition precedent to exercise the power to award statutory additional amounts envisaged under the aforesaid respective provisions on the excess compensation. If the High Court dismisses the appeal confirming the award of the Collector or that of the civil court, then it has no jurisdiction and power to award additional statutory amount under the respective provisions as amended under the Amendment Act 68 of 1984." 9. From a reading of the orders passed by the Reference Court it is clear that there was no enhancement of the rates as fixed by the Land Acquisition Collector. That being so, benefits under Section 28 of the Act are not available to the respondents. The award was passed on 7.11.1972. The Reference Court decided the case on 18.10.1997. That will not change the position because as noted in Filip Tiago's case (supra) the relevant date is the date of award by the Collector under the Act. The High Court, therefore, is clearly wrong in dismissing the Writ Petition filed by the appellant. The inevitable conclusion is that respondents are not entitled to solatium under Section 23(1-A) of the Act and similarly the benefits under Section 28 of the Act. 10. The appeals are allowed but with no order as to costs.
english
Sometimes when the Moon orbits the Earth, the Moon moves between the Sun and Earth. When this happens, the Moon blocks the light of the Sun from reaching Earth. This causes an eclipse of the Sun, or a solar eclipse. During a solar eclipse, the Moon casts a shadow onto Earth. There are three main types of solar eclipses: Total solar eclipse: - A total solar eclipse is visible from a small area on Earth. - The people who see the total eclipse are in the center of the Moon’s shadow when it hits Earth. - The sky becomes very dark, as if it were night. - For a total eclipse to occur, the Sun, Moon and Earth must be in a direct line. - No sunlight penetrates the umbra, the inner part of the shadow. - To observers on the Earth within the umbra, the disk of the Sun will appear completely covered by that of the Moon. - Such a solar eclipse is said to be total. Because the umbra is narrow at its intersection with the Earth, a total eclipse can be observed only within a very narrow area–the zone of totality. - Furthermore, because of the relative motion of the bodies, the conical shadow moves rapidly over the terrestrial surface; the totality of the solar eclipse thus lasts only a short time (less than eight minutes at any one place on the Earth). Partial solar eclipse: This happens when the Sun, Moon and Earth are not exactly aligned. The Sun appears to have a dark shadow on a small part of its surface. Annular (an-yə-lər) solar eclipse: - An annular eclipse happens when the Moon is farthest from Earth. - Because the Moon is farther away, it seems smaller. - It does not block the entire view of the Sun. - The Moon in front of the Sun looks like a dark disk on top of a larger Sun-colored disk. This creates what looks like a ring around the Moon. During a solar eclipse, the Moon casts two shadows on Earth. - The umbra (əm-brə): This shadow gets smaller as it reaches Earth. It is the dark center of the Moon’s shadow. People standing in the umbra will see a total eclipse. - The penumbra (pə-ˈnəm-brə): The penumbra gets larger as it reaches Earth. People standing in the penumbra will see a partial eclipse. Solar eclipses happen every 18 months somewhere on Earth. Unlike lunar eclipses, solar eclipses last only a few minutes.
english
Hello my dear friends. How are you all? I am well by the grace of almighty ALLAH. Every type of posts should be done in an order or by following some rules. That keeps the beauty of that post preserved. It hasn't been many days our new community has started its journey. And so far, your responce is very much appreciated. At the moment i have noticed some of the members are very much interested in blockchain related games or normal playable games. Just like you all I also love to play and discuss about these type of games. Now a days Blockchain games are getting much more recognition than before. Thats mainly because by playing these games, players are able to earn various crypto tokens by playing such games. They are constantly trading their in-game assets such as different items or skins or other stuff as NFT's and making a good amount of profit. Currently many people are much interested about these topics and they are discussing about how a normal games could do in the Blockchain system. So many normal games has so much untapped potentiel if they were to be added to the blockchain. So, all of you can discuss about these various interesting topics here in Tron Fan Club. All you have to do is follow some simple rules and regulations. All these rules are given below. - In any Blockchain related game post or a normal game review, You have to write 250 words minimum. - You have to include your in-game footage such as Screenshots(4-minimum) and a video footage such as screen recording(not mandatory). - You have to give valid source of the photos you use, give a download link or site link of that Game. Share your knowledge regarding to that specific game and share any interesting ideas about that game being related to the Blockchain. Throughly read the posts of others and share your thoughts in the comments. Comment spamming is strictly prohibited. - If you are reviewing a normal game, make sure to discuss about how that game could perform in the Blockchain system or most importantly how can it perform in the Tron blockchain and how can players be benifitted from it. Mainly discussion about Tron is a must. Be respectful towards others. Do not criticize others for any reasons what so ever. You have to post in TRON FAN CLUB and you must have to use the tag :tronfanclub and a country tag in your post. - Lastly, Share your post on Twitter and give twitter link in the comment section. Hope everyone will follow these rules and post and share knowledge about various interesting games so that non gamers might also feel interested about gaming. That's all for today. We are waiting for your unique and interesting publications. With regards,
english
{ "id": 116955, "info": { "name": "Sidebar Filly", "description": "Adds a My Little Pony filly to the sidebar of Reddit.", "additionalInfo": "Requested by /u/zibbels", "format": "uso", "category": "reddit", "createdAt": "2015-07-27T01:21:08.000Z", "updatedAt": "2016-05-25T04:29:38.000Z", "license": "NO-REDISTRIBUTION", "author": { "id": 295991, "name": "/u/UltraMew", "homepage": "https://www.reddit.com/u/UltraMew" } }, "stats": { "installs": { "total": 56, "weekly": 0 } }, "screenshots": { "main": { "name": "116955_after.png", "archived": false } }, "discussions": { "stats": { "discussionsCount": 0, "commentsCount": 0 }, "data": [] }, "style": { "css": "@-moz-document domain(\"www.reddit.com\") {\r\n/*Sidebar Filly Start*/\r\n\r\n/*Random based on first link on page*/\r\ndiv.thing.link:first-child:after {\r\n position: fixed;\r\n top: 240px;\r\n right: 10px;\r\n z-index: 998;\r\n width: 70px;\r\n height: 70px;\r\n border: 0;\r\n content: \"\";\r\n background:url(http://a.thumbs.redditmedia.com/tC7-NUJ-_PdpOrTvJfFxsOIY-bxgJtv_EbcgIzsf0G0.png)\r\n}\r\n\r\ndiv.thing.link:first-child[data-fullname$=\"0\"]:after{background-position: 0 0}\r\ndiv.thing.link:first-child[data-fullname$=\"1\"]:after{background-position: 0 -100%}\r\ndiv.thing.link:first-child[data-fullname$=\"2\"]:after{background-position: 0 -200%}\r\ndiv.thing.link:first-child[data-fullname$=\"3\"]:after{background-position: 0 -300%}\r\ndiv.thing.link:first-child[data-fullname$=\"4\"]:after{background-position: 0 -400%}\r\ndiv.thing.link:first-child[data-fullname$=\"5\"]:after{background-position: 0 -500%}\r\ndiv.thing.link:first-child[data-fullname$=\"6\"]:after{background-position: 0 -600%}\r\ndiv.thing.link:first-child[data-fullname$=\"7\"]:after{background-position: 0 -700%}\r\ndiv.thing.link:first-child[data-fullname$=\"8\"]:after{background-position: 0 -800%}\r\ndiv.thing.link:first-child[data-fullname$=\"9\"]:after{background-position: 0 -900%}\r\ndiv.thing.link:first-child[data-fullname$=\"a\"]:after{background-position: 0 -1000%}\r\ndiv.thing.link:first-child[data-fullname$=\"b\"]:after{background-position: 0 -1100%}\r\ndiv.thing.link:first-child[data-fullname$=\"c\"]:after{background-position: -100% 0}\r\ndiv.thing.link:first-child[data-fullname$=\"d\"]:after{background-position: -100% -100%}\r\ndiv.thing.link:first-child[data-fullname$=\"e\"]:after{background-position: -100% -200%}\r\ndiv.thing.link:first-child[data-fullname$=\"f\"]:after{background-position: -100% -300%}\r\ndiv.thing.link:first-child[data-fullname$=\"g\"]:after{background-position: -100% -400%}\r\ndiv.thing.link:first-child[data-fullname$=\"h\"]:after{background-position: -100% -500%}\r\ndiv.thing.link:first-child[data-fullname$=\"i\"]:after{background-position: -100% -600%}\r\ndiv.thing.link:first-child[data-fullname$=\"j\"]:after{background-position: -100% -700%}\r\ndiv.thing.link:first-child[data-fullname$=\"k\"]:after{background-position: -100% -800%}\r\ndiv.thing.link:first-child[data-fullname$=\"l\"]:after{background-position: -100% -900%}\r\ndiv.thing.link:first-child[data-fullname$=\"m\"]:after{background-position: -100% -1000%}\r\ndiv.thing.link:first-child[data-fullname$=\"n\"]:after{background-position: -100% -1100%}\r\ndiv.thing.link:first-child[data-fullname$=\"o\"]:after{background-position: -200% 0}\r\ndiv.thing.link:first-child[data-fullname$=\"p\"]:after{background-position: -200% -100%}\r\ndiv.thing.link:first-child[data-fullname$=\"q\"]:after{background-position: -200% -200%}\r\ndiv.thing.link:first-child[data-fullname$=\"r\"]:after{background-position: -200% -300%}\r\ndiv.thing.link:first-child[data-fullname$=\"s\"]:after{background-position: -200% -400%}\r\ndiv.thing.link:first-child[data-fullname$=\"t\"]:after{background-position: -200% -500%}\r\ndiv.thing.link:first-child[data-fullname$=\"u\"]:after{background-position: -200% -600%}\r\ndiv.thing.link:first-child[data-fullname$=\"v\"]:after{background-position: -200% -700%}\r\ndiv.thing.link:first-child[data-fullname$=\"w\"]:after{background-position: -200% -800%}\r\ndiv.thing.link:first-child[data-fullname$=\"x\"]:after{background-position: -200% -900%}\r\ndiv.thing.link:first-child[data-fullname$=\"y\"]:after{background-position: -200% -1000%}\r\ndiv.thing.link:first-child[data-fullname$=\"z\"]:after{background-position: -200% -1100%}\r\n\r\n.side a[href=\"https://www.reddit.com/r/MLPLounge/new/\"]\r\n{\r\n display:block;\r\n width:70px;\r\n height:70px;\r\n position:fixed; \r\n top: 240px;\r\n right: 10px;\r\n z-index:999\r\n}\r\n\r\n#RESHoverContainer {\r\nvisibility: hidden;\r\n}\r\n\r\n/*Sidebar Filly end*/\r\n\r\n}" } }
json
<reponame>AppleNetwork/tokens-info<gh_stars>10-100 { "asset":"ZEBI-84F", "assetMap":"ZEBI", "officialSiteUrl":"https://zebi.io/", "contactEmail":"<EMAIL>", "display":true, "contact":{ "Telegram":"https://t.me/ZebiData", "LinkedIn":"https://www.linkedin.com/company/zebidata", "Reddit":"https://www.reddit.com/r/Zebidataindia/", "Medium":"https://medium.com/@Zebidata", "Youtube":"https://www.youtube.com/channel/UCrEFyjIGGznac_8nj9uhu2Q", "Twitter":"https://twitter.com/ZebidataIndia", "Facebook":"https://www.facebook.com/ZebidataIndia/", "Github":"https://github.com/zebidata" } }
json
{"key": "/books/OL17010061M", "title": "Dictionary of British women's organisations, 1825-1960", "subtitle": null, "publishers": ["Woburn Press"], "authors": ["<NAME>"], "isbn_10": "0713002239", "isbn_13": null, "publish_date": "2001", "subjects": ["Women -- Great Britain -- Societies and clubs -- Dictionaries"]}
json
The bottle label carries the image of "Tank Man" with the description "Never forget, never give up". In contrast to other social movements and memes on the Chinese internet, #996 has taken shape largely on GitHub. Social media influencers are trying to draw attention to the struggle of leaders in rural areas to those in connected urban spaces. "The purpose of publishing under the name Balkanist in Russian is to confuse readers at home, in Russia and elsewhere into questioning our sincerity, what and who we support. " "By drawing different body types and different hair textures, I want people to learn how everything is beautiful. " Spyware makers exploit a security flaw in WhatsApp, Singapore bans false information and Somalia plans to shut down social media during school exams. From São Paulo to the Amazon, thousands of Brazilians went out on May 15 to defend public education. "[The ad] generates the image of a woman wishing for her body to be eaten like tofu. " Two people were arrested on May 14 and 15, for comments they had posted on Facebook. The arrests have sparked indignation and concern on social media in Bangladesh. Rather than protecting individuals’ rights, exceptions to the GDPR in some countries are limiting freedom of expression, eroding privacy, and abetting the spread of disinformation. On her quest for good governance, Stella Nyanza is "unflinching in her criticism of the Ugandan government" and unafraid to tackle taboos around sex, gender and LGBT rights. StalinGulag’s posts are usually acerbic, profanity-laden critiques of Russia's political system, generating thousands of likes and retweets. Ugandan musician and MP Bobi Wine's new song "Afande" critiques police brutality with a message of love and unity. "Why beat me? There is no difference between me and you! " Food, water and electricity are increasingly scarce, as is access to communication networks. Social media companies are censoring images of war. The Syrian Archive is working to preserve them.
english
The most recent movies for Gayathri Iyer were Raid and Jaggu Dada. Daya and were Gayathri Iyer's upcoming films. Gayathri Iyer's next feature film with A.V.Puneeth and .
english
1 The word of the Lord which came to Hosea, the son of Beeri, in the days of Uzziah, Jotham, Ahaz, and Hezekiah, kings of Judah, and in the days of Jeroboam, the son of Joash, king of Israel. 2 The start of the word of the Lord by Hosea: And the Lord said to Hosea, Go, take for yourself a wife of loose ways, and children of the same, for the land has been untrue to the Lord. 3 So he took as his wife Gomer, the daughter of Diblaim, and she gave birth to a son. 4 And the Lord said to him, Give him the name of Jezreel, for after a little time I will send punishment for the blood of Jezreel on the line of Jehu, and put an end to the kingdom of Israel. 5 And in that day I will let the bow of Israel be broken in the valley of Jezreel. 6 And after that she gave birth to a daughter. And the Lord said, Give her the name Lo-ruhamah; for I will not again have mercy on Israel, to give them forgiveness. 7 But I will have mercy on Judah and will give them salvation by the Lord their God, but not by the bow or the sword or by fighting or by horses or horsemen. 8 Now when Lo-ruhamah had been taken from the breast, the woman gave birth to a son. 9 And the Lord said, Give him the name Lo-ammi; for you are not my people, and I will not be your God. 10 But still the number of the children of Israel will be like the sand of the sea, which may not be measured or numbered; and in place of its being said to them, You are not my people, it will be said to them, You are the sons of the living God 11 And the children of Israel and the children of Judah will come together and take for themselves one head, and will go up from the land, for great will be the day of Jezreel.
english
{ "name": "Broadlink Hub", "version": "1", "slug": "broadlink-hub-hassio-addon", "description": "Controller addon for Broadlink remote controlled switches", "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], "startup": "before", "boot": "auto", "options": { "name": "Home", "user": "broadlink", "password": "<PASSWORD>", "password_hash": <PASSWORD>, "device_ips": [], "device_ip_ranges": [], "device_timeout": 500, "update_interval": 5000, "power_set_timeout": 10000, "unreachable_grace_time": 10000, "debug": false }, "schema": { "name": "str", "user": "str", "password": "password", "password_hash": "<PASSWORD>?", "device_ips": ["str"], "device_ip_ranges": ["str"], "device_timeout": "int?", "update_interval": "int?", "power_set_timeout": "int?", "unreachable_grace_time": "int?", "debug": "bool?" }, "ports": { "8525/tcp": null } }
json
Miss World 2013 Megan Young would have least expected a sudden kiss from a Congressman at an official commending ceremony last year and the scandal that it evoked just won't die down. The Senate in Philippines reportedly passed a Resolution last year commending Young for winning the Miss World 2013 title and conferred her with a Congressional Medal of Distinction for being the first Filipino to be crowned Miss World at the House of Representatives there. The Resolution was reportedly authored by 77-year-old House leaders Speaker Sonny Belmonte, who surprised the beauty queen by planting a kiss on her neck while handing her the honour. The photo reportedly went viral and critics worldwide are still reacting to it. Some have even gone to the extent of calling Belmonte an "animal", "lecherous", "a dirty old man" and a "filty grub". Young, reportedly, hasn't spoken on this yet.
english
{ "name": "outsourcing-starter", "version": "0.0.1", "description": "start a outsourcing project rapidly for a living", "main": "build/index.html", "devDependencies": { "babel-preset-es2015-rollup": "^1.2.0", "browser-sync": "~2.18.2", "chokidar": "~1.6.1", "eslint": "~3.10.2", "husky": "~0.11.9", "mkdirp": "~0.5.1", "node-sass": "~3.13.0", "node-sass-glob": "~1.0.4", "npm-run-all": "^3.1.1", "rollup": "^0.36.3", "rollup-plugin-babel": "^2.6.1", "rollup-plugin-commonjs": "~5.0.5", "rollup-plugin-node-resolve": "~2.0.0", "rollup-watch": "^2.5.0", "sass-lint": "~1.10.2" }, "scripts": { "precommit": "eslint -c .eslintrc.json --rule 'no-console: 2' src/scripts && scss-lint -c .scss-lint.yml", "build": "rollup -c", "dev": "rollup -c --watch", "serve": "rm -rf build/assets/{js,css} && npm-run-all --parallel sass dev webserver", "test": "echo \"Error: no test specified\" && exit 1", "webserver": "browser-sync start --server --files \"build/**/*\" --serveStatic \"build\"", "sass": "node sass-watch" }, "repository": { "type": "git", "url": "git+https://github.com/jkiimm/outsourcing-starter.git" }, "author": "<NAME>", "license": "MIT", "bugs": { "url": "https://github.com/jkiimm/outsourcing-starter/issues" }, "homepage": "https://github.com/jkiimm/outsourcing-starter#readme" }
json
Kochi: Veteran actor Captain Raju passed away at his residence in Kochi this morning. He was sixty eight. Captain Raju has acted in more than 500 films including Telugu,Tamil,Kannada,Hindi and English. He has directed two Malayalam movies too. Debut movie being Raktham,he has made his own mark in movies like Rathilayam,August onnu,Nadodikkattu,Avanazhi,Kabooliwala,C I D Moosa, Pazhassi Raja and Mumbai Police. Captain Raju also directed two films- Itha oru snehagadha and Mr. Pavanayi 99. 99. Born on 27th June 1950, as seventh son of K G Daniel and Annamma, he did his schooling at Omallur U P School and N S S English Medium School. He took his degree in Zoology from Pathanamthitta Catholicate College and joined in army as Commissioned Officer at the age of 21. After retiring from the army,Captain Raju worked in ‘Lakshmi Starch’ in Mumbai. It was at that time that he got associated with amature drama troupes including Prathibha Theatres. Captain Raju suffered brain hemorrhage in July and was under treatment. Wife Prameela and son Raviraj. Captain Raju’s cremation will take place at his native place at Omallur, Pathanamthitta.
english
{"remainingRequest":"C:\\Users\\codemao\\Desktop\\workspace\\o2mation.github.io\\node_modules\\babel-loader\\lib\\index.js??ref--3-1!C:\\Users\\codemao\\Desktop\\workspace\\o2mation.github.io\\node_modules\\vuepress\\lib\\app\\util.js","dependencies":[{"path":"C:\\Users\\codemao\\Desktop\\workspace\\o2mation.github.io\\node_modules\\vuepress\\lib\\app\\util.js","mtime":499162500000},{"path":"C:\\Users\\codemao\\Desktop\\workspace\\o2mation.github.io\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\codemao\\Desktop\\workspace\\o2mation.github.io\\node_modules\\babel-loader\\lib\\index.js","mtime":1526583314000}],"contextDependencies":[],"result":["import _toConsumableArray from \"C:\\\\Users\\\\codemao\\\\Desktop\\\\workspace\\\\o2mation.github.io\\\\node_modules\\\\@babel\\\\runtime/helpers/builtin/es6/toConsumableArray\";\nexport function injectMixins(options, mixins) {\n var _options$mixins;\n\n if (!options.mixins) {\n options.mixins = [];\n }\n\n (_options$mixins = options.mixins).push.apply(_options$mixins, _toConsumableArray(mixins));\n}\nexport function findPageForPath(pages, path) {\n for (var i = 0; i < pages.length; i++) {\n var page = pages[i];\n\n if (page.path === path) {\n return page;\n }\n }\n\n return {\n path: '',\n frontmatter: {}\n };\n}",{"version":3,"sources":["node_modules\\vuepress\\lib\\app\\util.js"],"names":["injectMixins","options","mixins","push","findPageForPath","pages","path","i","length","page","frontmatter"],"mappings":";AAAA,OAAO,SAASA,YAAT,CAAuBC,OAAvB,EAAgCC,MAAhC,EAAwC;AAAA;;AAC7C,MAAI,CAACD,QAAQC,MAAb,EAAqB;AACnBD,YAAQC,MAAR,GAAiB,EAAjB;AACD;;AACD,6BAAQA,MAAR,EAAeC,IAAf,2CAAuBD,MAAvB;AACD;AAED,OAAO,SAASE,eAAT,CAA0BC,KAA1B,EAAiCC,IAAjC,EAAuC;AAC5C,OAAK,IAAIC,IAAI,CAAb,EAAgBA,IAAIF,MAAMG,MAA1B,EAAkCD,GAAlC,EAAuC;AACrC,QAAME,OAAOJ,MAAME,CAAN,CAAb;;AACA,QAAIE,KAAKH,IAAL,KAAcA,IAAlB,EAAwB;AACtB,aAAOG,IAAP;AACD;AACF;;AACD,SAAO;AACLH,UAAM,EADD;AAELI,iBAAa;AAFR,GAAP;AAID","sourceRoot":"C:\\Users\\codemao\\Desktop\\workspace\\o2mation.github.io","sourcesContent":["export function injectMixins (options, mixins) {\n if (!options.mixins) {\n options.mixins = []\n }\n options.mixins.push(...mixins)\n}\n\nexport function findPageForPath (pages, path) {\n for (let i = 0; i < pages.length; i++) {\n const page = pages[i]\n if (page.path === path) {\n return page\n }\n }\n return {\n path: '',\n frontmatter: {}\n }\n}\n"]}]}
json
<gh_stars>0 export * from './adapter' export * from './app'
typescript
{"em":[{"location":{"latitude":52.36,"longitude":6.67}},{"location":{"latitude":52.94,"longitude":7.12}},{"location":{"latitude":52.26,"longitude":5.06}},{"location":{"latitude":51.03,"longitude":5.81}},{"location":{"latitude":51.49,"longitude":5.43}},{"location":{"latitude":51.7,"longitude":5.56}}],"bites":[{"location":{"latitude":52.31,"longitude":5.76}},{"location":{"latitude":52.25,"longitude":6.9}},{"location":{"latitude":51.75,"longitude":5.96}},{"location":{"latitude":52.36,"longitude":4.93}},{"location":{"latitude":53.18,"longitude":6.54}},{"location":{"latitude":52.04,"longitude":5.55}},{"location":{"latitude":46.56,"longitude":2.48}},{"location":{"latitude":52.45,"longitude":4.58}},{"location":{"latitude":52.34,"longitude":4.94}},{"location":{"latitude":51.82,"longitude":5.89}},{"location":{"latitude":52.89,"longitude":6.98}},{"location":{"latitude":52.42,"longitude":6.46}},{"location":{"latitude":52.2,"longitude":6.52}},{"location":{"latitude":52.27,"longitude":5.62}},{"location":{"latitude":52.09,"longitude":6.05}},{"location":{"latitude":51.7,"longitude":3.74}},{"location":{"latitude":52.08,"longitude":5.31}},{"location":{"latitude":51.48,"longitude":3.64}}],"other":[],"fever":[]}
json
{ "private": true, "sideEffects": false, "main": "./Thumbsdown.js", "module": "./Thumbsdown.esm.js", "types": "./Thumbsdown.d.ts" }
json
<reponame>mujib2953/WikiScrapper {"name":"<NAME>","desc":"Vinyl acetate is an organic compound with the formula CH3CO2CHCH2. A colorless liquid with a pungent odor, it is the precursor to polyvinyl acetate, an important polymer in industry. Unlike many other acetate esters, the odor of vinyl acetate is thoroughly disagreeable and is not used to any substantial degree as an odorant.","images":[{"alt":"Skeletal formula","src":"//upload.wikimedia.org/wikipedia/commons/thumb/8/87/Vinyl_acetate.png/150px-Vinyl_acetate.png"},{"alt":"Ball-and-stick model","src":"//upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Vinyl-acetate-3D-balls.png/170px-Vinyl-acetate-3D-balls.png"},{"alt":"","src":"//upload.wikimedia.org/wikipedia/commons/thumb/a/a2/X_mark.svg/7px-X_mark.svg.png"}],"link":"/wiki/Vinyl_acetate","Preferred IUPAC name":"Ethenyl acetate\nEthenyl acetate","Systematic IUPAC name":"Ethenyl ethanoate\nEthenyl ethanoate","Other names":"Acetic acid vinyl ester, vinyl ethanoate, acetoxyethene, VyAc, VAM, zeset T, VAM vinyl acetate monomer, acetic acid ethenyl ester, 1-acetoxyethylene","CAS Number":"108-05-4 Y","3D model (JSmol)":"Interactive image","ChEBI":"CHEBI:46916 N","ChemSpider":"7616 N","ECHA InfoCard":"100.003.224","EC Number":"203-545-4","KEGG":"C19309 Y","MeSH":"C011566","PubChem CID":"7904","UNII":"L9MK238N77 N","Chemical formula":"C<sub>4</sub>H<sub>6</sub>O<sub>2</sub>","Molar mass":"86.09 g/mol","Appearance":"Colorless liquid","Density":"0.934 g/cm<sup>3</sup>","Melting point":"−93.5 °C (−136.3 °F; 179.7 K)","Boiling point":"72.7 °C (162.9 °F; 345.8 K)","Magnetic susceptibility (χ)":"-46.4·10−6 cm3/mol","Safety data sheet":"ICSC 0347","R-phrases (outdated)":"R11","S-phrases (outdated)":"S16, S23, S29, S33","NFPA 704":"3\n2\n2","Flash point":"−8 °C (18 °F; 265 K)","Autoignition\ntemperature":"427 °C (801 °F; 700 K)","Explosive limits":"2.6–13.40%","NIOSH":"","PEL (Permissible)":"none[1]","standard state":"Except where otherwise noted, data are given for materials in their standard state (at 25 °C [77 °F], 100 kPa).\nExcept where otherwise noted, data are given for materials in their standard state (at 25 °C [77 °F], 100 kPa)."}
json
A farmer in Maharashtra turned millionaire in just one month as the prices of tomatoes soared across the country. Crops have been ruined in many areas owing to rains, driving up the price of various commodities, including tomatoes. But Tukaram Bhagoji Gaikar benefited greatly from it. In just one month, he made Rs 1. 5 crore selling 13,000 cartons of tomatoes. The farmer, 63-year-old Rajendra Chavan who resides in Barshi tehsil of Solapur, said his onion yield fetched a price of Rs 1 per kg at the Solapur market yard and after all the deductions he received this paltry sum as his net profit last week. A farmer from Nashik (Maharashtra) has donated wheat that he harvested from one of his three acres of land to people who are suffering due to the 21-day lockdown in the country. The oath was administered to BJP leader Devendra Fadnavis by Governor Bhagat Singh Koshyari at Raj Bhavan. Ajit Pawar said he took the decision to solve the problems of farmers. Even as thousands of desperate farmers commit suicide in India yearly, those who do not complete the bid face an added harassment - a police case for trying, but failing to die.
english
Action for Children, 2016 was also released followed by addresses by Smt. medalist at Rio Paralympics 2016), Ms Avani Chaturvedi (Women Fighter Pilot), (former street girl and advisor of Balaknama newspaper, for and by street children). the mother who can help girls become ‘arrows into the future’. Secretary WCD, Ms. Cuddalore (Tamil Nadu) ) (Jammu & Kashmir) Sikkim (Sikkim) (PCPNDT Act) Gwalior (Madhya Pradesh) Yamuna Nagar (Haryana) Broadcasting, Government of India.
english
<filename>athera/api/compute.py<gh_stars>0 import requests from athera.api.common import headers, api_debug route_jobs = "/compute/jobs" route_job = "/compute/jobs/{job_id}" route_job_stop = "/compute/jobs/{job_id}/stop" route_parts = "/compute/jobs/{job_id}/parts" route_part = "/compute/jobs/{job_id}/parts/{part_id}" def make_job_request(user_id, group_id, app_id, file_path, name, frame_start, frame_finish, frame_increment, region, arguments, part_count=1, node_count=1): return { "computeData" : { "userID": user_id, "groupID": group_id, "appID": app_id, "filePath": file_path, "name": name, "frameRange": { "start": frame_start, "finish": frame_finish, "increment": frame_increment, }, "region": region, "arguments": arguments, }, "partCount": part_count, "nodeCount": node_count, } @api_debug def get_jobs(base_url, group_id, token): """ Get all Compute Jobs for the provided Group Response: [403 Forbidden] Incorrect or inaccessible group_id """ url = base_url + route_jobs response = requests.get(url, headers=headers(group_id, token)) return response @api_debug def get_job(base_url, group_id, token, job_id): """ Get a single Compute Job, which must belong to the provided Group Response: [403 Forbidden] Incorrect or inaccessible group_id Response: [404 Not Found] Incorrect job_id """ url = base_url + route_job.format(job_id=job_id) response = requests.get(url, headers=headers(group_id, token)) return response @api_debug def create_job(base_url, group_id, token, payload): """ Start a compute Job with the provided payload description Response: [403 Forbidden] Incorrect or inaccessible group_id Response: [400 Bad Request] Malformed payload """ url = base_url + route_jobs response = requests.post(url, headers=headers(group_id, token), json=payload) return response @api_debug def stop_job(base_url, group_id, token, job_id): """ Stop a job in the ACTIVE/READY state Response: [403 Forbidden] Incorrect or inaccessible group_id Response: [404 Not Found] Incorrect job_id """ url = base_url + route_job_stop.format(job_id=job_id) response = requests.post(url, headers=headers(group_id, token)) return response @api_debug def get_parts(base_url, group_id, token, job_id): """ Get all Compute Parts for the provided Job, which must belong to the provided Group Response: [403 Forbidden] Incorrect or inaccessible group_id Response: [404 Not Found] Incorrect job_id """ url = base_url + route_parts.format(job_id=job_id) response = requests.get(url, headers=headers(group_id, token)) return response @api_debug def get_part(base_url, group_id, token, job_id, part_id): """ Get a single Compute Part for the provided Job, which must belong to the provided Group Response: [403 Forbidden] Incorrect or inaccessible group_id Response: [404 Not Found] Incorrect job_id """ url = base_url + route_part.format(job_id=job_id, part_id=part_id) response = requests.get(url, headers=headers(group_id, token)) return response
python
package packets.incoming.pets; import packets.Packet; import packets.reader.BufferReader; /** * Received to give the player information about a newly hatched pet */ public class HatchPetMessage extends Packet { /** * The name of the hatched pet */ public String petName; /** * The skin id of the hatched pet */ public int petSkin; /** * The object type of the pet */ public int petType; @Override public void deserialize(BufferReader buffer) throws Exception { petName = buffer.readString(); petSkin = buffer.readInt(); petType = buffer.readInt(); } }
java
<reponame>gperouffe/pokemontrio /*--------------------------------------------------------- * Filename : trio.css * Author : <NAME> * Last Modified : Nov 23, 2016 * * Description : * Style sheet for Pokémon Trio Webpage * *---------------------------------------------------------*/ /* Roll animation */ @-webkit-keyframes roll { 37% { transform: rotate(0deg); } 40% { transform: rotate(1deg); } 44% { transform: rotate(-2deg); } 47% { transform: rotate(1deg); } } @-moz-keyframes roll { 37% { transform: rotate(0deg); } 40% { transform: rotate(5deg); } 44% { transform: rotate(-7deg); } 47% { transform: rotate(2deg); } } @-o-keyframes roll { 37% { transform: rotate(0deg); } 40% { transform: rotate(5deg); } 44% { transform: rotate(-7deg); } 47% { transform: rotate(2deg); } } @keyframes roll { 37% { transform: rotate(0deg); } 40% { transform: rotate(5deg); } 44% { transform: rotate(-7deg); } 47% { transform: rotate(2deg); } } /* Breath animation */ @-webkit-keyframes breath { 0% { transform: scale(1.4); } 40% { transform: scale(1.5); } 100% { transform: scale(1.4); } } @-moz-keyframes breath { 0% { transform: scale(1.4); } 40% { transform: scale(1.5); } 100% { transform: scale(1.4); } } @-o-keyframes breath { 0% { transform: scale(1.4); } 40% { transform: scale(1.5); } 100% { transform: scale(1.4); } } @keyframes breath { 0% { transform: scale(1.4); } 40% { transform: scale(1.5); } 100% { transform: scale(1.4); } } .breath { animation: breath 2s ease infinite; } .roll { transform-origin: bottom; animation: roll 10s ease infinite; } .pkmnBlock { vertical-align:top; display: inline-block; width:100px; height:110px; transition: all 1s ease; }
css
<gh_stars>100-1000 { "id": 83838, "name": "MightyGodKing - Blacken and Enlarge", "description": "Takes the lighter gray, small text of MightyGodKing.com's posts and makes it black and 20% larger.", "user": { "id": 2444, "name": "WCityMike", "email": "redacted", "paypal_email": null, "homepage": null, "about": null, "license": "ccbyncsa" }, "updated": "2013-03-02T10:50:20.000Z", "weekly_install_count": 0, "total_install_count": 64, "rating": null, "after_screenshot_name": "https://userstyles.org/auto_style_screenshots/83838-after.png?r=1589875710", "obsoleting_style_id": null, "obsoleting_style_name": null, "obsolete": 0, "admin_delete_reason_id": null, "obsoletion_message": null, "screenshots": null, "license": null, "created": "2013-03-02T10:50:20.000Z", "category": "site", "raw_subcategory": "mightygodking", "subcategory": "mightygodking", "additional_info": null, "style_tags": [], "css": "@namespace url(http://www.w3.org/1999/xhtml);\r\n\r\n@-moz-document domain(\"mightygodking.com\") {\r\n.post_content\r\n{\r\ncolor: black !important;\r\nfont-size: 120% !important;\r\n}\r\n}", "discussions": [], "discussionsCount": 0, "commentsCount": 0, "userjs_url": "/styles/userjs/83838/mightygodking-blacken-and-enlarge.user.js", "style_settings": [] }
json
package com.javarush.task.task09.task0911; import java.sql.SQLOutput; import java.util.HashMap; /* Исключение при работе с коллекциями Map */ public class Solution { public static void main(String[] args) throws Exception { //напишите тут ваш код try { HashMap<String, String> map = new HashMap<String, String>(null); map.put(null, null); map.remove(null); } catch (NullPointerException e) { System.out.println(e); } //напишите тут ваш код } }
java
version https://git-lfs.github.com/spec/v1 oid sha256:97d6c07d369578b827f790c9f502a8fb627dad19af3cb4918b424668152b5c50 size 8546
html
<filename>bank_class.py class Customer(object): """A customer of the ABC bank with an account. Every customer has a name and a balance.""" def __init__(self, name, balance=0.0): self.name = name self.balance = balance def withdraw(self, amount): if amount > self.balance: raise RuntimeError("Amount greater than current balance.") self.balance -= amount return self.balance def deposit(self, amount): self.balance += amount return self.balance me = Customer("Peter") me.deposit(3000) print me.balance print "Withdraw some cash." me.withdraw(1234) print me.balance print "Withdraw some more?" me.withdraw(9999)
python
<reponame>DhouhaOun/test<filename>client/my-feeds.json [ { "title": "Orientation News", "url": "http://digitalcommons.law.ggu.edu/orientation/recent.rss", "count": 5 } ]
json
<filename>package.json<gh_stars>0 { "name": "cordova-plugin-solaari-ble", "version": "1.2.1", "description": "Cordova BLE plugin for Solaari Mobile Application", "cordova": { "id": "cordova-plugin-solaari-ble", "platforms": [ "android", "ios" ] }, "repository": { "type": "git", "url": "git+https://github.com/LDLCLid3/cordova-plugin-solaari-ble.git" }, "keywords": [ "ecosystem:cordova", "cordova-android", "cordova-ios" ], "author": "<NAME>, <NAME>", "license": "MIT", "bugs": { "url": "https://github.com/LDLCLid3/cordova-plugin-solaari-ble/issues" }, "homepage": "https://github.com/LDLCLid3/cordova-plugin-solaari-ble#readme" }
json
<gh_stars>0 {"success":true,"code":"SUCCESS","data":{"hoverData":{"serchhip district":{"registeredUsers":1512,"appOpens":24464},"aizawl district":{"registeredUsers":18992,"appOpens":240545},"lunglei district":{"registeredUsers":4197,"appOpens":61478},"mamit district":{"registeredUsers":1655,"appOpens":30424},"lawngtlai district":{"registeredUsers":2647,"appOpens":34294},"kolasib district":{"registeredUsers":2497,"appOpens":35460},"champhai district":{"registeredUsers":1733,"appOpens":16362},"saiha district":{"registeredUsers":901,"appOpens":14807}}},"responseTimestamp":1630502911773}
json
Gold price up again, crosses Rs235,000-mark. According to the All Pakistan Sarafa Gems and Jewellers Association (APSGJA), the rate of gold (24 carats) rose by Rs2,700 per tola and Rs2,315 per 10 grams to reach Rs235,300 and Rs201,732, respectively. The international rate increased by $13 to settle at $1,977 per ounce. The yellow metal’s price has fluctuated in both the international and domestic markets this week as investors awaited clarity on whether the US debt ceiling would be raised. If the US debt limit, which is currently capped at $31. 4 trillion, is not raised, it could trigger the first-ever US default. Cumulatively, gold only gained Rs200 per tola this week in Pakistan. The domestic gold market has remained volatile recently due to several factors — economic and political turmoil, high inflation, and currency depreciation. People prefer to buy the yellow metal in such times as a safe investment and a hedge. The safe-haven bullion had reached an all-time high of Rs240,000 per tola on May 10 following increased political uncertainty after Pakistan Tehreek-e-Insaf (PTI) Chairman Imran Khan‘s arrest. It dropped later in line with the decline in the international rate. The jewellers’ body also said that local gold was “overcost” by Rs6,000 per tola in Pakistan compared to the Dubai bullion market. This means that, at present, the Pakistani gold market is more expensive than the world market. Data shared by the association showed the price of silver remained unchanged at Rs2,850 per tola and Rs2,443. 41 per 10 grams, respectively.
english
<% require 'json' %> <% asdc_connections={"asdc-connections" => @allAsdcConnections, "mso.properties.reload.time.minutes" => 2} %> <%= JSON.pretty_generate(asdc_connections) %>
json
Vice Admiral DK Dewan, AVSM took over as the Vice Chief of Naval Staff todate from Vice Admiral RP Suthan, PVSM, AVSM, VSM who retired after 39 years of service. Vice Admiral Dewan is an alumnus of National Defence Academy, Pune and was commissioned in the Indian Navy on 1st July 1973. He qualified as a Gunnery Officer in 1978 and completed the advanced missile course in Russia in 1983. He is a graduate of the Joint Staff Course, Paris, the Naval Higher Command Course and the Royal College of Defence Studies, London. The Flag Officer has had wide national and international exposure and has experience in various fields such as operations, international relations and defence planning. Having done his sea service in seven different ships, he took up duties of Deputy Director Naval Plans at the Naval Headquarters and managed naval budget for four years. In Dec 2002, he was appointed Principal Director Naval Plan at Naval Headquarters and was responsible for plans, foreign cooperation and budget. After promotion to Rear Admiral in Nov 03, he has held the appointments of Senior Directing Staff (Navy) at Natinal Defence College and Flag Officer Commanding Maharashtra Area (FOMA). The Flag Officer was promoted to the rank of Vice Admiral on 20 Mar 07 and was appointed as Controller Personnel Services (CPS) at IHQ MoD (N) and has been the Chief of Personnel since 27 Jul 07.
english
True bestseller in bookstores, The Girl on the Train by Paula Hawkins was a real phenomenon when it came out. It must be said that the book, published in 2015, is in the same spirit as the books of Gillian Flynn, whose box Appearances had been the subject of an adaptation noticed by David Fincher under the title Gone Girl. With such success, Hollywood quickly seized the rights to The Girl on the Train to make a film directed by Tate Taylor and played by Emily Blunt, disturbing as an alcoholic heroine and obsessed with the disappearance of a young woman. Five years later, it’s Bollywood’s turn to stage its own version. In the main role, actress Parineeti Chopra – cousin of Priyanka Chopra – succeeds Emily Blunt. As in the original version, she plays a young, recently divorced woman who fantasizes the life of a couple that she observes every day from the window of her train. This fascination will quickly turn into a nightmare when she witnesses an act that will turn her life upside down. If the broad outlines remain the same, this remake differs on several points. The character’s alcoholism is less present and the final resolution is quite different. On her Instagram account, the actress has also published a message asking future viewers not to spoil the end of the film. Bollywood production requires, the film opens with a musical sequence which strangely denotes the rather dark atmosphere of the thriller. Obviously, Hindi remakes of American films have always existed. Among the most popular there are Sangharsh, remake of Silence of the Lambs, Kyon Ki, re-reading of Flight over a cuckoo’s nest, or Kaante, the Reservoir Dogs Indian version. Mira, the train girl is available on Netflix.
english
Several prominent personalities have pledged their support to the state government in its attempts to prevent the spread of Caronia Virus. To support the government financially in a big way, huge donations were handed over to the state government on Wednesday. Asian Institute of Gastroenterology (AIG) gave Rs 50 lakh donation. AIC Chairman Dr Nageshwar Reddy, Vice Chairman Dr DVS Raju gave Cheque to Chief Minister Sri K Chandrashekhar Rao at Pragathi Bhavan. Aurobindo Pharma donated Rs 11 Crore worth cash, sanitizers, and medicines. A Cheque for Rs 7. 5 Crore cash is given to the CM by Aurobindo Pharma Vice Chairman Sri Nityananda Reddy and Director Sharatchandra Reddy. They announced that Rs 2. 5 Crore worth Sanitizers, Rs one Crore worth Medicines will be given to the state government. Grand Pharma donated Rs one Crore. A Cheque to this affect was given by Grand Pharma MD Sri Srinivas Sadu to the CM. Nava Bharath Ventures donated Rs 2. 5 Crores. Nava Bharath Chairman D Ashok, CEO V. Vikram Prasad, ED Nickel handed over the Cheque to CM. Workers who cook Midday Meal all over the State have announced that they would be giving Rs 2. 65 Crore. A consent letter to this affect is given to the CM by Midday Meal Scheme Workers Union President Sri Vadla Hanmandlu.
english
<gh_stars>0 --- title: fájl belefoglalása description: fájl belefoglalása author: robinsh ms.service: iot-hub services: iot-hub ms.topic: include ms.date: 02/14/2020 ms.author: robinsh ms.custom: include file ms.openlocfilehash: cc53f7ae6eb6254eaa05bf643ecfa0188650df95 ms.sourcegitcommit: 6ee876c800da7a14464d276cd726a49b504c45c5 ms.translationtype: MT ms.contentlocale: hu-HU ms.lasthandoff: 02/19/2020 ms.locfileid: "77461861" --- Ez a szakasz azt ismerteti, hogyan hozható létre IoT hub a [Azure Portal](https://portal.azure.com)használatával. 1. Jelentkezzen be az [Azure Portal](https://portal.azure.com). 1. Az Azure kezdőlapján kattintson a **+ erőforrás létrehozása** gombra, majd írja be a *IoT hub* **kifejezést a keresés a piactéren** mezőbe. 1. Válassza a **IoT hub** elemet a keresési eredmények közül, majd válassza a **Létrehozás**lehetőséget. 1. Az **alapvető beállítások** lapon végezze el a következő mezőket: - **Előfizetés**: válassza ki a hubhoz használni kívánt előfizetést. - **Erőforráscsoport**: válasszon ki egy erőforráscsoportot, vagy hozzon létre újat. Új létrehozásához válassza az **új létrehozása** elemet, és adja meg a használni kívánt nevet. Meglévő erőforráscsoport használatához válassza ki az erőforráscsoportot. További információ: [Azure Resource Manager erőforráscsoportok kezelése](../articles/azure-resource-manager/management/manage-resource-groups-portal.md). - **Régió**: válassza ki azt a régiót, amelyben el szeretné helyezni a hubot. Válassza ki az Önhöz legközelebb eső helyet. Egyes szolgáltatások, például az [IoT hub-adatfolyamok](../articles/iot-hub/iot-hub-device-streams-overview.md), csak bizonyos régiókban érhetők el. Ezen korlátozott funkciók esetében ki kell választania a támogatott régiók egyikét. - **IoT hub neve**: adja meg a hub nevét. A névnek globálisan egyedinek kell lennie. Ha a megadott név elérhető, egy zöld pipa jelenik meg. [!INCLUDE [iot-hub-pii-note-naming-hub](iot-hub-pii-note-naming-hub.md)] ![Hub létrehozása a Azure Portalban](./media/iot-hub-include-create-hub/iot-hub-create-screen-basics.png) 1. Válassza a **Next (tovább): méret és méretezés** lehetőséget a központ létrehozásának folytatásához. ![Egy új hub méretének és méretezésének beállítása a Azure Portal használatával](./media/iot-hub-include-create-hub/iot-hub-create-screen-size-scale.png) Itt elfogadhatja az alapértelmezett beállításokat. Ha szükséges, a következő mezők bármelyikét módosíthatja: - **Díjszabás és méretezési szintek**: a kiválasztott csomag. Számos különböző szinten választhat, attól függően, hogy hány szolgáltatást szeretne, és hány üzenetet küld naponta a megoldáson keresztül. Az ingyenes szintet tesztelésre és kiértékelésre tervezték. Lehetővé teszi, hogy a 500-es eszközök naponta és legfeljebb 8 000 üzenetet csatlakoztassanak az elosztóhoz. Az egyes Azure-előfizetések az ingyenes szinten hozhatnak létre egy IoT hubot. Ha IoT Hub-adatfolyamok számára készült rövid útmutatóban dolgozik, válassza az ingyenes szintet. - **IoT hub egységek**: a napi egységenként engedélyezett üzenetek száma a központ díjszabási szintjétől függ. Ha például azt szeretné, hogy a központ támogassa a 700 000-es bejövő üzeneteket, két S1 szintű egységet választ. További információ a többi lehetőségről: [a megfelelő IoT hub](../articles/iot-hub/iot-hub-scaling.md)-szinten való választás. - **Azure Security Center**: kapcsolja be ezt a beállítást, ha további veszélyforrások elleni védelmet szeretne hozzáadni a IoT és az eszközeihez. Ez a lehetőség az ingyenes szinten lévő hubok esetében nem érhető el. További információ erről a szolgáltatásról: [Azure Security Center a IoT](https://docs.microsoft.com/azure/asc-for-iot/). - Az **eszközről a felhőbe irányuló partíciók** > **Speciális beállítások** : Ez a tulajdonság az eszközről a felhőbe irányuló üzeneteket az üzenetek egyidejű olvasóinak számához kapcsolja. A legtöbb hubhoz csak négy partíció szükséges. 1. Kattintson a **Next (tovább** ) gombra, hogy a következő képernyőre folytassa a címkéket. A címkék név/érték párok. Ugyanazt a címkét több erőforráshoz és erőforráscsoporthoz is hozzárendelheti az erőforrások kategorizálása és a számlázás konszolidálása céljából. További információ: [címkék használata az Azure-erőforrások rendszerezéséhez](../articles/azure-resource-manager/management/tag-resources.md). ![Címkék kiosztása a hubhoz a Azure Portal használatával](./media/iot-hub-include-create-hub/iot-hub-create-tabs.png) 1. Válassza a **Next (tovább): felülvizsgálat + létrehozás** elemet a választási lehetőségek áttekintéséhez. Ehhez hasonló képernyő jelenik meg, de a hub létrehozásakor kiválasztott értékekkel. ![Tekintse át az új központ létrehozásával kapcsolatos információkat](./media/iot-hub-include-create-hub/iot-hub-create-review.png) 1. Válassza a **Létrehozás** lehetőséget az új központ létrehozásához. A hub létrehozása eltarthat néhány percig.
markdown
Another participant in the study says they downplay their role at home of being a caregiver to children or dependent adults as that “might give the impression I’m not fully committed to the work at office” and can lead to missed promotions. The Uttar Pradesh Police Recruitment Board invites online applications for 921 SI and ASI positions. Application window: Jan 7–28, 2024, with fee adjustment until Jan 30. Rs 400 fee. Selection through a 400-mark online exam. Lemon Tree, Pepe Jeans, KFC, JW Marriott, Wow! Momo Foods, and Shoppers Stop are among the cos offering front-facing roles to PWDs, and some of these firms are looking at increasing the number of such employees by 100% or more in FY25, their executives said. In India, employers are increasingly scrutinizing female job seekers due to perceived biases against women in a tightening job market. While more often female candidates are indirectly probed, it is an important criterion in selection amid shrinking team sizes, more people chasing fewer jobs, and pressure on margins. This is a setback to the overall drive to increase women's participation in the workforce. The Congress party is actively preparing for a job fair in Bengaluru at the end of January, fulfilling an election promise made during the May assembly polls. Chief Minister Siddaramaiah assigned a team of ministers to organize the event and discuss long-term strategies with industries to address the skills gap. While women take up white-collar freelance roles primarily to enable them to stay in the workforce, men choose independent roles to build their professional brand, according to research into work patterns carried out by the white-collar gig platform Flexing It. The skill architecture is different too. Technology has emerged as a major skill area for both. Skills like strategy and business development, as well as supply chain and logistics, have a significant supply of highly skilled male consultants. This is contrasted by the skills of HR and finance that female consultants bring in large proportions. This comes in the wake of a pact signed between India and Israel in May, following the visit of Israeli Foreign Minister Eli Cohen to New Delhi. The agreement allows for the employment of 42,000 Indian workers, including 34,000 in construction and 8,000 nurses, to explore job prospects in Israel. Between April and October 2023, the share of women in low-paying formal employment reached a seven-year high at 20.8%, compared to 19.1% in the previous year. While women's labor force participation increased, their enrollment in high-paying formal jobs declined. Unemployment rates for urban women decreased below 9%, and overall formal employment numbers indicate a rise in women's employment. However, the surge in low-paying job enrollments raises concerns about the gender pay gap. While due diligence is non-negotiable, and using technicalities to suspend an organisation is kosher, the signalling has been awful. It seems like an afterthought, a damage-control exercise to offset bad handling of the case from January, when national sportspersons began their protests against Singh. One is left to wonder how many young women have been dissuaded from taking up wrestling as a profession since because of official waffling. Hiring for this bunch will largely be focused on women to improve gender diversity; sustainability; and entry level talent from the campuses apart from lateral hiring. Overall, the hiring momentum for 2024 will likely be the same as 2023 and in some cases, even more. The government in India relies on a survey called the Periodic Labour Force Survey to calculate the unemployment rate or the ratio of persons unemployed in the labour force. The labour force is determined based on the participation rate or number of people aged 15 years and above willing to work or already working in the country. The exercise is conducted for both urban and rural areas. However, more new establishments came under the ESIC month-on-month in October, according to the data released by the labour and employment ministry. As per the data, 23,468 new establishments were recognised under the ESIC in October, compared to 22,544 new establishments in the month before. Employees aged up to 25 years made up 47.76% of the total workforce employed under the ESIC scheme in October, a shade lower than 47.98% in September. The EPFO saw a significant rise in new women subscribers, recording 28.7 lakh additions in FY23 compared to 15.9 lakh in 2019-20, indicating increased formal job creation despite the pandemic. Minister Rameshwar Teli highlighted this as an indicator of job market formalization. Female unemployment dropped to 2.9%, improving from 4.2% in 2019-20, as per PLFS data. Initiatives like extended maternity leave and safety measures aim to provide equal opportunities and a safer work environment for women. The Taliban in Afghanistan are imprisoning women for their safety due to gender-based violence, closing previous state-sponsored women protection centers. Authorities refuse shelters as a Western concept, incarcerating women without male relatives or with unsafe male relatives. Prison is used as "protection," limiting women's freedoms significantly, barred from education beyond sixth grade and public spaces. Restrictions on jobs, travel, and closure of beauty salons further constrict women's lives under Taliban rule. In terms of recruitment methods, the survey indicated that third-party recruitment is the dominant method in India, constituting 49% of all hiring. In comparison, direct recruitment stands at 39%, and indirect methods like advertising make up 6%. Despite a significant presence of female workers in entry level roles, the report showed a significant under-representation of women in leadership roles, especially at the executive and board levels, across healthcare sub-sectors. Most women are focused on the frontline in low-paying jobs and women across the healthcare workforce, on average, earn 34% less than their male counterparts. The technology sector in India faces a gender pay gap of 28-30%, with a higher disparity of 18-20% in junior management, according to an Aon PLC report. This gap is notably high by global standards, contributing to India's position at 127th out of 146 countries in the 2023 Global Gender Gap Index. A new Aon PLC report shows that the unadjusted gender pay gap in the tech sector in 2023 is 28-30%, while in junior management, it is 18-20%. Another study by Xpheno for ET shows that the percentage of female engineers in the higher salary bracket is significantly lower than that of male engineers in the same experience level and identical job roles. So much for tech being savvy. Companies across sectors--pharmaceuticals, insurance, technology, financial services and renewable energy--are accelerating their focus on second career programmes as they look to tap into a non-traditional but experienced talent pool, and also move the needle on gender diversity numbers, said executives of talent consulting and diversity firms. Instahyre, an AI-driven HRtech platform, recently released a report detailing the most popular skills in tech roles in the BFSI sector. It covers various experience levels, average salaries for tech talent, diversity scenarios in these roles and location-specific availability of the talent pool. The influence of gender on leadership styles is a complex and evolving topic. While research suggests some differences in leadership styles between men and women, it is essential to view these findings within the broader context of intersectionality and recognize that individual variation is significant. Moreover, leadership effectiveness depends on a range of factors beyond gender, including personality, experience, and organizational culture. Labour force participation has increased, but it has resulted in depressed wage growth and a widened gender pay gap. The average wage growth rate for regular salaried employees in urban areas declined from 8.3% to 4.9% in 2022-23. The decline was more pronounced for lower-paying jobs. The gap between male and female earnings at managerial levels increased, and women faced higher job losses during economic downturns. Iceland's Prime Minister, Katrin Jakobsdottir, joined women across the country in a strike to demand an end to unequal pay and gender-based violence. The strike, called the "women's day off," called on women and nonbinary individuals to refuse both paid and unpaid work for the day. The walkout is the largest since Iceland's first such event in 1975, which led to the country passing a law guaranteeing equal rights. Despite Iceland being ranked as the world's most gender-equal country, there is still a gender pay gap. ET analysed the median salaries for male and female employees disclosed by Nifty50 constituent companies. Of the 50 companies, 43 disclosed this data in their FY23 annual reports. The median male salaries were higher than median female salaries in 31 of these companies. The median female salaries were, on average, 9.2% lower than the median male salaries. Gender equality in leadership positions within organizations is crucial for fostering innovation, driving growth, and building a healthy work culture, according to experts. A diverse leadership brings a range of skills and perspectives, helping companies inculcate a culture of equality and inclusivity. Studies have shown that companies with more gender-diverse boards perform better financially, are more innovative, and have better corporate governance. Goldin, 77, is the Henry Lee Professor of Economics at Harvard University. She has long been a trailblazer in the field - she was the first woman to be offered tenure in Harvard's economics department, in 1989. The impact of education on women at lower income levels has been significant. This is apparent when one looks at the rise of the Indian aspiring middle class, where household incomes are growing significantly. However, for employable women workforce, the absence of better opportunities could hinder the well-being of their households and inclusive development.
english
Your customers want to communicate with you. Your partners, employees, potential clients, competitors, press and social media influencers want to communicate with you too. Humans communicate in a wide variety of ways – body language, eye movement, intonation of speech, hand gestures, use of color and clothing. There is no system on earth that can yet capture all of the wide bandwidth of communication that we all use, as we go through our days. Let's simplify the problem down to text communication. Text is an excellent intermediate point between "doing nothing" and capturing all the rich variety of human interaction with some magical system that only the NSA could afford. Text is the way humans try to have "structured" communications (even though its highly unstructured data, compared to what computers do.) There's grammar and syntax, you know where a sentence starts and stops, and you know how you're supposed to break it up. And oh boy, is there a lot of it. In one minute, there will be: There will also be uncountable millions of: All of this information, while being the most recent available, is months out of date – and with the possible exception of Wikipedia, all of those numbers are almost certainly higher now than ever before. Text mining. Text analytics. Text analysis. Unstructured data mining. These are all terms for (basically) the same thing – turning a mass of unstructured conversations into structured information that you can then analyze. But you don't want to become some mad big data scientist, understanding crazy statistical "maximum entropy" models and how they interact with pronominal co-referencing. Right. Me neither. The whole point of this note is to show you that listening is important, that there's probably something that concerns you in the text, and then, to give you hope that this isn't some crazy task that only a PhD can survive. Text mining is a horizontal technology like search. There are tons of SaaS and on-premise players that have integrated state of the art text mining technology into their products for customer listening, media monitoring, survey analysis, business intelligence, customer support, and any other application you can think of. You can become a text-mining expert, and you will have an edge because of it, but you don't have to. All you need to do is decide what conversations are important for you to listen to (like, say, Tweets or Yelp! Reviews) and then find someone that has integrated that data into a good dashboard for you to review and base your decisions on. In summary, you need to listen to what the world is trying to tell you, and the premier technology for doing so is "text mining." But, you can lean on others to help you use this daunting technology to extract the right conversations and meanings for you. - Seth Redmore has over 10 years of experience in text mining industry. He is currently VP Marketing & Product Development for Lexalytics Inc.; previously working for Brandmail Solutions and Cisco Systems. Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
english
The murder of Kevin has pointed fingers at the inaction of the police who refused to file a complaint on victim Kevin's wife Neenu's request. The murder of a man from Kottayam has pointed fingers at the inaction of the police who refused to file a complaint on victim Kevin's girlfriend's request. Now, Kevin is dead and his family has alleged that even police has a role to play in this. Kevin was abducted on Saturday morning, and police started the search that evening.
english
GUWAHATI: Acting on a tip-off, a joint team of Kamrup (M) and Kamrup police on Sunday seized a huge consignment of heroin from Sijubari under Hatigaon police station here. The contraband drugs seized from a vehicle have been valued at Rs 3. 5 crore in the grey market. However, the drug peddlers, carrying the heroin, managed to escape even though the police opened fire to stop them. According to the police, the heroin weighing 500 grams, originated in Manipur and was to be delivered in Kamrup district. The recovery of the drugs was linked to a previous haul. It needs mention that Guwahati has become a hotbed of smuggling of narcotic drugs. Narcotic drugs and other contraband items are often smuggled to other parts of the country through the city, which is often referred to as the gateway to the northeast. On August 29, Guwahati police had seized 1. 75 kg of heroin from two different places and arrested six drug peddlers. The seized heroin was valued at Rs 14 crore in the grey market. On September 2, the city police had arrested two drug dealers and seized over 2. 5 kg of heroin, valued at Rs 17. 5 crore, from their possession. The Assam government led by chief minister Himanta Biswa Sarma, has launched a ‘war on drugs’, to free the state from its menace.
english
{% extends 'base.html' %} {% load form_helpers %} {% load buttons %} {% load static %} {% block header %} <link rel="stylesheet" href="{% static 'netbox_gitlab/style.css' %}"> <div class="row noprint"> <div class="col-md-12"> <ol class="breadcrumb"> <li>GitLab - Export Inventory</li> </ol> </div> </div> <h1>{% block title %}GitLab - Export Inventory{% endblock %}</h1> <p> Exporting to GitLab branch <b>{{ branch }}</b>: </p> {% endblock %} {% block content %} {% if form.non_field_errors %} <div class="panel panel-danger"> <div class="panel-heading"><strong>Errors</strong></div> <div class="panel-body"> {{ form.non_field_errors }} </div> </div> {% endif %} <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-body gitlab_diff"> {{ diff }} </div> </div> </div> </div> <form method="post" autocomplete="off"> {% csrf_token %} {# Resubmit our original input in case the POST can't be processed #} {{ form.branch.as_hidden }} {# The full new data to be committed, so that nothing can change after viewing the changes #} {{ form.update.as_hidden }} <div class="row"> <div class="col-md-12 text-right"> <button type="submit" class="btn btn-primary">Commit to GitLab</button> <a href="{{ return_url }}" class="btn btn-default">Cancel</a> </div> </div> </form> {% include 'netbox_gitlab/diff_highlight_line.html' %} {% endblock %}
html
checkers, or draughts, Board game for two players, each with 12 pieces positioned on the black squares of a 64-square checkerboard. Play consists of advancing a piece diagonally forward to an adjoining square, the goal being to jump and thus capture each of an opponent’s pieces until all are removed and victory is declared. When a piece reaches the final (king) row, it is crowned with a piece of the same colour and can begin to move in any direction. Similar games have been played in various cultures and in times extending back to antiquity. While every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions. Below is the article summary. For the full article, see checkers.
english
{"organizations": [], "uuid": "4972891eaa9b8ed29db39be5c4731b2af2cea589", "thread": {"social": {"gplus": {"shares": 0}, "pinterest": {"shares": 0}, "vk": {"shares": 0}, "linkedin": {"shares": 0}, "facebook": {"likes": 0, "shares": 0, "comments": 0}, "stumbledupon": {"shares": 0}}, "site_full": "www.tripadvisor.com", "main_image": "https://media-cdn.tripadvisor.com/media/photo-s/05/5c/35/dd/room.jpg", "site_section": "https://www.tripadvisor.com/Hotel_Review-g186338-d215522-Reviews-or20-Premier_Inn_London_Euston_Hotel-London_England.html", "section_title": "Premier Inn London Euston Hotel - UPDATED 2017 Reviews &amp; Price Comparison (England) - TripAdvisor", "url": "https://www.tripadvisor.com/ShowUserReviews-g186338-d215522-r465873637-Premier_Inn_London_Euston_Hotel-London_England.html", "country": "US", "domain_rank": 189, "title": "Excellent all round!", "performance_score": 0, "site": "tripadvisor.com", "participants_count": 1, "title_full": "Excellent all round! - Review of Premier Inn London Euston Hotel, London, England - TripAdvisor", "spam_score": 0.0, "site_type": "discussions", "published": "2017-03-09T02:00:00.000+02:00", "replies_count": 0, "uuid": "4972891eaa9b8ed29db39be5c4731b2af2cea589"}, "author": "ChelleWilks24", "url": "https://www.tripadvisor.com/ShowUserReviews-g186338-d215522-r465873637-Premier_Inn_London_Euston_Hotel-London_England.html", "ord_in_thread": 0, "title": "Excellent all round!", "locations": [], "entities": {"persons": [], "locations": [], "organizations": []}, "highlightText": "", "language": "english", "persons": [], "text": "Brilliant staff couldn't be friendlier and happy to help. Dropped our bags off before check in, brilliant room quiet and comfy able to adjust the temp in the room. Couldn't wait for breakfast every day! Such good value for money and location was spot on being across the road from Euston and one or two streets from st Pancras station.\nCant wait to check back in. I've stayed here before a few years ago and booked as I knew it was a fail safe hotel but definitely exceeded my expectations this time. Really nice decor in the restaurant. We ate there on our last night, steak and burger were fab... didn't expect nice food from premier inn but this was as good as a grill type restaurant! Couldn't fault our stay, can't wait to visit again !!", "external_links": [], "published": "2017-03-09T02:00:00.000+02:00", "crawled": "2017-03-31T17:41:59.955+03:00", "highlightTitle": ""}
json
LAS VEGAS -- Tony Curtis, the Bronx tailor's son who became a 1950s movie heartthrob and then a respected actor with such films as "Sweet Smell of Success," "The Defiant Ones" and "Some Like It Hot," has died. He was 85. The actor died at 9:25 p. m. MDT Wednesday at his Las Vegas area home of a cardiac arrest, Clark County Coroner Mike Murphy said Thursday. After a series of frivolous movies that exploited his handsome physique and appealing personality, Curtis moved to more substantial roles, starting in 1957 in the harrowing show business tale "Sweet Smell of Success. " In 1958, "The Defiant Ones" brought him an Academy Award nomination as best actor for his portrayal of a white racist escaped convict handcuffed to a black escapee, Sidney Poitier. The following year, he donned women's clothing and sparred with Marilyn Monroe in one of the most acclaimed film comedies ever, Billy Wilder's "Some Like It Hot. " His first wife was actress Janet Leigh of "Psycho" fame; actress Jamie Leigh Curtis is their daughter. In later years, he returned to film and television as a character actor after battling drug and alcohol abuse. His brash optimism returned, and he allowed his once-shiny black hair to turn silver. He also became a painter whose canvasses sold for as much as $20,000. "I'm not ready to settle down like an elderly Jewish gentleman, sitting on a bench and leaning on a cane," he said at 60. "I've got a helluva lot of living to do. " Curtis perfected his craft in forgettable films such as "Francis," "I Was a Shoplifter," "No Room for the Groom" and "Son of Ali Baba. " He first attracted critical notice as Sidney Falco, the press agent seeking favor with a sadistic columnist, played by Burt Lancaster, in the 1957 classic "Sweet Smell of Success. " In her book "Kiss Kiss Bang Bang," Pauline Kael wrote that in the film, "Curtis grew up into an actor and gave the best performance of his career. " Other prestigious films followed: Stanley Kubrick's "Spartacus," "Captain Newman, M. D. ," "The Vikings," "Kings Go Forth," "Operation Petticoat" and "Some Like It Hot. " He also found time to do a voice acting gig as his prehistoric lookalike, Stony Curtis, in an episode of "The Flintstones. " "The Defiant Ones" remained his only Oscar-nominated role. "I think it has nothing to do with good performances or bad performances," he told The Washington Post in 2002. "After the number of movies I made where I thought there should be some acknowledgment, there was nothing from the Academy. " "My happiness and privilege is that my audience around the world is supportive of me, so I don't need the Academy. " In 2000, an American Film Institute survey of the funniest films in history ranked "Some Like It Hot" at No. 1. Curtis -- famously imitating Cary Grant's accent -- and Jack Lemmon play jazz musicians who dress up as women to escape retribution after witnessing a gangland massacre. Monroe was their co-star, and he and Lemmon were repeatedly kept waiting as Monroe lingered in her dressing room out of fear and insecurity. Curtis fumed over her unprofessionalism. When someone remarked that it must be thrilling to kiss Monroe in the film's love scenes, the actor snapped, "It's like kissing Hitler. " In later years, his opinion of Monroe softened, and in interviews he praised her unique talent. In 2002, Curtis toured in "Some Like It Hot" -- a revised and retitled version of the 1972 Broadway musical "Sugar," which was based on the film. In the touring show, the actor graduated to the role of Osgood Fielding III, the part played in the movie by Joe E. Brown. After his star faded in the late 1960s, Curtis shifted to lesser roles. With jobs harder to find, he fell into drug and alcohol addiction. "From 22 to about 37, I was lucky," Curtis told Interview magazine in the 1980s, "but by the middle '60s, I wasn't getting the kind of parts I wanted, and it kind of soured me. . . . But I had to go through the drug inundation before I was able to come to grips with it and realize that it had nothing to do with me, that people weren't picking on me. " He recovered in the early '80s after a 30-day treatment at the Betty Ford Center in Rancho Mirage. "Mine was a textbook case," he said in a 1985 interview. "My life had become unmanageable because of booze and dope. Work became a strain and a struggle. Because I didn't want to face the challenge, I simply made myself unavailable. " One role during that era of struggle did bring him an Emmy nomination: his portrayal of David O. Selznick in the TV movie "The Scarlett O'Hara War," in 1980. His health remained vigorous, though he did get heart bypass surgery in 1994. Curtis took a fatherly pride in daughter Jamie Leigh's success. They were estranged for a long period, then reconciled. "I understand him better now," she said, "perhaps not as a father but as a man. " He also had five other children. Daughters Kelly, also with Leigh, and Allegra, with second wife Christine Kaufmann, also became actresses. His other wives were Leslie Allen, Lisa Deutsch and Jill VandenBerg, whom he married in 1998. He had married Janet Leigh in 1951, when they were both rising young stars; they divorced in 1963. "Tony and I had a wonderful time together; it was an exciting, glamorous period in Hollywood," Leigh, who died in 2004, once said. "A lot of great things happened, most of all, two beautiful children. " Curtis was born Bernard Schwartz in the Bronx in 1925, the son of Hungarian Jews who had emigrated to the United States after World War I. His father, Manny Schwartz, had yearned to be an actor, but work was hard to find with his heavy accent. He settled for tailoring jobs, moving the family repeatedly as he sought work. "I was always the new kid on the block, so I got beat up by the other kids," Curtis recalled in 1959. "I had to figure a way to avoid getting my nose broken. So I became the crazy new kid on the block. " His sidewalk histrionics helped avoid beatings and led to acting in plays at a settlement house. He also grew to love movies. "My whole culture as a boy was movies," he said. "For 11 cents, you could sit in the front row of a theater for 10 hours, which I did constantly. " After serving in the Pacific during World War II and being wounded at Guam, he returned to New York and studied acting under the G. I. Bill. He appeared in summer stock theater and on the Borscht Circuit in the Catskills. Then an agent lined up an audition with a Universal-International talent scout. In 1948, at 23, he signed a seven-year contract with the studio, starting at $100 a week. Bernie Schwartz sounded too Jewish for a movie actor, so the studio gave him a new name: Anthony Curtis, taken from his favorite novel, "Anthony Adverse," and the Anglicized name of a favorite uncle. After his eighth film, he became Tony Curtis. The studio helped smooth the rough edges off the ambitious young actor. The last to go was his street-tinged Bronx accent. His diction became a Hollywood joke, as when he uttered to Piper Laurie in a medieval potboiler "The Prince Who Was a Thief": "Yonder lies the castle of my fodder. " Curtis pursued another career as an artist, creating Matisse-like still lifes with astonishing speed. "I'm a recovering alcoholic," he said in 1990 as he concluded a painting in 40 minutes in the garden of the Bel-Air Hotel. "Painting has given me such a great pleasure in life, helped me to recover. " He also turned to writing, producing a 1977 novel, "Kid Cody and Julie Sparrow. " In 1993, he wrote "Tony Curtis: The Autobiography. "
english
Punjabi superstar Gippy Grewal, who is set to bring his Punjabi film 'Shinda Shinda No Papa' in theatres on Baisakhi, 2023, shared that his single point focus as an artiste is to serve entertainment to the audience. The film is based in the UK and moves to India revolving around a father trying to get his naughty son on the right track. Commenting on the occasion of his film's release date announcements, Gippy said in a statement, "I thrive to give complete entertainment to my audiences, and 'Shinda Shinda No Papa' is no exception. The film has a rollercoaster of emotions and shows how a father manages his disobedient son while moving from the UK to India. " The movie will star Gippy Grewal as the lead alongside his son Shinda Grewal. This is the first time we will see the father-son duo together on screen. Sharing his experience of sharing the screen with his son, Gippy said, "I am very excited to work with my son Shinda and bring our real-life chemistry to the screen. This is going to be my second film with director Amarpreet Chhabra and working with him is a delight. Looking forward to coming together with Yoodlee Films and giving audiences a movie to cherish on Baisakhi. " The director of the film, Amarpreet Chhabra added, "All of us are working very hard to ensure that 'Shinda Shinda No Papa' turns out to be a complete entertainer. Working with Gippy for the second time will be even more special than the first because of the father-son pairing. " 'Shinda Shinda No Papa', produced by Yoodlee Films will debut in theatres on the festive day of Baisakhi on April 14, 2023.
english
<div class="alert alert-danger" role="alert" av-if="parseInt(data.express_order_trash)"> <strong>注意!</strong> 该订单在 “{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(data.express_order_trash_time) * 1000)}}” 已被回收。 </div> <table class="table table-bordered"> <tbody> <tr> <th style="width: 150px;">订单ID:</th> <td style="min-width: 100px;">{{data.express_order_id}}</td> <th style="width: 120px;">订单状态:</th> <td> <span av-if="data.express_order_state == 2" class="label label-warning">待接单</span> <span av-else-if="data.express_order_state == 1" class="label label-success">已完成</span> <span av-else-if="data.express_order_state == 3" class="label label-default">已接单</span> <span av-else-if="data.express_order_state == 4" class="label label-default">已取件</span> <span av-else-if="data.express_order_state == 0" class="label label-danger">已撤销</span> <span av-else class="label label-default">未知</span> </td> <th style="width: 120px;">下单时间:</th> <td>{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(data.express_order_insert_time) * 1000)}}</td> </tr> <tr> <th >订单发布人:</th> <td> <img av-if="data.user_logo_image_id" av-attr="[src] applicationConfig.qiniu_domain+data.user_logo_image_id+'?imageView2/1/w/30'" class="img-circle"> <span av-if="data.user_nickname" av-text="data.user_nickname"></span> <span av-else style="color: #999999;">未设置昵称</span> <span av-if="data.user_phone_verify_list" style="word-wrap:break-word;"> ({{data.user_phone_verify_list}}) </span> <span av-else style="color: #999999;">无认证手机</span> </td> <th>寄件人姓名:</th> <td>{{data.user_address_name}}</td> <th>寄件人手机:</th> <td>{{data.user_address_phone}}</td> </tr> <tr> <th>寄件人(取件)地址:</th> <td colspan="3"> <span style="color: #999;">省(直辖市):</span>{{data.user_address_province}} <span style="color: #999;">市:</span>{{data.user_address_city}} <span style="color: #999;">区(县):</span>{{data.user_address_district}} <span style="color: #999;">详细:</span>{{data.user_address_details}} </td> <th>取件时间:</th> <td><span av-if="data.express_order_state == 4">{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(data.express_order_pick_time) * 1000)}}</span></td> </tr> <tr> <th colspan="6" style="height: 30px;"></th> </tr> <tr> <th>骑手信息:</th> <td> <div av-if="data.express_rider_user_id"> <img av-if="data.rider_user_logo_image_id" av-attr="[src] applicationConfig.qiniu_domain+data.rider_user_logo_image_id+'?imageView2/1/w/30'" class="img-circle"> <span av-if="data.user_nickname" av-text="data.rider_user_nickname"></span> <span av-else style="color: #999999;">未设置昵称</span> <span av-if="data.rider_user_phone_verify_list" style="word-wrap:break-word;"> ({{data.rider_user_phone_verify_list}}) </span> <span av-else style="color: #999999;">无认证手机</span> </div> <div av-else> <span style="color: #999999;">无骑手接单</span> </div> </td> <th>骑手联系手机:</th> <td>{{data.express_rider_phone}}</td> <th>接单时间:</th> <td><span av-if="data.express_order_state == 3">{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(data.express_order_access_time) * 1000)}}</span></td> </tr> <tr> <th>总费用:</th> <td style="color: red;">¥ {{((data.express_order_money - data.express_order_rebate_money)/100).toFixed(2)}}</td> <th>订单金额:</th> <td>¥ {{(data.express_order_money/100).toFixed(2)}}</td> <th>折扣金额:</th> <td>¥ {{(data.express_order_rebate_money/100).toFixed(2)}}</td> </tr> <tr> <th colspan="6" style="height: 30px;"></th> </tr> <tr> <th>支付方式:</th> <td colspan="5">{{data.express_order_pay_method_name}}</td> </tr> <tr> <th>支付金额:</th> <th style="color: red;"> <span av-if="data.express_order_pay_state == 1">¥ {{(data.express_order_pay_money/100).toFixed(2)}}</span> </th> <th>支付状态:</th> <td> <span av-if="data.express_order_pay_state == 0" class="label label-danger">未支付</span> <span av-else-if="data.express_order_pay_state == 1" class="label label-success">已支付</span> <span av-else class="label label-default">未知</span> </td> <th>支付时间:</th> <td> <span av-if="data.express_order_pay_state == 1">{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(data.express_order_pay_time) * 1000)}}</span> </td> </tr> <tr> <th colspan="6" style="height: 30px;"></th> </tr> <tr> <th>配送方式:</th> <td><span av-if="data.express_order_shipping_state != 0">{{data.shipping_name}}</span></td> <th>运单号:</th> <td colspan="3"><span av-if="data.express_order_shipping_state != 0">{{data.express_order_shipping_no}}</span></td> </tr> <tr> <th>收货人姓名:</th> <td>{{data.express_order_get_name}}</td> <th>收货地址:</th> <td> <span style="color: #999;">省(直辖市):</span>{{data.express_order_get_province}} <span style="color: #999;">市:</span>{{data.express_order_get_city}} <span style="color: #999;">区(县):</span>{{data.express_order_get_district}} <span style="color: #999;">详细:</span>{{data.express_order_get_address}} </td> <th>收货电话:</th> <td>{{data.express_order_get_phone}}</td> </tr> <tr> <th style="width: 120px;">发货时间:</th> <td> <span av-if="data.express_order_shipping_state != 0">{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(data.express_order_shipping_send_time) * 1000)}}</span> </td> <th>配送状态:</th> <td> <span av-if="data.express_order_shipping_state == 0" class="label label-danger">待发货</span> <span av-else-if="data.express_order_shipping_state == 2" class="label label-warning">运送中</span> <span av-else-if="data.express_order_shipping_state == 1" class="label label-success">已收货</span> <span av-else class="label label-default">未知</span> </td> <th style="width: 100px;">收货时间:</th> <td> <span av-if="data.express_order_shipping_state == 1">{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(data.express_order_shipping_take_time) * 1000)}}</span> </td> </tr> </tbody> </table> <div class="btn-group"> <button av-event="[click]eventShippingSend(:node,:event)" av-if="data.express_order_shipping_state == 0" type="button" class="btn btn-default">确定发货</button> <!--<button av-else-if="data.express_order_shipping_state == 2" type="button" class="btn btn-default">确定收货</button> <button av-if="data.express_order_trash == 1" type="button" class="btn btn-default">还原订单</button> <button av-else-if="data.express_order_trash != 1" type="button" class="btn btn-warning">回收订单</button>--> </div> <hr/> <span style="color: #999999;">更新时间:{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(data.express_order_update_time) * 1000)}}</span> <div style="height: 100px;"></div>
html
<reponame>rolandosborne/IndiView package org.coredb.view.jpa.entity; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.*; import javax.persistence.*; @Entity @Table(name = "account", uniqueConstraints = @UniqueConstraint(columnNames = { "id" })) public class Account implements Serializable { private Integer id; private String amigoId; private Integer revision; private String handle; private String name; private Boolean logoSet; private String location; private String description; private String node; private String version; private String registry; private Boolean enabled; private Boolean searchable; private Boolean notifications; private String pushToken; private String pushChannel; private String token; private String videoQuality; private String audioQuality; private Boolean videoMute; private Boolean audioMute; private Boolean gps; private Float gpsLongitude; private Float gpsLatitude; private Float gpsAltitude; private Long gpsTimestamp; private Long alertTimestamp; public Account() { this.alertTimestamp = (long)0; } @Id @JsonIgnore @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", updatable = false, nullable = false) public Integer getId() { return this.id; } public void setId(Integer value) { this.id = value; } @JsonIgnore public String getAmigoId() { return this.amigoId; } public void setAmigoId(String value) { this.amigoId = value; } @JsonIgnore public Integer getRevision() { return this.revision; } public void setRevision(Integer value) { this.revision = value; } @JsonIgnore public String getHandle() { return this.handle; } public void setHandle(String value) { this.handle = value; } @JsonIgnore public String getNode() { return this.node; } public void setNode(String value) { this.node = value; } @JsonIgnore public String getVersion() { return this.version; } public void setVersion(String value) { this.version = value; } @JsonIgnore public String getName() { return this.name; } public void setName(String value) { this.name = value; } @JsonIgnore public Boolean getLogoSet() { return this.logoSet; } public void setLogoSet(Boolean value) { this.logoSet = value; } @JsonIgnore public String getLocation() { return this.location; } public void setLocation(String value) { this.location = value; } @JsonIgnore public String getDescription() { return this.description; } public void setDescription(String value) { this.description = value; } @JsonIgnore public String getRegistry() { return this.registry; } public void setRegistry(String value) { this.registry = value; } @JsonIgnore public Boolean getEnabled() { return this.enabled; } public void setEnabled(Boolean value) { this.enabled = value; } @JsonIgnore public Boolean getSearchable() { return this.searchable; } public void setSearchable(Boolean value) { this.searchable = value; } @JsonIgnore public Boolean getNotifications() { return this.notifications; } public void setNotifications(Boolean value) { this.notifications = value; } @JsonIgnore public String getPushChannel() { return this.pushChannel; } public void setPushChannel(String value) { this.pushChannel = value; } @JsonIgnore public String getPushToken() { return this.pushToken; } public void setPushToken(String value) { this.pushToken = value; } @JsonIgnore public String getToken() { return this.token; } public void setToken(String value) { this.token = value; } @JsonIgnore public String getVideoQuality() { return this.videoQuality; } public void setVideoQuality(String value) { this.videoQuality = value; } @JsonIgnore public String getAudioQuality() { return this.audioQuality; } public void setAudioQuality(String value) { this.audioQuality = value; } @JsonIgnore public Boolean getVideoMute() { return this.videoMute; } public void setVideoMute(Boolean value) { this.videoMute = value; } @JsonIgnore public Boolean getAudioMute() { return this.audioMute; } public void setAudioMute(Boolean value) { this.audioMute = value; } @JsonIgnore public Boolean getGps() { return this.gps; } public void setGps(Boolean value) { this.gps = value; } @JsonIgnore public Float getGpsLongitude() { return this.gpsLongitude; } public void setGpsLongitude(Float value) { this.gpsLongitude = value; } @JsonIgnore public Float getGpsLatitude() { return this.gpsLatitude; } public void setGpsLatitude(Float value) { this.gpsLatitude = value; } @JsonIgnore public Float getGpsAltitude() { return this.gpsAltitude; } public void setGpsAltitude(Float value) { this.gpsAltitude = value; } @JsonIgnore public Long getGpsTimestamp() { return this.gpsTimestamp; } public void setGpsTimestamp(Long value) { this.gpsTimestamp = value; } @JsonIgnore public Long getAlertTimestamp() { return this.alertTimestamp; } public void setAlertTimestamp(Long value) { this.alertTimestamp = value; } }
java
On the 15th of April, I attended the #NotInMyName protest at Parliament Street, New Delhi, which demanded justice for Asifa Bano and the Unnao survivor. This was an open call, asking people to rally together for a larger cause. However, I saw something there that deeply disturbed me. A bunch of people, not too far from the stage, got together while holding the Indian flag and screamed themselves hoarse demanding the death penalty to rapists. The fact that state-sanctioned murder should have nationalist hues embedded in it was being rubbed in our faces. What was even more disturbing was that in the midst of so much bloodshed and violence, the idea of justice then was to inflict even more bloodshed and violence. What aspirations can we then encompass when it comes to the functioning of democracy and law? Are we as a society to have a collective knee-jerk reaction to an incident(s) of barbaric violence, when it comes to the deliverance of justice? The gangrape and murder of Asifa Bano also triggered a wave of Islamophobic anger, when the Hindutva brigade (denial, textbook ‘whataboutery’ – pointing out each and every alleged flaw in Muslim society) and liberals (demand for death penalty for rapists, minor perpetrators included) alike were no longer able to ignore the communal nature of the incident. Such are the moments of ‘activism’, which are used to further perpetuate violence. in the midst of so much bloodshed and violence, the idea of justice here is to inflict even more bloodshed and violence. Campaigns, strikes, hashtags on social media – varied tools to avail of social justice and betterment have been appropriated in this knee-jerk demand for more death. Swati Maliwal, the chairperson of the Delhi Commission for Women, flagged off a campaign titled #RapeRoko and went on a hunger strike wherein she demanded the death penalty for rapists. As an important member of a statutory body for women’s welfare, Swati Maliwal is undoing years and years of the feminist struggle against the death penalty. Yes, #RapeRoko, but how? Will the death penalty end misogyny and sexual harassment? Will it end Brahmanical patriarchy? Will it end institutionalised murders? Will it end Islamophobia and other instances of communal hate so that Asifas all over the world will be safe? Will it end corporate greed for land? Will the death penalty protect vulnerable tribal communities? Will the death penalty enable gender sensitisation in perpetrators and would-be perpetrators alike? In their hurry to seem like they are going about the path of justice, the central government, in an “emergency meeting”, passed an ordinance in which the death penalty is applicable to those guilty of raping children under the age of 12. This ordinance, called the Criminal Law (Amendment) Ordinance 2018, affects the Protection of Children from Sexual Offences Act (POCSO), Indian Penal Code, Evidence Act and the Code of Criminal Procedure. According to the National Crime Records Bureau, as of 2015, India’s conviction rate for rape is 34.4%; assault against women is at 36%, insult to the modesty of girl children stands at 33.1%; and the kidnapping and abduction conviction rate is 31%. In cases of child sexual assault, 94.6% of cases are those where the perpetrator is known to the victim. What happens to the survivor when no one believes them, or when they feel saddled with the guilt of reporting their family members? Did the Centre take these dismal statistics into consideration before hurriedly evoking their ability to take lives? Also Read: No, We Can’t Stop Communalizing Asifa Bano’s Rape. Here’s Why. To add to the gravity of the situation, President Ram Nath Kovind signed off on the ordinance. The President of the country has the power to reject mercy pleas. The President is also in a position of power to send back recommendations (about impending executions) to the Home Ministry, delaying said executions. Under Article 72 of the Indian Constitution, the President’s powers are not bound by legal procedure. Under Article 74, Courts are barred from inquiring into how the President arrived at their decision. This hurried manner of legal redressal is open to innumerable gaping flaws. The Delhi High Court questioned the Centre as to whether any research was carried out in this process. Acting Chief Justice Gita Mittal and Justice C Hari Shankar asked, “Did you carry out any study, any scientific assessment that death penalty is a deterrent to rape?” The High Court also observed that the government had not reached out to survivors of sexual violence, or done anything to enable gender sensitisation among people at large. In the last decade, the mercy pleas rejected and executions carried out had a troubling pattern. Out of the 4 executions, 3 of those executed were Muslim: Ajmal Kasab (2012), Afzal Guru (2013), Yakub Memon (2015); and Dhananjoy Chatterjee (2004). As of December 2017, 371 prisoners have been placed on death row, a significant drop from the number 399 in 2016. However, the Islamophobic nature of executions is glaring, which brings to question whether judgements will be free of communal bias. No government should be allowed to dispose of lives. A report released by National Law University Delhi revealed that 76% of Indian prisoners on death row belong to non-dominant castes and religions, with all 12 women prisoners also from non-dominant castes and religions. 74.1% of the prisoners came from economically vulnerable families. Wherein, 63.2% of them were primary and/or sole earners in their families. More importantly, the State does not have the right to violate someone else’s Right to Life – the most fundamental human right. No government should be allowed to dispose of lives. The death penalty is a form of revenge, not justice. There is no evidence to suggest that the death penalty will deter crime. We cannot trust a system that prioritises retribution over proactive prevention and grievance redressal. Appealing to the “collective conscience” and angry sentiments of the public at large is only further fuelling the now normalised lynch mob culture. To sum up, the death penalty is just lazy politics. It is a quick fix for the State in order to not have them deal with social deterrents that are misogynist and communal in nature. In an already botched legal system, where justice is a rather biased entity favouring the already privileged, the death penalty then is a ruse to silence questions about the larger bigoted structures at play.
english
The drubbing of both the Aam Aadmi Party and the Congress in the Sangrur Lok Sabha bypoll has created a vacuum that now serves as the perfect entry point for Simranjit Singh Mann and his brand of religious politics. That religion will play a key role in Punjab’s mercurial political landscape is evident in Mann’s post-victory speech. The former IPS officer and president of Shiromani Akali Dal (Amritsar), who defeated AAP’s Gurmail Singh by a margin of 5,822 votes, attributed his victory to the martyrdom of Jarnail Singh Bhindranwale and his young militant brigade. “It is a win of our party workers and the teachings that Jarnail Singh Bhindranwale has given,” Mann told the media. The contested phenomenon of Bhindranwale is perceived differently by different people. For some, he is a freedom fighter; for others, he could be a militant. Another possible factor behind Mann’s victory could be the emotional mass appeal generated in the aftermath of the murder of internationally known rapper and songwriter Sidhu Moose Wala by channeling people’s anger against the AAP government seemingly compromising his security despite regular threats to his life. Simranjit Singh Mann had reportedly promised to pay the rapper a visit at his native village Moosa in Mansa district just a few days before his murder. Mann eventually went there on his Antim Ardas (last prayer ceremony). The emotional mass appeal was further intensified by several law and order-related incidents and the AAP government’s failure to resolve the Bargari sacrilege cases as well as the police firing in Kotkapura and Behbal Kalan. Simranjit Singh Mann also put on record his gratitude to Deep Sidhu, another notable emerging figure on the political turf of the Punjab politics, who died under mysterious circumstances in a car accident on his way from Delhi to Punjab. For quite some time now there has been a general inclination on the part of all traditional political parties in Punjab towards the adoption of a Panthic discourse in some form. A case in point: the Bharatiya Janata Party (BJP) and the SAD-Badal fielded Kewal Singh Dhillon and Kamaldeep Kaur Rajoana, respectively, in the Sangrur bypoll. Earlier, there were accusations against some political parties of having connections with terror outfits. There is also a common impression in Punjab that if one has to choose, then it’s better to choose the original Panthic discourse — hence Simranjit Singh Mann. He is not perceived as a threat by the people of Punjab. He is one among them. His reference to Bhindranwale and others of the militancy period should not be an issue. Yes, he did speak about “Army committing atrocities in Kashmir and killing Muslims on a daily basis”, and “the tribal people in Bihar and Chhattisgarh (who) are being shot dead calling them Naxalites”, according to news agency ANI. But being an elected member of the Lok Sabha, Simranjit Singh Mann has to work within the purview of the Constitution. His victory should not be interpreted as re-emergence of fundamentalist brand of politics dominated by the so-called Khalistan-centric thought process. During his earlier active stint in the parliamentary democratic politics in the country, Simranjit Singh Mann, recalled Rajiv Lochan, an academic of modern history at Panjab University, “used to talk about pursuing the Khalistan cause through electoral democracy and not to follow the path of violence”. So far, the most striking factor behind Mann’s victory could be the pre-eminence accorded by the AAP leadership in Punjab to its counterpart in Delhi. After CM Bhagwant Mann’s oath-taking ceremony at Khatkar Kalan, the native village of Bhagat Singh, the people of Punjab expected to see him focus on various exigencies in a state corroded by decades of criminal misgovernance by a succession of inept and deeply corrupt political regimes. This, in turn, had given a free rein to multifarious mafias: sand, real-estate, transport, drugs, cable, etc. They certainly did not take kindly to the state administration being puppeteered from Delhi. The AAP’s election was a clear message from the people of Punjab that they were fed up with the vicious power circle of traditional parties that were in agreement with each other to rule the state by turns. They gave an opportunity to the AAP to provide good governance. Within three months, they have come to realise that even this new option won’t work, which compelled them to incline towards Simranjit Singh Mann. Moreover, the people of Punjab are highly sensitive to issues that offend their ethnic pride. They broke the mould of Punjab politics by ensuring that the AAP defeated all the traditional/mainstream political parties in the recent assembly election to put an end to the deeply entrenched family (SAD-Badal) and dynastic rule (Congress). Before and during the Sangrur Lok Sabha bypoll, there was a general impression that the AAP government in Punjab has been lacking in demonstrating its mettle in independently handling the state administration. It has neither been allegedly focusing on the resolution of core issues in Punjab, nor allowing its indigenous cadres and leadership to grow. There is a common belief among the people that the day-to-day political and administrative affairs are controlled by the AAP’s central leadership in Delhi. They were told to be unhappy and dissatisfied with the AAP over Rajya Sabha nominations from Punjab. A lot of the promises made during the election campaign are yet to be realised, particularly the promise of giving Rs 1,000 to every woman above 18 years of age. The people of Punjab have realised that Bhagwant Mann’s government is not run by those they had elected three months ago. Even the leaders feel unwanted because nothing they say is considered important. The AAP has not come up to their expectations. It is alleged that the rank and file of the party do not have any say in local governance and even its ministers and MLAs seem to have been sidelined. All of this was evident given how the February 2022 election campaign was entirely centred around Arvind Kejriwal. The outcome of this closely watched five-cornered electoral contest in Sangrur holds serious political implications for the 2024 Lok Sabha election on the one hand, and the emerging configuration of region-based identity politics of Punjab on the other. Ronki Ram is Shaheed Bhagat Singh Chair Professor of Political Science, Panjab University, Chandigarh. Views are personal. (Edited by Prashant)
english
from django.db import models from django.utils import timezone from django.contrib.auth.models import User class Idea(models.Model): title = models.CharField(max_length=100) content = models.TextField() date_posted = models.DateTimeField(default=timezone.now) author = models.ForeignKey(User, on_delete=models.CASCADE) tag_name= models.CharField(max_length=20,default='general') def __str__(self): return self.title class Comments(models.Model): description = models.CharField(max_length=100) pub_date = models.DateTimeField(default=timezone.now) author = models.ForeignKey(User, on_delete=models.CASCADE) idea=models.ForeignKey(Idea, on_delete=models.CASCADE, related_name='comments') # class Tags(models.Model): # tag_name= models.CharField(max_length=20) # idea=models.ForeignKey(Idea, on_delete=models.CASCADE, related_name='tags') # Create your models here.
python
<filename>js/scripts.js<gh_stars>0 function Pizza (toppings, pizzaSize) { this.toppings = toppings.slice(); this.size = pizzaSize; } Pizza.prototype.getPrice = function () { //all toppings cost $.40, and the rest is by area of pizza. var radius = this.size / 2; var pi = 3.14159; area = pi * Math.pow(radius, 2); var price = area * .03; price += this.toppings.length * .40; return price; } Pizza.prototype.getName = function() { var string = ""; string = string.concat(this.size + " inch pizza "); if (this.toppings.length > 0) { string = string.concat("with "); for (var i = 0; i < this.toppings.length; i++) { if (this.toppings.length > 1) { if (i === this.toppings.length - 1) { string = string.concat("& " + this.toppings[i]); } else { string = string.concat(this.toppings[i] + ", "); } } else { string = string.concat(this.toppings[i]); } } } return string; } function Order (pizzaArray, totalPrice) { this.pizzas = pizzaArray; this.orderCost = totalPrice; } Order.prototype.addPizza = function (pizza) { this.pizzas.push(pizza); this.orderCost += pizza.getPrice(); } Order.prototype.getPrice = function () { return this.orderCost.toFixed(2); } //UI CODE var pizzaOrder = new Order ([], 0); $(document).ready(function() { $("form").submit(function(event) { event.preventDefault(); //read input var orderCost = 0; var toppings = []; var size = parseInt($("#size").val()); $("input:checkbox[name=toppings]:checked").each(function(){ toppings.push($(this).val()); }); var newPizza = new Pizza (toppings, size); pizzaOrder.addPizza(newPizza); //display input $(".order").show(); clearOrder(); for (var i = 0; i < pizzaOrder.pizzas.length; i++) { $(".order").children("ul").last().append("<li>" + pizzaOrder.pizzas[i].getName() + " - $" + pizzaOrder.pizzas[i].getPrice().toFixed(2) + "</li>") } $(".order").append("<p>Total: $" + pizzaOrder.getPrice() + "</p>") }); $("#placeOrder").click(function() { alert("Your Pizzas are ordered. Don't worry about inputting address or payment info, we'll find ya!\n\n" + pizzaOrder.pizzas.length + " pizzas\nPrice: $" + pizzaOrder.getPrice()); location.reload(); }); }); function clearOrder() { $(".order").children("ul").first().empty(); $(".order").children("p").last().empty(); }
javascript
{ "documentId":"DOC_1", "organizationId":"20|CNR", "matchStrength":1.0 } { "documentId":"DOC_2", "organizationId":"20|UCB", "matchStrength":1.0 } { "documentId":"DOC_3", "organizationId":"20|UCB", "matchStrength":1.0 } { "documentId":"DOC_1", "organizationId":"20|UCB", "matchStrength":0.9 }
json
// Code generated by openapi-cli-generator. DO NOT EDIT. // See https://github.com/danielgtaylor/openapi-cli-generator package main import ( "fmt" "strings" "github.com/danielgtaylor/openapi-cli-generator/cli" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" "gopkg.in/h2non/gentleman.v2" ) var waspOpenapiSubcommand bool func waspOpenapiServers() []map[string]string { return []map[string]string{ map[string]string{ "description": "default development server, beware of CORS", "url": "http://localhost:2891", }, } } // WaspOpenapiInsertBatchJob insert-batch-job func WaspOpenapiInsertBatchJob(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "insert-batch-job" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/batchjobs" req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiUpdateBatchJob update-batch-job func WaspOpenapiUpdateBatchJob(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "update-batch-job" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/batchjobs" req := cli.Client.Put().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListBatchJob list-batch-job func WaspOpenapiListBatchJob(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-batch-job" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/batchjobs" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiDeleteBatchJob delete-batch-job func WaspOpenapiDeleteBatchJob(paramBatchjobname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "delete-batch-job" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/batchjobs/{batchjobname}" url = strings.Replace(url, "{batchjobname}", paramBatchjobname, 1) req := cli.Client.Delete().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListBatchJobInstance list-batch-job-instance func WaspOpenapiListBatchJobInstance(paramBatchjobname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-batch-job-instance" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/batchjobs/{batchjobname}/instances" url = strings.Replace(url, "{batchjobname}", paramBatchjobname, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetBatchJobInstance get-batch-job-instance func WaspOpenapiGetBatchJobInstance(paramBatchjobname string, paramInstance string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-batch-job-instance" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/batchjobs/{batchjobname}/instances/{instance}" url = strings.Replace(url, "{batchjobname}", paramBatchjobname, 1) url = strings.Replace(url, "{instance}", paramInstance, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiStartBatchJob start-batch-job func WaspOpenapiStartBatchJob(paramBatchjobname string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "start-batch-job" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/batchjobs/{batchjobname}/start" url = strings.Replace(url, "{batchjobname}", paramBatchjobname, 1) req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetElasticConfig get-elastic-config func WaspOpenapiGetElasticConfig(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-elastic-config" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/config/es" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetKafkaConfig get-kafka-config func WaspOpenapiGetKafkaConfig(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-kafka-config" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/config/kafka" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetSolrConfig get-solr-config func WaspOpenapiGetSolrConfig(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-solr-config" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/config/sorl" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetSparkBatchConfig get-spark-batch-config func WaspOpenapiGetSparkBatchConfig(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-spark-batch-config" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/config/sparkbatch" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetSparkStreamingConfig get-spark-streaming-config func WaspOpenapiGetSparkStreamingConfig(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-spark-streaming-config" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/config/sparkstreaming" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetTelemetryConfig get-telemetry-config func WaspOpenapiGetTelemetryConfig(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-telemetry-config" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/config/telemetry" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListDocument list-document func WaspOpenapiListDocument(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-document" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/documents" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetDocument get-document func WaspOpenapiGetDocument(paramDocumentname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-document" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/documents/{documentname}" url = strings.Replace(url, "{documentname}", paramDocumentname, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiCommitProcessgroup commit-processgroup func WaspOpenapiCommitProcessgroup(paramProcessgroupid string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "commit-processgroup" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/editor/nifi/{processGroupId}" url = strings.Replace(url, "{processGroupId}", paramProcessgroupid, 1) req := cli.Client.Put().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiNewProcessgroup new-processgroup func WaspOpenapiNewProcessgroup(paramProcessgroupname string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "new-processgroup" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/editor/nifi/{processGroupName}" url = strings.Replace(url, "{processGroupName}", paramProcessgroupname, 1) req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiPostPipegraph post-pipegraph func WaspOpenapiPostPipegraph(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "post-pipegraph" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/editor/pipegraph" req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiEvents events func WaspOpenapiEvents(paramSearch string, paramStarttimestamp string, paramEndtimestamp string, paramPage string, paramSize string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "events" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/events" req := cli.Client.Get().URL(url) req = req.AddQuery("search", paramSearch) req = req.AddQuery("startTimestamp", paramStarttimestamp) req = req.AddQuery("endTimestamp", paramEndtimestamp) req = req.AddQuery("page", paramPage) req = req.AddQuery("size", paramSize) cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListFreeCode list-freeCode func WaspOpenapiListFreeCode(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-freecode" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/freeCode" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiInsertFreeCode insert-freeCode func WaspOpenapiInsertFreeCode(params *viper.Viper, body string) (*gentleman.Response, interface{}, error) { handlerPath := "insert-freecode" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/freeCode" req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after } return resp, decoded, nil } // WaspOpenapiCompleteFreeCode complete-freeCode func WaspOpenapiCompleteFreeCode(paramPosition string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "complete-freecode" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/freeCode/complete/{position}" url = strings.Replace(url, "{position}", paramPosition, 1) req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetFreeCode get-freeCode func WaspOpenapiGetFreeCode(paramModelname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-freecode" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/freeCode/instance/{modelname}" url = strings.Replace(url, "{modelname}", paramModelname, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiValidateFreeCode validate-freeCode func WaspOpenapiValidateFreeCode(params *viper.Viper, body string) (*gentleman.Response, interface{}, error) { handlerPath := "validate-freecode" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/freeCode/validate" req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after } return resp, decoded, nil } // WaspOpenapiListIndex list-index func WaspOpenapiListIndex(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-index" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/indexes" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetIndex get-index func WaspOpenapiGetIndex(paramIndexname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-index" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/indexes/{indexname}" url = strings.Replace(url, "{indexname}", paramIndexname, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListKeyvalue list-keyvalue func WaspOpenapiListKeyvalue(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-keyvalue" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/keyvalue" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetKeyvalue get-keyvalue func WaspOpenapiGetKeyvalue(paramModelname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-keyvalue" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/keyvalue/{modelname}" url = strings.Replace(url, "{modelname}", paramModelname, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiLogs logs func WaspOpenapiLogs(paramSearch string, paramStarttimestamp string, paramEndtimestamp string, paramPage string, paramSize string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "logs" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/logs" req := cli.Client.Get().URL(url) req = req.AddQuery("search", paramSearch) req = req.AddQuery("startTimestamp", paramStarttimestamp) req = req.AddQuery("endTimestamp", paramEndtimestamp) req = req.AddQuery("page", paramPage) req = req.AddQuery("size", paramSize) cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListMlmodel list-mlmodel func WaspOpenapiListMlmodel(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-mlmodel" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/mlmodels" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiInsertMlmodel insert-mlmodel func WaspOpenapiInsertMlmodel(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "insert-mlmodel" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/mlmodels" req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiUpdateMlmodel update-mlmodel func WaspOpenapiUpdateMlmodel(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "update-mlmodel" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/mlmodels" req := cli.Client.Put().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiDeleteMlmodel delete-mlmodel func WaspOpenapiDeleteMlmodel(paramMlmodelname string, paramMlmodelversion string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "delete-mlmodel" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/mlmodels/{mlmodelname}/{mlmodelversion}" url = strings.Replace(url, "{mlmodelname}", paramMlmodelname, 1) url = strings.Replace(url, "{mlmodelversion}", paramMlmodelversion, 1) req := cli.Client.Delete().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetMlmodel get-mlmodel func WaspOpenapiGetMlmodel(paramMlmodelname string, paramMlmodelversion string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-mlmodel" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/mlmodels/{mlmodelname}/{mlmodelversion}" url = strings.Replace(url, "{mlmodelname}", paramMlmodelname, 1) url = strings.Replace(url, "{mlmodelversion}", paramMlmodelversion, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListPipegraph list-pipegraph func WaspOpenapiListPipegraph(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-pipegraph" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/pipegraphs" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiInsertPipegraph insert-pipegraph func WaspOpenapiInsertPipegraph(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "insert-pipegraph" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/pipegraphs" req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiUpdatePipegraph update-pipegraph func WaspOpenapiUpdatePipegraph(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "update-pipegraph" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/pipegraphs" req := cli.Client.Put().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiDeletePipegraph delete-pipegraph func WaspOpenapiDeletePipegraph(paramPipegraphname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "delete-pipegraph" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/pipegraphs/{pipegraphname}" url = strings.Replace(url, "{pipegraphname}", paramPipegraphname, 1) req := cli.Client.Delete().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListPipegraphInstance list-pipegraph-instance func WaspOpenapiListPipegraphInstance(paramPipegraphname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-pipegraph-instance" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/pipegraphs/{pipegraphname}/instances" url = strings.Replace(url, "{pipegraphname}", paramPipegraphname, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetPipegraphInstance get-pipegraph-instance func WaspOpenapiGetPipegraphInstance(paramPipegraphname string, paramInstance string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-pipegraph-instance" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/pipegraphs/{pipegraphname}/instances/{instance}" url = strings.Replace(url, "{pipegraphname}", paramPipegraphname, 1) url = strings.Replace(url, "{instance}", paramInstance, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiStartPipegraph start-pipegraph func WaspOpenapiStartPipegraph(paramPipegraphname string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "start-pipegraph" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/pipegraphs/{pipegraphname}/start" url = strings.Replace(url, "{pipegraphname}", paramPipegraphname, 1) req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiStopPipegraph stop-pipegraph func WaspOpenapiStopPipegraph(paramPipegraphname string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "stop-pipegraph" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/pipegraphs/{pipegraphname}/stop" url = strings.Replace(url, "{pipegraphname}", paramPipegraphname, 1) req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetProducer get-producer func WaspOpenapiGetProducer(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-producer" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/producers" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiInsertProducer insert-producer func WaspOpenapiInsertProducer(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "insert-producer" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/producers" req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiUpdateProducer update-producer func WaspOpenapiUpdateProducer(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "update-producer" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/producers" req := cli.Client.Put().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "text/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiDeleteProducer delete-producer func WaspOpenapiDeleteProducer(paramProducername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "delete-producer" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/producers/{producername}" url = strings.Replace(url, "{producername}", paramProducername, 1) req := cli.Client.Delete().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiStartProducer start-producer func WaspOpenapiStartProducer(paramProducername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "start-producer" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/producers/{producername}/start" url = strings.Replace(url, "{producername}", paramProducername, 1) req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiStopProducer stop-producer func WaspOpenapiStopProducer(paramProducername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "stop-producer" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/producers/{producername}/stop" url = strings.Replace(url, "{producername}", paramProducername, 1) req := cli.Client.Post().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListRaw list-raw func WaspOpenapiListRaw(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-raw" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/raw" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetRaw get-raw func WaspOpenapiGetRaw(paramModelname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-raw" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/raw/{modelname}" url = strings.Replace(url, "{modelname}", paramModelname, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiStats stats func WaspOpenapiStats(paramStarttimestamp string, paramEndtimestamp string, paramSize string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "stats" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/stats" req := cli.Client.Get().URL(url) req = req.AddQuery("startTimestamp", paramStarttimestamp) req = req.AddQuery("endTimestamp", paramEndtimestamp) req = req.AddQuery("size", paramSize) cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListStrategies list-strategies func WaspOpenapiListStrategies(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-strategies" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/strategy" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListTelemetryMetric list-telemetry-metric func WaspOpenapiListTelemetryMetric(paramSearch string, paramSource string, paramSize string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-telemetry-metric" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/telemetry/metrics" req := cli.Client.Get().URL(url) req = req.AddQuery("search", paramSearch) req = req.AddQuery("source", paramSource) req = req.AddQuery("size", paramSize) cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetTelemetrySeries get-telemetry-series func WaspOpenapiGetTelemetrySeries(paramMetric string, paramSource string, paramSize string, paramStarttimestamp string, paramEndtimestamp string, paramAggregate string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-telemetry-series" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/telemetry/series" req := cli.Client.Get().URL(url) req = req.AddQuery("metric", paramMetric) req = req.AddQuery("source", paramSource) req = req.AddQuery("size", paramSize) req = req.AddQuery("startTimestamp", paramStarttimestamp) req = req.AddQuery("endTimestamp", paramEndtimestamp) req = req.AddQuery("aggregate", paramAggregate) cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListTelemetrySource list-telemetry-source func WaspOpenapiListTelemetrySource(paramSearch string, paramSize string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-telemetry-source" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/telemetry/sources" req := cli.Client.Get().URL(url) req = req.AddQuery("search", paramSearch) req = req.AddQuery("size", paramSize) cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiListTopic list-topic func WaspOpenapiListTopic(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-topic" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/topics" req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } // WaspOpenapiGetTopic get-topic func WaspOpenapiGetTopic(paramTopicname string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-topic" if waspOpenapiSubcommand { handlerPath = "wasp-openapi " + handlerPath } server := viper.GetString("server") if server == "" { server = waspOpenapiServers()[viper.GetInt("server-index")]["url"] } url := server + "/topics/{topicname}" url = strings.Replace(url, "{topicname}", paramTopicname, 1) req := cli.Client.Get().URL(url) paramPretty := params.GetBool("pretty") if paramPretty != false { req = req.AddQuery("pretty", fmt.Sprintf("%v", paramPretty)) } cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() if err != nil { return nil, nil, errors.Wrap(err, "Request failed") } var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { return nil, nil, errors.Wrap(err, "Unmarshalling response failed") } } else { return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) } after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { decoded = after.(map[string]interface{}) } return resp, decoded, nil } func waspOpenapiRegister(subcommand bool) { root := cli.Root if subcommand { root = &cobra.Command{ Use: "wasp-openapi", Short: "wasp-api", Long: cli.Markdown(""), } waspOpenapiSubcommand = true } else { cli.Root.Short = "wasp-api" cli.Root.Long = cli.Markdown("") } func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "insert-batch-job", Short: "insert-batch-job", Long: cli.Markdown("Inserts a new batch job\n## Request Schema (text/json)\n\nproperties:\n creationTime:\n format: int64\n type: integer\n description:\n type: string\n etl:\n discriminator:\n propertyName: type\n oneOf:\n - $ref: '#/components/schemas/BatchETLModel'\n - $ref: '#/components/schemas/BatchGdprETLModel'\n exclusivityConfig:\n $ref: '#/components/schemas/BatchJobExclusionConfig'\n name:\n type: string\n owner:\n type: string\n system:\n type: boolean\nrequired:\n- name\n- description\n- owner\n- system\n- creationTime\n- etl\n- exclusivityConfig\ntype: object\nxml:\n name: BatchJobModel\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiInsertBatchJob(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "update-batch-job", Short: "update-batch-job", Long: cli.Markdown("Inserts a new batch job\n## Request Schema (text/json)\n\nproperties:\n creationTime:\n format: int64\n type: integer\n description:\n type: string\n etl:\n discriminator:\n propertyName: type\n oneOf:\n - $ref: '#/components/schemas/BatchETLModel'\n - $ref: '#/components/schemas/BatchGdprETLModel'\n exclusivityConfig:\n $ref: '#/components/schemas/BatchJobExclusionConfig'\n name:\n type: string\n owner:\n type: string\n system:\n type: boolean\nrequired:\n- name\n- description\n- owner\n- system\n- creationTime\n- etl\n- exclusivityConfig\ntype: object\nxml:\n name: BatchJobModel\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiUpdateBatchJob(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-batch-job", Short: "list-batch-job", Long: cli.Markdown("Lists all barch jobs"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListBatchJob(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "delete-batch-job batchjobname", Short: "delete-batch-job", Long: cli.Markdown("Deletes a Batch Job"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiDeleteBatchJob(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-batch-job-instance batchjobname", Short: "list-batch-job-instance", Long: cli.Markdown("Lists all instances of a batch job"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListBatchJobInstance(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-batch-job-instance batchjobname instance", Short: "get-batch-job-instance", Long: cli.Markdown("Get a batch job instance"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetBatchJobInstance(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "start-batch-job batchjobname", Short: "start-batch-job", Long: cli.Markdown("Starts a batch job"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiStartBatchJob(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-elastic-config", Short: "get-elastic-config", Long: cli.Markdown("Retrieves the configuration used to connect to elastic"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetElasticConfig(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-kafka-config", Short: "get-kafka-config", Long: cli.Markdown("Retrieves the configuration used to connect to Kafka"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetKafkaConfig(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-solr-config", Short: "get-solr-config", Long: cli.Markdown("Retrieves the configuration used to connect to solr"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetSolrConfig(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-spark-batch-config", Short: "get-spark-batch-config", Long: cli.Markdown("Retrieves the configuration of the Spark Batch context"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetSparkBatchConfig(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-spark-streaming-config", Short: "get-spark-streaming-config", Long: cli.Markdown("Retrieves the configuration of the Spark Streaming context"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetSparkStreamingConfig(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-telemetry-config", Short: "get-telemetry-config", Long: cli.Markdown("Retrieves the configuration of the telemetry subsystem"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetTelemetryConfig(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-document", Short: "list-document", Long: cli.Markdown("Retrieves all models used to write or read from Document Stores"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListDocument(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-document documentname", Short: "get-document", Long: cli.Markdown("Retrieves the model used to write or read from Document Stores"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetDocument(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "commit-processgroup processgroupid", Short: "commit-processgroup", Long: cli.Markdown("Confirm that a process group edited on a editor instance it's ready to be stored."), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiCommitProcessgroup(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "new-processgroup processgroupname", Short: "new-processgroup", Long: cli.Markdown("Create a new processGroup on a stateless nifi instance with name processGroupName, returns a processgroupId and the instance url."), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiNewProcessgroup(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "post-pipegraph", Short: "post-pipegraph", Long: cli.Markdown("Pipegraph generation from RawPipegraph\n## Request Schema (text/json)\n\nproperties:\n description:\n type: string\n name:\n type: string\n owner:\n nullable: true\n type: string\n structuredStreamingComponents:\n items:\n $ref: '#/components/schemas/StructuredStreamingETLDTO'\n type: array\nrequired:\n- name\n- description\n- structuredStreamingComponents\ntype: object\nxml:\n name: PipegraphDTO\n namespace: java://it.agilelab.bigdata.wasp.models.editor\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiPostPipegraph(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "events search starttimestamp endtimestamp page size", Short: "events", Long: cli.Markdown("Retrieves events entries"), Example: examples, Args: cobra.MinimumNArgs(5), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiEvents(args[0], args[1], args[2], args[3], args[4], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-freecode", Short: "list-freeCode", Long: cli.Markdown("Retrieves the models used to create a free code strategy"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListFreeCode(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "insert-freecode", Short: "insert-freeCode", Long: cli.Markdown("Inserts a freeCode model\n## Request Schema (application/json)\n\nproperties:\n code:\n type: string\n name:\n type: string\nrequired:\n- name\n- code\ntype: object\nxml:\n name: FreeCodeModel\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("application/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiInsertFreeCode(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "complete-freecode position", Short: "complete-freeCode", Long: cli.Markdown("complete the code of a freeCode model\n## Request Schema (application/json)\n\nproperties:\n code:\n type: string\nrequired:\n- code\ntype: object\nxml:\n name: FreeCode\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiCompleteFreeCode(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-freecode modelname", Short: "get-freeCode", Long: cli.Markdown("Retrieves the models used to create a free code strategy"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetFreeCode(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "validate-freecode", Short: "validate-freeCode", Long: cli.Markdown("Validates a freeCode model\n## Request Schema (application/json)\n\nproperties:\n code:\n type: string\nrequired:\n- code\ntype: object\nxml:\n name: FreeCode\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("application/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiValidateFreeCode(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-index", Short: "list-index", Long: cli.Markdown("Retrieve all models used to read or write indexed Data Stores"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListIndex(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-index indexname", Short: "get-index", Long: cli.Markdown("Retrieves all models used to read or write Indexed data stores"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetIndex(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-keyvalue", Short: "list-keyvalue", Long: cli.Markdown("Retrieves all models used to write or read from KeyValue Stores"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListKeyvalue(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-keyvalue modelname", Short: "get-keyvalue", Long: cli.Markdown("Retrieves the model used to write or read from KeyValue Stores"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetKeyvalue(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "logs search starttimestamp endtimestamp page size", Short: "logs", Long: cli.Markdown("Retrieves logs entries"), Example: examples, Args: cobra.MinimumNArgs(5), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiLogs(args[0], args[1], args[2], args[3], args[4], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-mlmodel", Short: "list-mlmodel", Long: cli.Markdown("Retrieve all machine learning models info"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListMlmodel(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "insert-mlmodel", Short: "insert-mlmodel", Long: cli.Markdown("Inserts a new MlModel\n## Request Schema (text/json)\n\nproperties:\n className:\n nullable: true\n type: string\n description:\n type: string\n favorite:\n type: boolean\n modelFileId:\n description: Should be a valid mongodb bsonobject formatted as hex string\n example: 507f1f77bcf86cd799439011\n nullable: true\n type: string\n name:\n type: string\n timestamp:\n format: int64\n nullable: true\n type: integer\n version:\n type: string\nrequired:\n- name\n- version\n- favorite\n- description\ntype: object\nxml:\n name: MlModelOnlyInfo\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiInsertMlmodel(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "update-mlmodel", Short: "update-mlmodel", Long: cli.Markdown("Updates a machine learning model\n## Request Schema (text/json)\n\nproperties:\n className:\n nullable: true\n type: string\n description:\n type: string\n favorite:\n type: boolean\n modelFileId:\n description: Should be a valid mongodb bsonobject formatted as hex string\n example: 507f1f77bcf86cd799439011\n nullable: true\n type: string\n name:\n type: string\n timestamp:\n format: int64\n nullable: true\n type: integer\n version:\n type: string\nrequired:\n- name\n- version\n- favorite\n- description\ntype: object\nxml:\n name: MlModelOnlyInfo\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiUpdateMlmodel(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "delete-mlmodel mlmodelname mlmodelversion", Short: "delete-mlmodel", Long: cli.Markdown("Delete a Machine learning model"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiDeleteMlmodel(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-mlmodel mlmodelname mlmodelversion", Short: "get-mlmodel", Long: cli.Markdown("Retrieves data on a specific Machine Learning model"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetMlmodel(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-pipegraph", Short: "list-pipegraph", Long: cli.Markdown("Lists all pipegraphs"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListPipegraph(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "insert-pipegraph", Short: "insert-pipegraph", Long: cli.Markdown("Inserts a pipegraph\n## Request Schema (text/json)\n\nproperties:\n creationTime:\n format: int64\n type: integer\n dashboard:\n $ref: '#/components/schemas/DashboardModel'\n description:\n type: string\n isSystem:\n type: boolean\n labels:\n items:\n type: string\n type: array\n legacyStreamingComponents:\n items:\n $ref: '#/components/schemas/LegacyStreamingETLModel'\n type: array\n name:\n type: string\n owner:\n type: string\n rtComponents:\n items:\n $ref: '#/components/schemas/RTModel'\n type: array\n structuredStreamingComponents:\n items:\n $ref: '#/components/schemas/StructuredStreamingETLModel'\n type: array\nrequired:\n- name\n- description\n- owner\n- isSystem\n- creationTime\n- legacyStreamingComponents\n- structuredStreamingComponents\n- rtComponents\n- labels\ntype: object\nxml:\n name: PipegraphModel\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiInsertPipegraph(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "update-pipegraph", Short: "update-pipegraph", Long: cli.Markdown("updateds a pipegraph\n## Request Schema (text/json)\n\nproperties:\n creationTime:\n format: int64\n type: integer\n dashboard:\n $ref: '#/components/schemas/DashboardModel'\n description:\n type: string\n isSystem:\n type: boolean\n labels:\n items:\n type: string\n type: array\n legacyStreamingComponents:\n items:\n $ref: '#/components/schemas/LegacyStreamingETLModel'\n type: array\n name:\n type: string\n owner:\n type: string\n rtComponents:\n items:\n $ref: '#/components/schemas/RTModel'\n type: array\n structuredStreamingComponents:\n items:\n $ref: '#/components/schemas/StructuredStreamingETLModel'\n type: array\nrequired:\n- name\n- description\n- owner\n- isSystem\n- creationTime\n- legacyStreamingComponents\n- structuredStreamingComponents\n- rtComponents\n- labels\ntype: object\nxml:\n name: PipegraphModel\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiUpdatePipegraph(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "delete-pipegraph pipegraphname", Short: "delete-pipegraph", Long: cli.Markdown("Deletes a pipegraph"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiDeletePipegraph(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-pipegraph-instance pipegraphname", Short: "list-pipegraph-instance", Long: cli.Markdown("List all instances of a pipegraph"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListPipegraphInstance(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-pipegraph-instance pipegraphname instance", Short: "get-pipegraph-instance", Long: cli.Markdown("Retrieves a pipegraph instance"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetPipegraphInstance(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "start-pipegraph pipegraphname", Short: "start-pipegraph", Long: cli.Markdown("Starts a new instance of pipegraph"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiStartPipegraph(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "stop-pipegraph pipegraphname", Short: "stop-pipegraph", Long: cli.Markdown("Stops the running instance of a pipegrah"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiStopPipegraph(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-producer", Short: "get-producer", Long: cli.Markdown("Retrieves all producers"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetProducer(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "insert-producer", Short: "insert-producer", Long: cli.Markdown("Inserts a producer\n## Request Schema (text/json)\n\nproperties:\n className:\n type: string\n configuration:\n nullable: true\n type: string\n isActive:\n type: boolean\n isRemote:\n type: boolean\n isSystem:\n type: boolean\n name:\n type: string\n topicName:\n nullable: true\n type: string\nrequired:\n- name\n- className\n- isActive\n- isRemote\n- isSystem\ntype: object\nxml:\n name: ProducerModel\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiInsertProducer(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "update-producer", Short: "update-producer", Long: cli.Markdown("Updates a new producer\n## Request Schema (text/json)\n\nproperties:\n className:\n type: string\n configuration:\n nullable: true\n type: string\n isActive:\n type: boolean\n isRemote:\n type: boolean\n isSystem:\n type: boolean\n name:\n type: string\n topicName:\n nullable: true\n type: string\nrequired:\n- name\n- className\n- isActive\n- isRemote\n- isSystem\ntype: object\nxml:\n name: ProducerModel\n namespace: java://it.agilelab.bigdata.wasp.models\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("text/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiUpdateProducer(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "delete-producer producername", Short: "delete-producer", Long: cli.Markdown("Deletes a producer"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiDeleteProducer(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "start-producer producername", Short: "start-producer", Long: cli.Markdown("Start a producer"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiStartProducer(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "stop-producer producername", Short: "stop-producer", Long: cli.Markdown("Stop a producerj"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } _, decoded, err := WaspOpenapiStopProducer(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-raw", Short: "list-raw", Long: cli.Markdown("Retrieves all models used to write or read from Raw Stores"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListRaw(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-raw modelname", Short: "get-raw", Long: cli.Markdown("Retrieves the model used to write or read from Raw Stores"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetRaw(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "stats starttimestamp endtimestamp size", Short: "stats", Long: cli.Markdown("Retrieve stats about logs, events and metrics"), Example: examples, Args: cobra.MinimumNArgs(3), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiStats(args[0], args[1], args[2], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-strategies", Short: "list-strategies", Long: cli.Markdown("Retrieves the possible strategies"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListStrategies(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-telemetry-metric search source size", Short: "list-telemetry-metric", Long: cli.Markdown("List top telemetry metrics for source matching search"), Example: examples, Args: cobra.MinimumNArgs(3), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListTelemetryMetric(args[0], args[1], args[2], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-telemetry-series metric source size starttimestamp endtimestamp aggregate", Short: "get-telemetry-series", Long: cli.Markdown("Retrieves series data pre aggregated by the server for display"), Example: examples, Args: cobra.MinimumNArgs(6), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetTelemetrySeries(args[0], args[1], args[2], args[3], args[4], args[5], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-telemetry-source search size", Short: "list-telemetry-source", Long: cli.Markdown("List top telemetry sources matching search"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListTelemetrySource(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "list-topic", Short: "list-topic", Long: cli.Markdown("Lists all models used to write or read from message queues"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiListTopic(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() func() { params := viper.New() var examples string cmd := &cobra.Command{ Use: "get-topic topicname", Short: "get-topic", Long: cli.Markdown("Retrieves the model used to write or read from message queues"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { _, decoded, err := WaspOpenapiGetTopic(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } }, } root.AddCommand(cmd) cmd.Flags().String("pretty", "", "") cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { params.BindPFlags(cmd.Flags()) } }() }
go