text
stringlengths 1
1.04M
| language
stringclasses 25
values |
|---|---|
<reponame>svamja/google-api-wrapper<filename>lib/Drive.js
const { google } = require('googleapis');
const Drive = {
/**
* initialize the Drive object (internal)
* it creates google api's drive object with the provided auth
* this is internally called by Google module through getDrive().
*/
init: function(manager, auth) {
this.manager = manager;
this.drive = google.drive({ version: 'v3', auth });
},
/**
* lists files under a folder
*/
list: async function(folderId, limit = 100) {
let files = [];
let pageToken = null;
let listOptions = {
q: `'${folderId}' in parents`,
fields: 'files(id,name,mimeType,trashed)'
};
while(true) {
if(pageToken) {
listOptions['pageToken'] = pageToken;
}
let response = await this.drive.files.list(listOptions);
if(!response.data.files || !response.data.files.length) {
break;
}
let limitReached = false;
for(let file of response.data.files) {
if(file.trashed) {
continue;
}
delete(file.trashed);
files.push(file);
if(files.length >= limit) {
limitReached = true;
break;
}
}
pageToken = response.data.nextPageToken;
if(limitReached || !pageToken) {
break;
}
}
return files;
},
/**
* create a file or folder.
* optionally, within another folder.
*/
create: async function(name, mimeType, body, parentFolderId) {
mimeType = this.getMimeType(mimeType);
const resource = { name, mimeType };
let media, parents;
if(body) {
media = { body, mimeType };
}
if(parentFolderId) {
resource.parents = [ parentFolderId ];
}
const response = await this.drive.files.create({ resource, media });
return response && response.data;
},
/**
* move file to a folder
* this also removes the file from all other folders
*/
move: async function(fileId, folderId) {
const fields = 'id,name,parents';
const response = await this.drive.files.get({ fileId, fields });
let updateOptions = { fileId, addParents: folderId };
if(response.data.parents) {
updateOptions['removeParents'] = response.data.parents.join(',');
}
await this.drive.files.update(updateOptions);
return true;
},
/**
* copy file
* @returns file object with id property
*/
async copy(fileId, name, folderId) {
let requestBody = { name };
if(folderId) {
requestBody.parents = [ folderId ];
}
const response = await this.drive.files.copy({ fileId, requestBody });
return response && response.data;
},
trash: async function(fileId) {
response = await this.drive.files.update({ fileId, resource: { trashed: true } });
return true;
},
delete: async function(fileId) {
await this.drive.files.delete({ fileId });
return true;
},
getMimeType: function(type) {
const mimeTypes = {
'folder': 'application/vnd.google-apps.folder',
'doc' : 'application/vnd.google-apps.document',
'document': 'application/vnd.google-apps.document',
'sheet' : 'application/vnd.google-apps.spreadsheet',
'spreadsheet': 'application/vnd.google-apps.spreadsheet',
}
return mimeTypes[type] || type;
},
/**
* get file info by its id
*/
byId: async function(fileId, fields) {
fields = fields || 'kind,id,name,mimeType,trashed,parents';
let response = await this.drive.files.get({ fileId, fields });
return response.data;
},
/**
* get file info by its name, optionally by its type and parent folder id
*/
byName: async function(name, type, folderId) {
let queries = [];
queries.push(`name = '${name}'`);
if(folderId) {
queries.push(`'${folderId}' in parents`);
}
if(type) {
let mimeType = this.getMimeType(type);
queries.push(`mimeType = '${mimeType}'`);
}
let q = queries.join(' and ');
let fields = 'files(id,name,mimeType,trashed)';
let response = await this.drive.files.list({ q, fields });
if(!response.data.files || !response.data.files.length) {
return null;
}
//TODO: return latest modified
return response.data.files[0];
},
readFile: async function(fileId) {
let r = await this.drive.files.get({ fileId, alt: 'media'});
return r.data;
},
}
module.exports = Drive;
|
javascript
|
<filename>src/main/java/com/mshams/cs/algorithms/ConvexHull.java
package com.mshams.cs.algorithms;
import com.mshams.cs.applications.Point2D;
import org.apache.commons.lang3.NotImplementedException;
import java.util.*;
/**
* Convex Hull (divide and conquer)
* Complexity: O(n * log n)
*/
public class ConvexHull {
public List<Point2D> grahamScan(List<Point2D> points) {
GrahamScan gs = new GrahamScan(points);
List<Point2D> hull = gs.hull();
assert isConvex(hull);
return hull;
}
public List<Point2D> divideAndConquer(List<Point2D> points) {
Collections.sort(points);
return divide(points);
}
private List<Point2D> divide(List<Point2D> points) {
final int n = points.size();
if (n <= 5) {
return bruteHull(points);
}
double minX = points.get(0).x();
double maxX = points.get(n - 1).x();
double middleX = minX + (maxX - minX) / 2;
List<Point2D> left = divideAndConquer(points.subList(0, n / 2));
List<Point2D> right = divideAndConquer(points.subList(n / 2 + 1, n));
return merge(left, right, middleX);
}
private List<Point2D> merge(List<Point2D> left, List<Point2D> right, double middleX) {
// int i = left.size() - 1, j = 0;
// int p = left.size(), q = right.size();
// double lastY = Double.MIN_VALUE;
// while (i >= 0 || j < right.size()) {
// Point2D a = left.get(i);
// Point2D b = right.get(j);
//
// double m = (a.y() - b.y()) / (a.x() - b.x());
// double bb = a.y() - m * a.x();
//
// double y = m * middleX + bb;
// if (y > lastY) {
// lastY = y;
// j = (j + 1) % q;
// } else {
// i = (i - 1) % q;
// }
// }
throw new NotImplementedException("Incomplete");
}
private List<Point2D> bruteHull(List<Point2D> points) {
List<Point2D> hull = new ArrayList<>();
int n = points.size();
int p = 1, q;
do {
hull.add(points.get(p));
q = (p + 1) % n;
for (int i = 0; i < n; i++) {
if (Point2D.ccw(points.get(p), points.get(i), points.get(q)) > 0) {
q = i;
}
}
p = q;
} while (p != 1);
return hull;
}
private boolean isConvex(Collection<Point2D> hull) {
final int n = hull.size();
if (n <= 2) {
return true;
}
Point2D[] points = hull.toArray(new Point2D[1]);
for (int i = 0; i < n; i++) {
if (Point2D.ccw(points[i], points[(i + 1) % n], points[(i + 2) % n]) < 0) {
return false;
}
}
return true;
}
private static class GrahamScan {
private Stack<Point2D> hull = new Stack<>();
public GrahamScan(List<Point2D> points) {
Collections.sort(points);
points.subList(1, points.size()).sort(points.get(0).polarOrder());
hull.push(points.get(0));
final int n = points.size();
int k1;
for (k1 = 1; k1 < n; k1++) {
if (!points.get(0).equals(points.get(k1))) {
break;
}
}
if (k1 == n) {
return;
}
int k2;
for (k2 = k1 + 1; k2 < n; k2++) {
if (Point2D.ccw(points.get(0), points.get(k1), points.get(k2)) != 0) {
break;
}
}
hull.push(points.get(k2 - 1));
for (int i = k2; i < n; i++) {
Point2D top = hull.pop();
while (Point2D.ccw(hull.peek(), top, points.get(i)) < 0) {
top = hull.pop();
}
hull.push(top);
hull.push(points.get(i));
}
}
public List<Point2D> hull() {
return new ArrayList<>(this.hull);
}
}
}
|
java
|
from django.contrib import messages
from django.contrib.auth import login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import PasswordChangeView
from django.contrib.sites.shortcuts import get_current_site
from django.core.mail import EmailMessage
from django.db import transaction
from django.db.models import Avg, Count, Q
from django.forms import inlineformset_factory
from django.shortcuts import get_object_or_404, redirect, render
from django.template.loader import render_to_string
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from django.utils.encoding import force_bytes, force_text
from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
from django.views.generic import (CreateView, DetailView, ListView,
UpdateView)
from .raw_sql import get_taken_quiz
from ..decorators import teacher_required
from ..forms import (BaseAnswerInlineFormSet, CourseAddForm, FileAddForm,
LessonAddForm, LessonEditForm, QuizAddForm, QuizEditForm,
QuestionForm, TeacherProfileForm, TeacherSignUpForm,
UserUpdateForm)
from ..models import (Answer, Course, MyFile, Lesson, Question, Quiz,
StudentAnswer, TakenCourse, TakenQuiz, User, UserLog)
from ..tokens import account_activation_token
from star_ratings.models import Rating
import os
def get_enrollment_requests_count(user):
owned_courses = Course.objects.values_list('id', flat=True) \
.filter(owner=user)
return TakenCourse.objects.values_list('id', flat=True) \
.filter(course__in=owned_courses,
status='pending').count()
@method_decorator([login_required, teacher_required], name='dispatch')
class ChangePassword(PasswordChangeView):
success_url = reverse_lazy('teachers:profile')
template_name = 'classroom/change_password.html'
def form_valid(self, form):
UserLog.objects.create(action='Changed password',
user_type='teacher',
user=self.request.user)
messages.success(self.request, 'Your successfully changed your password!')
return super().form_valid(form)
def get_context_data(self, **kwargs):
"""enrollment_request_count is used for base.html's navbar."""
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
@method_decorator([login_required, teacher_required], name='dispatch')
class CourseCreateView(CreateView):
model = Course
form_class = CourseAddForm
template_name = 'classroom/teachers/course_add_form.html'
extra_context = {
'title': 'New Course'
}
def form_valid(self, form):
course = form.save(commit=False)
course.owner = self.request.user
course.save()
Rating.objects.create(count=0, total=0, average=0, object_id=course.pk, content_type_id=15)
UserLog.objects.create(action=f'Created the course: {course.title}',
user_type='teacher',
user=self.request.user)
messages.success(self.request, 'The course was successfully created!')
return redirect('teachers:course_change_list')
def get_context_data(self, **kwargs):
"""enrollment_request_count is used for base.html's navbar."""
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
@method_decorator([login_required, teacher_required], name='dispatch')
class CourseListView(ListView):
model = Course
context_object_name = 'courses'
extra_context = {
'title': 'My Courses'
}
template_name = 'classroom/teachers/course_list.html'
def get_context_data(self, **kwargs):
"""Get only the courses that the logged in teacher owns,
count the enrolled students, and order by title"""
kwargs['courses'] = self.request.user.courses \
.exclude(status__iexact='deleted') \
.annotate(taken_count=Count('taken_courses',
filter=Q(taken_courses__status='enrolled'),
distinct=True)) \
.order_by('title')
# enrollment_request_count is used for base.html's navbar.
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
@method_decorator([login_required, teacher_required], name='dispatch')
class CourseUpdateView(UpdateView):
model = Course
form_class = CourseAddForm
context_object_name = 'course'
template_name = 'classroom/teachers/course_change_form.html'
extra_context = {
'title': 'Edit Course'
}
def form_valid(self, form):
course = form.save(commit=False)
course.status = 'pending'
course.save()
UserLog.objects.create(action=f'Edited the course: {course.title}',
user_type='teacher',
user=self.request.user)
messages.success(self.request, f'{course.title} has been successfully updated.')
return redirect('teachers:course_change_list')
def get_context_data(self, **kwargs):
"""enrollment_request_count is used for base.html's navbar."""
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
def get_queryset(self):
"""This method is an implicit object-level permission management.
This view will only match the ids of existing courses that belongs
to the logged in user."""
return self.request.user.courses.exclude(status='deleted')
@method_decorator([login_required, teacher_required], name='dispatch')
class EnrollmentRequestsListView(ListView):
model = Course
context_object_name = 'taken_courses'
extra_context = {
'title': 'Enrollment Requests'
}
template_name = 'classroom/teachers/enrollment_requests_list.html'
def get_context_data(self, **kwargs):
"""enrollment_request_count is used for base.html's navbar."""
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
def get_queryset(self):
"""This method gets the enrollment requests of students."""
return TakenCourse.objects.filter(course__in=self.request.user.courses.all(),
status='pending')
@method_decorator([login_required, teacher_required], name='dispatch')
class FilesListView(ListView):
model = MyFile
context_object_name = 'files'
extra_context = {
'title': 'My Files'
}
template_name = 'classroom/teachers/file_list.html'
paginate_by = 10
def get_context_data(self, **kwargs):
"""enrollment_request_count is used for base.html's navbar."""
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
def get_queryset(self):
return self.request.user.my_files.all() \
.exclude(course__status='deleted') \
.order_by('-id')
@method_decorator([login_required, teacher_required], name='dispatch')
class LessonListView(ListView):
model = Lesson
context_object_name = 'lessons'
extra_context = {
'title': 'My Lessons'
}
template_name = 'classroom/teachers/lesson_list.html'
paginate_by = 10
def get_context_data(self, **kwargs):
"""enrollment_request_count is used for base.html's navbar."""
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
def get_queryset(self):
"""Gets the lesson that the user owns through course FK."""
return Lesson.objects.filter(course__in=self.request.user.courses.all()) \
.exclude(course__status='deleted') \
.order_by('-id')
@method_decorator([login_required, teacher_required], name='dispatch')
class QuizListView(ListView):
model = Quiz
context_object_name = 'quizzes'
extra_context = {
'title': 'My Quizzes'
}
template_name = 'classroom/teachers/quiz_list.html'
paginate_by = 10
def get_context_data(self, **kwargs):
"""enrollment_request_count is used for base.html's navbar."""
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
def get_queryset(self):
"""Gets the quizzes that the logged in teacher owns.
Counts the questions and the number of students who took the quiz."""
queryset = Quiz.objects.filter(course__owner=self.request.user) \
.exclude(course__status='deleted') \
.annotate(questions_count=Count('questions', distinct=True)) \
.annotate(taken_count=Count('taken_quizzes', distinct=True)) \
.order_by('-id')
return queryset
@method_decorator([login_required, teacher_required], name='dispatch')
class QuizResultsView(DetailView):
model = Quiz
context_object_name = 'quiz'
extra_context = {
'title': 'Quiz Results'
}
template_name = 'classroom/teachers/quiz_results.html'
def get_context_data(self, **kwargs):
quiz = self.get_object()
taken_quizzes = quiz.taken_quizzes.select_related('student__user').order_by('-date')
total_taken_quizzes = taken_quizzes.count()
quiz_score = quiz.taken_quizzes.aggregate(average_score=Avg('score'))
extra_context = {
'taken_quizzes': taken_quizzes,
'total_taken_quizzes': total_taken_quizzes,
'quiz_score': quiz_score
}
kwargs.update(extra_context)
kwargs['enrollment_request_count'] = get_enrollment_requests_count(self.request.user)
return super().get_context_data(**kwargs)
def get_queryset(self):
return Quiz.objects.filter(course__in=Course.objects.filter(owner=self.request.user))
class TeacherSignUpView(CreateView):
model = User
form_class = TeacherSignUpForm
template_name = 'authentication/register_form.html'
def get_context_data(self, **kwargs):
kwargs['user_type'] = 'teacher'
return super().get_context_data(**kwargs)
def form_valid(self, form):
user = form.save()
login(self.request, user)
return redirect('teachers:quiz_change_list')
@login_required
@teacher_required
def accept_enrollment(request, taken_course_pk):
taken_course_get = get_object_or_404(TakenCourse, pk=taken_course_pk)
TakenCourse.objects.filter(id=taken_course_get.pk).update(status='enrolled')
UserLog.objects.create(action='Accepted enrollment request',
user_type='teacher',
user=request.user)
messages.success(request, 'The student has been successfully enrolled.')
return redirect('teachers:enrollment_requests_list')
def activate(request, uidb64, token):
try:
uid = force_text(urlsafe_base64_decode(uidb64))
user = User.objects.get(pk=uid)
except(TypeError, ValueError, OverflowError, User.DoesNotExist):
user = None
if user is not None and account_activation_token.check_token(user, token):
# activate user and login:
user.is_active = True
user.save()
login(request, user)
context = {
'title': 'Account Activation',
'result': 'Congratulations!',
'message': 'Your account has been activated successfully.',
'alert': 'success'
}
else:
context = {
'title': 'Account Activation',
'result': 'We\'re sorry...',
'message': 'The activation link you provided is invalid. Please try again.',
'alert': 'danger'
}
return render(request, 'authentication/activation.html', context)
@login_required
@teacher_required
def add_files(request):
if request.method == 'POST':
form = FileAddForm(request.user, data=request.POST, files=request.FILES)
success = None
if form.is_valid():
for file in request.FILES.getlist('file'):
extension = os.path.splitext(str(request.FILES['file']))[1]
# Check the file extensions:
if extension == '.pdf'or \
extension == '.doc' or \
extension == '.docx' or \
extension == '.ppt' or \
extension == '.pptx':
# For every file selected in the upload, create a record in File table:
MyFile.objects.create(file=file, course=form.cleaned_data['course'], owner=request.user)
success = True
if success:
UserLog.objects.create(action='Uploaded file/s',
user_type='teacher',
user=request.user)
messages.success(request, 'The files were successfully uploaded.')
return redirect('teachers:file_list')
else:
messages.error(request, 'The only allowed file formats are .pdf, .doc, .docx, .ppt, and .pptx.')
return redirect('teachers:file_add')
else:
if not request.FILES:
messages.error(request, 'Please select a file.')
return redirect('teachers:file_add')
else:
form = FileAddForm(current_user=request.user)
context = {
'form': form,
'title': 'Add Files',
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/teachers/file_add_form.html', context)
@login_required
@teacher_required
def add_lesson(request):
if request.method == 'POST':
form = LessonAddForm(request.user, data=request.POST)
if form.is_valid():
lesson = form.save(commit=False)
lesson.save()
UserLog.objects.create(action=f'Created lesson: {lesson.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The lesson was successfully created.')
return redirect('teachers:lesson_list')
else:
form = LessonAddForm(current_user=request.user)
context = {
'form': form,
'title': 'Add a Lesson',
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/teachers/lesson_add_form.html', context)
@login_required
@teacher_required
def add_question(request, course_pk, quiz_pk):
course = get_object_or_404(Course, pk=course_pk, owner=request.user)
quiz = get_object_or_404(Quiz, pk=quiz_pk, course=course)
if request.method == 'POST':
form = QuestionForm(request.POST)
if form.is_valid():
question = form.save(commit=False)
question.quiz = quiz
question.save()
UserLog.objects.create(action=f'Added question for the quiz: {quiz.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'You may now add answers/options to the question.')
return redirect('teachers:question_change', quiz.course.pk, quiz.pk, question.pk)
else:
form = QuestionForm()
context = {
'title': 'Add question',
'quiz': quiz,
'form': form,
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/teachers/question_add_form.html', context)
@login_required
@teacher_required
def add_quiz(request):
if request.method == 'POST':
form = QuizAddForm(request.user, data=request.POST)
if form.is_valid():
quiz = form.save(commit=False)
quiz.save()
UserLog.objects.create(action=f'Created quiz: {quiz.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The quiz was successfully created. You may now add some questions.')
return redirect('teachers:quiz_edit', quiz.course.pk, quiz.pk)
else:
form = QuizAddForm(current_user=request.user)
context = {
'form': form,
'title': 'Add a Quiz',
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/teachers/quiz_add_form.html', context)
@login_required
@teacher_required
def delete_course(request, pk):
course_get = get_object_or_404(Course, pk=pk)
course = request.user.courses.get(id=course_get.pk)
course.status = 'deleted'
course.save()
UserLog.objects.create(action=f'Deleted the course: {course.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The course has been successfully deleted.')
return redirect('teachers:course_change_list')
@login_required
@teacher_required
def delete_file(request, file_pk):
teacher = request.user
file_get = get_object_or_404(MyFile, pk=file_pk)
file_name = MyFile.objects.values_list('file', flat=True).get(id=file_get.pk)
# delete from the database
MyFile.objects.get(id=file_pk, course__owner=teacher).delete()
# remove from the folder
os.remove(os.path.join('media', file_name))
UserLog.objects.create(action=f'Deleted file: {str(file_get.file)[16:]}',
user_type='teacher',
user=request.user)
messages.success(request, 'The file has been successfully deleted.')
return redirect('teachers:file_list')
@login_required
@teacher_required
def delete_lesson(request, course_pk, lesson_pk):
teacher = request.user
lesson_get = get_object_or_404(Lesson, pk=lesson_pk)
Lesson.objects.filter(id=lesson_get.pk, course__owner=teacher).delete()
UserLog.objects.create(action=f'Deleted lesson: {lesson_get.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The lesson has been successfully deleted.')
return redirect('course_details', course_pk)
@login_required
@teacher_required
def delete_lesson_from_list(request, lesson_pk):
lesson_get = get_object_or_404(Lesson, pk=lesson_pk)
Lesson.objects.filter(id=lesson_pk, course__owner=request.user).delete()
messages.success(request, 'The lesson has been successfully deleted.')
UserLog.objects.create(action=f'Deleted lesson: {lesson_get.title}',
user_type='teacher',
user=request.user)
return redirect('teachers:lesson_list')
@login_required
@teacher_required
def delete_question(request, course_pk, quiz_pk, question_pk):
teacher = request.user
quiz_get = get_object_or_404(Quiz, pk=quiz_pk)
question_get = get_object_or_404(Question, pk=question_pk)
quiz = Quiz.objects.get(id=quiz_get.pk, course__owner=teacher)
Question.objects.get(id=question_get.pk, quiz=quiz).delete()
UserLog.objects.create(action=f'Deleted question for the quiz: {quiz_get.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The question has been successfully deleted.')
return redirect('teachers:quiz_edit', course_pk, quiz_pk)
@login_required
@teacher_required
def delete_quiz(request, quiz_pk):
teacher = request.user
quiz_get = get_object_or_404(Quiz, pk=quiz_pk)
Quiz.objects.filter(id=quiz_get.pk, course__owner=teacher).delete()
UserLog.objects.create(action=f'Deleted quiz: {quiz_get.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The quiz has been successfully deleted.')
return redirect('teachers:quiz_list')
@login_required
@teacher_required
def delete_quiz_from_list(request, quiz_pk):
quiz_get = get_object_or_404(Quiz, pk=quiz_pk)
Quiz.objects.filter(id=quiz_pk, course__owner=request.user).delete()
UserLog.objects.create(action=f'Deleted quiz: {quiz_get.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The quiz has been successfully deleted.')
return redirect('teachers:quiz_list')
@login_required
@teacher_required
def edit_lesson(request, course_pk, lesson_pk):
course = get_object_or_404(Course, pk=course_pk, owner=request.user)
lesson = get_object_or_404(Lesson, pk=lesson_pk, course=course)
if request.method == 'POST':
form = LessonEditForm(data=request.POST, instance=lesson)
if form.is_valid():
lesson = form.save(commit=False)
lesson.save()
UserLog.objects.create(action=f'Edited lesson: {lesson.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The lesson was successfully changed.')
return redirect('teachers:lesson_list')
else:
form = LessonEditForm(instance=lesson)
context = {
'course': course,
'lesson': lesson,
'form': form,
'title': 'Edit Lesson',
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/teachers/lesson_change_form.html', context)
@login_required
@teacher_required
def edit_question(request, course_pk, quiz_pk, question_pk):
course = get_object_or_404(Course, pk=course_pk, owner=request.user)
quiz = get_object_or_404(Quiz, pk=quiz_pk, course=course)
question = get_object_or_404(Question, pk=question_pk, quiz=quiz)
AnswerFormSet = inlineformset_factory(
Question, # parent model
Answer, # base model
formset=BaseAnswerInlineFormSet,
fields=('text', 'is_correct'),
min_num=2,
validate_min=True,
max_num=10,
validate_max=True
)
if request.method == 'POST':
form = QuestionForm(request.POST, instance=question)
formset = AnswerFormSet(request.POST, instance=question)
if form.is_valid() and formset.is_valid():
with transaction.atomic():
form.save()
formset.save()
UserLog.objects.create(action=f'Edited question and answers for the quiz: {quiz.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'Question and answers are successfully saved!')
return redirect('teachers:quiz_edit', course.pk, quiz.pk)
else:
form = QuestionForm(instance=question)
formset = AnswerFormSet(instance=question)
context = {
'title': 'Edit Question',
'quiz': quiz,
'question': question,
'form': form,
'formset': formset,
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/teachers/question_change_form.html', context)
@login_required
@teacher_required
def edit_quiz(request, course_pk, quiz_pk):
course = get_object_or_404(Course, pk=course_pk, owner=request.user)
quiz = get_object_or_404(Quiz, pk=quiz_pk, course=course)
question = Question.objects.filter(quiz=quiz).annotate(answers_count=Count('answers'))
if request.method == 'POST':
form = QuizEditForm(data=request.POST, instance=quiz)
if form.is_valid():
quiz = form.save(commit=False)
quiz.save()
UserLog.objects.create(action=f'Edited quiz: {quiz.title}',
user_type='teacher',
user=request.user)
messages.success(request, 'The quiz was successfully changed.')
return redirect('teachers:quiz_edit', quiz.course.pk, quiz.pk)
else:
form = QuizEditForm(instance=quiz)
context = {
'title': 'Edit Quiz',
'course': course,
'quiz': quiz,
'questions': question,
'form': form,
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/teachers/quiz_change_form.html', context)
@login_required
@teacher_required
def load_lessons(request):
course_id = request.GET.get('course')
lessons = Lesson.objects.filter(course_id=course_id).order_by('title')
return render(request, 'classroom/teachers/lesson_dropdown_list_options.html', {'lessons': lessons})
@login_required
@teacher_required
def profile(request):
if request.method == 'POST':
user_update_form = UserUpdateForm(request.POST, instance=request.user)
profile_form = TeacherProfileForm(request.POST, request.FILES, instance=request.user.teacher)
if user_update_form.is_valid() and profile_form.is_valid():
user_update_form.save()
profile_form.save()
UserLog.objects.create(action='Updated Teacher Profile',
user_type='teacher',
user=request.user)
messages.success(request, 'Your account has been updated!')
return redirect('teachers:profile')
else:
user_update_form = UserUpdateForm(instance=request.user)
profile_form = TeacherProfileForm(instance=request.user.teacher)
context = {
'title': 'My Profile',
'u_form': user_update_form,
'p_form': profile_form,
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/profile.html', context)
@login_required
@teacher_required
def quiz_result_detail(request, quiz_pk, student_pk, taken_pk):
quiz = get_object_or_404(Quiz, pk=quiz_pk)
questions = Question.objects.filter(quiz=quiz)
taken_quiz = get_object_or_404(TakenQuiz, pk=taken_pk, quiz=quiz, student_id=student_pk)
student_answer = StudentAnswer.objects.raw(
get_taken_quiz(student_pk, taken_quiz.pk))
taken_quiz = TakenQuiz.objects \
.select_related('quiz') \
.filter(student_id=student_pk, id=taken_quiz.pk, quiz=quiz) \
.first()
answers = Answer.objects.filter(question__in=questions)
student_name = User.objects.get(pk=student_pk)
context = {
'title': 'Quiz Result',
'student_answers': student_answer,
'taken_quiz': taken_quiz,
'answers': answers,
'student_name': student_name,
'ownership': 'Student\'s',
'enrollment_request_count': get_enrollment_requests_count(request.user)
}
return render(request, 'classroom/students/taken_quiz_result.html', context)
def register(request):
if request.user.is_authenticated:
return redirect('home')
else:
if request.method == 'POST':
form = TeacherSignUpForm(request.POST)
if form.is_valid():
user = form.save()
user.is_active = False
user.save()
# Send an email to the user with the token:
mail_subject = 'DigiWiz: Activate your account.'
current_site = get_current_site(request)
message = render_to_string('authentication/email_teacher_confirm.html', {
'user': user,
'domain': current_site,
'uid': urlsafe_base64_encode(force_bytes(user.pk)),
'token': account_activation_token.make_token(user),
})
to_email = form.cleaned_data.get('email')
email = EmailMessage(mail_subject, message, to=[to_email])
try:
email.send()
context = {
'title': 'Account Activation',
'result': 'One more step remaining...',
'message': 'Please confirm your email address to complete the registration.',
'alert': 'info'
}
except Exception:
context = {
'title': 'Account Activation',
'result': 'Warning',
'message': 'We\'re sorry, an error has occurred during activation. Please try again.',
'alert': 'warning'
}
return render(request, 'authentication/activation.html', context)
else:
form = TeacherSignUpForm()
context = {
'form': form,
'user_type': 'teacher',
'title': 'Register as Teacher'
}
return render(request, 'authentication/register_form.html', context)
@login_required
@teacher_required
def reject_enrollment(request, taken_course_pk):
taken_course_get = get_object_or_404(TakenCourse, pk=taken_course_pk)
TakenCourse.objects.filter(id=taken_course_get.pk).delete()
UserLog.objects.create(action='Rejected enrollment request',
user_type='teacher',
user=request.user)
messages.success(request, 'The student\'s request has been successfully rejected.')
return redirect('teachers:enrollment_requests_list')
|
python
|
<gh_stars>1-10
## Storage architecture
STORAGE is responsible for creating and maintaining definite time varying
collections (TVCs) that contain either ingested data from an external source
(e.g Kafka), data sinked from one or more CLUSTER instances, or data coming
from `Insert` requests to the storage controller, providing a table-like
experience.
## The STORAGE collection structure

### Overview
STORAGE is tasked with managing the lifecycle of STORAGE collections (just
collections hereafter). Collections support concurrent, sharded writes from
multiple CLUSTER instances configured in active replication mode. Furthermore,
collections allow writers to "start from scrach" by recreating a completely new
version (rendition) of the collection, perhaps because the writer fixed a bug
that results in slightly different data or because a re-shard is necessary.
A collection consists of one or more renditions. A rendition is a standalone
version of the collection. Each rendition can have one or more shards where the
number of shards is selected at creation and remains static for the lifetime of
that rendition. Each shard maps 1-1 to a `persist` collection.
At any given time `t` the contents of the collection are defined unambiguously
by the contents of **exactly one** of the renditions. The information
describing which rendition is active at any given time is recorded as part of
the metadata of the collection. Readers use this metadata to know the exact
time `t_handover` that they should switch from one rendition to another. This
ensures that even though the collection can transition through multiple
renditions over time every reader always perceives a definite collection
advancing in time.
A shard of a rendition is the endpoint where writing happens. Writers insert
batches of data in a shard by using a write handle on the underlying `persist`
collection backing the shard.
### Renditions
A rendition represents a version of a collection and is described by its name,
its `since` frontier, and its `upper` frontier. The `since` frontier is defined
as the maximum of the `since` frontiers of its shards and its `upper` frontier
is defined as the minimum of the `upper` frontier of its shards (replace
max/min with join/meet for partialy ordered times).
#### Rendition metadata
The contents of the collection overall are described by a metadata `persist`
collection. This rendition metadata collection evolves in time and can be
thought of as instructions to readers that tells them what data they should
produce next. It containing updates of this form:
```
(rendition1, 0, +1)
// At `t_handover` readers should switch from rendition1 to rendition2
(rendition1, t_handover, -1)
(rendition2, t_handover, +1)
```
Readers hold onto read capabilities for the metadata collection that allows
STORAGE to know which renditions should be kept around and which ones should be
garbage collected. In the example above, when all readers downgrade their read
capability beyond `t_handover` the metadata collection can be consolidated and
`rendition1` can be deleted.
Readers interpret advances of the medatata frontier as proof that no rendition
change occured between the previously known frontier and the newly advanced
frontier. Therefore they can proceed with reading their current rendition for
all times not beyond the frontier of the metadata collection.
Readers encountering a change in rendition at some handover time `t_handover`
must produce the necessary diffs such that the resulting collection accumulates
to the contents of `rendition2` at `t_handover`. A simple strategy for doing so
is to produce a snapshot of `rendition1` at `t_handover` with all its diffs
negated and a snapshot of `rendition2` at `t_handover`. More elaborate
strategies could be implemented where for example STORAGE has precalculated the
`rendition2 - rendition1` difference collection for readers to use.
### Shards
A shard is part of a rendition and is the endpoint where writers publish new
data. They can be written to by multiple workers as long as all the workers
produce identical data (i.e their outputs are definite).
It is an error to have multiple writers write conflicting data into a shard and
the contents of the collection are undefined if that happens.
## Components
### Fat client
STORAGE provides a fat client in the form of a library that can be linked into
application that which to consume or produce collections. The fat client will
at the very least be able to import a collection into a timely dataflow cluster
and will handle all the rendition/shard handling logic internally.
### Controller
The STORAGE controller is a library and is hosted by ADAPTER. Its job is to
mediate all STORAGE commands that create, query, and delete collections, create
and handover renditions, and manage read/write capabilities for the collection.
The formalism document expands on the expected API of the STORAGE controller.
All commands are durably persisted and their effect survives crashes and reboots.
## Source ingestion
In the case where the controller is requested to ingest a source into a
collection, an ingestion pipeline must be constructed. When running in the
cloud setting each ingestion instance for a particular source will be hosted by
a dedicated kubernetes pod but when running in the single binary `materialized`
setting each ingestion instance will translate to a particular timely dataflow
being deployed to the STORAGE timely cluster.
For external users of STORAGE, the only thing they will be able to see is the
definite collection containing the result of the ingested data after all
requested processing has been performed (e.g decoding and envelope processing).
However, there are good reasons for STORAGE to internally create and manage
multiple colletion that work together to form the final collection. For
example, in the case where STORAGE is instructed to ingest a source that
requires Avro decoding and DEBEZIUM envelope processing, STORAGE might decide
to first create a definite collection of the raw data before decoding and
envelope processing and compute the final collection based on that. This
ensures that STORAGE will always have the ability to fix bugs in the Avro
decoding logic and generate new renditions based on the original raw data that
have been safely stored in the raw collection.

|
markdown
|
{
"instance" : {
"testBogusBackups" : "",
"testWindowsFileUrl" : "",
"testLocalHost" : "",
"testFileUrl" : "",
"testQueryAccessing" : "",
"testComponentSpecifcEncoding" : "",
"testDefaultPortUnknownScheme" : "",
"testQueryRemoveAll" : "",
"testParsingWrongPort" : "",
"testPlus" : "",
"testQueryEncodingExtended" : "",
"testEncodedSlash" : "",
"testUserInfo" : "",
"testWriteUrlPathQueryFragmentOfOn" : "",
"testDefaults" : "",
"testAsFileUrl" : "",
"testInContextOf" : "",
"testParsingWrongEscape" : "",
"testQueryEncoding" : "",
"testConvenienceMethods" : "",
"testPortIfAbsent" : "",
"testAsRelativeUrl" : "",
"testQueryManipulation" : "",
"testQuery" : "",
"testMailto" : "",
"testNoScheme" : "",
"testParsingWrongEscapeQuery" : "",
"testAuthority" : "",
"testParsePathOnly" : "",
"testNoSchemeColonInPath" : "",
"testPathRemoval" : "",
"testParsingEmpty" : "",
"testParsingEscape" : "",
"testReferenceResolution" : "",
"testPrintingSimple" : "",
"testRelative" : "",
"testImage" : "",
"testDefaultScheme" : "",
"testIsSlash" : "",
"testParsingSimple" : "",
"testPlusHandling" : "",
"testDefaultSchemeAndPort" : "",
"testSchemeInQuery" : "",
"testParsingWrongScheme" : "",
"testPathSegments" : ""
},
"class" : { }
}
|
json
|
<filename>static/pageIds.json
["news/2021-10-19-demo01.md","news/2021-11-23-summarizing-flowers.md","news/2021-10-19-new-game-on-reinherit01.md","news/2021-11-23-test-out-your-skills.md","news/2021-11-23-weekly-report.md","training/2021-10-19-first-material.md","news/2021-11-25-something-new.md","training/2021-11-15-demo03.md","training/2021-11-15-demo04.md","training/2021-11-15-fancy-webinar.md","training/2021-11-16-newest-material.md","tools/2021-12-13-a-machine-learning-lib.md","tools/2022-01-10-tensor-flow.md","tools/2022-01-10-nltk.md","tools/2022-01-10-json-placeholder.md","tools/2022-01-10-lorem-picsum.md","tools/2022-01-10-apis-is.md","performances/2022-01-31-performance-1.md","performances/2022-01-31-performance-2.md","tools/2022-02-01-dummy-tool.md","training/2022-03-14-demo05.md","howtos/2022-03-17-how-to-get-moderation-access-to-the-cms.md","howtos/2022-03-17-how-to-reduce-the-size-of-our-image.md","howtos/2022-03-17-how-to-provide-data-to-the-reinherit-digital-hub.md","statics/2022-03-17-about.md","faq/2022-03-17-map-layout-blog-type-faq-question-is-there-a-limit-on-the-file-size-for-images-i-want-to-upload-to-the-cms-answer-yes-100kb.md","howtos/2022-03-17-rights-and-obligations-of-cms-moderators.md","howtos/2022-03-17-how-to-use-the-reinherit-digital-hub-chat.md","statics/2022-03-17-the-reinherit-team.md","statics/2022-03-17-data-privacy.md","statics/2022-03-17-imprint.md","performances/2022-03-17-perfomance1.md","exhibitions/2022-03-17-traveling-through-transylviana.md","howtos/2022-03-17-test-how-to.md","tags/2022-03-17-nlp.md","tags/2022-03-17-python.md","tags/2022-03-17-rest-api.md","tags/2022-03-17-game.md"]
|
json
|
Whoops! Gwyneth Paltrow has accidentally admitted that despite being in the movie "Spider-Man: Homecoming," she has never seen it.
The 47-year-old actress, who stars as Pepper Potts in the Marvel Cinematic Universe, made the stunning revelation during an appearance on "Jimmy Kimmel Live" Wednesday evening.
"This is so embarrassing," Paltrow said after Kimmel, 51, reminded her of a conversation she had back in June with Jon Favreau on his Netflix joint "The Chef Show. " (At the time, Paltrow insisted she wasn't in "Spider-Man: Homecoming," and was unaware she had even made a cameo in the film alongside Favreau, who plays Happy Hogan, and Tom Holland, who stars as Spider-Man. )
"I just got confused," Paltrow explained of the blunder. "There’s so many of these wonderful Marvel, interconnecting movies and I thought that it was an Avengers movie, but it was not. "
"Was Spider-Man himself offended by this? Was he ok with it? " asked Kimmel of Holland, 23.
"I never actually saw the movie," Paltrow confessed before seemingly eating her words.
"I mean, wait! Cut that out, take that back! S--t! " she added.
Paltrow has starred in all three "Iron Man" films, as well as "The Avengers," "Avengers: Infinity War" and "Avengers: Endgame. "
|
english
|
{
"directions": [
"Preheat oven to 375 degrees F (190 degrees C).",
"Cream butter or margarine; gradually add sugar, beating well.",
"Add flour, and mix well. Stir in peppermint extract.",
"Divide dough in half and place in separate bowls. Tint half of dough with red food coloring and the other half with the green food coloring.",
"Roll dough into balls using 1/2 teaspoon dough per ball. For each wreath shaped cookie, place six balls in a circle, alternating colors, on ungreased cookie sheets. Press together securely. Bake for 8 minutes. Let cool 10 minutes; then remove to racks. Cool completely."
],
"ingredients": [
"1 1/4 cups butter",
"3/4 cup sifted confectioners' sugar",
"2 1/2 cups all-purpose flour",
"3/4 teaspoon peppermint extract",
"3 drops red food coloring",
"2 drops green food coloring"
],
"language": "en-US",
"source": "allrecipes.com",
"tags": [],
"title": "Melt-Away Peppermint Wreaths",
"url": "http://allrecipes.com/recipe/10071/melt-away-peppermint-wreaths/"
}
|
json
|
The Secret History of the World (Paperback)
A New York Times bestseller, Mark Booth’s The Secret History of the World is “an entire library’s worth of scholarship [in] a single volume” (San Francisco Gate).
They say that history is written by the victors. But what if history—or what we have come to know as history—has been written by the wrong people? What if everything we’ve been told is only part of the story?
In this groundbreaking and now-famous work, Mark Booth embarks on an enthralling tour of our world’s secret histories. Starting from a dangerous premise—that everything we’ve known about our world’s past is corrupted, and that the stories put forward by the various cults and mystery schools throughout history are true—Booth produces nothing short of an alternate history of the past 3,000 years. Topics include:
- And more!
Here is a book that shows that history needs a revolutionary rethink, and Mark Booth has 3,000 years of hidden wisdom to back it up. If you’ve ever wondered if the history you learned in school was wrong, or wondered if conspiracy theorists could be right, then the history in this book offers a perspective you’ll want to explore.
Mark Booth studied Philosophy and Theology at Oriel College, Oxford. He has worked in publishing for over twenty years, and is currently the publisher of Coronet, an imprint of Hodder & Stoughton/Hachette.
|
english
|
import Box from "@mui/material/Box";
import Fade from "@mui/material/Fade";
import { ReactNode } from "react";
interface PageHeaderProps {
fadeTime: number;
children: ReactNode;
}
export function PageHeader(props: PageHeaderProps) {
return (
<Fade in={true} timeout={props.fadeTime}>
<Box>{props.children}</Box>
</Fade>
);
}
|
typescript
|
<reponame>waitingsong/modern-webcamjs
{
"name": "modern-webcamjs",
"version": "1.1.3",
"description": "HTML5 WebcamJS Image Capture Library",
"main": "./dist/webcam.js",
"scripts": {
"build": "npm run test && npm run clean && npm run build:ts && npm run jslint",
"build:ts": "tsc -p ./ --outDir dist/",
"clean": "rm -rf dist/*",
"jslint": "eslint --fix dist/**/*.js",
"lint": "tslint -p tsconfig.json",
"prepublishOnly": "npm run build",
"test": "npm run lint",
"tsc:w": "tsc -p ./tsconfig.json -w"
},
"keywords": [
"camera",
"multiple",
"html5",
"ES6",
"getusermedia"
],
"module": "./dist/webcam.js",
"types": "./dist/webcam.d.ts",
"author": "waiting",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/waitingsong/modern-webcamjs.git"
},
"bugs": {
"url": "https://github.com/waitingsong/modern-webcamjs/issues"
},
"homepage": "https://github.com/waitingsong/modern-webcamjs#readme",
"devDependencies": {
"eslint": "^4.10.0",
"rimraf": "^2.6.1",
"ts-node": "^3.3.0",
"tslint": "^5.7.0",
"typescript": "^2.6.1"
}
}
|
json
|
<filename>core/redirector/src/com/comcast/redirector/core/balancer/serviceprovider/backup/StacksBackupManager.java
/**
* Copyright 2017 Comcast Cable Communications Management, LLC
*
* 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.
*
* @author <NAME> (<EMAIL>)
*/
package com.comcast.redirector.core.balancer.serviceprovider.backup;
import com.comcast.redirector.common.serializers.Serializer;
import com.comcast.redirector.common.serializers.SerializerException;
import com.comcast.redirector.core.backup.IBackupManager;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.Future;
public class StacksBackupManager implements IStacksBackupManager {
private static final Logger log = LoggerFactory.getLogger(StacksBackupManager.class);
private Serializer serializer;
private IBackupManager manualBackupManager;
private StackBackup cache;
public StacksBackupManager(IBackupManager manualBackupManager,
Serializer serializer) {
this.manualBackupManager = manualBackupManager;
this.serializer = serializer;
}
@Override
public Future<Boolean> backup(StackBackup backup) {
return backupInternal(backup);
}
@Override
public StackBackup load() {
if (cache == null) {
fillCache();
}
return cache;
}
private void fillCache() {
try {
String data = manualBackupManager.load();
if (StringUtils.isNotBlank(data)) {
cache = serializer.deserialize(data, StackBackup.class);
}
} catch (Exception e) {
log.error("failed to de-serialize manual active nodes snapshot", e);
}
}
private Future<Boolean> backupInternal(StackBackup snapshot) {
cache = snapshot;
String data = null;
try {
data = serializer.serialize(snapshot, false);
} catch (SerializerException e) {
log.error("failed to serialize manual active nodes snapshot", e);
}
return manualBackupManager.backup(data);
}
}
|
java
|
{"remainingRequest":"/Users/zhaoguanglin/corgi-admin/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/zhaoguanglin/corgi-admin/src/components/Activityinfo/ActivityContent.vue?vue&type=script&lang=js&","dependencies":[{"path":"/Users/zhaoguanglin/corgi-admin/src/components/Activityinfo/ActivityContent.vue","mtime":1586102980000},{"path":"/Users/zhaoguanglin/corgi-admin/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/zhaoguanglin/corgi-admin/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/zhaoguanglin/corgi-admin/node_modules/babel-loader/lib/index.js","mtime":499162500000},{"path":"/Users/zhaoguanglin/corgi-admin/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/zhaoguanglin/corgi-admin/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport { agreeContent } from '@/api/contentMgr'\r\nimport { autoCheckText, checkedText } from '@/utils/const'\r\nexport default {\r\n props: {\r\n activityInfo: {\r\n type: Object,\r\n default: () => ({})\r\n }\r\n },\r\n computed: {\r\n isChecked() {\r\n return this.activityInfo.content === autoCheckText\r\n }\r\n },\r\n methods: {\r\n async agreeCheck() {\r\n try {\r\n const activityId = this.activityInfo.id\r\n const content = this.activityInfo.checkContent\r\n await agreeContent({ activityId, content })\r\n this.$emit('emitFunc', { function: 'initModule', arguments: [] })\r\n } catch (err) {\r\n err !== 'cancel' && console.error(err)\r\n }\r\n },\r\n async failCheck() {\r\n try {\r\n await this.$msgbox.confirm(`确定要进行该操作`, `删除活动内容`, {\r\n confirmButtonText: '删除',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n const activityId = this.activityInfo.id\r\n const content = checkedText\r\n await agreeContent({ activityId, content })\r\n this.$emit('emitFunc', { function: 'initModule', arguments: [] })\r\n } catch (err) {\r\n err !== 'cancel' && console.error(err)\r\n }\r\n }\r\n }\r\n}\r\n",null]}
|
json
|
<gh_stars>100-1000
package guestrequest
import (
"github.com/Microsoft/go-winio/pkg/guid"
"testing"
)
func TestGuidValidity(t *testing.T) {
for _, g := range ScsiControllerGuids {
_, err := guid.FromString(g)
if err != nil {
t.Fatalf("GUID parsing failed: %s", err)
}
}
}
|
go
|
.container{
padding-top: 20px;
}
button{
margin-top: 10px;
}
h2{
margin-top: 10px;
}
|
css
|
# Copyright (c) 2017-2021, <NAME>. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
import time
import pytest
from harness import log
from harness.dom_parser_utils import *
from harness.interface.defs import key_codes
from bt_fixtures import *
@pytest.mark.rt1051
@pytest.mark.usefixtures("bt_all_devices")
@pytest.mark.usefixtures("bt_reset")
@pytest.mark.usefixtures("bt_main_window")
@pytest.mark.usefixtures("phone_in_desktop")
@pytest.mark.usefixtures("phone_unlocked")
@pytest.mark.skipif("not config.getvalue('--bt_device')", reason='--bt_device was not specified')
def test_bt_pairing_hmi(harness, bt_device):
if not bt_device:
return
bt_device_name = bt_device
current_window_content = get_window_content(harness, 1)
is_device_in_history = item_contains_recursively(current_window_content, 'TextValue', bt_device_name )
if not is_device_in_history :
log.info("Device {} not in all devices history, scanning...".format(bt_device_name))
harness.connection.send_key_code(key_codes["left"])
max_try_count = 5
for _ in range(max_try_count, 0, -1) :
time.sleep(2)
current_window_content = get_window_content(harness, 1)
is_device_in_history = item_contains_recursively(current_window_content, 'TextValue', bt_device_name )
if is_device_in_history:
break
log.info("Device {} not found, retrying...".format(bt_device_name))
assert max_try_count
current_window_content = get_window_content(harness, 1)
parent_of_list_items = find_parent(current_window_content, 'ListItem')
steps_to_navigate_down = get_child_number_that_contains_recursively(parent_of_list_items, [('TextValue', bt_device_name)])
assert steps_to_navigate_down > -1
log.info("Navigating to the {} device, {} down".format(bt_device_name, steps_to_navigate_down ) )
for _ in range(steps_to_navigate_down) :
harness.connection.send_key_code(key_codes["down"])
log.info("Checking if device {} is focused...".format(bt_device_name))
current_window_content = get_window_content(harness, 1)
parent_of_list_items = find_parent(current_window_content, 'ListItem')
assert item_has_child_that_contains_recursively( parent_of_list_items, [('TextValue', bt_device_name), ('Focus', True)] )
|
python
|
<reponame>chimerast/eslint-config
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
},
"editor.tabSize": 2,
"eslint.alwaysShowStatus": true,
"eslint.format.enable": true,
"eslint.lintTask.enable": true,
"eslint.options": {
"configFile": "./index.js",
"envs": [ "node" ]
},
"eslint.validate": [ "javascript", "typescript" ],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
}
|
json
|
<filename>src/bsp/cbssp.cc
/**
* @brief bssp.cc
*
* @date : May 21, 2016
* @author: <NAME>
*/
#include "bssp.hh"
namespace bssp {
/**
* @brief constructor
* @param s_initl
* @param s_final
* @param filename
*/
CBSSP::CBSSP(const string& s_initl, const string& s_final,
const string& filename) :
initl_TS(), final_SS(), active_R(), active_TS(), active_LR(), ///
ctx(), n_0(ctx.int_const("n0")), r_affix("r"), s_affix("s"), ///
l_affix("l"), ssolver(
(tactic(ctx, "simplify") & tactic(ctx, "solve-eqs")
& tactic(ctx, "smt")).mk_solver()), ///
s_encoding(), l_encoding(), RUNNING(true), TERMINATE(false) {
this->initl_TS = this->parse_input_TS(s_initl);
this->final_SS = this->parse_input_SS(s_final);
this->parse_input_TTS(filename);
}
/**
* @brief destructor
*/
CBSSP::~CBSSP() {
}
/**
* @brief symbolic pruning backward search
* @return bool
*/
bool CBSSP::symbolic_pruning_BWS() {
return this->multi_threaded_BSSP();
}
/**
* @brief extract the thread state from input
* @param state
* @return system state
*/
thread_state CBSSP::parse_input_TS(const string& state) {
if (state.find('|') == std::string::npos) { /// store in a file
ifstream in(state.c_str());
if (in.good()) {
string content;
std::getline(in, content);
in.close();
return utils::create_thread_state_from_str(content);
} else {
throw bws_runtime_error(
"parse_input_SS: input state file is unknown!");
}
}
return utils::create_thread_state_from_str(state);
}
/**
* @brief extract the system state from input
* @param state
* @return system state
*/
syst_state CBSSP::parse_input_SS(const string& state) {
if (state.find('|') == std::string::npos) { /// store in a file
ifstream in(state.c_str());
if (in.good()) {
string content;
std::getline(in, content);
in.close();
return utils::create_global_state_from_str(content);
} else {
throw bws_runtime_error(
"parse_input_SS: input state file is unknown!");
}
}
return utils::create_global_state_from_str(state);
}
/**
* @brief parsing input TTS
* @param filename
* @param is_self_loop
*/
void CBSSP::parse_input_TTS(const string& filename, const bool& is_self_loop) {
if (filename == "X") /// no input file
throw bws_runtime_error("Please assign the input file!");
/// original input file before removing comments
ifstream org_in(filename.c_str());
if (!org_in.good())
throw bws_runtime_error("Input file does not find!");
iparser::remove_comments(org_in, refer::TMP_FILENAME, refer::COMMENT);
org_in.close();
/// new input file after removing comments
ifstream new_in("/tmp/tmp.tts.no_comment");
new_in >> thread_state::S >> thread_state::L;
active_TS.reserve(thread_state::S * thread_state::L);
active_R.reserve(thread_state::S * thread_state::L);
/// s_incoming: incoming transitions for shared states
/// s_outgoing: outgoing transitions for shared states
/// two elements with same index come up with a pair
/// NOTE: either incoming or outgoing only stores transition id
vector<incoming> s_incoming(thread_state::S, incoming());
vector<outgoing> s_outgoing(thread_state::S, outgoing());
/// l_incoming: incoming transitions for local states
/// l_outgoing: outgoing transitions for local states
/// two elements with same index come up with a pair
/// NOTE: either incoming or outgoing only stores transition id
vector<incoming> l_incoming(thread_state::L, incoming());
vector<outgoing> l_outgoing(thread_state::L, outgoing());
active_LR = vector<incoming>(thread_state::S, incoming());
id_transition trans_ID = 0; /// define unique transition ID
id_thread_state state_ID = 0; /// define unique thread state ID
/// define a map to store the id of thread state
map<thread_state, id_thread_state> map_S_ID;
vector<vector<bool>> visited_ID(thread_state::S,
vector<bool>(thread_state::L, false));
shared_state s1, s2; /// shared states
local_state l1, l2; /// local states
string sep; /// separator
id_thread_state id_src_TS, id_dst_TS;
while (new_in >> s1 >> l1 >> sep >> s2 >> l2) {
if (!is_self_loop && s1 == s2 && l1 == l2)
continue; /// remove self loops
if (sep == "->" || sep == "+>" || sep == "~>") {
const thread_state src_TS(s1, l1);
const thread_state dst_TS(s2, l2);
/// handle (s1, l1)
if (!visited_ID[s1][l1]) {
active_TS.emplace_back(src_TS);
map_S_ID.emplace(src_TS, state_ID);
id_src_TS = state_ID++;
visited_ID[s1][l1] = true;
} else {
auto ifind = map_S_ID.find(src_TS);
if (ifind != map_S_ID.end()) {
id_src_TS = ifind->second;
} else {
throw bws_runtime_error(
"thread state is mistakenly marked!");
}
}
/// handle (s2, l2)
if (!visited_ID[s2][l2]) {
active_TS.emplace_back(dst_TS);
map_S_ID.emplace(dst_TS, state_ID);
id_dst_TS = state_ID++;
visited_ID[s2][l2] = true;
} else {
auto ifind = map_S_ID.find(dst_TS);
if (ifind != map_S_ID.end()) {
id_dst_TS = ifind->second;
} else {
throw bws_runtime_error(
"thread state is mistakenly marked!");
}
}
/// handle transitons
if (sep == "+>")
active_R.emplace_back(id_src_TS, id_dst_TS, type_trans::SPAW);
else if (sep == "~>")
active_R.emplace_back(id_src_TS, id_dst_TS, type_trans::BRCT);
else
active_R.emplace_back(id_src_TS, id_dst_TS, type_trans::NORM);
if (s1 != s2) {
s_outgoing[s1].emplace_back(trans_ID);
s_incoming[s2].emplace_back(trans_ID);
}
/// handle local states
l_outgoing[l1].emplace_back(trans_ID);
l_incoming[l2].emplace_back(trans_ID);
active_LR[s2].emplace_back(trans_ID);
trans_ID++;
} else {
throw bws_runtime_error("illegal transition");
}
}
new_in.close();
#ifndef NDEBUG
cout << "Initial State: " << initl_S << "\n";
cout << "Final State: " << final_SS << "\n";
cout << __func__ << "\n";
for (auto s = 0; s < thread_state::S; ++s) {
cout << "shared state " << s << ": (";
for (const auto& v : s_incoming[s])
cout << "x" << v << " + ";
cout << ") - (";
for (const auto& v : s_outgoing[s])
cout << "x" << v << " + ";
cout << ")";
cout << "\n";
}
for (auto l = 0; l < thread_state::L; ++l) {
cout << "local state " << l << ": (";
for (const auto& v : l_incoming[l])
cout << "x" << v << " + ";
cout << ") - (";
for (const auto& v : l_outgoing[l])
cout << "x" << v << " + ";
cout << ")";
cout << "\n";
}
#endif
if (refer::OPT_PRINT_ADJ || refer::OPT_PRINT_ALL) {
cout << "The original TTS:" << endl;
cout << thread_state::S << " " << thread_state::L << "\n";
for (const auto& r : this->active_R) {
cout << active_TS[r.get_src()] << " ";
switch (r.get_type()) {
case type_trans::BRCT:
cout << "~>";
break;
case type_trans::SPAW:
cout << "+>";
break;
default:
cout << "->";
break;
}
cout << " " << active_TS[r.get_dst()];
cout << "\n";
}
}
this->s_encoding = vector<bool>(thread_state::S, false);
this->l_encoding = vector<bool>(thread_state::L, false);
this->build_TSE(s_incoming, s_outgoing, l_incoming, l_outgoing);
}
/**
* @brief compute _tau's cover preimages
* @param _tau
* @return all cover preimages
*/
deque<syst_state> CBSSP::step(const syst_state& _tau) {
deque<syst_state> images; /// the set of cover preimages
for (const auto& r : this->active_LR[_tau.get_share()]) {
const auto& tran = active_R[r];
const auto& prev = active_TS[tran.get_src()];
const auto& curr = active_TS[tran.get_dst()];
switch (tran.get_type()) {
case type_trans::BRCT: {
}
break;
case type_trans::SPAW: {
bool is_updated = false;
const auto& Z = this->update_counter(_tau.get_locals(),
curr.get_local(), prev.get_local(), is_updated);
/// obtain a cover preimage and store it in the <images>
if (is_updated)
images.emplace_back(prev.get_share(), Z);
}
break;
default: {
const auto& Z = this->update_counter(_tau.get_locals(),
curr.get_local(), prev.get_local());
/// obtain a cover preimage and store it in the <images>
images.emplace_back(prev.get_share(), Z);
}
break;
}
}
return images;
}
/**
* @brief check whether tau is coverable or not
* @param tau
* @return bool
* true : tau is coverable
* false: otherwise
*/
bool CBSSP::is_coverable(const syst_state& tau) {
if (tau.get_share() == initl_TS.get_share()) {
if (tau.get_locals().size() == 1
&& tau.get_locals().begin()->first == initl_TS.get_local())
return true;
}
return false;
}
/**
* To determine whether counter-abstracted local state part Z1 is covered
* by counter-abstracted local state tau2.
* NOTE: this function assumes that both Z1 and Z2 are ordered.
* @param Z1
* @param Z1
* @return bool
* true : if tau1 <= tau2
* false: otherwise
*/
bool CBSSP::is_covered(const ca_locals& Z1, const ca_locals& Z2) {
if (Z1.size() > Z2.size())
return false;
auto it1 = Z1.cbegin();
auto it2 = Z2.cbegin();
while (it1 != Z1.cend()) {
/// check if it2 reaches to the end
if (it2 == Z2.cend())
return false;
/// compare the map's contents
if (it1->first == it2->first) {
if (it1->second > it2->second)
return false;
++it1, ++it2;
} else if (it1->first > it2->first) {
++it2;
} else {
return false;
}
}
#ifdef HASHMAP
while (it1 != Z1.cend()) {
auto ifind = Z2.find(it1->first);
if (ifind == Z2.end() || ifind->second < it1->second)
return false;
++it1;
}
#endif
return true;
}
/**
*
* @param Z
* @param W
* @return
*/
bool CBSSP::is_uncoverable(const ca_locals& Z, const antichain& W) {
for (const auto& w : W) {
if (is_covered(w, Z))
return true;
}
return false;
}
/**
* To determine if tau is the minimal state in W
* @param tau:
* @param W :
* @return bool
* true :
* false:
*/
bool CBSSP::is_minimal(const ca_locals& Z, const antichain& W) {
for (const auto& w : W) {
if (is_covered(w, Z)) {
DBG_STD(cout << w << " " << tau << "\n";)
return false;
}
}
return true;
}
/**
* @brief to determine if tau is the minimal state in W
* @param tau:
* @param W :
*/
void CBSSP::minimize(const ca_locals& Z, antichain& W) {
auto iw = W.begin();
while (iw != W.end()) {
if (is_covered(Z, *iw)) {
iw = W.erase(iw);
} else {
++iw;
}
}
}
/**
* @brief update counters
* @param Z
* @param dec
* @param inc
* @return local states parts
*/
ca_locals CBSSP::update_counter(const ca_locals &Z, const local_state &dec,
const local_state &inc) {
if (dec == inc)
return Z;
auto _Z = Z;
/// decrease counter: this is executed only when there is a local
/// state dec in current local part
auto idec = _Z.find(dec);
if (idec != _Z.end()) {
idec->second--;
if (idec->second == 0)
_Z.erase(idec);
}
auto iinc = _Z.find(inc);
if (iinc != _Z.end()) {
iinc->second++;
} else {
_Z.emplace(inc, 1);
}
return _Z;
}
/**
* @brief this is used to update counter for spawn transitions
* @param Z
* @param dec
* @param inc
* @param is_updated
* @return local states parts
*/
ca_locals CBSSP::update_counter(const ca_locals &Z, const local_state &dec,
const local_state &inc, bool& is_updated) {
auto _Z = Z;
auto iinc = _Z.find(inc);
if (iinc != _Z.end()) {
/// decrease counter: this is executed only when there is a local
/// state dec in current local part
auto idec = _Z.find(dec);
if (idec != _Z.end()) {
idec->second--;
if (idec->second == 0)
_Z.erase(idec);
}
is_updated = true;
}
return _Z;
}
/////////////////////////////////////////////////////////////////////////
/// The following are the definitions for symbolic pruning.
///
/////////////////////////////////////////////////////////////////////////
/**
* @brief solicit if tau is uncoverable
* @param tau
* @return bool
* true : means unsat, uncoverable
* false: means
*/
bool CBSSP::solicit_for_TSE(const syst_state& tau) {
vec_expr assumption(ctx);
for (size_l l = 0; l < thread_state::L && l_encoding[l]; ++l) {
auto ifind = tau.get_locals().find(l);
if (ifind != tau.get_locals().end())
assumption.push_back(
ctx.int_const((l_affix + std::to_string(l)).c_str())
== ifind->second);
else
assumption.push_back(
ctx.int_const((l_affix + std::to_string(l)).c_str()) == 0);
}
for (size_l s = 0; s < thread_state::S && s_encoding[s]; ++s) {
if (s == tau.get_share())
assumption.push_back(
ctx.int_const((s_affix + std::to_string(s)).c_str()) == 1);
else
assumption.push_back(
ctx.int_const((s_affix + std::to_string(s)).c_str()) == 0);
}
switch (ssolver.check(assumption)) {
case unsat:
return true;
default:
return false;
}
}
/**
* @brief build thread state equation formula
* @param s_incoming
* @param s_outgoing
* @param l_incoming
* @param l_outgoing
* @return a set of constraints
*/
void CBSSP::build_TSE(const vector<incoming>& s_incoming,
const vector<outgoing>& s_outgoing, ///
const vector<incoming>& l_incoming, ///
const vector<outgoing>& l_outgoing) {
/// step 1: add n_0 >= 1
this->ssolver.add(n_0 >= 1);
/// step 2: add x_i >= 0
for (size_t i = 0; i < active_R.size(); ++i) {
this->ssolver.add(
ctx.int_const((r_affix + std::to_string(i)).c_str()) >= 0);
}
/// step 1: add C_L constraints
const auto& c_L = this->build_CL(l_incoming, l_outgoing);
for (size_t i = 0; i < c_L.size(); ++i) {
this->ssolver.add(c_L[i]);
}
/// step 2: add C_S constraints
const auto& c_S = this->build_CS(s_incoming, s_outgoing);
for (size_t i = 0; i < c_S.size(); ++i) {
this->ssolver.add(c_S[i]);
}
}
/**
* @brief build local state constraints
* @param l_incoming
* @param l_outgoing
* @return the vector of constraints
*/
vec_expr CBSSP::build_CL(const vector<incoming>& l_incoming,
const vector<outgoing>& l_outgoing) {
vec_expr phi(ctx);
for (size_l l = 0; l < thread_state::L; ++l) {
if (l_incoming.size() == 0 && l_outgoing.size() == 0)
continue;
/// mark shared state s has C_L constraints
this->l_encoding[l] = true;
/// declare left-hand side
expr lhs(l == initl_TS.get_local() ? n_0 : ctx.int_val(0));
/// declare right-hand side
expr rhs(ctx.int_const((l_affix + std::to_string(l)).c_str()));
/// setup left-hand side
for (const auto& inc : l_incoming[l])
lhs = lhs + ctx.int_const((r_affix + std::to_string(inc)).c_str());
/// setup right-hand side
for (const auto& out : l_outgoing[l])
rhs = rhs + ctx.int_const((r_affix + std::to_string(out)).c_str());
phi.push_back(lhs >= rhs);
}
return phi;
}
/**
* @brief build shared state constraints
* @param s_incoming
* @param s_outgoing
* @return the vector of constraints
*/
vec_expr CBSSP::build_CS(const vector<incoming>& s_incoming,
const vector<outgoing>& s_outgoing) {
vec_expr phi(ctx);
for (size_s s = 0; s < thread_state::S; ++s) {
if (s_incoming.size() == 0 && s_outgoing.size() == 0)
continue;
/// mark shared state s has C_S constraints
this->s_encoding[s] = true;
/// declare left-hand side
expr lhs(s == initl_TS.get_share() ? ctx.int_val(1) : ctx.int_val(0));
/// declare right-hand side
expr rhs(ctx.int_const((s_affix + std::to_string(s)).c_str()));
/// setup left-hand side
for (const auto& inc : s_incoming[s])
lhs = lhs + ctx.int_const((r_affix + std::to_string(inc)).c_str());
/// setup right-hand side
for (const auto& out : s_outgoing[s])
rhs = rhs + ctx.int_const((r_affix + std::to_string(out)).c_str());
phi.push_back(lhs == rhs);
}
return phi;
}
/////////////////////////////////////////////////////////////////////////
/// The following are the definitions for multithreading BSSP
///
/////////////////////////////////////////////////////////////////////////
/**
* @brief the multithreading BWS with symbolic pruning
* @return bool
* true : if final state is coverable
* false: otherwise
*/
bool CBSSP::multi_threaded_BSSP() {
/// the set of backward discovered system states
/// initialize worklist
cvotelist.push(final_SS);
cout << initl_TS << " " << final_SS << "\n";
/// the set of already-expanded system states
//cexpanded = cadj_chain(thread_state::S);
/// the set of known uncoverable system states
/// spawn a thread upon a member function
/// Here I use a lambda expression. This is a clean
/// and nice solution, if it works
///
auto bs = std::async(std::launch::async, &CBSSP::multi_threaded_BS, this);
auto sp = std::async(std::launch::async, &CBSSP::multi_threaded_SP, this);
if (bs.get())
return true;
return false;
}
/**
* Multithreading BWS with symbolic pruning
* @return bool
* true : if final state is coverable
* false: otherwise
*/
bool CBSSP::multi_threaded_BS() {
cout << "from BS: \n";
adj_chain cexpanded = adj_chain(thread_state::S, antichain());
while (!cworklist.empty() || !cvotelist.empty() || RUNNING) {
syst_state _tau;
if (!cworklist.try_pop(_tau))
continue;
cout << "BS: " << _tau << "\n";
const auto& s = _tau.get_share();
const auto& images = step(_tau);
for (const auto& tau : images) {
if (is_coverable(tau)) {
if (!TERMINATE)
TERMINATE = true;
return true;
}
if (!is_minimal(_tau.get_locals(), cexpanded[s])) {
if (RUNNING)
RUNNING = false;
continue;
} else {
if (!RUNNING)
RUNNING = true;
cvotelist.push(tau);
}
}
minimize(_tau.get_locals(), cexpanded[s]);
cexpanded[s].emplace_back(_tau.get_locals());
}
if (!TERMINATE)
TERMINATE = true;
return false;
}
/**
* Multithreading symbolic pruning
*/
void CBSSP::multi_threaded_SP() {
cout << "from SP: \n";
adj_chain cuncoverd = adj_chain(thread_state::S, antichain());
while (!TERMINATE && (!cworklist.empty() || !cvotelist.empty() || RUNNING)) {
syst_state _tau;
if (!cvotelist.try_pop(_tau))
continue;
cout << "SP: " << _tau << "\n";
const auto& s = _tau.get_share();
if (is_uncoverable(_tau.get_locals(), cuncoverd[s])) {
if (RUNNING)
RUNNING = false;
continue;
}
if (solicit_for_TSE(_tau)) {
if (RUNNING)
RUNNING = false;
minimize(_tau.get_locals(), cuncoverd[s]);
cuncoverd[s].emplace_back(_tau.get_locals());
} else {
if (!RUNNING)
RUNNING = true;
cworklist.push(_tau);
}
}
}
} /* namespace bssp */
|
cpp
|
<reponame>simondongji/MetarParser
package io.github.mivek.command.metar;
import io.github.mivek.model.Metar;
import io.github.mivek.model.RunwayInfo;
import io.github.mivek.utils.Converter;
import io.github.mivek.utils.Regex;
import org.apache.commons.lang3.ArrayUtils;
import java.util.regex.Pattern;
/**
* @author mivek
*/
public final class RunwayCommand implements Command {
/** Pattern to recognize a runway. */
private static final Pattern GENERIC_RUNWAY_REGEX = Pattern.compile("^(R\\d{2}\\w?/)");
/** Pattern regex for runway with min and max range visibility. */
private static final Pattern RUNWAY_MAX_RANGE_REGEX = Pattern.compile("^R(\\d{2}\\w?)/(\\d{4})V(\\d{3})(\\w{0,2})");
/** Pattern regex for runway visibility. */
private static final Pattern RUNWAY_REGEX = Pattern.compile("^R(\\d{2}\\w?)/(\\w)?(\\d{4})(\\w{0,2})$");
@Override public void execute(final Metar pMetar, final String pPart) {
RunwayInfo ri = new RunwayInfo();
String[] matches = Regex.pregMatch(RUNWAY_REGEX, pPart);
if (ArrayUtils.isNotEmpty(matches)) {
ri.setName(matches[1]);
ri.setMinRange(Integer.parseInt(matches[3]));
ri.setTrend(Converter.convertTrend(matches[4]));
pMetar.addRunwayInfo(ri);
}
matches = Regex.pregMatch(RUNWAY_MAX_RANGE_REGEX, pPart);
if (ArrayUtils.isNotEmpty(matches)) {
ri.setName(matches[1]);
ri.setMinRange(Integer.parseInt(matches[2]));
ri.setMaxRange(Integer.parseInt(matches[3]));
ri.setTrend(Converter.convertTrend(matches[4]));
pMetar.addRunwayInfo(ri);
}
}
@Override public boolean canParse(final String pInput) {
return Regex.find(GENERIC_RUNWAY_REGEX, pInput);
}
}
|
java
|
<filename>WuHu/WuHu.Angular2Client/src/app/pages/dashboard/dashboard.component.html
<div class="row">
<div class="col-xs-12">
<div class="jumbotron">
<h1>Willkommen im WuzlHub</h1>
<p *ngIf="!isLoggedIn">Hallo Gast!</p>
<p *ngIf="isLoggedIn">Hallo {{ currentPlayer?.Firstname }}! </p>
<p *ngIf="isLoggedIn">Deine Gewinnrate derzeit liegt bei <strong>{{ currentStats?.WinRate | number : '1.2-2' }}%</strong>. </p>
<p *ngIf="isLoggedIn">Du hast derzeit <strong>{{ currentStats?.CurrentScore }}</strong> Punkte.</p>
<p>Über die Menüpunkte oben kannst du die derzeitige Rangliste sowie Statistiken aller Spieler ansehen.</p>
<p>Außerdem kannst du live die Spielstände der heutigen Spiele mitverfolgen.</p>
<p *ngIf="!isLoggedIn">Über den Login Knopf in der Menüleiste kommst du zur Login-Ansicht.
Als registrierter Benutzer kannst du dich dort mit deinen Nutzerdaten anmelden. Falls du noch keine Zugangsdaten hast
oder Probleme beim Anmelden auftreten, wende dich bitte an einen Systemadministrator. </p>
<p *ngIf="isLoggedIn">Über den <i>Spielstand</i> Tab kannst du deine heutigen Spielstände mitführen.</p>
<p *ngIf="isAdmin">Als Admin kannst du außerdem den heutigen Spielplan sowie die Spieler erstellen und verwalten.</p>
</div>
</div>
</div>
|
html
|
<gh_stars>0
{"ast":null,"code":"/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule accumulateInto\n */\n'use strict';\n\nvar invariant = require(\"./invariant\");\n/**\n *\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\n\nfunction accumulateInto(current, next) {\n \"production\" !== process.env.NODE_ENV ? invariant(next != null, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(next != null);\n\n if (current == null) {\n return next;\n } // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n\n\n var currentIsArray = Array.isArray(current);\n var nextIsArray = Array.isArray(next);\n\n if (currentIsArray && nextIsArray) {\n current.push.apply(current, next);\n return current;\n }\n\n if (currentIsArray) {\n current.push(next);\n return current;\n }\n\n if (nextIsArray) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n}\n\nmodule.exports = accumulateInto;","map":{"version":3,"sources":["/home/wildcat26/engage-wit/material-dashboard-react-master/node_modules/react-date-picker-cs/node_modules/react/lib/accumulateInto.js"],"names":["invariant","require","accumulateInto","current","next","process","env","NODE_ENV","currentIsArray","Array","isArray","nextIsArray","push","apply","concat","module","exports"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEA,IAAIA,SAAS,GAAGC,OAAO,CAAC,aAAD,CAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA,SAASC,cAAT,CAAwBC,OAAxB,EAAiCC,IAAjC,EAAuC;AACpC,mBAAiBC,OAAO,CAACC,GAAR,CAAYC,QAA7B,GAAwCP,SAAS,CAChDI,IAAI,IAAI,IADwC,EAEhD,uEAFgD,CAAjD,GAGGJ,SAAS,CAACI,IAAI,IAAI,IAAT,CAHb;;AAIA,MAAID,OAAO,IAAI,IAAf,EAAqB;AACnB,WAAOC,IAAP;AACD,GAPoC,CASrC;AACA;;;AACA,MAAII,cAAc,GAAGC,KAAK,CAACC,OAAN,CAAcP,OAAd,CAArB;AACA,MAAIQ,WAAW,GAAGF,KAAK,CAACC,OAAN,CAAcN,IAAd,CAAlB;;AAEA,MAAII,cAAc,IAAIG,WAAtB,EAAmC;AACjCR,IAAAA,OAAO,CAACS,IAAR,CAAaC,KAAb,CAAmBV,OAAnB,EAA4BC,IAA5B;AACA,WAAOD,OAAP;AACD;;AAED,MAAIK,cAAJ,EAAoB;AAClBL,IAAAA,OAAO,CAACS,IAAR,CAAaR,IAAb;AACA,WAAOD,OAAP;AACD;;AAED,MAAIQ,WAAJ,EAAiB;AACf;AACA,WAAO,CAACR,OAAD,EAAUW,MAAV,CAAiBV,IAAjB,CAAP;AACD;;AAED,SAAO,CAACD,OAAD,EAAUC,IAAV,CAAP;AACD;;AAEDW,MAAM,CAACC,OAAP,GAAiBd,cAAjB","sourcesContent":["/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule accumulateInto\n */\n\n'use strict';\n\nvar invariant = require(\"./invariant\");\n\n/**\n *\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\nfunction accumulateInto(current, next) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n next != null,\n 'accumulateInto(...): Accumulated items must not be null or undefined.'\n ) : invariant(next != null));\n if (current == null) {\n return next;\n }\n\n // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n var currentIsArray = Array.isArray(current);\n var nextIsArray = Array.isArray(next);\n\n if (currentIsArray && nextIsArray) {\n current.push.apply(current, next);\n return current;\n }\n\n if (currentIsArray) {\n current.push(next);\n return current;\n }\n\n if (nextIsArray) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n}\n\nmodule.exports = accumulateInto;\n"]},"metadata":{},"sourceType":"script"}
|
json
|
<html lang="zh-Hans" >
<head>
<base href="/storage/storagedriver/"></base>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
@charset "UTF-8";
[ng\:cloak],
[ng-cloak],
[data-ng-cloak],
[x-ng-cloak],
.ng-cloak,
.x-ng-cloak,
.ng-hide:not(.ng-hide-animate) {
display: none !important;
}
ng\:form {
display: block;
}
</style>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WL2QLG5');</script>
<!-- End Google Tag Manager -->
<!-- favicon -->
<link rel="icon" type="image/x-icon" href="/favicons/docs@2x.ico" sizes="129x128">
<meta name="msapplication-TileImage" content="/favicons/docs@2x.ico">
<link rel="apple-touch-icon" type="image/x-icon" href="/favicons/docs@2x.ico" sizes="129x128">
<meta property="og:image" content="/favicons/docs@2x.ico">
<!-- metadata -->
<meta property="og:type" content="website">
<meta property="og:updated_time" itemprop="dateUpdated" content="2019-11-28T19:55:45+00:00">
<meta property="og:image" itemprop="image primaryImageOfPage" content="/images/docs@2x.png">
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" content="docs.docker.com">
<meta name="twitter:site" content="@docker_docs">
<meta name="twitter:url" content="https://twitter.com/docker_docs">
<meta name="twitter:title" itemprop="title name" content="Use the OverlayFS storage driver">
<meta name="twitter:description" property="og:description" itemprop="description" content="OverlayFS is a modern union filesystem that is similar to AUFS, but faster and with a simpler implementation. Docker provides two storage drivers for OverlayFS: the original overlay, and the...">
<meta name="twitter:image:src" content="/images/docs@2x.png">
<meta name="twitter:image:alt" content="Docker Documentation">
<meta property="article:published_time" itemprop="datePublished" content="2019-11-28T19:55:45+00:00">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="container, storage, driver, OverlayFS, overlay2, overlay">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link id="pygments" rel="stylesheet" href="/css/pygments/perldoc.css">
<link id="pagestyle" rel="stylesheet" href="/css/style.css">
<!-- Go get "Open Sans" font from Google -->
<link href="asset?aid=0" rel="stylesheet">
<!-- SEO stuff -->
<title>使用OverlayFS存储驱动程序| Docker文档</title>
<meta property="og:title" content="Use the OverlayFS storage driver">
<meta property="og:locale" content="en_US">
<meta name="description" content="Learn how to optimize your use of OverlayFS driver.">
<meta property="og:description" content="Learn how to optimize your use of OverlayFS driver.">
<link rel="canonical" href="/storage/storagedriver/overlayfs-driver/">
<meta property="og:url" content="https://docs.docker.com/storage/storagedriver/overlayfs-driver/">
<meta property="og:site_name" content="Docker Documentation">
<script type="application/ld+json">
{"@context":"http://schema.org","@type":"WebPage","headline":"Use the OverlayFS storage driver","description":"Learn how to optimize your use of OverlayFS driver.","url":"https://docs.docker.com/storage/storagedriver/overlayfs-driver/"}</script>
<!-- END SEO STUFF -->
<script language="javascript">
// Default to assuming this is an archive and hiding some stuff
// See js/archive.js and js/docs.js for logic relating to this
var isArchive = true;
var dockerVersion = 'v19.03';
</script>
</head>
<body class="colums" ng-app="Docker" ng-controller="DockerController">
<header>
<nav class="nav-secondary navbar navbar-fixed-top">
<!-- <div class="fan"></div> -->
<div class="container-fluid">
<div class="navbar-header">
<a href="/"><img class="logo" src="/images/docker-docs-logo.svg" alt="Docker文件" title="Docker文件"></a>
</div>
<div class="navbar-collapse" aria-expanded="false" style="height:1px">
<div class="search-form" id="search-div">
<form class="search-form form-inline ng-pristine ng-valid" id="searchForm" action="/search/">
<input class="search-field form-control ds-input" id="st-search-input" value="" name="q" placeholder="搜索文档" type="search" autocomplete="off" spellcheck="false" style="position:relative;vertical-align:top">
<div id="autocompleteContainer">
<div id="autocompleteResults"></div>
</div>
<!-- <button type="submit" class="search-submit btn btn-default">Search</button> -->
</form>
</div>
<div class="sidebar-toggle">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"><span class="sr-only">切换导航</span> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
</div>
<div class="nav-container">
<div id="tabs">
<ul class="tabs" id="jsTOCHorizontal">
</ul>
</div>
<div class="ctrl-right hidden-xs hidden-sm">
<a href="javascript:void(0);" id="menu-toggle"><i class="fa fa-indent" aria-hidden="true"></i></a>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docker v19.03(当前) <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="/edge/">Docker边缘</a></li><li><a href="/v18.09/">Docker v18.09</a></li><li><a href="/v18.03/">Docker v18.03</a></li><li><a href="/v17.12/">Docker v17.12</a></li><li><a href="/v17.09/">Docker v17.09</a></li><li><a href="/v17.06/">Docker v17.06</a></li><li><a href="/v17.03/">Docker v17.03</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</nav>
</header>
<div class="wrapper right-open">
<div class="container-fluid">
<div class="row">
<div class="col-body">
<main class="col-content content">
<section class="section">
<h1>使用OverlayFS存储驱动程序</h1> <span class="reading-time" title="预计阅读时间">
<span class="reading-time-label">预计阅读时间:</span> 18分钟</span>
<p>OverlayFS是一种现代的<em>联合文件系统</em> ,与AUFS相似,但是速度更快且实现更简单。Docker为OverlayFS提供了两个存储驱动程序:原始的<code class="highlighter-rouge">overlay</code>和更新且更稳定的<code class="highlighter-rouge">overlay2</code> 。</p>
<p>本主题将Linux内核驱动程序称为<code class="highlighter-rouge">OverlayFS</code> ,将Docker存储驱动程序称为<code class="highlighter-rouge">overlay</code>或<code class="highlighter-rouge">overlay2</code> 。</p>
<blockquote>
<p><strong>注意</strong> :如果使用OverlayFS,请使用<code class="highlighter-rouge">overlay2</code>驱动程序而不是<code class="highlighter-rouge">overlay</code>驱动程序,因为它在inode利用率方面更为有效。要使用新的驱动程序,您需要Linux内核的版本4.0或更高版本,或者使用3.10.0-514及更高版本的RHEL或CentOS。</p>
<p>有关<code class="highlighter-rouge">overlay</code>和<code class="highlighter-rouge">overlay2</code>之间差异的更多信息,请检查<a href="/storage/storagedriver/select-storage-driver/">Docker存储驱动程序</a> 。</p>
</blockquote>
<h2 id="prerequisites">先决条件</h2>
<p>如果满足以下先决条件,则支持OverlayFS:</p>
<ul>
<li>Docker Engine-Community和Docker EE 17.06.02-ee5及更高版本均支持<code class="highlighter-rouge">overlay2</code>驱动程序,它是推荐的存储驱动程序。</li>
<li>Linux内核的版本4.0或更高版本,或使用内核的版本3.10.0-514或更高版本的RHEL或CentOS。如果使用较旧的内核,则不建议使用<code class="highlighter-rouge">overlay</code>驱动程序。</li>
<li>
<p><code class="highlighter-rouge">xfs</code>支持文件系统支持<code class="highlighter-rouge">overlay</code>和<code class="highlighter-rouge">overlay2</code>驱动程序,但仅在启用<code class="highlighter-rouge">d_type=true</code> 。</p>
<p>使用<code class="highlighter-rouge">xfs_info</code>验证<code class="highlighter-rouge">ftype</code>选项是否设置为<code class="highlighter-rouge">1</code> 。要正确格式化<code class="highlighter-rouge">xfs</code>文件系统,请使用<code class="highlighter-rouge">-n ftype=1</code>标志。</p>
<blockquote class="warning">
<p><strong>警告</strong> :在不支持d_type的XFS上运行现在会导致Docker跳过使用<code class="highlighter-rouge">overlay</code>或<code class="highlighter-rouge">overlay2</code>驱动程序的尝试。现有安装将继续运行,但会产生错误。这是为了允许用户迁移其数据。在将来的版本中,这将是一个致命错误,它将阻止Docker启动。</p>
</blockquote>
</li>
<li>更改存储驱动程序将使现有容器和映像在本地系统上不可访问。在更改存储驱动程序之前,请使用<code class="highlighter-rouge">docker save</code>保存您已构建的所有映像,或将其推送到Docker Hub或私有注册表中,以便以后无需重新创建它们。</li>
</ul>
<h2 id="configure-docker-with-the-overlay-or-overlay2-storage-driver">使用<code class="highlighter-rouge">overlay</code>或<code class="highlighter-rouge">overlay2</code>存储驱动程序配置Docker</h2>
<p>强烈建议您尽可能使用<code class="highlighter-rouge">overlay2</code>驱动程序,而不要使用<code class="highlighter-rouge">overlay</code>驱动程序。Docker EE <strong>不</strong>支持<code class="highlighter-rouge">overlay</code>驱动程序。</p>
<p>要将Docker配置为使用<code class="highlighter-rouge">overlay</code>存储驱动程序,您的Docker主机必须运行Linux内核3.18版本(最好是更新的),并且已加载了覆盖内核模块。对于<code class="highlighter-rouge">overlay2</code>驱动程序,您的内核版本必须为4.0或更高版本。</p>
<p>在执行此过程之前,您必须首先满足所有<a href="#prerequisites">先决条件</a> 。</p>
<p>以下步骤概述了如何配置<code class="highlighter-rouge">overlay2</code>存储驱动程序。如果需要使用旧版<code class="highlighter-rouge">overlay</code>驱动程序,请指定它。</p>
<ol>
<li>
<p>停止Docker。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">sudo </span>systemctl stop docker
</code></pre></div> </div>
</li>
<li>
<p>将<code class="highlighter-rouge">/var/lib/docker</code>的内容复制到一个临时位置。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>cp <span class="nt">-au</span> /var/lib/docker /var/lib/docker.bk
</code></pre></div> </div>
</li>
<li>
<p>如果要使用与<code class="highlighter-rouge">/var/lib/</code>所使用的备份文件系统不同的备份文件系统,请格式化该文件系统并将其安装到<code class="highlighter-rouge">/var/lib/docker</code> 。确保将此安装添加到<code class="highlighter-rouge">/etc/fstab</code>以使其永久。</p>
</li>
<li>
<p>编辑<code class="highlighter-rouge">/etc/docker/daemon.json</code> 。如果尚不存在,请创建它。假设文件为空,请添加以下内容。</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"storage-driver"</span><span class="p">:</span><span class="w"> </span><span class="s2">"overlay2"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div> </div>
<p>如果<code class="highlighter-rouge">daemon.json</code>文件包含格式错误的JSON,则Docker无法启动。</p>
</li>
<li>
<p>启动Docker。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">sudo </span>systemctl start docker
</code></pre></div> </div>
</li>
<li>
<p>验证守护程序正在使用<code class="highlighter-rouge">overlay2</code>存储驱动程序。使用<code class="highlighter-rouge">docker info</code>命令并查找<code class="highlighter-rouge">Storage Driver</code> and <code class="highlighter-rouge">Backing filesystem</code> 。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker info
Containers: 0
Images: 0
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: <span class="nb">true
</span>Native Overlay Diff: <span class="nb">true</span>
<output truncated>
</code></pre></div> </div>
</li>
</ol>
<p>Docker现在正在使用<code class="highlighter-rouge">overlay2</code>存储驱动程序,并已使用所需的<code class="highlighter-rouge">lowerdir</code> , <code class="highlighter-rouge">upperdir</code> , <code class="highlighter-rouge">merged</code>和<code class="highlighter-rouge">workdir</code>构造自动创建了覆盖挂载。</p>
<p>继续阅读有关OverlayFS在您的Docker容器中如何工作的详细信息,以及性能建议以及有关其与不同后备文件系统兼容性的限制的信息。</p>
<h2 id="how-the-overlay2-driver-works"><code class="highlighter-rouge">overlay2</code>驱动程序如何工作</h2>
<p>如果您仍在使用<code class="highlighter-rouge">overlay</code>驱动程序而不是<code class="highlighter-rouge">overlay2</code> ,请参阅<a href="#how-the-overlay-driver-works">叠加驱动程序的工作原理</a> 。</p>
<p>OverlayFS在单个Linux主机上分层两个目录,并将它们显示为单个目录。这些目录称为“ <em>层”</em> ,统一过程称为“ <em>联合安装”</em> 。OverlayFS将较低的目录称为<code class="highlighter-rouge">lowerdir</code> ,将较高的目录称为<code class="highlighter-rouge">upperdir</code> 。统一视图通过其自己的目录称为<code class="highlighter-rouge">merged</code>公开。</p>
<p><code class="highlighter-rouge">overlay2</code>驱动程序本身支持多达128个较低的OverlayFS层。此功能可为与层相关的Docker命令(如<code class="highlighter-rouge">docker build</code>和<code class="highlighter-rouge">docker commit</code>提供更好的性能,并在支持文件系统上消耗更少的inode。</p>
<h3 id="image-and-container-layers-on-disk">磁盘上的图像和容器层</h3>
<p>使用<code class="highlighter-rouge">docker pull ubuntu</code>下载五层映像后,您可以在<code class="highlighter-rouge">/var/lib/docker/overlay2</code>下看到六个目录。</p>
<blockquote>
<p><strong>警告</strong> :请勿直接操作<code class="highlighter-rouge">/var/lib/docker/</code>任何文件或目录。这些文件和目录由Docker管理。</p>
</blockquote>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-l</span> /var/lib/docker/overlay2
total 24
drwx------ 5 root root 4096 Jun 20 07:36 223c2864175491657d238e2664251df13b63adb8d050924fd1bfcdb278b866f7
drwx------ 3 root root 4096 Jun 20 07:36 3a36935c9df35472229c57f4a27105a136f5e4dbef0f87905b2e506e494e348b
drwx------ 5 root root 4096 Jun 20 07:36 4e9fa83caff3e8f4cc83693fa407a4a9fac9573deaf481506c102d484dd1e6a1
drwx------ 5 root root 4096 Jun 20 07:36 e8876a226237217ec61c4baf238a32992291d059fdac95ed6303bdff3f59cff5
drwx------ 5 root root 4096 Jun 20 07:36 eca1e4e1694283e001f200a667bb3cb40853cf2d1b12c29feda7422fed78afed
drwx------ 2 root root 4096 Jun 20 07:36 l
</code></pre></div></div>
<p>新的<code class="highlighter-rouge">l</code> (小写<code class="highlighter-rouge">L</code> )目录包含缩短的层标识符作为符号链接。这些标识符用于避免在<code class="highlighter-rouge">mount</code>命令的参数上达到页面大小限制。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-l</span> /var/lib/docker/overlay2/l
total 20
lrwxrwxrwx 1 root root 72 Jun 20 07:36 6Y5IM2XC7TSNIJZZFLJCS6I4I4 -> ../3a36935c9df35472229c57f4a27105a136f5e4dbef0f87905b2e506e494e348b/diff
lrwxrwxrwx 1 root root 72 Jun 20 07:36 B3WWEFKBG3PLLV737KZFIASSW7 -> ../4e9fa83caff3e8f4cc83693fa407a4a9fac9573deaf481506c102d484dd1e6a1/diff
lrwxrwxrwx 1 root root 72 Jun 20 07:36 JEYMODZYFCZFYSDABYXD5MF6YO -> ../eca1e4e1694283e001f200a667bb3cb40853cf2d1b12c29feda7422fed78afed/diff
lrwxrwxrwx 1 root root 72 Jun 20 07:36 NFYKDW6APBCCUCTOUSYDH4DXAT -> ../223c2864175491657d238e2664251df13b63adb8d050924fd1bfcdb278b866f7/diff
lrwxrwxrwx 1 root root 72 Jun 20 07:36 UL2MW33MSE3Q5VYIKBRN4ZAGQP -> ../e8876a226237217ec61c4baf238a32992291d059fdac95ed6303bdff3f59cff5/diff
</code></pre></div></div>
<p>最低层包含一个名为<code class="highlighter-rouge">link</code>的文件,该文件包含缩短的标识符的名称,以及一个名为<code class="highlighter-rouge">diff</code>的目录,该目录包含该层的内容。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> /var/lib/docker/overlay2/3a36935c9df35472229c57f4a27105a136f5e4dbef0f87905b2e506e494e348b/
diff link
<span class="nv">$ </span><span class="nb">cat</span> /var/lib/docker/overlay2/3a36935c9df35472229c57f4a27105a136f5e4dbef0f87905b2e506e494e348b/link
6Y5IM2XC7TSNIJZZFLJCS6I4I4
<span class="nv">$ </span><span class="nb">ls</span> /var/lib/docker/overlay2/3a36935c9df35472229c57f4a27105a136f5e4dbef0f87905b2e506e494e348b/diff
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
</code></pre></div></div>
<p>最低的第二层,以及每个较高的层,都包含一个名为<code class="highlighter-rouge">lower</code>的文件,该文件表示其父文件,以及一个名为<code class="highlighter-rouge">diff</code>的目录,该目录包含其内容。它还包含一个<code class="highlighter-rouge">merged</code>目录,其中包含其父层及其本身的统一内容,以及一个<code class="highlighter-rouge">work</code>目录,供OverlayFS在内部使用。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> /var/lib/docker/overlay2/223c2864175491657d238e2664251df13b63adb8d050924fd1bfcdb278b866f7
diff link lower merged work
<span class="nv">$ </span><span class="nb">cat</span> /var/lib/docker/overlay2/223c2864175491657d238e2664251df13b63adb8d050924fd1bfcdb278b866f7/lower
l/6Y5IM2XC7TSNIJZZFLJCS6I4I4
<span class="nv">$ </span><span class="nb">ls</span> /var/lib/docker/overlay2/223c2864175491657d238e2664251df13b63adb8d050924fd1bfcdb278b866f7/diff/
etc sbin usr var
</code></pre></div></div>
<p>要查看将<code class="highlighter-rouge">overlay</code>存储驱动程序与Docker一起使用时存在的<code class="highlighter-rouge">mount</code> ,请使用<code class="highlighter-rouge">mount</code>命令。为了易于阅读,下面的输出被截断了。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>mount | <span class="nb">grep </span>overlay
overlay on /var/lib/docker/overlay2/9186877cdf386d0a3b016149cf30c208f326dca307529e646afce5b3f83f5304/merged
<span class="nb">type </span>overlay <span class="o">(</span>rw,relatime,
<span class="nv">lowerdir</span><span class="o">=</span>l/DJA75GUWHWG7EWICFYX54FIOVT:l/B3WWEFKBG3PLLV737KZFIASSW7:l/JEYMODZYFCZFYSDABYXD5MF6YO:l/UL2MW33MSE3Q5VYIKBRN4ZAGQP:l/NFYKDW6APBCCUCTOUSYDH4DXAT:l/6Y5IM2XC7TSNIJZZFLJCS6I4I4,
<span class="nv">upperdir</span><span class="o">=</span>9186877cdf386d0a3b016149cf30c208f326dca307529e646afce5b3f83f5304/diff,
<span class="nv">workdir</span><span class="o">=</span>9186877cdf386d0a3b016149cf30c208f326dca307529e646afce5b3f83f5304/work<span class="o">)</span>
</code></pre></div></div>
<p>第二行的<code class="highlighter-rouge">rw</code>显示<code class="highlighter-rouge">overlay</code>安装是可读写的。</p>
<h2 id="how-the-overlay-driver-works"><code class="highlighter-rouge">overlay</code>驱动程序如何工作</h2>
<p>此内容仅适用于<code class="highlighter-rouge">overlay</code>驱动程序。Docker建议使用工作方式不同的<code class="highlighter-rouge">overlay2</code>驱动程序。见<a href="#how-the-overlay2-driver-works">该overlay2驱动程序的工作原理</a>为<code class="highlighter-rouge">overlay2</code> 。</p>
<p>OverlayFS在单个Linux主机上分层两个目录,并将它们显示为单个目录。这些目录称为“ <em>层”</em> ,统一过程称为“ <em>联合安装”</em> 。OverlayFS将较低的目录称为<code class="highlighter-rouge">lowerdir</code> ,将较高的目录称为<code class="highlighter-rouge">upperdir</code> 。统一视图通过其自己的目录称为<code class="highlighter-rouge">merged</code>公开。</p>
<p>下图显示了如何将Docker映像和Docker容器分层。图像层是<code class="highlighter-rouge">lowerdir</code> ,容器层是<code class="highlighter-rouge">upperdir</code> 。统一视图通过称为<code class="highlighter-rouge">merged</code>的目录公开,该目录实际上是容器的安装点。该图显示了Docker构造如何映射到OverlayFS构造。</p>
<p><img src="/storage/storagedriver/images/overlay_constructs.jpg" alt="overlayfslowerdir,upperdir,合并"></p>
<p>在图像层和容器层包含相同文件的情况下,容器层“获胜”并掩盖了图像层中相同文件的存在。</p>
<p><code class="highlighter-rouge">overlay</code>驱动程序仅适用于两层。这意味着不能将多层图像实现为多个OverlayFS层。而是将每个图像层实现为<code class="highlighter-rouge">/var/lib/docker/overlay</code>下的自己的目录。然后,将硬链接用作节省空间的方式,以引用与较低层共享的数据。硬链接的使用会导致索引节点的过度使用,这是对传统<code class="highlighter-rouge">overlay</code>存储驱动程序的已知限制,并且可能需要备用文件系统的其他配置。有关详细信息,请参考<a href="#overlayfs-and-docker-performance">overlayFS和Docker性能</a> 。</p>
<p>为了创建容器, <code class="highlighter-rouge">overlay</code>驱动程序将代表图像顶层的目录与该容器的新目录结合在一起。图像的顶层是叠加层中的<code class="highlighter-rouge">lowerdir</code> ,并且是只读的。容器的新目录为<code class="highlighter-rouge">upperdir</code>并且可写。</p>
<h3 id="image-and-container-layers-on-disk-1">磁盘上的图像和容器层</h3>
<p>以下<code class="highlighter-rouge">docker pull</code>命令显示了Docker主机正在下载包含五层的Docker映像。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
5ba4f30e5bea: Pull <span class="nb">complete
</span>9d7d19c9dc56: Pull <span class="nb">complete
</span>ac6ad7efd0f9: Pull <span class="nb">complete
</span>e7491a747824: Pull <span class="nb">complete
</span>a3ed95caeb02: Pull <span class="nb">complete
</span>Digest: sha256:46fb5d001b88ad904c5c732b086b596b92cfb4a4840a3abd0e35dbb6870585e4
Status: Downloaded newer image <span class="k">for </span>ubuntu:latest
</code></pre></div></div>
<h4 id="the-image-layers">图像层</h4>
<p>每个图像层在<code class="highlighter-rouge">/var/lib/docker/overlay/</code>都有自己的目录,该目录包含其内容,如下所示。图像层ID与目录ID不对应。</p>
<blockquote>
<p><strong>警告</strong> :请勿直接操作<code class="highlighter-rouge">/var/lib/docker/</code>任何文件或目录。这些文件和目录由Docker管理。</p>
</blockquote>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-l</span> /var/lib/docker/overlay/
total 20
drwx------ 3 root root 4096 Jun 20 16:11 38f3ed2eac129654acef11c32670b534670c3a06e483fce313d72e3e0a15baa8
drwx------ 3 root root 4096 Jun 20 16:11 55f1e14c361b90570df46371b20ce6d480c434981cbda5fd68c6ff61aa0a5358
drwx------ 3 root root 4096 Jun 20 16:11 824c8a961a4f5e8fe4f4243dab57c5be798e7fd195f6d88ab06aea92ba931654
drwx------ 3 root root 4096 Jun 20 16:11 ad0fe55125ebf599da124da175174a4b8c1878afe6907bf7c78570341f308461
drwx------ 3 root root 4096 Jun 20 16:11 edab9b5e5bf73f2997524eebeac1de4cf9c8b904fa8ad3ec43b3504196aa3801
</code></pre></div></div>
<p>图像层目录包含该层独有的文件以及与较低层共享的数据的硬链接。这样可以有效利用磁盘空间。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-i</span> /var/lib/docker/overlay/38f3ed2eac129654acef11c32670b534670c3a06e483fce313d72e3e0a15baa8/root/bin/ls
19793696 /var/lib/docker/overlay/38f3ed2eac129654acef11c32670b534670c3a06e483fce313d72e3e0a15baa8/root/bin/ls
<span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-i</span> /var/lib/docker/overlay/55f1e14c361b90570df46371b20ce6d480c434981cbda5fd68c6ff61aa0a5358/root/bin/ls
19793696 /var/lib/docker/overlay/55f1e14c361b90570df46371b20ce6d480c434981cbda5fd68c6ff61aa0a5358/root/bin/ls
</code></pre></div></div>
<h4 id="the-container-layer">容器层</h4>
<p>容器也存在于Docker主机文件系统中<code class="highlighter-rouge">/var/lib/docker/overlay/</code>下的磁盘上。如果使用<code class="highlighter-rouge">ls -l</code>命令列出正在运行的容器的子目录,则存在三个目录和一个文件:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-l</span> /var/lib/docker/overlay/<directory-of-running-container>
total 16
<span class="nt">-rw-r--r--</span> 1 root root 64 Jun 20 16:39 lower-id
drwxr-xr-x 1 root root 4096 Jun 20 16:39 merged
drwxr-xr-x 4 root root 4096 Jun 20 16:39 upper
drwx------ 3 root root 4096 Jun 20 16:39 work
</code></pre></div></div>
<p><code class="highlighter-rouge">lower-id</code>文件包含容器所基于的图像的顶层ID,即OverlayFS <code class="highlighter-rouge">lowerdir</code> 。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">cat</span> /var/lib/docker/overlay/ec444863a55a9f1ca2df72223d459c5d940a721b2288ff86a3f27be28b53be6c/lower-id
55f1e14c361b90570df46371b20ce6d480c434981cbda5fd68c6ff61aa0a5358
</code></pre></div></div>
<p><code class="highlighter-rouge">upper</code>目录包含容器的读写层的内容,该层对应于OverlayFS <code class="highlighter-rouge">upperdir</code> 。</p>
<p><code class="highlighter-rouge">merged</code>目录是<code class="highlighter-rouge">lowerdir</code>和<code class="highlighter-rouge">upperdir</code>的联合安装,它包含正在运行的容器中文件系统的视图。</p>
<p><code class="highlighter-rouge">work</code>目录在OverlayFS内部。</p>
<p>要查看将<code class="highlighter-rouge">overlay</code>存储驱动程序与Docker一起使用时存在的<code class="highlighter-rouge">mount</code> ,请使用<code class="highlighter-rouge">mount</code>命令。为了易于阅读,下面的输出被截断了。</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>mount | <span class="nb">grep </span>overlay
overlay on /var/lib/docker/overlay/ec444863a55a.../merged
<span class="nb">type </span>overlay <span class="o">(</span>rw,relatime,lowerdir<span class="o">=</span>/var/lib/docker/overlay/55f1e14c361b.../root,
<span class="nv">upperdir</span><span class="o">=</span>/var/lib/docker/overlay/ec444863a55a.../upper,
<span class="nv">workdir</span><span class="o">=</span>/var/lib/docker/overlay/ec444863a55a.../work<span class="o">)</span>
</code></pre></div></div>
<p>第二行的<code class="highlighter-rouge">rw</code>显示<code class="highlighter-rouge">overlay</code>安装是可读写的。</p>
<h2 id="how-container-reads-and-writes-work-with-overlay-or-overlay2">容器如何使用<code class="highlighter-rouge">overlay</code>或<code class="highlighter-rouge">overlay2</code>读写</h2>
<h3 id="reading-files">读取文件</h3>
<p>考虑三种情况,其中容器打开文件以进行覆盖访问。</p>
<ul>
<li>
<p><strong>该文件在容器层中不存在</strong> :如果容器打开文件以进行读取访问,并且该文件在容器中( <code class="highlighter-rouge">upperdir</code> )不存在,则从映像( <code class="highlighter-rouge">lowerdir)</code>读取该<code class="highlighter-rouge">lowerdir)</code> 。这几乎不会产生性能开销。</p>
</li>
<li>
<p><strong>该文件仅存在于容器层中</strong> :如果容器打开文件以进行读取访问,并且该文件存在于容器中( <code class="highlighter-rouge">upperdir</code> ),而不存在于映像中( <code class="highlighter-rouge">lowerdir</code> ),则直接从容器中读取文件。</p>
</li>
<li>
<p><strong>该文件同时存在于容器层和图像层中</strong> :如果容器打开文件以进行读取访问,并且文件存在于图像层和容器层中,则将读取容器层中文件的版本。容器层( <code class="highlighter-rouge">upperdir</code> )中的文件会使图像层( <code class="highlighter-rouge">lowerdir</code> )中具有相同名称的文件模糊。</p>
</li>
</ul>
<h3 id="modifying-files-or-directories">修改文件或目录</h3>
<p>考虑在某些情况下修改了容器中的文件。</p>
<ul>
<li>
<p><strong>首次写入文件</strong> :容器第一次写入现有文件时,该文件在容器中不存在( <code class="highlighter-rouge">upperdir</code> )。<code class="highlighter-rouge">overlay</code> / <code class="highlighter-rouge">overlay2</code>驱动程序执行<em>copy_up</em>操作,将文件从映像( <code class="highlighter-rouge">lowerdir</code> )复制到容器( <code class="highlighter-rouge">upperdir</code> )。然后,容器将更改写入容器层中文件的新副本。</p>
<p>但是,OverlayFS在文件级别而不是块级别工作。这意味着所有OverlayFS copy_up操作都会复制整个文件,即使该文件非常大且只有一小部分被修改。这会对容器写入性能产生明显影响。但是,有两点值得注意:</p>
<ul>
<li>
<p>copy_up操作仅在第一次写入给定文件时发生。随后对同一文件的写入将对已经复制到容器的文件副本进行操作。</p>
</li>
<li>
<p>OverlayFS仅适用于两层。这意味着性能应该比AUFS更好,后者在多层图像中搜索文件时可能会出现明显的延迟。此优点适用于<code class="highlighter-rouge">overlay</code>和<code class="highlighter-rouge">overlay2</code>驱动程序。 <code class="highlighter-rouge">overlayfs2</code>相比, <code class="highlighter-rouge">overlayfs</code>在初次读取时的性能要<code class="highlighter-rouge">overlayfs</code>于<code class="highlighter-rouge">overlayfs</code> ,因为它必须遍历更多的层,但是会缓存结果,因此这只是一个小小的代价。</p>
</li>
</ul>
</li>
<li>
<p><strong>删除文件和目录</strong> :</p>
<ul>
<li>
<p>当一个<em>文件</em>被一个容器中删除,在所述容器(创建文件<em>白斑</em> <code class="highlighter-rouge">upperdir</code> )。不会删除图像层( <code class="highlighter-rouge">lowerdir</code> )中文件的版本(因为<code class="highlighter-rouge">lowerdir</code>是只读的)。但是,白化文件会阻止容器使用它。</p>
</li>
<li>
<p>当一个<em>目录</em>由容器内删除, <em>不透明目录</em>在容器(内创建<code class="highlighter-rouge">upperdir</code> )。这与中断文件的工作方式相同,并且即使该目录仍然存在于映像( <code class="highlighter-rouge">lowerdir</code> )中,也可以有效地防止该目录被访问。</p>
</li>
</ul>
</li>
<li>
<p><strong>重命名目录</strong> :仅当源路径和目标路径都在顶层时,才允许对<strong>目录</strong>调用<code class="highlighter-rouge">rename(2)</code> 。否则,它将返回<code class="highlighter-rouge">EXDEV</code>错误(“不允许跨设备链接”)。您的应用程序需要设计为可以处理<code class="highlighter-rouge">EXDEV</code>并退回到“复制和取消链接”策略。</p>
</li>
</ul>
<h2 id="overlayfs-and-docker-performance">OverlayFS和Docker性能</h2>
<p><code class="highlighter-rouge">overlay2</code>和<code class="highlighter-rouge">overlay</code>驱动程序都比<code class="highlighter-rouge">aufs</code>和<code class="highlighter-rouge">devicemapper</code>性能更高。在某些情况下, <code class="highlighter-rouge">overlay2</code>也可能优于<code class="highlighter-rouge">btrfs</code> 。但是,请注意以下详细信息。</p>
<ul>
<li>
<p><strong>页面缓存</strong> 。OverlayFS支持页面缓存共享。访问同一文件的多个容器共享该文件的单个页面缓存条目。这使得<code class="highlighter-rouge">overlay</code>和<code class="highlighter-rouge">overlay2</code>驱动程序可以有效地利用内存,并且对于PaaS等高密度用例来说是一个不错的选择。</p>
</li>
<li>
<p><strong>copy_up</strong> 。与AUFS一样,每当容器第一次写入文件时,OverlayFS都会执行复制操作。这会增加写入操作的延迟,尤其是对于大文件。但是,一旦文件被复制,对该文件的所有后续写入都将在上层进行,而无需进行进一步的复制操作。</p>
<p>OverlayFS <code class="highlighter-rouge">copy_up</code>操作比使用AUFS的相同操作要快,这是因为AUFS支持的层比OverlayFS还要多,并且如果搜索许多AUFS层,可能会产生更大的延迟。 <code class="highlighter-rouge">overlay2</code>支持多层,但是可以减轻缓存对性能的影响。</p>
</li>
<li>
<p><strong>索引节点限制</strong> 。使用旧的<code class="highlighter-rouge">overlay</code>存储驱动程序可能会导致过多的inode消耗。在Docker主机上存在大量映像和容器的情况下尤其如此。增加文件系统可用的索引节点数量的唯一方法是对其进行重新格式化。为避免遇到此问题,强烈建议您尽可能使用<code class="highlighter-rouge">overlay2</code> 。</p>
</li>
</ul>
<h3 id="performance-best-practices">绩效最佳实践</h3>
<p>以下通用性能最佳实践也适用于OverlayFS。</p>
<ul>
<li>
<p><strong>使用快速存储</strong> :固态驱动器(SSD)提供比旋转磁盘更快的读写速度。</p>
</li>
<li>
<p><strong>将卷用于繁重的写工作负载</strong> :卷可为<strong>繁重的写工作负载</strong>提供最佳和最可预测的性能。这是因为它们绕过了存储驱动程序,并且不会产生任何精简配置和写入时复制所带来的潜在开销。卷还有其他好处,例如,即使没有运行中的容器正在使用它们,也可以使您在容器之间共享数据并保留数据。</p>
</li>
</ul>
<h2 id="limitations-on-overlayfs-compatibility">OverlayFS兼容性限制</h2>
<p>总结OverlayFS与其他文件系统不兼容的方面:</p>
<ul>
<li>
<p><strong>open(2)</strong> :OverlayFS仅实现POSIX标准的子集。这可能导致某些OverlayFS操作违反POSIX标准。一种这样的操作是<em>复制</em>操作。假设您的应用程序调用<code class="highlighter-rouge">fd1=open("foo", O_RDONLY)</code> ,然后<code class="highlighter-rouge">fd2=open("foo", O_RDWR)</code> 。在这种情况下,您的应用程序希望<code class="highlighter-rouge">fd1</code>和<code class="highlighter-rouge">fd2</code>引用同一文件。但是,由于在第二次调用<code class="highlighter-rouge">open(2)</code>之后发生了复制操作,因此描述符引用了不同的文件。<code class="highlighter-rouge">fd1</code>继续引用映像中的文件( <code class="highlighter-rouge">lowerdir</code> ),而<code class="highlighter-rouge">fd2</code>引用容器中的文件( <code class="highlighter-rouge">upperdir</code> )。一种解决方法是<code class="highlighter-rouge">touch</code>导致复制操作发生的文件。所有后续的<code class="highlighter-rouge">open(2)</code>操作(无论是只读访问方式还是读写访问方式)都将引用容器中的文件( <code class="highlighter-rouge">upperdir</code> )。</p>
<p>除非安装了<code class="highlighter-rouge">yum-plugin-ovl</code>软件包,否则已知<code class="highlighter-rouge">yum</code>会受到影响。如果您的发行版(例如6.8或7.2之前的RHEL / CentOS)中没有<code class="highlighter-rouge">yum-plugin-ovl</code>软件包,则在运行<code class="highlighter-rouge">yum install</code>之前可能需要运行<code class="highlighter-rouge">touch /var/lib/rpm/*</code> 。该软件包实现了上面针对<code class="highlighter-rouge">yum</code>引用的<code class="highlighter-rouge">touch</code>解决方法。</p>
</li>
<li>
<p><strong>重命名(2)</strong> :OverlayFS不完全支持<code class="highlighter-rouge">rename(2)</code>系统调用。您的应用程序需要检测到它的故障并退回到“复制和取消链接”策略。</p>
</li>
</ul>
<!-- tags --> <span class="glyphicon glyphicon-tags" style="padding-right:10px"></span> <span style="vertical-align:2px"><a href="/search/?q=container">容器</a> , <a href="/search/?q=storage">存储</a> , <a href="/search/?q=driver">驱动程序</a> , <a href="/search/?q=OverlayFS">OverlayFS</a> , <a href="/search/?q=overlay2">overlay2</a> , <a href="/search/?q=overlay">覆盖</a></span> <!-- link corrections -->
<script language="JavaScript">
var x = document.links.length;
var baseHref = document.getElementsByTagName('base')[0].href
for (i = 0; i < x; i++) {
var munged = false;
var thisHREF = document.links[i].href;
var originalURL = "/storage/storagedriver/overlayfs-driver/";
if (thisHREF.indexOf(baseHref + "#") > -1) {
// hash fix
//console.log('BEFORE: base:',baseHref,'thisHREF:',thisHREF,'originalURL:',originalURL);
thisHREF = originalURL + thisHREF.replace(baseHref, "");
//console.log('AFTER: base:',baseHref,'thisHREF:',thisHREF,'originalURL:',originalURL);
}
if ((thisHREF.indexOf(window.location.hostname) > -1 || thisHREF.indexOf('http') == -1) && document.links[i].className.indexOf("nomunge") < 0) {
munged = true;
thisHREF = thisHREF.replace(".md", "/").replace("/index/", "/");
document.links[i].setAttribute('href', thisHREF);
}
}
</script>
<div id="ratings-div" style="color:#b9c2cc;text-align:center;margin-top:150px">
<div id="pd_rating_holder_8453675"></div>
<script type="text/javascript">
PDRTJS_settings_8453675 = {
"id": "8453675",
"unique_id": "storage/storagedriver/overlayfs-driver.md",
"title": "Use the OverlayFS storage driver",
"permalink": "https://github.com/docker/docker.github.io/blob/master/storage/storagedriver/overlayfs-driver.md"
};
(function(d, c, j) {
if (!document.getElementById(j)) {
var pd = d.createElement(c),
s;
pd.id = j;
pd.src = ('https:' == document.location.protocol) ? 'https://polldaddy.com/js/rating/rating.js' : 'http://i0.poll.fm/js/rating/rating.js';
s = document.getElementsByTagName(c)[0];
s.parentNode.insertBefore(pd, s);
}
}(document, 'script', 'pd-rating-js'));
</script>
</div>
</section>
</main>
<nav class="col-nav">
<div id="sidebar-nav" class="sidebar hidden-sm hidden-xs">
<div id="navbar" class="nav-sidebar">
<ul class="nav" id="jsTOCLeftNav">
</ul>
</div>
</div>
</nav>
<div class="col-toc">
<div class="sidebar hidden-xs hidden-sm">
<div class="toc-nav">
<div class="feedback-links">
<ul>
<li><a href="https://github.com/docker/docker.github.io/edit/master/storage/storagedriver/overlayfs-driver.md"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>编辑这个页面</a></li>
<li><a href="https://github.com/docker/docker.github.io/issues/new?body=File: [storage/storagedriver/overlayfs-driver.md](https://docs.docker.com/storage/storagedriver/overlayfs-driver/)" class="nomunge"><i class="fa fa-check" aria-hidden="true"></i>请求文档更改</a></li>
<li><a href="https://success.docker.com/support"><i class="fa fa-question" aria-hidden="true"></i>得到支持</a></li>
<!-- toggle mode -->
<li>
<div class="toggle-mode">
<div class="icon">
<i class="fa fa-sun-o" aria-hidden="true"></i>
</div>
<div class="toggle-switch">
<label class="switch">
<input type="checkbox" id="switch-style">
<div class="slider round"></div>
</label>
</div>
<div class="icon">
<i class="fa fa-moon-o" aria-hidden="true"></i>
</div>
</div>
</li>
</ul>
</div>
<div id="side-toc-title">在此页:</div>
<ul id="my_toc" class="inline_toc">
<li><a href="#prerequisites" class="nomunge">先决条件</a></li>
<li><a href="#configure-docker-with-the-overlay-or-overlay2-storage-driver" class="nomunge">使用overlay或overlay2存储驱动程序配置Docker</a></li>
<li><a href="#how-the-overlay2-driver-works" class="nomunge">overlay2驱动程序如何工作</a>
<ul>
<li><a href="#image-and-container-layers-on-disk" class="nomunge">磁盘上的图像和容器层</a></li>
</ul>
</li>
<li><a href="#how-the-overlay-driver-works" class="nomunge">叠加驱动程序如何工作</a>
<ul>
<li><a href="#image-and-container-layers-on-disk-1" class="nomunge">磁盘上的图像和容器层</a></li>
</ul>
</li>
<li><a href="#how-container-reads-and-writes-work-with-overlay-or-overlay2" class="nomunge">容器如何使用overlay或overlay2进行读写</a>
<ul>
<li><a href="#reading-files" class="nomunge">读取文件</a></li>
<li><a href="#modifying-files-or-directories" class="nomunge">修改文件或目录</a></li>
</ul>
</li>
<li><a href="#overlayfs-and-docker-performance" class="nomunge">OverlayFS和Docker性能</a>
<ul>
<li><a href="#performance-best-practices" class="nomunge">绩效最佳实践</a></li>
</ul>
</li>
<li><a href="#limitations-on-overlayfs-compatibility" class="nomunge">OverlayFS兼容性限制</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="top_footer">
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-3">
<ul class="footer_links">
<li><a href="https://www.docker.com/what-docker">什么是Docker</a></li>
<li><a href="https://www.docker.com/what-container">什么是容器</a></li>
<li><a href="https://www.docker.com/use-cases">用例</a></li>
<li><a href="https://www.docker.com/customers">顾客</a></li>
<li><a href="https://www.docker.com/partners/partner-program">伙伴</a></li>
<li class="break"><a href="https://www.docker.com/industry-government">对于政府</a></li>
<li><a href="https://www.docker.com/company">关于Docker</a></li>
<li><a href="https://www.docker.com/company/management">管理</a></li>
<li><a href="https://www.docker.com/company/news-and-press">新闻与新闻</a></li>
<li><a href="https://www.docker.com/careers">招贤纳士</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-3 col-md-3">
<ul class="footer_links">
<li><a href="https://www.docker.com/products/overview">产品</a></li>
<li><a href="https://www.docker.com/pricing">价钱</a></li>
<li><a href="https://www.docker.com/docker-community">社区版</a></li>
<li class="break"><a href="https://www.docker.com/enterprise">企业版</a></li>
<li><a href="https://www.docker.com/products/docker-datacenter">Docker数据中心</a></li>
<li><a href="https://hub.docker.com/">Docker中心</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-3 col-md-3">
<ul class="footer_links">
<li><a href="/">文献资料</a></li>
<li><a href="https://www.docker.com/docker">学习</a></li>
<li><a href="https://blog.docker.com" target="_blank">博客</a></li>
<li><a href="https://engineering.docker.com" target="_blank">工程博客</a></li>
<li><a href="https://training.docker.com/" target="_blank">训练</a></li>
<li><a href="https://success.docker.com/support">支持</a></li>
<li><a href="https://success.docker.com/kbase">知识库</a></li>
<li><a href="https://www.docker.com/products/resources">资源资源</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-3 col-md-3">
<ul class="footer_links">
<li><a href="https://www.docker.com/docker-community">社区</a></li>
<li><a href="https://www.docker.com/technologies/overview">开源的</a></li>
<li><a href="https://www.docker.com/community/events">大事记</a></li>
<li><a href="https://forums.docker.com/" target="_blank">论坛</a></li>
<li><a href="https://www.docker.com/community/docker-captains">Docker队长</a></li>
<li><a href="https://www.docker.com/docker-community/scholarships">奖学金名额</a></li>
<li><a href="https://blog.docker.com/curated/">社区新闻</a></li>
</ul>
</div>
</div>
<div class="footer-nav">
<nav class="footer_sub_nav">
<ul class="menu">
<li><a href="http://status.docker.com/">状态</a></li>
<li><a href="https://www.docker.com/docker-security">安全</a></li>
<li><a href="https://www.docker.com/legal">法律</a></li>
<li><a href="https://www.docker.com/company/contact">联系</a></li>
</ul>
</nav>
</div>
</div>
<div class="bottom_footer">
<div class="footer-copyright col-xs-12 col-md-8">
<p class="copyright">版权所有©2019 Docker Inc.保留所有权利。</p>
</div>
<div class="footer_social_nav">
<ul class="nav-social">
<li class="fa fa-twitter"><a href="http://twitter.com/docker">推特</a></li>
<li class="fa fa-youtube"><a href="http://www.youtube.com/user/dockerrun">优酷</a></li>
<li class="fa fa-github"><a href="https://github.com/docker">的GitHub</a></li>
<li class="fa fa-linkedin"><a href="https://www.linkedin.com/company/docker">领英</a></li>
<li class="fa fa-facebook"><a href="https://www.facebook.com/docker.run">脸书</a></li>
<li class="fa fa-reddit"><a href="http://www.reddit.com/r/docker">Reddit</a></li>
<li class="fa fa-slideshare"><a href="http://www.slideshare.net/docker">幻灯片分享</a></li>
</ul>
</div>
</div>
</div>
</footer>
<link rel="stylesheet" href="/css/github.css">
<!-- <script src="/js/anchorlinks.js"></script> -->
<script defer src="/js/menu.js"></script>
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.min.js"></script>
<!-- Always include the archive.js, but it doesn't do much unless we are an archive -->
<script language="javascript">
// Default to assuming this is an archive and hiding some stuff
// See js/archive.js and js/docs.js for logic relating to this
var isArchive = true;
var dockerVersion = 'v19.03';
// In archives, we need to know the page root and we get it from JEKYLL_ENV in the jekyll build command
var jekyllEnv = 'development';
// If unset (in non-archive branches), defaults to "development". In that case, reset it to empty
if (jekyllEnv == 'development') {
jekyllEnv = '';
}
var pageURL = jekyllEnv + '/storage/storagedriver/overlayfs-driver/';
</script>
<script src="/js/archive.js"></script>
<script src="/js/stickyfill.min.js"></script>
<script defer src="/js/metadata.js"></script>
<script src="/js/glossary.js"></script>
<script defer src="/js/docs.js"></script>
<script defer src="/js/toc.js"></script>
<script language="javascript">
jQuery(document).ready(function(){
hookupTOCEvents();
});
</script>
</body>
</html>
|
html
|
{
"main.css": "static/css/main.982b8869.css",
"main.css.map": "static/css/main.982b8869.css.map",
"main.js": "static/js/main.97e06a8d.js",
"main.js.map": "static/js/main.97e06a8d.js.map",
"static/media/burglaryicon.png": "static/media/burglaryicon.f2ffd052.png",
"static/media/corruptionicon.png": "static/media/corruptionicon.ce05d13a.png",
"static/media/marc.jpg": "static/media/marc.8880a65c.jpg",
"static/media/robberyicon.png": "static/media/robberyicon.4660be65.png",
"static/media/sidebar-2.jpg": "static/media/sidebar-2.310509c9.jpg",
"static/media/vandalismicon.png": "static/media/vandalismicon.3d2627a7.png"
}
|
json
|
<filename>package.json
{
"name": "stackean-nodejs-discord-bot",
"version": "0.0.1",
"description": "Node.js Discord bot sample ready to deploy on Stackean.com",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "pm2 start"
},
"author": "Stackean",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/stackean/sample-nodejs-discord-bot.git"
},
"dependencies": {
"discord.js": "^12.5.1"
}
}
|
json
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Current Input</title>
<meta name="description" content="Detect the current input (mouse or touch) and fix the sticky :hover bug on touch devices.">
<style>html{background-color: rgb(0, 120, 0);}</style>
<link rel="icon" type=”image/svg+xml” href="/favicon/green-grid-144-168-192.svg">
<link rel="alternate icon" type="image/png" href="/favicon/green-grid-144-168-192-512x512.png">
<link rel="apple-touch-icon" href="/favicon/green-grid-144-168-192-180x180.png">
<link rel="manifest" href="/favicon/site.webmanifest">
<meta name="theme-color" content="#000000">
<link rel="stylesheet" href="/index.css">
<script src="https://unpkg.com/current-input@2/dist/current-input.umd.production.js"></script>
</head>
<body>
<div id="root">
<div>
<h1 class="title">Current Input</h1>
<div><a class="repo-link" href="https://github.com/rafgraph/current-input" target="_blank">https://github.com/rafgraph/current-input</a></div>
<h3 class="current-input-is">The current input type is: <code class="mouse-type">mouse</code><code class="touch-type">touch</code></h3>
<h2>Standard CSS</h2>
<button class="plain-css-example">Hover is green. Active is red.</button>
<p><code>:hover</code> and <code>:active</code> pseudo-classes applied normally. Suffers from the sitcky hover problem on touch devices.</p>
<h2>CSS with <code>current-input</code></h2>
<button class="current-input-example">Hover is green. Active is red. Touch active is blue.</button>
<p>
<code>:hover</code> and <code>:active</code> (red) pseudo-classes applied if <code>current-input-mouse</code> class is present.
<code>:active</code> (blue) pseudo-class applied if <code>current-input-touch</code> class is present. Fixes the sticky hover problem on touch devices and creates 3 interactive states.
</p>
</div>
</div>
</body>
</html>
|
html
|
Washington: With the international community aggressively pushing for a carbon tax in a decisive fight against climate change, the IMF on Thursday said that the advanced economies may have greater responsibilities for mitigation, citing an example of India whose projected baseline emissions in 2030 per capita basis are only one-seventh of those for the US.
In its report 'Fiscal Monitor: How to Mitigate Climate Change', the International Monetary Fund (IMF) said that to limit global warming to 2C or less - the level deemed safe by science - large emitting countries need to take ambitious action. For example, they should introduce a carbon tax that could rise quickly to USD 75 a tonne in 2030, it argued.
Noting that the current mitigation pledges are not expressed using a common measure for all countries, thus hindering international comparisons, it said most future low-cost mitigation opportunities are in large, rapidly growing emerging market economies, especially those that rely heavily on coal.
"For example, with a globally uniform USD 25 a tonne carbon price in 2030, China and India would account for an estimated 56 and 15 per cent, respectively, of CO2 reductions (compared with baseline levels) from G20 countries, the US for 12 per cent, and all other G20 countries combined for 18 per cent," it said.
"However, advanced economies may have greater responsibilities for mitigation. Indeed, on a per capita basis, projected baseline emissions in India in 2030 are only one-seventh of those for the US," said the report released ahead of the annual meeting of the IMF and World Bank here.
Before considering the use of revenues from carbon pricing, carbon taxes would undoubtedly add to the cost of living for all households, and the burden as a share of total household consumption would range from moderately regressive to moderately progressive in selected countries, the IMF acknowledged.
"If no accompanying measures were taken, carbon taxes would be moderately regressive in China and the US, distribution-neutral in Canada, and moderately progressive in India for a USD 50 a tonne carbon tax in 2030. The reason is that in China and the US, the poor spend a greater share of their budget for electricity, but the opposite applies in India, the report said.
In India, the burden of carbon pricing would be somewhat larger for urban households than for rural households because of lower availability of, and less spending on, electricity in rural areas, the report noted.
Carbon taxes have uneven impacts across countries and economic sectors, the IMF said, adding that the average impact on industry costs of a USD 50 a tonne tax in 2030 ranges between 0. 9 per cent in Canada and 5. 3 per cent in China.
However, the most energy-intensive industries can be affected significantly: cost increases for the 20 per cent most vulnerable industries are 10. 3 percent in China and 6. 8 per cent in India, it said.
According to the IMF, carbon mitigation might also have large impacts on certain groups of workers and regions. Coal-related employment is projected to decline in many countries under baseline policies. A USD 50 a tonne carbon tax in 2030 would substantially accelerate this process; for example, increasing estimated job losses in this sector relative to 2015 levels from 8 to 55 per cent in the US and up to 42-45 per cent in China and India.
These job losses would amount to 0. 30. 9 per cent of economywide employment in China and Poland and less than 0. 15 per cent in other countries; employment would increase in other sectors, such as renewables, but - in the absence of specific policies - the new jobs would likely become available in other regions, it said.
A model estimates suggest that reducing emissions to a level consistent with a 2C temperature target would require increasing the projected global energy investment in 2030 (encompassing both public and private) from 2. 0 per cent of GDP to 2. 3 per cent of GDP, with most of the increase concentrated in China and India.
The IMF report said that a uniform carbon prices of USD 25, USD 50, and USD 75 a tonne reduce CO2 emissions by 19, 29, and 35 per cent respectively, for the G20 group.
Whereas a USD 25 a tonne price would be more than enough for some countries (for example, China, India, and Russia) to meet their Paris Agreement pledges, in other cases (for example, Australia and Canada) even the USD 75 a tonne carbon tax falls short.
This dispersion reflects cross-country differences in the stringency of mitigation pledges, as well as in the price responsiveness of emissionsfor example, emissions are more responsive to pricing in coal- reliant countries such as China, India, and South Africa than in other countries, the report said. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - PTI)
|
english
|
{% load i18n %}
/* BOM management functions.
* Requires follwing files to be loaded first:
* - api.js
* - part.js
* - modals.js
*/
function reloadBomTable(table, options) {
table.bootstrapTable('refresh');
}
function removeRowFromBomWizard(e) {
/* Remove a row from BOM upload wizard
*/
e = e || window.event;
var src = e.target || e.srcElement;
var table = $(src).closest('table');
// Which column was clicked?
var row = $(src).closest('tr');
row.remove();
var rowNum = 1;
var colNum = 0;
table.find('tr').each(function() {
colNum++;
if (colNum >= 3) {
var cell = $(this).find('td:eq(1)');
cell.text(rowNum++);
}
});
}
function removeColFromBomWizard(e) {
/* Remove a column from BOM upload wizard
*/
e = e || window.event;
var src = e.target || e.srcElement;
// Which column was clicked?
var col = $(src).closest('th').index();
var table = $(src).closest('table');
table.find('tr').each(function() {
this.removeChild(this.cells[col]);
});
}
function newPartFromBomWizard(e) {
/* Create a new part directly from the BOM wizard.
*/
e = e || window.event;
var src = e.target || e.srcElement;
var row = $(src).closest('tr');
launchModalForm('/part/new/', {
data: {
'description': row.attr('part-description'),
'name': row.attr('part-name'),
},
success: function(response) {
/* A new part has been created! Push it as an option.
*/
var select = row.attr('part-select');
var option = new Option(response.text, response.pk, true, true);
$(select).append(option).trigger('change');
}
});
}
function loadBomTable(table, options) {
/* Load a BOM table with some configurable options.
*
* Following options are available:
* editable - Should the BOM table be editable?
* bom_url - Address to request BOM data from
* part_url - Address to request Part data from
* parent_id - Parent ID of the owning part
*
* BOM data are retrieved from the server via AJAX query
*/
// Construct the table columns
var cols = [];
if (options.editable) {
cols.push({
field: 'ID',
title: '',
checkbox: true,
visible: true,
switchable: false,
});
}
// Part column
cols.push(
{
field: 'sub_part',
title: '{% trans "Part" %}',
sortable: true,
formatter: function(value, row, index, field) {
var url = `/part/${row.sub_part}/`;
var html = imageHoverIcon(row.sub_part_detail.thumbnail) + renderLink(row.sub_part_detail.full_name, url);
// Display an extra icon if this part is an assembly
if (row.sub_part_detail.assembly) {
var text = `<span title='{% trans "Open subassembly" %}' class='fas fa-stream label-right'></span>`;
html += renderLink(text, `/part/${row.sub_part}/bom/`);
}
return html;
}
}
);
// Part description
cols.push(
{
field: 'sub_part_detail.description',
title: '{% trans "Description" %}',
}
);
// Part reference
cols.push({
field: 'reference',
title: '{% trans "Reference" %}',
searchable: true,
sortable: true,
});
// Part quantity
cols.push({
field: 'quantity',
title: '{% trans "Quantity" %}',
searchable: false,
sortable: true,
formatter: function(value, row, index, field) {
var text = value;
// The 'value' is a text string with (potentially) multiple trailing zeros
// Let's make it a bit more pretty
text = parseFloat(text);
if (row.overage) {
text += "<small> (+" + row.overage + ") </small>";
}
return text;
},
});
if (!options.editable) {
cols.push(
{
field: 'sub_part_detail.stock',
title: '{% trans "Available" %}',
searchable: false,
sortable: true,
formatter: function(value, row, index, field) {
var url = `/part/${row.sub_part_detail.pk}/stock/`;
var text = value;
if (value == null || value <= 0) {
text = `<span class='label label-warning'>{% trans "No Stock" %}</span>`;
}
return renderLink(text, url);
}
});
cols.push(
{
field: 'price_range',
title: '{% trans "Price" %}',
sortable: true,
formatter: function(value, row, index, field) {
if (value) {
return value;
} else {
return "<span class='warning-msg'>{% trans "No pricing available" %}</span>";
}
}
});
}
// Part notes
cols.push(
{
field: 'note',
title: '{% trans "Notes" %}',
searchable: true,
sortable: true,
}
);
if (options.editable) {
cols.push({
title: '{% trans "Actions" %}',
switchable: false,
field: 'pk',
visible: true,
formatter: function(value, row, index, field) {
if (row.part == options.parent_id) {
var bValidate = `<button title='{% trans "Validate BOM Item" %}' class='bom-validate-button btn btn-default btn-glyph' type='button' pk='${row.pk}'><span class='fas fa-check-circle icon-blue'/></button>`;
var bValid = `<span title='{% trans "This line has been validated" %}' class='fas fa-check-double icon-green'/>`;
var bEdit = `<button title='{% trans "Edit BOM Item" %}' class='bom-edit-button btn btn-default btn-glyph' type='button' pk='${row.pk}'><span class='fas fa-edit'></span></button>`;
var bDelt = `<button title='{% trans "Delete BOM Item" %}' class='bom-delete-button btn btn-default btn-glyph' type='button' pk='${row.pk}'><span class='fas fa-trash-alt icon-red'></span></button>`;
var html = "<div class='btn-group' role='group'>";
html += bEdit;
html += bDelt;
if (!row.validated) {
html += bValidate;
} else {
html += bValid;
}
html += "</div>";
return html;
} else {
return '';
}
}
});
}
// Configure the table (bootstrap-table)
var params = {
part: options.parent_id,
ordering: 'name',
}
if (options.part_detail) {
params.part_detail = true;
}
if (options.sub_part_detail) {
params.sub_part_detail = true;
}
// Function to request BOM data for sub-items
// This function may be called recursively for multi-level BOMs
function requestSubItems(bom_pk, part_pk) {
inventreeGet(
options.bom_url,
{
part: part_pk,
sub_part_detail: true,
},
{
success: function(response) {
for (var idx = 0; idx < response.length; idx++) {
response[idx].parentId = bom_pk;
if (response[idx].sub_part_detail.assembly) {
requestSubItems(response[idx].pk, response[idx].sub_part)
}
}
table.bootstrapTable('append', response);
table.treegrid('collapseAll');
},
error: function() {
console.log('Error requesting BOM for part=' + part_pk);
}
}
)
}
table.inventreeTable({
treeEnable: !options.editable,
rootParentId: options.parent_id,
idField: 'pk',
//uniqueId: 'pk',
parentIdField: 'parentId',
treeShowField: 'sub_part',
showColumns: true,
name: 'bom',
sortable: true,
search: true,
rowStyle: function(row, index) {
if (row.validated) {
return {classes: 'rowvalid'};
} else {
return {classes: 'rowinvalid'};
}
},
formatNoMatches: function() { return "{% trans "No BOM items found" %}"; },
clickToSelect: true,
queryParams: params,
columns: cols,
url: options.bom_url,
onPostBody: function() {
if (!options.editable) {
table.treegrid({
treeColumn: 0,
onExpand: function() {
}
});
}
},
onLoadSuccess: function() {
if (options.editable) {
table.bootstrapTable('uncheckAll');
} else {
var data = table.bootstrapTable('getData');
for (var idx = 0; idx < data.length; idx++) {
var row = data[idx];
// If a row already has a parent ID set, it's already been updated!
if (row.parentId) {
continue;
}
// Set the parent ID of the top-level rows
row.parentId = options.parent_id;
table.bootstrapTable('updateRow', idx, row, true);
if (row.sub_part_detail.assembly) {
requestSubItems(row.pk, row.sub_part);
}
}
}
},
});
// In editing mode, attached editables to the appropriate table elements
if (options.editable) {
table.on('click', '.bom-delete-button', function() {
var pk = $(this).attr('pk');
var url = `/part/bom/${pk}/delete/`;
launchModalForm(
url,
{
success: function() {
reloadBomTable(table);
}
}
);
});
table.on('click', '.bom-edit-button', function() {
var pk = $(this).attr('pk');
var url = `/part/bom/${pk}/edit/`;
launchModalForm(
url,
{
success: function() {
reloadBomTable(table);
}
}
);
});
table.on('click', '.bom-validate-button', function() {
var pk = $(this).attr('pk');
var url = `/api/bom/${pk}/validate/`;
inventreePut(
url,
{
valid: true
},
{
method: 'PATCH',
success: function() {
reloadBomTable(table);
}
}
);
});
}
}
|
html
|
{
"id": 908,
"title": [
"[Whistler's Pass, Tunnel]"
],
"description": [
"A trio of tiny black beetles, their shiny carapaces glistening in the dim light, flee down the tunnel, their scurrying forms quickly becoming lost amid the heavy shadows. The loud hum of flowing water permeates the passage, sending vibrations through the stone walls and floor."
],
"paths": [
"Obvious exits: northeast, southwest"
],
"location": "Whistler's Pass",
"wayto": {
"907": "northeast",
"909": "southwest"
},
"timeto": {
"907": 0.2,
"909": 0.2
},
"image": "en-whistlers_pass-1264234799.png",
"image_coords": [
386,
326,
396,
336
],
"tags": [
"white hook mushroom",
"cave moss",
"ironfern root",
"bolmara lichen",
"wingstem root"
]
}
|
json
|
Monday June 15, 2020,
There are a number of wonderful TV shows and web series available on streaming platforms like Netflix, Apple TV, Hotstar, Hulu and Amazon Prime to consider watching during the end of a stressful workday, or time off on the weekend during this uncertain time.
While each has their own preference when it comes to the type of genre they like watching, be it crime shows like Money Heist or Ozark or historical period dramas like Peaky Blinders, Game of Thrones, or Crown, there are a number of feel-good shows that often don’t get the due credit or validation they deserve from the Indian viewer.
Sweet Magnolias, Never Have I Ever, Gilmore Girls, and Comedians in Cars Getting Coffee are currently trending on Netflix, and have gripping story lines, catchy dialogues, and uplifting moments.
YS Weekender brings you 5 TV series that you can watch with a family member or your loved ones that are sure to leave you with a smile, despite the gloom of the pandemic that has descended upon the country.
An American comedy drama series, Gilmore Girls is an 8-season show that stars Lauren Graham and Alexis Bledel in leading roles.
It tells the story of a single mother Lorelai Gilmore and the relationship she shares with her teenage daughter Rory.
The show covers themes such as friendship, love, education, ambition and disappointment and take place in the fictional town of Stars Hollow in Connecticut, USA.
With crazy neighbours, varied love interests and people confusing the mother daughter duo as sisters, Gilmore Girls is sure to take you on a heartfelt emotional journey.
It also showcases Lorelai’s own relationship with her high society parents, and how she tries to be a better mother to her daughter Rory, often getting into disagreements, but coming to insightful realisations. After all they only have each other.
The show is known to have a lot of pop-cultural references and witty dialogues, and is something you should consider watching to lift your spirits up.
A coming of age, feel good show ‘Never Have I Ever’ created by Mindy Kaling and Lang Fisher is about a young Indian misfit high school student and her experience in an American High School in Sherman Oaks, California.
Based on Mindy Kaling’s own experience of growing up in the greater Boston area, the protagonist 15-year-old Devi Vishwakumar (portrayed by Maitreyi Ramakrishnan) deals with teenage troubles, fallouts with friends, the loss of her father, her dominating mother, her perfect Indian cousin and her attempts to get the attention of her senior crush.
This show is humorous, relatable, and can be watched by both teens and adults. It is currently trending on Netflix and has received positive reviews for breaking South Indian and Asian stereotypes in Hollywood. Season 1 was a huge success with Season 2 yet to be filmed.
The entire series is narrated by the legendary Tennis player John McEnroe, and has actors Poorna Jagannathan, Richa Moorjani, Darren Barnet, and Jaren Lewison in leading roles.
Comedians in Cars Getting Coffee is a web series talk show that features famous entertainers and comedians such as Ellen DeGeneres, Trevor Noah, Jimmy Fallon, Kevin Heart, Aziz Ansari and Jay Leno amongst other notable guests.
Hosted and directed by comedian Jerry Seinfeld, the show has 9 seasons.
The show takes you on a car ride to a favourite coffee hotspot of the guest’s choice, in premium car models such as Rolls Royce’s, Porches, and Mercedes Benz recent models where a conversation ensues filled with laughter fun, and enjoyable moments.
If you wish to see the most candid, unedited and unscripted side of your favourite comedian and their personality off stage, then Comedians in Cars Getting Coffee is a show that is sure to melt your troubles away.
Based on the best-selling novels by Sherryl Woods, Sweet Magnolias directed by Sheryl J. Anderson is about three South Carolina women who have been best friends from childhood and the trials and tribulations they face as adults.
The themes in the show include career, family, romance, and other life challenges.
Joanna Garcia Swisher, Brooke Elliott, and Heather Headley play leading roles in the film series.
Their characters Maddie Townsend, Helen Decatur and Dana Sue Sullivan call their friend group the Sweet Magnolias.
This is an uplifting show that tests the strength of friendships, teaches you about sacrifice and how to keep a bond going, all with a pleasant dose of humour.
A comedy-drama series Younger is based on the novel by Pamela Redmond Satran of the same name.
A six-season series, it tells the story of 40-year-old Lisa Miller a recent divorcee who juggles managing her career in a publishing company having faked her age to get a job.
It covers the co-workers and friends she meets along the way, and the humorous ups and downs she faces in New York City with her teenage daughter, and her fallout with her gambler husband.
The series stars Sutton Foster, Debi Mazar, Miriam Shor and Hilary Duff in lead roles.
The TV series has garnered positive reviews and Directed by Darren Star who produced Beverly Hills, 90210, Sex and the City and Melrose Park.
|
english
|
Day 1 of the PNC Championship saw Tiger Woods and his son Charlie finish in T11 with a score of -8. Team Kuchar leads the event after shooting an unbelievable 15-under 57.
Tiger Woods and Charlie will tee off in the second to last group on Sunday. Their tee time is scheduled at 10:51 a.m. (Eastern Time); they will be joined by Team Stricker.
The second round will tee off at 9:20 a.m., indicating that organizers expect better weather conditions on Sunday.
Here are the tee times for the second day of the 2023 PNC Championship:
Interestingly, the PNC Championship uses four tees due to the wide range of ages present in the field. Players range from 12 years old (Will McGee) to 84 (Lee Trevino).
Therefore, the first tee (Gold) is designed to cover 7,106 yards. This tee is used by all professional male players under the age of 52 and by male family members over the age of 16. It is used, among others, by Tiger Woods.
The second tee (White) is located at 6,578 yards. It is intended for male professional players and family members between 53 and 63 years of age. LPGA Tour players and family members between 14 and 15 years of age also tee off from this tee. It is the most used tee at the event.
The third tee (Red, 6,036 yards) is for professionals between 64 and 72 years old and juniors between 12 and 13 years old. The fourth tee (Blue, 5,499 yards) is intended for players over 72 and juniors 11 and under.
However, this distribution has had discrepancies, as the organizers themselves placed Will McGee (12) on the Blue tee and Izzy Stricker (17) on the Red tee.
Weather conditions had a significant impact on the first round. A temperature of 73° (F) is expected in Orlando on Sunday morning. Winds are forecast at 17 mph, with gusts of 36 mph. The day will be very cloudy with a 65% chance of rain, limiting visibility to five miles.
|
english
|
<filename>src/script/mod.rs
//! Module for parsing [WebAssembly script format] \(a.k.a. wast).
//!
//! These scripts might be useful to integrate the official spec [testsuite] into implementations
//! of the wasm execution engines (such as [wasmi]) and for developing fine-grained tests of
//! runtimes or/and if it isn't desired to use full fledged compilers.
//!
//! # Example
//!
//! ```rust
//! use wabt::script::{ScriptParser, Command, CommandKind, Action, Value};
//! # use wabt::script::Error;
//!
//! # fn try_main() -> Result<(), Error> {
//! let wast = r#"
//! ;; Define anonymous module with function export named `sub`.
//! (module
//! (func (export "sub") (param $x i32) (param $y i32) (result i32)
//! ;; return x - y;
//! (i32.sub
//! (get_local $x) (get_local $y)
//! )
//! )
//! )
//!
//! ;; Assert that invoking export `sub` with parameters (8, 3)
//! ;; should return 5.
//! (assert_return
//! (invoke "sub"
//! (i32.const 8) (i32.const 3)
//! )
//! (i32.const 5)
//! )
//! "#;
//!
//! let mut parser = ScriptParser::<f32, f64>::from_str(wast)?;
//! while let Some(Command { kind, .. }) = parser.next()? {
//! match kind {
//! CommandKind::Module { module, name } => {
//! // The module is declared as annonymous.
//! assert_eq!(name, None);
//!
//! // Convert the module into the binary representation and check the magic number.
//! let module_binary = module.into_vec();
//! assert_eq!(&module_binary[0..4], &[0, 97, 115, 109]);
//! }
//! CommandKind::AssertReturn { action, expected } => {
//! assert_eq!(action, Action::Invoke {
//! module: None,
//! field: "sub".to_string(),
//! args: vec![
//! Value::I32(8),
//! Value::I32(3)
//! ],
//! });
//! assert_eq!(expected, vec![Value::I32(5)]);
//! },
//! _ => panic!("there are no other commands apart from that defined above"),
//! }
//! }
//! # Ok(())
//! # }
//! #
//! # fn main() {
//! # try_main().unwrap();
//! # }
//! ```
//! [WebAssembly script format]: https://github.com/WebAssembly/spec/blob/a25083ac7076b05e3f304ec9e093ef1b1ee09422/interpreter/README.md#scripts
//! [testsuite]: https://github.com/WebAssembly/testsuite
//! [wasmi]: https://github.com/pepyakin/wasmi
use std::collections::HashMap;
use std::error;
use std::ffi::CString;
use std::fmt;
use std::io;
use std::str;
use std::vec;
use serde_json;
use super::{Error as WabtError, Script, WabtBuf, WabtWriteScriptResult};
mod json;
/// Error that can happen when parsing spec.
#[derive(Debug)]
pub enum Error {
/// IO error happened during parsing or preparing to parse.
IoError(io::Error),
/// WABT reported an error while converting wast to json.
WabtError(WabtError),
/// Other error represented by String.
Other(String),
/// Not a different kind of an error but just a wrapper for a error
/// which we have a line number information.
WithLineInfo {
/// Line number of the script on which just error happen.
line: u64,
/// Box with actual error.
error: Box<Error>,
},
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Error::IoError(ref io_err) => write!(f, "IO error: {}", io_err),
Error::WabtError(ref wabt_err) => write!(f, "wabt error: {:?}", wabt_err),
Error::Other(ref message) => write!(f, "{}", message),
Error::WithLineInfo { line, ref error } => write!(f, "At line {}: {}", line, error),
}
}
}
impl error::Error for Error {
fn description(&self) -> &str {
match *self {
Error::IoError(ref e) => e.description(),
Error::WabtError(_) => "wabt error",
Error::Other(ref msg) => &msg,
Error::WithLineInfo { ref error, .. } => error.description(),
}
}
fn cause(&self) -> Option<&error::Error> {
match *self {
Error::IoError(ref io_err) => Some(io_err),
Error::WabtError(ref wabt_err) => Some(wabt_err),
Error::Other(_) => None,
Error::WithLineInfo { ref error, .. } => Some(error),
}
}
}
impl From<WabtError> for Error {
fn from(e: WabtError) -> Error {
Error::WabtError(e)
}
}
impl From<io::Error> for Error {
fn from(e: io::Error) -> Error {
Error::IoError(e)
}
}
/// Bitwise conversion from T
pub trait FromBits<T> {
/// Convert `other` to `Self`, preserving bitwise representation
fn from_bits(other: T) -> Self;
}
impl<T> FromBits<T> for T {
fn from_bits(other: T) -> Self {
other
}
}
impl FromBits<u32> for f32 {
fn from_bits(other: u32) -> Self {
Self::from_bits(other)
}
}
impl FromBits<u64> for f64 {
fn from_bits(other: u64) -> Self {
Self::from_bits(other)
}
}
/// Wasm value
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
pub enum Value<F32 = f32, F64 = f64> {
/// 32-bit signed or unsigned integer.
I32(i32),
/// 64-bit signed or unsigned integer.
I64(i64),
/// 32-bit floating point number.
F32(F32),
/// 64-bit floating point number.
F64(F64),
}
impl<F32: FromBits<u32>, F64: FromBits<u64>> Value<F32, F64> {
fn decode_f32(val: u32) -> Self {
Value::F32(F32::from_bits(val))
}
fn decode_f64(val: u64) -> Self {
Value::F64(F64::from_bits(val))
}
}
/// Description of action that should be performed on a wasm module.
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub enum Action<F32 = f32, F64 = f64> {
/// Invoke a specified function.
Invoke {
/// Name of the module. If `None`, last defined module should be
/// used.
module: Option<String>,
/// Field name on which action should be performed.
field: String,
/// Arguments that should be passed to the invoked function.
args: Vec<Value<F32, F64>>,
},
/// Read the specified global variable.
Get {
/// Name of the module. If `None`, last defined module should be
/// used.
module: Option<String>,
/// Field name on which action should be performed.
field: String,
},
}
fn parse_value<F32: FromBits<u32>, F64: FromBits<u64>>(
test_val: &json::RuntimeValue,
) -> Result<Value<F32, F64>, Error> {
fn parse_val<P: str::FromStr>(str_val: &str, str_ty: &str) -> Result<P, Error> {
str_val
.parse()
.map_err(|_| Error::Other(format!("can't parse '{}' as '{}'", str_val, str_ty)))
}
let value = match test_val.value_type.as_ref() {
"i32" => {
let unsigned: u32 = parse_val(&test_val.value, &test_val.value_type)?;
Value::I32(unsigned as i32)
}
"i64" => {
let unsigned: u64 = parse_val(&test_val.value, &test_val.value_type)?;
Value::I64(unsigned as i64)
}
"f32" => {
let unsigned: u32 = parse_val(&test_val.value, &test_val.value_type)?;
Value::decode_f32(unsigned)
}
"f64" => {
let unsigned: u64 = parse_val(&test_val.value, &test_val.value_type)?;
Value::decode_f64(unsigned)
}
other_ty => {
return Err(Error::Other(format!("Unknown type '{}'", other_ty)));
}
};
Ok(value)
}
fn parse_value_list<F32: FromBits<u32>, F64: FromBits<u64>>(
test_vals: &[json::RuntimeValue],
) -> Result<Vec<Value<F32, F64>>, Error> {
test_vals.iter().map(parse_value).collect()
}
// Convert json string to correct rust UTF8 string.
// The reason is that, for example, rust character "\u{FEEF}" (3-byte UTF8 BOM) is represented as "\u00ef\u00bb\u00bf" in spec json.
// It is incorrect. Correct BOM representation in json is "\uFEFF" => we need to do a double utf8-parse here.
// This conversion is incorrect in general case (casting char to u8)!!!
fn jstring_to_rstring(jstring: &str) -> String {
let jstring_chars: Vec<u8> = jstring.chars().map(|c| c as u8).collect();
String::from_utf8(jstring_chars).unwrap()
}
fn parse_action<F32: FromBits<u32>, F64: FromBits<u64>>(
test_action: &json::Action,
) -> Result<Action<F32, F64>, Error> {
let action = match *test_action {
json::Action::Invoke {
ref module,
ref field,
ref args,
} => Action::Invoke {
module: module.to_owned(),
field: jstring_to_rstring(field),
args: parse_value_list(args)?,
},
json::Action::Get {
ref module,
ref field,
} => Action::Get {
module: module.to_owned(),
field: jstring_to_rstring(field),
},
};
Ok(action)
}
fn wast2json(source: &[u8], test_filename: &str) -> Result<WabtWriteScriptResult, Error> {
let script = Script::parse(test_filename, source)?;
script.resolve_names()?;
script.validate()?;
let result = script.write_binaries(test_filename)?;
Ok(result)
}
/// This is a handle to get the binary representation of the module.
#[derive(Clone, Debug)]
pub struct ModuleBinary {
module: Vec<u8>,
}
impl Eq for ModuleBinary {}
impl PartialEq for ModuleBinary {
fn eq(&self, rhs: &Self) -> bool {
self.module == rhs.module
}
}
impl ModuleBinary {
fn from_vec(module: Vec<u8>) -> ModuleBinary {
ModuleBinary { module }
}
/// Convert this object into wasm module binary representation.
pub fn into_vec(self) -> Vec<u8> {
self.module
}
}
/// Script's command.
#[derive(Clone, Debug, PartialEq)]
pub enum CommandKind<F32 = f32, F64 = f64> {
/// Define, validate and instantiate a module.
Module {
/// Wasm module binary to define, validate and instantiate.
module: ModuleBinary,
/// If the `name` is specified, the module should be registered under this name.
name: Option<String>,
},
/// Assert that specified action should yield specified results.
AssertReturn {
/// Action to perform.
action: Action<F32, F64>,
/// Values that expected to be yielded by the action.
expected: Vec<Value<F32, F64>>,
},
/// Assert that specified action should yield NaN in canonical form.
AssertReturnCanonicalNan {
/// Action to perform.
action: Action<F32, F64>,
},
/// Assert that specified action should yield NaN with 1 in MSB of fraction field.
AssertReturnArithmeticNan {
/// Action to perform.
action: Action<F32, F64>,
},
/// Assert that performing specified action must yield in a trap.
AssertTrap {
/// Action to perform.
action: Action<F32, F64>,
/// Expected failure should be with this message.
message: String,
},
/// Assert that specified module is invalid.
AssertInvalid {
/// Module that should be invalid.
module: ModuleBinary,
/// Expected failure should be with this message.
message: String,
},
/// Assert that specified module cannot be decoded.
AssertMalformed {
/// Module that should be malformed.
module: ModuleBinary,
/// Expected failure should be with this message.
message: String,
},
/// Assert that specified module is uninstantiable.
AssertUninstantiable {
/// Module that should be uninstantiable.
module: ModuleBinary,
/// Expected failure should be with this message.
message: String,
},
/// Assert that specified action should yield in resource exhaustion.
AssertExhaustion {
/// Action to perform.
action: Action<F32, F64>,
},
/// Assert that specified module fails to link.
AssertUnlinkable {
/// Module that should be unlinkable.
module: ModuleBinary,
/// Expected failure should be with this message.
message: String,
},
/// Register a module under specified name (`as_name`).
Register {
/// Name of the module, which should be registered under different name.
///
/// If `None` then the last defined [module][`Module`] should be used.
///
/// [`Module`]: #variant.Module
name: Option<String>,
/// New name of the specified module.
as_name: String,
},
/// Perform the specified [action].
///
/// [action]: enum.Action.html
PerformAction(Action<F32, F64>),
}
/// Command in the script.
///
/// It consists of line number and [`CommandKind`].
///
/// [`CommandKind`]: enum.CommandKind.html
#[derive(Clone, Debug, PartialEq)]
pub struct Command<F32 = f32, F64 = f64> {
/// Line number the command is defined on.
pub line: u64,
/// Kind of the command.
pub kind: CommandKind<F32, F64>,
}
/// Parser which allows to parse WebAssembly script text format.
pub struct ScriptParser<F32 = f32, F64 = f64> {
cmd_iter: vec::IntoIter<json::Command>,
modules: HashMap<CString, WabtBuf>,
_phantom: ::std::marker::PhantomData<(F32, F64)>,
}
impl<F32: FromBits<u32>, F64: FromBits<u64>> ScriptParser<F32, F64> {
/// Create `ScriptParser` from the script in specified file.
///
/// The `source` should contain valid wast.
///
/// The `test_filename` must have a `.wast` extension.
pub fn from_source_and_name(source: &[u8], test_filename: &str) -> Result<Self, Error> {
if !test_filename.ends_with(".wast") {
return Err(Error::Other(format!(
"Provided {} should have .wast extension",
test_filename
)));
}
// Convert wasm script into json spec and binaries. The output artifacts
// will be placed in result.
let results = wast2json(source, test_filename)?;
let results = results.take_all().expect("Failed to release");
let json_str = results.json_output_buffer.as_ref();
let spec: json::Spec =
serde_json::from_slice(json_str).expect("Failed to deserialize JSON buffer");
let json::Spec { commands, .. } = spec;
Ok(ScriptParser {
cmd_iter: commands.into_iter(),
modules: results.module_output_buffers,
_phantom: Default::default(),
})
}
/// Create `ScriptParser` from the script source.
pub fn from_str(source: &str) -> Result<Self, Error> {
ScriptParser::from_source_and_name(source.as_bytes(), "test.wast")
}
/// Returns the next [`Command`] from the script.
///
/// Returns `Err` if an error occurred while parsing the script,
/// or returns `None` if the parser reached end of script.
///
/// [`Command`]: struct.Command.html
pub fn next(&mut self) -> Result<Option<Command<F32, F64>>, Error> {
let command = match self.cmd_iter.next() {
Some(cmd) => cmd,
None => return Ok(None),
};
let get_module = |filename: String, s: &Self| {
let filename = CString::new(filename).unwrap();
s.modules
.get(&filename)
.map(|module| ModuleBinary::from_vec(module.as_ref().to_owned()))
.expect("Module referenced in JSON does not exist.")
};
let (line, kind) = match command {
json::Command::Module {
line,
name,
filename,
} => (
line,
CommandKind::Module {
module: get_module(filename, self),
name,
},
),
json::Command::AssertReturn {
line,
action,
expected,
} => (
line,
CommandKind::AssertReturn {
action: parse_action(&action)?,
expected: parse_value_list(&expected)?,
},
),
json::Command::AssertReturnCanonicalNan { line, action } => (
line,
CommandKind::AssertReturnCanonicalNan {
action: parse_action(&action)?,
},
),
json::Command::AssertReturnArithmeticNan { line, action } => (
line,
CommandKind::AssertReturnArithmeticNan {
action: parse_action(&action)?,
},
),
json::Command::AssertExhaustion { line, action } => (
line,
CommandKind::AssertExhaustion {
action: parse_action(&action)?,
},
),
json::Command::AssertTrap { line, action, text } => (
line,
CommandKind::AssertTrap {
action: parse_action(&action)?,
message: text,
},
),
json::Command::AssertInvalid {
line,
filename,
text,
} => (
line,
CommandKind::AssertInvalid {
module: get_module(filename, self),
message: text,
},
),
json::Command::AssertMalformed {
line,
filename,
text,
} => (
line,
CommandKind::AssertMalformed {
module: get_module(filename, self),
message: text,
},
),
json::Command::AssertUnlinkable {
line,
filename,
text,
} => (
line,
CommandKind::AssertUnlinkable {
module: get_module(filename, self),
message: text,
},
),
json::Command::AssertUninstantiable {
line,
filename,
text,
} => (
line,
CommandKind::AssertUninstantiable {
module: get_module(filename, self),
message: text,
},
),
json::Command::Register {
line,
name,
as_name,
} => (line, CommandKind::Register { name, as_name }),
json::Command::Action { line, action } => {
(line, CommandKind::PerformAction(parse_action(&action)?))
}
};
Ok(Some(Command { line, kind }))
}
}
|
rust
|
{
"name": "RTStateMachine",
"version": "1.0.0",
"summary": "Simple implementation of State-machine with target-action or block using Objective-C",
"description": "Simple implementation of State-machine with target-action or block using Objective-C.\nAn easy way to build up state machine graph.",
"homepage": "https://github.com/zhooleen/StateMachine",
"license": "MIT",
"authors": {
"lzhu": "<EMAIL>"
},
"platforms": {
"ios": "7.0"
},
"source": {
"git": "https://github.com/zhooleen/StateMachine.git",
"tag": "1.0.0"
},
"source_files": [
"Classes",
"Classes/**/*.{h,m}"
],
"exclude_files": "Classes/Exclude"
}
|
json
|
var componentsUtil = require("./util");
var runtimeId = componentsUtil.___runtimeId;
var componentLookup = componentsUtil.___componentLookup;
var getMarkoPropsFromEl = componentsUtil.___getMarkoPropsFromEl;
var TEXT_NODE = 3;
// We make our best effort to allow multiple marko runtimes to be loaded in the
// same window. Each marko runtime will get its own unique runtime ID.
var listenersAttachedKey = "$MDE" + runtimeId;
var delegatedEvents = {};
function getEventFromEl(el, eventName) {
var virtualProps = getMarkoPropsFromEl(el);
var eventInfo = virtualProps[eventName];
if (typeof eventInfo === "string") {
eventInfo = eventInfo.split(" ");
if (eventInfo[2]) {
eventInfo[2] = eventInfo[2] === "true";
}
if (eventInfo.length == 4) {
eventInfo[3] = parseInt(eventInfo[3], 10);
}
}
return eventInfo;
}
function delegateEvent(node, eventName, target, event) {
var targetMethod = target[0];
var targetComponentId = target[1];
var isOnce = target[2];
var extraArgs = target[3];
if (isOnce) {
var virtualProps = getMarkoPropsFromEl(node);
delete virtualProps[eventName];
}
var targetComponent = componentLookup[targetComponentId];
if (!targetComponent) {
return;
}
var targetFunc =
typeof targetMethod === "function"
? targetMethod
: targetComponent[targetMethod];
if (!targetFunc) {
throw Error("Method not found: " + targetMethod);
}
if (extraArgs != null) {
if (typeof extraArgs === "number") {
extraArgs = targetComponent.___bubblingDomEvents[extraArgs];
}
}
// Invoke the component method
if (extraArgs) {
targetFunc.apply(targetComponent, extraArgs.concat(event, node));
} else {
targetFunc.call(targetComponent, event, node);
}
}
function addDelegatedEventHandler(eventType) {
if (!delegatedEvents[eventType]) {
delegatedEvents[eventType] = true;
}
}
function addDelegatedEventHandlerToHost(eventType, host) {
var listeners = (host[listenersAttachedKey] =
host[listenersAttachedKey] || {});
if (!listeners[eventType]) {
(host.body || host).addEventListener(
eventType,
(listeners[eventType] = function (event) {
var propagationStopped = false;
// Monkey-patch to fix #97
var oldStopPropagation = event.stopPropagation;
event.stopPropagation = function () {
oldStopPropagation.call(event);
propagationStopped = true;
};
var curNode = event.target;
if (!curNode) {
return;
}
curNode =
// event.target of an SVGElementInstance does not have a
// `getAttribute` function in IE 11.
// See https://github.com/marko-js/marko/issues/796
curNode.correspondingUseElement ||
// in some browsers the event target can be a text node
// one example being dragenter in firefox.
(curNode.nodeType === TEXT_NODE ? curNode.parentNode : curNode);
// Search up the tree looking DOM events mapped to target
// component methods
var propName = "on" + eventType;
var target;
// Attributes will have the following form:
// on<event_type>("<target_method>|<component_id>")
do {
if ((target = getEventFromEl(curNode, propName))) {
delegateEvent(curNode, propName, target, event);
if (propagationStopped) {
break;
}
}
} while ((curNode = curNode.parentNode) && curNode.getAttribute);
}),
true
);
}
}
function noop() {}
exports.___handleNodeAttach = noop;
exports.___handleNodeDetach = noop;
exports.___delegateEvent = delegateEvent;
exports.___getEventFromEl = getEventFromEl;
exports.___addDelegatedEventHandler = addDelegatedEventHandler;
exports.___init = function (host) {
Object.keys(delegatedEvents).forEach(function (eventType) {
addDelegatedEventHandlerToHost(eventType, host);
});
};
|
javascript
|
Morning Lazziness product selections are curated by the editorial team. If you buy something through our links, we may earn an affiliate commission, at no cost to you. We only recommend products we genuinely love.
Bodycon dresses are the most loved type of dress. Do you know how the bodycon dress gained its popularity among women?
Bodycon dresses are lightweight and comfortable. It highlights your body curves and gives you a chic look. A bodycon dress is for everyone! Bodycon can look stylish for a fashion enthusiast when both the fabric and the fit are just right.
When looking for a bodycon dress, you should always consider the fabric and quality of the dress. A good bodycon dress is of high quality, thick material, stretchable and lightweight. It should be able to support your figure.
If you’re looking for some fantastic bodycon dresses to add to your dresses collection, then you must check out our top picks from Amazon. Scroll down and let the style endure!
This Casual Dress For Women will perfectly meet all your fashion styles and meet whatever you pair with. The sleeveless tank dress enchants with a great slim fit cut and perfects decent high-quality fabric; attractive fresh color makes you want summer, sun, and beach. The elastic shirt dress is given feminine attention by an enchantingly round neckline and sleeveless shape.
This is a ruched sheath bodycon dress, round neck/knee-length/side shirring/short sleeve/long sleeve slim fit plain casual t-shirt dress, suitable to spring summer autumn and winter, suitable to club/office/street/party and home. It’s regular thick, which is suitable for spring, summer, autumn, and winter.
Velius is a fashion brand that has always been committed to providing superior quality with exquisite design and superlative craftsmanship. This dress is made of high stretch satin, which has both the character of smoothness and a little elasticity—adjustable spaghetti strap on the back, sexy low neck and backless, zipper on the back waist.
Made up of 10% spandex and 90% polyester stretch fabric, this bodycon dress is lightweight and breathable. Very stretchy fabric makes you more comfortable.
Occasions: party, wedding, prom, cocktail, evening, club, bar or casual, etc. Unique style, make you beautiful, fashionable, sexy, and elegant.
This women’s summer dress adopts high-quality fabric blend outer fabric, soft and breathable. This short dress can be dressed up and down easily. The bodycon cut creates a seductive silhouette. This is a one-side ruched shirt dress with an irregular hem design to modify your body lines. The above knee length and wrap front look make you look slimmer.
The vibrant bodycon mini dress features a super cute strappy detail and a flattering ruched style. You are gonna be glowing all night. Chic style dresses to going out clubbing. The slim stretch design highlights your perfect body curve and makes you feel sexier; the deep V-neck bodycon dress dramatically flaunts the rich assets and beautiful look.
This bodycon mock neck pencil dress with bandage would be welcomed in the club, will show off your best features at this evening party, clicked its way through the club night when you dance or walk.
The zipper style has creative ways of wearing. The turtleneck one would expose your female elegance.
This long dress shirt features high-quality material, mesh bishop sleeve, tie front, crew neck, solid color. The dress goes great with any body shape, comes in a wide range of sizes, and looks just great on you whenever you decide to wear it.
Elegant and sweet style shows your unique personal charm and produces a slimming visual effect.
Amazon review – This is a great little casual dress! I ordered a size up from what I normally wear. I ordered a large one, and I usually wear a medium for most things. I’m glad I did because I didn’t want it to be too short or too tight-fitting, and I have a little bit of a stomach, so I didn’t want to accentuate that. The large fits me perfectly, but I haven’t washed it yet, so hopefully, it won’t shrink. I’m 5’6 “tall, 145 pounds, 34B chest.
This dress is a bodycon club party dress, sexy, solid color, slim, ruched, perfect wear for club or party. This bodycon dress is cozy and super stretchy, made up of 90% polyester and 10% spandex. The white one is made of double-layer fabric, so you don’t have to worry about seeing through.
Planning a party?
Wow! Your choice of outfit has been sorted. A bodycon dress is a perfect suit for a party, club, and other special occasions. Flaunt your curves and be comfortable – says Bodycon Dresses.
|
english
|
Jeep Meridian three-row SUV was revealed in India yesterday and will become available for bookings in May 2022. A seven-seater based on Jeep Compass, the Meridian will initially be available only with the 2. 0-litre turbo diesel engine with a choice between a six-speed manual gearbox and a nine-speed automatic transmission.
The seven-seater SUV segment in India is a highly competitive one with options such as a Tata Safari and Mahindra XUV700 as well as some costlier offerings, including Skoda Kodiaq , MG Gloster, and Toyota Fortuner. There's a new kid on the block though that will enter the segment in a few months. We are talking about the Jeep Meridian that was unveiled for the Indian market yesterday. A three-row version of Jeep Compass, the Meridian is similar to the Jeep Commander that is on sale in Brazil. However, the Merdian gets some elements that are specially integrated for the Indian market. Jeep noted that it will start accepting orders for the Meridian in May and start production in India the same month. The three-row SUV is then expected to hit the market in June 2022. While there is considerable time for that to happen, let's quickly take a look at the top 5 things about the Jeep Meridian.
1. Jeep Meridian borrows some design cues from the Compass but there are several distinctions between the two SUVs. The Meridian has sleek full LED headlamps with LED DRLs, a muscular front bumper with chrome garnishes, 18-inch alloy wheels, and sleek LED tail lamps that completely set the Meridian apart from its five-seater sibling.
2. Jeep Meridian has the same interior layout as the Compass but features elements such as soft-touch material and metal inlays that lend to it a more premium appeal. The Black and Emperador Brown interior theme and quilted seats further differentiate the Meridian from the Compass. And as for the feature list, the Meridian will come with provisions such as a 10. 1-inch touchscreen with wireless Android Auto and Apple CarPlay, a 10. 25-inch TFT instrument cluster, dual-zone climate control, wireless smartphone charging, connected car technology, automatic rain-sensing wipers, cruise control, recline feature for second and third-row seats, powered tailgate, 360-degree camera, sunroof, four terrain modes (Sand, Snow, Mud, Auto), 8-way electrically adjustable driver seat, ventilated front seats, and more.
3. Jeep Meridian comes with a raft of safety features, including six airbags (standard), ABS, EBD, electronic stability control, hill hold assist, electronic roll mitigation programme, active yaw control, engine drag control, hydraulic brake assist, traction control, and more.
4. Jeep Meridian, initially, will be available with a 2. 0-litre diesel engine in combination with a six-speed manual gearbox. However, customers will also have the option of a nine-speed automatic gearbox with a front-wheel-drive (segment-first) or a rear-wheel-drive system.
5. According to Jeep, the Meridian is a very capable offroader, thanks to the Selec-Terrain 4x4 terrain management system and four terrain modes - snow, sand, mud, and auto.
|
english
|
<reponame>anjaltelang/pinniped<gh_stars>0
// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Code generated by MockGen. DO NOT EDIT.
// Source: go.pinniped.dev/internal/dynamiccert (interfaces: Private)
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
dynamiccertificates "k8s.io/apiserver/pkg/server/dynamiccertificates"
)
// MockDynamicCertPrivate is a mock of Private interface.
type MockDynamicCertPrivate struct {
ctrl *gomock.Controller
recorder *MockDynamicCertPrivateMockRecorder
}
// MockDynamicCertPrivateMockRecorder is the mock recorder for MockDynamicCertPrivate.
type MockDynamicCertPrivateMockRecorder struct {
mock *MockDynamicCertPrivate
}
// NewMockDynamicCertPrivate creates a new mock instance.
func NewMockDynamicCertPrivate(ctrl *gomock.Controller) *MockDynamicCertPrivate {
mock := &MockDynamicCertPrivate{ctrl: ctrl}
mock.recorder = &MockDynamicCertPrivateMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDynamicCertPrivate) EXPECT() *MockDynamicCertPrivateMockRecorder {
return m.recorder
}
// AddListener mocks base method.
func (m *MockDynamicCertPrivate) AddListener(arg0 dynamiccertificates.Listener) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AddListener", arg0)
}
// AddListener indicates an expected call of AddListener.
func (mr *MockDynamicCertPrivateMockRecorder) AddListener(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddListener", reflect.TypeOf((*MockDynamicCertPrivate)(nil).AddListener), arg0)
}
// CurrentCertKeyContent mocks base method.
func (m *MockDynamicCertPrivate) CurrentCertKeyContent() ([]byte, []byte) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CurrentCertKeyContent")
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].([]byte)
return ret0, ret1
}
// CurrentCertKeyContent indicates an expected call of CurrentCertKeyContent.
func (mr *MockDynamicCertPrivateMockRecorder) CurrentCertKeyContent() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentCertKeyContent", reflect.TypeOf((*MockDynamicCertPrivate)(nil).CurrentCertKeyContent))
}
// Name mocks base method.
func (m *MockDynamicCertPrivate) Name() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name.
func (mr *MockDynamicCertPrivateMockRecorder) Name() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockDynamicCertPrivate)(nil).Name))
}
// Run mocks base method.
func (m *MockDynamicCertPrivate) Run(arg0 int, arg1 <-chan struct{}) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Run", arg0, arg1)
}
// Run indicates an expected call of Run.
func (mr *MockDynamicCertPrivateMockRecorder) Run(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockDynamicCertPrivate)(nil).Run), arg0, arg1)
}
// RunOnce mocks base method.
func (m *MockDynamicCertPrivate) RunOnce() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RunOnce")
ret0, _ := ret[0].(error)
return ret0
}
// RunOnce indicates an expected call of RunOnce.
func (mr *MockDynamicCertPrivateMockRecorder) RunOnce() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunOnce", reflect.TypeOf((*MockDynamicCertPrivate)(nil).RunOnce))
}
// SetCertKeyContent mocks base method.
func (m *MockDynamicCertPrivate) SetCertKeyContent(arg0, arg1 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetCertKeyContent", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetCertKeyContent indicates an expected call of SetCertKeyContent.
func (mr *MockDynamicCertPrivateMockRecorder) SetCertKeyContent(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCertKeyContent", reflect.TypeOf((*MockDynamicCertPrivate)(nil).SetCertKeyContent), arg0, arg1)
}
// UnsetCertKeyContent mocks base method.
func (m *MockDynamicCertPrivate) UnsetCertKeyContent() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UnsetCertKeyContent")
}
// UnsetCertKeyContent indicates an expected call of UnsetCertKeyContent.
func (mr *MockDynamicCertPrivateMockRecorder) UnsetCertKeyContent() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsetCertKeyContent", reflect.TypeOf((*MockDynamicCertPrivate)(nil).UnsetCertKeyContent))
}
|
go
|
Germany's anti-cartel watchdog said Monday it is examining if a deal between Amazon's subsidiary Audible.com and Apple to distribute digital audiobooks flouted rules.
The two US giants have a long-standing agreement in which audio books offered for sale on Apple's iTunes store are sold through Audible.
But the Federal Cartel Authority is now taking a closer look at the agreement after the Association of German Publishers and Booksellers questioned the exclusive deal.
"We have to ensure that publishers of audio books have sufficient alternatives to distribute their digital audio books," said Andreas Mundt, who heads the Federal Cartel Authority.
Audible is a leading distributor of digital audio books in Germany, offering its services through its own Audible.de website as well as through its parent company's Amazon.de.
Both Amazon and Apple have been regular targets of anti-trust probes given their leading positions in online retail.
In June, a US appeals court upheld a 2013 ruling that Apple led an illegal conspiracy to fix prices of e-books in violation of anti-trust laws.
In the same month, the EU's anti-trust watchdog opened a formal investigation into Amazon's e-book distribution.
|
english
|
Aurangabad, June 14:
Swap kidney transplants have brought new hopes and joys to two families of the patients in the city. According to details, Dr Bapu Shingte, an associate professor from the Chemistry Department of Dr Babasaheb Ambedkar Marathwada University was suffering from a kidney problem since June 2019.
His dialysis was being done from October 2021. The doctors asked him to go for a kidney transplant. Rajesh Suryavanshi from Aurangabad Youth Welfare Association advised Dr Shingte to register with Zonal Transplant Coordination Centre (ZTCC) for kidney donation.
However, his wife Alka offered to donate her kidney without waiting for the donor. However, the blood group of husband and wife did not match.
The blood group of Dr Shingte is A-Positive while his wife's blood group is B-Positive.
The doctors advised Dr Shingte to opt for a swap transplant which involves an exchange of organs between two families, who cannot donate the organ to their family member because of blood group mismatch.
In another case, Parbhani-based pharmacist Gunwant Kale’s wife Rajni Kale suddenly fell in November 2019. Doctors informed the patient about the failure of her both kidneys. She approached Dr Neeraj Inamdar from the city for the treatment. Doctors advised her for a kidney transplant.
She was in need of a kidney from a person who has a B-positive blood group as her husband Gunwant Kale’s blood group is A-Positive. Their blood groups were mismatched.
Dr Inamdar advised them to swap a transplant. Kales' made enquires with two to three hospitals for the transplant. They learnt about patient Dr Bapu Shingte at CIIGMA Hospital who has an A-Positive blood group. Gunwant agreed to give his kidney to Dr Shingte in exchange for a kidney of Alka (Shingte’s wife) for his wife Rajni.
|
english
|
```js
<Details
abv='12–14%'
beerStyle='Brown Ale'
brewery='Dogfish Head Craft Brewery'
description='Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum…'
images={[
'https://images.unsplash.com/photo-1444728399417-08d2aa39e6f4?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=a75d09107dd70d0e844460c45024ca3c&dpr=1&auto=format&fit=crop&w=1000&q=80&cs=tinysrgb',
'',
''
]}
location='Milton, DE'
onAdd={console.log}
title='Bourbon Barrel-Aged Palo Santo Marron'
/>
```
|
markdown
|
<filename>sdk/program/src/serialize_utils.rs
use crate::pubkey::Pubkey;
use crate::sanitize::SanitizeError;
pub fn append_u16(buf: &mut Vec<u8>, data: u16) {
let start = buf.len();
buf.resize(buf.len() + 2, 0);
let end = buf.len();
buf[start..end].copy_from_slice(&data.to_le_bytes());
}
pub fn append_u8(buf: &mut Vec<u8>, data: u8) {
let start = buf.len();
buf.resize(buf.len() + 1, 0);
buf[start] = data;
}
pub fn append_slice(buf: &mut Vec<u8>, data: &[u8]) {
let start = buf.len();
buf.resize(buf.len() + data.len(), 0);
let end = buf.len();
buf[start..end].copy_from_slice(data);
}
pub fn read_u8(current: &mut usize, data: &[u8]) -> Result<u8, SanitizeError> {
if data.len() < *current + 1 {
return Err(SanitizeError::IndexOutOfBounds);
}
let e = data[*current];
*current += 1;
Ok(e)
}
pub fn read_pubkey(current: &mut usize, data: &[u8]) -> Result<Pubkey, SanitizeError> {
let len = std::mem::size_of::<Pubkey>();
if data.len() < *current + len {
return Err(SanitizeError::IndexOutOfBounds);
}
let e = Pubkey::new(&data[*current..*current + len]);
*current += len;
Ok(e)
}
pub fn read_u16(current: &mut usize, data: &[u8]) -> Result<u16, SanitizeError> {
if data.len() < *current + 2 {
return Err(SanitizeError::IndexOutOfBounds);
}
let mut fixed_data = [0u8; 2];
fixed_data.copy_from_slice(&data[*current..*current + 2]);
let e = u16::from_le_bytes(fixed_data);
*current += 2;
Ok(e)
}
pub fn read_slice(
current: &mut usize,
data: &[u8],
data_len: usize,
) -> Result<Vec<u8>, SanitizeError> {
if data.len() < *current + data_len {
return Err(SanitizeError::IndexOutOfBounds);
}
let e = data[*current..*current + data_len].to_vec();
*current += data_len;
Ok(e)
}
|
rust
|
from django import template
from core.models import *
register = template.Library()
import re
@register.filter(name="cimg")
def cimg(value):
if value.img.name != '':
return value.img.name[4:]
else:
return ""
|
python
|
<reponame>tabinfl/50ShadesOfGreyPill
{
"address": "1oranGeS2xsKZ4jVsu9SVttzgkYXu4k9v",
"cert_auth_type": "web",
"cert_sign": "<KEY>
"cert_user_id": "<EMAIL>",
"files": {
"data.json": {
"sha512": "c1153fbf00ad1de12557da3a8557b7746efce8ad985ea6803f9056c930c400ec",
"size": 427
}
},
"inner_path": "data/users/182DfhJfWS2QGQ5PnFor4htwUe5W9CJDYD/content.json",
"modified": 1480931581.030823,
"signs": {
"<KEY>": "<KEY>
}
}
|
json
|
First Pics of Sharwanand's engagement with Rakshita out!
Sharwanand was today engaged to Rakshita Reddy, a Telugu-speaking, US-based NRI who works in the software industry. The first pics from the event are out.
The couple looks made for each other. We see the 'Shatamanam Bhavati' actor smiling charmingly in it. Among celebs, the Ram Charan-Upasana Konidela duo was present to bless the couple.
The bride is the granddaughter of Bojjala Gopala Krishna Reddy and the daughter of Madhusudhan Reddy, who is a High Court advocate. The bride's uncle Ganga Reddy is Bojjala Gopala Krishna Reddyâs son-in-law.
The 'Oke Oka Jeevitham' actor will get married in April or May. The elders from both sides are looking for the right muhurtham.
Follow us on Google News and stay updated with the latest!
|
english
|
Veteran actor Ashok Saraf has made a special place in the hearts of the audience with his versatile acting and humble personality. Recently, he was honoured with a Lifetime Achievement Award at the Zee Chitra Gaurav Awards. The award ceremony will be aired on March 26 at 7 pm on Zee Marathi. Now, a video from the ceremony is making a huge noise on the internet.
In the clip, actor Siddharth Jadhav can be seen giving a tribute to Ashok Saraf with his remarkable dance performance on his popular songs. Ashok gets emotional on witnessing such a heartfelt tribute. Later, Siddharth came down from the stage and bowed down to him with respect. The video is now going viral on the internet.
Renowned celebrities, including Rashmika Mandanna, Riteish and Genelia Deshmukh, Jaywant Wadkar, Ashok Shinde, Mahesh Kothare and Alka Kubal attended the award ceremony. Siddharth Jadhav’s tribute to Ashok Saraf made everyone emotional.
Mahesh Kothare and Sachin Pilgaonkar then respectfully take him to the stage. The entire crowd can be seen lauding Ashok with a standing ovation.
The video is uploaded on the official Instagram page of Zee Marathi.
The caption of the post reads, “Most beautiful moment of the Zee Chitra Gaurav Awards 2023 Ceremony. The ceremony will be telecasted on 26th March at 7:00 pm on the Zee Marathi channel”.
Social media users have commented on the video. One user wrote, “If South industry has Rajinikanth, we also have Ashok Saraf”. Another user added, “What a moment”. The third user commented, “The man who made our childhood memorable. Living Legend”. One user also wrote, “The best artist in Marathi cinema Ashokmama”.
Ashok Saraf is best known for Karan Arjun, Bin Kamacha Navra, Bade Ghar Ki Beti, and Saade Made Teen. In a career spanning 45 years, he has acted in more than 250 Marathi films. He has also acted in Hindi movies, Marathi plays, and Hindi television serials.
Ashok Saraf started his acting journey with the Marathi film Janaki. Some of his other notable projects include Doni Gharacha Pahuna, Jawal Ye Laju Nako, Tumacha Amacha Jamala, Deed Shahane, Singham, and Duniya Kari Salam. His other releases include Shentimental, Me Shivaji Park, and Prawaas.
|
english
|
<reponame>JordiiV/meadbaron
import React from 'react'
import PropTypes from 'prop-types'
import { graphql } from 'gatsby'
import Layout from '../components/Layout'
import AOS from 'aos';
import Content, { HTMLContent } from '../components/Content'
import '../components/main.scss'
import '../components/all.sass'
import 'aos/dist/aos.css';
export const AboutPageTemplate = ({ title, content, contentComponent }) => {
const PageContent = contentComponent || Content
return (
<Layout>
<section className="section">
<div className="container">
<div
className="full-width-image-container margin-top-0 hero-foo"
>
<h1
className="has-text-weight-bold is-size-1"
style={{
color: 'white',
margin: '2rem',
}}
>
About me
</h1>
</div>
<div className="section">
<div className={"container"}>
<div id="intro" class="content" style={{ marginTop: "5%", marginBottom: "10%" }}>
<p style={{ fontSize: "28px" }}>My name is Jordi and i'm from Barcelona, Spain. If you are interested in my <span className="has-text-weight-bold">personal interests</span> or in my<span className="has-text-weight-bold"> professional career</span> please, continue reading.
</p>
<p className="" style={{ fontSize: "28px" }}>Otherwise, If you just want my <span className="has-text-weight-bold">curriculum vitae</span> you can download <a style={{ fontSize: "30px" }} className="cvButton" download="curriculum" rel="noopener noreferrer" target="_blank" href="https://drive.google.com/open?id=19axsHTAfwKtm2BgqthGm3-MLhtaFzIwg">HERE</a></p>
</div>
</div>
<PageContent className="content" content={content} />
</div>
</div>
</section>
</Layout>
)
}
AboutPageTemplate.propTypes = {
title: PropTypes.string.isRequired,
content: PropTypes.string,
contentComponent: PropTypes.func,
}
export class AboutPage extends React.Component {
componentDidMount(){
this.aos = AOS
this.aos.init()
}
render(){
const isBrowser = typeof document !== 'undefined';
const AOS = isBrowser ? require('aos') : undefined;
const data = this.props.data
const { markdownRemark: post } = data
return (
<AboutPageTemplate
contentComponent={HTMLContent}
title={post.frontmatter.title}
content={post.html}
/>
)
}
}
AboutPage.propTypes = {
data: PropTypes.object.isRequired,
}
export default AboutPage
export const aboutPageQuery = graphql`
query AboutPage($id: String!) {
markdownRemark(id: { eq: $id }) {
html
frontmatter {
title
}
}
}
`
|
javascript
|
<filename>src/lib.rs
pub mod aabb;
pub mod camera;
pub mod color;
pub mod hittable;
pub mod hittable_list;
pub mod material;
pub mod ray;
pub mod sphere;
pub mod utils;
pub mod vec3;
pub mod triangle;
pub mod mesh;
pub mod cylinder;
pub mod bvh;
pub mod texture;
pub mod sphere_blur;
pub mod perlin;
pub mod onb;
pub mod pdf;
|
rust
|
<filename>jsurl/2.1.7.json
{"url.js":"<KEY>,"url.min.js":"<KEY>}
|
json
|
New Diwali Trend That Every Guy Should Try!
A ‘Festival Alert’ to all the guys and also a ‘theft alert’ for all the ladies! Wondering how and why? We are going to show you a latest Diwali trend that's doing the round on the internet. If you are interested in wearing salwars in a saree style, then this article is also for you irrespective of gender.
Now getting to the actual point, some random designer decided to take the saree to another level and drape it on men. "Why should girls have all the fun… must have been the intention and he would have wanted to create a new fashion with sarees.
The saree was draped like a dhoti (the nauvari style). In the end, they took the pallu and made it into the dupatta and the male models were made to pose with absolute élan, with jewellery and all.
Here is the picture for more clarification:
As this picture is going viral on the internet, all the women are getting worried about the thought that their sarees will no longer be spared by men as well. While some girls who used to steal tees and shirts from their brothers are worried that their sarees and stoles will now be used.
Anyways, these guys are looking quite hot and we personally suggest that every guy should try pairing up their kurta with a saree and see the magic that happens later.
Sakshi Post wishes you a very happy and prosperous Diwali 2021.
|
english
|
<gh_stars>0
//******************************************************************************
// Copyright (c) 2005-2013 by <NAME>
//
// See the included file COPYING.TXT for details about the copyright.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//******************************************************************************
#include "qabstractslider_hook_c.h"
QAbstractSlider_hookH QAbstractSlider_hook_Create(QObjectH handle)
{
return (QAbstractSlider_hookH) new QAbstractSlider_hook((QObject*)handle);
}
void QAbstractSlider_hook_Destroy(QAbstractSlider_hookH handle)
{
delete (QAbstractSlider_hook *)handle;
}
void QAbstractSlider_hook_hook_valueChanged(QAbstractSlider_hookH handle, QHookH hook)
{
((QAbstractSlider_hook *)handle)->hook_valueChanged(hook);
}
void QAbstractSlider_hook_hook_sliderPressed(QAbstractSlider_hookH handle, QHookH hook)
{
((QAbstractSlider_hook *)handle)->hook_sliderPressed(hook);
}
void QAbstractSlider_hook_hook_sliderMoved(QAbstractSlider_hookH handle, QHookH hook)
{
((QAbstractSlider_hook *)handle)->hook_sliderMoved(hook);
}
void QAbstractSlider_hook_hook_sliderReleased(QAbstractSlider_hookH handle, QHookH hook)
{
((QAbstractSlider_hook *)handle)->hook_sliderReleased(hook);
}
void QAbstractSlider_hook_hook_rangeChanged(QAbstractSlider_hookH handle, QHookH hook)
{
((QAbstractSlider_hook *)handle)->hook_rangeChanged(hook);
}
void QAbstractSlider_hook_hook_actionTriggered(QAbstractSlider_hookH handle, QHookH hook)
{
((QAbstractSlider_hook *)handle)->hook_actionTriggered(hook);
}
|
cpp
|
<filename>.yalc/@pooltogether/react-components/src/styles/vx--custom.css
/* vx tooltip uses inline styles so override them with !important everything! :) */
.vx-chart-tooltip {
color: var(--color-text-inverse) !important;
background: white !important;
box-shadow: 0 -10px 10px -1px rgba(0, 0, 0, 0.05), 0 20px 20px -3px rgba(0, 0, 0, 0.1),
rgba(14, 16, 60, 0.08) 0px 15px 30px !important;
border: 0 !important;
color: #210a45 !important;
font-size: 1rem !important;
padding: 1rem 1.5rem !important;
border-radius: 8px !important;
pointer-events: initial !important;
max-width: 16rem !important;
white-space: initial !important;
z-index: 1823774 !important;
}
|
css
|
A former Bangladeshi military captain, who was convicted for killing the country's founder Bangabandhu Sheikh Mujibur Rahman, was arrested by the police in Dhaka today.
Home Minister Asaduzzaman Khan Kamal confirmed ex-captain Abdul Majed's arrest and said he had been sent to court to "exhaust legal options".
Majed was one of the six absconding ex-Army officers who were handed down capital punishment after their trial in absentia.
Minister Kamal said previous reports indicated Majed was hiding in India and he was arrested from Dhaka upon his return.
The minister said Majed, a "self-confessed killer", was not only involved in Bangabandhu's killing on August 15, 1975 at his private Dhanmandi residence but was also involved in the subsequent murder of four national leaders in high security Dhaka Central Jail on November 3 in 1975.
Majed's predawn arrest was led by the Counter Terrorism and Transnational Crime (CTTC) unit of the police in Mirpur based on a tip-off.
"Majed was near a shrine in Mirpur when policemen arrested him," an official said.
After the arrest, a magistrate court sent the sacked Army captain to jail. Majed appeared in the Old Dhaka Court Complex wearing white pajamas and pants. He was handcuffed with a bulletproof police jacket and helmet.
"Majed was brought to the court at around 12. 15 pm. Dhaka Metropolitan Magistrate A M Zulfikar Hayat passed his order at 12. 55 pm asking the police to send him to jail," a police officer said.
Assistant Public Prosecutor Hemayet Uddin said Majed told the court that he was hiding in India and returned home recently.
Majed was not allowed to give any statement as according to the law convicts do not have the right to do so at this stage of legal proceedings.
Legal experts said a report on his arrest would now be sent to the Dhaka District Judge's Court, which originally tried the killers of Bangabandhu.
"The stipulated time for appeal against death penalty expired long ago. Majed now can just seek Presidential mercy unless the Supreme Court decides to consider any plea on his part," a Supreme Court lawyer said.
Twelve ex-military officers were sentenced to death for the August 15, 1975 killing of Father of the Nation Bangabandhu Sheikh Mujibur Rahman along with most of his family members and five of them were executed in 2010 while one died of natural causes.
The five were hanged at Dhaka Central Jail on January 28, 2010, after protracted legal procedure. The trial process began in 1996 when an indemnity law was scrapped as it was protecting the assassins.
The hanged lieutenant colonels were Syed Farooq Rahman, Sultan Shahriar Rashid Khan, AKM Mohiuddin Ahmed and Mohiuddin Ahmed and sacked Major Bazlul Huda, while sacked Colonel Rashed Pasha died of natural causes in Zimbabwe while on the run.
Farooq Rahman, Shahriar Rashid Khan, Mohiuddin Ahmed of the Artillery faced trial in the judge's court in person.
Huda was extradited from Thailand and Lancer Mohiuddin was sent back from the United States after the then district judge Golam Rasul delivered the judgment.
Majed was one of the remaining fugitives believed to be hiding abroad with no confirmed whereabouts.
The fugitives include key mastermind of the August 15, 1975 coup ex-lieutenant Colonel Abdur Rashid.
After the August 15, 1975 carnage, Majed was rehabilitated in civil service during the subsequent regime of former military dictator-turned politician Ziaur Rahman as an ex-cadre official and posted as the director of National Savings Department.
He fled the country while serving later in the finance ministry along with most of the other 1975 coup plotters as the 1996 general elections brought Awami League back to power which vowed bring justice to the killers of Bangabandhu.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed. )
|
english
|
I get to know about Brillare a few months back when I saw one of their instagram posts and they have mentioned “a cosmetic brand strongly believe in nurturing and nourishing the original beauty of individual’s with Nature and proud member of PETA” which means their products are 100% Cruelty-Free. I decided to give it try.
Brillare science is a company which designs products with the unique concept of “ingredient-based formulation”! Their focus is to design products from natural ingredients which will heal beauty concerns without bad side effects. They use only clinically verified actives for the products which are 100% free from Toxic, Harmful and Allergic Chemicals. They focus on research and rely upon science to develop cutting-edge cosmetic solutions.
What is Unique about Brillare Science?
You will find a number mentioned with “Natural Score” on every product which means, how much percentage of natural ingredients are used in each product. This is actually a great way to ensure, you are using a quality product which is free from harmful chemicals.
Brillare Science Power Repair Shampoo and Conditioner are the ideal choice for damaged and treated hair. They call it ‘Bond Repair’ with the note mentioned “Visible Damage Recovery”. It comes with Nature Score of 66 and 65.
Packaging: It comes in a Sturdy Orange Colored Transparent Plastic Bottle with a silver cap over it. The bottle has labels with all the product details mentioned over it.
Brillare Science Power Repair Shampoo is formulated with highly natural, mild, hypoallergic free, sulfate-free cleansers. The consistency of the shampoo is quite runny thus you need to take a small amount in the palm and apply it gently over the scalp. The fragrance is amazing and last for a longer time.
What I love the most about this shampoo is, it is Sulfate-Free, Color Free, Paraben free, Mineral Oil, Petroleum Wax, Animal Cruelty-Free. All these make it a great shampoo for frequent washes as it is mild and not at all harsh for your scalp and hair. The shampoo lathers well thus small quality goes a long way.
You can buy Brillare Shampoo Online.
Along with Brillare Science Power Repair Shampoo, I tried this conditioner too. The consistency of the Brillare Science Power Repair Intenso Conditioner is quite runny compared to other Conditioners available in the market. Thus you need to be careful while taking the product out in your palm. I take small amounts and apply it to my ends with my fingertips. Unlike other Conditioners, it doesn’t give any silky smooth effect (probably because it is silicone free!) during the application but, once you towel dry or blow dry your hair; you get tangled free, soft silky shiny hair. I love it.
The fragrance is equally amazing. after one wash, at least for 3 days, you don’t need another application. Your hair stays soft, shiny and bouncy.
You can buy Brillare Conditioner Online.
More Pictures:
The post Brillare Science Power Repair Shampoo & Intenso Conditioner Review appeared first on My Fashion Villa.
|
english
|
Froyok (Fabrice Piquet)
mRr3b00t (@hacknotcrime Advocate)
Grow as a software engineer (developer).A thread... If you are interested in pursuing a career in development and don't know where to start, here's your go-to guide for salaries, skills,
|
english
|
How will blockchain change the future? Is it worth to be involved in this transition? Next Tuesday, March 27th, join us for the first Blockchain Event in Szczecin, Poland (it's only 1.5h drive from Berlin).
As part of this event, Tokenika will be giving a talk about EOS entitled:
Other presenters include Shermin Voshmgir, founder of BlockchainHub, Joachim Lohkamp, CEO & founder of Jolocom and Tomasz Fidecki, CEO of Aply.
It looks like it's going to be a very interesting event, as more than 200 people have already registered. For more details and the exact address of the venue, please refer to this web page.
The event is organized by Aply, a very experienced IT company, with in-depth expertise in a wide spectrum of technologies ranging from hardcore C++ to building user interfaces in JavaScript React. They've successfully completed 28 projects. They do artware, software and also hardware.
Hopefully Tokenika and Aply will join forces to set up a software house here in Poland for building EOS-based dapps. Aply, with its software & hardware expertise, seems to be a perfect match for Tokenika's know-how in the blockchain space.
|
english
|
Looking for a heated Prana yoga class? Or perhaps Mandarin lessons? Sushi rolling sessions? We all love to search for stuff on Google. But Google search only goes so deep. CourseHorse, a New York City startup, provides a simple, innovative way to search for classes in Manhattan, Brooklyn, Queens and the Bronx. Search can be filtered by price and schedule, so you can find a morning meditation class before your 9am sales pitch.
CourseHorse launched in mid-April 2011 to make it easier for New Yorkers to find classes. To date, 150 schools have posted over 4,000 classes on the site. Co-founders Nihal Parthasarathi and Katie Kapler launched in New York only, recognizing that their system had to start small and be local in order truly provide value to schools and students. New York, not only a cultural, educational, and aspirational Mecca, but also a huge market, fit their vision perfectly as CourseHorse’s birthplace.
This week, CourseHorse began offering Free Classes, so users can try out classes for free before making a big purchase. CourseHorse also launched schedule alerts so if you find a class, love it, but can’t make the time, you can subscribe to receive updates when new schedules are posted. We caught up with Parthasarathi this week to fill you in on how CourseHorse is changing education in NYC.
CBM: Tell me a little bit about yourself- and how you came to launch CourseHorse.
Nihal Parthasarathi: I grew up in Connecticut, the son of a geeky engineering father and wunderkind sales mother—quite the dynamic duo to have in my corner. I attended NYU Stern’s undergraduate program, majoring in Finance and Marketing while minoring in Creative Writing, knowing that I wanted to build a skill set that could help me launch a company. After school, I jumped into consulting for Capgemini, and my client for two years was a major test-prep company. I’ve been passionate about education for as long as I can remember, as it strikes me as the most far-reaching way to have a positive impact on other people. While working, I realized there was a market for an aggregator of test-prep that would help compare different SAT prep classes. I called up Katie, my go-to person for new ideas, and within ten minutes, we’d come up with the idea that became CourseHorse.
CBM: How is CourseHorse different than other online education class finding sites? What are your offerings?
NP: We distinguish ourselves from other education sites in several ways. CourseHorse differentiates itself by aggregating local, group classes from only established NYC schools. What’s more, once they’ve decided on a group class, students can enroll directly on our site. For schools, it’s totally free to post classes, as we offer a cost-effective, pay-per-enrollment way for them to reach new students.
CBM: What are a few of the most awesome sounding classes that you are offering?
NP: When it comes to awesome-sounding classes, Helium Aerial Dance’s “Aerial Silk Fitness” definitely stands out. It allows students to fulfill their childhood dream of joining the circus by teaching them cool moves on silks and trapeze, all while giving them a great workout. Another crowd favorite is Paint Along NYC’s BYOB Painting... it’s exactly what it sounds like. What better way to loosen up for a painting class than by splitting a bottle of wine with a friend?
CBM: How will you monetize CourseHorse? Are you raising funding?
NP: We earn a sales commission every time a student enrolls in a class, which means that our primary short-term goal is to make sure we’re listing the classes that people want. We recently won NYU’s New Venture Competition, which has provided us with $75,000 in prize money (for no equity). We’ll be using this money for the next several months to begin hitting our targets before we consider raising any additional capital. This month, we’ve already doubled the sales we logged in June.
CBM: What do you believe CourseHorse is doing to disrupt education in a positive way?
NP: It has never been a more exciting time for education. Many of the traditional problems faced by educators—trustworthiness, quality, efficient diagnostics, access—are being tackled and solved by the smartest people on the planet. CourseHorse is focused on exposing great programs and making them more accessible, using the incredible breadth and depth of local resources to energize communities and make learning with others fun and easy. While many educational technologies empower us to learn on our own and online, CourseHorse suggests the opposite—we want our users to get out into their city and learn with friends.
For more on How the Internet is Revolutionizing Education, check out our full report here.
Get the most important tech news in your inbox each week.
|
english
|
@import './base/index.css';
@import './components/index.css';
@import "./screens/index.css";
@import './utilities/index.css';
@font-face {
font-family: 'fira_code';
src: url('../assets/fonts/firacode-retina-webfont.woff2') format('woff2'),
url('../assets/fonts/firacode-retina-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
.text-darkstar {
font-family: fira_code, serif;
}
|
css
|
Airtel Xstream Premium over-the-top (OTT) streaming service has been launched in India. The Indian telecom provider claims that its new OTT service will aggregate content from 15 Indian and global OTT platforms including SonyLIV, Eros Now, Shorts TV, and more. This integration is said to bring access to more than 10,000 movies and TV shows in one platform. The new streaming service from Airtel was first spotted last week. Furthermore, Airtel said that it is opting for a single app, single subscription, and single sign-in experience for Xstream Premium users.
The new OTT service by Airtel — Xstream Premium — was launched in India on Thursday. The video streaming service by the Indian telecom provider is priced at Rs. 149 per month or Rs. 1,499 annually — the prices were first spotted last week as Airtel Xstream Premium pack on the website. The platform will show more than 10,500 movies and TV shows from SonyLIV, Lionsgate Play, Eros Now, ManoramaMax, Hoichoi, Ultra, Epic On, ShortsTV, KLIKK, Divo, Dollywood Play, Namma Flix, Docubay, ShemarooMe, and Hungama Play. The addition of more platforms and content appears to be the reason for the price revision of the Airtel Xstream subscription from Rs. 49 monthly and Rs. 499 yearly to Rs. 149 monthly and Rs. 1,499 yearly.
Airtel Xstream Premium can be viewed on Airtel Xstream Box, Android TV, Fire TV, official website, or through Android and iOS devices via Airtel Xstream app or website. Users will be able to view content on two screens at a time. Furthermore, Xstream Premium aims to make the service easier for users by adopting a single app, single subscription, and single sign-in experience along with unified content and AI driven personalised content curation for users.
The Indian telecom provider also mentions that Airtel users can add their subscription cost to their telephone bills to make payments easier. The new Airtel Xstream Premium is exclusively available for Airtel customers who can view content on the platform on any device.
Airtel says that it is targeting 20 million subscribers for its Xstream Premium subscription and that, according to Media Partners Asia, India's OTT subscription market will grow to $2 billion (roughly Rs. 14,996 crore) by 2025. A large number of India's OTT subscriptions will grow in tier 2 and tier 3 cities.
Affiliate links may be automatically generated - see our ethics statement for details.
|
english
|
<filename>app/res/raw/auth_config.json
{
"client_id": "iok-cid-d28955b4e397d26674aea86dcb3e6011c9515f13ce65b60d",
"client_secret": "<KEY>",
"redirect_uri": "com.profiq.openid.portal:/oauth2redirect",
"authorization_scope": "profile",
"discovery_uri": "",
"authorization_endpoint_uri": "https://sandbox.iokids.net/oauth/signin",
"token_endpoint_uri": "https://sandbox.iokids.net/oauth/token",
"registration_endpoint_uri": "https://sandbox.iokids.net",
"user_info_endpoint_uri": "https://sandbox.iokids.net/user/v1/my/profile",
"profile_picture_endpoint_uri": "https://sandbox.iokids.net/user/v1/my/profile/picture",
"https_required": true
}
|
json
|
Kartik Aaryan is currently basking in the success of his latest release, Satyaprem Ki Katha which just recently crossed the Rs. 100 crore collection worldwide. Simultaneously, he also flew to London a day back to start the first schedule of his highly anticipated next with Kabir Khan, titled, Chandu Champion for which they have now started shoot.
Sharing an adorable photo with his director on social media from the first day of the shoot, Kartik wrote, "शुभारंभ. And the most challenging and exciting journey of my career begins... with the captain @Kabirkhan #ChanduChampion."
Kartik looks cool in the photo rocking a blue and black check cardigan with black joggers and a white beanie as he points at the clapboard for the first take of Chandu Champion which Kabir can be seen holding while wearing a black t-shirt with navy blue jogger pants and white sneakers.
Sajid & Warda Nadiadwala along with Kabir Khan and Kartik Aaryan were present, a special guest of honour Minister of Culture, Media and Sports RT Hon Stuart Andrew visited the location as the team commences the shoot of the film. The trio is joining forces for an extraordinary real-life story of not giving up, titled 'Chandu Champion' has filled the nation with sheer excitement. Having booked its grand release on EID June 2024, the film has finally gone on the floors in London yesterday in the presence of Minister of Culture, Media and Sports RT Hon Stuart Andrew.
On the work front, Kartik Aaryan also has Bhool Bhulaiyaa 3 along with a love story Aashiqui 3 in the pipeline ahead.
Catch us for latest Bollywood News, New Bollywood Movies update, Box office collection, New Movies Release , Bollywood News Hindi, Entertainment News, Bollywood Live News Today & Upcoming Movies 2024 and stay updated with latest hindi movies only on Bollywood Hungama.
|
english
|
*Why work for Freebirds*?
1. We are in our 3rd year of top 1% of industry performance.
2. For the second year in a row, we were awarded the #1 consumer choice for craveable food by National Restaurant News.
3. We are growing and creating tremendous job opportunities.
4. We believe in creating exceptional culture, continued product innovation, training enhancements, and exceptional Texas hospitality.
5. Our success is built on the strength of our Tribe- our employees- and our passion for people and food.
We are committed to providing our Tribe with the tools and resources needed to advance their careers. Each position is designed to help you gain the knowledge and experience needed to develop your professional skill set with us. Shift Leaders are the first step towards the Freebirds management team. It is expected that Shift Leaders will work up to an Assistant General Manager. Freebirds develop and promote internally when possible. Grow with Freebirds!
* Scheduling flexibility to cover where sales are growing (lunch, dinner, weekends)
COVID-19 considerations:
Freebirds' top priority is the health and safety of our Tribe, guests and candidates. We have taken steps to ensure safety; we practice social distancing, wear provided gloves & masks, and sanitize high touch points.
* Leadership: 1 year (Preferred)
* Restaurant: 1 year (Preferred)
* Driver's License (Preferred)
Work Location:
Work Remotely:
|
english
|
Shooter Shakil Ahmed brought another silver medal for Bangladesh by placing second in the Men’s 50m pistol event at the 21st Commonwealth Games at Belmont Shooting Centre in Gold Coast, Australia on Wednesday.
Shakil scored 220. 5 overall, coming in second to Australia’s Daniel Repacholi, who scored a Commonwealth Games record with a score of 227. 2.
India’s Om Mitharval (201. 1) was third.
Ahmed’s medal ensured Bangladesh of their largest medal haul since Auckland 1990 when the country, whose eight Commonwealth Games medals have all come in shooting, clinched a gold and bronze.
|
english
|
Daniil Medvedev ended Novak Djokovic's hopes of a Calendar Slam and celebrated with an iconic FIFA celebration after winning the US Open.
The Russian star not only stopped the Serbian from achieving his first Calendar Slam but also his 21st Grand Slam, by winning the match 6-4 6-4 6-4.
Following his win, Medvedev celebrated in the most bizarre yet hilarious fashion that tennis fans have ever witnessed. He celebrated his win by doing the iconic 'Dead Fish' celebration from FIFA, leaving the audience baffled.
Video games have gained a lot more mainstream adoption and have bridged the difference between players and their fans in recent years. Several professional players have been spotted using celebrations from their favorite video games, including Fortnite and FIFA.
FIFA, over the years, has added scores of celebrations to the title, which are more or less replications of original ones carried out by players on the field.
Daniil Medvedev chose the 'Dead Fish' celebration after taking revenge for his Australian Open defeat.
During the post-match interview, the emphatic Russian was asked the reason behind his overwhelming celebration. He responded by stating that he pulled off an ‘L2+Left’ move, which refers to the set of controls needed to pull off the move.
He concluded by saying:
The Russian was on fire against his Serbian opponent and was en route to his first Grand Slam. After winning an enthralling three-set battle, Medvedev lay on the ground for a while, before getting up to congratulate his opponent at the USTA Billie Jean King National Tennis Center.
Daniil Medvedev is one of the finest tennis players on the scene right now. Having come close to a Grand Slam on several occasions, winning the US Open against the World Number 1 would've definitely made up for all his previous setbacks.
It's safe to assume that the Russian will be back with more iconic FIFA celebrations in the future.
|
english
|
from .browser import *
from .graphql import *
|
python
|
import { Store } from '@ngrx/store';
import { Injectable, Injector, NgZone } from '@angular/core';
// import '@progress/kendo-ui';
// import '../../node_modules/@progress/kendo-ui/js/cultures/kendo.culture.vi-VN.js';
import { Session } from '@core/models';
import { Router } from '@angular/router';
import { AppStates } from '@store/reducers';
import * as $ from 'jquery';
@Injectable()
export class StartupService {
private session: Session;
private get router(): Router {
return this.injector.get(Router);
}
public tabKey: string;
public isShowRedirectToManagerPopup = false;
constructor(
private store: Store<AppStates>,
private injector: Injector,
private ngZone: NgZone
) { }
/**
* Handler on app initital
*/
public async init(): Promise<void> {
}
}
|
typescript
|
People born between September 24 and October 23 fall under the Libra zodiac sign. This zodiac sign is also known as Tula Rashi. Here’s the weekly horoscope for Libra by Astro-Tarot expert Dimple V Mehra.
Keeping money in hands of a woman will bring financial growth. You are about to end something and the benefit of which is well deserved by the woman in your life who has stood as a strong pillar in times of your trial.
In matters of family, expect unbiased, great love and support from your partner. You will spend time on spiritual work or on spirituality this week.
Avoid pretending to study or researching something and do some serious studies. Travel with someone and that will be beneficial for you.
Good prospects are likely to be received from relationship portals or through brokers. Love tip for this week is- an outing to temple with your dear one will bring joys to your relationship.
Astro-Tarot Reader, Dimple V Mehra will be LIVE on Zoom TV’s YouTube channel every Friday at 3:30 PM to answer your queries. You can either send your queries to teatimeastro@gmail. com or you could also participate in the YouTube LIVE. To get your relevant answers, you will have to share your name, date of birth, place of birth and time of birth. However, if you don’t have these details, you can share only your name and Dimple will give you a Tarot Reading. You can share your details and your query on the mail ID mentioned above or in the comments section during the LIVE.
Thanks For Reading!
|
english
|
version https://git-lfs.github.com/spec/v1
oid sha256:74aec909b27c39bab3402df8c68e8ce2f830aabb711388c1cb00c86a6e47e738
size 20809
|
json
|
<filename>types/index.d.ts
import { Ref, MouseEvent, Component, CSSProperties, ReactNode, ElementType } from 'react';
export interface ScrollEvent {
external: boolean;
}
export interface ScrollContainerProps {
vertical?: boolean;
horizontal?: boolean;
hideScrollbars?: boolean;
activationDistance?: number;
children?: ReactNode;
onStartScroll?: (event: ScrollEvent) => void;
onScroll?: (event: ScrollEvent) => void;
onEndScroll?: (event: ScrollEvent) => void;
onClick?: (event: MouseEvent) => void;
className?: string;
draggingClassName?: string;
style?: CSSProperties;
ignoreElements?: string;
nativeMobileScroll?: boolean;
ref?: ReactNode;
component?: ElementType;
innerRef?: Ref<HTMLElement>;
stopPropagation?: boolean;
buttons?: number[];
}
export default class ScrollContainer extends Component<ScrollContainerProps> {
getElement: () => HTMLElement;
}
|
typescript
|
<reponame>piotr-kukla-real/notes-app
import styled from 'styled-components';
export const AlertContainer = styled.div`
display: flex;
align-items: center;
border-radius: 4px;
padding: 5px;
gap: 8px;
max-width: 350px;
box-shadow: var(--notify-shadow);
@media (max-width: 480px) {
max-width: none;
width: 100%;
}
`;
export const AlertMsg = styled.span`
min-width: 1px;
`;
export const AlertIconWrapper = styled.div`
width: 25px;
height: 25px;
svg {
height: 100%;
width: 100%;
}
`;
|
typescript
|
The Standing Committee meeting of the CPN UML will be held today too. The meeting is scheduled to be held at the prime minister’s residence in Baluwatar at 4 pm.
Senior leaders of the party will be briefed during the meeting about the talks being held by the second rung leaders to maintain the unity of the party. Similarly, discussions will also be held on the budget for fiscal year 2078/79 that was announced recently and the by-election to the National Assembly of Lumbini Province that concluded on May 31.
The Standing Committee meeting was also held on Tuesday where it was decided not to take any action against the 12 lawmakers from whom the party had sought clarifications. The meeting decided not to take any action against them so as to be able to maintain the party unity till the last moment.
Spokesperson of the party, Pradeep Gyawali, had mentioned that the meeting decided to try all that is possible till the last moment to maintain the unity of the party. Hence, the Standing Committee decided not to take any action against the 12 lawmakers, he added.
|
english
|
{
"common": {
"login": "Ingresar",
"signOut": "Salir",
"lightMode": "Modo Claro",
"darkMode": "Modo Oscuro"
},
"routes": {
"/>title": "WAX Boilerplate",
"/>sidebar": "Inicio",
"/>heading": "Inicio",
"/about>title": "Acerca de | WAX Boilerplate",
"/about>sidebar": "Acerca de",
"/about>heading": "Acerca de",
"/help>title": "Ayuda | WAX Boilerplate",
"/help>sidebar": "Ayuda",
"/help>heading": "Ayuda",
"docs": "Documentación",
"community": "Comunidad",
"changelog": "Registro de cambios",
"github": "Repositorio de Github",
"telegram": "Grupo en Telegram"
},
"homeRoute": {
"welcomeMessage": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ac viverra nunc, vitae rhoncus metus. Donec placerat ipsum nec ligula lacinia ornare. Cras et felis sit amet libero fermentum faucibus ut id justo. Maecenas vel nibh sed nibh faucibus rutrum. Pellentesque vel nibh molestie, eleifend magna in, eleifend nibh. Praesent elementum libero non ligula viverra feugiat. Morbi blandit massa nec posuere pellentesque. Quisque ac imperdiet tellus. Donec sed lorem sit amet nisl posuere dignissim at a sapien. In tristique et sapien et hendrerit. Nam aliquet quis turpis eu porttitor. Aenean odio augue, lacinia id ipsum at, dignissim sagittis libero. Pellentesque ex justo, tempus et rhoncus vitae, mattis vel justo. Suspendisse pellentesque nisi porttitor est posuere consectetur. Proin ornare orci eleifend, vestibulum massa et, bibendum nulla. Integer rutrum id quam et rhoncus. Nullam pretium pharetra magna in mattis. Nulla et sapien sit amet nibh dictum consectetur a quis dui. Morbi ac vestibulum eros. Ut commodo, dolor in sollicitudin euismod, libero lacus bibendum justo, non lobortis magna tellus vehicula turpis. Maecenas dignissim eget tellus eu molestie. Morbi pellentesque viverra ornare. Vivamus id feugiat nisi. Proin lobortis rhoncus finibus. Proin eu tellus dolor. Suspendisse ac tincidunt neque. In tincidunt ullamcorper lorem. Nulla facilisi."
},
"aboutRoute": {
"title": "Este proyecto",
"subtitle1": "Ques es?",
"paragraph1": "<!-- >",
"subtitle2": "Por que es importante?",
"paragraph2": "<!-- >",
"subtitle3": "De donde vienen los datos?",
"paragraph3": "<!-- >"
},
"helpRoute": {
"title": "Gracias por usar nuestro producto!",
"paragraph": "Este proyecto aún está en proceso. No dude en dejar sugerencias de actualización, registrar errores o usar el código usted mismo. También puede encontrarnos en Telegram o visitar nuestro sitio web.",
"githubEOSCR": "GitHub EOS Costa Rica",
"telegramChannel": "Grupo de Telegram",
"websiteEOSCR": "Página web EOS Costa Rica"
}
}
|
json
|
36. The table clearly shows the paucity of irrigation facilities in Orissa. Only 13-8 per cent. of the cultivated area in the State gets irrigation water in some form or other at certain times of the year. In the district of Cuttack 17 per cent, of the cultivated area gets watersupply from the canals and in the district of Ganjam it is substantially higher, i.e., 35 per cent, It is on account of this that 1/4th of the land in Ganjam and 1/5th in Cuttack are utilised for raising more than one crop in the year. The district of Ganjam has further facilities of irrigation from bunds und tanks and the area irrigated from such sources constitute about 16 per cent. of the total cultivated lands. This district stands out distinctively in a position different from all others in respect of irrigation, since more than half of the cultivated area enjoys some facility of irriga. tion in this district. No other district in the State comes anywhere near this district in respect of irrigation facilities.
37. It must be observed from the table that bunds and tanks provide irrigation to 7-7 per cent. of the cultivated lands which is considerably larger than the area irrigated by canals. Such irrigation obtains largely in some of the inland areas, particularly in the districts of Sambalpur, Phulbani, Kalahandi and Bolangir. It is difficult to say to what extent these types of irrigation are efficient sources of water-supply. Some of them are perhaps too slender to provide sufficient irrigat on. Many of these sources may be considered as casual in character, exceedingly inadequate to meet irrigation requirements. In various parts of India, well irrigation is a common and effective method. This device is almost non-existent in Orissa. The other sources are of various miscellaneous character and their contribution to irrigation is hardly significant. It will thus be seen that besides the canal systems in Cuttack and Ganjam, the only other source of water-supply to agricultural lands is from bunds and tanks which, whatever their efficiency may be, form the major source in most of the districts of the State.
: 8. Inadequacy of irrigation in Orissa is evident. But what is more important to note is that the progress in this respect till the First Five Year Plan was unsatisfactory. The Census of 1951 compiled the areas under irrigation showing the changes from 1921 to 1951. There was some increase in the irrigated area during the three decades so far as the inland division of the State is concerned. The report sounded a word of caution about the statistics concerning the inland division, on account of the fact that in most parts of the ex-State areas, now forming the inland division, no reliable statistics were maintained. The net gain in
respect of the irrigated area during the last 30 years as shown in the statistical estimates may not be a realistic picture. It would be reason. able to assume that possibly there was no increase in the irrigated area in this region. So far as the coastal districts are concerned, the Census report shows a decrease of 13%,000 acres of cultivated areas between 1921 and 1951. Although ome new minor irrigation works were constructed in the last decade, abandonment of major irrigation sources like High Level Cinal Range II and Dudhei Canal has resulted in the reduction of the net irrigated area. Some parts of the canal irrigation system, as has been pointed out earlier, has ceased to function. On account of this, there has been considerable decrease in irrigation during the last three decades in the coastal division of the State. * Progressive increase in population would naturally lead to extension of cultivated area and intensive cultivation. In this context, the contraction of irrigation facilities during the last three decades shows a disappointing picture. It has already been shown that the area under cultivation decreased during this period. Diminution in the irrigation facilities indicates decrease in efficient utilisation of the land. The need for quick development of the agrarian economy of the State, in the direction of effective utilisation of land, is therefore imperative.
39. In the fitness of things, the Five Year Plans have laid great emphasis on the extension of irrigation. The Hirakud Dam Project is calculated to have a culturable commanded area of 542,000 acres in the districts of Sambalpur and Bolangir. With the execution of the Delta Irrigation Project, the commanded arcas of the existing canals in the district of Cuttack will increase from 4,06,000 to 5,41,000 acres and the new canal system in Cuttack and Puri districts will have a culturable com. manded area of 5,63,000 acres. These are Major Irrigation Projects in the State. Water sources in the rivers of Orissa are extensive and after the completion of the Hirakud and Delta Projects in the Mahanadi system, other rivers are expected to be harnessed, in succession, to meet the demand for irrigation. Minor irrigation works have also a valuable part to play in various parts of the State and under the Five Year Plans, they are calculated to make effective contribution to irrigation.
40. Effective utilisation of land depends also on the size of the farmunit. If the unit is exceedingly small, labour and capital applied to land will remain underutilised and in most cases capital will not come forward *Census of India, 1951-Vol. XI-Pages 254-55.
for investment in land. It has been shown earlier that most of the farms in Orissa are uneconomic in character. The average size of the unit of cultivation is only 5.4 ucres while it is as high as 40 acres in Denmark, 25 acres in Sweden, 62 acres in Englan 1 and 145 acres in U.S.A. Increase in the pressure of population and lack of alternative gainful occupations has been progressively reducing the size of agricultural holdings in Orissa. This is a serious obstacle to proper utilisation of the landed resources in the State. And what is worse, this small holding is fragmented at different places making cultivation still more ineffective Progressive subdivision of holdings makes the farm of the peasant gradually smiller. Fragmentation of this small holding into small plots scatterod here and there makes the evil worse. It in fact a bane on our agricultural
economy. The laws of inheritance and tenancy and the general poverty of the cultivating classes have been the main causes of this fragmentation. of land. While this is true in most parts of India, in Orissa the problem is unfortunately very acute.
41. Table VI-8 gives a clear picture of the extent of fragmentation in the State. Three indices are given in this table, nauǝly: (1) plots per family, (2) piots per acre, and (3) average size of the plot.
|
english
|
AEW has announced nine matches for the upcoming episode of Dark: Elevation and the headliner of the evening will see Sammy Guevara team up with his best friend Fuego Del Sol for the first time.
Del Sol recently received a full-time contract and will be looking to pick up only his second ever AEW win when he teams up with Sammy to take on Luther and Serpentico of Chaos Project.
Brian Cage will compete in a singles match against Anthony Bowens of The Acclaimed. Bowens does not fall into the category of wrestlers that Brian Cage regularly squashes on Dark, and the tag team wrestler could pose a tricky challenge to the former FTW Champion.
How much offense will Anthony Bowens be able to deliver during the match? Fans should be prepared for a few twists!
Dante Martin's rise in AEW has been genuinely phenomenal to watch as he is now one of the first names to get booked every week on Elevation and Dark. The Top Flight member's goal would be to continue the recent hot run of form when he takes on Adam Grace.
Matt Hardy will be in Jora Johl's corner for the Indian wrestler's contest against Kal Herro. Daniel Garcia could be in for an easy payday as he is slated for a match against AEW debutant Tylor Sullivan.
Elsewhere on the card, Emi Sakura is set to take on Ashley D'Amboise, while another scheduled singles match will have Thunder Rosa and Laynie Luck battle it out in the ring. Hikaru Shida will also be in action against Heather Reckless, and the former AEW Women's Champion is the favorite to extend her winning streak.
AEW has also booked a massive women's tag team match to complement the ongoing feud between Diamante and Big Swole.
The Hispanic star will form a first-time alliance with Nyla Rose for a high-profile showdown against the duo of Big Swole and Julia Hart.
You can check out Episode #26 of AEW Dark: Elevation on the company's YouTube channel on Monday at 7 pm ET.
|
english
|
New Delhi: Kriti Sanon has been rising the ladder higher and higher with every step of the way, ever since the outsider made her stellar debut 8 years ago in Heropanti. And now, with her extremely skilled and mature performance in her recent film, Mimi, she cemented herself in the top league and has rightly won well-deserved accolades and applauds from one and all as she recently bagged her second ‘Best Actress in a Leading Role’ title of the year for the film.
In a recent award function, Kriti thanked her family and creators of the film for all their support, and an inspiring message for all dreamers like her out there talking about her journey from the Best Debut to now bagging the Best Actress title on her merit and talent.
The actress truly gave it her all for the film where she put on 15 kilos to play her part to the T and her dedication has paid off extremely well.
On the work front, she already has a dream lineup with a variety of massive projects like the Pan-India mythological drama, ‘Adipurush’, the horror comedy, ‘Bhediya’, the mass entertainer, ‘Shehzada’ and an out-and-out action flick, ‘Ganapath’.
|
english
|
New Delhi: Employees' provident fund (EPF) is also a government-backed scheme and is a compulsory deduction for salaried employees. Legally, any employee who has a monthly salary of up to Rs 15,000 is eligible. But most Indian companies offer it to all employees as part of their salary package. If you have a higher salary, you can opt out of it at the beginning of your career, if your employer so permits. If you opt for EPF, you cannot opt out of it during the time of your employment at that workplace.
PF withdrawal rules:
The amount in PF account can be withdrawn either completely or partially subject to certain terms and conditions. To withdraw the said amount completely, the individual needs to be either retired or unemployed for a period of more than two months. In these conditions onlu, the amount can be withdrawn completely pending an attestation from a gazetted office.
According to EPFO, individuals are eligible to withdraw provident fund balance in case of marriages of children, their higher education, repayment of home loans, emergent medical conditions, renovation of home, purchase or construction of a house, purchase of land and at a certain age before retirement.
Provident Fund (PF) partial withdrawal rules:
- Unemployment: According to the latest EPF rules, a person is allowed to withdraw up to 75 per cent of the total EPF balance on being unemployed for one month after quitting a job. The remaining 25 per cent of the EPF balance can be withdrawn if the person remains unemployed for over two months.
- Retirement: After attaining the age of 54 years and within one year of retirement/superannuation (whichever is earlier), a person is eligible to withdraw up to 90 per cent of the provident fund balance.
- Marriage/education of children: In case of monetary requirement for the purpose of marriages or post matriculation education of children, you can withdraw up to 50 per cent of the employee share with interest-only after completion of 7 years.
- Handicapped: In case of handicapped people, the EPFO body allows partial withdrawal from the EPF balance for purchasing equipment for minimising hardship on account of handicap. Under this, a person can withdraw six month’s basic wages and dearness allowance (DA) or employee share with interest or cost of equipment, whichever is the least.
- Illness: A person can apply for partial withdrawal from the EPF balance for the treatment of illness in certain cases. For self-usage or for the treatment of family members, EPFO allows a person to withdraw 6 month’s basic wages and DA or employee share with interest, whichever is the least.
- Loan repayment: For the repayment of home loan EMIs, an individual is eligible to withdraw 36 month’s basic wages and DA or total of employee and employer share with interest or total outstanding principal and interest, whichever is least, only after completing the 10-year membership period.
- Purchase of land/house: A person is allowed for premature partial withdrawal from the EPF account for purchasing land or house only after completion of five years as a member of EPFO. For the purpose of purchase of house/flat/construction of house including acquisition of site, an individual is allowed to withdraw the total of employee and employer share with interest or total cost or 24 month’s basic wages and DA (for purchase of site)/36 month’s basic wages and DA (for purchase of house/flat/construction), whichever is lower.
- House renovation: Interestingly, EPFO also has a provision of partial premature withdrawal for addition/alteration/improvement in the house owned by member/spouse/jointly with a spouse. Under this, a person can withdraw 12 month’s basic wages and DA or employee share with interest or cost, whichever is the least. This facility can be availed two times, first time, after five years of completion of the house and, for the second time, after 10 years from withdrawing the balance for the first time.
|
english
|
{"ast":null,"code":"var _jsxFileName = \"/Users/nhicung/Documents/GitHub/CungDesign/src/App.js\";\nimport React, { Component } from 'react';\nimport '../node_modules/bootstrap/dist/css/bootstrap.min.css';\nimport NavigationBar from './components/NavigationBar';\nimport Footer from './components/Footer';\nimport 'bootstrap/dist/css/bootstrap.min.css';\nimport './App.css'; // import ThemePic from './Images/hanoi.jpg';\n\nclass App extends Component {\n constructor() {\n super();\n this.state = {\n name: 'React'\n };\n }\n\n render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"App\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 7\n }\n }, /*#__PURE__*/React.createElement(NavigationBar, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 9\n }\n }), /*#__PURE__*/React.createElement(Footer, {\n switchPage: props.switchPage,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 9\n }\n }));\n }\n\n}\n\nexport default App;","map":{"version":3,"sources":["/Users/nhicung/Documents/GitHub/CungDesign/src/App.js"],"names":["React","Component","NavigationBar","Footer","App","constructor","state","name","render","props","switchPage"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAO,sDAAP;AACA,OAAQC,aAAR,MAA4B,4BAA5B;AACA,OAAQC,MAAR,MAAqB,qBAArB;AACA,OAAO,sCAAP;AACA,OAAO,WAAP,C,CACA;;AAGA,MAAMC,GAAN,SAAkBH,SAAlB,CAA4B;AAC1BI,EAAAA,WAAW,GAAG;AACZ;AACA,SAAKC,KAAL,GAAa;AACXC,MAAAA,IAAI,EAAE;AADK,KAAb;AAGD;;AAEDC,EAAAA,MAAM,GAAG;AACP,wBACE;AAAK,MAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBACE,oBAAC,aAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MADF,eAEE,oBAAC,MAAD;AAAQ,MAAA,UAAU,EAAEC,KAAK,CAACC,UAA1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAFF,CADF;AAMD;;AAfyB;;AAiB5B,eAAeN,GAAf","sourcesContent":["import React, { Component } from 'react';\nimport '../node_modules/bootstrap/dist/css/bootstrap.min.css';\nimport NavigationBar from './components/NavigationBar';\nimport Footer from './components/Footer'\nimport 'bootstrap/dist/css/bootstrap.min.css';\nimport './App.css';\n// import ThemePic from './Images/hanoi.jpg';\n\n\nclass App extends Component {\n constructor() {\n super();\n this.state = {\n name: 'React'\n };\n }\n\n render() {\n return ( \n <div className=\"App\">\n <NavigationBar />\n <Footer switchPage={props.switchPage}></Footer>\n </div>\n );\n }\n}\nexport default App;\n\n"]},"metadata":{},"sourceType":"module"}
|
json
|
Pokhara, May 25: With the issuance of COVID-19 Crisis Management Ordinance-2078 BS, administration has requested civilians to follow it in Kaski as well.
The district administration office has said that if the provision in the ordinance is not followed, imprisonment of up to one year or fine of up to Rs 500,000 or both can be imposed.
Assistant Chief District Officer Srinath Poudel issued a notice on Tuesday evening warning of various offenses and punishments as provided in the ordinance.
Pursuant to Section 19 (1) of the COVID-19 Crisis Management Ordinance, 2078 BS, any person obstructing any work as per the ordinance shall be punished with imprisonment for one year or fine up to Rs. 500,000 or both.
Similarly, in the case of Corona epidemic, if a person enters a public place without wearing a mask, the security personnel are allowed to slap fine of Rs 100 each time.
Similarly, fine of Rs 2000 can be slapped on 2 wheelers and Rs 5,000 on 4 wheelers for violating lockdown.
|
english
|
New Delhi: Union Home Minister Amit Shah on Wednesday congratulated Prime Minister Narendra Modi for receiving the ‘Global Goalkeeper Award’, saying it is a recognition of new India’s resolve for cleanliness under his leadership.
“The Global Goalkeeper Award conferred by the Gates Foundation to PM Modi is a recognition of new India’s resolve for cleanliness under his leadership.I congratulate PM Modi for his relentless efforts in the field of sanitation and to make Swachhta a Sanskar in India,” Shah tweeted.
Modi was on Tuesday conferred the Global Goalkeeper Award by the Bill and Melinda Gates Foundation for the Swachh Bharat mission. The Prime Minister said that the honour bestowed on him was for the millions of Indians who participated in the mission.
Modi also said that receiving the award on Mahatma Gandhi’s 150th anniversary is especially significant for him, for it shows the people’s power — of the determination of 1.3 billion people to achieve any goal.
|
english
|
P. V. Sindhu, who will spearhead India's campaign in the upcoming Sudirman Cup in Australia, is confident of the team putting on a good show.
The badminton star spoke on the sidelines of a function by Cricket Club of India (CCI) to hand over honorary lifetime membership, joining a list of nation’s sporting luminaries given the honour in the past. She was accompanied by father Ramana Rao, a former national team volleyball player. "I had always wanted to win a Super Series event. Winning the China Open and the Indian Open gives me a lot of confidence,” said the shuttler, answering a question on her personal highs after the Rio 2016 silver.
She added: “She (Tzu-ying) is winning a lot of matches and doing well for herself, but when it comes to me playing against her I feel it's going to be a good match.” The Sudirman Cup (Gold Coast, Australia) from May 21 is Sindhu’s next big assignment. “We are playing Indonesia and Denmark, so I hope we can win. It is a mixed team event so girls and boys have to perform. When it comes to one singles and doubles only one player is required so that shouldn't be any issue,” she said, asked about the effect of Saina Nehwal’s withdrawal for personal reason.
|
english
|
Activists for an independent Balochistan want consistent backing from the Indian government rather than for New Delhi to approach it through the lens of Kashmir or as a means of countering Pakistani efforts in the Valley. Baloch Canadians held an event in Toronto to mark what they claim to be the 70th anniversary of the illegal occupation of the province by Pakistan.
Activists for an independent Balochistan want consistent backing from the Indian government rather than for New Delhi to approach it through the lens of Kashmir or as a means of countering Pakistani efforts in the Valley.
Baloch Canadians held an event in Toronto to mark what they claim to be the 70th anniversary of the illegal occupation of the province by Pakistan. Several speakers asserted that on March 27, 1948, Pakistan forcibly seized what should have been an independent nation.
The activists welcome the Narendra Modi government’s efforts in recent years to raise the profile of the Balochistan issue, including raising the matter at the United Nations Human Rights Council in Geneva. However, there is a concern that the support arises as and when India wants to retaliate to Pakistan’s gambits in Jammu and Kashmir.
Karima Baloch, chairperson of the Baloch Students Organization Azad, said: “We want India to raise the issue as a human rights cause. ” She felt this an “important role” India could play since otherwise atrocities against the local populace was not on the world’s radar.
Zaffar Baloch, president of the Baloch National Movement – North America, said that given the strategic alliance that China has with Pakistan, particularly in the context of the development of the China-Pakistan Economic Corridor and Gwadar port in Balochistan, India had an “important responsibility” towards Balochistan in its own interests.
“The Baloch people cannot fight both China and the Pakistan Army,” he said. In a speech, he accused Islamabad of “selling” Balochistan “off to China as a colony” and demanded an end to CPEC projects there and a “halt to Chinese control of Gwadar port and withdrawal of all the Chinese personnel from the area”.
Karima Baloch said that India had the reach to raise the matter of what she described as “genocide” of the Baloch people. “They (India) can put it before any international platform,” she said. Zaffar Baloch agreed and said this was also India’s responsibility as a “regional power”.
The event, titled Balochistan under Occupation, also witnessed the attendance of activists from other movements, including those from Kurdistan, Pakistan Occupied Kashmir and Sindh and speaks suggested greater coordination between the various groups to help amplify their voices in Western nations such as Canada.
“India understands the importance of the issue because it is close to us. We have experienced the rise of the Daesh (as the Islamic State is called in the region) and if that situation worsens, it could affect everyone,” Karima Baloch said.
While the consensus among Baloch activists at the meet was that the Modi government has raised the profile of their cause, it cannot be used as a card to be dealt against Islamabad and instead of sporadic support from New Delhi, it has to be a far more concentrated effort for it to be meaningful in the long term.
|
english
|
from datetime import time
from vnpy.app.cta_strategy import (
CtaTemplate,
StopOrder,
TickData,
BarData,
TradeData,
OrderData,
BarGenerator,
ArrayManager
)
from vnpy.app.cta_strategy.base import (
EngineType,
STOPORDER_PREFIX,
StopOrder,
StopOrderStatus,
)
from vnpy.app.cta_strategy.TSMtools import TSMArrayManager
import numpy as np
class TSMyoBiasAccuStrategy(CtaTemplate):
""""""
author = "TheSuperMyo"
# 日内交易
exit_time = time(hour=14, minute=57)
# 针对不同交易时间的市场
open_time_night = time(hour=21,minute=0)# 商品夜盘
open_time_day_1 = time(hour=9,minute=0)# 商品
open_time_day_2 = time(hour=9,minute=30)# 股指
close_time_day = time(hour=15,minute=0)# 商品/股指(除了利率期货)
close_time_night_1 = time(hour=23,minute=0)# 其他夜盘商品
close_time_night_2 = time(hour=1,minute=0)# 工业金属
close_time_night_3 = time(hour=2,minute=30)# 黄金/白银/原油
break_time_start_1 = time(hour=10,minute=15)# 商品茶歇
break_time_start_2 = time(hour=11,minute=30)# 全体午休
break_time_end_1 = time(hour=10,minute=30)# 商品茶歇
break_time_end_2 = time(hour=13,minute=0)# 股指下午
break_time_end_3 = time(hour=13,minute=30)# 商品下午
ma_len = 14 # 计算偏离的均线长度
accu_len = 8 # 偏离积累窗口
accu_std_fliter = 2 # 偏离std倍数
trailing_stop = 0.5 # 跟踪止损
fixed_size = 1 # 固定手数
bar_counter = 0 # 每日分钟计数器
signal = 0 # 开仓信号
stop_long = 0
stop_short = 0
hold_high = 0
hold_low = 0
parameters = ['ma_len','accu_len','accu_std_fliter','trailing_stop','fixed_size']
variables = ['bar_counter','signal','stop_long','stop_short']
def __init__(self, cta_engine, strategy_name, vt_symbol, setting):
""""""
super(TSMyoBiasAccuStrategy, self).__init__(
cta_engine, strategy_name, vt_symbol, setting
)
self.bg = BarGenerator(self.on_bar)
self.am = TSMArrayManager()
# 策略自身订单管理
self.active_orderids = []
self.bars = []
def on_init(self):
"""
Callback when strategy is inited.
"""
self.write_log("策略初始化")
# 不会用到昨日数据
self.load_bar(5)
def on_start(self):
"""
Callback when strategy is started.
"""
self.write_log("策略启动")
def on_stop(self):
"""
Callback when strategy is stopped.
"""
self.write_log("策略停止")
def tick_filter(self, tick: TickData):
"""
过滤异常时间的tick
"""
tick_time = tick.datetime.time()
if tick_time < self.open_time_day_2:
return False
if tick_time > self.break_time_start_2 and tick_time < self.break_time_end_2:
return False
if tick_time > self.close_time_day:
return False
return True
def on_tick(self, tick: TickData):
"""
Callback of new tick data update.
"""
if not self.tick_filter(tick):
return
self.bg.update_tick(tick)
def on_bar(self, bar: BarData):
"""
1.分钟计数
2.挂撤单
"""
self.bar_counter += 1
self.cancel_all()
am = self.am
am.update_bar(bar)
if not am.inited:
return
self.bars.append(bar)
if len(self.bars) <= 2:
return
else:
self.bars.pop(0)
last_bar = self.bars[-2]
if ( last_bar.datetime.date() != bar.datetime.date() ):
self.bar_counter = 1
# 保证偏离积累量信号只反应当天的情况
if self.bar_counter < max(self.accu_len,self.ma_len):
return
self.signal = am.bias_SMA_Accumulated_signal(self.ma_len, self.accu_len, self.accu_std_fliter, False)
if self.pos == 0:
if self.signal == 1:
# 入场开多
if self.active_orderids:
self.write_log("撤单不干净,无法挂单")
return
orderids = self.buy(bar.close_price, self.fixed_size, False, True)
self.active_orderids.extend(orderids)
if self.signal == -1:
# 入场开空
if self.active_orderids:
self.write_log("撤单不干净,无法挂单")
return
orderids = self.short(bar.close_price, self.fixed_size, False, True)
self.active_orderids.extend(orderids)
if self.pos > 0:
self.hold_high = max(self.hold_high,bar.high_price)
self.stop_long = self.hold_high*(1-self.trailing_stop/100)
if bar.datetime.time() > self.exit_time or self.signal == -1:
# 日内平仓
if self.active_orderids:
self.write_log("撤单不干净,无法挂单")
return
orderids = self.sell(bar.close_price, self.fixed_size, False, True)
self.active_orderids.extend(orderids)
else:
# 停止单平多
if self.active_orderids:
self.write_log("撤单不干净,无法挂单")
return
orderids = self.sell(self.stop_long, self.fixed_size, True, True)
self.active_orderids.extend(orderids)
if self.pos < 0:
self.hold_low = min(self.hold_low,bar.low_price)
self.stop_short = self.hold_low*(1+self.trailing_stop/100)
if bar.datetime.time() > self.exit_time or self.signal == 1:
# 日内平仓
if self.active_orderids:
self.write_log("撤单不干净,无法挂单")
return
orderids = self.cover(bar.close_price, self.fixed_size, False, True)
self.active_orderids.extend(orderids)
else:
# 停止单平空
if self.active_orderids:
self.write_log("撤单不干净,无法挂单")
return
orderids = self.cover(self.stop_short, self.fixed_size, True, True)
self.active_orderids.extend(orderids)
def on_order(self, order: OrderData):
"""
Callback of new order data update.
"""
# 移除已成交或已撤销的订单
if not order.is_active() and order.vt_orderid in self.active_orderids:
self.active_orderids.remove(order.vt_orderid)
def on_trade(self, trade: TradeData):
"""
Callback of new trade data update.
"""
# 邮寄提醒
self.send_email(f"{trade.vt_symbol}在{trade.time}成交,价格{trade.price},方向{trade.direction}{trade.offset},数量{trade.volume}")
if self.pos == 0:
self.stop_long = 0
self.stop_short = 0
if self.pos > 0:
self.hold_high = trade.price
if self.pos < 0:
self.hold_low = trade.price
self.put_event()
def on_stop_order(self, stop_order: StopOrder):
"""
Callback of stop order update.
"""
# 刚刚生成的本地停止单
if stop_order.status == StopOrderStatus.WAITING:
return
# 撤销的本地停止单,从活跃列表移除
if stop_order.status == StopOrderStatus.CANCELLED:
if stop_order.stop_orderid in self.active_orderids:
self.active_orderids.remove(stop_order.stop_orderid)
# 触发的本地停止单,停止单移除,限价单加入
if stop_order.status == StopOrderStatus.TRIGGERED:
if stop_order.stop_orderid in self.active_orderids:
self.active_orderids.remove(stop_order.stop_orderid)
self.active_orderids.extend(stop_order.vt_orderids)
# 撤掉其他停止单
for other_orderids in self.active_orderids:
if other_orderids.startswith(STOPORDER_PREFIX):
self.cancel_order(other_orderids)
|
python
|
export * from './principaldesk.service';
|
typescript
|
The Aqua T2 is being touted as India's lowest-priced KitKat smartphone. The smartphone is available exclusively via Flipkart.
Intex has launched an Android based smartphone called the Aqua T2. Also touted as India's lowest-priced KitKat smartphone, the Aqua 2 is priced at Rs. 2699.
The Aqua T2 has a 3.5-inch HVGA IPS display. The smartphone is powered by a 1.3GHz dual-core processor along with 256MB of RAM. It sports 2MP rear camera featuring Panorama, HDR and Continuous shot modes. It also has a VGA front facing camera. The smartphone has 512MB of ROM.
For connectivity, the Aqua T2 supports dual-SIM, 2G, Bluetooth and Wi-Fi. It is powered by a 1200 mAh battery. The smartphone is available in two colours – black & grey, and is up for grabs exclusively via Flipkart.
Intex recently launched an ultra low-cost 3G Android smartphone – Aqua 4X, featuring a 4-inch display, 2MP primary camera and VGA secondary camera and dual-core processor.
|
english
|
Senior Ophthalmologist Sanduk Ruit has been felicitated. At a program organized by the Dallu Residence Local Committee, the international award recipient Dr. Ruit was honored with a letter of appreciation.
Japan’s Kobayashi Foundation has presented the ‘sixth Kobayashi Foundation Award-2020’ to senior oncologist Dr Sudip Shrestha in recognition of his contribution to the comprehensive cancer treatment in Nepal.
|
english
|
Morocco : The oldest fossil remains of Homo sapiens, dating back to 300,000 years, have been found at a site in Jebel Irhoud, Morocco. This is 100,000 years older than previously discovered fossils of Homo sapiens that have been securely dated. The discovery was presented in a study in the journal Nature on Wednesday.
This marks the first discovery of such fossils in north Africa, and widens the “cradle of mankind” to encompass all of Africa, the researchers said. Previous finds were in south or east Africa. The fossils, including a partial skull and a lower jaw, belong to five different individuals including three young adults, an adolescent and a child estimated to be 8 years old. Stone tools, animal bones and evidence of fire were also found within the same layer at the site.
|
english
|
ADDIS ABABA, March 10 — All 157 people on board the Ethiopian Airlines (ET) flight that crashed earlier Sunday are confirmed dead, Ethiopian state television reported.
All 149 passengers and eight crew members aboard ET 302, bound for Nairobi, Kenya, are confirmed killed, the Ethiopian Broadcasting Corporation (EBC) said.
The Boeing 737-800 MAX took off at 08:38 a.m. local time from Addis Ababa Bole International Airport and lost contact at 08:44 a.m., the airline said in a statement.
Ethiopian Airlines has released telephone numbers for family or friends of those who may have been on the flight to call.
In a statement, the Ethiopian Prime Minister’s Office has expressed “deepest condolences to the families of those that have lost their loved ones” on the flight.
The plane crashed near Bishoftu city, about 45 km southeast of the Ethiopian capital, Addis Ababa, the ET said in a statement.
“Ethiopian Airlines staff will be sent to the accident scene and will do everything possible to assist the emergency services,” the statement added.
|
english
|
{"slip.js":"<KEY>,"slip.min.js":"<KEY>}
|
json
|
What Is The Difference Between Brain And Mind?
It seems like there's a lot of confusion surrounding the difference between brain and mind. Do you have any ideas about what the difference actually is? Let’s find out!
We have all made this particular mistake at least once in our lives: using the words 'brain' and 'mind' interchangeably. It is easy to make this mistake because both may appear to be the same thing.
They are not!
There are actually quite a lot of differences between the brain and the mind. So, how exactly are the brain and the mind different? We will learn in this article.
But, before we get into the differences, let’s first understand what the brain and the mind are.
Also Read | What Is The Difference Between Reflex Action And Walking?
What is the Brain?
The brain is the organ located inside our skull that regulates all physical functions of the human body. It is a vital part of our central nervous system (CNS) that serves as the hub for gathering, organizing, and disseminating information throughout the body. Most of our body's organs are under its control.
The brain is the most intricate organ in the body and has about 86 billion active neurons, which interact with each other to create circuits and exchange information.
Our brain is divided into three major parts. They are: the cerebellum, cerebrum, and brain stem.
Also Read | What Is The Difference Between Plants And Trees?
What is the Mind?
The mind is a concept that has been debated and explored by scholars, scientists, and theologians for centuries. The agreed-upon definition of the mind is that it is the complex network of thought processes and consciousness that arises from the neurological activity of the brain. We can divide our mind into three layers: conscious, unconscious, and subconscious.
The conscious layer consists of our immediate thoughts, feelings, and memories, while the unconscious layer is composed of basic and primordial impulses, and the subconscious layer contains the memories and behaviours that we have acquired over time.
The exploration of the mind has been an ongoing process and has yielded many insights into how our mental processes influence our behaviour.
Also Read | What Is The Difference Between Reversible and Irreversible Reaction?
Brain vs. Mind: What are the differences?
At its simplest, mind refers to our ability to think, feel, and engage in physical activity. The brain, on the other hand, refers to the physical organ in our head that supports these functions. Here are three key differences between the two:
- The brain is composed of neurons and blood vessels; on the other hand, the mind is abstract and is not made up of any neurons or blood vessels.
- While the brain controls a person's movements, emotions, and various bodily functions; the mind alludes to a person's morality, reasoning, and understanding.
- The brain is a physical organ; it can be touched or seen; however, the mind is intangible; it can neither be touched nor seen.
There are many debates about the differences between the brain and the mind. However, one thing is for sure: mind skills can be trained, while brain function cannot be changed. Mind skills such as decision-making, problem-solving, creativity, and communication can all be trained over time to increase the effectiveness of a person's mental processes.
Also Read | What Is The Difference Between Heart Attack And Cardiac Arrest?
To sum up, the brain and mind are two very distinct concepts; the brain is a physical organ, while the mind is an intangible concept. While both are essential to a person's functioning, the brain is responsible for physical functions, while the mind is responsible for abstract thought and emotion and is not bound by the same physical laws as the brain.
You May Also Like | What Is The Difference Between Resume And CV?
|
english
|
<gh_stars>0
from allauth.socialaccount.models import SocialAccount
import requests
from allauth.socialaccount.models import SocialToken
def get_mutual_friends(user_id):
GRAPH_API_VERSION = getattr(
settings, 'SOCIALACCOUNT_PROVIDERS', {}
).get('facebook', {}).get('VERSION', 'v2.4')
GRAPH_API_URL = 'https://graph.facebook.com/' + GRAPH_API_VERSION
# return GRAPH_API_URL + '/%s/picture?type=square&height=600&width=600&return_ssl_resources=1' % user_id
return GRAPH_API_URL + '/{}?fields=context.fields%28mutual_friends%29'.format(user_id)
try:
social_account = SocialAccount.objects.get(user=request.user)
except SocialAccount.DoesNotExist:
social_account = None
if social_account:
print social_account.uid
token = SocialToken.objects.filter(account__user=request.user, account__provider='facebook')
real_token = str(token[0])
# 1143743712344887
string_for_query = get_mutual_friends('1179863822034803')
my_request = requests.get(
string_for_query,
params={
'access_token': real_token
}
)
print my_request.content
from django.conf import settings
|
python
|
<gh_stars>0
description = "Snippet: Öffnungszeiten"
[viewBag]
snippetCode = "jumplink-snippet-opening-hours"
snippetName = "Öffnungszeiten"
snippetProperties[title][title] = "Titel"
snippetProperties[title][type] = "string"
snippetProperties[title][default] = "Öffnungszeiten Kreativ-Werkstatt"
snippetProperties[title][options][] = ""
snippetProperties[subtext][title] = "Untertext"
snippetProperties[subtext][type] = "string"
snippetProperties[subtext][default] = "le heures d‘ouverture"
snippetProperties[subtext][options][] = ""
snippetProperties[monday][title] = "Montag Zeiten"
snippetProperties[monday][type] = "string"
snippetProperties[monday][default] = "geschlossen"
snippetProperties[monday][options][] = ""
snippetProperties[mondaySubtext][title] = "Montag Untertext"
snippetProperties[mondaySubtext][type] = "string"
snippetProperties[mondaySubtext][default] = "fermé"
snippetProperties[mondaySubtext][options][] = ""
snippetProperties[mondayActive][title] = "Montag aktiv"
snippetProperties[mondayActive][type] = "checkbox"
snippetProperties[mondayActive][default] = 1
snippetProperties[mondayActive][options][] = ""
snippetProperties[tuesday][title] = "Dienstag Zeiten"
snippetProperties[tuesday][type] = "string"
snippetProperties[tuesday][default] = "10.00 – 15.00 Uhr"
snippetProperties[tuesday][options][] = ""
snippetProperties[tuesdaySubtext][title] = "Dienstag Untertext"
snippetProperties[tuesdaySubtext][type] = "string"
snippetProperties[tuesdaySubtext][default] = ""
snippetProperties[tuesdaySubtext][options][] = ""
snippetProperties[tuesdayActive][title] = "Dienstag aktiv"
snippetProperties[tuesdayActive][type] = "checkbox"
snippetProperties[tuesdayActive][default] = 1
snippetProperties[tuesdayActive][options][] = ""
snippetProperties[wednesday][title] = "Mittwoch Zeiten"
snippetProperties[wednesday][type] = "string"
snippetProperties[wednesday][default] = "10.00 – 15.00 Uhr"
snippetProperties[wednesday][options][] = ""
snippetProperties[wednesdaySubtext][title] = "Mittwoch Untertext"
snippetProperties[wednesdaySubtext][type] = "string"
snippetProperties[wednesdaySubtext][default] = ""
snippetProperties[wednesdaySubtext][options][] = ""
snippetProperties[wednesdayActive][title] = "Mittwoch aktiv"
snippetProperties[wednesdayActive][type] = "checkbox"
snippetProperties[wednesdayActive][default] = 1
snippetProperties[wednesdayActive][options][] = ""
snippetProperties[thursday][title] = "Donnerstag Zeiten"
snippetProperties[thursday][type] = "string"
snippetProperties[thursday][default] = "10.00 – 15.00 Uhr"
snippetProperties[thursday][options][] = ""
snippetProperties[thursdaySubtext][title] = "Donnerstag Untertext"
snippetProperties[thursdaySubtext][type] = "string"
snippetProperties[thursdaySubtext][default] = ""
snippetProperties[thursdaySubtext][options][] = ""
snippetProperties[thursdayActive][title] = "Donnerstag aktiv"
snippetProperties[thursdayActive][type] = "checkbox"
snippetProperties[thursdayActive][default] = 1
snippetProperties[thursdayActive][options][] = ""
snippetProperties[friday][title] = "Freitag Zeiten"
snippetProperties[friday][type] = "string"
snippetProperties[friday][default] = "09.00 – 16.00 Uhr"
snippetProperties[friday][options][] = ""
snippetProperties[fridaySubtext][title] = "Freitag Untertext"
snippetProperties[fridaySubtext][type] = "string"
snippetProperties[fridaySubtext][default] = ""
snippetProperties[fridaySubtext][options][] = ""
snippetProperties[fridayActive][title] = "Freitag aktiv"
snippetProperties[fridayActive][type] = "checkbox"
snippetProperties[fridayActive][default] = 1
snippetProperties[fridayActive][options][] = ""
snippetProperties[saturday][title] = "Samstag Zeiten"
snippetProperties[saturday][type] = "string"
snippetProperties[saturday][default] = "10.00 – 14.00 Uhr"
snippetProperties[saturday][options][] = ""
snippetProperties[saturdaySubtext][title] = "Samstag Untertext"
snippetProperties[saturdaySubtext][type] = "string"
snippetProperties[saturdaySubtext][default] = ""
snippetProperties[saturdaySubtext][options][] = ""
snippetProperties[saturdayActive][title] = "Samstag aktiv"
snippetProperties[saturdayActive][type] = "checkbox"
snippetProperties[saturdayActive][default] = 1
snippetProperties[saturdayActive][options][] = ""
snippetProperties[sunday][title] = "Sonntag Zeiten"
snippetProperties[sunday][type] = "string"
snippetProperties[sunday][default] = "10.00 – 14.00 Uhr (1. Sonntag im Monat)"
snippetProperties[sunday][options][] = ""
snippetProperties[sundaySubtext][title] = "Sonntag Untertext"
snippetProperties[sundaySubtext][type] = "string"
snippetProperties[sundaySubtext][default] = ""
snippetProperties[sundaySubtext][options][] = ""
snippetProperties[sundayActive][title] = "Sonntag aktiv"
snippetProperties[sundayActive][type] = "checkbox"
snippetProperties[sundayActive][default] = 1
snippetProperties[sundayActive][options][] = ""
snippetProperties[note][title] = "Hinweis"
snippetProperties[note][type] = "string"
snippetProperties[note][default] = ""
snippetProperties[note][options][] = ""
==
<div class="row">
<div class="col-xs-12 mx-auto">
<p class="h4 text-left">
{{title}}
<br>
<span class="text-success font-weight-normal font-italic">{{subtext}}</span>
</p>
<dl class="row">
{% if mondayActive %}
<dt class="col-sm-3 my-0">
Montag <span class="text-success font-weight-normal font-italic">lundi</span>
</dt>
<dd class="col-sm-9 my-0">
{{monday}} <span class="text-success font-weight-normal font-italic">{{mondaySubtext}}</span>
</dd>
{% endif %}
{% if tuesdayActive %}
<dt class="col-sm-3 my-0">
Dienstag <span class="text-success font-weight-normal font-italic">mardi</span>
</dt>
<dd class="col-sm-9 my-0">
{{tuesday}} <span class="text-success font-weight-normal font-italic">{{tuesdaySubtext}}</span>
</dd>
{% endif %}
{% if wednesdayActive %}
<dt class="col-sm-3 my-0">
Mittwoch <span class="text-success font-weight-normal font-italic">mercredi</span>
</dd>
<dd class="col-sm-9 my-0">
{{wednesday}} <span class="text-success font-weight-normal font-italic">{{wednesdaySubtext}}</span>
</dd>
{% endif %}
{% if thursdayActive %}
<dt class="col-sm-3 my-0">
Donnerstag <span class="text-success font-weight-normal font-italic">jeudi</span>
</dd>
<dd class="col-sm-9 my-0">
{{thursday}} <span class="text-success font-weight-normal font-italic">{{thursdaySubtext}}</span>
</dd>
{% endif %}
{% if fridayActive %}
<dt class="col-sm-3 my-0">
Freitag <span class="text-success font-weight-normal font-italic">vendredi</span>
</dd>
<dd class="col-sm-9 my-0">
{{friday}} <span class="text-success font-weight-normal font-italic">{{fridaySubtext}}</span>
</dd>
{% endif %}
{% if saturdayActive %}
<dt class="col-sm-3 my-0">
Samstag* <span class="text-success font-weight-normal font-italic">samedi</span>
</dd>
<dd class="col-sm-9 my-0">
{{saturday}} <span class="text-success font-weight-normal font-italic">{{saturdaySubtext}}</span>
</dd>
{% endif %}
{% if sundayActive %}
<dt class="col-sm-3 my-0">
Sonntag* <span class="text-success font-weight-normal font-italic">dimanche</span>
</dd>
<dd class="col-sm-9 my-0">
{{sunday}} <span class="text-success font-weight-normal font-italic">{{sundaySubtext}}</span>
</dd>
{% endif %}
</dl>
<p>
{{note}}
</p>
</div>
</div>
|
html
|
<gh_stars>0
/* This is a generated css file, don't edit by hand */
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Cross-browser implementation of the "display: inline-block" CSS property.
* See http://www.w3.org/TR/CSS21/visuren.html#propdef-display for details.
* Tested on IE 6 & 7, FF 1.5 & 2.0, Safari 2 & 3, Webkit, and Opera 9.
*
* @author <EMAIL> (<NAME>)
*/
/*
* Default rule; only Safari, Webkit, and Opera handle it without hacks.
*/
.goog-inline-block {
position: relative;
display: -moz-inline-box; /* Ignored by FF3 and later. */
display: inline-block;
}
/*
* Pre-IE7 IE hack. On IE, "display: inline-block" only gives the element
* layout, but doesn't give it inline behavior. Subsequently setting display
* to inline does the trick.
*/
* html .goog-inline-block {
display: inline;
}
/*
* IE7-only hack. On IE, "display: inline-block" only gives the element
* layout, but doesn't give it inline behavior. Subsequently setting display
* to inline does the trick.
*/
*:first-child+html .goog-inline-block {
display: inline;
}
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Styling for buttons rendered by goog.ui.ButtonRenderer.
*
* @author <EMAIL> (<NAME>)
*/
.goog-button {
color: #036;
border-color: #036;
background-color: #69c;
}
/* State: disabled. */
.goog-button-disabled {
border-color: #333;
color: #333;
background-color: #999;
}
/* State: hover. */
.goog-button-hover {
color: #369;
border-color: #369;
background-color: #9cf;
}
/* State: active. */
.goog-button-active {
color: #69c;
border-color: #69c;
}
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Standard styling for goog.ui.Dialog.
*
* @author <EMAIL> (<NAME>)
* @author <EMAIL> (<NAME>)
*/
.modal-dialog {
background: #c1d9ff;
border: 1px solid #3a5774;
color: #000;
padding: 4px;
position: absolute;
}
.modal-dialog a,
.modal-dialog a:link,
.modal-dialog a:visited {
color: #06c;
cursor: pointer;
}
.modal-dialog-bg {
background: #666;
left: 0;
position: absolute;
top: 0;
}
.modal-dialog-title {
background: #e0edfe;
color: #000;
cursor: pointer;
font-size: 120%;
font-weight: bold;
/* Add padding on the right to ensure the close button has room. */
padding: 8px 31px 8px 8px;
position: relative;
_zoom: 1; /* Ensures proper width in IE6 RTL. */
}
.modal-dialog-title-close {
/* Client apps may override the URL at which they serve the sprite. */
background: #e0edfe url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -528px 0;
cursor: default;
height: 15px;
position: absolute;
right: 10px;
top: 8px;
width: 15px;
vertical-align: middle;
}
.modal-dialog-buttons,
.modal-dialog-content {
background-color: #fff;
padding: 8px;
}
.goog-buttonset-default {
font-weight: bold;
}
/*
* Copyright 2010 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Styling for link buttons created by goog.ui.LinkButtonRenderer.
*
* @author <EMAIL> (<NAME>)
*/
.goog-link-button {
position: relative;
color: #00f;
text-decoration: underline;
cursor: pointer;
}
/* State: disabled. */
.goog-link-button-disabled {
color: #888;
text-decoration: none;
cursor: default;
}
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Standard styling for menus created by goog.ui.MenuRenderer.
*
* @author <EMAIL> (<NAME>)
*/
.goog-menu {
background: #fff;
border-color: #ccc #666 #666 #ccc;
border-style: solid;
border-width: 1px;
cursor: default;
font: normal 13px Arial, sans-serif;
margin: 0;
outline: none;
padding: 4px 0;
position: absolute;
z-index: 20000; /* Arbitrary, but some apps depend on it... */
}
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Standard styling for menus created by goog.ui.MenuItemRenderer.
*
* @author <EMAIL> (<NAME>)
*/
/**
* State: resting.
*
* NOTE(mleibman,chrishenry):
* The RTL support in Closure is provided via two mechanisms -- "rtl" CSS
* classes and BiDi flipping done by the CSS compiler. Closure supports RTL
* with or without the use of the CSS compiler. In order for them not
* to conflict with each other, the "rtl" CSS classes need to have the @noflip
* annotation. The non-rtl counterparts should ideally have them as well, but,
* since .goog-menuitem existed without .goog-menuitem-rtl for so long before
* being added, there is a risk of people having templates where they are not
* rendering the .goog-menuitem-rtl class when in RTL and instead rely solely
* on the BiDi flipping by the CSS compiler. That's why we're not adding the
* @noflip to .goog-menuitem.
*/
.goog-menuitem {
color: #000;
font: normal 13px Arial, sans-serif;
list-style: none;
margin: 0;
/* 28px on the left for icon or checkbox; 7em on the right for shortcut. */
padding: 4px 7em 4px 28px;
white-space: nowrap;
}
/* BiDi override for the resting state. */
/* @noflip */
.goog-menuitem.goog-menuitem-rtl {
/* Flip left/right padding for BiDi. */
padding-left: 7em;
padding-right: 28px;
}
/* If a menu doesn't have checkable items or items with icons, remove padding. */
.goog-menu-nocheckbox .goog-menuitem,
.goog-menu-noicon .goog-menuitem {
padding-left: 12px;
}
/*
* If a menu doesn't have items with shortcuts, leave just enough room for
* submenu arrows, if they are rendered.
*/
.goog-menu-noaccel .goog-menuitem {
padding-right: 20px;
}
.goog-menuitem-content {
color: #000;
font: normal 13px Arial, sans-serif;
}
/* State: disabled. */
.goog-menuitem-disabled .goog-menuitem-accel,
.goog-menuitem-disabled .goog-menuitem-content {
color: #ccc !important;
}
.goog-menuitem-disabled .goog-menuitem-icon {
opacity: 0.3;
-moz-opacity: 0.3;
filter: alpha(opacity=30);
}
/* State: hover. */
.goog-menuitem-highlight,
.goog-menuitem-hover {
background-color: #d6e9f8;
/* Use an explicit top and bottom border so that the selection is visible
* in high contrast mode. */
border-color: #d6e9f8;
border-style: dotted;
border-width: 1px 0;
padding-bottom: 3px;
padding-top: 3px;
}
/* State: selected/checked. */
.goog-menuitem-checkbox,
.goog-menuitem-icon {
background-repeat: no-repeat;
height: 16px;
left: 6px;
position: absolute;
right: auto;
vertical-align: middle;
width: 16px;
}
/* BiDi override for the selected/checked state. */
/* @noflip */
.goog-menuitem-rtl .goog-menuitem-checkbox,
.goog-menuitem-rtl .goog-menuitem-icon {
/* Flip left/right positioning. */
left: auto;
right: 6px;
}
.goog-option-selected .goog-menuitem-checkbox,
.goog-option-selected .goog-menuitem-icon {
/* Client apps may override the URL at which they serve the sprite. */
background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;
}
/* Keyboard shortcut ("accelerator") style. */
.goog-menuitem-accel {
color: #999;
/* Keyboard shortcuts are untranslated; always left-to-right. */
/* @noflip */ direction: ltr;
left: auto;
padding: 0 6px;
position: absolute;
right: 0;
text-align: right;
}
/* BiDi override for shortcut style. */
/* @noflip */
.goog-menuitem-rtl .goog-menuitem-accel {
/* Flip left/right positioning and text alignment. */
left: 0;
right: auto;
text-align: left;
}
/* Mnemonic styles. */
.goog-menuitem-mnemonic-hint {
text-decoration: underline;
}
.goog-menuitem-mnemonic-separator {
color: #999;
font-size: 12px;
padding-left: 4px;
}
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Standard styling for menus created by goog.ui.MenuSeparatorRenderer.
*
* @author <EMAIL> (<NAME>)
*/
.goog-menuseparator {
border-top: 1px solid #ccc;
margin: 4px 0;
padding: 0;
}
/*
* Copyright 2008 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/* Author: <EMAIL> (<NAME>) */
/* Author: <EMAIL> (<NAME>) */
/*
* Styles used by goog.ui.TabRenderer.
*/
.goog-tab {
position: relative;
padding: 4px 8px;
color: #00c;
text-decoration: underline;
cursor: default;
}
.goog-tab-bar-top .goog-tab {
margin: 1px 4px 0 0;
border-bottom: 0;
float: left;
}
.goog-tab-bar-top:after,
.goog-tab-bar-bottom:after {
content: " ";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.goog-tab-bar-bottom .goog-tab {
margin: 0 4px 1px 0;
border-top: 0;
float: left;
}
.goog-tab-bar-start .goog-tab {
margin: 0 0 4px 1px;
border-right: 0;
}
.goog-tab-bar-end .goog-tab {
margin: 0 1px 4px 0;
border-left: 0;
}
/* State: Hover */
.goog-tab-hover {
background: #eee;
}
/* State: Disabled */
.goog-tab-disabled {
color: #666;
}
/* State: Selected */
.goog-tab-selected {
color: #000;
background: #fff;
text-decoration: none;
font-weight: bold;
border: 1px solid #6b90da;
}
.goog-tab-bar-top {
padding-top: 5px !important;
padding-left: 5px !important;
border-bottom: 1px solid #6b90da !important;
}
/*
* Shift selected tabs 1px towards the contents (and compensate via margin and
* padding) to visually merge the borders of the tab with the borders of the
* content area.
*/
.goog-tab-bar-top .goog-tab-selected {
top: 1px;
margin-top: 0;
padding-bottom: 5px;
}
.goog-tab-bar-bottom .goog-tab-selected {
top: -1px;
margin-bottom: 0;
padding-top: 5px;
}
.goog-tab-bar-start .goog-tab-selected {
left: 1px;
margin-left: 0;
padding-right: 9px;
}
.goog-tab-bar-end .goog-tab-selected {
left: -1px;
margin-right: 0;
padding-left: 9px;
}
/*
* Copyright 2008 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/* Author: <EMAIL> (<NAME>) */
/* Author: <EMAIL> (<NAME>) */
/*
* Styles used by goog.ui.TabBarRenderer.
*/
.goog-tab-bar {
margin: 0;
border: 0;
padding: 0;
list-style: none;
cursor: default;
outline: none;
background: #ebeff9;
}
.goog-tab-bar-clear {
clear: both;
height: 0;
overflow: hidden;
}
.goog-tab-bar-start {
float: left;
}
.goog-tab-bar-end {
float: right;
}
/*
* IE6-only hacks to fix the gap between the floated tabs and the content.
* IE7 and later will ignore these.
*/
/* @if user.agent ie6 */
* html .goog-tab-bar-start {
margin-right: -3px;
}
* html .goog-tab-bar-end {
margin-left: -3px;
}
/* @endif */
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Standard styling for toolbars and toolbar items.
*
* @author <EMAIL> (<NAME>)
*/
/*
* Styles used by goog.ui.ToolbarRenderer.
*/
.goog-toolbar {
/* Client apps may override the URL at which they serve the image. */
background: #fafafa url(//ssl.gstatic.com/editor/toolbar-bg.png) repeat-x bottom left;
border-bottom: 1px solid #d5d5d5;
cursor: default;
font: normal 12px Arial, sans-serif;
margin: 0;
outline: none;
padding: 2px;
position: relative;
zoom: 1; /* The toolbar element must have layout on IE. */
}
/*
* Styles used by goog.ui.ToolbarButtonRenderer.
*/
.goog-toolbar-button {
margin: 0 2px;
border: 0;
padding: 0;
font-family: Arial, sans-serif;
color: #333;
text-decoration: none;
list-style: none;
vertical-align: middle;
cursor: default;
outline: none;
}
/* Pseudo-rounded corners. */
.goog-toolbar-button-outer-box,
.goog-toolbar-button-inner-box {
border: 0;
vertical-align: top;
}
.goog-toolbar-button-outer-box {
margin: 0;
padding: 1px 0;
}
.goog-toolbar-button-inner-box {
margin: 0 -1px;
padding: 3px 4px;
}
/* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */
* html .goog-toolbar-button-inner-box {
/* IE6 needs to have the box shifted to make the borders line up. */
left: -1px;
}
/* Pre-IE7 BiDi fixes. */
* html .goog-toolbar-button-rtl .goog-toolbar-button-outer-box {
/* @noflip */ left: -1px;
}
* html .goog-toolbar-button-rtl .goog-toolbar-button-inner-box {
/* @noflip */ right: auto;
}
/* IE7-only hack; ignored by all other browsers. */
*:first-child+html .goog-toolbar-button-inner-box {
/* IE7 needs to have the box shifted to make the borders line up. */
left: -1px;
}
/* IE7 BiDi fix. */
*:first-child+html .goog-toolbar-button-rtl .goog-toolbar-button-inner-box {
/* @noflip */ left: 1px;
/* @noflip */ right: auto;
}
/* Safari-only hacks. */
::root .goog-toolbar-button,
::root .goog-toolbar-button-outer-box {
/* Required to make pseudo-rounded corners work on Safari. */
line-height: 0;
}
::root .goog-toolbar-button-inner-box {
/* Required to make pseudo-rounded corners work on Safari. */
line-height: normal;
}
/* Disabled styles. */
.goog-toolbar-button-disabled {
opacity: 0.3;
-moz-opacity: 0.3;
filter: alpha(opacity=30);
}
.goog-toolbar-button-disabled .goog-toolbar-button-outer-box,
.goog-toolbar-button-disabled .goog-toolbar-button-inner-box {
/* Disabled text/border color trumps everything else. */
color: #333 !important;
border-color: #999 !important;
}
/* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */
* html .goog-toolbar-button-disabled {
/* IE can't apply alpha to an element with a transparent background... */
background-color: #f0f0f0;
margin: 0 1px;
padding: 0 1px;
}
/* IE7-only hack; ignored by all other browsers. */
*:first-child+html .goog-toolbar-button-disabled {
/* IE can't apply alpha to an element with a transparent background... */
background-color: #f0f0f0;
margin: 0 1px;
padding: 0 1px;
}
/* Only draw borders when in a non-default state. */
.goog-toolbar-button-hover .goog-toolbar-button-outer-box,
.goog-toolbar-button-active .goog-toolbar-button-outer-box,
.goog-toolbar-button-checked .goog-toolbar-button-outer-box,
.goog-toolbar-button-selected .goog-toolbar-button-outer-box {
border-width: 1px 0;
border-style: solid;
padding: 0;
}
.goog-toolbar-button-hover .goog-toolbar-button-inner-box,
.goog-toolbar-button-active .goog-toolbar-button-inner-box,
.goog-toolbar-button-checked .goog-toolbar-button-inner-box,
.goog-toolbar-button-selected .goog-toolbar-button-inner-box {
border-width: 0 1px;
border-style: solid;
padding: 3px;
}
/* Hover styles. */
.goog-toolbar-button-hover .goog-toolbar-button-outer-box,
.goog-toolbar-button-hover .goog-toolbar-button-inner-box {
/* Hover border style wins over active/checked/selected. */
border-color: #a1badf !important;
}
/* Active/checked/selected styles. */
.goog-toolbar-button-active,
.goog-toolbar-button-checked,
.goog-toolbar-button-selected {
/* Active/checked/selected background color always wins. */
background-color: #dde1eb !important;
}
.goog-toolbar-button-active .goog-toolbar-button-outer-box,
.goog-toolbar-button-active .goog-toolbar-button-inner-box,
.goog-toolbar-button-checked .goog-toolbar-button-outer-box,
.goog-toolbar-button-checked .goog-toolbar-button-inner-box,
.goog-toolbar-button-selected .goog-toolbar-button-outer-box,
.goog-toolbar-button-selected .goog-toolbar-button-inner-box {
border-color: #729bd1;
}
/* Pill (collapsed border) styles. */
.goog-toolbar-button-collapse-right,
.goog-toolbar-button-collapse-right .goog-toolbar-button-outer-box,
.goog-toolbar-button-collapse-right .goog-toolbar-button-inner-box {
margin-right: 0;
}
.goog-toolbar-button-collapse-left,
.goog-toolbar-button-collapse-left .goog-toolbar-button-outer-box,
.goog-toolbar-button-collapse-left .goog-toolbar-button-inner-box {
margin-left: 0;
}
/* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */
* html .goog-toolbar-button-collapse-left .goog-toolbar-button-inner-box {
left: 0;
}
/* IE7-only hack; ignored by all other browsers. */
*:first-child+html .goog-toolbar-button-collapse-left
.goog-toolbar-button-inner-box {
left: 0;
}
/*
* Styles used by goog.ui.ToolbarMenuButtonRenderer.
*/
.goog-toolbar-menu-button {
margin: 0 2px;
border: 0;
padding: 0;
font-family: Arial, sans-serif;
color: #333;
text-decoration: none;
list-style: none;
vertical-align: middle;
cursor: default;
outline: none;
}
/* Pseudo-rounded corners. */
.goog-toolbar-menu-button-outer-box,
.goog-toolbar-menu-button-inner-box {
border: 0;
vertical-align: top;
}
.goog-toolbar-menu-button-outer-box {
margin: 0;
padding: 1px 0;
}
.goog-toolbar-menu-button-inner-box {
margin: 0 -1px;
padding: 3px 4px;
}
/* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */
* html .goog-toolbar-menu-button-inner-box {
/* IE6 needs to have the box shifted to make the borders line up. */
left: -1px;
}
/* Pre-IE7 BiDi fixes. */
* html .goog-toolbar-menu-button-rtl .goog-toolbar-menu-button-outer-box {
/* @noflip */ left: -1px;
}
* html .goog-toolbar-menu-button-rtl .goog-toolbar-menu-button-inner-box {
/* @noflip */ right: auto;
}
/* IE7-only hack; ignored by all other browsers. */
*:first-child+html .goog-toolbar-menu-button-inner-box {
/* IE7 needs to have the box shifted to make the borders line up. */
left: -1px;
}
/* IE7 BiDi fix. */
*:first-child+html .goog-toolbar-menu-button-rtl
.goog-toolbar-menu-button-inner-box {
/* @noflip */ left: 1px;
/* @noflip */ right: auto;
}
/* Safari-only hacks. */
::root .goog-toolbar-menu-button,
::root .goog-toolbar-menu-button-outer-box,
::root .goog-toolbar-menu-button-inner-box {
/* Required to make pseudo-rounded corners work on Safari. */
line-height: 0;
}
::root .goog-toolbar-menu-button-caption,
::root .goog-toolbar-menu-button-dropdown {
/* Required to make pseudo-rounded corners work on Safari. */
line-height: normal;
}
/* Disabled styles. */
.goog-toolbar-menu-button-disabled {
opacity: 0.3;
-moz-opacity: 0.3;
filter: alpha(opacity=30);
}
.goog-toolbar-menu-button-disabled .goog-toolbar-menu-button-outer-box,
.goog-toolbar-menu-button-disabled .goog-toolbar-menu-button-inner-box {
/* Disabled text/border color trumps everything else. */
color: #333 !important;
border-color: #999 !important;
}
/* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */
* html .goog-toolbar-menu-button-disabled {
/* IE can't apply alpha to an element with a transparent background... */
background-color: #f0f0f0;
margin: 0 1px;
padding: 0 1px;
}
/* IE7-only hack; ignored by all other browsers. */
*:first-child+html .goog-toolbar-menu-button-disabled {
/* IE can't apply alpha to an element with a transparent background... */
background-color: #f0f0f0;
margin: 0 1px;
padding: 0 1px;
}
/* Only draw borders when in a non-default state. */
.goog-toolbar-menu-button-hover .goog-toolbar-menu-button-outer-box,
.goog-toolbar-menu-button-active .goog-toolbar-menu-button-outer-box,
.goog-toolbar-menu-button-open .goog-toolbar-menu-button-outer-box {
border-width: 1px 0;
border-style: solid;
padding: 0;
}
.goog-toolbar-menu-button-hover .goog-toolbar-menu-button-inner-box,
.goog-toolbar-menu-button-active .goog-toolbar-menu-button-inner-box,
.goog-toolbar-menu-button-open .goog-toolbar-menu-button-inner-box {
border-width: 0 1px;
border-style: solid;
padding: 3px;
}
/* Hover styles. */
.goog-toolbar-menu-button-hover .goog-toolbar-menu-button-outer-box,
.goog-toolbar-menu-button-hover .goog-toolbar-menu-button-inner-box {
/* Hover border color trumps active/open style. */
border-color: #a1badf !important;
}
/* Active/open styles. */
.goog-toolbar-menu-button-active,
.goog-toolbar-menu-button-open {
/* Active/open background color wins. */
background-color: #dde1eb !important;
}
.goog-toolbar-menu-button-active .goog-toolbar-menu-button-outer-box,
.goog-toolbar-menu-button-active .goog-toolbar-menu-button-inner-box,
.goog-toolbar-menu-button-open .goog-toolbar-menu-button-outer-box,
.goog-toolbar-menu-button-open .goog-toolbar-menu-button-inner-box {
border-color: #729bd1;
}
/* Menu button caption style. */
.goog-toolbar-menu-button-caption {
padding: 0 4px 0 0;
vertical-align: middle;
}
/* Dropdown style. */
.goog-toolbar-menu-button-dropdown {
width: 7px;
/* Client apps may override the URL at which they serve the sprite. */
background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -388px 0;
vertical-align: middle;
}
/*
* Styles used by goog.ui.ToolbarSeparatorRenderer.
*/
.goog-toolbar-separator {
margin: 0 2px;
border-left: 1px solid #d6d6d6;
border-right: 1px solid #f7f7f7;
padding: 0;
width: 0;
text-decoration: none;
list-style: none;
outline: none;
vertical-align: middle;
line-height: normal;
font-size: 120%;
overflow: hidden;
}
/*
* Additional styling for toolbar select controls, which always have borders.
*/
.goog-toolbar-select .goog-toolbar-menu-button-outer-box {
border-width: 1px 0;
border-style: solid;
padding: 0;
}
.goog-toolbar-select .goog-toolbar-menu-button-inner-box {
border-width: 0 1px;
border-style: solid;
padding: 3px;
}
.goog-toolbar-select .goog-toolbar-menu-button-outer-box,
.goog-toolbar-select .goog-toolbar-menu-button-inner-box {
border-color: #bfcbdf;
}
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Standard styling for buttons created by goog.ui.ColorMenuButtonRenderer.
*
* @author <EMAIL> (<NAME>)
*/
/* Color indicator. */
.goog-color-menu-button-indicator {
border-bottom: 4px solid #f0f0f0;
}
/* Thinner padding for color picker buttons, to leave room for the indicator. */
.goog-color-menu-button .goog-menu-button-inner-box,
.goog-toolbar-color-menu-button .goog-toolbar-menu-button-inner-box {
padding-top: 2px !important;
padding-bottom: 2px !important;
}
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Standard styling for palettes created by goog.ui.PaletteRenderer.
*
* @author <EMAIL> (<NAME>)
* @author <EMAIL> (<NAME>)
*/
.goog-palette {
cursor: default;
outline: none;
}
.goog-palette-table {
border: 1px solid #666;
border-collapse: collapse;
margin: 5px;
}
.goog-palette-cell {
border: 0;
border-right: 1px solid #666;
cursor: pointer;
height: 18px;
margin: 0;
text-align: center;
vertical-align: middle;
width: 18px;
}
/*
* Copyright 2009 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Standard styling for color palettes.
*
* @author <EMAIL> (<NAME>)
* @author <EMAIL> (<NAME>)
*/
.goog-palette-cell .goog-palette-colorswatch {
border: none;
font-size: x-small;
height: 18px;
position: relative;
width: 18px;
}
.goog-palette-cell-hover .goog-palette-colorswatch {
border: 1px solid #fff;
height: 16px;
width: 16px;
}
.goog-palette-cell-selected .goog-palette-colorswatch {
/* Client apps may override the URL at which they serve the sprite. */
background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -368px 0;
border: 1px solid #333;
color: #fff;
font-weight: bold;
height: 16px;
width: 16px;
}
.goog-palette-customcolor {
background-color: #fafafa;
border: 1px solid #eee;
color: #666;
font-size: x-small;
height: 15px;
position: relative;
width: 15px;
}
.goog-palette-cell-hover .goog-palette-customcolor {
background-color: #fee;
border: 1px solid #f66;
color: #f66;
}
/*
* Copyright 2005 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Bubble styles.
*
* @author <EMAIL>.com (<NAME>)
* @author <EMAIL> (<NAME>)
* @author <EMAIL> (<NAME>)
*/
div.tr_bubble {
position: absolute;
background-color: #e0ecff;
border: 1px solid #99c0ff;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
font-size: 83%;
font-family: Arial, Helvetica, sans-serif;
padding: 2px 19px 6px 6px;
white-space: nowrap;
}
.tr_bubble_link {
color: #00c;
text-decoration: underline;
cursor: pointer;
font-size: 100%;
}
.tr_bubble .tr_option-link,
.tr_bubble #tr_delete-image,
.tr_bubble #tr_module-options-link {
font-size: 83%;
}
.tr_bubble_closebox {
position: absolute;
cursor: default;
background: url(//ssl.gstatic.com/editor/bubble_closebox.gif) top left no-repeat;
padding: 0;
margin: 0;
width: 10px;
height: 10px;
top: 3px;
right: 5px;
}
div.tr_bubble_panel {
padding: 2px 0 1px;
}
div.tr_bubble_panel_title {
display: none;
}
div.tr_multi_bubble div.tr_bubble_panel_title {
margin-right: 1px;
display: block;
float: left;
width: 50px;
}
div.tr_multi_bubble div.tr_bubble_panel {
padding: 2px 0 1px;
margin-right: 50px;
}
/*
* Copyright 2007 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Styles for Editor dialogs and their sub-components.
*
* @author <EMAIL> (<NAME>)
*/
.tr-dialog {
width: 475px;
}
.tr-dialog .goog-tab-content {
margin: 0;
border: 1px solid #6b90da;
padding: 4px 8px;
background: #fff;
overflow: auto;
}
.tr-tabpane {
font-size: 10pt;
padding: 1.3ex 0;
}
.tr-tabpane-caption {
font-size: 10pt;
margin-bottom: 0.7ex;
background-color: #fffaf5;
line-height: 1.3em;
}
.tr-tabpane .goog-tab-content {
border: none;
padding: 5px 7px 1px;
}
.tr-tabpane .goog-tab {
background-color: #fff;
border: none;
width: 136px;
line-height: 1.3em;
margin-bottom: 0.7ex;
}
.tr-tabpane .goog-tab {
text-decoration: underline;
color: blue;
cursor: pointer;
}
.tr-tabpane .goog-tab-selected {
font-weight: bold;
text-decoration: none;
color: black;
}
.tr-tabpane .goog-tab input {
margin: -2px 5px 0 0;
}
/*
* Copyright 2007 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/**
* Styles for the Editor's Edit Link dialog.
*
* @author <EMAIL> (<NAME>)
*/
.tr-link-dialog-explanation-text {
font-size: 83%;
margin-top: 15px;
}
.tr-link-dialog-target-input {
width: 98%; /* 98% prevents scroll bars in standards mode. */
/* Input boxes for URLs and email address should always be LTR. */
direction: ltr;
}
.tr-link-dialog-email-warning {
text-align: center;
color: #c00;
font-weight: bold;
}
.tr_pseudo-link {
color: #00c;
text-decoration: underline;
cursor: pointer;
}
/*
* Copyright 2008 The Closure Library Authors. All Rights Reserved.
*
* Use of this source code is governed by the Apache License, Version 2.0.
* See the COPYING file for details.
*/
/*
* Editor toolbar styles.
*
* @author <EMAIL> (<NAME>)
*/
/* Common base style for all icons. */
.tr-icon {
width: 16px;
height: 16px;
background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat;
vertical-align: middle;
}
.goog-color-menu-button-indicator .tr-icon {
height: 14px;
}
/* Undo (redo when the chrome is right-to-left). */
.tr-undo,
.goog-toolbar-button-rtl .tr-redo {
background-position: 0;
}
/* Redo (undo when the chrome is right-to-left). */
.tr-redo,
.goog-toolbar-button-rtl .tr-undo {
background-position: -16px;
}
/* Font name. */
.tr-fontName .goog-toolbar-menu-button-caption {
color: #246;
width: 16ex;
height: 16px;
overflow: hidden;
}
/* Font size. */
.tr-fontSize .goog-toolbar-menu-button-caption {
color: #246;
width: 8ex;
height: 16px;
overflow: hidden;
}
/* Bold. */
.tr-bold {
background-position: -32px;
}
/* Italic. */
.tr-italic {
background-position: -48px;
}
/* Underline. */
.tr-underline {
background-position: -64px;
}
/* Foreground color. */
.tr-foreColor {
height: 14px;
background-position: -80px;
}
/* Background color. */
.tr-backColor {
height: 14px;
background-position: -96px;
}
/* Link. */
.tr-link {
font-weight: bold;
color: #009;
text-decoration: underline;
}
/* Insert image. */
.tr-image {
background-position: -112px;
}
/* Insert drawing. */
.tr-newDrawing {
background-position: -592px;
}
/* Insert special character. */
.tr-spChar {
font-weight: bold;
color: #900;
}
/* Increase indent. */
.tr-indent {
background-position: -128px;
}
/* Increase ident in right-to-left text mode, regardless of chrome direction. */
.tr-rtl-mode .tr-indent {
background-position: -400px;
}
/* Decrease indent. */
.tr-outdent {
background-position: -144px;
}
/* Decrease indent in right-to-left text mode, regardless of chrome direction. */
.tr-rtl-mode .tr-outdent {
background-position: -416px;
}
/* Bullet (unordered) list. */
.tr-insertUnorderedList {
background-position: -160px;
}
/* Bullet list in right-to-left text mode, regardless of chrome direction. */
.tr-rtl-mode .tr-insertUnorderedList {
background-position: -432px;
}
/* Number (ordered) list. */
.tr-insertOrderedList {
background-position: -176px;
}
/* Number list in right-to-left text mode, regardless of chrome direction. */
.tr-rtl-mode .tr-insertOrderedList {
background-position: -448px;
}
/* Text alignment buttons. */
.tr-justifyLeft {
background-position: -192px;
}
.tr-justifyCenter {
background-position: -208px;
}
.tr-justifyRight {
background-position: -224px;
}
.tr-justifyFull {
background-position: -480px;
}
/* Blockquote. */
.tr-BLOCKQUOTE {
background-position: -240px;
}
/* Blockquote in right-to-left text mode, regardless of chrome direction. */
.tr-rtl-mode .tr-BLOCKQUOTE {
background-position: -464px;
}
/* Remove formatting. */
.tr-removeFormat {
background-position: -256px;
}
/* Spellcheck. */
.tr-spell {
background-position: -272px;
}
/* Left-to-right text direction. */
.tr-ltr {
background-position: -288px;
}
/* Right-to-left text direction. */
.tr-rtl {
background-position: -304px;
}
/* Insert iGoogle module. */
.tr-insertModule {
background-position: -496px;
}
/* Strike through text */
.tr-strikeThrough {
background-position: -544px;
}
/* Subscript */
.tr-subscript {
background-position: -560px;
}
/* Superscript */
.tr-superscript {
background-position: -576px;
}
/* Insert drawing. */
.tr-equation {
background-position: -608px;
}
/* Edit HTML. */
.tr-editHtml {
color: #009;
}
/* "Format block" menu. */
.tr-formatBlock .goog-toolbar-menu-button-caption {
color: #246;
width: 12ex;
height: 16px;
overflow: hidden;
}
|
css
|
The plantation programme and On the spot painting competition were organised here today to celebrate World Forestry Day. At National Zoological park, trees of Maulshree, Bottle brush, Jamun Gurbera and Neem species were planted by the officials of the Ministry of Environment and Forest.
Addressing a gathering Dr. P. J Dileep Kumar, Director General, Forests appealed all, especially children, to consume less natural resources. He said more damage has been done to lives of rural and tribal people by mining and other activities. More use of water, exploitation of land and the cutting of trees for widening roads and other requirements have disturbed the balance of lives of wild animals and birds.He appealed to grow gardens as well as wild vegetations where ever possible.
Mr. R. H. Khwaja, Special Sectretary, said, “We celebrate special days like this and forget them conveniently. If we had looked after our forests consistently,vegetation, animals and birds would have been in a much better situation today.” Mr. Khwaja regretted the mindless use of natural resources and suggested to take into account the carrying capacity , management and accounting of natural resources while planning, developmental and economic activities. If we do not protect forests, global warming will disturb the environment, he added.
School children presented songs, play on the theme of protecting environment, planning trees and stop usage of plastic bags. On the Spot Painting competition was organised in the morning today. The subject of the painting competition was ‘Forests and Biodiversity’. First, second and third prizes were awarded to the winners in each category, that is age group of 5 -8 years, 9- 12 years and 13 -16 years of age.
|
english
|
<reponame>Civil-Service-Human-Resources/lpg-learner-record<filename>src/main/java/uk/gov/cslearning/record/api/EventRegistrationsController.java
package uk.gov.cslearning.record.api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import uk.gov.cslearning.record.repository.CourseRecordRepository;
import java.util.ArrayList;
import java.util.List;
import static com.google.common.base.Preconditions.checkArgument;
import static org.springframework.http.HttpStatus.OK;
@RestController
@RequestMapping("/registrations")
public class EventRegistrationsController {
private CourseRecordRepository courseRecordRepository;
@Autowired
public EventRegistrationsController(CourseRecordRepository courseRecordRepository) {
checkArgument(courseRecordRepository != null);
this.courseRecordRepository = courseRecordRepository;
}
@GetMapping("/count")
public ResponseEntity<List<Count>> activityRecord(@RequestParam("eventId") String[] eventIds) {
List<Count> counts = new ArrayList<>();
for (String eventId : eventIds) {
Integer count = courseRecordRepository.countRegisteredForEvent(eventId);
counts.add(new Count(eventId, count));
}
return new ResponseEntity<>(counts, OK);
}
public static final class Count {
private String eventId;
private int value;
public Count(String eventId, Integer value) {
this.eventId = eventId;
if (value != null) {
this.value = value;
}
}
public String getEventId() {
return eventId;
}
public int getValue() {
return value;
}
}
}
|
java
|
package Network
import (
"fmt"
"net/http"
)
type Route struct {
Name string
Methot string
Pattern string
HandlerFunc http.HandlerFunc
}
type Routes []Route
func Index(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Products Rest API: ")
}
var routes = Routes{
Route{"Index", "GET", "/", Index},
Route{"Register", "POST", "/v1/register", Register},
}
|
go
|
In recent times, WWE has witnessed a trend where the Stamford-based promotion has booked several of its champions to have long title reigns. SmackDown superstar Roman Reigns is one of the best examples of the same. However, it is important to note hs isn't the only one.
On RAW, Intercontinental Champion Gunther also has a long title reign. Having held the title for 478 days, the Austrian broke Honky Tonk Man's record of becoming the longest-reigning IC Champion last month. However, there is a possibility of his glorious title run in WWE coming to an end.
Next week, on RAW's season premiere, the leader of Imperium will defend his title against Bronson Reed. Given recent reports that WWE is looking to push the latter, it won't be a surprise to see The Aussie become the man to dethrone the strong and tough Gunther.
Also, considering WWE will host the Elimination Chamber in Australia next year, the Stamford-based promotion would want a dominant Aussie champion apart from Rhea Ripley. Hence, there is a chance Gunther could drop his title and move on to bigger rivalries.
Since making his debut in the Stamford-based promotion, Gunther has been a force to reckon with. While he has had a scintillating journey from Walter to Gunther, his performances on NXT and the main roster have always captivated the audiences' interest.
Recently, veteran manager Jim Cornette was asked whom he would like to manage between Gunther and FTR. Cornette answered by explaining how he naturally fit better with tag teams.
"I could say FTR because I naturally fit better with tag teams. I had more experience. It was a synergistic relationship and it would have been fun but at the same time, I kind of did well with monsters too. Whether it be Yokozuna or Vader or Big Bubba. And I like that kind of thing. Not saying Gunther is a monster like a Vader but a big single wrestler, physically dominating and intimidating that you know can make people scared of."
However, Cornette further added he could make more money with Gunther. The WWE veteran said:
With or without a manager, it seems Gunther is destined to dominate the competition. Once his title reign as Intercontinental Champion is over, fans will be keen on seeing his future in the Stamford-based promotion.
|
english
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class ItapDeviceInfo(object):
def __init__(self):
self._fw_version = None
self._hw_version = None
self._manufacturer = None
self._model = None
self._product_name = None
@property
def fw_version(self):
return self._fw_version
@fw_version.setter
def fw_version(self, value):
self._fw_version = value
@property
def hw_version(self):
return self._hw_version
@hw_version.setter
def hw_version(self, value):
self._hw_version = value
@property
def manufacturer(self):
return self._manufacturer
@manufacturer.setter
def manufacturer(self, value):
self._manufacturer = value
@property
def model(self):
return self._model
@model.setter
def model(self, value):
self._model = value
@property
def product_name(self):
return self._product_name
@product_name.setter
def product_name(self, value):
self._product_name = value
def to_alipay_dict(self):
params = dict()
if self.fw_version:
if hasattr(self.fw_version, 'to_alipay_dict'):
params['fw_version'] = self.fw_version.to_alipay_dict()
else:
params['fw_version'] = self.fw_version
if self.hw_version:
if hasattr(self.hw_version, 'to_alipay_dict'):
params['hw_version'] = self.hw_version.to_alipay_dict()
else:
params['hw_version'] = self.hw_version
if self.manufacturer:
if hasattr(self.manufacturer, 'to_alipay_dict'):
params['manufacturer'] = self.manufacturer.to_alipay_dict()
else:
params['manufacturer'] = self.manufacturer
if self.model:
if hasattr(self.model, 'to_alipay_dict'):
params['model'] = self.model.to_alipay_dict()
else:
params['model'] = self.model
if self.product_name:
if hasattr(self.product_name, 'to_alipay_dict'):
params['product_name'] = self.product_name.to_alipay_dict()
else:
params['product_name'] = self.product_name
return params
@staticmethod
def from_alipay_dict(d):
if not d:
return None
o = ItapDeviceInfo()
if 'fw_version' in d:
o.fw_version = d['fw_version']
if 'hw_version' in d:
o.hw_version = d['hw_version']
if 'manufacturer' in d:
o.manufacturer = d['manufacturer']
if 'model' in d:
o.model = d['model']
if 'product_name' in d:
o.product_name = d['product_name']
return o
|
python
|
Ximena Alvarez Maschio(II)
Ximena Alvarez Maschio is known for Thor: Love and Thunder (2022), The Trip (2021) and The Matrix Resurrections (2021).
Known for:
- Visual Effects(Framestore London)
- Visual Effects(Milk Visual Effects)
How much have you seen?
Keep track of how much of Ximena Alvarez Maschio’s work you have seen. Go to your list.
|
english
|
<reponame>paulo3011/sparkfy
{"artist_id":"AR6UYN31187B991C48","artist_latitude":41.54876,"artist_location":"Sabadell","artist_longitude":2.1076,"artist_name":"Falsalarma","duration":245.13261,"num_songs":1,"song_id":"SONIRLO12AB018DD74","title":"Estar Sin Star","year":2008}
|
json
|
<filename>prow/cmd/hook/main_test.go
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"testing"
"k8s.io/test-infra/prow/plugins"
)
// Make sure that our plugins are valid.
func TestPlugins(t *testing.T) {
pa := &plugins.ConfigAgent{}
if err := pa.Load("../../plugins.yaml"); err != nil {
t.Fatalf("Could not load plugins: %v.", err)
}
}
|
go
|
{
"parent": "enderthing:item/lock",
"textures": {
"layer4": "enderthing:item/lock_private"
}
}
|
json
|
Thiruvananthapuram: Kerala today asserted that construction of a new dam is the only solution to resolve the dispute over the contentious Mullaperiyar dam and said it will take up this demand with the Centre.
"The present agreement with Tamil Nadu is for 999 years. Can anyone say that the present century old dam will be safe till then. A new dam is a must either today or tomorrow. What we want is let that new dam be today," Chief Minister Oommen Chandy told reporters at a press conference after a cabinet meeting.
"Construction of a new Safety Dam is the only solution and the state will take up this matter with the Centre," he said.
The state's declared stand was "water for Tamil Nadu and Safety for Kerala" could be achieved through this process. The Centre only has to accord sanction for the new dam, he said.
Mr Chandy also said that the dispute in other inter-state water issues is either on the quantity of water to be shared by each state or water not released on time.
"But here Kerala has never put any hurdle in providing water to Tamil Nadu. Our argument is only on the safety aspect of people of the state," he added.
The Chief Minister also said Kerala would take both administrative and legal routes to find a solution to the Mullaperiyar issue.
The reservoir issue came to the limelight recently after water level at the reservoir, situated in Idukki district, reached the Supreme Court permitted level of 142 feet.
The rise in water level had caused fears of the safety of people living downstream on Kerala side and six spillway shutters were opened on the night of December 7 to release excess water.
Yesterday, Kerala had expressed strong protest and anxiety over Tamil Nadu's "indifferent" attitude and said the state would be taking legal options.
It had decided to file a petition in the Supreme Court complaining that reservoir supervisory committee had opened the dam shutters and released water to Periyar river on December 7 night without the mandatory 12 hours prior notice to Kerala.
Mr Chandy had also sought the intervention of Prime Minister Narendra Modi to resolve the decades long inter-state dam dispute, saying he would take up this issue during his Delhi visit on December 9 and 10.
Meanwhile, State Water Resources Minister PJ Joseph requested the Centre to accord sanction for the new dam proposal of the Kerala government.
|
english
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.