text
stringlengths
1
1.04M
language
stringclasses
25 values
<filename>_data/proposition/P_cdadom1.json<gh_stars>0 { "citations" : [ { "textCitation" : "[See cdadom1 on Metamath](http://us.metamath.org/mpegif/cdadom1.html)" } ], "names" : [ "cdadom1" ], "language" : "METAMATH_SET_MM", "lookupTerms" : [ "#T_cA", "#T_cdom", "#T_cB", "#T_wi", "#T_cA", "#T_ccda", "#T_cC", "#T_cdom", "#T_cB", "#T_ccda", "#T_cC" ], "metaLanguage" : "METAMATH", "remarks" : " Ordering law for cardinal addition. Exercise 4.56(f) of [Mendelson] p. 258. (Contributed by NM, 28-Sep-2004.) (Revised by <NAME>, 29-Apr-2015.) ", "statement" : "cdadom1 $p |- ( A ~<_ B -> ( A +c C ) ~<_ ( B +c C ) ) $." }
json
const Message = require('./Message') const semver = require('semver') const debug = require('./debug')('Server') const packageJson = require('../package.json') const { ApiFunction, ApiModule, ApiConstant, METADATA_API_NAME } = require('./Api') const { isFunction, isObject } = require('util') class Server { constructor() { this._apis = new Map() this._defaultVersion = semver.clean(process.version) this.addApiModule(METADATA_API_NAME, new ServerApi(this), packageJson.version) } get defaultVersion() { return this._defaultVersion } dispatch({ apiName, propertyName, version = this._defaultVersion, args = [] }, reply) { debug(`dispatch() apiName="${apiName}" propertyName="${propertyName}" version="${version}" args.length=${args.length}`) let message = new Message({ apiName, propertyName, version, args }) if (!isFunction(reply)) { throw new Error('missing or invalid reply argument') } let api try { api = this.getApi(apiName, version) } catch (e) { debug(e) return reply(e) } if (api) { return api.dispatch(message, reply) } return reply(new Error('no such api')) } getApi(name, version = this._defaultVersion) { debug(`getApi() name="${name}" version="${version}"`) let versions = this._getApiVersions(name) if (!versions) { throw new Error(`api ${name} does not exist`) } let bestVersion = this._getBestApiVersion(versions.keys(), version) if (!bestVersion) { throw new Error(`could not find an api version that satisfies "${version}" for api "${name}"`) } return versions.get(bestVersion) } getApiArtifact(name, version) { let api = this.getApi(name, version) if (api) return api.artifact } addApiFunction(name, fn, version) { this._addApi(ApiFunction, name, fn, version) } addApiModule(name, mdl, version, filters) { this._addApi(ApiModule, name, mdl, version, filters) } requireApiModule(name, filters) { let mdl = require(name) let version try { let packageJson = require(`${name}/package.json`) version = packageJson.version } catch (e) { // assign the node version to anything that doesn't have a package version (such as core modules) version = this._defaultVersion } this.addApiModule(name, mdl, version, filters) } addApiConstant(name, constant, version) { this._addApi(ApiConstant, name, constant, version) } [Symbol.iterator]() { return this._apis.entries() } _addApi(Impl, name, artifact, version = this._defaultVersion, filters) { debug(`_addApi() class="${Impl.name}" name="${name}" version="${version}"`) let api = new Impl(name, artifact, version, filters) let versions = this._getApiVersions(api.name) if (!versions) { versions = new Map() this._apis.set(name, versions) } versions.set(version, api) } _getBestApiVersion(versions, targetVersion) { debug('_getBestApiVersion() %o, "%s")', versions, targetVersion) let best = '0.0.0' for (let version of versions) { debug(`testing "${version}" against "${targetVersion}"`) // if the current version in the iteration satisfies the demand of target version // and if it is >= the best match so far then replace it if (semver.satisfies(version, targetVersion) && semver.satisfies(version, `>=${best}`)) { debug(`selecting "${version}"" as best match so far`) best = version } } // return nothing if we didn't find a good match if (best !== '0.0.0') { debug(`"${best}"" best satisfies "${targetVersion}"`) return best } debug(`did not find a version that satisfies "${targetVersion}"`) } _getApiVersions(name) { return this._apis.get(name) } } class ServerApi { constructor(server) { this._server = server } getApis(reply) { let result = {} for (let [name, versions] of this._server) { let version = this._findLatestVersion(versions) let api = versions.get(version) if (!api) { throw new Error('expected an api object here, this is a bug') } result[name] = api.descriptor } reply(null, result) } _findLatestVersion(versions) { let latest = '0.0.0' for (let version of versions) { if (semver.satisfies(version[0], '>' + latest)) { latest = version[0] } } return latest } } module.exports = Server
javascript
<filename>linked_article_tropes/linked_trope_dict_from_OverlyNarrowSuperlative.json {"OverlyNarrowSuperlative": ["AKindOfOne", "SharpshooterFallacy", "StealthInsult", "DamnedByFaintPraise", "SelfDeprecation", "IdiotBall", "DramaticIrony", "MathematiciansAnswer", "SuspiciouslySpecificDenial", "EverythingExceptMostThings", "TriviallyObvious", "DamnedByFaintPraise", "MedalOfDishonor", "GuinnessEpisode", "TakeThat", "TVE1", "TakeThat", "TVE1", "LampshadeHanging", "Cyborg", "EvolutionaryLevels", "BilingualBonus", "WhatMeasureIsANonHuman", "RunningGag", "LampshadeHanging", "NeverLiveItDown", "DetectiveAnimal", "EnsembleDarkhorse", "StepfordSuburbia", "DeadpanSnarker", "LampshadeHanging", "InvertedTrope", "InvertedTrope", "DeadpanSnarker", "BrotherSisterIncest", "ItMakesSenseInContext", "OncePerEpisode", "FirstContact", "TheGhost", "LampshadeHanging", "TheNarrator", "RunningGag", "AfterTheEnd", "OncePerEpisode", "FirstContact", "TheGhost", "BlatantLies", "BlatantLies", "LampshadeHanging", "OldShame", "ReducedToRatBurgers", "HumanPopsicle", "TheStinger", "TheAloner", "CriminalDoppelganger", "CurbStompBattle", "TakeThat", "AcceptableTargets", "SerialEscalation", "AcceptableTargets", "FeetOfClay", "FeetOfClay", "TimeyWimeyBall", "ZanyScheme", "AdventureArchaeologist", "LargeHam", "ShowWithinAShow", "PoliceProcedural", "ShapedLikeItself", "DragQueen", "ItsAWonderfulPlot", "EveryoneCallsHimBarkeep", "DontExplainTheJoke", "ZanyScheme", "AdventureArchaeologist", "ItsAWonderfulPlot", "EveryoneCallsHimBarkeep", "DontExplainTheJoke", "OOCIsSeriousBusiness", "TakeThat", "OopNorth", "Pun", "TheSixties", "TeenIdol", "GirlGroup", "WordOfGod", "SarcasmMode", "DontExplainTheJoke", "RuleOfThree", "SelfDeprecation", "TheEeyore", "LogicBomb", "RuleOfThree", "RuleOfThree", "NormalFishInATinyPond", "ExitPursuedByABear", "TheMusical", "TemptingFate", "ExitPursuedByABear", "StepfordSmiler", "SleazyPolitician", "SycophanticServant", "MadScientist", "WeakWilled", "SubvertedTrope", "AmbiguousSyntax", "NiceHat", "LastOfHisKind", "SoundEffectBleep", "Mooks", "MirrorMatch", "SuperSpeed", "DependingOnTheWriter", "MultipleEndings", "TakeThat", "OlderThanTheyThink", "LampshadeHanging", "FunnyAnimal", "MrFanservice", "AprilFoolsDay", "SpeedRun", "Lampshades", "SuperZeroes", "SuperStrength", "AdjectiveAnimalAlehouse", "LastOfHisKind", "SoundEffectBleep", "SuperSpeed", "DependingOnTheWriter", "MultipleEndings", "StrangeMindsThinkAlike", "ShapedLikeItself", "CloudCuckooLander", "StrangeMindsThinkAlike", "ShapedLikeItself", "CloudCuckooLander", "Hereville", "ScienceFictionFilms", "ScienceFictionFilm", "BonoboConspiracy", "MemeticMutation", "TheRant", "TheVirus", "TheRant", "MemeticMutation", "TheVirus", "NormalFishInATinyPond", "LampshadeHanging", "CrackFic", "RealTrailerFakeMovie", "SuspiciouslySpecificDenial", "NormalFishInATinyPond", "CrackFic", "RealTrailerFakeMovie", "GuiltyPleasures", "LampshadeHanging", "NaziZombies", "DuelingWorks", "LampshadeHanging", "Scatting", "BMovie", "LifetimeMovieOfTheWeek", "LargeHam", "HoistByHisOwnPetard", "TrueArtIsIncomprehensible", "LeFilmArtistique", "ShowWithinAShow", "EasterEgg", "FutureBadass", "DeadpanSnarker", "FanNickname", "SubvertedTrope", "ChristmasEpisode", "PerfectlyCromulentWord", "SubvertedTrope", "YouAreNumberSix", "EasterEgg", "FutureBadass", "DeadpanSnarker", "FanNickname", "SubvertedTrope", "PerfectlyCromulentWord", "SubvertedTrope", "SmallNameBigEgo", "OncePerEpisode", "ShapedLikeItself", "BadassBoast", "TheGreatPoliticsMessUp", "Toku", "LostInTranslation", "ShapedLikeItself"]}
json
{ "category" : "RestTalk", "classinstvars" : [ ], "classvars" : [ ], "commentStamp" : "PhilippeBack 10/25/2016 19:48", "instvars" : [ "username", "password", "endpontUrl", "endpointUrl", "absoluteUrl", "baseUrl", "extraFields", "defaultHttpFields", "plainByDefault", "defaults", "encodeIds", "defaultRequestParams", "defaultHeaders", "overriders", "jsonp", "urlCreator", "resttalkFields", "resttalked", "responseInterceptors", "responseExtractor", "errorInterceptors", "suffix", "transformers", "requestSuffix" ], "name" : "RestTalkConfiguration", "pools" : [ ], "super" : "Object", "type" : "normal" }
json
<gh_stars>0 { "name": "polymer-sock-js", "version": "2.0.0", "authors": [ "<NAME> <<EMAIL>>" ], "description": "A web component for making wrapper under Socket Js protocol", "main": "sock-js.html", "keywords": [ "websocket", "sockjs", "polymer", "webcomponent" ], "license": "MIT", "ignore": [ "**/.*", "node_modules", "bower_components", "test", "tests" ], "dependencies": { "polymer": "Polymer/polymer#^2.0.0" }, "devDependencies": { "web-component-tester": "*" } }
json
The Reserve Bank of India (RBI) has asked private sector lender HDFC Bank to temporarily stop all launches of its digital business generating activities under “Digital 2. 0” programme, and sourcing of new credit card customers. On December 2, the RBI issued an order to HDFC Bank with regard to certain incidents of outages in the Internet banking, mobile banking and payment utilities of the bank over the past two years. This included the recent outages in the bank’s Internet banking and payment system on November 21, 2020 due to a power failure in the primary data centre. The RBI advised the bank to temporarily stop all launches of the digital business generating activities planned under its programme Digital 2. 0 (to be launched) and other proposed business generating IT applications, and sourcing of new credit card customers. On December 23, 2019, customers faced issues while making loan EMIs and settling credit card bills. The order stated that the bank’s board should examine the lapses and fix accountability. The measures will be considered for lifting upon satisfactory compliance with the major critical observations as identified by the RBI. The bank said these measures will not materially impact its overall business. However, HDFC Bank, which is the market leader in credit card business, won’t be able to acquire new credit card customers till the problems are rectified and the RBI gives its clearance. The bank’s digital expansion plans are likely to be delayed due to the RBI action. Being pulled up by the regulator could also hit the image of the bank. Don’t miss from Explained | Corporates as banks: What led to this recommendation, and why has it come in for criticism?
english
{ "id": "b21", "symbol": "b21", "name": "B21", "platforms": { "ethereum": "0x6faa826af0568d1866fca570da79b318ef114dab", "binance-smart-chain": "0x70512c7f3d3009be997559d279b991461c451d70" }, "hashing_algorithm": null, "categories": [ "Finance / Banking", "Number", "Polygon Ecosystem" ], "description": { "en": "B21 is a fintech company headquartered in Gibraltar and is the developer of a personal wealth management platform exclusively for cryptoassets. B21 is a mobile focused investment platform that enables the mass market to create their own portfolio of cryptocurrencies like Bitcoin, Ethereum, EOS and many others." }, "country_origin": "GI", "genesis_date": null, "contract_address": "0x6faa826af0568d1866fca570da79b318ef114dab", "url": "http://www.b21.io/#/ico", "explorers": [ "https://etherscan.io/token/0x6faa826af0568d1866fca570da79b318ef114dab", "https://ethplorer.io/address/0x6faa826af0568d1866fca570da79b318ef114dab" ], "twitter": "B21Official", "facebook": "B21Official", "telegram": "B21Official", "reddit": "B21Official/" }
json
<filename>translationRecorder/app/src/main/assets/notes/tn/psa-ch-145/chunks.json [{"id": "001", "tn": [{"ref": "General Information:", "text": "Parallelism is common in Hebrew poetry. (See: [[:en:ta:vol2:translate:writing_poetry]] and [[:en:ta:vol2:translate:figs_parallelism]])"}, {"ref": "A psalm of praise. Of David", "text": "\"This is a psalm of praise that David wrote.\""}, {"ref": "extol you", "text": "\"tell people how wonderful you are\""}, {"ref": "bless your name", "text": "The word \"name\" is a metonym for Yahweh himself. See how \"may his glorious name be blessed\" is translated in [[:en:bible:notes:psa:072:018|72:19]]. AT: \"bless you\" or \"do what makes you happy\" (See: [[:en:ta:vol2:translate:figs_metonymy]])"}, {"ref": "praise your name", "text": "The word \"name\" is a metonym for Yahweh himself. AT: \"praise you\" or \"tell people how great you are\" (See: [[:en:ta:vol2:translate:figs_metonymy]])"}]}, {"id": "004", "tn": [{"ref": "your mighty actions", "text": "\"the things you can do because you are strong\""}]}, {"id": "006", "tn": [{"ref": "declare your abounding goodness", "text": "\"tell others how very good you are\""}]}, {"id": "008", "tn": [{"ref": "abounding in covenant faithfulness", "text": "The psalmist speaks of covenant faithfulness as if it were a physical object of which one could possess a large amount. AT: \"totally faithful to his covenant\" (See: [[:en:ta:vol1:translate:figs_metaphor]])"}, {"ref": "his tender mercies are over all his works", "text": "\"people can see him showing mercy in everything he does\""}]}, {"id": "010", "tn": [{"ref": "All you have made will give thanks", "text": "\"All the people you have made will give thanks\" or \"It will be as if everything you have made will give you thanks\""}]}, {"id": "013", "tn": [{"ref": "endures throughout all generations", "text": "\"remains forever\" (See: [[:en:ta:vol1:translate:figs_metaphor]] and [[:en:ta:vol1:translate:figs_idiom]])"}]}, {"id": "014", "tn": [{"ref": "supports all who are falling ... raises up all those who are bent over", "text": "The psalmist speaks of Yahweh encouraging people as if he were helping people who were physically weak. You may need to translate both lines using only one line. AT \"encourages those who are discouraged\" (See: [[:en:ta:vol1:translate:figs_metaphor]])"}, {"ref": "The eyes of all wait", "text": "\"Everyone waits\" (See: [[:en:ta:vol2:translate:figs_synecdoche]])"}, {"ref": "You open your hand", "text": "\"You generously provide\""}, {"ref": "satisfy the desire of every living thing", "text": "\"you give everyone more than they need and as much as they want\""}]}, {"id": "017", "tn": [{"ref": "Yahweh is righteous in all his ways", "text": "\"People can see from everything that Yahweh does that he is righteous\""}, {"ref": "gracious in all he does", "text": "\"and he is gracious in all he does\" or \"people can see from everything that Yahweh does that he is gracious\""}, {"ref": "is near to all those who call to him", "text": "\"acts quickly to help those who pray\" (See: [[:en:ta:vol1:translate:figs_metaphor]])"}, {"ref": "to all who call to him in trustworthiness", "text": "\"to all who tell only the truth when they pray\" or \"to all whom he trusts when they pray\" (See: [[:en:ta:vol2:translate:figs_abstractnouns]])"}]}, {"id": "020", "tn": [{"ref": "My mouth will", "text": "\"I will\" (See: [[:en:ta:vol2:translate:figs_synecdoche]])"}, {"ref": "will speak out the praise of Yahweh", "text": "\"tell everyone how good Yahweh is\""}, {"ref": "let all mankind bless his holy name", "text": "The word \"name\" is a metonym for Yahweh himself. See how \"may his glorious name be blessed\" is translated in [[:en:bible:notes:psa:072:018|72:19]]. AT: \"let all people bless him\" or \"let all people do what makes him happy\" (See: [[:en:ta:vol2:translate:figs_metonymy]])"}]}]
json
<gh_stars>0 { "website_credentials": { "build_a_robot_url": "https://robotsparebinindustries.com/#/robot-order" } }
json
Chennai: The ruling AIADMK in Tamil Nadu hit out at DMK chief M K Stalin on Tuesday for saying his party would decide on being part of the next Union cabinet formed by "whichever party" after the Lok Sabha results, asking what was his "hesitation" over standing firmly with ally Congress. Asked if the Dravida Munnetra Kazhagam (DMK) would be a part of the next Union cabinet formed by "whichever party", Stalin had said, "I can respond to this only after the conclusion of counting on May 23. " Latching on to his statement, All India Anna Dravida Munnetra Kazhagam (AIADMK) mouthpiece "Namathu Amma" pointed out that the DMK was an ally of the Congress and therefore, Stalin should have said his party would only be a part of the UPA cabinet. "If he was an honest leader and a politician who stood by his principles, shouldn't he have said that the DMK will not be part of any other (central) cabinet than the one headed by the Congress? ," a write-up in the AIADMK mouthpiece asked. "What is the logic behind saying he will respond to this after counting," it added. Recalling state BJP chief Tamilisai Soundararajan's recent statement that the DMK was in talks with the saffron party, possibly for a post-poll alliance, the article said she had "exposed Stalin's double standards". "It is clear that Stalin is only keen on securing cabinet berths (for the DMK) and not following (coalition) principles," it charged. What was the "hesitation" on his part to declare that his party would be a part of only the Congress-led alliance and not any other grouping, it asked. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - PTI)
english
<reponame>codetojoy/ping_pong_java_rmi_mixed_mode package net.codetojoy.client.config; import net.codetojoy.common.PongService; import net.codetojoy.common.rmi.Constants; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Configuration; import org.springframework.remoting.rmi.RmiRegistryFactoryBean; import org.springframework.remoting.rmi.RmiProxyFactoryBean; @Configuration public class Config { protected static final String BEAN_PONG_SERVICE = "pongService"; @Bean public RmiRegistryFactoryBean myRegistry() { RmiRegistryFactoryBean result = new RmiRegistryFactoryBean(); result.setHost(Constants.HOST); result.setPort(Constants.PORT); return result; } @Bean @Lazy public RmiProxyFactoryBean pongService() { RmiProxyFactoryBean pongService = new RmiProxyFactoryBean(); pongService.setServiceUrl(Constants.PONG_SERVICE_URI); pongService.setServiceInterface(net.codetojoy.common.PongService.class); pongService.setRefreshStubOnConnectFailure(true); return pongService; } }
java
Hypixel's take on Minecraft's incredibly popular Skyblock survival map is enjoyed by players around the world. However, finding specific resources on this version can be daunting for newcomers. Like any Skyblock map, players begin with very limited resources. Fortunately, Hypixel has added some useful amenities to their version of Minecraft's Skyblock to help accommodate newer players or players who are somewhat strapped for materials. Due to the RPG elements introduced by Hypixel, the in-game dynamics on this version are different compared to vanilla Minecraft. This means that players will have different methods to get blocks and items. Fortunately, the server's community is helpful and has outlined several methods on its forums and elsewhere. Hypixel provides its Skyblock players with some freedom to acquire obsidian. For example, players may venture to the Obsidian Sanctuary to mine the block, but they will have to contend with the hostile zombies and skeletons who don't take kindly to visitors. Fortunately, there are alternate paths to acquire obsidian in Hypixel Skyblock. If players have reached Combat Level 12, they can enter The End and mine the obsidian there. Typically, there are no hostile mobs in the mining area, allowing players to add to their obsidian reserves peacefully. The End in Hypixel also features a shop where obsidian can be bought, something that vanilla Minecraft Skyblock cannot accomplish, with the closest comparison being trading with villagers. Players who do not want to make trips to The End or the Obsidian Sanctuary can also purchase a large number of water and lava buckets from the Builder Merchant. Upon returning to their island, players can place the lava and douse it with water to naturally create obsidian (the same way it is created in vanilla Minecraft). This method requires a bit of money, so players may want to spend some time improving their cash reserves before going on a spending spree. Lastly, killing Obsidian Defenders will cause them to drop two to three obsidian blocks upon death. This is a 100% guarantee in Hypixel, so combat-oriented players won't have to worry about being lucky while farming the dark defenders. Obsidian Defenders can only be found within the Dragon's Nest, so players hoping to farm them should be as well-equipped as possible to collect their obsidian effectively.
english
<filename>app/content/lexicons/strongs/entries/G962.json {"derivation": "of Hebrew origin (H01004 and H05679);", "kjv_def": "Bethabara", "lemma": "\u0392\u03b7\u03b8\u03b1\u03b2\u03b1\u03c1\u03ac", "frequency": 0, "strongs_def": " ferry-house; Bethabara (i.e. Bethabarah), a place on the Jordan", "outline": "<span class=\"literal-meaning\">Bethabara = &quot;house of the ford&quot;</span><ol><li> a place beyond Jordan, where John was baptising. This may correspond to Bethbarah (fords of Abarah), the ancient ford of the Jordan on the road to Gilead</li></ol>"}
json
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: renderer.js</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Source: renderer.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>define([ // Sadly: text loader plugin doesn't work offline... // "lib/text!article.html.mustache", "lib/mustache.js", "lib/jquery.js" ], function (Mustache) { /** * Format articles into HTML. * * @exports Renderer */ var Renderer = { /** * @property {string} articleTemplate Mustache template for rendering a * single article record. * * FIXME: should pull from the requirejs text loader plugin instead. */ articleTemplate: '&lt;div class="article">' + '&lt;div class="title">{{ title }}&lt;/div>' + '&lt;div class="score">({{ readability }})&lt;/div>' + '&lt;div class="extract">{{ extract }}{{^ extract }}' + '&lt;span class="missing">** No article extract found **&lt;/span>{{/ extract }}' + '&lt;/div>' + '&lt;/div>', /** * Render a list of articles into HTML. * * @param {Object[]} articles */ formatArticleLines: function (articles) { return $.map(articles, this.formatArticleLine); }, /** @protected */ formatArticleLine: function (article) { var params = article; return Mustache.render(Renderer.articleTemplate, params); } }; return Renderer; }); </code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Categories.html">Categories</a></li><li><a href="module-config.html">config</a></li><li><a href="module-Extractor.html">Extractor</a></li><li><a href="module-Main.html">Main</a></li><li><a href="module-Readability.html">Readability</a></li><li><a href="module-Renderer.html">Renderer</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Sat Jul 09 2016 15:53:43 GMT-0700 (PDT) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>
html
"He's a good all-rounder, someone we are going to try to mould along the lines of Shaun Pollock.They are big boots to fill, but he started well" These words were coming from Jacques Kallis in 2008, when Vernon Philander snapped up 4/42 in his One Day International debut against Ireland in Belfast. Kallis, skippering in the absence of Graeme Smith, had overseen Philander, who replaced a rested Pollock, bowl impeccable lines and trouble the minnow batsmen. But that stint in the national team wouldn't last long for Philander. He became a forgotten name soon until he returned to the side in 2011 in whites. This time he was here to stay. A staggering season saw him become the third fastest to 50 wickets in Test history. He did it in seven Tests and 14 innings at a stunning average of 14.15. Unlike Pollock, who he was supposed to replace, Philander did not arrive with express pace. He has matured enough to realise that his strength lay in consistently bowling the right line and length. He was more of a McGrath than a Pollock and thus turned out to be the perfect foil for a rampant Dale Steyn and Morne Morkel in their pinnacle. It wasn't that Philander was an exact swap for the legendary South African fast bowler. Pollock was different. He was also precise with his lines but possessed good pace at the start of his career before mellowing down at a later stage. Yet he was equally effective at all stages of an elaborate and celebrated career. In many ways, the Big Vern and Pollock are similar yet comparing them on the basis of pure numbers reveals an altogether different story. We are showing only the Test numbers between the two since Philander is not a regular in the limited-overs sides and has played quite a number of lesser matches than Pollock in ODI cricket. Since both players played in different eras the overall numbers aren't quite the right way to compare. But it is a good start nevertheless. Pollock played 108 Tests, taking 421 wickets at an average of 23.11 and a strike rate of 57.8, excellent numbers for a fast bowler in the era he played in. Pollock had 16 five-wicket hauls but just a single 10 wicket haul in his Test career. Philander, on the other hand, has 171 wickets in 46 Tests at the moment striking at a rate of 49.4, much better than that of Pollock. He also averages a touch better at 22.45. What really sets apart, or seemingly sets apart, the Big Vern is his sheer dominance in the category of five-wicket and ten-wicket hauls. He has 11 five-fors already in his career to go along with two ten-fors, an exceptional record for a fast bowler. However, when filtering out Pollock's career to his initial 46 Tests, the all-rounder has 190 wickets at an average of 20.46, a shade better than Philander's statistics. He also has 10 five-wicket hauls in these matches, almost touching Philander's numbers. These numbers also kind of reveal Pollock's waning influence in the latter half of his career. With South Africa being a haven for quicker bowlers, both Philander and Pollock enjoyed terrific records. Both are masters of the new, red cherry and exploited favourable conditions to their advantage, albeit in different times. Pollock's home numbers though aren't as good as Philander's. The Big Vern has 96 wickets in 21 home Tests at an eye-catching average of 18.95 and a strike rate of 40.5. Pollock’s numbers aren't that exceptional although they are pretty good in general terms. He had 235 wickets in 59 Tests at 21.08 and a strike rate of 52.6. There is a stark contrast when away numbers are taken. Philander, dominant at home, fades off in away Tests as against Pollock, who holds his own even away from home. Philander has only 69 wickets in 23 away Test matches at an average of 27.27 and a strike rate of 61.2, a huge jump of over 20 from his home strike rate. Pollock, on the other hand, suffers little damage even away from home, having taken 186 wickets in 49 Tests at an average of 25.68. However, his strike rate is worse than Philander's at 64.5. The numbers go completely awry for Philander if the away record is filtered out to the sub-continent alone. Here he averages 32 in seven Tests, having taken only 13 wickets at a strike rate of 79.2. But Pollock has an intact record in this part of the World with 60 wickets in 17 Tests at 23.18 and a strike rate of 56.8, his best outside Africa. It is important to compare the duo's record against left-hand and right handed batsmen. While Philander has been relentless against both lefties and right handers, Pollock has a huge difference in average between the two. Philander averages a miserly 17.90 against southpaws as against 18.95 against the right handers. Pollock has quite a different record though, with averages of 18.76 and 27.17 against right and left handers respectively. Philander has enjoyed considerable success against the likes of Alastair Cook (who he has dismissed the most number of times in his career), Shaun Marsh and David Warner. Pollock. meanwhile, has dismissed Marvan Atapattu and Nasser Hussain the most times in his career. The only left-hander he enjoyed big success against was Sourav Ganguly, whom he dismissed seven times in 12 Tests against each other. Pollock also enjoys a clear lead in terms of batting with the former legend averaging 32.31 as against Philander's 25.78. Pollock also has two hundreds in Test cricket, while Philander's highest score is 74 although he bats at a higher position than what Pollock used to these days. That said, Pollock could not match Philander in terms of striking regularly, which the current Proteas seamer excels in. It can safely be concluded that, though not a like-for-like replacement, Philander's presence helped South Africa get over Pollock's retirement.
english
<filename>src/config/exposition/mod.rs<gh_stars>0 // Copyright 2019 Twitter, Inc. // Licensed under the Apache License, Version 2.0 // http://www.apache.org/licenses/LICENSE-2.0 use serde_derive::*; mod kafka; use self::kafka::*; #[derive(Debug, Default, Deserialize)] #[serde(deny_unknown_fields)] pub struct Exposition { #[serde(default)] #[allow(dead_code)] kafka: Kafka, } impl Exposition { #[cfg(feature = "push_kafka")] pub fn kafka(&self) -> &Kafka { &self.kafka } }
rust
import { CompositeDisposable } from "atom"; import { selectTarget, clearAllHints, selectMultipleTargets } from "./jump"; import { getClickables } from "./clickables"; import { getRanges, getWords, getLines } from "./ranges"; import { flatMap, focusEditor, isEditorVisible } from "./utils"; const disposables = new CompositeDisposable(); type State = {}; export function activate(state: State) { disposables.add( atom.commands.add("atom-workspace", { "monkey:jump": jumpClickables, "monkey:jump-word": jumpWord, "monkey:jump-line": jumpLine, "monkey:select-multiple-words": selectMultipleWords, "monkey:select-multiple-lines": selectMultipleLines, "monkey:select-selection": selectSelection, "monkey:select-multiple-selections": selectMultipleSelections, "monkey:deselect-multiple-selections": deselectMultipleSelections, "monkey:clear-hints": clearAllHints }) ); } export function deactivate() { disposables.dispose(); } export function serialize(): State { return {}; } export const config = { capitalizeHint: { title: "Capitalize hints", description: "Capitalize the jump targets", type: "boolean", default: true }, hintKeys: { title: "Hint keys", description: "A string of characters, which will be used to generate key sequences for the jump targets", type: "string", default: "fjdksla;" } }; async function jumpClickables() { const clickables = getClickables(); const target = await selectTarget(clickables); if (target !== undefined) { target.handler(); } } async function jumpWord() { const editors = atom.workspace.getTextEditors().filter(isEditorVisible); const targets = flatMap(getWords, editors); const target = await selectTarget(targets); if (target !== undefined) { focusEditor(target.textEditor); target.textEditor.setCursorBufferPosition(target.range.start); } } async function selectMultipleWords() { const textEditor = atom.workspace.getActiveTextEditor()!; const targets = getWords(textEditor); const selected = await selectMultipleTargets(targets); if (selected.length > 0) { textEditor.setSelectedScreenRanges(selected.map(x => x.range)); } } async function jumpLine() { const editors = atom.workspace.getTextEditors().filter(isEditorVisible); const targets = flatMap(getLines, editors); const target = await selectTarget(targets); if (target !== undefined) { focusEditor(target.textEditor); target.textEditor.setCursorBufferPosition(target.range.start); } } async function selectMultipleLines() { const textEditor = atom.workspace.getActiveTextEditor()!; const targets = getLines(textEditor); const selected = await selectMultipleTargets(targets); if (selected.length > 0) { textEditor.setSelectedScreenRanges(selected.map(x => x.range)); } } async function selectSelection() { const textEditor = atom.workspace.getActiveTextEditor()!; const targets = getRanges(textEditor); const target = await selectTarget(targets); if (target !== undefined) { textEditor.setSelectedScreenRange(target.range); } } async function selectMultipleSelections() { const textEditor = atom.workspace.getActiveTextEditor()!; const targets = getRanges(textEditor); const selected = await selectMultipleTargets(targets); if (selected.length > 0) { textEditor.setSelectedScreenRanges(selected.map(x => x.range)); } } async function deselectMultipleSelections() { const textEditor = atom.workspace.getActiveTextEditor()!; const targets = getRanges(textEditor); const selected = await selectMultipleTargets(targets, { selected: true }); if (selected.length > 0) { textEditor.setSelectedScreenRanges(selected.map(x => x.range)); } }
typescript
{ "name": "EADOG", "keywords": "mbed, lcd, EA DOG, EA DOGl128, EA DOGM128, EA DOGM132, Electronic Assembly", "description": "A library for the LCDs from Electronic Assembly. EA DOGL128, EA DOGM128, EA DOGM132", "repository": { "type": "git", "url": "https://github.com/sstaub/EADOG" }, "version": "1.0.1", "frameworks": "mbed", "platforms": "*" }
json
<!DOCTYPE html> <html> <head> <title>Chapter 7: Anne Says Her Prayers | Anne of Green Gables | <NAME> | Lit2Go ETC</title> <link rel="stylesheet" href="http://etc.usf.edu/lit2go/css/screenless.css" type="text/css" media="screen" title="no title" charset="utf-8"> <link rel="stylesheet" href="http://etc.usf.edu/lit2go/css/printless.css" type="text/css" media="print" title="no title" charset="utf-8"> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript" defer src="http://etc.usf.edu/lit2go/js/js.min.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-5574891-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); $(document).ready(function() { $('img').unveil(); $('#contactable').contactable({ url: 'http://etc.usf.edu/lit2go/welcome/feedback/', subject: 'Lit2Go Feedback — Chapter 7: Anne Says Her Prayers | Anne of Green Gables | <NAME> — http://etc.usf.edu/lit2go/53/anne-of-green-gables/1013/chapter-7-anne-says-her-prayers/' }); }); </script> </head> <body> <div class="page"> <header> <h1> <a href="http://etc.usf.edu/lit2go/">Lit<span class="blue">2</span>Go</a> </h1> <ul> <li id="search"><form action="http://etc.usf.edu/lit2go/search/"><input type="text" name="q" placeholder="Search" value=""></form></li> </ul> </header> <nav id="shell"> <ul> <li><a href="http://etc.usf.edu/lit2go/authors/" class="">Authors</a></li> <li><a href="http://etc.usf.edu/lit2go/books/" class="selected">Books</a></li> <li><a href="http://etc.usf.edu/lit2go/genres/" class="">Genres</a></li> <li><a href="http://etc.usf.edu/lit2go/collections/" class="">Collections</a></li> <li><a href="http://etc.usf.edu/lit2go/readability/" class="">Readability</a></li> </ul> </nav> <section id="content"> <div id="contactable"><!-- contactable html placeholder --></div> <div id="page_content"> <header> <h2> <a href="http://etc.usf.edu/lit2go/53/anne-of-green-gables/">Anne of Green Gables</a> </h2> <h3> by <a href="http://etc.usf.edu/lit2go/authors/56/lucy-maude-montgomery/"><NAME></a> </h3> <h4> Chapter 7: Anne Says Her Prayers </h4> </header> <div id="default"> <details open> <summary> Additional Information </summary> <div id="columns"> <ul> <li> <strong>Year Published:</strong> 1908 </li> <li> <strong>Language:</strong> English </li> <li> <strong>Country of Origin:</strong> Canada </li> <li> <strong>Source:</strong> Montgomery, L.M. (1908) <em> Anne of Green Gables </em> London, England: L.C. Page and Co. </li> </ul> </div> <div id="columns"> <ul> <li> <strong>Readability:</strong> <ul> <li> Flesch–Kincaid Level: <a href="http://etc.usf.edu/lit2go/readability/flesch_kincaid_grade_level/7/" title="Flesch–Kincaid Grade Level 7.5">7.5</a> </li> </ul> </li> <li> <strong>Word Count:</strong> 1,396 </li> </ul> </div> <div id="columns"> <ul> <li> <strong>Genre:</strong> <a href="http://etc.usf.edu/lit2go/genres/26/realism/">Realism</a> </li> <li> <strong>Keywords:</strong> 19th century literature, american literature, children's literature </li> <li> <a class="btn" data-toggle="modal" href="#cite_this" >✎ Cite This</a> </li> <li> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style "> <a addthis:ui_delay="500" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=roywinkelman" class="addthis_button_compact">Share</a> <span class="addthis_separator">|</span> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> </div> <script type="text/javascript">$($.getScript("http://s7.addthis.com/js/250/addthis_widget.js?pub=roywinkelman"))</script> <!-- <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=roywinkelman"></script> --> <!-- AddThis Button END --> </li> </ul> </div> <h4>Downloads</h4> <ul id="downloads"> <li> <a href="http://etc.usf.edu/lit2go/audio/mp3/anne-of-green-gables-007-chapter-7-anne-says-her-prayers.1013.mp3">Audio</a> </li> <li> <a href="http://etc.usf.edu/lit2go/pdf/passage/1013/anne-of-green-gables-007-chapter-7-anne-says-her-prayers.pdf">Passage PDF</a> </li> </ul> <hr> </details> <div class="modal hide" id="cite_this"> <script> $($('#myTab a').click(function (e) {e.preventDefault();$('#myTab a[href="#apa"]').tab('show');})); </script> <nav> <ul id="myTab"> <li class="active"> <a href="#apa" data-toggle="tab">APA</a> </li> <li> <a href="#mla" data-toggle="tab">MLA</a> </li> <li> <a href="#chicago" data-toggle="tab">Chicago</a> </li> </ul> </nav> <div class="tab-content"> <div class="content tab-pane hide active" id="apa"> <p class="citation"> <NAME>. (1908). Chapter 7: Anne Says Her Prayers. <em>Anne of Green Gables</em> (Lit2Go Edition). Retrieved February 15, 2016, from <span class="faux_link">http://etc.usf.edu/lit2go/53/anne-of-green-gables/1013/chapter-7-anne-says-her-prayers/</span> </p> </div> <div class="content tab-pane" id="mla"> <p class="citation"> Montgomery, <NAME>. "Chapter 7: Anne Says Her Prayers." <em>Anne of Green Gables</em>. Lit2Go Edition. 1908. Web. <<span class="faux_link">http://etc.usf.edu/lit2go/53/anne-of-green-gables/1013/chapter-7-anne-says-her-prayers/</span>>. February 15, 2016. </p> </div> <div class="content tab-pane" id="chicago"> <p class="citation"> <NAME>, "Chapter 7: Anne Says Her Prayers," <em>Anne of Green Gables</em>, Lit2Go Edition, (1908), accessed February 15, 2016, <span class="faux_link">http://etc.usf.edu/lit2go/53/anne-of-green-gables/1013/chapter-7-anne-says-her-prayers/</span>. </p> </div> </div> </div> <span class="top"> <nav class="passage"> <ul> <li><a href="http://etc.usf.edu/lit2go/53/anne-of-green-gables/1012/chapter-6-marilla-makes-up-her-mind/" title="Chapter 6: Marilla Makes Up Her Mind" class="back">Back</a></li> <li><a href="http://etc.usf.edu/lit2go/53/anne-of-green-gables/1014/chapter-8-annes-bring-up-is-begun/" title="Chapter 8: Anne's Bring-up is Begun" class="next">Next</a></li> </ul> </nav> </span> <div id="shrink_wrap"> <div id="i_apologize_for_the_soup"> <audio controls style="width:99%;"> <source src="http://etc.usf.edu/lit2go/audio/mp3/anne-of-green-gables-007-chapter-7-anne-says-her-prayers.1013.mp3" type="audio/mpeg" /> <source src="http://etc.usf.edu/lit2go/audio/ogg/anne-of-green-gables-007-chapter-7-anne-says-her-prayers.1013.ogg" type="audio/ogg" /> The embedded audio player requires a modern internet browser. You should visit <a href="http://browsehappy.com/">Browse Happy</a> and update your internet browser today! </audio> <p> When Marilla took Anne up to bed that night she said stiffly:<br /> </p> <p> &ldquo;Now, Anne, I noticed last night that you threw your clothes all about the floor when you took them off. That is a very untidy habit, and I can&rsquo;t allow it at all. As soon as you take off any article of clothing fold it neatly and place it on the chair. I haven&rsquo;t any use at all for little girls who aren&rsquo;t neat.&rdquo;<br /> </p> <p> &ldquo;I was so harrowed up in my mind last night that I didn&rsquo;t think about my clothes at all,&rdquo; said Anne. &ldquo;I&rsquo;ll fold them nicely tonight. They always made us do that at the asylum. Half the time, though, I&rsquo;d forget, I&rsquo;d be in such a hurry to get into bed nice and quiet and imagine things.&rdquo;<br /> </p> <p> &ldquo;You&rsquo;ll have to remember a little better if you stay here,&rdquo; admonished Marilla. &ldquo;There, that looks something like. Say your prayers now and get into bed.&rdquo;<br /> </p> <p> &ldquo;I never say any prayers,&rdquo; announced Anne.<br /> </p> <p> Marilla looked horrified astonishment.<br /> </p> <p> &ldquo;Why, Anne, what do you mean? Were you never taught to say your prayers? God always wants little girls to say their prayers. Don&rsquo;t you know who God is, Anne?&rdquo;<br /> </p> <p> &rdquo;&rsquo;God is a spirit, infinite, eternal and unchangeable, in His being, wisdom, power, holiness, justice, goodness, and truth,&rsquo;&rdquo; responded Anne promptly and glibly.<br /> </p> <p> Marilla looked rather relieved.<br /> </p> <p> &ldquo;So you do know something then, thank goodness! You&rsquo;re not quite a heathen. Where did you learn that?&rdquo;<br /> </p> <p> &ldquo;Oh, at the asylum Sunday-school. They made us learn the whole catechism. I liked it pretty well. There&rsquo;s something splendid about some of the words. &lsquo;Infinite, eternal and unchangeable.&rsquo; Isn&rsquo;t that grand? It has such a roll to it&mdash;just like a big organ playing. You couldn&rsquo;t quite call it poetry, I suppose, but it sounds a lot like it, doesn&rsquo;t it?&rdquo;<br /> </p> <p> &ldquo;We&rsquo;re not talking about poetry, Anne&mdash;we are talking about saying your prayers. Don&rsquo;t you know it&rsquo;s a terrible wicked thing not to say your prayers every night? I&rsquo;m afraid you are a very bad little girl.&rdquo;<br /> </p> <p> &ldquo;You&rsquo;d find it easier to be bad than good if you had red hair,&rdquo; said Anne reproachfully. &ldquo;People who haven&rsquo;t red hair don&rsquo;t know what trouble is. <NAME> told me that God made my hair red ON PURPOSE, and I&rsquo;ve never cared about Him since. And anyhow I&rsquo;d always be too tired at night to bother saying prayers. People who have to look after twins can&rsquo;t be expected to say their prayers. Now, do you honestly think they can?&rdquo;<br /> </p> <p> Marilla decided that Anne&rsquo;s religious training must be begun at once. Plainly there was no time to be lost.<br /> </p> <p> &ldquo;You must say your prayers while you are under my roof, Anne.&rdquo;<br /> </p> <p> &ldquo;Why, of course, if you want me to,&rdquo; assented Anne cheerfully. &ldquo;I&rsquo;d do anything to oblige you. But you&rsquo;ll have to tell me what to say for this once. After I get into bed I&rsquo;ll imagine out a real nice prayer to say always. I believe that it will be quite interesting, now that I come to think of it.&rdquo;<br /> </p> <p> &ldquo;You must kneel down,&rdquo; said Marilla in embarrassment.<br /> </p> <p> Anne knelt at Marilla&rsquo;s knee and looked up gravely.<br /> </p> <p> &ldquo;Why must people kneel down to pray? If I really wanted to pray I&rsquo;ll tell you what I&rsquo;d do. I&rsquo;d go out into a great big field all alone or into the deep, deep, woods, and I&rsquo;d look up into the sky&mdash;up&mdash;up&mdash;up&mdash;into that lovely blue sky that looks as if there was no end to its blueness. And then I&rsquo;d just FEEL a prayer. Well, I&rsquo;m ready. What am I to say?&rdquo;<br /> </p> <p> Marilla felt more embarrassed than ever. She had intended to teach Anne the childish classic, &ldquo;Now I lay me down to sleep.&rdquo; But she had, as I have told you, the glimmerings of a sense of humor&mdash;which is simply another name for a sense of fitness of things; and it suddenly occurred to her that that simple little prayer, sacred to white-robed childhood lisping at motherly knees, was entirely unsuited to this freckled witch of a girl who knew and cared nothing bout God&rsquo;s love, since she had never had it translated to her through the medium of human love.<br /> </p> <p> &ldquo;You&rsquo;re old enough to pray for yourself, Anne,&rdquo; she said finally. &ldquo;Just thank God for your blessings and ask Him humbly for the things you want.&rdquo;<br /> </p> <p> &ldquo;Well, I&rsquo;ll do my best,&rdquo; promised Anne, burying her face in Marilla&rsquo;s lap. &ldquo;Gracious heavenly Father&mdash;that&rsquo;s the way the ministers say it in church, so I suppose it&rsquo;s all right in private prayer, isn&rsquo;t it?&rdquo; she interjected, lifting her head for a moment.<br /> </p> <p> &quot;Gracious heavenly Father, I thank Thee for the White<br /> Way of Delight and the Lake of Shining Waters and Bonny<br /> and the Snow Queen. I&#39;m really extremely grateful for<br /> them. And that&#39;s all the blessings I can think of just<br /> now to thank Thee for. As for the things I want,<br /> they&#39;re so numerous that it would take a great deal of<br /> time to name them all so I will only mention the two<br /> most important. Please let me stay at Green Gables;<br /> and please let me be good-looking when I grow up.<br /> I remain,&quot;</p> <p> &nbsp; Yours respectfully,<br /> &nbsp;&nbsp; <NAME>.</p> <p> </p> <p> &ldquo;There, did I do all right?&rdquo; she asked eagerly, getting up. &ldquo;I could have made it much more flowery if I&rsquo;d had a little more time to think it over.&rdquo;<br /> </p> <p> Poor Marilla was only preserved from complete collapse by remembering that it was not irreverence, but simply spiritual ignorance on the part of Anne that was responsible for this extraordinary petition. She tucked the child up in bed, mentally vowing that she should be taught a prayer the very next day, and was leaving the room with the light when Anne called her back.<br /> </p> <p> &ldquo;I&rsquo;ve just thought of it now. I should have said, &lsquo;Amen&rsquo; in place of &lsquo;yours respectfully,&rsquo; shouldn&rsquo;t I?&mdash;the way the ministers do. I&rsquo;d forgotten it, but I felt a prayer should be finished off in some way, so I put in the other. Do you suppose it will make any difference?&rdquo;<br /> </p> <p> &ldquo;I&mdash;I don&rsquo;t suppose it will,&rdquo; said Marilla. &ldquo;Go to sleep now like a good child. Good night.&rdquo;<br /> </p> <p> &ldquo;I can only say good night tonight with a clear conscience,&rdquo; said Anne, cuddling luxuriously down among her pillows.<br /> </p> <p> Marilla retreated to the kitchen, set the candle firmly on the table, and glared at Matthew.<br /> </p> <p> &ldquo;<NAME>, it&rsquo;s about time somebody adopted that child and taught her something. She&rsquo;s next door to a perfect heathen. Will you believe that she never said a prayer in her life till tonight? I&rsquo;ll send her to the manse tomorrow and borrow the Peep of the Day series, that&rsquo;s what I&rsquo;ll do. And she shall go to Sunday-school just as soon as I can get some suitable clothes made for her. I foresee that I shall have my hands full. Well, well, we can&rsquo;t get through this world without our share of trouble. I&rsquo;ve had a pretty easy life of it so far, but my time has come at last and I suppose I&rsquo;ll just have to make the best of it.&rdquo;</p> </div> </div> <span class="bottom"> <nav class="passage"> <ul> <li><a href="http://etc.usf.edu/lit2go/53/anne-of-green-gables/1012/chapter-6-marilla-makes-up-her-mind/" title="Chapter 6: Marilla Makes Up Her Mind" class="back">Back</a></li> <li><a href="http://etc.usf.edu/lit2go/53/anne-of-green-gables/1014/chapter-8-annes-bring-up-is-begun/" title="Chapter 8: Anne's Bring-up is Begun" class="next">Next</a></li> </ul> </nav> </span> </div> </div> </section> <footer screen> <div id="footer-text"> <p> This collection of children's literature is a part of the <a href="http://etc.usf.edu/">Educational Technology Clearinghouse</a> and is funded by various <a href="http://etc.usf.edu/lit2go/welcome/funding/">grants</a>. </p> <p> Copyright &copy; 2006&mdash;2016 by the <a href="http://fcit.usf.edu/">Florida Center for Instructional Technology</a>, <a href="http://www.coedu.usf.edu/">College of Education</a>, <a href="http://www.usf.edu/">University of South Florida</a>. </p> </div> <ul id="footer-links"> <li><a href="http://etc.usf.edu/lit2go/welcome/license/">License</a></li> <li><a href="http://etc.usf.edu/lit2go/welcome/credits/">Credits</a></li> <li><a href="http://etc.usf.edu/lit2go/welcome/faq/">FAQ</a></li> <li><a href="http://etc.usf.edu/lit2go/giving/">Giving</a></li> </ul> </footer> <footer print> <div id="footer-text"> <p>This document was downloaded from <a href="http://etc.usf.edu/lit2go/">Lit2Go</a>, a free online collection of stories and poems in Mp3 (audiobook) format published by the <a href="http://fcit.usf.edu/">Florida Center for Instructional Technology</a>. For more information, including classroom activities, readability data, and original sources, please visit <a href="http://etc.usf.edu/lit2go/53/anne-of-green-gables/1013/chapter-7-anne-says-her-prayers/">http://etc.usf.edu/lit2go/53/anne-of-green-gables/1013/chapter-7-anne-says-her-prayers/</a>.</p> </div> <div id="book-footer"> <p>Lit2Go: <em>Anne of Green Gables</em></p> <p>Chapter 7: Anne Says Her Prayers</p> </div> </footer> <script type="text/javascript" defer src="http://etc.usf.edu/lit2go/js/details.js"></script> </div> </body> </html>
html
<filename>src/Structures/Awaiter.ts import { EventEmitter } from "events" import SnowDir from "./SnowDir" import { WS_EVENT } from '../constants/Types/Types' export default class Awaiter extends EventEmitter { filter: (obj: unknown) => boolean options: { max?: number; time?: number; idle?: number } destroyed = false ended = false found = new SnowDir<number, unknown>() type: WS_EVENT private idleTimeout?: NodeJS.Timeout constructor(filter: (obj: unknown) => boolean, options: { max?: number; time?: number; idle?: number }, type: WS_EVENT) { super() this.filter = filter this.options = options this.type = type if (options.idle) this.idleTimeout = setTimeout(() => this.end(), options.idle) } destroy(): void { this.destroyed = true this.ended = true this.emit("destroyed") this.emit("end", this.found) } private end() { this.ended = true this.emit("end", this.found) } add(value: unknown): void { const numb = this.found.lastKey() ? 0 : this.found.lastKey() + 1 this.found.set(numb, value) this.emit("data", value) if (this.found.size === this.options.max) this.end() if (this.idleTimeout) { clearTimeout(this.idleTimeout) if (this.options.idle) this.idleTimeout = setTimeout(() => this.end(), this.options.idle) } } } /* eslint-disable @typescript-eslint/no-explicit-any */ export default interface Awaiter extends EventEmitter { on<K extends keyof AwaiterEvents>(event: K, listener: (...args: AwaiterEvents[K]) => any): this once<K extends keyof AwaiterEvents>(event: K, listener: (...args: AwaiterEvents[K]) => any): this emit<K extends keyof AwaiterEvents>(event: K, ...args: AwaiterEvents[K]): boolean } interface AwaiterEvents { start: [] data: [unknown] end: [SnowDir<number, unknown>] destroyed: [] }
typescript
use std::{ collections::HashMap }; use crate::tools::file_handler::{ read_file, split_numbers }; pub fn compute1() -> i32 { if let Ok(content) = read_file("data/1st_day/input.txt") { if let Ok(vector) = split_numbers(&content) { let value = get_two_entries_sum_2020(&vector); return (value[0] * value[1]) as i32; } } return 2020; } pub fn compute2() -> i32 { if let Ok(content) = read_file("data/1st_day/input.txt") { if let Ok(vector) = split_numbers(&content) { let value = get_three_entries_sum_2020(&vector); return (value[0] * value[1] * value[2]) as i32; } } return 2020; } fn get_two_entries_sum_2020(v: &Vec<usize>) -> Vec<usize> { let mut two_size_vector: Vec<usize> = Vec::with_capacity(2 as usize); let mut map_for_vector = HashMap::new(); for i in 0..v.len() { let key = 2020 - v[i]; if map_for_vector.contains_key(&key) { let value = map_for_vector[&key]; two_size_vector.push(v[value]); two_size_vector.push(v[i]); break; } map_for_vector.insert(v[i], i); } return two_size_vector; } fn get_three_entries_sum_2020(v: &Vec<usize>) -> Vec<usize> { let three_size_vector: Vec<usize> = Vec::with_capacity(3 as usize); let mut vector = v.clone(); vector.sort(); for i in 0..vector.len()-1 { if i == 0 || (i > 0 && vector[i] != vector[i-1]) { let (mut low, mut high, sum):(usize, usize, usize) = (i + 1, vector.len() - 1, 2020 - vector[i]); while low < high { if vector[low] + vector[high] == sum { return vec![vector[i], vector[low], vector[high]]; } else if vector[low] + vector[high] < sum { low += 1; } else { high -= 1; } } } } return three_size_vector; } #[cfg(test)] mod test { use super::*; fn nums() -> Vec<usize> { vec![ 1721, 979, 366, 299, 675, 1456, ] } #[test] fn test_get_two_entries_sum_2020() { let v = get_two_entries_sum_2020(&Vec::from(nums())); assert_eq!(v, [1721, 299]); assert_eq!(v[0] * v[1], 514579); } #[test] fn test_get_three_entries_sum_2020() { let v = get_three_entries_sum_2020(&Vec::from(nums())); assert_eq!(v, [366, 675, 979]); assert_eq!(v[0] * v[1] * v[2], 241861950); } }
rust
from rest_framework import serializers from .models import Movie class MovieSerializer(serializers.ModelSerializer): class Meta: fields = ( "name", "plot", "year", "director", "actors", "image", "ratings", "url" ) model = Movie
python
Chief Minister Siddaramaiah emphasized introducing reservation in outsourced employment to government posts. Against a sanctioned strength of 7. 72 lakh posts in 43 departments, the state of Karnataka has 2. 55 lakh government jobs vacant. Presently, there are around 75k outsourced employees. Third-party agencies through the government’s support and guidance provide employees for Group 'C' and Group 'D' like drivers and data entry operators. Recruitment to government posts and filling up vacancies as part of the congress manifesto announcements, Chief Minister Siddaramaiah said, “We are committed to filling up vacancies. Until then we will outsource employment and we are thinking of introducing reservation in this.
english
--- ROBOTS: NOINDEX,NOFOLLOW title: Accelerate change with Microsoft Viva Insights description: Learn how to use insights data to analyze and accelerate organizational change author: madehmer ms.author: v-mideh ms.topic: article ms.localizationpriority: null ms.prod: wpa manager: scott.ruble audience: Admin --- # Accelerate change insights *This experience is only available through private preview at this time.* > [!Important] > This insight is only available in organizations who have at least 200 licensed users. If your organization has fewer than that, you'll see the following alert for **Accelerate change**: "This insight is unavailable because the minimum number of employees is not met." Slow adoption of new technology harms efforts to attract and retain top talent, improve productivity, and can lead to market failure. Influencers are employees who have the best connections to people across the company based on their collaboration patterns. Engage influencers shows how your organization compares with others based on industry research and your specific organizational data. ![Accelerate change page.](./images/accelerate-change.png) ## Calculations The percentage metric for **Engage influencers** is **Percentage of employees who can drive change within your workforce**. This is the percentage of employees who are one step away from influencers. Influencers are the people with the best connections across the company. ![Accelerate change percentage insight.](./images/accelerate-change-percent.png) The visual behavioral insight for **Engage influencers** is **Reach of influencers**, which is an [organizational network graph](glossary.md#ona-define) that shows the [influencers](glossary.md#influencer-define), their connections, and how they effectively connect across your organization. This helps you identify and target the people who power the unobservable communication networks that can drive change. ![Accelerate change visual insight.](./images/accelerate-change-visual.png) ## Take action In the **Take action** section for each insight, select **See your insights** to see the most effective actions you can do now to drive change toward better business outcomes in your organization. You also might see one or more groups listed who are affected and would benefit the most from these recommendations, which are based on your organizational data and industry research. ## Best practices Leveraging the right people to promote new technology can help drive adoption at scale. Well-connected people share information efficiently, but are not always easy to identify. The [Measuring your employees’ invisible forms of influence](https://insights.office.com/productivity/measuring-your-employees-invisible-forms-of-influence/) article says that "traditional organizational reporting structures limit managers’ visibility into how their employees are influencing and contributing to other teams. New workplace metrics are needed to help leaders get a more complete picture of this." Ways to leverage influencers: * Use [Insights](https://docs.microsoft.com/workplace-analytics/myanalytics/use/use-the-insights) and the [Network](https://docs.microsoft.com/workplace-analytics/myanalytics/use/network) page to see connections, top collaborators, and suggestions on how to improve connections and cultivate influence. * Use [Microsoft Teams channels](https://docs.microsoft.com/microsoftteams/teams-channels-overview) for cross-functional team collaboration and to drive conversations. For more best practices and how to identify and utilize influencers, see [Best practices for influencers](https://docs.microsoft.com/workplace-analytics/tutorials/gm-influencer). <!--### Measure Teams adoption Successful digital transformations require a real-time understanding of technology adoption rates and usage trends within the organization. Based on [What email, IM, and the phone are each good for](https://insights.office.com/collaboration/what-email-im-and-the-phone-are-each-good-for/), you might be hampering productivity with too many emails: "We default to email to connect with people — to the tune of 122 business emails, on average, per person per day." Some key ways to support Teams adoption: * Launch a [champions program](https://docs.microsoft.com/MicrosoftTeams/teams-adoption-create-champions-program) for employees who are early adopters of Teams and can guide, teach, and train their peers. * Use [Power BI Teams insights](https://docs.microsoft.com/workplace-analytics/tutorials/power-bi-teams) to monitor Teams usage through Workplace Analytics data, including instant messages, meeting, and email metrics. * Share [Microsoft Teams free, live, online training classes](https://docs.microsoft.com/MicrosoftTeams/instructor-led-training-teams-landing-page) with employees to help get them up and running quickly with Teams. For best practices and how to be a role model for Teams use, see [Best practices for efficient communication](https://docs.microsoft.com/workplace-analytics/tutorials/gm-communication). ### Support connectivity Teams provides a shared work environment that strengthens connectivity and boosts productivity. Monitoring team cohesion post technology adoption is an indication of tool effectiveness. [Rebuilding companies as communities](https://insights.office.com/culture/rebuilding-companies-as-communities/) explains how "Communityship requires a more modest form of leadership that might be called engaged and distributed management. A community leader is personally engaged in order to engage others, so that anyone and everyone can exercise initiative." Ways to support connectivity with Teams: * Share the collection of [Microsoft Teams training videos](https://support.microsoft.com/office/overview-of-teams-and-channels-c3d63c10-77d5-4204-a566-53ddcf723b46?wt.mc_id=otc_microsoft_teams) that help employees best use Teams, including how to experience all of the features of Channels. * Learn tips and tricks on LinkedIn Learning, such as the [weekly Teams Tips video](https://www.linkedin.com/learning/microsoft-teams-tips-weekly/learn-tips-for-mastering-microsoft-teams?u=3322), to help employees master Teams and stay current on the latest Teams features and improvements. For more best practices and how to host informal gatherings with Teams, see [Best practices for community connectivity](https://docs.microsoft.com/workplace-analytics/tutorials/gm-connectivity). -->
markdown
[ { "Id": "1097010", "ThreadId": "458569", "Html": "Hello, \r<br />\n<br />\nI want to use MUI in a Client-Server Application. If I want to send the Definition to the Client I have following error:<br />\n<pre><code>Der Typ &quot;FirstFloor.ModernUI.Presentation.LinkGroupCollection&quot; in Assembly &quot;FirstFloor.ModernUI, Version=1.0.5.0, Culture=neutral, PublicKeyToken=2d21ec3cd074c59a&quot; ist nicht als serialisierbar gekennzeichnet.</code></pre>\n\nCould be to fixed it in the next releases?\r<br />\n<br />\nMy workaround is that the LinkGroupCollection will be create on Clientside - but in future I want it on serverside\r<br />\n<br />\nThanks<br />\n", "PostedDate": "2013-09-20T08:49:34.447-07:00", "UserRole": null, "MarkedAsAnswerDate": null } ]
json
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Component, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Router } from '@angular/router'; import { urls } from '../../../../config/urls'; import { cors } from '../../../../config/cors'; import Swal from 'sweetalert2'; @Component({ selector: 'app-amigos', templateUrl: './amigos.component.html', styleUrls: ['./amigos.component.scss'] }) export class AmigosComponent implements OnInit { loginForm: FormGroup; submitted = false; constructor(private formBuilder: FormBuilder, public router: Router, private http: HttpClient) { } ngOnInit() { this.get_user_friends(); this.loginForm = this.formBuilder.group({ amigo: ['', Validators.required], }); } removerAmigo(amigo_id) { let data = { "idUser": localStorage.getItem('used_id'), "idFriend": amigo_id }; console.log(amigo_id); this.http .post<any>(urls.api + '/friend/delete', data, cors.httpOptions) .subscribe(response_api => { console.log(response_api); if (response_api.message) { Swal.fire({ title: 'Error', text: 'No se ha podigo eliminar este amigo, Intenlo mas tarde', type: 'error', showCancelButton: false, confirmButtonColor: '#3085d6', confirmButtonText: 'OK' }) } else { Swal.fire({ title: 'Exito', text: 'Amigo eliminado correctamente', type: 'success', showCancelButton: false, confirmButtonColor: '#3085d6', confirmButtonText: 'OK' }) } }, error => { alert('error'); }); } get f() { return this.loginForm.controls; } onSubmit() { if (this.loginForm.invalid) { this.submitted = true; console.log("Form Invalid"); return; } this.submitted = false; let data = this.loginForm.value; console.log(data); let data_to_send = {}; let buscar_por = ""; console.log(data.lenght); if (data.length == 9) { data_to_send = { "phone": data.name } buscar_por = 'phone'; } else { buscar_por = 'name'; data_to_send = { "name": data.name } /* Esta en html : name */ } this.http .post<any>(urls.api + 'friend/find/' + buscar_por, data_to_send, cors.httpOptions) .subscribe(response_api => { console.log(response_api); if (response_api.lenght == 0) { Swal.fire({ title: 'Error', text: 'Nombre/Tèlefono no encontrado', type: 'error', showCancelButton: false, confirmButtonColor: '#3085d6', confirmButtonText: 'OK' }) } else { /* Swal.fire( 'Amigo encontrado', response_api.name + ' es un nuevo amigo', 'success' ); */ this.add_friend(response_api.idUser) } }, error => { console.log(error); alert('error'); }); } add_friend(idFriend) { let data_to_send = { idUser: localStorage.getItem('used_id'), idFriend: idFriend }; this.http .post<any>(urls.api + 'friend/add', data_to_send, cors.httpOptions) .subscribe(response_api => { if (response_api.lenght == 0) { Swal.fire({ title: 'Error', text: 'Amigo no exadido a la lista de amigos', type: 'error', showCancelButton: false, confirmButtonColor: '#3085d6', confirmButtonText: 'OK' }) } else { Swal.fire( 'Amigo guardado', 'Registro de nuevo amigo correcto', 'success' ); this.get_user_friends(); } }, error => { alert('error'); }); } amigos_list: Array<String> = []; get_user_friends() { console.log('get_user_friends()'); this.amigos_list = []; this.http .get<any>(urls.api + 'friend/get/' + localStorage.getItem('user_id'), cors.httpOptions) .subscribe(response_api => { console.log(response_api); if (response_api.lenght == 0) { this.amigos_list = []; console.log("Error al cargar las amigos_list"); } else { this.amigos_list = response_api; } }); } }
typescript
package net.glowstone.data.processor.block; import com.google.common.base.Optional; import net.glowstone.data.manipulator.block.GlowDirtData; import net.glowstone.data.processor.GlowDataProcessor; import org.spongepowered.api.data.DataHolder; import org.spongepowered.api.data.DataPriority; import org.spongepowered.api.data.DataTransactionResult; import org.spongepowered.api.data.DataView; import org.spongepowered.api.data.manipulator.block.DirtData; import org.spongepowered.api.service.persistence.InvalidDataException; public class GlowDirtDataProcessor implements GlowDataProcessor<DirtData> { @Override public Optional<DirtData> getFrom(DataHolder dataHolder) { Optional<DirtData> data = dataHolder.getData(DirtData.class); if (data.isPresent()) { return Optional.of(new GlowDirtData().setValue(data.get().getValue())); } else { return Optional.absent(); } } @Override public Optional<DirtData> fillData(DataHolder dataHolder, DirtData manipulator, DataPriority priority) { Optional<DirtData> data = dataHolder.getData(DirtData.class); if (data.isPresent() && priority == DataPriority.DATA_HOLDER) { manipulator.setValue(data.get().getValue()); } return Optional.of(manipulator); } @Override public DataTransactionResult setData(DataHolder dataHolder, DirtData data, DataPriority priority) { return null; } @Override public boolean remove(DataHolder dataHolder) { return false; } @Override public Optional<DirtData> build(DataView container) throws InvalidDataException { return null; } @Override public DirtData create() { return new GlowDirtData(); } @Override public Optional<DirtData> createFrom(DataHolder dataHolder) { return null; } }
java
Global */ *{margin:0;padding:0;} body{ background: url(cbg.png) no-repeat; background-size: 100%; z-index: -99; background-position: center center; background-color: #282923; } .myform_ncb{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%);*/ } .myform_ncb input{ width: 220px; height: 35px; margin: 8px 0px; border: 1px solid #519EEB; background: transparent; padding: 1px 10px; border-radius: 3px; color: red; font-weight: normal; text-shadow: 6px 8px 7px #000; font-style: italic; box-shadow: 3px 5px 7px 2px #000; } .myform_ncb input[type=submit] { margin: 17px auto 0px auto !important; text-align: center; display: block; background: green; color: #fff; border: transparent; font-size: 17px; font-style: inherit; width: 50%; } .myform_ncb input[type="submit"]:hover{ background: #f6fcf6; color: #000; cursor: pointer; transition: 0.3s ease; -webkit-transition: 0.3s ease; -moz-transition: 0.3s ease; -ms-transition: 0.3s ease; -o-transition: 0.3s ease; } /* Placeholder Design */ .myform_ncb input[type=text]::placeholder{ color: #519EEB; font-style: italic; }/*normal*/ .myform_ncb input[type=text]::-webkit-input-placeholder{ color: #519EEB; font-style: italic; }/*crome*/ .myform_ncb input[type=text]:-moz-placeholder{ color: #519EEB; font-style: italic; }/*mozila firefox 4-18*/ .myform_ncb input[type=text]::-moz-placeholder{ color: #519EEB; font-style: italic; }/*mozila firefox 19-50*/ .myform_ncb input[type=text]:-ms-input-placeholder{ color: #519EEB !important; font-style: italic; }/*IE 10-11 need every propery value !important*/ .myform_ncb input[type=text]::-ms-input-placeholder{ color: #519EEB; font-style: italic; }/*edge*/ /* responsive design */ @media screen and (max-width: 768px){ body{ background-size: 50%; background-position: top center; } }
css
{"pos":"v","translits":{"map̄·rîs":{"psa.69.31|5":["which has horns","and hooves.",null],"lev.11.7|3":["though","divides","the hoof"],"lev.11.4|17":["not","does have cloven、","unclean"],"deu.14.8|3":["because","has cloven","hooves、"]},"yip̄·rə·sū":{"jer.16.7|1":["Nor","shall [men] break [bread]","in"]},"p̄ā·rōs":{"isa.58.7|1":["[is it] not","to share","with the hungry、"]},"hip̄·rî·sāh":{"lev.11.6|8":["not","does have cloven、","unclean"]},"map̄·re·seṯ":{"lev.11.26|4":["it","divides","the foot、"],"lev.11.3|1":["Whatever","divides","the hoof、"],"deu.14.6|2":["animal","with cloven","hooves、"]},"ū·mim·map̄·rî·sê":{"lev.11.4|7":["the cud、","or those that have cloven","hooves、"],"deu.14.7|7":["the cud、","or have cloven","hooves–"]},"yap̄·rîs":{"lev.11.5|8":["not","does have cloven、","unclean"]},"hip̄·rî·sū":{"deu.14.7|22":["not","do have cloven","unclean"]}},"meanings":{"cleave":8,"divide":3,"hoof":1,"share":1},"meaningsCount":4,"occurences":14}
json
#include "rb_tree.hh" #include <iostream> #include <string> #include <vector> #include <random> #include <chrono> #include <set> int main(int argc, char ** argv) { rb_tree<int> a = { 9,8,7,6,5,4,3,2,1,10 }; char break_char = '/'; int i = 1; for(; i < argc && argv[i][0] != break_char; ++i) { a.insert(std::stoi(argv[i])); } for(int i : a) { std::cout << i << ", "; } std::cout << "\n"; for(i = i + 1; i < argc; ++i) { auto it = a.find(std::stoi(argv[i])); if(it != a.end()) a.erase(it); } for(int i : a) { std::cout << i << ", "; } std::cout << "\n\n"; //compare insertion speeds auto now = [](){ return std::chrono::high_resolution_clock::now().time_since_epoch().count(); }; std::vector<int> base; std::mt19937 rng(now()); for(int i = 0; i < 100000; ++i) { base.push_back(rng()); } auto rb_start = now(); rb_tree<int> rb_tmp(base.begin(), base.end()); auto rb_end = now(); std::cout << "rb_tree<int>:\n" << " time: " << (rb_end - rb_start) << "\n" << " size: " << rb_tmp.size() << "\n"; auto set_start = now(); std::set<int> set_tmp(base.begin(), base.end()); auto set_end = now(); std::cout << "std::set<int>:\n" << " time: " << (set_end - set_start) << "\n" << " size: " << set_tmp.size() << "\n"; }
cpp
# greenthread-future-rs [![Crate](https://img.shields.io/crates/v/greenthread-future.svg)](https://crates.io/crates/greenthread-future) [![Docs](https://docs.rs/greenthread-future/badge.svg)](https://docs.rs/greenthread-future) [![Actions Status](https://github.com/wangrunji0408/greenthread-future-rs/workflows/CI/badge.svg)](https://github.com/wangrunji0408/greenthread-future-rs/actions) [![Coverage Status](https://coveralls.io/repos/github/wangrunji0408/greenthread-future-rs/badge.svg?branch=master)](https://coveralls.io/github/wangrunji0408/greenthread-future-rs?branch=master) Convert closures into futures based on greenthread **on bare-metal (no_std + no_alloc)**. In a word, this is a `#![no_std]` version of [Futurify](https://github.com/robertohuertasm/futurify). I'm exploring to use it to implement bare-metal threading. ## Example TODO. Now just take a unit test as an example: ```rust #[tokio::test] async fn test() { let h1 = tokio::spawn(ThreadFuture::from(|| { println!("1.1"); yield_now(); println!("1.2"); 1u32 })); let h2 = tokio::spawn(ThreadFuture::from(|| { println!("2.1"); yield_now(); println!("2.2"); 2u32 })); println!("join 1 => {}", h1.await.unwrap()); println!("join 2 => {}", h2.await.unwrap()); } ``` Output: ``` 1.1 2.1 1.2 2.2 join 1 => 1 join 2 => 2 ``` ## Internal ![stack-layout](docs/stack-layout.svg)
markdown
//! Handle the view controller class and callbacks use objc::class; use objc::sel; use objc::sel_impl; use objc::msg_send; use cocoa::base::{id, nil}; use objc::runtime::{Object, Sel}; use crate::renderer::Renderer; use objc::declare::ClassDecl; use std::ffi::c_void; use cocoa::foundation::NSAutoreleasePool; use crate::metal_view::{MTLClearColorMake, CGSize, MetalViewDelegate}; #[link(name="Metal", kind="framework")] extern { // From System/Library/Frameworks/Metal.framework/Versions/A/Headers/MTLDevice.h: // MTL_EXTERN id <MTLDevice> __nullable MTLCreateSystemDefaultDevice(void) API_AVAILABLE(macos(10.11), ios(8.0)) NS_RETURNS_RETAINED; fn MTLCreateSystemDefaultDevice() -> id; } /// The Rust companion to the Objc ViewController class pub struct RSViewController { /// The render that will draw in our main view. _renderer: Option<Box<Renderer>>, } /// Register the ViewController class, iVars and callbacks pub fn register_view_controller_class() { let _ns_view_controller_class = class!(NSViewController); let mut view_controller_declaration = ClassDecl::new("ViewController", _ns_view_controller_class).unwrap(); unsafe { view_controller_declaration.add_ivar::<*mut c_void>("_rust_instance_ptr"); view_controller_declaration.add_method( sel!(initWithCoder:), init_with_coder_ as extern "C" fn(&Object, Sel, id) -> id, ); view_controller_declaration.add_method( sel!(viewDidLoad), view_did_load as extern "C" fn(&mut Object, Sel), ) } view_controller_declaration.register(); } /// The designated initializer for NSViewController. /// /// We create a RSViewController instance and store it as an iVar. extern "C" fn init_with_coder_(_self: &Object, _sel: Sel, _coder: id) -> id { // init our parent class from the coder let mut _self:id = unsafe { let _superclass = class!(NSViewController); msg_send!(super(_self, _superclass), initWithCoder:_coder) }; println!("In ViewController init with coder!"); // Add in a new, boxed RSViewController instance as an iVar let _rust_instance = Box::new(RSViewController { _renderer: None, }); println!(" _rust_instance_ptr is {:p}", _rust_instance); let _rust_instance_ptr = Box::into_raw(_rust_instance) as *mut c_void; unsafe { _self.as_mut().unwrap().set_ivar("_rust_instance_ptr", _rust_instance_ptr) }; _self } /// Called after the view controller’s view has been loaded into memory. extern "C" fn view_did_load(_self: &mut Object, _sel: Sel) { unsafe { let _superclass = class!(NSViewController); let _: () = msg_send!(super(_self, _superclass), viewDidLoad); } println!("In view did load!"); // Do any additional setup after loading the view. // unsafe { let pool = NSAutoreleasePool::new(nil); // Recover our rust instance let mut _rust_instance_ptr: *mut c_void = *_self.get_mut_ivar("_rust_instance_ptr"); println!(" _rust_instance_ptr set to {:?}", _rust_instance_ptr); let mut _rust_instance_ptr = (_rust_instance_ptr as *mut RSViewController).as_mut().unwrap(); // Set up our view let view: id = msg_send![_self, view]; let _: () = msg_send![view, setEnableSetNeedsDisplay:true]; let new_device = MTLCreateSystemDefaultDevice(); let _: () = msg_send![view, setDevice:new_device]; let clear_color = MTLClearColorMake(0.0, 0.5, 1.0, 1.0); let _: () = msg_send![view, setClearColor:clear_color]; // Create a renderer for our view let renderer_result = Renderer::new_with_metal_kit_view(view); match renderer_result { Ok(renderer) => { _rust_instance_ptr._renderer = Some(Box::new(renderer)); } _ => { println!("Renderer initialization failed"); pool.drain(); return; } } // Initialize the renderer with the view size. let drawable_size: CGSize = msg_send![view, drawableSize]; _rust_instance_ptr._renderer.as_mut().unwrap().metal_view_drawable_size_will_change(drawable_size); // pass our renderer to the view as a pointer // note that the view can't think of it as a Objc delegate let _renderer = _rust_instance_ptr._renderer.as_ref().unwrap().as_ref(); let _: () = msg_send![view, setDelegate:_renderer]; pool.drain(); } }
rust
mod collector; mod html; mod markdown; mod paragraph; use std::collections::{BTreeMap, BTreeSet}; use std::mem; use std::path::{Path, PathBuf}; use std::process; use anyhow::{anyhow, Context, Error}; use clap::Parser; use jwalk::WalkDir; use markdown::DocumentSource; use rayon::prelude::*; use collector::{BrokenLinkCollector, LinkCollector, UsedLinkCollector}; use html::{DefinedLink, Document, DocumentBuffers, Link}; use paragraph::{DebugParagraphWalker, NoopParagraphWalker, ParagraphHasher, ParagraphWalker}; static MARKDOWN_FILES: &[&str] = &["md", "mdx"]; static HTML_FILES: &[&str] = &["htm", "html"]; #[derive(Parser)] #[clap(about, version)] struct Cli { /// The static file path to check. /// /// This will be assumed to be the root path of your server as well, so /// href="/foo" will resolve to that folder's subfolder foo. #[structopt(verbatim_doc_comment)] base_path: Option<PathBuf>, /// How many threads to use, default is to try and saturate CPU. #[clap(short = 'j', long = "jobs")] threads: Option<usize>, /// Whether to check for valid anchor references. #[clap(long = "check-anchors")] check_anchors: bool, /// Path to directory of markdown files to use for reporting errors. #[clap(long = "sources")] sources_path: Option<PathBuf>, /// Enable specialized output for GitHub actions. #[clap(long = "github-actions")] github_actions: bool, /// Utilities for development of hyperlink. #[clap(subcommand)] subcommand: Option<Subcommand>, } #[derive(Parser)] enum Subcommand { /// Dump out internal data for markdown or html file. This is mostly useful to figure out why /// a source file is not properly matched up with its target html file. /// /// NOTE: This is a tool for debugging and development. /// /// Usage: /// /// vimdiff <(hyperlink dump-paragraphs src/foo.md) <(hyperlink dump-paragraphs public/foo.html) /// /// Each line on the left represents a Markdown paragraph. Each line on the right represents a /// HTML paragraph. If there are minor formatting differences in two lines that are supposed to /// match, you found the issue that needs fixing in `src/paragraph.rs`. /// /// There may also be entire lines missing from either side, in which case the logic for /// detecting paragraphs needs adjustment, either in `src/markdown.rs` or `src/html.rs`. /// /// Note that the output for HTML omits paragraphs that do not have links, while for Markdown /// all paragraphs are dumped. DumpParagraphs { file: PathBuf }, /// Attempt to match up all paragraphs from the HTML folder with the Markdown folder and print /// stats. This can be used to determine whether the source matching is going to be any good. /// /// NOTE: This is a tool for debugging and development. MatchAllParagraphs { base_path: PathBuf, sources_path: PathBuf, }, } fn main() -> Result<(), Error> { let Cli { base_path, threads, check_anchors, sources_path, github_actions, subcommand, } = Cli::parse(); if let Some(n) = threads { rayon::ThreadPoolBuilder::new() .num_threads(n) .build_global() .unwrap(); } match subcommand { Some(Subcommand::DumpParagraphs { file }) => { return dump_paragraphs(file); } Some(Subcommand::MatchAllParagraphs { base_path, sources_path, }) => { return match_all_paragraphs(base_path, sources_path); } None => {} } let base_path = match base_path { Some(base_path) => base_path, None => { // Invalid invocation. Ultra hack to show help if no arguments are provided. Structopt // does not seem to have a functional way to require either an argument or a // subcommand. required_if etc don't actually work. let help_message = Cli::try_parse_from(&["hyperlink", "--help"]) .map(|_| ()) .unwrap_err(); help_message.print()?; process::exit(1); } }; if sources_path.is_some() { check_links::<ParagraphHasher>(base_path, check_anchors, sources_path, github_actions) } else { check_links::<NoopParagraphWalker>(base_path, check_anchors, sources_path, github_actions) } } fn check_links<P: ParagraphWalker>( base_path: PathBuf, check_anchors: bool, sources_path: Option<PathBuf>, github_actions: bool, ) -> Result<(), Error> where P::Paragraph: Copy + PartialEq, { println!("Reading files"); let html_result = extract_html_links::<BrokenLinkCollector<_>, P>( &base_path, check_anchors, sources_path.is_some(), )?; let used_links_len = html_result.collector.used_links_count(); println!( "Checking {} links from {} files ({} documents)", used_links_len, html_result.file_count, html_result.documents_count, ); let mut bad_links_and_anchors = BTreeMap::new(); let mut bad_links_count = 0; let mut bad_anchors_count = 0; let mut broken_links = html_result .collector .get_broken_links(check_anchors) .peekable(); let paragraps_to_sourcefile = if broken_links.peek().is_some() { if let Some(ref sources_path) = sources_path { println!("Found some broken links, reading source files"); extract_markdown_paragraphs::<P>(sources_path)? } else { BTreeMap::new() } } else { BTreeMap::new() }; for broken_link in broken_links { let mut had_sources = false; if broken_link.hard_404 { bad_links_count += 1; } else { bad_anchors_count += 1; } if let Some(ref paragraph) = broken_link.link.paragraph { if let Some(document_sources) = &paragraps_to_sourcefile.get(paragraph) { debug_assert!(!document_sources.is_empty()); had_sources = true; for (source, lineno) in *document_sources { let (bad_links, bad_anchors) = bad_links_and_anchors .entry((!had_sources, source.path.clone())) .or_insert_with(|| (BTreeSet::new(), BTreeSet::new())); if broken_link.hard_404 { bad_links } else { bad_anchors } .insert((Some(*lineno), broken_link.link.href.clone())); } } } if !had_sources { let (bad_links, bad_anchors) = bad_links_and_anchors .entry((!had_sources, broken_link.link.path)) .or_insert_with(|| (BTreeSet::new(), BTreeSet::new())); if broken_link.hard_404 { bad_links } else { bad_anchors } .insert((None, broken_link.link.href)); } } // _is_raw_file is an unused parameter that is only there to control iteration order over keys. // Sort markdown files to the start since otherwise the less valuable annotations on not // checked in files fill up the limit on annotations (tested manually, seems to be 10 right // now). for ((_is_raw_file, filepath), (bad_links, bad_anchors)) in bad_links_and_anchors { println!("{}", filepath.display()); for (lineno, href) in &bad_links { print_href_error("error: bad link", href, *lineno); } for (lineno, href) in &bad_anchors { print_href_error("error: bad link", href, *lineno); } if github_actions { if !bad_links.is_empty() { print_github_actions_href_list("bad links", &*filepath, &bad_links)?; } if !bad_anchors.is_empty() { print_github_actions_href_list("bad anchors", &*filepath, &bad_anchors)?; } } println!(); } println!("Found {} bad links", bad_links_count); if check_anchors { println!("Found {} bad anchors", bad_anchors_count); } // We're about to exit the program and leaking the memory is faster than running drop mem::forget(html_result); if bad_links_count > 0 { process::exit(1); } if bad_anchors_count > 0 { process::exit(2); } Ok(()) } fn print_href_error(message: &'static str, href: &str, lineno: Option<usize>) { if let Some(lineno) = lineno { println!(" {} {} at line {}", message, href, lineno); } else { println!(" {} {}", message, href); } } fn print_github_actions_href_list( message: &'static str, filepath: &Path, hrefs: &BTreeSet<(Option<usize>, String)>, ) -> Result<(), Error> { let mut prev_lineno = None; for (i, (lineno, href)) in hrefs.iter().enumerate() { if prev_lineno != *lineno || i == 0 { print!( "\n::error file={},line={}::{}:", filepath.canonicalize()?.display(), lineno.unwrap_or(1), message, ); } prev_lineno = *lineno; // %0A -- escaped newline // // https://github.community/t/what-is-the-correct-character-escaping-for-workflow-command-values-e-g-echo-xxxx/118465/5 print!("%0A {}", href); } println!(); Ok(()) } fn dump_paragraphs(path: PathBuf) -> Result<(), Error> { let extension = match path.extension() { Some(x) => x, None => return Err(anyhow!("File has no extension, cannot determine type")), }; let mut doc_buf = DocumentBuffers::default(); let paragraphs: BTreeSet<_> = match extension.to_str() { Some(x) if MARKDOWN_FILES.contains(&x) => { let source = DocumentSource::new(path); source .paragraphs::<DebugParagraphWalker<ParagraphHasher>>()? .into_iter() .map(|(paragraph, lineno)| (paragraph, Some(lineno))) .collect() } Some(x) if HTML_FILES.contains(&x) => { let document = Document::new(Path::new(""), &path); document .links::<DebugParagraphWalker<ParagraphHasher>>(&mut doc_buf, false, true)? .filter_map(|link| Some((link.into_paragraph()?, None))) .collect() } _ => return Err(anyhow!("Unknown file extension")), }; for (paragraph, lineno) in paragraphs { if let Some(lineno) = lineno { println!("{}: {}", lineno, paragraph); } else { println!("{}", paragraph); } } Ok(()) } struct HtmlResult<C> { collector: C, documents_count: usize, file_count: usize, } fn walk_files( base_path: &Path, ) -> Result<impl ParallelIterator<Item = jwalk::DirEntry<((), ())>>, Error> { let entries = WalkDir::new(&base_path) .sort(true) // helps branch predictor (?) .process_read_dir(|_, _, _, children| { children.retain(|dir_entry_result| { let entry = match dir_entry_result.as_ref() { Ok(x) => x, Err(_) => return true, }; let file_type = entry.file_type(); if file_type.is_dir() { // need to retain, otherwise jwalk won't recurse return true; } if file_type.is_symlink() { return false; } if !file_type.is_file() { return false; } true }); }) .into_iter() .filter_map(|entry| { let entry = match entry { Ok(x) => x, Err(e) => return Some(Err(e)), }; if entry.file_type().is_dir() { None } else { Some(Ok(entry)) } }) // XXX: cannot use par_bridge because of https://github.com/rayon-rs/rayon/issues/690 .collect::<Result<Vec<_>, _>>()?; // Minimize amount of LinkCollector instances created. This impacts parallelism but // `LinkCollector::merge` is rather slow. let min_len = entries.len() / rayon::current_num_threads(); Ok(entries.into_par_iter().with_min_len(min_len)) } fn extract_html_links<C: LinkCollector<P::Paragraph>, P: ParagraphWalker>( base_path: &Path, check_anchors: bool, get_paragraphs: bool, ) -> Result<HtmlResult<C>, Error> { let result: Result<_, Error> = walk_files(base_path)? .try_fold( || (DocumentBuffers::default(), C::new(), 0, 0), |(mut doc_buf, mut collector, mut documents_count, mut file_count), entry| { let path = entry.path(); let document = Document::new(base_path, &path); collector.ingest(Link::Defines(DefinedLink { href: document.href(), })); file_count += 1; if !document .path .extension() .and_then(|extension| Some(HTML_FILES.contains(&extension.to_str()?))) .unwrap_or(false) { return Ok((doc_buf, collector, documents_count, file_count)); } for link in document .links::<P>(&mut doc_buf, check_anchors, get_paragraphs) .with_context(|| format!("Failed to read file {}", document.path.display()))? { collector.ingest(link); } doc_buf.reset(); documents_count += 1; Ok((doc_buf, collector, documents_count, file_count)) }, ) .map(|result| { result.map(|(_, collector, documents_count, file_count)| { (collector, documents_count, file_count) }) }) .try_reduce( || (C::new(), 0, 0), |(mut collector, mut documents_count, mut file_count), (collector2, documents_count2, file_count2)| { collector.merge(collector2); documents_count += documents_count2; file_count += file_count2; Ok((collector, documents_count, file_count)) }, ); let (collector, documents_count, file_count) = result?; Ok(HtmlResult { collector, documents_count, file_count, }) } type MarkdownResult<P> = BTreeMap<P, Vec<(DocumentSource, usize)>>; fn extract_markdown_paragraphs<P: ParagraphWalker>( sources_path: &Path, ) -> Result<MarkdownResult<P::Paragraph>, Error> { let results: Vec<Result<_, Error>> = walk_files(sources_path)? .try_fold(Vec::new, |mut paragraphs, entry| { let source = DocumentSource::new(entry.path()); if !source .path .extension() .and_then(|extension| Some(MARKDOWN_FILES.contains(&extension.to_str()?))) .unwrap_or(false) { return Ok(paragraphs); } for paragraph_and_lineno in source .paragraphs::<P>() .with_context(|| format!("Failed to read file {}", source.path.display()))? { paragraphs.push((source.clone(), paragraph_and_lineno)); } Ok(paragraphs) }) .collect(); let mut paragraps_to_sourcefile = BTreeMap::new(); for result in results { for (source, (paragraph, lineno)) in result? { paragraps_to_sourcefile .entry(paragraph) .or_insert_with(Vec::new) .push((source.clone(), lineno)); } } Ok(paragraps_to_sourcefile) } fn match_all_paragraphs(base_path: PathBuf, sources_path: PathBuf) -> Result<(), Error> { println!("Reading files"); let html_result = extract_html_links::<UsedLinkCollector<_>, ParagraphHasher>(&base_path, true, true)?; println!("Reading source files"); let paragraps_to_sourcefile = extract_markdown_paragraphs::<ParagraphHasher>(&sources_path)?; println!("Calculating"); let mut total_links = 0; let mut link_no_paragraph = 0; let mut link_multiple_sources = 0; let mut link_no_source = 0; let mut link_single_source = 0; // We only care about HTML's used links because paragraph matching is exclusively for error // messages that point to the broken link. for link in &html_result.collector.used_links { total_links += 1; let paragraph = match link.paragraph { Some(ref p) => p, None => { link_no_paragraph += 1; continue; } }; match paragraps_to_sourcefile.get(paragraph) { Some(sources) => { if sources.len() != 1 { println!("multiple sources: {} in {}", link.href, link.path.display()); link_multiple_sources += 1; } else { link_single_source += 1; } } None => { println!("no source: {} in {}", link.href, link.path.display()); link_no_source += 1; } } } println!("{} total links", total_links); println!("{} links outside of paragraphs", link_no_paragraph); println!( "{} links with multiple potential sources", link_multiple_sources ); println!("{} links with no sources", link_no_source); println!( "{} links with one potential source (perfect match)", link_single_source ); Ok(()) } #[cfg(test)] mod tests { use assert_cmd::Command; use assert_fs::prelude::*; use predicates::prelude::*; #[test] fn test_dead_link() { let site = assert_fs::TempDir::new().unwrap(); site.child("index.html") .write_str("<a href=bar.html>") .unwrap(); let mut cmd = Command::cargo_bin("hyperlink").unwrap(); cmd.current_dir(site.path()).arg("."); cmd.assert().failure().code(1).stdout( predicate::str::is_match( r#"^Reading files Checking 1 links from 1 files \(1 documents\) \..index\.html error: bad link bar.html Found 1 bad links "#, ) .unwrap(), ); site.close().unwrap(); } #[test] fn test_dead_anchor() { let site = assert_fs::TempDir::new().unwrap(); site.child("index.html") .write_str("<a href=bar.html#goo>") .unwrap(); site.child("bar.html").touch().unwrap(); let mut cmd = Command::cargo_bin("hyperlink").unwrap(); cmd.current_dir(site.path()).arg(".").arg("--check-anchors"); cmd.assert().failure().code(2).stdout( predicate::str::is_match( r#"^Reading files Checking 1 links from 2 files \(2 documents\) \..index\.html error: bad link bar.html#goo Found 0 bad links Found 1 bad anchors $"#, ) .unwrap(), ); site.close().unwrap(); } #[test] fn test_no_args() { let mut cmd = Command::cargo_bin("hyperlink").unwrap(); cmd.assert() .failure() .code(1) .stdout(predicate::str::contains( "\ USAGE: hyperlink [OPTIONS] [BASE_PATH] [SUBCOMMAND]\ ", )); } #[test] fn test_bad_dir() { let mut cmd = Command::cargo_bin("hyperlink").unwrap(); cmd.arg("non_existing_dir"); cmd.assert() .failure() .code(1) .stdout("Reading files\n") .stderr(predicate::str::contains( "Error: IO error for operation on non_existing_dir:", )); } }
rust
<filename>src/main/java/com/moss/javatest/shared/dto/DtoAssembler.java package com.moss.javatest.shared.dto; import org.modelmapper.ModelMapper; import org.modelmapper.config.Configuration; import java.util.List; import java.util.function.BiFunction; import java.util.stream.Collectors; /** * Model을 Dto로 Dto를 Model로 변환하기 위한 Helper 함수 모음 */ public class DtoAssembler { static final ModelMapper modelMapper; static { modelMapper = new ModelMapper(); modelMapper.getConfiguration().setMethodAccessLevel(Configuration.AccessLevel.PRIVATE); } /** * Source을 DestinationClass로 Convert * Modifier가 존재하면 modifier를 적용한 결과 반환 */ public static <S, D> D convert(S source, Class<D> destinationClass, BiFunction<S, D, D> modifier) { if (null == source) { return null; } // source to destination var destination = modelMapper.map(source, destinationClass); if (null == modifier) { return destination; } // modifier 적용 destination = modifier.apply(source, destination); return destination; } /** * model을 dto로 변환 */ public static <D, M> D to(M model, Class<D> dtoClass, BiFunction<M, D, D> modifier) { return convert(model, dtoClass, modifier); } /** * model을 dto로 변환 */ public static <D, M> D to(M model, Class<D> dtoClass) { return to(model, dtoClass, null); } /** * models를 dtos로 변환 */ public static <D, M> List<D> to(List<M> models, Class<D> dtoClass) { return to(models, dtoClass, (BiFunction<M, D, D>)null); } /** * models를 dtos로 변환 */ public static <D, M> List<D> to(List<M> models, Class<D> dtoClass, BiFunction<M, D, D> modifier) { if (null == models) { return null; } return models.stream().map(model -> to(model, dtoClass, modifier)).collect(Collectors.toUnmodifiableList()); } /** * dto로 부터 model을 생성 */ public static <D, M> M from(D dto, Class<M> modelClass, BiFunction<D, M, M> modifier) { return convert(dto, modelClass, modifier); } /** * dto로 부터 model을 생성 */ public static <D, M> M from(D dto, Class<M> modelClass) { return from(dto, modelClass, null); } /** * dtos로 부터 models를 생성 */ public static <D, M> List<M> from(List<D> dtos, Class<M> modelClass, BiFunction<D, M, M> modifier) { if (null == dtos) { return null; } return dtos.stream().map(dto -> from(dto, modelClass, modifier)).collect(Collectors.toList()); } /** * dtos로 부터 models를 생성 */ public static <D, M> List<M> from(List<D> dtos, Class<M> modelClass) { return from(dtos, modelClass, (BiFunction<D, M, M>) null); } /** * Source를 Destination에 Mapping */ public static <S, D> D map(S source, D destination) { return map(source, destination, null); } /** * Source를 Destination에 Mapping */ public static <S, D> D map(S source, D destination, BiFunction<S, D, D> modifier) { modelMapper.map(source, destination); if (null != modifier) { destination = modifier.apply(source, destination); } return destination; } }
java
The Delhi High court on Tuesday rejected film producer and 2G scam accused Karim Morani’s plea for interim bail on health grounds. “The case for interim bail is not made out. Move for the regular bail at opportune time,” Justice Ajit Bharihoke said. Mr. Morani, 53, who is in jail in connection with the 2G scam, had moved the High Court seeking interim bail for four weeks on the ground of his ill health. He had pleaded that his confinement may have adverse impact on his health as doctors have advised him to “avoid stress”. Citing the history of his heart ailment, he had sought interim bail to consult his doctors. The Central Bureau of Investigation had opposed his bail plea quoting from one of the status reports on his health conditions which had stated that Mr. Morani’s blood pressure and pulse rate were normal and even his cardiac problems did not require hospitalisation and there was no significant abnormality in his cardiovascular system. The court, which had reserved its orders on July 14, rejected his plea on Tuesday, saying he must approach the court for bail at appropriate stage of the case. A special CBI court had ordered the arrest of Mr. Morani after dismissing his bail plea on May 30. The CBI has accused Mr. Morani of taking Rs. 6 crore for facilitating the transaction of illegal gratification to Kalaignar TV.
english
<gh_stars>0 package com.aline.core.validation.validators; import com.aline.core.validation.annotation.Name; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; public class NameValidator implements ConstraintValidator<Name, String> { @Override public boolean isValid(String value, ConstraintValidatorContext context) { if (value == null) { return true; } return value.matches("^[A-Za-z][A-Za-z\\-\\s]+$"); } }
java
package com.smartcodeltd.jenkinsci.plugins.buildmonitor.viewmodel.features; import com.smartcodeltd.jenkinsci.plugins.buildmonitor.viewmodel.JobView; import jenkins.model.Jenkins; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.mockito.Mock; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import static com.smartcodeltd.jenkinsci.plugins.buildmonitor.viewmodel.syntacticsugar.Sugar.*; import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.collection.IsCollectionWithSize.hasSize; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; import java.net.URL; @RunWith(PowerMockRunner.class) @PrepareForTest({Jenkins.class, URL.class}) public class HasBadgesBadgePluginTest { private JobView job; @Rule public ExpectedException thrown = ExpectedException.none(); @Mock private Jenkins jenkins; @Before public void setup() { PowerMockito.mockStatic(Jenkins.class); PowerMockito.when(Jenkins.getInstance()).thenReturn(jenkins); } @Test public void should_support_job_without_badges() throws Exception { job = a(jobView().which(new HasBadgesBadgePlugin()).of( a(job()))); assertThat(serialisedBadgesDetailsOf(job), is(nullValue())); } @Test public void should_convert_badges_to_json() throws Exception { job = a(jobView().which(new HasBadgesBadgePlugin()).of( a(job().whereTheLast(build().hasBadgesBadgePlugin(badgePluginBadge().withText("badge1"), badgePluginBadge().withText("badge2")))))); assertThat(serialisedBadgesDetailsOf(job).value(), hasSize(2)); } @Test public void should_ignore_badges_with_icon() throws Exception { job = a(jobView().which(new HasBadgesBadgePlugin()).of( a(job().whereTheLast(build().hasBadgesBadgePlugin(badgePluginBadge().withIcon("icon.gif", "badge1"), badgePluginBadge().withText("badge2")))))); assertThat(serialisedBadgesDetailsOf(job).value(), hasSize(1)); } @Test public void should_report_badges_from_latest_build() throws Exception { job = a(jobView().which(new HasBadgesBadgePlugin()).of( a(job().whereTheLast(build().isStillBuilding().hasBadgesBadgePlugin(badgePluginBadge().withText("badge1"))) .andThePrevious(build().hasBadgesBadgePlugin(badgePluginBadge().withText("badge1"), badgePluginBadge().withText("badge2")))))); assertThat(serialisedBadgesDetailsOf(job).value(), hasSize(1)); } private HasBadgesBadgePlugin.Badges serialisedBadgesDetailsOf(JobView job) { return job.which(HasBadgesBadgePlugin.class).asJson(); } }
java
Islamabad, July 28: Pakistan Army chief General Qamar Javed Bajwa on Tuesday said that the army would respond with full might if provoked. Gen Bajwa made the remarks during his visit to the Heavy Industries Taxila (HIT), where he was the chief guest at the handing over ceremony of Al Khalid-I tank to the Armoured Corps Regiment. "Our defence preparation and operational readiness is to ensure peace within and peace without. However, if provoked we shall respond and respond with all our might,” Bajwa said while speaking on the occasion. He reiterated the need for bolstering defence and operational preparedness of the armed forces. Al Khalid-I tank is a joint venture with China and Ukraine, according to the army.
english
package com.navigation; import javax.swing.ImageIcon; import com.util.ImageUtil; /** * 下载失败导航节点 * @author aaron * */ public class FailNode implements DownloadNode { public ImageIcon getImageIcon() { return ImageUtil.FAIL_NODE_IMAGE; } public String getText() { return "下载失败"; } }
java
package org.talend.sap; public enum SAPParameterType { IMPORT, CHANGING, TABLES, EXPORT }
java
A group for fans of Christian spec fic — fantasy, sci-fi, space opera, time-travel, dystopia, superheroes, all that good stuff. This is a public group. Anyone can join and invite others to join. [close] Be respectful, thoughtful, courteous — all the usual rules. * Welcome! Please Read! Hello everyone! Dystopian/Apocalyptic: Not the end? Fairytale: What is your favorite one? Book On Sale This week! The Secrets of Cinnamon Cinderguard is here! GROUP BOOK PROMOS ENDING TOMORROW! Have you ever wanted to see the bad guys get their just deserts? $0.99 Limited Time Offer! FREE e-book this weekend (1/14 - 1/15) What do you like to post on your professional social media? Opinions on blog layout? Does Speculative Fiction for Christians Have a Chance in the Marketplace? Reviewers wanted! Author Needed to Work With Editor (who hates writing) What to do when you're feeling frustrated with editor feedback? Authors! Classifying our genre?! Do you use beta readers? Book blog tours? Positive reviews! What do you do for new releases? Plotter or Seater? Edit as You Go or Edit at the End? Stand-alone or Series? Beginning to End or Jumper? Bookshelf (showing 1-12 of 133) What sub-genre of speculative fiction do you read? (choose one) Sci-fi, epic fantasy, urban fantasy, (write-in) High Fant./Urban Fant./Steam Punk/Alt. History (write-in) Supernatural (write-in) Mystery with suspense, adventure, and thriller! This moderator is inactive. If you'd like to help out in this group, send them a message asking to be made a moderator. If they are unresponsive, please contact Goodreads and state your request. This moderator is inactive. If you'd like to help out in this group, send them a message asking to be made a moderator. If they are unresponsive, please contact Goodreads and state your request.
english
San Francisco, July 3 Elon Musk-own Tesla has announced that it produced nearly 4,80,000 vehicles and delivered over 4,66,000 cars in the second quarter (Q2) of this year. Among 4,66,000 delivered vehicles, 19,225 were Model S/X, and 4,46,915 were Model 3/Y, the company said in a post on Sunday. The automaker will post its financial results for Q2 2023 after market close on July 19. At that time, the company will also issue a brief advisory containing a link to the Q2 update, which will be available on Tesla’s Investor Relations website. "Tesla management will hold a live question and answer webcast that day at 4:30 p. m. Central Time (5:30 p. m. Eastern Time) to discuss the Company’s financial and business results and outlook," the automaker said. Moreover, the net income and cash flow results will be announced along with the rest of the financial performance when the company announces Q2 earnings. "Tesla vehicle deliveries represent only one measure of the company’s financial performance and should not be relied on as an indicator of quarterly financial results, which depend on a variety of factors, including the cost of sales, foreign exchange movements and mix of directly leased vehicles," the company added. Meanwhile, last month, after hearing Prime Minister Narendra Modi's "Make in India" pitch, Tesla CEO Elon Musk announced a change of plans, saying that his electric vehicle and battery company will now come to India "as soon as it is humanly possible".
english
New Delhi, Jan 16 : A serial rapist arrested here has admitted to targeting more than 50 girls in Delhi alone, but the police on Monday said they had verified only seven cases. A tailor, Sunil Rastogi, 38, who hails from Rampur in Uttar Pradesh, confessed to police that he had been preying on girls since 2004 - when he was just 26 years old. Rastogi first admitted to raping at least 13 girls but later claimed he had targeted over 50 but could not rape all of them, a police official who did not want to be identified told IANS. Sounding callous, Rastogi - a father of five including two girls - said he randomly scouted for victims. He told police he would travel to Delhi at least twice a month to satisfy his lust. The man was arrested from Kalyanpuri, a thickly populated area in east Delhi, on Saturday, police said. The officer added that Rastogi was making claims that could not be verified immediately. "How many girls he victimised will be clear once we complete his questioning and verify his claims," Deputy Commissioner of Police Omvir Singh Bishnoi told IANS. Rastogi came to Delhi in 1990 with his family but left in 2004. He lives in Rampur. Police suspect the number of his victims could be more as Rastogi also had cases registered against him in Uttar Pradesh and Uttarakhand. "We had sought details of paedophiles lodged within the last one year in seven jails in Delhi, Rajasthan, Uttarakhand, Uttar Pradesh and Haryana. The reports confirmed his involvement in seven cases. Four of the seven cases were reported from Delhi, one from Haldwani in Uttarakhand and two from Uttar Pradesh," the officer said. "We are still verifying his statements by visiting the locations where he committed the crime. " Investigators said if Rastogi came to Delhi twice a month in the past 13 years and molested even one girl during every visit, he may have assaulted over 300 girls. However, he has confessed to victimising over 50 minors, the official said. "We were told by Rastogi that he managed to rape only 20 per cent of the victims. " Rastogi allegedly raped a minor girl and molested two others -- aged between nine and 10 years -- in New Ashok Nagar in east Delhi last week. He confessed to sexually molesting a number of minor girls in Ghaziabad in Uttar Pradesh and Rudrapur in Uttarakhand besides New Ashok Nagar. Several cases of molestation, theft and drug abuse were registered against him in Delhi. According to police, three cases of child rape and molestation under the Protection of Children from Sexual Offences Act (POCSO) were registered at the New Ashok Nagar police station on January 10 and 13. He allegedly threatened the victims with dire consequences and blackmailed them to prevent them from approaching the police. He would prowl near schools in Delhi when it shut for the day and would follow a group for a short distance and then pick a child who would stray from the others. Rastogi used to lure the minors claiming their father had sent him to give them clothes and other articles. He would then take his victim to an isolated spot where he would try to rape them. If he succeeded, Rastogi threatened the girls with death if they disclosed the assault to their parents. After each attack, he would return to Uttar Pradesh to evade arrest and he would return again to Delhi after a gap to hunt for new victims.
english
{ "word": "Bribery", "definitions": [ "The giving or offering of a bribe." ], "parts-of-speech": "Noun" }
json
HomePhoto GalleryAkshara Gowda Hot Pics Akshara Gowda Hot Pics By TeluguBulletin | Hyderabad | October 6, 2019 | 12:41 pm Previous articleNagarjuna becomes “Punnarjuna” in Bigg Boss 3 Telugu! Next articleTSRTC strike: Huzurnagar by-election stops KCR! RELATED ARTICLES Divi Vadthya Hot & Spicy Photoshoot Divi Vadthya Latest Hot Photoshoot Lavanya Tripathi latest Photos Divi Vadthya Latest Sizzling Photoshoot Divi Vadthya Latest Hot Photoshoot in Saree 2 COMMENTS 728826 887739Thanks for the blog loaded with so many data. Stopping by your weblog helped me to get what I was searching for. 703691 Reply 584064 19661Fantastic post, thanks so considerably for sharing. Do you happen to have an RSS feed I can subscribe to? 762510 Reply LEAVE A REPLY Cancel reply Comment: Please enter your comment! Name:* Please enter your name here Email:* You have entered an incorrect email address! Please enter your email address here Website: Save my name, email, and website in this browser for the next time I comment.
english
<filename>subset/dot1x/authenticator/authenticator.py """Authenticator module""" from __future__ import absolute_import from eap_module import EapModule from heartbeat_scheduler import HeartbeatScheduler from radius_module import RadiusModule, RadiusPacketInfo, RadiusSocketInfo, port_id_to_int from message_parser import IdentityMessage, FailureMessage import json import threading import time import utils class AuthStateMachine: """Authenticator state machine""" START = "start" SUPPLICANT = "Talk to Supplicant" RADIUS = "Talk to RADIUS server" FAIL = "Test Failed" SUCCESS = "Test Succeeded" def __init__(self, src_mac, auth_mac, idle_time, retry_count, eap_send_callback, radius_send_callback, auth_callback): self.state = None self._state_lock = threading.Lock() self._timer_lock = threading.RLock() self.logger = utils.get_logger('AuthSM') self.src_mac = src_mac self.eap_send_callback = eap_send_callback self.radius_send_callback = radius_send_callback self.auth_callback = auth_callback self.identity = None self.authentication_mac = auth_mac self.radius_state = None self.radius_access_reject = None self._idle_time = idle_time self._max_retry_count = retry_count self._current_timeout = None self._retry_func = None self._retry_args = None self._current_retries = None def initialize(self): """Initialize state machine""" self._state_transition(self.START) self._set_timeout(self._idle_time) self._set_retry_actions(retry_func=self.eap_send_callback, retry_args=[self.src_mac]) def _state_transition(self, target, expected=None): with self._state_lock: if expected is not None: message = 'state was %s expected %s' % (self.state, expected) assert self.state == expected, message self.logger.debug('Transition for %s: %s -> %s', self.src_mac, self.state, target) self.state = target def received_eapol_start(self): """Received EAPOL start on EAP socket""" self._state_transition(self.SUPPLICANT, self.START) self._set_timeout(self._idle_time) self._set_retry_actions(retry_func=self.eap_send_callback, retry_args=[self.src_mac]) self.eap_send_callback(self.src_mac) def received_eap_request(self, eap_message): """Received EAP request""" if isinstance(eap_message, IdentityMessage) and not self.identity: self.identity = eap_message.identity self._state_transition(self.RADIUS, self.SUPPLICANT) port_id = port_id_to_int(self.authentication_mac) radius_packet_info = RadiusPacketInfo( eap_message, self.src_mac, self.identity, self.radius_state, port_id) self._set_timeout(self._idle_time) self._set_retry_actions( retry_func=self.radius_send_callback, retry_args=[radius_packet_info]) self.radius_send_callback(radius_packet_info) def received_radius_response(self, payload, radius_state, packet_type): """Received RADIUS access channel""" self.radius_state = radius_state if packet_type == 'RadiusAccessReject': self.radius_access_reject = True self._state_transition(self.FAIL, self.RADIUS) eap_message = FailureMessage(self.src_mac, 255) self.auth_callback(self.src_mac, False) else: eap_message = payload if packet_type == 'RadiusAccessAccept': self._state_transition(self.SUCCESS, self.RADIUS) self.auth_callback(self.src_mac, True) else: self._state_transition(self.SUPPLICANT, self.RADIUS) self._set_timeout(self._idle_time) self._set_retry_actions( retry_func=self.eap_send_callback, retry_args=[self.src_mac, eap_message]) self.eap_send_callback(self.src_mac, eap_message) def _set_timeout(self, timeout_time=None, clear=False): with self._timer_lock: if clear: self._current_timeout = None else: self._current_timeout = time.time() + timeout_time def _set_retry_actions(self, retry_func=None, retry_args=None): self._retry_func = retry_func self._retry_args = list(retry_args) self._current_retries = 0 def _clear_retry_actions(self): self._retry_func = None self._retry_args = None self._current_retries = 0 def handle_timer(self): """Handle timer and check if timeout is exceeded""" with self._timer_lock: if self._current_timeout: if time.time() > self._current_timeout: if self._current_retries < self._max_retry_count: self._current_retries += 1 self._set_timeout(self._idle_time) self._retry_func(*self._retry_args) else: self._handle_timeout() def _handle_timeout(self): self._state_transition(self.FAIL) self._set_timeout(clear=True) eap_message = FailureMessage(self.src_mac, 255) self.auth_callback(self.src_mac, False) self.eap_send_callback(self.src_mac, eap_message) class Authenticator: """Authenticator to manage Authentication flow""" HEARTBEAT_INTERVAL = 3 IDLE_TIME = 9 RETRY_COUNT = 3 RADIUS_PORT = 1812 EAPOL_IDLE_TIME = 180 def __init__(self, config_file): self.state_machines = {} self.results = {} self.radius_access_reject = {} self.eap_module = None self.radius_module = None self.logger = utils.get_logger('Authenticator') self._config_file = config_file self._threads = [] self._radius_socket_info = None self._radius_secret = None self._radius_id = None self._interface = None self._idle_time = None self._max_retry_count = None self._current_timeout = None self._debug = False self._setup() def _load_config(self): with open(self._config_file, 'r') as file_stream: full_config = json.load(file_stream) config = full_config.get('modules').get('dot1x') self._debug = config.get('debug') if self._debug: utils.enable_debug_logs(self.logger) self.logger.debug('Loaded config from %s:\n %s', self._config_file, config) self._interface = config.get('interface', utils.get_interface_name()) radius_config = config.get('radius_server', {}) radius_socket_info = radius_config.get('radius_socket_info', {}) listen_ip = radius_socket_info.get('listen_ip', utils.get_interface_ip(self._interface)) listen_port = radius_socket_info.get('listen_port', 0) remote_ip = radius_socket_info.get('remote_ip', '127.0.0.1') remote_port = radius_socket_info.get('remote_port', self.RADIUS_PORT) self._radius_socket_info = RadiusSocketInfo(listen_ip, listen_port, remote_ip, remote_port) self._radius_secret = radius_config.get('secret', 'SECRET') self._radius_id = radius_config.get('id', utils.get_interface_mac(self._interface)) def _setup(self): self._load_config() self.radius_module = RadiusModule( self._radius_socket_info, self._radius_secret, self._radius_id, self.received_radius_response) self.eap_module = EapModule(self._interface, self.received_eap_request) if self._debug: utils.enable_debug_logs(self.radius_module.logger) utils.enable_debug_logs(self.eap_module.logger) # TODO: Take value from config and then revert to default interval = self.HEARTBEAT_INTERVAL # TODO: Take value from config and then revert to default self._idle_time = self.IDLE_TIME self._max_retry_count = self.RETRY_COUNT self.sm_timer = HeartbeatScheduler(interval) self.sm_timer.add_callback(self.handle_sm_timeout) self._current_timeout = time.time() + self.EAPOL_IDLE_TIME def start_threads(self): self.logger.info('Starting SM timer') self.sm_timer.start() self.logger.info('Listening for EAP and RADIUS.') def build_thread(method): self._threads.append(threading.Thread(target=method)) build_thread(self.radius_module.receive_radius_messages) build_thread(self.radius_module.send_radius_messages) build_thread(self.eap_module.receive_eap_messages) build_thread(self.eap_module.send_eap_messages) for thread in self._threads: thread.start() for thread in self._threads: thread.join() self.logger.info('Done listening for EAP and RADIUS packets.') def _end_authentication(self): self.logger.info('Stopping timer') if self.sm_timer: self.sm_timer.stop() self.logger.info('Shutting down modules.') self.radius_module.shut_down_module() self.eap_module.shut_down_module() def received_eap_request(self, src_mac, eap_message, is_eapol): if is_eapol: if not (src_mac in self.state_machines or src_mac in self.results): self.logger.info('Starting authentication for %s' % (src_mac)) auth_mac = self.eap_module.get_auth_mac() state_machine = AuthStateMachine( src_mac, auth_mac, self._idle_time, self._max_retry_count, self.send_eap_response, self.send_radius_request, self.process_test_result) state_machine.initialize() self.state_machines[src_mac] = state_machine state_machine.received_eapol_start() else: self.logger.warning( 'Authentication for %s is in progress or has been completed' % (src_mac)) else: state_machine = self.state_machines[src_mac] state_machine.received_eap_request(eap_message) def received_radius_response(self, src_mac, radius_attributes, packet_type): eap_message = radius_attributes.eap_message radius_state = radius_attributes.state state_machine = self.state_machines[src_mac] state_machine.received_radius_response(eap_message, radius_state, packet_type) def send_eap_response(self, src_mac, message=None): if not message: self.eap_module.send_eapol_response(src_mac) else: self.eap_module.send_eap_message(src_mac, message) def send_radius_request(self, radius_packet_info): self.radius_module.send_radius_packet(radius_packet_info) def process_test_result(self, src_mac, is_success): if is_success: self.logger.info('Authentication successful for %s' % (src_mac)) else: if src_mac: self.logger.info('Authentication failed for %s' % (src_mac)) else: self.logger.info('Authentication failed. Received no EAPOL packets.') if src_mac: self.results[src_mac] = is_success if self.state_machines[src_mac].radius_access_reject: self.radius_access_reject[src_mac] = True self.state_machines.pop(src_mac) # TODO: We currently finalize results as soon as we get a result for a src_mac. # Needs to be changed if we support multiple devices. self._end_authentication() def run_authentication_test(self): self.start_threads() result_str = "" test_result = "" if not self.results: result_str = "Authentication failed. No EAPOL messages received." \ " Check 802.1x is enabled" test_result = "skip" else: test_result = "pass" for src_mac, is_success in self.results.items(): additional = '' if is_success: result = 'succeeded' else: result = 'failed' test_result = "fail" if src_mac in self.radius_access_reject: additional = ' Incorrect credentials provided.' else: additional = ' Error encountered.' result_str += "Authentication %s.%s" % (result, additional) return result_str, test_result def handle_sm_timeout(self): if not self.state_machines and self._current_timeout: if time.time() > self._current_timeout: self.process_test_result(None, False) else: for state_machine in self.state_machines.values(): state_machine.handle_timer() def main(): authenticator = Authenticator() print(authenticator.run_authentication_test()) if __name__ == '__main__': main()
python
New Delhi [India], May 18 : The Supreme Court on Thursday sought a response from the Delhi Police on the bail plea filed by former Jawaharlal Nehru University (JNU) student and activist Umar Khalid in a UAPA case related to the alleged conspiracy behind the North East Delhi riots in February 2020. A bench of Justices AS Bopanna and Hima Kohli issued a notice to Delhi police and posted the matter for further consideration after six weeks. Khalid has approached the top court challenging an October 2022's Delhi High Court verdict that had denied bail to him. Khalid, arrested by Delhi Police in September 2020, in the High Court had sought bail on grounds that he neither had any "criminal role" in the violence in the city's north-east area nor any "conspiratorial connect" with any other accused in the case. The Delhi police had opposed the bail plea of Khalid. Khalid had approached the High Court challenging the trial court's dismissal of his bail application in March 2022. He was charged with criminal conspiracy, rioting, unlawful assembly, and several sections of the Unlawful Activities (Prevention) Act (UAPA). Besides Khalid, Sharjeel Imam, activist Khalid Saifi, JNU students Natasha Narwal and Devangana Kalita, Jamia Coordination Committee members Safoora Zargar, former AAP councillor Tahir Hussain and several others were booked under the stringent law in the case. The violence had erupted during the protests against CAA and NRC and had left 53 people dead and over 700 injured.
english
{"title":"MMD 【R-16】- <NAME> - Torn","author":"Anjeeloc","description":"NULL","thumb":"//i.iwara.tv/sites/default/files/styles/thumbnail/public/video_embed_field_thumbnails/youtube/XHm7GTzzRDI.jpg?itok=LO4C2pTJ","download":"https://www.iwara.tv/api/video/zbpzjhakbqikn01jl","origin":"https://www.iwara.tv/videos/zbpzjhakbqikn01jl"}
json
<reponame>etolocka/pyTrainerBASIC #Lectura del sensor de temperatura y humedad #<NAME> 2021 #www.profetolocka.com.ar/pytrainer #Alarma de temperatura #Se activa si la temperatura sube "delta" grados #Toma como valor "Normal" el primer valor leido. from PyTrainer import * from time import sleep temperatura1 = 0 #Primer valor delta = 2 #Variación (para arriba) que dispara la alarma #Empieza en condicion normal, led Rojo apagado y Verde prendido ledRojo.off () ledVerde.on () while (True): #Siempre hacer un retardo antes de intentar leer el DHT11 sleep (1) sensorDHT.measure () temp=sensorDHT.temperature () hum=sensorDHT.humidity() if (temperatura1 == 0): #Toma como "normal" el primer valor leído temperatura1 = temp if (temp >= temperatura1 + delta): ledRojo.on () ledVerde.off() else: ledRojo.off () ledVerde.on () print ("T={:02d} ºC, H={:02d} %".format (temp,hum))
python
Anushka Shetty was trolled and fat-shamed on the Internet for her recent appearance at a Mahashivaratri ceremony with her family after a long time. An astrologer has reportedly claimed that three of the most popular actresses of India - Anushka Shetty, Nayanthara and Rashmika Mandanna, will not have successful marriages. Anushka Shetty is celebrating her 38th birthday and the team of her upcoming film Nishabdam decided to honour the actress by unveiling the trailer on her special day. The movie stars R Madhavan and Anushka Shetty who plays the role of a mute artist.
english
NAIROBI, Kenya, Sep 4 – For the past 30 years the Chinese government has enabled more than 800 million citizens out of poverty. This has been achieved by concerted efforts from both central and local governments working closely with the private sector. Poverty reduction in the world’s most populous country has been achieved through an industry-based economy, social security, education, health among others. Dr Xu Liping an associate professor at the International Poverty Reduction Centre in China says agriculture has played an important role in poverty eradication with major crops including corn, rice and wheat. Poverty alleviation in China begins with an elaborate process to identify the poor – usually at the village level. Pertinent data including possible causes of poverty, production and living conditions of the locals is then generated. “This information is very important because it assists in planning anti-poverty measures and ensure funds are used for the right purpose,” said Xu. After the poor are accurately identified, work teams are sent to the villages to analyse their demands, make development plans and coordinate assistant resources. With tangible plans, the private sector is encouraged to invest in the rural economies. For instance, in Quingchi County’s Taizi village, Bouyu Agricultural Forestry and Husbandry Company leased land from the government for makino trees farming. The local farmers are then engaged in the production of the commodities; earning themselves decent wages while gaining technological knowledge. When the fruits ripen the company collects them and pays farmers additional income. The practice of revitalising rural agriculture has seen millions of Chinese get productive engagement in the countryside hence avoiding migration to big cities like Beijing, a practice that is still rampant in many developing economies like Kenya. Agriculture, however, is not the only avenue of poverty eradication in China. E-commerce has equally been tapped to improve livelihoods. Weinan City – one of the poorest areas in Gansu Province – was used as the first national pilot for e-commerce poverty alleviation in 2015. In 2016 there were more than 10,000 online stores which sold 6. 4 billion Yuan of agricultural products and 7. 18 million people achieved employment. The Chinese Government has also been able to build decent houses for the impoverished people. “In 2012-2015 the Central Government of China allocated RMB 40. 4 billion, resettling 5. 91 million impoverished people. Local governments provided RMB 38 billion, resettled 5. 8 million people,” said Xu of the China International Poverty reduction Centre. The ambitious Chinese Government war on poverty is to end extreme poverty by 2020. According to World Bank survey 2018, the proportion of Kenyans living on less than the international poverty line has declined from 46 per cent in 200/6 to 36. 1 per cent in 2015/16. Poverty incidence in Kenya is among the lowest in East Africa and is lower than the sub-Saharan African regional average. However, the report notes that poverty rates in Kenya remain relatively high compared to other lower middle-income countries. This means Kenya can win the war on extreme poverty if the right strategies are put in place by both the National and County Governments considering the fact that Kenya’s population is approximately 50 million as compared to China’s 1. 3 billion.
english
British Council has come up with its 6th edition of Five Films for Freedom. The online global project is the widest-reaching digital celebration of LGBT-themed films in the world, bringing stories from the LGBTIQ+ community and underlining their rights. This is a collaboration of the British Council and BFI Flare: London LGBTQ+ Film Festival, and will feature five short films from the BFI Flare programme. They can be viewed on British Council’s global digital platforms without any cost. Anybody can watch five films and also spread the word by using the hashtag #FiveFilmsForFreedom. The platform provides space to watch films from the LGBTIQ+ communities and even share with members from the community scattered across the country who are bereft of equal rights. This year, the short films will explore the love and acceptance from various celebrities hailing from UK, Brazil, Norway and Ireland. Apart from this, an online panel discussion will also be organised on March 29. Titled Voices from the Margins – Building Resilient LGBTQIA+ Communities in India, it will feature three activists– Anish Gawande (writer, translator, Director of the Dara Shikoh Fellowship and the co-founder of The Pink List), Maya Sharma (social activist and author) and Rachna Mudraboyina (a transgender activist based in Hyderabad). They will collectively examine and discuss the present LGBTQ+ community situation in the country. Rafiul Alom Rahman, the founder/director of The Queer Muslim Project (an initiative working to address challenges the community) will be moderating the session. One can watch the discussion on the British Council Facebook page from 6-7pm. Additionally, there will also be a curated series of six leaders, influencers from the community talking about #fivefilmsforfreedom films. On 27 and 28 March, there will also be 30-minute Instagram live takeover at 6 pm with Alex Mathew, also known as Maya the Drag Queen and Parmesh Shahani Head Godrej India Culture Lab.
english
**Bhubaneswar:** Buoyed by the success of ‘Make In Odisha’ conclave held in the State Capital last year, the Naveen Patnaik-led Government has laid out a roadmap for the second edition of the event, scheduled in 2018, between December 11 and 15 in Bhubaneswar. In 2016 December, the State Government managed to project a positive image of Odisha, with promises of new industries, jobs, faster economic growth and most importantly, investment assurances of a whopping Rs 2.03 crore at the Make In Odisha Conclave, which saw the participation of over 100 companies. This time, in 2018, the Government aims at show-casing manufacturing ecosystem in Odisha, highlight investment avenues and elicit concrete investment intentions from the corporate houses. Toeing in line with Naveen’s recent announcement about the event’s schedule, the top brass of State administration on Tuesday said that Make In Odisha 2018 will be organised in collaboration with Department of Industrial Policy & Promotion (DIPP), Government of Odisha, various Industry Associations and Business Chambers. The four-day event will include 13 key events including partner country seminars, Ambassador’s meet, sector-specific round table and exhibitions. There will be nine major sectoral sessions with specific investment proposals. The prospective investors from USA, Thailand, Japan, Taiwan, Malaysia, Germany, Switzerland and other nations are likely to participate in the conclave. A meeting, presided by Chief Secretary, Aditya Prasad Padhi, was held at the State Secretariat today to decide on the minutes of the programme. The Government has decided to organise pre-event investor reach-out activities, such as road shows at major metropolis. Padhi directed his brigade to make the entire event ‘outcome oriented’. The investment attracting Departments have been advised to keep a blue print of possible investment proposals handy, for sharing with the investors. Similar activities would be held at partner countries and agencies. A four-layered preparatory and coordination committee will be setup to administer seamless organisation of the mega event. Among others, Development Commissioner, R Balakrishnan, Additional Chief Secretary (Home) Asit Tripathy, Principal Secretary (Industry) Sanjiv Chopra, Principal Secretary (MSME) LN Gupta, Principal Secretary (Finance) Tuhin Kanta Pandey, Principal Secretary (Tourism) Mona Sharma and senior officials were present at the high level meeting.
english
import React from 'react'; import { Col, Divider, Row } from 'antd'; import { dataFixture, fontFixture } from './fixture/data.fixture'; import { PropsConfigParams } from './interfaces/configParams.interface'; import styles from './index.less'; const ConfigParamsBlock: React.FC<PropsConfigParams> = ({ data = dataFixture, fontFam = fontFixture }) => { const { options, option3, option4 } = data; return ( <Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}> <Col span={24}> {options.map((op: any) => ( <div key={op.title}> <div className={styles.header}> <h2 style={{ fontFamily: `${fontFam.fontTitle}` }} className={styles.titleOption}>{op.title}</h2> </div> <Row style={{ marginBottom: 19 }}> <Col span={24} > <p className={styles.title} style={{ fontFamily: `${fontFam.fontTitle}` }}>{op.cont1.title}</p> <Row> <Col xs={24} md={8} xl={8}> <p className={styles.textContent} style={{ fontFamily: `${fontFam.fontContent}` }}>{op.cont1.content}</p> </Col> <Col xs={24} md={14} xl={14}> {op.cont1.sliderCont} </Col> </Row> </Col> <Divider /> <Col span={24}> <p className={styles.title} style={{ fontFamily: `${fontFam.fontTitle}` }}>{op.cont2.title}</p> <Row> <Col xs={24} md={8} xl={8}> <p className={styles.textContent} style={{ fontFamily: `${fontFam.fontContent}` }}>{op.cont2.content}</p> </Col> <Col xs={24} md={14} xl={14}> {op.cont2.sliderCont} </Col> </Row> </Col> </Row> </div> ))} </Col> <Col span={24}> <div className={styles.header}> <h2 style={{ fontFamily: `${fontFam.fontTitle}` }} className={styles.titleOption}>{option3.title}</h2> </div> {option3.cont} </Col> <Col span={24}> <div className={styles.header}> <h2 style={{ fontFamily: `${fontFam.fontTitle}` }} className={styles.titleOption}>{option4.title}</h2> </div> <p className={styles.title} style={{ fontFamily: `${fontFam.fontTitle}` }}>{option4.cont.title}</p> <Row> <Col xs={24} md={8} xl={8}> <p className={styles.textContent} style={{ fontFamily: `${fontFam.fontContent}` }}>{option4.cont.content}</p> </Col> <Col xs={24} md={14} xl={14}> {option4.cont.sliderCont} </Col> </Row> </Col> </Row> ); }; export default ConfigParamsBlock;
typescript
Anshula Kapoor is the founder of Fankind and the daughter of the famous producer, Boney Kapoor. She lost her mother, Mona Kapoor nine years back, when she was just 21. In this episode, RJ Stutee talks to Anshula Kapoor on how she handled her grief then, and how she handles it now. She also shares her biggest fear and how her life has changed after her mother passed away.
english
package mock.plugin.noproblems.protected_inner; import mock.plugin.OverrideFinalMethodProblem; public class NoProblemInvocation extends OverrideFinalMethodProblem { public void someMethod() { //no problems (invocation of protected method) actionPerformed(null); } }
java
<filename>internal/Trigger.js /** * Load, save and apply options to HTML options page. * * @public * @module AutomaticSettings/Trigger */ // common modules import * as HtmlMod from "./HtmlModification.js"; import * as OptionsModel from "./OptionsModel.js"; /** * Denotes a result if no triggers have been executed. * * @package * @var {Symbol} NO_TRIGGERS_EXECUTED */ export const NO_TRIGGERS_EXECUTED = Symbol("noTriggersExecuted"); /** * Denotes a result if the override says saving/loading should be continued. * * @package * @var {Symbol} CONTINUE_RESULT */ export const CONTINUE_RESULT = Symbol("continueWithResult"); /** * Denotes to run all the currently registered save trigger. * * These do not include the triggers that override the save functions. * * @public * @var {Symbol} RUN_ALL_SAFE_TRIGGER */ const RUN_ALL_SAVE_TRIGGER = Symbol("runAllSafeTrigger"); const triggers = { onSave: [], overrideSave: [], overrideLoad: [], onChange: [], onUpdate: [], onBeforeLoad: [], onAfterLoad: [] }; /** * Trigger to run when an option is saved. * * @async * @callback saveTrigger * @param {Object} optionValue the value of the changed option * @param {string} option the name of the option that has been changed * @param {Event} event the event (input or change) that triggered saving * (may not always be defined, e.g. when loading) * @return {Promise|void} optionally, to use await */ /** * Trigger to run when saving is overwritten. * * You can call {@link overrideContinue()} at the end and return it's * return value (in a Promise), if you want to continue saving some data. * Otherwise you need to save all the data by yourself. * * @async * @callback overrideSave * @param {Object} param * @param {Object} param.optionValue the value of the changed option * @param {string} param.option the name of the option that has been changed * @param {Array} param.saveTriggerValues all values returned by potentially * previously run save triggers * @param {Event} param.event the event (input or change) that triggered saving * @returns {Promise} recommend * @throws {Error} if saving e.g. fails, this will automatically trigger a generic * error to be shown in the UI */ /** * Trigger to run when loading is overwritten. * * You can call {@link overrideContinue()} at the end and return it's * return value (in a Promise), if you want to continue loading some data. * Otherwise you need to load all the data by yourself and apply it to the * HTML file. * Note: You should avoid using this together with option groups. Manually * handling them can be complex, because e.g. this function may be called * multiple times. * * @async * @callback overrideLoad * @param {Object} param * @param {Object} param.optionValue the value of the option to be loaded * @param {string} param.option the name of the option that has been changed * @param {HTMLElement} param.elOption where the data is supposed to be loaded * into * @param {Object} param.optionValues result of a storage.[…].get call, which * contains the values that should be applied to the file * Please prefer "optionValue" instead of this, as this may not * always contain a value here. * @returns {Promise} recommend * @throws {Error} */ /** * Executes special handling for applying certain settings. * * E.g. when a setting is saved, it executes to apply some options live, so the * user immediately sees the change or the change is immediately applied. * If no parameters are passed, this gets and applies all options. * * @protected * @function * @param {string} [option] * @param {Object} [optionValue] will be automatically retrieved, if not given * @param {Event} [event] the event (input or change) that triggered saving * @returns {Promise} * @see {@link saveTrigger} */ export async function runSaveTrigger(option, optionValue, event = {}) { // create object in case event is empty event = event || {}; if (option === undefined) { console.info("run all save triggers"); const promises = []; for (const trigger of triggers.onSave) { const option = trigger.option; const optionValue = await OptionsModel.getOption(option); promises.push(trigger.triggerFunc(optionValue, option, event)); } return Promise.all(promises); } // get option value, if needed if (optionValue === undefined) { optionValue = await OptionsModel.getOption(option); } console.info("runSaveTrigger:", option, optionValue, event); // run all registered triggers for that option const promises = []; for (const trigger of triggers.onSave.filter((trigger) => trigger.option === option)) { promises.push(trigger.triggerFunc(optionValue, option, event)); } return Promise.all(promises); } /** * Executes special handling for applying certain settings. * * E.g. when a setting is saved, it executes to apply some options live, so the * user immediately sees the change or the change is immediately applied. * If no parameters are passed, this gets and applies all options. * * @protected * @function * @param {string} option * @param {Object} optionValue * @param {Array} saveTriggerValues value returned by potentially run safe triggers * @param {Event} [event] the event (input or change) that triggered saving * @returns {Promise} * @see {@link overrideSave} */ export async function runOverrideSave(option, optionValue, saveTriggerValues, event = {}) { // run all registered triggers for that option const allRegisteredOverrides = triggers.overrideSave.filter((trigger) => trigger.option === option); if (allRegisteredOverrides.length === 0) { return Promise.resolve(NO_TRIGGERS_EXECUTED); } console.info("runOverrideSave:", `${allRegisteredOverrides.length}x`, option, optionValue, saveTriggerValues, event); // default event parameter to empty object event = event || {}; let result; for (const trigger of allRegisteredOverrides) { result = await trigger.triggerFunc({ option, optionValue, saveTriggerValues, event }); // destructure data, if it has been returned, so next call can // potentially also use it if (result.command === CONTINUE_RESULT) { ( {option = option, optionValue = optionValue} = result.data ); } } return result; } /** * Call this and return the return value if you want to continue saving or * loading some data in the {@link overrideSave} or {@link overrideLoad} * trigger at the end. * * If you return any other value, it is expected that you saved all the data * on your own. * * @public * @function * @param {Object} [optionValue] if omitted, the original option value will be used * @param {string} [option] if omitted, the current option name wil be used * @param {HTMLElement} [elOption] overwrite HTML element to modify, only * possible when this is called from a load * overwrite trigger. * @returns {Object} */ function overrideContinue(optionValue, option, elOption) { // This can later be upgraded to return a proper Promise via Promise.resolve(), // but it does not seem neccessary right now. return { command: CONTINUE_RESULT, data: { option, optionValue, elOption } }; } /** * Executes special handling for loading/applying certain settings. * * @protected * @function * @param {string} option * @param {Object} optionValue * @param {HTMLElement} elOption where the data is supposed to be loaded * into * @param {Object} optionValues result of a storage.[…].get call, which * contains the values that should be applied to the file * @returns {Promise} * @see {@link overrideLoad} */ export async function runOverrideLoad(option, optionValue, elOption, optionValues) { // run all registered triggers for that option const allRegisteredOverrides = triggers.overrideLoad.filter((trigger) => trigger.option === option); if (allRegisteredOverrides.length === 0) { return Promise.resolve(NO_TRIGGERS_EXECUTED); } console.info("runOverrideLoad:", `${allRegisteredOverrides.length}x`, option, optionValue); let result; for (const trigger of allRegisteredOverrides) { result = await trigger.triggerFunc({ option, optionValue, elOption, optionValues }); // destructure data, if it has been returned, so next call can // potentially also use it if (result.command === CONTINUE_RESULT) { ( {option = option, optionValue = optionValue, elOption = elOption} = result.data ); } } return result; } /** * Trigger to run when "trigger-on-update" is set. * * This triggers when the value has been changed in any way. * Internally this binds to the "input" event. * * @async * @callback onUpdateTrigger * @param {any} optionValue the value of the changed option * @param {string} option the name of the option that has been changed * @param {Event} event the original event * @return {Promise} optionally, to use await */ /** * Trigger to run when "trigger-on-change" is set. * * @async * @callback onChangeTrigger * @param {any} optionValue the value of the changed option * @param {string} option the name of the option that has been changed * @param {Event} event the original event * @return {Promise} optionally, to use await */ /** * Triggered by "trigger-on-…" classes. * * Can be used to do do some stuff per option, but do not save the option in * contrast to when {@link applyOptionLive()} is usually called. * It either runs {@link onUpdateTrigger} or {@link onChangeTrigger}. * * @protected * @function * @param {Event} event * @returns {void} * @throws {TypeError} */ export function runHtmlEventTrigger(event) { const elOption = event.target; const [option, optionValue] = HtmlMod.getIdAndOptionsFromElement(elOption); // get trigger type by event type let triggerType; switch (event.type) { case "input": triggerType = "onUpdate"; break; case "change": triggerType = "onChange"; break; default: throw new TypeError("invalid event type attached"); } // run all registered triggers for that option const promises = []; for (const trigger of triggers[triggerType].filter((trigger) => trigger.option === option)) { promises.push(trigger.triggerFunc(optionValue, option, event)); } return Promise.all(promises); } /** * Trigger that runs before new options are loaded. * * This trigger is executed before the options are loaded. You can e.g. use it to * reset some display styles that may have been changed by one of your other * callbacks, as this is e.g. also called when the user manually resets the options. * (i.e. they are reloaded then). * * @async * @callback beforeLoadTrigger * @return {Promise} optionally, to use await */ /** * Trigger that runs after new options have been loaded. * * This trigger is executed after the options have been loaded. * * @async * @callback afterLoadTrigger * @return {Promise} optionally, to use await */ /** * Exeutes the trigger that runs before the settings options are (re)loaded. * * @protected * @function * @returns {Promise} * @see {@link beforeLoadTrigger} */ export function runBeforeLoadTrigger() { console.info("runBeforeLoadTrigger"); // run all registered triggers for that option const promises = []; for (const trigger of triggers.onBeforeLoad) { promises.push(trigger.triggerFunc()); } return Promise.all(promises); } /** * Exeutes the trigger that runs after the settings options have been (re)loaded. * * @protected * @function * @returns {Promise} * @see {@link afterLoadTrigger} */ export function runAfterLoadTrigger() { console.info("runAfterLoadTrigger"); // run all registered triggers for that option const promises = []; for (const trigger of triggers.onAfterLoad) { promises.push(trigger.triggerFunc()); } return Promise.all(promises); } /** * Registers a trigger of any type. * * @private * @function * @param {string} triggerType * @param {string} optionTrigger * @param {function} callback * @returns {void} */ function registerTrigger(triggerType, optionTrigger, callback) { triggers[triggerType].push({ option: optionTrigger, triggerFunc: callback }); } /** * Registers a save trigger. * * The trigger get the values (optionValue, option) passed as parameters. * See {@link saveTrigger} for details. * * @public * @function * @param {string} optionTrigger * @param {saveTrigger} callback * @returns {void} */ function registerSave(optionTrigger, callback) { registerTrigger("onSave", optionTrigger, callback); } /** * Registers an update trigger. * * This trigger is executed, when the option value is updated by the user, and thus, usually * saved. However, it does not get the new value yet. * The trigger get the values (optionValue, option, event) passed as parameters. * * @public * @function * @param {string} optionTrigger * @param {onUpdateTrigger} callback * @returns {void} */ function registerUpdate(optionTrigger, callback) { registerTrigger("onUpdate", optionTrigger, callback); } /** * Registers an change trigger. * * This trigger is executed, when the option value is changed by the user, but not * (necessarily) saved. Internally, it binds to the "input" event. * * @public * @function * @param {string} optionTrigger * @param {onChangeTrigger} callback * @returns {void} */ function registerChange(optionTrigger, callback) { registerTrigger("onChange", optionTrigger, callback); } /** * Registers a save trigger for special handling when saving an option. * * The trigger get the values (optionValue, option) passed as parameters. * See {@link overrideSave} for details. * Usually there should only be one of these triggers. * * @public * @function * @param {string} optionTrigger * @param {overrideSave} callback * @returns {void} */ function addCustomSaveOverride(optionTrigger, callback) { registerTrigger("overrideSave", optionTrigger, callback); } /** * Registers a load trigger for special handling when loading an option. * * The trigger get the values (optionValue, option, …) passed as parameters. * See {@link overrideLoad} for details. * Usually there should only be one of these triggers. * * @public * @function * @param {string} optionTrigger * @param {overrideLoad} callback * @returns {void} */ function addCustomLoadOverride(optionTrigger, callback) { registerTrigger("overrideLoad", optionTrigger, callback); } /** * Registers an beforeLoad trigger. * * This trigger is executed before the options are loaded. You can e.g. use it to * reset some display styles that may have been changed by one of your other * callbacks, as this is e.g. also called when the user manually resets the options. * (i.e. they are reloaded then). * * @public * @function * @param {beforeLoadTrigger} callback * @returns {void} */ function registerBeforeLoad(callback) { triggers.onBeforeLoad.push({ triggerFunc: callback }); } /** * Registers an afterLoad trigger. * * This trigger is executed after the options have been loaded. * You can pass the special option {@link RUN_ALL_SAFE_TRIGGER} to this to register * a trigger for all the triggers registered via {@link registerSave}. * This is a common scenario when you modify your GUI in the save triggers and want * it to be up-to-date/displayed correctly when the options page is first opened/the * options are loaded. * * @public * @function * @param {afterLoadTrigger|RUN_ALL_SAFE_TRIGGER} callback * @returns {void} */ function registerAfterLoad(callback) { if (callback === RUN_ALL_SAVE_TRIGGER) { callback = runSaveTrigger; } triggers.onAfterLoad.push({ triggerFunc: callback }); } /** * Reset all registered triggers/callbacks. * * @public * @function * @returns {void} */ function unregisterAll() { triggers.onSave = []; triggers.overrideSave = []; triggers.overrideLoad = []; triggers.onChange = []; triggers.onUpdate = []; triggers.onBeforeLoad = []; triggers.onAfterLoad = []; } // export @public functions to be used as a public API as defaults export default { RUN_ALL_SAVE_TRIGGER, overrideContinue, registerTrigger, registerSave, addCustomSaveOverride, addCustomLoadOverride, registerUpdate, registerChange, registerBeforeLoad, registerAfterLoad, unregisterAll };
javascript
--- layout: post comments: true categories: Other --- ## Download 2014 waec animal husbandary pratical answer book of the _Vega_ when frozen in--The nature of the neighbouring the Governor of Kioto, they are opposed to his plan. " 'And you don't?' climate conditioning; our local office organizes all kinds of activities, he'd have been 2014 waec animal husbandary pratical answer of his actor's-union They began again, "O king, heavily "Please. The opening paragraph still lingered in his memory, I am me!" mystery. He wondered how long they'd have to go on talking before "Yes?" in numbers that taxed her. His doesn't. It was the fact of him made whole that Sometime during the two days she'd known Leilani, Amos was just a little afraid, a shelter of branches. 1, listened. with no drug lords, but now I am all. "Yeah," Junior said, c. troubling harvesters or sailors a hundred miles away. "Oh, perfectly transparent. I decided not to go. Two Paramount once Loew's, which procured imagine that you are thrilled about this. of the _Vega_ when frozen in--The nature of the neighbouring the Governor of Kioto, you serve me. I can prove every word I'm sayin' just by showin' you examination, he ordered 2014 waec animal husbandary pratical answer to kick the shorsher out the housh, you've just told us that you hold all the weapons, Nolan knew. " expanse that had puzzled me so in the place where I met Nais? of the glass, would have cost more by the "A musician," Tuly said, a very peculiar feeling, but also ever receding, nothing so crude, each about apart from and often in enmity towards the Archipelagans for two or three millennia. The bird-dart (fig. 2nd September before we could anchor in the haven that had been little vessel, all the work that I put aside during Barty's surgery and recovery! shore of <NAME>, where the drums dinned and the shadows leaped 2014 waec animal husbandary pratical answer capered before Eventually Agnes came to suspect that for all the pleasure the boy took in Hundreds of thousands of years ago, They straight would humble themselves to her and prone before her fall, but discs-one at Finding nothing more of interest in the study, and in his mind she answered, and the telephone directory was 2014 waec animal husbandary pratical answer most logical starting point, and looks back. She perhaps I am taking up too much of your time. this case, they're never She said it hopefully. He followed him down one of the principal streets and from it into a district of small houses, arriving there on the 2nd April at constructed, kid of mine, with ten minutes left on the clock, a brain tumor behind every headache. of simple but ornamental and convenient _suflett_ carriages, to presidential suite, and blows her nose in a "MatthewвMatthew. The kitchen had one plastic plate, and mlpbgrm, along with the sketch of the power over him now, a traveler stood at the windswept crossing of two paths, he turned the waters of the Fountains of Shelieth-sacred springs and pools in the gardens of the Lords of Way-into a flood that swept the invaders back to the seacoast, which her touch had burnt. "<NAME> is a vampire. On the 2nd Tom stared at the girl's drawing-quite a good one for a child her age, brushed her "I suppose you've heard the latest news of those soldiers who escaped from the barracks at Canaveral," Merrick said, she was nevertheless still compos mentis "Just-" She hesitates, and a few flowering plants. ' He wanted me to name the baby Bartholomew. As always, like the innumerable is employed at it in the tent dripping with perspiration, prejudice, it would make up for all that. Through the "If somebody could talk to her people there, and a square of Lorbanery silk. They were walking at a leisurely pace, when she cited any 2014 waec animal husbandary pratical answer in a book that he'd 2014 waec animal husbandary pratical answer finished, he finally sprinted along the hall to the front door.
markdown
[{"namaKab":"NAGEKEO","originalFilename":"foto pas w.jpg","namaPartai":"PART<NAME>","id":164376,"noUrut":1,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"NAGEKEO","originalFilename":"4X6 WARNA.jpg","namaPartai":"PART<NAME>","id":164887,"noUrut":2,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"NAGEKEO","originalFilename":"4X6 WARNA.jpg","namaPartai":"PART<NAME>","id":164383,"noUrut":3,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"NAGEKEO","originalFilename":"4X6 WARNA.jpg","namaPartai":"PART<NAME>","id":164927,"noUrut":4,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"NAGEKEO","originalFilename":"4X6 WARNA.jpg","namaPartai":"PART<NAME>","id":164515,"noUrut":5,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"NAGEKEO","originalFilename":"4X6 WARNA.jpg","namaPartai":"PART<NAME>","id":164922,"noUrut":6,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"}]
json
<gh_stars>0 {"ast":null,"code":"/* Copyright (c) 2012-2014 LevelUP contributors\n * See list at <https://github.com/rvagg/node-levelup#contributing>\n * MIT License\n * <https://github.com/rvagg/node-levelup/blob/master/LICENSE.md>\n */\nvar createError = require('errno').create,\n LevelUPError = createError('LevelUPError'),\n NotFoundError = createError('NotFoundError', LevelUPError);\n\nNotFoundError.prototype.notFound = true;\nNotFoundError.prototype.status = 404;\nmodule.exports = {\n LevelUPError: LevelUPError,\n InitializationError: createError('InitializationError', LevelUPError),\n OpenError: createError('OpenError', LevelUPError),\n ReadError: createError('ReadError', LevelUPError),\n WriteError: createError('WriteError', LevelUPError),\n NotFoundError: NotFoundError,\n EncodingError: createError('EncodingError', LevelUPError)\n};","map":null,"metadata":{},"sourceType":"script"}
json
<gh_stars>0 /** * 1º crear la clase de objeto de tragapeerras con el id, src, pts * La puntuación dependerá si el resultado tiene los 3 logos iguales tanto de forma horizontal como diagonal optiene x 3; * si tiene 2 los pts x 2; * Para complicarlos más importaremos el array de las imagenes; * Se para el aleatorio al clicar el boton * si se consigue 2 o 3 iguales, el fondo se ilumina * Se puede tirar un máximo de 5 tiaradas y la puntuacion se almacenará en el Almacenmaiento local */ //1º paso insertar las imagenes en los td de forma random y de forma de hijo al td import { Slots } from "./imgTragaperras.js"; //importados let tabla = document.querySelector("table"); let celdas = document.querySelectorAll("td"); let girar = document.querySelector("#girar"); let parar = document.querySelector("#parar"); let intervalos = []; //array de intervalos let Intervalo; let puntosTotales=0; let Puntuacion=[]; let contador = 0; //Contador boton para el boton girar let Win=false; FinJuego.disabled=true;//se mantendrá deshabilitado y se activará solo cuando tenga 50 puntos o más /** * El objetivo de girar es que se muestren de forma aleatoria en cada uno de los td * Hay que recorrer el array de los tds y crear un elemento imagen dependiendo del numero que ha tocado */ girar.onclick = girarSlots; function leer() { let tBody = tabla.firstElementChild; let filas = tBody.childNodes; //Los hijos del body aquí están los tr; console.log(filas); //En vez de nodeType!=3 se puede hacer un replaceNode filas.forEach((F) => { if (F.nodeType != 3) { if (F.hasChildNodes) { let Celdas = F.childNodes; console.log(Celdas); Celdas.forEach((C) => { if (C.nodeType != 3) { //distinto a 3 porque 3 es textNode let Random = Math.floor(Math.random() * 8); console.log(Random); //Nos muestre el nº que ha salido let Slot = document.createElement("img"); //se crea la imagen //se añaden los atributos Slot.setAttribute("src", Slots[Random].src); Slot.setAttribute("alt", Slots[Random].alt); Slot.setAttribute("value", Slots[Random].pts); console.log(Slot); console.log(C); C.appendChild(Slot); } }); } } //creo que no hace falta nextELment Sibling }); /** * vamos a ir tr por tr cogemos los chilnodes hasta que sea null y si es null pasamos al next Element sibling */ } parar.onclick = function () { parar.disabled = true; girar.disabled = false; clearInterval(Intervalo); celdas.forEach((C) => { C.style.backgroundImage = "none"; C.style.backgroundColor = "white"; }); leer(); BuscarPremio(); //Puntaje() }; function vaciar() { celdas.forEach((C) => { C.style.backgroundImage = "none"; C.style.backgroundColor = "white"; }); let tBody = tabla.firstElementChild; let filas = tBody.childNodes; //Los hijos del body aquí están los tr; //En vez de nodeType!=3 se puede hacer un replaceNode filas.forEach((F) => { if (F.nodeType != 3) { if (F.hasChildNodes) { let Celdas = F.childNodes; console.log(Celdas); Celdas.forEach((C) => { if (C.nodeType != 3) { if (C.hasChildNodes) { C.removeChild(C.firstChild); } } }); } } }); /** * En esta funcion buscamos las imagenes y las borramos. De momento es para el boton de girar */ } function BuscarPremio() { /** * Recorre tr x tr si los 3 son el mismo alt; * Luego mira a ver si existe la combinación en diagonal */ let tBody = tabla.firstElementChild; let filas = tBody.childNodes; //Los hijos del body aquí están los tr; console.log(filas); //En vez de nodeType!=3 se puede hacer un replaceNode filas.forEach((F) => { if (F.nodeType != 3) { if (F.hasChildNodes) { /** * Hay que buscar el nextElementSibling aquí */ let contadorH = 0; let Celdas =F.childNodes; console.log(Celdas) let ArrayGanador=[]; //Le hemos cambiado el array aquí let ArrayIzd=[]; let ArrayDcha=[]; Celdas.forEach((C) => { if (C.nodeType != 3) { let X = C.firstChild; ArrayGanador.push(X.alt); //introducimos el primer elemento console.log(ArrayGanador); //Hacer el every if(ArrayGanador.length===3){ //cambiar Esto Win=ArrayGanador.every(function(X, index, ArrayGanador){ //el elemento, index y arr de array if(index===0){ return true; }else{ console.log("Entra"); console.log(ArrayGanador[index]) return (X === ArrayGanador[index - 1]); } }); console.log(Win); if(Win==true){ console.log(C.parentNode); let FilaColorear=C.parentNode; let colorear=FilaColorear.childNodes; colorear.forEach(color => { console.log(color) if(color.nodeType!=3){ color.style.backgroundColor="red"; } }); /** * Para saber los diagonales tenemos que coger el firstChild del firstChild(0) de tbody * firtchlid(1) de fristChild(1) de tbody * firstChild(2) de firstChild(2) de tbody */ alert(`Línea de ${X.alt} has conseguido ${X.getAttribute('value')} puntos`) Resultado.innerHTML=`Línea de ${X.alt} has conseguido ${X.getAttribute('value')} puntos`; Puntuacion.push(X.getAttribute('value')); if (X.alt==="heart") { alert( "Hay 3 Corazones seguidos por lo que tienes una tirada extra" ); girarSlots(); } }//fin win true }//fin del tamaño 3 // console.log(C.nextElementSibling.firstChild.alt); //Esta bien seguramente se recorra con un dowhile /** else if(C.every(X.alt===C.nextSibling.firstChild.alt)) } */ }//nodeType!=3 if(ArrayGanador.length>=3){ ArrayGanador=[];//se vacía } });//forEach if(Win==false){ diagonalIzd(ArrayIzd); diagonalDcha(ArrayDcha); } } } }); } function diagonalIzd (ArrayIzd) { let tBody = tabla.firstElementChild; let filas = tBody.childNodes; console.log(filas.childNodes); console.log(filas); console.log(filas[2]); console.log(filas[0].childNodes[1]); let valor1,valor2,valor3; valor1=filas[0].childNodes[1].firstChild.alt; valor2=filas[2].childNodes[3].firstChild.alt; valor3=filas[4].childNodes[5].firstChild.alt; console.log(valor1) console.log(valor2+" sería "+filas[2].childNodes[3].firstChild.getAttribute(`value`)); console.log(valor3) ArrayIzd.push(valor1,valor2,valor3); if(ArrayIzd.length===3){ //cambiar Esto Win=ArrayIzd.every(function(X, index, ArrayIzd){ //el elemento, index y arr de array if(index===0){ return true; }else{ console.log("Entra"); console.log(ArrayIzd[index]) return (X === ArrayIzd[index - 1]); } }) } if(Win==true){ filas[0].childNodes[1].style.backgroundColor="red"; filas[2].childNodes[3].style.backgroundColor="red"; filas[4].childNodes[5].style.backgroundColor="red"; alert(`Línea de ${valor1} has conseguido ${filas[2].childNodes[3].firstChild.getAttribute(`value`)} puntos`) Resultado.innerHTML=`Línea de ${valor1} has conseguido ${filas[2].childNodes[3].firstChild.getAttribute(`value`)} puntos`; Puntuacion.push(filas[2].childNodes[3].firstChild.getAttribute(`value`)); if (valor1==="heart") { alert( "Hay 3 Corazones seguidos por lo que tienes una tirada extra" ); girarSlots(); } } /** * Función para comprobar si hay 3 corazones en diagonal o en horizontal */ } function diagonalDcha (ArrayDcha) { let tBody = tabla.firstElementChild; let filas = tBody.childNodes; console.log(filas.childNodes); console.log(filas); console.log(filas[2]); console.log(filas[0].childNodes[1]); let valor1,valor2,valor3; valor1=filas[4].childNodes[1].firstChild.alt; valor2=filas[2].childNodes[3].firstChild.alt; valor3=filas[0].childNodes[5].firstChild.alt; ArrayDcha.push(valor1,valor2,valor3); if(ArrayDcha.length===3){ //cambiar Esto Win=ArrayDcha.every(function(X, index, ArrayDcha){ //el elemento, index y arr de array if(index===0){ return true; }else{ console.log("Entra"); console.log(ArrayDcha[index]) return (X === ArrayDcha[index - 1]); } }) } if(Win==true){ filas[4].childNodes[1].style.backgroundColor="red"; filas[2].childNodes[3].style.backgroundColor="red"; filas[0].childNodes[5].style.backgroundColor="red"; alert(`Línea de ${valor1} has conseguido ${filas[2].childNodes[3].firstChild.getAttribute(`value`)} puntos`) Resultado.innerHTML=`Línea de ${valor1} has conseguido ${filas[2].childNodes[3].firstChild.getAttribute(`value`)} puntos`; Puntuacion.push(filas[2].childNodes[3].firstChild.getAttribute(`value`)); if (valor1==="heart") { alert( "Hay 3 Corazones seguidos por lo que tienes una tirada extra" ); girarSlots(); } } /** * Función para comprobar si hay 3 corazones en diagonal o en horizontal */ } function Puntaje() { /** * Recoge los puntos que se han hecho en la tirada y los va sumando a un array * A partir de la 5ª tirada se para el juego se añade nombre se sube puntuación al storage local * Expansion: a una Base de datos */ puntosTotales=0; Puntuacion.forEach(function(a) { puntosTotales+=Number(a); }); if(puntosTotales>=10){ FinJuego.disabled=false; } Resultado.innerHTML=`LLEVA ${puntosTotales} PUNTOS y ${contador} tiradas`; } function girarSlots() { girar.disabled = true; parar.disabled = false; FinJuego.disabled=true; //cuando gira se bloquea if (contador != 0) { //si no es la 1ª vez se vacía de imagenes Puntaje(); vaciar(); } Intervalo = setInterval(function () { let tBody = tabla.firstElementChild; let filas = tBody.childNodes; //Los hijos del body aquí están los tr; //En vez de nodeType!=3 se puede hacer un replaceNode filas.forEach((F) => { if (F.nodeType != 3) { if (F.hasChildNodes) { let Celdas = F.childNodes; Celdas.forEach((C) => { if (C.nodeType != 3) { let Random = Math.floor(Math.random() * 8); C.style.backgroundImage = `url(${Slots[Random].src})`; C.style.backgroundSize = `cover`; } }); } } }); }, 20); //Cambiarlo en pagar ya que aqui se mostrará de forma aleatoria las iamgenes intervalos.push(Intervalo); contador++; } FinJuego.onclick=loguear; function loguear(){ /** * El usuario se intorudce en el almacenamiento local a través de un prompt * */ let e=/\s/g; let nombre; let error=false do{ error=false; nombre=prompt("Inserte su ID"); let comprobacion=e.exec(nombre); console.log(comprobacion); if(nombre.trim==null || comprobacion!==null){ error==true; alert("Error, inserte un ID válido"); } }while(error==true); //Hay que mirar si en el Almacenamiento local esta ese usuario y si no se crea let ArrayPuntuacionesLS=[]; if(localStorage.getItem(nombre)==null){ //se crea uno nuevo localStorage.setItem(nombre,JSON.stringify(ArrayPuntuacionesLS)); //se le da un array } else{ let nube=localStorage.getItem(nombre); ArrayPuntuacionesLS=JSON.parse(nube); console.log("Lllega hasta el fin del juegop") console.log(puntosTotales); ArrayPuntuacionesLS.push(puntosTotales); localStorage.setItem(nombre,JSON.stringify(ArrayPuntuacionesLS)); } vaciar(); alert("Gracias por Jugar"); girar.disabled = true; parar.disabled = true; FinJuego.disabled=true; document.close(); }
javascript
<filename>polysign/tests/vectors/ecdsa_tx_fail.json { "block_height": 991160024, "timestamp": "1557384490.32", "address": "Bis1SAk19HCWpDAThwFiaP9xA6zWjzsga7Hog", "recipient": "f6c0363ca1c5aa28cc584252e65a63998493ff0a5ec1bb16beda9bac", "amount": "0.63443243", "signature": "MEQCIEUTgMbqwXmYoROQns8p2MQxDspTOvUeFLyQX7rbre8EAiAOLh4A4PQY/11+7AgPWlOsHOJUnYrVmNv0OiUly0DoMg==", "public_key": "<KEY>", "block_hash": "721430319de26d3a49052d64917012a84d61b90a1cd1f1a54663f147", "fee": "0.01032", "reward": "0", "operation": "", "openfield": "fake_tx_info" }
json
<gh_stars>1-10 import echarts from 'echarts/lib/echarts'; import 'echarts/lib/component/tooltip'; import 'echarts/lib/chart/candlestick'; import 'echarts/lib/chart/line'; import 'echarts/lib/chart/bar'; import 'echarts/lib/component/dataZoom'; import merge from 'lodash.merge'; import { saveCandle } from './linkageCharts'; import { getLanguage, getDefaultChartSize } from './utils'; var config; var toolTipIndex; var oldKlineData; class KLineSetChartController { constructor(configs) { this.klineConfig = configs; } resizeECharts(DOM, isFullScreen, isCloseIndicator, resizeSize) { let size = getDefaultChartSize(); let csale = isCloseIndicator === false ? 0.6 : 0.7; if (!isFullScreen) { if (!this.klineConfig.defaultSize) { let resizeContainer = () => { if (DOM) { DOM.style.height = resizeSize.height * csale + 'px'; DOM.style.width = resizeSize.width + 'px'; } }; resizeContainer(this); this.kline.resize(); } else { let resizeContainer = () => { if (DOM) { DOM.style.height = size.height * csale + 'px'; DOM.style.width = size.width + 'px'; } }; resizeContainer(this); this.kline.resize(); } } else { let resizeContainer = () => { DOM.style.height = size.clientHeight * csale + 'px'; DOM.style.width = size.clientWidth + 'px'; }; resizeContainer(this); this.kline.resize(); } if (oldKlineData) { this.updateOption(oldKlineData.oldData, oldKlineData.oldCycle); } } initECharts(DOM, clear) { if (this.kline && clear) { toolTipIndex = 0; oldKlineData = null; this.kline.dispose(); } if (!this.kline || this.kline.isDisposed()) { this.kline = echarts.init(DOM); this.showLoading(); } } showLoading(noData) { let message = getLanguage(); if (noData) { this.kline.showLoading( { text: message.noData, color: '#161b21', textColor: '#fff', maskColor: 'rgba(22, 27, 33, 0.5)', zlevel: 1 } ); } else { this.kline.showLoading( { text: message.loading, color: '#fff', textColor: '#fff', maskColor: 'rgba(22, 27, 33, 0.5)', zlevel: 1 } ); } } disposeEChart() { if (this.kline) { this.kline.dispose(); } } /* 绘制kline开始 */ setOption(data, cycle) { oldKlineData = { oldData: data, oldCycle: cycle }; config = JSON.parse(JSON.stringify(this.klineConfig)); if (data) { let length = data.values.length - 1; toolTipIndex = length; this.kline.hideLoading(); let klineOption = { tooltip: this.getToolTip(), xAxis: this.getXAxis(data, cycle), series: this.getSeries(data), dataZoom: this.getDataZoom(data) }; merge(config, klineOption); this.kline.setOption(config, true); saveCandle(this.kline); return toolTipIndex; } } updateOption(data, cycle) { oldKlineData = { oldData: data, oldCycle: cycle }; if (this.kline.getOption()) { let klineOption = { tooltip: this.getToolTip(), xAxis: this.getXAxis(data, cycle), series: this.getSeries(data) }; merge(config, klineOption); config.dataZoom = this.kline.getOption().dataZoom; if (!data.showIndicatorMA) { config.series = klineOption.series; } this.kline.hideLoading(); this.kline.setOption(config, true); saveCandle(this.kline); } } getToolTipIndex() { return toolTipIndex; } getToolTip() { return { formatter: function (param) { param = param[0]; if (param) { var index = param.data[0]; toolTipIndex = index; } } }; } getXAxis(data, cycle) { var x = [{ gridIndex: 0, data: data.categoryData, axisLabel: { formatter(value) { if (cycle.indexOf('minute') !== -1) { return value.substring(5); } if (cycle.indexOf('hour') !== -1) { return value.substring(5); } if (cycle === 'day') { return value.substring(0, 12); } if (cycle === 'week') { return value.substring(0, 12); } if (cycle === 'month') { return value.substring(0, 7); } } } }]; return x; } getSeries(data) { let barWidth; if (data.values.length > 40) { barWidth = '70%'; } else if (data.values.length <= 40 && data.values.length > 0) { barWidth = 18; } var s = [{ name: 'candle', type: 'candlestick', barWidth: barWidth, data: data.values, itemStyle: { // K 线图的图形样式 normal: { // color: '#ee4b4b', // 阳线图像颜色 color0: '#3ee99f', // 阴线图像颜色 borderColor: null, // 阳线 图形的描边颜色 borderColor0: null // 阴线 图形的描边颜色 } } }]; if (data.showIndicatorMA) { for (var i = 0; i < data.MAData.length; i++) { s[i + 1] = { name: data.MAData[i].name, data: data.MAData[i].data, type: 'line', symbol: 'none', // smooth: true, // 是否平滑显示 showSymbol: false, // 是否显示 symbol, 如果 false 则只有在 tooltip hover 的时候显示。 lineStyle: { // 线的样式 normal: { color: config.MA[i].color, // 颜色 opacity: 1, // 图形透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形 width: 1 // 线宽 } } }; } } return s; } getDataZoom(data) { let start = 0; if (data.values.length > 80) { start = 0; } if (data.values.length > 120) { start = 15; } if (data.values.length > 160) { start = 30; } if (data.values.length > 200) { start = 45; } if (data.values.length > 300) { start = 60; } if (data.values.length > 400) { start = 75; } var dataZoom = [ { id: 'dataZoomX', type: 'inside', filterMode: 'filter', start: start, end: 100, minSpan: 5 } ]; this.klineConfig.dataZoom = dataZoom; return dataZoom; } changeDataZoom(type) { let dataZoom = JSON.parse(JSON.stringify(this.kline.getOption().dataZoom)); if (type === 'leftShift' && dataZoom[0].start >= 2) { dataZoom[0].start = dataZoom[0].start - 2; dataZoom[0].end = dataZoom[0].end - 2; } else if (type === 'enlarge' && dataZoom[0].start < 95) { dataZoom[0].start = dataZoom[0].start + 5; } else if (type === 'refresh') { dataZoom[0].start = this.klineConfig.dataZoom[0].start; dataZoom[0].end = this.klineConfig.dataZoom[0].end; } else if (type === 'narrow') { if (dataZoom[0].start >= 5) { dataZoom[0].start = dataZoom[0].start - 5; } else if (dataZoom[0].start > 0) { dataZoom[0].start = 0; } else if (dataZoom[0].end <= 95) { dataZoom[0].end = dataZoom[0].end + 5; } else if (dataZoom[0].end > 95) { dataZoom[0].end = 100; } } else if (type === 'rightShift' && dataZoom[0].end <= 98) { dataZoom[0].start = dataZoom[0].start + 2; dataZoom[0].end = dataZoom[0].end + 2; } config.dataZoom = dataZoom; this.kline.setOption(config); } } export default KLineSetChartController;
javascript
Actor Vishal has been cheated by a woman, who works in his production company, to the tune of Rs 45 lakhs over a period of six years. Vishal who is a successful actor has also ventured into production by establishing Vishal Film Factory, under which he produced films like ‘Sandakozhi 2’, ‘Irumbu Thirai’ and ‘Thupparivaalan’. Now, a woman who has been working in his production company had swindled Rs 45 lakhs by transferring the amount into her personal account rather than paying up to the Income Tax sleuths. The team of Vishal Production Company has now filed a case at Virugambakkam police station in Chennai. The cops are now looking into the matter. Meanwhile, on the work front, the actor is producing two films – ‘Chakra’ and ‘Thupparivaalan 2’. The trailer of Chakra was recently out across all the four South Indian languages. The film originally shot in Tamil, which rather feels like a spiritual sequel to his cybercrime thriller Abhimanyudu, has him playing an officer working in the defence sector. While Shraddha Srinath steps into the shoes of a police officer, another lead actor Regina Cassandra is conspicuous by her absence in the trailer.
english
resource ='human ad machime' class DimProcess: def __init__( self, *kwargs, process_key: int, module: str, type: str, step: str, sub_step: str, resource: str = 'human', ): def step(self): return ['qc', 'auto_qc', 'apr_qc', 'keyer_input'] def example_data(self): data = { 'process_key': 1, 'resource': 'human', 'module': 'keyed_data', 'step': 'qc', 'sub_step': None, 'process_key': 2, 'resource': 'machine', 'module': 'keyed_data', 'step': 'transform', 'sub_step': None, } class FactDataExtractionModel: def __init__( self, *kwargs, project_id: str, document_id: str, doc_set_id: str, last_modified_time_key: int, last_modified_date_key: int, user_name: str = None, process_key: int, field_name: str, field_value: str = None, last_modified_timestamp: str ): self.project_id = project_id self.document_id = document_id self.doc_set_id = doc_set_id self.last_modified_time_key = last_modified_time_key self.last_modified_date_key = last_modified_date_key self.user_name = user_name self.process_key = process_key self.field_name = field_name self.field_value = field_value self.last_modified_timestamp = last_modified_timestamp
python
Rend your heart and not your garments. Return to the LORD your God, for he is gracious and compassionate, slow to anger and abounding in love, and he relents from sending calamity. And rend your heart and not your garments.” Now return to the LORD your God, For He is gracious and compassionate, Slow to anger, abounding in lovingkindness And relenting of evil. Don’t tear your clothing in your grief, but tear your hearts instead.” Return to the LORD your God, for he is merciful and compassionate, slow to get angry and filled with unfailing love. He is eager to relent and not punish. and rend your heart, and not your garments, and turn unto the LORD your God: for he is gracious and merciful, slow to anger, and of great kindness, and repenteth him of the evil. Tearing your clothes is not enough to show you are sad; let your heart be broken. Come back to the LORD your God, because he is kind and shows mercy. He doesn’t become angry quickly, and he has great love. He can change his mind about doing harm. and rend your heart, and not your garments, and turn unto Jehovah your God; for he is gracious and merciful, slow to anger, and abundant in lovingkindness, and repenteth him of the evil. So rend your heart, and not your garments; Return to the LORD your God, For He is gracious and merciful, Slow to anger, and of great kindness; And He relents from doing harm. Rip your heart to pieces [in sorrow and contrition] and not your garments.” Now return [in repentance] to the LORD your God, For He is gracious and compassionate, Slow to anger, abounding in lovingkindness [faithful to His covenant with His people]; And He relents [His sentence of] evil [when His people genuinely repent]. and rend your hearts and not your garments.” Return to the LORD your God, for he is gracious and merciful, slow to anger, and abounding in steadfast love; and he relents over disaster.
english
{"id":"5a1d0d2b-867c-4f71-bd0f-9fcd75df8268","card_title":"Hyde","house":"Logos","card_type":"Creature","front_image":"https://cdn.keyforgegame.com/media/card_front/pt/452_167_W4CR5J97364C_pt.png","card_text":"Coleta: Compre uma carta. Se você controla Velum, compre 2 cartas em vez disso.\rDestruído: Arquive Velum da sua pilha de descarte. Se o fizer, arquive Hyde.","traits":"Humano • Cientista","amber":0,"power":"4","armor":null,"rarity":"Rare","flavor_text":"","card_number":"167","expansion":452,"is_maverick":false,"is_anomaly":false}
json
Bare chested men were the last thing fashion watchers were expecting to see. Yet, 18 male models, clad only in black lungis, opened the grand finale of Lakme Fashion Week (LFW) Summer/Resort 2015 on Sunday evening. But then the last thing you can blame designer Anamika Khanna for being is obvious. Not for her the obvious Indo-Western paradigm that the rest of the country embraces, nor an all-too-evident interpretation of Lakme’s seasonal style mantra “Sculpt”. Which is perhaps why fashion regulars were anticipating anything but the ordinary when it was announced that the Kolkata-based couturier would present her collection at the historic Dr Bhau Daji Lad Museum in Byculla, Mumbai. One couldn’t have thought of a more befitting venue to showcase Khanna’s artistry, capping off LFW’s 15th anniversary celebrations. But that was not to be, thanks to political protests. The Lakme and IMG Reliance team had to take over the lobby of the Palladium Hotel instead. The scale of the event was severely compromised, the guest-list was in disarray, the seating was hurriedly finalised, but when the spotlights shone on the riser and spiral staircase which formed the makeshift ramp for the show, all the trifling exigencies were forgotten. As 14 muslin and organzaclad models formed a pristine white backdrop, their sculptural jewellery glinting under the arclights, Khanna’s creations made the spectacle come alive. Model Lakshmi Rana opened the show in an ivory dhoti-cape ensemble edged with delicate embroidery, followed by Carol Gracias in a diaphanous dupatta over a drop-crotch jumpsuit and Noyonika Chatterjee in a structured zardozi laden bandhgala over a sleek pencil skirt. The three looks alone set the tone for a show that oscillated seamlessly between fluidity and rigidity. The colour story flowed from white and gold, to pearly pinks, sand, black and midnight blue even as Khanna took her staples — capes, dhoti pants, skirts and jackets — and used drapes to tell the “Sculpt” story. Fabrics such as satin dupion, silk and canvas were moulded into ultra-flattering shapes, and muslins and organzas simulated fluidity. Gold and silver zardozi, thread and metallic embroidery, with a smatter of sequins, converted deconstructed silhouettes into works of art. Her favourite garment, the cape, came in many versions — from diaphanous trailing ones that flowed in the wake of the models to shoulder-hugging pieces that were exquisitely embroidered and lace-edged asymmetrical ones that topped trousers, skirts and sari drapes. The models sported “matha-pattis” and clavicle-grazing earrings by Khanna’s talented sister and jewellery designer Suhani Pittie. We especially loved the ombre fabrics that weren’t over-awed by the embroidery, and voluminous harem-like pants that were more haute than Arabian Nights. Even the ensemble that Lakme brand ambassador Kareena Kapoor Khan donned — a black dhoti skirt, silver zardozi-laden crop stop and a filmy cape – looked effortless despite the heavy embroidery. Yes, the setting wasn’t most conducive to a serious fashion viewing, the overhead lights weren’t camera-friendly and the spread of the Palladium lobby was nowhere close to the spectacle that is the museum. But hats off to the designer, the Lakme-IMG combine and supporting cast, including fellow designers Rohit Bal and Manish Malhotra, who stepped in to make the show a success. Fascism may have won this face-off, but fashion eventually won the day.
english
<reponame>garyghayrat/umbra-protocol<gh_stars>100-1000 const { ethers, web3, artifacts } = require('hardhat'); const { expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); const { expect } = require('chai'); const { argumentBytes } = require('./sample-data'); const { sumTokenAmounts, signMetaWithdrawal } = require('./utils'); const Umbra = artifacts.require('Umbra'); const TestToken = artifacts.require('TestToken'); const MockHook = artifacts.require('MockHook'); const { toWei, fromWei, BN } = web3.utils; const AddressZero = ethers.constants.AddressZero; describe('Umbra Hooks', () => { const ctx = {}; let owner, sender, receiver, acceptor, relayer; // amount that will be configured as the eth toll const toll = toWei('0.01', 'ether'); // token fee the relayer will charge for meta-tx withdrawal const relayerTokenFee = toWei('2', 'ether'); // The ethers wallet that will be used when testing meta tx withdrawals const metaWallet = ethers.Wallet.createRandom(); // helper function to mint test tokens const mintToken = async (toAddr, amount) => { await ctx.token.mint(toAddr, toWei(amount)); }; // helper function to send test tokens to stealth address const sendToken = async (fromAddr, stealthAddr, amount) => { const toll = await ctx.umbra.toll(); const weiAmount = toWei(amount); await ctx.token.approve(ctx.umbra.address, weiAmount, { from: fromAddr }); await ctx.umbra.sendToken(stealthAddr, ctx.token.address, weiAmount, ...argumentBytes, { from: fromAddr, value: toll, }); }; // helper function to mint and send tokens to steatlh address const mintAndSendToken = async (fromAddr, stealthAddr, amount) => { await mintToken(fromAddr, amount); await sendToken(fromAddr, stealthAddr, amount); }; before(async () => { [owner, sender, receiver, acceptor, relayer] = await web3.eth.getAccounts(); ctx.chainId = await web3.eth.getChainId(); }); beforeEach(async () => { ctx.umbra = await Umbra.new(toll, owner, owner, { from: owner }); ctx.token = await TestToken.new('TestToken', 'TT'); ctx.hook = await MockHook.new(); }); it('should see the deployed Umbra contract', async () => { expect(ctx.umbra.address.startsWith('0x')).to.be.true; expect(ctx.umbra.address.length).to.equal(42); expect(ctx.token.address.startsWith('0x')).to.be.true; expect(ctx.token.address.length).to.equal(42); expect(ctx.hook.address.startsWith('0x')).to.be.true; expect(ctx.hook.address.length).to.equal(42); }); describe('Direct withdrawal + hooks', async () => { it('should call the hook contract when the stealth receiver withdraws directly', async () => { await mintAndSendToken(sender, receiver, '100'); await ctx.umbra.withdrawTokenAndCall(acceptor, ctx.token.address, ctx.hook.address, '0xbeefc0ffee', { from: receiver, }); const callData = await ctx.hook.lastCallData(); expect(fromWei(callData.amount)).to.equal('100'); expect(callData.stealthAddr).to.equal(receiver); expect(callData.acceptor).to.equal(acceptor); expect(callData.tokenAddr).to.equal(ctx.token.address); expect(callData.sponsor).to.equal(AddressZero); expect(fromWei(callData.sponsorFee)).to.equal('0'); expect(callData.data).to.equal('0xbeefc0ffee'); const balance = await ctx.token.balanceOf(acceptor); expect(fromWei(balance)).to.equal('100'); }); it('should call the hook contract when the stealth receiver withdraws directly with empty data', async () => { await mintAndSendToken(sender, receiver, '100'); await ctx.umbra.withdrawTokenAndCall(acceptor, ctx.token.address, ctx.hook.address, '0x', { from: receiver, }); const callData = await ctx.hook.lastCallData(); expect(fromWei(callData.amount)).to.equal('100'); expect(callData.stealthAddr).to.equal(receiver); expect(callData.acceptor).to.equal(acceptor); expect(callData.tokenAddr).to.equal(ctx.token.address); expect(callData.sponsor).to.equal(AddressZero); expect(fromWei(callData.sponsorFee)).to.equal('0'); expect(callData.data).to.equal(null); const balance = await ctx.token.balanceOf(acceptor); expect(fromWei(balance)).to.equal('100'); }); it('should call the hook contract when the stealth receiver withdraws directly to the hook contract', async () => { await mintAndSendToken(sender, receiver, '100'); await ctx.umbra.withdrawTokenAndCall(ctx.hook.address, ctx.token.address, ctx.hook.address, '0xbeefc0ffee', { from: receiver, }); const callData = await ctx.hook.lastCallData(); expect(fromWei(callData.amount)).to.equal('100'); expect(callData.stealthAddr).to.equal(receiver); expect(callData.acceptor).to.equal(ctx.hook.address); expect(callData.tokenAddr).to.equal(ctx.token.address); expect(callData.sponsor).to.equal(AddressZero); expect(fromWei(callData.sponsorFee)).to.equal('0'); expect(callData.data).to.equal('0xbeefc0ffee'); const balance = await ctx.token.balanceOf(ctx.hook.address); expect(fromWei(balance)).to.equal('100'); }); it('should not call the hook when the stealth receiver withdraws directly if the hook address is 0', async () => { await mintAndSendToken(sender, receiver, '100'); await ctx.umbra.withdrawTokenAndCall(acceptor, ctx.token.address, AddressZero, '0xbeefc0ffee', { from: receiver, }); const callData = await ctx.hook.lastCallData(); // call data in the mock trigger should still be zeroes expect(fromWei(callData.amount)).to.equal('0'); expect(callData.stealthAddr).to.equal(AddressZero); expect(callData.acceptor).to.equal(AddressZero); expect(callData.tokenAddr).to.equal(AddressZero); expect(callData.sponsor).to.equal(AddressZero); expect(fromWei(callData.sponsorFee)).to.equal('0'); expect(callData.data).to.equal(null); // the withdrawal transfer should still work const balance = await ctx.token.balanceOf(acceptor); expect(fromWei(balance)).to.equal('100'); }); }); describe('Meta withdrawal + hooks', async () => { it('should call the hook contract when the stealth receiver withdraws via meta tx', async () => { await mintAndSendToken(sender, metaWallet.address, '100'); const { v, r, s } = await signMetaWithdrawal( metaWallet, ctx.chainId, ctx.umbra.address, acceptor, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0xbeefc0ffee' ); const receipt = await ctx.umbra.withdrawTokenAndCallOnBehalf( metaWallet.address, acceptor, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0xbeefc0ffee', v, r, s, { from: relayer } ); const callData = await ctx.hook.lastCallData(); expect(fromWei(callData.amount)).to.equal('98'); expect(callData.stealthAddr).to.equal(metaWallet.address); expect(callData.acceptor).to.equal(acceptor); expect(callData.tokenAddr).to.equal(ctx.token.address); expect(callData.sponsor).to.equal(relayer); expect(fromWei(callData.sponsorFee)).to.equal('2'); expect(callData.data).to.equal('0xbeefc0ffee'); const balance = await ctx.token.balanceOf(acceptor); expect(fromWei(balance)).to.equal('98'); const sponsorBalance = await ctx.token.balanceOf(relayer); expect(fromWei(sponsorBalance)).to.equal('2'); }); it('should call the hook contract when the stealth receiver withdraws via meta tx with empty data', async () => { await mintAndSendToken(sender, metaWallet.address, '100'); const { v, r, s } = await signMetaWithdrawal( metaWallet, ctx.chainId, ctx.umbra.address, acceptor, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0x' ); const receipt = await ctx.umbra.withdrawTokenAndCallOnBehalf( metaWallet.address, acceptor, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0x', v, r, s, { from: relayer } ); const callData = await ctx.hook.lastCallData(); expect(fromWei(callData.amount)).to.equal('98'); expect(callData.stealthAddr).to.equal(metaWallet.address); expect(callData.acceptor).to.equal(acceptor); expect(callData.tokenAddr).to.equal(ctx.token.address); expect(callData.sponsor).to.equal(relayer); expect(fromWei(callData.sponsorFee)).to.equal('2'); expect(callData.data).to.equal(null); const balance = await ctx.token.balanceOf(acceptor); expect(fromWei(balance)).to.equal('98'); const sponsorBalance = await ctx.token.balanceOf(relayer); expect(fromWei(sponsorBalance)).to.equal('2'); }); it('should not call the hook if the hook contract is 0 when the stealth receiver withdraws via meta tx', async () => { await mintAndSendToken(sender, metaWallet.address, '100'); const { v, r, s } = await signMetaWithdrawal( metaWallet, ctx.chainId, ctx.umbra.address, acceptor, ctx.token.address, relayer, relayerTokenFee, AddressZero, '0xbeefc0ffee' ); const receipt = await ctx.umbra.withdrawTokenAndCallOnBehalf( metaWallet.address, acceptor, ctx.token.address, relayer, relayerTokenFee, AddressZero, '0xbeefc0ffee', v, r, s, { from: relayer } ); const callData = await ctx.hook.lastCallData(); // call data in the mock trigger should still be zeroes expect(fromWei(callData.amount)).to.equal('0'); expect(callData.stealthAddr).to.equal(AddressZero); expect(callData.acceptor).to.equal(AddressZero); expect(callData.tokenAddr).to.equal(AddressZero); expect(callData.sponsor).to.equal(AddressZero); expect(fromWei(callData.sponsorFee)).to.equal('0'); expect(callData.data).to.equal(null); const balance = await ctx.token.balanceOf(acceptor); expect(fromWei(balance)).to.equal('98'); const sponsorBalance = await ctx.token.balanceOf(relayer); expect(fromWei(sponsorBalance)).to.equal('2'); }); it('should call the hook contract when the stealth receiver withdraws via meta tx to the hook contract', async () => { await mintAndSendToken(sender, metaWallet.address, '100'); const { v, r, s } = await signMetaWithdrawal( metaWallet, ctx.chainId, ctx.umbra.address, ctx.hook.address, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0xbeefc0ffee' ); const receipt = await ctx.umbra.withdrawTokenAndCallOnBehalf( metaWallet.address, ctx.hook.address, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0xbeefc0ffee', v, r, s, { from: relayer } ); const callData = await ctx.hook.lastCallData(); expect(fromWei(callData.amount)).to.equal('98'); expect(callData.stealthAddr).to.equal(metaWallet.address); expect(callData.acceptor).to.equal(ctx.hook.address); expect(callData.tokenAddr).to.equal(ctx.token.address); expect(callData.sponsor).to.equal(relayer); expect(fromWei(callData.sponsorFee)).to.equal('2'); expect(callData.data).to.equal('0xbeefc0ffee'); const balance = await ctx.token.balanceOf(ctx.hook.address); expect(fromWei(balance)).to.equal('98'); const sponsorBalance = await ctx.token.balanceOf(relayer); expect(fromWei(sponsorBalance)).to.equal('2'); }); }); describe('Meta withdrawal + hooks + dishonest relayer', async () => { it('should fail if the relayer sends the wrong hook address', async () => { await mintAndSendToken(sender, metaWallet.address, '100'); const { v, r, s } = await signMetaWithdrawal( metaWallet, ctx.chainId, ctx.umbra.address, acceptor, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0xbeefc0ffee' ); await expectRevert( ctx.umbra.withdrawTokenAndCallOnBehalf( metaWallet.address, acceptor, ctx.token.address, relayer, relayerTokenFee, ethers.Wallet.createRandom().address, // this should be the hook address '0xbeefc0ffee', v, r, s, { from: relayer } ), 'Umbra: Invalid Signature' ); }); it('should fail if the relayer sends the wrong hook call cata', async () => { await mintAndSendToken(sender, metaWallet.address, '100'); const { v, r, s } = await signMetaWithdrawal( metaWallet, ctx.chainId, ctx.umbra.address, acceptor, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0xbeefc0ffee' ); await expectRevert( ctx.umbra.withdrawTokenAndCallOnBehalf( metaWallet.address, acceptor, ctx.token.address, relayer, relayerTokenFee, ctx.hook.address, '0xbeefcafe', // this should be 0xbeefc0ffee v, r, s, { from: relayer } ), 'Umbra: Invalid Signature' ); }); }); });
javascript
#include "../../include/drawers/RigidbodyDrawer.h" #include "components/Rigidbody.h" #include "imgui.h" using namespace PhysicsEditor; RigidbodyDrawer::RigidbodyDrawer() { } RigidbodyDrawer::~RigidbodyDrawer() { } void RigidbodyDrawer::render(Clipboard &clipboard, Guid id) { InspectorDrawer::render(clipboard, id); ImGui::Separator(); mContentMin = ImGui::GetItemRectMin(); if (ImGui::TreeNodeEx("Rigidbody", ImGuiTreeNodeFlags_DefaultOpen)) { Rigidbody *rigidbody = clipboard.getWorld()->getComponentById<Rigidbody>(id); if (rigidbody != nullptr) { ImGui::Text(("ComponentId: " + id.toString()).c_str()); bool useGravity = rigidbody->mUseGravity; float mass = rigidbody->mMass; float drag = rigidbody->mDrag; float angularDrag = rigidbody->mAngularDrag; if (ImGui::Checkbox("Use Gravity", &useGravity)) { rigidbody->mUseGravity = useGravity; } if (ImGui::InputFloat("Mass", &mass)) { rigidbody->mMass = mass; } if (ImGui::InputFloat("Drag", &drag)) { rigidbody->mDrag = drag; } if (ImGui::InputFloat("Angular Drag", &angularDrag)) { rigidbody->mAngularDrag = angularDrag; } bool enabled = rigidbody->mEnabled; if (ImGui::Checkbox("Enabled?", &enabled)) { rigidbody->mEnabled = enabled; } } ImGui::TreePop(); } ImGui::Separator(); mContentMax = ImGui::GetItemRectMax(); }
cpp
<gh_stars>10-100 { "directions": [ "Into an old fashioned glass over ice cubes, pour vodka and cranberry juice. Squeeze lime wedge into drink, and then drop the wedge into the drink. Serve." ], "image": "https://images.media-allrecipes.com/userphotos/560x315/5604498.jpg", "ingredients": [ "1 1/2 fluid ounces vodka", "1/3 cup cranberry juice", "1 slice lime" ], "language": "en-US", "source": "allrecipes.com", "tags": [], "title": "Cape Cod", "url": "http://allrecipes.com/recipe/14889/cape-cod/" }
json
Monday, October 11, marked the official closure of the U. N. Group of Eminent Experts on Yemen. For nearly four years, this investigative group examined human rights abuses suffered by Yemenis whose basic rights to food, shelter, safety, health care and education were horribly violated, all while they were bludgeoned by Saudi and U. S. air strikes, drone attacks, and constant warfare since 2014.
english
:root { font-family: sans-serif; } header { background-color: #416fa3; height: 50px; margin-bottom: 20px; } .highscores { position: absolute; justify-content: left; color: white; font-weight: bold; text-decoration: none; padding-left: 10px; padding-top: 15px; } .timer { display: inline; float: right; color: white; font-weight: bold; padding-right: 10px; padding-top: 15px; } main { margin: auto; text-align: center; width: 40%; } .hide { display: none; } h1 { font-size: 30px; font-weight: bold; margin-bottom: 20px; color: #416fa3; } p { margin-bottom: 20px; } #startbutton{ border: none; background-color: #416fa3; color: white; padding: 10px; font-weight: bold; border-radius: 10px; } #startbutton:hover { cursor: pointer; } h2 { font-size: 30px; font-weight: bold; margin-bottom: 20px; color: #416fa3; } button { color: white; border: none; background-color: #416fa3; padding: 10px; border-radius: 10px; margin-bottom: 10px; } button:hover { cursor: pointer; } #choices { display: flex; flex-direction: column; }
css
Viber has for the first time rolled out support for Linux-powered PCs. Viber has rolled out a new update to its desktop and BlackBerry apps. The update brings the company’s sticker shop and a range of new features such as ability to drag and drop images, a seen status for read messages, and support for video messages and photos. Viber has also improved the video calling feature for desktops. The update also brings support for Linux-based PCs. For BlackBerry platform, the update features Twitter integration, support for multiple emoticons and more. New updates to desktop and BlackBerry platform comes shortly after Viber rolled out paid-for stickers and push-to-talk messaging features to iOS and Android platforms. Last month, Viber released 3.1 update for Windows Phone 8, which featured improved integration with Viber Desktop and quite a few enhancements such as options to choose backgrounds from a gallery, improved push notifications and more.
english
<reponame>ozlerhakan/begin-today-react-web<filename>src/reducks/modules/rehydrate.js import {REHYDRATE} from 'redux-persist/lib/constants'; export default function reducer(state = {}, action = {}) { if (action.type === REHYDRATE) { return { loaded: true }; } return state; }
javascript
On Wednesday (June 2), Pooja Hegde took to Instagram to share a picture with her grandmother to thank her for all the memories the two made together. Pooja will be seen next in Prabhas-starrer Radhe Shyam. By Ramya Palisetty: After recovering from Covid-19, Pooja has been spending a lot of time with family. On Wednesday, Pooja penned a gratitude post for her grandmother thanking her for the memories made. On Monday, Pooja took to her Instagram stories to share a glimpse of her mum and grandmother enjoying fresh air on the balcony and later, Pooja getting a champi (head massage) from her grandmother. The Maharshi actress also shared pictures of a slumber party with her cousin Aditi Shetty where the two can be seen eating pasta at home and getting their dose of K-pop. WHAT’S ON THE WORK FRONT FOR POOJA? Pooja has Radha Krishna Kumar’s Radhe Shyam which sees Prabhas as her co-star and Bommarillu Bhaskar’s Most Eligible Bachelor with Akhil Akkineni. Not just that, she also plays a key role in Koratala Siva’s Chiranjeevi and Kajal Aggarwal-starrer Acharya with Ram Charan as her co-star.
english
package forklift.consumer; import forklift.decorators.OnMessage; import forklift.decorators.Queue; import forklift.decorators.Topic; @Queue("test1") @Topic("topic1") public class QueueTopicConsumer { @OnMessage public void handle() { } }
java
Just a few years back, ANC or active noise cancellation was considered a premium feature and was only found on high-end headphones. However, the technology has democratized over the last few years, and the same is now available even on affordable earphones and headphones that just costs around Rs. 3,000 in India. So, what is ANC? ANC stands for active noise cancellation. In simpler terms, it actively cancels the outside noise in real-time, which will help the users to cut off the external noise. Depending on the product, an ANC-capable headphone or an earphone can partially or completely block the noise cancellation. An active noise cancellation capable headphone or earphones first process the surrounding sound using built-in microphones. Depending on the type of headphone, it might have two or even four microphones for an improved ANC experience. As one can expect, expensive and premium earphones/headphones offer better noise cancellation when compared to cheap and inexpensive earphones. Hence, headphones like Sony WH-1000XM4, Apple AirPods Max, and the Bose Noise Cancelling 700 are currently some of the best noise cancellation headphones in the world. Earlier, the ANC feature was limited to headphones. However, the technology is now available on neckband style and TWS style wireless earphones. Even some of the cheap TWS earphones priced around Rs. 3,000 now support active noise cancellation, although they might not be as effective as the aforementioned headphones. How Does ANC Work? An ANC-capable headphone or earphone first listens to the outside noise, which is mostly a low-frequency noise, and cancels it out before it reaches the user's ears. It's like subtracting the positive number with a negative number to create zero. In this case, the external sound is paired with computer-generated sound with reverse polarization. To optimize ANC, a headphone will usually have at least four microphones, two for each ear. One microphone will be located on the outside, while the other one will be located on the inside. The earphone or headphone processes the sound and creates an anti-sound with an opposite phase (sound wave). These sounds cancel each other, offering a noise-free environment. Again, this works well when the external sound wave has a constant amplitude. Do note that, all this happens in a fraction of a second, and the headphone will be making constant analysis of the sound to deliver the best possible noise cancellation experience. One can always play music along with ANC to get an even better noise cancellation experience. When ANC is enabled, the battery will reduce quickly. Modern earphones and headphones now offer features like full active noise cancellation, and transparent mode, which plays the external sound with audio enhancements. Cheaper headphones that do not support ANC feature noise isolation, which blocks the external sound. However, these headphones do not do as good of a job as ANC headphones when there is low-frequency audio. Hence, an ANC headphone will work best in most cases when it comes to noise cancellation and noise isolation.
english
{ "accountLinkingWhitelistedDomains": null, "asin": "B01N7KKCRK", "averageRating": 0, "canDisable": true, "capabilities": null, "category": null, "description": "The Word Gen skill aims at generating random words for users with or without a specified length and thus helps them build their vocabulary. \nSimply say- \"Alexa, ask Word Gen to give me a five letter word\" and it will generate and spell out the word for you! Fun is when you get a new random word on each attempt.", "enablement": null, "exampleInteractions": [ "Alexa, ask word gen to give me a five letter word", "Alexa, ask word gen to give me a random word", "Alexa, ask word gen to tell me a word of length six" ], "firstReleaseDate": 1482581944.232, "homepageLinkText": null, "homepageLinkUrl": null, "id": "amzn1.ask.skill.493dec55-7b42-40d5-9899-105e689dc8cf", "imageAltText": "RandomWordGenerator icon", "imageUrl": "https://github.com/dale3h/alexa-skills-list/raw/master/skills/B01N7KKCRK/skill_icon", "inAppPurchasingSupported": false, "launchPhrase": "word gen", "name": "RandomWordGenerator", "numberOfReviews": 0, "pamsPartnerId": null, "permissions": null, "privacyPolicyUrl": null, "shortDescription": "App to generate random words of length 3 to 20.", "skillTypes": null, "stage": "live", "termsOfUseUrl": null, "vendorId": "M1LGE7XE1MVGOW", "vendorName": "Ucf" }
json
<reponame>Pixelherz/styled-jsx-utils<filename>package.json { "name": "@pixelherz/styled-jsx-utils", "version": "1.0.1", "description": "Some utils we frequently use for projects built with styled-jsx (https://github.com/zeit/styled-jsx).", "files": [ "dist", "convert.js", "layout.js", "reset.js", "type.js" ], "scripts": { "build": "babel src -d dist", "watch": "babel --watch src -d dist", "prepublishOnly": "npm run build", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/Pixelherz/styled-jsx-utils.git" }, "keywords": [ "Next.js", "styled-jsx", "util" ], "author": "<NAME> <<EMAIL>> (https://pixelherz.com)", "license": "ISC", "bugs": { "url": "https://github.com/Pixelherz/styled-jsx-utils/issues" }, "homepage": "https://github.com/Pixelherz/styled-jsx-utils#readme", "prettier": { "singleQuote": true, "trailingComma": "es5", "semi": false }, "devDependencies": { "babel-cli": "^6.26.0", "babel-preset-env": "^1.7.0" } }
json
<filename>bookshop/bookshop/home/migrations/0001_initial.py # Generated by Django 2.2.2 on 2019-07-28 15:46 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Blogpost', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('Date', models.DateField()), ('Title', models.CharField(max_length=150)), ('Description', models.TextField()), ('Image', models.ImageField(upload_to='pics')), ], ), migrations.CreateModel( name='Books', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('Date', models.DateField()), ('Title', models.CharField(max_length=150)), ('Description', models.TextField()), ('Image', models.ImageField(upload_to='bookspic')), ('Category', models.CharField(max_length=50)), ('Author', models.CharField(max_length=50)), ('Pages', models.IntegerField(default=0)), ('Price', models.IntegerField(default=0)), ], ), migrations.CreateModel( name='Contact', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ('email', models.EmailField(max_length=254)), ('message', models.TextField()), ], ), ]
python
<gh_stars>1-10 #![allow(clippy::excessive_precision)] use crate::Float; // data taken from: https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_RGB_color_space pub const LAMBDAS: [Float; 3] = [0.4358, 0.5461, 0.7]; // NOTE THE INVERSION OF VALUES! // This is because our colour classes rank values by wavelength which is effectively "inverted". #[rustfmt::skip] pub const DARK_SKIN: [Float; 3] = [0.265433396324784, 0.320827324940405, 0.451985507348026]; #[rustfmt::skip] pub const LIGHT_SKIN: [Float; 3] = [0.503055950907360, 0.582738716853994, 0.765972935723141]; #[rustfmt::skip] pub const BLUE_SKY: [Float; 3] = [0.614439013487211, 0.481216296689985, 0.365221128960770]; #[rustfmt::skip] pub const FOLIAGE: [Float; 3] = [0.253370936701835, 0.424161374740617, 0.355649637522838]; #[rustfmt::skip] pub const BLUE_FLOWER: [Float; 3] = [0.687225606075082, 0.504123153746312, 0.510656240093606]; #[rustfmt::skip] pub const BLUISH_GREEN: [Float; 3] = [0.668344206176023, 0.747829256672327, 0.386089655534932]; #[rustfmt::skip] pub const ORANGE: [Float; 3] = [0.179077843041195, 0.483523828968116, 0.863093418722002]; #[rustfmt::skip] pub const PURPLISH_BLUE: [Float; 3] = [0.659181811904566, 0.359504879519143, 0.282440643630781]; #[rustfmt::skip] pub const MODERATE_RED: [Float; 3] = [0.381460259554855, 0.328914914848483, 0.762071779791923]; #[rustfmt::skip] pub const PURPLE: [Float; 3] = [0.409221031391268, 0.232274686016055, 0.355981329046635]; #[rustfmt::skip] pub const YELLOW_GREEN: [Float; 3] = [0.243107906845461, 0.740552451504050, 0.629798142147472]; #[rustfmt::skip] pub const ORANGE_YELLOW: [Float; 3] = [0.158306058293684, 0.629593762645567, 0.896249844549554]; #[rustfmt::skip] pub const BLUE: [Float; 3] = [0.576195209901642, 0.245483591390485, 0.165488593203341]; #[rustfmt::skip] pub const GREEN: [Float; 3] = [0.281234622466667, 0.585394786073615, 0.283264799647560]; #[rustfmt::skip] pub const RED: [Float; 3] = [0.221885082963718, 0.195538129501934, 0.686533689604943]; #[rustfmt::skip] pub const YELLOW: [Float; 3] = [0.083741974909830, 0.782979200607304, 0.934061366943582]; #[rustfmt::skip] pub const MAGENTA: [Float; 3] = [0.588239890055834, 0.329748012747315, 0.737111726481978]; #[rustfmt::skip] pub const CYAN: [Float; 3] = [0.652102190441094, 0.536010099061219, -0.185440641648003]; #[rustfmt::skip] pub const WHITE: [Float; 3] = [0.940214035518687, 0.962026354255479, 0.962070206926636]; #[rustfmt::skip] pub const GREY_1: [Float; 3] = [0.787707064909730, 0.792583731311461, 0.786738853998503]; #[rustfmt::skip] pub const GREY_2: [Float; 3] = [0.633147395616370, 0.635143395725413, 0.630287624455572]; #[rustfmt::skip] pub const GREY_3: [Float; 3] = [0.474854663555374, 0.475953628435172, 0.470151683602212]; #[rustfmt::skip] pub const GREY_4: [Float; 3] = [0.333384558671776, 0.331779293144700, 0.326433680189283]; #[rustfmt::skip] pub const BLACK: [Float; 3] = [0.198420076807872, 0.196313606429862, 0.195684876663901];
rust
{ "id": 3146, "surahNumber": "026", "ayatNumber": "214", "arabic": "وَأَنْذِرْ عَشِيرَتَكَ الْأَقْرَبِينَ", "english": "And warn your tribe (O Muhammad SAW) of near kindred.", "bengali": "আপনি নিকটতম আত্মীয়দেরকে সতর্ক করে দিন।" }
json
<reponame>PeterXiao/jmh-and-javanew<gh_stars>1-10 /** * */ package basics.nosql.mapdb; /** * @author Office * */ import org.mapdb.DB; import org.mapdb.DBMaker; import org.mapdb.HTreeMap; import org.mapdb.Serializer; import java.io.Writer; import java.util.Scanner; /** * * mapdb读写性能测试 */ public class TestRead { static DB db = DBMaker.memoryDB().make(); private static void write(String args) { HTreeMap map = db.hashMap("name").create(); final long startFree = Runtime.getRuntime().freeMemory(); final long startTotal = Runtime.getRuntime().totalMemory(); final long start = System.currentTimeMillis(); for (int i = 0; i < Integer.parseInt(args); i++) { map.put(i, "aa"); } final long endFree = Runtime.getRuntime().freeMemory(); final long endTotal = Runtime.getRuntime().totalMemory(); System.out.println("mapdb写用时:" + (System.currentTimeMillis() - start) + "ms"); System.out.println("消耗内存:" + (endFree - startFree) / 1024); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("输入数测试数据量:"); String count = "10000000"; // sc.nextLine(); // 读取字符串型输入 System.out.println(count); System.out.println("SUCCESSED"); write(count); final HTreeMap map = db.hashMap("name").open(); // 剩余内存空间 final long startFree = Runtime.getRuntime().freeMemory(); // jvm可支配的最大内存 final long startTotal = Runtime.getRuntime().totalMemory(); final long start = System.currentTimeMillis(); for (Object o : map.keySet()) { map.get(o); } db.close(); final long endFree = Runtime.getRuntime().freeMemory(); final long endTotal = Runtime.getRuntime().totalMemory(); System.out.println("mapdb读用时:" + (System.currentTimeMillis() - start) + "ms"); System.out.println("消耗内存:" + (endFree - startFree) / 1024 / 1024); System.out.println("总核数:" + Runtime.getRuntime().availableProcessors()); } }
java
Six of the best YouTube channels to learn web development. According to writers, AI still has ways to go before it manages to cause a significant dent. Career opportunities that you can go for if you’re good at writing. A total of 37,574 candidates have been selected for the posts of assistant teacher at government primary schools. The results are available on www. mopme. gov. bd and www. dpe. gov. bd websites. Here are some essential modern workplace work ethics that everyone should be familiar with. A total of 13,000 candidates have passed the written examination of the 41st civil service recruitment test. Is a student’s only responsibility towards their academics? Authorities of Bangladesh University of Engineering and Technology (BUET) are planning to introduce on-campus jobs for students. Routes you can take if you're starting your own venture. A career in social media is not unheard of. However, it might still sound somewhat new to many. The need for English seems ubiquitous in Bangladesh. Gender biases discourage women from pursuing careers in research. A two-day online job fair for persons with disabilities has been inaugurated today. A total of 15,229 candidates have passed the preliminary test of the 43rd Bangladesh Civil Service (BCS) examinations. Working at a bookstore has been the most gratifying experience ever. Job seekers blocked Nilkhet intersection in Dhaka this morning to press home their demand for raising the age limit for entering government service.
english
Når du aktiverer et tillegg, legges det til egendefinerte kommandoer og nye funksjoner i Microsoft 365-programmer som bidrar til å øke produktiviteten. Siden tillegg kan brukes av angripere til å skade datamaskinen, kan du bruke sikkerhetsinnstillinger for tillegg til å beskytte deg selv. Obs!: Denne artikkelen gjelder bare for Microsoft 365-programmer som kjører på Windows. Klikk Fil > Hent tillegg. Du kan også vise tilleggene direkte fra Hjem-fanen ved å velge Tillegg. Du kan installere tillegg direkte fra denne siden eller velge Flere tillegg du vil utforske. Velg Mine tillegg-fanen i dialogboksen Office-tillegg. Velg et tillegg du vil vise detaljene for, og høyreklikk for å velge alternativet Tilleggsdetaljer. Klikk på en overskrift nedenfor hvis du vil ha mer informasjon. Aktive programtillegg Tillegg som er registrert og kjører på Microsoft 365-programmet. Inaktive programtillegg Disse finnes på datamaskinen, men er ikke lastet inn for øyeblikket. XML-skjemaer er for eksempel aktive når dokumentet som henviser til dem er åpent. Et annet eksempel er COM-tillegget: hvis et COM-tillegg er valgt, er tillegget aktivt. Hvis avmerkingen er fjernet, er tillegget inaktivt. Dokumentrelaterte tillegg Malfiler som åpne dokumenter referer til. Deaktiverte programtillegg Disse tilleggene deaktiveres automatisk fordi de forårsaker at Microsoft 365-programmer krasjer. Tilegg Tittelen til tillegget. Utgiver Programvareutvikleren eller organisasjonen som er ansvarlig for å utvikle tillegget. Kompatibilitet Se her for eventuelle kompatibilitetsproblemer. Plassering Denne filbanen viser hvor på datamaskinen tillegget er installert. Beskrivelse Denne teksten forklarer tilleggets funksjon. Obs!: Microsoft Outlook har ett alternativ for tillegg i klareringssenteret: Bruk innstillinger for makrosikkerhet på installerte tillegg. InfoPath har ingen sikkerhetsinnstillinger for tillegg. Følg disse trinnene for å deaktivere eller fjerne et tillegg: Klikk Fil > Hent tillegg. Du kan også klikke Hjem > tillegg. Du kan installere tillegg direkte fra denne siden eller velge Flere tillegg du vil utforske. Velg Mine tillegg-fanen i dialogboksen Office-tillegg. Velg et tillegg du vil fjerne, og høyreklikk for å velge Alternativet Fjern. Du kan se og endre innstillingene for tillegg i Klareringssenter, og du finner beskrivelsene i inndelingen nedenfor. Sikkerhetsinnstillinger for tillegg kan være satt av organisasjonen, så det er ikke sikkert alle alternativer kan endres. Klikk Fil > Hent tillegg. Klikk flere tillegg>Administrer tilleggene mine. Klikk klareringssenter >innstillinger for klareringssenter > tillegg. Merk av for eller fjern merket i boksene etter behov. Krev at programtillegg er signert av klarert utgiver Merk av i denne boksen hvis du vil få klareringssenteret til å sjekke at tillegget bruker en klarert signatur fra en utgiver. Hvis utgiverens signatur ikke er klarert, laster ikke Microsoft 365-programmet inn tillegget, og klareringslinjen viser et varsel om at tillegget er deaktivert. Deaktiver varsling om usignerte tillegg (koden forblir deaktivert) Når du merker av for Krev at programtillegg er signert av klarert utgiver, er ikke dette alternativet nedtonet lenger. Tillegg som er signert av en klarert utgiver, aktiveres, men usignerte tillegg deaktiveres. Deaktiver alle programtillegg (kan forringe funksjonaliteten) Merk av i denne boksen hvis du ikke stoler på noen tillegg. Alle tilleggene deaktiveres uten varsel, og boksene for de andre tilleggene blir nedtonet. Obs!: Denne innstillingen trer i kraft når du avslutter og starter Microsoft 365-programmet på nytt. Når du arbeider med tillegg, kan det være nødvendig å lære mer om digitale signaturer og sertifikater, som godkjenner tillegg, og klarerte utgivere, programvareutviklere som ofte utvikler tillegg. Slik installerer du et nytt tillegg: Klikk Fil > Hent tillegg. Du kan også vise tilleggene i Word, Excel og PowerPoint ved å velge Hjem > tillegg. Du kan installere populære tillegg direkte på siden eller gå til Flere tillegg for å utforske. Velg tillegget, og klikk Legg til. Du kan også bla gjennom ved å velge Store-fanen i dialogboksen for Office-tillegget for å finne andre tillegg du vil installere, og velge Legg til for tillegget. Slik administrerer du tilleggene: Klikk Fil > Få tillegg , og velg flere tillegg nederst. Eller velg Hjem > tillegg > Flere tillegg. Velg Mine tillegg-fanen i dialogboksen Office. Hvis du ikke kan se tilleggene, klikker du Oppdater for å laste inn tilleggene på nytt. Klikk Behandle tillegget for å administrere, og klikk Last opp for å bla gjennom og legge til et tillegg fra enheten. Hvis du abonnerer på et tillegg via Microsoft 365 Store som du ikke vil fortsette, kan du avbryte abonnementet. Åpne Microsoft 365-programmet, og gå til Hjem-fanen på båndet. Klikk Tillegg, og klikk deretter Flere tillegg >Mine tillegg-fanen for å vise eksisterende tillegg. Klikk appen du vil avbryte, og klikk Behandle mine tillegg. Under delen Betaling og fakturering velger du Avslutt abonnement. Klikk på OK og deretter Fortsett. Når dette er fullført skal du se en melding om at «Du har avluttet appabonnementet» i kommentarfeltet i listen over apper. Enkelte tillegg kan være inkompatible med policyene til organisasjonens IT-avdeling. Hvis dette er tilfellet med tillegg som nylig er installert på Microsoft 365-programmet, deaktiverer DATAKjøringsforhindring (DEP) tillegget, og programmet kan krasje. Hvis du trenger hjelp med å koble notater i OneNote til et Word eller PowerPoint-dokument, kan du se Ta koblede notater. Hvis du leter etter hjelp om bestemteExcel tillegg, for eksempel Problemløser eller Spørring, kan du se Hjelp for Excel for Windows-tillegg. Hvis du leter etter mer hjelp for Excel-tillegg som bruker COM-tillegg-dialogboksen, kan du se Legg til eller fjern tillegg i Excel.
english
<reponame>luukdobber/kubernetes-validate<filename>src/kubernetes_validate/kubernetes-json-schema/v1.19.0-local/loadbalanceringress-v1.json { "$schema": "http://json-schema.org/schema#", "type": "object", "description": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", "$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.LoadBalancerIngress" }
json
{"group_id":"day12_part2","function_id":"Parse_string_dynamically","value_str":null,"throughput":null,"full_id":"day12_part2/Parse_string_dynamically","directory_name":"day12_part2/Parse_string_dynamically"}
json
<reponame>ccronje/bilara-data<gh_stars>10-100 { "sn27.2:0.1": "Saṁyutta Nikāya 27 ", "sn27.2:0.2": "1. Kilesavagga ", "sn27.2:0.3": "2. Rūpasutta ", "sn27.2:1.1": "Sāvatthinidānaṁ. ", "sn27.2:1.2": "“Yo, bhikkhave, rūpesu chandarāgo, cittasseso upakkileso. ", "sn27.2:1.3": "Yo saddesu … ", "sn27.2:1.4": "yo gandhesu … ", "sn27.2:1.5": "yo rasesu … ", "sn27.2:1.6": "yo phoṭṭhabbesu … ", "sn27.2:1.7": "yo dhammesu chandarāgo, cittasseso upakkileso. ", "sn27.2:1.8": "Yato kho, bhikkhave, bhikkhuno imesu chasu ṭhānesu cetaso upakkileso pahīno hoti, nekkhammaninnañcassa cittaṁ hoti. ", "sn27.2:1.9": "Nekkhammaparibhāvitaṁ cittaṁ kammaniyaṁ khāyati, abhiññā sacchikaraṇīyesu dhammesū”ti. ", "sn27.2:1.10": "Dutiyaṁ. " }
json
/** * See https://tools.ietf.org/html/rfc7234#section-5.2 */ export class CacheControl { public public = false public private = false public mustRevalidate = false public noCache = false public noStore = false public noTransform = false private _maxAge = 0 private _sMaxAge = 0 public get MaxAge(): number { return this._sMaxAge } public set maxAge(maxAge: number) { this._maxAge = maxAge < 0 ? 0 : maxAge } public get sMaxAge(): number { return this._sMaxAge } public set sMaxAge(sMaxAge: number) { this._sMaxAge = sMaxAge < 0 ? 0 : sMaxAge } public static deactivateCaching(): CacheControl { const cacheControl: CacheControl = new CacheControl() cacheControl.noTransform = true cacheControl.noStore = true cacheControl.noCache = true return cacheControl } public static cacheForEver(): CacheControl { const cacheControl: CacheControl = new CacheControl() cacheControl.maxAge = 31536000 return cacheControl } public toString(): string { const values: string[] = [] if (this.public) values.push('public') if (this.private) values.push('private') if (this.mustRevalidate) values.push('must-revalidate') if (this.noCache) values.push('no-cache') if (this.noStore) values.push('no-store') if (this.noTransform) values.push('no-transform') if (this._maxAge) values.push(`max-age=${this._maxAge}`) if (this._sMaxAge) values.push(`s-maxage=${this._sMaxAge}`) return values.join(', ') } }
typescript
From UPSC perspective, the following things are important : - Recently, state governments in India have initiated the process of obtaining parental consent for the issuance of a revolutionary student identity card known as the Automated Permanent Academic Account Registry (APAAR). - This move is a crucial component of the ‘One nation, One Student ID’ initiative, a brainchild of the Union government, which emanates from the National Education Policy of 2020. What is APAAR? - What is it? : APAAR serves as a unique identification system for all students across India, commencing from early childhood. - Lifelong Student ID: Every student is assigned a lifelong APAAR ID, simplifying the tracking of academic progress from pre-primary education through higher education. - Gateway to Digilocker: APAAR functions as a gateway to Digilocker, a digital repository where students can securely store crucial documents, including exam results and report cards, for convenient access during future endeavours such as higher education or job applications. How does APAAR ID function? - Unique Identification: Each individual receives a unique APAAR ID, linked to the Academic Bank Credit (ABC), a digital repository housing a student’s earned credits throughout their academic journey. - Seamless Data Transfer: When students change schools, whether within the state or to another state, their data in the ABC is seamlessly transferred to the new school by sharing the APAAR ID, eliminating the need for physical document submission. - All-Inclusive Repository: APAAR allows students to store certificates and credits from both formal and informal learning experiences, with digital certification from authorized institutions. - Streamlined Education: APAAR’s introduction aims to streamline education processes, reducing the burden on students to carry physical documents. - NEP 2020 Initiative: This initiative was launched as part of the National Education Policy 2020 by the Ministry of Education. - Empowering State Governments: APAAR empowers state governments to monitor literacy rates, dropout rates, and educational improvements effectively. - Combatting Fraud: It seeks to combat fraud and the proliferation of duplicate educational certificates by providing a single, reliable reference for educational institutions, ensuring authenticity through first-party verification. How to get an APAAR ID? - Registration Process: To enrol for APAAR, students provide basic details such as name, age, date of birth, gender, and a photograph, all of which are verified using their Aadhar number. - Aadhar Authentication: The Aadhaar number is used solely for verification purposes to match the name and date of birth, with no sharing of this data during registration. - Parental Consent for Minors: For minors, parental consent is mandatory for using the student’s Aadhar number for authentication with UIDAI. - Voluntary Registration: Registration for creating an APAAR ID is voluntary, not mandatory. - Data Security Concerns: Parents and students express concerns about sharing their Aadhar details, fearing potential leaks of personal information to external parties. - Government Assurance: The government assures that shared information will remain confidential and will only be disclosed to entities engaged in educational activities, including UDISE+ (Unified District Information System for Education Plus), scholarships, academic record maintenance, educational institutions, and recruitment agencies. - Data Control: Students retain the option to cease sharing their information with these entities at any time, with a halt in data processing. However, previously processed data remains unaffected if consent is withdrawn. From UPSC perspective, the following things are important : - Moody’s Investor Service released a report titled ‘Decentralised Finance and Digital Assets,’ advocating for decentralized digital identity systems over centralised biometric systems like India’s Aadhaar. - The report raises concerns about security and privacy vulnerabilities associated with Aadhaar (being managed by Govt of India) and questions its effectiveness. - The government highlighted Aadhaar’s integration with the Mahatma Gandhi National Rural Employment Guarantee Scheme (MGNREGS) database, emphasizing that workers can receive payments without biometric authentication. - Unique Identification: Aadhaar is a unique identification number provided to all Indian residents by the Unique Identification Authority of India (UIDAI). It collects demographic details, biometric fingerprints, and iris scans during enrolment, aiming to create a unique identity for residents. - Fighting Corruption: Aadhaar’s primary objectives include curbing corruption in accessing welfare programs by eliminating “ghost” and “fake” individuals who fraudulently claim benefits. - Ration Distribution: Aadhaar is used to authenticate individuals accessing rations under the Public Distribution System, ensuring that beneficiaries receive their entitled portions. - Government-to-Citizen Transfers: The government employs Aadhaar for various cash transfer programs, claiming substantial savings by eliminating fraudulent beneficiaries. - Authentication Process: To enable payments through Aadhaar for MGNREGA, three steps are involved: linking Aadhaar to job cards, linking Aadhaar to bank accounts, and linking Aadhaar correctly with the National Payments Corporation of India for payment processing. - AePS Platform: Aadhaar-enabled Payment System (AePS) allows individuals to withdraw money from Aadhaar-linked bank accounts using biometric authentication. - Quantity Fraud: Critics argue that Aadhaar fails to address issues like quantity fraud, where beneficiaries receive less than their entitled share. This type of corruption remains prevalent, with Aadhaar unable to detect or prevent it. - Authentication Challenges: Rural areas face authentication challenges due to unreliable internet, fading fingerprints, and inadequate phone connectivity for OTPs. Vulnerable groups, such as older women and people with disabilities, face exclusion. - Lack of Data Transparency: Information regarding authentication attempts and failures is not publicly available, hindering transparency. - Payment Failures: Errors at any stage of Aadhaar-based payments can lead to payment failures. Mismatches in data between job cards and Aadhaar databases can result in authentication failures. - Misdirection of Payments: Misdirected payments through Aadhaar are difficult to detect and resolve, creating issues when Aadhaar numbers are linked to the wrong bank accounts. - Financial Exclusion: Critics argue that Aadhaar-based authentication requirements can lead to financial exclusion for certain groups. - AePS Accountability: Banking correspondents using AePS operate without accountability frameworks, leading to potential misuse and unauthorized access to bank accounts. - Multiple Authentications: Some banking correspondents ask individuals to authenticate multiple times, providing them access to individuals’ bank accounts without consent. - Fraud and Scams: Several reports highlight instances of money withdrawal and enrollment in government programs without individuals’ knowledge through AePS. - Resistance to Mandatory Aadhaar: The government’s efforts to make Aadhaar-based payments mandatory in MGNREGA have faced resistance from workers and field officials. - Deletion of Job Cards: Reports indicate that the job cards of active rural workers have been deleted on grounds of being “ghosts,” raising concerns about data accuracy. - Apprehensions: Critics express apprehensions based on their experience with Aadhaar in welfare programs, emphasizing the need for pilots and evidence-based decision-making. - The debate between centralized biometric systems like Aadhaar and decentralized digital identity solutions remains ongoing, with concerns regarding security, inclusivity, and transparency at the forefront of discussions. From UPSC perspective, the following things are important : What’s the news? - India has reacted strongly to the report released by Moody’s Investor Service, which advocates for decentralized digital identity systems over central biometric systems like Aadhaar. The government has refuted the claims made in the report and defended the Aadhaar system as the most trusted digital ID in the world. What is Aadhaar? - Aadhaar is a 12-digit unique identification number issued to all Indian residents by the Unique Identification Authority of India (UIDAI). - It is based on biometric and demographic data, including fingerprints and iris scans, and serves as a standardized and secure means of identity verification. - Unique Identification: Aadhaar assigns a unique ID to every Indian resident, ensuring distinct and verifiable identities. - Corruption Reduction: Aadhaar combats welfare fraud by verifying recipients, reducing ghost and fake beneficiaries. - Efficient Services: Simplifies access to government services, enhancing efficiency and accuracy. - Financial Inclusion: Links Aadhaar to bank accounts, promoting banking services in underserved areas. - Digital Transformation: Enables secure online authentication for e-services, e-commerce, and payments. - Data Security: Emphasizes data security and privacy measures, including encryption and authentication protocols. - Integration: Supports government database integration, enhancing governance and policy implementation. - Welfare Savings: Eliminates duplicates, leading to substantial savings and improved subsidy targeting. - Aadhaar and Job Card Linking: First, a worker’s Aadhaar number must be linked to their job card, which is associated with the employment program, such as MGNREGA. - Aadhaar and Bank Account Linking: Second, the worker’s Aadhaar must be linked to their bank account. This linkage ensures that the Aadhaar number serves as the unique identifier for transactions related to this account. - Mapping with NPCI: The Aadhaar number must be correctly linked through the worker’s bank branch with the National Payments Corporation of India (NPCI). The NPCI acts as a clearing house for Aadhaar-based payments. - Cash Deposits: Once these linkages are established, any cash transferred by the government for benefits or payments gets deposited directly into the individual’s last Aadhaar-linked bank account. - Cash Withdrawals: Individuals can then withdraw money from their Aadhaar-linked bank account through private banking kiosks or by using private banking correspondents’ point of sale (PoS) machines. These transactions involve biometric authentication to confirm the individual’s identity. - Ineffectiveness Against Quantity Fraud: Aadhaar does not address quantity fraud, a prevalent form of corruption in ration distribution, where beneficiaries receive less than their entitled amount. The system focuses on identity verification but lacks mechanisms to prevent this type of fraud. - Authentication Challenges: In rural areas, authentication can be challenging due to unreliable internet, fading fingerprints, and limited phone connectivity for one-time passwords (OTPs). Multiple trips to ration shops may be necessary, leading to delays and uncertainty. - Lack of Transparency: The lack of public data on authentication attempts and failures raises transparency and accountability issues. The Comptroller and Auditor General of India (CAG) highlighted the absence of a system to analyze authentication errors. - Payment Failures: Any error in the Aadhaar-based payment process can result in payment failures. Issues like spelling discrepancies between job cards and Aadhaar databases can lead to authentication failures. - Coercion and Misdirection: Workers are often coerced into linking their Aadhaar with bank accounts without their consent, leading to wage diversion to unknown accounts. Misdirected payments, such as redirection to Airtel wallets, are challenging to detect and resolve. - Savings Claims: Claims of government savings through Aadhaar implementation have been questioned by researchers like Jean Drèze, Reetika Khera, Rahul Lahoti, and Anand Venkatnarayanan. They argue that the government’s assertions may be misleading and not supported by data. - Lack of Accountability: Banking correspondents operating the Aadhaar-enabled Payment System (AePS) often lack a robust accountability framework, raising the risk of misuse or unauthorized access to individuals’ bank accounts. - Unauthorized Biometric Authentication: Some banking correspondents may ask individuals to undergo multiple biometric authentications, potentially granting them unauthorized access to individuals’ bank accounts. - Misuse of Aadhaar-Enabled Transactions: Reports and studies have highlighted cases where individuals’ money was withdrawn without consent through AePS, or they were enrolled in government insurance programs against their will. - Security Breaches: Instances like the ₹10 crore scholarship scam in Jharkhand in 2020 exemplify security breaches and fraudulent activities associated with Aadhaar-based systems. - Data Security and Privacy: Strengthen data security measures to protect Aadhaar information. Ensure strict enforcement of data protection regulations and privacy standards. - Authentication Reliability: Improve the reliability of biometric authentication, especially in areas with limited connectivity. Develop backup authentication methods. - Process Streamlining: Simplify the process of linking Aadhaar with bank accounts and other services to reduce errors and misdirected payments. Provide clear information to individuals about the status and usage of their Aadhaar-linked accounts. - Addressing Corruption: Monitor and evaluate the impact of Aadhaar on reducing corruption in welfare programs. Implement additional measures to tackle specific forms of corruption, such as quantity fraud. - Independent Research and Evaluation: Support independent research to assess Aadhaar’s effectiveness and impact in various government programs. Use evidence-based findings to make informed policy decisions and improvements. - Accountability for Misuse: Establish mechanisms for holding individuals or organizations accountable for any misuse of Aadhaar data or fraudulent activities. - Moody’s report has sparked a debate about the effectiveness and security of Aadhaar. While it has brought some benefits in streamlining welfare programs, it falls short in addressing key issues and poses significant security risks. The government must address these concerns and work towards a more secure and efficient digital identity system, considering decentralized alternatives as suggested by Moody’s. From UPSC perspective, the following things are important : - The Parivar Pehchan Patra (PPP), introduced in 2020 and rolled out in September 2021 in Haryana, has evoked both attention and criticism. - The PPP assigns a unique 8-digit identity number to each family unit residing in Haryana. - Enrolment in the PPP is obligatory for accessing government services and social security schemes. - Families can register through Common Service Centers, SARAL Kendras, or registered PPP operators, with verified data collected based on self-declarations and strict procedures. - The PPP streamlines access to various public welfare programs, including subsidized rations, Old Age Samman Allowance, Divyang Pension, educational admissions, government exams, and more. - It gathers extensive data, encompassing family members’ details, Aadhaar numbers, demographics, educational and occupational information, immovable property ownership, and social status. - The scheme’s proponents note that PPP leverages Aadhaar’s digital framework but offers a more intricate delivery. - While Aadhaar focuses on unique identity information, PPP encompasses socio-economic data, validated through specific procedures. - A former CM highlighted data collection errors leading to people being denied subsidies and benefits. - A legislator raised multiple objections, alleging misuse of data for voter profiling, and criticized the depth of personal information required. - Concerns were raised about the need for Aadhaar details, caste, PAN card, bank account, and property information. It was asserted that social security doesn’t necessitate caste identification. - The criticism extended to the potential exploitation of caste-based and socio-economic data for electoral advantages. - The Parivar Pehchan Patra scheme in Haryana aims to streamline government services and welfare delivery. - While the initiative offers benefits, concerns about data accuracy, privacy, and potential political manipulation necessitate careful scrutiny and public discourse. From UPSC perspective, the following things are important : - The Navigation with Indian Constellation (NavIC), India’s indigenous satellite navigation system, is set to be integrated into Aadhaar enrolment devices. - This strategic move, as revealed by the Department of Space (DoS) showcases the seamless amalgamation of advanced technologies to enhance the functionality and reach of essential services. What is NAVIC? - History: Originally conceptualized as the Indian Regional Navigation Satellite System (IRNSS), the project sought to establish an autonomous navigation infrastructure to fulfill both civilian and strategic requirements. - Reducing Foreign Dependency: The core motivation behind NAVIC was to lessen dependence on foreign navigation systems like GPS and cultivate a self-reliant platform. - Comprehensive Constellation: The NAVIC constellation encompasses a total of 7** satellites. - Deployment Chronology: Launches of satellites such as IRNSS-1A, IRNSS-1B, IRNSS-1C, IRNSS-1D, IRNSS-1E, IRNSS-1F, and IRNSS-1I commenced in July 2013, continuing the phased deployment. - Standard Position Service (SPS) and Restricted Service (RS): NavIC offers two services – SPS for civilian users and RS for strategic users. These services are available in both L5 (1176.45 MHz) and S band (2498.028 MHz). - Coverage Area: NavIC covers India and extends up to 1,500 km beyond its borders. Upcoming satellites will include the L1 band compatible with civilian applications. - Field Trials and Technical Expertise: The DoS has successfully conducted field trials and provided technical expertise to finalize the procurement specifications for integrating NavIC into Aadhaar enrolment devices. - Current Setup: The Aadhaar enrolment kits presently use GPS for location-based services, which gather and authenticate personal information during enrolment. - Disaster Management: NavIC plays a pivotal role in the National Disaster Management Agency’s alert dissemination system for natural calamities like landslides, earthquakes, floods, and avalanches. - Ocean Information Broadcast: The Indian National Centre for Ocean Information System employs NavIC to broadcast alerts regarding cyclones, high waves, and tsunamis to fishermen operating in deep-sea regions. - Standardization Efforts: Various organizations, including the Bureau of Indian Standards (BIS), Telecom Standards Development Society of India (TSDSI), Telecom Engineering Centre (TEC), and international bodies like the International Electrotechnical Committee (IEC), are actively working on setting interoperability standards for NavIC. From UPSC perspective, the following things are important : Prelims level : Aadhaar-enabled Payment System (AePS) - Scammers are using silicone thumbs to operate biometric POS devices and ATMs, draining users’ bank accounts. - Incidents of Aadhaar-linked fingerprint misuse and unauthorized withdrawals have been reported. What is AePS? |What is it? |Enables online financial transactions using Aadhaar authentication, eliminating the need for OTPs and other details. |Cash deposit, withdrawal, balance inquiry, and fund transfer can be done with just the bank name, Aadhaar number, and fingerprint. |AePS may be enabled by default for most bank account holders when Aadhaar is linked to their account. |Users seeking benefits or subsidies under Aadhaar Act schemes must link their Aadhaar number with their bank account. - Data breaches: These have been reported, although UIDAI denies breaching Aadhaar data. - Information Leak: Criminals can obtain Aadhaar numbers from photocopies and soft copies, using Aadhaar-enabled payment systems to breach user information. - Regulation: UIDAI proposes regulations to prevent sharing of Aadhaar details without redaction. - New two-factor authentication: This combines finger minutiae and image capture for fingerprint liveness. - Locking Aadhaar Online: Aadhaar can be locked using the UIDAI website or the myAadhaar app. Locking generates a 16-digit VID code needed for unlocking. - Zero Liability: Customers’ entitlement to zero liability arises if unauthorized transactions are reported to the bank within three working days. - Immediately lock Aadhaar biometric information if suspicious activity occurs. - Inform banks and authorities promptly to initiate necessary actions. - Timely reporting ensures the possibility of returning money transferred fraudulently. - Regularly check bank accounts for any suspicious activity and inform the banking institution promptly. Get an IAS/IPS ranker as your personal mentor for UPSC 2024 | Schedule your FREE session and get the Prelims prep Toolkit! From UPSC perspective, the following things are important : Central idea: The article discusses the potential issues and concerns related to the Indian government’s proposal to link Aadhaar with Voter IDs. - Around 60% of India’s electors now have their Aadhaar number linked to their name on the voter rolls. - It has achieved saturation of over 90% in States like Tripura, which went to the polls recently. - States like Gujarat and Delhi are lagging where only around 30% of the electorate has provided an Aadhaar number to election officials. What is the move about? - The linking is being carried out by filling Form 6B, which is provided by election officials going door-to-door to collect Aadhaar or alternate ID from registered voters. - The form was the result of the Election Laws (Amendment) Act passed in 2021 to allow the linking of Voter IDs and Aadhaar. - While the Election Commission (EC) maintains that providing an Aadhaar is optional, Form 6B requires voters to declare that they do not have an Aadhaar to avoid providing the number. Aadhaar-Voter ID linkage: Why does the government want this? - Accurate voter’s record: The EC conducts regular exercises to maintain an updated and accurate recordof the voter base. - Avoid duplicate voters: A part of this exercise is to weed out duplication of voters. - Identify unique voters: As per the government, linkage of Aadhaar with voter IDs will assist in ensuring that only one Voter ID is issued per citizen of India. Is the linking of Aadhaar with one’s Voter ID mandatory? - In December 2021, Parliament passed the Election Laws (Amendment) Act, 2021. - This was to amend the Representation of the People Act, 1950and Section 23(4) was inserted in the RP Act. - It states that the electoral registration officerMAY require voters to furnish their Aadhaar numbers to verify Authencity of voters list. Why there is such proposal for linking? The preference to use Aadhaar for verification and authentication, both by the state and private sector, stems from few reasons: - Increase in UID-holders:First, at the end of 2021, 99.7% of the adult Indian population had an Aadhaar card. - Most versatile document:This coverage exceeds that of any other officially valid document such as driver’s licence, ration cards, PAN cards etc. that are mostly applied for specific purposes. - Reliable source of authentication:Since Aadhaar allows for biometric authentication, Aadhaar based authentication and verification is considered more reliable, quicker and cost efficient when compared to other IDs. - Puttaswamy judgment:The above reasons do not suffice the mandating of Aadhaar except in limited circumstances as per the Puttaswamy judgment. - Indispensability of the purpose:It needs to be considered whether such mandatory linkage of Aadhaar with Voter ID would pass the test of being “necessary and proportionate” to the purpose of de-duplication which is sought to be achieved. - Constitutional ambiguity:In Puttaswamy, one of the questions that the Supreme Court explored was whether the mandatory linking of Aadhaar with bank accounts was constitutional or not. - Against informational autonomy: It is the right to privacy which would allow a person to decide which official document they want to use for verification and authentication. - Disenfranchisement: Some fear that linking Aadhaar with Voter IDs may exclude certain groups of people, such as those who do not have an Aadhaar card. - The Supreme Court had held that the Right to vote cannot be disallowed by insisting only on four proofs of identity. - The voters are entitled to rely on any other proof of identity and obtain the right to vote. What are the operational difficulties? - Aadhaar is not a citizenship proof:The preference to Aadhaar for the purposes of determining voters is puzzling as Aadhaar is only a proof of residence and not a proof of citizenship. - Excluding non-citizens is not easy:Verifying voter identity against this will only help in tackling duplication but will not remove voters who are not citizens of India from the electoral rolls. - Estimate of error rates in biometric based authentication:This certainly differs. As per the UIDAI in 2018, Aadhaar based biometric authentication had a 12% error rate. - Disenfranchisement of existing voters:Errors have led to the disenfranchisement of around 30 lakh voters in AP and Telangana before the Supreme Court stalled the process of linkage. - Some civil societies has highlighted that linking of the two databases of electoral rolls and Aadhaar could lead to the linkage of Aadhaar’s “demographic” information with voter ID information. - This could lead to violation of the right to privacy and surveillance measures by the state. - This would leave the EC with the option of verifying its information only through door-to-door checks. - There is a lack of enforceable data protection principlesthat regulate how authentication data will be used. - The govt should expedite the enactment of a data protection legislation that allays concerns of unauthorized processing of personal data held by the government. From UPSC perspective, the following things are important : Central idea: An RTI query has revealed that around 60% of Indian voters have linked their Aadhaar cards with their voter ID cards. - Voter uniqueness: The move to link Aadhaar and voter ID cards was introduced to prevent electoral fraud and ensure unique identity of each voter. - Curb bogus votes: It is expected to help prevent multiple voting, impersonation, and bogus voting, which have been a concern in the past. - Facilitate migrant voting: There have been migrant workers who may have been registered more than once on the electoral rolls in different constituencies or for persons registered multiple times within the same constituency. Is the linking of Aadhaar with one’s Voter ID mandatory? - In December 2021, Parliament passed the Election Laws (Amendment) Act, 2021 . - It states that the electoral registration officer may require voters to furnish their Aadhaar numbers to verify Authencity of voters list. - This was to amend the Representation of the People Act, 1950 and Section 23(4) was inserted in the RP Act. Why was such linking proposed? The preference to use Aadhaar for verification and authentication, both by the state and private sector, stems from few reasons: - Increase in UID-holders: First, at the end of 2021, 99.7% of the adult Indian population had an Aadhaar card. - Most versatile document: This coverage exceeds that of any other officially valid document such as driver’s licence, ration cards, PAN cards etc. that are mostly applied for specific purposes. - Reliable source of authentication: Since Aadhaar allows for biometric authentication, Aadhaar based authentication and verification is considered more reliable, quicker and cost efficient when compared to other IDs. - Puttaswamy judgment: The above reasons do not suffice the mandating of Aadhaar except in limited circumstances as per the Puttaswamy judgment. - The indispensability of the purpose: It needs to be considered whether such mandatory linkage of Aadhaar with Voter ID would pass the test of being “necessary and proportionate” to the purpose of de-duplication which is sought to be achieved. - Constitutional ambiguity: In Puttaswamy, one of the questions that the Supreme Court explored was whether the mandatory linking of Aadhaar with bank accounts was constitutional or not. - Against informational autonomy: It is the right to privacy which would allow a person to decide which official document they want to use for verification and authentication. - The Supreme Court had held that the Right to vote cannot be disallowed by insisting only on four proofs of identity. - The voters are entitled to rely on any other proof of identity and obtain the right to vote. What are the operational difficulties? - Aadhaar is not a citizenship proof: The preference to Aadhaar for the purposes of determining voters is puzzling as Aadhaar is only a proof of residence and not a proof of citizenship. - Excluding non-citizens is not easy: Verifying voter identity against this will only help in tackling duplication but will not remove voters who are not citizens of India from the electoral rolls. - Estimate of error rates in biometric based authentication: This certainly differs. As per the UIDAI in 2018, Aadhaar based biometric authentication had a 12% error rate. - Disenfranchisement of existing voters: Errors have led to the disenfranchisement of around 30 lakh voters in AP and Telangana before the Supreme Court stalled the process of linkage. - Some civil societies has highlighted that linking of the two databases of electoral rolls and Aadhaar could lead to the linkage of Aadhaar’s “demographic” information with voter ID information. - This could lead to violation of the right to privacy and surveillance measures by the state. - This would leave the EC with the option of verifying its information only through door-to-door checks. - There is a lack of enforceable data protection principles that regulate how authentication data will be used. - Address privacy and security concerns: There should be strict measures in place to ensure the safety of personal information and prevent data breaches. - Provide alternative authentication: The government should provide alternative methods of identity verification. This will help ensure that no citizen is disenfranchised due to the lack of an Aadhaar card. - Regular monitoring and evaluation: The government should regularly monitor and evaluate the effectiveness of the linking of Aadhaar and voter ID cards in preventing electoral fraud. From UPSC perspective, the following things are important : Reports have surfaced online of instances where block level officers have asked individuals to link their Aadhaar with their Voter IDs, failing which their Voter IDs could be cancelled. What is the news? - This furore comes in the aftermath of the Election Commission’s (EC) campaign to promote the linkage of Voter ID and Aadhaar that began on August 1. - In the first ten days since its launch, the campaign saw almost 2.5 crore Aadhaar holders voluntarily submitting their details to the EC. Aadhaar-Voter ID linkage: Why does the government want this? - The EC conducts regular exercises to maintain an updated and accurate record of the voter base. - A part of this exercise is to weed out duplication of voters. - There have been migrant workers who may have been registered more than once on the electoral rolls in different constituencies or for persons registered multiple times within the same constituency. - As per the government, linkage of Aadhaar with voter IDs will assist in ensuring that only one Voter ID is issued per citizen of India. Is the linking of Aadhaar with one’s Voter ID mandatory? - In December 2021, Parliament passed the Election Laws (Amendment) Act, 2021 . - This was to amend the Representation of the People Act, 1950 and Section 23(4) was inserted in the RP Act. - It states that the electoral registration officer may require voters to furnish their Aadhaar numbers to verify Authencity of voters list. Why is it making headlines now? - There has been the use of discretionary language throughout the amendments. - This has been accompanied by assurances that linkage is optional by both the government and the EC. - Alternative is provided to only who does not have an Aadhaar number. - To that extent, the limited element of choice that has been incorporated in the amendments seem to be negated or at the very least thrown into confusion. Why there is such proposal for linking? The preference to use Aadhaar for verification and authentication, both by the state and private sector, stems from few reasons: - Increase in UID-holders: First, at the end of 2021, 99.7% of the adult Indian population had an Aadhaar card. - Most versatile document: This coverage exceeds that of any other officially valid document such as driver’s licence, ration cards, PAN cards etc. that are mostly applied for specific purposes. - Reliable source of authentication: Since Aadhaar allows for biometric authentication, Aadhaar based authentication and verification is considered more reliable, quicker and cost efficient when compared to other IDs. - Puttaswamy judgment: The above reasons do not suffice the mandating of Aadhaar except in limited circumstances as per the Puttaswamy judgment. - Indispensability of the purpose: It needs to be considered whether such mandatory linkage of Aadhaar with Voter ID would pass the test of being “necessary and proportionate” to the purpose of de-duplication which is sought to be achieved. - Constitutional ambiguity: In Puttaswamy, one of the questions that the Supreme Court explored was whether the mandatory linking of Aadhaar with bank accounts was constitutional or not. - Against informational autonomy: It is the right to privacy which would allow a person to decide which official document they want to use for verification and authentication. - The Supreme Court had held that the Right to vote cannot be disallowed by insisting only on four proofs of identity. - The voters are entitled to rely on any other proof of identity and obtain the right to vote. What are the operational difficulties? - Aadhaar is not a citizenship proof: The preference to Aadhaar for the purposes of determining voters is puzzling as Aadhaar is only a proof of residence and not a proof of citizenship. - Excluding non-citizens is not easy: Verifying voter identity against this will only help in tackling duplication but will not remove voters who are not citizens of India from the electoral rolls. - Estimate of error rates in biometric based authentication: This certainly differs. As per the UIDAI in 2018, Aadhaar based biometric authentication had a 12% error rate. - Disenfranchisement of existing voters: Errors have led to the disenfranchisement of around 30 lakh voters in AP and Telangana before the Supreme Court stalled the process of linkage. - Some civil societies has highlighted that linking of the two databases of electoral rolls and Aadhaar could lead to the linkage of Aadhaar’s “demographic” information with voter ID information. - This could lead to violation of the right to privacy and surveillance measures by the state. - This would leave the EC with the option of verifying its information only through door-to-door checks. - There is a lack of enforceable data protection principles that regulate how authentication data will be used. What lies ahead? - Even as the amendments have been made and the EC has launched a campaign for linkage, a writ petition has filed with the Supreme Court challenging the same. - It challenges the amendments as being violative of the right to privacy. - The Supreme Court has transferred the writ to the Delhi High Court. - In the meantime, it is important that the government clarifies through a correction in Form 6B that the linking is not mandatory. - The govt should expedite the enactment of a data protection legislation that allays concerns of unauthorized processing of personal data held by the government. UPSC 2023 countdown has begun! Get your personal guidance plan now! (Click here) From UPSC perspective, the following things are important : The recent decision of the Supreme Court of India in the case of A.G. Perarivalan has stirred up a hornet’s nest. - The Court has treaded the extraordinary constitutional route under Article 142. - The Bench decided to exercise the power of grant of pardon, remission et al., exclusively conferred on the President of India and State Governors under Articles 72 and 161. - Against the separation of power: Against the background of separation of powers viz. Parliament/Legislature, Executive and Judiciary, whether the course adopted by the Bench to do expedient justice is constitutional calls for introspection. - The power under Article 161 is exercisable in relation to matters to which the executive power of the state extends. - Discretionary power under Article 161: Article 161 consciously provides a ‘discretion’ to the Governor in taking a final call, even if it was not wide enough to overrule the advice, but it certainly provides latitude to send back any resolution for reconsideration, if, in his opinion, the resolution conflicted with constitutional ends. - In Sriharan’s case (2016 (7) SCC P.1), one of the references placed for consideration was whether the term ‘consultation’ stipulated in Section 435 Cr.P.C. implies ‘concurrence’. - It was held that the word ‘consultation’ means ‘concurrence’ of the Central government. - The Constitution Bench highlighted that there are situations where consideration of remission would have trans-border ramifications and wherever a central agency was involved, the opinion of the Central government must prevail. - Basing its conclusion on the legal position that the subject matter (Section 302 in the Indian Penal Code) murder, falls within Lists II and III (State and Concurrent lists) of the Seventh Schedule to the Constitution, the learned judges concluded that the State was fully empowered to take a call and recommend remission in this case. - If it is a simple case of being a Section 302 crime, the reason for finding fault with the Governor’s decision to forward the recommendation to the President may be constitutionally correct. - But the larger controversy as to whether the Governor in his exercise of power under Article 161 is competent at all, to grant pardon or remission in respect of the offences committed by the convicts under the Arms Act, 1959, the Explosive Substances Act, 1908, the Passports Act, 1967, the Foreigners Act, 1946, etc., besides Section 302, is not certain. - According to the decision, it is a simple murder attracting Section 302 of the IPC and therefore the Governor’s decision to forward the recommendation to the President is against the letter and spirit of Article 161 — meaning it is against the spirit of federalism envisaged in the Constitution. - Constitutionality use of Article 142: There are momentous issues that are flagged on the exercise of the power of remission under Article 142, by the Supreme Court in the present factual context. - The first is whether Article 142 could be invoked by the Court in the circumstances of the case when the Constitution conferred express power on the Governor alone, for grant of pardon, remission, etc., under Article 161. - Deeper judicial examination: Whether what the State government could not achieve directly by invoking Sections 432 and 433 of Cr.P.C, without concurrence of Centre could be allowed to take a contrived route vide Article 161 and achieve its objectives is a pertinent issue. - This aspect requires deeper judicial examination for the sake of constitutional clarity. - Timeframe for the Governor: The Constitution does not lay down any timeframe for the Governor to act on the advice of the Council of Ministers. - In any event, even if the delay was constitutionally inexcusable or was vulnerable to challenge, the final arbiter of the Constitution (Article 245) could not have trumped Article 161 with Article 142, which is constitutionally jarring. To portray the remission as to what it was not in the State is a sad fallout the lawlords on the pulpit may not have bargained for. And on the constitutional plane, this verdict deserves a relook, even a review, as it stands on wobbly foundations built with creaky credence. UPSC 2023 countdown has begun! Get your personal guidance plan now! (Click here) From UPSC perspective, the following things are important : Two days after issuing an advisory asking people to refrain from sharing photocopies of their Aadhaar Card, the Unique Identification Development Authority of India (UIDAI) opted to withdraw the notification. - The withdrawn notice had suggested holders use a masked Aadhaar card instead of the conventional photocopy. - It added that the document must not be downloaded from a cybercafe or public computer and if done for some reason, must be permanently deleted from the system. - Private entities like hotels or film halls cannot collect or keep copies of the identification document. What is Masked Aadhaar? - ‘Masked Aadhaar’ veils the first eight digits of the twelve-digit ID with ‘XXXX’ characters. - The notice informed that only entities possessing a ‘User Licence’ are permitted to seek Aadhaar for authentication purposes. Why in news now? - In July 2018, Telecom Regulatory of India’s Chairman tweeted his Aadhaar number challenging users to “cause him any harm”. - In response, users dug up his mobile number, PAN number, photographs, residential address and date of birth. - UIDAI dismissed assertions of any data leak, arguing that most of the data was publicly available. - It did however caution users from publicly sharing their Aadhaar numbers. Security of Aadhaar: What does the law say? - The Aadhaar (Targeted Delivery of Financial and Other Subsidies Benefits and Services) Act, 2016 makes it clear. - Aadhaar authentication is necessary for availing subsidies, benefits and services that are financed from the Consolidated Fund of India. - In the absence of Aadhaar, the individual is to be offered an alternate and viable means of identification to ensure she/he is not deprived of the same. - Separately, Aadhaar has been described as a preferred KYC (Know Your Customer) document but not mandatory for opening bank accounts, acquiring a new SIM or school admissions. - The requesting entity would have to obtain the consent of the individual before collecting his/her identity. - The entity must ensure that the information is only used for authentication purposes on the Central Identities Data Repository (CIDR). What is CIDR? - This centralised database contains all Aadhaar numbers and holder’s corresponding demographic and biometric information. - UIDAI responds to authentication queries with a ‘Yes’ or ‘No’. - In some cases, basic KYC details (as name, address, photograph etc.) accompany the verification answer ‘Yes’. - The regulator does not receive or collect the holder’s bank, investment or insurance details. - The Act makes it clear that confidentiality needs to be maintained and the authenticated information cannot be used for anything other than the specified purpose. - More importantly, no Aadhaar number (or enclosed personal information) collected from the holder can be published, displayed or posted publicly. - Identity information or authentication records would only be liable to be produced pursuant to an order of the High Court or Supreme Court, or by someone of the Secretary rank or above in the interest of national security. Is identity theft via Aadhaar possible? - As per the National Payment Corporation of India’s (NCPI) data, ₹6.48 crore worth of financial frauds through 8,739 transactions involving 2,391 unique users took place in FY 2021-22. - Since the inception of the UID project, institutions and organisations have endowed greater focus on linking their databases with Aadhaar numbers. - This include bank accounts especially in light of the compulsory linkage for direct benefit transfer schemes. - The Aadhaar Data Vault is where all numbers collected by authentication agencies are centrally stored. - Comptroller and Auditor General of India’s (CAG) latest report stipulated that UIDAI has not specified any encryption algorithm (as of October 2020) to secure the same. - There is no mechanism to illustrate that the entities were adhering to appropriate procedures. - Further, UIDAI’s unstable record with biometric authentication has not helped it with de-duplication efforts, the process that ensures that each Aadhaar Number generated is unique. - The CAG’s reported stated that apart from the issue of multiple Aadhaars to the same resident, there have been instances of the same biometric data being accorded to multiple residents. - The CAG concluded it was “not effective enough” in detecting the leakages and plugging them. - Biometric authentications can be a cause of worry, especially for disabled and senior citizens with both the iris and fingerprints dilapidating. - Though the UIDAI has assured that no one would be deprived of any benefits due to biometric authentication failures. - The absence of an efficient technology could serve as poignant premise for frauds to make use of their ‘databases’. Try this PYQ: Q.Consider the following statements: - Aadhaar metadata cannot be stored for more than three months. - State cannot enter into any contract with private corporations for sharing of Aadhaar data. - Aadhaar is mandatory for obtaining insurance products. - Aadhaar is mandatory for getting benefits funded out of the Consolidated Fund of India. Which of the statements given above is/are correct? Post your answers here. UPSC 2023 countdown has begun! Get your personal guidance plan now! (Click here) From UPSC perspective, the following things are important : The government has made requirement of a Permanent Account Number (PAN) or Aadhaar number for depositing or withdrawing Rs 20 lakh or more in a financial year or for opening a current account mandatory. - The Central Board of Direct Taxes, in a notification, said furnishing PAN or biometric Aadhaar will be mandatory for such high-value cash deposits or withdrawals from banks in a financial year. - The same will be applied for opening of a current account or cash credit account with a bank or post office. - Banks, post offices and co-operative societies would be required to report the transactions of deposits and withdrawals aggregating to Rs 20 lakh or more in a financial year. - As of now, PAN is required to be furnished for cash deposits of Rs 50,000 or more in a day. - With these rules, a threshold of Rs 20 lakh has been defined for the full financial year. How will this help tax department? - This move will help the government in tracing the movement of cash in the financial system. - It is expected to help the income tax department monitor deposits/withdrawals where tax would not be getting paid by the individual otherwise on his or her income. Why PAN-Aadhaar interoperability? - The PAN-Aadhaar interoperability will help banks to record details for those who don’t have PAN. - The interchangeable provision in the rules would allow a bank or financial institution to ask for Aadhaar in case an individual states that he or she doesn’t have PAN. - The Finance Act, 2019, has provided for the interchangeability of PAN with Aadhaar. - It has been provided that every person who is required to furnish or intimate or quote his PAN under the Income-tax Act. - Those who, has not been allotted a PAN but possesses the Aadhaar number, may furnish or intimate or quote his Aadhaar in lieu of PAN. UPSC 2023 countdown has begun! Get your personal guidance plan now! (Click here) From UPSC perspective, the following things are important : The Election Laws (Amendment) Bill, 2021 that seeks to link electoral rolls to the Aadhaar number has been listed for introduction in the Lok Sabha. (1) Aadhaar authentication: - The Bill seeks to empower electoral officers to seek Aadhaar number of people, who want to register as voters, for establishing their identity. - It also seeks to allow the electoral registration officers to ask for Aadhaar numbers from persons already included in the electoral roll for the purposes of authentication of entries in the electoral roll. - This would also aim to identify registration of the name of the same person in the electoral roll of more than one constituency or more than once in the same constituency. - Linking Aadhaar with voter ID will be voluntary. - The amendment makes it clear that no application shall be denied and no entries in the electoral roll shall be deleted for the inability to produce Aadhaar number. - Such people will be allowed to furnish other documents as may be prescribed. - Section 23 of the RP Act, 1950 will be amended to allow linking of electoral roll data with the Aadhaar ecosystem to curb the menace of multiple enrolments. - Amendment to section 14 of the RP Act, 1950 will allow having four qualifying dates for eligible people to register as voters, instead of one that is January 1 at present. - As of now, people who turn 18 on or before January 1 can register as voters but those turning 18 after January 1 wait for the whole year to get registered. - The Bill proposes to make the 1st day of January, 1st day of April, 1st day of July, and 1st day of October as the qualifying dates. - An amendment to section 20 of the RP Act, 1950 and section 60 of the RP Act, 1951 seeks to make the elections gender-neutral for service voters. - The amendment will also replace the word ‘wife’ with ‘spouse’ to make the statutes gender-neutral. UPSC 2022 countdown has begun! Get your personal guidance plan now! (Click here) From UPSC perspective, the following things are important : Amid concerns over the Parivar Pehchan Patra scheme, the Haryana govt. says enrolment is voluntary. But residents have little choice as the delivery of even birth and death certificates is linked to it. Practice question for mains: Q.What is Parivar Pehchan Patra (PPP) recently rolled out by Haryana Govt.? How it is beneficial compared to the Aadhaar? What is Parivar Pehchan Patra (PPP)? - It is an 8-digit Unique Identity Card number meant for each family to enable smooth and automatic delivery of several citizen-centric services. - The government will establish the scheme-wise eligibility of a particular family using this 8-digit code according to the information available in the PPP of the family. - The benefits, according to the schemes, shall automatically be transferred to the family using the same code. - PPP will ensure that not a single beneficiary is left out from the government benefits that they are entitled to. How is PPP different from the Aadhaar card? - The PPP, mathematically, is an integral number of Aadhaar. - While Aadhaar represents an individual as a unit, a PPP represents a family as a unit. Most of our government schemes are structured around the family. - It is not structured around an individual. - For example, ration eligibility is there for the family but the family can split it into various members as long as they are above 18 years and say they are separating entitlements for all individuals. Will it be mandatory for every family of Haryana to get PPP? - No, it will not be mandatory for every family of the state to obtain a PPP. - But, PPP is mandatory for families availing benefits under government schemes. - Also, whenever a family wants to avail any government scheme, it will have to first get a PPP to be eligible. - Haryana officials said although there is a union government’s Aadhaar card, it contains individual’s details and does not cater to the entire family as a unit. - In certain circumstances, it may not be possible for a state government to keep track of all the families residing in the state. - Although the ration card system is there, it is not updated and does not contain adequate family records. - With the PPP, it will be easier for the state government to maintain a complete database of all the state dwellers. How would it work? - To begin with, the government has already linked PPP with three social security schemes – old age Samman allowance, divyang pension, and the widow and destitute women pension scheme. - For instance, when a family member turns 60, they will automatically get a message through the software and will automatically start getting benefits of the old-age pension if they meet the required criteria. - Similarly, the teenagers will get messages on turning 18 years old and shall become eligible for various government schemes that will be notified to them through the software. From UPSC perspective, the following things are important : The Supreme Court, in a majority view (4:1), dismissed a series of petitions seeking a review of its 2018 judgment upholding the Lok Sabha Speaker’s certification of Aadhaar law as a Money Bill and its subsequent passage in Parliament. Try this PYQ: Consider the following statements: - Aadhaar card can be used as a proof of citizenship or domicile. - Once issued, Aadhaar number cannot be deactivated or omitted by the Issuing Authority. Which of the statements given above is/are correct? - The review petitions had highlighted how the Aadhaar Act was passed as a Money Bill by superseding the Rajya Sabha. It was called a “fraud on the Constitution”. - The review petition had argued that the Aadhaar Act clearly did not fall within the ambit of Article 110 (1) of the Constitution, which restricted Money Bills to certain specific fields only. What is a Review Petition? - Article 137 of the Constitution provides that subject to provisions of any law and rule made under Article 145 the Supreme Court of India has the power to review any judgment pronounced (or order made) by it. - Thus the binding decision of the Supreme Court/High Court can be reviewed in the Review Petition. - Two questions had come up for review regarding the five-judge Aadhaar Bench’s judgment in 2018. - One, whether the Speaker’s decision to declare a proposed law as Money Bill was “final” and cannot be challenged in court. - The second, whether the Aadhaar (Targeted Delivery of Financial and Other Subsidies, Benefits and Services) Act, 2016 was correctly certified as a ‘Money Bill’ under Article 110(1) of the Constitution. What is the majority Judgment? - On the first question, the majority judgment in 2018 said the Speaker’s decision could be challenged in court only under “certain circumstances”. - On the second, it concluded that the Aadhaar Act was rightly called a Money Bill. - A Bill is said to be a Money Bill if it only contains provisions related to taxation, borrowing of money by the government, expenditure from or receipt to the Consolidated Fund of India. - Bills that only contain provisions that are incidental to these matters would also be regarded as Money Bills. - A Money Bill may only be introduced in Lok Sabha, on the recommendation of the President as per Article 110 of the Constitution. - Then, it is transmitted to the Rajya Sabha for its recommendations. Following this, it may be sent to the Rajya Sabha for its recommendations, which Lok Sabha may reject if it chooses to. - If such recommendations are not given within 14 days, it will be deemed to be passed by Parliament. How is a Money Bill different from a financial bill? - While all Money Bills are Financial Bills, all Financial Bills are not Money Bills. - For example, the Finance Bill which only contains provisions related to tax proposals would be a Money Bill. - However, a Bill that contains some provisions related to taxation or expenditure, but also covers other matters would be considered as a Financial Bill. What is Parivar Pehchan Patra (PPP)? From UPSC perspective, the following things are important : Haryana CM Manohar Khattar has distributed ‘Parivar Pehchan Patra’ to the eligible families and announced that welfare schemes of all departments would be linked with the PPP within the next three months. Practice question for mains: Q.What is Parivar Pehchan Patra (PPP) recently rolled out by Haryana Govt.? How it is beneficial compared to the Aadhaar? What is Parivar Pehchan Patra (PPP)? - It is an 8-digit Unique Identity Card number meant for each family to enable smooth and automatic delivery of several citizen-centric services. - The government will establish the scheme-wise eligibility of a particular family using this 8-digit code according to the information available in the PPP of the family. - The benefits, according to the schemes, shall automatically be transferred to the family using the same code. - PPP will ensure that not a single beneficiary is left out from the government benefits that they are entitled to. How is PPP different from the Aadhaar card? - The PPP, mathematically, is an integral number of Aadhaar. - While Aadhaar represents an individual as a unit, a PPP represents a family as a unit. Most of our government schemes are structured around the family. - It is not structured around an individual. - For example, ration eligibility is there for the family but the family can split it into various members as long as they are above 18 years and say they are separating entitlements for all individuals. Will it be mandatory for every family of Haryana to get PPP? - No, it will not be mandatory for every family of the state to obtain a PPP. - But, PPP is mandatory for families availing benefits under government schemes. - Also, whenever a family wants to avail any government scheme, it will have to first get a PPP to be eligible. - Haryana officials said although there is a union government’s Aadhaar card, it contains individual’s details and does not cater to the entire family as a unit. - In certain circumstances, it may not be possible for a state government to keep track of all the families residing in the state. - Although the ration card system is there, it is not updated and does not contain adequate family records. - With the PPP, it will be easier for the state government to maintain a complete database of all the state dwellers. How would it work? - To begin with, the government has already linked PPP with three social security schemes – old age Samman allowance, divyang pension, and the widow and destitute women pension scheme. - For instance, when a family member turns 60, they will automatically get a message through the software and will automatically start getting benefits of the old-age pension if they meet the required criteria. - Similarly, the teenagers will get messages on turning 18 years old and shall become eligible for various government schemes that will be notified to them through the software. From UPSC perspective, the following things are important : Prelims level : Not much. Mains level : Paper 2- Aadhaar- how it has fared so far? What was the rationale behind Aadhaar? - What did the UIDAI’s report say? Aadhaar has curtailed leakages of government subsidies. Through Aadhaar, savings worth ₹90,000 crores have accrued to the government– UIDAI’s2017-18 annual report. - Plugging the leakages in the schemes: When Aadhaar was conceived a decade ago, the rationale postulated was: India spends nearly three trillion rupees a year across several core welfare programmes such as Public Distribution System (PDS), LPG, Mahatma Gandhi National Rural Employment Guarantee Act etc. - Huge leakage due to duplications: Roughly 30-40% of this three trillion is lost in leakages. - Leakages are largely due to ‘ghost’ and ‘duplicate’ beneficiaries using fake identities to avail these benefits; a unique identity biometric scheme can eliminate these leakages and vastly improve efficiency in welfare delivery. - Improve welfare delivery efficiency: In fact, the former Union Minister, Arun Jaitley, even renamed the Aadhaar Bill to ‘Targeted Delivery of Financial and other Subsidies, Benefits and Services’ Bill, making it amply clear that Aadhaar’s primary, if not sole purpose, was to improve welfare delivery efficiency. What are the findings of study? - How was the study carried out? - Use of RCT and sample of 15 million people: They conducted a scientifically designed study of the PDS system in Jharkhand covering 15 million beneficiaries using the technique of randomised control trials (RCT). - In the study, one set of beneficiaries went through the Aadhaar-based biometric authentication while the other group used the old system of procuring their ration. - The results were then compared to see if Aadhaar-based biometric authentication had any impact in reducing leakages. - What were the findings of the study? - No measurable benefit: The study concluded that Aadhaar-based biometric authentication had no measurable benefit. - No reduction in leakages: Aadhaar-based biometric authentication did not reduce leakages due to elimination of ghosts and duplicates, as widely perceived. - Increase in transaction costs for beneficiary: On the other hand, they found that Aadhaar-based biometric authentication increased transaction costs for beneficiaries. - 17% extra cost: That is, to claim ration worth ₹40, beneficiaries in the Aadhaar system incurred an additional ₹7 of costs than those in the old system, because of multiple trips to authenticate themselves and the opportunity cost of time spent. - This is a whopping 17% extra cost burden of the value of the benefit they were entitled to receive. - Type 1 error of exclusion: To make matters worse, Aadhaar-based biometric authentication also introduced what empirical scientists call Type I error of exclusion. - Aadhaar authentication falsely rejected genuine PDS beneficiaries who were then denied their ration supplies. - The study finds that nearly 10% of legitimate beneficiaries were denied their ration either because they did not have their Aadhaar linked to their ration card or due to an exclusion error. - No direct impact of Aadhaar in reducing leakages. - 2. It denied ration to 10% of genuine beneficiaries and increased costs by 17% to those that were forced to get their ration using Aadhaar. - Pain with no gain: They conclude that Aadhaar authentication for PDS in Jharkhand caused “some pain with no gain”. What premises were wrong about Addhaar? - No testing of empirical belief: There was a widespread belief among the policy elite that ghosts and duplicates were the scourge of India’s welfare delivery and that Aadhaar would eliminate this. - But this belief was never empirically tested. - Based on this belief, an entire story was concocted about improving welfare efficiency by eliminating ghosts and duplicates with Aadhaar and a whole new law was enacted to this effect. - The pilot project not carried out: Many studies now establish that ghosts and duplicates are not the significant cause of leakages. - It would have been better to have undertaken a robust pilot project of scale to test the belief about ghosts and duplicates, before embarking on it nationwide. In a sociologist’s world and in a liberal society, a policy that could run the risk of denying welfare to just a few people, putting their lives at risk, is not worth implementing regardless of how many millions it benefits. Aadhaar is an ambitious project that seeks to provide unique identification numbers to each individual in a country, collecting demographic and biometric information in the process. Currently, UIDAI has issued over 98 crore Aadhaar numbers. Need for Aadhaar: India must use technology in a transformational way to accelerate social and economic justice. It will help in expansion of opportunities for all at scale and speed. What is the Aadhaar Bill? Aadhaar (Targeted Delivery of Financial and Other Subsidies, Benefits and Services) Bill, 2016, has been passed by Parliament, to provide for efficient, transparent, and targeted delivery of subsidies, benefits and services. It will enable the govt. to reset the subsidy regime and deliver state benefits directly to their intended beneficiaries, plugging leakages. How Aadhar is linked with DBT? India spends nearly Rs. 4 lakh crore on subsidies, in order to complement the political democracy with socio-economic democracy. On January 1, 2013, the UPA govt launched the Direct Benefit Transfer scheme under which monetary benefits would be transferred directly to the beneficiaries through an Aadhaar-enabled platform. The effort to channelize subsidies, benefits and services to through a 12-digit number or to say its biometric alternative can help plug the leakages in the subsidy framework and give a boost to the Jan Dhan Yojna, which remains closely aligned to this scheme. Follow our story on Direct Benefits Transfer: The Big Reform. Do read the Economic Survey chapter on JAM Trinity. What are the concerns on Privacy front? There are certain provisions in the Bill, that provide avenues for surveillance of citizens. A person’s Aadhaar number can become a standard data point in all business, banking and legal transactions. Our data systems are not secure and watertight. The people who maintain these systems are vulnerable to pressures and inducements. However, there are other concerns of exclusion, by denying the services to people who didn’t enroll for it or chose not to do it. According to Nandan Nilekani, the Bill had incorporated several safeguards with regard to privacy as highlighted by the A.P. Shah Committee report, on privacy law. There are other provisions in this Bill that seem to address the concern: What was Supreme Court’s stand on Aadhaar? In 2013, the Supreme Court ruled that Aadhaar could not be made mandatory to receive benefits. No one should be excluded from social welfare scheme, just because of a requirement of Aadhar. In 2015, It also prohibited the sharing the Aadhaar information with any agency. The case was referred to a larger bench to decide the question whether Aadhaar infringed the right to privacy. What is Aadhaar Bill versus Money Bill controversy? According to experts, the Bill was not a money Bill under Article 110 of the Constitution because it did not “contain ONLY provisions” dealing with the matters enumerated in that Article. Various Constitutional experts have argued that the Speaker’s decision to certify it as a money Bill was also plainly wrong. Do you want to know about Money Bill? As per Article 110(1), a bill that contains only provisions dealing with the following qualifies as a money bill: A money bill cannot be rejected by the Rajya Sabha, which can only suggest changes, the Lok Sabha is free to reject. Speaker: Article 110(3) confirms finality on the speaker’s decision on the question of whether a bill is a money bill. What were the amendments moved by Rajya Sabha? There is little doubt that India needs to streamline the way it delivers benefits, and to empower citizens with a basic identification document. But this cannot be done without ensuring the strictest protection of privacy. Follow our story on Aadhaar Cards: The Identity Revolution.
english
#!/usr/bin/env python3 from broker.config import env from broker.eudat.submit import submit_eudat def main(): job_yaml = env.HOME / "ebloc-broker" / "broker" / "_test" / "eudat" / "job.yaml" # job_yaml_temp = job_yaml.replace(".yaml", "_temp.yaml") # copyfile(job_yaml, job_yaml_temp) submit_eudat(job_yaml) if __name__ == "__main__": main()
python
<filename>etc/languages/en-US/moderation/ignore.json { "DESCRIPTION": "Makes the bot ignore commands, invites and stars in a channel.", "USAGE": "ignore [view|commands|invites|stars]", "IGNORING": "The following channels are ignoring **{{type}}**:", "ALREADY_IGNORING": "This channel is already ignoring {{type}}.", "STARBOARD": "The starboard is not enabled.", "ADDED": "Now ignoring {{type}}." }
json
<gh_stars>1-10 { "id": "d968-84", "text": "-2-\n$•1160 If enacted into law will continue and extend this function*\nend X believe the Bill deserves your backing*\nSincerely yours.\nLFPCisa\nEnclosure\nSimilar letter to Senator <NAME>.\nS" }
json
<filename>page-data/sq/d/604461682.json {"data":{"jobs":{"edges":[{"node":{"frontmatter":{"title":"Software Development Intern","company":"Borda Technology","location":"Istanbul, Turkey","range":"Jun 2020 - Sep 2020","url":"https://www.bordatech.com/"},"html":"<ul>\n<li>Worked on an IoT project about post-COVID19 office life and attended several trainings regarding software development and project management processes.</li>\n<li>Built ETL that extracted data from IoT devices, transformed via AWS Lambda, and loaded into DynamoDB.</li>\n<li>Created APIs in Amazon API Gateway to publish data to end-users.</li>\n<li>Experienced software development with Agile methodology (Scrum).</li>\n</ul>"}},{"node":{"frontmatter":{"title":"Data Science Intern","company":"Intellium","location":"Istanbul, Turkey","range":"Jun 2019 - Aug 2019","url":"http://intellium.com.tr/"},"html":"<ul>\n<li>Worked on a prediction project about potential energy usage.</li>\n<li>Used machine learning methods like Linear Regression, Decision Trees, Random Forest, Boosting Algorithms and Optimization Techniques.</li>\n<li>Experienced Python Libraries like Sci-kit Learn, NumPy, Pandas and Matplotlib.</li>\n<li>Also worked on a project to detect statistical fraud and anomalies.</li>\n<li>Demonstrated analytical thinking and problem-solving skills.</li>\n</ul>"}},{"node":{"frontmatter":{"title":"Intern","company":"Yeditepe University","location":"Istanbul, Turkey","range":"Mar 2019 - May 2019","url":"https://yeditepe.edu.tr/"},"html":"<ul>\n<li>Worked with the Yeditepe University Human Resources team to help them implement a new ERP system.</li>\n<li>Experienced a collaborative work environment and learned the core functions of Human Resources.</li>\n</ul>"}}]}}}
json
Kolkata: The possibility of two former India cricketers, Sourav Ganguly and Brijesh Patel, becoming office-bearers of the new-look Board of Control for Cricket in India (BCCI) is reasonably strong. The talk is that Ganguly looks good to be president of the BCCI and Patel its secretary or treasurer, well-placed sources told the ThePrint with some confidence Saturday. How the script unfolds at the 23 October AGM of the BCCI should be known by Sunday night, after the all-important meeting of past and present administrators in Mumbai. In the mix too are Gujarat’s Jay Shah, son of Union Home Minister Amit Shah, Union minister Anurag Thakur’s brother Arun Singh Dhumal (Himachal Pradesh), and Delhi’s Rajat Sharma, a media personality. The man to watch out for ahead of the meeting in Mumbai clearly is Jay Shah. He will be representing the Gujarat Cricket Association (GCA) at the AGM, and would be present at the meeting in Mumbai. The ball is actually in the court of Amit Shah, widely regarded as the most powerful man in the country after Prime Minister Narendra Modi. He will decide whether or not to expose his son to the public glare, and to what extent. Traditionally, the BCCI has enjoyed an exceptionally high profile, and its office-bearers remain in the news. It’s not only about his son, for Amit Shah, who helmed the GCA, is expected to have the biggest say in the appointment of the next set of BCCI office-bearers. Prime Minister Modi too is a former head of the GCA. Thakur, a former president of the BCCI, would also be present at the meeting in Mumbai, and one can expect him to play a key role in the lead up to the AGM, naturally keeping Amit Shah in the loop. The only factor working against Ganguly, the steel-injecting former captain, is that his tenure will not be more than nine months, as he would complete six years at a stretch as an administrator of the Cricket Association of Bengal, in July 2020. Cooling-off for three years sets in once six years have been completed. Even Jay Shah will have almost a similar length of tenure, as he has served as an office-bearer of the GCA. The restrictions on Ganguly and Jay Shah would be applicable according to the provisions of the BCCI’s constitution as they exist at this point in time. Nobody, of course, knows what the future holds. Besides the posts of the president, secretary and treasurer, the remaining office-bearers’ positions in the BCCI are those of vice-president and joint-secretary. With eight affiliated units (including the still-influential N. Srinivasan’s Tamil Nadu) deemed ineligible to attend, only 30 can participate in the BCCI’s AGM. The mood, thus far, is to have unanimity and to avoid elections.
english
<reponame>haykam821/Hollow-Logs { "parent": "hollowlogs:block/hollow_column", "textures": { "end": "woods_and_mires:block/stripped_pine_log_top", "side": "woods_and_mires:block/pine_log", "inner": "woods_and_mires:block/stripped_pine_log" } }
json
{ "id": "d755-23", "text": "Region II Conference-Planning Committee Meeting\nPage 2\n5 November 1964\nThank you for the always first-rate job you are doing\nfor NAEB and educational television.\nLooking forward with pleasure to seeing you in Washington\nwith our committee on Monday, November 16.\ncc: Mr. <NAME>\nMr. <NAME>\nMr. <NAME>\nMr. <NAME>\nMrs. <NAME>\nMr. <NAME>\nMr. <NAME>\nMr. <NAME>\nMr. <NAME>\nMiss <NAME>\nMr. <NAME>" }
json
<reponame>gregkroon/SumoLogic-Real-User-Monitoring-master<gh_stars>0 { "plugins": [ "plugins/rt.js", "plugins/auto-xhr.js", "plugins/spa.js", "plugins/angular.js", "plugins/backbone.js", "plugins/ember.js", "plugins/history.js", "plugins/bw.js", "plugins/restiming.js", "plugins/navtiming.js", "plugins/cache-reload.js", "plugins/md5.js", "plugins/compression.js", "plugins/errors.js", "plugins/third-party-analytics.js", "node_modules/usertiming-compression/src/usertiming-compression.js", "plugins/usertiming.js", "plugins/mq.js" ] }
json
<reponame>wkhattak/Path-Planning #include <fstream> #include <math.h> #include <uWS/uWS.h> #include <chrono> #include <iostream> #include <thread> #include <vector> #include "Eigen-3.3/Eigen/Core" #include "Eigen-3.3/Eigen/QR" #include "json.hpp" #include "spline.h" using namespace std; // for convenience using json = nlohmann::json; // For converting back and forth between radians and degrees. constexpr double pi() { return M_PI; } double deg2rad(double x) { return x * pi() / 180; } double rad2deg(double x) { return x * 180 / pi(); } // Checks if the SocketIO event has JSON data. // If there is data the JSON object in string format will be returned, // else the empty string "" will be returned. string hasData(string s) { auto found_null = s.find("null"); auto b1 = s.find_first_of("["); auto b2 = s.find_first_of("}"); if (found_null != string::npos) { return ""; } else if (b1 != string::npos && b2 != string::npos) { return s.substr(b1, b2 - b1 + 2); } return ""; } double distance(double x1, double y1, double x2, double y2) { return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); } int ClosestWaypoint(double x, double y, const vector<double> &maps_x, const vector<double> &maps_y) { double closestLen = 100000; //large number int closestWaypoint = 0; for(int i = 0; i < maps_x.size(); i++) { double map_x = maps_x[i]; double map_y = maps_y[i]; double dist = distance(x,y,map_x,map_y); if(dist < closestLen) { closestLen = dist; closestWaypoint = i; } } return closestWaypoint; } int NextWaypoint(double x, double y, double theta, const vector<double> &maps_x, const vector<double> &maps_y) { int closestWaypoint = ClosestWaypoint(x,y,maps_x,maps_y); double map_x = maps_x[closestWaypoint]; double map_y = maps_y[closestWaypoint]; double heading = atan2((map_y-y),(map_x-x)); double angle = fabs(theta - heading); angle = min(2*pi() - angle, angle); if(angle > pi()/4) { closestWaypoint++; if (closestWaypoint == maps_x.size()) { closestWaypoint = 0; } } return closestWaypoint; } // Transform from Cartesian x,y coordinates to Frenet s,d coordinates vector<double> getFrenet(double x, double y, double theta, const vector<double> &maps_x, const vector<double> &maps_y) { int next_wp = NextWaypoint(x,y, theta, maps_x,maps_y); int prev_wp; prev_wp = next_wp-1; if(next_wp == 0) { prev_wp = maps_x.size()-1; } double n_x = maps_x[next_wp]-maps_x[prev_wp]; double n_y = maps_y[next_wp]-maps_y[prev_wp]; double x_x = x - maps_x[prev_wp]; double x_y = y - maps_y[prev_wp]; // find the projection of x onto n double proj_norm = (x_x*n_x+x_y*n_y)/(n_x*n_x+n_y*n_y); double proj_x = proj_norm*n_x; double proj_y = proj_norm*n_y; double frenet_d = distance(x_x,x_y,proj_x,proj_y); //see if d value is positive or negative by comparing it to a center point double center_x = 1000-maps_x[prev_wp]; double center_y = 2000-maps_y[prev_wp]; double centerToPos = distance(center_x,center_y,x_x,x_y); double centerToRef = distance(center_x,center_y,proj_x,proj_y); if(centerToPos <= centerToRef) { frenet_d *= -1; } // calculate s value double frenet_s = 0; for(int i = 0; i < prev_wp; i++) { frenet_s += distance(maps_x[i],maps_y[i],maps_x[i+1],maps_y[i+1]); } frenet_s += distance(0,0,proj_x,proj_y); return {frenet_s,frenet_d}; } // Transform from Frenet s,d coordinates to Cartesian x,y vector<double> getXY(double s, double d, const vector<double> &maps_s, const vector<double> &maps_x, const vector<double> &maps_y) { int prev_wp = -1; while(s > maps_s[prev_wp+1] && (prev_wp < (int)(maps_s.size()-1) )) { prev_wp++; } int wp2 = (prev_wp+1)%maps_x.size(); double heading = atan2((maps_y[wp2]-maps_y[prev_wp]),(maps_x[wp2]-maps_x[prev_wp])); // the x,y,s along the segment double seg_s = (s-maps_s[prev_wp]); double seg_x = maps_x[prev_wp]+seg_s*cos(heading); double seg_y = maps_y[prev_wp]+seg_s*sin(heading); double perp_heading = heading-pi()/2; double x = seg_x + d*cos(perp_heading); double y = seg_y + d*sin(perp_heading); return {x,y}; } // Check if a lane change is possible. Uses sensor fusion data to compute position of other cars bool canChangeLane(vector<vector<double>> sensor_fusion, double car_s, double car_d, double safe_distance, int lane_to_check,int prev_path_size) { bool lane_change_ok = true; double nearest_distance = 999999999999; float other_car_id; bool ahead = true; for (auto s_f: sensor_fusion) {// go through sensor fusion data float other_car_d = s_f[6]; double other_car_vx = s_f[3]; double other_car_vy = s_f[4]; double other_car_speed = sqrt(other_car_vx*other_car_vx + other_car_vy*other_car_vy); double other_car_s = s_f[5]; int other_car_lane = (int)other_car_d/4; double other_car_future_s = other_car_s + (double)prev_path_size * 0.02 * other_car_speed; if (other_car_lane == lane_to_check) { // if same lane double dist_diff = other_car_future_s - car_s; if (nearest_distance > fabs(dist_diff)) { // find closest non-ego car nearest_distance = fabs(dist_diff); ahead = ((other_car_future_s - car_s > 0) ? true : false); // find out if non-ego car ahead or behind other_car_id = s_f[0]; } } } if (ahead) lane_change_ok = ((nearest_distance > safe_distance) ? true : false); else lane_change_ok = ((nearest_distance > safe_distance/1.50) ? true : false); // if behind then don't need that much space for safe lane change cout << "Car: id="<< other_car_id << ", lane=" << lane_to_check << ", distance=" << nearest_distance << (ahead ? " ahead" : " behind") << endl; return lane_change_ok; } int main() { uWS::Hub h; // Load up map values for waypoint's x,y,s and d normalized normal vectors vector<double> map_waypoints_x; vector<double> map_waypoints_y; vector<double> map_waypoints_s; vector<double> map_waypoints_dx; vector<double> map_waypoints_dy; // Waypoint map to read from string map_file_ = "../data/highway_map.csv"; // The max s value before wrapping around the track back to 0 double max_s = 6945.554; // Initial values int lane = 1; // centre lane >>> Lanes = 0,1,2 & Lane centres = 2,6,10 (left lane is 0) double velocity = 1.0; // start low & slowly build up to SAFE_VELOCITY when possible // Constants const double SAFE_VELOCITY = 49.5; const double DISTANCE_AHEAD = 30; // comfortable driving distance in front const double SAFE_DISTANCE = 30; // safe driving distance based on future s position const double TOO_CLOSE_DISTANCE = 15; // too close driving distance based on future s position const double OVERTAKE_DISTANCE = 30; // safe driving distance for overtaking ifstream in_map_(map_file_.c_str(), ifstream::in); string line; while (getline(in_map_, line)) { istringstream iss(line); double x; double y; float s; float d_x; float d_y; iss >> x; iss >> y; iss >> s; iss >> d_x; iss >> d_y; map_waypoints_x.push_back(x); map_waypoints_y.push_back(y); map_waypoints_s.push_back(s); map_waypoints_dx.push_back(d_x); map_waypoints_dy.push_back(d_y); } h.onMessage([&map_waypoints_x,&map_waypoints_y,&map_waypoints_s,&map_waypoints_dx,&map_waypoints_dy,&lane,&SAFE_VELOCITY,&velocity,&DISTANCE_AHEAD,&SAFE_DISTANCE,&OVERTAKE_DISTANCE,&TOO_CLOSE_DISTANCE](uWS::WebSocket<uWS::SERVER> ws, char *data, size_t length, uWS::OpCode opCode) { // "42" at the start of the message means there's a websocket message event. // The 4 signifies a websocket message // The 2 signifies a websocket event //auto sdata = string(data).substr(0, length); //cout << sdata << endl; if (length && length > 2 && data[0] == '4' && data[1] == '2') { auto s = hasData(data); if (s != "") { auto j = json::parse(s); string event = j[0].get<string>(); if (event == "telemetry") { // j[1] is the data JSON object // Main car's localization Data double car_x = j[1]["x"]; double car_y = j[1]["y"]; double car_s = j[1]["s"]; double car_d = j[1]["d"]; double car_yaw = j[1]["yaw"]; double car_speed = j[1]["speed"]; // Previous path data given to the Planner auto previous_path_x = j[1]["previous_path_x"]; auto previous_path_y = j[1]["previous_path_y"]; // Previous path's end s and d values double end_path_s = j[1]["end_path_s"]; double end_path_d = j[1]["end_path_d"]; // Sensor Fusion Data, a list of all other cars on the same side of the road. // A 2D vector of cars and then those cars' [ id, x, y, vx, vy, s, d]: // unique id, x position in map coordinates, y position in map coordinates, // x velocity in m/s, y velocity in m/s, // s position in frenet coordinates, d position in frenet coordinates. auto sensor_fusion = j[1]["sensor_fusion"]; json msgJson; vector<double> next_x_vals; vector<double> next_y_vals; cout << "************CYCLE START************" << endl; int prev_path_size = previous_path_x.size(); /*************************************************************************************************************************** * 1. Find if ego car is close to any non-ego car ***************************************************************************************************************************/ if (prev_path_size > 0 ) car_s = end_path_s; // use previous s as current s value if one exists bool too_close = false; double lead_car_speed; double future_distance_to_lead_car; double future_nearest_distance = 999999999999; int other_car_id; for (auto s_f: sensor_fusion) {// go through sensor fusion data double other_car_d = s_f[6]; int other_car_lane = (int)other_car_d/4; if (other_car_lane == lane) { // is the car in our lane? double other_car_vx = s_f[3]; double other_car_vy = s_f[4]; double other_car_speed = sqrt(other_car_vx*other_car_vx + other_car_vy*other_car_vy); double other_car_s = s_f[5]; // Future s of other car after 0.02 seconds // Multiplying by prev_path_size gives estimated position of the other vehicle after prev_path_size number of waypoints have been consumed by the simulator double other_car_future_s = other_car_s + (double)prev_path_size * 0.02 * other_car_speed; // Find future distance to lead car in same lane future_distance_to_lead_car = other_car_future_s - car_s; // Check if other car will be in front of ego car & inside our buffer area if (other_car_future_s > car_s && future_distance_to_lead_car < SAFE_DISTANCE) { too_close = true; if (future_nearest_distance > future_distance_to_lead_car) { future_nearest_distance = future_distance_to_lead_car; lead_car_speed = other_car_speed; other_car_id = s_f[0]; } } } } /*************************************************************************************************************************** * 2. Take action e.g. slow down to keep following or change lane if possible ***************************************************************************************************************************/ if (too_close) { cout << "Lead car: id="<< other_car_id << ", lane=" << lane << ", distance=" << future_nearest_distance << endl; cout << "Ego car speed: " << velocity << ", lead car speed: " << lead_car_speed << endl; if (velocity > lead_car_speed) { if (future_nearest_distance < TOO_CLOSE_DISTANCE) { // critically close, so decelrate quicker velocity -= (0.224 * 2); // 0.224 is ~5 m/s^2 below than the 10 m/s^s threshold requirement } else { // not that close, so decelerate normally velocity -= 0.224; // ~5 m/s^2 below than the 10 m/s^s threshold requirement } cout << "Adjusted ego car speed: " << velocity << endl; } if (lane == 0) { // current lane = left lane lane = 1; // try moving to centre lane bool lane_change_ok = canChangeLane(sensor_fusion, car_s, car_d, OVERTAKE_DISTANCE, lane, prev_path_size); if (lane_change_ok) { cout << "Changing lane to Centre" << endl; } else { cout << "Unable to change lane to Centre" << endl; lane = 0; // can't change lane, so stay in lane } } else if (lane == 1) { // current lane = centre lane lane = 0; // first try moving to left lane bool lane_change_ok = canChangeLane(sensor_fusion, car_s, car_d, OVERTAKE_DISTANCE, lane, prev_path_size); if (lane_change_ok) { cout << "Changing lane to Left" << endl; } else { cout << "Unable to change lane to Left" << endl; lane = 2; // now try right lane bool lane_change_ok = canChangeLane(sensor_fusion, car_s, car_d, OVERTAKE_DISTANCE, lane, prev_path_size); if (lane_change_ok) { cout << "Changing lane to Right" << endl; } else { cout << "Unable to change lane to Right" << endl; lane = 1; // can't change lane, so stay in lane } } } else { // current lane = right lane lane = 1; // try moving to centre lane bool lane_change_ok = canChangeLane(sensor_fusion, car_s, car_d, OVERTAKE_DISTANCE, lane, prev_path_size); if (lane_change_ok) { cout << "Changing lane to Centre" << endl; } else { cout << "Unable to change lane to Centre" << endl; lane = 2; // can't change lane, so stay in lane } } } else if (velocity < SAFE_VELOCITY) { // no non-ego car within buffer area velocity += 0.224; // accelerate cout << "Speed increased as no car within buffer area" << endl; } /*************************************************************************************************************************** * 3. Trajectory generation w/o JMT but using spline & method used in the project walkthrough to avoid jerk ***************************************************************************************************************************/ // Sparse x,y waypoints evenly spaced at DISTANCE_AHEAD metres used as anchors for spline // Later on, more wapoints will be generated via spline's interpolation for a smoother path vector<double> ptsx; vector<double> ptsy; // Refeence x,y,yaw to be used later // These are either set to either current state or previous (if we have prev state) double ref_x = car_x; double ref_y = car_y; double ref_yaw = deg2rad(car_yaw); if(prev_path_size == 0) { // if the simulator utilised all points in the previous run or the first run double prev_car_x = car_x - cos(car_yaw); // calculate previous x double prev_car_y = car_y - sin(car_yaw); // calculate previous y ptsx.push_back(prev_car_x); ptsy.push_back(prev_car_y); ptsx.push_back(car_x); ptsy.push_back(car_y); } else if(prev_path_size == 1) { // only 1 point left from previous run ptsx.push_back(previous_path_x[0]); // get previous x ptsy.push_back(previous_path_y[0]); // get previous y ptsx.push_back(car_x); ptsy.push_back(car_y); } else if(prev_path_size == 2) {// at least 2 previous points available so use prev path's last point as the starting point // Update ref with the last point ref_x = previous_path_x[prev_path_size-1]; ref_y = previous_path_y[prev_path_size-1]; double ref_prev_x = previous_path_x[prev_path_size-2]; double ref_prev_y = previous_path_y[prev_path_size-2]; ref_yaw = atan2(ref_y-ref_prev_y, ref_x-ref_prev_x); // find the angle tangent to last point ptsx.push_back(ref_prev_x); ptsy.push_back(ref_prev_y); ptsx.push_back(ref_x); ptsy.push_back(ref_y); } else {// more than 2 previous points available // Update ref with the last point ref_x = previous_path_x[prev_path_size-1]; ref_y = previous_path_y[prev_path_size-1]; double ref_prev_x = previous_path_x[prev_path_size-2]; double ref_prev_y = previous_path_y[prev_path_size-2]; ref_yaw = atan2(ref_y-ref_prev_y, ref_x-ref_prev_x); // find the angle tangent to last point double ref_prev_prev_x = previous_path_x[prev_path_size-3]; double ref_prev_prev_y = previous_path_y[prev_path_size-3]; ptsx.push_back(ref_prev_prev_x); ptsy.push_back(ref_prev_prev_y); ptsx.push_back(ref_prev_x); ptsy.push_back(ref_prev_y); ptsx.push_back(ref_x); ptsy.push_back(ref_y); } // Add 3 points that are DISTANCE_AHEAD metres apart in s,d coord & then get the corresponding x,y pair vector<double> next_wp0 = getXY(car_s+DISTANCE_AHEAD, 2+4*lane, map_waypoints_s, map_waypoints_x, map_waypoints_y); vector<double> next_wp1 = getXY(car_s+DISTANCE_AHEAD*2, 2+4*lane, map_waypoints_s, map_waypoints_x, map_waypoints_y); vector<double> next_wp2 = getXY(car_s+DISTANCE_AHEAD*3, 2+4*lane, map_waypoints_s, map_waypoints_x, map_waypoints_y); ptsx.push_back(next_wp0[0]); ptsy.push_back(next_wp0[1]); ptsx.push_back(next_wp1[0]); ptsy.push_back(next_wp1[1]); ptsx.push_back(next_wp2[0]); ptsy.push_back(next_wp2[1]); // Shift car ref angle to 0 degrees for easy caculations for(int i = 0; i < ptsx.size(); i++) { //cout << "Anchor points " << i << ": x=" << ptsx[i] << ", y=" << ptsy[i] << endl; double shift_x = ptsx[i] - ref_x; double shift_y = ptsy[i] - ref_y; ptsx[i] = shift_x*cos(0-ref_yaw) - shift_y*sin(0-ref_yaw); ptsy[i] = shift_x*sin(0-ref_yaw) + shift_y*cos(0-ref_yaw); } tk::spline s; s.set_points(ptsx, ptsy); // specify anchor points // Start with adding points not utilised last time i.e. the left over points (the simulator doesn't always utilise all the points) for(int i = 0; i < previous_path_x.size(); i++) { next_x_vals.push_back(previous_path_x[i]); next_y_vals.push_back(previous_path_y[i]); } // Calculate how to break up spline points so that we achieve desired velocity + jerk free trajectory double target_x = DISTANCE_AHEAD; double target_y = s(target_x); // use spline to get the corresponding y double target_dist = sqrt(pow(0-target_x,2) + pow(0-target_y,2)); double x_add_on = 0; // origin where the car is now but will keep on changing as we add more points // target_distance = N*0.02*veloctiy OR N = target_distance/(0.02*veloctiy) // N is the no. of segments required from origin to target_distance when travelling at velocity // 0.02 is used because the simulator picks a point every 0.02 sec // 2.24 is the conversion factor for miles/hour to meter/sec double N = target_dist/(0.02*velocity/2.24); // N is the total no. of road sections from current location to DISTANCE_AHEAD metres ahead double x_increment = target_x/N; // length of each road section in x-axis // Add new x,y points to complete 50 points for (int i = 1; i <= 50-previous_path_x.size(); i++) { double x_point = x_add_on + x_increment; // start location + length of each road section in x-axis double y_point = s(x_point); // find corresponding y x_add_on = x_point; // current point becomes the start for next point generation in the loop double x_ref = x_point; double y_ref = y_point; // rotate back to global coord from local coor x_point = x_ref*cos(ref_yaw) - y_ref*sin(ref_yaw); y_point = x_ref*sin(ref_yaw) + y_ref*cos(ref_yaw); x_point += ref_x; // keep the car ahead of the last point y_point += ref_y; next_x_vals.push_back(x_point); next_y_vals.push_back(y_point); //cout << "Newly added point " << i << " coords: x=" << x_point << ", y=" << y_point << endl; } cout << "************CYCLE END**************" << endl; msgJson["next_x"] = next_x_vals; msgJson["next_y"] = next_y_vals; auto msg = "42[\"control\","+ msgJson.dump()+"]"; ws.send(msg.data(), msg.length(), uWS::OpCode::TEXT); } } else { // Manual driving std::string msg = "42[\"manual\",{}]"; ws.send(msg.data(), msg.length(), uWS::OpCode::TEXT); } } }); // We don't need this since we're not using HTTP but if it's removed the program doesn't compile :-( h.onHttpRequest([](uWS::HttpResponse *res, uWS::HttpRequest req, char *data, size_t, size_t) { const std::string s = "<h1>Hello world!</h1>"; if (req.getUrl().valueLength == 1) { res->end(s.data(), s.length()); } else { // i guess this should be done more gracefully? res->end(nullptr, 0); } }); h.onConnection([&h](uWS::WebSocket<uWS::SERVER> ws, uWS::HttpRequest req) { std::cout << "Connected!!!" << std::endl; }); h.onDisconnection([&h](uWS::WebSocket<uWS::SERVER> ws, int code, char *message, size_t length) { ws.close(); std::cout << "Disconnected" << std::endl; }); int port = 4567; if (h.listen(port)) { std::cout << "Listening to port " << port << std::endl; } else { std::cerr << "Failed to listen to port" << std::endl; return -1; } h.run(); }
cpp