text
stringlengths
1
1.04M
language
stringclasses
25 values
Brazilian free-kick specialist Roberto Carlos will be Delhi Dynamos' player-manager. Chennayin FC has retained the services of Elano Blumer as its marquee player. Simao Sabrosa will be leading the charge for NorthEast FC. Portugal's Helder Postiga has replaced Luis Garcia as Kolkata's main man. Nicolas Anelka will be the player-manager of Mumbai City FC this season. Carlos Marchena of Spain has replaced David James as Kerala Blaster's marquee signing. Brazilian World Cupper Lucio is FC Goa's top draw for ISL Season 2. Romania's soccer star Adrian Mutu will be the biggest draw for the Pune team.
english
<div class="announcement"> <h2 id="{{ page.number | prepend: 'hw' | slugify }}">Homework {{ page.number }}: {{ page.title }}</h2> <span class="announcement-meta"> {% if page.release and page.due %} {%- assign release_time = page.release | date: '%b %d, %l:%M %p' -%} {%- assign due_time = page.due | date: '%b %d, %l:%M %p' -%} Release: <a href="https://www.timeanddate.com/worldclock/fixedtime.html?iso={{ release_time | date: '%Y-%m-%dT%H:%M:%S' }}&p1=747"> {{ release_time }} </a> - Due: <a href="https://www.timeanddate.com/worldclock/fixedtime.html?iso={{ due_time | date: '%Y-%m-%dT%H:%M:%S' }}&p1=747"> {{ due_time }} </a> {% endif %} </span> <div> {% if page.pdf and page.tex and page.word %} <ul> <li> Problems: [<a href="{{ page.pdf | absolute_url }}">PDF</a>] </li> <li> LaTeX template: [<a href="{{ page.tex | absolute_url }}">TeX</a>] </li> <li> Word Template: [<a href="{{ page.word | absolute_url }}">Word</a>] </li> {% if page.walkthrough %} <li> Walkthrough: [<a href="{{ page.walkthrough | absolute_url }}">YouTube</a>] </li> {% endif %} {% if page.solution %} <li> Solution: [<a href="{{ page.solution | absolute_url }}">Blackboard</a>]{% if page.solution_walkthrough %}[<a href="{{ page.solution_walkthrough }}">YouTube</a>] {% endif %} </li> {% endif %} </ul> {% endif %} {{ content }} </div> </div>
html
<filename>test-report/offlinePass.devtoolslog.json<gh_stars>1-10 [{"method":"Page.lifecycleEvent","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"1ACD2532E8D208ED2997954E2A595DC8","name":"commit","timestamp":57507.384924}},{"method":"Page.lifecycleEvent","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"1ACD2532E8D208ED2997954E2A595DC8","name":"DOMContentLoaded","timestamp":57507.384981}},{"method":"Page.lifecycleEvent","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"1ACD2532E8D208ED2997954E2A595DC8","name":"load","timestamp":57507.385162}},{"method":"Page.lifecycleEvent","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"1ACD2532E8D208ED2997954E2A595DC8","name":"networkAlmostIdle","timestamp":57507.385441}},{"method":"Page.lifecycleEvent","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"1ACD2532E8D208ED2997954E2A595DC8","name":"networkIdle","timestamp":57507.385441}},{"method":"Network.requestWillBeSent","params":{"requestId":"0031EE21952E0219FE3E03819CE3BBD2","loaderId":"0031EE21952E0219FE3E03819CE3BBD2","documentURL":"http://localhost:3000/","request":{"url":"http://localhost:3000/","method":"GET","headers":{"Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse","Sec-Fetch-Dest":"document"},"mixedContentType":"none","initialPriority":"VeryHigh","referrerPolicy":"no-referrer-when-downgrade"},"timestamp":57507.393868,"wallTime":1582578097.340592,"initiator":{"type":"other"},"type":"Document","frameId":"7514A71C44E26651DAC5C5028EE476E0","hasUserGesture":false}},{"method":"Network.responseReceivedExtraInfo","params":{"requestId":"0031EE21952E0219FE3E03819CE3BBD2","blockedCookies":[],"headers":{"X-Powered-By":"Express","Accept-Ranges":"bytes","Content-Type":"text/html; charset=UTF-8","ETag":"W/\"db1-xsmnFdjAWO0uZBtfadxdscAMTj0\"","Vary":"Accept-Encoding","Content-Encoding":"gzip","Date":"Mon, 24 Feb 2020 21:01:34 GMT"},"headersText":"HTTP/1.1 200 OK\r\nX-Powered-By: Express\r\nAccept-Ranges: bytes\r\nContent-Type: text/html; charset=UTF-8\r\nETag: W/\"db1-xsmnFdjAWO0uZBtfadxdscAMTj0\"\r\nVary: Accept-Encoding\r\nContent-Encoding: gzip\r\nDate: Mon, 24 Feb 2020 21:01:34 GMT\r\n\r\n"}},{"method":"Network.loadingFailed","params":{"requestId":"0031EE21952E0219FE3E03819CE3BBD2","timestamp":57507.394859,"type":"Document","errorText":"net::ERR_INTERNET_DISCONNECTED","canceled":false}},{"method":"Page.frameStartedLoading","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0"}},{"method":"Page.lifecycleEvent","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"D584AFF98BAFE4DC5294A4EB79420029","name":"init","timestamp":57507.452759}},{"method":"Page.frameNavigated","params":{"frame":{"id":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"D584AFF98BAFE4DC5294A4EB79420029","url":"chrome-error://chromewebdata/","securityOrigin":"://","mimeType":"text/html","unreachableUrl":"http://localhost:3000/"}}},{"method":"Network.loadingFinished","params":{"requestId":"D584AFF98BAFE4DC5294A4EB79420029","timestamp":57507.458746,"encodedDataLength":0,"shouldReportCorbBlocking":false}},{"method":"Page.loadEventFired","params":{"timestamp":57507.462019}},{"method":"Page.lifecycleEvent","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"D584AFF98BAFE4DC5294A4EB79420029","name":"load","timestamp":57507.462019}},{"method":"Page.frameStoppedLoading","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0"}},{"method":"Page.domContentEventFired","params":{"timestamp":57507.46301}},{"method":"Page.lifecycleEvent","params":{"frameId":"7514A71C44E26651DAC5C5028EE476E0","loaderId":"D584AFF98BAFE4DC5294A4EB79420029","name":"DOMContentLoaded","timestamp":57507.46301}}]
json
Indian High Commissioner to Bangladesh Pranay Verma on Wednesday highlighted the significance of Yoga as a gift of India to the world. “Yoga, being an integral part of the shared cultural heritage of India and Bangladesh, can further serve as a unifying force, promoting physical and mental well-being among our people,” he said. The High Commissioner emphasised that the G20 Presidency of India in 2023 reinforces India’s commitment to fostering global partnerships for sustainable development, and Yoga is a catalyst for this positive change. The High Commission of India celebrated the International Day of Yoga along with Yoga enthusiasts from Bangladesh at the Shaheed Suhrawardy Indoor Stadium, Mirpur. The event witnessed a large turnout, with participants from various walks of life coming together to celebrate the ancient science of yoga, which originated from India.
english
Welcome to a special edition of Monday Night RAW Preview! This week, we conclude the WWE Draft 2019. The first half occurred on SmackDown this past Friday and things were certainly shaken up a bit. We'll see tonight just how much things shape up and we have a much bigger pool of superstars to draft from this time around. We had four official rounds on Friday, of which one spot was wasted because Alexa Bliss & Nikki Cross were drafted separately. Either way, tonight will truly determine the direction of things as the year eventually concludes. It's going to be interesting to see how things turn out and whether USA Network or FOX bidded and got the better end of the deal with the draft. We have a slight feeling that FOX will end up getting the better roster, but it's hard to say. Either way, here's what you need to look forward to in the draft! We've had a big replacement in the opening match of the night. SmackDown kicked us off last week with a good match between Seth Rollins (RAW) and Roman Reigns (SmackDown). We were originally supposed to get Becky Lynch (RAW) vs Sasha Banks (SmackDown) to determine the #1 pick but due to a tailbone injury, Banks has been pulled from the match and according to reports, has been replaced by Charlotte Flair. This is going to be interesting assuming that it's true. Flair wasn't drafted yet as she falls into the second draft pool and Becky Lynch was the overall #1 draft pick - a big money spot. We predict that The Man will pick up the win, once again giving RAW the first pick. Rusev has had quite an unfortunate last couple of weeks. The returning Bobby Lashley came back with Lana and The Bulgarian Brute's wife has seemingly left him for The Almighty Lashley. Things got worse last week when they shared a bed and Randy Orton and King Corbin, who were there at ringside, made the big mistake of laughing and mocking him. A furious Rusev ended up taking out all his anger and frustration on them, slamming both men against the barricades, ring posts and giving them a taste of their own medicine by super kicking them. The rivalry between Rusev and Lashley has only gotten more intense and it's not calming down anytime soon. With Lashley and Lana likely present in the arena, it's possible that Rusev will end up going after them and we could get a huge brawl between the two men. Will Rusev get a measure of revenge on Lashley? Or will the latter and Lana continue playing mind games on Rusev? The Draft continues and it's the most highly-anticipated part of the show for a good reason. We get to see who goes where and once Becky Lynch vs Charlotte Flair/Sasha Banks is done, we'll get right back into the mix. We assume that we're going to see atleast 4-5 rounds of drafts since it's a longer show and they can draft more superstars to the brand. Here are all the available superstars in the Draft pool for today. Quite a large list: Aleister Black, Ali, Andrade, AOP (Akam & Rezar), Apollo Crews, Bayley (c), Brock Lesnar (c), Buddy Murphy, Carmella, Charlotte Flair, Cedric Alexander, Curt Hawkins & Zack Ryder, Dana Brooke, Daniel Bryan, Drake Maverick Dolph Ziggler & Robert Roode (c), Elias, Erick Rowan, Fire & Desire (Mandy Rose & Sonya Deville), King Corbin, Jinder Mahal, Liv Morgan, Luke Harper, Mojo Rawley, The Miz, No Way José, Rey Mysterio, R-Truth, Rusev, Samoa Joe, Seth Rollins (c), Sarah Logan, Shelton Benjamin, Shinsuke Nakamura (c) (with Sami Zayn), The IIconics (Billie Kay & Peyton Royce), The Kabuki Warriors (c) (Asuka & Kairi Sane), The New Day (Kofi Kingston, Big E & Xavier Woods) and Titus O’Neil. We anticipate that a possible World Championship brand change will happen, with Brock Lesnar moving right back to RAW while Seth Rollins moves back to SmackDown. That would be quite a shocking draft exchange. The Kabuki Warriors are finally running the Women's Tag Team division. They defeated a strong duo in Alexa Bliss & Nikki Cross at Hell in a Cell to win the titles after Asuka paid tribute to The Great Muta and spat green mist to help pick up the win. On RAW, Asuka did the same thing to Becky Lynch and Kairi Sane took advantage, pinning the RAW Women's Champion and now the #1 draft pick Becky Lynch. After the match, they unleashed a post-match attack and it was Alexa Bliss & Nikki Cross who made the save, attacking the women who dethroned them. This may be the most high-profile rivalry so far in the Women's Tag Team division this year and it'll be fun to see where it heads. It's clear that Alexa Bliss & Nikki Cross, freshly drafted from RAW, will be going right after the tag team championships. Will they manage to secure a win over The Kabuki Warriors and subsequently a title shot? Or will we see a singles match between one woman from each team? On Friday night, Randy Orton and The Street Profits were among those who were drafted to RAW in what may be considered a fresh start. Orton has been on SmackDown for the last three years and has also been an integral part of the brand. The others who were drafted were mainly RAW superstars, to begin with. However, tonight, we will see a lot of fresh names jump brands to RAW and it's going to be a new start. Of course, many will consider next week's RAW to be the official fresh start for the red brand while this coming Friday will be a fresh start for SmackDown as they have their third episode on FOX. Whichever superstar moves to RAW, it may be a lot more beneficial than they realize. SmackDown is all but likely to get the more stacked roster as FOX is splashing a lot more money in WWE's way. But whichever superstar does move to RAW has a lot more potential to become a bigger star.
english
Despite his problems, his friends have remained faithful to him. She has always remained faithful to the values she learned as a child. My friends have supported me faithfully. He faithfully submitted all the proper forms. The model faithfully [=accurately] reproduces the original building.
english
/* // Licensed to <NAME> under one or more contributor license // agreements. See the NOTICE file distributed with this work for // additional information regarding copyright ownership. // // <NAME> licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License at: // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ package org.eigenbase.resgen; import java.io.PrintWriter; /** * A generator converts a set of resource definitions to a piece of code. * * @author jhyde */ interface Generator { /** * Configures whether this generator will output comments that may be * submitted to a source code management system. In general, it * squelches comments indicating the file should not be checked in as * well as comments change with each generation of the file (thereby * avoiding merge conflicts). * * @param enabled Whether enabled */ void setScmSafeComments(boolean enabled); /** * Generates a class containing a line for each resource. */ void generateModule( ResourceGen generator, ResourceDef.ResourceBundle resourceList, PrintWriter pw); } // End Generator.java
java
<gh_stars>10-100 "use strict"; import { Timeline } from "./Timeline.js"; import { Notifications } from "./Notifications.js"; import { Utilities } from "./Utilities.js"; class Timer { constructor() { this.settings = { autoStart: { cycles: true, breaks: true, }, cycleTime: 0, breakTime: 0, totalPeriods: 0, badgeTimer: true, }; this.comms = { port: null, open: false, }; this.periods = new Timeline(); this.subtractor = 0; } init(settings) { this.settings = settings; this.periods.build(this.settings); Notifications.clearAll(this.settings.totalPeriods); Utilities.updateBadgeColor(this.periods.current.isCycle); } updateAutoStart(autoStart) { this.settings.autoStart = { ...this.settings.autoStart, ...autoStart }; const updates = { time: false, targets: true, autoStart: true }; this.periods.update(updates, Date.now(), this.settings); } updateTime(time) { this.settings = { ...this.settings, ...time }; const updates = { time: true, targets: true, autoStart: false }; this.periods.update(updates, Date.now(), this.settings); } updateTotalPeriods(totalPeriods) { this.settings.totalPeriods = totalPeriods; if (totalPeriods < this.periods.timeline.length) { this.periods.shorten(this.settings); } else if (totalPeriods > this.periods.timeline.length) { this.periods.lengthen(this.settings); } } start() { const updates = { time: false, targets: true, autoStart: true }; this.periods.update(updates, Date.now(), this.settings); this.periods.current.start(); this.runSubtractor(); this.postState(); } end() { this.stopSubtractor(); this.periods.current.end(); this.notify(); if (this.periods.isLast) this.postState(); else this.next(); } next() { this.periods.index += 1; Utilities.updateBadgeColor(this.periods.current.isCycle); if (this.periods.current.enabled) this.start(); else this.postState(); } pause() { this.stopSubtractor(); this.periods.current.pause(); this.postState(); } skip() { this.stopSubtractor(); this.periods.current.skip(); this.notify(); this.next(); } reset() { this.stopSubtractor(); if (this.periods.current.status === "initial" && this.periods.index > 0) { [1, 2].forEach(() => { this.periods.index -= 1; this.periods.current.reset(this.settings); Notifications.clear(this.periods.index); }); } else { this.periods.current.reset(this.settings); } this.postState(); } resetAll() { this.stopSubtractor(); this.periods.timeline.forEach((period) => period.reset(this.settings)); this.periods.index = 0; this.postState(); Notifications.clearAll(this.settings.totalPeriods); } runSubtractor() { this.stopSubtractor(); this.subtractor = setInterval(() => { this.periods.current.remaining -= 1000; if (this.periods.current.remaining < 0) this.end(); else this.postState(); }, 1000); } stopSubtractor() { clearInterval(this.subtractor); } updateComms(port, open) { this.comms.port = port; this.comms.open = open; } postState() { const time = Utilities.parseMs(this.periods.current.remaining); if (this.settings.badgeTimer) { Utilities.updateBadgeTime(this.periods.current.status, time); } if (this.comms.open) { this.comms.port.postMessage(this.formatState(time)); } } formatState(time) { return { period: this.periods.current.id, time: time, status: this.periods.current.status, totalPeriods: this.settings.totalPeriods, }; } notify() { let type = ""; if (this.periods.isLast) type = "complete"; else type = this.periods.current.isCycle ? "cycle" : "break"; Notifications.send(this.periods.current.id, this.settings.breakTime, type); } } export { Timer };
javascript
<reponame>Ray0218/Specs<gh_stars>1000+ { "name": "ForceCuBeSDK", "version": "0.0.3", "summary": "ForceCuBe SDK for working with BLE devices.", "homepage": "http://forcecube.com", "authors": { "ForceCuBe": "<EMAIL>" }, "platforms": { "ios": "8.0" }, "source": { "git": "https://gitlab.com/forcecube/ios-sdk-package.git", "tag": "0.0.3" }, "source_files": "Headers/*.h", "vendored_libraries": "libForceCuBe.a", "frameworks": [ "UIKit", "Foundation", "AdSupport", "CoreBluetooth", "CoreLocation" ], "dependencies": { "Reachability": [ ], "OCMock": [ ] }, "requires_arc": true, "xcconfig": { "HEADER_SEARCH_PATHS": "\"${PODS_ROOT}/Headers/ForceCuBeSDK\"" }, "license": { "type": "Copyright", "text": " Copyright 2015 ForceCuBe. All rights reserved.\n" } }
json
import React, { useEffect, useState } from "react"; import { Provider } from "react-redux"; import store from "./store"; import "./App.scss"; import Routes from "./AppRoutes"; function App() { const [screenSize, getDimension] = useState({ dynamicWidth: window.innerWidth, dynamicHeight: window.innerHeight, }); const setDimension = () => { getDimension({ dynamicWidth: window.innerWidth, dynamicHeight: window.innerHeight, }); }; useEffect(() => { window.addEventListener("resize", setDimension); return () => { window.removeEventListener("resize", setDimension); }; }, [screenSize]); return ( <Provider store={store}> <div className="app-container"> <header className="app-header">HEADER</header> {screenSize.dynamicWidth >= 1536 ? ( <aside className="app-navigation">ASIDE</aside> ) : null} <main className="app-content"> <Routes /> </main> </div> </Provider> ); } export default App;
javascript
492 (145. 3 ov) 704/3 dec (151. 0 ov) 172/7 (20. 0 ov) 157 (20. 0 ov) 233/3 (20. 0 ov) 171 (18. 2 ov) The world's top-rated ODI all-rounder, Shakib Al Hasan, says Bangladesh is aiming for a confidence-boosting performance in this week's international T20 Tournament in Trinidad ahead of the Twenty20 World Cup in Sri Lanka. Rahul Dravid on Wednesday cautioned that Test cricket will face a stiff survival challenge in a decade's time since children, who are growing up now, may then prefer easy bucks in Twenty20 format over the traditional form of the game. Australia's David Warner paid Ireland the compliment of saying they can "blast it from ball one" ahead of the two countries' one-day international at Stormont on Saturday. The sight of a Bangladesh defeat has become a very frequent occurrence and reflects a very sorry state of affairs for that cricket-crazy nation. It is a team that boasts of enormous potential, producing the odd spark of brilliance, but more often than not failing to live up to promise.
english
{ "description": "Create an empty large face list with user-specified largeFaceListId, name, an optional userData and recognitionModel. Large face list is a list of faces, up to 1,000,000 faces, and used by [Face - Find Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). After creation, user should use [LargeFaceList Face - Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3) to import the faces and [LargeFaceList - Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1) to make it ready for [Face - Find Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). No image will be stored. Only the extracted face features are stored on server until [LargeFaceList - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) is called. Find Similar is used for scenario like finding celebrity-like faces, similar face filtering, or as a light way face identification. But if the actual use is to identify person, please use [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) / [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) and [Face - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).'recognitionModel' should be specified to associate with this large face list. The default value for 'recognitionModel' is 'recognition_01', if the latest model needed, please explicitly specify the model you need in this parameter. New faces that are added to an existing large face list will use the recognition model that's already associated with the collection. Existing face features in a large face list can't be updated to features extracted by another version of recognition model.* 'recognition_01': The default recognition model for [LargeFaceList- Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc). All those large face lists created before 2019 March are bonded with this recognition model.* 'recognition_02': Recognition model released in 2019 March. 'recognition_02' is recommended since its overall accuracy is improved compared with 'recognition_01'.Large face list quota:* Free-tier subscription quota: 64 large face lists.* S0-tier subscription quota: 1,000,000 large face lists.", "input_method": "stdin", "parameters":{ "large_face_list_id":{ "description": "Id referencing a particular large face list.", "type": "Optional[String[1]]" } , "body":{ "description": "Request body for creating a large face list.", "type": "Optional[String[1]]" } , "recognitionmodel":{ "description": "", "type": "Optional[String[1]]" } , "userdata":{ "description": "User specified data. Length should not exceed 16KB.", "type": "Optional[String[1]]" } , "name":{ "description": "User defined name, maximum length is 128.", "type": "Optional[String[1]]" } } }
json
Given that the political stakes are very high, Congress is taking all precautions to avoid the repeat of the 2017 fiasco when it had failed to form a government in Goa despite scoring the maximum number of seats. Panaji: Ahead of the counting of votes on March 10, Congress has moved all its candidates to a luxury resort in Bambolim village near Panaji amid defection fears as the exit polls have predicted a hung assembly in Goa. ' All the candidates checked in the resort on Tuesday evening with their luggage, indicating that the government formation may be a long haul. Given that the political stakes are very high, Congress is taking all precautions to avoid the repeat of the 2017 fiasco when it had failed to form a government in Goa despite scoring the maximum number of seats. Goa BJP president Sadanand S Tanavade earlier today slammed Congress saying that the grand old party is resorting to resort politics as it doesn't trust its candidates. "Congress doesn't trust its candidates & thus, took them to temple, mosque, and church to take an oath of not joining any other party. All their candidates have been kept at a location now, there's no trust. BJP will come with a clear majority," Tanavade said. In the 2017 Goa Assembly elections, Congress had emerged as the single largest party, winning 17 seats as against the BJP’s 13. However, the grand old party failed to swing into action and get allies to muster the simple majority figure of 21. Steered by late Manohar Parrikar, who was the defence minister then, the saffron party had outmaneuvered Congress by cobbling together a ruling coalition with parties like the MGP and the Vijai Sardesai-led Goa Forward Party (GFP) and two independent MLAs.
english
<reponame>B-ROY/TESTGIT # coding=utf-8 from app.customer.models.hotAnchor import Anchor from app_redis.user.models.hotanchor import HotAnchorRedis from app.customer.models.user import User, UserHeartBeat from app.customer.models.personal_tags import UserTags from app.audio.models.record import AudioRoomRecord from api.convert.convert_user import * import time import json class HotAnchorRedisScript: @classmethod def push_hot_anchor(cls): """ push user_id into redis key: "user_id" """ anchor_redis = HotAnchorRedis() hot_list = [] now_time = int(time.time()) pre_time = now_time - 120 heartbeats = UserHeartBeat.objects.filter(last_report_time__gte=pre_time) hots = [] anchors = Anchor.objects.all() hot_ids = [] for anchor in anchors: user = User.objects.get(id=anchor.sid) user_heart = UserHeartBeat.objects.get(user=user) if user_heart.last_report_time > pre_time and user.disturb_mode != 1: hots.append(user) hot_ids.append(user.id) for heartbeat in heartbeats: if heartbeat.user.charm_value > 2500 and heartbeat.user.disturb_mode != 1 \ and heartbeat.user.id not in hot_ids: hots.append(heartbeat.user) if not hots: hots = User.objects.all().order_by("-charm_value")[0:4] for user in hots: room = AudioRoomRecord.objects.get(id=user.audio_room_id) personal_tags = UserTags.get_usertags(user_id=room.user_id) if not personal_tags: personal_tags = [] dic = { "audioroom": convert_audioroom(room), "user": convert_user(user), "personal_tags": personal_tags, "time_stamp": int(time.time()) } hot_list.append(dic) user_id_list.append(user.id)
python
<reponame>NikitaChernykh/BestGoogleExtension2017<gh_stars>1-10 { "background": { "page": "/background/background.html" }, "name": "Internet Junkie", "description": "__MSG_ext_description__", "icons": { "48": "/assets/images/Icon_48x48.png", "128": "/assets/images/Icon_128x128.png" }, "browser_action": { "default_title": "Internet Junkie", "default_popup": "index.html" }, "default_locale": "en", "manifest_version": 2, "short_name": "Internet Junkie", "web_accessible_resources": ["/assets/images/default_icon.png"], "permissions": [ "identity", "tabs", "<all_urls>", "storage", "unlimitedStorage" ], "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", "version": "1.1.4.2" }
json
{ "@metadata": { "authors": [ "Majavah", "Stryn" ] }, "commtech-commons-speedy-header": "Tällä sivulla tai sen Wikidata-kohteessa {{PLURAL:$1|käytettyä tiedostoa|käytettyjä tiedostoita}} on pyydetty pikapoistettavaksi.", "commtech-commons-speedy-body-start": "{{PLURAL:$1|Seuraava|Seuraavat}} Wikimedia Commons -{{PLURAL:$1|tiedosto|tiedostot}} on pyydetty pikapoistettavaksi:", "commtech-commons-speedy-body-end": "Voit nähdä {{PLURAL:$1|poistosyyn tiedoston sivulla, joka on|poistosyyt tiedostojen sivuilla, jotka ovat}} linkitetty yläpuolella.", "commtech-commons-speedy-summary": "Tällä sivulla käytettyjä tiedostoja on esitetty pikapoistettavaksi", "commtech-commons-discussion-header": "Tällä sivulla {{PLURAL:$1|käytetty Commons-tiedosto|käytettyjä Commons-tiedostoja}} on esitetty poistettavaksi", "commtech-commons-discussion-body-start": "{{PLURAL:$1|Seuraava|Seuraavat}} Wikimedia Commons -{{PLURAL:$1|tiedosto|tiedostot}} on esitetty poistettavaksi:", "commtech-commons-discussion-body-end-matching": "Osallistu keskusteluun [[$1|esityksen sivulla]].", "commtech-commons-discussion-body-end-mismatching": "Osallistu {{PLURAL:$1|keskusteluun|keskusteluihin}} yllä {{PLURAL:$1|linkitetyllä sivulla|linkitetyillä sivuilla}}.", "commtech-commons-discussion-summary": "Tällä sivulla tai sen Wikidata-kohteessa käytettyjä tiedostoja on esitetty poistettavaksi", "commtech-commons-discussion-line": "[[$1]] ([[$2|keskustelu]])", "commtech-commons-nopermission-header": "Tällä sivulla {{PLURAL:$1|olevalta Commons-tiedostolta|olevilta Commons-tiedostoilta}} puuttuu käyttölupa", "commtech-commons-nopermission-body-start": "{{PLURAL:$1|Seuraavalta|Seuraavilta}} Wikimedia Commons -{{PLURAL:$1|tiedostolta|tiedostoilta}} puuttuu käyttölupa ja {{PLURAL:$1|se|ne}} voidaan poistaa:", "commtech-commons-nopermission-body-end": "Voit katsoa tarkemmat tiedot {{PLURAL:$1|tiedoston kuvaussivulla|tiedostoiden kuvaussivuilla}} yllä.", "commtech-commons-nopermission-summary": "Tällä sivulla tai sen Wikidata-kohteessa käytetyillä tiedostoilla puuttuu käyttölupa" }
json
use crate::msg; use crate::runtime::Runtime; use libfly::*; use crate::utils::*; use std::slice; pub fn op_stream_chunk(rt: &mut Runtime, base: &msg::Base, raw: fly_buf) -> Box<Op> { debug!("handle stream chunk {:?}", raw); let msg = base.msg_as_stream_chunk().unwrap(); let stream_id = msg.id(); let mut streams = rt.streams.lock().unwrap(); if raw.data_len > 0 { match streams.get_mut(&stream_id) { Some(sender) => { let bytes = unsafe { slice::from_raw_parts(raw.data_ptr, raw.data_len) }.to_vec(); match sender.unbounded_send(bytes.to_vec()) { Err(e) => error!("error sending chunk: {}", e), _ => debug!("chunk streamed"), } } None => unimplemented!(), }; } if msg.done() { streams.remove(&stream_id); } ok_future(None) }
rust
Don’t Miss Out on the Latest Updates. Subscribe to Our Newsletter Today! Mumbai: The Weekend Ka Vaar episode of Bigg Boss 15 began with a huge drama in the house. The contestants were asked to tag Karan Kundrra, Shamita Shetty and Jay Bhanushali as ‘100% Original’, ’50:50′ and ‘100% Fake’. While six out of ten housemates tagged Karan Kundrra as 100 original, Jay Bhanushali was called the ‘100% Fake’ contestant in the Bigg Boss 15 house. For the unversed, Jay Bhanushali was determined to win the full prize money and for the same, he was not allowing any contestants to win the task. “The amount is a big amount for me. This past year has made me value money and it is against my principle to see money getting deducted from the winner’s prize money whoever the winner might be. I can even give up Tara’s dress if I was asked to. But I can’t let money go,” Jay had said during the task. Meanwhile, Shamita Shetty, Vishal Kotian, Karan Kundrra, Ieshaan Sehgaal, Miesha Iyer, and Simba Nagpal are nominated for eviction this week. It will be interesting to see who gets eliminated from the show. Follow this space for more updates related to Bigg Boss 15. For breaking news and live news updates, like us on Facebook or follow us on Twitter and Instagram. Read more on Latest Entertainment News on India. com.
english
body { background-color: black; font-family:arial; color:white } h1 { color:grey; font-family:verdana; } .maindiv{ background-color: white; color:black; width:500px; padding-left:20px; border-radius:25px; align-self: center; } .col-25 { float: left; width: 25%; margin-top: 6px; padding-left: 90px; } .col-50 { display: none; float: left; margin-top: 6px; padding-left: 90px; }
css
<reponame>YuePengUSTC/AADR # The MIT License (MIT) # Original work Copyright (c) 2016 comp-imaging # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # BSD 3-Clause License # Modified work Copyright (c) 2020, <NAME> # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # * Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE. import numpy as np from proximal.lin_ops import CompGraph, scale, vstack from proximal.utils.timings_log import TimingsLog, TimingsEntry import time from .invert import get_least_squares_inverse, get_diag_quads class Anderson: def __init__(self, x0, e_dim, num): self.mk = num self.dim = len(x0) self.e_dim= e_dim self.current_u_ = x0.copy() self.current_F_ = np.zeros(self.e_dim) self.prev_dG_ = np.zeros((num, self.dim)) self.prev_dF_ = np.zeros((num, self.e_dim)) self.M_ = np.zeros((num, num)) # num*num array self.theta_ = np.zeros(num) self.dF_scale_ = np.zeros(num) self.dG_scale_ = np.zeros(num) self.iter_ = 0 self.col_idx_ = 0 def compute(self, g): G = g.copy() self.current_F_ = G[:self.e_dim] - self.current_u_[:self.e_dim] if self.iter_ == 0: self.prev_dF_[0, :] = -self.current_F_ self.prev_dG_[0, :] = - G self.current_u_ = G.copy() else: self.prev_dF_[self.col_idx_, :] += self.current_F_.copy() self.prev_dG_[self.col_idx_, :] += G eps = 1e-14 norm = np.linalg.norm(self.prev_dF_[self.col_idx_, :]) scale = np.maximum(eps, norm) self.dF_scale_[self.col_idx_] = scale self.prev_dF_[self.col_idx_, :] /= scale m_k = np.minimum(self.mk, self.iter_) if m_k == 1: self.theta_[0] = 0 dF_norm = np.linalg.norm(self.prev_dF_[self.col_idx_, :]) self.M_[0, 0] = dF_norm * dF_norm if dF_norm > eps: self.theta_[0] = np.dot(self.prev_dF_[self.col_idx_, :] / dF_norm, self.current_F_[:] / dF_norm) else: new_inner_prod = np.dot(self.prev_dF_[self.col_idx_, :], np.transpose(self.prev_dF_[0:m_k, :])) self.M_[self.col_idx_, 0:m_k] = np.transpose(new_inner_prod) self.M_[0:m_k, self.col_idx_] = new_inner_prod b = np.dot(self.prev_dF_[0:m_k, :], self.current_F_) self.theta_[0:m_k] = np.linalg.lstsq(self.M_[0:m_k, 0:m_k], b, rcond=None)[0] v = self.theta_[0:m_k] / self.dF_scale_[0:m_k] self.current_u_ = G - np.dot(v, self.prev_dG_[0:m_k, :]) self.col_idx_ = (self.col_idx_ + 1) % self.mk self.prev_dF_[self.col_idx_, :] = -self.current_F_ self.prev_dG_[self.col_idx_, :] = -G self.iter_ += 1 return self.current_u_.copy() def replace(self, x): self.current_u_ = x.copy() def reset(self, x): self.current_u_ = x.copy() self.iter_ = 0 self.col_idx_ = 0 def partition(prox_fns, try_diagonalize=True): """Divide the proxable functions into sets Psi and Omega. """ # Merge these quadratic functions with the v update. quad_funcs = [] # All lin ops must be gram diagonal for the least squares problem # to be diagonal. func_opts = {True: [], False: []} for freq in [True, False]: if all([fn.lin_op.is_gram_diag(freq) for fn in prox_fns]): func_opts[freq] = get_diag_quads(prox_fns, freq) # Quad funcs is the max cardinality set. if len(func_opts[True]) >= len(func_opts[False]): quad_funcs = func_opts[True] else: quad_funcs = func_opts[False] psi_fns = [fn for fn in prox_fns if fn not in quad_funcs] return psi_fns, quad_funcs def solve(psi_fns, omega_fns, rho=1.0, max_iters=1000, eps_abs=1e-10, eps_rel=1e-3, x0=None, lin_solver="cg", lin_solver_options=None, try_diagonalize=True, try_fast_norm=False, scaled=True, metric=None, convlog=None, verbose=0): # C=np.array([[1,0],[0,0]]); # b=np.array([2,0]); # print(np.linalg.lstsq(C,b,rcond=None)[0]) prox_fns = psi_fns + omega_fns stacked_ops = vstack([fn.lin_op for fn in psi_fns]) K = CompGraph(stacked_ops) # Rescale so (rho/2)||x - b||^2_2 rescaling = np.sqrt(2. / rho) quad_ops = [] const_terms = [] for fn in omega_fns: fn = fn.absorb_params() quad_ops.append(scale(rescaling * fn.beta, fn.lin_op)) const_terms.append(fn.b.flatten() * rescaling) # Check for fast inverse. op_list = [func.lin_op for func in psi_fns] + quad_ops stacked_ops = vstack(op_list) # Get optimize inverse (tries spatial and frequency diagonalization) v_update = get_least_squares_inverse(op_list, None, try_diagonalize, verbose) # Initialize everything to zero. input_size = K.input_size output_size = K.output_size v = np.zeros(input_size) z = np.zeros(output_size) u = np.zeros(output_size) print(output_size) # Initialize if x0 is not None: v[:] = np.reshape(x0, input_size) K.forward(v, z) # Buffers. v0 = v.copy() z0 = z.copy() u0 = u.copy() N_z = len(z[:]) Kv = np.zeros(output_size) KTu = np.zeros(input_size) s = np.zeros(input_size) Kv_pre = Kv.copy() # Log for prox ops. prox_log = TimingsLog(prox_fns) # Time iterations. iter_timing = TimingsEntry("ADMM iteration") # Convergence log for initial iterate if convlog is not None: K.update_vars(v) objval = sum([func.value for func in prox_fns]) convlog.record_objective(objval) convlog.record_timing(0.0) # -------------------------------------------------------------------------------------------------- print("Anderson Acceleration:") for andersonmk in range(6,7): v = v0.copy() u = u0.copy() v_d = v.copy() u_d = u.copy() res_pre = 9e20 total_energy = [] total_time = [] Combine_res = [] reset = False sca_z = 1 size = v.flatten().shape[0] total_size=(u.flatten()).shape[0]+size print(size) sign = 0 curr_time = 0 AA_compute_time = 0 acc1 = Anderson(np.concatenate((v.flatten(), sca_z * u.flatten()), axis=0),total_size, andersonmk) for i in range(max_iters): t1 = time.time() if convlog is not None: convlog.tic() K.forward(v, Kv) # Update z. Kv_pre = Kv.copy() K.forward(v, Kv) Kv_u = Kv + u offset = 0 for fn in psi_fns: tmp = np.hstack([z - u] + const_terms) v = v_update.solve(tmp, x_init=v, lin_solver=lin_solver, options=lin_solver_options) K.forward(v, Kv) Kv_u = Kv + u slc = slice(offset, offset + fn.lin_op.size, None) Kv_u_slc = np.reshape(Kv_u[slc], fn.lin_op.shape) # Apply and time prox. z_pre = z.copy() prox_log[fn].tic() z[slc] = fn.prox(rho, Kv_u_slc, i).flatten() prox_log[fn].toc() offset += fn.lin_op.size # Update u. r = Kv - z u += r K.adjoint(u, KTu) # print(np.linalg.norm(u)) # Check convergence. # K.adjoint(rho * (z - z_prev), s) s = z - z_pre res = np.linalg.norm(r) ** 2 + np.linalg.norm(s) ** 2 # K.adjoint((z-z_prev),s) # eps_pri = np.sqrt(output_size) * eps_abs + eps_rel * \ # max([np.linalg.norm(Kv), np.linalg.norm(z)]) # eps_dual = np.sqrt(input_size) * eps_abs + eps_rel * np.linalg.norm(KTu) / rho t3=time.time() if res < res_pre or reset == True: v_d = v.copy() u_d = u.copy() res_pre = res reset = False tt = acc1.compute(np.concatenate((v.flatten(), sca_z * u.flatten()), axis=0)) v = tt[0:size].reshape(v.shape) u = tt[size:].reshape(u.shape) / sca_z else: sign = sign + 1 v = v_d.copy() u = u_d.copy() reset = True acc1.reset(np.concatenate((v.flatten(), sca_z * u.flatten()), axis=0)) t4=time.time() AA_compute_time += t4-t3 t2 = time.time() curr_time += t2 - t1 # Convergence log if convlog is not None: convlog.toc() K.update_vars(v) objval = sum([fn.value for fn in prox_fns]) convlog.record_objective(objval) # Show progess if verbose > 0: # Evaluate objective only if required (expensive !) objstr = '' if verbose == 2: K.update_vars(v) objstr = ", obj_val = %02.03e" % sum([fn.value for fn in prox_fns]) # Evaluate metric potentially metstr = '' if metric is None else ", {}".format(metric.message(v)) # print("iter %d: ||r||_2 = %.3f, eps_pri = %.3f, ||s||_2 = %.3f, eps_dual = %.3f%s%s" % ( # i, np.linalg.norm(r), eps_pri, np.linalg.norm(s), eps_dual, objstr, metstr)) print("iter %d: combine residual = %.8f" % ( i, res)) Combine_res.append(np.sqrt(rho*res_pre/N_z)) total_time.append(curr_time) # Exit if converged. if (res) < eps_abs: break print("current time: %.6f, AA compute: %.6f, sign: %d"%(curr_time, AA_compute_time, sign)) hm_src_path = 'residual-'+str(andersonmk)+'.txt' iter_num = [] iter_num.append(len(total_time)) iter_num.append(len(Combine_res)) with open(hm_src_path, 'w') as f: for i in range(0, min(iter_num)): f.write('%f\t%.20f\n' % (total_time[i], Combine_res[i])) f.close() print("Anderson Acceleration with Douglas-Rachford splitting:") for andersonmk in range(6, 7): v = v0.copy() u = u0.copy() K.forward(v, Kv) v_d = v.copy() u_d = u.copy() d_s = z0.copy() d_u = d_s.copy() d_s_d = d_s.copy() d_v = d_s.copy() d_unew= d_u.copy() res_pre = 9e20 r_com = 0 r_com_pre = r_com total_energy = [] total_time = [] Combine_res = [] reset = False size = v.flatten().shape[0] sign = 0 curr_time = 0 acc1 = Anderson(d_s.flatten(), size, andersonmk) for i in range(max_iters): t1 = time.time() if convlog is not None: convlog.tic() # K.forward(v, Kv) # Update v. Kv_u = d_s.copy() offset = 0 for fn in psi_fns: slc = slice(offset, offset + fn.lin_op.size, None) Kv_u_slc = np.reshape(Kv_u[slc], fn.lin_op.shape) # Apply and time prox. prox_log[fn].tic() z[slc] = fn.prox(rho, Kv_u_slc, i).flatten() prox_log[fn].toc() offset += fn.lin_op.size d_u=z.copy() temp = 2*d_u-d_s tmp = np.hstack([temp] + const_terms) v = v_update.solve(tmp, x_init=v, lin_solver=lin_solver, options=lin_solver_options) K.forward(v,d_v) # z_prev = z.copy() # Update z. # Update d_s r = d_v - d_u d_s += r res = np.linalg.norm(r) ** 2 t2 = time.time() curr_time += t2 - t1 # print(np.linalg.norm(u)) Kv_u = d_s.copy() offset = 0 for fn in psi_fns: slc = slice(offset, offset + fn.lin_op.size, None) Kv_u_slc = np.reshape(Kv_u[slc], fn.lin_op.shape) # Apply and time prox. prox_log[fn].tic() z[slc] = fn.prox(rho, Kv_u_slc, i).flatten() prox_log[fn].toc() offset += fn.lin_op.size d_unew=z.copy() # Check convergence. # K.adjoint(rho * (z - z_prev), r_com= np.linalg.norm(d_unew-d_v)**2 + np.linalg.norm(d_unew-d_u)**2 # K.adjoint((z-z_prev),s) # eps_pri = np.sqrt(output_size) * eps_abs + eps_rel * \ # max([np.linalg.norm(Kv), np.linalg.norm(z)]) # eps_dual = np.sqrt(input_size) * eps_abs + eps_rel * np.linalg.norm(KTu) / rho # Convergence log if convlog is not None: convlog.toc() K.update_vars(v) objval = sum([fn.value for fn in prox_fns]) convlog.record_objective(objval) t1 = time.time() if res < res_pre or reset == True: d_s_d = d_s.copy() res_pre = res r_com_pre = r_com reset = False tt = acc1.compute(d_s.flatten()) d_s = tt.reshape(d_s.shape) else: sign = sign + 1 d_s = d_s_d.copy() reset = True acc1.reset(d_s.flatten()) # Show progess if verbose > 0: # Evaluate objective only if required (expensive !) objstr = '' if verbose == 2: K.update_vars(v) objstr = ", obj_val = %02.03e" % sum([fn.value for fn in prox_fns]) # Evaluate metric potentially metstr = '' if metric is None else ", {}".format(metric.message(v)) # print("iter %d: ||r||_2 = %.3f, eps_pri = %.3f, ||s||_2 = %.3f, eps_dual = %.3f%s%s" % ( # i, np.linalg.norm(r), eps_pri, np.linalg.norm(s), eps_dual, objstr, metstr)) print("iter %d: combine residual = %.8f" % ( i, r_com)) t2 = time.time() curr_time += t2 - t1 Combine_res.append(np.sqrt(rho*r_com_pre/N_z)) total_time.append(curr_time) # Exit if converged. # if (res) < eps_abs: # break hm_src_path = 'dr-' + str(andersonmk) + '.txt' iter_num = [] iter_num.append(len(total_time)) iter_num.append(len(Combine_res)) with open(hm_src_path, 'w') as f: for i in range(0, min(iter_num)): f.write('%f\t%.20f\n' % (total_time[i], Combine_res[i])) f.close() # Print out timings info. if verbose > 0: print(iter_timing) print("prox funcs:") print(prox_log) print("K forward ops:") print(K.forward_log) print("K adjoint ops:") print(K.adjoint_log) # Assign values to variables. K.update_vars(v) # Return optimal value. # return sum([fn.value for fn in prox_fns]) return total_time, Combine_res
python
<filename>public/styles/menu.css /* Container do menu */ nav { display: flex; flex-direction: column; color: white; background-color: #a3130d; position: fixed; top: 0; left: -210px; width: 210px; height: 100vh; border-right: 42px solid #680d0a; -webkit-transition: all .3s cubic-bezier(.24, 1.04, .63, .94); -moz-transition: all .3s cubic-bezier(.24, 1.04, .63, .94); -ms-transition: all .3s cubic-bezier(.24, 1.04, .63, .94); -o-transition: all .3s cubic-bezier(.24, 1.04, .63, .94); transition: all .3s cubic-bezier(.24, 1.04, .63, .94); } nav:hover { left: 0px; } nav ul { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; } nav.fixo { left: 0px; } /* Icones menu */ nav img#menuIconeSeta { position: absolute; top: 50%; right: -37px; transform: translateY(-16px) rotateY(180deg); } nav:hover img#menuIconeSeta { transform: translateY(-16px) rotateY(0deg); } nav img#menuIconeFixar { position: absolute; top: 2%; right: -40px; border-radius: 12px; padding: 3px; cursor: pointer; } nav img#menuIconeFixar:hover { background-color: rgba(100,100,100,.3); } nav img#menuIconeFixar.selecionado { background-color: rgba(255,255,255,.3); } nav img#menuIconeHamburguer { display: none; } /* Imagem do Aluno */ div#resumoAluno { background-color: #a52a25; padding: 15px; text-align: center; } div#resumoAluno h4 { margin-top: 10px; margin-bottom: 20px; } div#resumoAlunoImgAlunoContainer { display: inline-block; border-radius: 85px; width: 150px; height: 150px; overflow: hidden; text-align: center; background-color: white; margin-bottom: 20px; } div#resumoAlunoImgAlunoContainer img { width: 120px; height: 160px; } div#resumoAluno table { width: 100%; } /* Menu de opções */ ul#menu { height: 100%; margin: 0; min-width: 100px; /* Permite dar scroll */ overflow-x: hidden; overflow-y: auto; /* Desaparece a barra de scroll */ -ms-overflow-style: none; scrollbar-width: none; } ul#menu::-webkit-scrollbar { /* Desaparece a barra de scroll */ display: none; /* Chrome */ } ul#menu:hover { /* Mostra a barra de scroll */ -ms-overflow-style: auto; scrollbar-width: thin; } ul#menu:hover::-webkit-scrollbar { /* Mostra a barra de scroll */ display: block; } nav ul { list-style: none; padding: 0; } nav li { background-color: #a3130d; padding: 10px 15px; -webkit-transition: background-color .2s ease; -moz-transition: background-color .2s ease; -ms-transition: background-color .2s ease; -o-transition: background-color .2s ease; transition: background-color .2s ease; } nav li:hover { color: white; background-color: #680d0a; } nav li:active { background-color: #c74d48; } /* Botão Sair */ nav ul#sair { /* border-top: 10px solid #680d0a; */ margin: 0; } /* Responsivo */ @media (max-width: 500px) { nav { height: 44px; box-shadow: 0 0 10px black; -webkit-transition: left .2s ease; -moz-transition: left .2s ease; -ms-transition: left .2s ease; -o-transition: left .2s ease; transition: left .2s ease; } nav:hover { width: 70vw; height: 100vh; border-right-width: 5px; box-shadow: none; } nav img#menuIconeFixar { display: none; } nav img#menuIconeSeta { position: absolute; top: 18px; right: -40px; border-radius: 12px; padding: 3px; cursor: pointer; } nav:hover img#menuIconeSeta { display: none; } nav.fixo { left: -210px; } nav.fixo:hover { left: 0; } }
css
<gh_stars>0 /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ .home-page header, .home-page footer { visibility: visible; } .home-page main { visibility: visible; display: grid; grid-template-areas: "featured" "news-box" "articles" "inspiration"; } .home-page main .default { padding: 0; display: none; } .home-page main .articles { display: block; grid-area: articles; display: block; background: white; padding-bottom: 80px; } .home-page .featured.card { width: 100%; max-width: unset; border: none; grid-area: featured; margin: 0; display: flex; flex-direction: column; } .home-page .featured.card .hero { height: 320px; border-radius: 0; } .home-page .featured.card .hero img { border-radius: 0; } .home-page .featured.card h2 { font-size: 1.75rem; line-height: 2.2rem; margin-bottom: 1rem; max-height: 6.6rem; } .home-page .featured.card .content { background-color: unset; text-align: center; width: 100%; padding-bottom: 0; border-radius: 0; } .home-page .featured.card .teaser { margin-bottom: 1.5rem; color: #2c2c2c; font-weight: normal; font-size: 1.125rem; line-height: 1.5; height: 3.375rem; overflow: hidden; text-overflow: ellipsis; display: block; -webkit-line-clamp: unset; -webkit-box-orient: unset; } .home-page .featured.card .date { display: block; } .home-page .featured-placeholder { grid-area: featured; height: 550px; } .home-page main .news-box { display: block; grid-area: news-box; display: block; min-height: 326px; margin-top: 48px; min-height: 326px; background-color: #f4f4f4; animation: appear 400ms; } .home-page .news-box .deck { max-width: unset; } .home-page main .news-box > .content { margin: 0 auto; padding: 48px 32px 0 32px; border-bottom-left-radius: 0; border-top-right-radius: 4px; } .home-page main .news-box > .content h3 { font-size: 1.5rem; margin-top: 0; } .home-page main .news-box > .content p { font-size: 1rem; line-height: 1.5; margin-top: 0; margin-bottom: 0; } .home-page main .news-box p.button { margin-top: 8px; } .home-page main .news-box > .deck { padding-top: 32px; padding-bottom: 24px; } .home-page .news-box .card { margin:0 0 24px 0; width: 100%; max-width: unset; display: flex; flex-flow: row nowrap; } .home-page .news-box .card .hero { padding-bottom: 0; height: 130px; width: 30%; border-top-right-radius: 0; border-bottom-left-radius: 4px; } .home-page .news-box .card .hero img { border-top-right-radius: 0; border-bottom-left-radius: 4px; } .home-page .news-box .card .content { padding: 24px; height: 130px; width: 70%; box-sizing: border-box; display: flex; flex-flow: column nowrap; justify-content: center; } .home-page .news-box .card .content h2 { font-size: 1rem; line-height: 1.25rem; min-height: 1.25rem; max-height: 3.75rem; margin-bottom: 0; } .home-page .news-box .card p.topic { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; } .home-page .news-box .card p.teaser, .home-page .news-box .card p.date { display: none; } @media (min-width:600px) { .home-page .featured.card { height: unset; max-width: unset; flex-direction: row; align-items: center; margin: 40px 0 0 0; text-align: left; } .home-page .featured.card h2 { font-size: 2.25rem; line-height: 2.8rem; max-height: 8.4rem; } .home-page .featured.card .hero { width: 40%; padding-bottom: 0; } .home-page .featured.card .content { width: 60%; height: max-content; text-align: left; box-sizing: border-box; padding-top: 0; margin: auto 0; } .home-page .featured.card .teaser { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .home-page .featured.card p.date { bottom: unset; } .home-page .featured-placeholder { height: 320px; margin-top: 40px; } .home-page main .news-box > .content, .home-page main .news-box > .deck { width: calc(100% - 64px); min-width: 568px; max-width: 790px; } .home-page main .news-box > .content, .home-page main .news-box > .deck { padding-left: 0; padding-right: 0; } .home-page main .news-box .card { width: 100%; } } @media (min-width:1200px) { .home-page .featured.card { margin: 40px auto 0 auto; border-radius: 0; width: calc(100% - 64px); max-width: 1200px; } .home-page .featured.card .hero { width: 60%; } .home-page .featured.card .content { width: 40%; } .home-page main .news-box p.button { position: absolute; margin-top: 0; top: 80px; right: 32px; } .home-page main .news-box > .content, .home-page main .news-box > .deck { max-width: 1200px; } .home-page main .news-box > .content { position: relative; } .home-page main .news-box > .content > p:first-of-type { width: 80%; } .home-page main .news-box .card { width: calc(100%/3 - 22px); margin-right: 32px; } .home-page main .news-box .card:nth-of-type(2n) { margin-right: 32px; } .home-page main .news-box .card:nth-of-type(3n) { margin-right: 0; } }
css
{"appid": 253250, "name": "Stonehearth", "windows": true, "mac": false, "linux": false, "early_access": true, "lookup_time": 1490972892}
json
The new guidelines provide protocols to be complied with international travellers as well those to be followed by airlines, points of entry (airports, seaports and land border) for risk profiling of passengers. Fully vaccinated travellers, who are coming from a country with which India has reciprocal arrangements for mutual acceptance of World Health Organization (WHO) approved Covid-19 vaccines, shall be allowed to leave the airport and need not undergo home quarantine and testing from Monday, according to the revised guidelines for international arrivals released on Wednesday. They will, however, have to produce a negative Covid-19 RT-PCR report. These guidelines for international arrivals supersede all others issued on and after February 17 this year, the Union health ministry has said. “The global trajectory of Covid-19 pandemic continues to decline with certain regional variations. The need to monitor the continuously changing nature of virus and the evolution of SARS-CoV-2 variants of concern (VOCs) must still remain in focus,” the ministry said. “The existing guidelines (issued on 17th February 2021 with subsequent addendums) for international arrivals in India have been formulated taking a risk-based approach. In view of increasing vaccination coverage across the globe and the changing nature of the pandemic, the existing guidelines for international arrivals in India have been reviewed,” it added. Check latest SOPs here: 1. If partially or not vaccinated, the travellers need to undertake measures which include submission of sample for post-arrival Covid-19 test at the point of arrival after which they will be allowed to leave the airport, home quarantine for seven days, re-test on the eighth day of arrival in India and if negative, further self monitor their health for the next seven days. 2. The new guidelines provide protocols to be complied with international travellers as well those to be followed by airlines, points of entry (airports, seaports and land border) for risk profiling of passengers. 3. This Standard Operating Procedure (SOP) shall be valid from Monday till further orders. Based on the risk assessment, this document shall be reviewed from time to time, the ministry said. 4. According to the guidelines, while planning for travel, all travellers should submit a self-declaration form on the online Air Suvidha portal before the scheduled travel and upload a negative Covid-19 RT-PCR report. This test should have been conducted within 72 hours prior to undertaking the journey. 5. All passengers shall also submit a declaration with respect to the authenticity of the report and will be liable for criminal prosecution if found otherwise. 6. “Travellers from countries excluding those countries at risk will be allowed to leave the airport and shall self-monitor their health for 14 days’ post-arrival. This is applicable to travellers from all countries including countries with which reciprocal arrangements for mutual acceptance of WHO approved Covid-19 vaccines also exist,” the guidelines stated. 7. If the travellers who are under home quarantine or self-health monitoring develop signs and symptoms suggestive of Covid-19 or test positive for Covid-19 on re-testing, they will immediately self-isolate and report to their nearest health facility or call the national helpline number (1075) or state helpline number.
english
Two years into the COVID-19 pandemic, the United States is still breaking records in hospital overcrowding and new cases. The U.S. is logging nearly 800,000 cases a day, hospitals are starting to fray, and deaths in the U.S. have topped 850,000. Schools oscillate from remote to in-person learning, polarizing communities. The vaccines are lifesaving for many, yet frustration mounts as the number of unvaccinated people in this country stays relatively stagnant (63% in the U.S. are fully vaccinated) and other parts of the world have seen hardly a single dose. Africa has the slowest vaccination rate among continents, with only 14% of the population receiving one shot, according to the New York Times tracker. Yet there is good reason for optimism among leading U.S. experts because of how far science and medicine have come since the World Health Organization first acknowledged person-to-person transmission of the virus in January 2020. Effective vaccines and treatments that can keep people out of the hospital were developed at an astounding pace, and advances in tracking and testing -- in both access and effectiveness -- are starting to pay off. Some experts say it’s possible that the raging Omicron surge will slow by late spring, providing some relief and maybe shifting the pandemic to a slower-burning endemic. But other experts caution to keep our guard up, saying it's time to settle into a "new normal" and upend the strategy for fighting COVID-19. Three former members of the Biden-Harris Transition COVID-19 Advisory Board wrote recently in the journal JAMA that COVID-19 has now become one of the many viral respiratory diseases that health care providers and patients will manage each year. The group of experts from the University of Pennsylvania, University of Minnesota, and New York University write that "many of the measures to reduce transmission of SARS-CoV-2 (eg, ventilation) will also reduce transmission of other respiratory viruses. Thus, policy makers should retire previous public health categorizations, including deaths from pneumonia and influenza or pneumonia, influenza, and COVID-19, and focus on a new category: the aggregate risk of all respiratory virus infections." Other experts, including Amesh Adalja, MD, a senior scholar at the Johns Hopkins Center for Health Security in Baltimore, have said it's been clear since the early days of SARS-CoV-2 that we must learn to live with the virus because it "will be ever present for the remaining history of our species." But that doesn't mean the virus will always have the upper hand. Although the U.S. has been reaching record numbers of hospitalizations in January, these hospitalizations differ from those of last year -- marked by fewer extreme life-saving measures, fewer deaths, and shorter hospital stays -- due in part to medical and therapeutic advances and in part to the nature of the Omicron variant itself. One sign of progress, Adalja says, will be the widespread decoupling of cases from hospitalizations, something that has already happened in countries such as the United Kingdom. "That's a reflection of how well they have vaccinated their high-risk population and how poorly we have vaccinated our high-risk population," he says. Adalja says though the numbers of unvaccinated in the U.S. appear to be stuck, Omicron's sweep will make the difference, leaving behind more natural immunity in the population. Currently, hospitals are struggling with staffing concerns as a "direct result" of too many unvaccinated people, he says. Andrew Badley, MD, an infectious diseases specialist at Mayo Clinic in Rochester, MN, and director of the clinic's COVID-19 Task Force, says the good news with Omicron is that nearly all people it infects will recover. Over time, when the body sees foreign antigens repeatedly, the quantity and quality of the antibodies the immune system produces increase and the body becomes better at fighting disease. So "a large amount of the population will have recovered and have a degree of immunity," Badley says. His optimism is tempered by his belief that "it's going to get worse before it gets better." But Badley still predicts a turnaround. "We'll see a downturn in COVID in late spring or early summer,” and well into the second quarter of 2022, "we'll see a reemergence of control." Right now, with Omicron, one infected person is infecting three to five others, he says. The hope is that it will eventually reach one-to-one endemic levels. As for the threat of new variants, Badley says, "It's not predictable whether they will be stronger or weaker." Many experts predict that masks will continue to be part of the national wardrobe for the foreseeable future. "We will continue to see new cases for years and years to come. Some will respond to that with masks in public places for a very long time. I personally will do so," Badley says. Emily Landon, MD, an infectious disease doctor and the executive medical director of infection prevention and control at University of Chicago Medicine, told Medscape Medical News she views the pandemic from two different vantage points. As a health care provider, she sees her hospital, like others worldwide, overwhelmed. Supplies of a major weapon to help prevent hospitalization, the monoclonal antibody sotrovimab, are running out. Landon says she has been calling other hospitals to see if they have supplies and, if so, whether Omicron patients can transfer there. Bottom line: The things they relied on a month ago to keep people out of the hospital are no longer there, she says. Meanwhile, "We have more COVID patients than we have ever had," Landon says. Last year, UChicago hit a high of 170 people hospitalized with COVID. This year, so far, the peak was 270. Landon says she is frustrated when she leaves that overburdened world inside the hospital for the outside world, where people wear no masks or ineffective face coverings and gather unsafely. Although some of that behavior reflects an intention to flout the advice of medical experts, some is due in part, she says, to the lack of a clear national health strategy and garbled communication from those in charge of public safety. Americans are deciding for themselves, on an a la carte basis, whether to wear a mask or get tested or travel, and school districts decide individually when it's time to go virtual. "People are exhausted from having to do a risk-benefit analysis for every single activity they, their friends, their kids want to participate in," she says. Despite our self-image as the global leader in science and medicine, the United States stumbled badly in its response to the pandemic, with grave consequences both at home and abroad, experts say. In a recent commentary in JAMA, Lawrence Gostin, JD, from Georgetown University in Washington, DC, and Jennifer Nuzzo, DrPH, at Johns Hopkins Bloomberg School of Public Health, point to several critical shortfalls in the nation's efforts to control the disease. One such shortfall is public trust. WebMD reported last summer that a poll of its readers found that 44% said their trust in the CDC had waned during the pandemic, and 33% said their trust in the FDA had eroded as well. Health care providers who responded to the WebMD poll lost trust as well. About half of the doctors and nurses who responded said they disagreed with the FDA's decision-making during the pandemic. Nearly 60% of doctors and 65% of nurses said they disagreed with the CDC's overall pandemic guidance. Lack of trust can make people resist vaccines and efforts to fight the virus, the authors write. "This will become really relevant when we have ample supply of Pfizer's antiviral medication," Gostin, who directs the O'Neill Institute for National and Global Health Law at Georgetown, told Medscape Medical News. "The next phase of the pandemic is not to link testing to contact tracing, because we're way past that, but to link testing to treatment." Lack of regional manufacturing of products is also thwarting global progress. "It is extraordinarily important that our pharmaceutical industry transfer technology in a pandemic," Gostin says. "The most glaring failure to do that is the mRNA vaccines. We've got this enormously effective vaccine and the two manufacturers -- Pfizer and Moderna -- are refusing to share the technology with producers in other countries. That keeps coming back to haunt us." Another problem: When the vaccines are shared with other countries, they are being delivered close to the date they expire or arriving at a shipyards without warning, so even some of the doses that get delivered are going to waste, Gostin says. "It's one of the greatest moral failures of my lifetime," he says. Also a failure is the "jaw-dropping" state of testing 2 years into the pandemic, he says, as people continue to pay high prices for tests or endure long lines. The U.S. government last week updated its calculations and ordered 1 billion tests for the general public. The COVIDtests.gov website to order the free tests is now live. It's a step in the right direction. Gostin and Nuzzo write that there is every reason to expect future epidemics that are as serious or more serious than COVID. "Failure to address clearly observed weaknesses in the COVID-19 response will have preventable adverse health, social, and economic consequences when the next novel outbreak occurs," they write.
english
The National Education Policy (NEP) 2020 highlights that in all stages, experiential learning will be adopted, (The writer is Founder & Principal, Miles Bronson Residential School, Borjhar, Guwahati. He can be reached at principal@mbrs. edu. in) The National Education Policy (NEP) 2020 highlights that in all stages, experiential learning will be adopted, including hands-on learning, arts-integrated and sports-integrated education, story-telling-based pedagogy, among others, as standard pedagogy within each subject, and with explorations of relations among different subjects. Today experiential learning has become an essential method in all innovative pedagogical practices as it holistically strives to shift the child from rote learning and memorization to learning by doing through experience and activity. This gains utmost importance in the context of the demands of now and the future in the wake of sweeping changes due to technological revolution. The world has changed rapidly; robotics, artificial intelligence, data science, internet of things, zenomics, mobile computing, crowd sourcing, autonomous vehicles, virtual reality to name a few are impacting very fast on every aspects of life. Richard Riley has said that "We need to prepare students for jobs that don't yet exist, to use technologies that haven't been invented in order to solve problems we don't know our problems yet. " In order to live up to these changes education needs to focus more on learning which is experimental, expeditional and experiential than being just limited to the traditional methods of knowledge gathering and knowledge transmission. In order to meet the demands of the world that has changed education from the foundational years should provide knowledge, understanding and skills to develop qualities of creativity, critical thinking, communication, leadership, decision making, self-regulation and problem solving skills among the children. In this context the emphasis of the NEP to move towards an experiential methodology of learning in schools is a positive step in this direction. Defining experiential learning: Experiential learning focuses on practical application of knowledge and skills to real-world experiences to further increase learner's knowledge and develop competence in skills and behaviours. It is effectively used in schools, higher education, therapy, corporate training and other areas for educational learning, personal development and skills building. According to the Association for Experiential Education, experiential learning can be summed up in the phrase "challenge and experience followed by reflection and application leading to learning and growth". UNESCO defines, 'experiential learning is a process that develops knowledge, skills and attitudes based on consciously thinking about an experience. Thus, it involves direct and active personal experience combined with reflection and feedback'. The term experiential learning reflects participation of individuals out of their own experiences and sharing. It is the process of learning through experience and more specifically defined as 'learning through reflection on doing'. Its objective is to achieve better skills, better knowledge and wider perception by a learner. It is a methodology of teaching-learning which has evolved from the ancient times. Aristotle wrote that "for the things we have to learn before we can do them, we learn by doing them". Education reformer John Dewey who is also regarded as the modern father of experiential education is often seen as the proponent of learning by doing rather than learning by passively receiving. He suggested that one's present experiences are a direct result of how their previous experiences interrupt and influence the present situations. Psychologist Kurt Lewin developed the cornerstone models for understanding organizational change in which he depicts three stages in the process of change: unfreeze – change – refreeze. Clinical psychologist Jean Piaget known for his pioneering work in child development believed that the principal goal of education in schools should be creating men and women who are capable of doing new things, not simply repeating what other generations have done but people who are creative, inventive and discoverers, who can be critical and verify, and not accept, everything they are offered. He also quoted that 'Intelligence is what you use when you don't know what to do'. He proposed the concept of Cognitive Development which explains how a child constructs a mental model of the world. According to him, intelligence was never a fixed trait rather this cognitive development is a process which takes place due to the biological maturity and interaction with the environment. Psychologist and Education theorist David Kolb had interest in the nature of individual and social change, experiential learning, career development and professional education. His model of experiential learning is about a Learning Style Inventory which is great interest and of implementation to pace learning as a tool. Activating mainly on Concrete Experience, followed by Reflective Observation, paving way to Abstract Conceptualization and Active Experimentation. Pedagogy through experiential learning: Experiential learning has significant teacher advantages. Educationist Peter Senge in his popular work The Fifth Discipline states that learning only has good effects when learners have the desire to absorb the knowledge. Therefore, experiential learning required the showing of directions for learners. Experiential learning entails a hands-on approach to learning that moves away from just the teacher in front of the room imparting and transferring their knowledge to students. It makes learning an experience that moves beyond the classroom and strives to bring a more involved way of learning. Experiential learning focuses on the learning process for the individual. One example commonly given of experiential learning is going to the zoo and learning through observation and interaction with the zoo environment, as opposed to reading about animals from a book. Thus, one makes discoveries and experiments with knowledge firsthand, instead of hearing or reading about others' experiences. How do we implement experiential learning? Humanistic Psychologist Carl Rogers distinguish two types of learning – cognitive (meaningless) and experiential (significant). He added that for a person to 'grow' they need an environment that provides them with genuineness (openness and self disclosure), acceptance (being seen with unconditional positive regard), and empathy (be listen to and understood). Without this, relationships and healthy personalities will not develop as they show much like a tree cannot grow without sunlight and water. The former corresponds to academic knowledge such as learning vocabulary or multiplication tables and the latter refers to applied knowledge such as learning about engines in order to repair a car. The key to the distinction is that experiential learning addresses the needs and wants of the learner. Rogers lists these qualities of experiential learning: personal involvement, self-initiated, evaluated by learner, and pervasive effects on learner. To Rogers, experiential learning is equivalent to personal change and growth. Rogers feels that all human beings have a natural propensity to learn; the role of the teacher is to facilitate such learning. This includes: (i) setting a positive climate for learning, (ii) clarifying the purposes of the learner (iii) organizing and making available learning resources (iv) balancing intellectual and emotional components of learning, and (v) sharing feelings and thoughts with learners but not dominating. The ingredients of experiential learning are in the order of explore, experience and enjoy. Explore, as the world signifies, targets the interest of the student to be kindled. Their curiosity is fully aroused and they are bound to tend to seek and explore the subject that they love and learn with pride. Experience, as the part of face to face scenario deals actively with the hands on activity and involvement in class as a means by which their attention is held and they experience learning that stage with them forever. Enjoy, the factor of joy, is activated with the learning to be fun with the period of time. The students should never feel burdened and must tend to enjoy the classroom learning with an open mind to its wonders. Experiential learning in holistic education: While encompassing scholastic and co-scholastic areas NEP 2020 points out that as a part of the thrust on experiential learning, art-integrated education will be embedded in classroom transactions not only for creating joyful classrooms, but also for imbibing the Indian ethos through integration of Indian art and culture in the teaching and learning process at every level. This art-integrated approach will strengthen the linkages between education and culture. Sports-integration is another cross-curricular pedagogical approach that utilizes physical activities, including indigenous sports, in pedagogical practices to help in developing skills such as collaboration, self-initiative, self-direction, self-discipline, teamwork, responsibility, citizenship, etc. Sports-integrated learning will be undertaken in classroom transactions to help students adopt fitness as a lifelong attitude and to achieve the related life skills along with the levels of fitness as envisaged in the Fit India Movement. The need to integrate sports in education is well recognized as it serves to foster holistic development by promoting physical and psychological well-being while also enhancing cognitive abilities. This reformative measure underscores the change from traditional 'chalk-and-talk' method to innovative 'learning by doing through reflection'. It is urged that this reform is needed for bringing about a competency based education system by developing the three aspects of knowledge, skill and abilities. To achieve such a goal much is needed to be done towards developing strategies and programmes for empowering training teachers from that a 'dispenser of knowledge' to a 'felicitator of learning'. In this context the NEP recommends major reforms in which the training of teachers and teachers' education is vital in creating a pool of schoolteachers that will shape the next generation. These recommendations are thought provoking and farsighted and are essential ingredients for creating a holistic and skill-based education for 21st century and beyond; but the 'key' lies in its effective implementation.
english
import React from 'react'; import { DropdownSelectorView, SelectorItem, } from '_client/common/ui_components/dropdown'; import {BoardClient} from '_client/game_board/remote/board_client'; export namespace BoardSelector { export interface ViewProps { onEditBoard: (id: string) => any; activeModel: SelectorItem<string>[]; setActiveModel: (data: SelectorItem<string>[]) => any; editModel: SelectorItem<string>[]; setEditModel: (data: SelectorItem<string>[]) => any; } export function View(props: ViewProps) { return ( <div> <DropdownSelectorView label="Set Active" model={props.activeModel} clickListener={(boardId, newModel) => { props.setActiveModel(newModel); BoardClient.get().then((client) => client.setActiveBoard(boardId.data) ); }} /> <div className="divider"></div> <DropdownSelectorView label="Edit Existing" model={props.editModel} clickListener={(boardId, newModel) => { props.setEditModel(newModel); props.onEditBoard(boardId.data); }} /> <div className="divider"></div> </div> ); } }
typescript
<reponame>carted/processing-text-data<gh_stars>10-100 # Copyright (c) Carted. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import setuptools NAME = "processing_text_data" VERSION = "0.1.0" REQUIRED_PACKAGES = [ "apache-beam[gcp]==2.31.0", "tensorflow==2.6.0", "tensorflow-estimator==2.6.0", "keras==2.6.0", "sentence_splitter==1.4", "seaborn==0.11.2", "pandas==1.3.2", "tensorflow_hub==0.12.0", "tensorflow_text==2.6.0", "ml_collections==0.1.0", "protobuf==3.18.0", "python-snappy==0.6.0", "google-apitools==0.5.31", ] setuptools.setup( name=NAME, version=VERSION, install_requires=REQUIRED_PACKAGES, packages=setuptools.find_packages(), include_package_data=True, )
python
<gh_stars>0 extern crate subtle; use subtle::*; #[test] #[should_panic] fn slices_equal_different_lengths() { let a: [u8; 3] = [0, 0, 0]; let b: [u8; 4] = [0, 0, 0, 0]; assert_eq!((&a).ct_eq(&b).unwrap_u8(), 1); } #[test] fn slices_equal() { let a: [u8; 8] = [1, 2, 3, 4, 5, 6, 7, 8]; let b: [u8; 8] = [1, 2, 3, 4, 4, 3, 2, 1]; let a_eq_a = (&a).ct_eq(&a); let a_eq_b = (&a).ct_eq(&b); assert_eq!(a_eq_a.unwrap_u8(), 1); assert_eq!(a_eq_b.unwrap_u8(), 0); let c: [u8; 16] = [0u8; 16]; let a_eq_c = (&a).ct_eq(&c); assert_eq!(a_eq_c.unwrap_u8(), 0); } #[test] fn conditional_assign_i32() { let mut a: i32 = 5; let b: i32 = 13; a.conditional_assign(&b, 0.into()); assert_eq!(a, 5); a.conditional_assign(&b, 1.into()); assert_eq!(a, 13); } #[test] fn conditional_assign_i64() { let mut c: i64 = 2343249123; let d: i64 = 8723884895; c.conditional_assign(&d, 0.into()); assert_eq!(c, 2343249123); c.conditional_assign(&d, 1.into()); assert_eq!(c, 8723884895); } macro_rules! generate_integer_conditional_select_tests { ($($t:ty)*) => ($( let x: $t = 0; // all 0 bits let y: $t = !0; // all 1 bits assert_eq!(<$t>::conditional_select(&x, &y, 0.into()), 0); assert_eq!(<$t>::conditional_select(&x, &y, 1.into()), y); let mut z = x; let mut w = y; <$t>::conditional_swap(&mut z, &mut w, 0.into()); assert_eq!(z, x); assert_eq!(w, y); <$t>::conditional_swap(&mut z, &mut w, 1.into()); assert_eq!(z, y); assert_eq!(w, x); z.conditional_assign(&x, 1.into()); w.conditional_assign(&y, 0.into()); assert_eq!(z, x); assert_eq!(w, x); )*) } #[test] fn integer_conditional_select() { generate_integer_conditional_select_tests!(u8 u16 u32 u64); generate_integer_conditional_select_tests!(i8 i16 i32 i64); #[cfg(feature = "i128")] generate_integer_conditional_select_tests!(i128 u128); } #[test] fn custom_conditional_select_i16() { let x: i16 = 257; let y: i16 = 514; assert_eq!(i16::conditional_select(&x, &y, 0.into()), 257); assert_eq!(i16::conditional_select(&x, &y, 1.into()), 514); } macro_rules! generate_integer_equal_tests { ($($t:ty),*) => ($( let y: $t = 0; // all 0 bits let z: $t = !0; // all 1 bits let x = z; assert_eq!(x.ct_eq(&y).unwrap_u8(), 0); assert_eq!(x.ct_eq(&z).unwrap_u8(), 1); )*) } #[test] fn integer_equal() { generate_integer_equal_tests!(u8, u16, u32, u64); generate_integer_equal_tests!(i8, i16, i32, i64); #[cfg(feature = "i128")] generate_integer_equal_tests!(i128, u128); generate_integer_equal_tests!(isize, usize); } #[test] fn choice_into_bool() { let choice_true: bool = Choice::from(1).into(); assert!(choice_true); let choice_false: bool = Choice::from(0).into(); assert!(!choice_false); } #[test] fn conditional_select_choice() { let t = Choice::from(1); let f = Choice::from(0); assert_eq!(bool::from(Choice::conditional_select(&t, &f, f)), true); assert_eq!(bool::from(Choice::conditional_select(&t, &f, t)), false); assert_eq!(bool::from(Choice::conditional_select(&f, &t, f)), false); assert_eq!(bool::from(Choice::conditional_select(&f, &t, t)), true); } #[test] fn test_ctoption() { let a = CtOption::new(10, Choice::from(1)); let b = CtOption::new(9, Choice::from(1)); let c = CtOption::new(10, Choice::from(0)); let d = CtOption::new(9, Choice::from(0)); // Test is_some / is_none assert!(bool::from(a.is_some())); assert!(bool::from(!a.is_none())); assert!(bool::from(b.is_some())); assert!(bool::from(!b.is_none())); assert!(bool::from(!c.is_some())); assert!(bool::from(c.is_none())); assert!(bool::from(!d.is_some())); assert!(bool::from(d.is_none())); // Test unwrap for Some assert_eq!(a.unwrap(), 10); assert_eq!(b.unwrap(), 9); // Test equality assert!(bool::from(a.ct_eq(&a))); assert!(bool::from(!a.ct_eq(&b))); assert!(bool::from(!a.ct_eq(&c))); assert!(bool::from(!a.ct_eq(&d))); // Test equality of None with different // dummy value assert!(bool::from(c.ct_eq(&d))); // Test unwrap_or assert_eq!(CtOption::new(1, Choice::from(1)).unwrap_or(2), 1); assert_eq!(CtOption::new(1, Choice::from(0)).unwrap_or(2), 2); // Test unwrap_or_else assert_eq!(CtOption::new(1, Choice::from(1)).unwrap_or_else(|| 2), 1); assert_eq!(CtOption::new(1, Choice::from(0)).unwrap_or_else(|| 2), 2); // Test map assert_eq!( CtOption::new(1, Choice::from(1)) .map(|v| { assert_eq!(v, 1); 2 }) .unwrap(), 2 ); assert_eq!( CtOption::new(1, Choice::from(0)) .map(|_| 2) .is_none() .unwrap_u8(), 1 ); // Test and_then assert_eq!( CtOption::new(1, Choice::from(1)) .and_then(|v| { assert_eq!(v, 1); CtOption::new(2, Choice::from(0)) }) .is_none() .unwrap_u8(), 1 ); assert_eq!( CtOption::new(1, Choice::from(1)) .and_then(|v| { assert_eq!(v, 1); CtOption::new(2, Choice::from(1)) }) .unwrap(), 2 ); assert_eq!( CtOption::new(1, Choice::from(0)) .and_then(|_| CtOption::new(2, Choice::from(0))) .is_none() .unwrap_u8(), 1 ); assert_eq!( CtOption::new(1, Choice::from(0)) .and_then(|_| CtOption::new(2, Choice::from(1))) .is_none() .unwrap_u8(), 1 ); // Test (in)equality assert!(CtOption::new(1, Choice::from(0)).ct_eq(&CtOption::new(1, Choice::from(1))).unwrap_u8() == 0); assert!(CtOption::new(1, Choice::from(1)).ct_eq(&CtOption::new(1, Choice::from(0))).unwrap_u8() == 0); assert!(CtOption::new(1, Choice::from(0)).ct_eq(&CtOption::new(2, Choice::from(1))).unwrap_u8() == 0); assert!(CtOption::new(1, Choice::from(1)).ct_eq(&CtOption::new(2, Choice::from(0))).unwrap_u8() == 0); assert!(CtOption::new(1, Choice::from(0)).ct_eq(&CtOption::new(1, Choice::from(0))).unwrap_u8() == 1); assert!(CtOption::new(1, Choice::from(0)).ct_eq(&CtOption::new(2, Choice::from(0))).unwrap_u8() == 1); assert!(CtOption::new(1, Choice::from(1)).ct_eq(&CtOption::new(2, Choice::from(1))).unwrap_u8() == 0); assert!(CtOption::new(1, Choice::from(1)).ct_eq(&CtOption::new(2, Choice::from(1))).unwrap_u8() == 0); assert!(CtOption::new(1, Choice::from(1)).ct_eq(&CtOption::new(1, Choice::from(1))).unwrap_u8() == 1); assert!(CtOption::new(1, Choice::from(1)).ct_eq(&CtOption::new(1, Choice::from(1))).unwrap_u8() == 1); } #[test] #[should_panic] fn unwrap_none_ctoption() { // This test might fail (in release mode?) if the // compiler decides to optimize it away. CtOption::new(10, Choice::from(0)).unwrap(); }
rust
Democracy under attack: Mahua Moitra says she is 'willing to go to jail for this tweet' Amid an uproar in Parliament over Rahul Gandhi's remarks on 'democracy', TMC MP Mahua Moitra has alleged Lok Sabha Speaker Om Birla does not allow opposition members to speak. Taking to Twitter, she said, 'democracy is under attack'. By India Today News Desk: Trinamool Congress MP Mahua Moitra on Wednesday accused Lok Sabha Speaker Om Birla of not allowing opposition members to speak in Parliament. Taking to Twitter, the MP said, "Democracy is under attack. " Tagging Speaker Om Birla on social media, Moitra alleged only BJP ministers are allowed to speak on mike. "Om Birla allow ONLY BJP ministers to speak on mike & then adjourn parliament with not single opposition member being allowed to speak. Democracy IS under attack. And the speaker leads from the front. And I am willing to go to jail for this tweet," she wrote on Twitter. The same day, the leader of the Congress in the Lok Sabha, Adhir Ranjan Chowdhury, also levelled similar allegations over the proceedings of the Parliament. In a letter to Lok Sabha Speaker Om Birla, Chowdhury alleged that the mike on his table "has been muted for the past three days" and claimed that it "amply substantiates" Rahul Gandhi's statement that "mikes of the opposition members are often muted in India". Both Lok Sabha and Rajya Sabha have failed to transact any business for the last three days since the Budget Session resumed, with the BJP pressing for an apology from Gandhi, whom it accused of insulting India on foreign soil with his remarks on democracy. "I am deeply disheartened to observe that ever since the House resumed after the break on 13th March 2023, there has been a Government-sponsored disruption in the House. It appears to me as if there is a well-hatched conspiracy on the part of the party in power to tarnish the image of an individual member of an Opposition Party (Sh. Rahul Gandhi)," Chowdhury stated in his letter to the Speaker. What is more disturbing is that even the ministers vociferously take the lead in disrupting proceedings and the voice of leaders of opposition parties is not being heard, he alleged.
english
The age of Rahul Dev in the 2023 was 23. The Rahul Dev's was born in New Delhi. The DOB for Rahul Dev was 27 Sep 2000. The most recent movies for Rahul Dev were Rendu Jella Seetha and Khabar. Rendu Jella Seetha and Khabar were Rahul Dev's upcoming films. Rahul Dev's next feature film with Ramprasad Ragutu and Alok Naagar.
english
<filename>package.json { "name": "jquery-musketeer", "title": "jQuery Musketeer", "version": "0.3.5", "description": "Manage multiple contents from different languages bundled in the webpage", "repository": { "type": "git", "url": "https://github.com/grenouille220/jquery-musketeer.git" }, "dependencies": { "jquery": ">=1.8", "jstorage": "0.4.12", "barba.js": "1.0.0" }, "author": "D’Artagnan", "contributors": [ "<NAME> (http://grenouille220.github.io)" ], "licenses": [ { "type": "MIT", "url": "https://github.com/grenouille220/jquery-musketeer/blob/master/LICENSE" }, ], }
json
Fact Check: Is meat banned in Bengaluru on Eid? Bengaluru, May 02: With hundreds of Muslim families across the country preparing Eid-ul-Fitr, rumours that there would be a meat ban in Bengaluru on May 3, Tuesday, has goner viral. The rumour has spread in the backdrop of Eid-ul-Fitr, coinciding with Basava Jayanti on Tuesday. However, a Bruhat Bengaluru Mahanagara Palike official has put an end to thr speculation, stating that no such order has been issued by the civic body. ''Basava Jayanti is not among the nine days that the Urban Development Department has specified this year for the meat ban,'' the official was quoted by Decan Herald as saying. The days on which there's such a moratorium are: - Martyrs' Day (Jan 3) - Mahashivratri (March 1) - Sri Rama Navami (April 10) - Mahaveer Jayanti (April 14) - Buddha Purnima (May 16) - Krishna Janmasthami (August 19) - Ganesh Chaturthi (August 31) - Gandhi Jayanti (October 2) Basava Jayanthi is a holiday traditionally observed by the Lingayats in Karnataka. It marks the birthday of Basavanna, a 12th century poet-philosopher and the founding saint of the Lingayat tradition. The holiday is celebrated throughout South India, primarily in Karnataka, Maharashtra, Telangana and Andhra Pradesh. Eid-ul-Fitr, which marks the culmination of the fasting month of Ramzan, will be celebrated in the country on Tuesday. For the past two years, Muslims have been observing the fasting month and celebrating Eid in the shadow of the COVID-19 pandemic. This year, many of the COVID-19 curbs have been lifted following a dip in cases and vaccination of people. Meat banned on Eid-ul-Fitr in Bengaluru. It is just a rumour. No order has been issued on ban of meat on May 3.
english
{"published": "2015-09-27T19:11:33Z", "media-type": "News", "title": "3rd QTR: Browns 3 - Raiders 20", "id": "d0daf2fb-b4bf-417a-960d-27831f9eb3b4", "content": "CLEVELAND - The Cleveland Browns battle the Oakland Raiders in Week 3 of their season on Sunday.\u00a0 \n\nDAWGS ON THE RUN: Mondays at 7:30 a.m. on newsnet5.com\u00a0 \n\nBoth teams come in sporting a 1-1 record as they look to gain footing in their respected AFC divisions. \n\nYou can follow all of newsnet5.com's LIVE coverage of the game here. \n \nSUBSCRIBE: \u00a0 Dawgs On The Run newsletter for all the latest Cleveland Browns' news \n\nIf viewing on a mobile device, click here. \n\n--- \n\nFollow newsnet5.com on\u00a0 Facebook \u00a0 and\u00a0 Twitter \u00a0 \n\n\u00a0 Follow @WEWS \n\nDownload the newsnet5 app: \n Apple Android Kindle", "source": "NewsNet 5"}
json
What's the story? The 'friendly' banter between the Australians and the Indians doesn't seem to stop as we have one more episode to excite our ears. The recent addition to the list is the funny conversation between Tim Paine and Aaron Finch where they tried to charge up Rohit Sharma in a bid to take an extra wicket before the tea time. Here is the video: With Nathan Lyon coming into the attack, Paine decided to take on Rohit with a strategy to unsettle him with some funny words coming from behind the stumps. Howbeit, instead of talking directly to Rohit, Paine applied an intriguing technique of talking to Finch who was fielding at the forward short leg position. The stump-mic was loud and on as it picked up the funny comment made by the Australian captain. Through the stump microphone, Paine (to Finch) was heard saying, "It’s been a toss up for me between Royals and Indians, and if Rohit hits a six here, I am changing to Mumbai." Nonetheless, Rohit didn't reply and smartly went through the over. He didn't stop there as he said, "Too many Poms at the Royals" referring to Ben Stokes, Jos Buttler and possible Jofra Archer. The Indian cricket team is currently playing the third Test against Australia at the iconic Melbourne Cricket Ground. On the eve of Boxing Day, India won the toss and decided to sharpen up their willow first. With the series nicely poised at 1-1, we had an excellent Day 1 as India posted a total of 215 for the loss of just two wickets. On the back of Mayank, Kohli, and Pujara, India managed to dominate the Day 1. On the same lines, India kicked-off Day 2 in a decent way as Kohli and Pujara held their hands at the stroke of lunch. But, Australia managed to come back in the game as they scalped two quick wickets in the name of Virat and Pujara. Nonetheless, the arrival of Rohit and Rahane seemed to have stabilized the Indian batting after two quick blows. However, Paine started to get a bit hyperactive in an attempt to close the Indian innings as early as possible. And the fresh 'friendly' banter between him and Rohit (virtually) is a testimony to it.
english
Editor’s note: Dan Kaplan helps startups tell their stories. He’s done marketing for Twilio, Asana, and Salesforce and blogs about marketing, growth, and storytelling at Threadling. There are many people out there who take a pessimistic view of Facebook. To them, Mark Zuckerberg is a huckster, out to sell us the snake oils of distraction and dopamine in exchange for our eyeballs and personal data. I take the more optimistic view. I do not believe Zuckerberg is building Facebook to offer the world’s advertisers a better way to target humanity with ads. No, giving advertisers this vaguely sinister power is just a means to an end — a way to create billions of dollars of value on the current Internet while bridging the gap to the Internet of the future. In my mind, the future Facebook in Zuckerberg’s imagining is much grander, bolder and more futuristic. And what is that futuristic end? It has a lot to do with the Oculus Rift. Before I explain why, let’s talk about the metaverse. The metaverse? In the seminal piece of literary sci-fi that is Snow Crash, the author Neal Stephenson imagines a metaverse — a virtual reality world into which the technologists of a collapsed, balkanized America project their avatars. At the genesis of Stephenson’s virtual reality world (explained briefly in the book), the avatars started off as low-fidelity versions of the people behind them. But as the technology progressed, they became more and more representative and life-like, until the avatars reached the point that they were essentially digital replicas of their owners, projected into the cyber realm. In Neal Stephenson’s near-futuristic America, this metaverse was made possible by some wearable technology and a virtual reality headset. The piece he missed was Facebook. In one potential future, the identities we project into the metaverse will be fuzzy or even obscured. Here, our avatars will have little or nothing in common with our actual selves in the real world. They will range from pseudonymous constructions to total fantasies, like the socially-awkward straight male who plays the female dark elf seductress when he enters cyberspace. In another potential future, the avatars we project into the metaverse will much more closely mirror our actual selves. They will look like us, move like us, reflect our personal mannerisms, and so on. When we socialize in this virtual reality, we will be among friends, just from anywhere in the world with high-speed bandwidth, at anytime we choose. While it’s entirely possible (even likely) that both of these scenarios will co-exist, the latter future (where we project our real identities) will require some kind of authentic digital identity service that verifies that we are who we say we are, knows who we are friends with, and understands what we like and what we have in common with everyone else. In other words, it will require something a lot like Facebook. For all the hype (some deserved, some inflated) around the intersection of social, local and mobile, that trend will have nothing like the world-changing power at the intersection of social networks and virtual reality. After the gaming industry has worked out the VR interface kinks (there are a lot) and figured out how to develop credible, fully immersive experiences in a virtual world, it will be time to create something far more profound: the feeling of being “present” with your friends, colleagues and interesting strangers in virtual space. Virtual reality will be compelling because it will be free-form in ways actual reality can never be. Want to fly around the buildings of San Francisco with your girlfriend? No problem. The Grand Canyon? Sure. Want to have that board meeting in the world’s fanciest boardroom? How about a tropical beach instead? It gets pretty deep. Facebook was late to the mobile game. Indeed, Facebook’s inability to control the platforms it relies on for mobile reach (Android and iOS) presents one of the biggest risks to its medium-term success. This threat is the major reason that Facebook built Facebook Home: to do an end-run around Google and slowly-but-surely command the flow of attention and traffic on tons of Android devices. But Zuckerberg is a visionary. He knows that smartphones and tablets are not the only interfaces of the future, and he’ll be damned if he misses the next boat. If you haven’t experienced the feeling of presence in virtual reality, or can’t imagine what the implications of that feeling are, it’s easy to believe that virtual reality isn’t that next boat, that VR is just a bunch of techno-nonsense hype. But it’s not. Feeling present in virtual reality–your mind believing it is there–is unlike anything else, and that feeling will change the world in all sorts of crazy ways. As Michael Abrash of Valve points out, the display technology and processing power necessary to create the feeling of presence in VR is already here, and, though the Oculus Rift has a long way to go, it’s as close as anyone has got. With Facebook’s money behind it, Oculus VR’s team will (likely) be able to nail their product faster and have an easier time bringing it to market at scale. As Zuckerberg has promised, Oculus VR will start by revolutionizing games. But not too long after that, it will revolutionize digital social interaction, and after that, the world. For all of this, $2 billion dollars for control of a virtual reality platform looks like a steal.
english
<gh_stars>0 // pages/proceed/proceed.js Page({ data:{ time: 5 }, // 页面加载 onLoad:function(options){ // 获取Bike_ID this.setData({ bike_id: options.bike_id }) // 设置初始计时秒数 let time = 5; // 开始定时器 this.timer = setInterval(() => { this.setData({ time: -- time }); // 读完秒后携带单车号码跳转到计费页 if(time < 0){ clearInterval(this.timer) wx.redirectTo({ url: '../billing/billing?bike_id=' + options.bike_id }) } },1000) } })
javascript
When a 5.4 magnitude earthquake strikes and phone lines get jammed, it seems Twitter and texting may be the way to go. A 5.4 earthquake hit Tuesday while Verdell Wilson was having an exam in her gynecologist's Los Angeles office. Given it was her first earthquake experience, Wilson did what comes naturally--she twittered it. "As soon as I got dressed, I twittered my experience from my cell phone," Wilson said. "I usually twitter to 80 friends, but I now have 274 messages from people commenting on it." Twittering and texting may be the way to go in an emergency, given landline and cellular phone networks were heavily congested as callers jammed the lines, creating frustration for some users who had difficulty getting calls through. "If you're on a wireless network and you can't get a call through, often the texting network won't be as congested," said John Britton, an AT&T spokesman. He also advised users to forgo making non-emergency calls when natural disasters strike, in order to free up network resources for emergency calls. The earthquake not only created network congestion for AT&T callers, but for Verizon customers, too. "There were no outages, but what we did see was a big spike in calls. It was about 40 percent higher than our projections of what we might experience in a natural disaster," said Ken Muche, a Verizon spokesman. Other tech companies, however, were more fortunate. Security software giant Symantec, for example, was able to escape any damage to its nearby research lab in Culver City, Calif., said a company spokesman. Despite a "good long shake," nothing fell in the facility and cell and phone services were not interrupted.
english
New Delhi: As Delhi returned a hung verdict in the Assembly elections, Home Minister Sushil Kumar Shinde on Monday said the Lieutenant Governor will explore all options of forming a new government before taking a call. "The LG will first explore all options of government formation. As of now, the Home Ministry has no role in it," Shinde said. He was responding to a question on the possibility of imposition of President's rule in Delhi after the results of the Assembly elections where no party got absolute majority. Sources said the Lt Governor is expected to call the single largest party BJP, which along with its partner Akali Dal's one seat has 32 MLAs, to know whether it is ready to form a new government. If the BJP declines to form the government due to the lack of majority in the 70-member House, the Lt Governor then may ask the second largest party - the Aam Admi Party which bagged 28 seats -- whether it is in a position to form the government. Sources said even though both BJP and AAP had declared that it would not stake claim of forming the government, the Lt Governor will individually talk to leaders of the two parties Harsh Vardhan and Arvind Kejriwal respectively. After that the Lt Governor will send a report to the Home Ministry for future course of action. If the Lt Governor suggests President's rule, the Home Ministry will move to the Union Cabinet. If the Cabinet is convinced with the Lt Governor's suggestions, it will recommend President's rule by keeping the Assembly under suspended animation.
english
<reponame>npirzkal/pyLINEAR import numpy as np from scipy.spatial import ConvexHull def vertices(x,y): dx=[0,0,1,1] dy=[0,1,1,0] xy=[] for ddx,ddy in zip(dx,dy): xx=x+ddx yy=y+ddy xy.extend(list(zip(xx,yy))) xy=np.array(list(set(xy))) hull=ConvexHull(xy) xh,yh=[],[] for vertex in hull.vertices: xh.append(xy[vertex,0]) yh.append(xy[vertex,1]) xh,yh=np.array(xh),np.array(yh) return xh,yh
python
import React from 'react'; import { VerticalTimeline, VerticalTimelineElement } from 'react-vertical-timeline-component'; import './timeline.css'; import { Typography } from '@material-ui/core'; import { Build, Home, People, School } from "@material-ui/icons"; const Timeline = () => { const iconsMap = { home: <Home className="z-index-3" style={{zIndex:5}}/>, people: <People className="z-index-3" style={{zIndex:5}}/>, school: <School className="z-index-3" style={{zIndex:5}}/>, build: <Build className="z-index-3" style={{zIndex:5}}/>, } const data = [ { title: 'TietoEVRY user management project', subtitle: 'Opintoihin kuuluva projekti', date: '01/2022 ->', order: 1, iconName: 'school', background: '#2978b5', foreground: '#fff', html: 'Angular, C#, TypeScript' }, { title: 'Lapin ammattikorkeakoulu', subtitle: '120 / 240 op (ka 4.28)', date: '01/2020 ->', order: 10, iconName: 'school', background: '#2978b5', foreground: '#fff', html: 'Tieto- ja viestintätekniikan insinööri' }, { title: 'Asumisen ohjaaja', subtitle: 'Kolpeneen palvelukeskus', date: '11/2018 ->', order: 2, iconName: 'home', background: '#7e7e7e', foreground: '#fff', html: 'Pitempiä sijaisuuksia ja keikkatöitä, erilaisissa\n' + 'kehitysvammaisten yksiköissä.' }, { title: 'Rakennusmies', subtitle: 'Pallas rakennus', date: '06/2018 - 07/2018', order: 3, iconName: 'build', background: '#1b1b1c', foreground: '#fff', html: 'Rakennuksen viimeistelyvaiheen työt. As Oy Loimu.' }, { title: 'Rakennusmies', subtitle: 'SSR Lappi', date: '06/2017 - 07/2017', order: 4, iconName: 'build', background: '#1b1b1c', foreground: '#fff', html: 'Eristys- ja raudoitustyöt. As Oy Loimu.' }, { title: 'Harjoittelija', subtitle: 'Skanska talonrakennus Oy', date: '06/2016 - 06/2016', order: 5, iconName: 'build', background: '#1b1b1c', foreground: '#fff', html: 'Koneiden ja laitteiden asennusaputyöt. As Oy Majakka.' }, { title: 'Ounasvaaran lukio / REDU', subtitle: 'Kaksoistutkinto lukio / lähihoitaja', date: '08/2015 - 05/2019', order: 8, iconName: 'school', background: '#2978b5', foreground: '#fff', html: '' }, ]; return ( <VerticalTimeline> { data.map((item) => ( <VerticalTimelineElement key={ item.order } date={ item.date } iconStyle={ { background: item.background, color: item.foreground, } } icon={ iconsMap[item.iconName] } > <Typography variant='h5' className='vertical-timeline-element-title'> { item.title } </Typography> <Typography variant='h6' className='vertical-timeline-element-subtitle'> { item.subtitle } </Typography> {/* eslint-disable-next-line react/no-danger */ } <div dangerouslySetInnerHTML={ { __html: item.html } }/> </VerticalTimelineElement> )) } </VerticalTimeline> ); }; export default Timeline;
javascript
Floyd Mayweather will return to the boxing ring for an exhibition bout against 'Dangerous' Don Moore. The exhibition bout is set for May 14th and will take place at the helipad of the world's only 7-star hotel, Burj Al Arab in Dubai. As recently announced, 'Money' will be taking on undefeated 42-year-old pro-boxer Don Moore in his upcoming exhibition bout. Mayweather retired back in 2017 after beating Conor McGregor, however, 'Money' has taken part in a couple of exhibition fights since then. On the flipside, Moore has a pro-boxing record of 18-0-1, however, it is worth noting that he hasn't fought since 2016. As per the reports, apart from Mayweather's return to the boxing ring, the undercard of the event will also feature Badou Jack and former UFC middleweight champion Anderson Silva. Boxing journalist Michael Benson recently took to Twitter to reveal the same, where he said: "ANNOUNCED: Floyd Mayweather will return to the ring for an eight-round exhibition fight against Don Moore on May 14th at the helipad on top of the Burj Al Arab in Dubai, UAE. It's being reported that the undercard will feature Anderson Silva and Badou Jack. " Check out the tweet below: Floyd Mayweather has opened up about not facing Antonio Margarito during his days of pro-boxing. Even though a potential bout between the two could've easily turned out to be one of the best fights ever, it never came to fruition. However, Mayweather recently opened up about the same and was seemingly content with the thought of not fighting Antonia Margarito. During a recent interview with FightHype, 'Money' claimed that a fight with Margarito could've ultimately proven to be deadly for him because of the fact that the Mexican used loaded gloves. "He was beating fighters with loaded gloves. So, I'm glad that God never let that fight happen because you don't know what kind of effect that would've had on my career after boxing is over. He could've ended up killing me in the ring. " Check out Mayweather's interview here: Antonio Margarito was caught using a substance like plaster of paris in his handwrap before his fight against Shane Mosley in 2009. The Mexican eventually had to rewrap and ended up losing the bout and also had his license revoked for a year.
english
<filename>data/nber/19324.json { "id": 19324, "citation_title": "Costly Labor Adjustment: General Equilibrium Effects of China's Employment Regulations", "citation_author": [ "<NAME>", "<NAME>", "<NAME>" ], "citation_publication_date": "2013-08-16", "issue_date": "2013-08-16", "revision_date": "2015-07-27", "topics": [ "Macroeconomics", "Consumption and Investment", "Labor Economics" ], "program": [ "Economic Fluctuations and Growth" ], "projects": null, "working_groups": null, "abstract": "\n\nThis paper studies the employment, productivity and welfare implications of new Chinese labor regulations intended to protect workers' employment conditions. We estimate a general equilibrium model of costly labor adjustment from data prior to the policy. Using the estimated parameters, we study the effects of the interventions. We find that increases in severance payments lead to a sizable increase in firm size, lower aggregate employment, a significant reduction in labor reallocation, an increase in the exit rate and a welfare loss. A policy of credit market liberalization will reduce firm size, increase aggregate employment, increase labor reallocation, wages and welfare. If in place at the time, these frictions would have reduced China's annual growth rate by 1.1 percentage points over the 1998-2007 period.\n\n", "acknowledgement": "\nThis research was supported by a National Science Foundation (# 0819682) to Russell Cooper, a National Science Foundation of China grant (# 70903004, #71273001) to Ping Yan and Russell Cooper, and a National Science Foundation of China grant (#71273162) to <NAME> and Russell Cooper. The Department of Social Science of Peking University provided additional research funding. Huabin Wu provided outstanding research assistance on the initial phases of this project. <NAME> contributed to further developing the code for the policy analysis. We are grateful to <NAME> and <NAME> for sharing code from an earlier joint project. We are grateful to seminar participants at the European University Institute, the University of Alicante, University of Cyprus, the Federal Reserve Bank of St. Louis and the University of Rochester for helpful questions and comments. Comments and suggestions from the referees and editor that substantially improved our analysis and discussion of results are gratefully acknowledged. 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
The Denver Nuggets will head to the FedExForum Arena on Wednesday to face the Memphis Grizzlies in an exciting regular-season game. The Grizzlies pulled off an impressive 106-97 win over the Nuggets in their previous encounter on Monday. Ja Morant recorded 26 points, 7 rebounds and 8 assists on the night. He will be hoping to maintain his impressive form throughout the season and lead his side to their first playoffs since 2017. The Denver Nuggets have not looked like a consistent unit this season and currently hold a 4-3 record. They will be looking to improve on that record when they face the Memphis Grizzlies on Wednesday. Despite his injury issues, Nikola Jokic has played extremely well and has contributed to his team's victories in the last few games. He will be hoping to score big and help the Nuggets to their fifth win of the season against the Grizzlies. The Denver Nuggets have all their starters fit for this game. However, they do have other injury concerns. Jamal Murray will remain out for a few more months as he recovers from an ACL injury. Vlatko Cancar will be out of Wednesday's game due to a hip strain. Petr Cornelie will also be out due to G-League commitments. Dillon Brooks is the only Memphis Grizzlies player who has been listed as out for this game against the Denver Nuggets. The Denver Nuggets will most likely go ahead with the same lineup they have been using since the start of the season. Will Barton and Monte Morris will share the backcourt. Meanwhile, Michael Porter Jr. and Aaron Gordon will feature on the frontcourt, with the Joker playing as the center. Ja Morant has been brilliant all season and will be looking to put in yet another scintillating performance against the Denver Nuggets. He will share the backcourt with De'Anthony Melton. Desmond Bane and Jaren Jackson Jr. will start on the frontcourt. Meanwhile, Steven Adams will play at the center position. 5 Times Steph Curry Was HUMILIATED On And Off The Court!
english
What Are the Dawnguard Arsenal SSE Weapons? Your choice. Choose your next game! A premium and professional office suite for Full HD and widescreen monitors.
english
<gh_stars>1-10 import copy def merge_dicts(dict1, dict2, recycle=True): """ Recursively merge two dictionaries. dict2's values will override dict1's :param recycle: if True then write the merged dictionary into dict1, otherwise do not modify dict1 :return: a single dictionary """ assert type(dict1) is dict and type(dict2) is dict, \ 'Only dictionaries can be merged with this function, not %s and %s' % (str(type(dict1)), str(type(dict2))) if not recycle: # don't modify the original dictionary passed to us result = copy.deepcopy(dict1) else: result = dict1 for key in dict2: value = dict2[key] if key not in result or type(value) is not dict or type(result[key]) is not dict: result[key] = value else: result[key] = merge_dicts(result[key], value, recycle=True) return result
python
<gh_stars>1-10 WORD COMPLETE =============================================================================== _by <NAME>_ DESCRIPTION ------------------------------------------------------------------------------ The built-in insert mode completion i\_CTRL-N searches for keywords. Depending on the 'iskeyword' setting, this can be very fine-grained, so that fragments like '--quit-if-one-screen' or '/^Vim\\%((\\a\\+)\\)\\=:E123/' can take many completion commands and are thus tedious to complete. This plugin offers completion of sequences of non-blank characters (a.k.a. |WORD|s), i.e. everything separated by whitespace or the start / end of line. With this, one can quickly complete entire text fragments which are delimited by whitespace. ### SEE ALSO - Check out the CompleteHelper.vim plugin page ([vimscript #3914](http://www.vim.org/scripts/script.php?script_id=3914)) for a full list of insert mode completions powered by it. USAGE ------------------------------------------------------------------------------ In insert mode, invoke the WORD completion via CTRL-X CTRL-W. You can then search forward and backward via CTRL-N / CTRL-P, as usual. CTRL-X CTRL-W Find matches for WORDs that start with the non-blank characters in front of the cursor and end at the next whitespace. First, a match must start after whitespace (or at the beginning of the line); if that returns no results, it may match anywhere. Further use of CTRL-X CTRL-W will copy the text including the next WORDs following the previous expansion in other contexts. CTRL-X g CTRL-W Find matches for WORDs that start with keyword characters and a unique non-keyword character (possibly repeated) in front of the cursor, consist of non-blank characters and end at the next whitespace. In other words, like i_CTRL-X_CTRL-W but ending the completion base already before a different non-keyword character. This allows you to e.g. complete --quit-if-one-screen within quotes ("--quit) without having to use a manually selected base - the CTRL-X CTRL-W mapping would include the non-keyword double quote as well and therefore not find any matches. First, a match must start after whitespace (or at the beginning of the line); if that returns no results, it may match anywhere. Further use of CTRL-X g CTRL-W will copy the text including the next WORDs following the previous expansion in other contexts. {Visual}CTRL-X CTRL-W Find matches for WORDs that start with selected text and end at the next whitespace. (There's no {Visual}CTRL-X g CTRL-W mapping - it would be identical.) ### EXAMPLE To query the entire command argument --foo-bar (when "-" is not part of 'iskeyword'), just type "--f" and trigger the completion. If you want to complete that within quotes ("'--foo-bar'"), the mapping will not work, as the quote will be picked up, too. You can prevent that either by visually selecting only the "--f" part (stopping short of the quote), or by using the alternative i\_CTRL-X\_g\_CTRL-W mapping, which automatically ends the completion base right before the second non-keyword character (the quote). With the relaxed search, "pos(" will complete the entire call "pos([1,2,3])" found in "searchpos([1,2,3])". If you want to complete that within Markdown code formatting "`pos(", use the alternative i\_CTRL-X\_g\_CTRL-W mapping to locate the match while ignoring the surrounding backticks. INSTALLATION ------------------------------------------------------------------------------ The code is hosted in a Git repo at https://github.com/inkarkat/vim-WORDComplete You can use your favorite plugin manager, or "git clone" into a directory used for Vim packages. Releases are on the "stable" branch, the latest unstable development snapshot on "master". This script is also packaged as a vimball. If you have the "gunzip" decompressor in your PATH, simply edit the \*.vmb.gz package in Vim; otherwise, decompress the archive first, e.g. using WinZip. Inside Vim, install by sourcing the vimball or via the :UseVimball command. vim WORDComplete*.vmb.gz :so % To uninstall, use the :RmVimball command. ### DEPENDENCIES - Requires Vim 7.0 or higher. - Requires the ingo-library.vim plugin ([vimscript #4433](http://www.vim.org/scripts/script.php?script_id=4433)), version 1.010 or higher. - Requires the CompleteHelper.vim plugin ([vimscript #3914](http://www.vim.org/scripts/script.php?script_id=3914)), version 1.40 or higher. CONFIGURATION ------------------------------------------------------------------------------ For a permanent configuration, put the following commands into your vimrc: By default, the 'complete' option controls which buffers will be scanned for completion candidates. You can override that either for the entire plugin, or only for particular buffers; see CompleteHelper\_complete for supported values. let g:WORDComplete_complete = '.,w,b,u' If you want to use a different mapping, map your keys to the &lt;Plug&gt;(WORDComplete) mapping target _before_ sourcing the script (e.g. in your vimrc): imap <C-x><C-w> <Plug>(WORDComplete) vmap <C-x><C-w> <Plug>(WORDComplete) imap <C-x>g<C-w> <Plug>(WORDSameKeywordBaseComplete) CONTRIBUTING ------------------------------------------------------------------------------ Report any bugs, send patches, or suggest features via the issue tracker at https://github.com/inkarkat/vim-WORDComplete/issues or email (address below). HISTORY ------------------------------------------------------------------------------ ##### 1.10 RELEASEME - ENH: Add an alternative CTRL-X g CTRL-W insert mode mapping that only considers a unique non-keyword character for the completion base, to ease completion from a base that is not whitespace-delimited (e.g. from within quotes). ##### 1.00 27-Sep-2017 - First published version. ##### 0.01 30-May-2009 - Started development. ------------------------------------------------------------------------------ Copyright: (C) 2009-2021 <NAME> - The [VIM LICENSE](http://vimdoc.sourceforge.net/htmldoc/uganda.html#license) applies to this plugin. Maintainer: <NAME> &lt;<EMAIL>&gt;
markdown
<reponame>atonho/Sistema-Estacionamento /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Reportes; import java.awt.Frame; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import net.sf.jasperreports.engine.JasperCompileManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.view.JasperViewer; /** * * @author <NAME> */ public class Reporte { Connection cn; public Reporte(){ try{ Class.forName("com.mysql.jdbc.Driver"); cn=DriverManager.getConnection("jdbc:mysql://localhost/samu2","root",""); }catch(ClassNotFoundException | SQLException e){ } } public void mostrarReporte(){ try{ try{ JasperReport reporte=JasperCompileManager.compileReport("general.jrxml"); JasperPrint print=JasperFillManager.fillReport(reporte, null, cn); JasperViewer vista=new JasperViewer(print,false); vista.setTitle("RELATORI0"); vista.setExtendedState(Frame.MAXIMIZED_BOTH); vista.setVisible(true); } catch(Exception e){ } } catch(Exception e){ } } public void mostrarReporteE(){ try{ try{ JasperReport reporte=JasperCompileManager.compileReport("especificacao.jrxml"); JasperPrint print=JasperFillManager.fillReport(reporte, null, cn); JasperViewer vista=new JasperViewer(print,false); vista.setTitle("RELATORIO"); vista.setExtendedState(Frame.MAXIMIZED_BOTH); vista.setVisible(true); } catch(Exception e){ } } catch(Exception e){ } } }
java
{ "countries": [], "topics": [ "National Communications & Inventories" ], "section_title": "INFORMAL CONSULTATIONS", "enb_start_date": "24-May-06", "enb_short_title": "UNFCCC SB 24", "subtype": "GROUPS", "actors": [], "sentences": [ "IPCC 2006 GUIDELINES AND HARVESTED WOOD PRODUCTS (HWP): Informal consultations continued on the IPCC 2006 Guidelines and HWP.", "Discussions centered on whether to call for parties submissions on their views on the 2006 Guidelines, and whether HWP should be considered in the context of the Guidelines for inventories or as a broader agenda item.", "Parties agreed to consider the matter further at SBSTA 26." ], "enb_url": "http://www.iisd.ca/vol12/enb12303e.html", "enb_long_title": "Twenty-Fourth sessions of the Subsidiary Body for Scientific and Technological Advice (SBSTA) and the Subsidiary Body for Implementation (SBI) of the UNFCCC and First session of the Ad Hoc Working Group on Further Commitments for Annex I Parties under the Kyoto Protocol (AWG) and related meetings", "type": "", "id": "enb12303e_8", "enb_end_date": "24-May-06" }
json
Guwahati: Assam was rocked by violence against the controversial Citizenship (Amendment) Bill (CAB), which was passed by the Rajya Sabha Wednesday, as protesters hit the streets in thousands, burning tyres and wooden logs, prompting the administration to impose curfew in Guwahati and suspend mobile internet services in 10 districts of the state. The army undertook a flag march in Dibrugarh. The CAB was earlier passed by the Lok Sabha at the stroke of midnight on Monday. On a day when lawmakers debated the CAB in the Rajya Sabha, Assam was on the boil, with protesters raising slogans against the Central and state governments, and demanding unconditional withdrawal of the legislation. They fought pitched battles with the police, turning various parts of the stare into virtual battle grounds. Assam Chief Minister Sarbananda Sonowal remained stuck at the Lokpriya Gopinath Bordoloi International airport here for hours after landing in the state capital from Tezpur, as his convoy could not roll out due to the massive protests. The administration tried to tackle the situation by imposing curfew from 6:15pm. The curfew will continue till 7:00am Thursday, a senior police officer said. Mobile internet services were suspended in 10 troubled districts — Lakhimpur, Dhemaji, Tinsukia, Dibrugarh, Charaideo, Sivasagar, Jorhat, Golaghat, Kamrup (Metro) and Kamrup districts — for 24 hours to thwart any effort to spread rumours and misinformation, while a column of army was kept on standby in Bongaigaon town. The protests, which had started days back, intensified during the day after Union Home Minister Amit Shah tabled the legislation in the Upper House of the Parliament. The protesters tried to march towards the state Secretariat here and threw bricks at the police and burnt tyres on the roads, creating a volatile situation. Secretariat employees also expressed solidarity with the protesters. The protesters, including a large number of students, forcibly shut down shops and markets, and damaged a fire brigade vehicle till they were stopped by BSF, Rapid Action Force and police personnel about 500 metre from the Secretariat. The law keepers retaliated by resorting to lathi charge, using water canons, firing rubber bullets and lobbing tear gas shells. “We have used tear gas, rubber bullets, water canon, and resorted to mild lathi charge to scare them away. Some of our personnel were also injured,” said Guwahati police commissioner Dipak Kumar. Girls joined the protests in good numbers, holding aloft placards and posters reading ‘no citizenship on the basis of religion’. “This Act is unconstitutional. We Assamese indigenous people will never accept it,” said a protester. At least 25 protesters — among them several students — sustained injuries as they fought pitched battles with the police in different parts of the state. At least 10 companies of paramilitary forces have been deployed in the state. (IANS)
english
<reponame>mattbillard/experiments-redux-vs-mobx export const INCREASE_TIMER = 'INCREASE_TIMER'; export const UPDATE_COUNT = 'UPDATE_COUNT'; export const increaseTimer = () => { return { type: INCREASE_TIMER }; } export const updateCount = (count: number) => { return { type: UPDATE_COUNT, payload: { count } }; }
typescript
A Ukrainian official in the eastern Kharkiv region said on Friday that 436 bodies were exhumed from a mass burial site near the eastern city of Izyum recaptured from Russian forces. “Today, the exhumation of bodies from the mass grave in Izyum is being completed. A total of 436 bodies have been exhumed. Most of them have signs of violent death, and 30 have signs of torture. There are bodies with rope around their necks, with their hands tied, with broken limbs and gunshot wounds,” the Kharkiv regional Governor Oleg Synegubov said in a statement on social media. Ukraine recaptured Izyum and other towns in the east this month, crippling Kremlin supply routes and bringing fresh claims of Russian atrocities with the discovery of hundreds of graves — some containing multiple bodies. “Several men have had their genitals amputated. All this is evidence of the terrible torture to which the invaders subjected the inhabitants of Izyum,” Mr. Synegubov added. The Kremlin has denied its forces were responsible for large-scale killings in east Ukraine and accused Kyiv of fabricating its discoveries of mass graves in recaptured territory.
english
{ "_args": [ [ "vizion@https://registry.npmjs.org/vizion/-/vizion-0.2.13.tgz", "/home/choi518/expressServer/word2vec/node_modules/pm2" ] ], "_from": "vizion@>=0.2.0 <0.3.0", "_id": "vizion@0.2.13", "_inCache": true, "_location": "/pm2/vizion", "_phantomChildren": {}, "_requested": { "name": "vizion", "raw": "vizion@https://registry.npmjs.org/vizion/-/vizion-0.2.13.tgz", "rawSpec": "https://registry.npmjs.org/vizion/-/vizion-0.2.13.tgz", "scope": null, "spec": "https://registry.npmjs.org/vizion/-/vizion-0.2.13.tgz", "type": "remote" }, "_requiredBy": [ "/pm2" ], "_resolved": "https://registry.npmjs.org/vizion/-/vizion-0.2.13.tgz", "_shasum": "1314cdee2b34116f9f5b1248536f95dbfcd6ef5f", "_shrinkwrap": null, "_spec": "vizion@https://registry.npmjs.org/vizion/-/vizion-0.2.13.tgz", "_where": "/home/choi518/expressServer/word2vec/node_modules/pm2", "author": { "email": "<EMAIL>", "name": "<NAME>" }, "bugs": { "url": "https://github.com/keymetrics/vizion/issues" }, "dependencies": { "async": "1.5" }, "description": "Git/Subversion/Mercurial repository metadata parser", "devDependencies": { "istanbul": "*", "mocha": "2.0.0", "shelljs": "0.6.0", "should": "*" }, "engines": { "node": ">=0.10" }, "homepage": "https://github.com/keymetrics/vizion#readme", "keywords": [ "git", "svn", "hg", "subversion", "mercurial", "repository", "parser", "versioning", "revision" ], "license": "Apache-2.0", "main": "index.js", "name": "vizion", "optionalDependencies": {}, "readme": "\n# Repository parser\n\nGit/Subversion/Mercurial repository metadata parser\n\n[![Build Status](https://api.travis-ci.org/keymetrics/vizion.png?branch=master)]\n\n## Example\n\n```javascript\nvar vizion = require('vizion');\n\n/**\n * Grab metadata for svn/git/hg repositories\n */\nvizion.analyze({\n folder : '/tmp/folder'\n}, function(err, meta) {\n if (err) throw new Error(err);\n\n /**\n *\n * meta = {\n * type : 'git',\n * ahead : false,\n * unstaged : false,\n * branch : 'development',\n * remotes : [ 'http', 'http ssl', 'origin' ],\n * remote : 'origin',\n * commment : 'This is a comment',\n * update_time : Tue Oct 28 2014 14:33:30 GMT+0100 (CET),\n * url : 'https://github.com/keymetrics/vizion.git',\n * revision : 'f0a1d45936cf7a3c969e4caba96546fd23255796',\n * next_rev : null, // null if its latest in the branch\n * prev_rev : '6d6932dac9c82f8a29ff40c1d5300569c24aa2c8'\n * }\n *\n */\n});\n\n/**\n * Check if a local repository is up to date with its remote\n */\nvizion.isUpToDate({\n folder : '/tmp/folder'\n}, function(err, meta) {\n if (err) throw new Error(err);\n\n /**\n *\n * meta = {\n * is_up_to_date : false,\n * new_revision : '6d6932dac9c82f8a29ff40c1d5300569c24aa2c8'\n * current_revision : 'f0a1d45936cf7a3c969e4caba96546fd23255796'\n * }\n *\n */\n});\n\n/**\n * Update the local repository to latest commit found on the remote for its current branch\n * - on fail it rollbacks to the latest commit\n */\nvizion.update({\n folder : '/tmp/folder'\n}, function(err, meta) {\n if (err) throw new Error(err);\n\n /**\n *\n * meta = {\n * success : true,\n * current_revision : '6d6932dac9c82f8a29ff40c1d5300569c24aa2c8'\n * }\n *\n */\n});\n\n/**\n * Revert to a specified commit\n * - Eg: this does a git reset --hard <commit_revision>\n */\nvizion.revertTo({\n revision : 'f0a1d45936cf7a3c969e4caba96546fd23255796',\n folder : '/tmp/folder'\n}, function(err, data) {\n if (err) throw new Error(err);\n\n /**\n *\n * data = {\n * success : true,\n * }\n *\n */\n});\n\n/**\n * If a previous commit exists it checkouts on it\n */\nvizion.prev({\n folder : '/tmp/folder'\n}, function(err, meta) {\n if (err) throw new Error(err);\n\n /**\n *\n * meta = {\n * success : true,\n * current_revision : '6d6932dac9c82f8a29ff40c1d5300569c24aa2c8'\n * }\n *\n */\n});\n\n/**\n * If a more recent commit exists it chekouts on it\n */\nvizion.next({\n folder : '/tmp/folder'\n}, function(err, meta) {\n if (err) throw new Error(err);\n\n /**\n *\n * meta = {\n * success : false,\n * current_revision : '6d6932dac9c82f8a29ff40c1d5300569c24aa2c8'\n * }\n *\n */\n});\n```\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/keymetrics/vizion.git" }, "scripts": { "cover": "istanbul cover --report html node_modules/.bin/_mocha -- -R spec test/*", "test": "_mocha --require test/support/env --reporter spec --bail --check-leaks test/" }, "version": "0.2.13" }
json
<reponame>raiseandfall/hash.subscribe { "name": "hash.subscribe", "version": "2.2.0", "description": "Subscribe your components to the browser Hash, and get change notifications", "scripts": { "lint": "semistandard index.js", "dev": "nodemon -q -x 'npm test'", "test": "npm run lint && browserify tests.js | ghostface | tap-set-exit | faucet" }, "main": "index.js", "repository": { "type": "git", "url": "git+https://github.com/raiseandfall/hash.subscribe.git" }, "engines": { "node": ">=0.10.x" }, "keywords": [ "hash", "browser", "location" ], "author": { "name": "raiseandfall", "url": "https://github.com/raiseandfall" }, "license": "MIT", "bugs": { "url": "https://github.com/raiseandfall/hash.subscribe/issues" }, "homepage": "https://github.com/raiseandfall/hash.subscribe", "devDependencies": { "browserify": "^13.0.0", "extend": "^3.0.0", "faucet": "0.0.1", "ghostface": "^1.5.0", "nodemon": "^1.8.1", "redtape": "^1.0.0", "semistandard": "^7.0.5", "tap-set-exit": "^1.1.1", "tape": "^4.4.0", "tapes": "^3.1.0", "phantomjs-prebuilt": "^2.1.3" }, "dependencies": { "clone": "^1.0.2" } }
json
SRAVANA 3, 1896 (SAKA) Written Answers 1144 (b) whether Government succeeded.. in reaching the required quantity of coal to the steel plants during the Railway strike? 113 Written Answers ment for setting up a Coal Mines Planning and Design Institute; and (b) if so, the salient features thereof? THE DEPUTY MINISTER IN THE MINISTRY OF STEEL AND MINES (SHRI SUBODH HANSDA): (a) and (b). The Central Mine Planning and Design Institute with headquarters at Ranchi has already been set up under the Coal Mines Authority Limited. The Institute at Ranchi will have three Regional Institutes, each at Asansol, Dhanbad and Nagpur to be set up in two phases, during the Fifth Five Year Plan. The existing Planning and Design Cell of the National Coal Development Corporation Ltd. forms the nucleus of the Central Institute at Ranchi and the Planning and Design Cell of the Bharat Coking Coal Ltd. would form the nucleus of the Regional Institute at Dhanbad. The Central Institute at Ranchi is carrying out the work of project Planning and designing in respect of mines/minefields under its jurisdiction, as well as those connected with standardisation, typification, coordination and integration of applied research and development of new techniques of coal mining industry, perspective planning and limited coal exploration work. The Institute will in due course undertake planning and designing of new mines and modernisation/reconstruction of the existing mines for the achievement of the coal production targets. Production Loss to HSL during recent Railway Strike 619. SHRI Y. ESWARA REDDY: Will the Minister of STEEL AND MINES be pleased to state: (a) whether the HSL suffered a huge production loss due to recent Railway strike; and THE DEPUTY MINISTER IN THE MINISTRY OF STEEL AND MINES. (SHRI SUBODH HANSDA): (a) and (b). Taking into account the dislocation in the operations of the Steel Plants due to dislocation in rail. movement in the last quarter of 197374 and the possibility of a strike by: Railway employees, the production targets for the first quarter of 197476 were kept low as to build stocks. of raw materials before resumption of normal operations. While the production at the plants was restricted throughout April, 1974, the plants had to be operated at the minimum level permissible on considerations of technological safety of plant and equipment from the beginning of May, 1974 to avoid any sudden stoppage on account of the Railway strike and a number of units were blanked or stopped. Consequently, the aggregate. production of saleable steel from the Bhilai, Durgapur and Rourkela Steel Plants in May, 1974, came to 1,69,000 tonnes as against 2,10,000 tonnes in April, 1974. The supplies of coking coal to the steel plants were, however, maintained at a satisfactory level during the strike period resulting in. appreciable improvement in stocks. Stages of construction of three Steel Plants in South India 620. SHRI Y. ESWARA REDDY: Will the Minister of STEEL AND. MINES be pleased to state: (a) at what stages is the construction of the three steel plants in South India for which foundations were laid in 1971; and (b) whether these works are progressing according to the schedule and when the production will start in each of these plants? 15 Written Answers THE DEPUTY MINISTER IN THE MINISTRY OF STEEL AND MINES (SHRI SUBODH HANSDA): (a) and (b). The construction schedules of the three new steel plants at Visakhapatnam, Vijayanagar and Salem will be worked out in the detailed Project Reports. The Steel Authority of India Ltd. are taking action for the preparation of the De'tailed Project Reports in the case of Visakhapatnam and Vijayanagar Steel Plants. The Detailed Project Report in respect of Salem Steel Plant is under preparation and is expected to be available by the end of this year. Concurrently, engineering of the first phase of the Salem Steel Project, which envisages the setting up of a cold rolling mill complex for cold rolling of stainless steel sheets and strips is inhand. This phase of the plant is likely to be completed towards the end of the Fifth Plan. In the case of Visakhapatnam and Vijayanagar Steel Projects, land acquisition and development of infrastructure facilities are in progress. These plants were programmed to start production only during the Sixth Plan period. Increase in Small Pox Cases in the Country during last Two years 621. SHRI Y. ESWARA REDDY: SHRI RAM KANWAR: Will the Minister of HEALTH AND FAMILY PLANNING be pleased to state: (a) whether small pox has become quite virulent and fatal in our country in the last two years; (b) if so, the reasons therefor; (c) how many people were attacked by small pox and how many died of small pox in the last two years State. wise; and (d) what steps Government intend to take to eradicate small pox from the country? Written AnsweTS KISKU): (a) Since last year there has been a noticeable increase in the incidence of small pox in the country particularly in the States of Uttar Pradesh, Bihar, West Bengal and Madhya Pradesh. THE DEPUTY MINISTER IN THE MINISTRY OF HEALTH AND FAMILY PLANNING (SHRI A. K. (b) The high incidence of small pox can be attributed to accumulated back-log of primary vaccinations, the lingering superstition among sections of the people against vaccination, and the intensive active search which is being carried out throughout the country for unearthing undetected cases. (c) A statement containing the requisite information is laid on the Table of the House. [Placed in Library. See No. LT-8041/74]. (d) Under the intensive anti-smallpox campaign undertaken since last year the State Governments, who are primarily responsible for the implementation of the health programmes, have mobilised health personnel and transport for the case-search operations. The Central Government have taken prompt measures to assist the State Health authorities to meet the current situation. The number of Surveillance Teams headed by Senior Epidemilogists has been increased so far to 73 from 22, and Containment Teams to 69 as against 15 working last year in the endemic States, in addition to the normal staff of the Smallpox Eradication Programme. A number of additional vehicles are also being provided to the teams to ensure mobility. Adequate quantities of vaccine, bifurcated needles and health education material have been supplied and sufficient quantities kept in reserve National Wage Policy on Payment of Wages during Strike Period 822. SHRI Y. ESWARA REDDY: Will the Minister of LABOUR be pleased to state: (a) whether Government are going to evolve a national policy on the
english
Microsoft is in the process of putting together a very interesting television project for its popular Xbox 360 console. In our humble view, this is a direct counter to what Apple has in mind for their newly refreshed Apple TV. Why? Because Microsoft has exactly what Apple lacks: boxes in living rooms. According to industry numbers, Microsoft has sold a total of 44.6 million Xbox 360s, putting that console miles ahead of the so far diminutive (in comparison) sales of the Apple TV. Microsoft actually has another advantage that Apple seems unwilling to match, and could not at scale even if it wanted to: a subscription enabled audience. There are millions upon millions of Xbox live customers, and ex-Xbox live customers for whom Microsoft has a credit card on file, meaning that the friction to boost their level of subscription to include another form of content is low. The upsell would not be difficult, especially if the value proposition was strong (high content levels coupled with a fair price). Microsoft has the devices needed for its service in the hands of the consumers who already have shown a predisposition to buying content (games, etc), and have high-speed internet in their living rooms. It’s a recipe for success. Compare that to buying another device (Apple TV), and then having your living room split between games and other content, something makes little sense. Why divide when you can unify your devices and their purposes? As the Microsoft offering is supposed to be subscription based, and while Apple wants to rent you shows one at a time (a formula that has warranted limited content deals), there are sure to be some partisans who prefer Apple’s method. However, for the average media-consumer, the Xbox system is most likely simpler, faster, and easier. Nice try, Apple. Get the most important tech news in your inbox each week.
english
<filename>src/utils/unzip/ungzip.js import pako from 'pako'; import Base64 from './base64'; // const pako = require('./pako.min.js'); /** * 解压缩字符串 * @param zipData * 经过 gzip压缩和base64编码的字符串 * @param callback * 回调函数 用解压缩后的数据进行处理后续操作 * @author wangying */ export function ungzip(zipData) { // try { const punzipstr = zipData; // punzipstr =decodeURIComponent(punzipstr); const restored = pako.inflate(punzipstr, { to: 'string' }); // 解 压 return restored; // } } export function unzip(b64Data) { // const binaryString = pako.gzip(b64Data, { to: 'string' }); // return binaryString; let strData = Base64.atob(b64Data); // // Convert binary string to character-number array const charData = strData.split('').map(x => x.charCodeAt(0)); // Turn number array into byte-array const binData = new Uint8Array(charData); // // unzip const data = pako.inflate(binData); // Convert gunzipped byteArray back to ascii string: strData = String.fromCharCode.apply(null, new Uint16Array(data)); return strData; }
javascript
{ "id": 129136, "info": { "name": "projet de loi Création", "description": "/!\\ WARNING: will disable all search pictures on google search images /!\\\r\n\r\nhttp://www.nextinpact.com/news/100309-en-france-on-restreint-liberte-panorama-on-taxe-moteurs-recherche-dimages.htm\r\n\r\n« Taxe » Google Images, le résultat possible appliqué à : \r\nhttps://www.google.com/imghp?hl=FR\r\nhttps://www.qwant.com/images\r\nhttp://www.exalead.com/search/image/\r\nhttp://www.bing.com/?scope=images&nr=1&FORM=NOFORM", "additionalInfo": null, "format": "uso", "category": "google", "createdAt": "2016-06-18T09:40:03.000Z", "updatedAt": "2016-06-18T09:45:13.000Z", "license": "NO-REDISTRIBUTION", "author": { "id": 163350, "name": "Keul" } }, "stats": { "installs": { "total": 34, "weekly": 0 } }, "discussions": { "stats": { "discussionsCount": 0, "commentsCount": 0 }, "data": [] }, "style": { "css": "@namespace url(http://www.w3.org/1999/xhtml);\r\n\r\n\r\n/*\r\nhttps://www.google.com/imghp?hl=FR\r\nhttps://www.qwant.com/images\r\nhttp://www.exalead.com/search/image/\r\nhttp://www.bing.com/?scope=images&nr=1&FORM=NOFORM\r\n*/\r\n\r\n\r\n\r\n@-moz-document domain(\"google.fr\") {\r\n .rg_i {\r\n visibility:hidden;\r\n \r\n }\r\n}\r\n\r\n\r\n@-moz-document domain(\"qwant.com\") {\r\n .result__thumb-container__image {\r\n visibility:hidden !important;\r\n }\r\n}\r\n\r\n@-moz-document domain(\"exalead.com\") {\r\n .results img {\r\n visibility:hidden !important;\r\n }\r\n}\r\n\r\n@-moz-document domain(\"bing.com\") {\r\n\r\n .dg_u img {\r\n visibility:hidden !important;\r\n }\r\n}" } }
json
<gh_stars>0 # Python 3.7 # Usage: python3 server.py server_port block_duration timeout # coding: utf-8 import sys from socket import * from datetime import datetime from threading import Timer, Condition, Thread from helper import retrieve_components, decorate_chat_msg, is_existing_user, username2password server_port = int(sys.argv[1]) block_duration = int(sys.argv[2]) timeout = int(sys.argv[3]) class User: """ contains all the information about the online user """ def __init__(self, socket, address): self.username = None self.socket = socket self.address = address self.private_accepting_port = None def __repr__(self): return "User({}, {})".format(self.socket, self.address) def get_username(self): return self.username def get_socket(self): return self.socket def get_address(self): return self.address def get_private_accepting_port(self): return self.private_accepting_port def set_username(self, username): self.username = username def set_private_accepting_port(self, port): self.private_accepting_port = port def send_prompt(self, prompt): self.socket.send(prompt.encode()) def get_input(self): message = self.socket.recv(2048) return message.decode() def create_thread(user_object): """ create a separate thread for handling the interaction between the server and each client """ thread = Thread(name="MainHandler", target=main_handler, args=[user_object]) thread.daemon = True thread.start() def is_online_user(username): """ return True if 'username' is online """ return username in [user.get_username() for user in online_users] def has_blocked(userA, userB): """ return True if userA has blocked userB """ if userB in block_users: if userA in block_users[userB]: return True else: return False else: return False def has_existing_connection(userA, userB): """ return True if there's a private messaging session between userA and userB """ if userA in activeP2PSessions: if userB in activeP2PSessions[userA]: return True if userB in activeP2PSessions: if userA in activeP2PSessions[userB]: return True return False def login_unblock(username): """ unblock the user by removing the user from the blocked_list and remove its # of unsuccessful login attempts history """ del unSuccessfulAttempt[username] del blocked_login[username] def send_broadcast(user, message, typeOfMsg): """send broadcast to all online users that didn't block the sender Parameters: user (User): the user object message (String): the message typeOfMsg (int): 0 impiles the message is a normal broadcast, 1 impiles the message is a login/logout broadcast """ if typeOfMsg == 0: get_blocked = False for online_user in online_users: if has_blocked(online_user.get_username(), user.get_username()): get_blocked = True continue if user.get_username() == online_user.get_username(): continue online_user.send_prompt(message) if get_blocked: user.send_prompt("Your message could not be delivered to some recipients") elif typeOfMsg == 1: for online_user in online_users: # when A login/logout do not inform B if A blocked B and # do not inform A itself if has_blocked(user.get_username(), online_user.get_username())\ or user.get_username() == online_user.get_username(): continue online_user.send_prompt(message) def logout(user): """ logout the user from the server, following operations are done (1) send broadcast to notify users that user has logged out (2) remove the user from the online users list (3) record the user's last online time (4) send message to the client application to confirm the log out (5) remove the user's record from all active P2P sessions (6) delete the user object """ send_broadcast(user, user.get_username() + " has logged out\n", 1) for online_user in online_users: if online_user.get_username() == user.get_username(): online_users.remove(online_user) lastLoggedIn[online_user.get_username()] = datetime.now() user.send_prompt("WhatsApp " + user.get_username() + " logout") break if user.get_username() in activeP2PSessions: del activeP2PSessions[user.get_username()] for activeuser in activeP2PSessions: if user.get_username() in activeP2PSessions[activeuser]: activeP2PSessions[activeuser].remove(user.get_username()) del user def login_process(user): """ handles all interactions between the server and the client while the client is trying to login """ while (1): user.send_prompt("Username: ") username = user.get_input() if is_existing_user(username, username2password): for _ in range(3): user.send_prompt("Password: ") password = user.get_input() if is_online_user(username): user.send_prompt("This account has logged in on another device.\n") password = "" break elif username2password[username] == password: if username in blocked_login: user.send_prompt("Your account has been blocked. Please try again later.\n") break # delete user's unsuccessful login record if the password is # correct if username in unSuccessfulAttempt: del unSuccessfulAttempt[username] # set the name of the user and add it to the online_users list user.set_username(username) online_users.append(user) send_broadcast(user, user.get_username() + " has logged in", 1) break else: # user inputs wrong password if username in unSuccessfulAttempt: unSuccessfulAttempt[username] += 1 if unSuccessfulAttempt[username] >= 3: if username not in blocked_login: blocked_login[username] = Timer(block_duration, login_unblock, [username]) blocked_login[username].start() user.send_prompt("Your account has been blocked. Please try again later.\n") break else: unSuccessfulAttempt[username] = 1 user.send_prompt("Invalid Password. Please try again.\n") else: user.send_prompt("User doesn't exist\n") continue # user logs in successfully if password == <PASSWORD>2password[username] and username not in blocked_login: user.send_prompt("Welcome back !\n") # sends out all the cached offline messages to the client if user.get_username() in offline_msg_box: for msg in offline_msg_box[user.get_username()]: user.send_prompt(msg) del offline_msg_box[user.get_username()] # try to get back the port number used by the client for accepting # private connections private = user.get_input() private = private.split(' ') user.set_private_accepting_port(private[1]) break def main_process(user): """ handle the command received from the client """ while (1): t = Timer(timeout, logout, [user]) t.start() command = user.get_input() if command == "logout": logout(user) t.cancel() break elif command.startswith("message "): userComponent, message = retrieve_components(command) message = decorate_chat_msg(user.get_username(), message) if userComponent == user.get_username(): user.send_prompt("Can't send message to yourself") t.cancel() continue elif has_blocked(userComponent, user.get_username()): user.send_prompt("Your message could not be delivered as the recipient has blocked you") t.cancel() continue if is_existing_user(userComponent, username2password): for online_user in online_users: if online_user.get_username() == userComponent: online_user.send_prompt(message) break # if the user is offline, add the message to the offline mail box else: message = message + '\n' if userComponent in offline_msg_box: offline_msg_box[userComponent].append(message) else: offline_msg_box[userComponent] = [message] else: user.send_prompt("Invalid user") elif command.startswith("broadcast "): message = retrieve_components(command) message = decorate_chat_msg(user.get_username(), message) send_broadcast(user, message, 0) elif command == "whoelse": prompt = "Online Users: " for online_user in online_users: if (online_user.get_username() != user.get_username()): prompt = prompt + online_user.get_username() + ", " prompt = prompt.rstrip(", ") prompt += '\n' user.send_prompt(prompt) elif command.startswith("whoelsesince "): time = int(retrieve_components(command)) # stores online users' name into a set result = {online_user.get_username() for online_user in online_users} for i in lastLoggedIn: lastTime = lastLoggedIn[i] now = datetime.now() timeDelta = now - lastTime # stores the user into the result set if it's not online since # that time if timeDelta.seconds < time: result.add(i) # removes the client itself from the result if user.get_username() in result: result.remove(user.get_username()) # construct the prompt prompt = "Users: " for i in result: prompt = prompt + i + ", " prompt = prompt.rstrip(", ") prompt += '\n' user.send_prompt(prompt) elif command.startswith("block "): userComponent = retrieve_components(command) if userComponent not in username2password: user.send_prompt("User is invalid") t.cancel() continue elif userComponent == user.get_username(): user.send_prompt("Can't block yourself") t.cancel() continue user.send_prompt("You have blocked " + userComponent) if userComponent in block_users: block_users[userComponent].add(user.get_username()) else: block_users[userComponent] = {user.get_username()} elif command.startswith("unblock "): userComponent = retrieve_components(command) if userComponent not in username2password: user.send_prompt("Username is invalid") elif userComponent == user.get_username(): user.send_prompt("Unblocking yourself is invalid") elif userComponent in block_users and user.get_username() in block_users[userComponent]: user.send_prompt("You have unblocked " + userComponent) block_users[userComponent].remove(user.get_username()) else: user.send_prompt("User " + userComponent + " is not in your block list") elif command.startswith("startprivate "): userComponent = retrieve_components(command) if not is_existing_user(userComponent, username2password): user.send_prompt("User doesn't exist") t.cancel() continue elif has_existing_connection(user.get_username(), userComponent): user.send_prompt("Can't establish private connection as current private connection with this user exists") t.cancel() continue if userComponent != user.get_username(): for online_user in online_users: if online_user.get_username() == userComponent: if has_blocked(userComponent, user.get_username()): user.send_prompt("Private message can't be established as you have been blocked") else: if user.get_username() not in activeP2PSessions: activeP2PSessions[user.get_username()] = [online_user.get_username()] else: activeP2PSessions[user.get_username()].append(online_user.get_username()) online_user.send_prompt("WhatsApp " + online_user.get_username() + " allowprivate " + user.get_username()) user.send_prompt("WhatsApp " + user.get_username() + " startprivate " + str(online_user.get_address()) + " " + str(online_user.get_private_accepting_port()) + " " + online_user.get_username()) break else: user.send_prompt(userComponent + " is offline") else: user.send_prompt("Can't start private message with yourself") elif command.startswith("stopprivate "): userComponent = retrieve_components(command) found = False # check if there exists a private session between two users if user.get_username() in activeP2PSessions: if userComponent in activeP2PSessions[user.get_username()]: activeP2PSessions[user.get_username()].remove(userComponent) found = True elif userComponent in activeP2PSessions: if user.get_username() in activeP2PSessions[userComponent]: activeP2PSessions[userComponent].remove(user.get_username()) found = True # asks two users to discontinue their private connection if there's one between them if found: for online_user in online_users: if online_user.get_username() == user.get_username(): online_user.send_prompt("WhatsApp stopprivate (1) " + userComponent) elif online_user.get_username() == userComponent: online_user.send_prompt("WhatsApp stopprivate (2) " + user.get_username()) else: fail_message = "You don't have an active p2p session with " + userComponent user.send_prompt(fail_message) elif command == "WhatsApp sent private command": t.cancel() continue else: if user in online_users: user.send_prompt("Invalid command") else: # user has been logged out by the server automatically after timeout t.cancel() break t.cancel() def main_handler(user_object): """ all interactions between the server and the client, consists of login process and main process this function is called inside create_thread() """ global t_lock login_process(user_object) lastLoggedIn[user_object.get_username()] = datetime.now() main_process(user_object) t_lock = Condition() # the number of unsuccessful attempts for each user # stored in the format {user1: 3, user2: 2, ...} unSuccessfulAttempt = {} # users that are blocked for a period blocked_login = {} # user to user blocking # here user1 is blocked by user2, user3, ... # {user1: {user2, user3, ...}} block_users = {} # stores a list of online users. online_users = [] # stores message in the format {user1:[msg1, msg2, ...], user2: [msg1, msg2, ...]} offline_msg_box = {} # saves the last online time for all users in the format {user1: time1, ...} lastLoggedIn = {} # saves active p2p messaging sessions user pairs # if A initiates a p2p session with B, then {A: [B], ...} activeP2PSessions = {} # server's socket allowing clients to connect with server_socket = socket(AF_INET, SOCK_STREAM) server_socket.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) server_socket.bind(('localhost', server_port)) server_socket.listen(1); while 1: # creates a connection socket dedicated to this particular client connectionSocket, clientAddress = server_socket.accept() user = User(connectionSocket, clientAddress[0]) # create a separate thread for the client create_thread(user) server_socket.close()
python
- 5 hrs ago International Malala Day 2023: Who Is Malala Yousafzai? Where Is She Celebrating Her 26th Birthday? - News GST Council Meeting Highlights: What Will Be Cheaper, Costlier? - Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time! Do We Observe Religious Rituals With The Right Attitude? The problem is, people are contented with just following rituals. There is a certain security they enjoy in doing this. The science behind the rituals is no more known to people but the rituals are ego fulfilling to them. Rituals are complex and we always find it a challenge to keep pace with complex things. People come to me with their problems and ask me for a solution. I tell them that I will take care and suggest to them to sit for a while under the banyan tree while they are in the ashram. The banyan tree in the ashram is an Energy field. But they are not happy with that answer. They ask me what rituals they should do to make things better. If I tell them that they should go 108 times around the banyan tree in the ashram, they will be very happy doing it! You see, when you go 108 times around the banyan tree, it becomes ego-fulfilling for you. You then feel that you have worked hard and that you will get the benefit out of it. This is how we have trained our minds with respect to religion. Even in religion and rituals, I have seen – people compete with each other! If your neighbour has done a particular offering in a particular temple, next you go and do the same offering in that temple. What is the focus on? The deity or the neighbour? ! You have missed the whole thing by doing these things! People feel proud in saying that they have visited so many important holy shrines all over the world. They list out the groups of temples that they have visited. Immediately, the people who listen to these stories make an effort in surpassing these achievements. - yoga spiritualityWhy Do Hindus Do Pradakshina? Meaning, Significance And Rules! - faith mysticismUgadi 2023: How Ugadi Rituals Vary In Different Regions Of Karnataka?
english
# import os & csv import os import csv # csv path csvpath = os.path.join("Resources","election_data.csv") # lists count = 0 candidatelist = [] unique_candidate = [] vote_count = [] vote_percent = [] # open csv with open(csvpath, newline="") as csvfile: csvreader = csv.reader(csvfile, delimiter=",") csv_header = next(csvreader) # loop for row in csvreader: # votes counter count = count + 1 # candidate list candidatelist.append(row[2]) # variable for candidate names for x in set(candidatelist): unique_candidate.append(x) # variable for count of votes y = candidatelist.count(x) vote_count.append(y) # variable for percent of votes z = (y/count)*100 vote_percent.append(z) winning_vote_count = max(vote_count) winner = unique_candidate[vote_count.index(winning_vote_count)] print("-------------------------") print("Election Results") print("-------------------------") print("Total Votes :" + str(count)) print("-------------------------") for i in range(len(unique_candidate)): print(unique_candidate[i] + ": " + str(vote_percent[i]) +"% (" + str(vote_count[i])+ ")") print("-------------------------") print("The winner is: " + winner) print("-------------------------")
python
{ "name": "heyhoy", "version": "0.5.0", "description": "(WIP - Experimental) Damn simple programming language built using javascript from scratch (no jison, no bison).", "main": "index.js", "scripts": { "test": "mocha ./test/test.js", "test-verbose": "mocha ./test/test.js --verbose" }, "repository": { "type": "git", "url": "git+https://ezhmd@github.com/ezhmd/heyhoy.git" }, "author": "<NAME>", "license": "Apache-2.0", "bugs": { "url": "https://github.com/ezhmd/heyhoy/issues" }, "homepage": "https://github.com/ezhmd/heyhoy#readme", "devDependencies": { "@types/node": "^12.12.6", "eslint": "6.5.x", "eslint-config-airbnb-base": "^14.0.0", "eslint-plugin-import": "^2.18.2", "mocha": "^6.2.2" } }
json
<reponame>Exaxxion/BetterQuesting package betterquesting.api2.client.gui.events; public abstract class PanelEvent { private boolean cancelled = false; public abstract boolean canCancel(); public boolean isCancelled() { return this.cancelled; } public void setCancelled(boolean state) { if(!this.canCancel()) { throw new IllegalStateException("Attempted to cancel a non cancellable panel event"); } this.cancelled = state; } }
java
<reponame>Pitoontakoonpol/Java public class InsertDemo { public static void main(String[] args) { StringBuffer palindrome = new StringBuffer( "A man, a plan, a canal; Panama."); palindrome.insert(15, "a cat, "); System.out.println(palindrome); } }
java
# Section 6.2.5 snippets country_capitals1 = {'Belgium': 'Brussels', 'Haiti': 'Port-au-Prince'} country_capitals2 = {'Nepal': 'Kathmandu', 'Uruguay': 'Montevideo'} country_capitals3 = {'Haiti': 'Port-au-Prince', 'Belgium': 'Brussels'} country_capitals1 == country_capitals2 country_capitals1 == country_capitals3 country_capitals1 != country_capitals2 ########################################################################## # (C) Copyright 2019 by Deitel & Associates, Inc. and # # Pearson Education, Inc. All Rights Reserved. # # # # DISCLAIMER: The authors and publisher of this book have used their # # best efforts in preparing the book. These efforts include the # # development, research, and testing of the theories and programs # # to determine their effectiveness. The authors and publisher make # # no warranty of any kind, expressed or implied, with regard to these # # programs or to the documentation contained in these books. The authors # # and publisher shall not be liable in any event for incidental or # # consequential damages in connection with, or arising out of, the # # furnishing, performance, or use of these programs. # ##########################################################################
python
Coronavirus Scare: FRIENDS Star Jennifer Aniston Calls It A 'Chaotic Time'; Says 'We Need To Work Together' Hollywood, as well as Bollywood stars, have gone into self-isolation, thanks to the rapid spread of Coronavirus. With stars like Tom Hanks, Idris Elba and a few more testing positive for COVID-19, people are in a state of shock and are taking necessary precautions. Meanwhile, they are also advising their fans to stay indoors and be safe. All the stars are taking to their respective social media accounts to motivate their fans to self-quarantine and not step out, thus helping in curbing the spread of the disease. FRIENDS star Jennifer Aniston has joined the league of stars who are spreading awareness. Taking to her Instagram stories, Jennifer called it a 'chaotic time' and said that it is important to take all the measures to prevent it seriously. In the long post, she mentioned that people who are young and have a strong immune system to fight Coronavirus should also stay indoors so that they do not spread it to those who are vulnerable. In the end, she wrote, "We need to work together! Be safe and spread the word." Further, he also hailed the women doctors and nurses who are working round-the-clock to treat patients affected by Coronavirus. Apart from Jennifer Aniston, her FRIENDS co-star Courteney Cox has quarantined herself too. Recently, she put up a Tik Tok video in which we see her dancing and in the captioned she has mentioned "Could this be why Coco and Johnny are socially distancing themselves from me? #bored #quarentine." For more updates, stay tuned to SpotboyE.
english
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.qnium.common.backend.core; import com.qnium.common.backend.assets.interfaces.IAuthManagerProvider; /** * * @author Drozhin */ public class AuthManager { private static AuthManager _instance = null; IAuthManagerProvider authManagerProvider = new DefaultAuthManagerProvider(); public static synchronized AuthManager getInstance() { if ( _instance == null ) { _instance = new AuthManager(); } return _instance; } private AuthManager() { } public void setAuthManagerProvider(IAuthManagerProvider authManagerProvider) { this.authManagerProvider = authManagerProvider; } /* public void verifyAdminPrivileges(String sessionKey) throws Exception { authManagerProvider.verifyAdminPrivileges(sessionKey); } */ public void checkPermission(String sessionKey, String entity, String action) throws Exception { this.authManagerProvider.checkPermission(sessionKey, entity, action); } public long getAccountId(String sessionKey) throws Exception { return this.authManagerProvider.getAccountId(sessionKey); } public int getAccountType(String sessionKey) throws Exception { return this.authManagerProvider.getAccountType(sessionKey); } }
java
import { MailerService } from '@nestjs-modules/mailer'; import { Injectable } from '@nestjs/common'; import { SendEmailDto } from './dtos/sendEmail.dto'; @Injectable() export class EmailService { constructor(private readonly mailerService: MailerService) {} async sendMail(options: SendEmailDto): Promise<any> { try { return await this.mailerService.sendMail({ to: options.recipient, subject: options.subject, text: options.content, }); } catch (err) { console.log('ERROR SEND MAIL: ', err.message); } } }
typescript
/* * ChessJApplet.java * Created on October 22, 2006, 8:44 AM * Written 11/04-5/05 * @author mhenry */ package com.burcumirza.HenryChess.Logic; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; public class ChessJApplet extends JApplet { private ChessGame game; private Chessboard board; private Frame window; public void init(int level) { Dimension bounds = new Dimension(800, 700); board = new Chessboard(bounds); window = new Frame("Level " + level + " Chess Round"); window.add(board); window.setSize(bounds); window.setVisible(true); window.setResizable(false); window.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { System.exit(0); } }); Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); window.setLocation((int) ((dim.width / 2) - (bounds.getWidth() / 2)), (int) ((dim.height / 2) - (bounds.getHeight() / 2))); Move.board = board; game = new ChessGame(board, level); game.makeMove(); } } class RoundedBorder implements Border { private int radius; RoundedBorder(int radius) { this.radius = radius; } public Insets getBorderInsets(Component c) { return new Insets(this.radius + 1, this.radius + 1, this.radius + 2, this.radius); } public boolean isBorderOpaque() { return true; } public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { g.drawRoundRect(x, y, width - 1, height - 1, radius, radius); } }
java
{ "name": "mixed-modules-example", "version": "1.0.0", "description": "An example for mixed modules(goog.require, goog.modules, ES Modules)", "main": "index.js", "scripts": { "start": "run-s build:deps start:devserver", "start:devserver": "webpack-dev-server --mode=development", "build": "run-s build:deps build:webpack", "build:webpack": "webpack -p --mode=production", "build:deps": "./node_modules/google-closure-library/closure/bin/build/depswriter.py --root_with_prefix 'src ../../../../src' > public/deps.js", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "koba04", "license": "MIT", "dependencies": { "google-closure-library": "^20191111.0.0" }, "devDependencies": { "mocha": "^6.2.2", "npm-run-all": "4.x", "webpack": "4.x", "webpack-cli": "3.x", "webpack-dev-server": "3.x" } }
json
package scene2d; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.math.Interpolation; import com.badlogic.gdx.scenes.scene2d.Action; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.actions.Actions; /* * <p> * The EffectFactory allows to do magic effects on your actors. * Effects like scale in/out, shake, fade in/out are supported. * <p> */ public class Effect { public static void createEffect(Actor actor, EffectType effectType, float value, float duration, InterpolationType type){ if(actor == null) return; Interpolation interp = InterpolationType.getInterpolation(type); float x = 0;//actor.getX(); float y = 0;//actor.getY(); switch(effectType){ case ScaleToThenFadeOut: actor.addAction(Actions.sequence(Actions.scaleTo(value, value, duration, interp))); break; case PatrolX: actor.addAction(Actions.forever(Actions.sequence(Actions.moveBy(value, 0, duration, interp), Actions.moveBy(-value, 0, duration, interp)))); break; case PatrolY: actor.addAction(Actions.forever(Actions.sequence(Actions.moveBy(0, value, duration, interp), Actions.moveBy(0, -value, duration, interp)))); break; case SlideLeft: actor.setPosition(999, y); actor.addAction(Actions.moveTo(x, y, duration, interp)); break; case SlideRight: actor.setPosition(-999, y); actor.addAction(Actions.moveTo(x, y, duration, interp)); break; case SlideUp: actor.setPosition(x, -999); actor.addAction(Actions.moveTo(x, y, duration, interp)); break; case SlideDown: actor.setPosition(x, 999); actor.addAction(Actions.moveTo(x, y, duration, interp)); break; case FadeIn: Color color = actor.getColor(); color.a = 0f; actor.setColor(color); actor.addAction(Actions.fadeIn(duration, interp)); break; case FadeOut: Color color2 = actor.getColor(); color2.a = 1f; actor.setColor(color2); actor.addAction(Actions.fadeOut(duration, interp)); break; case FadeInOut: actor.addAction(fadeInOut(value, duration, interp)); break; case ScaleIn: actor.setScale(0, 0); actor.addAction(Actions.scaleTo(1, 1, duration, interp)); break; case ScaleOut: actor.setScale(1, 1); actor.addAction(Actions.scaleTo(0, 0, duration, interp)); break; case ScaleInOut: actor.addAction(scaleInOut(value, duration, interp)); break; case None: break; default: break; } } public static void createEffect(ImageJson imageJson){ createEffect(imageJson, imageJson.effectType, imageJson.effectValue, imageJson.effectDuration, imageJson.interpolationType); } public static Action scaleInOut(float value, float duration, Interpolation interp){ return Actions.sequence(Actions.scaleTo(value, value, duration, interp), Actions.scaleTo(1, 1, duration, interp)); } public static Action shakeInOut(float value, float duration, Interpolation interp){ return Actions.sequence(Actions.rotateTo(value, duration, interp), Actions.rotateTo(-value, duration, interp), Actions.rotateTo(0, duration, interp)); } public static Action fadeInOut(float value, float duration, Interpolation interp){ return Actions.sequence(Actions.fadeIn(duration, interp), Actions.fadeOut(duration, interp)); } public static Action fadeOutIn(float value, float duration, Interpolation interp){ return Actions.sequence(Actions.fadeOut(duration, interp), Actions.fadeIn(duration, interp)); } /** * Scale effect, Shake effect (SC, SHK) * */ public static void create_SC_SHK(Actor actor, float scaleRatioX, float scaleRatioY, float shakeAngle, float originalAngle, float duration, final boolean isRemoveActor) { if (actor != null) { actor.addAction(Actions.sequence( Actions.scaleTo(scaleRatioX, scaleRatioY, duration), Actions.rotateTo(shakeAngle, duration), Actions.rotateTo(-shakeAngle, duration), Actions.rotateTo(originalAngle, duration))); } } // // TRIPLE EFFECTS (Sequence - Chain reaction) // ################################################################ /** * Scale effect, Back To Normal, Fade Out (SC, BTN, FO) * */ public static void create_SC_BTN_FO(Actor actor, float scaleRatioX, float scaleRatioY, float duration, float delayBeforeFadeOut, final boolean isRemoveActor) { if (actor != null) { actor.addAction(Actions.sequence( Actions.scaleTo(scaleRatioX, scaleRatioY, duration), Actions.scaleTo(1, 1, duration), Actions.delay(delayBeforeFadeOut), Actions.fadeOut(duration))); } } /** * Scale effect, Shake effect, Back To Normal (SC, SHK, BTN) * */ public static void create_SC_SHK_BTN(Actor actor, float scaleRatioX, float scaleRatioY, float shakeAngle, float originalAngle, float duration, final boolean isRemoveActor) { if (actor != null) { actor.addAction(Actions.sequence( Actions.scaleTo(scaleRatioX, scaleRatioY, duration), Actions.rotateTo(shakeAngle, duration), Actions.rotateTo(-shakeAngle, duration), Actions.rotateTo(originalAngle, duration), Actions.scaleTo(1, 1, duration))); } } static Interpolation[] interpolationsValue = { Interpolation.bounce, Interpolation.bounceIn, Interpolation.bounceOut, Interpolation.circle, Interpolation.circleIn, Interpolation.circleOut, Interpolation.elastic, Interpolation.elasticIn, Interpolation.elasticOut, Interpolation.exp10, Interpolation.exp10In, Interpolation.exp10Out, Interpolation.exp5, Interpolation.exp5In, Interpolation.exp5Out, Interpolation.linear, Interpolation.fade, Interpolation.pow2, Interpolation.pow2In, Interpolation.pow2Out, Interpolation.pow3, Interpolation.pow3In, Interpolation.pow3Out, Interpolation.pow4, Interpolation.pow4In, Interpolation.pow4Out, Interpolation.pow5, Interpolation.pow5In, Interpolation.pow5Out, Interpolation.sine, Interpolation.sineIn, Interpolation.sineOut, Interpolation.swing, Interpolation.swingIn, Interpolation.swingOut, }; }
java
{ "reportMissingImports": true, "reportMissingTypeStubs": false, "reportUnknownMemberType": false, "reportMissingTypeArgument": false, "reportUnknownParameterType": false, "reportUnknownArgumentType": false, "reportGeneralTypeIssues": false, "reportUnknownVariableType": false, "pythonVersion": "3.9", "pythonPlatform": "Darwin" }
json
This match remembered for Dean Jones’s valiant knock, and also because it turned out to be only the second tied match in the history of Test cricket. “He was gaunt and pale in the face and had a vacant expression that suggested he was in serious trouble, his body bordering on completely shutting down. At tea on Day Two he came in, 202 not out, to rapturous applause from his teammates and enthusiastic backslapping, but none of it registered — he was like a walking corpse,” says Steve Waugh, who witnessed Dean Jones’ 503-minute epic double-century on September 19, 1986 at MA Chidambaram Stadium, Madras. This match is remembered not only for Jones’s valiant knock, but also because it turned out to be only the second tied match in the history of Test cricket. Madras’ humidity has always been an issue of concern, not only for the touring teams but for the home side as well. On that eventful day, quite a few Australians had fallen victim to the city’s harsh weather conditions. Ray Bright, who was sent in as a night watchman the previous day, scored 30 before he allegedly gave his wicket away. Apparently, he was in such distress that he was crying in pain back in the physiotherapist’s room, draped with wet towels and fluids by his side. Waugh was another player who couldn’t brave the heat after one point and began vomiting at regular intervals due to heatstroke. Jones lost control of his bodily functions and had asked his skipper Allan Border to retire him through sickness when he walked into the dressing room at tea. But Border’s reaction was a firm: “No way. You can throw your wicket away if you want, but I’m not retiring you hurt. ” Jones managed to add eight more runs before his innings folded on a massive 210. He was then rushed to a hospital for a saline-drip to recover, but not before his name went down in history books for playing one of the best knocks ever. Prior to this Test, Jones wasn’t in the best of form and needed an innings that could not only propel him to limelight but also cement his place in the side. The fight for the No. 3 spot was between Jones and Mike Veletta, with the former making the cut more on gut feeling than anything else. However, Jones left no stone unturned to grab the opportunity with both his hands, and while this knock not only signalled one of the most crucial moments in his career, it ensured that the Victorian became a regular feature in the Australian side. Jones later went on to admit that he hardly remembered the latter part of his knock due to exhaustion. He began to urinate involuntarily and had no control over how many times he vomited. He lost seven kilos in that heat and it took him over nine months to get his weight back. He lost seven kilos in the heat. He said it was his Mount Everest and had to climb it. That comment spurred Jones and he went on to add another 40 runs before he was bowled off Shivlal Yadav. Jones somehow managed to bat during the second innings to score a 49-minute 24, inclusive of three boundaries. The Australians declared their second innings at 170 for 5, but not before setting the Indians a stiff total of 348 to get on the final day. Not many expected the Indians to go for the win, but Chandrakant Pandit and Ravi Shastri scored at more than run-a-ball after Sunil Gavaskar, Mohinder Amarnath and Mohammad Azharuddin laid a solid foundation. However, they were bowled out for 347, and thus the match concluded as the second tied Test in the history of cricket. Needless to say, Jones was awarded the Man of the Match, but strangely alongside Kapil Dev, who scored 119 during India’s first innings. Greg Matthews, who scored 44 and 27* and took 5 wickets in each innings wasn’t even considered. (Karthik Parimal, a Correspondent with CricketCountry, is a cricket aficionado and a worshipper of the game. He idolises Steve Waugh and can give up anything, absolutely anything, just to watch a Kumar Sangakkara cover drive. He can be followed on Twitter at https://twitter. com/karthik_parimal)
english
<filename>packages/controller/src/operation.ts import { Response } from '@onhand/jsend' export abstract class Operation<I extends any = any, O extends any = any> { abstract run (input: I): Promise<Response<O>> }
typescript
<gh_stars>0 export const textChangeHandler = handlerFromProps => (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => handlerFromProps(event.target.value)
typescript
package jwt import ( "errors" "fmt" "github.com/dgrijalva/jwt-go" ) const ( hmacSampleSecret = "17x" ) // GenerateToken 根据提供的信息生成 jwt token func GenerateToken(userId int64) (string, error) { // 指定需要存储的数据 claims := jwt.MapClaims{ "userId": userId, } token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) // 秘钥签名 return token.SignedString([]byte(hmacSampleSecret)) } // ParseToken 从 jwt token 中解析出原始信息 func ParseToken(tokenString string) (userId int64, err error) { token, err := jwt.ParseWithClaims(tokenString, jwt.MapClaims{}, secret()) if err != nil { return } claim, ok := token.Claims.(jwt.MapClaims) if !ok { err = errors.New("cannot convert claim to mapclaim") return } // 验证token,如果token被修改过则为false if !token.Valid { err = errors.New("invalid jwt token") return } if value, ok := claim["userId"]; ok { // 默认会处理成 float64 userId = int64(value.(float64)) } return } // secret 获取 secret 的方法 类型必须为 jwt.Keyfunc func secret() jwt.Keyfunc { return func(token *jwt.Token) (interface{}, error) { if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok { return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"]) } // TODO 可以放在配置文件里 return []byte(hmacSampleSecret), nil } }
go
<filename>tests/test_primary_beams.py<gh_stars>1-10 """Unit tests for testing support """ import logging import os import unittest import numpy from astropy import units as u from astropy.coordinates import SkyCoord from arl.data.polarisation import PolarisationFrame from arl.image.operations import export_image_to_fits from arl.imaging.base import create_image_from_visibility from arl.util.primary_beams import create_pb_vla from arl.util.testing_support import create_named_configuration from arl.visibility.base import create_visibility log = logging.getLogger(__name__) class TestPrimaryBeams(unittest.TestCase): def setUp(self): self.dir = './test_results' os.makedirs(self.dir, exist_ok=True) self.frequency = numpy.linspace(1e8, 1.5e8, 3) self.channel_bandwidth = numpy.array([2.5e7, 2.5e7, 2.5e7]) self.flux = numpy.array([[100.0], [100.0], [100.0]]) self.phasecentre = SkyCoord(ra=+15.0 * u.deg, dec=-35.0 * u.deg, frame='icrs', equinox='J2000') self.config = create_named_configuration('LOWBD2-CORE') self.times = numpy.linspace(-300.0, 300.0, 3) * numpy.pi / 43200.0 nants = self.config.xyz.shape[0] assert nants > 1 assert len(self.config.names) == nants assert len(self.config.mount) == nants def createVis(self, config, dec=-35.0, rmax=None): self.config = create_named_configuration(config, rmax=rmax) self.phasecentre = SkyCoord(ra=+15 * u.deg, dec=dec * u.deg, frame='icrs', equinox='J2000') self.vis = create_visibility(self.config, self.times, self.frequency, channel_bandwidth=self.channel_bandwidth, phasecentre=self.phasecentre, weight=1.0, polarisation_frame=PolarisationFrame('stokesI')) def test_create_primary_beams_vla(self): self.createVis(config='LOWBD2', rmax=1000.0) model = create_image_from_visibility(self.vis, cellsize=0.00001, override_cellsize=True) beam=create_pb_vla(model) assert numpy.max(beam.data) > 0.0 export_image_to_fits(beam, "%s/primary_beam_vla.fits" % self.dir)
python
Veteran Indian spinner Ravichandran Ashwin spun a web around the West Indies batters and picked up his 33rd five-wicket haul in Tests on day 1 of the first Test in Dominica. It is a comeback of sorts for the Chennai spinner after being left out of India's playing XI for the WTC final against Australia last month in London. Ashwin proved himself in this match with a vintage bowling performance. After electing to bat first, West Indies managed to make a steady start as openers Kraigg Brathwaite (20) and Tagenarine Chanderpaul (12) put on a 31-run opening stand by negating the new-ball threat. It was Ashwin who broke the partnership in the 13th over to open the floodgates. The off-spinner scalped Chanderpaul's wicket off the penultimate ball of the 13th over by cleaning him up. Brathwaite also followed his opening partner to the pavilion after playing an ugly hoick against the same bowler. Debutant Alick Athanaze (47) anchored the innings by getting set at one end, while the batters at the other end kept playing rash shots to reach the pavilion. The youngster also ran out of patience in the 55th over and departed following a miscued slog, giving Ashwin his fourth wicket. Rakheem Cornwall (19*) then helped West Indies reach 150 before Ravichandran Ashwin wrapped up the innings by dismissing Jomel Warrican in the 65th over. Ravindra Jadeja ended up with three wickets, while Shardul Thakur and Mohammed Siraj scalped one wicket apiece. Fans heaped praise on Ashwin after witnessing yet another wonderful bowling performance from him and expressed their reactions on the matter via Twitter. Here are some of the best reactions: The World's number one Test bowler has breached a special milestone during day 1 of the first Test against West Indies in Dominica. After dismissing Alzarri Joseph (his third wicket), Ravichandran Ashwin became the third Indian bowler to pick up 700 international wickets. Harbhajan Singh (707 wickets) and Anil Kumble (953 wickets) are ahead of Ravichandran Ashwin (702 wickets).
english
--- title: Behind the scenes --- * TOC {:toc} ## Document data models **(Not finalized)** The document data model follows a few rules. CouchDB's own `_id` values are replaced with UUIDv4. Every document has a certain boolean field, for organization and making queries more effective. ### Tasks, projects and notes **(Tasks, projects and notes will be migrated to fit a model from Schema.org)** The Tasks and Note apps use `"productivity": true` type: either task, project or note created: required for Mango queries to find and sort documents. project: For tasks. Holds the _id of the project the task belongs to. **Example:** ```json { "_id":"1285fefa-f648-4baa-b7e7-be9b2ab8bb6d", "productivity":true, "type":"task", "due":"2020-12-31T23:59:58", "start":"2020-12-31T09:00:00", "end":null, "title":"That important thing I need to do. Or else..", "description":"I have to do the thing on that day. Not before. Not after.", "created":"2019-12-31T00:00:00", "status":"todo", "project":"466e5986-b157-4951-9e24-f627ea1dd8ea", "context":"at home", "priority":2, "tags":["crucial", "chores"] } ``` ### Contacts Contacts semi-adheres to [Schema.org](https://schema.org), simplifying export for rich search results (JSON-LD). #### Person Key distinguishing property: `"@type": "Person"` **Example:** ```json { "_id":"65584923-2a21-47b3-8fd0-0ac5ad34a4bd", "created":"2019-12-31T00:00:00", "@type": "Person", "givenName": "Man", "additionalName": "Bro", "familyName": "Dudeson", "gender": "cyborg", "contactPoint": [ { "email": "<EMAIL>", "contactType": "Work" }, { "telephone": "555-123456789", "contactType": "Work" }, ], "spouse": { "identifier": "e4bb600d-60a5-4ef5-bad7-851fd4c6f508", "name": "<NAME>" }, "keywords": [ "Will be implemented", "Soon" ], "birthDate": "1970-12-31T00:00:00.000Z", "knowsAbout": [ "Finance", "Javascript" ], "description": "Important detail that best not be forgotten", "knowsLanguage": [ "no", "en" ], "jobTitle": "Hyperbole", "telephone": "555-987654321", "email": "<EMAIL>", "url": "https://lybekk.tech", "address": { "streetAddress": "Wayroad 1", "addressLocality": "Citypart", "postalCode": "1234", "addressRegion": "New Bark", "addressCountry": "Youessay" }, "favorite": true } ``` #### Organization Key distinguishing property: `"@type": "Organization"` **Example:** ```json { "_id":"635ca124-b060-455f-8a1b-61885ccff0ea", "created":"2005-12-31T00:00:00", "@type": "Organization", "address": { "streetAddress": "Slough Avenue", "postalCode": "1725", "addressLocality": "Scranton ", "addressRegion": "Pennsylvania ", "addressCountry": "USA" }, "email": "<EMAIL>", "url": "dundermifflin.com", "legalName": "<NAME> Paper Company, Inc.", "description": "Doing biznus, as in Boboddy", "telephone": "555-444888222", "contactPoint": [], "keywords": [ "paper", "threat level midnight" ], "location": { "@type": "Place", "geo": { "@type": "GeoCoordinates", "latitude": "34.210704", "longitude": "-118.436473" } }, "additionalType": "Office supplies" } ``` ### Logbook (Logs) Key distinguishing property: `"@type": "Event"` Logbook semi-adheres to [Schema.org/Event](https://schema.org/Event), simplifying export for rich search results (JSON-LD). **Example:** ```json { "@type": "Event", "_id":"fc869aa0-84d1-458c-8c91-41d707f281ea", "name":"Replaced items in vending machine", "description":"Lemon-lime soda cans replaced with orange flavored ones", "category": "Plot", "startDate":"2020-12-31T09:00:00", "endDate":null, "keywords": ["conspiracy", "gunther"], "created":"2019-12-31T00:00:00", "additionalType": "logbook" } ``` PS: *Category is not a part of Schema.org/Event* ### Messages Untagged messages, either when <code>tag:[]</code> or when tag field missing from document, will be show in 'Inbox'. Key distinguishing property: `"@type": "Message"` `dateRead` is optional, but will be added during certain actions in the messages app. **Example:** ```json { "_id": "22036bd4-d63d-40a4-be0f-f394360e8228", "@type": "Message", "sender": { "name": "Hal 9000" }, "recipient": { "name": "Bender" }, "messageAttachment": { "headline": "Last message", "text": "A bicycle built for two" }, "keywords": ["Infosphere","Central Bureaucracy"], "dateRead": "2020-06-03T01:21:59.694Z", "dateSent": "2020-06-02T14:28:31.925Z" } ``` ### Finance The finance module will be rebuilt to fit Schema.org's model. #### Budget Type: income or expense **Example:** ```json { "_id":"17b6524b-54fc-43d4-929f-2bdd5368637c", "finance": true, "type": "income", "created": "2020-05-22T11:52:09.706Z", "description": "Free form description", "category": "income/expense category", "active": true, "currency": "USD", "amount": 0.0, "name": "Label distinguishing the entry", "institution": "Company name" } ``` #### Transaction Not finalized. Sender and recipient may be connected to contacts in some way. type: will always be 'transaction' **Example:** ```json { "_id":"346d8f3d-8e47-4b27-8809-5400b9a5a60a", "finance": true, "type": "transaction", "created": "2020-05-22T11:52:09.706Z", "description": "Free form description", "category": "transaction category", "amount": 0.0, "sender": "<NAME>", "recipient":"Recipient name" } ``` #### Account balanceUpdatedDate: When the balance was last updated **Example:** ```json { "_id":"875ec6aa-3bc2-4c53-a5b3-080ca7592311", "finance": true, "type": "i.e. cash or credit card", "created": "2020-05-22T11:52:09.706Z", "description": "Free form description", "category": "account category dependent on type", "active": true, "currency": "USD", "balance": 0.0, "name": "<NAME>", "institution": "Company name holding the account", "number": "account identifier issued by the institution", "balanceUpdatedDate": "2020-05-21T11:52:09.706Z" } ```
markdown
Apple had a pretty good quarter — the stock just jumped 4 percent after hours on $45.4 billion in revenue and earnings per share of $1.67. But there’s one dark spot in the company’s results — and that’s performance in Greater China. Apple took in just over $8 billion in revenue from Greater China this quarter, which is less than half of what it made there two years ago in Q2 2015. It’s also a 10 percent decline year-over-year and a 25 percent decline from last quarter. To compare, revenue generated in the Americas was up 13 percent year-over-year, and down only 4 percent from last quarter. Greater China is also the only region that saw negative growth year-over-year. At least Apple seems to be aware of, and working on, the issue. A few weeks ago the company appointed its first-ever managing director of Greater China, who will report directly to CEO Tim Cook and COO Jeff Williams. China was once a bright spot for Apple, and the fastest-growing region for the company. Q2 2015 saw $16.8 billion in revenue from China. Two years later, the company is now making less than half of that. On the earnings call, Apple CEO Tim Cook explained that Hong Kong continues to drag down revenue for all of Greater China, and what they see from the mainland is more encouraging. Cook also said he thinks the popularity of WeChat and other messaging services is a good thing and makes it easier for potential new customers to switch to iOS, because the platform works on iPhone and users’ old phones.
english
package com.yyc.poimap.cluster; import android.graphics.drawable.Drawable; /** * Created by Administrator on 2019/1/29. */ public interface ClusterRender { /** * 根据聚合点的元素数目返回渲染背景样式 */ Drawable getDrawAble(int clusterNum, Cluster cluster); }
java
Honolulu [US], July 11 : The East-West Center's Board of Governors has elected Dr Samir Saran, head of India's leading think tank, as one of the board's five international members. Dr Saran, who is President of the New Delhi-based Observer Research Foundation (ORF), will begin his term at the board's next semiannual meeting in October, a EWC release said. The East-West Center was established by the United States Congress in 1960 as a national educational institution to foster better relations and understanding among the peoples of the United States, Asia, and the Pacific islands through programs of cooperative study, training, and research. The Center's Board of Governors members and its President Suzanne Vares-Lum extended Dr Saran a warm welcome. "We are delighted that Dr. Saran has agreed to join us on the EWC Board of Governors. His expertise as a leading thinker in the critical region of South Asia will be invaluable in helping to guide our special institution," Board Chairman Dr James K. Scott said. Dr Saran said he is honoured to join the East-West Center Board of Governors at a pivotal moment for the future of the Indo-Pacific region. "New partnerships, innovative ideas and strong communities can help us achieve prosperity in the region and beyond, and institutions such as the East-West Center will play a leading role in helping us achieve these. I look forward to working with my fellow board members in furthering the mandate and mission of the Center," he said. The East-West Center Board of Governors consists of 18 members. The Governor of Hawai'i appoints five members, the US Secretary of State appoints five members, and these ten members in turn elect five members from Asia and the Pacific. There are also three ex-officio members - the Governor of Hawai'i, the US Assistant Secretary of State for Educational and Cultural Affairs, and the President of the University of Hawai'i, the release said. The East-West Center promotes better relations and understanding among the people and nations of the United States, Asia, and the Pacific through cooperative study, research, and dialogue. The release said Dr Saran's research focuses on issues of global governance, climate change and energy policy, technology and media, and India's foreign policy. He also spearheads the ORF's efforts to foster new international partnerships and incubate young leaders' networks and youth-led conversations globally. Dr Saran curates the annual Raisina Dialogue, India's flagship platform on geopolitics and geo-economics, and is the founder of the CyFy annual conference on cybersecurity and internet governance. He has authored four books and is featured regularly in Indian and international media. He will be speaking at the East-West Center in Washington on "India in the World" on Tuesday.
english
import React from 'react'; import { MapPolygonExtendedProps } from './lib/types'; declare const _default: React.ForwardRefExoticComponent<{ polygons: MapPolygonExtendedProps[]; newPolygon?: MapPolygonExtendedProps | undefined; onPolygonCreate?: ((polygon: MapPolygonExtendedProps) => void) | undefined; onPolygonChange?: ((_index: number, _polygon: MapPolygonExtendedProps) => void) | undefined; onPolygonRemove?: ((index: number) => void) | undefined; onPolygonSelect?: ((_index: number, _polygon: MapPolygonExtendedProps) => void) | undefined; onPolygonUnselect?: ((_index: number, _polygon: MapPolygonExtendedProps) => void) | undefined; disabled?: boolean | undefined; } & React.RefAttributes<unknown>>; export default _default;
typescript
<gh_stars>100-1000 package slb import ( "bytes" "fmt" "math" ) type node struct { host string index int pending int } func newNode(host string, index int) *node { return &node{ host: host, pending: 0, index: index, } } type nodes []*node func newNodes(hosts []string) nodes { pool := make(nodes, len(hosts)) for i, url := range hosts { pool[i] = newNode(url, i) } return pool } func (n nodes) Len() int { return len(n) } func (n nodes) Less(i, j int) bool { return n[i].pending < n[j].pending } func (n nodes) Swap(i, j int) { n[i], n[j] = n[j], n[i] n[i].index = i n[j].index = j } func (n *nodes) Push(x interface{}) { node := x.(*node) node.index = n.Len() *n = append(*n, node) } func (n *nodes) Pop() interface{} { nodes := *n last := n.Len() - 1 node := nodes[last] *n = nodes[:last] return node } func (n nodes) String() string { var output bytes.Buffer output.WriteString("\nHost with pending tasks: \n") for _, node := range n { str := fmt.Sprintf("%+v\n", *node) output.WriteString(str) } output.WriteString("\n") mean := n.mean() stdDev := n.standardDeviation() stats := fmt.Sprintf("Avg Load: %.2f | Std Dev: %.2f\n", mean, stdDev) output.WriteString(stats) return output.String() } func (n nodes) mean() (mean float64) { length := float64(len(n)) for _, server := range n { mean += float64(server.pending) } return mean / length } func (n nodes) standardDeviation() (stdDev float64) { length := float64(len(n)) mean := n.mean() for _, server := range n { stdDev += math.Pow((float64(server.pending) - mean), 2) } return math.Sqrt((1 / length) * stdDev) }
go
<reponame>33kk/uso-archive { "id": 189536, "name": "Remove video overlay at end of video", "description": "Remove the video/channel popup at the end of a video", "user": { "id": 304229, "name": "massaiTHEdog", "email": "<PASSWORD>", "paypal_email": null, "homepage": null, "about": "Je n'aime pas quand c'est trop lumineux :D", "license": "publicdomain" }, "updated": "2020-09-18T07:19:27.000Z", "weekly_install_count": 0, "total_install_count": 5, "rating": null, "after_screenshot_name": "https://userstyles.org/style_screenshots/189536_additional_37060.jpeg?r=1601885000", "obsoleting_style_id": null, "obsoleting_style_name": null, "obsolete": 0, "admin_delete_reason_id": null, "obsoletion_message": null, "screenshots": [ "https://userstyles.org/style_screenshots/189536_additional_37060.jpeg?r=1601885000", "https://userstyles.org/style_screenshots/189536_additional_37061.jpeg?r=1601885000" ], "license": null, "created": "2020-09-18T07:19:27.000Z", "category": "site", "raw_subcategory": "youtube", "subcategory": "youtube", "additional_info": null, "style_tags": [], "css": "@-moz-document domain(\"youtube.com\") {\r\n.ytp-ce-element-show\r\n{\r\n visibility: collapse !important;\r\n}\r\n}", "discussions": [], "discussionsCount": 0, "commentsCount": 0, "userjs_url": "/styles/userjs/189536/remove-video-overlay-at-end-of-video.user.js", "style_settings": [] }
json
import React from "react"; import "antd/dist/antd.css"; import "../style/style.css"; // reactstrap components import { Container, Row, Col } from "reactstrap"; import { Statistic } from "antd"; import { LikeOutlined, ClockCircleOutlined, SmileOutlined, } from "@ant-design/icons"; // core components function Services() { return ( <> <div className="text-center"> <h4>What We Have Done</h4> <hr style={{ width: "50%", backgroundColor: "#000" }} /> </div> <div className="section"> <Container className="text-center"> <div> <Row> <Col lg="4" sm="12" style={{ marginBottom: "50px" }}> <Statistic title="Projects" value={14} suffix={<LikeOutlined />} /> </Col> <Col lg="4" sm="12" style={{ marginBottom: "50px" }}> <Statistic title="Hours worked" value="12415 Hours" suffix={<ClockCircleOutlined />} /> </Col> <Col lg="4" sm="12" style={{ marginBottom: "50px" }}> <Statistic title="Cups of Tea" value="270" suffix={<SmileOutlined />} /> </Col> </Row> </div> </Container> </div> </> ); } export default Services;
javascript
TEMPLATE = """import numpy as np import unittest from {name}.algorithm.research_algorithm import {name_upper}Estimator class Test{name_upper}Estimator(unittest.TestCase): def test_predict(self): multiplier = 2 input_data = np.random.random([1, 2]) expected_result = input_data * multiplier estimator = {name_upper}Estimator(multiplier=multiplier) result = estimator.predict(input_data) self.assertTrue(np.allclose(result, expected_result)) """ def get_template(name: str): return TEMPLATE.format(name=name.lower(), name_upper=name.capitalize())
python
PRP is available in Guwahati Assam since several years and Arogyam Hair Transplant is the premier center for PRP treatment in Guwahati, PRP price is one of the lowest in Guwahati Assam. If you’ve been struggling with hair fall, you know how upsetting it can be when the volume in your hair dramatically decreases or you see the first signs of balding on your scalp or around your hairline. Don’t worry, though—you have options, and one of those is PRP (Platelet-Rich Plasma). If you don’t know what this innovative treatment option is, here’s a quick primer: PRP is derived from your own blood and uses growth factors to promote healing and reduce inflammation on different parts of the body, including scalp tissue where hair grows. What is PRP? Platelet-rich plasma (PRP) therapy has become a popular treatment for hair loss in recent years. The procedure uses a patient's own blood to stimulate the growth of new hair follicles. PRP can be an effective solution for treating baldness, receding hairlines, and thinning hair. PRP therapy involves harvesting a patient's own blood and then separating out the plasma. The plasma contains higher concentrations of platelets, which are important for healing and regeneration. The PRP is then injected into areas on the scalp that have suffered from hair loss. The platelets release growth factors which stimulate the stem cells to help regenerate new hair follicles. When done correctly, PRP therapy can result in thicker, fuller hair growth after several months of treatment. While results may vary from patient to patient, many people who undergo PRP therapy experience significantly improved hair growth. How can PRP help with hair loss? When it comes to hair loss, there are many treatments available, but PRP (Platelet-Rich Plasma) therapy may be the most promising. PRP is a treatment that uses your body’s own blood plasma to stimulate growth and healing in the scalp. It has been used in plastic surgery and orthopedic medicine for some time, but more recently, doctors have begun to recognize its potential to treat hair loss. PRP therapy works by first extracting a small amount of blood from the patient. This blood is then placed in a centrifuge to separate out the platelets. These platelets are then injected into the scalp and they contain powerful proteins and growth factors that can help promote new hair growth. There have been several studies that have shown positive results from using PRP therapy for treating hair loss. The treatment is relatively safe and the side effects are usually minimal. Additionally, it does not involve taking any medications or undergoing surgery, making it an attractive option for many people who are looking for a non-invasive way to treat their hair loss. If you are looking for a way to reduce your hair fall and increase the overall health of your hair, PRP (Platelet-Rich Plasma) treatment could be a viable option. It is a safe and natural therapy that can be used to stimulate hair growth in people suffering from hair loss. The PRP treatment starts with a simple blood draw. The blood is then placed into a centrifuge and spun for about 8 minutes. This process separates the platelets from the rest of the blood, concentrating them and creating Platelet-Rich Plasma (PRP). Once the PRP is prepared, it is injected into the scalp. The procedure is relatively quick and most patients can expect to be finished within 30-60 minutes. During the injection process, you may experience slight discomfort, but this should pass quickly. After the injection, you will need to wait several weeks before seeing any visible results. Most people experience visible hair growth after three to four months. In some cases, the results may be more dramatic than others, depending on your individual situation. Are there any side effects? When it comes to hair loss, many people are concerned about the potential side effects of treatments. Fortunately, PRP (platelet-rich plasma) therapy is a low-risk treatment that generally has minimal or no side effects. This makes it an attractive option for those who want to treat their hair fall without taking the risk of more aggressive therapies. As with any medical treatment, there are some potential risks associated with PRP. However, these risks are generally minor and can be minimized by following all of your doctor's instructions before and after the procedure. The most common side effects of PRP are temporary discomfort during the injection process, as well as minor swelling, bruising, and redness at the injection site. It is important to note that PRP is still a relatively new treatment and there may be additional side effects that have yet to be discovered. Therefore, it is important to discuss the potential risks and benefits of PRP with your doctor before beginning treatment. Overall, PRP is a safe and effective treatment for hair fall that typically has minimal side effects. Be sure to talk to your doctor before starting any kind of treatment, so they can help you decide if PRP is the right solution for you. How much does PRP treatment cost? PRP (platelet-rich plasma) treatment is a promising solution for those suffering from hair loss, but many people have one big question on their minds: how much does it cost? The cost of PRP treatment varies widely depending on where you get it done and the extent of your hair loss. On average, the cost of a single session of PRP therapy can range from around Rs 4000 to Rs 8000 in Guwahati Assam. Some clinics may charge more or less than this, so it's important to shop around and do some research before you commit to any particular clinic. In addition to the cost of the actual treatment, you may also need to factor in other costs such as follow-up visits and medications. It's important to ask your provider about all associated costs upfront so that you can factor them into your budget. At Arogyam Hair Transplant Clinic the cost is Rs 5000 per session. We use the most advanced US made vials for PRP and results are excellent. We are the premier center for PRP in Guwahati Assam. Keep in mind that PRP is not a quick fix – it can take several weeks to months before you start to see results. Therefore, it's important to maintain realistic expectations and be patient as you go through the treatment process. With proper care and dedication, however, PRP can be a great long-term solution for those suffering from hair loss. Are you experiencing excessive hair fall and can’t seem to find a solution? Look no further than PRP (Platelet-rich Plasma) in Guwahati Assam. This innovative treatment has quickly become a popular choice for individuals who are struggling with hair loss, as it provides quick and lasting results with minimal downtime. PRP works by taking a small amount of your own blood, separating out the plasma, and then injecting it back into the scalp. This introduces vital nutrients, growth factors, and proteins to the area that can help repair damaged hair follicles and stimulate new hair growth. The entire process is done in-office, and there’s no need for any anesthesia or scalp preparation. The main benefit of PRP is that it helps to reverse hair thinning caused by genetics or other factors, rather than simply hiding the problem with medications or other treatments. With regular maintenance appointments, many patients have seen a significant improvement in their hair growth after just one session. If you’re ready to give PRP a try, visit the Hair Clinic in Guwahati Assam for a consultation. Our experienced team will evaluate your condition and recommend the best course of treatment for your individual needs. With our help, you can finally put an end to your hair fall and start enjoying thicker, fuller hair. Come to Arogyam Hair Transplant and Cosmetic Surgery clinic for the latest PRP techniques. Call at 7637089211 for further information and appointment. Arogyam Hair Transplant Clinic takes several steps to ensure that quality is maintained for each and every patient. The key to quality maintenance is to implement quantizable quality standards and maintain proper documentation and review of processes. Downtown Hospital is an ISO 9001:2008 and NABH accredited hospital which demands strict adherence to quality control.Steps taken are: Safety assurance: all procedures are done in the main OT of Downtown Hospital with its full complement of anesthesiologists and critical care specialists. Hence patients are assured of full safety standards at the same level as that of major surgeries including transplant surgeries. Sterilization assurance: since procedures are done in the major OT full sterilization is maintained. Fumigation is done every week and swab tests are done to check for contamination. Best instrumentation: Arogyam Hair Transplant Clinic uses the best available instruments like 6X Heine Loupe for precision and accuracy, Blunt Titanium punches which avoids damage and transection of the Follicular Units, Choi implanters to standardise the process of planting and prevent damage during planting, Major OT level sterilization, fumigation and autoclaving of all instruments, etc. Efficiency count: Efficiency counts for FUE like transection rates and speed of transplant are noted and documented for each case and reviewed every 10 cases. Arogyam Hair Transplant achieves international standards of transection and speed consistently. Counting trays: Counting trays are used to contain the follicular units and all patients are given photographs on their mobiles which they can use to easily count the number of follicular units taken out so that they can be sure that they have received the correct number of FU's. Dr. P. J. Mazumdar is the first and only American Board Certified Diplomate of the American Board of Hair Restoration Surgery and all procedures are done following the ethical and technical guidelines of the American Board of Hair Restoration Surgery and the International Society for Hair Restoration Surgery. As such, patients can be assured of receiving full professional care as per International standards approved by the ABHRS and ISHRS. Correct recepient density: To ensure correct recepient density, 'density stamps' are used to ensure proper density is achieved. Angle and direction of hair is meticulously maintained. Out of body time: The out of body time, the time for which the follicular unit is outside the body, is the most critical factor for success in hair transplant. Aroyam Hair Transplant follows a special procedure to ensure that this time is the minimum. This is done by doing only 1000 follicular units at a time and then replanting them. This ensures that time out of body is less than or equal to1 hour only. This is the shortest period acheivable. Many centers do upto 2000-2500 follicular units at a time so that time out of body goes upto 4-5 hours. We are proud of our time out of body quantum. Though this may cause some sacrifice of time but results are more important. Follow up: follow up period is critical for the patient when there are many doubts and anxieties in his mind. In our clinic, Dr. P. J. Mazumdar will remain always accessible to the patient directly on his personal mobile for any questions the patient may have during this period. Disclaimer: Results can vary from person to person. Hair Transplant is a surgical procedure and consists only of removing hair from hair growing regions and restoring it to hair deficient regions. Privacy Policy: We use only the information submitted by you through the contact form. We do not share this data with any third party. We use Google Analytics to analyse the log data. For full privacy policy, read up here. The academic certificates of Dr. P. J. Mazumdar may be examined here: Academic Certificates. His resume can be perused here: Resume. To find the contact address and other details, go to Contact. The blog contains various blog posts mainly on Hair Transplant. To see photos of hair transplant cases done in Downtown Hair transplant clinic, go to Photos>Results from the Navigation menu. To see videos related to Hair Transplant Procedure, go to Photos>Videos from the Navigation menu.
english
After 12 hours of a massive fire that broke out in a rubber factory in Malviya Nagar, Delhi the Indian Air Force launched a Mi-17 helicopter attached with a Bambi bucket to douse the fire. According to agency reports, no casualty was reported. Fire tenders rushed to the spot, but the fire was not doused till Wednesday morning when a decision was taken to press choppers into action. The police evacuated the area to ensure the safety of the people residing near the godown. According to a news agency, a call was received at around 5 pm on Tuesday and 35 fire tenders were rushed to the factory to bring the fire blaze under control. According to reports the fire has been termed as the highest category blaze. Media reports also say that the fire might have caused by rubber material loaded in a truck parked near the godown. The truck caught fire and spread quickly because of the strong winds. “The fire is in rubber sheets stored in the godown. No casualty has been reported so far and the nearby area has been temporarily evacuated for security reasons,” stated an officer. A local AAP MLA alleged that a number of illegal godowns in the area has been one of the prime reasons behind such mishaps. As an independent media platform, we do not take advertisements from governments and corporate houses. It is you, our readers, who have supported us on our journey to do honest and unbiased journalism. Please contribute, so that we can continue to do the same in future.
english
<filename>dojo/tool_config/urls.py from django.conf.urls import url from django.contrib import admin from django.apps import apps from . import views urlpatterns = [ url(r'^tool_config/add', views.new_tool_config, name='add_tool_config'), url(r'^tool_config/(?P<ttid>\d+)/edit$', views.edit_tool_config, name='edit_tool_config'), url(r'^tool_config$', views.tool_config, name='tool_config'), ]
python
<gh_stars>10-100 /************************************************************* * * Copyright (c) 2011-2021 <NAME> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import {xypicGlobalContext} from "../core/xypicGlobalContext.js"; import {XypicUtil} from "../util/XypicUtil.js"; import {List} from "../fp/List.js"; import {Frame} from "./Frames.js"; export class Shape { // <<interface>> /** * 図形を描画する。 * @param {Graphics.SVG} svg SVG */ // draw function (svg) {} /** * Bounding Boxを返す。 * @returns {Frame.Rect} Bounding Box (ない場合はundefined) */ // getBoundingBox() {} /** * 中身が空であるかどうかを返す。 * @returns {boolean} true:空である、false:空でない */ get isNone() { return false; } }; Shape.NoneShape = class Shape_NoneShape extends Shape { constructor() { super(); } draw(svg) { } getBoundingBox() { return undefined; } toString() { return "NoneShape"; } get isNone() { return true; } }; Shape.none = new Shape.NoneShape(); Shape.InvisibleBoxShape = class Shape_InvisibleBoxShape extends Shape { constructor(bbox) { super(); this.bbox = bbox; } draw(svg) { } getBoundingBox() { return this.bbox; } toString() { return "InvisibleBoxShape[bbox:" + this.bbox.toString() + "]"; } }; Shape.TranslateShape = class Shape_TranslateShape extends Shape { constructor(dx, dy, shape) { super(); this.dx = dx; this.dy = dy; this.shape = shape; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { var g = svg.createGroup(svg.transformBuilder().translate(this.dx, this.dy)); this.shape.draw(g); } getBoundingBox() { var bbox = this.shape.getBoundingBox(); if (bbox === undefined) { return undefined; } return new Frame.Rect(bbox.x + this.dx, bbox.y + this.dy, bbox); } toString() { return "TranslateShape[dx:" + this.dx + ", dy:" + this.dy + ", shape:" + this.shape.toString() + "]"; } }; Shape.CompositeShape = class Shape_CompositeShape extends Shape { constructor(foregroundShape, backgroundShape) { super(); this.foregroundShape = foregroundShape; this.backgroundShape = backgroundShape; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { this.backgroundShape.draw(svg); this.foregroundShape.draw(svg); } getBoundingBox() { return Frame.combineRect(this.foregroundShape.getBoundingBox(), this.backgroundShape.getBoundingBox()); } toString() { return "(" + this.foregroundShape.toString() + ", " + this.backgroundShape.toString() + ")"; } }; Shape.ChangeColorShape = class Shape_ChangeColorShape extends Shape { constructor(color, shape) { super(); this.color = color; this.shape = shape; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { var g = svg.createChangeColorGroup(this.color); this.shape.draw(g); } getBoundingBox() { return this.shape.getBoundingBox(); } toString() { return "" + this.shape + ", color:" + this.color; } }; Shape.CircleSegmentShape = class Shape_CircleSegmentShape extends Shape { constructor(x, y, sx, sy, r, large, flip, ex, ey) { super(); this.x = x; this.y = y; this.sx = sx; this.sy = sy; this.r = r; this.large = large; this.flip = flip; this.ex = ex; this.ey = ey; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { svg.createSVGElement("path", { d:"M" + xypicGlobalContext.measure.em2px(this.sx) + "," + xypicGlobalContext.measure.em2px(-this.sy) + " A" + xypicGlobalContext.measure.em2px(this.r) + "," + xypicGlobalContext.measure.em2px(this.r) + " 0 " + this.large + "," + this.flip + " " + xypicGlobalContext.measure.em2px(this.ex) + "," + xypicGlobalContext.measure.em2px(-this.ey) }); } getBoundingBox() { return new Frame.Ellipse(this.x, this.y, this.r, this.r, this.r, this.r); } toString() { return "CircleSegmentShape[x:" + this.x + ", y:" + this.y + ", sx:" + this.sx + ", sy:" + this.sy + ", r:" + this.r + ", large:" + this.large + ", flip:" + this.flip + ", ex:" + this.ex + ", ey:" + this.ey + "]"; } }; Shape.FullCircleShape = class Shape_FullCircleShape extends Shape { constructor(x, y, r) { super(); this.x = x; this.y = y; this.r = r; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { svg.createSVGElement("circle", { cx:xypicGlobalContext.measure.em2px(this.x), cy:xypicGlobalContext.measure.em2px(-this.y), r:xypicGlobalContext.measure.em2px(this.r) }); } getBoundingBox() { return new Frame.Ellipse(this.x, this.y, this.r, this.r, this.r, this.r); } toString() { return "FullCircleShape[x:" + this.x + ", y:" + this.y + ", r:" + this.r + "]"; } }; Shape.RectangleShape = class Shape_RectangleShape extends Shape { constructor(x, y, left, right, up, down, r, isDoubled, color, dasharray, fillColor, hideLine) { super(); this.x = x; this.y = y; this.left = left; this.right = right; this.up = up; this.down = down; this.r = r; this.isDoubled = isDoubled; this.color = color; this.dasharray = dasharray; this.fillColor = fillColor; this.hideLine = hideLine || false; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { var def; def = { x:xypicGlobalContext.measure.em2px(this.x - this.left), y:-xypicGlobalContext.measure.em2px(this.y + this.up), width:xypicGlobalContext.measure.em2px(this.left + this.right), height:xypicGlobalContext.measure.em2px(this.up + this.down), rx:xypicGlobalContext.measure.em2px(this.r) }; if (this.dasharray !== undefined) { def["stroke-dasharray"] = this.dasharray; } if (this.hideLine) { def["stroke"] = "none"; } else if (this.color !== undefined) { def["stroke"] = this.color; } if (this.fillColor !== undefined) { def["fill"] = this.fillColor; } svg.createSVGElement("rect", def); if (this.isDoubled) { def = { x:xypicGlobalContext.measure.em2px(this.x - this.left + xypicGlobalContext.measure.thickness), y:-xypicGlobalContext.measure.em2px(this.y + this.up - xypicGlobalContext.measure.thickness), width:xypicGlobalContext.measure.em2px(this.left + this.right - 2 * xypicGlobalContext.measure.thickness), height:xypicGlobalContext.measure.em2px(this.up + this.down - 2 * xypicGlobalContext.measure.thickness), rx:xypicGlobalContext.measure.em2px(Math.max(this.r - xypicGlobalContext.measure.thickness, 0)) }; if (this.dasharray !== undefined) { def["stroke-dasharray"] = this.dasharray; } if (this.hideLine) { def["stroke"] = "none"; } else if (this.color !== undefined) { def["stroke"] = this.color; } if (this.fillColor !== undefined) { def["fill"] = this.fillColor; } svg.createSVGElement("rect", def); } } getBoundingBox() { return new Frame.Rect(this.x, this.y, { l:this.left, r:this.right, u:this.up, d:this.down }); } toString() { return "RectangleShape[x:" + this.x + ", y:" + this.y + ", left:" + this.left + ", right:" + this.right + ", up:" + this.up + ", down:" + this.down + ", r:" + this.r + ", isDouble:" + this.isDouble + ", dasharray:" + this.dasharray + "]"; } }; Shape.EllipseShape = class Shape_EllipseShape extends Shape { constructor(x, y, rx, ry, isDoubled, color, dasharray, fillColor, hideLine) { super(); this.x = x; this.y = y; this.rx = rx; this.ry = ry; this.isDoubled = isDoubled; this.color = color; this.dasharray = dasharray; this.fillColor = fillColor; this.hideLine = hideLine || false; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { var def; def = { cx:xypicGlobalContext.measure.em2px(this.x), cy:-xypicGlobalContext.measure.em2px(this.y), rx:xypicGlobalContext.measure.em2px(this.rx), ry:xypicGlobalContext.measure.em2px(this.ry) }; if (this.dasharray !== undefined) { def["stroke-dasharray"] = this.dasharray; } if (this.hideLine) { def["stroke"] = "none"; } else if (this.color !== undefined) { def["stroke"] = this.color; } if (this.fillColor !== undefined) { def["fill"] = this.fillColor; } svg.createSVGElement("ellipse", def); if (this.isDoubled) { def = { cx:xypicGlobalContext.measure.em2px(this.x), cy:-xypicGlobalContext.measure.em2px(this.y), rx:xypicGlobalContext.measure.em2px(Math.max(this.rx - xypicGlobalContext.measure.thickness)), ry:xypicGlobalContext.measure.em2px(Math.max(this.ry - xypicGlobalContext.measure.thickness)) }; if (this.dasharray !== undefined) { def["stroke-dasharray"] = this.dasharray; } if (this.hideLine) { def["stroke"] = "none"; } else if (this.color !== undefined) { def["stroke"] = this.color; } if (this.fillColor !== undefined) { def["fill"] = this.fillColor; } svg.createSVGElement("ellipse", def); } } getBoundingBox() { return new Frame.Rect(this.x, this.y, { l:this.rx, r:this.rx, u:this.ry, d:this.ry }); } toString() { return "EllipseShape[x:" + this.x + ", y:" + this.y + ", rx:" + this.rx + ", ry:" + this.ry + ", isDoubled:" + this.isDoubled + ", dasharray:" + this.dasharray + "]"; } }; Shape.BoxShadeShape = class Shape_BoxShadeShape extends Shape { constructor(x, y, left, right, up, down, depth, color) { super(); this.x = x; this.y = y; this.left = left; this.right = right; this.up = up; this.down = down; this.depth = depth; this.color = color || "currentColor"; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { var x = xypicGlobalContext.measure.em2px(this.x); var y = xypicGlobalContext.measure.em2px(this.y); var l = xypicGlobalContext.measure.em2px(this.left); var r = xypicGlobalContext.measure.em2px(this.right); var u = xypicGlobalContext.measure.em2px(this.up); var d = xypicGlobalContext.measure.em2px(this.down); var depth = xypicGlobalContext.measure.em2px(this.depth); svg.createSVGElement("path", { d: "M" + (x - l + depth) + "," + (-y + d) + "L" + (x + r) + "," + (-y + d) + "L" + (x + r) + "," + (-y - u + depth) + "L" + (x + r + depth) + "," + (-y - u + depth) + "L" + (x + r + depth) + "," + (-y + d + depth) + "L" + (x - l + depth) + "," + (-y + d + depth) + "Z", stroke: this.color, fill: this.color }); } getBoundingBox() { return new Frame.Rect(this.x, this.y, { l:this.left, r:this.right + this.depth, u:this.up, d:this.down + this.depth }); } toString() { return "RectangleShape[x:" + this.x + ", y:" + this.y + ", left:" + this.left + ", right:" + this.right + ", up:" + this.up + ", down:" + this.down + ", depth:" + this.depth + "]"; } }; Shape.LeftBrace = class Shape_LeftBrace extends Shape { constructor(x, y, up, down, degree, color) { super(); this.x = x; this.y = y; this.up = up; this.down = down; this.degree = degree; this.color = color || "currentColor"; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { var scale = xypicGlobalContext.measure.oneem; var down = Math.max(0.759375 + 0.660375, this.down / scale * 1.125) - 0.660375; var up = - Math.max(0.759375 + 0.660375, this.up / scale * 1.125) + 0.660375; var d; d = "M" + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(down) + "T" + xypicGlobalContext.measure.em2px(-0.068625) + " " + xypicGlobalContext.measure.em2px(0.07875 + down) + "Q" + xypicGlobalContext.measure.em2px(-0.068625) + " " + xypicGlobalContext.measure.em2px(0.190125 + down) + " " + xypicGlobalContext.measure.em2px(-0.0585) + " " + xypicGlobalContext.measure.em2px(0.250875 + down) + "T" + xypicGlobalContext.measure.em2px(-0.01125) + " " + xypicGlobalContext.measure.em2px(0.387 + down) + "Q" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(0.55575 + down) + " " + xypicGlobalContext.measure.em2px(0.2475) + " " + xypicGlobalContext.measure.em2px(0.6525 + down) + "L" + xypicGlobalContext.measure.em2px(0.262125) + " " + xypicGlobalContext.measure.em2px(0.660375 + down) + "L" + xypicGlobalContext.measure.em2px(0.3015) + " " + xypicGlobalContext.measure.em2px(0.660375 + down) + "L" + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(0.653625 + down) + "V" + xypicGlobalContext.measure.em2px(0.622125 + down) + "Q" + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(0.60975 + down) + " " + xypicGlobalContext.measure.em2px(0.2925) + " " + xypicGlobalContext.measure.em2px(0.60075 + down) + "Q" + xypicGlobalContext.measure.em2px(0.205875) + " " + xypicGlobalContext.measure.em2px(0.541125 + down) + " " + xypicGlobalContext.measure.em2px(0.149625) + " " + xypicGlobalContext.measure.em2px(0.44775 + down) + "T" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(0.239625 + down) + "Q" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(0.2385 + down) + " " + xypicGlobalContext.measure.em2px(0.073125) + " " + xypicGlobalContext.measure.em2px(0.235125 + down) + "Q" + xypicGlobalContext.measure.em2px(0.068625) + " " + xypicGlobalContext.measure.em2px(0.203625 + down) + " " + xypicGlobalContext.measure.em2px(0.0675) + " " + xypicGlobalContext.measure.em2px(0.041625 + down) + "L" + xypicGlobalContext.measure.em2px(0.0675) + " " + xypicGlobalContext.measure.em2px(0.75825) + "Q" + xypicGlobalContext.measure.em2px(0.0675) + " " + xypicGlobalContext.measure.em2px(0.496125) + " " + xypicGlobalContext.measure.em2px(0.066375) + " " + xypicGlobalContext.measure.em2px(0.486) + "Q" + xypicGlobalContext.measure.em2px(0.05625) + " " + xypicGlobalContext.measure.em2px(0.336375) + " " + xypicGlobalContext.measure.em2px(-0.021375) + " " + xypicGlobalContext.measure.em2px(0.212625) + "T" + xypicGlobalContext.measure.em2px(-0.226125) + " " + xypicGlobalContext.measure.em2px(0.010125) + "L" + xypicGlobalContext.measure.em2px(-0.241875) + " 0" + "L" + xypicGlobalContext.measure.em2px(-0.226125) + " " + xypicGlobalContext.measure.em2px(-0.010125) + "Q" + xypicGlobalContext.measure.em2px(-0.106875) + " " + xypicGlobalContext.measure.em2px(-0.084375) + " " + xypicGlobalContext.measure.em2px(-0.025875) + " " + xypicGlobalContext.measure.em2px(-0.207) + "T" + xypicGlobalContext.measure.em2px(0.066375) + " " + xypicGlobalContext.measure.em2px(-0.486) + "Q" + xypicGlobalContext.measure.em2px(0.0675) + " " + xypicGlobalContext.measure.em2px(-0.496125) + " " + xypicGlobalContext.measure.em2px(0.0675) + " " + xypicGlobalContext.measure.em2px(-0.75825) + "L" + xypicGlobalContext.measure.em2px(0.0675) + " " + xypicGlobalContext.measure.em2px(-0.041625 + up) + "Q" + xypicGlobalContext.measure.em2px(0.068625) + " " + xypicGlobalContext.measure.em2px(-0.203625 + up) + " " + xypicGlobalContext.measure.em2px(0.073125) + " " + xypicGlobalContext.measure.em2px(-0.235125 + up) + "Q" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(-0.2385 + up) + " " + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(-0.239625 + up) + "Q" + xypicGlobalContext.measure.em2px(0.093375) + " " + xypicGlobalContext.measure.em2px(-0.354375 + up) + " " + xypicGlobalContext.measure.em2px(0.149625) + " " + xypicGlobalContext.measure.em2px(-0.44775 + up) + "T" + xypicGlobalContext.measure.em2px(0.2925) + " " + xypicGlobalContext.measure.em2px(-0.60075 + up) + "Q" + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(-0.60975 + up) + " " + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(-0.622125 + up) + "L" + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(-0.653625 + up) + "L" + xypicGlobalContext.measure.em2px(0.3015) + " " + xypicGlobalContext.measure.em2px(-0.660375 + up) + "L" + xypicGlobalContext.measure.em2px(0.262125) + " " + xypicGlobalContext.measure.em2px(-0.660375 + up) + "L" + xypicGlobalContext.measure.em2px(0.2475) + " " + xypicGlobalContext.measure.em2px(-0.6525 + up) + "Q" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(-0.55575 + up) + " " + xypicGlobalContext.measure.em2px(-0.01125) + " " + xypicGlobalContext.measure.em2px(-0.387 + up) + "Q" + xypicGlobalContext.measure.em2px(-0.048375) + " " + xypicGlobalContext.measure.em2px(-0.311625 + up) + " " + xypicGlobalContext.measure.em2px(-0.0585) + " " + xypicGlobalContext.measure.em2px(-0.250875 + up) + "T" + xypicGlobalContext.measure.em2px(-0.068625) + " " + xypicGlobalContext.measure.em2px(-0.07875 + up) + "Q" + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(up) + " " + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(up) + "L" + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(-0.759375) + "V" + xypicGlobalContext.measure.em2px(-0.5985) + "Q" + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(-0.47925) + " " + xypicGlobalContext.measure.em2px(-0.075375) + " " + xypicGlobalContext.measure.em2px(-0.41175) + "T" + xypicGlobalContext.measure.em2px(-0.11475) + " " + xypicGlobalContext.measure.em2px(-0.27) + "Q" + xypicGlobalContext.measure.em2px(-0.133875) + " " + xypicGlobalContext.measure.em2px(-0.2205) + " " + xypicGlobalContext.measure.em2px(-0.160875) + " " + xypicGlobalContext.measure.em2px(-0.17775) + "T" + xypicGlobalContext.measure.em2px(-0.212625) + " " + xypicGlobalContext.measure.em2px(-0.106875) + "T" + xypicGlobalContext.measure.em2px(-0.25875) + " " + xypicGlobalContext.measure.em2px(-0.06075) + "T" + xypicGlobalContext.measure.em2px(-0.293625) + " " + xypicGlobalContext.measure.em2px(-0.0315) + "T" + xypicGlobalContext.measure.em2px(-0.307125) + " " + xypicGlobalContext.measure.em2px(-0.02025) + "Q" + xypicGlobalContext.measure.em2px(-0.30825) + " " + xypicGlobalContext.measure.em2px(-0.019125) + " " + xypicGlobalContext.measure.em2px(-0.30825) + " 0" + "T" + xypicGlobalContext.measure.em2px(-0.307125) + " " + xypicGlobalContext.measure.em2px(0.02025) + "Q" + xypicGlobalContext.measure.em2px(-0.307125) + " " + xypicGlobalContext.measure.em2px(0.021375) + " " + xypicGlobalContext.measure.em2px(-0.284625) + " " + xypicGlobalContext.measure.em2px(0.03825) + "T" + xypicGlobalContext.measure.em2px(-0.2295) + " " + xypicGlobalContext.measure.em2px(0.091125) + "T" + xypicGlobalContext.measure.em2px(-0.162) + " " + xypicGlobalContext.measure.em2px(0.176625) + "T" + xypicGlobalContext.measure.em2px(-0.10125) + " " + xypicGlobalContext.measure.em2px(0.30825) + "T" + xypicGlobalContext.measure.em2px(-0.068625) + " " + xypicGlobalContext.measure.em2px(0.482625) + "Q" + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(0.496125) + " " + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(0.759375) + "Z"; svg.createSVGElement("path", { d:d, fill:this.color, stroke:this.color, "stroke-width":"0pt", transform:"translate(" + xypicGlobalContext.measure.em2px(this.x) + "," + xypicGlobalContext.measure.em2px(-this.y) +") rotate(" + (-this.degree) + ") scale(" + (scale / 1.125) + ")" }); } getBoundingBox() { var scale = xypicGlobalContext.measure.oneem; return new Frame.Rect(this.x, this.y, { l:0.274 * scale, r:0.274 * scale, u:Math.max((0.759375 + 0.660375) * scale / 1.125, this.up), d:Math.max((0.759375 + 0.660375) * scale / 1.125, this.down) }).rotate(this.degree * Math.PI / 180); } toString() { return "LeftBrace[x:" + this.x + ", y:" + this.y + ", up:" + this.up + ", down:" + this.down + "]"; } }; Shape.LeftParenthesis = class Shape_LeftParenthesis extends Shape { constructor(x, y, height, degree, color) { super(); this.x = x; this.y = y; this.height = height; this.degree = degree; this.color = color || "currentColor"; XypicUtil.memoize(this, "getBoundingBox"); } draw(svg) { var scale = xypicGlobalContext.measure.oneem; var down = Math.max(0.660375, this.height / 2 / scale * 1.125) - 0.660375; var up = -down; var d; d = "M" + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(down) + "T" + xypicGlobalContext.measure.em2px(-0.068625) + " " + xypicGlobalContext.measure.em2px(0.07875 + down) + "Q" + xypicGlobalContext.measure.em2px(-0.068625) + " " + xypicGlobalContext.measure.em2px(0.190125 + down) + " " + xypicGlobalContext.measure.em2px(-0.0585) + " " + xypicGlobalContext.measure.em2px(0.250875 + down) + "T" + xypicGlobalContext.measure.em2px(-0.01125) + " " + xypicGlobalContext.measure.em2px(0.387 + down) + "Q" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(0.55575 + down) + " " + xypicGlobalContext.measure.em2px(0.2475) + " " + xypicGlobalContext.measure.em2px(0.6525 + down) + "L" + xypicGlobalContext.measure.em2px(0.262125) + " " + xypicGlobalContext.measure.em2px(0.660375 + down) + "L" + xypicGlobalContext.measure.em2px(0.3015) + " " + xypicGlobalContext.measure.em2px(0.660375 + down) + "L" + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(0.653625 + down) + "V" + xypicGlobalContext.measure.em2px(0.622125 + down) + "Q" + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(0.60975 + down) + " " + xypicGlobalContext.measure.em2px(0.2925) + " " + xypicGlobalContext.measure.em2px(0.60075 + down) + "Q" + xypicGlobalContext.measure.em2px(0.205875) + " " + xypicGlobalContext.measure.em2px(0.541125 + down) + " " + xypicGlobalContext.measure.em2px(0.149625) + " " + xypicGlobalContext.measure.em2px(0.44775 + down) + "T" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(0.239625 + down) + "Q" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(0.2385 + down) + " " + xypicGlobalContext.measure.em2px(0.073125) + " " + xypicGlobalContext.measure.em2px(0.235125 + down) + "Q" + xypicGlobalContext.measure.em2px(0.068625) + " " + xypicGlobalContext.measure.em2px(0.203625 + down) + " " + xypicGlobalContext.measure.em2px(0.0675) + " " + xypicGlobalContext.measure.em2px(0.041625 + down) + "L" + xypicGlobalContext.measure.em2px(0.0675) + " " + xypicGlobalContext.measure.em2px(-0.041625 + up) + "Q" + xypicGlobalContext.measure.em2px(0.068625) + " " + xypicGlobalContext.measure.em2px(-0.203625 + up) + " " + xypicGlobalContext.measure.em2px(0.073125) + " " + xypicGlobalContext.measure.em2px(-0.235125 + up) + "Q" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(-0.2385 + up) + " " + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(-0.239625 + up) + "Q" + xypicGlobalContext.measure.em2px(0.093375) + " " + xypicGlobalContext.measure.em2px(-0.354375 + up) + " " + xypicGlobalContext.measure.em2px(0.149625) + " " + xypicGlobalContext.measure.em2px(-0.44775 + up) + "T" + xypicGlobalContext.measure.em2px(0.2925) + " " + xypicGlobalContext.measure.em2px(-0.60075 + up) + "Q" + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(-0.60975 + up) + " " + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(-0.622125 + up) + "L" + xypicGlobalContext.measure.em2px(0.30825) + " " + xypicGlobalContext.measure.em2px(-0.653625 + up) + "L" + xypicGlobalContext.measure.em2px(0.3015) + " " + xypicGlobalContext.measure.em2px(-0.660375 + up) + "L" + xypicGlobalContext.measure.em2px(0.262125) + " " + xypicGlobalContext.measure.em2px(-0.660375 + up) + "L" + xypicGlobalContext.measure.em2px(0.2475) + " " + xypicGlobalContext.measure.em2px(-0.6525 + up) + "Q" + xypicGlobalContext.measure.em2px(0.07425) + " " + xypicGlobalContext.measure.em2px(-0.55575 + up) + " " + xypicGlobalContext.measure.em2px(-0.01125) + " " + xypicGlobalContext.measure.em2px(-0.387 + up) + "Q" + xypicGlobalContext.measure.em2px(-0.048375) + " " + xypicGlobalContext.measure.em2px(-0.311625 + up) + " " + xypicGlobalContext.measure.em2px(-0.0585) + " " + xypicGlobalContext.measure.em2px(-0.250875 + up) + "T" + xypicGlobalContext.measure.em2px(-0.068625) + " " + xypicGlobalContext.measure.em2px(-0.07875 + up) + "Q" + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(up) + " " + xypicGlobalContext.measure.em2px(-0.0675) + " " + xypicGlobalContext.measure.em2px(up) + "Z"; svg.createSVGElement("path", { d:d, fill:this.color, stroke:this.color, "stroke-width":"0pt", transform:"translate(" + xypicGlobalContext.measure.em2px(this.x) + "," + xypicGlobalContext.measure.em2px(-this.y) +") rotate(" + (-this.degree) + ") scale(" + (scale / 1.125) + ")" }); } getBoundingBox() { var scale = xypicGlobalContext.measure.oneem; return new Frame.Rect(this.x, this.y, { l:0.06 * scale, r:0.274 * scale, u:Math.max(0.660375 * scale / 1.125, this.height / 2), d:Math.max(0.660375 * scale / 1.125, this.height / 2) }).rotate(this.degree * Math.PI / 180); } toString() { return "LeftBrace[x:" + this.x + ", y:" + this.y + ", up:" + this.up + ", down:" + this.down + "]"; } }; Shape.TextShape = class Shape_TextShape extends Shape { constructor(c, math) { super(); this.c = c; this.math = math; this.originalBBox = undefined; XypicUtil.memoize(this, "getBoundingBox"); XypicUtil.memoize(this, "getOriginalReferencePoint"); } draw(svg) { this._draw(svg, false); } getBoundingBox() { return this._draw(xypicGlobalContext.svgForTestLayout, true); } _draw(svg, test) { return svg.xypicWrapper.drawTextObject(this, svg, test); } getOriginalReferencePoint() { this.getBoundingBox(); var originalBBox = this.originalBBox; var c = this.c; var H = originalBBox.H; var D = originalBBox.D; return new Frame.Point(c.x, c.y - (H - D) / 2); } toString() { return "TextShape[c:" + this.c.toString() + ", math:" + this.math.toString() + "]"; } }; Shape.ImageShape = class Shape_ImageShape extends Shape { constructor(c, url) { super(); this.c = c; this.url = url; XypicUtil.memoize(this, "getBoundingBox"); XypicUtil.memoize(this, "getOriginalReferencePoint"); } draw(svg) { var c = this.c; svg.createSVGElement("image", { x: xypicGlobalContext.measure.em2px(c.x - c.l), y: xypicGlobalContext.measure.em2px(-c.y - c.u), width: xypicGlobalContext.measure.em2px(c.l + c.r), height: xypicGlobalContext.measure.em2px(c.u + c.d), preserveAspectRatio: "none", "xlink:href": this.url }); } getBoundingBox() { return this.c; } getOriginalReferencePoint() { return this.c; } toString() { return "ImageShape[c:" + this.c.toString() + ", height:" + this.height + ", width:" + this.width + ", url:" + this.url + "]"; } }; Shape.ArrowheadShape = class Shape_ArrowheadShape extends Shape { constructor() { super(); } draw(svg) { var g = svg.createGroup(svg.transformBuilder().translate(this.c.x, this.c.y).rotateRadian(this.angle)); this.drawDelegate(g); } getBoundingBox() { return this.c.toRect(this.getBox()).rotate(this.angle); } toString() { return "ArrowheadShape[c:" + this.c.toString() + ", angle:" + this.angle + "]"; } }; // @2{>} Shape.GT2ArrowheadShape = class Shape_GT2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.456 * scale, r:0, d:0.229 * scale, u:0.229 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.213 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var gu = svg.createGroup(svg.transformBuilder().rotateDegree(-10)); var gd = svg.createGroup(svg.transformBuilder().rotateDegree(10)); gu.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + ","+xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @3{>} Shape.GT3ArrowheadShape = class Shape_GT3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.507 * scale, r:0, d:0.268 * scale, u:0.268 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.325 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var gu = svg.createGroup(svg.transformBuilder().rotateDegree(-15)); var gd = svg.createGroup(svg.transformBuilder().rotateDegree(15)); gu.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("line", { x1:0, y1:0, x2:xypicGlobalContext.measure.em2px(-0.507 * scale), y2:0 }); gd.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @^{>} Shape.UpperGTArrowheadShape = class Shape_UpperGTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.489 * scale, r:0, d:0, u:0.147 * scale }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); } }; // @_{>} Shape.LowerGTArrowheadShape = class Shape_LowerGTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.489 * scale, r:0, d:0.147 * scale, u:0 }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @{>} Shape.GTArrowheadShape = class Shape_GTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.489 * scale, r:0, d:0.147 * scale, u:0.147 * scale }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); } }; // @2{<} Shape.LT2ArrowheadShape = class Shape_LT2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.456 * scale, d:0.229 * scale, u:0.229 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.213 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var gu = svg.createGroup(svg.transformBuilder().rotateDegree(10)); var gd = svg.createGroup(svg.transformBuilder().rotateDegree(-10)); gu.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @3{<} Shape.LT3ArrowheadShape = class Shape_LT3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.507 * scale, d:0.268 * scale, u:0.268 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.325 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var gu = svg.createGroup(svg.transformBuilder().rotateDegree(15)); var gd = svg.createGroup(svg.transformBuilder().rotateDegree(-15)); gu.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("line", { x1:0, y1:0, x2:xypicGlobalContext.measure.em2px(0.507 * scale), y2:0 }); gd.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @^{<} Shape.UpperLTArrowheadShape = class Shape_UpperLTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.489 * scale, d:0, u:0.147 * scale }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); } }; // @_{<} Shape.LowerLTArrowheadShape = class Shape_LowerLTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.489 * scale, d:0.147 * scale, u:0 }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @{<} Shape.LTArrowheadShape = class Shape_LTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.489 * scale, d:0.147 * scale, u:0.147 * scale }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @^{|} Shape.UpperColumnArrowheadShape = class Shape_UpperColumnArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:xypicGlobalContext.measure.lineElementLength, d:0 }; } drawDelegate(svg) { var l = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:0, y2:-l }); } }; // @_{|} Shape.LowerColumnArrowheadShape = class Shape_LowerColumnArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:0, d:xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var l = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:0, y2:l }); } }; // @2{|} Shape.Column2ArrowheadShape = class Shape_Column2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness), d:0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness) }; } drawDelegate(svg) { var l = xypicGlobalContext.measure.em2px(0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness)); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); } }; // @3{|} Shape.Column3ArrowheadShape = class Shape_Column3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness, d:0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); } }; // @{|} Shape.ColumnArrowheadShape = class Shape_ColumnArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); } }; // @^{(} Shape.UpperLParenArrowheadShape = class Shape_UpperLParenArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0.5 * xypicGlobalContext.measure.lineElementLength, r:0, u:xypicGlobalContext.measure.lineElementLength, d:0 }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M0,0 A " + r + "," + r + " 0 0,1 0," + (-2 * r) }); } }; // @_{(} Shape.LowerLParenArrowheadShape = class Shape_LowerLParenArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0.5 * xypicGlobalContext.measure.lineElementLength, r:0, u:0, d:xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M0,0 A " + r + "," + r + " 0 0,0 0," + (2 * r) }); } }; // @{(} Shape.LParenArrowheadShape = class Shape_LParenArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0.5 * xypicGlobalContext.measure.lineElementLength, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M" + r + "," + (-r) + " A " + r + "," + r + " 0 0,0 " + r + "," + r }); } }; // @^{)} Shape.UpperRParenArrowheadShape = class Shape_UpperRParenArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0.5 * xypicGlobalContext.measure.lineElementLength, u:xypicGlobalContext.measure.lineElementLength, d:0 }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M0,0 A " + r + "," + r + " 0 0,0 0," + (-2 * r) }); } }; // @_{)} Shape.LowerRParenArrowheadShape = class Shape_LowerRParenArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0.5 * xypicGlobalContext.measure.lineElementLength, u:0, d:xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M0,0 A " + r + "," + r + " 0 0,1 0," + (2 * r) }); } }; // @{)} Shape.RParenArrowheadShape = class Shape_RParenArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0.5 * xypicGlobalContext.measure.lineElementLength, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M" + (-r) + "," + (-r) + " A " + r + "," + r + " 0 0,1 " + (-r) + "," + r }); } }; // @_{`} Shape.LowerBackquoteArrowheadShape = class Shape_LowerBackquoteArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0.5 * xypicGlobalContext.measure.lineElementLength, r:0, u:0, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M0,0 A " + r + "," + r + " 0 0,0 " + (-r) + "," + (r) }); } }; // @{`}, @^{`} Shape.UpperBackquoteArrowheadShape = class Shape_UpperBackquoteArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0.5 * xypicGlobalContext.measure.lineElementLength, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0 }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M0,0 A " + r + "," + r + " 0 0,1 " + (-r) + "," + (-r) }); } }; // @_{'} Shape.LowerQuoteArrowheadShape = class Shape_LowerQuoteArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0.5 * xypicGlobalContext.measure.lineElementLength, u:0, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M0,0 A " + r + "," + r + " 0 0,1 " + r + "," + (r) }); } }; // @{'}, @^{'} Shape.UpperQuoteArrowheadShape = class Shape_UpperQuoteArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0.5 * xypicGlobalContext.measure.lineElementLength, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0 }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var r = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("path", { d:"M0,0 A " + r + "," + r + " 0 0,0 " + r + "," + (-r) }); } }; // @{*} Shape.AsteriskArrowheadShape = class Shape_AsteriskArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = 0; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:xypicGlobalContext.measure.thickness, r:xypicGlobalContext.measure.thickness, u:xypicGlobalContext.measure.thickness, d:xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { svg.createSVGElement("circle", { cx:0, cy:0, r:xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness), fill: "currentColor" }); } }; // @{o} Shape.OArrowheadShape = class Shape_OArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = 0; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:xypicGlobalContext.measure.thickness, r:xypicGlobalContext.measure.thickness, u:xypicGlobalContext.measure.thickness, d:xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { svg.createSVGElement("circle", { cx:0, cy:0, r:xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness) }); } }; // @{+} Shape.PlusArrowheadShape = class Shape_PlusArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0.5 * xypicGlobalContext.measure.lineElementLength, r:0.5 * xypicGlobalContext.measure.lineElementLength, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var halfLen = xypicGlobalContext.measure.lineElementLength / 2; var halfLenPx = xypicGlobalContext.measure.em2px(halfLen); svg.createSVGElement("line", { x1:-halfLenPx, y1:0, x2:halfLenPx, y2:0 }); svg.createSVGElement("line", { x1:0, y1:halfLenPx, x2:0, y2:-halfLenPx }); } }; // @{x} Shape.XArrowheadShape = class Shape_XArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle + Math.PI / 4; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0.5 * xypicGlobalContext.measure.lineElementLength, r:0.5 * xypicGlobalContext.measure.lineElementLength, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var halfLen = xypicGlobalContext.measure.lineElementLength / 2; var halfLenPx = xypicGlobalContext.measure.em2px(halfLen); svg.createSVGElement("line", { x1:-halfLenPx, y1:0, x2:halfLenPx, y2:0 }); svg.createSVGElement("line", { x1:0, y1:halfLenPx, x2:0, y2:-halfLenPx }); } }; // @{/} Shape.SlashArrowheadShape = class Shape_SlashArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle - Math.PI / 10; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:xypicGlobalContext.measure.lineElementLength / 2, d:xypicGlobalContext.measure.lineElementLength / 2 }; } drawDelegate(svg) { var halfLen = xypicGlobalContext.measure.lineElementLength / 2; var halfLenPx = xypicGlobalContext.measure.em2px(halfLen); svg.createSVGElement("line", { x1:0, y1:halfLenPx, x2:0, y2:-halfLenPx }); } }; // @3{-} Shape.Line3ArrowheadShape = class Shape_Line3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:xypicGlobalContext.measure.lineElementLength, u:xypicGlobalContext.measure.thickness, d:xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); var vshift = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); svg.createSVGElement("line", { x1:0, y1:vshift, x2:lineLen, y2:vshift }); svg.createSVGElement("line", { x1:0, y1:0, x2:lineLen, y2:0 }); svg.createSVGElement("line", { x1:0, y1:-vshift, x2:lineLen, y2:-vshift }); } }; // @2{-} Shape.Line2ArrowheadShape = class Shape_Line2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:xypicGlobalContext.measure.lineElementLength, u:0.5 * xypicGlobalContext.measure.thickness, d:0.5 * xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var vshift = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.thickness); var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:vshift, x2:lineLen, y2:vshift }); svg.createSVGElement("line", { x1:0, y1:-vshift, x2:lineLen, y2:-vshift }); } }; // @{-} Shape.LineArrowheadShape = class Shape_LineArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:xypicGlobalContext.measure.lineElementLength, u:0, d:0 }; } drawDelegate(svg) { var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:lineLen, y2:0 }); } }; // @3{.} Shape.Dot3ArrowheadShape = class Shape_Dot3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:xypicGlobalContext.measure.thickness, d:xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var vshift = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); var dasharray = xypicGlobalContext.measure.dottedDasharray; svg.createSVGElement("line", { x1:0, y1:vshift, x2:lineLen, y2:vshift, "stroke-dasharray": dasharray }); svg.createSVGElement("line", { x1:0, y1:0, x2:lineLen, y2:0, "stroke-dasharray": dasharray }); svg.createSVGElement("line", { x1:0, y1:-vshift, x2:lineLen, y2:-vshift, "stroke-dasharray": dasharray }); } }; // @2{.} Shape.Dot2ArrowheadShape = class Shape_Dot2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:0.5 * xypicGlobalContext.measure.thickness, d:0.5 * xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var vshift = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.thickness); var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); var dasharray = xypicGlobalContext.measure.dottedDasharray; svg.createSVGElement("line", { x1:0, y1:vshift, x2:lineLen, y2:vshift, "stroke-dasharray": dasharray }); svg.createSVGElement("line", { x1:0, y1:-vshift, x2:lineLen, y2:-vshift, "stroke-dasharray": dasharray }); } }; // @{.} Shape.DotArrowheadShape = class Shape_DotArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:0, u:0, d:0 }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); var dasharray = xypicGlobalContext.measure.dottedDasharray; svg.createSVGElement("line", { x1:0, y1:0, x2:lineLen, y2:0, "stroke-dasharray": dasharray }); } }; // @3{~} Shape.Tilde3ArrowheadShape = class Shape_Tilde3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:-2 * xypicGlobalContext.measure.thickness, r:2 * xypicGlobalContext.measure.thickness, u:2 * xypicGlobalContext.measure.thickness, d:2* xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var s = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); svg.createSVGElement("path", { d:"M" + (-2 * s) + "," + s + " Q" + (-s) + ",0" + " 0," + s + " T" + (2 * s) + "," + s + "M" + (-2 * s) + ",0" + " Q" + (-s) + "," + (-s) + " 0,0" + " T" + (2 * s) + ",0" + "M" + (-2 * s) + "," + (-s) + " Q" + (-s) + "," + (-2 * s) + " 0," + (-s) + " T" + (2 * s) + "," + (-s) }); } }; // @2{~} Shape.Tilde2ArrowheadShape = class Shape_Tilde2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:-2 * xypicGlobalContext.measure.thickness, r:2 * xypicGlobalContext.measure.thickness, u:1.5 * xypicGlobalContext.measure.thickness, d:1.5 * xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var s = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); svg.createSVGElement("path", { d:"M" + (-2 * s) + "," + (0.5 * s) + " Q" + (-s) + "," + (-0.5 * s) + " 0," + (0.5 * s) + " T" + (2 * s) + "," + (0.5 * s) + "M" + (-2 * s) + "," + (-0.5 * s) + " Q" + (-s) + "," + (-1.5 * s) + " 0," + (-0.5 * s) + " T" + (2 * s) + "," + (-0.5 * s) }); } }; // @{~} Shape.TildeArrowheadShape = class Shape_TildeArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:-2 * xypicGlobalContext.measure.thickness, r:2 * xypicGlobalContext.measure.thickness, u:xypicGlobalContext.measure.thickness, d:xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var s = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); svg.createSVGElement("path", { d:"M" + (-2 * s) + ",0" + " Q" + (-s) + "," + (-s) + " 0,0" + " T" + (2 * s) + ",0" }); } }; // @{~} Shape.TildeArrowheadShape = class Shape_TildeArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:-2 * xypicGlobalContext.measure.thickness, r:2 * xypicGlobalContext.measure.thickness, u:xypicGlobalContext.measure.thickness, d:xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var s = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); svg.createSVGElement("path", { d:"M" + (-2 * s) + ",0" + " Q" + (-s) + "," + (-s) + " 0,0" + " T" + (2 * s) + ",0" }); } }; // @{>>} Shape.GTGTArrowheadShape = class Shape_GTGTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.489 * scale + 2 * xypicGlobalContext.measure.thickness, r:0, d:0.147 * scale, u:0.147 * scale }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var hshift = xypicGlobalContext.measure.em2px(2 * t); svg.createSVGElement("path", { d:"M" + (-hshift) + ",0 Q" + (xypicGlobalContext.measure.em2px(-0.222 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(-0.489 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M" + (-hshift) + ",0 Q" + (xypicGlobalContext.measure.em2px(-0.222 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(-0.489 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); } }; // @^{>>} Shape.UpperGTGTArrowheadShape = class Shape_UpperGTGTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.489 * scale + 2 * xypicGlobalContext.measure.thickness, r:0, d:0, u:0.147 * scale }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var hshift = xypicGlobalContext.measure.em2px(2 * t); svg.createSVGElement("path", { d:"M" + (-hshift) + ",0 Q" + (xypicGlobalContext.measure.em2px(-0.222 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(-0.489 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); } }; // @_{>>} Shape.LowerGTGTArrowheadShape = class Shape_LowerGTGTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.489 * scale + 2 * xypicGlobalContext.measure.thickness, r:0, d:0.147 * scale, u:0 }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var hshift = xypicGlobalContext.measure.em2px(2 * t); svg.createSVGElement("path", { d:"M" + (-hshift) + ",0 Q" + (xypicGlobalContext.measure.em2px(-0.222 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(-0.489 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @2{>>} Shape.GTGT2ArrowheadShape = class Shape_GTGT2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.456 * scale + 2 * xypicGlobalContext.measure.thickness, r:0, d:0.229 * scale, u:0.229 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.213 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var gu1 = svg.createGroup(svg.transformBuilder().rotateDegree(-10)); var gd1 = svg.createGroup(svg.transformBuilder().rotateDegree(10)); gu1.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd1.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + ","+xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); var gu2 = svg.createGroup(svg.transformBuilder().translate(-2 * t, 0).rotateDegree(-10)); var gd2 = svg.createGroup(svg.transformBuilder().translate(-2 * t, 0).rotateDegree(10)); gu2.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd2.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + ","+xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @3{>>} Shape.GTGT3ArrowheadShape = class Shape_GTGT3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.507 * scale + 2 * xypicGlobalContext.measure.thickness, r:0, d:0.268 * scale, u:0.268 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.325 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var gu1 = svg.createGroup(svg.transformBuilder().rotateDegree(-15)); var gd1 = svg.createGroup(svg.transformBuilder().rotateDegree(15)); gu1.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd1.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + ","+xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); var gu2 = svg.createGroup(svg.transformBuilder().translate(-2 * t, 0).rotateDegree(-15)); var gd2 = svg.createGroup(svg.transformBuilder().translate(-2 * t, 0).rotateDegree(15)); gu2.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd2.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + ","+xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("line", { x1:0, y1:0, x2:xypicGlobalContext.measure.em2px(-0.507 * scale - 2 * t), y2:0 }); } }; // @{<<} Shape.LTLTArrowheadShape = class Shape_LTLTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.489 * scale + 2 * xypicGlobalContext.measure.thickness, d:0.147 * scale, u:0.147 * scale }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var hshift = xypicGlobalContext.measure.em2px(2 * t); svg.createSVGElement("path", { d:"M" + hshift + ",0 Q" + (xypicGlobalContext.measure.em2px(0.222 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(0.489 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M" + hshift + ",0 Q" + (xypicGlobalContext.measure.em2px(0.222 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(0.489 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @^{<<} Shape.UpperLTLTArrowheadShape = class Shape_UpperLTLTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.489 * scale + 2 * xypicGlobalContext.measure.thickness, d:0, u:0.147 * scale }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var hshift = xypicGlobalContext.measure.em2px(2 * t); svg.createSVGElement("path", { d:"M" + hshift + ",0 Q" + (xypicGlobalContext.measure.em2px(0.222 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(0.489 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); } }; // @_{<<} Shape.LowerLTLTArrowheadShape = class Shape_LowerLTLTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.489 * scale + 2 * xypicGlobalContext.measure.thickness, d:0.147 * scale, u:0 }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var hshift = xypicGlobalContext.measure.em2px(2 * t); svg.createSVGElement("path", { d:"M" + hshift + ",0 Q" + (xypicGlobalContext.measure.em2px(0.222 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(0.489 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @2{<<} Shape.LTLT2ArrowheadShape = class Shape_LTLT2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.456 + scale + 2 * xypicGlobalContext.measure.thickness, d:0.229 * scale, u:0.229 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.213 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var gu1 = svg.createGroup(svg.transformBuilder().translate(2 * t, 0).rotateDegree(10)); var gd1 = svg.createGroup(svg.transformBuilder().translate(2 * t, 0).rotateDegree(-10)); gu1.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd1.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); var gu2 = svg.createGroup(svg.transformBuilder().rotateDegree(10)); var gd2 = svg.createGroup(svg.transformBuilder().rotateDegree(-10)); gu2.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd2.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @3{<<} Shape.LTLT3ArrowheadShape = class Shape_LTLT3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.507 * scale + 2 * xypicGlobalContext.measure.thickness, d:0.268 * scale, u:0.268 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.325 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var gu1 = svg.createGroup(svg.transformBuilder().translate(2 * t, 0).rotateDegree(15)); var gd1 = svg.createGroup(svg.transformBuilder().translate(2 * t, 0).rotateDegree(-15)); gu1.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd1.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); var gu2 = svg.createGroup(svg.transformBuilder().rotateDegree(15)); var gd2 = svg.createGroup(svg.transformBuilder().rotateDegree(-15)); gu2.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd2.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("line", { x1:0, y1:0, x2:xypicGlobalContext.measure.em2px(0.507 * scale + 2 * t), y2:0 }); } }; // @{||} Shape.ColumnColumnArrowheadShape = class Shape_ColumnColumnArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:xypicGlobalContext.measure.thickness, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); svg.createSVGElement("line", { x1:-xypicGlobalContext.measure.em2px(t), y1:l, x2:-xypicGlobalContext.measure.em2px(t), y2:-l }); } }; // @^{||} Shape.UpperColumnColumnArrowheadShape = class Shape_UpperColumnColumnArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:xypicGlobalContext.measure.thickness, r:0, u:xypicGlobalContext.measure.lineElementLength, d:0 }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:0, y2:-l }); svg.createSVGElement("line", { x1:-xypicGlobalContext.measure.em2px(t), y1:0, x2:-xypicGlobalContext.measure.em2px(t), y2:-l }); } }; // @_{||} Shape.LowerColumnColumnArrowheadShape = class Shape_LowerColumnColumnArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:xypicGlobalContext.measure.thickness, r:0, u:0, d:xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:0, y2:l }); svg.createSVGElement("line", { x1:-xypicGlobalContext.measure.em2px(t), y1:0, x2:-xypicGlobalContext.measure.em2px(t), y2:l }); } }; // @2{||} Shape.ColumnColumn2ArrowheadShape = class Shape_ColumnColumn2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:xypicGlobalContext.measure.thickness, r:0, u:0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness), d:0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness) }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness)); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); svg.createSVGElement("line", { x1:-xypicGlobalContext.measure.em2px(t), y1:l, x2:-xypicGlobalContext.measure.em2px(t), y2:-l }); } }; // @3{||} Shape.ColumnColumn3ArrowheadShape = class Shape_ColumnColumn3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:xypicGlobalContext.measure.thickness, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness, d:0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); svg.createSVGElement("line", { x1:-xypicGlobalContext.measure.em2px(t), y1:l, x2:-xypicGlobalContext.measure.em2px(t), y2:-l }); } }; // @{|-} Shape.ColumnLineArrowheadShape = class Shape_ColumnLineArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:xypicGlobalContext.measure.lineElementLength, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:lineLen, y2:0 }); } }; // @^{|-} Shape.UpperColumnLineArrowheadShape = class Shape_UpperColumnLineArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:xypicGlobalContext.measure.lineElementLength, u:xypicGlobalContext.measure.lineElementLength, d:0 }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:0, y2:-l }); var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:lineLen, y2:0 }); } }; // @_{|-} Shape.LowerColumnLineArrowheadShape = class Shape_LowerColumnLineArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:xypicGlobalContext.measure.lineElementLength, u:0, d:xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:0, y2:l }); var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:0, x2:lineLen, y2:0 }); } }; // @2{|-} Shape.ColumnLine2ArrowheadShape = class Shape_ColumnLine2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:xypicGlobalContext.measure.lineElementLength, u:0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness), d:0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness) }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * (xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness)); svg.createSVGElement("line", { x1:0, y1:-l, x2:0, y2:l }); var vshift = xypicGlobalContext.measure.em2px(0.5 * t); var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:vshift, x2:lineLen, y2:vshift }); svg.createSVGElement("line", { x1:0, y1:-vshift, x2:lineLen, y2:-vshift }); } }; // @3{|-} Shape.ColumnLine3ArrowheadShape = class Shape_ColumnLine3ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:0, r:xypicGlobalContext.measure.lineElementLength, u:0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness, d:0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength + xypicGlobalContext.measure.thickness); svg.createSVGElement("line", { x1:0, y1:-l, x2:0, y2:l }); var lineLen = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); var vshift = xypicGlobalContext.measure.em2px(t); svg.createSVGElement("line", { x1:0, y1:vshift, x2:lineLen, y2:vshift }); svg.createSVGElement("line", { x1:0, y1:0, x2:lineLen, y2:0 }); svg.createSVGElement("line", { x1:0, y1:-vshift, x2:lineLen, y2:-vshift }); } }; // @{>|} Shape.GTColumnArrowheadShape = class Shape_GTColumnArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.489 * scale, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); } }; // @{>>|} Shape.GTGTColumnArrowheadShape = class Shape_GTGTColumnArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0.489 * scale + 2 * xypicGlobalContext.measure.thickness, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); var hshift = xypicGlobalContext.measure.em2px(2 * t); svg.createSVGElement("path", { d:"M" + (-hshift) + ",0 Q" + (xypicGlobalContext.measure.em2px(-0.222 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(-0.489 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M" + (-hshift) + ",0 Q" + (xypicGlobalContext.measure.em2px(-0.222 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(-0.489 * scale) - hshift) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); } }; // @{|<} Shape.ColumnLTArrowheadShape = class Shape_ColumnLTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.489 * scale, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @{|<<} Shape.ColumnLTLTArrowheadShape = class Shape_ColumnLTLTArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:0, r:0.489 * scale + 2 * xypicGlobalContext.measure.thickness, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var t = xypicGlobalContext.measure.thickness; var l = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:l, x2:0, y2:-l }); var hshift = xypicGlobalContext.measure.em2px(2 * t); svg.createSVGElement("path", { d:"M" + hshift + ",0 Q" + (xypicGlobalContext.measure.em2px(0.222 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(0.489 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M" + hshift + ",0 Q" + (xypicGlobalContext.measure.em2px(0.222 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + (xypicGlobalContext.measure.em2px(0.489 * scale) + hshift) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); svg.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(0.222 * scale) + "," + xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); } }; // @{//} Shape.SlashSlashArrowheadShape = class Shape_SlashSlashArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle - Math.PI / 10; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { return { l:xypicGlobalContext.measure.thickness, r:0, u:0.5 * xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.lineElementLength }; } drawDelegate(svg) { var hshift = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.thickness); var halfLenPx = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.lineElementLength); svg.createSVGElement("line", { x1:0, y1:halfLenPx, x2:0, y2:-halfLenPx }); svg.createSVGElement("line", { x1:-hshift, y1:halfLenPx, x2:-hshift, y2:-halfLenPx }); } }; // @{=>} Shape.LineGT2ArrowheadShape = class Shape_LineGT2ArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:xypicGlobalContext.measure.lineElementLength, r:xypicGlobalContext.measure.lineElementLength, d:0.229 * scale, u:0.229 * scale }; } getRadius() { var scale = xypicGlobalContext.measure.oneem; return 0.213 * scale; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var halfLen = xypicGlobalContext.measure.lineElementLength; var hshift = xypicGlobalContext.measure.em2px(halfLen); var v = 0.5 * xypicGlobalContext.measure.thickness; var vshift = xypicGlobalContext.measure.em2px(v); var r = this.getRadius(); var delta = xypicGlobalContext.measure.em2px(Math.sqrt(r * r - v * v)); var gu = svg.createGroup(svg.transformBuilder().translate(halfLen, 0).rotateDegree(-10)); var gd = svg.createGroup(svg.transformBuilder().translate(halfLen, 0).rotateDegree(10)); gu.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + "," + xypicGlobalContext.measure.em2px(-0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(-0.147 * scale) }); gd.createSVGElement("path", { d:"M0,0 Q" + xypicGlobalContext.measure.em2px(-0.222 * scale) + ","+xypicGlobalContext.measure.em2px(0.020 * scale) + " " + xypicGlobalContext.measure.em2px(-0.489 * scale) + "," + xypicGlobalContext.measure.em2px(0.147 * scale) }); svg.createSVGElement("path", { d:"M" + (-hshift) + "," + vshift + " L" + (hshift - delta) + "," + vshift + " M" + (-hshift) + "," + (-vshift) + " L" + (hshift - delta) + "," + (-vshift) }); } }; // twocell equality arrow Shape.TwocellEqualityArrowheadShape = class Shape_TwocellEqualityArrowheadShape extends Shape.ArrowheadShape { constructor(c, angle) { super(); this.c = c; this.angle = angle; XypicUtil.memoize(this, "getBoundingBox"); } getBox() { var scale = xypicGlobalContext.measure.oneem; return { l:xypicGlobalContext.measure.lineElementLength, r:xypicGlobalContext.measure.lineElementLength, d:0.5 * xypicGlobalContext.measure.thickness, u:0.5 * xypicGlobalContext.measure.thickness }; } drawDelegate(svg) { var scale = xypicGlobalContext.measure.oneem; var hshift = xypicGlobalContext.measure.em2px(xypicGlobalContext.measure.lineElementLength); var vshift = xypicGlobalContext.measure.em2px(0.5 * xypicGlobalContext.measure.thickness); svg.createSVGElement("path", { d:"M" + (-hshift) + "," + vshift + " L" + hshift + "," + vshift + " M" + (-hshift) + "," + (-vshift) + " L" + hshift + "," + (-vshift) }); } }; Shape.LineShape = class Shape_LineShape extends Shape { constructor(line, object, main, variant, bbox) { super(); this.line = line; this.object = object; this.main = main; this.variant = variant; this.bbox = bbox; this.holeRanges = List.empty; } sliceHole(range) { this.holeRanges = this.holeRanges.prepend(range); } draw(svg) { this.line.drawLine(svg, this.object, this.main, this.variant, this.holeRanges); } getBoundingBox() { return this.bbox; } toString() { return "LineShape[line:" + this.line + ", object:" + this.object + ", main:" + this.main + ", variant:" + this.variant + "]"; } }; Shape.CurveShape = class Shape_CurveShape extends Shape { constructor(curve, objectForDrop, objectForConnect, bbox) { super(); this.curve = curve; this.objectForDrop = objectForDrop; this.objectForConnect = objectForConnect; this.bbox = bbox; this.holeRanges = List.empty; } sliceHole(range) { this.holeRanges = this.holeRanges.prepend(range); } draw(svg) { this.curve.drawCurve(svg, this.objectForDrop, this.objectForConnect, this.holeRanges); } getBoundingBox() { return this.bbox; } toString() { return "CurveShape[curve" + this.curve + ", objectForDrop:" + (this.objectForDrop !== undefined? this.objectForDrop.toString() : "null") + ", objectForConnect:" + (this.objectForConnect !== undefined? this.objectForConnect.toString() : "null") + "]"; } };
javascript
On Daniel Craig's birthday, here's a ranking of his five James Bond films--from Casino Royale to No Time to Die. Gulshan Grover said that even though he was let go as the antagonist in Casino Royale, he cannot be stopped from playing a villain in a James Bond film for too long. Aston Martin-loving spy James Bond has swapped his beloved luxury car for a Fiat 500 in the new 007 movie. Rodrigo Santoro will return to the role of Xerxes for the film. Tom Hardy has been described as 'perfect Bond material' and he comes with a great reputation. Paul Bhattacharjee had been missing since July 10 after rehearsals for a stage production in London's West End. Paul Bhattacharjee had been missing since July 10 after rehearsals for a stage production in London's West End. Body of a man,matching Paul's description had been recovered from cliffs in East Sussex. Paul Bhattacharjee was last seen on July 10 leaving rehearsals at the Royal Court Theatre. The Global Bond Day Christie's sale was held to mark the 50th anniversary of the first super-spy movie.
english
<reponame>prasann/recipes<gh_stars>0 { "id": "kimaicloud", "name": "Kimai Cloud", "version": "1.0.1", "description": "Kimai Time-Tracker - Cloud version", "main": "index.js", "author": "<NAME> <<EMAIL>>", "license": "MIT", "repository": "https://github.com/kimai-cloud/recipe-kimaicloud", "config": { "serviceURL": "https://{teamId}.kimai.cloud", "hasNotificationSound": false, "hasDirectMessages": true, "hasIndirectMessages": false, "hasTeamId": true, "urlInputSuffix": ".kimai.cloud" } }
json
Varun Tej is doing a film called Ghani and it was announced a long back. The shooting of the film has also been completed except for a few days. A debutante named Kiran is helming this film. The update now is that Ghani will have Hollywood-based action composed by Larnell Stoval & Vlad Rimbur for a boxing episode that will be shot in a huge stadium set. The hero, Varun Tej and Naveen Chandra are playing key roles in this film. Varun had even gone to the US to train for this film. 14 Reels is the banner that is producing this film.
english
# Distributed Mail Client In this article, we make a simple demonstration by simulating the collaborative email editing between different devices. We can complete the task of cross device migration through the migration button, and call the cross device pictures through the attachment button. Licensing Please see LICENSE for more info.
markdown
<filename>build/asset-manifest.json { "files": { "main.css": "/static/css/main.1ee1c2a2.chunk.css", "main.js": "/static/js/main.0b0c91e7.chunk.js", "main.js.map": "/static/js/main.0b0c91e7.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.09c4a088.js", "runtime-main.js.map": "/static/js/runtime-main.09c4a088.js.map", "static/css/2.d58b4ed3.chunk.css": "/static/css/2.d58b4ed3.chunk.css", "static/js/2.abf4338c.chunk.js": "/static/js/2.abf4338c.chunk.js", "static/js/2.abf4338c.chunk.js.map": "/static/js/2.abf4338c.chunk.js.map", "index.html": "/index.html", "static/css/2.d58b4ed3.chunk.css.map": "/static/css/2.d58b4ed3.chunk.css.map", "static/css/main.1ee1c2a2.chunk.css.map": "/static/css/main.1ee1c2a2.chunk.css.map", "static/js/2.abf4338c.chunk.js.LICENSE.txt": "/static/js/2.abf4338c.chunk.js.LICENSE.txt", "static/media/ally.5c53cfda.jpeg": "/static/media/ally.5c53cfda.jpeg", "static/media/asman.6bdd0630.jpeg": "/static/media/asman.6bdd0630.jpeg", "static/media/car.f48dc20d.jpeg": "/static/media/car.f48dc20d.jpeg", "static/media/car1.8f6fdd44.jpeg": "/static/media/car1.8f6fdd44.jpeg", "static/media/car2.f713a399.jpeg": "/static/media/car2.f713a399.jpeg", "static/media/car3.7cfcb0ff.jpeg": "/static/media/car3.7cfcb0ff.jpeg", "static/media/card-project6.8ecd9660.jpg": "/static/media/card-project6.8ecd9660.jpg", "static/media/dg1.cac9e8ef.jpg": "/static/media/dg1.cac9e8ef.jpg", "static/media/font-awesome.min.css": "/static/media/fontawesome-webfont.f691f37e.woff", "static/media/isma.67438411.jpeg": "/static/media/isma.67438411.jpeg", "static/media/makara.f06cb4d4.jpeg": "/static/media/makara.f06cb4d4.jpeg", "static/media/martine.11f78b58.jpeg": "/static/media/martine.11f78b58.jpeg", "static/media/index.css": "/static/media/roboto-vietnamese-400-normal.52cebac0.woff2", "static/media/App.css": "/static/media/vegetables.9390ea27.jpg" }, "entrypoints": [ "static/js/runtime-main.09c4a088.js", "static/css/2.d58b4ed3.chunk.css", "static/js/2.abf4338c.chunk.js", "static/css/main.1ee1c2a2.chunk.css", "static/js/main.0b0c91e7.chunk.js" ] }
json
IPL 2017: Steven Smith applauds Jaydev Unadkat’s bowling after Rising Pune Supergiant (RPS) beat Mumbai Indians (MI) Chasing a stiff total of 161, MI failed to convert the results in their favour despite skipper Rohit Sharma's fifty. After the match, Smith applauded his two main pacers Ben Stokes and Unadkat for their impressive bowling in the death overs. Steven Smith-led Rising Pune Supergiant (RPS) stopped Mumbai Indians’ (MI) winning streak by beating them in match 28 by 3 runs at the Wankhede Stadium on Monday. This was MI’s second defeat in the 10th edition of Indian Premier League (IPL). Interestingly, both their losses have come against RPS. With this victory, RPS have moved to 4th spot in the points table. Chasing a stiff total of 161, MI failed to convert the results in their favour despite skipper Rohit Sharma‘s fifty. After the match, Smith applauded his two main pacers Ben Stokes and Jaydev Unadkat for their impressive bowling in the death overs. “Absolutely happy. We scrapped really well at the end. Few guys under pressure did really well. Stokesy in the second last over was magnificent. Jaydev was amazing too with his final two overs to keep them down,” Smith said in the post-match ceremony. Further, Smith also added that his side loves close games but would like to change these things by claiming big-margin victories in future. “We love the close ones, never win by a big margin and would like to change that. The dew wasn’t really bad; we expected it to be a lot worse. The wicket did stay good for the whole of 40 overs,” said Smith. The RPS captain also said that the wicket was not like the usual Wankhede and their total was good enough to defend. “It wasn’t a typical Wankhede wicket, took a bit of turn, stopped a bit and 160 was pretty much par. We know the arsenal Mumbai have with their batting”, added the Australian. Applauding Unadkat, Smith expressed his views by quoting his bowling as fantastic one, especially towards the end. “Jaydev was fantastic at the end. He bowled wide with slower balls and hit hard lengths. If a batsman still hits you for a six you just take your hat off. He did really well to stick to his plans after Rohit hit him and came back well,” told Smith. RPS’ next match is going to be against Kolkata Knight Riders (KKR) at their home Maharashtra Cricket Association Stadium, Pune. So far, RPS have not won a single match against KKR but would like to end their opposition’s winning streak. This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful. Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings. If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
english
<filename>src/lib.rs // Copyright 2020 tuxzz // // Licensed under the MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>, // at your option. This file may not be copied, modified, // or distributed except according to those terms. /*! A safe rust wrapper of [libsndfile](http://www.mega-nerd.com/libsndfile/). With this crate, you can read or save audio files. # Getting started With minimal features: ````toml [dependencies] sndfile = "0.0" ```` With ndarray supports: ````toml [dependencies.sndfile] version = "0.0" features = ["ndarray_features"] ```` # Example ```ignore extern crate sndfile; extern crate ndarray; fn main() { use sndfile::*; let mut snd = sndfile::OpenOptions::ReadOnly(ReadOptions::Auto).from_path( "./sample_song.flac" ).unwrap(); let data: ndarray::Array2<f32> = snd.read_all_to_ndarray().unwrap(); let samplerate = snd.get_samplerate(); let n_frame = snd.len().unwrap(); let n_channels = snd.get_channels(); let title = snd.get_tag(TagType::Title); println!("Loaded song `{}`:", title); println!(" Length: {:.2} seconds", n_frame as f64 / samplerate as f64); println!(" Sample rate: {} Hz", samplerate); println!(" Channel count: {}", n_channels); println!(" DC offset = {}", data.mean().unwrap()); } /* == Expected output == Loaded song `Loow`: Length: 277.06 seconds Sample rate: 44100 Hz Channel count: 2 DC offset = 0.00018921464 */ ``` */ #[macro_use] extern crate lazy_static; use sndfile_sys::sf_count_t; use std::fs::File; use std::io::{Read, Seek, SeekFrom, Write}; use std::iter::FromIterator; use std::os::raw::{c_int, c_void}; use std::path::Path; use std::sync::Mutex; mod format; mod test; pub use format::{ check_format, default_subtype, get_supported_major_format_dict, get_supported_subtype_format_dict, Endian, MajorFormat, MajorInfo, SubtypeFormat, SubtypeInfo, }; #[cfg(feature = "ndarray_features")] mod ndarray_support; #[cfg(feature = "ndarray_features")] pub use ndarray_support::*; lazy_static! { static ref SF_GLOBAL_LOCK: Mutex<()> = Mutex::new(()); } #[derive(Debug)] pub struct VIOFile { f: File, } extern "C" fn vio_get_filelen(user_data: *mut c_void) -> sf_count_t { let vio_file = unsafe { (user_data as *mut VIOFile).as_mut().unwrap() }; vio_file.f.metadata().unwrap().len() as sf_count_t } extern "C" fn vio_seek(offset: sf_count_t, whence: c_int, user_data: *mut c_void) -> sf_count_t { let vio_file = unsafe { (user_data as *mut VIOFile).as_mut().unwrap() }; let seek_from = match whence { sndfile_sys::SF_SEEK_SET => SeekFrom::Start(offset as u64), sndfile_sys::SF_SEEK_CUR => SeekFrom::Current(offset), sndfile_sys::SF_SEEK_END => SeekFrom::End(offset), _ => unreachable!(), }; vio_file.f.seek(seek_from).unwrap() as sf_count_t } extern "C" fn vio_read(dst: *mut c_void, count: sf_count_t, user_data: *mut c_void) -> sf_count_t { let vio_file = unsafe { (user_data as *mut VIOFile).as_mut().unwrap() }; let dst_buf = unsafe { std::slice::from_raw_parts_mut(dst as *mut u8, count as usize) }; vio_file.f.read(dst_buf).unwrap() as sf_count_t } extern "C" fn vio_write( src: *const c_void, count: sf_count_t, user_data: *mut c_void, ) -> sf_count_t { let vio_file = unsafe { (user_data as *mut VIOFile).as_mut().unwrap() }; let src_buf = unsafe { std::slice::from_raw_parts(src as *const u8, count as usize) }; vio_file.f.write(src_buf).unwrap() as sf_count_t } extern "C" fn vio_tell(user_data: *mut c_void) -> sf_count_t { let vio_file = unsafe { (user_data as *mut VIOFile).as_mut().unwrap() }; vio_file.f.seek(SeekFrom::Current(0)).unwrap() as sf_count_t } /// Options for reading audio files. #[derive(Debug)] pub enum ReadOptions { /// Auto detect format Auto, /// `Raw(samplerate, channels)`: read as raw file. Raw(usize, usize), } /// Options for writing audio files. #[derive(Debug)] pub struct WriteOptions { major_format: format::MajorFormat, subtype_format: format::SubtypeFormat, endian: format::Endian, samplerate: usize, channels: usize, } impl WriteOptions { /// Create new WriteOptions. /// /// * `major_format`: Audio container format, e.g., `SubtypeFormat::WAV`, `SubtypeFormat::FLAC`, etc /// * `subtype_format`: Audio encoding format, e.g., `SubtypeFormat::PCM_S16`, `SubtypeFormat::VORBIS`, etc /// * `endian`: Usually `Endian::File` /// * `samplerate`: A positive number /// * `channels`: A positive number pub fn new( major_format: format::MajorFormat, subtype_format: format::SubtypeFormat, endian: format::Endian, samplerate: usize, channels: usize, ) -> Self { assert!(samplerate > 0); assert!(channels > 0); WriteOptions { major_format, subtype_format, endian, samplerate, channels, } } /// This function allows the caller to check if a set of parameters in the WriteOptions is valid. /// /// Returns `Some(Self)` if the parameters are valid and `None` otherwise. pub fn validate(self) -> Option<Self> { if check_format( self.channels, self.samplerate, self.major_format, self.subtype_format, self.endian, ) { Some(self) } else { None } } } /// Struct to specify options when opening a audio file. #[derive(Debug)] pub enum OpenOptions { /// Open an audio file read only. ReadOnly(ReadOptions), /// Open an audio file write only. /// /// In `OpenOptions::from_path` function, a new file will be created if the file does not yet already exist. WriteOnly(WriteOptions), /// Open an audio file for reading and writing. /// /// In `OpenOptions::from_path` function, a `SndFileError::IOError` will be returned if the file does not yet already exist. ReadWrite(ReadOptions), /// Open an audio file for reading and writing. /// /// In `OpenOptions::from_path` function, a new file will be created if the file does not yet already exist. /// If specified file already exists, format may differ from `WriteOptions` WriteRead(WriteOptions), } /// This struct is unstable. #[derive(Debug)] pub struct UnsafeSndFile { pub vio_ptr: *mut sndfile_sys::SF_VIRTUAL_IO, pub vio_user_ptr: *mut VIOFile, pub sndfile_ptr: *mut sndfile_sys::SNDFILE, } /// Main struct of this crate. #[derive(Debug)] pub struct SndFile { unsafe_fields: UnsafeSndFile, samplerate: usize, channels: usize, major_format: MajorFormat, subtype_format: SubtypeFormat, endian: Endian, seekable: bool, } /// Do I/O operation on slice or iterator. pub trait SndFileIO<T> where T: 'static + Default + Copy, { /// Read frames from current I/O cursor, returns the number of frames read if success. /// /// This function may affect the I/O cursor. fn read_to_slice(&mut self, dst: &mut [T]) -> Result<usize, ()>; /// Read frames from file, returns the number of frames written if success. /// /// This function may affect the I/O cursor. fn write_from_slice(&mut self, src: &[T]) -> Result<usize, ()>; /// Read all frames into a `Vec<_>` if success. /// /// This function may affect the I/O cursor. fn read_all_to_vec(&mut self) -> Result<Vec<T>, ()>; /// Read frames from current I/O cursor, returns the number of frames read if success. /// /// This function may affect the I/O cursor. fn read_to_iter<'a, I>(&mut self, dst: I) -> Result<usize, ()> where I: ExactSizeIterator<Item = &'a mut T>, { let mut buf = vec![Default::default(); dst.len()]; self.read_to_slice(&mut buf).map(|r| { dst.zip(buf.into_iter()).for_each(|(x, y)| *x = y); r }) } /// Read frames from file, returns the number of frames written if success. /// /// This function may affect the I/O cursor. fn write_from_iter<'a, I>(&mut self, src: I) -> Result<usize, ()> where I: ExactSizeIterator<Item = T>, { let buf = Vec::<T>::from_iter(src); self.write_from_slice(&buf[..]) } } #[derive(Debug)] pub enum SndFileError { UnrecognisedFormat(String), SystemError(String), MalformedFile(String), UnsupportedEncoding(String), InvalidParameter(String), InternalError(String), IOError(std::io::Error), } #[derive(Debug)] /// Type of tags pub enum TagType { Title, Copyright, Software, Artist, Comment, Date, Album, License, Tracknumber, Genre, } /// Lock it before interacting with a few raw `libsndfile` functions in multithread context. /// /// Affected functions: /// * `sf_open(...)` /// * `sf_error(nullptr)` /// * `sf_strerror(nullptr)` /// * `sf_perror(nullptr)` /// * `sf_error_str(nullptr, ...)` pub fn get_sf_global_lock() -> &'static Mutex<()> { &SF_GLOBAL_LOCK } fn sf_err_code_to_enum(err_code: c_int) -> SndFileError { match err_code { sndfile_sys::SF_ERR_NO_ERROR => panic!("Errrrrrr"), _ => { let err_msg = unsafe { std::ffi::CStr::from_ptr(sndfile_sys::sf_error_number(err_code)) .to_str() .unwrap() } .to_string(); match err_code { sndfile_sys::SF_ERR_UNRECOGNISED_FORMAT => SndFileError::UnrecognisedFormat(err_msg), sndfile_sys::SF_ERR_SYSTEM => SndFileError::SystemError(err_msg), sndfile_sys::SF_ERR_MALFORMED_FILE => SndFileError::MalformedFile(err_msg), sndfile_sys::SF_ERR_UNSUPPORTED_ENCODING => SndFileError::UnsupportedEncoding(err_msg), _ => SndFileError::InternalError(err_msg), } } } } impl OpenOptions { /// Open from path pub fn from_path<P: AsRef<Path>>(&self, path: P) -> Result<SndFile, SndFileError> { let file_obj = match self { Self::ReadOnly(_) => std::fs::OpenOptions::new().read(true).open(path), Self::WriteOnly(_) => std::fs::OpenOptions::new() .write(true) .create(true) .truncate(true) .open(path), Self::ReadWrite(_) => std::fs::OpenOptions::new() .read(true) .write(true) .open(path), Self::WriteRead(_) => std::fs::OpenOptions::new() .read(true) .write(true) .create(true) .open(path), } .map_err(|e| SndFileError::IOError(e))?; self.from_file(file_obj) } /// Open from file pub fn from_file(&self, f: File) -> Result<SndFile, SndFileError> { let sf_open_mode = match self { Self::ReadOnly(_) => sndfile_sys::SFM_READ, Self::WriteOnly(_) => sndfile_sys::SFM_WRITE, Self::ReadWrite(_) | Self::WriteRead(_) => sndfile_sys::SFM_RDWR, }; let mut sf_info = match self { OpenOptions::ReadOnly(ReadOptions::Auto) | OpenOptions::ReadWrite(ReadOptions::Auto) => { sndfile_sys::SF_INFO { frames: 0, samplerate: 0, channels: 0, format: 0, sections: 0, seekable: 0, } } OpenOptions::ReadOnly(ReadOptions::Raw(samplerate, channels)) | OpenOptions::ReadWrite(ReadOptions::Raw(samplerate, channels)) => sndfile_sys::SF_INFO { frames: 0, samplerate: *samplerate as c_int, channels: *channels as c_int, format: sndfile_sys::SF_FORMAT_RAW, sections: 0, seekable: 0, }, OpenOptions::WriteOnly(x) | OpenOptions::WriteRead(x) => sndfile_sys::SF_INFO { frames: 0, samplerate: x.samplerate as c_int, channels: x.channels as c_int, format: format::assembly_format_flags(x.major_format, x.subtype_format, x.endian), sections: 0, seekable: 0, }, }; let vio_ptr = Box::into_raw(Box::new(sndfile_sys::SF_VIRTUAL_IO { get_filelen: vio_get_filelen, seek: vio_seek, read: vio_read, write: vio_write, tell: vio_tell, })); let vio_user_ptr = Box::into_raw(Box::new(VIOFile { f })); { let _sf_global_lock_guard = SF_GLOBAL_LOCK.lock(); let sndfile_ptr = unsafe { sndfile_sys::sf_open_virtual( vio_ptr, sf_open_mode, &mut sf_info as *mut sndfile_sys::SF_INFO, vio_user_ptr as *mut c_void, ) }; if sndfile_ptr.is_null() { unsafe { Box::from_raw(vio_user_ptr); Box::from_raw(vio_ptr); } Err(sf_err_code_to_enum(unsafe { sndfile_sys::sf_error(sndfile_ptr) })) } else { let u = UnsafeSndFile { vio_ptr, vio_user_ptr, sndfile_ptr, }; if sf_info.frames < 0 { Err(SndFileError::InvalidParameter( "Got invalid frame count, expect a non-negative number.".to_string(), )) } else if sf_info.samplerate <= 0 { Err(SndFileError::InvalidParameter( "Got invalid samplerate, expect a positive number.".to_string(), )) } else if sf_info.channels <= 0 { Err(SndFileError::InvalidParameter( "Got invalid channels, expect a positive number.".to_string(), )) } else { let major_format = format::flags_to_major_format(sf_info.format); let subtype_format = format::flags_to_subtype_format(sf_info.format); let endian_format = format::flags_to_endian(sf_info.format); if major_format.is_none() || subtype_format.is_none() || endian_format.is_none() { Err(SndFileError::InvalidParameter( "Got invalid format flags.".to_string(), )) } else { unsafe { sndfile_sys::sf_command( u.sndfile_ptr, sndfile_sys::SFC_SET_SCALE_FLOAT_INT_READ, std::ptr::null_mut(), sndfile_sys::SF_TRUE, ) }; unsafe { sndfile_sys::sf_command( u.sndfile_ptr, sndfile_sys::SFC_SET_SCALE_INT_FLOAT_WRITE, std::ptr::null_mut(), sndfile_sys::SF_TRUE, ) }; Ok(SndFile { unsafe_fields: u, samplerate: sf_info.samplerate as usize, channels: sf_info.channels as usize, major_format: major_format.unwrap(), subtype_format: subtype_format.unwrap(), endian: endian_format.unwrap(), seekable: sf_info.seekable != sndfile_sys::SF_FALSE, }) } } } } } } impl Drop for UnsafeSndFile { fn drop(&mut self) { let err_code = unsafe { sndfile_sys::sf_close(self.sndfile_ptr) }; unsafe { Box::from_raw(self.vio_user_ptr); Box::from_raw(self.vio_ptr); } if err_code != 0 { let err_msg = unsafe { std::ffi::CStr::from_ptr(sndfile_sys::sf_error_number(err_code)) .to_str() .unwrap() }; panic!(format!("Failed to call `sf_close`: {}", err_msg)); } } } impl SndFileIO<i16> for SndFile { fn read_to_slice(&mut self, dst: &mut [i16]) -> Result<usize, ()> { let len = dst.len(); let n_ch = self.channels as usize; let n_elem = len / n_ch; assert!(len % n_ch == 0); let n = unsafe { sndfile_sys::sf_readf_short( self.unsafe_fields.sndfile_ptr, dst.as_mut_ptr(), n_elem as sf_count_t, ) }; if n >= 0 { Ok(n as usize) } else { Err(()) } } fn write_from_slice(&mut self, src: &[i16]) -> Result<usize, ()> { let len = src.len(); let n_ch = self.channels as usize; let n_elem = len / n_ch; let n = unsafe { sndfile_sys::sf_writef_short( self.unsafe_fields.sndfile_ptr, src.as_ptr(), n_elem as sf_count_t, ) }; if n >= 0 { Ok(n as usize) } else { Err(()) } } fn read_all_to_vec(&mut self) -> Result<Vec<i16>, ()> { let n = self.len()? as usize; self.seek(SeekFrom::Start(0))?; let mut buf = vec![0; n]; self.read_to_slice(&mut buf).map(|_| buf) } } impl SndFileIO<i32> for SndFile { fn read_to_slice(&mut self, dst: &mut [i32]) -> Result<usize, ()> { let len = dst.len(); let n_ch = self.channels as usize; let n_elem = len / n_ch; let n = unsafe { sndfile_sys::sf_readf_int( self.unsafe_fields.sndfile_ptr, dst.as_mut_ptr(), n_elem as sf_count_t, ) }; if n >= 0 { Ok(n as usize) } else { Err(()) } } fn write_from_slice(&mut self, src: &[i32]) -> Result<usize, ()> { let len = src.len(); let n_ch = self.channels as usize; let n_elem = len / n_ch; let n = unsafe { sndfile_sys::sf_writef_int( self.unsafe_fields.sndfile_ptr, src.as_ptr(), n_elem as sf_count_t, ) }; if n >= 0 { Ok(n as usize) } else { Err(()) } } fn read_all_to_vec(&mut self) -> Result<Vec<i32>, ()> { let n = self.len()? as usize; self.seek(SeekFrom::Start(0))?; let mut buf = vec![0; n]; self.read_to_slice(&mut buf).map(|_| buf) } } impl SndFileIO<f32> for SndFile { fn read_to_slice(&mut self, dst: &mut [f32]) -> Result<usize, ()> { let len = dst.len(); let n_ch = self.channels as usize; let n_elem = len / n_ch; let n = unsafe { sndfile_sys::sf_readf_float( self.unsafe_fields.sndfile_ptr, dst.as_mut_ptr(), n_elem as sf_count_t, ) }; if n >= 0 { Ok(n as usize) } else { Err(()) } } fn write_from_slice(&mut self, src: &[f32]) -> Result<usize, ()> { let len = src.len(); let n_ch = self.channels as usize; let n_elem = len / n_ch; let n = unsafe { sndfile_sys::sf_writef_float( self.unsafe_fields.sndfile_ptr, src.as_ptr(), n_elem as sf_count_t, ) }; if n >= 0 { Ok(n as usize) } else { Err(()) } } fn read_all_to_vec(&mut self) -> Result<Vec<f32>, ()> { let n = self.len()? as usize; self.seek(SeekFrom::Start(0))?; let mut buf = vec![0.0; n]; self.read_to_slice(&mut buf).map(|_| buf) } } impl SndFileIO<f64> for SndFile { fn read_to_slice(&mut self, dst: &mut [f64]) -> Result<usize, ()> { let len = dst.len(); let n_ch = self.channels as usize; let n_elem = len / n_ch; let n = unsafe { sndfile_sys::sf_readf_double( self.unsafe_fields.sndfile_ptr, dst.as_mut_ptr(), n_elem as sf_count_t, ) }; if n >= 0 { Ok(n as usize) } else { Err(()) } } fn write_from_slice(&mut self, src: &[f64]) -> Result<usize, ()> { let len = src.len(); let n_ch = self.channels as usize; let n_elem = len / n_ch; let n = unsafe { sndfile_sys::sf_writef_double( self.unsafe_fields.sndfile_ptr, src.as_ptr(), n_elem as sf_count_t, ) }; if n >= 0 { Ok(n as usize) } else { Err(()) } } fn read_all_to_vec(&mut self) -> Result<Vec<f64>, ()> { let n = self.len()? as usize; self.seek(SeekFrom::Start(0))?; let mut buf = vec![0.0; n]; self.read_to_slice(&mut buf).map(|_| buf) } } fn tag_type_to_flags(t: TagType) -> c_int { match t { TagType::Title => sndfile_sys::SF_STR_TITLE, TagType::Copyright => sndfile_sys::SF_STR_COPYRIGHT, TagType::Software => sndfile_sys::SF_STR_SOFTWARE, TagType::Artist => sndfile_sys::SF_STR_ARTIST, TagType::Comment => sndfile_sys::SF_STR_COMMENT, TagType::Date => sndfile_sys::SF_STR_DATE, TagType::Album => sndfile_sys::SF_STR_ALBUM, TagType::License => sndfile_sys::SF_STR_LICENSE, TagType::Tracknumber => sndfile_sys::SF_STR_TRACKNUMBER, TagType::Genre => sndfile_sys::SF_STR_GENRE, } } impl SndFile { /// Get sample rate. /// /// Return values should be greater than zero. pub fn get_samplerate(&self) -> usize { self.samplerate } /// Get channel count. /// /// Return values should be greater than zero. pub fn get_channels(&self) -> usize { self.channels } /// Get audio container format pub fn get_major_format(&self) -> MajorFormat { self.major_format } /// Get audio encoding format pub fn get_subtype_format(&self) -> SubtypeFormat { self.subtype_format } /// Get audio file endian /// /// Usually returns `Endian::File` pub fn get_endian(&self) -> Endian { self.endian } /// Check if this file seekable /// /// If not, many functions like `len` or `read_all_to_vec` will return an error. pub fn is_seekable(&self) -> bool { self.seekable } /// Useful if you want to do something unsafe. pub fn get_raw_struct(&self) -> &UnsafeSndFile { &self.unsafe_fields } /// Get tag string, e.g., artist, album, etc. pub fn get_tag(&self, t: TagType) -> String { let s_ptr = unsafe { sndfile_sys::sf_get_string(self.unsafe_fields.sndfile_ptr, tag_type_to_flags(t)) }; let c_str = unsafe { std::ffi::CStr::from_ptr(s_ptr) }; c_str.to_string_lossy().into_owned() } /// Set tag string pub fn set_tag(&mut self, t: TagType, v: &str) -> Result<(), SndFileError> { let c_str = std::ffi::CString::new(v).unwrap(); let ret_code = unsafe { sndfile_sys::sf_set_string( self.unsafe_fields.sndfile_ptr, tag_type_to_flags(t), c_str.as_ptr(), ) }; if ret_code == 0 { Ok(()) } else { Err(sf_err_code_to_enum(ret_code)) } } /// Modify the I/O cursor. pub fn seek(&mut self, pos: SeekFrom) -> Result<u64, ()> { if self.is_seekable() { let r = unsafe { match pos { SeekFrom::Start(x) => sndfile_sys::sf_seek( self.unsafe_fields.sndfile_ptr, x as sf_count_t, sndfile_sys::SF_SEEK_SET, ), SeekFrom::Current(x) => sndfile_sys::sf_seek( self.unsafe_fields.sndfile_ptr, x as sf_count_t, sndfile_sys::SF_SEEK_CUR, ), SeekFrom::End(x) => sndfile_sys::sf_seek( self.unsafe_fields.sndfile_ptr, x as sf_count_t, sndfile_sys::SF_SEEK_END, ), } }; if r >= 0 { Ok(r as u64) } else { Err(()) } } else { Err(()) } } /// Get the length of audio file. /// /// This function may affect the I/O cursor. pub fn len(&mut self) -> Result<u64, ()> { self.seek(SeekFrom::End(0)) } } unsafe impl std::marker::Send for SndFile {}
rust
<filename>data/nber/12783.json { "id": 12783, "citation_title": "Sovereign Risk and Secondary Markets", "citation_author": [ "<NAME>", "<NAME>", "<NAME>" ], "citation_publication_date": "2006-12-20", "issue_date": "2006-12-20", "revision_date": "None", "topics": [ "International Economics", "International Finance", "Financial Economics", "Financial Markets" ], "program": [ "International Finance and Macroeconomics" ], "projects": null, "working_groups": null, "abstract": "\n\nConventional wisdom says that, in the absence of sufficient default penalties, sovereign risk constrains credit and lowers welfare. We show that this conventional wisdom rests on one implicit assumption: that assets cannot be retraded in secondary markets. Once this assumption is relaxed, there is always an equilibrium in which sovereign risk is stripped of its conventional effects. In such an equilibrium, foreigners hold domestic debts and resell them to domestic residents before enforcement. In the presence of (even arbitrarily small) default penalties, this equilibrium is shown to be unique. As a result, sovereign risk neither constrains welfare nor lowers credit. At most, it creates some additional trade in secondary markets. The results presented here suggest a change in perspective regarding the origins of sovereign risk and its remedies. To argue that sovereign risk constrains credit, one must show both the insufficiency of default penalties and the imperfect workings of secondary markets. To relax credit constraints created by sovereign risk, one can either increase default penalties or improve the workings of secondary markets.\n\n", "acknowledgement": "\nWe are grateful to <NAME>, <NAME>, <NAME>, and seminar participants at the NBER Summer Institute, SED Meetings in Vancouver, Toulouse, IMF, SAIS, Princeton, Harvard, MIT, Chicago Fed, CREI and Univesitat Pompeu Fabra for their comments. We acknowledge financial support from the Spanish Ministry of Education and Sciences (grant SEJ2005-01126), the Generalitat de Catalunya (DURSI, SGR2005 0049), and from CREA-Barcelona Economics. The views expressed herein are those of the author(s) and do not necessarily reflect the views of the National Bureau of Economic Research.\n\n\n" }
json
<reponame>begin923/java_base_practice<filename>atguigu_Customer_Test/src/main/java/polymorphic/demo1/Animal.java<gh_stars>0 package polymorphic.demo1; public class Animal { String id = "1001"; public Animal() { } public Animal(String id) { this.id = id; } public String getId() { return id; } public void setId(String id) { this.id = id; } public void eat(){ System.out.println("动物吃东西"); } public void show(){ System.out.println("动物叫 "); } }
java