text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
<reponame>MarikMayhem/Softuni-CarTube-Angular
/* @font-face {
font-family: League-Gothic;
src: url(LeagueGothic-Regular.otf);
} */
#nav-icon {
width: 60%;
height: 6%;
display: block;
margin: auto;
}
/* .main-unlogged {
font-family: League-Gothic;
} */
#intro-para {
text-align: center;
font-size: 4vw;
}
.main-unlogged>img {
display: block;
margin: auto;
height: 450px;
/* Animation onload */
}
#buttons {
display: flex;
justify-content: center;
}
| css |
<filename>103/4vgmuGjVxuiFhRuEFPfmt7yrCmUZqRfZjHHJh1cmYxv3.json
{"name":"Token 4vgm","symbol":"4vgmu","decimals":6,"address":"4vgmuGjVxuiFhRuEFPfmt7yrCmUZqRfZjHHJh1cmYxv3","chainId":103} | json |
<filename>nova_powervm/tests/virt/powervm/nvram/test_manager.py
# Copyright 2016, 2018 IBM Corp.
#
# All Rights Reserved.
#
# 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 fixtures
import mock
from nova import test
from pypowervm import exceptions as pvm_exc
import time
from nova_powervm.tests.virt import powervm
from nova_powervm.tests.virt.powervm.nvram import fake_api
from nova_powervm.virt.powervm.nvram import api
from nova_powervm.virt.powervm.nvram import manager
from nova_powervm.virt.powervm import vm
class TestNvramManager(test.NoDBTestCase):
def setUp(self):
super(TestNvramManager, self).setUp()
self.fake_store = fake_api.NoopNvramStore()
self.fake_exp_store = fake_api.ExpNvramStore()
self.mock_store = self.useFixture(
fixtures.MockPatchObject(self.fake_store, 'store')).mock
self.mock_fetch = self.useFixture(
fixtures.MockPatchObject(self.fake_store, 'fetch')).mock
self.mock_remove = self.useFixture(
fixtures.MockPatchObject(self.fake_store, 'delete')).mock
self.mock_exp_remove = self.useFixture(
fixtures.MockPatchObject(self.fake_exp_store, 'delete')).mock
@mock.patch('nova_powervm.virt.powervm.nvram.manager.LOG.exception',
autospec=True)
@mock.patch.object(vm, 'get_instance_wrapper', autospec=True)
def test_store_with_exception(self, mock_get_inst, mock_log):
mock_get_inst.side_effect = pvm_exc.HttpError(mock.Mock())
mgr = manager.NvramManager(self.fake_store, mock.Mock(), mock.Mock())
mgr.store(powervm.TEST_INST1.uuid)
self.assertEqual(1, mock_log.call_count)
@mock.patch('nova_powervm.virt.powervm.nvram.manager.LOG.warning',
autospec=True)
@mock.patch.object(vm, 'get_instance_wrapper', autospec=True)
def test_store_with_not_found_exc(self, mock_get_inst, mock_log):
mock_get_inst.side_effect = pvm_exc.HttpNotFound(mock.Mock())
mgr = manager.NvramManager(self.fake_store, mock.Mock(), mock.Mock())
mgr.store(powervm.TEST_INST1.uuid)
self.assertEqual(0, mock_log.call_count)
@mock.patch.object(vm, 'get_instance_wrapper', autospec=True)
def test_manager(self, mock_get_inst):
mgr = manager.NvramManager(self.fake_store, mock.Mock(), mock.Mock())
mgr.store(powervm.TEST_INST1.uuid)
mgr.store(powervm.TEST_INST2)
mgr.fetch(powervm.TEST_INST2)
mgr.fetch(powervm.TEST_INST2.uuid)
mgr.remove(powervm.TEST_INST2)
# Simulate a quick repeated stores of the same LPAR by poking the Q.
mgr._queue.put(powervm.TEST_INST1)
mgr._queue.put(powervm.TEST_INST1)
mgr._queue.put(powervm.TEST_INST2)
time.sleep(0)
mgr.shutdown()
self.mock_store.assert_has_calls(
[mock.call(powervm.TEST_INST1.uuid, mock.ANY),
mock.call(powervm.TEST_INST2.uuid, mock.ANY)])
self.mock_fetch.assert_has_calls(
[mock.call(powervm.TEST_INST2.uuid)] * 2)
self.mock_remove.assert_called_once_with(powervm.TEST_INST2.uuid)
self.mock_remove.reset_mock()
# Test when fetch returns an exception
mgr_exp = manager.NvramManager(self.fake_exp_store,
mock.Mock(), mock.Mock())
self.assertRaises(api.NVRAMDownloadException,
mgr_exp.fetch, powervm.TEST_INST2)
# Test exception being logged but not raised during remove
mgr_exp.remove(powervm.TEST_INST2.uuid)
self.mock_exp_remove.assert_called_once_with(powervm.TEST_INST2.uuid)
| python |
Pune: The city of Pune may be an emerging IT hub but the delayed monsoon means it is facing a 30 per cent water cut from Wednesday. This is bad news for residents who are struggling with less and less water.
Rahimunissa is a school teacher, and usually gets home by evening; but for the last week she has had to take special permission to return in the afternoon. That's the only time her home gets water. That too for just half an hour in the entire day.
The water supply is already so low, she and her husband are worried about the new water cut.
"We can't bathe everyday, let alone bathe our child," says Rahimunissa's husband.
Pune's dams are drying up because it's had no rain at all through June. Last week the municipality declared a 20 per cent water cut. From Wednesday, water supply will reduce by another ten per cent.
Already, most neighbourhoods are relying on tankers.
Water in our area is coming only during night time.
Already people have started feeling the pinch and if it continues the same way, with no rains - then perhaps water supply on alternate days could just be a near possibility. | english |
Thank you in Swahili: What's Swahili for Thank you? If you want to know how to say Thank you in Swahili, you will find the translation here. We hope this will help you to understand Swahili better.
"Thank you in Swahili." In Different Languages, https://www.indifferentlanguages.com/words/thank_you/swahili. Accessed 06 Oct 2023.
Check out other translations to the Swahili language:
| english |
As soon as Nakuul shared the post, his Ishqbaaaz co-star Shrenu Parikh wrote, “Wow 5 years! ” Nakuul’s fans also shared their reaction to the picture in the comment section. Many of them asked if there is a possibility of Ishqbaaz 2 while some of them requested to do a reunion as soon as possible.
“Miss the show,” wrote one of Nakuul’s followers, while another mentioned, “The best show ever. Love you guys so much. Please give us a reunion as soon as the situation gets better. ” “This cast and the offscreen fun they had was a treat for all fans,” a comment read.
Post Ishqbaaaz, the actors of the show went on to feature in several other television series. Nakuul featured in ZEE5’s Never Kiss Your Best Friend, while Surbhi Chandna was seen playing the lead role in Naagin 5. Kunal Jaisingh recently wrapped Sony TV’s Kyun Utthe Dil Chhod Aaye. Mansi Srivastava was seen in Ishq Mein Marjawan 2 and Shrenu Parikh was seen in 2019 series Ek Bhram Sarvagun Sampanna.
At present, Nakuul is busy with his fathering duties. He and his wife Jankee Parekh welcomed their first child, a baby boy, on February 3. | english |
# PluralKit
PluralKit is a Discord bot meant for plural communities. It has features like message proxying through webhooks, switch tracking, system and member profiles, and more.
**Do you just want to add PluralKit to your server? If so, you don't need any of this. Use the bot's invite link: https://discordapp.com/oauth2/authorize?client_id=466378653216014359&scope=bot&permissions=536995904**
PluralKit has a Discord server for support, feedback, and discussion: https://discord.gg/PczBt78
# Requirements
Running the bot requires [.NET Core](https://dotnet.microsoft.com/download) (v3.1) and a PostgreSQL database.
# Configuration
Configuring the bot is done through a JSON configuration file. An example of the configuration format can be seen in [`pluralkit.conf.example`](https://github.com/xSke/PluralKit/blob/master/pluralkit.conf.example).
The configuration file needs to be placed in the bot's working directory (usually the repository root) and must be called `pluralkit.conf`.
The configuration file is in JSON format (albeit with a `.conf` extension), and the following keys (using `.` to indicate a nested object level) are available:
The following keys are available:
* `PluralKit.Database`: the URI of the database to connect to (in [ADO.NET Npgsql format](https://www.connectionstrings.com/npgsql/))
* `PluralKit.Bot.Token`: the Discord bot token to connect with
# Running
## Docker
Running PluralKit is pretty easy with Docker. The repository contains a `docker-compose.yml` file ready to use.
* Clone this repository: `git clone https://github.com/xSke/PluralKit`
* Create a `pluralkit.conf` file in the same directory as `docker-compose.yml` containing at least a `PluralKit.Bot.Token` field
* (`PluralKit.Database` is overridden in `docker-compose.yml` to point to the Postgres container)
* Build the bot: `docker-compose build`
* Run the bot: `docker-compose up`
In other words:
```
$ git clone https://github.com/xSke/PluralKit
$ cd PluralKit
$ cp pluralkit.conf.example pluralkit.conf
$ nano pluralkit.conf # (or vim, or whatever)
$ docker-compose up -d
```
## Manually
* Install the .NET Core 3.1 SDK (see https://dotnet.microsoft.com/download)
* Clone this repository: `git clone https://github.com/xSke/PluralKit`
* Create and fill in a `pluralkit.conf` file in the same directory as `docker-compose.yml`
* Run the bot: `dotnet run --project PluralKit.Bot`
# Building the docs
The website and documentation are automatically built by GitHub Pages when pushed to the `master` branch. They use [Jekyll 3](https://jekyllrb.com), which requires [Ruby](https://www.ruby-lang.org) and [Bundler](https://bundler.io/).
To build the docs locally, run:
```
$ cd docs/
$ bundle install --path vendor/bundle
$ bundle exec jekyll build
```
To run an auto-reloading server, substitute the last command with:
$ bundle exec jekyll serve
# License
This project is under the Apache License, Version 2.0. It is available at the following link: https://www.apache.org/licenses/LICENSE-2.0 | markdown |
{
"Subscribe": "Prenumeruoti",
"Subscribe to {blogtitle}": "Prenumeruoti {blogtitle}",
"Subscribed!": "Sėkminga prenumeracija!",
"A collection of posts": "A collection of posts",
"A collection of 1 post": "A collection of 1 post",
"A collection of % posts": "A collection of % posts",
"Get the latest posts delivered right to your inbox": "Gaukite naujienas į savo pašto dėžutę",
"Go to the front page": "Go to the front page",
"Latest Posts": "Paskutiniai įrašai",
"Message:": "Message:",
"<a href='{url}'>More posts</a> by {name}": "<a href='{url}'>Daugiau įrašų</a> by {name}",
"No posts": "Nėra įrašų",
"Read <a href='{url}'>more posts</a> by this author": "Kiti šio autoriaus <a href='{url}'>įrašai</a>",
"Ref:": "Ref:",
"See all % posts": "Rodyti visus % įrašus",
"Stay up to date! Get all the latest & greatest posts delivered straight to your inbox": "Sužinok pirmas! Gauk naujausius & paskutiniausius įrašus tiesiai į pašto dėžutę",
"1 post": "1 įrašas",
"% posts": "% įrašų",
"1 min read": "1 min skaitymo",
"% min read": "% min skaitymo",
"Could not sign up! Invalid sign up link.": "Nepavyko prisiregistruoti! Netinkama registracijos nuoroda.",
"<strong>Great!</strong> Check your inbox and click the link to confirm your subscription.": "<strong>Puiku!</strong> Patikrinkite gautuosius ir spustelėkite nuorodą, kad patvirtintumėte prenumeratą.",
"Please enter a valid email address!": "Prašome įvesti galiojantį elektroninio pašto adresą!"
}
| json |
{"AGE_AT_FIRST_EXPOSURE":{"CATEGORY":["MALE","FEMALE"],"MIN_VALUE":[53,52],"P10_VALUE":[53,52],"P25_VALUE":[62,68],"MEDIAN_VALUE":[63,70],"P75_VALUE":[76,86],"P90_VALUE":[83,93],"MAX_VALUE":[83,93]},"PREVALENCE_BY_GENDER_AGE_YEAR":{"TRELLIS_NAME":[],"SERIES_NAME":[],"X_CALENDAR_YEAR":[],"Y_PREVALENCE_1000PP":[]},"PREVALENCE_BY_MONTH":{"X_CALENDAR_MONTH":[],"Y_PREVALENCE_1000PP":[]},"LENGTH_OF_ERA":{"CATEGORY":"Length of Era","MIN_VALUE":27,"P10_VALUE":27,"P25_VALUE":29,"MEDIAN_VALUE":29,"P75_VALUE":29,"P90_VALUE":42,"MAX_VALUE":87}}
| json |
---
title: "Chatbot using OpenAI GPT-2 transformer model"
cover: "/logos/chatbot.jpg"
category: "AI"
tags:
- ArtificialIntelligence
OpenAI
Transformer
NLP
date: 2019-18-05 09:00
---
Some time ago I read an [article](https://openai.com/blog/better-language-models/) on OpenAI's GPT-2 language processing model. This model employs a Transformer network to predict the next word based on a given text. The examples on their website show that the network is able to generate high quality stories. Especially interesting is that the network is able to generate consistent stories. If the network generates a paragraph about a specific subject, then later on it can refer back to it. Unfortunately OpenAI decided not to make their most powerful model (1.5B trained parameters) publicly available as they fear that the model could be used for example to generate fake news or fake reviews (good marketing trick!). OpenAI did however make their less sophisticated (117M trained parameter and recently 345M trianed parameter) versions available.
I thought it would be interesting to see if GPT-2 can be used to implement a chat bot. The idea is as follows:
1. The network is given a prior consisting of part of a conversation.
2. Then the network generates one paragraph to complete one answer in the conversation.
3. Next we can add our own response and the cycle repeats.
The example code can be ran online using Google's CoLab infrastructure. Read the documentation in the [chat bot code](https://colab.research.google.com/drive/1ENrM7XatuetdcBOIlk0RhPqI18SphBxI) and try a conversation yourself!
Below an example of an earlier attempt with the 115M GPT-2 model (the code online uses the more recently published 345M model which actually performs even better). First the prior given conversation which I used as a starting point:
<pre style="background-color:#eeeeee">
Dinne: "Nice to meet you. What's your name?"
Me: "My name is Pete."
Dinne: "That's an interesting name. How old are you?"
Me: "I'm 30 years old."
Dinne: "Can you tell me something about yourself?"
Me: "Ofcourse! I like playing video games and eating cake. "
Dinne: "I like sweet stuff too. What are your plans for tomorrow?"
</pre>
<br>
<br>
<br>
In the following phrases the "Me" part was generated by the network/chat bot!
<br>
<br>
<br>
<pre style="background-color:#eeeeee;white-space: pre-wrap;white-space: -moz-pre-wrap;white-space: -pre-wrap;white-space: -o-pre-wrap;word-wrap: break-word;">
Me: "Things you might not reach. Right now. Copper toilets. Iron third barricade without batteries. Iron wall. Copper motor docks with lockers, door mists and lock plates. I guess I am lucky? I dunno, I haven't seen a lot of science fiction in my life, have I?"
Dinne: "Do you like science fiction?"
Me: (together) Yeah, I like science fiction. It's a wonderful story that I enjoy. Everything about it is fascinating, and you guys are a great bunch.
Dinne: "I've watched every Star Trek movie."
Me: "Yeah. Star Wars, Spielberg, All the Star Technical Stuff. I watch every Star Trek film."
Dinne: "What do think of the latest Star Trek movie?"
Me: "Oh no, I don't care what they do. I just know it's weird. It's funny. Star Trek is weirdly fun."
Dinne: "I still think Spock is the best!"
Me: "I've never read Spock so I don't know whether or not that's right."
Dinne: "Spock isn't a book! He's an alien from Vulcan and is the senior science officer on board the Enterprise."
Me: "Can you tell me anything about the first episode of the television series?"
Dinne: "Yes, in the first episode the crew is assembled, they go on a trip to planet Talos where captain Pike is captured."
Me: "They're so excited they all grow up to become the leader of Starfleet."
Dinne: "Do you think the warp engine could really exist one day?"
Me: "Eh, no, I doubt you."
</pre>
| markdown |
<reponame>nolange/VimModelines<filename>lib/encoding.py
# vim: set ts=4 sw=4 et fileencoding=utf-8:
'''Vim encoding mappings to Sublime Text'''
ENCODING_MAP = {
'latin1': 'Western (Windows 1252)',
'koi8-r': 'Cyrillic (KOI8-R)',
'koi8-u': 'Cyrillic (KOI8-U)',
'macroman': 'Western (Mac Roman)',
'iso-8859-1': 'Western (ISO 8859-1)',
'iso-8859-2': 'Central European (ISO 8859-2)',
'iso-8859-3': 'Western (ISO 8859-3)',
'iso-8859-4': 'Baltic (ISO 8859-4)',
'iso-8859-5': 'Cyrillic (ISO 8859-5)',
'iso-8859-6': 'Arabic (ISO 8859-6)',
'iso-8859-7': 'Greek (ISO 8859-7)',
'iso-8859-8': 'Hebrew (ISO 8859-8)',
'iso-8859-9': 'Turkish (ISO 8859-9)',
'iso-8859-10': 'Nordic (ISO 8859-10)',
'iso-8859-13': 'Estonian (ISO 8859-13)',
'iso-8859-14': 'Celtic (ISO 8859-14)',
'iso-8859-15': 'Western (ISO 8859-15)',
'iso-8859-16': 'Romanian (ISO 8859-16)',
'cp437': 'DOS (CP 437)',
'cp737': None,
'cp775': None,
'cp850': None,
'cp852': None,
'cp855': None,
'cp857': None,
'cp860': None,
'cp861': None,
'cp862': None,
'cp863': None,
'cp865': None,
'cp866': 'Cyrillic (Windows 866)',
'cp869': None,
'cp874': None,
'cp1250': 'Central European (Windows 1250)',
'cp1251': 'Cyrillic (Windows 1251)',
'cp1252': 'Western (Windows 1252)',
'cp1253': 'Greek (Windows 1253)',
'cp1254': 'Turkish (Windows 1254)',
'cp1255': 'Hebrew (Windows 1255)',
'cp1256': 'Arabic (Windows 1256)',
'cp1257': 'Baltic (Windows 1257)',
'cp1258': 'Vietnamese (Windows 1258)',
'cp932': None,
'euc-jp': None,
'sjis ': None,
'cp949': None,
'euc-kr': None,
'cp936': None,
'euc-cn': None,
'cp950': None,
'big5': None,
'euc-tw': None,
'utf-8': 'utf-8',
'ucs-2le': 'utf-16 le',
'utf-16': 'utf-16 be',
'utf-16le': 'utf-16 le',
'ucs-4': None,
'ucs-4le': None
}
| python |
Following a tragic shooting at the University of Nevada-Las Vegas campus, Los Angeles Lakers superstar LeBron James expressed passionate criticism of the United States' gun laws on Wednesday.
The incident, which claimed several lives, provoked James to comment on the persistent issue of gun control on the eve of the In-Season Tournament semifinals against the New Orleans Pelicans.
Responding to a text from a friend asking him to stay safe in light of the UNLV shooting, James shared his views at a press conference at the T-Mobile Arena.
He extended his condolences to the bereaved families and expressed his frustration at the continuous cycle of gun violence incidents across the nation.
James emphasized the ease of obtaining firearms and the alarming repetition of these violent events as critical issues.
He denounced the lack of change in gun control regulations despite the ongoing loss of innocent lives in various settings, from academic campuses to public spaces. As it stands, according to him, the situation is nothing short of "senseless" and "ridiculous."
"The senseless shooting at UNLV today has left the NBA family in a state of devastation," read the statement. "To the friends and families of the victims, as well as the entire Las Vegas community, we offer our deepest condolences."
In the wake of this incident, the league plans to observe a moment of silence before the semifinals on Thursday, according to a source who spoke with ESPN.
However, there's no anticipated disruption to this week's schedule.
The dreadful assault took place around 11:45 a.m. PT on Wednesday, not far from the Strip and the previous site of the 2017 massacre that took 60 lives and injured hundreds of country music fans.
This prompted a swift police response and precautionary measures by the campus community, which secured themselves in classrooms and dorm rooms.
James, a persistent advocate for gun control and reform, has joined others, such as Golden State Warriors coach Steve Kerr in lending his voice to calls for significant changes in gun laws.
They've consistently responded to mass shootings nationwide with pleas for the government to act.
The upcoming semifinals will see the Los Angeles Lakers play in the second match, following the face-off between the Milwaukee Bucks and Indiana Pacers. The victorious teams will vie for the tournament championship on Saturday evening.
ALSO READ: What did Adam Silver say about former U.S. Secretary of State Henry Kissinger on The Pat McAfee Show?
| english |
SRK and Salman fans engage in a Twitter war.
SRK and Salman fans engage in a Twitter war.
Bigg Boss 17: Salman Khan reprimands Isha Malviya, Samarth Jurel for 'triggering' Abhishek Kumar; 'Planned tha?'
Salman Khan turned 58 on December 27, 2023.
Where is Uday Bhai when you need him?
The ultimate queen of kindness, wit, and unfiltered honesty.
"She is pathetically so predictable"
Ira Khan And Nupur Shikhare will tie the knot on Jan 3.
Right Time To Buy EaseMyTrip Stocks!
Anurag dobhal slams Bigg Boss 17 makers; 'Salman sir ke saamne mein kuch nahi hoon, but agar...'
| english |
html, body {
overflow-x: hidden;
}
body {
position: relative;
background-color: #f6f6f6!important;
}
.flex-container{
display:flex;
}
.card-header{
background-color: #312D48!important;
color: #ffffff;
/*#D6EAF0!important;*/
}
.card-header a{
color: #ffffff;
}
.card-header a:hover{
color: lightslategrey;
}
.btn-primary{
background-color: #312D48!important;
}
.table-hover tbody tr:hover{
/*background-color: #D6EAF0!important;*/
}
.table th{
font-size: 0.95rem;
}
.table td{
font-size: 0.9rem;
}
.content{
width: 77%;
}
.bg-img {
background-image: url("/images/bg2.jpg");
height: 100%;
width: 100%;
top: 0;
bottom: 0;
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.right{
justify-content: right!important;
}
.f-right{
float: right!important;
}
.center{
justify-content: center;
}
.small-text{
font-size: 0.9rem;
}
.main-btn{
border-radius: 0!important;
border-color: transparent!important;
background-color: #BF0000!important;
width: 150px;
margin: 20px;
}
.main-btn:hover{
background-color: #1953F3!important;
}
.card-footer{
/*padding: 20!important;*/
border-radius: 0!important;
margin: 0 -10px -10px -10px!important;
}
| css |
Former Liverpool midfielder Danny Murphy has shared reservations about midfielder Thiago Alcantara's work rate after the Reds' defeat against Arsenal on Sunday (October 9.
Jurgen Klopp's side were beaten by the Gunners 3-2 in their Premier League clash at the Emirates in what was their second defeat in the league this season.
Arsenal opened the scoring via Gabriel Martinelli following a blistering counter-attack before Liverpool equalized thanks to Darwin Nunez.
However, the Gunners took the lead back just before half-time after another counter-attack. Thiago was left behind as Arsenal broke forward in numbers and scored through Bukayo Saka.
Roberto Firmino then equalized for the Reds in the second half before Saka scored the winning goal for the hosts from the penalty spot.
Murphy wasn't impressed with Thiago's efforts to get back into position during Arsenal's second goal. He said (via HITC):
“One other worrying sign; you watch [Martin] Odegaard spring forward. Thiago sees him. His reaction to try and get back is a little bit worrying for me. We know he’s a wonderful technician. But really, you should be busting a gut to try and get back in. "
He added:
Thiago joined Liverpool from Bayern Munich for around £25 million in 2020. Known for his technical ability, the Spaniard has played 76 matches so far for the Merseysiders, contributing three goals and five assists.
Salah has had a rather subdued start to the campaign. While the Egyptian has registered four goals and five assists in 12 matches across all competitions, his sharpness has come under criticism.
Salah was quite ineffective against Arsenal and was subbed off by Klopp in the 69th minute to be replaced by Fabinho. Speaking on the decision, the German manager said (via Liverpoolfc. com):
"We had to defend again on a high level and we tried to put Hendo on that side there. Mo did unbelievable, a lot, really big, big workload. He put in a real shift and sometimes that's very intense and that's why we thought we can do it with Hendo. We still wanted to win even when we took a striker off. "
Liverpool have won just two Premier League games this season and are 11th in the table. They will next take on Rangers away in the UEFA Champions League on October 12 before hosting Manchester City in the Premier League on October 16. | english |
<filename>sri/metrics-graphics/2.13.0.json
{"metricsgraphics.css":"sha256-vGq3C1LJxEnnFly0DPHaD1RH+uJeDbqSB/nvFvzS768=","metricsgraphics.js":"sha256-abKDd6Gvu5VtqR+Hf6P2Z+OhN7JQRAnt0fIyzqxsPy8=","metricsgraphics.min.css":"sha256-Dm98PB1/hyjmoX2V5nNr91vkDcL7t8uYUiffv0knBK0=","metricsgraphics.min.js":"sha256-JgK52DGJVIJSTza9l8oJqKwk7kYT4/ua0xcaZpcTPMs="} | json |
{
"description": "RIA-3390 Request Home Office data call returns with error",
"enabled": false,
"request": {
"uri": "/asylum/ccdAboutToSubmit",
"credentials": "CaseOfficer",
"input": {
"eventId": "requestHomeOfficeData",
"state": "appealSubmitted",
"caseData": {
"template": "minimal-appeal-submitted.json",
"replacements": {
"homeOfficeReferenceNumber": "123123123"
}
}
}
},
"expectation": {
"status": 200,
"errors": [],
"caseData": {
"template": "minimal-appeal-submitted.json",
"replacements": {
"homeOfficeReferenceNumber": "123123123",
"isHomeOfficeIntegrationEnabled": "Yes",
"homeOfficeSearchStatus": "FAIL"
}
}
}
}
| json |
<reponame>marwahan/test-os
angular.module('os.biospecimen.participant.consents', [])
.controller('ParticipantConsentsCtrl', function($scope, $sce, cpr, consent,
PvManager, DeleteUtil) {
function init() {
$scope.consentFormUploader = {};
$scope.consentFormUrl = $sce.trustAsResourceUrl(cpr.getSignedConsentFormUrl());
$scope.consent = consent;
$scope.uploadMode = false;
$scope.editMode = false;
$scope.consentExists = $scope.consent.consentTierResponses.length > 0;
loadPvs();
}
function loadPvs() {
$scope.consentResponses = PvManager.getPvs('consent_response');
}
function deleteConsentForm() {
cpr.deleteSignedConsentForm().then(
function(result) {
if (result) {
$scope.consent.consentDocumentName = undefined;
}
}
);
}
$scope.showUploadMode = function() {
$scope.uploadMode = true;
}
$scope.cancel = function() {
$scope.uploadMode = false;
}
$scope.uploadConsentForm = function() {
$scope.consentFormUploader.ctrl.submit().then(
function(fileName) {
$scope.consent.consentDocumentName = fileName;
$scope.uploadMode = false;
}
);
}
$scope.confirmDeleteConsentForm = function() {
DeleteUtil.confirmDelete({
entity: $scope.consent,
templateUrl: 'modules/biospecimen/participant/confirm-delete-consent-form.html',
delete: deleteConsentForm
});
}
$scope.showEditConsents = function() {
$scope.editMode = true;
}
$scope.saveConsents = function() {
cpr.saveConsentResponse($scope.consent).then(function(result) {
$scope.consents = result;
$scope.editMode = $scope.consentResponseAdd = false;
});
}
$scope.clearResponseSelection = function(consentTierResponse) {
consentTierResponse.response = undefined;
}
init();
});
| javascript |
The world is currently undergoing a fourth revolution or the 4. 0 revolution era. It’s being anticipated that the transition will lead to reduced role of human power as an operator and pave way for more interaction opportunities between machines and machines. It’s expected that India will thrive as one of the leading economies in the world over the next decade in light of a positive political and economic scenario. The Micro, Small & Medium Enterprises (MSME) segment has been playing a remarkable role in the emergence of the Indian economy. The development of MSME segment is extremely critical to fulfill the national mission of financial inclusion and generation of employment across the country. Moreover, it can accelerate and assist development of new age entrepreneurs who have the potential to create extensively competitive businesses from India. India’s GDP is expected to touch 8. 5 per cent, with the country likely to be a $5 trillion economy by 2025.
Industry leaders suggest that MSME is that one segment that has been majorly contributing in the economy and has the potential to emerge as a backbone for this economy. MSMEs would potentially act as a driver for growth if given the right set of assistance and enabling framework.
Internationally, the MSME segment expansion has shown mixed feedbacks basis on various policies and initiatives undertaken by developing and developed economies during their critical economic span. Many developed and developing economies have agreed upon the fact that the MSME segment constitutes the backbone for maintaining growth rates as well as employment generation rate and provides stability during economic downturns.
The recent change in definition for MSMEs by the Union government was a significant step according to which, an enterprise qualifies as a micro, small or a medium enterprise depending upon the amount of investment made with respect to (i) Plant and machinery in case it undertakes manufacturing; or (ii) Equipment in case it provides services. Additionally, the prescribed investment thresholds for being included within the definition of MSME have also been increased. The central government also announced the Emergency Credit Line Guarantee Scheme (ECLG Scheme) to help MSMEs with additional funding requirements during the Covid-19 crisis, particularly to meet their operational liabilities, purchase raw materials, and restart their business, this scheme is being implemented through the National Credit Guarantee Trustee Company Limited (NCGTC).
In March, 2020, the central government on increased the minimum threshold for default from Rs 1 lakh to Rs. 1 crore to initiate the corporate insolvency resolution process under the Insolvency and Bankruptcy Code, 2016 (IBC). This amendment is expected to benefit MSMEs that have been under financial distress due to the economic damage caused by Covid-19.
Another highlight remained the rapid advancement in digitisation which is driving changes in payment systems in transactions. Mobile phones have provided enormous opportunities for financial development and are anticipated to be a common tool for carrying out various financial transactions. An increase in cellular phone subscribers is continuing to expand with each passing year. The growth of cellular phone users has encouraged people to manage primarily finance differently and explore digital modes of payment. This has opened doors for the financial industry to improve its services by launching internet-based services, such as mobile banking. Consumers have collectively increased their digital payment usage as they are shopping more digitally and use cash only for offline shopping. The market sentiment suggests that the perception of usefulness, ease, comfort, and social influence was dramatically affected due to the pandemic.
The relaxation to government procurement policies is gradually bringing a much-needed boost to domestic manufacturing and reliance and consequently increase chances of survival of MSMEs during this pandemic. However, adequate guidelines should be put in place to make sure that relaxations and consequent lack of competition from global companies do not hamper the long-term goals of MSMEs in India. The policies acting upon the acceptance of mobile payment in the wider community should rope in. For instance, by collaborating with Mobile Payment Providers and Public Service Activities, the digital payment system can be legitimised on a larger scale.
Read all the Latest News, Breaking News and Coronavirus News here. | english |
<filename>eland/tests/dataframe/test_count_pytest.py
# Copyright 2019 Elasticsearch BV
#
# 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.
# File called _pytest for PyCharm compatability
from pandas.util.testing import assert_series_equal
from eland.tests.common import TestData
class TestDataFrameCount(TestData):
def test_ecommerce_count(self):
pd_ecommerce = self.pd_ecommerce()
ed_ecommerce = self.ed_ecommerce()
pd_count = pd_ecommerce.count()
ed_count = ed_ecommerce.count()
print(pd_count)
print(ed_count)
assert_series_equal(pd_count, ed_count)
| python |
WebCare Scrollbar is awesome plugin. you can easily customize your scrollbar and to style a lot’s of color and others features is included.
Just upload this plugin into your admin panel from wordpress directory and customize these options clicking this.
When activated this plugin will restore the previous (“classic”) WordPress editor and hide the new Block Editor (“Gutenberg”).
These settings can be changed at the Settings => Writing screen.
There are no reviews for this plugin.
Translate “WebCare Scrollbar” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Initial release.
| english |
{
"id": 37750912,
"name": "<NAME>",
"is_illegal": false,
"is_custom": false,
"text": "Send 1 \"Stardust\" monster from your Deck to the GY, or if you control \"Stardust Dragon\" or a Synchro Monster that lists \"Stardust Dragon\" in its text, you can Special Summon it instead. You can banish this card from your GY, then target 1 \"Stardust\" monster you control; increase or decrease its Level by 1 until the end of this turn. You can only use each effect of \"Stardust Illumination\" once per turn.",
"images": [
"https://storage.googleapis.com/ygoprodeck.com/pics/37750912.jpg"
],
"type": "Spell",
"spell_type": "Normal"
} | json |
{
"id": 3556,
"info": {
"name": "Wider Dev Shed Newsletter",
"description": "Developer Shed (http://www.developershed.com/) sends an informative weekly email newsletter (http://www.developershed.com/newsletter.php) out with a link to a copy (http://www.developershed.com/newsletter/archives/2007-09-20.html) on their web site.\r\n\r\nOutlook uses IE to display the newsletter and refuses to change the text font size. I like to use the on line version because I can use the [Ctrl +] zoom feature of Firefox to adjust the font size, but sometimes, late at night, I find I need to zoom things too far and the things become unreadable.\r\n\r\nI should just toddle on off to bed. Instead, I just change the style a bit with Stylish and can stay up later (I mean read it easier).",
"additionalInfo": null,
"format": "uso",
"category": "developershed",
"createdAt": "2007-09-23T18:00:20.000Z",
"updatedAt": "2007-09-23T18:00:20.000Z",
"license": "NO-REDISTRIBUTION",
"author": {
"id": 4155,
"name": "<NAME>",
"paypalEmail": "<EMAIL>"
}
},
"stats": {
"installs": {
"total": 86,
"weekly": 0
}
},
"screenshots": {
"main": {
"name": "3556_after.gif",
"archived": false
}
},
"discussions": {
"stats": {
"discussionsCount": 0,
"commentsCount": 0
},
"data": []
},
"style": {
"css": "@namespace url(http://www.w3.org/1999/xhtml);\r\n\r\n@-moz-document domain(\"www.developershed.com\") {\r\n table {\r\n width: 90%;\r\n }\r\n}\r\n"
}
} | json |
The Reserve Bank's rate setting panel will hike the key repo rate by 0. 35-0. 50 per cent at the next week's review meeting, Axis Bank chief economist Saugata Bhattacharya said on Thursday.
A hike of such a quantum will take the repo rate beyond the 5. 15 per cent level, at which the RBI had begun the ultra-accommodative measures in the face of the COVID-19 pandemic, he told reporters.
It can be noted that the monetary policy committee (MPC) has hiked rates in two consecutive moves in May and June by a cumulative 0. 90 per cent, taking the repo rate at which it lends to the system to 4. 90 per cent, in a bid to contain inflation.
Bhattacharya said the MPC will go into the internal surveys like household inflation expectations and consumer confidence while deciding the quantum of the rate hike.
He said the rate hike will be both an attempt to stem inflation expectations, and also one part of it will be a frontloading of actions.
A majority of developed world central banks like the US Fed, which hiked rates by 0. 75 per cent and the European Central Bank have also adopted a frontloading strategy because it ups possibilities of a soft landing for the economy, he said.
Axis Bank Q1 review: Why did shares fall 3. 5% despite 91% surge in profit?
Can weak operational performance in Q4 delay Axis Bank's re-rating?
Bhattacharya said the RBI is likely to continue the tightening after the next week's hike as well, and expects the repo rate to be at 5. 75 per cent at the end of this fiscal.
He said the headline inflation will continue to breach the 6 per cent threshold for many more months, and is likely to cool-off after spiking in September on a low base.
The average CPI for FY23 will be 6. 7 per cent, the chief economist said, adding it will come below the 6 per cent mark only in March.
He said the ongoing depreciation in the currency is having an impact on inflation given the import reliance, and also added that off-late, there has been some softening of the commodity prices.
Bhattacharya also appreciated the RBI's handling of the pressures on the currency by intervening in different ways to ensure a smooth movement of the currency.
The government has been restrained in spending lately, Bhattacharya said, terming it as a "puzzling" aspect which needs to be watched given the growth needs of the economy.
There is likely to be significant fiscal slippage and the fiscal deficit will come at over 9. 7 per cent for FY23, he said, adding that the receipts from 5G auction front will not help matters as the actual payments are staggered over multiple years.
On the liquidity front, he said the surplus will come down to a manageable Rs 2-2. 5 lakh crore by September if the government spending goes up, and may reach neutral by December, he said.
The bank expects GDP growth to come at 7. 1 per cent for FY23, he said. The wage hike in the IT industry may impact the growth as the profitability for IT companies goes down, he warned.
(Only the headline and picture of this report may have been reworked by the Business Standard staff; the rest of the content is auto-generated from a syndicated feed. ) | english |
Feedback (2)
Reasonable price for Soild Wpc Decking Floor - European Parquet Laminate Flooring – DEDGE Detail:
|We have several hundreds of color for your choice.
|7mm, 8mm, 10mm, 12mm are available.
|More than 20 kinds of surface, such as Embossed, Crystal, EIR, Handscraped, Matt, Glossy, Piano etc.
|Square Edge ,Mold press U-groove , 3 strips U grovoe, V-Groove with painting, bevel painting, waxing, padding, press etc. are provided.
Product detail pictures:
Related Product Guide:
With a sound business credit, excellent after-sales service and modern manufacturing facilities, we have earned an excellent reputation among our customers across the world for Reasonable price for Soild Wpc Decking Floor - European Parquet Laminate Flooring – DEDGE , The product will supply to all over the world, such as: Indonesia, Comoros, Cannes, In order to meet more market demands and long-term development, a 150, 000-square-meter new factory is under construction, which will be put into use in 2014. Then, we shall own a large capacity of producing. Of course, we are going to continue improving the service system to meet the requirements of customers, bringing health, happiness and beauty to everyone.
Customer service staff and sales man are very patience and they all good at English, product's arrival is also very timely, a good supplier.
| english |
<filename>gen_page.py
import argparse
import os
from datetime import datetime
def gen_frontmatter(path, title):
return f"""---
path: "/{path}"
date: "{datetime.now().strftime("%Y-%m-%d")}"
title: "{title}"
tags: ['{title}']
excerpt: "Notes on {title}"
---
{title} is a very interesting topic!
"""
def main():
parser = argparse.ArgumentParser(description='Get name for new page')
parser.add_argument('name', metavar='N', type=str,
help='Name of folder and metadata link for new blog page')
args = parser.parse_args()
if not args.name:
print(f"WARNING: No name provided")
exit()
lower_title = args.name.lower().replace(" ", "_")
dirname = os.path.join('src', 'pages', lower_title)
filename = os.path.join(dirname, 'index.md')
if os.path.isdir(dirname) and os.path.isfile(filename):
print(f'Already exists at {filename}')
exit()
os.makedirs(dirname)
with open(filename, 'w') as file:
frontmatter = gen_frontmatter(lower_title, args.name)
file.write(frontmatter)
if __name__ == "__main__":
main()
| python |
<gh_stars>1-10
use std::{env, str};
const VALUE_BAG_CAPTURE_CONST_TYPE_ID: &'static str = "VALUE_BAG_CAPTURE_CONST_TYPE_ID";
const VALUE_BAG_CAPTURE_CTOR: &'static str = "VALUE_BAG_CAPTURE_CTOR";
const VALUE_BAG_CAPTURE_FALLBACK: &'static str = "VALUE_BAG_CAPTURE_FALLBACK";
const CTOR_ARCHS: &'static [&'static str] = &["x86_64", "aarch64"];
const CTOR_OSES: &'static [&'static str] = &["windows", "linux", "macos"];
fn main() {
if env_is_set(VALUE_BAG_CAPTURE_CONST_TYPE_ID) {
println!(
"cargo:rustc-cfg={}",
VALUE_BAG_CAPTURE_CONST_TYPE_ID.to_lowercase()
);
} else if env_is_set(VALUE_BAG_CAPTURE_CTOR) {
println!("cargo:rustc-cfg={}", VALUE_BAG_CAPTURE_CTOR.to_lowercase());
} else if env_is_set(VALUE_BAG_CAPTURE_FALLBACK) {
println!(
"cargo:rustc-cfg={}",
VALUE_BAG_CAPTURE_FALLBACK.to_lowercase()
);
} else if rustc::is_feature_flaggable().unwrap_or(false) {
println!(
"cargo:rustc-cfg={}",
VALUE_BAG_CAPTURE_CONST_TYPE_ID.to_lowercase()
);
} else if target_arch_is_any(CTOR_ARCHS) && target_os_is_any(CTOR_OSES) {
println!("cargo:rustc-cfg={}", VALUE_BAG_CAPTURE_CTOR.to_lowercase());
} else {
println!(
"cargo:rustc-cfg={}",
VALUE_BAG_CAPTURE_FALLBACK.to_lowercase()
);
}
println!(
"cargo:rerun-if-env-changed={}",
VALUE_BAG_CAPTURE_CONST_TYPE_ID
);
println!("cargo:rerun-if-env-changed={}", VALUE_BAG_CAPTURE_CTOR);
println!("cargo:rerun-if-env-changed={}", VALUE_BAG_CAPTURE_FALLBACK);
}
fn target_arch_is_any(archs: &[&str]) -> bool {
cargo_env_is_any("CARGO_CFG_TARGET_ARCH", archs)
}
fn target_os_is_any(families: &[&str]) -> bool {
cargo_env_is_any("CARGO_CFG_TARGET_OS", families)
}
fn cargo_env_is_any(env: &str, values: &[&str]) -> bool {
match env::var(env) {
Ok(var) if values.contains(&&*var) => true,
_ => false,
}
}
fn env_is_set(env: &str) -> bool {
match env::var(env) {
Ok(var) if var == "1" => true,
_ => false,
}
}
| rust |
#include "GameLobby.h"
#include "LobbyPlayer.h"
#include <iostream>
namespace Vishala {
namespace Server {
GameLobby::GameLobby(std::string name,int gameServerPort, std::string ip, size_t number, std::shared_ptr<LobbyModel> model) {
_name = name ;
_model = model ;
_number = number;
_gameServerPort = gameServerPort;
_gameServerIP = ip;
}
std::string GameLobby::getName() {
return _name;
}
size_t GameLobby::getNumber() {
return _number;
}
void GameLobby::addPlayer(std::shared_ptr<LobbyPlayer> player) {
_participators[player->getID()] = player;
sendUpdate();
}
void GameLobby::removePlayer(size_t playerID) {
auto player = _participators[playerID];
_participators.erase(playerID);
player->leaveGame();
sendUpdate();
}
void GameLobby::closeGame() {
for (auto player : _participators) {
player.second->leaveGame();
}
}
size_t GameLobby::getNumberOfPlayers() {
return _participators.size();
}
void GameLobby::sendUpdate() {
GameLobbyStateUpdate update;
update.currentPlayers.clear();
std::cout << "Send GameLobby update: " << getName()<<std::endl;
for (auto p : _participators){
GameLobbyPlayer player;
player.lobbyIdentification.name = p.second->getName();
player.lobbyIdentification.color = p.second->getColor();
player.lobbyIdentification.id = p.first;
std::cout << " " << player.lobbyIdentification.name << std::endl;
update.currentPlayers.push_back(player);
}
update.gameName = getName();
update.gameStart = _gameStarted;
update.gameServerPort = _gameServerPort;
update.gameServerIP = _gameServerIP;
for (auto p : _participators)
p.second->sendGameLobbyUpdate(update);
}
void GameLobby::startGame() {
std::cout << "GAME START" << std::endl;
_gameStarted = true;
sendUpdate();
}
}
} | cpp |
<reponame>samanta-amit/slotted-aloha
package com.slottedaloha;
public class computation_of_frame_retransmission {
static double [] F = new double[8]; // Initialization of failure probability
static int h = (7+2)*8; // Header size in bits
static int p = 255*8; // Payload size in bits
//static int [] n = { 8, 8, 8, 8, 8, 8, 8, 8 };
static int [] n = { 1, 1, 1, 1, 1, 1, 1, 1 };
static double [] tau = new double[8]; // Initialization of transmission probability
static double Upsilon;
static double Upsilon_star;
static double [] no_nodes_of_other_UP_transmitting = new double[8];
static double [] one_node_of_UPi_transmitting = new double[8];
static double no_nodes_transmitting = 1;
static double [] xi = new double[8]; // Initialization of collision probability
public static void compute_farme_transmission () {
double b000;
@SuppressWarnings("unused")
double ALPHA;
@SuppressWarnings("unused")
int m;
double beta_bar;
computation_of_b000 B000 = new computation_of_b000();
b000 = B000.b000_compuation();
ALPHA = B000.alpha;
m = B000.m;
beta_bar = B000.beta_bar;
double beta = Math.pow(beta_bar, (B000.Lc-B000.La));
@SuppressWarnings("unused")
double B = (beta_bar*(1 - beta))/(1 - beta_bar);
double [] lambda = new double[8]; // Initialization of probability of choosing user priority
double [] only_one_node_of_UPi_is_transmitting = new double[8];
for(int i=0; i<=7; i++){
only_one_node_of_UPi_is_transmitting[i] = 1;
}
for(int i=0; i<=7; i++){
no_nodes_of_other_UP_transmitting[i] = 1;
}
//========================== LAMBDA value initialization ==========================================
int sample = 1000;
int [] Rand = new int[sample];
int [] count = new int[sample];
for(int j=0; j<=7; j++) {
count[j] = 0;
}
//System.out.println("Values of Rand: \n");
for(int j=0; j<=7; j++) {
for(int i=0; i<sample; i++) {
Rand[i] = (int) (Math.random()*8);
//System.out.println(Rand[i]);
if(Rand[i] == j){
count[j] = count[j] +1;
}
}
}
//System.out.println("\nLambda values are: \n");
for(int i=0; i<=7; i++){
lambda[i] = ((double)(count[i])/sample);
//System.out.println(lambda[i]);
}
//========================== Calculation of frame transmission probability ==========================
/*
double [] T = new double[8];
System.out.println("\nValues of T are: \n");
for(int i=0; i<=7; i++){
for (int j=0; j<=6; j++){
T[i] += Math.pow(beta, j)*B000.gamma[i][j+1];
}
System.out.print(T[i] + "\t");
}
System.out.println("\n\nFrame transmission probablity for different user priorities: \n");
for(int i=0; i<=7; i++){
//tau[i] = ALPHA*lambda[i]*b000*(T[i]+1);
tau[i] = ALPHA*b000*(T[i]+1);
//tau[i] = b000*(T[i]+1);
System.out.print(tau[i] + "\t");
}
*/
double Q [][] = new double[8][8];
double conditional_tau [] = new double[8];
for(int i=0; i<=7; i++){
for(int j=0; j<=7; j++){
Q[i][j] = 0;
}
}
System.out.println("\nFrame conditional transmission probablity for different user priorities: ");
for(int i=0; i<=7; i++){
for(int j=0; j<=7; j++){
Q[i][0] = B000.gamma[i][j]*B000.alpha*b000;
Q[i][1] = Q[i][0]*B000.beta_bar*B000.alpha;
Q[i][2] = Q[i][1]*B000.beta_bar*B000.alpha;
Q[i][3] = Q[i][2]*B000.beta_bar*B000.alpha;
Q[i][4] = Q[i][3]*B000.beta_bar*B000.alpha;
Q[i][5] = Q[i][4]*B000.beta_bar*B000.alpha;
Q[i][6] = Q[i][5]*B000.beta_bar*B000.alpha;
Q[i][7] = Q[i][6]*B000.beta_bar*B000.alpha;
}
tau[i] = Q[i][0] + Q[i][1] + Q[i][2] + Q[i][3] + Q[i][4] + Q[i][5] + Q[i][6] + Q[i][7];
conditional_tau[i] = tau[i]/.125;
System.out.print( conditional_tau[i] + "\t");
}
System.out.println("\n\nFrame transmission probablity for different user priorities: ");
for(int i=0; i<=7; i++){
System.out.print( tau[i] + "\t");
}
/*
System.out.println("\n\nFrame transmission probablity for different user priorities: ");
for(int i=0; i<=7; i++){
tau[i] = B000.lambda[i]*B000.alpha*(B000.gamma[i][0] + B000.beta_bar*B000.gamma[i][1] + Math.pow(B000.beta_bar, 2)*B000.gamma[i][2] + + Math.pow(B000.beta_bar, 3)*B000.gamma[i][3]
+ Math.pow(B000.beta_bar, 4)*B000.gamma[i][4] + Math.pow(B000.beta_bar, 5)*B000.gamma[i][5] + Math.pow(B000.beta_bar, 6)*B000.gamma[i][6] + Math.pow(B000.beta_bar, 7)*B000.gamma[i][7])*b000;
System.out.print( tau[i] + "\t");
}
*/
//========================== Calculation of frame collision probability =============================
System.out.println("\n\nP(no_nodes_transmitting): ");
for(int i=0; i<=7; i++){
no_nodes_transmitting *= Math.pow((1-tau[i]), n[i]);
}
System.out.println(no_nodes_transmitting);
System.out.println("\nP(no_nodes_of_other_UP_transmitting): \n");
for(int i=0; i<=7; i++){
for(int j=0; j<=7; j++){
if(i!=j){
no_nodes_of_other_UP_transmitting[i] *= Math.pow((1-tau[j]), n[j]);
}
}
System.out.print(no_nodes_of_other_UP_transmitting[i] + "\t");
}
//System.out.println("\n\nP(one_node_of_UPi_transmitting): \n");
for(int i=0; i<=7; i++){
one_node_of_UPi_transmitting[i] = n[i]*tau[i]*Math.pow((1-tau[i]), (n[i]-1));
//System.out.print(one_node_of_UPi_transmitting[i] + "\t");
//System.out.print(Math.pow((1-tau[i]), (n[i]-1)) + "\t");
}
System.out.println("\n\nMultiplication: ");
for(int i=0; i<=7; i++){
System.out.print(no_nodes_of_other_UP_transmitting[i]*one_node_of_UPi_transmitting[i] + "\t");
}
System.out.println("\n\nFrame collision probablity for different user priorities: ");
for(int i=0; i<=7; i++){
xi[i] = 1 - no_nodes_transmitting - no_nodes_of_other_UP_transmitting[i]*one_node_of_UPi_transmitting[i];
System.out.print( xi[i] + "\t" );
}
//========================== Calculation of frame failure probability ===============================
int exp = (int) (Math.random()*4);
int quo = (int) (Math.random()*9);
double BER = (1+quo)*Math.pow(10, -(4+exp));
System.out.println("\nexp = " + (1+exp));
System.out.println("\n\nBER = " + BER);
//double BER = 0.00001;
Upsilon = 1 - (double)( Math.pow((1 - BER), (h+p)) );
Upsilon_star = (double)( Math.pow((1 - BER), (h+p)) );
System.out.println("PER (Upsilon) = " + Upsilon);
System.out.println("(Upsilon_star) = " + Upsilon_star);
System.out.println("\n\nFrame faliure probablity for different user priorities: ");
for(int i=0; i<=7; i++){
F[i] = (xi[i] + (1-xi[i])*Upsilon);
System.out.print( F[i] + "\t");
}
//========================== Calculation of reliability ==============================================
//double W = 1 - Math.pow((1 - beta), m)*b000;
//System.out.println("\nReliability: " + W);
}
@SuppressWarnings("static-access")
public static void main (String [] arguments){
computation_of_frame_transmission FRAME_TRANSMISSION = new computation_of_frame_transmission();
FRAME_TRANSMISSION.compute_farme_transmission();
}
}
| java |
use crate::prelude::*;
#[derive(Clone, Debug, PartialEq, Default)]
pub struct Request {
name: Option<String>, // head starts out empty
args: String, // tail
sender: i64,
target: String,
broadcaster: bool,
moderator: bool,
color: RGB,
}
// TODO: I don't like this. rework this whole thing
// (args and args_iter being totally different is .. awkward)
impl Request {
pub fn try_from(msg: &irc::Message) -> Option<Self> {
match (msg.command.as_str(), msg.data.as_ref()) {
("PRIVMSG", Some(data)) | ("WHISPER", Some(data))
if data.starts_with('!') && data.len() > 1 =>
{
let sender = User::from_msg(&msg)?;
let (broadcaster, moderator) = (
msg.tags.has_badge(irc::Badge::Broadcaster),
msg.tags.has_badge(irc::Badge::Moderator),
);
Some(Request {
name: None,
args: data.to_string(),
sender,
target: msg.target().to_string(),
broadcaster,
moderator,
color: msg.tags.get_color(),
})
}
_ => None,
}
}
pub fn name(&self) -> Option<&String> {
self.name.as_ref()
}
pub fn args(&self) -> &str {
&self.args
}
pub fn args_iter(&self) -> impl Iterator<Item = &str> {
self.args.split_whitespace().map(str::trim)
}
pub fn target(&self) -> &str {
&self.target
}
pub fn sender(&self) -> i64 {
self.sender
}
pub fn is_from_owner(&self) -> bool {
Config::load().twitch.owners.contains(&self.sender)
}
pub fn color(&self) -> RGB {
self.color
}
pub fn is_from_moderator(&self) -> bool {
self.moderator
}
pub fn is_from_broadcaster(&self) -> bool {
self.broadcaster
}
pub fn search(&self, query: &str) -> Option<Request> {
if query == "!" {
return None;
}
if let Some(name) = &self.name {
if *name == query {
return Some(self.clone());
}
}
if self.args.starts_with(&query) {
return Some(Request {
name: Some(query.to_string()),
args: self.args[query.len()..].trim().to_string(),
sender: self.sender,
target: self.target.clone(),
moderator: self.moderator,
broadcaster: self.broadcaster,
color: self.color,
});
}
None
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn search_request() {
let req = Request {
name: None,
args: "!this".into(),
target: "#foo".into(),
..Request::default()
};
let req = req.search("!this");
assert_eq!(
req,
Some(Request {
name: Some("!this".into()),
args: "".into(),
target: "#foo".into(),
..Request::default()
})
);
let req = req.unwrap().search("test");
assert_eq!(req, None);
let req = Request {
name: None,
args: "!this test".into(),
target: "#foo".into(),
..Request::default()
};
let req = req.search("!this");
assert_eq!(
req,
Some(Request {
name: Some("!this".into()),
args: "test".into(),
target: "#foo".into(),
..Request::default()
})
);
let req = req.unwrap().search("test");
assert_eq!(
req,
Some(Request {
name: Some("test".into()),
args: "".into(),
target: "#foo".into(),
..Request::default()
})
);
let req = req.unwrap().search("bar");
assert_eq!(req, None);
}
#[test]
fn search_sub_request() {
let req = Request {
name: None,
args: "!this is a test".into(),
target: "#test".into(),
..Request::default()
};
let req = req.search("!this is");
assert_eq!(
req,
Some(Request {
name: Some("!this is".into()),
args: "a test".into(),
target: "#test".into(),
..Request::default()
})
);
let req = req.unwrap().search("this");
assert_eq!(req, None);
let req = Request {
name: None,
args: "!this is a test".into(),
target: "#test".into(),
..Request::default()
};
let req = req.search("test");
assert_eq!(req, None);
}
}
| rust |
{
"word": "Yam",
"definitions": [
"the edible starchy tuber of a climbing plant, widely distributed in tropical and subtropical countries."
],
"parts-of-speech": "Noun"
}
| json |
import React from 'react'
import { Route } from 'react-router-dom'
import Dashboard from '../dashboard'
import Country from '../country'
const App = () => (
<div>
<main>
<Route exact path="/" component={Dashboard} />
<Route exact path="/country/:counrtyCode" component={Country} />
</main>
</div>
)
export default App
| javascript |
<filename>content/en/docs/Technical Guidance/_index.md
---
title: "Technical Guidance"
linkTitle: "Technical Guidance"
weight: 5
description: >
Familiar with UK GEMINI and require specific information about the requirements and guidance for the metadata elements. encoding UK GEMINI metadata in XML, then general guidance is supplemented with detailed guidance for each metadata element at datasets or series or for services
---
{{% pageinfo %}}
This is a placeholder page that shows you how to use this template site.
{{% /pageinfo %}}
<div class="row content">
<div class="content col-lg-12">
<div class="item-page">
<div class="page-header">
<h1>Influencing. Informing. Acting.</h1>
</div>
<h3>Technical guidance on the encoding of UK GEMINI</h3>
<p>Return to <a title="GEMINI 2.3 home page" href="/gemini/40-gemini/1037-uk-gemini-standard-and-inspire-implementing-rules">GEMINI 2.3 home page</a></p>
<p><a title="1. Introduction" href="#1" rel="alternate">1. Introduction</a></p>
<p style="padding-left: 30px;"><a title="1.1 Purpose of guidelines" href="#1.1" rel="alternate">1.1 Purpose of guidelines</a></p>
<p style="padding-left: 30px;"><a title="1.2 Scope" href="#1.2" rel="alternate">1.2 Scope</a></p>
<p style="padding-left: 30px;"><a title="1.3 Assumed knowledge" href="#1.3" rel="alternate">1.3 Assumed knowledge</a></p>
<p style="padding-left: 30px;"><a title="1.4 Terminology" href="#1.4" rel="alternate">1.4 Terminology</a></p>
<p style="padding-left: 30px;"><a title="1.5 Structure of document" href="#1.5" rel="alternate">1.5 Structure of document</a></p>
<p style="padding-left: 30px;"><a title="1.6 XML fragments" href="#1.6" rel="alternate">1.6 XML fragments</a></p>
<p><a title="2. Encoding Guidelines" href="#2" rel="alternate">2. Encoding Guidelines</a></p>
<p style="padding-left: 30px;"><a title="2.1 Schemas" href="#2.1" rel="alternate">2.1 Schemas</a></p>
<p style="padding-left: 30px;"><a title="2.2 Common concepts" href="#2.2" rel="alternate">2.2 Common concepts</a></p>
<p style="padding-left: 30px;"><a title="2.3 Metadata for datasets and dataset series" href="#2.3" rel="alternate">2.3 Metadata for datasets and dataset series</a></p>
<p style="padding-left: 30px;"><a title="2.4 Metadata for services" href="#2.4" rel="alternate">2.4 Metadata for services</a></p>
<p>Appendices</p>
<p style="padding-left: 30px;"><a title="XML Element Order" href="/40-gemini/1046-xml-element-order" rel="alternate">XML Element Order</a></p>
<p style="padding-left: 30px;"><a title="Dataset metadata instance example" href="/40-gemini/1044-dataset-metadata-instance-example" rel="alternate">Dataset metadata instance example</a></p>
<p style="padding-left: 30px;"><a title="Series metadata instance example" href="/40-gemini/1043-series-metadata-example-old" rel="alternate">Series metadata instance example</a></p>
<p style="padding-left: 30px;"><a title="Service metadata instance example" href="/40-gemini/1042-service-metadata-instance-example" rel="alternate">Service metadata instance example</a></p>
<h2><a id="1"></a>1. Introduction</h2>
<h3><a id="1.1"></a>1.1 Purpose of guidelines</h3>
<p>The purpose of these guidelines is to explain, with the aid of examples, how to encode UK GEMINI metadata using XSD schemas of ISO / TC 211. Examples are in the form of fragments of XML.</p>
<p>UK GEMINI metadata may be for a dataset, dataset series or a service. The encoding of all types is covered.</p>
<h3><a id="1.2"></a>1.2 Scope</h3>
<p>The scope of these guidelines is the encoding of UK GEMINI [<a title="References" href="/40-gemini/1047-metadata-guidelines-for-geospatial-data-resources-part-3" target="_blank" rel="alternate noopener noreferrer">4</a>]according to ISO 19139, ISO 19119 and ISO 19136, in a way that adheres to the INSPIRE technical guidelines [<a title="References" href="/40-gemini/1047-metadata-guidelines-for-geospatial-data-resources-part-3" target="_blank" rel="alternate noopener noreferrer">9</a>] for encoding metadata.</p>
<p>Outside the scope of this document is the description of GEMINI2 metadata items, their content, obligation and meaning. Readers seeking this information should consult the GEMINI2 standard [<a title="References" href="/40-gemini/1047-metadata-guidelines-for-geospatial-data-resources-part-3" target="_blank" rel="alternate noopener noreferrer">4</a>].</p>
<h3><a id="1.3"></a>1.3 Assumed knowledge</h3>
<p>It is assumed that readers will be familiar with XML. Readers who require background information are referred to the W3Schools introduction to XML:</p>
<ul>
<li>XML - <a href="http://www.w3schools.com/xml/xml_whatis.asp">http://www.w3schools.com/xml/xml_whatis.asp</a></li>
</ul>
<p>Readers requiring an introduction to XML Schemas are referred to the W3Schools XML Schema tutorial:</p>
<ul>
<li>XSD - <a title="http://www.w3schools.com/xml/xml_schema.asp" href="http://www.w3schools.com/xml/xml_schema.asp" target="_blank" rel="alternate noopener noreferrer">http://www.w3schools.com/xml/xml_schema.asp</a></li>
</ul>
<h3><a id="1.4"></a>1.4 Terminology</h3>
<p>A Glossary is provided <a title="Glossary" href="/40-gemini/1056-glossary" target="_blank" rel="alternate noopener noreferrer">here</a>.</p>
<h3><a id="1.5"></a>1.5 Structure of document</h3>
<p>The core section, Encoding Guidelines, is split into four principal sections</p>
<ul>
<li>The first section deals with the schemas</li>
<li>The second deals with concepts which are common to all kinds of GEMINI2 metadata instances.</li>
<li>The third explains the encoding of metadata for datasets and dataset series.</li>
<li>The fourth section explains the encoding of encoding metadata for services.</li>
</ul>
<p>There is some overlap, and therefore duplication, between the sections but it is felt that this approach is best in that it clearly indicates the requirements for each type of metadata.</p>
<p>The 'Metadata for datasets and dataset series' and 'Metadata for services' sections list metadata items from GEMINI2 in the order that they appear in GEMINI2. XML elements in an XML document must follow the <a title="XML Element Order" href="/40-gemini/1046-xml-element-order" target="_blank" rel="alternate noopener noreferrer">order </a>expressed in the XSD schema to which the XML document conforms. The order of XML element expressed by the XSD schema will not be the same as the order of metadata items in GEMINI2.</p>
<p>Examples are provided by way of XML fragments throughout the document. Full metadata instances are shown here:</p>
<p style="padding-left: 30px;"><a title="Dataset metadata instance example" href="/40-gemini/1044-dataset-metadata-instance-example" target="_blank" rel="alternate noopener noreferrer">Dataset metadata instance example</a></p>
<p>An example of a schema and Schematron valid dataset metadata instance is shown below.</p>
<p><code><?xml version="1.0" encoding="UTF-8"?></code></p>
<p><code><gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd"</code></p>
<p><code> xmlns:gsr="http://www.isotc211.org/2005/gsr"</code></p>
<p><code> xmlns:xlink="http://www.w3.org/1999/xlink"</code></p>
<p><code> xmlns:gss="http://www.isotc211.org/2005/gss"</code></p>
<p><code> xmlns:gts="http://www.isotc211.org/2005/gts"</code></p>
<p><code> xmlns:gml="http://www.opengis.net/gml/3.2"</code></p>
<p><code> xmlns:gmx="http://www.isotc211.org/2005/gmx"</code></p>
<p><code> xmlns:gco="http://www.isotc211.org/2005/gco"</code></p>
<p><code> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</code></p>
<p><code> xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://inspire.ec.europa.eu/draft-schemas/inspire-md-schemas/apiso-inspire/apiso-inspire.xsd"></code></p>
<p><code><gmd:fileIdentifier></code></p>
<p><code> <gco:CharacterString>ae0e855d-f0a2-438e-855c-6ef5400f4ef3</gco:CharacterString></code></p>
<p><code></gmd:fileIdentifier></code></p>
<p><code><gmd:language></code></p>
<p><code> <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/php/code_list.php" codeListValue="eng">eng</gmd:LanguageCode></code></p>
<p><code></gmd:language></code></p>
<p><code><gmd:hierarchyLevel></code></p>
<p><code> <gmd:MD_ScopeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset">dataset</gmd:MD_ScopeCode></code></p>
<p><code></gmd:hierarchyLevel></code></p>
<p><code><gmd:contact></code></p>
<p><code> <gmd:CI_ResponsibleParty></code></p>
<p><code> <gmd:organisationName></code></p>
<p><code> <gco:CharacterString>Ordnance Survey, Great Britain</gco:CharacterString></code></p>
<p><code> </gmd:organisationName></code></p>
<p><code> <gmd:positionName></code></p>
<p><code> <gco:CharacterString>Customer Services</gco:CharacterString></code></p>
<p><code> </gmd:positionName></code></p>
<p><code> <gmd:contactInfo></code></p>
<p><code> <gmd:CI_Contact></code></p>
<p><code> <gmd:phone></code></p>
<p><code> <gmd:CI_Telephone></code></p>
<p><code> <gmd:voice></code></p>
<p><code> <gco:CharacterString>+44 (0)8456 050505</gco:CharacterString></code></p>
<p><code> </gmd:voice></code></p>
<p><code> </gmd:CI_Telephone></code></p>
<p><code> </gmd:phone></code></p>
<p><code> <gmd:address></code></p>
<p><code> <gmd:CI_Address></code></p>
<p><code> <gmd:deliveryPoint></code></p>
<p><code> <gco:CharacterString>Explorer House, Adanac Drive</gco:CharacterString></code></p>
<p><code> </gmd:deliveryPoint></code></p>
<p><code> <gmd:city></code></p>
<p><code> <gco:CharacterString>Southampton</gco:CharacterString></code></p>
<p><code> </gmd:city></code></p>
<p><code> <gmd:postalCode></code></p>
<p><code> <gco:CharacterString>SO16 0AS</gco:CharacterString></code></p>
<p><code> </gmd:postalCode></code></p>
<p><code> <gmd:country></code></p>
<p><code> <gco:CharacterString>United Kingdom</gco:CharacterString></code></p>
<p><code> </gmd:country></code></p>
<p><code> <gmd:electronicMailAddress></code></p>
<p><code><gco:CharacterString><span id="cloak39a744831ba8c974b27fd2eb61c01dd3">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
document.getElementById('cloak39a744831ba8c974b27fd2eb61c01dd3').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy39a744831ba8c974b27fd2eb61c01dd3 = 'customerservices' + '@';
addy39a744831ba8c974b27fd2eb61c01dd3 = addy39a744831ba8c974b27fd2eb61c01dd3 + 'os' + '.' + 'uk';
var addy_text39a744831ba8c974b27fd2eb61c01dd3 = 'customerservices' + '@' + 'os' + '.' + 'uk';document.getElementById('cloak39a744831ba8c974b27fd2eb61c01dd3').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy39a744831ba8c974b27fd2eb61c01dd3 + '\'>'+addy_text39a744831ba8c974b27fd2eb61c01dd3+'<\/a>';
</script></gco:CharacterString></code></p>
<p><code> </gmd:electronicMailAddress></code></p>
<p><code> </gmd:CI_Address></code></p>
<p><code> </gmd:address></code></p>
<p><code> </gmd:CI_Contact></code></p>
<p><code> </gmd:contactInfo></code></p>
<p><code> <gmd:role></code></p>
<p><code> <gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode"</code></p>
<p><code>codeListValue="pointOfContact">pointOfContact</gmd:CI_RoleCode></code></p>
<p><code> </gmd:role></code></p>
<p><code> </gmd:CI_ResponsibleParty></code></p>
<p><code></gmd:contact></code></p>
<p><code><gmd:dateStamp></code></p>
<p><code> <gco:DateTime>2010-12-02T11:39:34</gco:DateTime></code></p>
<p><code></gmd:dateStamp></code></p>
<p><code><gmd:referenceSystemInfo></code></p>
<p><code> <gmd:MD_ReferenceSystem></code></p>
<p><code> <gmd:referenceSystemIdentifier></code></p>
<p><code> <gmd:RS_Identifier></code></p>
<p><code> <gmd:code></code></p>
<p><code><gco:CharacterString> http://www.opengis.net/def/crs/EPSG/0/27700</gco:CharacterString></code></p>
<p><code> </gmd:code></code></p>
<p><code> </gmd:RS_Identifier></code></p>
<p><code> </gmd:referenceSystemIdentifier></code></p>
<p><code> </gmd:MD_ReferenceSystem></code></p>
<p><code></gmd:referenceSystemInfo></code></p>
<p><code><gmd:identificationInfo></code></p>
<p><code> <gmd:MD_DataIdentification></code></p>
<p><code> <gmd:citation></code></p>
<p><code> <gmd:CI_Citation></code></p>
<p><code> <gmd:title></code></p>
<p><code> <gco:CharacterString>Boundary-Line™</gco:CharacterString></code></p>
<p><code> </gmd:title></code></p>
<p><code> <gmd:date></code></p>
<p><code> <gmd:CI_Date></code></p>
<p><code> <gmd:date></code></p>
<p><code> <gco:Date>1996-04-01</gco:Date></code></p>
<p><code> </gmd:date></code></p>
<p><code> <gmd:dateType></code></p>
<p><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode"</code></p>
<p><code>codeListValue="creation">creation</gmd:CI_DateTypeCode></code></p>
<p><code> </gmd:dateType></code></p>
<p><code> </gmd:CI_Date></code></p>
<p><code> </gmd:date></code></p>
<p><code> <gmd:identifier></code></p>
<p><code> <gmd:RS_Identifier></code></p>
<p><code> <gmd:code></code></p>
<p><code> <gco:CharacterString>Boundary-Line™</gco:CharacterString></code></p>
<p><code> </gmd:code></code></p>
<p><code> </gmd:RS_Identifier></code></p>
<p><code> </gmd:identifier></code></p>
<p><code> </gmd:CI_Citation></code></p>
<p><code> </gmd:citation></code></p>
<p><code> <gmd:abstract></code></p>
<p><code> <gco:CharacterString>Boundary-Line is a specialist 1:10 000 scale boundaries dataset. It contains all levels of electoral and administrative boundaries, from district, wards and civil parishes (or communities) up to parliamentary, assembly and European constituencies.</code></p>
<p><code> </code></p>
<p><code>The information is represented as vector digital data. </code></p>
<p><code> </code></p>
<p><code>The boundary information is updated twice a year, in May and October. The May release contains the boundaries that have become live in the first week of May, in the year of release. The October release contains the May boundaries plus additional information. Customers can choose either May or October releases.</code></p>
<p><code> </code></p>
<p><code> * County - The named county, district, district ward, civil parish, county electoral division (ED).</code></p>
<p><code> * European constituencies - The named European region.</code></p>
<p><code> * Greater London Authority - The Greater London Authority, Greater London Authority Assembly constituency, London borough, London borough ward.</code></p>
<p><code> * Metropolitan districts - The named metropolitan district, metropolitan district ward, civil parish where appropriate.</code></p>
<p><code> * Scottish parliamentary electoral region - The named Scottish Parliamentary electoral region, Scottish parliamentary constituency.</code></p>
<p><code> * Unitary authorities- The named unitary authority, unitary authority ward or unitary authority ED as appropriate, civil parish where appropriate, together with community in Wales.</code></p>
<p><code> * Welsh Assembly Electoral Region - The named Welsh Assembly electoral region, Welsh assembly constituency.</code></p>
<p><code> * Westminster constituencies - The named Westminster constituency.</code></p>
<p><code> * Extent of the realm - Low water mark or seaward boundary extension.</code></p>
<p><code> * High water mark</code></p>
<p><code> * Unique identifiers - For administrative areas, polygons and links.</code></p>
<p><code> * Area measurements</code></p>
<p><code> * Definitive names</code></p>
<p><code> * Census codes</gco:CharacterString></code></p>
<p><code> </gmd:abstract></code></p>
<p><code> <gmd:pointOfContact></code></p>
<p><code> <gmd:CI_ResponsibleParty></code></p>
<p><code> <gmd:organisationName></code></p>
<p><code> <gco:CharacterString>Ordnance Survey, Great Britain</gco:CharacterString></code></p>
<p><code> </gmd:organisationName></code></p>
<p><code> <gmd:positionName></code></p>
<p><code> <gco:CharacterString>Customer Services</gco:CharacterString></code></p>
<p><code> </gmd:positionName></code></p>
<p><code> <gmd:contactInfo></code></p>
<p><code> <gmd:CI_Contact></code></p>
<p><code> <gmd:phone></code></p>
<p><code> <gmd:CI_Telephone></code></p>
<p><code> <gmd:voice></code></p>
<p><code> <gco:CharacterString>+44 (0)8456 050505</gco:CharacterString></code></p>
<p><code> </gmd:voice></code></p>
<p><code> </gmd:CI_Telephone></code></p>
<p><code> </gmd:phone></code></p>
<p><code> <gmd:address></code></p>
<p><code> <gmd:CI_Address></code></p>
<p><code> <gmd:deliveryPoint></code></p>
<p><code> <gco:CharacterString>Explorer House, Adanac Drive</gco:CharacterString></code></p>
<p><code> </gmd:deliveryPoint></code></p>
<p><code> <gmd:city></code></p>
<p><code> <gco:CharacterString>Southampton</gco:CharacterString></code></p>
<p><code> </gmd:city></code></p>
<p><code> <gmd:postalCode></code></p>
<p><code> <gco:CharacterString>SO16 0AS</gco:CharacterString></code></p>
<p><code> </gmd:postalCode></code></p>
<p><code> <gmd:country></code></p>
<p><code> <gco:CharacterString>United Kingdom</gco:CharacterString></code></p>
<p><code> </gmd:country></code></p>
<p><code> <gmd:electronicMailAddress></code></p>
<p><code><gco:CharacterString><span id="cloak1ab7c4803e7877895c4c7fd7ae0f1f15">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
document.getElementById('cloak1ab7c4803e7877895c4c7fd7ae0f1f15').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy1ab7c4803e7877895c4c7fd7ae0f1f15 = 'customerservices' + '@';
addy1ab7c4803e7877895c4c7fd7ae0f1f15 = addy1ab7c4803e7877895c4c7fd7ae0f1f15 + 'os' + '.' + 'uk';
var addy_text1ab7c4803e7877895c4c7fd7ae0f1f15 = 'customerservices' + '@' + 'os' + '.' + 'uk';document.getElementById('cloak1ab7c4803e7877895c4c7fd7ae0f1f15').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy1ab7c4803e7877895c4c7fd7ae0f1f15 + '\'>'+addy_text1ab7c4803e7877895c4c7fd7ae0f1f15+'<\/a>';
</script></gco:CharacterString></code></p>
<p><code> </gmd:electronicMailAddress></code></p>
<p><code> </gmd:CI_Address></code></p>
<p><code> </gmd:address></code></p>
<p><code> <gmd:onlineResource></code></p>
<p><code> <gmd:CI_OnlineResource></code></p>
<p><code> <gmd:linkage></code></p>
<p><code> <gmd:URL>https://os.uk/</gmd:URL></code></p>
<p><code> </gmd:linkage></code></p>
<p><code> <gmd:description></code></p>
<p><code> <gco:CharacterString>Ordnance Survey, Great Britain top level website</gco:CharacterString></code></p>
<p><code> </gmd:description></code></p>
<p><code> </gmd:CI_OnlineResource></code></p>
<p><code> </gmd:onlineResource></code></p>
<p><code> </gmd:CI_Contact></code></p>
<p><code> </gmd:contactInfo></code></p>
<p><code> <gmd:role></code></p>
<p><code> <gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode"</code></p>
<p><code>codeListValue="publisher">publisher</gmd:CI_RoleCode></code></p>
<p><code> </gmd:role></code></p>
<p><code> </gmd:CI_ResponsibleParty></code></p>
<p><code> </gmd:pointOfContact></code></p>
<p><code> <gmd:resourceMaintenance></code></p>
<p><code> <gmd:MD_MaintenanceInformation></code></p>
<p><code> <gmd:maintenanceAndUpdateFrequency></code></p>
<p><code> <gmd:MD_MaintenanceFrequencyCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode"</code></p>
<p><code>codeListValue="biannually">biannually</gmd:MD_MaintenanceFrequencyCode></code></p>
<p><code> </gmd:maintenanceAndUpdateFrequency></code></p>
<p><code> </gmd:MD_MaintenanceInformation></code></p>
<p><code> </gmd:resourceMaintenance></code></p>
<p><code> <gmd:graphicOverview></code></p>
<p><code> <gmd:MD_BrowseGraphic></code></p>
<p><code> <gmd:fileName></code></p>
<p><code> <gco:CharacterString>BoundaryLine_s.png</gco:CharacterString></code></p>
<p><code> </gmd:fileName></code></p>
<p><code> <gmd:fileDescription></code></p>
<p><code> <gco:CharacterString>thumbnail</gco:CharacterString></code></p>
<p><code> </gmd:fileDescription></code></p>
<p><code> <gmd:fileType></code></p>
<p><code> <gco:CharacterString>png</gco:CharacterString></code></p>
<p><code> </gmd:fileType></code></p>
<p><code> </gmd:MD_BrowseGraphic></code></p>
<p><code> </gmd:graphicOverview></code></p>
<p><code> <gmd:descriptiveKeywords></code></p>
<p><code> <gmd:MD_Keywords></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>Geographical names</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:thesaurusName></code></p>
<p><code> <gmd:CI_Citation></code></p>
<p><code> <gmd:title></code></p>
<p><code> <gco:CharacterString>GEMET - INSPIRE themes, version 1.0</gco:CharacterString></code></p>
<p><code> </gmd:title></code></p>
<p><code> <gmd:date></code></p>
<p><code> <gmd:CI_Date></code></p>
<p><code> <gmd:date></code></p>
<p><code> <gco:Date>2008-06-01</gco:Date></code></p>
<p><code> </gmd:date></code></p>
<p><code> <gmd:dateType></code></p>
<p><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode"</code></p>
<p><code>codeListValue="publication">publication</gmd:CI_DateTypeCode></code></p>
<p><code> </gmd:dateType></code></p>
<p><code> </gmd:CI_Date></code></p>
<p><code> </gmd:date></code></p>
<p><code> </gmd:CI_Citation></code></p>
<p><code> </gmd:thesaurusName></code></p>
<p><code> </gmd:MD_Keywords></code></p>
<p><code> </gmd:descriptiveKeywords></code></p>
<p><code> <gmd:descriptiveKeywords></code></p>
<p><code> <gmd:MD_Keywords></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>Legal government boundaries</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>Mapping</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>Mid-Scales</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>Electorial Boundaries</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>administrative boundaries</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>GSS codes</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>Ordnance Survey</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>OS</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> </gmd:MD_Keywords></code></p>
<p><code> </gmd:descriptiveKeywords></code></p>
<p><code> <gmd:resourceConstraints></code></p>
<p><code> <gmd:MD_LegalConstraints></code></p>
<p><code> <gmd:accessConstraints></code></p>
<p><code> <gmd:MD_RestrictionCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"</code></p>
<p><code>codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode></code></p>
<p><code> </gmd:accessConstraints></code></p>
<p><code></code></p>
<p><code> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1e"/><br /> </gmd:otherConstraints></code></p>
<p><code> <gmd:otherConstraints></code></p>
<p><code> <gco:CharacterString>For further details on licensing see http://www.ordnancesurvey.co.uk/oswebsite/business/licences/index.html</gco:CharacterString></code></p>
<p><code> </gmd:otherConstraints></code></p>
<p><code> </gmd:MD_LegalConstraints></code></p>
<p><code> </gmd:resourceConstraints></code></p>
<p><code> <gmd:resourceConstraints></code></p>
<p><code> <gmd:MD_LegalConstraints><br /> <gmd:useConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:useConstraints><br /> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="https://os.uk/business/licences/index.html">Use limitation dependent upon licence</gmx:Anchor><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints></code></p>
<p><code> </gmd:resourceConstraints></code></p>
<p><code> <gmd:spatialResolution></code></p>
<p><code> <gmd:MD_Resolution></code></p>
<p><code> <gmd:equivalentScale></code></p>
<p><code> <gmd:MD_RepresentativeFraction></code></p>
<p><code> <gmd:denominator></code></p>
<p><code> <gco:Integer>10000</gco:Integer></code></p>
<p><code> </gmd:denominator></code></p>
<p><code> </gmd:MD_RepresentativeFraction></code></p>
<p><code> </gmd:equivalentScale></code></p>
<p><code> </gmd:MD_Resolution></code></p>
<p><code> </gmd:spatialResolution></code></p>
<p><code> <gmd:language></code></p>
<p><code> <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/php/code_list.php" codeListValue="eng">eng</gmd:LanguageCode></code></p>
<p><code> </gmd:language></code></p>
<p><code> <gmd:topicCategory></code></p>
<p><code> <gmd:MD_TopicCategoryCode>boundaries</gmd:MD_TopicCategoryCode></code></p>
<p><code> </gmd:topicCategory></code></p>
<p><code> <gmd:extent></code></p>
<p><code> <gmd:EX_Extent></code></p>
<p><code> <gmd:geographicElement></code></p>
<p><code> <gmd:EX_GeographicBoundingBox></code></p>
<p><code> <gmd:westBoundLongitude></code></p>
<p><code> <gco:Decimal>-8.45</gco:Decimal></code></p>
<p><code> </gmd:westBoundLongitude></code></p>
<p><code> <gmd:eastBoundLongitude></code></p>
<p><code> <gco:Decimal>1.78</gco:Decimal></code></p>
<p><code> </gmd:eastBoundLongitude></code></p>
<p><code> <gmd:southBoundLatitude></code></p>
<p><code> <gco:Decimal>49.86</gco:Decimal></code></p>
<p><code> </gmd:southBoundLatitude></code></p>
<p><code> <gmd:northBoundLatitude></code></p>
<p><code> <gco:Decimal>60.86</gco:Decimal></code></p>
<p><code> </gmd:northBoundLatitude></code></p>
<p><code> </gmd:EX_GeographicBoundingBox></code></p>
<p><code> </gmd:geographicElement></code></p>
<p><code> <gmd:temporalElement></code></p>
<p><code> <gmd:EX_TemporalExtent></code></p>
<p><code> <gmd:extent></code></p>
<p><code> <gml:TimePeriod gml:id="T1"></code></p>
<p><code> <gml:beginPosition>2010-06-01</gml:beginPosition></code></p>
<p><code> <gml:endPosition>2010-09-30</gml:endPosition></code></p>
<p><code> </gml:TimePeriod></code></p>
<p><code> </gmd:extent></code></p>
<p><code> </gmd:EX_TemporalExtent></code></p>
<p><code> </gmd:temporalElement></code></p>
<p><code> </gmd:EX_Extent></code></p>
<p><code> </gmd:extent></code></p>
<p><code> </gmd:MD_DataIdentification></code></p>
<p><code></gmd:identificationInfo></code></p>
<p><code><gmd:distributionInfo></code></p>
<p><code> <gmd:MD_Distribution></code></p>
<p><code> <gmd:distributionFormat></code></p>
<p><code> <gmd:MD_Format></code></p>
<p><code> <gmd:name></code></p>
<p><code> <gco:CharacterString>ESRI® Spatial data format (Shapefile)</gco:CharacterString></code></p>
<p><code> </gmd:name></code></p>
<p><code> <gmd:version></code></p>
<p><code> <gco:CharacterString>1.0</gco:CharacterString></code></p>
<p><code> </gmd:version></code></p>
<p><code> </gmd:MD_Format></code></p>
<p><code> </gmd:distributionFormat></code></p>
<p><code> <gmd:transferOptions></code></p>
<p><code> <gmd:MD_DigitalTransferOptions></code></p>
<p><code> <gmd:onLine></code></p>
<p><code> <gmd:CI_OnlineResource></code></p>
<p><code> <gmd:linkage></code></p>
<p><code><gmd:URL>https://os.uk/oswebsite/products/boundaryline/</gmd:URL></code></p>
<p><code> </gmd:linkage></code></p>
<p><code> <gmd:function></code></p>
<p><code> <gmd:CI_OnLineFunctionCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_OnLineFunctionCode"</code></p>
<p><code>codeListValue="information">information</gmd:CI_OnLineFunctionCode></code></p>
<p><code> </gmd:function></code></p>
<p><code> </gmd:CI_OnlineResource></code></p>
<p><code> </gmd:onLine></code></p>
<p><code> </gmd:MD_DigitalTransferOptions></code></p>
<p><code> </gmd:transferOptions></code></p>
<p><code> </gmd:MD_Distribution></code></p>
<p><code></gmd:distributionInfo></code></p>
<p><code><gmd:dataQualityInfo></code></p>
<p><code> <gmd:DQ_DataQuality></code></p>
<p><code> <gmd:scope></code></p>
<p><code> <gmd:DQ_Scope></code></p>
<p><code> <gmd:level></code></p>
<p><code> <gmd:MD_ScopeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_ScopeCode"</code></p>
<p><code>codeListValue="dataset">dataset</gmd:MD_ScopeCode></code></p>
<p><code> </gmd:level></code></p>
<p><code> </gmd:DQ_Scope></code></p>
<p><code> </gmd:scope></code></p>
<p><code> <gmd:report><br /> <gmd:DQ_DomainConsistency><br /> <gmd:result><br /> <gmd:DQ_ConformanceResult><br /> <gmd:specification><br /> <gmd:CI_Citation><br /> <gmd:title><br /> <gmx:Anchor xlink:href="http://data.europa.eu/eli/reg/2010/1089">Commission Regulation (EU) No 1089/2010 of 23 November 2010 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards interoperability of spatial data sets and services</gmx:Anchor><br /> </gmd:title><br /> <gmd:date><br /> <gmd:CI_Date><br /> <gmd:date><br /> <gco:Date>2010-12-08</gco:Date><br /> </gmd:date><br /> <gmd:dateType><br /> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication"/><br /> </gmd:dateType><br /> </gmd:CI_Date><br /> </gmd:date><br /> </gmd:CI_Citation><br /> </gmd:specification><br /> <!-- Explanation is a required element but can be empty --><br /> <gmd:explanation gco:nilReason="inapplicable"/><br /> <!-- If not tested then --><br /> <gmd:pass gco:nilReason="unknown"/><br /> </gmd:DQ_ConformanceResult><br /> </gmd:result><br /> </gmd:DQ_DomainConsistency><br /> </gmd:report></code></p>
<p><code> <gmd:lineage></code></p>
<p><code> <gmd:LI_Lineage></code></p>
<p><code> <gmd:statement></code></p>
<p><code> <gco:CharacterString>Captured and maintained solely from legal boundary changes</gco:CharacterString></code></p>
<p><code> </gmd:statement></code></p>
<p><code> </gmd:LI_Lineage></code></p>
<p><code> </gmd:lineage></code></p>
<p><code> </gmd:DQ_DataQuality></code></p>
<p><code> </gmd:dataQualityInfo></code></p>
<p><code></gmd:MD_Metadata></code></p>
<p style="padding-left: 30px;"><a title="Series metadata instance example" href="/40-gemini/1043-series-metadata-example-old" target="_blank" rel="alternate noopener noreferrer">Series metadata instance example</a></p>
<p>An example of a schema and Schematron valid metadata instance is shown below.</p>
<p><code><?xml version="1.0" encoding="utf-8"?></code></p>
<p><code><gmd:MD_Metadata xmlns:gsr="http://www.isotc211.org/2005/gsr"</code></p>
<p><code> xmlns:xlink="http://www.w3.org/1999/xlink" </code></p>
<p><code> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</code></p>
<p><code> xmlns:gss="http://www.isotc211.org/2005/gss"</code></p>
<p><code> xmlns:gts="http://www.isotc211.org/2005/gts"</code></p>
<p><code> xmlns:gml="http://www.opengis.net/gml/3.2"</code></p>
<p><code> xmlns:gmx="http://www.isotc211.org/2005/gmx"</code></p>
<p><code> xmlns:srv="http://www.isotc211.org/2005/srv"</code></p>
<p><code> xmlns:gco="http://www.isotc211.org/2005/gco"</code></p>
<p><code> xmlns:gmd="http://www.isotc211.org/2005/gmd"></code></p>
<p><code><gmd:fileIdentifier></code></p>
<p><code> <gco:CharacterString>7928d609-e225-494c-ab79-99b92de8b5bb</gco:CharacterString></code></p>
<p><code> </gmd:fileIdentifier></code></p>
<p><code> <gmd:language></code></p>
<p><code> <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/php/code_list.php" codeListValue="eng">eng</gmd:LanguageCode></code></p>
<p><code> </gmd:language></code></p>
<p><code> <gmd:hierarchyLevel></code></p>
<p><code> <gmd:MD_ScopeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="series">series</gmd:MD_ScopeCode></code></p>
<p><code> </gmd:hierarchyLevel></code></p>
<p><code> <gmd:hierarchyLevelName></code></p>
<p><code> <gco:CharacterString>10k Raster</gco:CharacterString></code></p>
<p><code> </gmd:hierarchyLevelName></code></p>
<p><code> <gmd:contact></code></p>
<p><code> <gmd:CI_ResponsibleParty></code></p>
<p><code> <gmd:organisationName></code></p>
<p><code> <gco:CharacterString>Ordnance Survey</gco:CharacterString></code></p>
<p><code> </gmd:organisationName></code></p>
<p><code> <gmd:contactInfo></code></p>
<p><code> <gmd:CI_Contact></code></p>
<p><code> <gmd:phone></code></p>
<p><code> <gmd:CI_Telephone></code></p>
<p><code> <gmd:voice></code></p>
<p><code> <gco:CharacterString>+44 (0)8456 050505</gco:CharacterString></code></p>
<p><code> </gmd:voice></code></p>
<p><code> <gmd:facsimile></code></p>
<p><code> <gco:CharacterString>+44 (0)23 80792615</gco:CharacterString></code></p>
<p><code> </gmd:facsimile></code></p>
<p><code> </gmd:CI_Telephone></code></p>
<p><code> </gmd:phone></code></p>
<p><code> <gmd:address></code></p>
<p><code> <gmd:CI_Address></code></p>
<p><code> <gmd:deliveryPoint></code></p>
<p><code> <gco:CharacterString>Ordnance Survey</gco:CharacterString></code></p>
<p><code> </gmd:deliveryPoint></code></p>
<p><code> <gmd:deliveryPoint></code></p>
<p><code> <gco:CharacterString>Romsey Road</gco:CharacterString></code></p>
<p><code> </gmd:deliveryPoint></code></p>
<p><code> <gmd:city></code></p>
<p><code> <gco:CharacterString>Southampton</gco:CharacterString></code></p>
<p><code> </gmd:city></code></p>
<p><code> <gmd:postalCode></code></p>
<p><code> <gco:CharacterString>SO16 4GU</gco:CharacterString></code></p>
<p><code> </gmd:postalCode></code></p>
<p><code> <gmd:electronicMailAddress></code></p>
<p><code><gco:CharacterString><span id="cloake23688d210e66ecfa9eacfb3d95c45b7">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
document.getElementById('cloake23688d210e66ecfa9eacfb3d95c45b7').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addye23688d210e66ecfa9eacfb3d95c45b7 = 'customerservices' + '@';
addye23688d210e66ecfa9eacfb3d95c45b7 = addye23688d210e66ecfa9eacfb3d95c45b7 + 'ordnancesurvey' + '.' + 'co' + '.' + 'uk';
var addy_texte23688d210e66ecfa9eacfb3d95c45b7 = 'customerservices' + '@' + 'ordnancesurvey' + '.' + 'co' + '.' + 'uk';document.getElementById('cloake23688d210e66ecfa9eacfb3d95c45b7').innerHTML += '<a ' + path + '\'' + prefix + ':' + addye23688d210e66ecfa9eacfb3d95c45b7 + '\'>'+addy_texte23688d210e66ecfa9eacfb3d95c45b7+'<\/a>';
</script></gco:CharacterString></code></p>
<p><code> </gmd:electronicMailAddress></code></p>
<p><code> </gmd:CI_Address></code></p>
<p><code> </gmd:address></code></p>
<p><code> <gmd:onlineResource></code></p>
<p><code> <gmd:CI_OnlineResource></code></p>
<p><code> <gmd:linkage></code></p>
<p><code> <gmd:URL>http://www.ordnancesurvey.co.uk</gmd:URL></code></p>
<p><code> </gmd:linkage></code></p>
<p><code> </gmd:CI_OnlineResource></code></p>
<p><code> </gmd:onlineResource></code></p>
<p><code> </gmd:CI_Contact></code></p>
<p><code> </gmd:contactInfo></code></p>
<p><code> <gmd:role></code></p>
<p><code> <gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="pointOfContact">pointOfContact</gmd:CI_RoleCode></code></p>
<p><code> </gmd:role></code></p>
<p><code> </gmd:CI_ResponsibleParty></code></p>
<p><code> </gmd:contact></code></p>
<p><code> <gmd:dateStamp></code></p>
<p><code> <gco:Date>2010-09-09</gco:Date></code></p>
<p><code> </gmd:dateStamp></code></p>
<p><code><gmd:referenceSystemInfo></code></p>
<p><code> <gmd:MD_ReferenceSystem></code></p>
<p><code> <gmd:referenceSystemIdentifier></code></p>
<p><code> <gmd:RS_Identifier></code></p>
<p><code> <gmd:code></code></p>
<p><code><gco:CharacterString> http://www.opengis.net/def/crs/EPSG/0/27700</gco:CharacterString></code></p>
<p><code> </gmd:code></code></p>
<p><code> </gmd:RS_Identifier></code></p>
<p><code> </gmd:referenceSystemIdentifier></code></p>
<p><code> </gmd:MD_ReferenceSystem></code></p>
<p><code> </gmd:referenceSystemInfo></code></p>
<p><code> <gmd:identificationInfo></code></p>
<p><code> <gmd:MD_DataIdentification></code></p>
<p><code> <gmd:citation></code></p>
<p><code> <gmd:CI_Citation></code></p>
<p><code> <gmd:title></code></p>
<p><code> <gco:CharacterString>1:10 000 Scale Raster</gco:CharacterString></code></p>
<p><code> </gmd:title></code></p>
<p><code> <gmd:alternateTitle></code></p>
<p><code> <gco:CharacterString>10k Raster</gco:CharacterString></code></p>
<p><code> </gmd:alternateTitle></code></p>
<p><code> <gmd:date></code></p>
<p><code> <gmd:CI_Date></code></p>
<p><code> <gmd:date></code></p>
<p><code> <gco:Date>2010-05-12</gco:Date></code></p>
<p><code> </gmd:date></code></p>
<p><code> <gmd:dateType></code></p>
<p><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode></code></p>
<p><code> </gmd:dateType></code></p>
<p><code> </gmd:CI_Date></code></p>
<p><code> </gmd:date></code></p>
<p><code> <gmd:identifier></code></p>
<p><code> <gmd:RS_Identifier></code></p>
<p><code> <gmd:code></code></p>
<p><code> <gco:CharacterString>OS_10k_Raster</gco:CharacterString></code></p>
<p><code> </gmd:code></code></p>
<p><code> <gmd:codeSpace></code></p>
<p><code><gco:CharacterString>http://www.ordnancesurvey.co.uk</gco:CharacterString></code></p>
<p><code> </gmd:codeSpace></code></p>
<p><code> </gmd:RS_Identifier></code></p>
<p><code> </gmd:identifier></code></p>
<p><code> </gmd:CI_Citation></code></p>
<p><code> </gmd:citation></code></p>
<p><code> <gmd:abstract></code></p>
<p><code> <gco:CharacterString>Detailed raster mapping generated from 1:10 000 scale vector Landplan data. For overlay of information, particularly useful for site analysis, planning and marketing in urban areas.</gco:CharacterString></code></p>
<p><code> </gmd:abstract></code></p>
<p><code> <gmd:pointOfContact></code></p>
<p><code> <gmd:CI_ResponsibleParty></code></p>
<p><code> <gmd:organisationName></code></p>
<p><code> <gco:CharacterString>Ordnance Survey</gco:CharacterString></code></p>
<p><code> </gmd:organisationName></code></p>
<p><code> <gmd:contactInfo></code></p>
<p><code> <gmd:CI_Contact></code></p>
<p><code> <gmd:phone></code></p>
<p><code> <gmd:CI_Telephone></code></p>
<p><code> <gmd:voice></code></p>
<p><code> <gco:CharacterString>+44 (0)8456 050505</gco:CharacterString></code></p>
<p><code> </gmd:voice></code></p>
<p><code> <gmd:facsimile></code></p>
<p><code> <gco:CharacterString>+44 (0)23 80792615</gco:CharacterString></code></p>
<p><code> </gmd:facsimile></code></p>
<p><code> </gmd:CI_Telephone></code></p>
<p><code> </gmd:phone></code></p>
<p><code> <gmd:address></code></p>
<p><code> <gmd:CI_Address></code></p>
<p><code> <gmd:deliveryPoint></code></p>
<p><code> <gco:CharacterString>Ordnance Survey</gco:CharacterString></code></p>
<p><code> </gmd:deliveryPoint></code></p>
<p><code> <gmd:deliveryPoint></code></p>
<p><code> <gco:CharacterString>Romsey Road</gco:CharacterString></code></p>
<p><code> </gmd:deliveryPoint></code></p>
<p><code> <gmd:city></code></p>
<p><code> <gco:CharacterString>Southampton</gco:CharacterString></code></p>
<p><code> </gmd:city></code></p>
<p><code> <gmd:postalCode></code></p>
<p><code> <gco:CharacterString>SO16 4GU</gco:CharacterString></code></p>
<p><code> </gmd:postalCode></code></p>
<p><code> <gmd:electronicMailAddress></code></p>
<p><code><gco:CharacterString><span id="cloak8289287e7c10421577643a7aeb626abe">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
document.getElementById('cloak8289287e7c10421577643a7aeb626abe').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy8289287e7c10421577643a7aeb626abe = 'customerservices' + '@';
addy8289287e7c10421577643a7aeb626abe = addy8289287e7c10421577643a7aeb626abe + 'ordnancesurvey' + '.' + 'co' + '.' + 'uk';
var addy_text8289287e7c10421577643a7aeb626abe = 'customerservices' + '@' + 'ordnancesurvey' + '.' + 'co' + '.' + 'uk';document.getElementById('cloak8289287e7c10421577643a7aeb626abe').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy8289287e7c10421577643a7aeb626abe + '\'>'+addy_text8289287e7c10421577643a7aeb626abe+'<\/a>';
</script></gco:CharacterString></code></p>
<p><code> </gmd:electronicMailAddress></code></p>
<p><code> </gmd:CI_Address></code></p>
<p><code> </gmd:address></code></p>
<p><code> <gmd:onlineResource></code></p>
<p><code> <gmd:CI_OnlineResource></code></p>
<p><code> <gmd:linkage></code></p>
<p><code> <gmd:URL>http://www.ordnancesurvey.co.uk/</gmd:URL></code></p>
<p><code> </gmd:linkage></code></p>
<p><code> </gmd:CI_OnlineResource></code></p>
<p><code> </gmd:onlineResource></code></p>
<p><code> </gmd:CI_Contact></code></p>
<p><code> </gmd:contactInfo></code></p>
<p><code> <gmd:role></code></p>
<p><code> <gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="originator">originator</gmd:CI_RoleCode></code></p>
<p><code> </gmd:role></code></p>
<p><code> </gmd:CI_ResponsibleParty></code></p>
<p><code> </gmd:pointOfContact></code></p>
<p><code> <gmd:resourceMaintenance></code></p>
<p><code> <gmd:MD_MaintenanceInformation></code></p>
<p><code> <gmd:maintenanceAndUpdateFrequency></code></p>
<p><code> <gmd:MD_MaintenanceFrequencyCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode" codeListValue="continual">continual</gmd:MD_MaintenanceFrequencyCode></code></p>
<p><code> </gmd:maintenanceAndUpdateFrequency></code></p>
<p><code> </gmd:MD_MaintenanceInformation></code></p>
<p><code> </gmd:resourceMaintenance></code></p>
<p><code> <gmd:descriptiveKeywords></code></p>
<p><code> <gmd:MD_Keywords></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>raster</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:keyword></code></p>
<p><code> <gco:CharacterString>map</gco:CharacterString></code></p>
<p><code> </gmd:keyword></code></p>
<p><code> <gmd:thesaurusName></code></p>
<p><code> <gmd:CI_Citation></code></p>
<p><code> <gmd:title></code></p>
<p><code> <gco:CharacterString>GEMET - Concepts, version 2.4</gco:CharacterString></code></p>
<p><code> </gmd:title></code></p>
<p><code> <gmd:date></code></p>
<p><code> <gmd:CI_Date></code></p>
<p><code> <gmd:date></code></p>
<p><code> <gco:Date>2010-01-13</gco:Date></code></p>
<p><code> </gmd:date></code></p>
<p><code> <gmd:dateType></code></p>
<p><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication" /></code></p>
<p><code> </gmd:dateType></code></p>
<p><code> </gmd:CI_Date></code></p>
<p><code> </gmd:date></code></p>
<p><code> <gmd:edition></code></p>
<p><code> <gco:CharacterString>version 2.4</gco:CharacterString></code></p>
<p><code> </gmd:edition></code></p>
<p><code> </gmd:CI_Citation></code></p>
<p><code> </gmd:thesaurusName></code></p>
<p><code> </gmd:MD_Keywords></code></p>
<p><code> </gmd:descriptiveKeywords></code></p>
<p><code></code></p>
<pre><code> <gmd:resourceConstraints></code><br /><code> <gmd:MD_LegalConstraints></code><br /> <gmd:accessConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:accessConstraints><br /> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations">no limitations</gmx:Anchor><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints><br /> </gmd:resourceConstraints><br /> <gmd:resourceConstraints><br /> <gmd:MD_LegalConstraints><br /> <gmd:useConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:useConstraints><br /><code> <gmd:otherConstraints></code><br /><code> <gco:CharacterString>The 1:625k DiGMap data is made available for all uses - including commercial use, however the British Geological Survey (BGS) at all times retains the copyright in this material and you are not permitted, without an appropriate licence, to set up a service selling on this material. Your own use of any information provided by the British Geological Survey (BGS) is at your own risk. Neither BGS nor the Natural Environment Research Council (NERC) gives any warranty, condition or representation as to the quality, accuracy or completeness of the information or its suitability for any use or purpose. All implied conditions relating to the quality or suitability of the information, and all liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law.</gco:CharacterString></code><br /><code> </gmd:otherConstraints></code><br /><code></code> <gmd:otherConstraints><br /><code> <gco:CharacterString>Ordnance Survey data licensing terms and conditions</gco:CharacterString></code><code><br /> </gmd:otherConstraints></code></pre>
<p><code> </gmd:MD_LegalConstraints></code></p>
<p><code> </gmd:resourceConstraints></code></p>
<p><code> <gmd:resourceConstraints></code></p>
<p><code> <gmd:MD_Constraints></code></p>
<p><code> <gmd:useLimitation></code></p>
<p><code> <gco:CharacterString>Annual license fee for use of the data for internal business use including paper copies. Separate license fees and conditions for specific use to third parties</gco:CharacterString></code></p>
<p><code> </gmd:useLimitation></code></p>
<p><code> </gmd:MD_Constraints></code></p>
<p><code> </gmd:resourceConstraints></code></p>
<p><code> <gmd:spatialResolution></code></p>
<p><code> <gmd:MD_Resolution></code></p>
<p><code> <gmd:equivalentScale></code></p>
<p><code> <gmd:MD_RepresentativeFraction></code></p>
<p><code> <gmd:denominator></code></p>
<p><code> <gco:Integer>10000</gco:Integer></code></p>
<p><code> </gmd:denominator></code></p>
<p><code> </gmd:MD_RepresentativeFraction></code></p>
<p><code> </gmd:equivalentScale></code></p>
<p><code> </gmd:MD_Resolution></code></p>
<p><code> </gmd:spatialResolution></code></p>
<p><code> <gmd:language></code></p>
<p><code> <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/php/code_list.php" codeListValue="eng">eng</gmd:LanguageCode></code></p>
<p><code> </gmd:language></code></p>
<p><code> <gmd:topicCategory></code></p>
<p><code><gmd:MD_TopicCategoryCode>imageryBaseMapsEarthCover</gmd:MD_TopicCategoryCode></code></p>
<p><code> </gmd:topicCategory></code></p>
<p><code> <gmd:extent></code></p>
<p><code> <gmd:EX_Extent></code></p>
<p><code> <gmd:geographicElement></code></p>
<p><code> <gmd:EX_GeographicBoundingBox></code></p>
<p><code> <gmd:westBoundLongitude></code></p>
<p><code> <gco:Decimal>-8.45472</gco:Decimal></code></p>
<p><code> </gmd:westBoundLongitude></code></p>
<p><code> <gmd:eastBoundLongitude></code></p>
<p><code> <gco:Decimal>1.78024</gco:Decimal></code></p>
<p><code> </gmd:eastBoundLongitude></code></p>
<p><code> <gmd:southBoundLatitude></code></p>
<p><code> <gco:Decimal>49.8634</gco:Decimal></code></p>
<p><code> </gmd:southBoundLatitude></code></p>
<p><code> <gmd:northBoundLatitude></code></p>
<p><code> <gco:Decimal>60.8599</gco:Decimal></code></p>
<p><code> </gmd:northBoundLatitude></code></p>
<p><code> </gmd:EX_GeographicBoundingBox></code></p>
<p><code> </gmd:geographicElement></code></p>
<p><code> <gmd:temporalElement></code></p>
<p><code> <gmd:EX_TemporalExtent></code></p>
<p><code> <gmd:extent></code></p>
<p><code> <gml:TimePeriod gml:id="_75c1e6a9-44ff-4aef-b923-c1b6f59d53a6"></code></p>
<p><code> <gml:beginPosition>2003-03-04</gml:beginPosition></code></p>
<p><code> <gml:endPosition>2010-05-12</gml:endPosition></code></p>
<p><code> </gml:TimePeriod></code></p>
<p><code> </gmd:extent></code></p>
<p><code> </gmd:EX_TemporalExtent></code></p>
<p><code> </gmd:temporalElement></code></p>
<p><code> </gmd:EX_Extent></code></p>
<p><code> </gmd:extent></code></p>
<p><code> <gmd:supplementalInformation></code></p>
<p><code><gco:CharacterString>http://www.ordnancesurvey.co.uk/oswebsite/products/10kraster/</gco:CharacterString></code></p>
<p><code> </gmd:supplementalInformation></code></p>
<p><code> </gmd:MD_DataIdentification></code></p>
<p><code></gmd:identificationInfo></code></p>
<p><code> <gmd:dataQualityInfo></code></p>
<p><code> <gmd:DQ_DataQuality></code></p>
<p><code> <gmd:scope></code></p>
<p><code> <gmd:DQ_Scope></code></p>
<p><code> <gmd:level></code></p>
<p><code> <gmd:MD_ScopeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="series">series</gmd:MD_ScopeCode></code></p>
<p><code> </gmd:level></code></p>
<p><code> </gmd:DQ_Scope></code></p>
<p><code> </gmd:scope></code></p>
<p><code> <gmd:lineage></code></p>
<p><code> <gmd:LI_Lineage></code></p>
<p><code> <gmd:statement></code></p>
<p><code> <gco:CharacterString>Unknown</gco:CharacterString></code></p>
<p><code> </gmd:statement></code></p>
<p><code> </gmd:LI_Lineage></code></p>
<p><code> </gmd:lineage></code></p>
<p><code> </gmd:DQ_DataQuality></code></p>
<p><code> </gmd:dataQualityInfo></code></p>
<p><code></gmd:MD_Metadata></code></p>
<p><em>Last updated: April 2018</em><code></code></p>
<p style="padding-left: 30px;"><a title="Service metadata instance example" href="/40-gemini/1042-service-metadata-instance-example" target="_blank" rel="alternate noopener noreferrer">Service metadata instance example</a></p>
<p>An example of a schema and Schematron valid service metadata instance is shown below.</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?></code><br /><code><gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd"</code><br /><code> xmlns:gco="http://www.isotc211.org/2005/gco"</code><br /><code> xmlns:gml="http://www.opengis.net/gml/3.2"</code><br /><code> xmlns:gmx="http://www.isotc211.org/2005/gmx"</code><br /><code> xmlns:gsr="http://www.isotc211.org/2005/gsr"</code><br /><code> xmlns:gss="http://www.isotc211.org/2005/gss"</code><br /><code> xmlns:gts="http://www.isotc211.org/2005/gts"</code><br /><code> xmlns:srv="http://www.isotc211.org/2005/srv"</code><br /><code> xmlns:xlink="http://www.w3.org/1999/xlink"></code><br /><code> <gmd:fileIdentifier></code><br /><code> <gco:CharacterString>a0a82d76-657c-2a78-e044-0003ba9b0d98</gco:CharacterString></code><br /><code> </gmd:fileIdentifier></code><br /><code> <gmd:language></code><br /><code> <gmd:LanguageCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#LanguageCode" codeListValue="eng">English</gmd:LanguageCode></code><br /><code> </gmd:language></code><br /><code> <gmd:hierarchyLevel></code><br /><code> <gmd:MD_ScopeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="service">service</gmd:MD_ScopeCode></code><br /><code> </gmd:hierarchyLevel></code><br /><code> <gmd:hierarchyLevelName></code><br /><code> <gco:CharacterString>service</gco:CharacterString></code><br /><code> </gmd:hierarchyLevelName></code><br /><code> <gmd:contact></code><br /><code> <gmd:CI_ResponsibleParty></code><br /><code> <gmd:organisationName></code><br /><code> <gco:CharacterString>British Geological Survey</gco:CharacterString></code><br /><code> </gmd:organisationName></code><br /><code> <gmd:contactInfo></code><br /><code> <gmd:CI_Contact></code><br /><code> <gmd:phone></code><br /><code> <gmd:CI_Telephone></code><br /><code> <gmd:voice></code><br /><code> <gco:CharacterString>+44 115 936 3100 Ex:3115</gco:CharacterString></code><br /><code> </gmd:voice></code><br /><code> </gmd:CI_Telephone></code><br /><code> </gmd:phone></code><br /><code> <gmd:address></code><br /><code> <gmd:CI_Address></code><br /><code> <gmd:deliveryPoint></code><br /><code> <gco:CharacterString>Murchison House, West Mains Road, Edinburgh, Lothian, United Kingdom, EH9 3LA, NG12 5GG</gco:CharacterString></code><br /><code> </gmd:deliveryPoint></code><br /><code> <gmd:city></code><br /><code> <gco:CharacterString>EDINBURGH</gco:CharacterString></code><br /><code> </gmd:city></code><br /><code> <gmd:administrativeArea></code><br /><code> <gco:CharacterString>LOTHIAN</gco:CharacterString></code><br /><code> </gmd:administrativeArea></code><br /><code> <gmd:postalCode></code><br /><code> <gco:CharacterString>EH9 3LA</gco:CharacterString></code><br /><code> </gmd:postalCode></code><br /><code> <gmd:country></code><br /><code> <gco:CharacterString>United Kingdom</gco:CharacterString></code><br /><code> </gmd:country></code><br /><code> <gmd:electronicMailAddress></code><br /><code> <gco:CharacterString><span id="cloak99b1ae6b71a057239b1acb7aa3bdaa55">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
document.getElementById('cloak99b1ae6b71a057239b1acb7aa3bdaa55').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy99b1ae6b71a057239b1acb7aa3bdaa55 = 'enquiries' + '@';
addy99b1ae6b71a057239b1acb7aa3bdaa55 = addy99b1ae6b71a057239b1acb7aa3bdaa55 + 'bgs' + '.' + 'ac' + '.' + 'uk';
var addy_text99b1ae6b71a057239b1acb7aa3bdaa55 = 'enquiries' + '@' + 'bgs' + '.' + 'ac' + '.' + 'uk';document.getElementById('cloak99b1ae6b71a057239b1acb7aa3bdaa55').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy99b1ae6b71a057239b1acb7aa3bdaa55 + '\'>'+addy_text99b1ae6b71a057239b1acb7aa3bdaa55+'<\/a>';
</script></gco:CharacterString></code><br /><code> </gmd:electronicMailAddress></code><br /><code> </gmd:CI_Address></code><br /><code> </gmd:address></code><br /><code> </gmd:CI_Contact></code><br /><code> </gmd:contactInfo></code><br /><code> <gmd:role></code><br /><code> <gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="pointOfContact">pointOfContact</gmd:CI_RoleCode></code><br /><code> </gmd:role></code><br /><code> </gmd:CI_ResponsibleParty></code><br /><code> </gmd:contact></code><br /><code> <gmd:dateStamp></code><br /><code> <gco:Date>2011-04-11</gco:Date></code><br /><code> </gmd:dateStamp></code><br /><code> <gmd:metadataStandardName></code><br /><code> <gco:CharacterString>ISO19115:2003(E)</gco:CharacterString></code><br /><code> </gmd:metadataStandardName></code><br /><code> <gmd:metadataStandardVersion></code><br /><code> <gco:CharacterString>GEMINI:2</gco:CharacterString></code><br /><code> </gmd:metadataStandardVersion></code><br /><code> <gmd:referenceSystemInfo></code><br /><code> <gmd:MD_ReferenceSystem></code><br /><code> <gmd:referenceSystemIdentifier></code><br /><code> <gmd:RS_Identifier></code><br /><code> <gmd:authority></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>www.epsg.org</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2005</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:authority></code><br /><code> <gmd:code></code><br /><code> <gmx:Anchor xlink:href="http://www.opengis.net/def/crs/EPSG/0/4258">ETRS89-GRS80</gmx:Anchor></code><br /><code> </gmd:code></code><br /><code> </code><code></gmd:RS_Identifier></code><br /><code> </gmd:referenceSystemIdentifier></code><br /><code> </gmd:MD_ReferenceSystem></code><br /><code> </gmd:referenceSystemInfo></code><br /><code> <gmd:identificationInfo></code><br /><code> <srv:SV_ServiceIdentification></code><br /><code> <gmd:citation></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>BGS Surface geology (OGC WxS INSPIRE IOC)</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>1995</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> <gmd:identifier></code><br /><code> <gmd:MD_Identifier></code><br /><code> <gmd:code></code><br /><code> <gmx:Anchor xlink:href="http://data.bgs.ac.uk/id/dataHolding/13605559">BGS Surface geology</gmx:Anchor> </code><br /><code> </gmd:code></code><br /><code> <</code><code>/gmd:MD_Identifier></code><br /><code> </gmd:identifier></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:citation></code><br /><code> <gmd:abstract></code><br /><code> <gco:CharacterString>Data from the DiGMap covering the whole of the United Kingdom at a scale of 1:625 000 is available in this OGC WMS service for personal, non-commercial use only. The service is a contribution to the OneGeology-Europe initiative. The layers can be displayed either by age or by lithology. For more information about the digital maps available from the British Geological Survey, please visit http://www.bgs.ac.uk/products/digitalmaps/digmapgb.html.</gco:CharacterString></code><br /><code> </gmd:abstract></code><br /><code> <gmd:pointOfContact></code><br /><code> <gmd:CI_ResponsibleParty></code><br /><code> <gmd:individualName></code><br /><code> <gco:CharacterString><NAME></gco:CharacterString></code><br /><code> </gmd:individualName></code><br /><code> <gmd:organisationName></code><br /><code> <gco:CharacterString>British Geological Survey</gco:CharacterString></code><br /><code> </gmd:organisationName></code><br /><code> <gmd:positionName></code><br /><code> <gco:CharacterString>HoS - Information Delivery</gco:CharacterString></code><br /><code> </gmd:positionName></code><br /><code> <gmd:contactInfo></code><br /><code> <gmd:CI_Contact></code><br /><code> <gmd:phone></code><br /><code> <gmd:CI_Telephone></code><br /><code> <gmd:voice></code><br /><code> <gco:CharacterString>+44 131 667 1000 Ex:364</gco:CharacterString></code><br /><code> </gmd:voice></code><br /><code> </gmd:CI_Telephone></code><br /><code> </gmd:phone></code><br /><code> <gmd:address></code><br /><code> <gmd:CI_Address></code><br /><code> <gmd:deliveryPoint></code><br /><code> <gco:CharacterString>Murchison House, West Mains Road, Edinburgh, Lothian, United Kingdom, EH9 3LA, NG12 5GG</gco:CharacterString></code><br /><code> </gmd:deliveryPoint></code><br /><code> <gmd:city></code><br /><code> <gco:CharacterString>EDINBURGH</gco:CharacterString></code><br /><code> </gmd:city></code><br /><code> <gmd:administrativeArea></code><br /><code> <gco:CharacterString>LOTHIAN</gco:CharacterString></code><br /><code> </gmd:administrativeArea></code><br /><code> <gmd:postalCode></code><br /><code> <gco:CharacterString>EH9 3LA</gco:CharacterString></code><br /><code> </gmd:postalCode></code><br /><code> <gmd:country></code><br /><code> <gco:CharacterString>United Kingdom</gco:CharacterString></code><br /><code> </gmd:country></code><br /><code> <gmd:electronicMailAddress></code><br /><code> <gco:CharacterString><span id="cloakf9aa22ce08524f7e844e0b630bfba924">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
document.getElementById('cloakf9aa22ce08524f7e844e0b630bfba924').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addyf9aa22ce08524f7e844e0b630bfba924 = 'enquiries' + '@';
addyf9aa22ce08524f7e844e0b630bfba924 = addyf9aa22ce08524f7e844e0b630bfba924 + 'bgs' + '.' + 'ac' + '.' + 'uk';
var addy_textf9aa22ce08524f7e844e0b630bfba924 = 'enquiries' + '@' + 'bgs' + '.' + 'ac' + '.' + 'uk';document.getElementById('cloakf9aa22ce08524f7e844e0b630bfba924').innerHTML += '<a ' + path + '\'' + prefix + ':' + addyf9aa22ce08524f7e844e0b630bfba924 + '\'>'+addy_textf9aa22ce08524f7e844e0b630bfba924+'<\/a>';
</script></gco:CharacterString></code><br /><code> </gmd:electronicMailAddress></code><br /><code> </gmd:CI_Address></code><br /><code> </gmd:address></code><br /><code> </gmd:CI_Contact></code><br /><code> </gmd:contactInfo></code><br /><code> <gmd:role></code><br /><code> <gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="distributor">distributor</gmd:CI_RoleCode></code><br /><code> </gmd:role></code><br /><code> </gmd:CI_ResponsibleParty></code><br /><code> </gmd:pointOfContact></code><br /><code> <gmd:resourceMaintenance></code><br /><code> <gmd:MD_MaintenanceInformation></code><br /><code> <gmd:maintenanceAndUpdateFrequency></code><br /><code> <gmd:MD_MaintenanceFrequencyCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode" codeListValue="asNeeded">asNeeded</gmd:MD_MaintenanceFrequencyCode></code><br /><code> </gmd:maintenanceAndUpdateFrequency></code><br /><code> </gmd:MD_MaintenanceInformation></code><br /><code> </gmd:resourceMaintenance></code><br /><code> <gmd:descriptiveKeywords></code><br /><code> <gmd:MD_Keywords></code><br /><code> <gmd:keyword></code><br /><code> <gco:CharacterString>Geology</gco:CharacterString></code><br /><code> </gmd:keyword></code><br /><code> <gmd:thesaurusName></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>GEMET Thesaurus version 1.0</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2009-06-30</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:thesaurusName></code><br /><code> </gmd:MD_Keywords></code><br /><code> </gmd:descriptiveKeywords></code><br /><code> <gmd:descriptiveKeywords></code><br /><code> <gmd:MD_Keywords></code><br /><code> <gmd:keyword></code><br /><code> <gco:CharacterString>Maps</gco:CharacterString></code><br /><code> </gmd:keyword></code><br /><code> <gmd:keyword></code><br /><code> <gco:CharacterString>Digital maps</gco:CharacterString></code><br /><code> </gmd:keyword></code><br /><code> <gmd:keyword></code><br /><code> <gco:CharacterString>Spatial data</gco:CharacterString></code><br /><code> </gmd:keyword></code><br /><code> <gmd:keyword></code><br /><code> <gco:CharacterString>Geology</gco:CharacterString></code><br /><code> </gmd:keyword></code><br /><code> <gmd:keyword></code><br /><code> <gco:CharacterString>Data</gco:CharacterString></code><br /><code> </gmd:keyword></code><br /><code> <gmd:thesaurusName></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>BGS Thesaurus of Geosciences</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2009</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:thesaurusName></code><br /><code> </gmd:MD_Keywords></code><br /><code> </gmd:descriptiveKeywords></code><br /><code> <gmd:descriptiveKeywords></code><br /><code> <gmd:MD_Keywords></code><br /><code> <gmd:keyword></code><br /><code> <gco:CharacterString>infoMapAccessService</gco:CharacterString></code><br /><code> </gmd:keyword></code><br /><code> <gmd:thesaurusName></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>ISO 19119:2005</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2008-04-16</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:thesaurusName></code><br /><code> </gmd:MD_Keywords></code><br /><code> </gmd:descriptiveKeywords></code><br /><code> <gmd:descriptiveKeywords></code><br /><code> <gmd:MD_Keywords></code><br /><code> <gmd:keyword></code><br /><code> <gco:CharacterString>NERC_DDC</gco:CharacterString></code><br /><code> </gmd:keyword></code><br /><code> </gmd:MD_Keywords></code><br /><code> </gmd:descriptiveKeywords></code><br /><code> <gmd:resourceConstraints></code><br /><code> <gmd:MD_LegalConstraints></code><br /> <gmd:accessConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:accessConstraints><br /> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations">no limitations</gmx:Anchor><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints><br /> </gmd:resourceConstraints><br /> <gmd:resourceConstraints><br /> <gmd:MD_LegalConstraints><br /> <gmd:useConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:useConstraints><br /><code> <gmd:otherConstraints></code><br /><code> <gco:CharacterString>The 1:625k DiGMap data is made available for all uses - including commercial use, however the British Geological Survey (BGS) at all times retains the copyright in this material and you are not permitted, without an appropriate licence, to set up a service selling on this material. Your own use of any information provided by the British Geological Survey (BGS) is at your own risk. Neither BGS nor the Natural Environment Research Council (NERC) gives any warranty, condition or representation as to the quality, accuracy or completeness of the information or its suitability for any use or purpose. All implied conditions relating to the quality or suitability of the information, and all liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law.</gco:CharacterString></code><br /><code> </gmd:otherConstraints></code><br /><code> </gmd:MD_LegalConstraints></code><br /><code> </gmd:resourceConstraints></code><br /><code> <srv:serviceType></code><br /><code> <gco:LocalName codeSpace="INSPIRE">view</gco:LocalName></code><br /><code> </srv:serviceType></code><br /><code> <srv:extent></code><br /><code> <gmd:EX_Extent></code><br /><code> <gmd:geographicElement></code><br /><code> <gmd:EX_GeographicDescription></code><br /><code> <gmd:geographicIdentifier></code><br /><code> <gmd:MD_Identifier></code><br /><code> <gmd:authority></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>ISO 3166_2</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2009-01-07</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:authority></code><br /><code> <gmd:code></code><br /><code> <gco:CharacterString>UKM</gco:CharacterString></code><br /><code> </gmd:code></code><br /><code> </gmd:MD_Identifier></code><br /><code> </gmd:geographicIdentifier></code><br /><code> </gmd:EX_GeographicDescription></code><br /><code> </gmd:geographicElement></code><br /><code> <gmd:geographicElement></code><br /><code> <gmd:EX_GeographicDescription></code><br /><code> <gmd:geographicIdentifier></code><br /><code> <gmd:MD_Identifier></code><br /><code> <gmd:authority></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>ISO 3166_1</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2009-01-07</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:authority></code><br /><code> <gmd:code></code><br /><code> <gco:CharacterString>GB</gco:CharacterString></code><br /><code> </gmd:code></code><br /><code> </gmd:MD_Identifier></code><br /><code> </gmd:geographicIdentifier></code><br /><code> </gmd:EX_GeographicDescription></code><br /><code> </gmd:geographicElement></code><br /><code> <gmd:geographicElement></code><br /><code> <gmd:EX_GeographicBoundingBox></code><br /><code> <gmd:westBoundLongitude></code><br /><code> <gco:Decimal>-6.8647</gco:Decimal></code><br /><code> </gmd:westBoundLongitude></code><br /><code> <gmd:eastBoundLongitude></code><br /><code> <gco:Decimal>2.9603</gco:Decimal></code><br /><code> </gmd:eastBoundLongitude></code><br /><code> <gmd:southBoundLatitude></code><br /><code> <gco:Decimal>49.7974</gco:Decimal></code><br /><code> </gmd:southBoundLatitude></code><br /><code> <gmd:northBoundLatitude></code><br /><code> <gco:Decimal>60.7719</gco:Decimal></code><br /><code> </gmd:northBoundLatitude></code><br /><code> </gmd:EX_GeographicBoundingBox></code><br /><code> </gmd:geographicElement></code><br /><code> <gmd:temporalElement></code><br /><code> <gmd:EX_TemporalExtent></code><br /><code> <gmd:extent></code><br /><code> <gml:TimePeriod gml:id="ID1"></code><br /><code> <gml:beginPosition>1995</gml:beginPosition></code><br /><code> <gml:endPosition>1995</gml:endPosition></code><br /><code> </gml:TimePeriod></code><br /><code> </gmd:extent></code><br /><code> </gmd:EX_TemporalExtent></code><br /><code> </gmd:temporalElement></code><br /><code> </gmd:EX_Extent></code><br /><code> </srv:extent></code><br /><code> <srv:couplingType></code><br /><code> <srv:SV_CouplingType codeListValue="tight" codeList="http://www.isotc211.org/2005/iso19119/resources/codelist/gmxCodelists.xml#SV_CouplingType" /></code><br /><code> </srv:couplingType></code><br /><code> <srv:containsOperations gco:nilReason="missing" /></code><br /><code> <srv:operatesOn xlink:title="BGS.1M.surface.GeologicUnit" xlink:href="http://ogcdev.bgs.ac.uk/geonetwork/srv/en/csw?SERVICE=CSW&amp;amp;REQUEST=GetRecordById&amp;amp;ID=9df8df52-d788-37a8-e044-0003ba9b0d98&amp;amp;elementSetName=full&amp;amp;OutputSchema=http://www.isotc211.org/2005/gmd&amp;amp;" uuidref="9df8df52-d788-37a8-e044-0003ba9b0d98" /></code><br /><code> <srv:operatesOn xlink:title="BGS.1M.surface.GeologicUnit.age" xlink:href="http://ogcdev.bgs.ac.uk/geonetwork/srv/en/csw?SERVICE=CSW&amp;amp;REQUEST=GetRecordById&amp;amp;ID=9df8df52-d788-37a8-e044-0003ba9b0d98&amp;amp;elementSetName=full&amp;amp;OutputSchema=http://www.isotc211.org/2005/gmd&amp;amp;" uuidref="9df8df52-d788-37a8-e044-0003ba9b0d98" /></code><br /><code> </srv:SV_ServiceIdentification></code><br /><code> </gmd:identificationInfo></code><br /><code> <gmd:distributionInfo></code><br /><code> <gmd:MD_Distribution></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>image/gif</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>NotApplicable</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>image/png; mode=24bit</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>NotApplicable</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>image/jpeg</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>NotApplicable</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>image/png</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>NotApplicable</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>image/vnd.wap.wbmp</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>NotApplicable</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>image/tiff</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>NotApplicable</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>image/svg+xml</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>NotApplicable</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>text/xml; subtype=gml/3.1.1</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>3.1.1</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>GeoSciML</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version></code><br /><code> <gco:CharacterString>2</gco:CharacterString></code><br /><code> </gmd:version></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>text/plain</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version gco:nilReason="inapplicable" /></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>text/html</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version gco:nilReason="inapplicable" /></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>application/vnd.ogc.gml</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version gco:nilReason="inapplicable" /></code><br /><code> </gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributionFormat></code><br /><code> <gmd:MD_Format></code><br /><code> <gmd:name></code><br /><code> <gco:CharacterString>text/xml</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:version gco:nilReason="unknown" /></code><br /><code> </code><code></gmd:MD_Format></code><br /><code> </gmd:distributionFormat></code><br /><code> <gmd:distributor></code><br /><code> <gmd:MD_Distributor></code><br /><code> <gmd:distributorContact></code><br /><code> <gmd:CI_ResponsibleParty></code><br /><code> <gmd:organisationName></code><br /><code> <gco:CharacterString>British Geological Survey</gco:CharacterString></code><br /><code> </gmd:organisationName></code><br /><code> <gmd:contactInfo></code><br /><code> <gmd:CI_Contact></code><br /><code> <gmd:phone></code><br /><code> <gmd:CI_Telephone></code><br /><code> <gmd:voice></code><br /><code> <gco:CharacterString>+44 131 667 1000 Ex:364</gco:CharacterString></code><br /><code> </gmd:voice></code><br /><code> </gmd:CI_Telephone></code><br /><code> </gmd:phone></code><br /><code> <gmd:address></code><br /><code> <gmd:CI_Address></code><br /><code> <gmd:deliveryPoint></code><br /><code> <gco:CharacterString>Murchison House, West Mains Road, Edinburgh, Lothian, United Kingdom, EH9 3LA, NG12 5GG</gco:CharacterString></code><br /><code> </gmd:deliveryPoint></code><br /><code> <gmd:city></code><br /><code> <gco:CharacterString>EDINBURGH</gco:CharacterString></code><br /><code> </gmd:city></code><br /><code> <gmd:administrativeArea></code><br /><code> <gco:CharacterString>LOTHIAN</gco:CharacterString></code><br /><code> </gmd:administrativeArea></code><br /><code> <gmd:postalCode></code><br /><code> <gco:CharacterString>EH9 3LA</gco:CharacterString></code><br /><code> </gmd:postalCode></code><br /><code> <gmd:country></code><br /><code> <gco:CharacterString>United Kingdom</gco:CharacterString></code><br /><code> </gmd:country></code><br /><code> <gmd:electronicMailAddress></code><br /><code><gco:CharacterString><span id="cloak282858164f3b365ce985f7fdb3ef122a">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
document.getElementById('cloak282858164f3b365ce985f7fdb3ef122a').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy282858164f3b365ce985f7fdb3ef122a = 'enquiries' + '@';
addy282858164f3b365ce985f7fdb3ef122a = addy282858164f3b365ce985f7fdb3ef122a + 'bgs' + '.' + 'ac' + '.' + 'uk';
var addy_text282858164f3b365ce985f7fdb3ef122a = 'enquiries' + '@' + 'bgs' + '.' + 'ac' + '.' + 'uk';document.getElementById('cloak282858164f3b365ce985f7fdb3ef122a').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy282858164f3b365ce985f7fdb3ef122a + '\'>'+addy_text282858164f3b365ce985f7fdb3ef122a+'<\/a>';
</script></gco:CharacterString></code><br /><code> </gmd:electronicMailAddress></code><br /><code> </gmd:CI_Address></code><br /><code> </gmd:address></code><br /><code> </gmd:CI_Contact></code><br /><code> </gmd:contactInfo></code><br /><code> <gmd:role></code><br /><code> <gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="distributor">distributor</gmd:CI_RoleCode></code><br /><code> </gmd:role></code><br /><code> </gmd:CI_ResponsibleParty></code><br /><code> </gmd:distributorContact></code><br /><code> </gmd:MD_Distributor></code><br /><code> </gmd:distributor></code><br /><code> <gmd:transferOptions></code><br /><code> <gmd:MD_DigitalTransferOptions></code><br /><code> <gmd:onLine></code><br /><code> <gmd:CI_OnlineResource></code><br /><code> <gmd:linkage></code><br /><code><gmd:URL>http://ogc.bgs.ac.uk/BGS_Bedrock_and_Surface_Geology/wms.php?SERVICE=WMS&amp;REQUEST=getCapabilities&amp;</gmd:URL></code><br /><code> </gmd:linkage></code><br /><code> <gmd:protocol></code><br /><code> <gco:CharacterString>OGC:WMS-1.3.0-http-get-capabilities</gco:CharacterString></code><br /><code> </gmd:protocol></code><br /><code> <gmd:name></code><br /><code><gco:CharacterString>BGS.Bedrock.and.Surface.Geology</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:description></code><br /><code> <gco:CharacterString>BGS Bedrock and Surface geology</gco:CharacterString></code><br /><code> </gmd:description></code><br /><code> <gmd:function></code><br /><code> <gmd:CI_OnLineFunctionCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="download">download</gmd:CI_OnLineFunctionCode></code><br /><code> </gmd:function></code><br /><code> </gmd:CI_OnlineResource></code><br /><code> </gmd:onLine></code><br /><code> </gmd:MD_DigitalTransferOptions></code><br /><code> </gmd:transferOptions></code><br /><code> <gmd:transferOptions></code><br /><code> <gmd:MD_DigitalTransferOptions></code><br /><code> <gmd:onLine></code><br /><code> <gmd:CI_OnlineResource></code><br /><code> <gmd:linkage></code><br /><code><gmd:URL>http://ogc.bgs.ac.uk/BGS_Bedrock_and_Surface_Geology/wms.php</gmd:URL></code><br /><code> </gmd:linkage></code><br /><code> <gmd:protocol></code><br /><code> <gco:CharacterString>OGC:WMS-1.3.0-http-get-map</gco:CharacterString></code><br /><code> </gmd:protocol></code><br /><code> <gmd:name></code><br /><code><gco:CharacterString>BGS.1M.surface.GeologicUnit.age</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:description></code><br /><code> <gco:CharacterString>BGS 1M surface Geologic Unit Age. The layer shows the rocks and superficial deposits present at the land surface, clasified by Geological age</gco:CharacterString></code><br /><code> </gmd:description></code><br /><code> <gmd:function></code><br /><code> <gmd:CI_OnLineFunctionCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="download">download</gmd:CI_OnLineFunctionCode></code><br /><code> </gmd:function></code><br /><code> </gmd:CI_OnlineResource></code><br /><code> </gmd:onLine></code><br /><code> </gmd:MD_DigitalTransferOptions></code><br /><code> </gmd:transferOptions></code><br /><code> <gmd:transferOptions></code><br /><code> <gmd:MD_DigitalTransferOptions></code><br /><code> <gmd:onLine></code><br /><code> <gmd:CI_OnlineResource></code><br /><code> <gmd:linkage></code><br /><code><gmd:URL>http://ogc.bgs.ac.uk/BGS_Bedrock_and_Surface_Geology/wms.php</gmd:URL></code><br /><code> </gmd:linkage></code><br /><code> <gmd:protocol></code><br /><code> <gco:CharacterString>OGC:WMS-1.3.0-http-get-map</gco:CharacterString></code><br /><code> </gmd:protocol></code><br /><code> <gmd:name></code><br /><code><gco:CharacterString>BGS.1M.surface.GeologicUnit</gco:CharacterString></code><br /><code> </gmd:name></code><br /><code> <gmd:description></code><br /><code> <gco:CharacterString>BGS 1M surface Geologic Unit. The layer shows the rocks and superficial deposits present at the land surface, clasified by lithology</gco:CharacterString></code><br /><code> </gmd:description></code><br /><code> <gmd:function></code><br /><code> <gmd:CI_OnLineFunctionCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="download">download</gmd:CI_OnLineFunctionCode></code><br /><code> </gmd:function></code><br /><code> </gmd:CI_OnlineResource></code><br /><code> </gmd:onLine></code><br /><code> </gmd:MD_DigitalTransferOptions></code><br /><code> </gmd:transferOptions></code><br /><code> </gmd:MD_Distribution></code><br /><code> </gmd:distributionInfo></code><br /><code> <gmd:dataQualityInfo></code><br /><code> <gmd:DQ_DataQuality></code><br /><code> <gmd:scope></code><br /><code> <gmd:DQ_Scope></code><br /><code> <gmd:level></code><br /><code> <gmd:MD_ScopeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="service">service</gmd:MD_ScopeCode></code><br /><code> </gmd:level></code><br /><code> <gmd:levelDescription></code><br /><code> <gmd:MD_ScopeDescription></code><br /><code> <gmd:other></code><br /><code> <gco:CharacterString>service</gco:CharacterString></code><br /><code> </gmd:other></code><br /><code> </gmd:MD_ScopeDescription></code><br /><code> </gmd:levelDescription></code><br /><code> </gmd:DQ_Scope></code><br /><code> </gmd:scope></code><br /><code> <gmd:report></code><br /><code> <gmd:DQ_DomainConsistency></code><br /><code> <gmd:result></code><br /><code> <gmd:DQ_ConformanceResult></code><br /><code> <gmd:specification></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>Commission Regulation (EU) No 1089/2010 of 23 November 2010 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards interoperability of spatial data sets and services</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2010-12-08</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmx Codelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:specification></code><br /><code> <gmd:explanation></code><br /><code> <gco:CharacterString>See http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2010:323:0011:0102:EN:PDF</gco:CharacterString></code><br /><code> </gmd:explanation></code><br /><code> <gmd:pass></code><br /><code> <gco:Boolean>true</gco:Boolean></code><br /><code> </gmd:pass></code><br /><code> </gmd:DQ_ConformanceResult></code><br /><code> </gmd:result></code><br /><code> <gmd:result></code><br /><code> <gmd:DQ_ConformanceResult></code><br /><code> <gmd:specification></code><br /><code> <gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>Technical Guidance for the implementation of INSPIRE View Services Version 3.0</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2011-03-21</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code> <gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmx Codelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code> </gmd:CI_Citation></code><br /><code> </gmd:specification></code><br /><code> <gmd:explanation></code><br /><code> <gco:CharacterString>See the referenced specification at http://inspire.jrc.ec.europa.eu/documents/Network_Services/TechnicalGuidance_ViewServices_v3.0.pdf</gco:CharacterString></code><br /><code> </gmd:explanation></code><br /><code> <gmd:pass></code><br /><code> <gco:Boolean>true</gco:Boolean></code><br /><code> </gmd:pass></code><br /><code> </gmd:DQ_ConformanceResult></code><br /><code> </gmd:result></code><br /><code> </gmd:DQ_DomainConsistency></code><br /><code> </gmd:report></code><br /><code> <gmd:lineage></code><br /><code> <gmd:LI_Lineage></code><br /><code> <gmd:statement></code><br /><code> <gco:CharacterString>For lineage of datasets served by this service please refer to the metadata for those data</gco:CharacterString></code><br /><code> </gmd:statement></code><br /><code> </gmd:LI_Lineage></code><br /><code> </gmd:lineage></code><br /><code> </gmd:DQ_DataQuality></code><br /><code> </gmd:dataQualityInfo></code><br /><code></gmd:MD_Metadata></code><br /><em><br />Last updated: June 2018</em><code></code></pre>
<h3><a id="1.6"></a>1.6 XML Fragments</h3>
<p>This document contains examples of XML encoding. The examples are considered fragments in that they are not complete XML documents. The following conventions are used:</p>
<ul>
<li>The root element will generally be shown and it shall be gmd:MD_Metadata</li>
<li>XML element tags will generally be shown on a single line</li>
<li>XML will be tabbed in where possible to aid reading</li>
<li>Where an XML element, including the start tag, end tag and content, is too long to show on a single line, it shall break across more than one line automatically (i.e. under the control of browser justification and text wrapping)</li>
<li>Missing XML content, removed while forming the fragment, shall be represented by an ellipsis (...)</li>
</ul>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 1 – XML fragment – tabbing</strong></h5>
<br /><code><gmd:MD_Metadata></code><br /> <code> <gmd:fileIdentifier></code><br /> <code> <gco:CharacterString>98e25be5-388d-4be3-bc5f-ba07ef6009b2</gco:CharacterString></code><br /> <code> </gmd:fileIdentifier></code><br /> <code> ...</code><br /> <code></gmd:MD_Metadata></code></div>
<p>Figure 1 shows an example of an XML fragment. Note that it starts with the XML element gmd:MD_Metadata. The next XML element in order is gmd:fileIdentifier and its start-tag is on the next line and is tabbed in. The following line is the content of gmd:fileIdentifier.</p>
<p>An ellipsis follows the end tag of the XML element gmd:fileIdentifier indicating that other content is missing</p>
<p>Also deliberately omitted from XML fragments is:</p>
<ul>
<li>The XML declaration</li>
<li>XML namespace identifiers</li>
</ul>
<p>In the example in Figure 1 CharacterString is an XML element in the namespace gco. It has the start-tag <code><gco:CharacterString></code> and the end-tag <code></gco:CharacterString>.</code> The string <em>98e25be5-388d-4be3-bc5f-ba07ef6009b2</em> is the element’s content. The CharacterString element forms the content of another element: fileIdentifier. Its start-tag is <code><gmd:fileIdentifier></code> and its end-tag is <code></gmd:fileIdentifier></code>. In the example below <code>gml:id</code> and <code>codeSpace</code> are XML attributes. XML attributes are encoded in the start-tag of an element with the form <code>[namespace]:[attributeName]="[content]"</code>.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 2 - XML attributes </strong></h5>
<code>...</code><br /> <code><gmx:CodeDefinition gml:id="MD_ScopeCode_dataset"></code><br /> <code> <gml:description>information applies to the dataset</gml:description></code><br /> <code> <gml:identifier codeSpace="ISOTC211/19115">dataset</gml:identifier></code><br /> <code></gmx:CodeDefinition></code><br /> <code>...</code></div>
<p>Note that there is no reason in practice to tab in XML and to present each XML element on a new line other than to aid humans in reading raw XML. XML parsers, on the other hand, would have no problem reading the XML were it encoded without carriage returns as shown in Figure 3.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 3 - XML fragment - no tabbing </strong></h5>
<code><gmd:MD_Metadata><gmd:fileIdentifier><gco:CharacterString>98e25be5-388d-4be3-bc5f-ba07ef6009b2</gco:CharacterString></gmd:fileIdentifier></gmd:MD_Metadata></code></div>
<p>The UK Location Information Infrastructure will accept any valid XML document that conforms to these guidelines. This includes canonical XML encodings [<a title="References" href="/40-gemini/1047-metadata-guidelines-for-geospatial-data-resources-part-3" rel="alternate">5</a>] and files laid out with additional white space for human readability, and other variants in between. Similarly, XML attribute values could be delimited using single or double quotes.</p>
<h2><a id="2"></a>2. Encoding Guidelines</h2>
<h3><a id="2.1"></a>2.1 Schemas</h3>
<p>The schemas defining the structure of GEMINI2 metadata instances must implement:</p>
<ul>
<li>ISO 19139:2007 – for a physical implementation of ISO 19115:2003</li>
<li>ISO 19119:2005 – for service metadata</li>
<li>ISO 19136:2007 – for GML</li>
</ul>
<p>Several schema sets have been identified as meeting these requirements:</p>
<ol>
<li style="text-align: left;"><a href="http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd">http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd</a>, provided by OGC</li>
<li><a href="http://inspire.ec.europa.eu/draft-schemas/inspire-md-schemas/apiso-inspire/apiso-inspire.xsd">http://inspire.ec.europa.eu/draft-schemas/inspire-md-schemas/apiso-inspire/apiso-inspire.xsd</a>, provided by JRC</li>
<li><a href="http://schemas.opengis.net/iso/19139/20070417">http://schemas.opengis.net/iso/19139/20070417</a>, provided by OGC.</li>
</ol>
<p>Both 1 & 2 import the same dataset schemas, which are authoritatively at the ISO TC211 resource site: <a href="https://schemas.isotc211.org/schemas/19139/">https://schemas.isotc211.org/schemas/19139/</a>. Note: this is a human browsable site; if you want to validate correctly against this set of schemas, you can 'deep link' to e.g. <a href="https://schemas.isotc211.org/schemas/19139/-/gmx/1.0/gmx.xsd"><span style="font-weight: 400;">https://schemas.isotc211.org/schemas/19139/-/gmx/1.0/gmx.xsd</span></a></p>
<p>The schema files that shall be used for validating GEMINI2 metadata instances are:</p>
<ul>
<li>gmx.xsd (Datasets and dataset series metadata)</li>
<li>gmx.xsd and srv.xsd (Service metadata)</li>
</ul>
<p>The AP-ISO schema files given above import both of these, so a validator does not need to determine what type of record it is validating.</p>
<p>With schema set 3, the dataset and service schemas have separate entry points: gmx/gmx.xsd and srv/srv.xsd</p>
<p>Notes:</p>
<ol>
<li>the schemas provided by ISO TC211 do not include anything for ISO 19119 service metadata, but could be used directly to validate dataset metadata</li>
<li>the older draft schemas published at <a href="http://schemas.opengis.net/iso/19139/20060504/">http://schemas.opengis.net/iso/19139/20060504/</a> import GML version 3.1 instead of GML 3.2, so records that validate with one will not validate with the other.</li>
<li>the UK GEMINI schema that was published on GI Gateway [service withdrawn in 2012] encodes GEMINI1, not GEMINI2. Also, it does not conform with INSPIRE technical guidance. Therefore, it cannot be used to encode GEMINI2 and shall not be used for metadata instances within UK Location.</li>
</ol>
<p><strong>Schema Validation</strong></p>
<p>The XML schemaLocation property officially provides only a ‘hint’ to the validator, but many validators do use the schemas at that location.</p>
<p>The INSPIRE Validator available through <a href="https://inspire.ec.europa.eu/validator/about/">https://inspire.ec.europa.eu/validator/about/</a> includes metadata validation.</p>
<h3><a id="2.2"></a>2.2 Common concepts</h3>
<h4>2.2.1 XML declaration</h4>
<p>Metadata instances are XML documents. XML documents should, but do not have to, begin with an XML declaration. If a metadata instance has an XML declaration then it must be the first line in the document. It must not be preceded by anything else, other than an invisible Unicode byte-order mark.</p>
<p>Figure 4 shows an XML declaration. The version attribute must always have the value 1.0. The encoding attribute is optional. Its value specifies which character set is in use in the document. By default (i.e. if the encoding attribute is omitted) XML documents are assumed to be encoded in the UTF-8 encoding of the Unicode character set. Care should be taken when using text editing software to edit XML, or writing XML using bespoke software code, that the XML’s actual physical encoding conforms with the encoding stated with this attribute. It is expected that the UTF-8 character set will be sufficient in nearly all cases.</p>
<p>An XML declaration may include a “standalone” attribute. However, this attribute is only relevant if an XML document is using a DTD. Metadata instances of GEMINI2 shall not use a DTD so it is out of scope.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 4 - XML declaration </strong></h5>
<code><?xml version="1.0" encoding="utf-8"?></code></div>
<h4>2.2.2 Root element</h4>
<p>The root element of a GEMINI2 metadata instance shall be gmd:MD_Metadata. The root element shall contain namespace references to, at least, gmd, gco, gml and xlink. Metadata for services shall, in addition, contain a namespace reference to srv. In addition reference may be made to the gmx namespace if XML elements such as gmx:Anchor are used.</p>
<p>An example is shown in Figure 5. Subsequent examples omit the namespace references for brevity. An ellipsis is used to indicate that required content has been omitted.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 5 - Root Element</strong></h5>
<code><?xml version="1.0" encoding="utf-8"?></code><br /> <code><gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd"</code><br /> <code> xmlns:gco="http://www.isotc211.org/2005/gco"</code><br /> <code> xmlns:srv="http://www.isotc211.org/2005/srv"</code><br /> <code> xmlns:gml="http://www.opengis.net/gml/3.2"</code><br /> <code> xmlns:xlink="http://www.w3.org/1999/xlink"></code><br /> <code> ...</code><br /> <code></gmd:MD_Metadata></code></div>
<p>The namespace identifier for gmd shall be: http://www.isotc211.org/2005/gmd</p>
<p>The namespace identifier for gco shall be: http://www.isotc211.org/2005/gco</p>
<p>The namespace identifier for srv shall be: http://www.isotc211.org/2005/srv</p>
<p>The namespace identifier for gmx shall be: http://www.isotc211.org/2005/gmx</p>
<p>The namespace identifier for xlink shall be: http://www.w3.org/1999/xlink</p>
<p>The namespace identifier for gml shall be: http://www.opengis.net/gml/3.2</p>
<p>Note that http://www.opengis.net/gml/3.2 refers to GML version 3.2.1 <strong>not</strong> GML version 3.2.0.</p>
<p>The root element, and in fact any element in an XML instance, may have an attribute called xsi:schemaLocation which contains a value or set of values <strong>hinting </strong>at the physical location of schemas which may be used for validation. Since this attribute provides only a hint, validating parsers are allowed to ignore it and use other means of locating the relevant schemas.</p>
<p>Figure 6 shows a root element containing an xsi:schemaLocation attribute. Here the schemas referenced are in the INSPIRE Metadata XSD repository.</p>
<p>Since the xsi:schemaLocation attribute exists in the xsi namespace, this namespace must be referenced. The xsi:schemaLocation attribute contains a pair of space separated values when one schema is identified. The first value specifies the namespace and the second value specifies the schema to use to validate elements in that namespace. When more than one schema is identified, as would be the case for validating a service metadata instance, the attribute contains a space separated sequence of namespace / schema pairs. The xsi:schemaLocation attribute is not required in a GEMINI2 metadata instance.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 6 - Using the xsi:schemaLocation attribute</strong></h5>
<code><?xml version="1.0" encoding="utf-8"?></code><br /> <code><gmd:MD_Metadata xmlns:gmx="http://www.isotc211.org/2005/gmx"</code><br /><code> xmlns:gmd="http://www.isotc211.org/2005/gmd"</code><br /> <code> xmlns:gco="http://www.isotc211.org/2005/gco"</code><br /> <code> xmlns:srv="http://www.isotc211.org/2005/srv"</code><br /> <code> xmlns:gml="http://www.opengis.net/gml/3.2"</code><br /> <code> xmlns:xlink="http://www.w3.org/1999/xlink"</code><br /> <code> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</code><br /> <code> xsi:schemaLocation="http://www.isotc211.org/2005/gmx</code><br /> <code> https://schemas.isotc211.org/schemas/19139/-/gmx/1.0/gmx.xsd</code><br /> <code> http://www.isotc211.org/2005/srv</code><br /> <code> http://inspire.ec.europa.eu/draft-schemas/inspire-md-schemas/srv/1.0/srv.xsd"></code><br /> <code> ...</code><br /> <code></gmd:MD_Metadata></code></div>
<h4><a id="2.2.3"></a>2.2.3 Dates and Times</h4>
<p>Dates and date-time shall be expressed in the Gregorian calendar and UTC as per ISO 8601. The formatting shall be as follows, in order of increasing precision:</p>
<ul>
<li>yyyy (e.g. 1995)</li>
<li>yyyy-MM (e.g. 1995-01)</li>
<li>yyyy-MM-dd (e.g. 1995-01-25)</li>
<li>yyyy-MM-ddThh:mm:ss (e.g. 1995-01-25T12:01:55)</li>
</ul>
<p>The ISO 8601 encoding also allows negative dates to represent BC. However, gco:Date and gco:DateTime XML elements do not accept negative values.</p>
<p>The GEMINI2 standard states that temporal extents may be given with as coarse a granularity as century (e.g. yy or 19). However, unfortunately this cannot be encoded in ISO 19139 XML and will result in a schema validation error. The lowest level of granularity allowable is the year.</p>
<h4>2.2.4 Element order</h4>
<p>XML elements in a metadata instance must follow the order in which the elements are defined in an XSD schema. Failure to do so will result in schema validation errors. The order of XML elements and their corresponding GEMINI2 metadata items is shown <a title="example" href="/40-gemini/1046-xml-element-order" target="_blank" rel="alternate noopener noreferrer">here</a>.</p>
<h4>2.2.5 Patterns for multiple instances</h4>
<p>Some metadata items, such as alternative title, have cardinalities for more than one. This means that more than one instance of the item can be encoded in metadata instances. The general approach in ISO 19139 XML is that an XML element expressing the property, in Figure7 gmd:alternateTitle, contains an XML element which expresses the data type and contains the value, in this case gco:CharacterString. Note that more than one alternative title is expressed by repeating the gmd:alternateTitle XML element, not the gco:CharacterString XML element (shown in an invalid example in Figure 8). This pattern is followed throughout ISO 19139 XML including for XML elements that have complex content, such as gmd:identificationInfo (Figure 9).</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 7 - Multiple alternative title elements</strong></h5>
<code>...</code><br /> <code><gmd:alternateTitle></code><br /> <code> <gco:CharacterString>Digital Geological Map Data of Great Britain - 625k</gco:CharacterString></code><br /> <code></gmd:alternateTitle></code><br /> <code><gmd:alternateTitle></code><br /> <code> <gco:CharacterString>DiGMapGB-625</gco:CharacterString></code><br /> <code></gmd:alternateTitle></code><br /> <code>...</code></div>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 8 - Multiple alternative title elements - invalid encoding</strong></h5>
<code>...</code><br /> <code><gmd:alternateTitle></code><br /> <code> <gco:CharacterString>Digital Geological Map Data of Great Britain - 625k</gco:CharacterString></code><br /> <code> <gco:CharacterString>DiGMapGB-625</gco:CharacterString></code><br /> <code></gmd:alternateTitle></code><br /> <code>...</code></div>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 9 - Multiple identification information elements </strong></h5>
<code><gmd:MD_Metadata></code><br /> <code> ...</code><br /> <code> <gmd:identificationInfo></code><br /> <code> <gmd:MD_DataIdentification id="_local-id1"></code><br /> <code> ...</code><br /> <code> </gmd:MD_DataIdentification></code><br /> <code></gmd:identificationInfo></code><br /> <code> <gmd:identificationInfo></code><br /> <code> <gmd:MD_DataIdentification id="_local-id2"></code><br /> <code> ...</code><br /> <code> </gmd:MD_DataIdentification></code><br /> <code> </gmd:identificationInfo></code><br /> <code> ...</code><br /> <code></gmd:MD_Metadata> </code></div>
<h4><a id="2.2.6"></a>2.2.6 File identifier</h4>
<p>The first XML child element of any GEMINI2 metadata instance shall be gmd:fileIdentifier. The content of this XML element is the identifier of the metadata instance. File identifier is not to be confused with the metadata item <a title="Resource Identifier" href="/component/content/article?id=1062#36" rel="alternate">Resource Identifier</a>.</p>
<p>The content of the XML element shall be a unique managed identifier, such as a system generated UUID. Once the identifier has been set for a metadata instance it shall not change.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 10 - File Identifier</strong></h5>
<code><gmd:MD_Metadata></code><br /><code> <gmd:fileIdentifier></code><br /><code> <gco:CharacterString>98e25be5-388d-4be3-bc5f-ba07ef6009b2</gco:CharacterString></code><br /><code> </gmd:fileIdentifier></code><br /><code> ...</code><br /><code></gmd:MD_Metadata> </code></div>
<h4>2.2.7 Citation</h4>
<p>External resources, such as publications, controlled vocabularies, are expressed using the ISO 19115 class CI_Citation and its XML element instance, gmd:CI_Citation. This is a common structure that is used to encode:</p>
<ul>
<li>Resource reference information about datasets and series</li>
<li>Resource reference information about services</li>
<li>Information about the originating controlled vocabulary of keywords</li>
<li>The specification for conformance statements</li>
<li>The authority of Spatial Reference System</li>
<li>The authority of Extent</li>
</ul>
<p>A citation must include at least a title, a date and a date type. Figure 11 shows the citation structure used to encode information about the GEMET Concepts dictionary.</p>
<p>In any one citation there may be more than one date. However, there shall be only one date with a date type of ‘creation’ and there shall be only one date with type 'revision'.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 11 - CI_Citation structure</strong></h5>
<code>...</code><br /><code><gmd:CI_Citation></code><br /><code> <gmd:title></code><br /><code> <gco:CharacterString>GEMET - Concepts, version 2.4</gco:CharacterString></code><br /><code> </gmd:title></code><br /><code> <gmd:date></code><br /><code> <gmd:CI_Date></code><br /><code> <gmd:date></code><br /><code> <gco:Date>2010-01-13</gco:Date></code><br /><code> </gmd:date></code><br /><code> <gmd:dateType></code><br /><code><code> <gmd:CI_DateTypeCode codeList="</code></code><code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code><code>#CI_DateTypeCode" codeListValue="revision">revision</gmd:CI_DateTypeCode></code><br /><code> </gmd:dateType></code><br /><code> </gmd:CI_Date></code><br /><code> </gmd:date></code><br /><code></gmd:CI_Citation></code><br /><code>...</code></div>
<h4> <a id="2.2.8"></a>2.2.8 Responsible party</h4>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 12 - CI_ResponsibleParty structure </strong></h5>
<code>...</code><br /><code><gmd:CI_ResponsibleParty></code><br /><code> <gmd:organisationName></code><br /><code> <gco:CharacterString>SeaZone Solutions</gco:CharacterString></code><br /><code> </gmd:organisationName></code><br /><code> <gmd:positionName></code><br /><code> <gco:CharacterString>Data Product Manager</gco:CharacterString></code><br /><code> </gmd:positionName></code><br /><code> <gmd:contactInfo></code><br /><code> <gmd:CI_Contact></code><br /><code> <gmd:phone></code><br /><code> <gmd:CI_Telephone></code><br /><code> <gmd:voice></code><br /><code> <gco:CharacterString>+44 (0) 870 013 0607</gco:CharacterString></code><br /><code> </gmd:voice></code><br /><code> <gmd:facsimile></code><br /><code> <gco:CharacterString>+44 (0) 870 013 0608</gco:CharacterString></code><br /><code> </gmd:facsimile></code><br /><code> </gmd:CI_Telephone></code><br /><code> </gmd:phone></code><br /><code> <gmd:address></code><br /><code> <gmd:CI_Address></code><br /><code> <gmd:deliveryPoint></code><br /><code> <gco:CharacterString>Red Lion House</gco:CharacterString></code><br /><code> </gmd:deliveryPoint></code><br /><code> <gmd:deliveryPoint></code><br /><code> <gco:CharacterString>Bentley</gco:CharacterString></code><br /><code> </gmd:deliveryPoint></code><br /><code> <gmd:administrativeArea></code><br /><code> <gco:CharacterString>Hampshire</gco:CharacterString></code><br /><code> </gmd:administrativeArea></code><br /><code> <gmd:postalCode></code><br /><code> <gco:CharacterString>GU10 5HY</gco:CharacterString></code><br /><code> </gmd:postalCode></code><br /><code> <gmd:electronicMailAddress></code><br /><code> <gco:CharacterString><span id="cloakdd5151d9d540c7fa216a246653103a1d">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
document.getElementById('cloakdd5151d9d540c7fa216a246653103a1d').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addydd5151d9d540c7fa216a246653103a1d = 'info' + '@';
addydd5151d9d540c7fa216a246653103a1d = addydd5151d9d540c7fa216a246653103a1d + 'seazone' + '.' + 'com';
var addy_textdd5151d9d540c7fa216a246653103a1d = 'info' + '@' + 'seazone' + '.' + 'com';document.getElementById('cloakdd5151d9d540c7fa216a246653103a1d').innerHTML += '<a ' + path + '\'' + prefix + ':' + addydd5151d9d540c7fa216a246653103a1d + '\'>'+addy_textdd5151d9d540c7fa216a246653103a1d+'<\/a>';
</script></gco:CharacterString></code><br /><code> </gmd:electronicMailAddress></code><br /><code> </gmd:CI_Address></code><br /><code> </gmd:address></code><br /><code> <gmd:onlineResource></code><br /><code> <gmd:CI_OnlineResource></code><br /><code> <gmd:linkage></code><br /><code> <gmd:URL>http://www.seazone.com/index.php</gmd:URL></code><br /><code> </gmd:linkage></code><br /><code> </gmd:CI_OnlineResource></code><br /><code> </gmd:onlineResource></code><br /><code> </gmd:CI_Contact></code><br /><code> </gmd:contactInfo></code><br /><code> <gmd:role></code><br /><code><code> <gmd:CI_RoleCode codeList="</code></code><code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code><code>#CI_RoleCode" codeListValue="author">author</gmd:CI_RoleCode></code><br /><code> </gmd:role></code><br /><code></gmd:CI_ResponsibleParty></code><br /><code>...</code></div>
<p>Addresses are expressed using the ISO 19115 class CI_ResponsibleParty and its XML element instance, gmd:CI_ResponsibleParty. This is a common structure that is used to encode:</p>
<ul>
<li>Metadata contact</li>
<li>Responsible organisation</li>
</ul>
<p>In the context of GEMINI2 a responsible party set shall include at least the organisation name (encoded using gmd:organisationName), an email address (encoded using gmd:electronicMailAddress) and a role (encoded using gmd:role).</p>
<p>The XML element role takes values from the ISO 19115 codelist CI_RoleCode. Any value in the code list may be chosen.</p>
<p>Additionally, the contact position (encoded using gmd:positionName), the postal address (encoded using a combination of gmd:deliveryPoint, gmd:city, gmd:administrativeArea, gmd:postalCode and gmd:country), telephone number (encoded using gmd:voice) and facsimile number (encoded using gmd:facsimile) may be provided.</p>
<h4><a id="2.2.9"></a>2.2.9 Code lists</h4>
<p>Where a sub-item takes its value from a code list, which may or may not be expressed in ISO 19115, the source code list catalogue and code list value shall be expressed using the attributes gmd:codeList and gmd:codeListValue respectively.</p>
<p>Figure 13 shows the encoding where a code list is specified in ISO 19115. The value of the codeList attribute should be the URL for the ISO 19115 code list catalogue that is published on the ISO website:</p>
<p style="padding-left: 60px;"><a title="https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml" href="https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml" target="_blank" rel="alternate noopener noreferrer">https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</a></p>
<p>Plus a hash character acting as a delimiter, and then the identifier of the code list, in this case ‘MD_ScopeCode’, that contains the code list value that is used. This information could be used to validate the code list value and ensure that it is a member of the code list.</p>
<p>The value of the code list value attribute (gmd:codeListValue) shall be a valid entry from the specified code list dictionary.</p>
<p>The element value (i.e. in Figure 13 <code><gmd:MD_ScopeCode ...><strong>dataset</strong></gmd:MD_ScopeCode></code>) is human readable text. It can be omitted or given a value different from that of the attribute codeListValue (e.g. Dataset). Developers of GEMINI aware applications should note that reliance should not be placed on the element value of code list elements but rather on the value of the attribute gmd:codeListValue.</p>
<div style="width: 63em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 13 - Code list</strong></h5>
<code><gmd:MD_ScopeCode codeList="<a href="https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml">https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</a></code><code>#MD_ScopeCode" </code><br /><code> codeListValue="dataset">dataset</gmd:MD_ScopeCode></code></div>
<p>Figure 14 shows a fragment of the code list catalogue with the entries of MD_ScopeCode that are relevant to GEMINI2 metadata.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 14 - Fragment of the code list catalogue</strong></h5>
<code><CT_CodelistCatalogue xmlns="http://www.isotc211.org/2005/gmx" </code><br /><code> xmlns:gco="http://www.isotc211.org/2005/gco" </code><br /><code> xmlns:gml="http://www.opengis.net/gml/3.2" </code><br /><code> xmlns:xlink="http://www.w3.org/1999/xlink" </code><br /><code> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></code><br /><code> ...</code><br /><code> <!--=== MD_ScopeCode ===--></code><br /><code> <codelistItem></code><br /><code> <CodeListDictionary gml:id="MD_ScopeCode"></code><br /><code> <gml:description>class of information to which the referencing entity applies</gml:description></code><br /><code> <gml:identifier codeSpace="ISOTC211/19115">MD_ScopeCode</gml:identifier></code><br /><code> ...</code><br /><code> <codeEntry></code><br /><code> <CodeDefinition gml:id="MD_ScopeCode_dataset"></code><br /><code> <gml:description>information applies to the dataset</gml:description></code><br /><code> <gml:identifier codeSpace="ISOTC211/19115">dataset</gml:identifier></code><br /><code> </CodeDefinition></code><br /><code> </codeEntry></code><br /><code> <codeEntry></code><br /><code> <CodeDefinition gml:id="MD_ScopeCode_series"></code><br /><code> <gml:description>information applies to the series</gml:description></code><br /><code> <gml:identifier codeSpace="ISOTC211/19115">series</gml:identifier></code><br /><code> </CodeDefinition></code><br /><code> </codeEntry></code><br /><code> ...</code><br /><code> <codeEntry></code><br /><code> <CodeDefinition gml:id="MD_ScopeCode_service"></code><br /><code> <gml:description>information applies to a capability which a service provider entity makes available to a service user entity through a set of interfaces that define a behaviour, such as a use case</gml:description></code><br /><code> <gml:identifier codeSpace="ISOTC211/19115">service</gml:identifier></code><br /><code> </CodeDefinition></code><br /><code> </codeEntry></code><br /><code> ...</code><br /><code> </CodeListDictionary></code><br /><code> </codelistItem></code><br /><code></CT_CodelistCatalogue> </code></div>
<h4>2.2.10 Null Values</h4>
<p>The ISO 19139 XML schemas provide a means for indicating that the contents of an element may be unknown or withheld, through the use of the gco:nilReason attribute. This attribute can be added to any element in the gmd namespace. It can take the following values:</p>
<ul>
<li>inapplicable</li>
<li>missing</li>
<li>template</li>
<li>unknown</li>
<li>withheld</li>
<li>other:[any text]</li>
</ul>
<p>Empty XML elements (see Figure 15) are not permitted in ISO 19139 metadata instances. Although this is not checked by the “Table A” schematron rules in use in UK Location, those creating metadata records should avoid creating empty XML elements if at all possible. If an optional element is not required, don’t include it; if a mandatory element is not available use gco:nilReason.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 15 - Examples of empty elements not permitted in GEMINI metadata instances</strong></h5>
<p><code><gco:CharacterString/></code></p>
<p><code><gco:CharacterString></gco:CharacterString></code></p>
<p><code><gmx:Anchor /></code></p>
<p><code><gmx:Anchor></gmx:Anchor></code></p>
</div>
<p>The following metadata items shall not be nillable:</p>
<ul>
<li>Title</li>
<li>Abstract</li>
<li>Bounding box (west, east, south and north coordinates)</li>
<li>Unique resource identifier</li>
<li>Responsible organization</li>
<li>Metadata point of contact</li>
<li>Topic category</li>
<li>Originating controlled vocabulary title</li>
<li>File identifier</li>
</ul>
<h4>2.2.11 By Value or By Reference</h4>
<p>The content of a metadata instance may be expressed <em>by value</em> or <em>by reference</em>. <em>By value</em> means that the metadata instance carries all the necessary information. <em>By reference</em> means that a metadata instance indicates that content is to be found in an external repository or another place within the same instance. The <em>by reference</em> case is supported by the object reference (gco:ObjectReference) attribute group. This provides two mechanisms for referencing remote resources:</p>
<ul>
<li>XLink, primarily using the xlink:href attribute</li>
<li>By UUID using the uuidref attribute</li>
</ul>
<p>Figure 16 shows the use of the XLink href attribute to specify a vertical CRS by reference to the EPSG Geodetic parameter dataset while Figure 17 shows the same information encoded by value (note however, that in this case the domain of validity (gml:domainOfValidity), vertical coordinate system (gml:verticalCS) and vertical datum (gml:verticalDatum) are themselves encoded <em>by reference</em>).</p>
<p>Encoding information <em>by reference</em> is clearly advantageous in the sense that it is more efficient (in terms of file size but also avoiding data duplication) than by value. However, it presupposes that an XML software application will ‘know’ how to dereference the reference. Dereferencing is the act of obtaining the externally referenced information. It is also important that the referenced information is universally available in a structured machine readable form so that it can be incorporated by value. In the case of the examples below the EPSG web service endpoint can be used to dereference the EPSG URN to return the GML encoded vertical CRS. The GML can be directly incorporated in an XML metadata instance, where the metadata element accepts a GML value (noting that there will be a difference in the GML namespace identifier – EPSG returning GML 3.1.1 while metadata instances shall identify the GML 3.2.1 namespace – in the case of the CRS XML elements of GML there is no difference between these versions of GML).</p>
<p>Typically, <em>by reference</em> shall be used for identifying the vertical CRS of a vertical extent and the implementation of coupled resource (following INSPIRE guidelines) alone. The XLink mechanism shall be used (see Figure 16 for vertical CRS and Figure 18 for coupled resource). Note that in encoding coupled resource by referencing the uuidref attribute may also be used, in addition to XLink. All other metadata items shall be implemented <em>by value</em>.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 16 - Vertical CRS by reference</strong></h5>
<code><gmd:verticalCRS xlink:href="http://www.opengis.net/def/crs/EPSG/0/5701"/></code></div>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 17 - Vertical CRS by value</strong></h5>
<code>...</code><br /><code><gmd:verticalCRS></code><br /><code> <gml:VerticalCRS gml:id="epsg-crs-5701"></code><br /><code> <gml:identifier codeSpace="OGP"><a href="http://www.opengis.net/def/crs/EPSG/0/5701/">http://www.opengis.net/def/crs/EPSG/0/5701/</a></gml:identifier></code><br /><code> <gml:name>ODN height</gml:name></code><br /><code> <gml:domainOfValidity xlink:href="<a href="http://www.opengis.net/def/crs/EPSG/0/2792/">http://www.opengis.net/def/crs/EPSG/0/2792/</a>"/></code><br /><code> <gml:scope>Geodetic and engineering surveying.</gml:scope></code><br /><code> <gml:verticalCS xlink:href="<a href="http://www.opengis.net/def/crs/EPSG/0/649/9">http://www.opengis.net/def/crs/EPSG/0/6499/</a>"/></code><br /><code> <gml:verticalDatum xlink:href="<a href="/"http:/www.opengis.net/def/crs/EPSG/0/5101/">http://www.opengis.net/def/crs/EPSG/0/5101/</a>"></code><br /><code> </gml:VerticalCRS></code><br /><code></gmd:verticalCRS></code><br /><code>... </code></div>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 18 - Coupled resource by reference</strong></h5>
<code><srv:operatesOn xlink:title="Digital Geological Map Data of Great Britain - 625k (DiGMapGB-625) 2008" </code><br /><code>xlink:href="http://metadata.bgs.ac.uk/geonetwork/srv/en/csw?SERVICE=CSW&REQUEST=GetRecordById</code><br /><code>&ID=9df8df52-d788-37a8-e044-0003ba9b0d98&OutputSchema=http://www.isotc211.org/2005/gmd&elementSetName=full#BGS-13480426&" uuidref="9df8df52-d788-37a8-e044-0003ba9b0d98" /></code></div>
<h4><a id="2.2.12"></a>2.2.12 Identifiers</h4>
<p>GML XML elements which are used in metadata have an optional gml:id attribute. The value domain of the identifier is referred to as <em>XML name</em>. XML names have certain restrictions. They may contain any alphanumeric character, non-English alphanumeric characters, ideograms and the underscore, hyphen and period. They may not contain any other punctuation characters. The colon is allowed, but its use is reserved for namespaces, so it cannot appear in an identifier. XML names may not include any whitespace including spaces and carriage returns. All names beginning with the letters XML (in uppercase, lowercase or any mixture thereof) are reserved (see [<a title="References" href="/40-gemini/1047-metadata-guidelines-for-geospatial-data-resources-part-3" target="_blank" rel="alternate noopener noreferrer">11</a>] pages 18 and 19).</p>
<p>XML names may only start with letters, ideograms and the underscore character. Consequently, care must be taken when using the value of a UUID as the value of an identifier because these can begin with numeric characters. If using UUIDs as the basis of such an identifier best practice is to prefix the UUIDs with an underscore.</p>
<p>An identifier must be unique within the scope of any XML document (i.e. there shall not be more than one id type attribute with a particular identifier value) that the metadata record might occur in, such as a result set from a CSW query and not just the metadata document itself. </p>
<p>If an id type attribute contains an illegally formed XML name the result will be a schema validation error.</p>
<h4>2.2.13 Free text</h4>
<p>In GEMINI2 there are two ways of encoding free text. The basic element for providing text of unrestricted length with no internal XML structure is gco:CharacterString. This element is appropriate when the text does not refer to a specific external resource or registry. When the provided text is a term or code referring to an externally defined explanation or registry value, gmx:Anchor element is <strong>recommended</strong> over gco:CharacterString. gmx:Anchor contains an additional attribute group enabling linking the provided piece of text with an external describing resource. The most important of these attributes in this context is xlink:href, which contains the actual reference in Uniform Resource Identifier (URI) format.</p>
<p>For example the encoding of an identifier/code value should be done with gmx:Anchor as in Figure 19, rather than gco:CharacterString (Figure 20), when the unique resource identifier is referenceable,</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 19 - Non-empty free text, with gmx:Anchor</strong></h5>
<pre><gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
<gmx:Anchor xlink:href="http://data.bgs.ac.uk/id/dataHolding/13480180">
World Mineral Statistics Dataset
</gmx:Anchor>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier>
</pre>
</div>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 20 - Non-empty free text, with gco:CharacterString</strong></h5>
<pre><gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
<gco:CharacterString>
http://data.bgs.ac.uk/id/dataHolding/13605835
</gco:CharacterString>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier></pre>
</div>
<h4><a id="2.2.14"></a>2.2.14 Limitations, conditions, and licences</h4>
<p>GEMINI contains two elements, 25 <em>Limitations on public access</em> and 26 <em>Use constraints</em>. These represent the two INSPIRE elements <em>Limitations on public access</em> and <em>Conditions applying to access and use</em>, and are therefore both encoded with ISO 19115 MD_LegalConstraints elements. INSPIRE requires that they are encoded in separate MD_LegalConstraints elements. This means that a GEMINI metadata record must contain at least two MD_LegalConstraints elements.</p>
<p>INSPIRE requires that both of these elements use MD_RestrictionCode = otherRestrictions. Because GEMINI element 26 is for <strong>use</strong> constraints, it makes sense for both elements to place this inside a useConstraints element. Having specified <em>otherRestrictions</em>, each shall then use one or more <em>otherConstraints</em> elements to specify the actual constraints.</p>
<p>For <em>Limitations on public access</em>, at least one of the <em>otherConstraints </em>elements shall use gmx:Anchor to indicate the kind of constraint, by reference to the appropriate entry in the INSPIRE registry (http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess). The free text within the anchor can provide human readable detail.</p>
<p>For <em>Use constraints</em>, if there are no conditions, or the conditions are unknown, then use gmx:Anchor to reference the appropriate entry in the INSPIRE registry (http://inspire.ec.europa.eu/metadata-codelist/ConditionsApplyingToAccessAndUse). Similarly, if the conditions are documented in a license, use gmx:Anchor to reference the full license text. The free text within the anchor can provide a human readable summary. If the conditions are not available at a URL, they can be entered as plain text; see FIgure 22b.</p>
<p>Three examples:</p>
<p>Figure 21 describes a commercial product, not available to the public for IPR reasons, and with a web page describing licences</p>
<div style="border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 21 - OS licence</strong></h5>
<pre><!-- INSPIRE C.17; GEMINI 25 Limitations on public access --> <br /><gmd:resourceConstraints><br /> <gmd:MD_LegalConstraints><br /> <gmd:accessConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="<code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code>#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:accessConstraints><br /> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1e"/><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints><br /></gmd:resourceConstraints><br /><br /> <!-- INSPIRE C.18; GEMINI 26 use constraints --> <br /><gmd:resourceConstraints><br /> <gmd:MD_LegalConstraints><br /> <gmd:useConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="<code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code>#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:useConstraints><br /> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="https://os.uk/business/licences/index.html">Use limitation dependent upon licence</gmx:Anchor><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints><br /></gmd:resourceConstraints></pre>
</div>
<p>Figure 22a describes an open data product, with no limitations on public access, the Open Government Licence referenced, and summarised in plain text.</p>
<div style="border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 22a - INSPIRE no limitations; OGL</strong></h5>
<pre><!-- INSPIRE C.17; GEMINI 25 Limitations on public access --> <br /><gmd:resourceConstraints><br /> <gmd:MD_LegalConstraints><br /> <gmd:accessConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="<code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code>#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:accessConstraints><br /> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations">no limitations</gmx:Anchor><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints><br /></gmd:resourceConstraints><br /><br /> <!-- INSPIRE C.18; GEMINI 26 use constraints --> <br /><gmd:resourceConstraints><br /> <gmd:MD_LegalConstraints> <!-- change existing example here, was MD_Constraints --><br /> <gmd:useConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="<code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code>#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:useConstraints><br /> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/">Attribution required</gmx:Anchor><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints><br /></gmd:resourceConstraints></pre>
</div>
<p>Figure 22b describes an open data product, with no limitations on public access, but plain text conditions of use.</p>
<div style="border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 22b - INSPIRE no limitations on access; constraint on use</strong></h5>
<pre><!-- INSPIRE C.17; GEMINI 25 Limitations on public access --> <br /><gmd:resourceConstraints><br /> <gmd:MD_LegalConstraints><br /> <gmd:accessConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="<code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code>#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:accessConstraints><br /> <gmd:otherConstraints><br /> <gmx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations">no limitations</gmx:Anchor><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints><br /></gmd:resourceConstraints><br /><br /> <!-- INSPIRE C.18; GEMINI 26 use constraints --> <br /><gmd:resourceConstraints><br /> <gmd:MD_LegalConstraints> <!-- change existing example here, was MD_Constraints --><br /> <gmd:useConstraints><br /> <gmd:MD_RestrictionCode<br />codeList="<code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code>#MD_RestrictionCode"<br /> codeListValue="otherRestrictions">otherRestrictions</gmd:MD_RestrictionCode><br /> </gmd:useConstraints><br /> <gmd:otherConstraints><br /> <gco:CharacterString>Not to be used for navigation</gco:CharacterString><br /> </gmd:otherConstraints><br /> </gmd:MD_LegalConstraints><br /></gmd:resourceConstraints></pre>
</div>
<h3><a id="2.3"></a>2.3 Metadata for datasets and dataset series</h3>
<h4>2.3.1 Data identification</h4>
<p>XML elements for encoding metadata for datasets and series of datasets are drawn, primarily, from the gmd and gco namespaces and also the gml and xlink namespaces. Identification information is encoded using the gmd:MD_DataIdentification type (Figure 23).</p>
<p>Metadata instances may include more than one gmd:identificationInfo XML element. The first gmd:identificationInfo XML element in a GEMINI metadata instance for datasets or series shall have as its first and only child XML element gmd:MD_DataIdentification. The ISO 19115 hierarchyLevel element shall be set to “dataset” or “series”. For a series, ISO 19115 hierarchyLevelName element must also be set, to "dataset" or "series" as appropriate.</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 23 - Metadata for datasets using the gmd:MD_DataIdentification type </strong></h5>
<code><gmd:MD_Metadata></code><br /><code> ...</code><br /><code> <gmd:hierarchyLevel></code><br /><code><code> <gmd:MD_ScopeCode codeList="</code></code><code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code><code>#MD_ScopeCode" codeListValue="dataset">dataset</gmd:MD_ScopeCode></code><br /><code> </gmd:hierarchyLevel></code><br /><code> ...</code><br /><code> <gmd:identificationInfo></code><br /><code> <gmd:MD_DataIdentification></code><br /><code> ...</code><br /><code> </gmd:MD_DataIdentification></code><br /><code> </gmd:identificationInfo></code><br /><code> ...</code><br /><code></gmd:MD_Metadata></code></div>
<h3><a id="2.3.2"></a>2.3.2 Detailed guidance for each metadata element</h3>
<ul>
<li><a title="Detailed guidance – datasets and series" href="/40-gemini/1062-gemini-datasets-and-data-series" rel="alternate">Datasets and series</a></li>
</ul>
<h3><a id="2.4"></a>2.4 Metadata for services</h3>
<h4>2.4.1 Service identification</h4>
<p>XML elements for encoding metadata for services are drawn from the gmd, gco, gml, xlink and srv namespaces. Identification information is encoded using the srv:SV_ServiceIdentification type (Figure 24).</p>
<p>Metadata may include more than one gmd:identificationInfo XML element. The first gmd:identificationInfo XML element in a GEMINI metadata instance for services shall have as its first child XML element srv:SV_ServiceIdentification. The ISO 19115 hierarchyLevel element shall be set to “service”, ISO 19115 hierarchyLevelName element must also be set, to "service".</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 24 - Metadata for services using the srv:SV_ServiceIdentification type</strong></h5>
<code><gmd:MD_Metadata></code><br /><code> ...</code><br /><code> <gmd:hierarchyLevel></code><br /><code> <gmd:MD_ScopeCode </code><br /><code><code> codeList="</code></code><code>https://schemas.isotc211.org/schemas/19139/r</code><code>esources/codelist/gmxCodelists.xml#MD_ScopeCode" </code><br /><code> codeListValue="service">service</code><br /><code> </gmd:MD_ScopeCode></code><br /><code> </gmd:hierarchyLevel></code><br /><code> <gmd:hierarchyLevelName></code><br /><code> <gco:CharacterString>service</gco:CharacterString></code><br /><code> </gmd:hierarchyLevelName></code><br /><code> ...</code><br /><code> <gmd:identificationInfo></code><br /><code> <srv:SV_ServiceIdentification></code><br /><code> ...</code><br /><code> </srv:SV_ServiceIdentification></code><br /><code> </gmd:identificationInfo></code></div>
<h4>2.4.2 Service metadata null values</h4>
<p>The ISO 19119 class SV_ServiceIdentification includes two mandatory properties that are out of scope of GEMINI2 metadata. These are srv:couplingType and srv:containsOperations. Both shall be implemented with null values with the nil reason being missing (Figure 23).</p>
<div style="width: 60em; border-style: solid; border-width: thin; margin: 2ex 2em 6ex 5em; padding: 1em;">
<h5><strong>Figure 25 – Coupling Type and Contains Operations – Null values</strong></h5>
<code><gmd:MD_Metadata></code><br /><code> ...</code><br /><code> <gmd:identificationInfo></code><br /><code> <srv:SV_ServiceIdentification></code><br /><code> ...</code><br /><code> <srv:couplingType gco:nilReason="missing"/></code><br /><code> <srv:containsOperations gco:nilReason="missing"/></code><br /><code> ...</code><br /><code> </srv:SV_ServiceIdentification></code><br /><code> </gmd:identificationInfo></code><br /><code> ...</code><br /><code></gmd:MD_Metadata></code></div>
<h3><a id="2.4.3"></a>2.4.3 Detailed guidance for each metadata element</h3>
<ul>
<li><a title="Detailed guidance – services" href="/40-gemini/1063-gemini-services" rel="alternate">Services</a></li>
</ul>
<p><em>Last technical update: March 2019</em></p>
<p><a href="http://creativecommons.org/licenses/by/4.0/" rel="license"> <img style="border-width: 0;" src="https://i.creativecommons.org/l/by/4.0/88x31.png" alt="Creative Commons Licence" /> </a> <br />This work is licensed under a <a href="http://creativecommons.org/licenses/by/4.0/" rel="license">Creative Commons Attribution 4.0 International License</a></p>
| markdown |
<reponame>zesk/zesk
{
"name": "zesk/zesk",
"description": "The Zesk Application Framework",
"require": {
"php": ">=7.0",
"psr/log": "^1.0",
"components/jquery": "^3.2",
"psr/cache": "^1.0",
"mishal/iless": "^2.",
"ext-calendar": "*",
"ext-json": "*",
"ext-posix": "*"
},
"require-dev": {
"phpunit/phpunit": "*",
"phpunit/php-invoker": "*",
"friendsofphp/php-cs-fixer": "^2.13"
},
"authors": [
{
"name": "<NAME>",
"email": "<EMAIL>"
}
],
"scripts": {
},
"keywords": [
"zesk",
"application",
"framework"
],
"autoload": {
"files": [
"autoload.php"
]
},
"bin": [
"bin/zesk",
"bin/zesk.sh",
"bin/link-vendor-to-dev-zesk.sh",
"bin/daemon-bouncer.sh",
"bin/php-find.sh",
"bin/zesk-command.php"
],
"type": "library",
"license": "MIT",
"homepage": "https://zesk.com"
}
| json |
Rajaji Movie Streaming Watch Online on Amazon Prime Video. Raja is a lazy slacker, who wants to have an easy life. He figures that if he gets married to a rich woman, then he will not have to work. So he meets with multi-millionaire Payal, impresses her, and both fall in love. With the blessings of their respective parents' both get married. After the marrige Raja finds out that Payal is the daughter of the multi-millionaire's gardner, and soon leaves her. Fortune visits Payal and her father, when they win a lottery, and themselves become wealthy beyond their imagination. When Raja comes to know about their new-found wealth, he tries to come back into their lives, but the question is will they accept him back?
| english |
New Delhi: The Defence Ministry on Wednesday announced a fresh list of 351 sub-systems and components that will not be allowed to be imported under a staggered timeline beginning December next year.
It is the third list released by the ministry in the last 16 months and it comes as part of the government’s overall aim to make India a hub of manufacturing of military platforms and equipment.
The ministry also released a list of 2,500 items that it said have already been “indigenised”.
“A positive indigenisation list of sub-systems/assemblies/sub-assemblies/components has been notified by the department of defence production, Ministry of Defence, as part of the efforts to achieve self-reliance in defence manufacturing and minimise imports by defence public sector undertakings,” the ministry said in a statement.
It said “351 imported items” will be “indigenised” in the next three years.
The notification on the new list was issued on Monday.
The ministry said the items mentioned in the list will only be procured from Indian industries as per the timelines indicated.
According to the notification, import restrictions on the first set of 172 items will come into force by December next year while the same provisions will be applicable on another batch of 89 components by December 2023.
Import restrictions on another set of 90 items will come into effect by December 2024.
The items included laser warning sensor, high-pressure check valve, high-pressure globe valve, drainage intrusion detection systems, various types of cables, sockets and voltage control oscillator.
In August last year, the ministry announced that India will stop the import of 101 weapons and military platforms like transport aircraft, light combat helicopters, conventional submarines, cruise missiles and sonar systems by 2024.
A second list, putting import restrictions on 108 military weapons and systems such as next-generation corvettes, airborne early warning systems, tank engines and radars, was issued in May.
In the last few years, the government has taken a series of measures to boost domestic defence manufacturing.
In May last year, the government announced increasing the FDI limit from 49 per cent to 74 per cent under the automatic route in the defence sector.
India is one of the largest importers of arms globally. According to estimates, the Indian armed forces are projected to spend around USD 130 billion (one billion is equal to 100 crores) in capital procurement in the next five years.
The government now wants to reduce dependence on imported military platforms and has decided to support domestic defence manufacturing.
The Defence Ministry has set a goal of a turnover of USD 25 billion (Rs 1. 75 lakh crore) in defence manufacturing in the next five years that included an export target of USD 5 billion (Rs 35,000 crore) worth of military hardware.
This story is auto-generated from a syndicated feed. ThePrint holds no responsibility for its content. | english |
package com.github.lol.pay.component.wechatpay.product;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.alibaba.fastjson.serializer.SerializeConfig;
import com.github.lol.pay.component.wechatpay.WeChatPayConfig;
import com.github.lol.pay.component.wechatpay.internal.WXPay;
import com.github.lol.pay.component.wechatpay.internal.WXPayConfig;
import lombok.Getter;
import lombok.NonNull;
import lombok.Setter;
import lombok.SneakyThrows;
import java.util.Map;
/**
* abstract WeChatPay gateway service
*
* @author: jifuwei
* @create: 2019-07-15 17:18
**/
@Getter
@Setter
public abstract class AbstractWeChatPayProductService {
private WXPayConfig wxPayConfig;
private WXPay wxPay;
private SerializeConfig serializeConfig;
/**
* define product name
*
* @return
*/
protected abstract String productName();
/**
* define product id
*
* @return
*/
protected abstract String productId();
@SneakyThrows
protected void init(@NonNull WeChatPayConfig config) {
this.wxPayConfig = config;
wxPay = new WXPay(wxPayConfig, config.getNotifyUrl(), config.getAutoReport(), config.getUseSandbox());
// config要做singleton处理,要不然会存在性能问题
serializeConfig = new SerializeConfig();
// 驼峰转下划线
serializeConfig.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;
}
protected Map serializeObject2Map(Object targetSource) {
return JSON.parseObject(JSON.toJSONString(targetSource, this.getSerializeConfig()), Map.class);
}
}
| java |
import Vue from 'vue'
import About from 'pages/about/tpl/About.vue'
import EventBus from 'plugins/EventBus.js'
Vue.use(EventBus);
var about = new Vue({
el: '#about',
template: '<About />',
components: {
About
}
}) | javascript |
{
"kind": "Method",
"name": "OffscreenCanvas.convertToBlob",
"href": "https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas/convertToBlob",
"description": "The OffscreenCanvas.convertToBlob()method creates a Blob object representing the image contained in the canvas."
}
| json |
{
"org.ranapat.localization.examples::ExampleClass": {
"_justSomeTestNotWorkingTxt": "This is something that works"
},
"org.ranapat.localization.examples::Main": {
"_justSomeTestTxt": "hohohoh",
"__TRANSLATE__justSomeTest": "hi again",
"_justSomeTestNotWorkingTxt": "we are also here!"
},
"bundle1": {
"key1": "we are this one here!!!",
"bundle2": {
"key1": "now we are here!"
}
},
"key1": "global key 1! My name is %s and my test string is %f"
} | json |
<reponame>Scientific-Inquiry/mobile-ilearn<gh_stars>1-10
package teamfive.milearn;
import java.util.ArrayList;
import java.util.Vector;
public class Instructor extends User {
public Instructor(String name, String netid, int sid, ArrayList<Class> classes, ArrayList<ArrayList<Vector>> snames)
{
this.name = name;
this.netid = netid;
this.sid = sid;
this.rank = Rank.INSTRUCTOR;
this.classes = (ArrayList<Class>) classes.clone();
this.snames = (ArrayList<ArrayList<Vector>>) snames.clone();
this.writeJson("course.json", Rank.INSTRUCTOR, snames);
}
public Object clone()
{
return new Instructor(getName(), getNetid(), getSid(), getClasses(), getSnames());
}
}
| java |
<h3>FBC_PACKAGE\MATLAB_SBML_STRUCTURES\FBCSPECIES</h3>
<p>The functions allow users to create and work with the FBC elements
and attributes of an SBML FBC Species structure.</p>
<p>Function are:</p>
<hr>
<h4>FBCSpecies = FBCSpecies_create(level, version, pkgVersion)</h4>
<p>Takes</p>
<ol>
<li>level, an integer representing an SBML level</li>
<li>version, an integer representing an SBML version</li>
<li>pkgVersion, an integer representing an SBML package version</li>
</ol>
<p>Returns</p>
<ol>
<li>a MATLAB_SBML FBC FBCSpecies structure of the appropriate level, version and pkgVersion</li>
</ol>
<hr>
<h4>charge = FBCSpecies_getCharge(SBMLFBCSpecies)</h4>
<p>Takes</p>
<ol>
<li>SBMLFBCSpecies, an SBML FBCSpecies structure</li>
</ol>
<p>Returns</p>
<ol>
<li>the value of the fbc_charge attribute</li>
</ol>
<hr>
<h4>chemicalFormula = FBCSpecies_getChemicalFormula(SBMLFBCSpecies)</h4>
<p>Takes</p>
<ol>
<li>SBMLFBCSpecies, an SBML FBCSpecies structure</li>
</ol>
<p>Returns</p>
<ol>
<li>the value of the fbc_chemicalFormula attribute</li>
</ol>
<hr>
<h4>charge = FBCSpecies_isSetCharge(SBMLFBCSpecies)</h4>
<p>Takes</p>
<ol>
<li>SBMLFBCSpecies, an SBML FBCSpecies structure</li>
</ol>
<p>Returns</p>
<ol>
<li>value =
<ul>
<li>1 if the fbc_charge attribute is set</li>
<li>0 otherwise</li>
</ul></li>
</ol>
<hr>
<h4>chemicalFormula = FBCSpecies_isSetChemicalFormula(SBMLFBCSpecies)</h4>
<p>Takes</p>
<ol>
<li>SBMLFBCSpecies, an SBML FBCSpecies structure</li>
</ol>
<p>Returns</p>
<ol>
<li>value =
<ul>
<li>1 if the fbc_chemicalFormula attribute is set</li>
<li>0 otherwise</li>
</ul></li>
</ol>
<hr>
<h4>SBMLFBCSpecies = FBCSpecies_setCharge(SBMLFBCSpecies, charge)</h4>
<p>Takes</p>
<ol>
<li>SBMLFBCSpecies, an SBML FBCSpecies structure</li>
<li>charge, a number representing the fbc_charge to be set</li>
</ol>
<p>Returns</p>
<ol>
<li>the SBML FBC FBCSpecies structure with the new value for the fbc_charge attribute</li>
</ol>
<hr>
<h4>SBMLFBCSpecies = FBCSpecies_setChemicalFormula(SBMLFBCSpecies, chemicalFormula)</h4>
<p>Takes</p>
<ol>
<li>SBMLFBCSpecies, an SBML FBCSpecies structure</li>
<li>chemicalFormula, a string representing the fbc_chemicalFormula to be set</li>
</ol>
<p>Returns</p>
<ol>
<li>the SBML FBC FBCSpecies structure with the new value for the fbc_chemicalFormula attribute</li>
</ol>
<hr>
<h4>SBMLFBCSpecies = FBCSpecies_unsetCharge(SBMLFBCSpecies)</h4>
<p>Takes</p>
<ol>
<li>SBMLFBCSpecies, an SBML FBCSpecies structure</li>
</ol>
<p>Returns</p>
<ol>
<li>the SBML FBC FBCSpecies structure with the fbc_charge attribute unset</li>
</ol>
<hr>
<h4>SBMLFBCSpecies = FBCSpecies_unsetChemicalFormula(SBMLFBCSpecies)</h4>
<p>Takes</p>
<ol>
<li>SBMLFBCSpecies, an SBML FBCSpecies structure</li>
</ol>
<p>Returns</p>
<ol>
<li>the SBML FBC FBCSpecies structure with the fbc_chemicalFormula attribute unset</li>
</ol>
<hr>
| html |
version https://git-lfs.github.com/spec/v1
oid sha256:2c8c216d211e2463ab30d4b3eeb98149e882ef7a56adf66a83e033e0d297f5eb
size 649676
| json |
package com.octo.android.robodemo;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.text.Layout;
import android.text.TextPaint;
import android.widget.BaseAdapter;
/**
* Base class for creating a {@link DrawViewAdapter}. It holds a collection of {@link LabeledPoint} to render. This
* adapter will provide a {@link DrawView} with all informations needed to render a given {@link LabeledPoint}. It is
* responsible for associating a {@link Drawable}, a {@link TextPaint} and every other data needed at rendering time.
*
* This class must be subclassed and works more or less like an Android {@link BaseAdapter}.
*
* @see DrawView#setDrawViewAdapter(DrawViewAdapter)
* @author sni
*
*/
public interface DrawViewAdapter {
/**
* @return the number of {@link LabeledPoint} to draw.
*/
public int getPointsCount();
/**
* Give the {@link Drawable} of the {@link LabeledPoint} at a given position.
*
* @param position
* the position of the {@link LabeledPoint} to render.
* @return the {@link Drawable} of the {@link LabeledPoint} at a given position.
*/
public Drawable getDrawableAt( int position );
/**
* Give the {@link Point} to use when rendering the text of the {@link LabeledPoint} at a given position.
*
* @param position
* the position of the {@link LabeledPoint} to render.
* @return the {@link Point} to use when rendering the text of the {@link LabeledPoint} at a given position.
*/
public Point getTextPointAt( int position );
/**
* Give the {@link Layout} to use when rendering the text of the {@link LabeledPoint} at a given position.
*
* @param position
* the position of the {@link LabeledPoint} to render.
* @return the {@link Layout} to use when rendering the text of the {@link LabeledPoint} at a given position.
*/
public Layout getTextLayoutAt( int position );
} | java |
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <random>
#include <utility>
#include <cstdio>
#include <cmath>
#include <glm/glm.hpp>
#include <glm/gtx/io.hpp>
#include <png.h>
class RandomVectorGenerator
{
private:
std::mt19937_64 generator;
std::normal_distribution<> dist;
public:
RandomVectorGenerator() {}
RandomVectorGenerator(std::mt19937_64::result_type seed): generator(seed) {}
glm::dvec3 operator()() noexcept
{
glm::dvec3 result;
result.x = dist(generator);
result.y = dist(generator);
result.z = dist(generator);
return glm::normalize(result);
}
};
template <typename T>
class Grid3D
{
private:
std::size_t dimensions[3];
T *data;
public:
Grid3D(std::size_t x, std::size_t y, std::size_t z)
{
// Let's hope there's no overflows...
data = new T[z * y * x + y * x + x];
dimensions[0] = x;
dimensions[1] = y;
dimensions[2] = z;
}
Grid3D(const Grid3D& other)
{
std::size_t s = 0;
std::size_t sAccum = 1;
for(unsigned int i = 0; i < 3; ++i)
{
dimensions[i] = other.dimensions[i];
sAccum *= dimensions[i];
s += sAccum;
}
data = new T[s];
}
Grid3D(Grid3D&& other)
{
for(unsigned int i = 0; i < 3; ++i)
{
dimensions[i] = other.dimensions[i];
other.dimensions[i] = 0;
}
data = other.data;
other.data = nullptr;
}
~Grid3D()
{
delete[] data;
}
std::size_t getX() const
{
return dimensions[0];
}
std::size_t getY() const
{
return dimensions[1];
}
std::size_t getZ() const
{
return dimensions[2];
}
const T& index(std::size_t x, std::size_t y, std::size_t z) const
{
if(x >= dimensions[0])
x = 0;
if(y >= dimensions[1])
y = 0;
if(z >= dimensions[2])
z = 0;
return data[z * dimensions[1] * dimensions[0] + y * dimensions[0] + x];
}
T& index(std::size_t x, std::size_t y, std::size_t z)
{
if(x >= dimensions[0])
x = 0;
if(y >= dimensions[1])
y = 0;
if(z >= dimensions[2])
z = 0;
return data[z * dimensions[1] * dimensions[0] + y * dimensions[0] + x];
}
const T& indexRelative(std::size_t x, std::size_t y, std::size_t z,
std::ptrdiff_t i, std::ptrdiff_t j, std::ptrdiff_t k) const
{
if(i >= dimensions[0] - x)
i = dimensions[0] - x - 1;
else if(-i >= x)
i = x = 0;
if(j >= dimensions[1] - y)
j = dimensions[1] - y - 1;
else if(-j >= y)
j = y = 0;
if(k >= dimensions[2] - z)
k = dimensions[2] - z - 1;
else if(-k >= z)
k = z = 0;
return data[k * y * x + j * x + i];
}
T& indexRelative(std::size_t x, std::size_t y, std::size_t z,
std::ptrdiff_t i, std::ptrdiff_t j, std::ptrdiff_t k)
{
return const_cast<T&>(indexRelative(x, y, z, i, j, k));
}
};
const double pi = 3.14159265d;
template <class Grid>
class Perlin3D
{
private:
const Grid& grid;
public:
Perlin3D(const Grid& grid_in): grid(grid_in) {}
double sample(const glm::dvec3& point) const
{
// x, y, z of index into grid for the cube that contains the point
// Found by simply truncating (flooring since this is always positive)
// the point coordinates
std::size_t cubeOrigin[3] = {point.x, point.y, point.z};
auto sample =
[&cubeOrigin, &point, this](std::size_t x, std::size_t y, std::size_t z) -> double
{
glm::dvec3 grad = grid.index(cubeOrigin[0]+x, cubeOrigin[1]+y, cubeOrigin[2]+z);
glm::dvec3 dist = point - glm::dvec3(cubeOrigin[0]+x, cubeOrigin[1]+y, cubeOrigin[2]+z);
return glm::dot(dist, grad);
};
glm::dvec3 originDistance(point.x - cubeOrigin[0],
point.y - cubeOrigin[1],
point.z - cubeOrigin[2]);
double xAverage1 = sample(0, 0, 0) * (1.0 - originDistance.x) +
sample(1, 0, 0) * originDistance.x;
double xAverage2 = sample(0, 1, 0) * (1.0 - originDistance.x) +
sample(1, 1, 0) * originDistance.x;
double xAverage3 = sample(0, 0, 1) * (1.0 - originDistance.x) +
sample(1, 0, 1) * originDistance.x;
double xAverage4 = sample(0, 1, 1) * (1.0 - originDistance.x) +
sample(1, 1, 1) * originDistance.x;
double yAverage1 = xAverage1 * (1.0 - originDistance.y) +
xAverage2 * originDistance.y;
double yAverage2 = xAverage3 * (1.0 - originDistance.y) +
xAverage4 * originDistance.y;
return yAverage1 * (1.0 - originDistance.z) + yAverage2 * originDistance.z;
// double result = 0;
// glm::dvec3 tempDistance;
// for(std::size_t z = cubeOrigin[2]; z < cubeOrigin[2] + 2; ++z)
// {
// tempDistance.z = (double) z - point.z;
// double yAverage = 0;
// for(std::size_t y = cubeOrigin[1]; y < cubeOrigin[1] + 2; ++y)
// {
// tempDistance.y = (double) y - point.y;
// double xAverage = 0;
// for(std::size_t x = cubeOrigin[0]; x < cubeOrigin[0] + 2; ++x)
// {
// tempDistance.x = (double) x - point.x;
//
// double dot = glm::dot(grid.index(x, y, z), tempDistance);
// // Take weighted average of dot products for x and x+1
// xAverage += dot * (1.0d - abs(tempDistance.x));
//// xAverage += dot * pow(sin(abs(tempDistance.x)*pi/2.0d), 2);
// }
// // Take weighted averages of x averages for y and y+1
// yAverage += xAverage * (1.0d - abs(tempDistance.y));
//// yAverage += xAverage * pow(sin(abs(tempDistance.y)*pi/2.0d), 2);
// }
// // Final result is weighted average of y averages for z and z+1
// result += yAverage * (1.0d - abs(tempDistance.z));
//// result += yAverage * pow(sin(abs(tempDistance.z)*pi/2.0d), 2);
// }
}
};
int main()
{
using namespace std;
ofstream logger("log.txt");
FILE *image = fopen("test.png", "wb");
if(!image)
return 1;
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
nullptr, nullptr, nullptr);
if(!png_ptr)
return 1;
png_infop info_ptr = png_create_info_struct(png_ptr);
if(!info_ptr)
{
png_destroy_write_struct(&png_ptr, nullptr);
return 1;
}
if(setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_write_struct(&png_ptr, nullptr);
return 1;
}
png_init_io(png_ptr, image);
png_set_IHDR(png_ptr, info_ptr, 4096, 4096, 8, PNG_COLOR_TYPE_GRAY, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
RandomVectorGenerator vecGen;
Grid3D<glm::dvec3> test(64, 64, 64);
for(unsigned int z = 0; z < 64; ++z)
{
for(unsigned int y = 0; y < 64; ++y)
{
for(unsigned int x = 0; x < 64; ++x)
{
test.index(x, y, z) = vecGen();
logger << x << ' ' << y << ' ' << z << ": " << test.index(x, y, z) << endl;
}
}
}
Perlin3D<Grid3D<glm::dvec3>> perlin(test);
vector<unsigned char> imageRows(4096 * 4096);
vector<unsigned char*> imageRowPtrs(4096);
for(unsigned int i = 0; i < 4096; ++i)
{
imageRowPtrs[i] = &(imageRows[i*4096]);
}
double largest = 0;
double smallest = 1000;
for(unsigned int y = 0; y < 4096; ++y)
{
for(unsigned int x = 0; x < 4096; ++x)
{
glm::dvec3 point(((double) x / 4096.d) * 64.0d, ((double) y / 4096.d) * 64.0d, 1.1d);
double sample = 135.0d * abs(perlin.sample(point) + 0.5);
imageRows[y * 4096 + x] = sample;
largest = sample > largest ? sample : largest;
smallest = sample < smallest ? sample : smallest;
}
}
png_set_rows(png_ptr, info_ptr, &(imageRowPtrs[0]));
png_write_png(png_ptr, info_ptr, 0, nullptr);
png_write_end(png_ptr, info_ptr);
png_destroy_write_struct(&png_ptr, &info_ptr);
cout << largest << ' ' << smallest << endl;
// FILE *dump = fopen("C:\\Development\\dump.txt", "w");
// char *fileBuffer = new char[67108864];
// setvbuf(dump, fileBuffer, _IOFBF, 67108864);
//
// for(unsigned int z = 0; z < 512; ++z)
// {
// for(unsigned int y = 0; y < 512; ++y)
// {
// for(unsigned int x = 0; x < 512; ++x)
// {
// glm::dvec3& vec = test.index(x, y, z);
// fprintf(dump, "(%f,%f,%f)\n", vec.x, vec.y, vec.z);
// }
// }
// }
//
// fclose(dump);
// delete[] fileBuffer;
}
| cpp |
The domestic equity capital markets (ECM) raised $7. 3 billion during the first quarter of 2021, up 13. 4% in proceeds from the first quarter of 2020, registering the best start to a year since 2018 when $8. 8 billion was raised.
While the first quarter of 2021 was fertile ground for equity issuances, the outlook for the current quarter hinges on how the secondary market behaves. Investment bankers say if volatility, as seen over the past few weeks, remains elevated, it can dent ECM activity.
Follow-on offerings, which accounted for 67. 9% of India’s overall ECM proceeds, raised $5 billion in the first quarter of 2021, up 16. 5% from a year ago. IPO by Indian companies started strong and totalled $2. 3 billion in the first quarter of 2021, a 98. 7% increase YoY. It was the best first quarter period for IPOs since 2018, when $2. 9 billion was raised.
TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH.
What you get on Business Standard Premium?
- Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app.
- Pick your 5 favourite companies, get a daily email with all news updates on them.
- Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006.
- Preferential invites to Business Standard events.
- Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more. | english |
@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,900&subset=latin,latin-ext);
body {
font-family: 'Source Sans Pro';
}
.jumbotron {
margin-bottom: 30px;
}
.jumbotron h1 {
font-weight: 900;
}
.btn-lg {
font-size: 22px;
font-weight: 600;
}
.well h2 {
font-weight: 600;
letter-spacing: 0.025em;
margin-top: 10px;
}
.input-lg {
height: 69px;
padding: 15px 24px;
font-size: 28px;
}
.form {
margin-bottom: 30px;
}
.result {
margin-bottom: 30px;
}
.big {
font-size: 22px;
font-weight: 900;
}
| css |
'''
Copyright (c) The Dojo Foundation 2011. All Rights Reserved.
Copyright (c) IBM Corporation 2008, 2011. All Rights Reserved.
'''
# tornado
import tornado.ioloop
# std lib
import logging
import time
# coweb
from .session import BayeuxSession
from .connection import BayeuxConnection
from .channel import BayeuxChannel
log = logging.getLogger('bayeux.server')
class BayeuxManager(object):
'''Base class for a Bayeux manager tracking known clients.'''
def __init__(self, purgeInterval=15, deadAfter=60, exts=[],
client_cls=BayeuxSession, connection_cls=BayeuxConnection):
self.deadAfter = deadAfter
self.timeout = int(self.deadAfter/2.0)
self._clientCls = client_cls
self._connectionCls = connection_cls
self._root = BayeuxChannel('/')
self._clients = {}
self._flushable = set()
self._ioloop = tornado.ioloop.IOLoop.instance()
self._purgeGen = None
if purgeInterval is None:
self._timer = None
else:
self._timer = tornado.ioloop.PeriodicCallback(self.purge_clients,
purgeInterval*1000)
self._timer.start()
self._exts = exts
self._willFlush = False
def destroy(self):
'''Destroyes the Bayeux manager and deletes its known clients'''
# stop the purge timer
if self._timer is not None:
# do after in case we're in the callback to prevent re-registration
# due to tornado bug
self._ioloop.add_callback(self._timer.stop)
# force the callback reference to None, because stop doesn't
# remove the reference from the ioloop, else gc impeded until
# next callback occurs, even though stopped
self._timer.callback = None
self._timer = None
self._purgeGen = None
# purge all clients
cids = list(self._clients.keys())
for cid in cids:
cl = self.delete_client(cid)
cl.destroy()
self._clients = {}
def flush(self):
'''Flushes all outgoing client messages immediately.'''
self._willFlush = False
leftover = set()
while self._flushable:
cl = self._flushable.pop()
if not cl.on_flush():
leftover.add(cl)
# don't reschedule flush now, next connection will do it
self._flushable = leftover
def should_flush(self, cl):
'''
Marks a client as having outgoing messages that should be flushed.
'''
self._flushable.add(cl)
# schedule the flush if not one already pending
if not self._willFlush:
self._ioloop.add_callback(self.flush)
self._willFlush = True
def publish(self, msg):
'''Publishes a message to all clients subscribed to its channel.'''
# strip off client ID before sending out to other clients
try:
senderId = msg['clientId']
del msg['clientId']
except KeyError:
senderId = None
try:
del msg['id']
except KeyError:
pass
ch = msg.get('channel', None)
# find all subscribed clients
clients = set()
self._root.collect_clients(clients, BayeuxChannel.split(ch))
for cl in clients:
cl.add_message(msg, senderId)
def get_root_channel(self):
'''Gets the root / BayeuxChannel instance.'''
return self._root
def build_connection(self, handler):
'''
Builds a BayeuxConnection instance to represent a single connection
over a negotiated transport from a client.
'''
return self._connectionCls(handler, self)
def new_client(self):
'''
Builds a new BayeuxSession instance to represent a continuing session
with a client.'''
c = self._clientCls(self, exts=self._exts)
self._clients[c.clientId] = c
return c
def is_client(self, cid):
'''Gets if the given client ID is one for a known client.'''
return cid in self._clients
def get_client(self, cid):
'''Gets the client associated with the given client ID.'''
return self._clients[cid]
def delete_client(self, cid):
'''Deletes the client assocaited with the given client ID.'''
cl = self._clients[cid]
del self._clients[cid]
try:
self.on_purging_client(cid, cl)
except Exception:
log.exception('purge delegate')
return cl
def purge_clients(self):
'''
Purges clients that have not performed any action within the
configured self.deadAfter interval in seconds.
'''
if not self._purgeGen:
# build a new purge generator
self._purgeGen = self._purge_clients()
try:
# iterate the generator
next(self._purgeGen)
except StopIteration:
# purge complete, toss the generator
self._purgeGen = None
else:
# purge incomplete, schedule for immediately continuation
self._ioloop.add_callback(self.purge_clients)
def _purge_clients(self, timeout=2, blockSize=100):
# snapshot the clients in the dict
cids = list(self._clients.keys())
# get the current time
now = time.time()
for i, cid in enumerate(cids):
cl = self._clients[cid]
if cl.lastSeen is None:
self.delete_client(cid)
cl.destroy()
continue
dt = now - cl.lastSeen
if dt > self.deadAfter:
cl = self.delete_client(cid)
cl.destroy()
if i % blockSize == 0 and time.time() - now > timeout:
# we're taking too long, yield
yield
def on_purging_client(self, cid, cl):
'''
Called after this manager stops tracking a client but before the
BayeuxSession instace for the client is destroyed (i.e., it's
final messages flushed, sockets closed, etc.) No expected return
value.
'''
pass
| python |
{
"name": "DinaKit",
"description": "iTemplates DinaKit Framework",
"filename": "css/cdn_dinakit.min.css",
"homepage": "http://dinakit.itemplat.es/",
"keywords": [
"dinakit",
"css",
"dinakit.css",
"dinakit.min.css",
"html",
"html5",
"css3",
"framework"
],
"repository": {
"type": "git",
"url": "https://github.com/bkader/DinaKit.git"
},
"license": "MIT"
}
| json |
New Delhi :Criticising the government for refusing to take a stand on the issue, Vishwa Hindu Parishad today demanded that the mythological Ram Setu be declared a national monument.
“We demand that the government file an affidavit in the Supreme Court announcing the cancellation of the Setu Samudram project and declaring the Ram Setu a national monument ", VHP leader Praveen Togadia said.
His denouncement of the government’s decision came on a day when Additional Solicitor General Haren Raval submitted in the SC that the government after consultations has decided not to take any stand on the issue of declaring the mythological Ram Setu a national monument.
The government has left it on the Supreme Court to decide on the issue.
The case relating to Ram Setu came under judicial scrutiny due to a bunch of petitions filed in the apex court against the ambitious Sethusamudram project, whose execution allegedly was to damage the mythological bridge.
In a statement, Togadia said the government’s move reflects its “anti-Hindu sentiments” as Hindus have been offering prayers to Ram Setu even before the country gained independence and the Britishers came to India. | english |
import { useEffect } from 'react'
import clsx from 'clsx'
import { useGate, useStore } from 'effector-react'
import { useThrottle } from 'react-use'
import { AppLayout } from '~/layouts'
import { PortfolioEarnings } from '~/portfolio/portfolio-earnings'
import { PortfolioTotalWorth } from './portfolio-total-worth'
import { PortfolioCoinBalance } from './portfolio-coin-balance'
import { Head } from '~/common/head'
import { Typography } from '~/common/typography'
import { PortfolioMetricCards } from './portfolio-metric-cards'
import { PortfolioWallets } from './portfolio-wallets/portfolio-wallets'
import { PortfolioAssets } from './portfolio-assets'
import { PortfolioDeployedContracts } from './portfolio-deployed-contracts'
import { SettingsContacts } from '~/settings/settings-contacts'
import { Loader } from '~/common/loader'
import {
useOnWalletMetricUpdatedSubscription,
useOnTokenMetricUpdatedSubscription,
} from '~/graphql/_generated-types'
import { authModel } from '~/auth'
import * as styles from './portfolio.css'
import * as model from './portfolio.model'
export type PortfolioProps = unknown
const TIME = 15000
export const Portfolio: React.VFC<PortfolioProps> = () => {
const tokenAliasses = useStore(model.$tokenAliasses)
const loading = useStore(model.fetchTokenAliassesFx.pending)
const user = useStore(authModel.$user)
useGate(model.PortfolioGate)
const [walletUpdated, onWalletMetricUpdated] =
useOnWalletMetricUpdatedSubscription()
const [tokenMetricUpdated, onTokenMetricUpdated] =
useOnTokenMetricUpdatedSubscription()
useEffect(() => {
if (!user) return
const opts = {
variables: {
user: [user.id],
},
}
onTokenMetricUpdated(opts)
onWalletMetricUpdated(opts)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [user])
const metricUpdated = useThrottle(
walletUpdated.data?.onWalletMetricUpdated.id ||
tokenMetricUpdated.data?.onTokenMetricUpdated.id ||
'',
TIME
)
useEffect(() => {
if (metricUpdated) {
model.portfolioUpdated()
}
}, [metricUpdated])
return (
<AppLayout title="Portfolio">
<Head title="Portfolio" />
{loading && !tokenAliasses && (
<div className={styles.loader}>
<Loader height="36" />
</div>
)}
{Boolean(tokenAliasses) && (
<>
<Typography variant="h3" className={styles.title}>
Portfolio
</Typography>
<PortfolioMetricCards className={styles.cards} />
<div className={clsx(styles.grid, styles.section)}>
<PortfolioTotalWorth className={styles.mainChart} />
<PortfolioEarnings />
<PortfolioCoinBalance />
</div>
<PortfolioAssets className={styles.section} />
<PortfolioWallets className={styles.section} />
<PortfolioDeployedContracts />
</>
)}
{!loading && !tokenAliasses && (
<>
<Typography variant="h3" className={styles.title}>
Portfolio
</Typography>
<Typography
variant="h3"
family="mono"
transform="uppercase"
className={styles.generatingTitle}
>
Generating Portfolio...
</Typography>
<Typography className={styles.generatingDescription}>
Building process can take up to 24 hours. Add contacts so you can
recieve notifications about any actions. You will be notified when
portfolio is ready. You will be able to change it any time in
settings.
</Typography>
<SettingsContacts withHeader={false} />
</>
)}
</AppLayout>
)
}
| typescript |
<gh_stars>1-10
{
"id": "d82-66",
"text": "APPENDIX E (three)\nKit K-IG2 (continued)\nDESCRIPTION OF THE BASIC MATERIAL:\nThe film will show the use of the team concept\nIn teaching with large and small classes. It will\nshow how the classes are scheduled and divided to\nmake the best use of the technique. Two examples\nof a part of a unit of work, one taken from science\nand the other from history, will be used. These\nwill Include location film illustrating the pre—\nparatory work before the telecast, follow-up work\nafter the telecast, classroom discussion and ex¬\npansion of ideas presented on the telecast. Indi¬\nvidual and small group projects and undertakings,\nand culmination activities carried on In both\nlarge and small groups. The film will also show\na typical reaction of a studio teacher and of a\nclassroom teacher, and a brief explanation by an\nadministrator showing how this program fits Into\nthe over-all school program.\nCOST:\n$ 2,290.50"
} | json |
<reponame>mac-novice-pg2/tool_dev<gh_stars>0
# いちねんカレンダー機能を作る
Today機能を一から自分で作るのは意外と難しいのでGoogle先生に頼ってみました。現在の日時情報を知るには、コンピュータにある日付情報をどうにかして取得する必要があります。こういった処理は、通常ならばOSから提供される機能を利用する必要があり、それには標準ライブラリ関数を使うのが一般的です。
次に、いちねんカレンダー機能の実現方法について考えてみましょう。
## 出力イメージを考える
出力イメージを示します。なお、レイアウトが崩れてしまいますので、MS明朝などの固定ピッチフォーマットでご覧下さい。
```
1月のカレンダー ←(a)
日 月 火 水 木 金 土 ←(b)
1 2 3 4 5 ←(c)(d)
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 ←(e)
```
プログラムでは上の行から順番に出力するので、以下のような処理順序になります
1. 「xx月のカレンダー」部分を出力する(a)
2. 曜日部分を出力する(b)
3. 開始曜日まで空白を入れる(c)
4. 日の部分を1から順に出力していき、土曜日の位置で折り返す(d)
5. 月末まで出力出来たら終了
#### カレンダーを作るには?
次に具体的に具体的な処理手順を考えてみましょう。こういう時には
「カレンダーを作る為には、何が必要か?」
を考えてみるとどうやって進めるのかのヒントが得られます。今回のケースであれば**どういった情報があれば、カレンダーを作成する事が出来るのか?**から考えてみるのが良いでしょう。
このように**ソフトウェアを組む上で必要なデータ**を考える事は、プログラミングにおいて最も重要なものとされ、著名なソフトウェア工学者のロブ・パイクが述べた言葉にも以下のようなものがあります。
> データが最も重要である。 正しいデータ構造と編成を選択すれば、アルゴリズムは自明のものとなります。アルゴリズムではなく、データ構造こそがプログラミングの中心です
## データ構造
では、早速いちねんカレンダー機能において必要なデータ構造を考えてみましょう。
カレンダーの構造を考えてみると、以下のルールで成り立っている事が分かります。
- 月は1~12月までの12進数
- 日は必ず1日から始まるが、月末は28~31日のパターンがある
- 曜日は年月日によって変わり、例えば2018年と2019年の1/1の曜日は異なる
これらの情報から**特定月のカレンダーを作成する場合に必要な情報**は
- その月が何日まであるのか?
- その月の1日は何曜日から始まるのか?
の二点が決まれば良いので、**これをプログラムにすれば特定月のカレンダーを作成出来る**ようです
- その月が何日まであるのか?
- その月は何曜日まであるのか?
### カレンダー情報型を定義する
では、早速これをデータとして定義してみましょう
| データ名 | 設定値制限 | 型 |
| -------- | ------------------------------------ | ------ |
| 月末 | 28~31 | 整数型 |
| 開始曜日 | "月"、"火"、"水"、"木"、"月"、"月"、 | 列挙型 |
月ごとに上のデータがあれば良さそうです。では、C言語でこれを表現してみます。
```cpp
// 曜日を示す列挙型
typedef enum
{
Sun = 0, // 日曜日
Mon, // 月曜日
Tue, // 火曜日
Wed, // 水曜日
Thu; // 木曜日
Fri; // 金曜日
Sat; // 土曜日
}eWeekday;
// カレンダー作成用情報
typdef struct{
int eom; // 月末( end of month )
eWeekday start_weekday; // 開始曜日
}MonthInfo;
```
このように定義したeWeekdayやMonthInfo型の情報を使えば、例えば2018/12であれば**土曜日から始まり、31日で終わる**という内容を以下のように定義する事が出来ます
```cpp
MonthInfo month_info_2018_12;
month_info_2018_12.eom = 31; // 2018/12は31日まで
month_info_2018_12.start_weekday = Sat; // 2018/12は土曜日から始まる
```
さらに、この型を配列にすれば2019年データを定義する事が出来ます
```cpp
MonthInfo
month_info_2019[] = {
// eom, start_weekday
{ 31, eTue }, // 2019/01
{ 28, eFri }, // 2019/02
{ 31, eFri }, // 2019/03
{ 30, eMon }, // 2019/04
{ 31, eWed }, // 2019/05
{ 30, eSat }, // 2019/06
{ 31, eMon }, // 2019/07
{ 31, eThu }, // 2019/08
{ 30, eSun }, // 2019/09
{ 31, eTue }, // 2019/10
{ 30, eFri }, // 2019/11
{ 31, eSun }, // 2019/12
};
```
これでカレンダーを作る為に必要なデータが揃いました。では、今度はそのデータを使ってカレンダーを作成していきましょう。なお、計算機学においては**「プログラミング= データ構造+アルゴリズム」**という形で表現される事がありますが、さしづめここで決めたのがデータ構造で、出力処理を行うのがアルゴリズムといった所です)
## 出力処理(アルゴリズム)
### タイトル/曜日部分を出力する
では、最初にタイトル/曜日部分の出力処理を書いてみましょう。
```
2019年 1月のカレンダー
日 月 火 水 木 金 土
```
出力k処理で使用するのは、(恐らくはC言語で最初に学ぶであろう)printf()関数を使います。
```cpp
int year = 2019;
int month = 1;
printf( "%4d年%2d月のカレンダー\n\n", year, month );
printf( "日 月 火 水 木 金 土\n" );
```
## "日"出力前の空白を出力する
カレンダーの曜日部分は必ず日曜日から始まるので、例えば**1日が火曜日から始まる場合には日・月を飛ばしてから1日を出力する**必要があります。この処理を書く為には、二つほどC言語知識が必要になるので説明しておきましょう。先ずは列挙型と整数値の関係について述べます
### 列挙型と整数値の関係
```
日 月 火 水 木 金 土
1 2 3 4 5
<---->この部分をスキップする
```
カレンダーを作成するのに必要な情報はMonthInfoに含まれていますが、この中の**開始曜日の情報を示すMonthInfo.start_weekday**を使用します。C言語の列挙型の特徴として、列挙型のそれぞれの値(正式名称は列挙子と言いますが、プロでも正確な呼称を知っている人は稀です)は、整数値として扱う事が出来ます
```cpp
// 曜日を示す列挙型
typedef enum
{
eSun = 0,
eMon,
eTue,
eWed,
eThu,
eFri,
eSat,
eWeekEnd,
}eWeekday;
```
eWeekdayの定義であれば、以下の表のように整数値が割り当てられます。この時、**曜日によって読み飛ばす量は、整数値側の値を使用する**事が出来ます。表に合わせてスキップ量を記載しておきます
| 列挙子 | 整数値( = スキップ量に等しい) |
| ------ | ----------------------------- |
| eSun | 0 |
| eMon | 1 |
| eTue | 2 |
| eWed | 3 |
| eThu | 4 |
| eFri | 5 |
| eSat | 6 |
しかし、スキップ量が分かった所で、コンピュータに**「2つの曜日分を読み飛ばして」と命令するには、相応の空白文字を出力**する事で実現する事が出来ます。この時**書式指定文字列**を使用すると便利です
### 書式指定文字列
書式指定文字列はprintf()関数で使用されるので、(概念はさておいて)見覚えはあると思います。
先ずは最初に学ぶC言語のプログラムを見てみましょう。
```cpp
#include <stdio.h>
int main( void )
{
printf( "Hello World\n" );
return 0;
}
```
ここで出てくる**printf()関数への引数として使用されるのが書式指定文字列**で、第一引数で渡されます。これは、出力フォーマットを指定する機能を有する特殊な文字列となっていて、指定された変数に対して出力形式を指定出来るようになっています。以下の例を見てみましょう
```cpp
int val = 123;
printf( "val is %d\n", val ); // val is 123(valをそのまま%dの位置に表示)
printf( "val is %4d\n", val ); // val is 123(valを4桁幅の数字として出力)
printf( "val is %04d\n", val ); // val is 0123(valを4桁幅かつ0埋めの数字として出力)
```
読み飛ばす際には**『曜日行』と『日の行」の位置が一致するようにスキップ**させる必要があります。この時**全角文字の漢字は2文字分の幅を取り、次の曜日までのスペース1文字とを合わせて3文字分の文字幅を取ればよい**事が分かります。以下のサンプルを確認してみて下さい
```cpp
"月_" // 曜日行の出力
" 1_" // 日の行の出力
"012" // 文字列幅
printf( "月 " ); // 全角文字(2文字分)と半角スペース1つの合計3文字幅
printf( " " ); // 半角スペース3つ分
```
### 読み飛ばし部分のコード
ここまでで読み飛ばしの準備が出来ましたので、ソースコードを示します
```cpp
eWeekday weekday = Tue; // 火曜日までスキップする
// for文でスキップの数だけ、空白出力を繰り返す( skipが0~1の間{}の処理を繰り返す )
for( int skip = 0; skip < ( int )weekday; skip++ )
{
printf( " " ); // 半角スペース3つ分の空白を出力する
}
```
フローチャートで示すと以下のようになります

## 日部分の出力
最後は日部分の出力です。あと一息ですね。
```
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 ←(e)
```
先ずは処理の流れをざっと考えてみましょう。
1. 1から月末までの数字を出力する)(printf()で3文字幅にする)
2. 土曜日の出力が終わったら改行する
3. 月末まで出力したら終了
1日の出力位置までの読み飛ばし処理は終わっているので、あとは土曜日の改行ですね。1日から順番に出力する際に、合わせて曜日情報を進めていけば処理が実現出来そうですね。という訳で、新たに**本日の情報を示すデータ型**を定義しました(TodayInfo)
```cpp
// 本日を示す構造体
typedef struct
{
int year;
int month;
int day;
eWeekday weekday;
}TodayInfo;
```
また日を進める際には色々な処理を行う必要があるので、専用の関数を用意する事にします。
```cpp
// 曜日を進める
static eWeekday
next_weekday( eWeekday current )
{
switch( current )
{
case eSun: return eMon;
case eMon: return eTue;
case eTue: return eWed;
case eWed: return eThu;
case eThu: return eFri;
case eFri: return eSat;
case eSat: return eSun;
default:
assert( 0 ); // ここに入る事はないので、万一入ったら異常終了させる
return eWeekEnd; // ここは通らない
}
} // next_weekday()
// TodayInfo型データを一日進める関数
// 引数のeomはend of monthで月末の意
static void
step_today_info( TodayInfo *today, int eom )
{
if( today->day != eom ) // 今日は月末でない?
{
( today->day )++; // 日を1日進める
}
else // 今日は月末?
{
// 一か月進めて、1日に戻す
// 年末なら、1年進めて1月に戻す
today->day = 1;
( today->month )++;
if( today->month == 13 ) // 年末?
{
( today->year )++;
today->month = 1;
}
}
// 曜日を進める
today->weekday = next_weekday( today->weekday );
} // step_today_info()
```
step_today_info()関数のフローチャートを示しておきます

### MEMO:スコープの考え方
上で定義した関数はそれぞれstatic関数として定義しています。これは**その関数がどこから使えるか?**を決めるもので、**スコープと呼ばれる定義の有効範囲を示す**ものとなります。
- static関数(ローカルスコープ)
- その関数が定義されたファイル内でのみ有効
- 何も付けていない関数(グローバルスコープ)
- そのソースコードを含むアプリケーションなら、どこからでも使える
「大は小を兼ねるから、グローバルスコープだけでいい」
と思われるかもしれませんが、大人数で開発をしていると
「AさんとBさんが同じ名前の関数を定義してしまった」
という事が頻繁に発生して、リンクの際に多重定義エラーを引き起こします。プログラミングにおいては、局所化を常に意識する事が大切です。
### 日部分を出力する
ここまでに示したデータ構造と関数を使えば、日部分は以下のように書く事が出来ます
```cpp
// 日部分を出力する
TodayInfo today = { year, month, 1, pInfo->start_weekday };
for( int day = 0; day < pInfo->eom; day++ )
{
printf( "%2d ", today.day );
// 土曜日まで出力したら、改行して折り返す
if( today.weekday == eSat )
{
printf( "\n" );
}
step_today_info( &today, pInfo->eom ); // 1日進める
}
printf( "\n" );
```
フローチャートは以下の通りです

これでいちねんカレンダー機能が完成しました | markdown |
<filename>yudao-ui-admin/src/utils/auth.js
import Cookies from 'js-cookie'
const AccessTokenKey = 'ACCESS_TOKEN'
const RefreshTokenKey = 'REFRESH_TOKEN'
export function getAccessToken() {
return Cookies.get(AccessTokenKey)
}
export function getRefreshToken() {
return Cookies.get(RefreshTokenKey)
}
export function setToken(token) {
Cookies.set(AccessTokenKey, token.accessToken)
Cookies.set(RefreshTokenKey, token.refreshToken)
}
export function removeToken() {
Cookies.remove(AccessTokenKey)
Cookies.remove(RefreshTokenKey)
}
| javascript |
Although there was a good buzz for the movie ahead of its release, Happy Birthday failed to reach the expectations of the audience and it ended on a losing side.
Directed by Mathu Vadalara fame Ritesh Rana, the movie will be released on top OTT giant Netflix on August 8th. The digital streaming platform announced the same on its social media handles.
Happy Birthday also featured Naresh Agastya, Satya, Vennela Kishore and others as the supporting artists. The movie is funded by Mythri Movie Makers in association with Clap Entertainment. Kaala Bhairava has composed the music. | english |
# session-related machinery (tracks player state)
import collections
import glob
import hashlib
import os
import random
import secrets
import server
import yaml
class Session:
"""Information about the state for a single player"""
s_cIterHash = 100000
s_algoHash = 'sha256'
def __init__(self):
self.m_uid = None
self.m_pwd = '<PASSWORD>'
self.m_path = None
self.m_room = None
self.m_roomSaved = None
self.m_mpVarVal = collections.defaultdict(int) # auto-create keys with 0 value
self.m_fIsDirty = False
def Load(self, path):
"""Serialize in this session from a file containing a yaml document"""
self.m_path = path
with open(path, 'r') as fileIn:
doc = yaml.safe_load(fileIn)
if doc is None:
return
self.m_uid = doc.get('uid')
self.m_pwd = doc.get('pwd')
self.m_roomSaved = doc.get('room') # NOTE string, not room
self.m_mpVarVal = collections.defaultdict(int)
self.m_mpVarVal.update(doc.get('vars'))
self.m_fIsDirty = False
def Save(self):
"""Serialize out this session as a yaml document to its source path"""
# TODO: is there a better way here? can we fake that we're a dict instead somehow?
dSelf = {}
dSelf['uid'] = self.m_uid
dSelf['pwd'] = <PASSWORD>
dSelf['room'] = self.m_room.m_name
dSelf['vars'] = dict(self.m_mpVarVal)
tmp = self.m_path + ".new"
with open(tmp, 'w') as fileOut:
yaml.dump(dSelf, fileOut)
old = self.m_path + '.old'
if os.path.exists(old):
os.remove(old)
if os.path.exists(self.m_path):
os.rename(self.m_path, old)
os.rename(tmp, self.m_path)
if os.path.exists(old):
os.remove(old)
self.m_fIsDirty = False
def StrErrors(self):
"""Validate this session, and if it has problems, return a string explaining the issues"""
lStrErr = []
if self.m_uid is None:
lStrErr.append("UID is missing")
if self.m_path is None:
lStrErr.append("UID {u} missing its path".format(u=self.m_uid))
if self.m_roomSaved is None and self.m_room is None:
lStrErr.append("UID {u} missing its room".format(u=self.m_uid))
if not isinstance(self.m_mpVarVal, dict):
lStrErr.append("UID {u} has non-dictionary vars".format(u=self.m_uid))
# TODO: other things to check?
return '\n'.join(lStrErr)
def RoomCur(self):
return self.m_room
def SetRoomCur(self, room):
self.m_room = room
self.m_fIsDirty = True
def Var(self, var):
return self.m_mpVarVal.get(var, None)
def SetVar(self, var, value):
self.m_mpVarVal[var] = value
self.m_fIsDirty = True
def FMatchesCreds(self, pwd):
"""Returns True if the given user/password combo matches this session"""
hashSelf, salt = self.m_pwd.split(',')
dk = hashlib.pbkdf2_hmac(self.s_algoHash, pwd.encode(), salt.encode(), self.s_cIterHash)
hashCheck = dk.hex()
return hashSelf == hashCheck
def SetCreds(self, uid, pwd):
"""Sets the creds for this session object directly (assumes it is valid to do so)"""
self.m_uid = uid
salt = secrets.token_hex(nbytes=32)
dk = hashlib.pbkdf2_hmac(self.s_algoHash, pwd.encode(), salt.encode(), self.s_cIterHash)
self.m_pwd = ','.join([<PASSWORD>(), <PASSWORD>])
self.m_fIsDirty = True
def SetPath(self, path):
"""Sets up the path for where this session should be saved"""
self.m_path = path
self.m_fIsDirty = True
def StrFormatSmart(self, strIn):
"""Do "smart" formatting of strIn (expected to be a format string) vs. the contents of
mp_mpVarValue. In particular, deal with cases where the format string talks about items
that don't have keys in the var map."""
# NOTE: I attempted to deal with this by using defaultdict, but unfortunately, the ** expansion
# that is used to convert dictionaries into keyword expansions of course doesn't default expand
# every possible keyword out, so defaultdict didn't actually help with that case at all. Since
# there isn't a way to pass a "smart" dictionary like that into str.format(), we deal with that
# ourselves here.
# TODO: be smarter/safer about dealing with this stuff -- doing the simple version where we detect
# problems and fix them, rather than attempting to "correctly" parse the format syntax up front
cIter = 100
while cIter > 0:
cIter -= 1
try:
return strIn.format(**self.m_mpVarVal)
except KeyError as ke:
# TODO: Is this safe/guaranteed?
self.m_mpVarVal[ke.args[0]] = 0
return "<could not format>"
def RunChanges(self, room):
"""Apply any changes for the given room to this session"""
for change in room.LChange():
op = change[0]
self.m_fIsDirty = True
if op == 'set':
# set a session variable to a fixed value
var = change[1]
value = change[2]
self.m_mpVarVal[var] = value
elif op == 'add':
# add a fixed value to a session variable
var = change[1]
value = change[2]
# TODO: cleaner/more useful handling of invalid/missing/non-numeric values?
try:
self.m_mpVarVal[var] = self.m_mpVarVal.get(var, 0) + int(value)
except:
pass
elif op == 'addrand':
# add a random ranged value to a session variable
var = change[1]
low = change[2]
high = change[3]
# TODO: cleaner/more useful handling of invalid/missing/non-numeric values?
try:
self.m_mpVarVal[var] = self.m_mpVarVal.get(var, 0) + random.randint(low, high)
except:
pass
elif op == 'setrand':
# set a session variable to a ranged randomized value
var = change[1]
low = change[2]
high = change[3]
self.m_mpVarVal[var] = random.randint(low, high)
def TryAdjustRoom(self, dPost, handler):
"""Handles any commands in dPost that could adjust the current room, etc."""
# No adjustment if we're not asked to go anywhere
if 'dest' not in dPost:
return
dest = dPost['dest']
# NOTE it appears that spaces get turned into plus signs on form submit, so undo that here
dest = dest.replace('+', ' ')
# bad coupling here
rooms = server.g_server.m_rooms
roomNext = rooms.Room(dest)
# provide some debug output for what's going on
handler.log_message(
"Moving from room '{start}' to '{finish}' {legit}".format(
start=self.RoomCur().m_name,
finish=dest,
legit='(valid)' if roomNext else '(invalid)'))
if roomNext:
self.RunChanges(roomNext)
self.SetRoomCur(roomNext)
# TODO do we need handling for the case where the room doesn't exist? just leaving the player there is weird, I guess?
def FEvaluateCond(self, cond):
"""Returns True if the given condition evaluates to True, and False if not"""
if isinstance(cond, dict):
if len(cond) != 1:
return false
if 'and' in cond:
lCond = cond['and']
elif 'or' in cond:
lCond = cond['or']
else:
# TODO: logging?
return False
if not isinstance(lCond, list):
# TODO: logging?
return False
lF = [self.FEvaluateCond(x) for x in lCond]
setF = set(lF)
if 'and' in cond:
return True in setF and False not in setF
elif 'or' in cond:
return True in setF
else:
# TODO: logging?
return False
elif isinstance(cond, list):
# should be a three part list: op, var, value
if len(cond) != 3:
# TODO: logging?
return False
op = cond[0]
var = cond[1]
value = cond[2]
if 'var' in op:
# expand value by looking it up
value = self.m_mpVarVal.get(value, 0)
if op == 'eq' or op == 'eqvar':
return self.m_mpVarVal.get(var, 0) == int(value)
elif op == 'gt' or op == 'gtvar':
return self.m_mpVarVal.get(var, 0) > int(value)
elif op == 'lt' or op == 'ltvar':
return self.m_mpVarVal.get(var, 0) < int(value)
elif op == 'ne' or op == 'nevar':
return self.m_mpVarVal.get(var, 0) != int(value)
else:
# TODO: logging?
return False
# TODO: logging?
return False
def FShouldProvideExit(self, exit):
"""Returns True if the exit should be provided, False if the exit should not be provided"""
# exits that do not have a condition should always be provided
if 'cond' not in exit:
return True
return self.FEvaluateCond(exit['cond'])
def LStrTryAddExit(self, exit, sid):
"""Returns the list of form strings for the exit if it is legal, and empty list otherwise"""
# skip invalid exits (no name or verb)
if 'name' not in exit:
return []
if 'verb' not in exit:
return []
if not self.FShouldProvideExit(exit):
return []
# NOTE that by using a separate form for each exit, we can thus include the index as a different
# value so that we can distinguish which exit was selected
lStr = []
lStr.append('<form action="/room" method="post">')
lStr.append('<input type="hidden" name="sid" id="sid" value="{sid}"/>'.format(sid=sid))
lStr.append('<input type="hidden" name="cur" id="cur" value="{cur}"/>'.format(cur=self.RoomCur().m_name))
lStr.append('<input type="hidden" name="dest" id="dest" value="{dest}"/>'.format(dest=exit['name']))
lStr.append('<input type="submit" value="{verb}"/>'.format(verb=self.StrFormatSmart(exit['verb'])))
lStr.append('</form>')
return lStr
def RenderRoomCur(self, sid, handler):
"""Renders the current room, with appropriate settings, etc., to the given handler"""
# TODO should cache contents for reload scenarios...maybe? maybe skip adjust if we find a reload?
room = self.RoomCur()
lStr = []
lStr.append('<html>')
lStr.append('<head>')
lStr.append('<title>{name}</title>'.format(name=room.m_name))
lStr.append('</head>')
lStr.append('<body>')
lStr.append('<h1>{name}</h1>'.format(name=room.m_name))
# Note that we pass the var/val dictionary here for formatting purposes in case the
# description wants to include things about current session state
# HINT: if we make a Desc() function on the room, we can make it be smart about returning
# text for regular rooms and the right divs and such for grids
lStr.append('<p>{desc}</p>'.format(desc=self.StrFormatSmart(room.m_desc)))
for exit in room.LExit():
lStr.extend(self.LStrTryAddExit(exit, sid))
# TODO add generic links for logout, about, any others here
lStr.append('</body>')
lStr.append('</html>')
abOut = '\n'.join(lStr).encode()
handler.send_response(200)
handler.send_header('Content-Length', len(abOut))
handler.end_headers()
handler.wfile.write(abOut)
# provide debug output for what's going on
# HINT: should be able to make a fairly simple adjustment to this to show the type of room in addition
# to its name
handler.log_message("Rendered room '{name}'".format(name=room.m_name))
class Group:
"""All of the sessions known by the system"""
def __init__(self):
self.m_mpUidSession = {}
self.m_pathDir = None
def Load(self, pathDir):
"""load all files from the directory, assuming they're sessions"""
self.m_pathDir = pathDir
for path in glob.glob("{p}/*".format(p=pathDir)):
session = Session()
session.Load(path)
strErrors = session.StrErrors()
if strErrors:
print("Session from {p} had errors:\n{e}".format(p=path, e=strErrors))
elif session.m_uid in self.m_mpUidSession:
print("Session {u} defined multiply (new {pNew}, prev {pOld})".format(
u=session.m_uid,
pNew=path,
pOld=self.m_mpUidSession[session.m_uid].m_path))
else:
self.m_mpUidSession[session.m_uid] = session
def InitRooms(self, rooms):
"""initialize actual room references for each session (typically after loading)"""
for session in self.m_mpUidSession.values():
room = rooms.Room(session.m_roomSaved)
session.SetRoomCur(room)
def SessionFromUid(self, uid):
return self.m_mpUidSession.get(uid, None)
def SessionCreate(self):
"""Generate untracked "blank" session"""
return Session()
def LSession(self):
"""Return list (or generator) of sessions in the group"""
return self.m_mpUidSession.values()
def AddSession(self, session):
"""Adds the given session to the group"""
self.m_mpUidSession[session.m_uid] = session
if __name__ == '__main__':
# test driver for session stuff
group = Group()
group.Load('sampleSessions')
print("Finished loading sample sessions; errors will be listed above if any")
| python |
England’s cricket team arrived in Pakistan early Sunday to play three Tests for the first time in the country since 2005.
England played a successful Twenty20 series two months ago in Pakistan but have declined to play a Test match there for 17 years because of the precarious security situation.
They were due to visit Pakistan last year but pulled out after New Zealand abandoned their tour minutes before the first one-day international, citing security alerts.
There were fears of a similar pull out earlier this month following an attack on former prime minister Imran Khan during a protest march in Wazirabad, a city in Punjab province.
But England’s Test skipper Ben Stokes quashed all fears following a positive security advice.
“It’s been a long time since England have played Test cricket in Pakistan," Stokes said in Abu Dhabi on Friday.
“With what happened with Imran Khan recently, there was a little bit of concern, but we have Reg Dickason, who has been the security man for many years with England, and we left it in his capable hands. "
“In terms of the tour itself, I’m really looking forward to it," Stokes added.
“I’ve never been there, and I’m quite interested to see what the security lark is like. I’ve heard it’s pretty intense. "
The squad and support staff were whisked to the team hotel under heavy security which Pakistan has been putting in place since the revival of international cricket in the country since 2015.
Pakistan were forced to play their home matches on the neutral venues of the United Arab Emirates following attacks on the Sri Lankan team in 2009.
But Pakistan have hosted multiple teams in the last seven years, the most notable being Australia earlier this year.
The three-match series — part of the World Test championship — starts in Rawalpindi from December 1 with the second Test in Multan (December 9-13) and the third in Karachi (December 17-21).
Pakistan, currently fifth in the nine team championship to England’s seventh, will hope for a series win in order to finish in the top two to play the 2023 final.
Pakistan, led by star batter Babar Azam, will be without key fast bowler Shaheen Shah Afridi who is nursing a knee injury and experienced leg-spinner Yasir Shah, not selected due to poor form.
England fast bowler Mark Wood is in doubt for the first Test with a hip injury while experienced James Anderson, the only survivor of the 2005 tour but did not figure in the 2-0 series defeat, will lead the attack.
Ben Stokes (capt), James Anderson, Harry Brook, Zak Crawley, Ben Duckett, Ben Foakes, Will Jacks, Keaton Jennings, Jack Leach, Liam Livingstone, Jamie Overton, Ollie Pope, Ollie Robinson, Joe Root, Mark Wood, Rehan Ahmed.
Get the latest Cricket News, Schedule and Cricket Live Scores here(This story has not been edited by News18 staff and is published from a syndicated news agency feed - AFP) | english |
Rohit Jain, MD, Lionsgate South Asia, said the Indian SVOD market has 50–60 million paying subscribers, and the number of such customers is expected to rise to 75–80 million in the coming years.
He also claimed that Lionsgate Play would be among the top five non-broadcaster-owned OTT platforms in the country in terms of both subscribers and revenue. "We identify ourselves as a premium and targeted SVOD platform," he added.
Jain revealed that the SVOD platform's average revenue per user (ARPU) is a little over 50 cents (about Rs 41), while the average viewing time per user is 85 to 90 minutes.
"Our large screen consumption (connected TV) is 50%, whereas the industry average is 20–25%," he said. Lionsgate Play intends to premiere at least one title in a week.
Lionsgate Play is targeted at young urban audiences. It has built its content strategy on three key pillars – global titles, Indian titles, and local original shows.
In order to expand the reach of its international content, the platform dubs them in six Indian languages. On the original content side, the game plan is to do premium, large-scale format shows with A-listers from the entertainment industry.
"In the last two years, we have done more than 100 premieres of global titles. Next two years, we aim to do 150 premieres. We have done five Indian originals this year and intend to do six to 10 originals in a year," Jain said.
Its distribution strategy has been to reach audiences through partnerships with telecom operators, broadband players, original equipment manufacturers (OEMs), and OTT aggregators like Prime Video Channels and Tata Play Binge.
"Our primary focus is to reach customers in a way that's convenient to them. Figuring out the economics is back-end work," he said.
Lionsgate Play has big ambitions for the Indian market in the next two years. According to Jain, the platform will be revamped next year to give it a new look and feel.
Lionsgate India recently unveiled an aggressive slate of films for theatrical release in 2023. The movie slate includes John Wick: Chapter 4, Golda, Plane, Bricklayer, About My Father, White Bird: A Wonder Story, and The Hunger Games: The Ballad of Songbirds & Snakes.
"Next year is going to be the biggest year for Lionsgate India as far as theatrical releases are concerned," Jain said.
| english |
New American Bible (Revised Edition)
10 So Baruch read the words of Jeremiah from the scroll in the room of Gemariah,[a] son of the scribe Shaphan, in the upper court of the Lord’s house, at the entrance of the New Temple Gate, in the hearing of all the people.
- 36:10 Gemariah: member of a family friendly to Jeremiah with rights to a room in the gateway fortress overlooking the court of the Temple. His father Shaphan had been Josiah’s secretary of state (2 Kgs 22:3). From a window in this room Baruch read Jeremiah’s scroll to the people.
- 36:12 The scribe’s chamber: the office of the royal secretary.
Scripture texts, prefaces, introductions, footnotes and cross references used in this work are taken from the New American Bible, revised edition © 2010, 1991, 1986, 1970 Confraternity of Christian Doctrine, Inc., Washington, DC All Rights Reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the copyright owner.
| english |
With just five days to go for the festivities to begin, Delhi chief secretary Vijay Dev issued the order on Sunday in which the DDMA also lifted the ban on gatherings and large congregations for the first time since the nationwide lockdown was imposed on March 25.
The Delhi Disaster Management Authority (DDMA) on Sunday allowed Navratri and Durga Puja functions to be organised in the national Capital with limited attendees, even as it prohibited all kinds of fairs (melas), food stalls, exhibitions, rallies and processions till October 31.
However, despite the order some of the biggest and oldest Ramlila committees in Delhi have decided to skip organising any event this year, a first for them in several decades.
With just five days to go for the festivities to begin, Delhi chief secretary Vijay Dev issued the order on Sunday in which the DDMA also lifted the ban on gatherings and large congregations for the first time since the nationwide lockdown was imposed on March 25.
“It may be noted that the restriction on gatherings and large congregations…. stands withdrawn only to the extent of allowing gatherings /congregations for celebration of upcoming festivals till 31st October, 2020 only,” read the order.
It stated that apart from the statutory permissions that need to be taken every year, this time owing to Covid-19, every organiser will have to take permission from the district magistrate. Delhi has 11 districts.
Revenue minister Kailash Gahlot, who is a member of the DDMA, said the permission to allow Ramlila and Durga Puja functions has been decentralised this time with the power being given to each distirct administration to decide which ones should be allowed.
“The organiser will have to apply to the DM. After the application is received, a team of district officials including those from the Delhi police and the municipal corporation concerned will inspect the venue. Parameters such as area and the number of visitors allowed inside at a time will be decided based on the inspection. Spaces which are too small may not be granted permission owing to social distancing norms,” said the minister.
A senior revenue official said that it is likely that this time the number of functions that are held across the city would be far lesser than previous years. “A nodal officer has to be appointed by the DM for each function. In case of any violation, the permission granted to an organiser will be immediately withdrawn for the subsequent days. Videography of each pandal or venue will be a must and a soft copy of each day’s function will have to be submitted to the DM’s office, which in turn will be sent to the chief secretary,” said the official on condition of anonymity.
Arjun Kumar, general secretary of Lav Kush Ramlila Committee which organises an 11-day event every year at the historic Red Fort said they are pulling out of the festivity this year.
“This is the first time in 40 years that Lav Kush Ramlila will not happen this time. Usually we get the permission for the land from the Archaeological Survey of India around 60 days before the start of the event. The first day of Navratra this time is Saturday, October 17. But, Union culture minister Prahlad Singh Patel himself is getting treated for Covid, so our file is stuck. Also, our Ramlila plays involve 250 artistes who do each others make-up which means coming close to each other. If by chance anyone gets the infection, all the effort of making the arrangements for 11 days will go in vain because the venue will be sealed for sanitisation,” Kumar said.
Ravi Jain, press secretary of Shri Dharmik Leela Committee also said they won’t be organising any function this year as did 11 other committees in Rohini alone.
While Navratra will begin from October 17 to 25 (Dusshera), Durga Puja will be celebrated from October 22 to 26.
Swapan Ganguly, general secretary of New Delhi Kali Bari, one of the oldest Durga Puja organisers in the city, said for the first time they will not offer bhog on site. “In a first, we will home deliver Durga Ma’s blessings to whoever gives donation for the bhog. Other visitors who insist on getting the bhog will have to make a nominal payment this time and will be given the ‘prasad’ in packed boxes as they exit the pandal,” he said.
Ganguly said as per the order issued by the DDMA, they too have planned separate entry and exit with sanitising tunnels for visitors. “We are creating a proper route for visitors coming to see the Durga idol. Also, there will be no stage performances or food stalls this time,” he said. | english |
<reponame>saranshbht/bsc-codes
import numpy as np
import os
x = np.arange(12).reshape(4, 3)
print("Original array:")
print(x)
header = 'col1 col2 col3'
np.savetxt('temp.txt', x, fmt="%d", header=header)
print("After loading, content of the text file:")
result = np.loadtxt('temp.txt')
print(result) | python |
<filename>Templates/HoverNavbar/style.css
.brand img{
height:90px;
width :85px;
border-radius: 50%;
}
.brand{
display: flex;
margin-top: 35px;
}
.brand h1{
font-family:'Times New Roman', Times, serif;
margin: 15px;
margin-top: 30px ;
}.navbar{
display: flex;
}
.from ul {
list-style: none;
text-align: center;
display: inline-block;
font-size: 20px;
margin-bottom: 20px;
}
.from {
display: inline-block;
text-align: center;
position: relative;
margin-top: 20px;
margin-left: 380px;
align-items: center;
font-weight: 200;
color: rgb(15, 15, 15);
margin-bottom: 60px;
}
.from a{
text-decoration: none;
}
.from li {
cursor: pointer;
position: relative;
float: left;
letter-spacing: 1px;
width: 200px;
height: 50px;
line-height: 50px;
font-size: 20px;
font-weight: 200;
}
.drop {
position: absolute;
top: 100%;
left: 0%;
width: 100%;
padding: 0%;
}
.drop li {
display: none;
}
.from li:hover .drop li {
display: block;
}
.drop a {
text-decoration: none;
color: black;
}
.menu-btn i{
color: aliceblue;
font-size: 22px;
cursor: pointer;
display: none;
}
input[type="checkbox"]{
display: none;
}
| css |
<filename>src/utils.ts
import { log, BigInt, BigDecimal, Address } from '@graphprotocol/graph-ts'
import { Perpetual, LiquidityPool, PriceBucket, User, MarginAccount, LiquidityAccount, VoteAccount, Governor } from '../generated/schema'
import { ERC20 as ERC20Contract } from '../generated/Factory/ERC20'
import { Oracle as OracleContract } from '../generated/Factory/Oracle'
import { USDTokens, CertifiedPools, ETH_ADDRESS, BTC_ADDRESS } from './const'
export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000'
export let ZERO_BI = BigInt.fromI32(0)
export let ONE_BI = BigInt.fromI32(1)
export let ZERO_BD = BigDecimal.fromString('0')
export let ONE_BD = BigDecimal.fromString('1')
export let BI_18 = BigInt.fromI32(18)
export let OPERATOR_EXP = BigInt.fromI32(10*24*60*60)
export const FACTORY = "mcdex"
export enum PerpetualState {
INVALID, INITIALIZING, NORMAL, EMERGENCY, CLEARED
}
export enum TradeType {
NORMAL, LIQUIDATEBYAMM, LIQUIDATEBYTRADER
}
export enum LiquidityType {
ADD, REMOVE
}
export function isUSDToken(collateral: string): boolean {
for (let i = 0; i < USDTokens.length; i++) {
if (collateral == USDTokens[i]) {
return true
}
}
return false
}
export function isCollateralAdded(collaterals: string[], collateral: string): boolean {
for (let i = 0; i < collaterals.length; i++) {
if (collateral == collaterals[i]) {
return true
}
}
return false
}
export function isLiquidityPool(pools: string[], address: string): boolean {
for (let i = 0; i < pools.length; i++) {
if (address == pools[i]) {
return true
}
}
return false
}
export function fetchUser(address: Address): User {
let user = User.load(address.toHexString())
if (user === null) {
user = new User(address.toHexString())
user.save()
}
return user as User
}
export function fetchPerpetual(liquidityPool: LiquidityPool, perpetualIndex: BigInt): Perpetual {
let id = liquidityPool.id.concat('-').concat(perpetualIndex.toString())
let perp = Perpetual.load(id)
if (perp === null) {
perp = new Perpetual(id)
perp.index = perpetualIndex
perp.oracleAddress = ''
perp.collateralName = liquidityPool.collateralName
perp.collateralAddress = liquidityPool.collateralAddress
perp.operatorAddress = ''
perp.factory = liquidityPool.factory
perp.liquidityPool = liquidityPool.id
perp.underlying = ''
perp.symbol = ''
perp.oldSymbol = ''
perp.totalVolumeUSD = ZERO_BD
perp.totalVolume = ZERO_BD
perp.totalFee = ZERO_BD
perp.txCount = ZERO_BI
perp.liqCount = ZERO_BI
perp.position = ZERO_BD
perp.openInterest = ZERO_BD
perp.lastPrice = ZERO_BD
perp.lastMarkPrice = ZERO_BD
perp.beforeLastMarkPrice = ZERO_BD
perp.lastUnitAcc = ZERO_BD
perp.unitAccumulativeFunding = ZERO_BD
perp.lpFee = ZERO_BD
perp.lpFunding = ZERO_BD
perp.lpTotalPNL = ZERO_BD
perp.lpPositionPNL = ZERO_BD
perp.lpPenalty = ZERO_BD
perp.byAmmKeepers = []
if (liquidityPool.isRun) {
perp.state = PerpetualState.NORMAL
perp.isRun = true
} else {
perp.state = PerpetualState.INITIALIZING
perp.isRun = false
}
perp.createdAtTimestamp = ZERO_BI
perp.createdAtBlockNumber = ZERO_BI
perp.save()
// update pool perpetualIDs
let perpetualIDs = liquidityPool.perpetualIDs as string[]
perpetualIDs.push(id)
liquidityPool.perpetualIDs = perpetualIDs
liquidityPool.save()
}
return perp as Perpetual
}
export function fetchMarginAccount(user: User, perpetual: Perpetual): MarginAccount {
let id = perpetual.id.concat('-').concat(user.id)
let account = MarginAccount.load(id)
if (account === null) {
account = new MarginAccount(id)
account.user = user.id
account.perpetual = perpetual.id
account.position = ZERO_BD
account.entryValue = ZERO_BD
account.entryFunding = ZERO_BD
account.save()
}
return account as MarginAccount
}
export function fetchLiquidityAccount(user: User, liquidityPool: LiquidityPool): LiquidityAccount {
let id = liquidityPool.id.concat('-').concat(user.id)
let account = LiquidityAccount.load(id)
if (account === null) {
account = new LiquidityAccount(id)
account.user = user.id
account.liquidityPool = liquidityPool.id
account.shareAmount = ZERO_BD
account.entryCollateralAmount = ZERO_BD
account.entryPoolMargin = ZERO_BD
account.save()
}
return account as LiquidityAccount
}
export function fetchVoteAccount(user: User, governor: Governor): VoteAccount {
let id = governor.id.concat('-').concat(user.id)
let account = VoteAccount.load(id)
if (account === null) {
account = new VoteAccount(id)
account.user = user.id
account.governor = governor.id
account.votes = ZERO_BD
account.reward = ZERO_BD
account.save()
}
return account as VoteAccount
}
export function exponentToBigDecimal(decimals: BigInt): BigDecimal {
let bd = BigDecimal.fromString('1')
for (let i = ZERO_BI; i.lt(decimals as BigInt); i = i.plus(ONE_BI)) {
bd = bd.times(BigDecimal.fromString('10'))
}
return bd
}
export function convertToDecimal(amount: BigInt, decimals: BigInt): BigDecimal {
if (decimals == ZERO_BI) {
return amount.toBigDecimal()
}
return amount.toBigDecimal().div(exponentToBigDecimal(decimals))
}
export function AbsBigDecimal(x: BigDecimal): BigDecimal {
if (x >= ZERO_BD) {
return x
}
return -x
}
export function NegBigDecimal(x: BigDecimal): BigDecimal {
return -x
}
export function hasSameSign(x: BigDecimal, y: BigDecimal): boolean {
if (x==ZERO_BD || y==ZERO_BD) {
return true
}
if (x > ZERO_BD && y > ZERO_BD) {
return true
}
if (x < ZERO_BD && y < ZERO_BD) {
return true
}
return false
}
export function splitCloseAmount(amount: BigDecimal, delta: BigDecimal): BigDecimal {
if (hasSameSign(amount, delta)) {
return ZERO_BD
} else if (AbsBigDecimal(amount) >= AbsBigDecimal(delta)) {
return delta
} else {
return -amount
}
}
export function splitOpenAmount(amount: BigDecimal, delta: BigDecimal): BigDecimal {
if (hasSameSign(amount, delta)) {
return delta
} else if (AbsBigDecimal(amount) >= AbsBigDecimal(delta)) {
return ZERO_BD
} else {
return amount+delta
}
}
export function fetchCollateralSymbol(address: Address): string {
let contract = ERC20Contract.bind(address)
let collateral = ''
let result = contract.try_symbol()
if (!result.reverted) {
collateral = result.value
}
return collateral
}
export function fetchOracleUnderlying(address: Address): string {
let contract = OracleContract.bind(address)
let underlying = ''
let result = contract.try_underlyingAsset()
if (!result.reverted) {
underlying = result.value
}
return underlying
}
export function setETHPrice(price: BigDecimal, timestamp: BigInt): void {
let priceBucket = PriceBucket.load(ETH_ADDRESS)
if (priceBucket == null) {
priceBucket = new PriceBucket(ETH_ADDRESS)
}
priceBucket.price = price
priceBucket.timestamp = timestamp.toI32()
priceBucket.save()
}
export function setBTCPrice(price: BigDecimal, timestamp: BigInt): void {
let priceBucket = PriceBucket.load(BTC_ADDRESS)
if (priceBucket == null) {
priceBucket = new PriceBucket(BTC_ADDRESS)
}
priceBucket.price = price
priceBucket.timestamp = timestamp.toI32()
priceBucket.save()
}
export function getTokenPrice(token: string): BigDecimal {
if (isUSDToken(token)) {
return ONE_BD
}
let priceBucket = PriceBucket.load(token)
if (priceBucket == null) {
return ZERO_BD
}
return priceBucket.price
}
export function getPoolName(pool: string): string {
if (CertifiedPools.isSet(pool)) {
return CertifiedPools.get(pool) as string
}
return ""
}
| typescript |
<reponame>jpkarlsberg/original-sacred-harp-containing-a<gh_stars>0
---
annotation_id: 24bb5857-7efc-4209-b688-bd483db07bf2
author: rdunn5
tei_target: "#range(#highlight-start-24bb5857-7efc-4209-b688-bd483db07bf2, #highlight-end-24bb5857-7efc-4209-b688-bd483db07bf2)"
annotated_page: rdx_r8t1x.p.idm9536
page_index: 55
target: highlight-start-24bb5857-7efc-4209-b688-bd483db07bf2
tags:
- difference
end_target: highlight-end-24bb5857-7efc-4209-b688-bd483db07bf2
---
Reads "thy" in the 1870 *Sacred Harp*. | markdown |
<filename>qubovert/utils/_pubomatrix.py
# Copyright 2020 <NAME>
#
# 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.
"""_pubomatrix.py.
This file contains the PUBOMatrix object.
"""
from . import (
DictArithmetic, ordering_key,
pubo_value, solve_pubo_bruteforce
)
__all__ = 'PUBOMatrix',
class PUBOMatrix(DictArithmetic):
"""PUBOMatrix.
``PUBOMatrix`` inherits some methods from ``DictArithmetic``, see
``help(qubovert.utils.DictArithmetic)``.
A class to handle PUBO matrices. It is the same thing as a dictionary
with some methods modified. Note that each key must be a tuple of integers
>= 0.
Note that below we only consider keys that are of length 1 or 2, but they
can in general be arbitrarily long! See ``qubovert.utils.QUBOMatrix``
for an object that restricts the length to <= 2.
One method is that values will always default to 0. Consider the following
example:
>>> d = PUBOMatrix()
>>> print(d[(0,)]) # will print 0
>>> d[(0,)] += 1
>>> print(d) # will print {(0,): 1}
Compared to an ordinary dictionary.
>>> g = dict()
>>> print(g[(0,)]) # will raise KeyError
>>> g[(0,)] += 1 # will raise KeyError, since (0,) was never set
One method of PUBOMatrix is that it will always keep the PUBO
upper triangular! Consider the following example:
>>> d = PUBOMatrix()
>>> d[(1, 0)] += 2
>>> print(d)
>>> # will print {(0, 1): 2}
One method is that if we set an item to 0, it will be removed. Consider
the following example:
>>> d = PUBOMatrix()
>>> d[(0,)] += 1
>>> d[(0,)] -= 1
>>> print(d) # will print {}
One method is that if we initialize PUBOMatrix with a previous dictionary
it will be reinitialized to ensure that the PUBOMatrix is upper
triangular and contains no zero values. Consider the following example:
>>> d = PUBOMatrix({(0, 0): 1, (1, 0): 2, (2, 0): 0, (2, 0, 1): 1})
>>> print(d) # will print {(0,): 1, (0, 1): 2, (0, 1, 2): 1}
We also change the update method so that it follows all the conventions.
>>> d = PUBOMatrix({(0, 0): 1, (0, 1): 2})
>>> d.update({(0,): 0, (1, 0): 1, (1, 2): -1})
>>> print(d) # will print {(0, 1): 1, (1, 2): -1}
We also include arithmetic, addition, subtraction, scalar division,
multiplication, and all those in place. For example,
>>> d = PUBOMatrix({(0, 0): 1, (0, 1): -2})
>>> g = d + {(0,): -1}
>>> print(g) # will print {(0, 1): -2}
>>> g *= 4
>>> print(g) # will print {(0, 1): -8}
>>> g -= {(0, 1): -8}
>>> print(g) # will print {}
>>> d = PUBOMatrix({(0, 0): 1, (0, 1): -1})
>>> g = {(0,): -1, (2,): 1}
>>> d *= g
>>> print(d)
{(0,): -1, (0, 2): 1, (0, 1): 1, (0, 1, 2): -1}
>>> d = PUBOMatrix({(0, 0): 1, (0, 1): -1})
>>> print(d ** 2 == d * d)
True
Adding or subtracting constants will update the () element of the
dict.
>>> d = PUBOMatrix()
>>> d += 5
>>> print(d)
{(): 5}
Finally, if you try to access a key out of order, it will sort the key. Be
careful with this, it can cause unexpected behavior if you don't know it.
For example,
>>> d = PUBOMatrix()
>>> d[(0, 1)] += 2
>>> print(d[(1, 0)]) # will print 2
>>> d = PUBOMatrix()
>>> d[(0, 0)] += 2
>>> print(d[(0,)]) # will print 2
>>> d = PUBOMatrix()
>>> d[(0, 0, 3, 2, 2)] += 2
>>> print(d) # will print {(0, 2, 3): 2}
>>> print(d[(0, 3, 2)]) # will print 2
"""
def __init__(self, *args, **kwargs):
"""__init__.
This class deals with Binary Optimization matrices. See child classes
or ``qubovert.utils.DictArithmetic`` for details on the inputs.
Parameters
----------
arguments : parameters.
Defined in child classes or in ``qubovert.utils.DictArithmetic``.
"""
self._degree = -float("inf")
self._variables, self._num_binary_variables = set(), 0
super().__init__(*args, **kwargs)
def refresh(self):
"""refresh.
For efficiency, the internal variables for ``degree``,
``num_binary_variables``, ``max_index`` are computed as the dictionary
is being built (and in subclasses such as ``qubovert.PUBO``, properties
such as ``mapping`` and ``reverse_mapping``). This can cause these
values to be wrong for some specific situations. Calling ``refresh``
will rebuild the dictionary, resetting all of the values.
Examples
--------
>>> from qubovert.utils import PUBOMatrix
>>> P = PUBOMatrix()
>>> P[(0,)] += 1
>>> P, P.degree, P.num_binary_variables
{(0,): 1}, 1, 1
>>> P[(0,)] -= 1
>>> P, P.degree, P.num_binary_variables
{}, 1, 1
>>> P.refresh()
>>> P, P.degree, P.num_binary_variables
{}, 0, 0
>>> from qubovert import PUBO
>>> P = PUBO()
>>> P[('a',)] += 1
>>> P, P.mapping, P.reverse_mapping
{('a',): 1}, {'a': 0}, {0: 'a'}
>>> P[('a',)] -= 1
>>> P, P.mapping, P.reverse_mapping
{}, {'a': 0}, {0: 'a'}
>>> P.refresh()
>>> P, P.mapping, P.reverse_mapping
{}, {}, {}
"""
d = self.copy()
super().clear()
self.__init__(d)
def clear(self):
"""clear.
For efficiency, the internal variables for ``degree``,
``num_binary_variables``, ``max_index`` are computed as the dictionary
is being built (and in subclasses such as ``qubovert.PUBO``, properties
such as ``mapping`` and ``reverse_mapping``). This can cause these
values to be wrong for some specific situations. Thus, when we clear,
we also need to reset all of these cached values. This function
remove all the elments from ``self`` and resets the cached values.
"""
super().clear()
self.__init__()
@property
def degree(self):
"""degree.
Return the degree of the problem.
Return
------
deg : int.
"""
return self._degree
@property
def variables(self):
"""variables.
Return a set of all the variables in the dict.
Returns
-------
res : set.
"""
return self._variables.copy()
@property
def offset(self):
"""offset.
Get the part that does not depend on any variables. Ie the value
corresponding to the () key.
Returns
-------
offset : float.
"""
return self[()]
@property
def num_binary_variables(self):
"""num_binary_variables.
Return the number of binary variables in the problem.
Return
------
n : int.
Number of binary variables in the problem.
"""
return self._num_binary_variables
@property
def max_index(self):
"""max_index.
Returns the maximum label index of the problem. If the problem is
labeled with integers from 0 to ``n-1``, then ``max_index`` will give
the same result as ``num_binary_variables - 1``.
Return
------
n : int or None.
Max label index of the problem dictionary. If the dict is empty,
then this returns None.
"""
return max(self._variables) if self._variables else None
@classmethod
def squash_key(cls, key):
"""squash_key.
Will convert the input key into the standard form for PUBOMatrix /
QUBOMatrix. It will get rid of duplicates and sort. This method
will check to see if the input key is valid.
Parameters
----------
key : tuple of integers.
Return
------
k : tuple of integers.
A sorted and squashed version of ``key``.
Raises
------
KeyError if the key is invalid.
Example
-------
>>> squash_key((0, 4, 0, 3, 3, 2))
>>> (0, 2, 3, 4)
"""
# if f is not None, then it is the squashed key (see QUBOMatrix)
f = cls._check_key_valid(key)
# use ordering_key here because in subclasses x may not always
# be an int.
return f or tuple(sorted(set(key), key=ordering_key))
@staticmethod
def _check_key_valid(key):
"""_check_key_valid.
Internal method to check if an input key to the dictionary is valid.
Checks to see if ``key`` is a tuple of non negative integers.
Parameters
----------
key : anything, but must be a tuple to be valid.
Returns
-------
None.
Raises
------
KeyError if the key is invalid.
"""
incorrect_format = (
not isinstance(key, tuple) or
any(not isinstance(k, int) or k < 0 for k in key)
)
if incorrect_format:
raise KeyError(
"Key formatted incorrectly, must be tuple of non negative "
"integers")
def __getitem__(self, key):
"""__getitem__.
Overrides the dict.__getitem__ command so that a KeyError is not
thrown if `key` is not in the dictionary. The key will also be
reformatted according to ``squash_key`` before indexing.
Parameters
----------
key : tuple of integers.
Element of the dictionary.
Return
------
value : numeric
the value corresponding to the key if the key is in the dictionary,
otherwise returns 0.
"""
return super().__getitem__(self.__class__.squash_key(key))
def __setitem__(self, key, value):
"""__setitem__.
Overrides the dict.__setitem__ command. If `value` is equal to 0, then
the key will be removed from the dictionary. Thus no elements will ever
have zero value. Additionally, this method will keep self upper
triangular, so if key[0] > key[1], then we will call
``__setitem__((key[1], key[0]), value)``. Finally, keys
will be squashed, see ``squash_keys``.
Parameters
----------
key : tuple of integers.
Element of the dictionary.
value : numeric.
Value corresponding to the key.
"""
k = self.__class__.squash_key(key)
if value:
self._degree = max(self._degree, len(k))
for i in filter(lambda x: x not in self._variables, k):
self._variables.add(i)
self._num_binary_variables += 1
super().__setitem__(k, value)
def is_solution_valid(self, solution):
"""is_solution_valid.
Included for consistency with other problem classes. Always returns
True since this is an unconstrainted problem.
Parameters
----------
solution : iterable or dict.
Return
------
valid : bool.
Always returns True.
"""
return True
def solve_bruteforce(self, all_solutions=False):
"""solve_bruteforce.
Solve the problem bruteforce. THIS SHOULD NOT BE USED FOR LARGE
PROBLEMS! This is the exact same as calling
``qubovert.utils.solve_pubo_bruteforce(
self, all_solutions, self.is_solution_valid)[1]``.
Parameters
----------
all_solutions : bool.
See the description of the ``all_solutions`` parameter in
``qubovert.utils.solve_pubo_bruteforce``.
Return
------
res : the second element of the two element tuple that is returned from
``qubovert.utils.solve_pubo_bruteforce``.
"""
return solve_pubo_bruteforce(self,
all_solutions, self.is_solution_valid)[1]
def value(self, x):
r"""value.
Find the value of
:math:`\sum_{i,...,j} P_{i...j} x_{i} ... x_{j}`. Calling
``self.value(x)`` is the same as calling
``qubovert.utils.pubo_value(x, self)``.
Parameters
----------
x : dict or iterable.
Maps boolean variable indices to their boolean values, 0 or 1. Ie
``x[i]`` must be the boolean value of variable i.
Return
------
value : float.
The value of the PUBO with the given assignment `x`. Ie
Example
-------
>>> from qubovert.utils import QUBOMatrix, PUBOMatrix
>>> from qubovert import QUBO, PUBO
>>> P = PUBOMatrix({(0, 0): 1, (0, 1): -1})
>>> x = {0: 1, 1: 0}
>>> P.value(x)
1
>>> Q = QUBOMatrix({(0, 0): 1, (0, 1): -1})
>>> x = {0: 1, 1: 0}
>>> Q.value(x)
1
>>> P = PUBO({(0, 0): 1, (0, 1): -1})
>>> x = {0: 1, 1: 0}
>>> P.value(x)
1
>>> Q = QUBO({(0, 0): 1, (0, 1): -1})
>>> x = {0: 1, 1: 0}
>>> Q.value(x)
1
"""
return pubo_value(x, self)
| python |
<filename>package.json
{
"name": "cloud-foxy",
"version": "0.0.4",
"author": "<NAME> <<EMAIL>>",
"license": "MIT",
"main": "src/cli.js",
"scripts": {
"start": "node src/cli.js"
},
"bin": {
"cloud-foxy": "src/cli.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/JSeed/cloud-foxy.git"
},
"dependencies": {
"inquirer": "^7.0.0",
"inquirer-autocomplete-prompt": "^1.0.1"
}
}
| json |
Stok Palace is where the royal family of Ladakh resides permanently. This magnificent structure commands a view over the village of Stok. Painted in the archetypal off-white with traditional windows, it has been beautifully carved and colourfully painted pillars and doorways, leading into the palace. It lends itself to natural simplicity with its earthy palette of colours. The entrance of the palace has inscriptions in the Lansa Script, and to the forefront is a huge stone courtyard enclosed with walls and seating arrangements to one side. Hand painted ethnic doors are present all over the palace. The courtyard has a huge 'dhwaja' or flag installed in the centre. The palace is famous for the collection of ancient and valuable objects of the Ladakhi heritage - like utensils, clothes, jewellery, weapons and currencies - that it houses in the royal families personal museum.
| english |
<gh_stars>0
$(document).ready(function(){
$("#filter").keyup(function () {
var words = this.value.toLowerCase().split(" ");
var tabIdx = $("ul li.ui-state-active").index();
var tableId = "collectionsTab";
if (tabIdx == 1)
tableId = "loadedFormsTab";
var table = document.getElementById(tableId);
var ele;
for (var r = 1; r < table.rows.length; r++){
ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");
var displayStyle = 'none';
for (var i = 0; i < words.length; i++) {
if (ele.toLowerCase().indexOf(words[i])>=0)
displayStyle = '';
else {
displayStyle = 'none';
break;
}
}
//In Collection View tab, we only show parent rows
if (tabIdx == 0 && table.rows[r].id.indexOf("child")>=0)
displayStyle = 'none';
//Always keep the row with buttons
if (table.rows[r].id == 'buttonRow')
displayStyle = '';
table.rows[r].style.display = displayStyle;
}
});
});
| javascript |
Neither a candidate, nor a key position holder, still Yousuf Shariff alias KGF Babu, seated in his palatial house on Bengaluru’s Millers Road, has been busy meeting Congress workers.
Reason? Shariff has released a manifesto declaring himself as an “aspirant” for the Chickpet Assembly seat from the Congress. He plans to spend close to Rs 350 crore from his personal funds to provide Rs 5,000 to each household in the constituency as part of his education and welfare scheme for five years (2022-2027).
Post this announcement, he has been having a lot of meetings at his residence, seeking advice on his ‘cheque distribution’ drive.
“I am not distributing money with elections in mind. I want to help the people of Chickpet, the place where I have grown up. I want to give back to society. I have been doing social service for several years. You are seeing me now, but my work began several years ago,” Shariff told News18.
The Congressman shot to fame when he declared Rs 1,743-crore assets in his MLC election affidavit for the Bengaluru Urban seat in 2021. He became the richest politician in Karnataka and trumped Karnataka’s Minister for Small Scale Industries and Municipal Administration MTB Nagaraj who had declared assets to the tune of Rs 1,200 crore. Nagaraj was among the Congressmen who jumped ship to the Bharatiya Janata Party (BJP) to help B S Yediyurappa come back to power. Shariff lost the MLC election by 397 votes.
While KGF Babu has picked the constituency himself, he has sought permission from the Congress high command to “vide an official party communique to go ahead with this educational/scholarship/societal welfare programme under the Congress banner”.
When asked whether the high command has approved his move, Shariff believes that he will be granted permission before August 31, the date he has set for his donation drive. As per his manifesto, Shariff will distribute a cheque of Rs 5,000 each to 50,000 families in Chickpet.
“My plan is to provide Rs 5,000 to every home in the area for their child/children’s education. Families whose children are studying in primary or secondary sections will be given this scholarship. So for 50,000 families, the budget will be around Rs 125 crore for five years. Another Rs 5,000 will be given to pre-university students. This will help around 5,000 students. I have allotted Rs 7. 5 crore for it,” Shariff said, giving a break-up of his campaign.
He added that he has a plan to build multi-storey flats for slum dwellers in the area at a cost of Rs 180 crore. It will have facilities, including lifts and standard civic amenities.
“I can take this up only if the slum dwellers are ready to provide their land to me. I can assure you each family will be a beneficiary of a flat built a cost of Rs 6 lakh, which I will take up through my charitable foundation,” the leader said.
Shariff claimed that he had carried out a similar exercise in Kolar, his birthplace, where more than 25,000 families benefitted from his donation.
“I had plans to spend around Rs 100 crore on this noble cause. But after meeting my friends and party workers in Chickpet, the amount kept increasing. Now, I will be spending around Rs 350 crore. How much does a man need? When we die, what do we take with us? Nothing. I have secured the future of my children, now it’s time for my people,” he said.
Belonging to the area of Kolar Gold Fields (KGF), Shariff earned the moniker of ‘KGF Babu’. He is also called ‘Scrap Babu’, as he had been a scrap dealer until he forayed into real estate.
The eldest among 14 siblings, Shariff said his family lived in abject poverty. His father took to driving an autorickshaw after their family bakery business ran into losses. He said there were days when their family managed with just one meal.
Soon, he decided to take matters in his hands. Having spent most of his growing years in Kolar Gold Fields, he began working as scrap dealer associate with the Bharat Gold Mines, which was engaged in gold excavation in KGF. His business took off and he soon began dealing in land not just in Kolar, but also in Bengaluru city. In 2021, Shariff declared movable assets worth Rs 100 crore and immovable properties worth Rs 1,643. 59 crore.
At his Bengaluru home furnished with white tapestry and furniture, Shariff went on to speak about how the Enforcement Directorate raided him recently for converting “black money into white”.
“I am clean. My money has been earned through hard work. I was summoned by the ED in July. They targeted me only because I was from the Congress and declared my assets during the MLC elections,” he said.
The ED officials conducted search and seizure operations at all properties owned by his family in Bengaluru and other parts of Karnataka.
“I understand the hardships associated with poverty. Today I earn in crores. It is my hard-earned money. I am not scared if the ED comes knocking at my door again. They claim I am involved in money laundering. What does that even mean? I don’t know,” said Shariff, explaining how he was a school dropout who did not know much about reading and writing.
Shariff had bought a Rolls Royce Phantom car from Bollywood actor Amitabh Bachchan, but it was seized by the transport officials for lack of documentation. He had also declared in an affidavit that he owned a handmade watch worth Rs 1. 10 crore and 5 kg gold. The rest of his assets are in the form of real estate, agricultural plots in and around Bengaluru and Kolar. He has two wives — Rukhsana Taj and Shazia Tarannum and five children. | english |
Surely you have repeatedly found yourself in such a situation that the guests are about to come, the main treat is already ready and the table is almost covered, but there is not enough time for dessert. What should I do? Run for a bought cake, sweets, cookies. But it's so boring. Try to make a cold cake of fish crackers. It consists of products that are found in the refrigerator for everyone, besides some ingredients can be replaced. Do not be afraid to put experiments on your kitchen - you command.
In this article we will talk about the delicious ways of preparing a delicious dessert - a cake without baking from the cracker "Fish". The basis of this dish is very unusual, but impregnated with condensed milk or a juicy cream, they will acquire a surprisingly unique taste.
Having prepared this dish once - you will love it forever.
Ingredients:
- One 500-gram pack of cookies "Fish";
- 500 grams of sour cream 20% fat;
- One glass of sugar;
- 100 g of dark chocolate.
Cooking method:
- Pour sour cream and sugar into the container, whisk until creamy.
- Pour the cracker into the resulting mass. Gently mix everything so that the cookies are not severely broken.
- Put the dessert on a plate in the form of a slide.
- Put a cake of fish-crackers in the refrigerator for a couple of hours, so that the mass hardens, and the cookie soaked in sour cream.
- Chocolate grate on a fine grater, sprinkle them with a cooled dessert.
- If desired, you can decorate with berries, slices of grapes and other delicacies.
Bananas will be a wonderful addition to the cake of crackers.
Ingredients:
- Half a kilo of cracker "Fish";
- 500 grams of sour cream;
- A glass of sugar;
- Coconut shaving;
- Three medium banana.
Cooking method:
- Bananas clean and grind with a blender.
- Pour sour cream and sugar to them, whip the mass.
- Add the crackers to the resulting mixture, mix well and dispatch it to the refrigerator for two hours.
- Frozen mass, shape the cake on a dessert plate.
- Sprinkle this magnificence with coconut shavings.
Despite the fact that this recipe is a bit more complicated than the previous ones, the taste of cream and nuts will conquer you with its unsurpassed quality.
Ingredients:
- Cracker "Fish" - 350 grams;
- Butter - 300 grams;
- Sugar - 200 grams;
- Milk - 300 ml;
- Yolk - 4 pieces;
- Flour - 50 grams;
- vanillin;
- Walnuts - a glass.
Cooking method:
- Boil the milk in a saucepan, pour into it two egg yolks mixed in a separate container, flour and sugar. Preheat this mixture until thick. Add to the finished cream butter and pinch of vanillin. Cool the resulting cream to room temperature.
- Cookies and nuts chop, and pour into the creamy mass.
- Pour this mixture into a form, covered with parchment paper, put in the refrigerator for several hours.
- After the cake of fish-crackers is soaked and thickened, remove it and turn it over the plate, decorate with walnut kernels.
From the thickness of the interlayer, the taste and saturation of the dessert will depend.
Ingredients:
- Four bananas (more or less, depends on your taste preferences);
- Sugar - one glass;
- 400 grams of sour cream;
- A large spoonful of gelatin;
- vanillin.
Cooking method:
- Pour gelatin into a small amount of water, warm it in a microwave oven before swelling.
- Sour cream, vanillin and sugar whisk thoroughly. Pour into the mass of swollen gelatin, mix.
- Bananas clean and cut into circles. If you prefer a more intense banana taste, slice them thicker.
- Take the form for the cake, evenly put half of the sliced bananas on the bottom, pour them 1/3 of the sour cream.
- Lay on the mass of ½ part of the "Fish".
- Alternate: a layer of the remaining bananas, a third of the cream, the second part of the fish, the last cream.
- That's all. Cake of sour cream and cracker "Fish" is almost ready. It remains only to cool this dessert in refrigerators 2-3 hours.
- Turn the frosted cake over with a banana layer, decorate it at your discretion.
Enjoy the amazing taste and ease of cooking this wonder-cake.
Ingredients:
- Cracker "Fish" - 400 grams;
- Walnuts - 130 grams;
- Softened butter - 300 grams;
- One can of condensed milk;
- Grated chocolate.
Cooking method:
- Pour the biscuits into a large bowl, add crushed nuts to them.
- Whisk in a separate saucepan the condensed milk and the softened butter.
- Mix the resulting mixture with walnuts and crackers.
- Lay the mass on the plate, forming a pyramid.
- Sprinkle with grated chocolate, decorate with walnut kernels and whole cookies-fish.
And this cake of fish-crackers will especially be to the liking of lovers and connoisseurs of coffee.
Ingredients:
- One glass of sugar;
- Half a kilo of cookies "fish";
- 200 grams of butter;
- Ground coffee - three tablespoons;
- Four chicken eggs;
- Two large spoons of cocoa;
- Vanilla sugar - pinch.
Cooking method:
- First, prepare a glass of coffee, fill it with a glass of boiling water.
- In a separate container, carefully mix sugar, cocoa, vanilla sugar and eggs.
- The resulting mixture should be placed in a microwave before heating, cool it.
- Add the softened butter to the resulting chocolate mass, whisk until smooth.
- Shape the cake for the cake with oil. Spread the cookies in it, first dipped his strong coffee. After all the cracker is laid out, pour the chocolate mass into the mold.
- Cool the cake in the fridge for three hours.
- After the time has elapsed, carefully turn the cake, laying it out of the form on the plate.
- Decorate with a crumb of chocolate or sugar powder, slices of fruit or whatever you want.
Now you know that an unremarkable cracker in the form of fish can become a wonderful basis for a bright, tasty, rich and incredibly nourishing dessert.
How the cake will work depends only on your imagination and creativity. Any of the above recipe can be changed or supplemented at your own discretion.
Rejoice your family, loved ones and friends with your wonderful inspiration! | english |
<filename>sri/jQuery.my/0.5.4.json
{"jquery.my.js":"<KEY>,"jquery.my.min.js":"<KEY>} | json |
Ed-tech startup GuruQ said on Tuesday that it has secured Rs 2.5 crore (around $330,000) in a pre-Series A funding round from a clutch of high net-worth individuals (HNIs) it did not name.
The Delhi-headquartered company said that it would use the money for expansion and to market its product.
Founded by Minal Anand in 2016, GuruQ operates a platform for online and offline tutoring for primary, secondary, higher secondary and undergraduate courses.
Students and parents can use the platform to look for tutors in their locality and make an informed choice based on past reviews and ratings. GuruQ also helps them manage timetables and assess progress.
GuruQ says its helps tutors connect with students, gain recognition, manage time efficiently and increase earnings.
The startup had raised an undisclosed amount in seed funding round last year.
With the latest fundraise, GuruQ aims to expand its operations in Punjab and Haryana. It plans to offer services in cities such as Ambala, Rohtak, Karnal, Meerut, Hisar, Ludhiana, Amritsar, Jalandhar and Chandigarh.
“This funding is a significant milestone in allowing us to expand the business, strengthen development and create value in the market with new features,” said Anand.
A number of ed-tech startups have raised funding in the recent past.
Last month, a media report stated that Bengaluru-based Think and Learn Pvt. Ltd, which operates ed-tech unicorn Byju’s, had raised $100 million from growth equity firm General Atlantic at a valuation of $2 billion.
In the same month, Jaipur-based experiential learning startup SRJNA raised an undisclosed amount from social-impact investor Gray Matters Capital’s edLABS initiative, angel network Keiretsu Forum and SucSEED Venture Partners.
In June, online learning platform Unacademy raised $21 million (Rs 144 crore) from existing investors Sequoia Capital, Nexus Venture Partners and SAIF Partners.
Despite growing investor interest in the space, a recent TechCircle analysis showed that scalability, profitability and unit economics remain challenges for ed-tech startups.
| english |
All children are born with a sharply developed sucking reflex. Therefore, many without breasts or dummy nipples do not fall asleep. At first it does not create problems. But later the question arises: how to wean a child from a dummy. After all, getting used to sleep without anything in the mouth baby can no longer.
Thanks to the nipple, babies satisfy their sucking reflex . The greatest need for a dummy is experienced by those children who feed on artificial mixtures or on a regimen. The nipple calms the child, thanks to her, he falls asleep more quickly and much more tightly. Among other things, I do not want to worry about how to wean a child from a pacifier, which releases at least a little time, while in the mouth of a child's nipple.
Actually, this is the plus of sucking and ends. Breasts, which do not release the pacifier from the mouth, simply get tired. Therefore, even when they want to eat, they can not take much food - because of a lack of energy. The dummy's harm lies in the fact that during the sucking process the babies swallow the air. Subsequently, this is manifested by incomprehensible regurgitation , colic , bloating.
Tips for how to wean a child from a dummy, and give children's dentists. Most dentists are convinced that it spoils the bite and deforms even unformed teeth. And if you refuse completely from the nipple or do not want to, then at least you need to replace it with a similar, but improved - with a special bite. This also hurts, but a little less.
The problem is that using a pacifier is not entirely hygienic. The nipple falls on different surfaces a hundred times a day. After this, only one is disinfected. Licking the same dummy leads only to the fact that the parents give the child some of their germs. The use of cases slightly reduces the risk of getting microbes, but does not guarantee full sterility.
When to wean a child from a dummy?
Pediatricians recommend to give up the nipple for a year or at least two years. The best parting takes place in the period from 8 months to a year, when the sucking reflex gradually fades away, and chewing is replaced by it. Kick a kid when:
- he is healthy, does not fever and does not snivel;
- His teeth are not cut, and the nipple does not act as an anesthetic;
- he does not experience stress;
- he stopped eating at night;
- he is fast asleep all night.
There are also situations when we need to wean from the nipples urgently. Immediate measures should be taken if:
- the kid sucks a pacifier for days on end;
- child over 3 years;
- the child has problems with speech or hearing;
- Nipple interests crumbs more than communicating with peers.
How to disaccustom the child from a dummy?
In fact, it is not so difficult. The main thing, before weaning the child from sucking dummy, to understand a few nuances. Here's what to do during weaning from the nipple is not worth it:
- You can not get angry at a baby. The child is unlikely to understand why you are angry with him, shout and behave irritably. It just scares him. To behave kindly, patiently. Looking at you, the kid will also be calm and parting with your favorite subject will survive easier.
- Do not smear the nipple with anything bitter, sharp, tasteless. To take a pacifier in his mouth, the child will then stop. But at the same time, he may begin to fear many other things he has known since childhood.
- Before you completely disengage the child from the dummy, remember that you need to constantly adhere to the originally chosen tactics. Even after the most severe tantrums, you can not give a nipple. Otherwise, the baby starts to twist the ropes out of you and begins to beg for everything that he needs.
How to wean a child from a dummy to a year?
Many child psychologists advise starting to separate the baby from the pacifier from three months. For the "operation" to be successful, the following recommendations should be followed:
- With the child you need to spend more time.
- It will be easier to remove a baby from a baby's dummy if you spend long walks with him during the day, play new toys.
- As soon as the child falls asleep, the nipple must be immediately removed from the mouth and put in a crib next to each other.
- In the afternoon it is better to hide a pacifier. And never first offer it to a crumb.
How to wean a child from a dummy after a year?
If a baby in two years does not manage to part with his beloved pacifier, parents need to use special psychological techniques. Here's how to wean a two-year-old child from a dummy:
- Children are delighted with the fairy tales in which they are the protagonists. Think of a story about a brave kid who sacrificed his dummy to helpless kids.
- On the street or at a party, you can pretend that you forgot the pacifier of the house. However, if the child starts hysterical, "loss" is better "to find. "
- Put the baby to sleep without a pacifier. In doing so, the crib will have to spend more time so that the baby does not feel lonely and abandoned.
How to wean a child to sleep with a pacifier?
Sleeping with the pacifier is the biggest problem. The kid, who used to fall asleep with a pacifier in his mouth, without it will begin to be capricious and arrange hysterics. This can not be avoided. But the secret, how to wean a child to suck a pacifier, is simple: a child must spend so much energy that there will not be any vagaries. For several days, parents are encouraged to take more walks with the baby, take up active games. If exhausted, it will not recall any baby's dummy.
How quickly to wean a child from a dummy?
It is important to understand that one day to get rid of the nipple will not work. But you can speed up the process. The way how to take away a baby's dummy is a little funny, but effective. You can try to nail it to the wall at such a height that the baby gets to her and could suck. So the favorite toy will remain at the disposal of the crumbs, but he will gradually abandon it - not to stand forever at the wall, when so many things are happening around.
How painless is it to wean a child from a pacifier?
To mitigate the pain of parting, you will have to resort to tricks:
- Stories help that things get old and break. The baby needs to be very sympathetic, but to explain that it is quite possible to do without a nipple. Not everyone thinks that you can buy a new one, and accept the loss.
- How to wean a child from a pacifier dummy without ceremony - promise to change it for some cherished desire. The prospect of getting a dream, as a rule, is very seductive.
- Effective and the story according to which the nipple grows old and disappears. The main thing - do not forget to cut a piece for believability. | english |
[
{
"issues_url": "https://api.github.com/orgs/wamuseum/issues",
"members_url": "https://api.github.com/orgs/wamuseum/members{/member}",
"description": "",
"public_members_url": "https://api.github.com/orgs/wamuseum/public_members{/member}",
"url": "https://api.github.com/orgs/wamuseum",
"events_url": "https://api.github.com/orgs/wamuseum/events",
"avatar_url": "https://avatars.githubusercontent.com/u/6541276?v=3",
"repos_url": "https://api.github.com/orgs/wamuseum/repos",
"login": "wamuseum",
"id": 6541276,
"hooks_url": "https://api.github.com/orgs/wamuseum/hooks"
}
] | json |
<filename>dataset/khvn/19840719.json<gh_stars>1-10
version https://git-lfs.github.com/spec/v1
oid sha256:944eed71d5e272decbbabd616bb2bc30116cf288354f2698648d5fab0f8f920f
size 12248
| json |
Japan’s bullet trains are quite possibly the world’s most punctual form of transportation, and the safest way to hit speeds of over 200MPH without leaving the ground. The newest version, the N700s that’s now running on the country’s Shinkansen Line between Tokyo and Osaka, is also the first to feature a battery backup to keep it running in the event of a natural disaster.
Given its size and proximity to the Pacific Ocean, Japan is regularly subjected to devastating natural disasters including earthquakes, typhoons, and tsunamis. Such occurrences are so common that the entire country factors disaster preparedness into its infrastructure, and that now includes its iconic bullet trains. The N700S Shinkansen (the “S” stands for Supreme) is the first major upgrade of the N700 series in 13 years, and mostly includes improvements designed to make travel more comfortable for passengers.
Originally intended to be introduced to coincide with the 2020 Tokyo Olympics, the N700S officially entered service on July 1 and while it hit a top speed of 360 kilometers per hour during test runs last year, the train will max out at 285 kilometers per hour while carrying passengers along its route. Amenities include seats that recline even further for passengers who prefer to sleep, a power outlet for every rider, and special lighting in the overhead baggage compartments reminding everyone to claim any luggage or bags they’ve stashed as they’re disembarking.
Less obvious to riders are improvements made to the train’s exterior design. It looks only subtly different to the existing models the N700S is replacing, but a redesigned nose will improve the new train’s streamlining and reduce the amount of noise it produces externally as it whizzes past the countryside. A new active suspension system also promises to make rides smoother by absorbing bumps (although it’s not like these trains are racing down unpaved country roads) while a new braking system reduces the train’s stopping distance in the event of an emergency.
The most notable upgrade on the N700S is something that hopefully never has to be used, but given Japan’s history, will be a welcome feature during future natural disasters. The N700S is the first bullet train to carry its own battery backup system that’s not just for powering emergency lighting. In the event that the train loses external power, it can continue to move under its own power if it’s come to a stop in a place that’s unsafe for passengers to exit, such as in a tunnel or on a bridge. It won’t be able to hit its top speed of 285km/h on battery power, but it will be able to slowly roll along with a much shorter range ensuring passengers are never left stranded.
| english |
To pay homage to the victims and martyrs on the 10th anniversary of the 26/11 terrorist attacks, Public Concern for Governance Trust (PCGT), an NGO led by former Mumbai Police commissioner Julio Ribeiro, organised a tribute — ‘Together As One’ — with the theme ‘Hum Sab Ek Hai’.
Ribeiro, chairman of PCGT, addressed the gathering by remembering the victims and recognising the valiant efforts of all the servicemen and security forces involved in combating terrorists during the attack. He also spoke on the essence of evolving a security apparatus to maintain religious harmony and bring about peaceful coexistence.
The event was held at the National Centre of Performing Arts. Actor and activist Rahul Bose was the chief guest for the evening, which also witnessed a performance by the Symphony Orchestra of India, the premiere of a 17-minute short film Rogan Josh starring Nasseruddin Shah, a work of fiction inspired by 26/11 attacks, an Odissi performance by The Arts Quotient, as well as songs composed by Kabir and 18th century poet Nazeer Akbarabadi by theatre actor Ajitesh Gupta. | english |
<gh_stars>0
#include <stdio.h>
#include "common/buffer/buffer_impl.h"
#include "common/http/message_impl.h"
#include "common/stats/isolated_store_impl.h"
#include "common/stream_info/stream_info_impl.h"
#include "extensions/common/wasm/wasm.h"
#include "extensions/filters/http/wasm/wasm_filter.h"
#include "test/mocks/grpc/mocks.h"
#include "test/mocks/http/mocks.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/ssl/mocks.h"
#include "test/mocks/stream_info/mocks.h"
#include "test/mocks/thread_local/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "test/test_common/environment.h"
#include "test/test_common/printers.h"
#include "test/test_common/utility.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
using testing::_;
using testing::AtLeast;
using testing::Eq;
using testing::InSequence;
using testing::Invoke;
using testing::Return;
using testing::ReturnPointee;
using testing::ReturnRef;
MATCHER_P(MapEq, rhs, "") {
const Envoy::ProtobufWkt::Struct& obj = arg;
EXPECT_TRUE(rhs.size() > 0);
for (auto const& entry : rhs) {
EXPECT_EQ(obj.fields().at(entry.first).string_value(), entry.second);
}
return true;
}
namespace Envoy {
namespace Extensions {
namespace HttpFilters {
namespace Wasm {
class TestFilter : public Envoy::Extensions::Common::Wasm::Context {
public:
TestFilter(Wasm* wasm) : Envoy::Extensions::Common::Wasm::Context(wasm) {}
MOCK_METHOD2(scriptLog, void(spdlog::level::level_enum level, absl::string_view message));
};
class WasmHttpFilterTest : public testing::TestWithParam<std::string> {
public:
WasmHttpFilterTest() {}
~WasmHttpFilterTest() {}
void setupConfig(const std::string& code) {
envoy::config::filter::http::wasm::v2::Wasm proto_config;
proto_config.mutable_vm_config()->set_vm(absl::StrCat("envoy.wasm.vm.", GetParam()));
proto_config.mutable_vm_config()->mutable_code()->set_inline_bytes(code);
Api::ApiPtr api = Api::createApiForTest(stats_store_);
scope_ = Stats::ScopeSharedPtr(stats_store_.createScope("wasm."));
wasm_ = Extensions::Common::Wasm::createWasm(proto_config.id(), proto_config.vm_config(),
cluster_manager_, dispatcher_, *api, *scope_,
local_info_);
}
void setupNullConfig(const std::string& name) {
envoy::config::filter::http::wasm::v2::Wasm proto_config;
proto_config.mutable_vm_config()->set_vm("envoy.wasm.vm.null");
proto_config.mutable_vm_config()->mutable_code()->set_inline_bytes(name);
Api::ApiPtr api = Api::createApiForTest(stats_store_);
scope_ = Stats::ScopeSharedPtr(stats_store_.createScope("wasm."));
wasm_ = Extensions::Common::Wasm::createWasm(proto_config.id(), proto_config.vm_config(),
cluster_manager_, dispatcher_, *api, *scope_,
local_info_);
}
void setupFilter() {
filter_ = std::make_shared<TestFilter>(wasm_.get());
filter_->setDecoderFilterCallbacks(decoder_callbacks_);
filter_->setEncoderFilterCallbacks(encoder_callbacks_);
wasm_->setGeneralContext(
std::static_pointer_cast<Envoy::Extensions::Common::Wasm::Context>(filter_));
}
Stats::IsolatedStoreImpl stats_store_;
Stats::ScopeSharedPtr scope_;
NiceMock<ThreadLocal::MockInstance> tls_;
NiceMock<Event::MockDispatcher> dispatcher_;
Upstream::MockClusterManager cluster_manager_;
std::shared_ptr<Wasm> wasm_;
std::shared_ptr<TestFilter> filter_;
NiceMock<Envoy::Ssl::MockConnectionInfo> ssl_;
NiceMock<Envoy::Network::MockConnection> connection_;
NiceMock<Http::MockStreamDecoderFilterCallbacks> decoder_callbacks_;
NiceMock<Http::MockStreamEncoderFilterCallbacks> encoder_callbacks_;
NiceMock<Envoy::StreamInfo::MockStreamInfo> request_stream_info_;
NiceMock<LocalInfo::MockLocalInfo> local_info_;
};
INSTANTIATE_TEST_SUITE_P(Runtimes, WasmHttpFilterTest, testing::Values("wavm", "v8"));
// Bad code in initial config.
TEST_P(WasmHttpFilterTest, BadCode) {
EXPECT_THROW_WITH_MESSAGE(setupConfig("bad code"), Common::Wasm::WasmException,
"Failed to initialize WASM code from <inline>");
}
// Script touching headers only, request that is headers only.
TEST_P(WasmHttpFilterTest, HeadersOnlyRequestHeadersOnly) {
setupConfig(TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/filters/http/wasm/test_data/headers_cpp.wasm")));
setupFilter();
EXPECT_CALL(*filter_,
scriptLog(spdlog::level::debug, Eq(absl::string_view("onRequestHeaders 1"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::info, Eq(absl::string_view("header path /"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::warn, Eq(absl::string_view("onDone 1"))));
wasm_->start();
Http::TestHeaderMapImpl request_headers{{":path", "/"}, {"server", "envoy"}};
EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter_->decodeHeaders(request_headers, true));
EXPECT_THAT(request_headers.get_("newheader"), Eq("newheadervalue"));
EXPECT_THAT(request_headers.get_("server"), Eq("envoy-wasm"));
filter_->onDestroy();
}
// Script touching headers only, request that is headers only.
TEST_P(WasmHttpFilterTest, HeadersOnlyRequestHeadersAndBody) {
setupConfig(TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/filters/http/wasm/test_data/headers_cpp.wasm")));
setupFilter();
EXPECT_CALL(*filter_,
scriptLog(spdlog::level::debug, Eq(absl::string_view("onRequestHeaders 1"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::info, Eq(absl::string_view("header path /"))));
EXPECT_CALL(*filter_,
scriptLog(spdlog::level::err, Eq(absl::string_view("onRequestBody hello"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::warn, Eq(absl::string_view("onDone 1"))));
wasm_->start();
Http::TestHeaderMapImpl request_headers{{":path", "/"}};
EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter_->decodeHeaders(request_headers, true));
Buffer::OwnedImpl data("hello");
EXPECT_EQ(Http::FilterDataStatus::Continue, filter_->decodeData(data, true));
filter_->onDestroy();
}
// Script testing AccessLog::Instance::log.
TEST_P(WasmHttpFilterTest, AccessLog) {
setupConfig(TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/filters/http/wasm/test_data/headers_cpp.wasm")));
setupFilter();
EXPECT_CALL(*filter_,
scriptLog(spdlog::level::debug, Eq(absl::string_view("onRequestHeaders 1"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::info, Eq(absl::string_view("header path /"))));
EXPECT_CALL(*filter_,
scriptLog(spdlog::level::err, Eq(absl::string_view("onRequestBody hello"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::warn, Eq(absl::string_view("onLog 1 /"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::warn, Eq(absl::string_view("onDone 1"))));
wasm_->start();
Http::TestHeaderMapImpl request_headers{{":path", "/"}};
EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter_->decodeHeaders(request_headers, true));
Buffer::OwnedImpl data("hello");
EXPECT_EQ(Http::FilterDataStatus::Continue, filter_->decodeData(data, true));
filter_->onDestroy();
StreamInfo::MockStreamInfo log_stream_info;
filter_->log(&request_headers, nullptr, nullptr, log_stream_info);
}
TEST_P(WasmHttpFilterTest, AsyncCall) {
setupConfig(TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/filters/http/wasm/test_data/async_call_cpp.wasm")));
setupFilter();
wasm_->start();
Http::TestHeaderMapImpl request_headers{{":path", "/"}};
Http::MockAsyncClientRequest request(&cluster_manager_.async_client_);
Http::AsyncClient::Callbacks* callbacks = nullptr;
EXPECT_CALL(cluster_manager_, get("cluster"));
EXPECT_CALL(cluster_manager_, httpAsyncClientForCluster("cluster"));
EXPECT_CALL(cluster_manager_.async_client_, send_(_, _, _))
.WillOnce(
Invoke([&](Http::MessagePtr& message, Http::AsyncClient::Callbacks& cb,
const Http::AsyncClient::RequestOptions&) -> Http::AsyncClient::Request* {
EXPECT_EQ((Http::TestHeaderMapImpl{{":method", "POST"},
{":path", "/"},
{":authority", "foo"},
{"content-length", "11"}}),
message->headers());
EXPECT_EQ((Http::TestHeaderMapImpl{{"trail", "cow"}}), *message->trailers());
callbacks = &cb;
return &request;
}));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::debug, Eq("response")));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::info, Eq(":status -> 200")));
EXPECT_EQ(Http::FilterHeadersStatus::StopIteration,
filter_->decodeHeaders(request_headers, false));
Http::MessagePtr response_message(new Http::ResponseMessageImpl(
Http::HeaderMapPtr{new Http::TestHeaderMapImpl{{":status", "200"}}}));
response_message->body().reset(new Buffer::OwnedImpl("response"));
EXPECT_NE(callbacks, nullptr);
if (callbacks) {
callbacks->onSuccess(std::move(response_message));
}
}
TEST_P(WasmHttpFilterTest, GrpcCall) {
setupConfig(TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/filters/http/wasm/test_data/grpc_call_cpp.wasm")));
setupFilter();
wasm_->start();
Grpc::MockAsyncRequest request;
Grpc::RawAsyncRequestCallbacks* callbacks = nullptr;
Grpc::MockAsyncClientManager client_manager;
auto client_factory = std::make_unique<Grpc::MockAsyncClientFactory>();
auto async_client = std::make_unique<Grpc::MockAsyncClient>();
Tracing::Span* parent_span{};
EXPECT_CALL(*async_client, sendRaw_(_, _, _, _, _, _))
.WillOnce(Invoke(
[&](absl::string_view service_full_name, absl::string_view method_name,
Buffer::Instance& message, Grpc::RawAsyncRequestCallbacks& cb, Tracing::Span& span,
const absl::optional<std::chrono::milliseconds>& timeout) -> Grpc::AsyncRequest* {
EXPECT_EQ(service_full_name, "service");
EXPECT_EQ(method_name, "method");
ProtobufWkt::Value value;
EXPECT_TRUE(
value.ParseFromArray(message.linearize(message.length()), message.length()));
EXPECT_EQ(value.string_value(), "request");
callbacks = &cb;
parent_span = &span;
EXPECT_EQ(timeout->count(), 1000);
return &request;
}));
EXPECT_CALL(*client_factory, create).WillOnce(Invoke([&]() -> Grpc::AsyncClientPtr {
return std::move(async_client);
}));
EXPECT_CALL(cluster_manager_, grpcAsyncClientManager())
.WillOnce(Invoke([&]() -> Grpc::AsyncClientManager& { return client_manager; }));
EXPECT_CALL(client_manager, factoryForGrpcService(_, _, _))
.WillOnce(
Invoke([&](const envoy::api::v2::core::GrpcService&, Stats::Scope&,
bool) -> Grpc::AsyncClientFactoryPtr { return std::move(client_factory); }));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::debug, Eq("response")));
Http::TestHeaderMapImpl request_headers{{":path", "/"}};
EXPECT_EQ(Http::FilterHeadersStatus::StopIteration,
filter_->decodeHeaders(request_headers, false));
ProtobufWkt::Value value;
value.set_string_value("response");
std::string response_string;
EXPECT_TRUE(value.SerializeToString(&response_string));
auto response = std::make_unique<Buffer::OwnedImpl>(response_string);
EXPECT_NE(callbacks, nullptr);
NiceMock<Tracing::MockSpan> span;
if (callbacks) {
callbacks->onSuccessRaw(std::move(response), span);
}
}
TEST_P(WasmHttpFilterTest, Metadata) {
setupConfig(TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/filters/http/wasm/test_data/metadata_cpp.wasm")));
setupFilter();
envoy::api::v2::core::Node node_data;
ProtobufWkt::Value node_val;
node_val.set_string_value("wasm_node_get_value");
(*node_data.mutable_metadata()->mutable_fields())["wasm_node_get_key"] = node_val;
EXPECT_CALL(local_info_, node()).WillOnce(ReturnRef(node_data));
EXPECT_CALL(*filter_,
scriptLog(spdlog::level::debug,
Eq(absl::string_view("onRequestHeaders 1 wasm_request_get_value"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::info, Eq(absl::string_view("header path /"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::err,
Eq(absl::string_view("onRequestBody wasm_node_get_value"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::warn, Eq(absl::string_view("onLog 1 /"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::warn, Eq(absl::string_view("onDone 1"))));
EXPECT_CALL(
*filter_,
scriptLog(spdlog::level::trace,
Eq(absl::string_view("Struct wasm_request_get_value wasm_request_get_value"))));
request_stream_info_.metadata_.mutable_filter_metadata()->insert(
Protobuf::MapPair<std::string, ProtobufWkt::Struct>(
HttpFilters::HttpFilterNames::get().Wasm,
MessageUtil::keyValueStruct("wasm_request_get_key", "wasm_request_get_value")));
EXPECT_CALL(decoder_callbacks_, streamInfo()).WillRepeatedly(ReturnRef(request_stream_info_));
std::string serialized_value;
ProtobufWkt::Value value;
value.set_string_value("wasm_request_set_value");
EXPECT_TRUE(value.SerializeToString(&serialized_value));
EXPECT_CALL(request_stream_info_,
setDynamicMetadata(HttpFilters::HttpFilterNames::get().Wasm,
MapEq(std::map<std::string, std::string>{
{"wasm_request_set_key", serialized_value}})));
wasm_->start();
Http::TestHeaderMapImpl request_headers{{":path", "/"}};
EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter_->decodeHeaders(request_headers, true));
Buffer::OwnedImpl data("hello");
EXPECT_EQ(Http::FilterDataStatus::Continue, filter_->decodeData(data, true));
filter_->onDestroy();
StreamInfo::MockStreamInfo log_stream_info;
filter_->log(&request_headers, nullptr, nullptr, log_stream_info);
}
// Null VM Plugin, headers only.
TEST_F(WasmHttpFilterTest, NullVmPluginRequestHeadersOnly) {
setupNullConfig("null_vm_plugin");
setupFilter();
EXPECT_CALL(*filter_,
scriptLog(spdlog::level::debug, Eq(absl::string_view("onRequestHeaders 1"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::info, Eq(absl::string_view("header path /"))));
EXPECT_CALL(*filter_, scriptLog(spdlog::level::warn, Eq(absl::string_view("onDone 1"))));
wasm_->start();
Http::TestHeaderMapImpl request_headers{{":path", "/"}, {"server", "envoy"}};
EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter_->decodeHeaders(request_headers, true));
EXPECT_THAT(request_headers.get_("newheader"), Eq("newheadervalue"));
EXPECT_THAT(request_headers.get_("server"), Eq("envoy-wasm"));
filter_->onDestroy();
}
} // namespace Wasm
} // namespace HttpFilters
} // namespace Extensions
} // namespace Envoy
| cpp |
<reponame>ScSherifTarek/universities<filename>resources/ph/fuzeko-polytechnic-college.json
{"name":"<NAME>","alt_name":null,"country":"Philippines","state":null,"address":{"street":"Brgy. Roxas","city":"Solano","province":"Nueva Vizcaya","postal_code":"3709"},"contact":{"telephone":"+63(78) 326-7349","website":null,"email":null,"fax":null},"funding":"Private","languages":null,"academic_year":null,"accrediting_agency":null}
| json |
<reponame>JohnKvisol/Starbound_RU<filename>translations/texts/items/generic/crafting/snowflake.item.json<gh_stars>10-100
[
{
"DeniedAlternatives": [],
"Files": {
"items/generic/crafting/snowflake.item": [
"/description"
]
},
"Texts": {
"Eng": "A perfectly preserved snowflake. They say no two of these are ever the same.",
"Rus": "Прекрасно сохранившаяся снежинка. Говорят, даже две из них никогда не бывают одинаковыми."
}
},
{
"DeniedAlternatives": [],
"Files": {
"items/generic/crafting/snowflake.item": [
"/shortdescription"
]
},
"Texts": {
"Eng": "Snowflake",
"Rus": "Снежинка"
}
}
] | json |
<reponame>Krutsch/html-bundle<gh_stars>1-10
#!/usr/bin/env node
import fs from "fs";
import { performance } from "perf_hooks";
import Event from "events";
import glob from "glob";
import path from "path";
import Fastify from "fastify";
import fastifyStatic from "fastify-static";
import postcss from "postcss";
import postcssrc from "postcss-load-config";
import cssnano from "cssnano";
import esbuild from "esbuild";
import critical from "critical";
import { minify } from "html-minifier-terser";
import { watch } from "chokidar";
import { serialize, parse, parseFragment } from "parse5";
import {
createScript,
getTagName,
appendChild,
findElement,
findElements,
} from "@web/parse5-utils";
// CLI and options
const isCritical = process.argv.includes("--critical");
const isHMR = process.argv.includes("--hmr");
const isCSP = process.argv.includes("--csp");
const isSecure = process.argv.includes("--secure");
const isServeOnly = process.argv.includes("--serveOnly");
let fastify;
if (isServeOnly) {
createDefaultServer();
fastify.listen(5000);
console.log(`💻 Sever listening on port 5000.`);
} else {
process.env.NODE_ENV = isHMR ? "development" : "production";
let { plugins, options, file } = createPostCSSConfig();
let CSSprocessor = postcss(plugins);
// Performance Observer and file watcher
const globHTML = new Event.EventEmitter();
const taskEmitter = new Event.EventEmitter();
const start = performance.now();
let expectedTasks = 0; // This will be increased in globHandlers
let finishedTasks = 0; // Current status
taskEmitter.on("done", () => {
finishedTasks++;
if (finishedTasks === expectedTasks) {
console.log(
`🚀 Build finished in ${(performance.now() - start).toFixed(2)}ms ✨`
);
if (isHMR) {
if (file) {
const postCSSWatcher = watch(file);
postCSSWatcher.on("change", () => {
console.log("⚡ modified postcss.config – CSS will rebuild now.");
const newConfig = createPostCSSConfig();
plugins = newConfig.plugins;
options = newConfig.options;
CSSprocessor = postcss(plugins);
glob(`${SOURCE_FOLDER}/**/*.css`, {}, (err, files) => {
errorHandler(err);
expectedTasks += files.length;
for (const filename of files) {
const [buildFilename, buildPathDir] = getBuildNames(filename);
fs.mkdirSync(buildPathDir, { recursive: true });
minifyCSS(filename, buildFilename);
}
});
});
}
console.log(`⌛ Waiting for file changes ...`);
const watcher = watch(SOURCE_FOLDER);
// The add watcher will add all the files initially - do not rebuild them
let initialAdd = 0;
let hasJSTS = false;
watcher.on("add", (filename) => {
// Return if it was added by the build system itself
if (/-bundle-\d+\.(j|t)sx?$/.test(filename)) {
return;
}
filename = String.raw`${filename}`.replace(/\\/g, "/");
if (filename.endsWith(".html") || filename.endsWith(".css")) {
initialAdd++;
} else if (hasJSTS === false && /\.(j|t)sx?$/.test(filename)) {
hasJSTS = true;
initialAdd++;
}
if (initialAdd <= expectedTasks) return;
const [buildFilename, buildPathDir] = getBuildNames(filename);
fs.mkdir(buildPathDir, { recursive: true }, (err) => {
errorHandler(err);
rebuild(filename);
console.log(`⚡ added ${buildFilename}`);
});
});
watcher.on("change", (filename) => {
// Return if it was changed by the build system itself
if (/-bundle-\d+\.(j|t)sx?$/.test(filename)) {
return;
}
filename = String.raw`${filename}`.replace(/\\/g, "/");
rebuild(filename);
const [buildFilename] = getBuildNames(filename);
console.log(`⚡ modified ${buildFilename}`);
});
watcher.on("unlink", (filename) => {
// Return if it was deleted by the build system itself
if (/-bundle-\d+\.(j|t)sx?$/.test(filename)) {
return;
}
filename = String.raw`${filename}`.replace(/\\/g, "/");
JSTSFiles.delete(filename);
const [buildFilename, buildPathDir] = getBuildNames(filename);
fs.rm(tsMaybeX2JS(buildFilename), (err) => {
errorHandler(err);
console.log(`⚡ deleted ${buildFilename}`);
const length = fs.readdirSync(buildPathDir).length;
if (!length) fs.rmdir(buildPathDir, errorHandler);
});
});
}
}
});
// Basic configuration
const SOURCE_FOLDER = "src";
const BUILD_FOLDER = "build";
const TEMPLATE_LITERAL_MINIFIER = /\n\s+/g;
const CONNECTIONS = []; // HMR
let htmlTasks = 0;
let serverSentEvents;
if (isHMR) {
fastify = Fastify(
isSecure
? {
http2: true,
https: {
key: fs.readFileSync(
path.join(process.cwd(), "localhost-key.pem")
),
cert: fs.readFileSync(path.join(process.cwd(), "localhost.pem")),
},
}
: void 0
);
fastify.setNotFoundHandler((_req, reply) => {
const file = fs.readFileSync(
path.join(process.cwd(), BUILD_FOLDER, "/index.html"),
{
encoding: "utf-8",
}
);
reply.header("Content-Type", "text/html; charset=UTF-8");
return reply.send(addHMRCode(file, "build/index.html"));
});
fastify.register(fastifyStatic, {
root: path.join(process.cwd(), BUILD_FOLDER),
});
fastify.get("/events", (_req, reply) => {
reply.raw.setHeader("Content-Type", "text/event-stream");
reply.raw.setHeader("Cache-Control", "no-cache");
!isSecure && reply.raw.setHeader("Connection", "keep-alive");
CONNECTIONS.push(reply.raw);
serverSentEvents = (data) =>
CONNECTIONS.forEach((rep) => {
rep.write(`data: ${JSON.stringify(data)}\n\n`);
});
});
}
// THE BUNDLE CODE
// Glob all files and transform the code
glob(`${SOURCE_FOLDER}/**/*.html`, {}, (err, files) => {
errorHandler(err);
expectedTasks += files.length;
htmlTasks += files.length;
if (isHMR) {
createHMRHandlers(files);
fastify.listen(5000);
console.log(`💻 Sever listening on port 5000.`);
}
});
glob(`${SOURCE_FOLDER}/**/*.css`, {}, (err, files) => {
errorHandler(err);
expectedTasks += files.length;
for (const filename of files) {
const [buildFilename, buildPathDir] = getBuildNames(filename);
fs.mkdirSync(buildPathDir, { recursive: true });
minifyCSS(filename, buildFilename);
}
});
const JSTSFiles = new Set();
glob(`${SOURCE_FOLDER}/**/!(*.d).{ts,js,tsx,jsx}`, {}, (err, files) => {
errorHandler(err);
if (files.length) {
expectedTasks += 1;
} else {
globHTML.emit("getReady");
}
files.forEach((file) => JSTSFiles.add(file));
minifyTSJS().catch(errorHandler);
});
globHTML.on("getReady", () => {
if (expectedTasks - htmlTasks === finishedTasks) {
// After CSS and JS because critical needs file built css files and inline script might reference js files.
glob(`${SOURCE_FOLDER}/**/*.html`, {}, async (err, files) => {
errorHandler(err);
await createGlobalJS(files);
files.forEach((filename) => {
const [buildFilename, buildPathDir] = getBuildNames(filename);
fs.mkdirSync(buildPathDir, { recursive: true });
minifyHTML(filename, buildFilename);
});
});
}
});
function createGlobalJS(files) {
const scriptFilenames = [];
files.forEach((filename) => {
const fileText = fs.readFileSync(filename, { encoding: "utf-8" });
let DOM;
if (fileText.includes("<!DOCTYPE html>") || fileText.includes("<html")) {
DOM = parse(fileText);
} else {
DOM = parseFragment(fileText);
}
const scripts = findElements(DOM, (e) => getTagName(e) === "script");
scripts.forEach((script, index) => {
const scriptTextNode = script.childNodes[0];
const isReferencedScript = script.attrs.find((a) => a.name === "src");
//@ts-ignore
const scriptContent = scriptTextNode?.value;
if (!scriptContent || isReferencedScript) return;
const jsFilename = filename.replace(".html", `-bundle-${index}.js`);
scriptFilenames.push(jsFilename);
fs.writeFileSync(jsFilename, scriptContent);
});
});
scriptFilenames.forEach((file) => JSTSFiles.add(file));
return minifyTSJS(true)
.catch(console.error)
.finally(() =>
scriptFilenames.forEach((file) => {
JSTSFiles.delete(file);
try {
fs.rmSync(file);
} catch {}
})
);
}
function minifyTSJS(isInline = false, file) {
return esbuild
.build({
entryPoints: Array.from(JSTSFiles),
charset: "utf8",
format: "esm",
incremental: isHMR,
sourcemap: isHMR,
splitting: true,
define: {
"process.env.NODE_ENV": isHMR ? '"development"' : '"production"',
},
loader: { ".js": "jsx", ".ts": "tsx" },
bundle: true,
minify: true,
outdir: BUILD_FOLDER,
outbase: SOURCE_FOLDER,
})
.then(() => {
if (!isInline) {
taskEmitter.emit("done");
globHTML.emit("getReady");
if (serverSentEvents) {
const changedFile = tsMaybeX2JS(file);
const [buildFilename] = getBuildNames(changedFile);
const js = fs.readFileSync(buildFilename, { encoding: "utf8" });
serverSentEvents({
js,
filename: buildFilename.split(`${BUILD_FOLDER}/`).pop(),
});
}
}
});
}
function minifyCSS(filename, buildFilename) {
const fileText = fs.readFileSync(filename, { encoding: "utf-8" });
return CSSprocessor.process(fileText, {
...options,
from: filename,
to: buildFilename,
})
.then((result) => {
fs.writeFileSync(buildFilename, result.css);
taskEmitter.emit("done");
globHTML.emit("getReady");
if (serverSentEvents) {
serverSentEvents({
css: result.css,
filename: buildFilename.split(`${BUILD_FOLDER}/`).pop(),
});
}
})
.catch((err) => {
console.error(err);
});
}
async function minifyHTML(filename, buildFilename) {
let fileText = fs.readFileSync(filename, { encoding: "utf-8" });
let DOM;
if (fileText.includes("<!DOCTYPE html>") || fileText.includes("<html")) {
DOM = parse(fileText);
} else {
DOM = parseFragment(fileText);
}
// Minify Code
const scripts = findElements(DOM, (e) => getTagName(e) === "script");
scripts.forEach((script, index) => {
const scriptTextNode = script.childNodes[0];
const isReferencedScript = script.attrs.find((a) => a.name === "src");
//@ts-ignore
if (!scriptTextNode?.value || isReferencedScript) return;
// Use bundled file and remove it from fs
const bundledFilename = buildFilename.replace(
".html",
`-bundle-${index}.js`
);
try {
const scriptContent = fs.readFileSync(bundledFilename, {
encoding: "utf-8",
});
fs.rmSync(bundledFilename);
// Replace src with bundled code
//@ts-ignore
scriptTextNode.value = scriptContent.replace(
TEMPLATE_LITERAL_MINIFIER,
" "
);
} catch {}
});
// Minify Inline Style
const styles = findElements(DOM, (e) => getTagName(e) === "style");
for (const style of styles) {
const node = style.childNodes[0];
//@ts-ignore
const styleContent = node?.value;
if (!styleContent) continue;
const { css } = await CSSprocessor.process(styleContent, {
...options,
from: undefined,
});
//@ts-ignore
node.value = css;
}
fileText = serialize(DOM);
// Minify HTML
fileText = await minify(fileText, {
collapseWhitespace: true,
removeComments: true,
});
if (isCritical) {
const buildFilenameArr = buildFilename.split("/");
const fileWithBase = buildFilenameArr.pop();
const buildDir = buildFilenameArr.join("/");
// critical is generating the files on the fs
return critical
.generate({
base: buildDir,
html: fileText,
target: fileWithBase,
inline: !isCSP,
extract: true,
rebase: () => {},
})
.then(({ html }) => {
taskEmitter.emit("done");
if (serverSentEvents) {
serverSentEvents({
html: addHMRCode(html, buildFilename),
filename: buildFilename,
});
}
})
.catch((err) => {
console.error(err);
});
} else {
fs.writeFileSync(buildFilename, fileText);
taskEmitter.emit("done");
if (serverSentEvents) {
serverSentEvents({
html: addHMRCode(fileText, buildFilename),
filename: buildFilename,
});
}
}
}
// Helper functions from here
function createPostCSSConfig() {
try {
return postcssrc.sync({});
} catch {
return { plugins: [cssnano], options: {}, file: "" };
}
}
function getBuildNames(filename) {
const buildFilename = filename.replace(
`${SOURCE_FOLDER}/`,
`${BUILD_FOLDER}/`
);
const buildFilenameArr = buildFilename.split("/");
buildFilenameArr.pop();
const buildPathDir = buildFilenameArr.join("/");
return [buildFilename, buildPathDir];
}
async function rebuild(filename) {
const [buildFilename] = getBuildNames(filename);
if (/\.(j|t)sx?$/.test(filename)) {
JSTSFiles.add(filename);
} else if (filename.endsWith(".css")) {
await minifyCSS(filename, buildFilename);
}
glob(`${SOURCE_FOLDER}/**/*.html`, {}, async (err, files) => {
errorHandler(err);
await createGlobalJS(files);
if (filename.endsWith(".html")) {
minifyHTML(filename, buildFilename);
} else if (
/\.(j|t)sx?$/.test(filename) ||
(filename.endsWith(".css") && isCritical)
) {
for (const htmlFilename of files) {
const [htmlBuildFilename] = getBuildNames(htmlFilename);
await minifyHTML(htmlFilename, htmlBuildFilename);
}
if (/\.(j|t)sx?$/.test(filename) && serverSentEvents) {
const jsFile = tsMaybeX2JS(buildFilename);
try {
// Do not try to send empty files
serverSentEvents({
js: fs.readFileSync(jsFile, { encoding: "utf-8" }),
filename: jsFile.split(`${BUILD_FOLDER}/`).pop(),
});
} catch {}
}
}
});
}
const getHMRCode = (
filename,
id
) => `import { render, html, setShouldSetReactivity, $$, setGlobalSchedule, setInsertDiffing } from "https://unpkg.com/hydro-js/dist/library.js";
if (!window.eventsource${id}) {
setGlobalSchedule(false);
setShouldSetReactivity(false);
window.eventsource${id} = new EventSource("/events");
window.eventsource${id}.addEventListener("message", ({ data }) => {
const dataObj = JSON.parse(data);
if ("html" in dataObj && "${filename}" === dataObj.filename) {
setInsertDiffing(true);
let newHTML;
let isBody;
if (dataObj.html.startsWith('<!DOCTYPE html>') || dataObj.html.startsWith('<html')) {
newHTML = html\`\${dataObj.html}\`;
} else {
newHTML = html\`<body>\${dataObj.html}</body>\`
isBody = true
}
if (isBody) {
const hmrID = "${id}";
const hmrElems = Array.from(newHTML.childNodes);
const hmrWheres = Array.from($$(\`[data-hmr="\${hmrID}"]\`))
// Render new Elements in old Elements, also remove rest old Elements and add add new elements after the last old one
hmrWheres.forEach((where, index) => {
if (index < hmrElems.length) {
render(hmrElems[index], where);
} else {
where.remove();
}
});
for (let rest = hmrWheres.length; rest < hmrElems.length; rest++) {
if (hmrWheres.length) {
const template = document.createElement('template');
hmrElems[hmrWheres.length - 1].after(template);
render(hmrElems[rest], template);
template.remove();
} else {
render(hmrElems[rest])
}
}
} else {
const oldElementCount = document.body.querySelectorAll('*').length;
render(newHTML, document.documentElement);
const newElementCount = document.body.querySelectorAll('*').length;
// Looks like JS did not reload? Last resort - hard refresh
if (newElementCount < 5 && Math.abs(newElementCount - oldElementCount) > 10) {
location.reload()
}
}
setInsertDiffing(false);
if (dataObj.filename === 'build/index.html') {
dispatchEvent(new Event("popstate"));
}
} else if ("css" in dataObj) {
window.onceEveryXTime(100, window.updateCSS, [updateAttr]);
} else if ("js" in dataObj) {
window.onceEveryXTime(100, window.updateJS, [updateAttr]);
}
function updateAttr (attr, forceUpdate = false) {
return (elem) => {
const attrValue = elem[attr].replace(/\\?v=.*/, "");
if (forceUpdate || attrValue.endsWith(dataObj.filename)) {
elem[attr] = \`\${attrValue}?v=\${Math.random().toFixed(4)}\`;
} else if (elem.localName === 'script' && !elem.src && new RegExp(\`["']\${dataObj.filename}["']\`).test(elem.textContent)) {
elem.setAttribute('data-inline', String(Math.random().toFixed(4)).slice(2));
}
}
};
});
if (!window.updateCSS) {
window.updateCSS = function updateCSS(updateAttr) {
$$('link').forEach(updateAttr("href"));
window.fnToLastCalled.set(window.updateCSS, performance.now())
}
}
if (!window.updateJS) {
window.updateJS = function updateJS(updateAttr) {
window.fnToLastCalled.set(window.updateJS, performance.now());
const copy = html\`\${document.documentElement.outerHTML}\`;
copy.querySelectorAll('script').forEach(updateAttr("src"));
render(copy, document.documentElement);
}
}
if (!window.fnToLastCalled) {
window.fnToLastCalled = new Map();
}
if (!window.onceEveryXTime) {
window.onceEveryXTime = function (time, fn, params) {
if (!window.fnToLastCalled.has(fn) || performance.now() - window.fnToLastCalled.get(fn) > time) {
fn(...params)
}
}
}
}`;
function randomText() {
return Math.random().toString(32).slice(2);
}
const htmlIdMap = new Map();
function addHMRCode(html, filename) {
if (!htmlIdMap.has(filename)) {
htmlIdMap.set(filename, randomText());
}
const script = createScript(
{ type: "module" },
getHMRCode(filename, htmlIdMap.get(filename))
);
let ast;
if (html.includes("<!DOCTYPE html>") || html.includes("<html")) {
ast = parse(html);
const headNode = findElement(ast, (e) => getTagName(e) === "head");
appendChild(headNode, script);
} else {
ast = parseFragment(html);
appendChild(ast, script);
ast.childNodes.forEach((node) =>
//@ts-ignore
node.attrs?.push({ name: "data-hmr", value: htmlIdMap.get(filename) })
);
}
// Burst CSS cache
findElements(ast, (e) => getTagName(e) === "link").forEach((link) => {
const href = link.attrs.find((attr) => attr.name === "href");
const rel = link.attrs.find((attr) => attr.name === "rel");
if (rel.value === "stylesheet") {
href.value += `?v=${Math.random().toFixed(4)}`;
}
});
return serialize(ast);
}
function createHMRHandlers(files) {
files.forEach((filename) => {
const newFilename = "/" + filename.replace(/src\//, "");
const filePath = newFilename.split("/");
const endName = filePath.pop();
if (endName.endsWith("index.html")) {
//@ts-ignore
fastify.get(filePath.join("/") + "/", HMRHandler);
}
//@ts-ignore
fastify.get(newFilename, HMRHandler);
});
}
function HMRHandler(request, reply) {
let filename = request.url;
if (filename.endsWith("/")) {
filename += "index.html";
}
filename = BUILD_FOLDER + filename;
const file = fs.readFileSync(filename, {
encoding: "utf-8",
});
reply.header("Content-Type", "text/html; charset=UTF-8");
return reply.send(addHMRCode(file, filename));
}
function errorHandler(err) {
if (err) {
console.error(err);
process.exit(1);
}
}
function tsMaybeX2JS(filename) {
return filename.replace(".ts", ".js").replace(".jsx", ".js");
}
}
function createDefaultServer(BUILD_FOLDER = "build") {
fastify = Fastify(
isSecure
? {
http2: true,
https: {
key: fs.readFileSync(path.join(process.cwd(), "localhost-key.pem")),
cert: fs.readFileSync(path.join(process.cwd(), "localhost.pem")),
},
}
: void 0
);
fastify.register(fastifyStatic, {
root: path.join(process.cwd(), BUILD_FOLDER),
});
}
| javascript |
<reponame>silverskyvicto/alfresco-ng2-components
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* 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 { ComponentFixture, TestBed } from '@angular/core/testing';
import { SearchService, setupTestBed } from '@alfresco/adf-core';
import { differentResult, result, SimpleSearchTestComponent } from '../../mock';
import { of, throwError } from 'rxjs';
import { ContentTestingModule } from '../../testing/content.testing.module';
import { TranslateModule } from '@ngx-translate/core';
describe('SearchComponent', () => {
let fixture: ComponentFixture<SimpleSearchTestComponent>;
let element: HTMLElement;
let component: SimpleSearchTestComponent;
let searchService: SearchService;
setupTestBed({
imports: [
TranslateModule.forRoot(),
ContentTestingModule
],
declarations: [SimpleSearchTestComponent]
});
beforeEach(() => {
fixture = TestBed.createComponent(SimpleSearchTestComponent);
component = fixture.componentInstance;
element = fixture.nativeElement;
searchService = TestBed.inject(SearchService);
});
describe('search results', () => {
it('should clear results straight away when a new search term is entered', (done) => {
spyOn(searchService, 'search').and.returnValues(
of(result),
of(differentResult)
);
component.setSearchWordTo('searchTerm');
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
let optionShowed = element.querySelectorAll('#autocomplete-search-result-list > li').length;
expect(optionShowed).toBe(1);
component.setSearchWordTo('searchTerm2');
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
optionShowed = element.querySelectorAll('#autocomplete-search-result-list > li').length;
expect(optionShowed).toBe(1);
done();
});
});
});
it('should display the returned search results', (done) => {
spyOn(searchService, 'search').and.returnValue(of(result));
component.setSearchWordTo('searchTerm');
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(element.querySelector('#result_option_0').textContent.trim()).toBe('MyDoc');
done();
});
});
it('should emit error event when search call fail', (done) => {
spyOn(searchService, 'search')
.and.returnValue(throwError({ status: 402 }));
component.setSearchWordTo('searchTerm');
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
const message = element.querySelector<HTMLElement>('#component-result-message');
expect(message.textContent).toBe('ERROR');
done();
});
});
it('should be able to hide the result panel', (done) => {
spyOn(searchService, 'search').and.returnValues(
of(result),
of(differentResult)
);
component.setSearchWordTo('searchTerm');
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
const optionShowed = element.querySelectorAll('#autocomplete-search-result-list');
expect(optionShowed).not.toBeNull();
component.forceHidePanel();
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
const elementList = element.querySelector('#adf-search-results-content');
expect(elementList.classList).toContain('adf-search-hide');
done();
});
});
});
});
describe('search node', () => {
it('should perform a search with a defaultNode if no search node is given', (done) => {
spyOn(searchService, 'search').and.returnValue(of(result));
component.setSearchWordTo('searchTerm');
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
const optionShowed = element.querySelectorAll('#autocomplete-search-result-list > li').length;
expect(optionShowed).toBe(1);
const folderOption = element.querySelector<HTMLElement>('#result_option_0');
expect(folderOption.textContent.trim()).toBe('MyDoc');
done();
});
});
});
});
| typescript |
<gh_stars>1-10
{"rita-web-nolex.js":"<KEY>,"rita-web.js":"<KEY>,"rita.js":"<KEY>} | json |
Apple shares cruised to a record-high close Monday, helping catapult the S&P 500 stock index over the $20 trillion (roughly Rs. 13,38,94,055 crores) mark in what amounts to a victory for plain-vanilla mutual funds over a bevy of hedge fund managers who recently backed away from the iPhone maker.
The largest component of the S&P 500 and a core holding on Wall Street, Apple's stock climbed 0.9 percent to end at $133.29, above its record high close of $133.00 hit on February 23, 2015 and giving it a market value of about $699 billion.
Its increase helped balloon the S&P 500's market capitalisation on Monday beyond $20 trillion for the first time.
While mutual funds have largely bet on Apple in recent months, some big names missed out on all or part of its recent acceleration.
Hedge fund manager Dan Loeb's Third Point LLC cut its stake in Apple by 26 percent to 1.9 million shares in the fourth quarter, according to regulatory filings, while George Soros and Carl Icahn also shed their Apple shares last year.
In contrast, the number of mutual funds reporting they became Apple shareholders in recent quarterly filings has jumped by 187 percent to 287, while the number of mutual funds liquidating their Apple holdings dropped by 26 percent to 151, according to Morningstar.
Among the big names who backed the stock, Warren Buffett's Berkshire Hathaway last August said it had increased its stake in Apple by 55 percent to 15 million shares, now worth $2 billion (roughly Rs. 13,387 crores). David Einhorn's hedge fund Greenlight Capital in January said it still likes Apple.
Apple has climbed 50 percent from lows in the first half of last year and is up 15 percent so far in 2017. It was still short of its all-time intraday high of $134.54, set on April 28, 2015.
Monday's gain came after Goldman Sachs analyst Simona Jankowski raised her price target for Apple to $150. She said she is more confident that an upcoming 10th anniversary iPhone will feature augmented-reality technology, which could help boost demand in a saturated smartphone market.
Many investors are betting that Apple will mark the iPhone's 10th anniversary with a dramatically improved model. They also believe that strong sales of the iPhone 6S two years ago have left a larger-than-normal base of customers ready to upgrade.
The Cupertino, California company reported strong December-quarter results on Jan. 31, and although it gave a cautious outlook for the current quarter, Wall Street expects revenue to grow this year after sinking nearly 8 percent in fiscal 2016.
In 1998, when the S&P 500 closed above $10 trillion for the first time, Apple accounted for just under 0.06 percent of the index. It now accounts for about 3.5 percent of the S&P 500, according to S&P Dow Jones Indices.
The 721 days that have passed since Apple's previous record-high close represent the largest gap between such milestones since the iPhone's launch in 2007.
| english |
<reponame>mssdesign/portifolios
import React from 'react'
import './Contact.css'
const Contact = () => {
return (
<div className="contact">
<div className="socialNetworks">
<a href='https://www.linkedin.com/in/matheus-soares-mssdesign/' target="_blank" className="icon">
<svg viewBox="0 0 128 128">
<path
fill="#0076b2"
d="M116 3H12a8.91 8.91 0 00-9 8.8v104.42a8.91 8.91 0 009 8.78h104a8.93 8.93 0 009-8.81V11.77A8.93 8.93 0 00116 3z"
></path>
<path
fill="#fff"
d="M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 11-10.5 10.49 10.5 10.5 0 0110.5-10.49M50.53 48.73h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z"
></path>
</svg>
<p className='label'>Linkedin</p>
</a>
<a href='https://github.com/mssdesign' target="_blank" className="icon">
<svg viewBox="0 0 128 128">
<g fill="#ffffff">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M64 5.103c-33.347 0-60.388 27.035-60.388 60.388 0 26.682 17.303 49.317 41.297 57.303 3.017.56 4.125-1.31 4.125-2.905 0-1.44-.056-6.197-.082-11.243-16.8 3.653-20.345-7.125-20.345-7.125-2.747-6.98-6.705-8.836-6.705-8.836-5.48-3.748.413-3.67.413-3.67 6.063.425 9.257 6.223 9.257 6.223 5.386 9.23 14.127 6.562 17.573 5.02.542-3.903 2.107-6.568 3.834-8.076-13.413-1.525-27.514-6.704-27.514-29.843 0-6.593 2.36-11.98 6.223-16.21-.628-1.52-2.695-7.662.584-15.98 0 0 5.07-1.623 16.61 6.19C53.7 35 58.867 34.327 64 34.304c5.13.023 10.3.694 15.127 2.033 11.526-7.813 16.59-6.19 16.59-6.19 3.287 8.317 1.22 14.46.593 15.98 3.872 4.23 6.215 9.617 6.215 16.21 0 23.194-14.127 28.3-27.574 29.796 2.167 1.874 4.097 5.55 4.097 11.183 0 8.08-.07 14.583-.07 16.572 0 1.607 1.088 3.49 4.148 2.897 23.98-7.994 41.263-30.622 41.263-57.294C124.388 32.14 97.35 5.104 64 5.104z"
></path>
<path d="M26.484 91.806c-.133.3-.605.39-1.035.185-.44-.196-.685-.605-.543-.906.13-.31.603-.395 1.04-.188.44.197.69.61.537.91zm2.446 2.729c-.287.267-.85.143-1.232-.28-.396-.42-.47-.983-.177-1.254.298-.266.844-.14 1.24.28.394.426.472.984.17 1.255zM31.312 98.012c-.37.258-.976.017-1.35-.52-.37-.538-.37-1.183.01-1.44.373-.258.97-.025 1.35.507.368.545.368 1.19-.01 1.452zm3.261 3.361c-.33.365-1.036.267-1.552-.23-.527-.487-.674-1.18-.343-1.544.336-.366 1.045-.264 1.564.23.527.486.686 1.18.333 1.543zm4.5 1.951c-.147.473-.825.688-1.51.486-.683-.207-1.13-.76-.99-1.238.14-.477.823-.7 1.512-.485.683.206 1.13.756.988 1.237zm4.943.361c.017.498-.563.91-1.28.92-.723.017-1.308-.387-1.315-.877 0-.503.568-.91 1.29-.924.717-.013 1.306.387 1.306.88zm4.598-.782c.086.485-.413.984-1.126 1.117-.7.13-1.35-.172-1.44-.653-.086-.498.422-.997 1.122-1.126.714-.123 1.354.17 1.444.663zm0 0"></path>
</g>
</svg>
<p className='label'>GitHub</p>
</a>
<a href='https://api.whatsapp.com/send?phone=556198373086' target="_blank" className="icon">
<svg viewBox="0 0 32 32">
<g fill="#4DC247">
<path
d=" M19.11 17.205c-.372 0-1.088 1.39-1.518 1.39a.63.63 0 0 1-.315-.1c-.802-.402-1.504-.817-2.163-1.447-.545-.516-1.146-1.29-1.46-1.963a.426.426 0 0 1-.073-.215c0-.33.99-.945.99-1.49 0-.143-.73-2.09-.832-2.335-.143-.372-.214-.487-.6-.487-.187 0-.36-.043-.53-.043-.302 0-.53.115-.746.315-.688.645-1.032 1.318-1.06 2.264v.114c-.015.99.472 1.977 1.017 2.78 1.23 1.82 2.506 3.41 4.554 4.34.616.287 2.035.888 2.722.888.817 0 2.15-.515 2.478-1.318.13-.33.244-.73.244-1.088 0-.058 0-.144-.03-.215-.1-.172-2.434-1.39-2.678-1.39zm-2.908 7.593c-1.747 0-3.48-.53-4.942-1.49L7.793 24.41l1.132-3.337a8.955 8.955 0 0 1-1.72-5.272c0-4.955 4.04-8.995 8.997-8.995S25.2 10.845 25.2 15.8c0 4.958-4.04 8.998-8.998 8.998zm0-19.798c-5.96 0-10.8 4.842-10.8 10.8 0 1.964.53 3.898 1.546 5.574L5 27.176l5.974-1.92a10.807 10.807 0 0 0 16.03-9.455c0-5.958-4.842-10.8-10.802-10.8z"
fillRule="evenodd"
></path>
</g>
</svg>
<p className='label'>Whatsapp</p>
</a>
</div>
<p className="email label">📫 Contato: <EMAIL></p>
<p>© mssdesign</p>
</div>
)
}
export default Contact
| typescript |
Apple has introduced its latest iPhone 7 that features a souped-up camera and a new headphone jack. Looking to upgrade? Here are a few options.
Last year, Apple started offering installment-purchase plans for iPhones, with a twist. The plans start at $32. 41 a month, and after 24 months you own the phone.
The twist is that you can upgrade to a new phone every year — technically, after making 12 payments, turning in your old phone and starting a new installment plan. You could still owe more if your phone is damaged; while Apple includes its AppleCare service program, which covers two damage “incidents,” it will charge you $29 for screen damage and $99 for any other damage, plus tax.
The days of two-year contracts and subsidized phones are over. Most wireless carriers now offer a monthly buy-to-own option as standard. For example, AT&T offers an iPhone 6S plan for $21. 67 a month for 24 months. The caveat? If you lose or break your phone, or if it gets stolen, you are still on the hook for paying for it for 24 months, unless you buy insurance, which is usually about $10 a month.
A new iPhone 7 starts at $649 for 32 gigabytes of storage, double the base storage of previous iPhones, while an iPhone 7 Plus starts at $769. An older model such as the SE starts at $399. Trading in your old iPhone can garner you about $250 to $300, depending on the make and model, shaving some dollars off that price.
This story has been corrected to show that an iPhone 7 starts at $649, not $769, which is the price of the iPhone 7 Plus. It also corrects the description of Apple’s installment-purchase plan, which is not a lease program. | english |
Animal instinct seems to have won over human intervention in one particular case as a pair of tigers detached the radio-collar fastened onto a tigress less than two weeks ago by officials of the State's forest department as part of the ongoing tiger census.
The abandoned, fully functional radio-collar was found in fairly good condition in the Pirakhali forest area of the reserve on Thursday.
“For the last three days we had stopped receiving the satellite signal from the tigress so we went into the forest area to investigate. By tracing the collar via an antenna we found that it had had fallen off,” said Subrat Mukherjee, field director of the Sunderban Tiger Reserve (STR).
The collar will be fastened to another animal after the nuts and bolts have been changed, Mr. Mukherjee added.
So far, radio collars have been fastened to two tigresses as a part of the tiger census.
The project, for which the reserve paid Rs. 35 lakh to the Wildlife Institute of India (WII), involves the tagging of 8 tigers within the reserve that will be monitored for about a year by experts of the institute and officials of the forest department.
While the instance of a radio collar falling off is not uncommon (there have been 17 such incidents all over the country), concerns have been raised about the success of the initiative in the Sunderbans.
In December 2007, a tigress was fitted with a radio collar which stopped functioning in just over three months, after the animal had roamed an area of 35 sq km. Although the cause of the malfunction could not be ascertained, it is speculated that a “saline water shock” could be responsible. | english |
{
"extName": {
"message": "Talking Gmail",
"description": "Extension name"
},
"extDesc": {
"message": "Sit back, listen.",
"description": "Extension description"
},
"menuBtnText": {
"message": "Read this message",
"description": "Text to display on the menu button"
},
"btnTooltipPrev": {
"message": "Previous",
"description": "Tooltip on the controller previous button"
},
"btnTooltipStop": {
"message": "Stop",
"description": "Tooltip on the controller stop button"
},
"btnTooltipPause": {
"message": "Pause",
"description": "Tooltip on the controller pause button"
},
"btnTooltipResume": {
"message": "Resume",
"description": "Tooltip on the controller resume button"
},
"btnTooltipNext": {
"message": "Next",
"description": "Tooltip on the controller next button"
}
} | json |
Gameweek 6 ended with an exciting group of thrilling matches in the English Premier League. Manchester United travelled to London Stadium for a clash against West Ham United, and with a strong 2-0 win, the Hammers sent them back empty-handed.
Crystal Palace invited Wolverhampton Wanderers to Selhurst Park where they each took a point away from their clash. Arsenal hosted Aston Villa at the Emirates Stadium where they miraculously came back to win 3-2. Finally, at Stamford Bridge, Chelsea received a 2-1 beating from an unstoppable Liverpool.
Against West Ham, the Red Devils had the possession, the passes, and the shots. But the Hammers were way too clinical for Manchester United.
On the cusp of half time, Andriy Yarmolenko led the Hammers to their first goal of the evening. It was an exciting piece of play, with Mark Noble passing the ball to Felipe Anderson who, in turn, sent a perfect pass in the path of Yarmolenko. A quick touch from the Ukrainian was all he needed to twist past his marker to open up space. He took a left-shooted shot that beat David de Gea and entered the left bottom corner of the post.
West Ham's second goal was scored in the final minutes of the game from a well-taken free kick by Aaron Cresswell. The wingback took his set-piece from the right side of the box and deftly curled the ball past David de Gea into the top right corner of the goal.
The Hammers were quite sturdy at the back, keeping United at bay constantly and finishing the game with a clean sheet alongside their win.
At Selhurst Park, a draw seemed like the best choice for two sides that played a close, similar game. Crystal Palace and Wolves had the same shots at goal, nearly the same possession, and similar passing statistics. However, Wolves will rue the own-goal scored by Leander Dendoncker.
It was just moments after the second half started, when a Palace attack found Ward whose powerful shot hit Dendoncker. The ball unpredictably deflected off the midfielder, couldn't be stopped by Rui Patricio, and found itself in the net.
Wolves found their moment to equalize in the dying minutes of the game. Although they had received a red card - given to Romain Saiss - Wolves continued to search for opportunites, and they found it in the 95th minute. A final cross from Adama Traore on the right was miscalculated by Palace defenders, and the ball fell for Diogo Jota on the far post. The Portuguese hoofed it into the net, setting the visitors' section of the stadium in pandemonium.
The Emirates Stadium saw a more intense game, with Aston Villa scoring two goals to the despair of Arsenal fans. More shocking, Ainsley Maitland-Niles received a red card late in the first half, leaving the Gunners in the lurch. A miraculous comeback, however, saw Arsenal score three goals, erupting cheers from the whole stadium.
Only 20 minutes in, a great cross from El Ghazi found a completely unmarked Villa's number 7 man John McGinn. A simple touch from McGinn, who had drifted in on the far side, put the ball past Bernd Leno right into the bottom corner of the net.
58 minutes into the game, Matteo Guendouzi was shoved by Engels, right in the penalty box, forcing the referee to point at the spot. VAR was checked, and the decision stood. It was Nicolas Pepe who took the spot-kick, sending the ball to the middle of the goal as Villa keeper Heaton dived left.
Only 90 seconds after Arsenal's equalizer, Wesley Moraes drove Aston Villa ahead again, thanks to superb play by Jack Grealish. Grealish ran down the flank, unstoppable, and sent a cross towards a waiting Moraes who got to the ball before an onrushing Leno, and put it in the net.
Arsenal defender Callum Chambers was the man to get the equalizer for the Gunners in the 81st minute. A cross from Guendouzi found quite a number of players littered in the box, and a lucky Chambers got to it first. He sent the ball past Heaton into the top corner of the goal.
Pierre-Emerick Aubameyang finally made his mark on the game only three minutes after. He lined up for a free-kick from outside the box, sent it over the wall, and dipped the ball into the bottom corner of the net. An unlucky Heaton was not expecting it and stood rooted to the spot.
Aubameyang's amazing goal saw Arsenal take three deserved points with only ten men on the field throughout an entire half.
At Stamford Bridge, Chelsea totally bossed the proceedings, but weren't clinical at all, letting eleven shots fly beyond the target. Liverpool, although with fewer chances, made more of their opportunities and won the game.
Liverpool opened the scoring in the 14th minute with a well-executed freekick right on the edge of Chelsea's box. Salah played a deft ball back to an onrushing Trent Alexander-Arnold who took a driving shot straight into the top right corner of the goal.
30 minutes in, Roberto Firmino put Liverpool ahead only minutes after Chelsea's goal was ruled out. A freekick by Andrew Robertson on the left wing was lifted into the box and found by Firmino who headed it past Kepa Arizzabalaga and into the net.
An amazing solo effort by N'Golo Kante gave Chelsea a consolation goal in the 71st minute. A pass from Azpilicueta was all Kante needed to start his run. He dodged Fabihno with a great turn, ran to the edge of the box, and fired a great shot past Adrian into the top right corner.
Chelsea will feel cheated by VAR, but they have to take the loss this time, as Liverpool remain head and shoulders above every other team in the league.
On Saturday, Tottenham went down 2-1 away from home at Leicester after James Maddison inspired a come-from-behind triumph, while Manchester City, courtesy a Bernardo Silva hat-trick and a brilliant display by Kevin De Bruyne, hammered Watford 8-0.
| english |
England wicket-keeper batsman, Jos Buttler, is among the finest in business when it comes to white-ball cricket. Just like every player, Buttler too had his heroes while growing up. In fact, there were two Indian cricket greats who inspired the Englishman to take up the sport.
Most batsmen of the current generation, not just in India, saw Sachin Tendulkar as their inspiration. The Master Blaster, arguably the finest batsman in world cricket over the last 20-30 years, has the biggest records to his name in the sport. But, for Buttler, the inspiration came from the likes of Rahul Dravid and Sourav Ganguly.
“Those were my formative years and watching that game with Ganguly and Dravid scoring big hundreds had an incredible impact,” Buttler was quoted as saying to Cricbuzz.
Ganguly and Dravid are two of the finest players to ever don the Indian jersey. The two were at the center of many match-winning performances over the years. One partnership of theirs that left a huge impact on Buttler was the one against Sri Lanka at the 1999 World Cup in Taunton.
“Ind vs SL, Taunton, 1999 World Cup was my first experience of seeing Indian crowds and that ignites the fire of how passionate people are about the game and how cool it would be to play in a World Cup,” he added.
The Indian duo stitched a 318-run stand for the second wicket, with Ganguly scoring 183 and Dravid 145. Thanks to their partnership, India put 373 runs on the board which was a mammoth of a target back then. Sri Lanka were bundled out for 216 while chasing.
Buttler is also an extremely loved cricketer in India, especially since he started playing in the Indian Premier League. The Englishman currently plies trade for Rajasthan Royals.
On the international circuit, Buttler will next be seen in action against Sri Lanka. He is unlikely to be picked for the New Zealand Test series having recently returned home from India after the IPL 2021 campaign was suspended. | english |
import { IRatioParams, IRatio } from './types';
import { gcd } from './gcd';
/**
* width : height 비율 반환
* @memberof module:math
* @function
* @param {Number} width
* @param {Number} height
* @returns {IRatio}
*/
export const sizeRatio = ({ width, height }: IRatioParams): IRatio => {
const gcdValue = gcd(width, height);
const w = width / gcdValue;
const h = height / gcdValue;
const ratio = {
width: w,
height: h,
ratio: `${w}x${h}`
};
return ratio;
};
| typescript |
/* Globals */
body {
font-family: pt-sans-narrow, sans-serif;
font-size: 100%;
line-height: 100%;
padding: 0 6%;
color: rgb(102, 102, 102);
}
.wrapper,
.section {
position: relative;
display: block;
clear: both;
float: left;
}
.wrapper {
width: 97%;
padding: 1em 1.5% 0;
margin: 0 0 1em;
}
.section {
width: 100%;
}
.page-title {
font-family: 'Oswald', sans-serif;
font-size: 3rem;
line-height: 1;
text-transform: uppercase;
text-align: center;
margin-top: 0;
}
.section-title {
font-family: 'Oswald', sans-serif;
font-size: 1.5rem;
line-height: 1.5;
font-weight: 400;
color: rgb(209, 72, 54);
font-variant: small-caps;
border-bottom: .05em solid rgb(226, 226, 226);
}
.section-subtitle {
font-size: .9rem;
line-height: 1.2;
text-transform: uppercase;
}
h6 {
margin: 0;
clear: both;
}
p {
font-size: .95rem;
line-height: 1.4;
}
a {
color: rgb(209, 72, 54);
font-weight: 700;
text-decoration: none;
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out;
}
a:hover {
text-decoration: underline;
}
code, pre {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
font-size: .8rem;
border: .1rem solid rgb(233, 230, 232);
background-color: rgb(249, 252, 247);
-webkit-border-radius: .2rem;
-moz-border-radius: .2rem;
border-radius: .2rem;
}
code {
color: rgb(209, 72, 54);
padding: .2em .6em .1em .5em;
white-space: nowrap;
}
pre {
color: rgb(136, 136, 136);
position: relative;
display: block;
padding: .9em;
margin: 0 0 1em;
word-break: break-all;
word-wrap: break-word;
white-space: pre;
white-space: pre-wrap;
}
/* Top bar */
.top-bar {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: rgb(102, 102, 102);
box-shadow: 0 .1em .3em rgba(0, 0, 0, .3);
z-index: 5;
}
.top-bar nav {
position: absolute;
left: 0;
width: 82%;
max-width: 82%;
}
.top-bar .social-links {
position: absolute;
right: 0;
width: 18%;
max-width: 18%;
}
.top-bar ul {
position: relative;
list-style: none;
margin: 0;
padding: 0;
font-size: 0;
}
.top-bar li {
display: block;
}
.navigation li {
font-size: 1rem;
line-height: 3;
}
.navigation a,
.social-links a {
display: block;
position: relative;
font-weight: 400;
border-style: solid;
border-color: rgb(71, 71, 71);
background-color: rgb(88, 88, 88);
text-shadow: .1rem .1rem 0 rgb(71, 71, 71);
}
.navigation a {
font-family: 'Oswald', sans-serif;
color: rgb(201, 201, 201);
padding: 0 1.5rem;
border-width: 0 .1rem .1rem 0;
}
.social-links a {
color: rgb(140, 140, 140);
border-width: 0 0 .1rem .1rem;
}
.navigation a:hover,
.social-links a:hover {
color: rgb(48, 48, 48);
text-decoration: none;
background-color: rgb(82, 81, 81);
text-shadow: .1rem .1rem 0 rgba(255, 255, 255, .2);
}
.social-links li a span {
display: block;
padding: 0 1rem;
font-size: 1.3rem;
line-height: 2.3;
}
.item-first a {
color: rgb(255, 255, 255);
text-transform: uppercase;
border-width: 0 .1rem .1rem 0;
border-color: rgb(176, 40, 26);
background-color: rgb(209, 72, 54);
text-shadow: .1rem .1rem 0 rgb(209, 72, 54), .15rem .15rem 0 rgb(52, 52, 52);
}
.item-first a:hover {
color: rgb(121, 27, 14);
background-color: rgb(197, 55, 39);
text-shadow: .1rem .1rem 0 rgba(255, 255, 255, .3);
}
.navigation .item-first {
display: block;
}
.navigation .item-first a {
display: block;
padding: 0 0 0 1.5rem;
}
.item-first .icon {
margin-top: 1rem;
margin-right: .7rem;
}
.item-first .icon .icon-menu,
.item-first .icon .icon-menu:before,
.item-first .icon .icon-menu:after {
background-color: rgb(228, 228, 228);
box-shadow: .1em .1em 0 rgb(52, 52, 52);
}
.item-first:hover .icon .icon-menu,
.item-first:hover .icon .icon-menu:before,
.item-first:hover .icon .icon-menu:after {
box-shadow: .1em .1em 0 rgba(255, 255, 255, .3);
background-color: rgb(121, 27, 14);
}
/* Header */
.home .hgroup {
margin-bottom: 8em;
}
.title,
.desc {
text-align: center;
font-family: 'Oswald', sans-serif;
}
.title {
font-size: 3em;
line-height: 1em;
font-weight: 700;
text-transform: uppercase;
margin: 1em 0 0;
color: rgb(209, 72, 54);
text-shadow: .02em .02em 0 rgb(255, 255, 255), .05em .03em 0 rgb(102, 102, 102);
}
.desc {
font-size: 1em;
line-height: 2em;
font-weight: 300;
margin: 0 0 1em;
}
/* Devices */
.devices {
top: 35%;
left: 15%;
position: absolute;
}
.devices .icon-large {
top: .8em;
left: -.7em;
}
.devices .icon-mid {
top: 2.8em;
left: -2.8em;
}
/* Download and View on Github */
.section-action {
padding: 1em 0 0;
margin: 5em 0 0;
border: .1em solid rgb(226, 226, 226);
background-color: rgb(235, 235, 235);
border-radius: .25em;
}
.section-action:hover {
border-color: rgb(207, 207, 207);
background-color: rgb(226, 226, 226);
}
.section-action,
.section-action a,
.download,
.view-on-github,
.download .icon,
.download .icon-download,
.download .icon-download:before,
.download .icon-download:after {
-webkit-transition: all .4s ease-out;
-moz-transition: all .4s ease-out;
-ms-transition: all .4s ease-out;
-o-transition: all .4s ease-out;
transition: all .4s ease-out;
}
.download,
.view-on-github {
display: block;
position: relative;
width: 92%;
margin-bottom: 1em;
margin-left: 4%;
line-height: 3.5em;
text-align: center;
border: .1em solid transparent;
border-radius: .2em;
-moz-box-shadow: 0 .1em .1em rgba(0, 0, 0, .85);
-webkit-box-shadow: 0 .1em .1em rgba(0, 0, 0, .85);
box-shadow: 0 .1em .1em rgba(0, 0, 0, .85);
}
.download:hover,
.view-on-github:hover {
-webkit-box-shadow: 0 .1em .1em rgba(0, 0, 0, .1);
-moz-box-shadow: 0 .1em .1em rgba(0, 0, 0, .1);
box-shadow: 0 .1em .1em rgba(0, 0, 0, .1);
}
.download {
background: rgb(209, 72, 54);
background: -moz-linear-gradient(top, rgb(221,75,57) 0%, rgb(209,72,54) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(221,75,57)), color-stop(100%,rgb(209,72,54)));
background: -webkit-linear-gradient(top, rgb(221,75,57) 0%,rgb(209,72,54) 100%);
background: -o-linear-gradient(top, rgb(221,75,57) 0%,rgb(209,72,54) 100%);
background: -ms-linear-gradient(top, rgb(221,75,57) 0%,rgb(209,72,54) 100%);
background: linear-gradient(to bottom, rgb(221,75,57) 0%,rgb(209,72,54) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dd4b39', endColorstr='#d14836',GradientType=0 );
}
.download:hover {
background: rgb(197, 55, 39);
background: -moz-linear-gradient(top, rgb(221,75,57) 0%, rgb(197,55,39) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(221,75,57)), color-stop(100%,rgb(197,55,39)));
background: -webkit-linear-gradient(top, rgb(221,75,57) 0%,rgb(197,55,39) 100%);
background: -o-linear-gradient(top, rgb(221,75,57) 0%,rgb(197,55,39) 100%);
background: -ms-linear-gradient(top, rgb(221,75,57) 0%,rgb(197,55,39) 100%);
background: linear-gradient(to bottom, rgb(221,75,57) 0%,rgb(197,55,39) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dd4b39', endColorstr='#c53727',GradientType=0 );
border-color: rgb(176, 40, 26) rgb(176, 40, 26) rgb(175, 48, 31);
}
.view-on-github {
background: rgb(104,216,130);
background: -moz-linear-gradient(top, rgb(104,216,130) 0%, rgb(75,183,118) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(104,216,130)), color-stop(100%,rgb(75,183,118)));
background: -webkit-linear-gradient(top, rgb(104,216,130) 0%,rgb(75,183,118) 100%);
background: -o-linear-gradient(top, rgb(104,216,130) 0%,rgb(75,183,118) 100%);
background: -ms-linear-gradient(top, rgb(104,216,130) 0%,rgb(75,183,118) 100%);
background: linear-gradient(to bottom, rgb(104,216,130) 0%,rgb(75,183,118) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#68d882', endColorstr='#4bb776',GradientType=0 );
}
.view-on-github:hover {
background: rgb(83,214,111);
background: -moz-linear-gradient(top, rgb(83,214,111) 0%, rgb(54,181,102) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(83,214,111)), color-stop(100%,rgb(54,181,102)));
background: -webkit-linear-gradient(top, rgb(83,214,111) 0%,rgb(54,181,102) 100%);
background: -o-linear-gradient(top, rgb(83,214,111) 0%,rgb(54,181,102) 100%);
background: -ms-linear-gradient(top, rgb(83,214,111) 0%,rgb(54,181,102) 100%);
background: linear-gradient(to bottom, rgb(83,214,111) 0%,rgb(54,181,102) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#53d66f', endColorstr='#36b566',GradientType=0 );
border-color: rgb(13, 143, 18) rgb(13, 143, 18) rgb(13, 160, 19);
}
.section-action a {
font-size: 1.5em;
color: rgb(255, 255, 255);
text-transform: uppercase;
display: block;
text-shadow: .08em .08em .08em rgba(0, 0, 0, .5);
}
.section-action a:hover {
text-decoration: none;
text-shadow: .05em .05em 0 rgba(255, 255, 255, .3);
}
.download a:hover {
color: rgb(121, 27, 14);
}
.view-on-github a:hover {
color: rgb(14, 107, 35);
}
.view-on-github .icon-github {
font-size: 1.2rem;
margin-right: .5rem;
}
.download .icon {
top: 1.3em;
left: 20%;
box-shadow: 0 .1em 0 rgba(0, 0, 0, .25);
}
.download .icon-download {
background-color: rgb(255, 255, 255);
}
.download .icon-download:before {
border-color: rgb(255, 255, 255) transparent transparent transparent;
}
.download .icon-download:after {
border-color: rgb(255, 255, 255);
}
.download:hover .icon {
box-shadow: 0 .1em 0 rgba(255, 255, 255, .3);
}
.download:hover .icon-download {
background-color: rgb(121, 27, 14);
}
.download:hover .icon-download:before {
border-color: rgb(121, 27, 14) transparent transparent transparent;
}
.download:hover .icon-download:after {
border-color: rgb(121, 27, 14);
}
/* Preview */
.section-preview {
padding-top: 4em;
}
.section-preview ul {
margin: 0;
padding: 0;
width: 99.9%;
float: left;
}
.section-preview li {
list-style: none;
padding: .7em 0 .5em 1em;
border-top: .1em solid rgb(226, 226, 226);
border-left: .1em solid rgb(226, 226, 226);
border-right: .1em solid rgb(226, 226, 226);
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out;
}
.fifth li:last-child {
border-bottom: .1em solid rgb(226, 226, 226);
}
.section-preview li:hover {
background-color: rgb(242, 242, 242);
}
.section-preview li code {
display: inline-block;
position: relative;
margin: .5em 0 .5em 1.5em;
}
/* About */
.section-usage,
.section-examples,
.section-about {
padding-top: 2em;
}
/* Usage */
.section-usage li {
line-height: 1.8em;
}
.section-usage .icons,
.section-examples .icons {
display: block;
overflow: hidden;
}
/* Examples */
.section-examples .icon {
margin: 0 .5rem 1rem 0;
}
.full-list-link {
clear: both;
padding: .3rem 0;
}
.full-list-link .icon-link {
color: rgb(136, 136, 136);
font-size: .7rem;
margin-right: .2rem;
}
/* Columns */
.columns-wrap {
position: relative;
display: block;
clear: both;
width: 100%;
overflow: hidden;
}
.column-2,
.column-3,
.column-4,
.column-4_3,
.column-5,
.column-6 {
margin-bottom: 1.5em;
position: relative;
width: 100%;
}
/* Icons list */
.section-default .icons-list .icon {
margin: 0 1.5rem 1rem 0;
}
.section-squares .icons-list .icon,
.section-rounded .icons-list .icon {
margin: 0 1.2rem 1.2rem 0;
}
.mid-icons .section-default .icons-list .icon {
margin: 0 2rem 1.5rem 0;
}
.large-icons .section-default .icons-list .icon {
margin: 0 3rem 2rem 0;
}
.large-icons .section-squares .icons-list .icon,
.large-icons .section-rounded .icons-list .icon {
margin: 0 1.6rem 1.6rem 0;
}
.extra-large-icons .section-default .icons-list .icon {
margin: 0 4rem 3rem 0;
}
.extra-large-icons .section-squares .icons-list .icon,
.extra-large-icons .section-rounded .icons-list .icon {
margin: 0 3.5rem 3.5rem 0;
}
.huge-icons .section-default .icons-list .icon {
margin: 0 4.2rem 3.5rem 0;
}
.huge-icons .section-squares .icons-list .icon,
.huge-icons .section-rounded .icons-list .icon {
margin: 0 4.5rem 4.5rem 0;
}
.footnote {
clear: both;
display: block;
font-style: italic;
}
/* Pagination */
.pagination {
padding: 1rem 0;
margin: 3rem 0 0;
border-top: .1rem solid rgb(226, 226, 226);
border-bottom: .1rem solid rgb(226, 226, 226);
}
.prev-page,
.next-page {
position: relative;
display: inline-block;
}
.prev-page {
float: left;
}
.next-page {
float: right;
text-align: right;
}
.prev-page .icon {
margin-right: .2rem;
}
.next-page .icon {
float: right;
margin-left: .2rem;
}
.icon-pagination {
font-size: .75rem;
top: .12rem;
}
.icon-pagination .icon-arrowLeft,
.icon-pagination .icon-arrowRight {
background-color: rgb(209, 72, 54);
}
.icon-pagination .icon-arrowLeft:after {
border-color: transparent rgb(209, 72, 54) transparent transparent;
}
.icon-pagination .icon-arrowRight:after {
border-color: transparent transparent transparent rgb(209, 72, 54);
}
/* Footer */
.section-colophon {
text-align: center;
text-transform: uppercase;
border-top: .1rem solid rgb(226, 226, 226);
}
.section-colophon p {
font-size: .8rem;
line-height: 1.4;
}
/* IE 8 */
.ie8 code {
font-size: .8em;
}
.ie8 .top-bar ul {
font-size: 1em;
}
.ie8 .navigation a,
.ie8 .social-links a {
border: 0 none;
}
.ie8 .navigation a,
.ie8 .social-links li a span {
padding: 0 1.5em;
}
.ie8 .section-examples .icon {
margin: 0 .5em 1em 0;
}
.ie8 .section-default .icons-list .icon {
margin: 0 1.5em 1em 0;
}
.ie8 .section-squares .icons-list .icon,
.ie8 .section-rounded .icons-list .icon {
margin: 0 1.2em 1.2em 0;
}
@media screen and (min-width: 460px) {
/* Top bar */
.top-bar nav {
width: 88%;
max-width: 88%;
}
.top-bar .social-links {
width: 12%;
max-width: 12%;
}
/* Header */
.title {
font-size: 5em;
}
.desc {
font-size: 1.3em;
}
.devices {
top: 40%;
left: 35%;
}
/* Action */
.download .icon {
left: 30%;
}
}
@media screen and (min-width: 580px) {
/* Action */
.download .icon {
left: 34%;
}
}
@media screen and (min-width: 680px) {
/* Top bar */
.top-bar nav,
.top-bar .social-links {
position: relative;
}
.top-bar nav {
float: left;
width: 69.9%;
max-width: 69.9%;
}
.top-bar .social-links {
text-align: right;
float: right;
width: 30%;
max-width: 30%;
}
.top-bar li {
position: relative;
display: inline-block;
}
.navigation li {
float: left;
}
.item-first .icon,
.social-links .item-first {
display: none;
}
.navigation a {
padding: 0 1.2rem;
}
.navigation .item-first a {
padding: 0 2.2rem;
display: inline-block;
}
.social-links li a span {
padding: 0 .9rem;
}
/* Action */
.section-action {
padding: 2.5em 0;
margin: 4em 0 0;
}
.download,
.view-on-github {
width: 38%;
margin-bottom: 0;
}
.download {
float: left;
margin-left: 6%;
}
.view-on-github {
float: right;
margin-left: 0;
margin-right: 6%;
}
.download .icon {
left: 18%;
}
}
@media screen and (min-width: 740px) {
/* Top bar */
.navigation a {
padding: 0 1.5rem;
}
.navigation .item-first a {
padding: 0 2.5rem;
}
.social-links li a span {
padding: 0 1rem;
}
}
@media screen and (min-width: 800px) {
/* Preview */
.section-preview ul {
width: 32.9%;
}
.section-preview li {
border-top: .1em solid rgb(226, 226, 226);
border-right: .1em solid rgb(226, 226, 226);
border-left: 0 none;
}
.first li,
.fourth li {
border-left: .1em solid rgb(226, 226, 226);
}
.third li:last-child,
.fourth li:last-child {
border-bottom: .1em solid rgb(226, 226, 226);
}
.section-preview li code {
margin: .5em 0 .5em .9em;
}
}
@media screen and (min-width: 880px) {
/* Action */
.download .icon {
left: 25%;
}
}
@media screen and (min-width: 1000px) {
/* Header */
.home .hgroup {
padding-top: 2em;
margin-bottom: 2em;
}
.devices {
left: 5%;
top: 25%;
}
}
@media screen and (min-width: 1260px) {
/* Header */
.devices {
left: 15%;
}
/* Action */
.download,
.view-on-github {
width: 33%;
}
.download .icon {
left: 30%;
}
/* Preview */
.section-preview ul {
width: 19.9%;
}
.fourth li {
border-left: 0 none;
}
.section-preview li:last-child {
border-bottom: .1em solid rgb(226, 226, 226);
}
/* Columns */
.column-2 { /* Margins 2 x 1.5% = 3%, 100% - 3% = 97%, 97% / 2 = 48.5% */
width: 48.5%;
}
.column-3 { /* Margins 4 x 1.5% = 6%, 100% - 6% = 94%, 94% / 3 = 31.333333% */
width: 31.333333%;
}
.column-4 { /* Margins 6 x 1.5% = 9%, 100% - 9% = 91%, 91% / 4 = 22.75% */
width: 22.75%;
}
.column-4_3 { /* 3/4 - Margins 2 x 1.5% = 3%, 100% -3% = 97%, 97% - 22.75% (width of one column-4) = 74.25% */
width: 74.25%;
}
.column-5 { /* Margins 8 x 1.5% = 12%, 100% - 12% = 88%, 88% / 5 = 17.6% */
width: 17.6%;
}
.column-6 { /* Margins 10 x 1.5% = 15%, 100% - 15% = 85%, 85% / 6 = 14.166667% */
width: 14.166667%;
}
.column-first,
.column-inside {
float: left;
}
.column-last {
float: right;
}
.column-first,
.column-inside {
margin-right: 1.5%;
}
.column-last,
.column-inside {
margin-left: 1.5%;
}
}
@media screen and (min-width: 1340px) {
/* Preview */
.section-preview li code {
margin: .5em 0 .5em 1.5em;
}
} | css |
<gh_stars>1-10
<h1><code ng:non-bindable="">$routeParams</code>
<span class="hint">( service in module <code ng:non-bindable="">ng</code>
)</span>
</h1>
<div><h2 id="Description">Description</h2>
<div class="description"><p>Current set of route parameters. The route parameters are a combination of the
<a href="documentation/angular/api/ng.$location"><code>$location</code></a> <code class="plain">search()</code> , and <code class="plain">path()</code> . The <code class="plain">path</code> parameters
are extracted when the <a href="documentation/angular/api/ng.$route"><code>$route</code></a> path is matched.</p>
<p>In case of parameter name collision, <code class="plain">path</code> params take precedence over <code class="plain">search</code> params.</p>
<p>The service guarantees that the identity of the <code class="plain">$routeParams</code> object will remain unchanged
(but its properties will likely change) even when a route change occurs.</p></div>
<h2 id="Dependencies">Dependencies</h2>
<ul class="dependencies"><li><code ng:non-bindable=""><a href="documentation/angular/api/$route">$route</a></code>
</li>
</ul>
<h2 id="Example">Example</h2>
<div class="example"><pre class="prettyprint linenums">
// Given:
// URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
// Route: /Chapter/:chapterId/Section/:sectionId
//
// Then
$routeParams ==> {chapterId:1, sectionId:2, search:'moby'}
</pre></div>
</div>
| html |
package com.gnopai.contactgen.generator.phone;
import com.gnopai.contactgen.generator.ContactData;
import com.gnopai.contactgen.generator.FieldGenerator;
import com.gnopai.contactgen.generator.random.RandomGenerator;
import com.gnopai.contactgen.statistics.ContactStatistics;
import com.google.inject.Inject;
public class PhoneExchangeGenerator implements FieldGenerator {
private final RandomGenerator randomGenerator;
@Inject
public PhoneExchangeGenerator(RandomGenerator randomGenerator) {
this.randomGenerator = randomGenerator;
}
@Override
public ContactData generate(ContactStatistics contactStatistics, ContactData contactData) {
String phoneExchange = generatePhoneExchange();
return contactData.withPhoneExchange(phoneExchange);
}
private String generatePhoneExchange() {
String firstDigit = String.valueOf(randomGenerator.selectInteger(2, 10));
String secondDigit = String.valueOf(randomGenerator.selectInteger(0, 10));
String thirdDigit = String.valueOf(randomGenerator.selectInteger(0, 10));
return firstDigit + secondDigit + thirdDigit;
}
}
| java |
/// @file windows_utilities.hpp
/// @brief class for basic Windows methods
#pragma once
#include <string>
namespace CASM {
namespace Util {
namespace String {
std::string wideToUtf8(wchar_t* lpwstr);
std::wstring utf8ToWide(char const* narrowString);
std::wstring utf8ToWide(char const* narrowString, std::size_t size);
std::wstring utf8ToWide(std::string const& narrowString);
} // namespace String
namespace Filesystem {
bool isExist(char const* narrowPath);
bool isExist(std::string const& narrowPath);
std::string::size_type findExtensionPos(std::string const& filepath);
std::string::size_type findLastPartPos(std::string const& path);
std::string generateNextNameIfExist(std::string const& originalName);
void formatPath(std::string& path);
} // namespace Filesystem
} // namespace Util
class WinUtils {
public:
static std::string HRESULTtoString(int32_t hr);
};
} // namespace CASM
| cpp |
<reponame>kamlesh-microsoft/hl7tools-dotnet
{"id":"0066","tableId":"0066","tableType":"User","name":"Employment Status","chapters":["CH_15"],"entries":[{"value":"1","description":"Full time employed","comment":null},{"value":"2","description":"Part time employed","comment":null},{"value":"3","description":"Unemployed","comment":null},{"value":"4","description":"Self-employed,","comment":null},{"value":"5","description":"Retired","comment":null},{"value":"6","description":"On active military duty","comment":null},{"value":"9","description":"Unknown","comment":null},{"value":"C","description":"Contract, per diem","comment":null},{"value":"L","description":"Leave of absence (e.g. Family leave, sabbatical, etc.)","comment":null},{"value":"O","description":"Other","comment":null},{"value":"T","description":"Temporarily unemployed","comment":null}]} | json |
NAIROBI, Kenya, Oct 28- A new survey by Infotrak has listed Kakamega County as the best performing, placing Governor Wycliffe Oparanya ahead of the pack.
The survey ranked Kakamega at 57. 2 per cent followed by Kwale at 54. 8 percent.
Makueni took the third position with 54. 7 percent while Kisumu is ranked fourth with 53. 4 percent.
“Coincidentally, Oparanya is also rated the best County chief with a massive 82. 3 percent,” said Infotrack Chief Executive Officer Angela Ambitho whiel referring to the Council of Governors Chairman.
She said the survey coversed the last one year.
Oparanya is closely followed by Governor Salim Mvurya of Kwale at 77. 1 percent, with the survey placing Makueni Governor Prof. Kivutha Kibwana third with 74. 4 percent.
Kisumu Governor Anyang Nyong’o is fourth at 65. 9 percent, with Machakos county chief Dr. Alfred Mutua closing the list of the top five at 65. 1 percent.
Infotrack said it conducted the survey through Computer Assisted Telephone system, with respondents interviewed across all the 47 Counties.
In the bottom list, the survey placed Tana River as the least performing at 39. 5 percent. | english |
Ok, I normally don't do this and I will probably regret doing this, but here's a thread on how the very real threat of antisemitism in Ukraine is getting misrepresented in the West.
The main exhibit: this appalling letter to an Orthodox Jewish community leader.
The main exhibit: this appalling letter to an Orthodox Jewish community leader.
What you think if you don't read Ukrainian: Ukrainian police top brass are antisemitic and randomly profile Jews in small towns.
What is actually true: Head of a regional police department in a Western region is antisemitic and profiling a local Orthodox Jewish organization.
What is actually true: Head of a regional police department in a Western region is antisemitic and profiling a local Orthodox Jewish organization.
(Full disclosure: I am a slav-passing atheist Jew not from the region, so I may have some bias both ways).
Something the purveyors of "Ukraine as an antisemitic hellhole" narrative won't tell you is that a ruling party MP elected in a first past the post district in the area, who is a Jew, is now lobbying for that cop to get fired.
Not quite the same as WW2, is it?
Not quite the same as WW2, is it?
The cop might well keep his job, but this is somewhat a different problem: cops are a corporation in Ukraine, willing to entrench their power, led by powerful minister Avakov (who is an Armenian from Kharkiv with troubling ties to white nationalists).
I am not saying Ukraine is free of antisemitism: electing Zelensky did not end it any more than electing Obama ended anti-black racism in the US.
Of course, this narrative trickles to the usual "anti-imperialist" suspects who believe (or want their readers to believe) the US supports a neo-nazi junta in Ukraine, shedding more and more context along the way.
Thing is, them trying to erode Western support for Ukraine actually empowers those neo-nazis and antisemites, who, together with the pro-Russian crowd, claim Ukraine is under attack by George Soros and his "kids" - meaning Western-funded NGO workers and human rights watchdogs.
I don't know why I needed to write this, it definitely won't have a 1/100th of the impact of the Dolinskys and Greenwalds.
Maybe just wanted to get this off my chest.
Maybe just wanted to get this off my chest.
| english |
<reponame>brettonw/build.pl<filename>examples/complex/src/overrides/build.json<gh_stars>0
{
"types": {
"application": {
"compilerOptions": "$compilerOptions -Isource/common",
"dependerOptions": "$dependerOptions -Isource/common",
"linkerOptions": "$linkerOptions -L$buildPath/common/$configuration -lcommon"
}
}
}
| json |
<reponame>JacksonCrawford/relational_contracts
{"URL": "https://www.wired.com/1999/10/rants-and-raves-6", "heading": "rants and raves", "subheading": "date: thu, 14 oct 1999 17:11:34 -0700 from: \u201cjohn polcaro\u201d (<EMAIL>) to: <EMAIL> subject: wire tapping this is in reference to \u201cwiretapping the net: oh, brother,\u201d 12.oct.99. the idea that a state is free is a notion that borders on the absurd\u2026. freedom is relative and can only be conditional\u2026. in order to protect the [\u2026]", "author": "wired blogs", "category": "not found", "type": "article", "timestamp": "10.16.1999 03:00 AM", "text": "date: thu, 14 oct 1999 17:11:34 -0700 from: \"<NAME>\" (<EMAIL>)to: <EMAIL>subject: wire tappingthis is in reference to \"wiretapping the net: oh, brother,\" 12.oct.99. the idea that a state is free is a notion that borders on the absurd....freedom is relative and can only be conditional.... in order to protect the whole of the system under the social contract, it becomes necessary to employ methods of protection from those who wouldviolate the social contract, either for financial gain or criminal mischief. wiretapping is one such method. when used properly and under the strictest scrutiny, it can be one of the most effective methods of combating criminal activity, and protecting innocent, law-abiding members of the contract.i do not believe that wiretapping \u2013 or any other regulatory measures that are designed to govern the internet and protect it's users \u2013 are undesirable, nor do i believe that such measures are unnecessary. the real questions when developing and implementing such regulations, including wiretapping, ought to involve the safety and security of the innocent. in order to accomplish this end, it would be prudent to develop an equal and mandatory set of guidelines and laws against abuse and misuse of such regulatory powers."} | json |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.