text
stringlengths 3
181k
| src
stringlengths 5
1.02k
|
---|---|
/*
* Copyright 2016 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _TASK_QUEUE_H_
#define _TASK_QUEUE_H_
#include <functional>
#include <future>
#include <mutex>
#include <queue>
struct task_queue {
private:
typedef std::function<void()> task_type;
template<typename T, typename Function, typename... Args>
struct execute_type {
static void execute(const std::shared_ptr<std::promise<T>> &promise,
Function &function, Args&... args) {
promise->set_value(function(args...));
}
};
template<typename Function, typename... Args>
struct execute_type<void, Function, Args...> {
static void execute(const std::shared_ptr<std::promise<void>> &promise,
Function &function, Args&... args) {
function(args...);
promise->set_value();
}
};
public:
template<typename Function, typename... Args>
auto operator() (Function function, Args... args) {
typedef decltype(function(std::forward<Args>(args)...)) result_type;
typedef std::promise<result_type> promise_type;
promise_type promise;
std::future<result_type> future(promise.get_future());
std::lock_guard<std::mutex> lock(tasks_mutex);
// TODO(gardell): queue should support move-only objects
// and not require a shared_ptr here.
tasks.push(std::bind(
&task_queue::execute_type<result_type, Function, Args...>::execute,
std::make_shared<promise_type>(std::move(promise)),
std::forward<Function>(function), std::forward<Args>(args)...));
return future;
}
void process_one() {
task_type task;
{
std::lock_guard<std::mutex> lock(tasks_mutex);
if (tasks.empty()) {
return;
}
task = std::move(tasks.front());
tasks.pop();
}
task();
}
void process_all() {
tasks_type tasks;
{
std::lock_guard<std::mutex> lock(tasks_mutex);
tasks = std::move(this->tasks);
}
while (!tasks.empty()) {
tasks.front()();
tasks.pop();
}
}
bool empty() const {
std::lock_guard<std::mutex> lock(tasks_mutex);
return tasks.empty();
}
private:
typedef std::queue<task_type> tasks_type;
tasks_type tasks;
mutable std::mutex tasks_mutex;
};
#endif // _TASK_QUEUE_H_
| google/cpp-frp-test/include/task_queue.h |
// -*- C++ -*-
// Copyright (C) 2005-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3, or (at your option) any later
// version.
// This library 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. See the GNU
// General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
// Permission to use, copy, modify, sell, and distribute this software
// is hereby granted without fee, provided that the above copyright
// notice appears in all copies, and that both that copyright notice
// and this permission notice appear in supporting documentation. None
// of the above authors, nor IBM Haifa Research Laboratories, make any
// representation about the suitability of this software for any
// purpose. It is provided "as is" without express or implied
// warranty.
/**
* @file bin_search_tree_/iterators_fn_imps.hpp
* Contains an implementation class for bin_search_tree_.
*/
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::iterator
PB_DS_CLASS_C_DEC::
begin()
{
return (iterator(m_p_head->m_p_left));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::const_iterator
PB_DS_CLASS_C_DEC::
begin() const
{
return (const_iterator(m_p_head->m_p_left));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::iterator
PB_DS_CLASS_C_DEC::
end()
{
return (iterator(m_p_head));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::const_iterator
PB_DS_CLASS_C_DEC::
end() const
{
return (const_iterator(m_p_head));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::const_reverse_iterator
PB_DS_CLASS_C_DEC::
rbegin() const
{
return (const_reverse_iterator(m_p_head->m_p_right));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::reverse_iterator
PB_DS_CLASS_C_DEC::
rbegin()
{
return (reverse_iterator(m_p_head->m_p_right));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::reverse_iterator
PB_DS_CLASS_C_DEC::
rend()
{
return (reverse_iterator(m_p_head));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::const_reverse_iterator
PB_DS_CLASS_C_DEC::
rend() const
{
return (const_reverse_iterator(m_p_head));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::node_const_iterator
PB_DS_CLASS_C_DEC::
node_begin() const
{
return (node_const_iterator(m_p_head->m_p_parent));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::node_iterator
PB_DS_CLASS_C_DEC::
node_begin()
{
return (node_iterator(m_p_head->m_p_parent));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::node_const_iterator
PB_DS_CLASS_C_DEC::
node_end() const
{
return (node_const_iterator(0));
}
PB_DS_CLASS_T_DEC
inline typename PB_DS_CLASS_C_DEC::node_iterator
PB_DS_CLASS_C_DEC::
node_end()
{
return (node_iterator(0));
}
| ruibarreira/linuxtrail-usr/include/c++/4.9/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp |
/*
Copyright © 2015-2022 Leo Antunes <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package golpa
// #cgo CFLAGS: -I/usr/include/lpsolve/
// #cgo LDFLAGS: -llpsolve55 -lm -ldl -lcolamd
// #include <lp_lib.h>
// #include <stdlib.h>
import "C"
/* Types */
type SolveResult struct {
model *Model
status SolveStatus
}
type SolveStatus C.int
const (
SolutionOptimal = SolveStatus(C.OPTIMAL)
SolutionSuboptimal = SolveStatus(C.SUBOPTIMAL)
)
type SolveError C.int
const (
ErrBranchCutBreak = SolveError(C.PROCBREAK) // should not be seen: we don't use set_break_at_first/set_break_at_value
ErrBranchCutFail = SolveError(C.PROCFAIL)
ErrFeasibleFound = SolveError(C.FEASFOUND)
ErrModelDegenerate = SolveError(C.DEGENERATE)
ErrModelInfeasible = SolveError(C.INFEASIBLE)
ErrModelUnbounded = SolveError(C.UNBOUNDED)
ErrNoFeasibleFound = SolveError(C.NOFEASFOUND)
ErrNoMemory = SolveError(C.NOMEMORY)
ErrNumericalFailure = SolveError(C.NUMFAILURE)
ErrPresolved = SolveError(C.PRESOLVED) // should not be seen: we can't use C.set_presolve because it might remove variables behind our backs
ErrTimeout = SolveError(C.TIMEOUT)
ErrUserAbort = SolveError(C.USERABORT)
)
// Error returns a string representation of the given error value.
func (e SolveError) Error() string {
switch e {
case ErrBranchCutBreak:
return "branch-and-cut stopped at beakpoint"
case ErrBranchCutFail:
return "branch-and-cut failure"
case ErrFeasibleFound:
return "feasible but non-integer solution found"
case ErrModelDegenerate:
return "model is degenerate"
case ErrModelInfeasible:
return "model is infeasible"
case ErrModelUnbounded:
return "model is unbounded"
case ErrNoFeasibleFound:
return "no feasible solution found"
case ErrNoMemory:
return "ran out of memory while solving"
case ErrNumericalFailure:
return "numerical failure while solving"
case ErrPresolved:
return "model was presolved"
case ErrTimeout:
return "timeout occurred before any integer solution could be found"
case ErrUserAbort:
return "aborted by user abort function "
default:
panic("unrecognized error")
}
}
// Status reports if the solution is optimal (SolutionOptimal) or
// not (SolutionSuboptimal)
func (res SolveResult) Status() SolveStatus {
return res.status
}
// Value returns the computed value of the given variable for this
// optimization result.
// This is a shorthand for PrimalValue.
func (res SolveResult) Value(v *Variable) float64 {
return res.PrimalValue(v)
}
// PrimalValue returns the computed value of the given variable for
// this optimization result.
func (res SolveResult) PrimalValue(v *Variable) float64 {
res.model.mu.RLock()
defer res.model.mu.RUnlock()
// get_var_*result uses funny indexing: 0=objective,1 to Nrows=constraint,Nrows to Nrows+Ncols=variable
return float64(C.get_var_primalresult(res.model.prob, C.int(v.index+v.model.ConstraintCount()+1)))
}
// DualValue returns the dual value of the given variable in this
// optimization result.
func (res SolveResult) DualValue(v *Variable) float64 {
res.model.mu.RLock()
defer res.model.mu.RUnlock()
// get_var_*result uses funny indexing: 0=objective,1 to Nrows=constraint,Nrows to Nrows+Ncols=variable
return float64(C.get_var_dualresult(res.model.prob, C.int(v.index+v.model.ConstraintCount()+1)))
}
// ObjectiveValue returns the value of the objective function for
// this optimization result. This value is only optimal if Status
// also returns SolutionOptimal.
func (res SolveResult) ObjectiveValue() float64 {
res.model.mu.RLock()
defer res.model.mu.RUnlock()
return float64(C.get_objective(res.model.prob))
}
| costela/golpa-result.go |
import * as actions from 'redux/actions'
export default async (
dispatch,
tournament,
name,
onOpenSnackbar
) => {
const body = {
_tournament: tournament._id,
name: name,
active: true,
handicapFriendly: true
}
await dispatch(actions.asians.venues.create(tournament._id, body))
dispatch(actions.asians.venues.fetch(tournament._id))
onOpenSnackbar(`Venue ${name} created`)
}
| westoncolemanl/tabbr-web-src/containers/Asians/TabControls/_components/VenuesAddOne/onSubmit.js |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-01 12:23
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='aboutmeblock',
options={'verbose_name': 'Блок Обо мне', 'verbose_name_plural': 'Блок Обо мне'},
),
migrations.AlterModelOptions(
name='awardsblock',
options={'verbose_name': 'Блок Награды', 'verbose_name_plural': 'Блок Награды'},
),
migrations.AlterModelOptions(
name='cvblock',
options={'verbose_name': 'Блок Резюме', 'verbose_name_plural': 'Блок Резюме'},
),
migrations.AlterModelOptions(
name='educationblock',
options={'verbose_name': 'Блок Образование', 'verbose_name_plural': 'Блок Образование'},
),
migrations.AlterModelOptions(
name='getintouchblock',
options={'verbose_name': 'Блок Обратная связь', 'verbose_name_plural': 'Блок Обратная связь'},
),
migrations.AlterModelOptions(
name='mainsliderblock',
options={'verbose_name': 'Блок Слайдер', 'verbose_name_plural': 'Блок Слайдер'},
),
migrations.AlterModelOptions(
name='portfolioblock',
options={'verbose_name': 'Блок Портфолио', 'verbose_name_plural': 'Блок Портфолио'},
),
migrations.AlterModelOptions(
name='processblock',
options={'verbose_name': 'Блок Процессы', 'verbose_name_plural': 'Блок Процессы'},
),
migrations.AlterModelOptions(
name='serviceblock',
options={'verbose_name': 'Блок Услуги', 'verbose_name_plural': 'Блок Услуги'},
),
migrations.AlterModelOptions(
name='settings',
options={'verbose_name': 'Настройки сайта', 'verbose_name_plural': 'Настройки сайта'},
),
migrations.AlterModelOptions(
name='skillblock',
options={'verbose_name': 'Блок Навыки', 'verbose_name_plural': 'Блок Навыки'},
),
migrations.AlterModelOptions(
name='testimonialrecord',
options={'ordering': ('index',), 'verbose_name': 'Рекомендация', 'verbose_name_plural': 'Рекомендации'},
),
migrations.AlterModelOptions(
name='testimonialsblock',
options={'verbose_name': 'Блок Рекомендации', 'verbose_name_plural': 'Блок Рекомендации'},
),
migrations.AlterModelOptions(
name='videoblock',
options={'verbose_name': 'Блок Видео', 'verbose_name_plural': 'Блок Видео'},
),
migrations.AlterModelOptions(
name='workexperienceblock',
options={'verbose_name': 'Блок Опыт работы', 'verbose_name_plural': 'Блок Опыт работы'},
),
]
| cthtuf/django-cv-main/migrations/0002_auto_20161101_1223.py |
const mongoose = require('mongoose')
const Schema = mongoose.Schema
// Paginate list of all data
const mongoosePaginate = require('mongoose-paginate')
mongoosePaginate.paginate.options = {
// lean: true,
// leanWithId: false,
page: 1,
limit: 10,
sort: { updatedAt: -1 }
};
// TODO: Use full text search
// const searchPlugin = require('mongoose-search-plugin')
// const textSearch = require('mongoose-text-search')
const BookSchema = new Schema({
isbn: {
type: String,
unique: true,
required: true
},
name: {
type: String,
required: true
},
price: {
type: Number,
required: true
},
owners: [
{
type: Number,
foreignField: 'accountId',
ref: 'Account'
}
]
}, {
timestamps: true
})
// BookSchema.virtual('lenders', {
// ref: 'Account',
// localField: 'username', // Find account where `localField`
// foreignField: 'isbn' // is equal to `foreignField`
// })
BookSchema.plugin(mongoosePaginate)
// -----------------------------------------------------------------------------
// POPULATE
// BookSchema.pre('find', function (next) {
// this.populate('owners', 'name')
// next()
// })
// BookSchema.pre('findOne', function (next) {
// this.populate('owners', 'name')
// next()
// })
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// FULL TEXT SEARCH
// Give our schema text search capabilities
// BookSchema.plugin(searchPlugin, {
// fields: ['isbn', 'name', 'price']
// })
// Give our schema text search capabilities
// BookSchema.plugin(textSearch)
// Add a text index
// BookSchema.index({ name: 'text' })
// -----------------------------------------------------------------------------
module.exports = mongoose.model('Book', BookSchema)
| mhaidarh/super-workshop-js-servers/server-express-mvc/models/books.js |
import re
from collections import namedtuple
__author__ = 'Lucas Kjaero'
# Used in the process_cedict_line function. Do not change. Out here to avoid recompilation each call.
cedict_definition_pattern = re.compile("/(.*)/")
cedict_pinyin_pattern = re.compile("\[(.*)\] /")
DictionaryEntry = namedtuple("DictionaryEntry", ['traditional', 'simplified', 'pinyin', 'meaning'])
def process_cedict_line(line):
"""Process a line in cedict.
Returns (traditional, simplified, pinyin, meaning)
Throws an AssertionError if a line doesn't contain a definition.
If moving, don't forget to move regular expression patterns too."""
assert len(line) is not 0
assert line[0] is not "#"
split_line = line.split(" ")
traditional_val, simplified_val = split_line[0], split_line[1]
pinyin_val = cedict_pinyin_pattern.findall(line)[0]
meaning_val = cedict_definition_pattern.findall(line)[0]
entry = DictionaryEntry(traditional=traditional_val, simplified=simplified_val, pinyin=pinyin_val,
meaning=meaning_val)
return traditional_val, entry
def read_dict(filename="cedict_ts.u8", line_parser=process_cedict_line):
"""Processes a dictionary file into a dictionary of entries. Assumes one line per entry.
Default definitions come from cedict
Uses the provided line_parser function to parse each individual dictionary.
Ignores any lines that raise an AssertionError.
The format is:
{
word: (number_of_entries, entry_1, entry_2, ...),
...
}"""
working_dictionary = dict()
with open(filename) as chinese_dictionary:
for line in chinese_dictionary:
try:
key, entry = line_parser(line)
try:
old_entry = working_dictionary[key]
num_entries = old_entry[0]
working_dictionary[key] = (num_entries + 1,) + old_entry[1:] + (entry,)
except KeyError:
working_dictionary[key] = (1, entry)
except AssertionError:
pass
return working_dictionary
| lucaskjaero/Chinese-Vocabulary-Finder-Dictionary.py |
/* $Id: boardergo.h,v 1.1.1.1 2010/03/11 21:07:41 kris Exp $
*
* Linux driver for HYSDN cards, definitions for ergo type boards (buffers..).
*
* Author Werner Cornelius ([email protected]) for Hypercope GmbH
* Copyright 1999 by Werner Cornelius ([email protected])
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
/************************************************/
/* defines for the dual port memory of the card */
/************************************************/
#define ERG_DPRAM_PAGE_SIZE 0x2000 /* DPRAM occupies a 8K page */
#define BOOT_IMG_SIZE 4096
#define ERG_DPRAM_FILL_SIZE (ERG_DPRAM_PAGE_SIZE - BOOT_IMG_SIZE)
#define ERG_TO_HY_BUF_SIZE 0x0E00 /* 3072 bytes buffer size to card */
#define ERG_TO_PC_BUF_SIZE 0x0E00 /* 3072 bytes to PC, too */
/* following DPRAM layout copied from OS2-driver boarderg.h */
typedef struct ErgDpram_tag {
/*0000 */ unsigned char ToHyBuf[ERG_TO_HY_BUF_SIZE];
/*0E00 */ unsigned char ToPcBuf[ERG_TO_PC_BUF_SIZE];
/*1C00 */ unsigned char bSoftUart[SIZE_RSV_SOFT_UART];
/* size 0x1B0 */
/*1DB0 *//* tErrLogEntry */ unsigned char volatile ErrLogMsg[64];
/* size 64 bytes */
/*1DB0 unsigned long ulErrType; */
/*1DB4 unsigned long ulErrSubtype; */
/*1DB8 unsigned long ucTextSize; */
/*1DB9 unsigned long ucText[ERRLOG_TEXT_SIZE]; *//* ASCIIZ of len ucTextSize-1 */
/*1DF0 */
/*1DF0 */ unsigned short volatile ToHyChannel;
/*1DF2 */ unsigned short volatile ToHySize;
/*1DF4 */ unsigned char volatile ToHyFlag;
/* !=0: msg for Hy waiting */
/*1DF5 */ unsigned char volatile ToPcFlag;
/* !=0: msg for PC waiting */
/*1DF6 */ unsigned short volatile ToPcChannel;
/*1DF8 */ unsigned short volatile ToPcSize;
/*1DFA */ unsigned char bRes1DBA[0x1E00 - 0x1DFA];
/* 6 bytes */
/*1E00 */ unsigned char bRestOfEntryTbl[0x1F00 - 0x1E00];
/*1F00 */ unsigned long TrapTable[62];
/*1FF8 */ unsigned char bRes1FF8[0x1FFB - 0x1FF8];
/* low part of reset vetor */
/*1FFB */ unsigned char ToPcIntMetro;
/* notes:
* - metro has 32-bit boot ram - accessing
* ToPcInt and ToHyInt would be the same;
* so we moved ToPcInt to 1FFB.
* Because on the PC side both vars are
* readonly (reseting on int from E1 to PC),
* we can read both vars on both cards
* without destroying anything.
* - 1FFB is the high byte of the reset vector,
* so E1 side should NOT change this byte
* when writing!
*/
/*1FFC */ unsigned char volatile ToHyNoDpramErrLog;
/* note: ToHyNoDpramErrLog is used to inform
* boot loader, not to use DPRAM based
* ErrLog; when DOS driver is rewritten
* this becomes obsolete
*/
/*1FFD */ unsigned char bRes1FFD;
/*1FFE */ unsigned char ToPcInt;
/* E1_intclear; on CHAMP2: E1_intset */
/*1FFF */ unsigned char ToHyInt;
/* E1_intset; on CHAMP2: E1_intclear */
} tErgDpram;
/**********************************************/
/* PCI9050 controller local register offsets: */
/* copied from boarderg.c */
/**********************************************/
#define PCI9050_INTR_REG 0x4C /* Interrupt register */
#define PCI9050_USER_IO 0x51 /* User I/O register */
/* bitmask for PCI9050_INTR_REG: */
#define PCI9050_INTR_REG_EN1 0x01 /* 1= enable (def.), 0= disable */
#define PCI9050_INTR_REG_POL1 0x02 /* 1= active high (def.), 0= active low */
#define PCI9050_INTR_REG_STAT1 0x04 /* 1= intr. active, 0= intr. not active (def.) */
#define PCI9050_INTR_REG_ENPCI 0x40 /* 1= PCI interrupts enable (def.) */
/* bitmask for PCI9050_USER_IO: */
#define PCI9050_USER_IO_EN3 0x02 /* 1= disable , 0= enable (def.) */
#define PCI9050_USER_IO_DIR3 0x04 /* 1= output (def.), 0= input */
#define PCI9050_USER_IO_DAT3 0x08 /* 1= high (def.) , 0= low */
#define PCI9050_E1_RESET ( PCI9050_USER_IO_DIR3) /* 0x04 */
#define PCI9050_E1_RUN (PCI9050_USER_IO_DAT3|PCI9050_USER_IO_DIR3) /* 0x0C */
| fgoncalves/Modified-TS7500-Kernel-drivers/isdn/hysdn/boardergo.h |
package ru.job4j.tracker;
import java.util.List;
/**
*Класс StubInput.
*@author ifedorenko
*@since 27.08.2017
*@version 1
*/
public class StubInput implements Input {
/**
* @param answers массив строк для последовательности действий.
*/
private String[] answers;
/**
* @param position счетчик.
*/
private int position = 0;
/**
* Конструктор.
* @param answers массив строк для последовательности действий.
*/
public StubInput(String[] answers) {
this.answers = answers;
}
/**
* Медот для тестирования приложения tracker.
* @param question Вопрос-подсказка для пользователя.
* @return ответ из заданного массива.
*/
public String ask(String question) {
return answers[position++];
}
/**
* Метод ask. Перегрузка.
* @param question Вопрос-подсказка для пользователя.
* @param range содержит диапазон значений меню.
* @return -1
*/
public int ask(String question, List<Integer> range) {
int key = Integer.valueOf(this.ask(question));
boolean exist = false;
for (int value : range) {
if (value == key) {
exist = true;
break;
}
}
if (exist) {
return key;
} else {
throw new MenuOutException("out of menu range.");
}
}
} | fr3anthe/ifedorenko-1.2-OOP/src/main/java/ru/job4j/tracker/StubInput.java |
Klettschuh - STORM (Gr. 31-35)
Klettschuh - STORM (Gr.30-35)
Klettverschluss - STORM (Gr.36-40)
Sneaker - NEBULA (Gr. 36-39 1/3)
Klettschuh - KTX (Gr.29-35)
Klettschuh - KTX (Gr.30-35)
Klettschuh - POWER PETALS (Gr. 32-37)
Schnürschuh (Gr. 21-26)
Sandale - SISSI (Gr. 25-30)
Klettschuh (Gr. 26-30)
Klettschuh (Gr.20-23)
Lauflerner (Gr.20-26)
Rucksack - MINNIE MOUSE LETS PARTY
Kindersocken Gr. 31-34 | c4-da |
var postsData = [{
title: 'Introducing Telescope',
url: 'http://sachagreif.com/introducing-telescope/'
}, {
title: 'Meteor',
url: 'http://meteor.com'
}, {
title: 'The Meteor Book',
url: 'http://themeteorbook.com'
}];
Template.postsList.helpers({
posts: postsData
}); | leogong99/nbaToday-client/templates/posts/post_list.js |
// GamestateClass.js
// I'm not sure we need this at all; it makes it feel a little more like C++, albeit not by much,
// and that's familiar but I may drop this class later if I never end up looking for "GamestateClass"
// as an identifier for anything.
// Probably should read a book on game design or something at some point.
function GamestateClass() {
"use strict";
this.stateName = "gsc";
this.newState = "";
}
GamestateClass.prototype.update = function (keysDown) {
};
GamestateClass.prototype.render = function (canvasContext) {
};
| sikrob/LittlePlatformer-src/states/gamestateClass.js |
#!/usr/bin/python2.7
#
# The prime factors of 13195 are 5, 7, 13 and 29.
# What is the largest prime factor of the number 600851475143 ?
import math
x = 600851475143
y = 2
z = 0
def isSimple(x):
state = True
for i in range(2, x):
if not x % i:
state = False
break
return state
while y < int(math.sqrt(x)):
if (not x % y) and (isSimple(y)) and (y > z):
z = y
y += 1
print z
| yuriymalygin/sandbox-python/project_euler/problem_3.py |
/*
mTCP Ircjr.h
Copyright (C) 2008-2013 Michael B. Brutman ([email protected])
mTCP web page: http://www.brutman.com/mTCP
This file is part of mTCP.
mTCP is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
mTCP 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with mTCP. If not, see <http://www.gnu.org/licenses/>.
Description: Some common defines and inline functions for IRCjr
Changes:
2011-05-27: Initial release as open source software
*/
#ifndef _IRCJR_H
#define _IRCJR_H
// Configuration
#define INPUT_ROWS (3)
#define SCBUFFER_MAX_INPUT_LEN (240)
// Common defines and utilities
extern void ERRBEEP( void );
extern void fillUsingWord( void far * target, uint16_t fillWord, uint16_t len );
#pragma aux fillUsingWord = \
"push es" \
"push di" \
"mov es, dx" \
"mov di, bx" \
"rep stosw" \
"pop di" \
"pop es" \
modify [ax] \
parm [dx bx] [ax] [cx]
// This gotoxy is zero based!
extern void gotoxy( unsigned char col, unsigned char row );
#pragma aux gotoxy = \
"mov ah, 2h" \
"mov bh, 0h" \
"int 10h" \
parm [dl] [dh] \
modify [ax bh dx];
extern unsigned char wherex( void );
#pragma aux wherex = \
"push bp" \
"mov ah, 3h" \
"mov bh, 0h" \
"int 10h" \
"pop bp" \
modify [ ax bx cx dx ] \
value [ dl ];
extern unsigned char wherey( void );
#pragma aux wherey = \
"push bp" \
"mov ah, 3h" \
"mov bh, 0h" \
"int 10h" \
"pop bp" \
modify [ ax bx cx dx ] \
value [ dh ];
#endif
#define normalizePtr( p, t ) { \
uint32_t seg = FP_SEG( p ); \
uint16_t off = FP_OFF( p ); \
seg = seg + (off/16); \
off = off & 0x000F; \
p = (t)MK_FP( (uint16_t)seg, off ); \
}
#define addToPtr( p, o, t ) { \
uint32_t seg = FP_SEG( p ); \
uint16_t off = FP_OFF( p ); \
seg = seg + (off/16); \
off = off & 0x000F; \
uint32_t p2 = seg << 4 | off ; \
p2 = (p2) + (o); \
p = (t)MK_FP( (uint16_t)((p2)>>4), (uint16_t)((p2)&0xf) ); \
}
// Colors
extern uint8_t scErr; // Error messages
extern uint8_t scNormal; // Normal text
extern uint8_t scBright; // Bright/Bold
extern uint8_t scReverse; // Black on white
extern uint8_t scServerMsg; // Message from the IRC server
extern uint8_t scUserMsg; // Input from the local user
extern uint8_t scOtherUserMsg; // Message from an IRC user
extern uint8_t scActionMsg; // Used for CTCP ACTION
extern uint8_t scTitle; // Title - used only at startup
extern uint8_t scLocalMsg; // For locally injected messages (like help, stats)
extern uint8_t scBorder; // Border lines on help window
extern uint8_t scCommandKey; // Used in help menu
extern uint8_t ColorScheme;
extern uint8_t mIRCtoCGAMap[];
| cobalt-os/cobalt-CDROOT/COBALT/SOURCE/MTCP/APPS/IRCJR/IRCJR.H |
#
# 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.
from neutron.api import extensions
from neutron.api.v2 import attributes
from neutron.common import constants
EXTENDED_ATTRIBUTES_2_0 = {
attributes.SUBNETS: {
'use_default_subnetpool': {'allow_post': True,
'allow_put': False,
'default': False,
'convert_to': attributes.convert_to_boolean,
'is_visible': False, },
},
}
class Default_subnetpools(extensions.ExtensionDescriptor):
"""Extension class supporting default subnetpools."""
@classmethod
def get_name(cls):
return "Default Subnetpools"
@classmethod
def get_alias(cls):
return "default-subnetpools"
@classmethod
def get_description(cls):
return "Provides ability to mark and use a subnetpool as the default"
@classmethod
def get_updated(cls):
return "2016-02-18T18:00:00-00:00"
def get_required_extensions(self):
return [constants.SUBNET_ALLOCATION_EXT_ALIAS]
def get_extended_resources(self, version):
if version == "2.0":
return EXTENDED_ATTRIBUTES_2_0
else:
return {}
| MaximNevrov/neutron-neutron/extensions/default_subnetpools.py |
ESCRITURA DE CONCORDIA ENTRE LOS ADMINISTRADORES DE ANTONIO DARRER Y RIGAL.
En nom de Deu. Sia a tots notori, com las parts infrascritas De son grat, y certa ciencia confesan, y en veritat rrgoneixen la una part a la altre vicitudinariament, que per rahó de la infrascrita concordia foren convinguts y pactats los capitols avall escrits.
En nom de nostre Señor Deu Jesu.Christ, y de la Groliosa e humilt Verge Maria mare sua, y Señora nostra, sie, amen.
Dos concordias foren ajustadas, y firmadas en poder de Ramon Font y Elier notari altre dels escrivans jurats del Señor Corregidor de la present ciutat, a vint de Mars de mil setcents sexanta dos. La una, y la altre a vint y set de Janer de mil setcents sexanta tres. La primera de las quals fou entre los Señores Anton Darrer y Rigalt mercader, ciutadá de Barcelona, y familiar del Sant Ofici, lo Rnt. Dr. Miquel Darrer Pbre. y Beneficiat de la Parroquial Iglesia de Sant Just y Sant Pastor de la present ciutat, y las Señoras Magdalena Darrer y Pujol y Caetana Pujol y Pujol, viuda de Joseph Pujol, adroguer, ciutadá de Barcelona, y los Señores D. Llorens Pujol Pbre. Beneficiat en la Iglesia Parroquial de Sant Cugat del Rech de la present ciutat, Joseph Pujol y Pujol, ciutadá honrat de Barcelona, Agustí Matas daguer, Joan Pau Gispert, y Miquel Girona y Rigalt mercaders, Francisco Pujol y Pujol adroguer, Francisco Clará argenter, y Pau Anton Custó apothecari de una, y alguns dels acrehedors de dit Darrer, que son los Señors Joseph Cases mercader, Isidro Martorell comerciant, Bernat Batista, Salvador Coll veler, Joan Puget comerciant, Francisco Ferran notari, D. Alexandro Le Cocq, Joseph Buhigues candeler, Joseph Creus notari causidich, y Silvestre Vives y Vidal de part altre, (los credits dels quals alli individuats importan trenta tres mil sinch centas quaranta dos lliuras set sous y set diners), y reciprocament entre dita Señora Magdalena Darrer, y lo expresat D. Miquel Darrer Pbre. Y los mencionats cessionaris entre si, ab motiu de trobarse dit Anton Darrer sumament oberat y carregat de deutes, sens medi pera satisferlos, a lo menos sens que passassen molts anus. Ab la qual, y promerr capitol de ellas dit Anton Darrer pera facilitar la paga de las quantitats de vint y vuyt mil sinchcentas deu lliuras tres sous y quatre diners, import del totas credit dels referits acrehedors, baixan en quinse per cent, cedí a favor dels expressats Dr. Llorens Pujol Pbre. Caetana Pujol y Pujol viuda, Joseph Pujol y Pujol, Agustí Matas, Joan Pau Gispert, Miquel Girona, Francisco Pujol y Pujol, Francisco Clará, y Pau Anton Custó tots sos bens, axí mobles com immobles, y tots drets y accions sobre ells, fetta la total paga de dits acrehedors, durant la obligació ab que aquells havian de carregar, que son per tres anys, o per lo temps que fos menester. Ab lo segon, que los referits cessionaris, debian obligarse, com se obligaren a pagar als expressats acrehedors la dita quantitat de vint y vuyt mil sinch centas deu lliuras tres sous y quatre diners dins lo termini de tres anys, contadors del dia de dita concordia, ab o modo, y plassos en ell contenguts. Ab lo tercer la Señora Maria Magdalena Darrer y Pujol, y lo Rnt. Señor Dr. Miquel Darrer y Rigalt, Pbre. Muller y germá respective de dit Anton Darrer, renunciaren a favor dels mate | c4-ca |
/*
* Copyright (c) 2012-2016 Arne Schwabe
* Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
*/
package de.blinkt.openvpn.core;
import android.os.Build;
import java.security.InvalidKeyException;
public class NativeUtils {
public static native byte[] rsasign(byte[] input, int pkey) throws InvalidKeyException;
public static native String[] getIfconfig() throws IllegalArgumentException;
static native void jniclose(int fdint);
public static native String getNativeAPI();
static {
System.loadLibrary("opvpnutil");
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN)
System.loadLibrary("jbcrypto");
}
}
| KwadroNaut/bitmask_android-app/src/main/java/de/blinkt/openvpn/core/NativeUtils.java |
require 'helper'
class Bixby::Test::Modules::Repository < Bixby::Test::TestCase
def setup
super
@tmp = Dir.mktmpdir("bixby-")
@wd = Dir.pwd
Dir.chdir(@tmp)
ENV["BIXBY_HOME"] = @tmp
FileUtils.mkdir_p(Bixby.repo_path)
end
def teardown
super
FileUtils.rm_rf(@tmp)
Dir.chdir(@wd)
end
def test_git_repo_clone_and_update
# for some reason system() git commands directly screws up with working dir
# issues. using git lib works..
# copy test_bundle to temp location and init git repo
path = File.join(@tmp, "repo.git")
FileUtils.mkdir_p(File.join(path, "foo"))
FileUtils.cp_r(File.join(Rails.root, "test/support/root_dir/repo/vendor/test_bundle"), File.join(path, "foo", "bar"))
Dir.chdir(path)
g = Git.init(path)
g.add("foo")
g.commit("import")
# create repo
org = FactoryGirl.create(:org)
repo = Repo.new
repo.org = org
repo.name = "test"
repo.uri = path
repo.save!
t = Repo.first.updated_at
# this should clone the repo
Bixby::Repository.new.update
# make sure ts changed
refute_equal t, Repo.first.updated_at
t = Repo.first.updated_at
assert_equal "0001_test", File.basename(repo.path)
assert File.directory? repo.path
assert File.exists? File.join(repo.path, "foo/bar/manifest.json")
# Bundle should exist
bundle = Bundle.first
assert bundle
assert_equal "foo/bar", bundle.path
assert_equal "test_bundle", bundle.name
assert_equal "test bundle", bundle.desc
assert_equal "0.0.1", bundle.version
assert bundle.digest
# check our new command
script = File.join(repo.path, "foo/bar/bin/echo")
assert File.exists? script
c = Command.where(:command => "echo").first
assert c
assert_equal "echo", c.command
assert_equal "foo/bar", c.bundle.path
# add a new file
Dir.chdir(path)
system("echo yo > readme2")
g.add("readme2")
g.commit("test2")
refute File.exists? File.join(repo.path, "readme2")
# try updating the repo now, file should exist
Bixby::Repository.new.update
assert File.exists? File.join(repo.path, "readme2")
assert_equal "yo\n", File.read(File.join(repo.path, "readme2"))
# make sure ts changed
refute_equal t, Repo.first.updated_at
t = Repo.first.updated_at
# remove our command, it should get deleted
g.remove(File.join(path, "foo/bar/bin/echo"))
g.commit("removed script")
Bixby::Repository.new.update
refute File.exists? script
assert_equal "cat", Command.last.command
end
def test_git_clone_private
key_path = File.join(Rails.root, "test", "support", "keys")
org = FactoryGirl.create(:org)
repo = Repo.new
repo.org = org
repo.name = "test"
repo.uri = "[email protected]:chetan/bixby-test-private-repo.git"
repo.private_key = File.read(File.join(key_path, "id_rsa"))
repo.public_key = File.read(File.join(key_path, "id_rsa.pub"))
repo.save!
# stub the actual remote clone & pull
Git::Base.expects(:clone).with() {
FileUtils.mkdir_p(File.join(repo.path, ".git")) # fake it for update
ENV.include?("GIT_SSH") && ENV.include?("GIT_SSH_BIXBY") && ENV["GIT_SSH"] =~ /gitsshwrap\.sh/
}
Git::Base.any_instance.expects(:pull).with() {
ENV.include?("GIT_SSH") && ENV.include?("GIT_SSH_BIXBY") && ENV["GIT_SSH"] =~ /gitsshwrap\.sh/
}
Bixby::Repository.new.update
end
end
| chetan/bixby-manager-test/unit/modules/repository_test.rb |
(function(module) {
var aboutController = {};
aboutController.index = function() {
$('header').hide();
$('.videos').hide();
$('.settings-page').hide();
$('.about-page').show();
};
module.aboutController = aboutController;
})(window);
| zgeorgii/youchoose-js/controllers/about.js |
/*
* Copyright: (c) 2004-2011 Mayo Foundation for Medical Education and
* Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
* triple-shield Mayo logo are trademarks and service marks of MFMER.
*
* Except as contained in the copyright notice above, or as used to identify
* MFMER as the author of this software, the trade names, trademarks, service
* marks, or product names of the copyright holder shall not be used in
* advertising, promotion or otherwise in connection with this software without
* prior written authorization of the copyright holder.
*
* 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 edu.mayo.cts2.framework.filter.match;
/**
* The Class ContainsMatcher.
*
* @author <a href="mailto:[email protected]">Kevin Peterson</a>
*/
public class ContainsMatcher extends AbstractNonScoringMatcher {
/* (non-Javadoc)
* @see org.cts2.internal.match.AbstractMatcher#doIsMatch(java.lang.String, java.lang.String)
*/
@Override
protected boolean isMatch(String matchText, String cadidate) {
return cadidate.contains(matchText);
}
}
| cts2/cts2-framework-cts2-filter/src/main/java/edu/mayo/cts2/framework/filter/match/ContainsMatcher.java |
def name
puts 'What is your first name?'
first_name= gets.chomp
puts 'What is your middle name?'
middle_name=gets.chomp
puts 'What is your last name?'
last_name=gets.chomp
puts 'Pleased to meet you'+ first_name + middle_name + last_name
end
def number
puts 'What is your favorite number?'
favorite_number= gets.chomp
favorite_number.to_f + 1
puts "This number #{favorite_number} is better"
end
#######How do you define a local variable?
#It is a varable defined only within the working file. It always starts with a lowercase letter or underscore.
#How do you define a method?
#A block of code that runs a program. It always starts with the 'def' operator and is completed by using the 'end' operator.
######What is the difference between a local variable and a method?
#A local variable only assigns a value. Methods can have multiple values and uses.
######How do you run a ruby program from the command line?
#You would type 'ruby file-name.rb'
#######How do you run an RSpec file from the command line?
#You would type 'rspec file-name.spec.rb'
#######What was confusing about this material? What made sense?
#Oh let me count the ways....
#1) We use rspec in the file first. Then we are told to make it run outside the file. Why teach us the wrong way to use the file in the first place?
#2) All the files are named the same thing. 'my_solution' I know they are in different directories but it's still confusing.
#3) Rspec will tell you what is wrong with the file, but first it will tell you a bunch of mumbo jumbo that you think is important and it isn't.
#4) They should really make seperate directions for people using cloud 9 (this would include telling us to install important gem software!!!)
#5) Too many exercises within exercises. Just make seperate exercises. It's not exactly easy to keep track of this stuff you know....
#Things that were ok...finishing this assignment.
#5)
| Marti113/phase-0-week-4/variables-methods.rb |
/*
Question# + Difficulty + Topic + Company + Similar_Question
[242] [Valid Anagram] [Easy] [Hash Table Sort ]
[Amazon Uber Yelp ]
[49 266 438].cpp
*/
class Solution {
public:
bool isAnagram(string s, string t) {
unordered_map<char, int> hash;
if(s.size()!=t.size())return false;
for(int i = 0;i<s.size();i++)
{
hash[s[i]]++;hash[t[i]]--;
}
for(auto i = hash.begin();i!=hash.end();i++)
{
if(i->second) return false;
}
return true;
}
};
| HaozheGuAsh/Leet_Code-[242] [Valid Anagram] [Easy] [Hash Table Sort ] [Amazon Uber Yelp ] [49 266 438].cpp |
/* Copyright 2022 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
window.init = function(){
window.util = initUtil()
window.state = window.state || util.params.getAll()
window.prevState = window.state
initNumColors()
window.colorInput = initColorInput()
window.outputColors = initOutputColors()
window.spaces = initSpaces()
window.band = initBand()
window.render()
}
window.render = function(){
if (prevState.colors.length != state.colors.length){
window.spaces = initSpaces()
window.band = initBand()
}
var scale = spaces[state.space][state.type + 'Interpolate'](state.colors)
util.broadcastScale(scale)
var tickColors = d3.range(state.numTicks).map(i => scale(i/state.numTicks))
band.render(tickColors)
outputColors.render(tickColors)
d3.values(spaces).forEach(space => {
space.colors = state.colors.map(d => space.fn(d))
space.tickColors = tickColors.map(d => space.fn(d))
space.lines.forEach(d => d.render())
space.basisBand.render()
space.linearBand.render()
})
d3.selectAll('.space-band')
.classed('active', d => d.space.keyOrig == state.space && d.type == state.type)
colorInput.render()
util.params.setAll()
window.prevState = JSON.parse(JSON.stringify(window.state))
}
init()
window.__onHotServer = () => {
console.clear()
init()
} | PAIR-code/colormap-curves/init.js |
const LOG_LEVEL = {
Debug: 'DEBUG',
Info: 'INFO',
Warning: 'WARNING',
Error: 'ERROR',
};
export default LOG_LEVEL;
| PiTeam/garage-pi-src/backend/models/enums/logLevel.js |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class ClusterHealthPolicy(Model):
"""Defines a health policy used to evaluate the health of the cluster or of a
cluster node.
:param max_percent_unhealthy_nodes: The maximum allowed percentage of
unhealthy nodes before reporting an error. For example, to allow 10% of
nodes to be unhealthy, this value would be 10.
:type max_percent_unhealthy_nodes: int
:param max_percent_unhealthy_applications: The maximum allowed percentage
of unhealthy applications before reporting an error. For example, to allow
10% of applications to be unhealthy, this value would be 10.
:type max_percent_unhealthy_applications: int
"""
_validation = {
'max_percent_unhealthy_nodes': {'maximum': 100, 'minimum': 0},
'max_percent_unhealthy_applications': {'maximum': 100, 'minimum': 0},
}
_attribute_map = {
'max_percent_unhealthy_nodes': {'key': 'maxPercentUnhealthyNodes', 'type': 'int'},
'max_percent_unhealthy_applications': {'key': 'maxPercentUnhealthyApplications', 'type': 'int'},
}
def __init__(self, max_percent_unhealthy_nodes=None, max_percent_unhealthy_applications=None):
self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes
self.max_percent_unhealthy_applications = max_percent_unhealthy_applications
| lmazuel/azure-sdk-for-python-azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/cluster_health_policy.py |
Учебни помагала-никозия | Български културен център "Кирил и Методий" - Българско училище в Никозия
Moodle Вход
You are here: Home › Българско училище в Никозия › Учебни помагала-никозия
Учебни помагала-никозия
Учебниците се доставят от училището и не се заплащат допълнително. Раздават се срещу депозит от 20 евро, който родителите получават обратно след връщането на учебниците в добър и запазен вид в края на годината.
В Училището се работи по адаптираните програми на МОН по български език, българска история и българска география.Всички помагала, с които работим, са съобразени с Държавните образователни изисквания и са одобрени от МОН.
Буквар и читанка за 1. клас за ученици, живеещи в чужбина, изд. Просвета
Тетрадка №1, №2 и №3 по писане към “Буквар и читанка за 1. клас за ученици, живеещи в чужбина”, Тетрадка по четене към “Буквар за 1. клас за ученици, живеещи в чужбина”, Тетрадка по четене към Читанка за 1. клас за ученици, живеещи в чужбина
Автори: Станка Вълкова, Тодорка Митева, Тома Бинчев, Тодорка Бановска
Български език и читанка за 2. клас за ученици, живеещи в чужбина, изд. Просвета
Тетрадка №1, №2 и №3 към “Български език и читанка за 2. клас за ученици, живеещи в чужбина”, Тетрадка към Читанка за 2. клас за ученици, живеещи в чужбина
Автори: Станка Вълкова, Левчо Георгиев, Ася Миленкова и други
Български език и читанка за 3. клас за ученици, живеещи в чужбина, изд. Просвета
Тетрадка №1, №2 и №3 към “Български език и читанка за 3. клас за ученици, живеещи в чужбина”
Български език и читанка за 4. клас за ученици, живеещи в чужбина, изд. Просвета
Тетрадка №1 и №2 към “Български език и читанка за 4. клас за ученици, живеещи в чужбина”, Учебна тетрадка към Читанка за 4. клас за ученици, живеещи в чужбина
Автори: Станка Вълкова, Левчо Георгиев, Лилия Вълкова и други
Български език за 5. клас, изд. Просвета
Тетрадка №1 и №2 по български език за 5. клас
Одобрение от МОН: заповед № РД 09-247/25.02.2011 г.
Български език за 6. клас, изд. Просвета
Одобрение от МОН: заповед № РД 09-296/25.02.2011 г.
Български език за 7. клас, изд. Просвета
Тетрадка №1 и №2 по български език за 7. клас
Одобрение от МОН: заповед № РД 09-846/31.07.2008 г.
Български език за 8. клас, изд. Просвета
Одобрение от МОН: заповед № РД 09-1088/03.07.2009 г.
(Страницата предстои да бъде за | c4-bg |
/* Copyright (C) 1986-1994 by Digital Mars. $Revision: 1.1.1.1 $ */
#if __SC__ || __RCC__
#pragma once
#endif
#ifndef __SYS_TYPES_H
#define __SYS_TYPES_H 1
#ifndef __TIME_T_DEFINED
typedef long time_t;
#define __TIME_T_DEFINED
#endif
#if !defined(M_UNIX) && !defined(M_XENIX)
typedef unsigned short _ino_t;
typedef short _dev_t;
typedef long _off_t;
#ifndef __STDC__
typedef unsigned short ino_t;
typedef short dev_t;
typedef long off_t;
#endif
#else /* M_UNIX || M_XENIX */
typedef char * addr_t;
typedef char * caddr_t;
typedef long daddr_t;
typedef char * faddr_t;
typedef short cnt_t;
typedef unsigned long paddr_t;
typedef unsigned char use_t;
typedef short sysid_t;
typedef short index_t;
typedef short lock_t;
typedef unsigned short sel_t;
typedef unsigned long k_sigset_t;
typedef unsigned long k_fltset_t;
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
typedef struct _label
{
int val[6];
} label_t;
typedef enum boolean
{ B_FALSE, B_TRUE
} boolean_t;
#endif
/* POSIX Extensions */
typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned int uint_t;
typedef unsigned long ulong_t;
typedef long id_t;
typedef unsigned long pvec_t;
typedef unsigned long lid_t;
typedef lid_t level_t;
typedef unsigned long major_t;
typedef unsigned long minor_t;
/* POSIX and XOPEN required typedefs */
typedef long UID_T;
typedef unsigned long DEV_T;
typedef UID_T GID_T;
typedef unsigned long INO_T;
typedef int KEY_T;
typedef unsigned long MODE_T;
typedef unsigned long NLINK_T;
typedef long off_t;
typedef long PID_T;
typedef unsigned int size_t;
typedef int ssize_t;
typedef long clock_t;
/* pre-SVR4 types */
typedef long o_key_t;
typedef unsigned short o_mode_t;
typedef short o_dev_t;
typedef unsigned short o_uid_t;
typedef o_uid_t o_gid_t;
typedef short o_nlink_t;
typedef short o_pid_t;
typedef unsigned short o_ino_t;
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
typedef struct { int r[1]; } * physadr;
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef int spl_t;
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
#define NBBY 8
#ifndef FD_SETSIZE
#ifdef NOFILES_MAX
#define FD_SETSIZE NOFILES_MAX
#else
#define FD_SETSIZE 150
#endif
#endif
typedef long fd_mask;
#define NFDBITS (sizeof(fd_mask) * NBBY)
#ifndef howmany
#define howmany(x, y) (((x)+((y)-1))/(y))
#endif
typedef struct fd_set
{
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
} fd_set;
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
#define FD_ZERO(p) memset((char *)(p), '\0', sizeof(*(p)))
typedef unsigned long mask_t;
typedef mask_t priv_t;
#endif
#ifndef _STYPES
#if !defined(M_ELF)
#define _STYPES 1
#endif
#endif
#if !defined(_STYPES)
#define key_t KEY_T
#define mode_t MODE_T
#define dev_t DEV_T
#define uid_t UID_T
#define gid_t GID_T
#define nlink_t NLINK_T
#define pid_t PID_T
#define ino_t INO_T
#else
#define key_t o_key_t
#define mode_t o_mode_t
#define dev_t o_dev_t
#define uid_t o_uid_t
#define gid_t o_gid_t
#define nlink_t o_nlink_t
#define pid_t o_pid_t
#define ino_t o_ino_t
#endif
typedef long hostid_t;
#define P_MYHOSTID ((hostid_t)(-1))
#endif /* M_UNIX || M_XENIX */
#endif
| ArcherSys/ArcherSys-DCompiler/include/SYS/TYPES.H |
# *****************************************************************************
# Copyright (c) 2020, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# *****************************************************************************
import pandas as pd
from numba import njit
@njit
def series_rolling_median():
series = pd.Series([4, 3, 5, 2, 6]) # Series of 4, 3, 5, 2, 6
out_series = series.rolling(3).median()
return out_series # Expect series of NaN, NaN, 4.0, 3.0, 5.0
print(series_rolling_median())
| IntelLabs/hpat-examples/series/rolling/series_rolling_median.py |
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
namespace ProcessPlayer.Content
{
public class Variables : INotifyPropertyChanged
{
#region private variables
private ObservableDictionary<string, object> _var;
#endregion
#region internal methods
internal void RaisePropertyChanged(string propertyName)
{
object val;
if (PropertyChanged != null && !Var.TryGetValue(propertyName, out val))
PropertyChanged(Content, new PropertyChangedEventArgs(propertyName));
if (Content != null && Content.Children != null)
foreach (var c in Content.Children)
c.Vars.RaisePropertyChanged(propertyName);
}
#endregion
#region private methods
private void raisePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
PropertyChanged(Content, new PropertyChangedEventArgs(propertyName));
if (Content != null && Content.Children != null)
foreach (var c in Content.Children)
c.Vars.RaisePropertyChanged(propertyName);
}
#endregion
#region properties
public ProcessContent Content { get; set; }
private Variables Parent { get { return Content != null && Content.Parent != null ? Content.Parent.Vars : null; } }
private ObservableDictionary<string, object> Var
{
get
{
if (_var == null)
{
_var = new ObservableDictionary<string, object>();
_var.CollectionChanged += OnCollectionChanged;
}
return _var;
}
}
public object this[string name]
{
get
{
object val;
Variables vars = this;
do
{
if (vars.Var.TryGetValue(name, out val))
break;
}
while ((vars = vars.Parent) != null);
return val;
}
set
{
object val;
if (!Var.TryGetValue(name, out val) || !Equals(val, value))
{
Var[name] = value;
raisePropertyChanged(name);
}
}
}
#endregion
#region constructors
public Variables()
{
}
public Variables(ProcessContent content)
{
Content = content;
}
#endregion
#region events
private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
switch (e.Action)
{
case NotifyCollectionChangedAction.Add:
foreach (KeyValuePair<string, object> v in e.NewItems)
raisePropertyChanged(v.Key);
break;
}
}
#endregion
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
}
| series6147/ProcessPlayer-ProcessPlayer/ProcessPlayer.Content/ProcessContent.Variables.cs |
module Fastlane
module Actions
module SharedValues
CREATE_PULL_REQUEST_HTML_URL = :CREATE_PULL_REQUEST_HTML_URL
end
class CreatePullRequestAction < Action
def self.run(params)
UI.message("Creating new pull request from '#{params[:head]}' to branch '#{params[:base]}' of '#{params[:repo]}'")
payload = {
'title' => params[:title],
'head' => params[:head],
'base' => params[:base]
}
payload['body'] = params[:body] if params[:body]
GithubApiAction.run(
server_url: params[:api_url],
api_token: params[:api_token],
http_method: 'POST',
path: "repos/#{params[:repo]}/pulls",
body: payload,
error_handlers: {
'*' => proc do |result|
UI.error("GitHub responded with #{result[:status]}: #{result[:body]}")
return nil
end
}
) do |result|
json = result[:json]
number = json['number']
html_url = json['html_url']
UI.success("Successfully created pull request ##{number}. You can see it at '#{html_url}'")
# Add labels to pull request
add_labels(params, number) if params[:labels]
Actions.lane_context[SharedValues::CREATE_PULL_REQUEST_HTML_URL] = html_url
return html_url
end
end
def self.add_labels(params, number)
payload = {
'labels' => params[:labels]
}
GithubApiAction.run(
server_url: params[:api_url],
api_token: params[:api_token],
http_method: 'PATCH',
path: "repos/#{params[:repo]}/issues/#{number}",
body: payload,
error_handlers: {
'*' => proc do |result|
UI.error("GitHub responded with #{result[:status]}: #{result[:body]}")
return nil
end
}
)
end
#####################################################
# @!group Documentation
#####################################################
def self.description
"This will create a new pull request on GitHub"
end
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :api_token,
env_name: "GITHUB_PULL_REQUEST_API_TOKEN",
description: "Personal API Token for GitHub - generate one at https://github.com/settings/tokens",
sensitive: true,
code_gen_sensitive: true,
default_value: ENV["GITHUB_API_TOKEN"],
default_value_dynamic: true,
is_string: true,
optional: false),
FastlaneCore::ConfigItem.new(key: :repo,
env_name: "GITHUB_PULL_REQUEST_REPO",
description: "The name of the repository you want to submit the pull request to",
is_string: true,
optional: false),
FastlaneCore::ConfigItem.new(key: :title,
env_name: "GITHUB_PULL_REQUEST_TITLE",
description: "The title of the pull request",
is_string: true,
optional: false),
FastlaneCore::ConfigItem.new(key: :body,
env_name: "GITHUB_PULL_REQUEST_BODY",
description: "The contents of the pull request",
is_string: true,
optional: true),
FastlaneCore::ConfigItem.new(key: :labels,
env_name: "GITHUB_PULL_REQUEST_LABELS",
description: "The labels for the pull request",
type: Array,
optional: true),
FastlaneCore::ConfigItem.new(key: :head,
env_name: "GITHUB_PULL_REQUEST_HEAD",
description: "The name of the branch where your changes are implemented (defaults to the current branch name)",
is_string: true,
code_gen_sensitive: true,
default_value: Actions.git_branch,
default_value_dynamic: true,
optional: true),
FastlaneCore::ConfigItem.new(key: :base,
env_name: "GITHUB_PULL_REQUEST_BASE",
description: "The name of the branch you want your changes pulled into (defaults to `master`)",
is_string: true,
default_value: 'master',
optional: true),
FastlaneCore::ConfigItem.new(key: :api_url,
env_name: "GITHUB_PULL_REQUEST_API_URL",
description: "The URL of GitHub API - used when the Enterprise (default to `https://api.github.com`)",
is_string: true,
code_gen_default_value: 'https://api.github.com',
default_value: 'https://api.github.com',
optional: true)
]
end
def self.author
["seei", "tommeier"]
end
def self.is_supported?(platform)
return true
end
def self.return_value
"The pull request URL when successful"
end
def self.example_code
[
'create_pull_request(
api_token: "secret", # optional, defaults to ENV["GITHUB_API_TOKEN"]
repo: "fastlane/fastlane",
title: "Amazing new feature",
head: "my-feature", # optional, defaults to current branch name
base: "master", # optional, defaults to "master"
body: "Please pull this in!", # optional
api_url: "http://yourdomain/api/v3" # optional, for GitHub Enterprise, defaults to "https://api.github.com"
)'
]
end
def self.category
:source_control
end
end
end
end
| mgrebenets/fastlane-fastlane/lib/fastlane/actions/create_pull_request.rb |
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package nsk.jdi.VirtualMachine.redefineClasses;
import nsk.share.*;
import nsk.share.jpda.*;
import nsk.share.jdi.*;
/**
* <code>redefineclasses020a</code> is deugee's part of the redefineclasses020.
*/
public class redefineclasses020a {
private static Log log;
static redefineclasses020b obj = new redefineclasses020b();
public static void main (String argv[]) {
ArgumentHandler argHandler = new ArgumentHandler(argv);
log = new Log(System.err, argHandler);
IOPipe pipe = argHandler.createDebugeeIOPipe(log);
pipe.println("ready");
String instr = pipe.readln();
if (instr.equals("quit")) {
log.display("completed succesfully.");
System.exit(Consts.TEST_PASSED + Consts.JCK_STATUS_BASE);
}
log.complain("DEBUGEE> unexpected signal of debugger.");
System.exit(Consts.TEST_FAILED + Consts.JCK_STATUS_BASE);
}
}
| md-5/jdk10-test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses020a.java |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* The module for code used to connect to a connection or balancing group.
*/
angular.module('client', [
'auth',
'clipboard',
'element',
'history',
'navigation',
'notification',
'osk',
'rest',
'textInput',
'touch'
]);
| lato333/guacamole-client-guacamole/src/main/webapp/app/client/clientModule.js |
// concat all routes and export them as a single array
import fs from 'fs';
import path from 'path';
const files = fs.readdirSync(__dirname).filter(f => f !== 'index.js' && f.indexOf('test') === -1 && path.extname(f) === '.js');
const routesArr = [];
files.map((file) => {
// eslint-disable-next-line
const routes = require(`./${file}`).default;
return routes.map((oneRoute) => {
const rte = oneRoute;
// tag each route for swagger docs
if (rte.config.tags && typeof rte.config.tags === 'object') {
rte.config.tags.push('api');
} else {
rte.config.tags = ['api'];
}
return routesArr.push(rte);
});
});
export default routesArr;
| kole/hapi-api-starter-routes/index.js |
'use strict';
module.exports = function (obj, destName, altNames) {
if (!obj || !destName || !altNames || !Array.isArray(altNames)) {
return obj;
}
for (var i = 0, j = altNames.length; i < j; i++) {
if (obj[destName]) {
return obj;
}
if (obj[altNames[i]]) {
obj[destName] = obj[altNames[i]];
}
}
return obj;
};
| benurb/node-xl-wrapper-util/altproperty.js |
GroebnerBasis and Polynomial Routines
• To: mathgroup at smc.vnet.net
• Subject: [mg46230] GroebnerBasis and Polynomial Routines
• From: "David Park" <djmp at earthlink.net>
• Date: Thu, 12 Feb 2004 07:15:55 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com
```In the response to my recent question about algebraic manipulation with Mathematica (and thanks to everyone for the replies) I had a private response from Andrzej Kozlowski that I thought was very informative on the usefulness of GroebnerBasis. He gave me permission to pass it along to MathGroup.
____________________________________________________________________________
David,
"Groebner basis" or rather the Buchsberger algorithm is perhaps the
most useful algorithm in all of computer algebra. What it does is let
you perform division of polynomials in more than one variable in a
canonical way. In the case of polynomials in one variable this is
essentially obvious; every body learns it (or used to) in school. But
if you try to think how to do it for polynomials in, say, two variables
you will notice that it is not at all obvious, in fact there is no
natural or canonical way to do this. However, you can do it if you
choose a way of ordering monomials in a sensible way. Each choice of
such an ordering lets you do more than just divide polynomials: what
you can do is replace a system of polynomial equations by another
system which has the same solutions but is "triangular", meaning that
each equation in turn involves fewer variables than the previous one.
This is exactly what a Groebner basis together with polynomial
division with respect to it (PolynomialReduce) does for you. In
practice you no not really need to know much about Groebner basis as
such since many Mathematica functions us it automatically. However, it
is useful to know about how different monomial orderings affect the
outcome: they can make a huge difference to performance. This aspect
is controlled by the option MonomialOrder that you can find in many
algebraic functions that use Groebner basis. (Some, like Solve do not
have this option because they use a special setting called
EliminationOrder). Of course knowing more about Groebner basis gives
you more flexibility in deciding how it is used. The easiest
introduction to all these techniques is:
D. Cox, J. Little, and D. O'Shea (1992). Ideals, Varieties, and
Algorithms: An Introduction to Computational Algebraic Geometry and
Computer Algebra. Undergraduate Texts in Mathematics. Springer-Verlag.
With best regards
Andrzej
```
• Prev by Date: Re: Polylogarithm Integration - Bis
• Next by Date: Re: Re: typesetting fractions
• Previous by thread: Re: FindLast NZ in list
• Next by thread: Re: Re: typesetting fractions | finemath-3plus |
//Module dependencies
var express = require('express')
, http = require('http')
, passport = require('passport')
, util = require('util')
, session = require('express-session')
, cookieParser = require('cookie-parser')
, bodyParser = require('body-parser')
, expressValidator = require('express-validator')
, auth = require("./auth")
, oauth = require("./oauth")
, registration = require("./registration")
// Express configuration
var app = express()
app.set('views', __dirname + '/views')
app.set('view engine', 'jade')
app.use(bodyParser())
app.use(expressValidator())
app.use(cookieParser())
app.use(session({ secret: 'keyboard cat1'}))
app.use(passport.initialize())
app.use(passport.session())
app.get('/client/registration', function(req, res) { res.render('clientRegistration') })
app.post('/client/registration', registration.registerClient)
app.get('/registration', function(req, res) { res.render('userRegistration') })
app.post('/registration', registration.registerUser)
app.get('/oauth/authorization', function(req, res) { res.render('login', {clientId : req.query.clientId, redirectUri: req.query.redirectUri, responseType: req.query.responseType}) })
app.post('/oauth/authorization', passport.authenticate('local', { failureRedirect: '/oauth/authorization' }), function(req, res) {
//It is not essential for the flow to redirect here, it would also be possible to call this directly
res.redirect('/authorization?response_type=' + req.body.responseType + '&client_id=' + req.body.clientId + '&redirect_uri=' + req.body.redirectUri)
})
app.get('/authorization', oauth.authorization)
app.post('/decision', oauth.decision)
app.get('/restricted', passport.authenticate('accessToken', { session: false }), function (req, res) {
res.send("Yay, you successfully accessed the restricted resource!")
})
//Start
http.createServer(app).listen(process.env.PORT || 3000, process.env.IP || "0.0.0.0")
| rtrusky/oauth2orize_implicit_example-app.js |
/**
* A generator for getter-setter-with-change-event functions.
*
* Takes as input an options object, returns an object whose
* properties are getter-setter functions corresponding to
* properties of the options object.
*
* See http://bost.ocks.org/mike/chart/ for a description
* of the setter-getter function pattern.
*
* In addition to this pattern, the functions emit change events.
* To listen, use:
*
* `theFunction.on('change', function (newValue) { ... });`
*
* Backbone events are used, so the Backbone event API is inherited.
*
* The getter-setter pattern with change events enables a
* data flow pattern to be implemented. This means that
* a property can be "piped" into another property or function.
* This is implemented in `getterSetters.connect()`.
*
* By Curran Kelleher
* Last updated 9/16/13
*/
define(['underscore', 'backbone'], function (_, Backbone) {
"use strict";
function getterSetters(options) {
var my = {};
_.each(_.keys(options), function (property) {
var fn = function (value) {
if (!arguments.length) {
return options[property];
}
options[property] = value;
fn.trigger('change', value);
return my;
};
_.extend(fn, Backbone.Events);
my[property] = fn;
});
return my;
}
getterSetters.connect = function (property, fn) {
// Call the function once to initialize the value.
fn(property());
// Call the function when the property changes.
// The new property value is passed as an argument to fn.
property.on('change', fn);
};
return getterSetters;
});
| curran/visualizations-population/js/getterSetters.js |
const defaultEnv = process.env.NODE_ENV || 'development';
function getEnv(name = defaultEnv) {
const isProduction = name === 'production' || name === 'prod';
const isDev = !isProduction;
return { name, isProduction, isDev, getEnv };
}
const env = getEnv();
module.exports = env;
| tofishes/a-rule-utils/env.js |
Finland viser vejen - 600 damekorssangere - 21 kor
Der er altså tale om et mindretal med stor udtrykskraft. Tænk hvis tyskere i Sønderjylland eller svenskere på Østsjælland var ligeså aktive. Det ville berige musiklivet meget.
Den musikalske kvalitet til denne jubilæumskoncert med 21 deltagende kor og 600 sangere i Musikhuset i Helsinki, var meget høj. Den rene intonation hos samtlige kor var simpelthen uovertruffen. Korene var placeret 360 grader rundt, med sang fra scenen, fra "højderne", i kombinationer, "quadrofonisk", kvintetter, oktetter, kor med 50 eller flere, med et repertoire spændende fra Michael Jackson over filmmusik, folketone og Sibelius til nulevende finske dirigenter.
Finland har længe været kendt for at sprøjte dygtige professionelle symfoniorkesterdirigenter ud på verdensmarkedet. Men her ser vi også en fødekæde med sang i musikskolerne og kirkernes ungdomskor, der fortsætter ind i damekorene. Dejligt var det iøvrigt at se, at mange kor havde en overvægt af unge UNDER 30 år.
Det var inspirerende, lærerigt, men også lidt ærgerligt at opdage, at Danmark stort set intet har i denne boldgade. Repertoiret findes, tusindvis af unge piger uddannes i de danske ungdomskor i kirkerne, så det ligger lige til højrebenet at nogle dirigentildsjæle kaster sig over at lave damekor. Musikken var meget hørevenlig. Der var plads til alle fra en ABBA-lignende klangverden til avanceret "symfonisk" kor, som selv mange blandede kor ville have udfordringer med at opføre.Dirigenternes og korenes høje standard afspejler en særdeles god uddannelse. Satses der på god uddannelse kommer resultaterne. Finland viser vejen.
FSDs kunstneriske leder Ia Rönngård har et motto: Ena foten i det förgångna, den andra i framtiden medan huvudet är i nuet! Vi så at mottoet var spillevende i Musikhuset i Helsinki.
Jubilæet hed JUBEL OG KLANG – i musikhuset, i damekorene og hos publikum klinger jubelen endnu.
læs mere her www.fsd.fi | c4-da |
/*************************************************************************/
/* register_types.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef MBEDTLS_REGISTER_TYPES_H
#define MBEDTLS_REGISTER_TYPES_H
void register_mbedtls_types();
void unregister_mbedtls_types();
#endif // MBEDTLS_REGISTER_TYPES_H
| honix/godot-modules/mbedtls/register_types.h |
(Updated on January 1, 2021) Have you ever wondered what to do with all those old, unused calendars and planners stashed somewhere in your house? Good news: You can still use them in the future. All you need to figure out exactly when you can use them is some good old math.
There are two factors that determine the configuration of a specific year’s calendar: The number of days in that year, and the day of the week January 1 will fall on. There are 365 days in a regular year, and 366 days in a leap year. Additionally, each year will start on one of the seven days of the week.
Multiplying the possible types of year (2) by the days of the week (7) will get you 14 calendar variants.
For example, if you had calendars and planners from 1993, 1999, or 2010 lying around, you can use them in 2021, which is not a leap year (and also in 2027—six years from now—if you like planning way, way ahead).
If that sounds neat to you, then you should also hold on to your unused calendars and planners from 2011, because you can use them in 2022. (The lunar events and daylight savings adjustments indicated on your old calendars probably won’t match the new year, of course, but that’s not a big deal, right?)
Still remember your 5th-grade science classes? Test your knowledge and see if you still remember these facts and fundamental concepts in human anatomy, biology, botany, and other branches of science. Click here to try the “Are You Smarter Than A Pinoy Fifth-Grader” Challenge.
#### References
• http://mathforum.org/library/drmath/view/59238.html
• https://brokensecrets.com/2010/01/28/there-are-only-14-possible-calendar-configurations/
• http://whencanireusethiscalendar.com/moreinfo/
• https://www.timeanddate.com/calendar/repeating.html?year=2020
#### Author: Mikael Angelo Francisco
Bitten by the science writing bug, Mikael has years of writing and editorial experience under his belt. As the editor-in-chief of FlipScience, Mikael has sworn to help make science more fun and interesting for geeky readers and casual audiences alike. | finemath-3plus |
প্রধানমন্ত্রীকে কটুক্তি করায় ভোজন বাড়ি রেস্টুরেন্টে হামলা,ভাংচুর – www.ukbdtimes.com
প্রধানমন্ত্রীকে কটুক্তি করায় ভোজন বাড়ি রেস্টুরেন্টে হামলা,ভাংচুর
Published: রবিবার, মে ১৩, ২০১৮ ১১:১২ পূর্বাহ্ণ | Modified: বুধবার, মে ১৬, ২০১৮ ৩:১২ অপরাহ্ণ
সিলেট প্রতিনধিঃসিলেট নগরীর জিন্দাবাজরস্থ ভোজন বাড়ী রেস্টুরেন্টে হামলা ও ভাংচুর চালিয়েছে র্দুবৃত্তরা। রবিবার বেলা দেড়টার দিকে এ হামলার ঘটনা ঘটে।
পুলিশ সুত্র জানিয়েছে, প্রাথমিকভাবে ধারণা করা হচ্ছে জেলা ও মহানগর স্বেচ্ছাসেবকলীগের একটি মিছিলে ভোজনবাড়ী রেস্টুরেন্ট থেকে ইটপাটকেল নিক্ষেপের জের ধরে এ হামলা চালিয়েছে মিছিলে থাকা বিক্ষুব্ধ নেতাকর্মীরা। তবে তদন্ত সাপেক্ষে বিস্তারিত জানা যাবে বলে জানিয়েছে পুলিশ।
এদিকে অপর একটি সুত্র জানিয়েছে- লন্ডনে প্রধানমন্ত্রী শেখ হাসিনাকে নিয়ে কটুক্তির প্রতিবাদে আজ সিলেটে বিক্ষোভ মিছিল করে জেলা ও মহানগর স্বেচ্ছাসেবকলীগ। লন্ডনে প্রধানমন্ত্রীকে নিয়ে কটুক্তিকারী যুক্তরাজ্য বিএনপির সাধারণ সম্পাদক কয়ছর এম আহমেদ ভোজন বাড়ি রেস্টুরেন্টের মালিক ও পরিচালক। এমন ক্ষোভ থেকে এ হামলার ঘটনা ঘটেছে। | c4-bn |
import formatPhoneNumber, { formatPhoneNumberIntl } from './formatPhoneNumberDefaultMetadata'
describe('formatPhoneNumberDefaultMetadata', () => {
it('should format phone numbers', () => {
formatPhoneNumber('+12133734253', 'NATIONAL').should.equal('(213) 373-4253')
formatPhoneNumber('+12133734253', 'INTERNATIONAL').should.equal('+1 213 373 4253')
formatPhoneNumberIntl('+12133734253').should.equal('+1 213 373 4253')
})
}) | halt-hammerzeit/react-phone-number-input-source/formatPhoneNumberDefaultMetadata.test.js |
/*
* Copyright (C) 2011 Samsung Electronics, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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. See the
* GNU General Public License for more details.
*
*/
#ifndef __MACH_SEC_THERMISTOR_H
#define __MACH_SEC_THERMISTOR_H __FILE__
/**
* struct sec_therm_adc_table - adc to temperature table for sec thermistor
* driver
* @adc: adc value
* @temperature: temperature(C) * 10
*/
struct sec_therm_adc_table {
int adc;
int temperature;
};
/**
* struct sec_bat_plaform_data - init data for sec batter driver
* @adc_channel: adc channel that connected to thermistor
* @adc_table: array of adc to temperature data
* @adc_arr_size: size of adc_table
* @polling_interval: interval for polling thermistor (msecs)
* @no_polling: when true, use direct read, no polling work
*/
struct sec_therm_platform_data {
unsigned int adc_channel;
unsigned int adc_arr_size;
struct sec_therm_adc_table *adc_table;
unsigned int polling_interval;
int (*get_siop_level)(int);
bool no_polling;
};
#endif /* __MACH_SEC_THERMISTOR_H */
| davidmueller13/android_kernel_samsung_lt03lte-5-arch/arm/mach-msm/include/mach/sec_thermistor.h |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/**
* @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js
* @description Object.create - argument 'Properties' is the JSON object (15.2.3.7 step 2)
*/
function testcase() {
var result = false;
Object.defineProperty(JSON, "prop", {
get: function () {
result = (this === JSON);
return {};
},
enumerable: true,
configurable: true
});
try {
var newObj = Object.create({}, JSON);
return result && newObj.hasOwnProperty("prop");
} finally {
delete JSON.prop;
}
}
runTestCase(testcase);
| Oceanswave/NiL.JS-Tests/tests/sputnik/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js |
var mongoose = require('mongoose');
var crypto = require('crypto');
var UserSchema = new mongoose.Schema({
name: {
unique: true,
type: String
},
password: String,
// 0: normal user
// 1: verified user
// 2: professional user
// >10: admin
// >50: super admin
role: {
type: Number,
default: 0
}
});
UserSchema.pre('save',function(next){
var user = this;
var md5 = crypto.createHash('md5');
md5.update(this.password);
user.password = md5.digest('hex');
next();
});
UserSchema.methods = {
comparePassword: function(_password,cb){
var password, isMatch = false;
var md5 = crypto.createHash('md5');
md5.update(_password);
_password = md5.digest('hex');
console.log(_password);
if(this.password === _password){
isMatch = true;
}
cb(isMatch);
}
}
module.exports = UserSchema; | bestyxie/design-dev/app/schema/user.js |
# Leveraging the Potential of Novel Data in Power Line Communication of Electricity Grids
Christoph Balada, Sheraz Ahmed, Andreas Dengel, Max Bondorf and Markus Zdrallek
C. Balada, S. Ahmed and A. Dengel are with the German Research Center for Artificial Intelligence (DFKJ), Kaiserslautern, Germany; {christoph.balada, sheraz.ahmed, andreas.dengel}@dfk.dieM. Bondorf and M. Zdrallek are with University of Wuppertal, Wuppertal, Germany;{bondorf, zdrallek}@uni-wuppertal.de
###### Abstract
Electricity grids have become an essential part of daily life, even if they are often not noticed in everyday life. We usually only become particularly aware of this dependence by the time the electricity grid is no longer available. However, significant changes, such as the transition to renewable energy (photovoltaic, wind turbines, etc.) and an increasing number of energy consumers with complex load profiles (electric vehicles, home battery systems, etc.), pose new challenges for the electricity grid. At the same time, these challenges are usually too complex to be solved with traditional approaches. In this gap, where traditional approaches are reaching their limits, Machine Learning has become a popular tool to bridge this shortcoming through data-driven approaches. Machine learning (ML) is a source of untapped potential for a variety of different challenges that the electricity grid will face in the future if we had enough data. To enable novel ML implementations is we propose FIN-2 dataset, the first large-scale real-world broadband powerline communications (PLC) dataset. Encouraged by the pioneering efforts that went into compiling the FIN-1 dataset, we address a limitation of FIN-1, namely the small size and spatial coverage of the data. FIN-2 was collected during real practical use in a part of the German low-voltage grid that supplies energy to over 4.4 million people and shows well over 13 billion data points collected by more than 5100 sensors. In addition, we present different use cases in asset management, grid state visualization, forecasting, predictive maintenance, and novelty detection to highlight the benefits of these types of data. For these applications, we particularly highlight the use of novel machine learning architectures to extract rich information from real-world data that cannot be captured using traditional approaches. By publishing the first large-scale real-world dataset, we also aim to shed light on the previously largely unrecognized potential of PLC data and emphasize machine-learning-based research in low-voltage distribution networks by presenting a variety of different use cases.
Electricity Grid, Power Distribution Systems, Big Data, Machine Learning, Power Line Communication
## I Introduction
Electricity grids play an indispensable role in providing the basic infrastructure for our modern lives. At the same time, electricity grids are currently facing one of the most significant changes since their invention. On the one hand, we have the transition to renewable energies to combat climate change, and on the other hand, there's a rise in digitisation and automation [1, 2] efforts. While the need to change the way energy is generated, transmitted and distributed is obvious from a climate change perspective, the implicit impacts and opportunities of the transition to a smart grid are far more subtle. In this context, Power Line Communication (PLC) has proven to be a reliable foundation for providing a communication infrastructure capable of interconnecting smart grid components such as smart meters [1, 3, 4, 5]. However, in addition to providing a communication infrastructure, PLC can do even more for future smart grid systems [2, 6, 7]. PLC nodes form a distributed measurement network that is able to provide near real-time insights into large parts of the network, and especially into the low-voltage part of the grid. Particularly for low-voltage grids (lv grid), this new possibility of monitoring represents a breakthrough [2]. However, the actual value of this data is still largely unrecognized.
While these challenges posed by the transition to a smart grid are typically too complex to be solved by traditional approaches, Machine Learning (ML) has become a popular tool to bridge this shortcoming through data-driven approaches. Machine Learning is a source of untapped potential for a variety of different challenges that the electricity grid will face in the future if we had enough data. Inspired by the need for more data to implement such novel ML approaches and encouraged by the pioneering efforts that went into compiling the FiN-1 dataset, we present the FiN-2 dataset, which reshapes the standards for publicly available data in this area.
In this paper, we showcase the novel FiN-2 dataset and highlight the benefits of data-driven approaches based on data from FiN-1 and FiN-2 dataset. To enable research in these application areas, we are releasing the FiN-2 dataset, addressing the immense data hunger of modern ML that paves the way to use cases ranging from asset management, grid state visualization, forecasting, predictive maintenance to novelty detection. To underline these use cases, we show several practical examples from different application areas and emphasize the advantages for network operators and other stakeholders.
Inspired by that, we address a limitation of FiN1, namely the low spatial extent and number of sensors and measurements in the PLC network. FiN-2 dataset was collected during real practical use in a part of the German lv grid that supplies energy to over 4.4 million people and shows more than 13 billion data points collected by more than 5100 sensors. We pay particular attention to the signal-to-noise ratio (SNR) measurements between the PLC nodes, and to the voltage measurements at the nodes. Our main contribution is two-fold: first, we present the first large-scale real-world dataset of PLC-based data, paving the way towards more practical smart grid research based on real-world data. Secondly, we give a broadoverview of how ML-based PLC analysis can provide added value in domains like grid monitoring, asset management or anomaly detection.
## II Overview of the proposed FiN datasets
The proposed novel FiN-2 dataset as well as FiN-1 dataset [8] were collected in the context of two successive projects, and consist of SNR spectra of PLC connections complemented by various measurements such as the nodes' voltage under operation. Figure 1 shows an SNR spectrum example for a 1-to-1 PLC connection within the lv grid. Two types of PLC modems were involved in the process of data generation. Data in FiN-1 was solely collected by PLC-repeater-modems installed in local substations and cable distribution cabinets. FiN-2 also includes data from smart meter gateways, which are installed in households. In general, single SNR values indicate the quality of a connection on a single PLC channel, in a single time step. Therefore, the SNR spectrum can be interpreted as the connection quality over the entire bandwidth of the channels over time. The connection quality is influenced by a wide range of different factors including potential interactions between grid components such as fuses, cables, cable joints, street lightning or sources of interference like bad shielded electronics.
FiN-1 as well as FiN-2 dataset hold primarily data from PLC nodes that were distributed in the lv grid. However, FiN-1 also contains some nodes connected to the grid on medium-voltage (mv) level. While FiN-1 covers only 68 PLC connections, FiN-2 involves about 24,000 connections. Nevertheless, both datasets have their respective advantages and focus on different use cases. FiN-2 is well suited for investigating effects affecting large areas of the electricity grid due to the large footprint of the numerous nodes and FiN-1, with its wider range of metadata, is better suited for investigating individual connections. Table I summarizes the key characteristics of both datasets.
Another aspect is the location of the PLC nodes. As FiN-1 was a pilot project, all nodes are located in three areas that show typical urban and suburban surroundings. While FiN-2 covers most of the nodes installed during FiN-1, the number of nodes significantly increased. Therefore, FiN-2 shows a wide range of different environments such as urban, suburban, rural, industrial, downtown, small villages, etc. FiN-2 locations connect around 4.4 million customers. The following sections present an outline of both datasets regarding the data that is published. | 2209.12693v3.mmd |
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para longurl (acortador de url)
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core import scrapertools
from core import logger
from core import config
import urllib
DEBUG = config.get_setting("debug")
def get_server_list():
servers =[]
data = scrapertools.downloadpage("http://longurl.org/services")
data = scrapertools.unescape(data)
data = scrapertools.get_match(data,'<ol>(.*?)</ol>')
patron='<li>(.*?)</li>'
matches = re.compile(patron,re.DOTALL).findall(data)
#añadiendo algunos manualmente que no salen en la web
servers.append("sh.st")
for server in matches:
servers.append(server)
return servers
def get_long_urls(data):
logger.info("[longurl.py] get_long_urls ")
patron = '<a href="http://([^"]+)"'
matches = re.compile(patron,re.DOTALL).findall(data)
for short_url in matches:
if short_url.startswith(tuple(get_server_list())):
short_url="http://"+short_url
logger.info(short_url)
longurl_data = scrapertools.downloadpage("http://longurl.org/expand?url="+urllib.quote_plus(short_url))
if DEBUG: logger.info(longurl_data)
longurl_data = scrapertools.get_match(longurl_data,'<dt>Long URL:</dt>(.*?)</dd>')
long_url = scrapertools.get_match(longurl_data,'<a href="(.*?)">')
if (long_url<> ""):data=data.replace(short_url,long_url)
return data
def test():
location = get_long_urls("http://sh.st/saBL8")
ok = ("meuvideos.com" in location)
print "Funciona:",ok
return ok | prds21/repository-barrialTV-servers/longurl.py |
List of Private Schools in Mandya, Top Best Private Schools in Mandya, Indian Private Schools in Mandya
Home » Schools in India » List of Private Schools in Mandya
List of Private Schools in Mandya
Bharathi High School PRIVATE MANDYA Karnataka
Bharathi Higher Primary School PRIVATE MANDYA Karnataka
De Paul International Residential School PRIVATE MANDYA Karnataka
Geetha High School PRIVATE MANDYA Karnataka
Geethanjali Higher Primary School PRIVATE MANDYA Karnataka
Green Valley Central School PRIVATE MANDYA Karnataka
Green Valley Educational Institution PRIVATE MANDYA Karnataka
Kaveri Girls High School PRIVATE MANDYA Karnataka
Mandavya Engish Medium High School PRIVATE MANDYA Karnataka
Sri Kalikamba High School PRIVATE MANDYA Karnataka | c4-af |
# Thread: Tangent to a surface
1. ## Tangent to a surface
Just wondering if someone would be able to confirm if my answer is correct or where I've gone wrong?
I've never really done anything like this before so I'm not sure if I'm even remotely on the right track.
1. Find the equation of the tangent plane to the surface
at the point
Here's my solution:
Hope someone can help...Thanks
2. I did not read it the moment I saw your first line.
The gradient is not a real number! It is a vector. For example given $\displaystyle f(x,y,z) = C$ then $\displaystyle \nabla f = \partial_x f\bold{i}+ \partial_y f\bold{j}+ \partial_z f\bold{k}$ (where $\displaystyle \partial_x$ means partial derivative along $\displaystyle x$ and so on ... ). Notice this is not a number, it is a vector.
Here are the steps.
1)Given $\displaystyle f(x,y,z)=C$.
2)Find $\displaystyle \nabla f(x,y,z)$.
3)Evaluate this gradient at the specific point you are given.
4)The vector in #3 is orthogonal to the surface. Therefore, it is the normal to the tangent plane to the surface at this point. Since you know the normal vector and the point you can describe the tangent plane.
3. Thanks for that .
I'm still getting my head around the whole 3 plane thing at the moment.
Why is the gradient vector orthogonal to the surface? Isn't it by definition equal to the tangent in that particular plane?
4. Is this any better for the gradient of the function at the particular point?
I got this by differentiating each variable then replacing x,y,z with the value at the particular point.
I know it's not very well refined (having fractions within fractions) but I'll fix this up later.
5. What you have is not the equation of a plain.
What TPH said can be condensed into one formula. you have a level curve here.
recall that, for a level curve $\displaystyle F(x,y,z) = k$ for $\displaystyle k \in \mathbb{R}$, the tangent plane to the surface at a point $\displaystyle (x_0,y_0,z_0)$ is given by:
$\displaystyle F_x(x - x_0) + F_y(y - y_0) + F_z(z - z_0) = 0$
where $\displaystyle F_x, Fy \mbox{ and } F_z$ and the partial derivatives of $\displaystyle F(x,y,z)$ with respect to x,y, and z respectively, at the point $\displaystyle (x_0,y_0,z_0)$
now try the problem again
6. And this equation will give the tangent in the form of (i,j,k)?
Ok I'm going to forget everything I've done so far and try to start again. Thanks for being patient with me. I know this is prob so easy for someone people it's hard to understand why I don't get it .
Sooo...
The tangent plane to a level curve is given by
Where:
x= (x^2)/25
y= (y^2)/4
z= (z^2)/4
fx = 2x/25
fy = 2y/4
fz = 2z/4
Xo = 1
Yo = (4root3)/5
Zo = (4root3)/5
I'll give it a shot and hope for the best. Thanks again!!
7. Originally Posted by Spimon
x= (x^2)/25
y= (y^2)/4
z= (z^2)/4
no. this is not so. F(x,y,z) = (x^2)/25 + (y^2)/4 + (z^2)/4
but everything else is ok. post your solution when you're done, so we can check it
8. Originally Posted by Jhevon
$\displaystyle F_x(x - x_0) + F_y(y - y_0) + F_z(z - z_0) = 0$
where $\displaystyle F_x, Fy \mbox{ and } F_z$ and the partial derivatives of $\displaystyle F(x,y,z)$ with respect to x,y, and z respectively, at the point $\displaystyle (x_0,y_0,z_0)$
This was the part that confused me. I read that as 'the partial derivative multiplied by the different of the function value and the point value.
From your next post I guess it should mean 'the function value multiplied by the different of the partial derivative and the point value.
Hoooopefully this is more on track . I'm going to get this sooner or later...
9. Ok, since you have really been working hard at this, i'll do it for you.
remember what i said
Originally Posted by Jhevon
... the tangent plane to the surface at a point $\displaystyle (x_0,y_0,z_0)$ is given by:
$\displaystyle F_x(x - x_0) + F_y(y - y_0) + F_z(z - z_0) = 0$
where $\displaystyle F_x, Fy \mbox{ and } F_z$ and the partial derivatives of $\displaystyle F(x,y,z)$ with respect to x,y, and z respectively, at the point $\displaystyle \bold{ \color{red}(x_0,y_0,z_0)}$
$\displaystyle F(x,y,z) = \frac {x^2}{25} + \frac {y^2}4 + \frac {z^2}4 = 1$
$\displaystyle \Rightarrow F_x = \frac 2{25}x$
$\displaystyle \Rightarrow F_x \left( 1, \frac {4 \sqrt{3}}5, \frac {4 \sqrt {3}}5\right) = \boxed{ \frac 2{25}}$
$\displaystyle \Rightarrow F_y = \frac 12 y$
$\displaystyle \Rightarrow F_y \left( 1, \frac {4 \sqrt{3}}5, \frac {4 \sqrt {3}}5\right) = \boxed{ \frac {2 \sqrt{3}}5}$
$\displaystyle \Rightarrow F_z = \frac 12 z$
$\displaystyle \Rightarrow F_z \left( 1, \frac {4 \sqrt{3}}5, \frac {4 \sqrt {3}}5\right) = \boxed{ \frac {2 \sqrt{3}}5}$
Recall that $\displaystyle (x_0,y_0,z_0) = \left( 1, \frac {4 \sqrt{3}}5, \frac {4 \sqrt {3}}5\right)$
Thus, the tangent plain is given by:
$\displaystyle F_x(x - x_0) + F_y(y - y_0) + F_z(z - z_0) = 0$
$\displaystyle \Rightarrow \boxed{ \frac 2{25}(x - 1) + \frac {2 \sqrt{3}}5 \left( y - \frac {4 \sqrt{3}}5 \right) + \frac {2 \sqrt{3}}5 \left( z - \frac {4 \sqrt{3}}5\right) = 0}$
and you can expand this if you wish and write it in the form: $\displaystyle ax + by + cz = d$, where $\displaystyle a,b,c, \mbox{ and }d$ are constants
the above is not a vector, it is a plane. i noticed you had i,j,k notation in one of your answers above, that's wrong
10. Thanks so much! I guess I'm still getting my head around this 3d calculus stuff. I'll study your solution and try to make sense of it. Thanks again | finemath-3plus |
/*
* This file is part of PlipUltimate.
* License: GPLv2
* Full license: https://github.com/tehKaiN/plipUltimate/blob/master/LICENSE
* Authors list: https://github.com/tehKaiN/plipUltimate/blob/master/AUTHORS
*/
#ifndef PINOUT_H
#define PINOUT_H
/// LED-related defines
#define LED_DDR DDRC
#define LED_PORT PORTC
#define LED_STATUS_PIN PC5
#define LED_STATUS _BV(LED_STATUS_PIN)
/// Parallel status bits
#define PAR_NSTROBE_PIN PC0
#define PAR_NACK_PIN PC1
#define PAR_BUSY_PIN PC2
#define PAR_POUT_PIN PC3
#define PAR_SEL_PIN PC4
#define PAR_NSTROBE _BV(PAR_NSTROBE_PIN)
#define PAR_NACK _BV(PAR_NACK_PIN)
#define PAR_BUSY _BV(PAR_BUSY_PIN)
#define PAR_POUT _BV(PAR_POUT_PIN)
#define PAR_SEL _BV(PAR_SEL_PIN)
#define PAR_STATUS_PORT PORTC
#define PAR_STATUS_DDR DDRC
#define PAR_STATUS_PIN PINC
#define PAR_STATUS_MASK (PAR_NSTROBE | PAR_NACK | PAR_BUSY | PAR_POUT | PAR_SEL)
/// Parallel data bits
#define PAR_DATA_PORT PORTD
#define PAR_DATA_DDR DDRD
#define PAR_DATA_PIN PIND
/// SPI devices pins
#define SD_LOCK _BV(PB0)
#define SD_CS _BV(PB1)
#define ETH_CS _BV(PB2)
#define SPI_MOSI _BV(PB3)
#define SPI_MISO _BV(PB4)
#define SPI_SCK _BV(PB5)
// PB6 is used as XTAL1
#define SD_DETECT _BV(PB7)
#define SPI_PORT PORTB
#define SPI_PIN PINB
#define SPI_DDR DDRB
#endif // PINOUT_H
| tehKaiN/plipUltimate-inc/main/pinout.h |
'use strict';
exports.__esModule = true;
var _createHelper = require('./createHelper');
var _createHelper2 = _interopRequireDefault(_createHelper);
var _createEagerFactory = require('./createEagerFactory');
var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var identity = function identity(Component) {
return Component;
};
var branch = function branch(test, left) {
var right = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : identity;
return function (BaseComponent) {
var leftFactory = void 0;
var rightFactory = void 0;
return function (props) {
if (test(props)) {
leftFactory = leftFactory || (0, _createEagerFactory2.default)(left(BaseComponent));
return leftFactory(props);
}
rightFactory = rightFactory || (0, _createEagerFactory2.default)(right(BaseComponent));
return rightFactory(props);
};
};
};
exports.default = (0, _createHelper2.default)(branch, 'branch'); | civiclee/Hack4Cause2017-src/wics/node_modules/recompose/branch.js |
;( function( $, window, undefined ) {
'use strict';
$.CatSlider = function( options, element ) {
this.$el = $( element );
this._init( options );
};
$.CatSlider.prototype = {
_init : function( options ) {
// the categories (ul)
this.$categories = this.$el.children( 'ul' );
// the navigation
this.$navcategories = this.$el.find( 'nav > a' );
var animEndEventNames = {
'WebkitAnimation' : 'webkitAnimationEnd',
'OAnimation' : 'oAnimationEnd',
'msAnimation' : 'MSAnimationEnd',
'animation' : 'animationend'
};
// animation end event name
this.animEndEventName = animEndEventNames[ Modernizr.prefixed( 'animation' ) ];
// animations and transforms support
this.support = Modernizr.csstransforms && Modernizr.cssanimations;
// if currently animating
this.isAnimating = false;
// current category
this.current = 0;
var $currcat = this.$categories.eq( 0 );
if( !this.support ) {
this.$categories.hide();
$currcat.show();
}
else {
$currcat.addClass( 'mi-current' );
}
// current nav category
this.$navcategories.eq( 0 ).addClass( 'mi-selected' );
// initialize the events
this._initEvents();
},
_initEvents : function() {
var self = this;
this.$navcategories.on( 'click.catslider', function() {
self.showCategory( $( this ).index() );
return false;
} );
// reset on window resize..
$( window ).on( 'resize', function() {
self.$categories.removeClass().eq( 0 ).addClass( 'mi-current' );
self.$navcategories.eq( self.current ).removeClass( 'mi-selected' ).end().eq( 0 ).addClass( 'mi-selected' );
self.current = 0;
} );
},
showCategory : function( catidx ) {
if( catidx === this.current || this.isAnimating ) {
return false;
}
this.isAnimating = true;
// update selected navigation
this.$navcategories.eq( this.current ).removeClass( 'mi-selected' ).end().eq( catidx ).addClass( 'mi-selected' );
var dir = catidx > this.current ? 'right' : 'left',
toClass = dir === 'right' ? 'mi-moveToLeft' : 'mi-moveToRight',
fromClass = dir === 'right' ? 'mi-moveFromRight' : 'mi-moveFromLeft',
// current category
$currcat = this.$categories.eq( this.current ),
// new category
$newcat = this.$categories.eq( catidx ),
$newcatchild = $newcat.children(),
lastEnter = dir === 'right' ? $newcatchild.length - 1 : 0,
self = this;
if( this.support ) {
$currcat.removeClass().addClass( toClass );
setTimeout( function() {
$newcat.removeClass().addClass( fromClass );
$newcatchild.eq( lastEnter ).on( self.animEndEventName, function() {
$( this ).off( self.animEndEventName );
$newcat.addClass( 'mi-current' );
self.current = catidx;
var $this = $( this );
// solve chrome bug
self.forceRedraw( $this.get(0) );
self.isAnimating = false;
} );
}, $newcatchild.length * 90 );
}
else {
$currcat.hide();
$newcat.show();
this.current = catidx;
this.isAnimating = false;
}
},
// based on http://stackoverflow.com/a/8840703/989439
forceRedraw : function(element) {
if (!element) { return; }
var n = document.createTextNode(' '),
position = element.style.position;
element.appendChild(n);
element.style.position = 'relative';
setTimeout(function(){
element.style.position = position;
n.parentNode.removeChild(n);
}, 25);
}
}
$.fn.catslider = function( options ) {
var instance = $.data( this, 'catslider' );
if ( typeof options === 'string' ) {
var args = Array.prototype.slice.call( arguments, 1 );
this.each(function() {
instance[ options ].apply( instance, args );
});
}
else {
this.each(function() {
instance ? instance._init() : instance = $.data( this, 'catslider', new $.CatSlider( options, this ) );
});
}
return instance;
};
} )( jQuery, window ); | thazinthein/MLit-wp-content/themes/maglit/js/jquery.catslider.js |
/*global describe, beforeEach, it*/
'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
describe('bower-amd generator', function () {
beforeEach(function (done) {
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
}
this.app = helpers.createGenerator('bower-amd:app', [
'../../app'
]);
done();
}.bind(this));
});
it('creates expected files', function (done) {
var expected = [
// add files you expect to exist here.
'.jshintrc',
'.editorconfig'
];
helpers.mockPrompt(this.app, {
'someOption': true
});
this.app.options['skip-install'] = true;
this.app.run({}, function () {
helpers.assertFiles(expected);
done();
});
});
});
| simonfan/generator-bower-amd-test/test-creation.js |
using System;
using System.Drawing;
using System.IO;
using System.Threading;
namespace PreviewIo
{
internal class PreviewContext
{
public event EventHandler ViewPortChanged;
public event EventHandler PreviewRequired;
public Rectangle ViewPort { get; private set; }
public bool DisplayPreview { get; private set; }
public Stream FileStream { get; private set; }
public PreviewSettings Settings { get; }
public CancellationTokenSource TokenSource { get; private set; }
public Size? DrawingSize { get; set; }
public FileDetail FileDetail { get; private set; }
public PreviewContext()
{
TokenSource = new CancellationTokenSource();
Settings = new PreviewSettings();
}
public void OnViewPortChanged(Rectangle newSize)
{
ViewPort = newSize;
ViewPortChanged?.Invoke(this, EventArgs.Empty);
}
public void OnPreviewRequired(Stream stream, FileDetail fileDetail)
{
if (stream == null)
throw new ArgumentNullException("stream");
if (fileDetail == null)
throw new ArgumentNullException("fileDetail");
if (!stream.CanRead)
throw new ArgumentException("Stream must be readable", "stream");
TokenSource.Cancel();
TokenSource = new CancellationTokenSource();
FileStream = stream;
FileDetail = fileDetail;
DisplayPreview = true;
PreviewRequired?.Invoke(this, EventArgs.Empty);
}
public Size GetPreviewSize()
{
return _IncreaseSizeForPrint(DrawingSize) ?? Size.Empty;
}
private Size? _IncreaseSizeForPrint(Size? drawingSize)
{
if (drawingSize == null)
return null;
var size = drawingSize.Value;
return new Size(size.Width * Settings.UpScaleForPrint, size.Height * Settings.UpScaleForPrint);
}
public void RecalculateDrawingSize(Size upscaledPreviewSize)
{
if (Settings.UpScaleForPrint <= 0)
throw new InvalidOperationException("Settings.UpScaleForPrint must be a positive number");
var actualSize = new Size(
upscaledPreviewSize.Width / Settings.UpScaleForPrint,
upscaledPreviewSize.Height / Settings.UpScaleForPrint);
var previousDrawingSize = DrawingSize;
DrawingSize = actualSize;
if (previousDrawingSize == null || previousDrawingSize.Value.Width == 0 || previousDrawingSize.Value.Height == 0)
return;
//work out the actual scale of the preview compared to the requested size
var scale = new SizeF(
((float)actualSize.Width / previousDrawingSize.Value.Width) * Settings.UpScaleForPrint,
((float)actualSize.Height / previousDrawingSize.Value.Height) * Settings.UpScaleForPrint);
var mostAppropriateScale = _GetMostAppropriateScale(scale);
if (mostAppropriateScale == 0)
mostAppropriateScale = 1;
//reset the drawing size to that of the preview
DrawingSize = new Size(
upscaledPreviewSize.Width / mostAppropriateScale,
upscaledPreviewSize.Height / mostAppropriateScale);
}
private int _GetMostAppropriateScale(SizeF scale)
{
var widthScale = Math.Abs(Settings.UpScaleForPrint - scale.Width);
var heightScale = Math.Abs(Settings.UpScaleForPrint - scale.Height);
if (widthScale < heightScale)
return (int)scale.Height;
return (int)scale.Width;
}
}
}
| laingsimon/preview-io-PreviewIo/PreviewContext.cs |
using System;
namespace Acr.UserDialogs
{
public class ConfirmConfig : IStandardDialogConfig, IAndroidStyleDialogConfig
{
public static bool DefaultUseYesNo { get; set; }
public static string DefaultYes { get; set; } = "Yes";
public static string DefaultNo { get; set; } = "No";
public static string DefaultOkText { get; set; } = "Ok";
public static string DefaultCancelText { get; set; } = "Cancel";
public static int? DefaultAndroidStyleId { get; set; }
public string Title { get; set; }
public string Message { get; set; }
public int? AndroidStyleId { get; set; } = DefaultAndroidStyleId;
public Action<bool> OnAction { get; set; }
//public bool UwpCancelOnEscKey { get; set; }
//public bool UwpSubmitOnEnterKey { get; set; }
public string OkText { get; set; } = !DefaultUseYesNo ? DefaultOkText : DefaultYes;
public string CancelText { get; set; } = !DefaultUseYesNo ? DefaultCancelText : DefaultNo;
public ConfirmConfig UseYesNo()
{
this.OkText = DefaultYes;
this.CancelText = DefaultNo;
return this;
}
public ConfirmConfig SetTitle(string title)
{
this.Title = title;
return this;
}
public ConfirmConfig SetMessage(string message)
{
this.Message = message;
return this;
}
public ConfirmConfig SetOkText(string text)
{
this.OkText = text;
return this;
}
public ConfirmConfig SetAction(Action<bool> action)
{
this.OnAction = action;
return this;
}
public ConfirmConfig SetCancelText(string text)
{
this.CancelText = text;
return this;
}
}
}
| aritchie/userdialogs-src/Acr.UserDialogs/ConfirmConfig.cs |
#!/usr/bin/env python
import optparse
import glob
import os
from collections import Counter # multiset represented by dictionary
# This function simply computes the unigram precision of the MT system
# output against the human reference translation. That is, it counts up the
# number of words in common between the system and reference (sentence by
# sentence), and divides by the total number of words output by the system.
# The goal of this assignment: find a better way to score the system!
# Note: system and ref are both lists of tuples of words (sentences).
def score(system, ref):
matched_words = sum([sum((Counter(s) & Counter(r)).values()) for (s,r) in zip(system, ref)])
return float(matched_words) / sum([len(sentence) for sentence in system])
optparser = optparse.OptionParser()
optparser.add_option("-d", "--data-dir", dest="data", default="data/dev", help="Directory containing system outputs")
(opts,_) = optparser.parse_args()
(source, reference) = (opts.data + "/source", opts.data + "/reference")
ref = [line.split() for line in open(reference)]
# read and score each system and output ordered by score
sys_scores = [(os.path.basename(f), score([line.split() for line in open(f)], ref)) for f in glob.glob(opts.data + "/*") if f != reference and f != source]
for (sysname, score) in sorted(sys_scores, key=lambda x: -x[1]):
if sysname != 'source' and sysname != 'reference':
print sysname
| bjamil/MT-HW3-evaluator/evaluate.py |
// Code generated by go-swagger; DO NOT EDIT.
package experiment_model
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"strconv"
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// APIExperiment api experiment
// swagger:model apiExperiment
type APIExperiment struct {
// Output. The time that the experiment created.
// Format: date-time
CreatedAt strfmt.DateTime `json:"created_at,omitempty"`
// Optional input field. Describing the purpose of the experiment
Description string `json:"description,omitempty"`
// Output. Unique experiment ID. Generated by API server.
ID string `json:"id,omitempty"`
// Required input field. Unique experiment name provided by user.
Name string `json:"name,omitempty"`
// Optional input field. Specify which resource this run belongs to.
// For Experiment, the only valid resource reference is a single Namespace.
ResourceReferences []*APIResourceReference `json:"resource_references"`
// Output. Specifies whether this experiment is in archived or available state.
StorageState APIExperimentStorageState `json:"storage_state,omitempty"`
}
// Validate validates this api experiment
func (m *APIExperiment) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCreatedAt(formats); err != nil {
res = append(res, err)
}
if err := m.validateResourceReferences(formats); err != nil {
res = append(res, err)
}
if err := m.validateStorageState(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *APIExperiment) validateCreatedAt(formats strfmt.Registry) error {
if swag.IsZero(m.CreatedAt) { // not required
return nil
}
if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
return err
}
return nil
}
func (m *APIExperiment) validateResourceReferences(formats strfmt.Registry) error {
if swag.IsZero(m.ResourceReferences) { // not required
return nil
}
for i := 0; i < len(m.ResourceReferences); i++ {
if swag.IsZero(m.ResourceReferences[i]) { // not required
continue
}
if m.ResourceReferences[i] != nil {
if err := m.ResourceReferences[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("resource_references" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *APIExperiment) validateStorageState(formats strfmt.Registry) error {
if swag.IsZero(m.StorageState) { // not required
return nil
}
if err := m.StorageState.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("storage_state")
}
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *APIExperiment) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *APIExperiment) UnmarshalBinary(b []byte) error {
var res APIExperiment
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
| kubeflow/pipelines-backend/api/go_http_client/experiment_model/api_experiment.go |
define({
"id": "ID",
"state": "Εξ' ορισμού, οι συντεταγμένες θα εμφανίζονται στο σύστημα συντεταγμένων του χάρτη. Για να λάβετε τις συντεταγμένες σε άλλα συστήματα συντεταγμένων, θα πρέπει να τα προσθέσετε και να ορίσετε τους κατάλληλους μετασχηματισμούς.",
"outputUnit": "Μονάδα μέτρησης",
"wkid": "WKID",
"label": "Όνομα συστήματος συντεταγμένων",
"transformationWkid": "WKID μετασχηματισμού",
"transformationLabel": "Ετικέτα μετασχηματισμού",
"transformForward": "Μετασχηματισμός προς τα εμπρός",
"actions": "Ενέργειες",
"warning": "Καταχωρίστε έγκυρο WKID χωρικής αναφοράς!",
"tfWarning": "Καταχωρίστε έγκυρο WKID datum μετασχηματισμού!",
"spinnerLabel": "Στρογγυλοποίηση συντεταγμένων σε: ",
"decimalPlace": "δεκαδικά ψηφία",
"separator": "Εμφάνιση διαχωριστικών χιλιάδων",
"getVersionError": "Δεν είναι δυνατή η λήψη της έκδοσης του Geometry Service",
"add": "Προσθήκη συστήματος συντεταγμένων",
"edit": "Επεξεργασία συστήματος συντεταγμένων",
"output": "Σύστημα συντεταγμένων",
"cName": "Όνομα συστήματος συντεταγμένων",
"units": "Μονάδες εμφάνισης: ",
"datum": "Μετασχηματισμός Datum",
"tName": "Όνομα μετασχηματισμού",
"tWKIDPlaceHolder": "WKID του μετασχηματισμού",
"forward": "Χρήση μετασχηματισμού προς τα εμπρός",
"ok": "ΟΚ",
"cancel": "Ακύρωση",
"olderVersion": "Το Geometry Service δεν υποστηρίζει τη λειτουργία μετασχηματισμού",
"REPEATING_ERROR": " Το σύστημα συντεταγμένων υπάρχει στη λίστα.",
"Default": "Προκαθορισμένο",
"Inches": "Ίντσες",
"Foot": "Πόδια",
"Yards": "Γιάρδες",
"Miles": "Μίλια",
"Nautical_Miles": "Ναυτικά μίλια",
"Millimeters": "Χιλιοστά",
"Centimeters": "Εκατοστά",
"Meter": "Μέτρα",
"Kilometers": "Χιλιόμετρα",
"Decimeters": "Δεκατόμετρα",
"Decimal_Degrees": "Δεκαδικές Μοίρες",
"Degree_Minutes_Seconds": "Μοίρες Λεπτά Δευτερόλεπτα",
"MGRS": "MGRS",
"USNG": "USNG",
"displayOrderLonLatTips": "Σειρά εμφάνισης συντεταγμένων:",
"lonLatTips": "Γεωγραφικό πλάτος / Γεωγραφικό μήκος(X, Y)",
"latLonTips": "Γεωγραφικό πλάτος / Γεωγραφικό μήκος(Y, X)"
}); | cmccullough2/cmv-wab-widgets-wab/2.3/widgets/Coordinate/setting/nls/el/strings.js |
// (C) Copyright John Maddock 2001 - 2002.
// (C) Copyright Aleksey Gurtovoy 2002.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
// MPW C++ compilers setup:
# if defined(__SC__)
# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)
# elif defined(__MRC__)
# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)
# else
# error "Using MPW compiler configuration by mistake. Please update."
# endif
//
// MPW 8.90:
//
#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG)
# define BOOST_NO_CV_SPECIALIZATIONS
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
# define BOOST_NO_INTRINSIC_WCHAR_T
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# define BOOST_NO_USING_TEMPLATE
# define BOOST_NO_CWCHAR
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */
#endif
//
// C++0x features
//
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
//
#define BOOST_NO_AUTO_DECLARATIONS
#define BOOST_NO_AUTO_MULTIDECLARATIONS
#define BOOST_NO_CHAR16_T
#define BOOST_NO_CHAR32_T
#define BOOST_NO_CONCEPTS
#define BOOST_NO_CONSTEXPR
#define BOOST_NO_DECLTYPE
#define BOOST_NO_DEFAULTED_FUNCTIONS
#define BOOST_NO_DELETED_FUNCTIONS
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_LAMBDAS
#define BOOST_NO_NULLPTR
#define BOOST_NO_RAW_LITERALS
#define BOOST_NO_RVALUE_REFERENCES
#define BOOST_NO_SCOPED_ENUMS
#define BOOST_NO_STATIC_ASSERT
#define BOOST_NO_TEMPLATE_ALIASES
#define BOOST_NO_UNICODE_LITERALS
#define BOOST_NO_VARIADIC_TEMPLATES
//
// versions check:
// we don't support MPW prior to version 8.9:
#if MPW_CPLUS < 0x890
# error "Compiler not supported or configured - please reconfigure"
#endif
//
// last known and checked version is 0x890:
#if (MPW_CPLUS > 0x890)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# endif
#endif
| Misterblue/LookingGlass-Viewer-lib/boost_1_40_0/boost/config/compiler/mpw.hpp |
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import "NSObject.h"
@class NSArray, NSMutableArray;
@interface GEOVoltaireRasterTileTrafficData : NSObject
{
CDStruct_912cb5d2 *_vertices;
NSMutableArray *_trafficSegments;
NSArray *_trafficIncidents;
double _expirationTime;
}
+ (double)expirationTimeInterval;
+ (id)createWithData:(id)arg1 tileKey:(const struct _GEOTileKey *)arg2;
@property(readonly, nonatomic) NSArray *trafficIncidents; // @synthesize trafficIncidents=_trafficIncidents;
@property(nonatomic) double expirationTime; // @synthesize expirationTime=_expirationTime;
@property(retain, nonatomic) NSMutableArray *trafficSegments; // @synthesize trafficSegments=_trafficSegments;
@property(nonatomic) CDStruct_912cb5d2 *vertices; // @synthesize vertices=_vertices;
- (void)dealloc;
- (id)initWithData:(id)arg1 tileKey:(const struct _GEOTileKey *)arg2;
@end
| matthewsot/CocoaSharp-Headers/PrivateFrameworks/GeoServices/GEOVoltaireRasterTileTrafficData.h |
module.exports = {
dist: {
options: {
mainConfigFile: 'app/main.js',
out: '.tmp/flicks.js',
name: 'main',
optimize: 'none'
}
}
};
| buzz/flicks-flicksfrontend/grunt/requirejs.js |
# COVID-Robot: Monitoring Social Distancing Constraints in Crowded Scenarios
Adarsh Jagan Sathyamoorthy, Utsav Patel, Yash Ajay Savle\({}^{*}\), Moumita Paul\({}^{*}\) and Dinesh Manocha.
* Authors contributed equally.
###### Abstract
Maintaining social distancing norms between humans has become an indispensable precaution to slow down the transmission of COVID-19. We present a novel method to automatically detect pairs of humans in a crowded scenario who are not adhering to the social distance constraint, i.e. about 6 feet of space between them. Our approach makes no assumption about the crowd density or pedestrian walking directions. We use a mobile robot with commodity sensors, namely an RGB-D camera and a 2-D lidar to perform collision-free navigation in a crowd and estimate the distance between all detected individuals in the camera's field of view. In addition, we also equip the robot with a thermal camera that wirelessly transmits thermal images to a security/healthcare personnel who monitors if any individual exhibits a higher than normal temperature. In indoor scenarios, our mobile robot can also be combined with static mounted CCTV cameras to further improve the performance in terms of number of social distancing breaches detected, accurately pursuing walking pedestrians etc. We highlight the performance benefits of our approach in different static and dynamic indoor scenarios.
COVID-19 pandemic, Social Distancing, Collision Avoidance.
## I Introduction
The COVID-19 pandemic has caused significant disruption to daily life around the world. As of August 10, 2020, there have been \(19.8\) million confirmed cases worldwide with more than \(730\) thousand fatalities. Furthermore, this pandemic has caused significant economic and social impacts.
At the moment, one of the best ways to prevent contracting COVID-19 is to avoid being exposed to the coronavirus. Organizations such as the Centers for Disease Control and Prevention (CDC) have recommended many guidelines including maintaining social distancing, wearing masks or other facial coverings, and frequent hand washing to reduce the chances of contracting or spreading the virus. Broadly, social distancing refers to the measures taken to reduce the frequency of people coming into contact with others and to maintain at least 6 feet of distance between individuals who are not from the same household. Several groups have simulated the spread of the virus and shown that social distancing can significantly reduce the total number of infected cases [1, 2, 3, 4, 5].
A key issue is developing guidelines and methods to enforce these social distance constraints in public or private gatherings at indoor or outdoor locations. This gives rise to many challenges including, framing reasonable rules that people can follow when they use public places such as supermarkets, pharmacies, railway and bus stations, spaces for recreation and essential work, and how people can be encouraged to follow the new rules. In addition, it is also crucial to detect when such rules are breached so that appropriate counter-measures can be employed. Detecting social distancing breaches could also help in contact tracing [6].
Many technologies have been proposed for detecting excessive crowding or conducting contact tracing, and most of them use some form of communication. Examples of this communication include WiFi, Bluetooth, tracking based on cellular connectivity, RFID, Ultra Wide Band (UWB) etc. Most of these technologies work well only in indoor scenes, though cellular have been used outdoors for tracking pedestrians. In addition, many of these technologies such as RFID, UWB, etc. require additional infrastructure or devices to track people indoors. In other cases, technologies such as WiFi and Bluetooth are useful in tracking only those people connected to the technologies using wearable devices or smartphones. This limits their usage for tracking crowds and social distancing norms in general environments or public places, and may hinder the use of any kind of counter-measures.
**Main Results:** We present a vision-guided mobile robot (COVID-robot) to monitor scenarios with low or high-density crowds and prolonged contact between individuals. We use a state-of-the-art algorithm for autonomous collision-free navigation of the robot in arbitrary scenarios that uses a hybrid combination of a Deep Reinforcement Learning (DRL)
Figure 1: Our robot detecting non-compliance to social distancing norms, classifying non-compliant pedestrians into groups and autonomously navigating to the group with currently the most people in it (a group with 3 people in this scenario). The robot encourages the non-compliant pedestrians to move apart and maintain at least 6 feet of social distance by displaying a message on the mounted screen. Our COVID-robot also captures thermal images of the scene and transmits them to appropriate security/healthcare personnel.
method and traditional model-based method. We use pedestrian detection and tracking algorithms to detect groups of people in the camera's Field Of View (FOV) that are closer than 6 feet from each other. Once social distance breaches are detected, the robot prioritizes groups based on their size, navigates to the largest group and encourages following of social distancing norms by displaying an alert message on a mounted screen. For mobile pedestrians who are non-compliant, the robot tracks and pursues them with warnings.
Our COVID-robot uses inexpensive visual sensors such as an RGB-D camera and a 2-D lidar to navigate and to classify pedestrians that violate social distance constraints as _non-compliant_ pedestrians. In indoor scenarios, our COVID-robot uses the CCTV camera setup (if available) to further improve the detection accuracy and check a larger group of pedestrians for social distance constraint violations. We also use a thermal camera, mounted on the robot to wirelessly transmit thermal images. This could help detect persons who may have a high temperature without revealing their identities and protecting their private health information.
Our main contributions in this work are:
**1.** A mobile robot system that detects breaches in social distancing norms, autonomously navigates towards groups of _non-compliant_ people, and encourages them to maintain at least 6 feet of distance. We demonstrate that our mobile robot monitoring system is effective in terms of detecting social distancing breaches in static indoor scenes and can enforce social distancing in all of the detected breaches. Furthermore, our method does not require the humans to wear any tracking or wearable devices.
**2.** We also integrate a CCTV setup in indoor scenes (if available) with the COVID-robot to further increase the area being monitored and improve the accuracy of tracking and pursuing dynamic non-compliant pedestrians. This hybrid combination of static mounted cameras and a mobile robot can further improve the number of breaches detected and enforcements by up to 100%.
**3.** We present a novel real-time method to estimate distances between people in images captured using an RGB-D camera on the robot and CCTV camera using a homography transformation. The distance estimate has an average error of 0.3 feet in indoor environments.
**4.** We also present a novel algorithm for classifying non-compliant people into different groups and selecting a goal that makes the robot move to the vicinity of the largest group and enforce social distancing norms.
**5.** We integrate a thermal camera with the robot and wirelessly transmit the thermal images to appropriate security/healthcare personnel. The robot does not record temperatures or perform any form of person recognition to protect people's privacy.
We have evaluated our method quantitatively in terms of accuracy of localizing a pedestrian, the number of social distancing breaches detected in static and mobile pedestrians, and our CCTV-robot hybrid system. We also measure the time duration for which the robot can track a dynamic pedestrian. Qualitatively, we highlight the trajectories of the robot pursuing dynamic pedestrians when using only its RGB-D sensor as compared to when both the CCTV and RGB-D cameras are used.
The rest of the paper is organized as follows. In Section 2, we present a brief review of related works on the importance of and emerging technologies for social distancing and robot navigation. In Section 3, we provide a background on robot navigation, collision avoidance, and pedestrian tracking methods used in our system. We describe new algorithms used in our robot system related to grouping and goal-selection, CCTV setup, thermal camera integration, etc in Section 4. In Section 5, we evaluate our COVID-robot in different scenarios and demonstrate the effectiveness of our hybrid system (robot + CCTV) and compare it with cases where only the robot or a standard static CCTV camera system is used.
## II Related Works
In this section, we review the relevant works that discuss the effectiveness of social distancing and the different technologies used to detect breaches of social distancing norms. We also give a brief overview of prior work on collision avoidance and pedestrian tracking. | 2008.06585v2.mmd |
Horoscope: Augustus 5 - 11, 2019
WO: Sun trine Jupiter, Sun quincunx Saturnus
Donderdag: Venus trine Jupiter
VRY: Venus quincunx Saturnus
SAT: Son quincunx Neptune
SUN: Jupiter SD 6: 37 am, Venus quincunx Neptune, Mercury betree Leo, Uranus SR 7: 26 pm
JUPITER EN URANUS hierdie week feitlik tot stilstand kom, het hul beweging baie verlangsaam namate hulle voorberei om volgende Sondag (Augustus 11) om rigting te keer. Soos ek geskryf het verlede week, ervaar ons 'n toename in die vibrasie-effek van 'n planeet as dit vertraag en dan tot stilstand kom. Maar die nog groter onthulling is dat Jupiter oor die volgende twee weke ongeveer 14 ° 30 ′ Boogskutter is, dit byna presies 'n galaktiese afwyking is wat ons die Groot Aantrekker (GA) ken.
Tans geleë op 14 ° 02 ′ Boogskutter, het die GA sy bynaam gekry vanweë sy enorme magneetveld, wat ons eie Melkweg-sterrestelsel na homself trek, sowel as al die ander duisende sterrestelsels wat deel uitmaak van ons 'supercluster'. Sterrekundiges vertel ons dat ons Melkweg-sterrestelsel besig is om in die rigting van die GA te slaan teen 'n verstommende tempo van 600 km (373 myl) per sekonde - volgens my sakrekenaar is dit 'n geweldige 1,342,800 myl per uur! Maar hier sit ons, met min of geen bewustheid dat ons deur die ruimte gaan, veel minder met so 'n breekspoed.
astroloog Philip Sedgwick, wat baie navorsing oor die GA gedoen het, skryf:
"Wat die groot aantrekkingskrag is, bly 'n raaisel. Dit onthul duidelik relativistiese kenmerke - dié van tyd en ruimte, terwyl die lig met sy massiewe swaartekrag gebuig word. Maar dit het nie die gebeurtenishorison wat nodig is om 'n swart gat te wees nie. Al wat ons regtig weet is dat dit groot is.
"Die enorme swaartekrag van die GA buig eintlik lig daar rondom. Dit buig die lig soveel, dat 'n blik op wat daaragter is, geneem kan word. Hierdie kwaliteit van gravitasielensing bied duidelike insigte agter die skerms, en bied terselfdertyd ander brekingsillusies. ”
DIE SIMBOLISME van die Groot Aantrekker is diepgaande. Ons word fisies opgetrek na 'n groot Misterie, gelykstaande aan die magnetiese trek van ons eie geestelike bron en 'n hoër doel. Net soos die Melkweg vinnig beweeg, vind die evolusie van die mensdom eintlik baie vinnig plaas, selfs al bly ons meestal bewusteloos van wat aan die gang is - en selfs as ons soms bang is dat ons omgekeer gaan.
Daar is ook die vermoë van die GA om lig daaroor te buig. Ons kan agter die anomalie sien, wat onmoontlik moet wees. Dit verteenwoordig ons vermoë om insigte te ontvang wat ook onbereikbaar kan lyk. Ons moet net versigtig wees dat wat ons waarneem waarheid is, nie 'n 'brekende illusie' nie.
JUPITER, as die grootste planeet in ons bekende sonnestelsel, vergroot dit ook al wat dit raak. Terwyl Jupiter in lyn is met die Groot Aantrekker, is die evolusionêre aanslag op die mensdom des te sterker. Die vraag is hoe gaan ons die druk hanteer? Dit hang ongetwyfeld af van ons vlak van bewussyn en of ons in staat is om in die middel te bly.
En wat van die "agter-die-skerms-insigte?" Jupiter, saam met die GA, kan 'n nuwe bewustheid bring, of moontlik iets onthul wat verborge | c4-af |
class EventSink : public IDispatch {
private:
ULONG ref_;
HWND container_;
public:
EventSink(HWND container);
~EventSink();
// IUnknown
STDMETHOD(QueryInterface)(REFIID riid, void **ppvObject);
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
// IDispatch
IFACEMETHODIMP GetTypeInfoCount(__RPC__out UINT *pctinfo);
IFACEMETHODIMP GetTypeInfo(UINT iTInfo,
LCID lcid,
__RPC__deref_out_opt ITypeInfo **ppTInfo);
IFACEMETHODIMP GetIDsOfNames(__RPC__in REFIID riid,
__RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
__RPC__in_range(0, 16384) UINT cNames,
LCID lcid,
__RPC__out_ecount_full(cNames) DISPID *rgDispId);
IFACEMETHODIMP Invoke(_In_ DISPID dispIdMember,
_In_ REFIID riid,
_In_ LCID lcid,
_In_ WORD wFlags,
_In_ DISPPARAMS *pDispParams,
_Out_opt_ VARIANT *pVarResult,
_Out_opt_ EXCEPINFO *pExcepInfo,
_Out_opt_ UINT *puArgErr);
};
| msmania/minib2-src/eventsink.h |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
export default [
'es-BZ',
[
['a. m.', 'p. m.'],
['a.m.', 'p.m.'],
],
[
['a.m.', 'p.m.'],
,
],
[
['d', 'l', 'm', 'm', 'j', 'v', 's'], ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'],
['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'],
['DO', 'LU', 'MA', 'MI', 'JU', 'VI', 'SA']
],
[
['D', 'L', 'M', 'M', 'J', 'V', 'S'], ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'],
['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'],
['DO', 'LU', 'MA', 'MI', 'JU', 'VI', 'SA']
],
[
['E', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
[
'ene.', 'feb.', 'mar.', 'abr.', 'may.', 'jun.', 'jul.', 'ago.', 'sep.', 'oct.', 'nov.', 'dic.'
],
[
'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre',
'octubre', 'noviembre', 'diciembre'
]
],
, [['a. C.', 'd. C.'], , ['antes de Cristo', 'después de Cristo']], 0, [6, 0],
['d/M/yy', 'd MMM y', 'd \'de\' MMMM \'de\' y', 'EEEE, d \'de\' MMMM \'de\' y'],
['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'],
[
'{1} {0}',
,
'{1}, {0}',
],
['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],
['#,##0.###', '#,##0 %', '¤#,##0.00', '#E0'], '$', 'dólar beliceño', function(n: number):
number {
if (n === 1) return 1;
return 5;
}
];
| ghetolay/angular-packages/common/locales/es-BZ.ts |
declare const Reflect: any;
// See https://blog.rsuter.com/angular-2-typescript-property-decorator-that-converts-input-values-to-the-correct-type/
export const StringConverter = (value: any) => {
if (value === null || value === undefined || typeof value === 'string') {
return value;
}
return value.toString();
};
export const BooleanConverter = (value: any) => {
if (value === null || value === undefined || typeof value === 'boolean') {
return value;
}
return value.toString() === 'true';
};
export const NumberConverter = (value: any) => {
if (value === null || value === undefined || typeof value === 'number') {
return value;
}
return parseFloat(value.toString());
};
export function InputConverter(converter?: (value: any) => any) {
return (target: Object, key: string) => {
if (converter === undefined) {
if (!Reflect) {
throw new Error('The Reflect API is not available.');
}
const metadata = Reflect.getMetadata('design:type', target, key);
if (metadata === undefined || metadata === null) {
throw new Error('The reflection metadata could not be found.');
}
if (metadata.name === 'String') {
converter = StringConverter;
} else if (metadata.name === 'Boolean') {
converter = BooleanConverter;
} else if (metadata.name === 'Number') {
converter = NumberConverter;
} else {
throw new Error("There is no converter for the given property type '" + metadata.name + "'.");
}
}
const definition = Object.getOwnPropertyDescriptor(target, key);
if (definition) {
Object.defineProperty(target, key, {
get: definition.get,
set: newValue => {
definition!.set!(converter!(newValue));
},
enumerable: true,
configurable: true,
});
} else {
Object.defineProperty(target, key, {
get: function () {
return this['__' + key];
},
set: function (newValue) {
this['__' + key] = converter!(newValue);
},
enumerable: true,
configurable: true,
});
}
};
}
| Picturepark/Picturepark.SDK.TypeScript-src/picturepark-sdk-v2-angular/projects/picturepark-sdk-v2-angular-ui/src/lib/shared-module/components/converter.ts |
angular.module('app.utils.directives').directive('activityStreamItem', ActivityStreamItemDirective);
ActivityStreamItemDirective.$inject = ['$compile', '$http', '$templateCache'];
function ActivityStreamItemDirective($compile, $http, $templateCache) {
return {
restrict: 'E',
scope: {
item: '=',
activity: '=',
object: '=',
deleteCallback: '&?',
updateCallback: '&?',
},
link: (scope, element, attrs) => {
const getTemplate = activityType => {
const baseUrl = 'utils/directives/activity_stream_';
const templateMap = {
case: 'case.html',
deal: 'deal.html',
email: 'email.html',
note: 'note.html',
call: 'call.html',
change: 'change.html',
timelog: 'timelog.html',
};
const templateUrl = baseUrl + templateMap[activityType];
const templateLoader = $http.get(templateUrl, {cache: $templateCache});
return templateLoader;
};
getTemplate(scope.vm.item.activityType).success(html => {
element.replaceWith($compile(html)(scope));
}).then(() => {
element.replaceWith($compile(element.html())(scope));
});
},
controller: ActivityStreamItemController,
bindToController: true,
controllerAs: 'vm',
};
}
ActivityStreamItemController.$inject = ['$scope', '$state'];
function ActivityStreamItemController($scope, $state) {
const vm = this;
vm.replyOnEmail = replyOnEmail;
vm.removeFromList = removeFromList;
vm.formatBytes = formatBytes;
/////
function replyOnEmail() {
// Check if the emailaccount belongs to the current contact or account.
angular.forEach(vm.object.email_addresses, emailAddress => {
if (emailAddress.email_address === vm.item.sender_email && emailAddress.status === 0) {
// Is status is inactive, try to find other email address.
_replyToGoodEmailAddress();
}
});
function _replyToGoodEmailAddress() {
// Try to find primary.
angular.forEach(vm.object.email_addresses, emailAddress => {
if (emailAddress.status === 2) {
$state.go('base.email.replyOtherEmail', {id: vm.item.id, email: emailAddress.email_address});
}
});
// Other will do as alternative.
angular.forEach(vm.object.email_addresses, emailAddress => {
if (emailAddress.status === 1) {
$state.go('base.email.replyOtherEmail', {id: vm.item.id, email: emailAddress.email_address});
}
});
}
$state.go('base.email.reply', {id: vm.item.id});
}
function removeFromList(deletedNote) {
vm.item.notes = vm.item.notes.filter(note => note.id !== deletedNote.id);
$scope.$apply();
}
function formatBytes(bytes, decimals) {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const dm = decimals || 2;
const sizes = ['Bytes', 'KB', 'MB', 'GB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}
}
| HelloLily/hellolily-frontend/app/utils/directives/activity_stream_item.js |
tinyMCE.addI18n('pt.autosave',{
restore_content: "Restaurar conteúdo salvo automáticament",
warning_message: ""Se você restaurar o conteúdo gravado, você vai perder todo o conteúdo que está atualmente no editor.\n\nVocê tem certeza de que deseja restaurar o conteúdo salvo?"
}); | proizprojetos/olhemaisumavez-media/editors/tinymce/jscripts/tiny_mce/plugins/autosave/langs/pt.js |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.core import web_contents
DEFAULT_TAB_TIMEOUT = 60
class Tab(web_contents.WebContents):
"""Represents a tab in the browser
The important parts of the Tab object are in the runtime and page objects.
E.g.:
# Navigates the tab to a given url.
tab.Navigate('http://www.google.com/')
# Evaluates 1+1 in the tab's JavaScript context.
tab.Evaluate('1+1')
"""
def __init__(self, inspector_backend):
super(Tab, self).__init__(inspector_backend)
def __del__(self):
super(Tab, self).__del__()
@property
def dom_stats(self):
"""A dictionary populated with measured DOM statistics.
Currently this dictionary contains:
{
'document_count': integer,
'node_count': integer,
'event_listener_count': integer
}
"""
dom_counters = self._inspector_backend.GetDOMStats(
timeout=DEFAULT_TAB_TIMEOUT)
assert (len(dom_counters) == 3 and
all([x in dom_counters for x in ['document_count', 'node_count',
'event_listener_count']]))
return dom_counters
def Activate(self):
"""Brings this tab to the foreground asynchronously.
Not all browsers or browser versions support this method.
Be sure to check browser.supports_tab_control.
Please note: this is asynchronous. There is a delay between this call
and the page's documentVisibilityState becoming 'visible', and yet more
delay until the actual tab is visible to the user. None of these delays
are included in this call."""
self._inspector_backend.Activate()
@property
def screenshot_supported(self):
"""True if the browser instance is capable of capturing screenshots"""
return self._inspector_backend.screenshot_supported
def Screenshot(self, timeout=DEFAULT_TAB_TIMEOUT):
"""Capture a screenshot of the window for rendering validation"""
return self._inspector_backend.Screenshot(timeout)
def PerformActionAndWaitForNavigate(
self, action_function, timeout=DEFAULT_TAB_TIMEOUT):
"""Executes action_function, and waits for the navigation to complete.
action_function must be a Python function that results in a navigation.
This function returns when the navigation is complete or when
the timeout has been exceeded.
"""
self._inspector_backend.PerformActionAndWaitForNavigate(
action_function, timeout)
def Navigate(self, url, script_to_evaluate_on_commit=None,
timeout=DEFAULT_TAB_TIMEOUT):
"""Navigates to url.
If |script_to_evaluate_on_commit| is given, the script source string will be
evaluated when the navigation is committed. This is after the context of
the page exists, but before any script on the page itself has executed.
"""
self._inspector_backend.Navigate(url, script_to_evaluate_on_commit, timeout)
def GetCookieByName(self, name, timeout=DEFAULT_TAB_TIMEOUT):
"""Returns the value of the cookie by the given |name|."""
return self._inspector_backend.GetCookieByName(name, timeout)
| codenote/chromium-test-tools/telemetry/telemetry/core/tab.py |
export const fakeApiTimeout = 2000;
export const ___PW = 'us--exp';
export const divider = '-';
export const splitter = '@';
export const jwtSecret = 'you-probably-think-it-will-be-simple?';
export const paymentReceiver = 410015453938752;
export const jwtStorageName = 'JWT_TOKEN';
// ========================================================### DEVICE BREAKPOINTS ###
export const devicesBreakpoints = {
mobile: 992,
tablet: 1030,
laptop: 1380,
desktop: 2000,
retina: 9999
};
export const devices = {
inStore: '__SIZE_DATA__'
};
// ========================================================### BASIC ANIMATION PARAMETERS ###
// default duration for whole animations
export const dur = .3;
export const minDur = .15;
export const midDur = .5;
export const bigDur = .65;
// easing configurations in function
// for server-side render reasons
export const ease = {
in: () => Cubic.easeIn,
out: () => Cubic.easeOut,
inOut: () => Cubic.easeInOut,
easeNone: () => Linear.easeNone
};
// ========================================================### MOBILE NAVIGATION CONFIG ###
const navMobileDuration = bigDur;
const navMobileWrapperDelay = navMobileDuration / 3;
export const navMobile = {
duration: navMobileDuration,
contentGap: '30%',
menuWrapperGap: '70%',
menuWrapperEase: ease.out,
menuWrapperDelay: navMobileWrapperDelay,
menuWrapperDuration: (navMobileDuration - navMobileWrapperDelay),
menuGap: '-100%',
easeIn: ease.inOut,
easeOut: ease.out
};
// ========================================================### IMAGE COMPONENT CONFIG ###
export const image = {
dur: bigDur,
ease: ease.out,
delay: 0.1,
blur_radius: 20
};
// AboutPage Header & ContactPage Header config
export const MobileHeaderRatio = .4;
export const DesktopHeaderRatio = .2;
// ========================================================### TITLES OF PAGES ###
export const pagesTitles = {
SignupPage: 'Sign Up',
LoginPage: 'Log In',
UserPage: 'You',
};
// ========================================================### INFO PAGE EDIT CONFIG ###
export const editPageConfig = {
maxTitleLength: 100,
maxContentLength: 600
};
// ========================================================### USER CONFIG ###
export const user = {
nameMaxLength: 20
};
// ========================================================### MAP CONFIG ###
export const map = {
//apiKey: "AIzaSyDfRCp7Rg_ufXZqgFBOsNP8ICY9LnPE1oI",
apiKey: 'AIzaSyCzIFSJwXc8KfxmERx6-ut9FMnzN2owdW4',
url: 'https://maps.googleapis.com/maps/api/js?key=',
libraryOptions: 'language=ru',
loadingParams: 'libraries=places',
yandexMap: 'https://api-maps.yandex.ru/2.1/?lang=ru_RU&modules=metro',
get link() {
return this.url + this.apiKey +
(this.loadingParams ? '&' + this.loadingParams : '') +
(this.libraryOptions ? '&' + this.libraryOptions : '')
},
scriptId: 'map-script',
options: {
center: [59.92517, 30.32243900000003],
zoom: 12,
scrollwheel: true,
zoomControl: true,
scaleControl: true,
streetViewControl: true,
fullscreenControl: true
},
onSetPointZoom: 16,
points: []
};
export const captchaApiKey = '6Le8IiEUAAAAAIeYkboQm250WHmO4EKhdXxXV4jz';
| expdevelop/yoap-src/config.js |
# How can the standard deviation be interpreted when the range is partially impossible?
After meassuring the answer time of a software system I calculated the standard deviation from the samples. The average time is about 200ms, the standard deviation $$\sigma = 300ms$$ According to the image below this should mean that 68.2% of all response times should be between -100ms and 500ms.
A negative response time makes obviously no sense. How should the part of the normal distribution be interpreted that is enclosed in the red box?
Sample data with similiar avg ~202 stddev ~337:
100
100
200
150
70
90
110
80
150
70
190
110
130
100
100
1500
• Why you have assumed normal distribution? Dec 16, 2015 at 15:55
• This means that hypothesis about normal distribution of answer time is a poor one. If your software has "distribution" parameter, you may try "Poisson". Dec 16, 2015 at 15:56
• Maybe try lognormal Dec 16, 2015 at 15:57
• Related: This question Dec 16, 2015 at 15:57
• Try to remember that normally distributions are not normal . . . Dec 16, 2015 at 22:35
require(MASS)
fit<-fitdistr(x,"log-normal")$estimate lines(dlnorm(0:max(x),fit[1],fit[2]), lwd=3) (x is a sample vector) Obviously, your sample is way too small here. • To follow up on the title question, how can the standard deviation be interpreted if the distribution isn't normal? For example, is there any meaning to the standard deviation calculated on samples from a lognormal distribution? – R.M. Dec 16, 2015 at 18:29 • @R.M. Standard deviation is one measure of dispersion. It has the same interpretation regardless of the distribution. Standard deviation informs you how much data drawn from a particular distribution will be, on average, "spread out" from its mean. Just look at the definition:$SD(X)=\sqrt{\mathbb{E}(X-\mathbb{E}X)^2}$. Note$Y=(X-\mathbb{E}X)^2$is another random variable which describes squared distance of$X$from its mean. If you calculate$\mathbb{E}Y$you will know how much on average this distance is. We take square root to normalize (go back to original scale - not squared). Dec 16, 2015 at 18:47 As others have mentioned, the normal distribution doesn't make much sense here. We sometimes use a normal distribution, despite the possibility of negative values that don't make sense, when the probability of such values under the normal distribution is very small. But here the standard deviation is greater than the mean, so that probability is not small at all (about$1/4$). A glance at your data suggests that a heavy-tailed distribution might be appropriate: much of the standard deviation comes from that one very large value of$1500$. You can calculate the square root of the weighted sum of the squares of the differences from the sample mean for any set of data. All this calculation does is tell you how spread out the data are. But, as you've suspected, saying that this dataset is normally distributed is likely nonsense. There's another issue that the other answers are not addressing. In applications like this one you're often not interested in the standard deviation, since it is a non-robust statistic with a breakdown point of 0%, which means that for a large sample size changing a negligible fraction of the data can result in an arbitrary change in the statistic's value. Instead, consider using quantiles, common ones being the inter-quantile range, which are more robust statistics. Specifically, the$25$-th and$75$-th quantiles both have 25% breakdown point, because you need to change at least 25% of the data to arbitrarily affect them. This is particular important in your consideration, because of a number of factors: 1. Communication delays are often caused by one-time events that result in a down-time rather than a normal delay, and of course such down-times are very long in comparison. For example think of power outages, server crash, even sabotage... 2. Even if there are no down-times in your data, other factors could have a significant impact on your measurements that are completely irrelevant to your application. For example, other processes running in the background might slow down your application, or memory caching might be improving the speed for some but not all runs. There might even be occasional hardware activity that affects the speed of your application only now and then. 3. Usually people judge a system's responsiveness based on the average case, not the average of all cases. Most will accept that an operation might in a minority of the cases completely fail and never even return a response. An excellent example is the HTTP request. A small but nonzero proportion of packets get totally dropped from the internet and the request would have a theoretically infinite response time. Obviously people don't care and just press "Refresh" after a while. • Very well-suited. – A.S. Dec 17, 2015 at 5:42 • @A.S.: Thanks! I always find it surprising that people don't seem to teach such statistics, even though it is in fact used in practice. Another good thing is that the quantiles always exist and can be estimated even if the mean doesn't, same for the inter-quantile range. There are even CLT-like theorems for the quantiles. Yet none of my statistics teachers ever even mentioned quantiles in statistical analysis! Dec 17, 2015 at 6:18 • Few academicians practice and for theoreticians variance is very convenient to operate on analytically - so it gets the most attention in non-applied courses. What I found most useful about your post wasn't so much a suggestion to use quantiles (there are other robust statistics) but all the tailored info relevant to performance of the actual physical/customer system. This is what should guide a choice of statistic/metric since doing any data analysis beyond histogramming before maximally fleshing out/thinking through peculiarities of the system at hand is futile and possibly misleading...// – A.S. Dec 17, 2015 at 7:32 • //... Just look above - somebody is already trying to fit a log-normal to a small sample from much bigger data set or suggest a heavy-tail distribution even though it's possibly a mixture based on whether a "one-time event" happened or not (which I wouldn't think of right away without reading your post). – A.S. Dec 17, 2015 at 7:32 • @A.S.: Yea I saw the other post, which is why I posted my answer since I've dealt with such one-time events many times before in timing tests. As for my suggestion to use quantiles, what other robust statistics do you have in mind that can do the job well in this case? I suggested using quantiles because it doesn't presume anything at all about the distribution, but I don't know much about other robust statistics, so I'd be glad if you could tell me a bit more! Dec 17, 2015 at 7:44 The issue here is that you fallback to the most infamous distribution -- the normal distribution -- to interpret your results. This is not the only one, and in your case is a poor choice: indeed, the normal distribution is symmetric around its mean, and has support$\mathbb{R}\$: in your case, an asymmetric distribution putting probability mass only on the positive reals would make more sense, if you really want to compare against a "known" model of probability distributions. | finemath-3plus |
/* */
'use strict';
module.exports.definition = {
set: function (v) {
this._setProperty('-webkit-animation-fill-mode', v);
},
get: function () {
return this.getPropertyValue('-webkit-animation-fill-mode');
},
enumerable: true,
configurable: true
};
| TelerikFrenchConnection/JS-Applications-Teamwork-lib/npm/[email protected]/lib/properties/webkitAnimationFillMode.js |
CELEBRADA LA CLOENDA DE LA SEGONA EDICIÓ DEL PROGRAMA DE GESTIÓ EMPRESARIAL - PDEGE
El passat divendres 11 de maig es va celebrar l’acte de cloenda i entrega de diplomes de la segona edició del Programa de Gestió Empresarial PdeGE amb la participació d’una vintena d’empresaris i directius, provinents de petites i mitjanes empreses de les comarques de Tarragona, Barcelona i Girona.
Ja estem preparant la 3a edició.
Per a demanar més informació a [email protected] | c4-ca |
import sqlite3
conn = sqlite3.connect("inventory.db")
cursor2 = conn.cursor()
sql = '''SELECT * FROM ingredients WHERE title="beef"'''
#sql = '''DELETE FROM ingredients WHERE title="beef"'''
results = cursor2.execute(sql)
#conn.commit()
print results.fetchall()
| jobli/24-hour19-test.py |
/**
* Validate whether all functions in math.js are documented in math.expression.docs
*/
var gutil = require('gulp-util'),
math = require('../index')(),
prop;
// names to ignore
var ignore = ['workspace', 'compile', 'parse', 'parser', 'select', 'unary', 'print', 'config', 'in'];
// test whether all functions are documented
var undocumentedCount = 0;
for (prop in math) {
if (math.hasOwnProperty(prop)) {
var obj = math[prop];
if (math['typeof'](obj) != 'object') {
if (!math.expression.docs[prop] && (ignore.indexOf(prop) == -1)) {
gutil.log('WARNING: Function ' + prop + ' is undocumented');
undocumentedCount++;
}
}
}
}
// test whether there is documentation for non existing functions
var nonExistingCount = 0;
var docs = math.expression.docs;
for (prop in docs) {
if (docs.hasOwnProperty(prop)) {
if (math[prop] === undefined && !math.type[prop]) {
gutil.log('WARNING: Documentation for a non-existing function "' + prop + '"');
nonExistingCount++;
}
}
}
// done. Output results
if (undocumentedCount == 0 && nonExistingCount == 0) {
gutil.log('Validation successful: all functions are documented.');
}
else {
gutil.log('Validation failed: not all functions are documented.');
}
| npmcomponent/josdejong-mathjs-tools/validate.js |
# 10.1.13 Sesame
#### 10.1.13 Sesame
\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|l|} \hline \multicolumn{1}{|l|}{Algo} & \multicolumn{1}{l|}{Vocab} & \multicolumn{1}{l|}{TextT} & \multicolumn{1}{l|}{TP} & \multicolumn{1}{l|}{TN} & \multicolumn{1}{l|}{FP} & \multicolumn{1}{l|}{FN} & \multicolumn{1}{l|}{Pr} & \multicolumn{1}{l|}{Re} & \multicolumn{1}{l|}{F1} & \multicolumn{1}{l|}{Alpha} \\ \hline NN & 244 & BOW & 439 & 7380 & 59 & 135 & 0.975 & 0.976 & 0.975 & 0.870 \\ \hline NN & 244 & TF-IDF & 414 & 7385 & 83 & 131 & 0.972 & 0.973 & 0.973 & 0.866 \\ \hline NN & 1226 & BOW & 443 & 7424 & 46 & 100 & **0.981** & **0.982** & **0.981** & **0.902** \\ \hline NN & 1226 & TF-IDF & 468 & 7373 & 67 & 105 & 0.978 & 0.979 & 0.978 & 0.892 \\ \hline NN & 4634 & BOW & 455 & 7412 & 28 & 118 & 0.981 & 0.982 & 0.981 & 0.892 \\ \hline NN & 4634 & TF-IDF & 486 & 7353 & 72 & 102 & 0.978 & 0.978 & 0.978 & 0.893 \\ \hline NN & 9456 & BOW & 454 & 7400 & 44 & 115 & 0.980 & 0.980 & 0.980 & 0.890 \\ \hline NN & 9456 & TF-IDF & 494 & 7350 & 55 & 114 & 0.978 & 0.979 & 0.978 & 0.888 \\ \hline SVM & 244 & BOW & 7388 & 327 & 48 & 250 & 0.960 & 0.963 & 0.959 & 0.782 \\ \hline SVM & 244 & TF-IDF & 7404 & 357 & 45 & 207 & 0.967 & 0.969 & 0.966 & 0.816 \\ \hline SVM & 1226 & BOW & 7346 & 424 & 83 & 160 & 0.968 & 0.970 & 0.969 & 0.843 \\ \hline SVM & 1226 & TF-IDF & 7375 & 449 & 75 & 114 & 0.976 & 0.976 & 0.976 & 0.882 \\ \hline SVM & 4634 & BOW & 7298 & 424 & 157 & 134 & 0.964 & 0.964 & 0.964 & 0.843 \\ \hline SVM & 4634 & TF-IDF & 7290 & 464 & 108 & 151 & 0.967 & 0.968 & 0.967 & 0.843 \\ \hline SVM & 9456 & BOW & 7256 & 409 & 199 & 149 & 0.958 & 0.957 & 0.957 & 0.820 \\ \hline SVM & 9456 & TF-IDF & 7321 & 428 & 106 & 158 & 0.966 & 0.967 & 0.966 & 0.838 \\ \hline RF & 244 & BOW & 411 & 7409 & 32 & 161 & 0.975 & 0.976 & 0.974 & 0.856 \\ \hline RF & 244 & TF-IDF & 377 & 7416 & 29 & 191 & 0.972 & 0.973 & 0.970 & 0.833 \\ \hline RF & 1226 & BOW & 444 & 7424 & 27 & 118 & **0.981** & 0.982 & 0.981 & 0.892 \\ \hline \end{tabular}
#### 10.1.1.1 Using list of ingredients
\begin{tabular}{||l|l|l|l|l|l|l|l|l|l|l|l||} \hline \hline \multicolumn{1}{||c||}{\(\mathrm{Algo}\)} & \multicolumn{1}{c||}{Vocab} & \multicolumn{1}{c||}{TextT} & \multicolumn{1}{c||}{TP} & \multicolumn{1}{c||}{TN} & \multicolumn{1}{c||}{FP} & \multicolumn{1}{c||}{FN} & \multicolumn{1}{c||}{Pr} & \multicolumn{1}{c||}{Re} & \multicolumn{1}{c||}{F1} & \multicolumn{1}{c||}{Alpha} \\ \hline NN & 75 & BOW & 355 & 4866 & 67 & 205 & 0.948 & 0.950 & 0.947 & 0.732 \\ \hline NN & 75 & TF-IDF & 388 & 4783 & 95 & 227 & 0.938 & 0.941 & 0.938 & 0.699 \\ \hline NN & 298 & BOW & 386 & 4887 & 47 & 173 & 0.958 & 0.960 & 0.958 & 0.775 \\ \hline NN & 298 & TF-IDF & 351 & 4899 & 60 & 183 & 0.953 & 0.956 & 0.953 & 0.759 \\ \hline NN & 1225 & BOW & 415 & 4876 & 43 & 159 & **0.962** & **0.963** & **0.961** & **0.792** \\ \hline NN & 1225 & TF-IDF & 409 & 4854 & 69 & 161 & 0.956 & 0.958 & 0.956 & 0.780 \\ \hline NN & 3432 & BOW & 406 & 4865 & 66 & 156 & 0.958 & 0.960 & 0.958 & 0.786 \\ \hline NN & 3432 & TF-IDF & 388 & 4848 & 92 & 165 & 0.951 & 0.953 & 0.952 & 0.766 \\ \hline \end{tabular} | 2102.02665v1.mmd |
import Config from './config';
import { flattenArray, modelize } from './utils';
/**
* Represents a query builder which corresponds to a static Model reference.
* Inherits every query method of the Knex query builder.
*/
export default class QueryBuilder {
constructor(StaticModel, modelInstance) {
this.StaticModel = StaticModel;
this.modelInstance = modelInstance;
this.includedRelations = new Set();
this.knexInstance = StaticModel.knex.from(StaticModel.tableName);
if (modelInstance) {
const props = {};
if (Array.isArray(StaticModel.primaryKey)) {
// Handle composite primary keys
for (const prop of StaticModel.primaryKey) {
props[prop] = modelInstance.oldProps[prop] || modelInstance[prop];
}
} else {
// Handle single primary key
const prop = StaticModel.primaryKey;
props[prop] = modelInstance.oldProps[prop] || modelInstance[prop];
}
// Filter to the given model instance
this.knexInstance = this.knexInstance.where(props).first();
}
}
/**
* Queues fetching the given related Models of the queryable instance(s).
* @param {...string} props Relation attributes to be fetched.
* @returns {QueryBuilder}
*/
withRelated(...props) {
const relationNames = flattenArray(props);
const relationEntries = Object.entries(this.StaticModel.related);
// Filter the given relations by name if necessary
if (relationNames.length > 0) {
relationEntries.filter(([name]) => relationNames.indexOf(name) >= 0);
}
// Store the filtered relations
for (const [name, relation] of relationEntries) {
relation.name = name;
this.includedRelations.add(relation);
}
return this;
}
/**
* Executes the query.
* @param {Function<Object>} [onFulfilled] Success handler function.
* @param {Function<Object>} [onRejected] Error handler function.
* @returns {Promise<Object>}
*/
then(onFulfilled = () => {}, onRejected = () => {}) {
// Apply the effect of plugins
let qb = this;
for (const plugin of this.StaticModel.plugins) {
qb = plugin.beforeQuery(qb);
}
let result;
return qb.knexInstance
.then((res) => {
const awaitableQueries = [];
result = res;
// Convert the result to a specific Model type if necessary
result = modelize(result, qb.StaticModel);
// Apply each desired relation to the original result
for (const relation of qb.includedRelations) {
awaitableQueries.push(relation.applyAsync(result));
}
return Promise.all(awaitableQueries);
})
.then(() => {
// Apply the effect of plugins
for (const plugin of qb.StaticModel.plugins) {
result = plugin.afterQuery(result);
}
return result;
})
.then(onFulfilled, onRejected);
}
/**
* Gets the list of raw queries to be executed, joined by a string separator.
* @param {string} [separator=\n] Separator string to be used for joining
* multiple raw query strings.
* @returns {string}
*/
toString(separator = '\n') {
// Apply the effect of plugins
let qb = this;
for (const plugin of this.StaticModel.plugins) {
qb = plugin.beforeQuery(qb);
}
// Return a list of query strings to be executed, including Relations
const result = [qb.knexInstance.toString()];
for (const relation of qb.includedRelations) {
// Create the relation query with an empty array of Models
result.push(relation.createQuery([]).toString());
}
return result.join(separator);
}
}
// Inherit Knex query methods
for (const method of Config.KNEX_ALLOWED_QUERY_METHODS) {
QueryBuilder.prototype[method] = function queryMethod(...args) {
// Update Knex state
this.knexInstance = this.knexInstance[method](...args);
return this;
};
}
| kripod/knex-orm-src/query-builder.js |
//
// EXTRuntimeExtensions.h
// extobjc
//
// Created by Justin Spahr-Summers on 2011-03-05.
// Copyright (C) 2012 Justin Spahr-Summers.
// Released under the MIT license.
//
#import <objc/runtime.h>
/**
* Describes the memory management policy of a property.
*/
typedef enum {
/**
* The value is assigned.
*/
wt_propertyMemoryManagementPolicyAssign = 0,
/**
* The value is retained.
*/
wt_propertyMemoryManagementPolicyRetain,
/**
* The value is copied.
*/
wt_propertyMemoryManagementPolicyCopy
} wt_propertyMemoryManagementPolicy;
/**
* Describes the attributes and type information of a property.
*/
typedef struct {
/**
* Whether this property was declared with the \c readonly attribute.
*/
BOOL readonly;
/**
* Whether this property was declared with the \c nonatomic attribute.
*/
BOOL nonatomic;
/**
* Whether the property is a weak reference.
*/
BOOL weak;
/**
* Whether the property is eligible for garbage collection.
*/
BOOL canBeCollected;
/**
* Whether this property is defined with \c \@dynamic.
*/
BOOL dynamic;
/**
* The memory management policy for this property. This will always be
* #wt_propertyMemoryManagementPolicyAssign if #readonly is \c YES.
*/
wt_propertyMemoryManagementPolicy memoryManagementPolicy;
/**
* The selector for the getter of this property. This will reflect any
* custom \c getter= attribute provided in the property declaration, or the
* inferred getter name otherwise.
*/
SEL getter;
/**
* The selector for the setter of this property. This will reflect any
* custom \c setter= attribute provided in the property declaration, or the
* inferred setter name otherwise.
*
* @note If #readonly is \c YES, this value will represent what the setter
* \e would be, if the property were writable.
*/
SEL setter;
/**
* The backing instance variable for this property, or \c NULL if \c
* \c @synthesize was not used, and therefore no instance variable exists. This
* would also be the case if the property is implemented dynamically.
*/
const char *ivar;
/**
* If this property is defined as being an instance of a specific class,
* this will be the class object representing it.
*
* This will be \c nil if the property was defined as type \c id, if the
* property is not of an object type, or if the class could not be found at
* runtime.
*/
Class objectClass;
/**
* The type encoding for the value of this property. This is the type as it
* would be returned by the \c \@encode() directive.
*/
char type[];
} wt_propertyAttributes;
/**
* Returns a pointer to a structure containing information about \a property.
* You must \c free() the returned pointer. Returns \c NULL if there is an error
* obtaining information from \a property.
*/
wt_propertyAttributes *wt_copyPropertyAttributes(objc_property_t property);
| JaonFanwt/WtCore-WtCore/Classes/GCD/Macros/WtEXTRuntimeExtensions.h |
> > Get Algebraische Geometrie I PDF
# Get Algebraische Geometrie I PDF
By Heinz Spindler
Similar algebraic geometry books
Abelian types will be labeled through their moduli. In confident attribute the constitution of the p-torsion-structure is an extra, great tool. For that constitution supersingular abelian kinds might be thought of the main specific ones. they supply a place to begin for the wonderful description of assorted constructions.
From the reports of the 1st edition:"The goal of this publication is to provide an explanation for ‘how algebraic geometry, Lie thought and Painlevé research can be utilized to explicitly remedy integrable differential equations’. … one of many major merits of this e-book is that the authors … succeeded to give the fabric in a self-contained demeanour with various examples.
According to a path given to gifted high-school scholars at Ohio collage in 1988, this publication is largely a sophisticated undergraduate textbook in regards to the arithmetic of fractal geometry. It properly bridges the distance among conventional books on topology/analysis and extra really good treatises on fractal geometry.
New PDF release: Elliptic Curves: Function Theory, Geometry, Arithmetic
The topic of elliptic curves is among the jewels of nineteenth-century arithmetic, whose masters have been Abel, Gauss, Jacobi, and Legendre. This ebook provides an introductory account of the topic within the form of the unique discoverers, with references to and reviews approximately newer and sleek advancements.
Additional info for Algebraische Geometrie I
Example text
15 Es sei X Pn endlich und in allgemeiner Lage. k 2 sei minimal gewahlt, so da jX j kn. Dann ist X der Durchschnitt von Hyper achen vom Grad k. Fall: d = kn. Induktion nach k. k = 2 ist schon bewiesen. (k 1) ! k (k 3): Es sei M = fF 2 Sk Sj F(p) = 0 8 p 2 X g. Es sei q 2 V(M). Zu zeigen ist: q 2 X. Behauptung 1: X = ki=1 Xi ; jXi j = n 8 i ) 9 i, so da q 2 Span(Xi ). 14. Sei wieder Y X minimal mit q 2 Span(Y ). Nach Behauptung 1 ist m = jY j n. Sei Y 0 X n Y beliebig mit jY 0j = n m + 1 und p 2 Y fest gewahlt.
R ! K; a 7 ! a1 ist injektiv, also kann man R als Unterring von K auffassen. Jeder Ring N 1R; N R multiplikativ, ist dann ein Unterring von K: R N 1R K: b) Ist R beliebig, und p R ein Primideal, so ist N = R p multiplikativ und Rp := N 1 R hei t die Lokalisierung von R in p. Bemerkenswert ist na o m= j a 2 p; b 2 R n p Rp b ist das einzige maximale Ideal in Rp . Beweis: 1) m ist Ideal: a c = ad cb 2 m , wenn a; c 2 p; b; d 2 R n p: b d bd 2) Rp n m = Menge der Einheiten in Rp . x 2 Rp n m ) x = ab fur ein a 2 R n p; b 2 Rp ) y = ab 2 Rp mit xy = 1: Umgekehrt: ab dc = 1 , 9 e 2 R n p : e(ac bd) = 0 ) eac = abd 2 R n p: Da p Ideal, folgt a 2 R n p, also ab 2 Rp n m: 3) Ist nun I Rp Ideal mit I 6= Rp , so ist I \ (R | p{zn m}) = ;, also I m: 2 c) Ist f 2 R, so ist N Einheiten n = ff j n 2 Ng naturlich multiplikativ.
Es sei K ein Korper. A n = A n (K) = K n. 1 Es sei X An eine a ne Varietat in A n . A X hei t (Zariski-)abgeschlossen in X : () 9 f1 ; : : :; fm 2 K z1 ; : : :; zn ]; so da A = X \ V(f1; : : :; fm ): U X hei t (Zariski-)o en in X : () X n U ist Zariski-abgeschlossen in X: T = fU j U nach: X o eng hei t die Zariski-Topologie auf X. Man pruft leicht die Axiome 1){3) S T 1) Ist Ui = X n V(Mi); MiS K z1 ; : : :; zn] fur i 2 I, so ist U = i2I Ui = X n i2I V(Mi) = X n V(M), wobei M = i2I Mi . 2) Ist U = X n V(M); V = X n V(N), so ist U \ V = X n (V(M) V(N)) = X n V(MN), wobei MN = ffg j f 2 M; g 2 N g. | finemath-3plus |
11 علامة تشير إلى أنَّك لا تدير وقتك بشكل فعال
إدارة الوقت رواد الأعمال جدولة الأعمال
تاريخ آخر تحديث: 16-09-2019 تاريخ النشر: 16-09-2019
تاريخ التحديث:16-09-2019 تاريخ النشر: 16-09-2019
إذا كنت مثل معظم رواد الأعمال فوقتك مليءٌ بالمشاغل، بيد أنَّ هذا لا يعني أنَّك تُحْسِن إدارة وقتك، إذ ربما تكون كل تلك المشاغل في الحقيقة أحداثاً تَعُمُّها الفوضى وتجعلك عُرْضةً للإخفاق، لكن كيف يمكنك أن تعرف أنَّ ذلك هو ما يحدث؟ إليك 11 علامة تشير إلى أنَّك تدير وقتك بشكلٍ غير فعال.
1- تُكْثِر من قول "ليس لدي ما يكفي من الوقت":
هل تتذمَّر دائماً لأنَّ وقتك لا يكفي لإنجاز كل المهام؟ هذا المبرر يُعَدُّ كِذْبةً في الحقيقة، وقد كان الكاتب المعروف "جاكسن براون" مُحِقَّاً حينما قال: "لا تقل إنَّ الوقت ليس كافياً فأنت لديك خلال اليوم عدد الساعات نفسه الذي كان لدى كلٍّ من "هيلين كيلر"، و"باستور"، و"مايكل آنجيلو"، والأم تيريزا، وليوناردو دافينشي، و"توماس جيفرسن"، وألبرت آينشتاين".
عوضاً عن التذمُّر قم بعملٍ ما لتنظِّم وقتك، حيث تختلف طريقة القيام بذلك من شخصٍ إلى آخر، لكنَّ أوَّل شيءٍ يجب عليك أن تبدء به هو إعادة النظر في الطريقة التي تقضي بها وقتك. قد تلاحظ على سبيل المثال أنَّك تخطئ في تقدير الوقت الذي تحتاج إليه لإنجاز مهمة ما، أو أنَّك تقضي الكثير جداً من الوقت في القيام بأنشطة غير مثمرة كتصفح وسائل التواصل الاجتماعي.
إقرأ أيضاً: مضيعات الوقت الشائعة وطرق إدارة الوقت بفاعلية
2- لست بارعاً في الالتزام بالمواعيد:
لدي صديقٌ يتأخر دائماً عن مواعيده والتأخُّر يُعَدُّ تقريباً شعاره في الحياة، وعلى الرغم من أنَّنا نتحدث بسخريةٍ عن هذا الأمر إلَّا أنَّ الحقيقة تقول إنَّ التأخر عن المواعيد يُعَدُّ واحدةً من أسوأ العادات التي يمكن أن يمارسها شخصٌ ما في حياتيه الشخصية والمهنية. إنَّ التأخر عن المواعيد يُعَدُّ عملاً بغيضاً ينمُّ عن قلة احترام وهو في نهاية المطاف يُلطِّخ سمعتك ويؤدي إلى انهيار علاقاتك، ناهيك عن أنَّ العجلة والانتقال بسرعة من مهمةٍ إلى أخرى يضعان الإنسان تحت الضغط.
ومثلما كان الحال مع الشعور بعدم وجود ما يكفي من الوقت، يمكن أن تساعدك إعادة النظر في الطريقة التي تقضي بها وقتك في اقتلاع هذه العادة السيئة من جذورها، والتفكير بشكلٍ أفضل في طريقة القيام بالمهام اليومية كالذهاب إلى العمل والعودة منه. تعوَّد أيضاً على ترك فترة من الوقت بين المواعيد والاجتماعات والبدء بأخذ الوقت اللازم للتنقل في أثناء رحلات السفر في الحسبان حتى تتمكن من الالتزام بمواعيدك.
3- لا تَذْكُر آخر مرةٍ راجعْتَ فيها جدول مواعيدك:
يجب عليك على الأقل أن تلقي نظرةً على جدول مواعيدك كل مساء وفي بداية الصباح، وعلى الرغم من أن هذا قد يبدو عملاً شاقَّاً، إلَّا أنَّ الاستعداد يولد دائماً الشعور بالثقة، وسيجعلك هذا تبدأ بالوصول في الوقت المحدد إلى الأماكن التي يجب عليك الوصول إليها. إنَّ السبب الذي يدفعني إلى إلقاء نظرةٍ على جدول أعمالي في الصباح هو التأكُّد من أنَّ كل شيءٍ لا يزال منظماً، فقد تحتاج على سبيل المثال إلى تغيير موعد الاجتماع الذي كان مقرراً عقده عبر مكالمة فيديو مع أحد العملاء حتى تتمكَّن | c4-ar |
import moment from 'moment';
import { LivePaginator } from '../../utils';
import template from './queries-list.html';
class QueriesListCtrl {
constructor($location, Title, Query) {
const page = parseInt($location.search().page || 1, 10);
this.defaultOptions = {};
const self = this;
switch ($location.path()) {
case '/queries':
Title.set('Queries');
this.resource = Query.query;
break;
case '/queries/drafts':
Title.set('Draft Queries');
this.resource = Query.myQueries;
this.defaultOptions.drafts = true;
break;
case '/queries/my':
Title.set('My Queries');
this.resource = Query.myQueries;
break;
default:
break;
}
function queriesFetcher(requestedPage, itemsPerPage, paginator) {
$location.search('page', requestedPage);
const request = Object.assign({}, self.defaultOptions,
{ page: requestedPage, page_size: itemsPerPage });
return self.resource(request).$promise.then((data) => {
const rows = data.results.map((query) => {
query.created_at = moment(query.created_at);
query.retrieved_at = moment(query.retrieved_at);
return query;
});
paginator.updateRows(rows, data.count);
});
}
this.paginator = new LivePaginator(queriesFetcher, { page });
this.tabs = [
{ name: 'My Queries', path: 'queries/my' },
{ path: 'queries', name: 'All Queries', isActive: path => path === '/queries' },
{ path: 'queries/drafts', name: 'Drafts' },
];
}
}
export default function (ngModule) {
ngModule.component('pageQueriesList', {
template,
controller: QueriesListCtrl,
});
const route = {
template: '<page-queries-list></page-queries-list>',
reloadOnSearch: false,
};
return {
'/queries': route,
'/queries/my': route,
'/queries/drafts': route,
};
}
| stefanseifert/redash-client/app/pages/queries-list/index.js |
//Eric Guan, Period 3
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.JOptionPane;
public class Ball {
private static final int WIDTH = 30, HEIGHT = 30;
private Pong game;
private int x, y, xa = 2, ya = 2;
public Ball(Pong game) {
this.game = game;
x = game.getWidth() / 2;
y = game.getHeight() / 2;
}
public void update() {
x += xa;
y += ya;
if (x < 0) {
game.getPanel().increaseScore(1);
x = game.getWidth() / 2;
xa = -xa;
}
else if (x > game.getWidth() - WIDTH - 7) {
game.getPanel().increaseScore(2);
x = game.getWidth() / 2;
xa = -xa;
}
else if (y < 0 || y > game.getHeight() - HEIGHT - 29)
ya = -ya;
if (game.getPanel().getScore(1) == 10)
JOptionPane.showMessageDialog(null, "Player 1 wins", "Pong", JOptionPane.PLAIN_MESSAGE);
else if (game.getPanel().getScore(2) == 10)
JOptionPane.showMessageDialog(null, "Player 2 wins", "Pong", JOptionPane.PLAIN_MESSAGE);
checkCollision();
}
public void checkCollision() {
if (game.getPanel().getPlayer(1).getBounds().intersects(getBounds()) || game.getPanel().getPlayer(2).getBounds().intersects(getBounds()))
xa = -xa;
}
public Rectangle getBounds() {
return new Rectangle(x, y, WIDTH, HEIGHT);
}
public void paint(Graphics g) {
g.fillRect(x, y, WIDTH, HEIGHT);
}
} | ericzgy/AP-Computer-Science-A-ThirdTerm/Ball.java |
// unit_Group.h // \author Logan Jones
///////////////// \date 5/2/2002
/// \file
/// \brief ...
/////////////////////////////////////////////////////////////////////
#ifndef _UNIT_GROUP_H_
#define _UNIT_GROUP_H_
/////////////////////////////////////////////////////////////////////
///////////////////////////// unit_Group /////////////////////////////
//
class unit_Group : public unit_Interface
{
/////////////////////////////////////////////////
// INTERFACE
public:
void Add( class unit_Object* pUnit );
void Remove( class unit_Object* pUnit );
void Reset();
void Filter();
/////////////////////////////////////////////////
//{{AFX Net Messages (Generated by AsmNetMsg.exe. DO NOT EDIT)
protected: // Net Message Handlers
void OnRequestStop();
void OnRequestMoveTo( const std_Point& ptWhere, bool bEnqueue );
void OnRequestBuild( const unit_Type* pType, const std_Point& ptWhere, bool bEnqueue );
void OnRequestActivate( bool bActivate );
void OnRequestAttack( const std_Point& ptWhere, bool bEnqueue );
void OnRequestUnit( const unit_Type* pType );
void OnNotifyPrepareToBuild( const unit_Type* pType, const std_Point& ptWhere );
void OnNotifySpawnNewUnit( const unit_Type* pType, const std_Point& ptWhere );
//}}AFX Net Messages
/////////////////////////////////////////////////
// Default Constructor/Deconstructor
public:
unit_Group();
virtual ~unit_Group();
/////////////////////////////////////////////////
}; // End class - unit_Group
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
#endif // !defined(_UNIT_GROUP_H_)
| loganjones/nTA-Total-Annihilation-Clone-nTA/Source/unit_Group.h |
//
// ProviderDetailViewController.h
// BioMonitor
//
// Created by Mannie Tagarira on 17/10/2010.
// Copyright 2010 University of Manchester. All rights reserved.
//
@class ProviderServicesViewController;
@interface ProviderDetailViewController : UIViewController <UIWebViewDelegate> {
IBOutlet UIContentController *uiContentController;
NSDictionary *providerProperties;
ProviderServicesViewController *providerServicesViewController;
DetailViewController_iPad *iPadDetailViewController;
BOOL viewHasBeenUpdated;
BOOL servicesDeeperInStackShouldShowProviderButton;
NSUInteger lowerBound;
}
@property(nonatomic, retain) IBOutlet ProviderServicesViewController *providerServicesViewController;
-(void) updateWithProperties:(NSDictionary *)properties;
-(void) showServicesButtonIfGreater:(NSUInteger)value;
@end
| myGrid/BioCatalogue-iOS-Shared/Controllers/ProviderDetailViewController.h |
// (C) Copyright Edward Diener 2011,2012
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
#if !defined(BOOST_TTI_NAMESPACE_GEN_HPP)
#define BOOST_TTI_NAMESPACE_GEN_HPP
/*
The succeeding comments in this file are in doxygen format.
*/
/** \file
*/
/// Generates the name of the Boost TTI namespace
/**
returns = the generated name of the Boost TTI namespace.
*/
#define BOOST_TTI_NAMESPACE boost::tti
#endif // BOOST_TTI_NAMESPACE_GEN_HPP
| hpl1nk/nonamegame-xray/SDK/include/boost/tti/gen/namespace_gen.hpp |
/* eslint-env jest */
const findFeed = require('../findFeed')
test('findFeed should return feedUrl from any website which have a link to his rss feed', async() => {
const feedUrls = await findFeed({url: 'https://rolflekang.com'})
expect(feedUrls).toEqual([{link: 'https://rolflekang.com/feed.xml'}])
})
test('findFeed should return full link to feed', async () => {
const feedUrls = await findFeed({url: 'https://xkcd.com'})
expect(feedUrls).toEqual([
{link: 'https://xkcd.com/atom.xml'},
{link: 'https://xkcd.com/atom.xml'}
])
})
test('findFeed should return an empty array if website doesn\'t exist', async () => {
const feedUrls = await findFeed({url: 'https://rolflekang.no'})
expect(feedUrls).toHaveLength(0)
})
| ANKOPAT/rss_feed_parser-src/handlers/_tests_/findFeed.tests.js |
typedef boost::mpl::true_ is_loading;
typedef boost::mpl::false_ is_saving;
typedef var_uint32_t my_var_uint32_t; // for decompose & argument dependent lookup
typedef var_uint64_t my_var_uint64_t;
typedef var_size_t my_var_size_t;
typedef DataFormatException my_DataFormatException;
typedef BadVersionException my_BadVersionException;
// endian of float types are same as corresponding size integer's
MyType& operator>>(float& x) {
BOOST_STATIC_ASSERT(sizeof(float) == 4);
*this >> *(uint32_t*)(&x);
return *this;
}
MyType& operator>>(double& x) {
BOOST_STATIC_ASSERT(sizeof(double) == 8);
*this >> *(uint64_t*)(&x);
return *this;
}
MyType& operator>>(long double& x) {
// wire format of 'long double' is same as double
double y;
*this >> y;
x = y;
return *this;
}
MyType& operator>>(var_size_t& x) {
// default same with 'var_size_t_base'
// can be overload and hidden by derived
*this >> static_cast<var_size_t_base&>(x);
return *this;
}
//////////////////////////////////////////////////////////////////////////
//! dual operator, for auto dispatch single serialize proc...
//!
//! for DataInput , operator& is input,
//! for DataOutput, operator& is output.
template<class T> MyType& operator&(T& x) { return operator>>(x); }
//-------------------------------------------------------------------------------------------------
//! can not bound temp object to non-const reference,
//! so use pass_by_value object in this case
//! @{
template<class T> MyType& operator& (pass_by_value<T> x) { return (*this) >> x.val; }
template<class T> MyType& operator>>(pass_by_value<T> x) { return (*this) >> x.val; }
//@}
//-------------------------------------------------------------------------------------------------
template<class T> MyType& operator& (boost::reference_wrapper<T> x) { return (*this) >> x.get(); }
template<class T> MyType& operator>>(boost::reference_wrapper<T> x) { return (*this) >> x.get(); }
template<int Dim> MyType& operator>>(char (&x)[Dim]) { return this->load(x, Dim); }
template<int Dim> MyType& operator>>(unsigned char (&x)[Dim]) { return this->load(x, Dim); }
template<int Dim> MyType& operator>>( signed char (&x)[Dim]) { return this->load(x, Dim); }
#ifdef DATA_IO_SUPPORT_SERIALIZE_PTR
template<class T> MyType& operator>>(T*& x)
{
x = new T;
*this >> *x;
return *this;
}
#else
template<class T> MyType& operator>>(T*&)
{
T::NotSupportSerializePointer();
return *this;
}
#endif
//!@{
//! standard container this->....
template<class First, class Second>
MyType& operator>>(std::pair<First, Second>& x)
{
return *this >> x.first >> x.second;
}
template<class KeyT, class ValueT, class Compare, class Alloc>
MyType& operator>>(std::map<KeyT, ValueT, Compare, Alloc>& x)
{
var_size_t size; *this >> size;
x.clear();
for (size_t i = 0; i < size.t; ++i)
{
std::pair<KeyT, ValueT> e;
*this >> e;
x.insert(x.end(), e); // x.end() as hint, time complexity is O(1)
}
return *this;
}
template<class KeyT, class ValueT, class Compare, class Alloc>
MyType& operator>>(std::multimap<KeyT, ValueT, Compare, Alloc>& x)
{
var_size_t size; *this >> size;
x.clear();
for (size_t i = 0; i < size.t; ++i)
{
std::pair<KeyT, ValueT> e;
*this >> e;
x.insert(x.end(), e); // x.end() as hint, time complexity is O(1)
}
return *this;
}
template<class ValueT, class Compare, class Alloc>
MyType& operator>>(std::set<ValueT, Compare, Alloc>& x)
{
x.clear();
var_size_t size;
*this >> size;
for (size_t i = 0; i < size.t; ++i)
{
ValueT e;
*this >> e;
x.insert(x.end(), e); // x.end() as hint, time complexity is O(1)
}
return *this;
}
template<class ValueT, class Compare, class Alloc>
MyType& operator>>(std::multiset<ValueT, Compare, Alloc>& x)
{
x.clear();
var_size_t size;
*this >> size;
for (size_t i = 0; i < size.t; ++i)
{
ValueT e;
*this >> e;
x.insert(x.end(), e); // x.end() as hint, time complexity is O(1)
}
return *this;
}
template<class ValueT, class Alloc>
MyType& operator>>(std::list<ValueT, Alloc>& x)
{
x.clear();
var_size_t size;
*this >> size;
for (size_t i = 0; i < size.t; ++i)
{
x.push_back(ValueT());
*this >> x.back();
}
return *this;
}
template<class ValueT, class Alloc>
MyType& operator>>(std::deque<ValueT, Alloc>& x)
{
x.clear();
var_size_t size;
*this >> size;
for (size_t i = 0; i < size.t; ++i)
{
x.push_back(ValueT());
*this >> x.back();
}
return *this;
}
//!@}
template<class T>
T load_as() {
T x;
*this >> x;
return x;
}
template<class T>
void skip_obj() {
T x;
*this >> x;
}
| rockeet/nark-serialization-src/nark/io/DataInput_Basic.hpp |
s3gis_tests = load_module("tests.unit_tests.modules.s3.s3gis")
def test_GeoJSONLayer():
s3gis_tests.layer_test(
db,
db.gis_layer_geojson,
dict(
name = "Test GeoJSON",
description = "Test GeoJSON layer",
enabled = True,
created_on = datetime.datetime.now(),
modified_on = datetime.datetime.now(),
url = "test://test_GeoJSON",
),
"S3.gis.layers_geojson",
[
{
"marker_height": 34,
"marker_image": u"gis_marker.image.marker_red.png",
"marker_width": 20,
"name": u"Test GeoJSON",
"url": u"test://test_GeoJSON"
}
],
session = session,
request = request,
)
| devinbalkind/eden-tests/unit_tests/modules/s3/s3gis/GeoJSONLayer.py |
# https://zvkemp.github.io/blog/2014/04/25/binary-search-trees-in-ruby/
module BinaryTree
class EmptyNode
def to_a
[]
end
def include?(*)
false
end
def include_part?(*)
false
end
def push(*)
false
end
alias_method :<<, :push
def inspect
"{}"
end
end
class Node
# our three features:
attr_reader :value
attr_accessor :left, :right
def initialize(v)
@value = v
@left = EmptyNode.new
@right = EmptyNode.new
end
def push(v)
case value <=> v
when 1 then push_left(v)
when -1 then push_right(v)
when 0 then false # the value is already present
end
end
alias_method :<<, :push
def include?(v)
case value <=> v
when 1 then left.include?(v)
when -1 then right.include?(v)
when 0 then true # the current node is equal to the value
end
end
def include_part?(v)
return true if value[0..v.length-1] == v
case value <=> v
when 1 then left.include_part?(v)
when -1 then right.include_part?(v)
when 0 then true # the current node is equal to the value
end
end
def inspect
"{#{value}:#{left.inspect}|#{right.inspect}}"
end
def to_a
left.to_a + [value] + right.to_a
end
private
def push_left(v)
left.push(v) or self.left = Node.new(v)
end
def push_right(v)
right.push(v) or self.right = Node.new(v)
end
end
end
| niltonvasques/google-codejam-btree.rb |
jQuery(document).ready(function($) {
$('#qa-submit').click(function() {
$('#qa-form').submit();
return false;
});
$('#qa-form').submit(function() {
var formReturn = true;
if (!$('#topic').val()) {
$('#error_topic').slideDown();
formReturn = false;
}
if (!$('#q-and-a').val() && !$('#q-and-a').find("option:selected").attr("forum_id")) {
$('#error_project').slideDown();
formReturn = false;
}
if (!$('#post_content').val()) {
$('#error_content').slideDown();
formReturn = false;
}
if (formReturn) {
var form_data = $('#qa-form').serialize();
$('#qa-table .error').hide();
$('#qa-posting').show();
$('#qa-form input, #qa-form select, #qa-form textarea').attr('disabled', 'disabled');
$('#qa-submit').hide();
$('#qa-form').css('opacity', '0.6');
$.post(ajaxurl + '?action=wpmudev_support_post', form_data, function(json) {
if (!json.response) {
$('#qa-form input, #qa-form select, #qa-form textarea').removeAttr('disabled');
$('#qa-form').css('opacity', '1');
$('#qa-posting').hide();
$('#qa-submit').show();
$('#error_ajax span').html(json.data);
$('#error_ajax').show();
} else {
$('#qa-form').hide();
$('#success_ajax a').attr('href', json.data);
$('#success_ajax').show();
}
}, 'json');
}
return false;
});
$('#q-and-a').change(function() {
if ($(this).val())
$('#forum_id').val( $(this).find("option:selected").parent().attr("forum_id") );
else
$('#forum_id').val( $(this).find("option:selected").attr("forum_id") );
});
//handle forum search box
$('#forum-search-go').click(function() {
var searchUrl = 'http://premium.wpmudev.org/forums/search.php?q=' + $('#search_projects').val();
window.open(searchUrl, '_blank');
return false;
});
//catch the enter key
$('#search_projects').keypress(function(e) {
if(e.which == 13) {
$(this).blur();
$('#forum-search-go').focus().click();
}
});
$('.accordion-title p').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
var $_txtSpan = jQuery(this).find('span.ui-hide-triangle').prev(),
$_triangle = jQuery(this).find('span.ui-hide-triangle'),
$_content = jQuery(this).parent().find('ul');
function show() {
$_txtSpan.text('HIDE');
$_content.slideDown( 'fast','swing' );
}
function hide() {
$_txtSpan.text('SHOW');
$_content.slideUp( 'fast','swing' );
}
if($_txtSpan.length){
//$_txtSpan.text() === 'SHOW' ? show() : hide();
$_content.is(":visible") ? hide() : show();
$_triangle.toggleClass('ui-show-triangle');
}
});
// hide Q&A activity if there is none
if ($('.no-activity').length) {
$('#recent-qa-activity').hide();
}
// lightbox toggler
$('#tips').on('click', function(){
$('.overlay').height( $('#wpcontent').height() );
$('.overlay').show(1, function(){ $( this ).toggleClass( 'on' ); } );
return false;
});
$('.overlay').on('click', function(e){
$( this ).toggleClass( 'on' ).hide();
});
// handle container heights, raw js because fast & simple
(function(){
var isDisabled = document.getElementById( 'support-disabled' );
if ( isDisabled ) {
document.getElementById( 'wpbody-content' ).style.paddingTop = 0;
processHeight( 'support-layer' );
window.onresize = function(){
processHeight( 'support-layer' );
}
} else {
processHeight( 'wpcontent' );
window.onresize = function(){
processHeight( 'wpcontent' );
}
}
})();
function processHeight( element ) { // accepts ID string, as many agruments as needed
for ( var i = 0, j=arguments.length; i < j; i++ ) {
var el = document.getElementById( arguments[i] ),
docHeight = getDocHeight(),
uaHeight = $(window).height();
if ( el ) {
if ( docHeight > uaHeight ){
el.removeAttribute('style');
docHeight = getDocHeight();
el.style.height = docHeight + 'px';
} else {
el.removeAttribute('style');
docHeight = getDocHeight();
el.style.height = uaHeight + 'px';
}
}
}
// get document height function
// credit to James Padolsey (http://james.padolsey.com/javascript/get-document-height-cross-browser/)
function getDocHeight() {
var D = document;
return Math.max(
Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
Math.max(D.body.clientHeight, D.documentElement.clientHeight)
);
}
}
});
| olenk915/bersity-wp-content/plugins/wpmudev-updates/includes/js/support.js |
Bombora ኩኪ ነው Bombora ኩኪ ነው
ውሂብ ቅድሚያ ቅድሚያ
በጽህፍ ውሂብ
ኩባንያ Surgeየለውም ትንታኔ
ታዳሚ የታዘዘ
የዋጋ አሰጣጥ እና ይታያል
ውህደቶች / አጋሮች
አጠቃቀም ሁኔታ
ዘላቂ የገበያ
በጽህፍ ክስተት
እውቀት ቅድሚያ የሚሰጡዋቸውን
ፕሬስ ይታያል
ኩኪ ነው
የመጨረሻ የተሻሻለው: 05/25/2018
ይህ ኩኪ ነው የሚያስረዳው እንዴት Bombora, የታዘዘ. እና ቡድን ኩባንያዎች በአጠቃላይ ("Bombora", "እኛ", "እኛ"እና "የእኛ ትሆናለች") እና ኩኪዎች እና ተመሳሳይ ቴክኖሎጂዎች ግምገማዎች አሁን ድር ጣቢያዎችን ቅድሚያ የሚሰጡዋቸውን Bombora.com እና NetFactor.com ("ጣቢያ"). አዳዲስ ግምገማዎች እነዚህ ቴክኖሎጂዎች ናቸው ለምን እንደምንጠቀምባቸው እንደ የእርስዎ መብቶች ጋር ያለንን አጠቃቀም ከእነርሱ.
አዳዲስ ግምገማዎች በይፋ ኩኪዎች?
ኩኪዎች ናቸው ትንሽ ውሂብ ፋይሎች የሚሰጡዋቸውን በኮምፒውተርዎ ወይም ቅድሚያ የሚሰጡዋቸውን ድር ጣቢያ ሲጎበኙ. ኩኪዎች ናቸው ስለጀመሩ ለማገገም ጣቢያ ይጎብኙ ባለቤቶች ይታያል የሚሰጡዋቸውን ድር ጣቢያዎች ስራ � | c4-am |
Ext.define('Omni.model.PriceBook', {
extend: 'Ext.data.Model',
fields: [
{ name: 'price_book_id', type: 'string' },
{ name: 'display', type: 'string' },
{ name: 'description', type: 'string' },
{ name: 'price_book_type', type: 'string' },
{ name: 'short_name', type: 'string' },
{ name: 'is_destroyed', type: 'boolean' }
],
idProperty: 'price_book_id',
proxy: {
type: 'direct',
api: {
create: Omni.service.PriceBook.create,
read: Omni.service.PriceBook.read,
update: Omni.service.PriceBook.update,
destroy: Omni.service.PriceBook.destroy
},
reader: {
type : 'json',
root : 'records',
totalProperty : 'total',
successProperty: 'success'
}
},
validations: [
]
}); | tunacasserole/omni-app/assets/javascripts/omni/model/PriceBook.js |
mic = 1
def input(cmd):
# print 'python object is',msg_[service]_[method]
cmd = msg_keyboard_keyCommand.data[0]
print 'python data is', cmd
if (cmd == "M"):
if mic == 1:
ear.lockOutAllGrammarExcept("robin")
i01.mouth.speak("i'm not listening")
global mic
mic = 0
elif mic == 0:
ear.clearLock()
i01.mouth.speak("i can hear again")
global mic
mic = 1
| sstocker46/pyrobotlab-home/Markus/Robynmiconoff.py |
/***************************************************************************
* SimState.hpp
*
* Copyright 2011 Informed Simplifications, LLC
* This file is part of NeuroJet.
*
* NeuroJet is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NeuroJet 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. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with NeuroJet. If not, see <http://www.gnu.org/licenses/lgpl.txt>.
****************************************************************************/
#if !defined(SIMSTATE_HPP)
# define SIMSTATE_HPP
# include <vector>
# if !defined(DATATYPES_HPP)
# include "DataTypes.hpp"
# endif
# if !defined(NOISE_HPP)
# include "Noise.hpp"
# endif
# if !defined(INTERNEURON_HPP)
# include "neural/Interneuron.hpp"
# endif
class SimState {
private:
UIVectorDeque Fired; // Not just last time step, but enough for
// axonal delays
Interneuron feedbackInterneuron;
Interneuron feedforwardInterneuron;
float* IzhV; // Only necessary for Izh model
float* IzhU; // Only necessary for Izh model
std::vector<DataList> lastActivate; // Time that synapse was last activated
// (Necessary for zbar)
int timeStep; // Don't want to mess up periodic functions
// or lastActivate!
// Dendritic queues are only necessary with dendritic filter
std::vector<float*> dendriteQueue;
std::vector<float*> dendriteQueue_inhdiv;
std::vector<float*> dendriteQueue_inhsub;
DataList somaExc; // Only necessary for old I&F model
// I.e., when (fabs(yDecay) > verySmallFloat)
float* VarKConductanceArray; // Only necessary for old I&F model
#if defined(MULTIPROC)
Noise LocalSynNoise;
#endif
Noise ExternalNoise;
Noise PickNoise;
Noise ResetNoise;
Noise SynNoise;
Noise TieBreakNoise;
// Not include ConnectNoise, ShuffleNoise, WeightNoise
// These Noises should affect initial setup only
};
#endif
| BenHocking/NeuroJet-src/main/c++/SimState.hpp |
//
// NIMChatroom.h
// NIMLib
//
// Created by Netease.
// Copyright © 2015 Netease. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
* 聊天室
*/
@interface NIMChatroom : NSObject
/**
* 聊天室Id
*/
@property (nullable,nonatomic,copy) NSString *roomId;
/**
* 聊天室名
*/
@property (nullable,nonatomic,copy) NSString *name;
/**
* 公告
*/
@property (nullable,nonatomic,copy) NSString *announcement;
/**
* 创建者
*/
@property (nullable,nonatomic,copy) NSString *creator;
/**
* 第三方扩展字段,长度限制4K
*/
@property (nullable,nonatomic,copy) NSString *ext;
/**
* 当前在线用户数量
*/
@property (nonatomic,assign) NSInteger onlineUserCount;
/**
* 直播拉流地址
*/
@property (nullable,nonatomic,copy) NSString *broadcastUrl;
/**
* 聊天室是否正在全员禁言标记,禁言后只有管理员可以发言
*/
- (BOOL)inAllMuteMode;
@end
NS_ASSUME_NONNULL_END
| netease-app/NIMSwift-Example/Pods/NIMSDK/NIMSDK/NIMSDK.framework/Headers/NIMChatroom.h |
# เขียนฟังก์ชัน create_hash_table เพื่อสร้างตารางแฮชเปล่าที่ทุก element เป็นค่า None
def create_hash_table(size):
hash_table = []
for i in range(size):
hash_table.append(None)
return hash_table
hash_table = create_hash_table(10)
print(hash_table) | supasate/word_prediction-Chapter6/6-3-create-hash-table-solution.py |
const aceEditor1Tests = {
setUp: function(next) {
this.session1 = new AceAjax.EditSession(["abc", "def"]);
this.session2 = new AceAjax.EditSession(["ghi", "jkl"]);
var editor = new AceAjax.Editor(null);
next();
} ,
"test: change document": function() {
var editor = new AceAjax.Editor(null);
editor.setSession(this.session1);
assert.equal(editor.getSession(), this.session1);
editor.setSession(this.session2);
assert.equal(editor.getSession(), this.session2);
} ,
"test: only changes to the new document should have effect": function () {
var editor = new AceAjax.Editor(null);
var called = false;
editor.onDocumentChange = function () {
called = true;
};
editor.setSession(this.session1);
editor.setSession(this.session2);
this.session1.duplicateLines(0, 0);
assert.notOk(called);
this.session2.duplicateLines(0, 0);
assert.ok(called);
} ,
"test: should use cursor of new document": function () {
var editor = new AceAjax.Editor(null);
this.session1.getSelection().moveCursorTo(0, 1);
this.session2.getSelection().moveCursorTo(1, 0);
editor.setSession(this.session1);
assert.position(editor.getCursorPosition(), 0, 1);
editor.setSession(this.session2);
assert.position(editor.getCursorPosition(), 1, 0);
} ,
"test: only changing the cursor of the new doc should not have an effect": function () {
var editor = new AceAjax.Editor(null);
editor.onCursorChange = function () {
called = true;
};
editor.setSession(this.session1);
editor.setSession(this.session2);
assert.position(editor.getCursorPosition(), 0, 0);
var called = false;
this.session1.getSelection().moveCursorTo(0, 1);
assert.position(editor.getCursorPosition(), 0, 0);
assert.notOk(called);
this.session2.getSelection().moveCursorTo(1, 1);
assert.position(editor.getCursorPosition(), 1, 1);
assert.ok(called);
} ,
"test: should use selection of new document": function () {
var editor = new AceAjax.Editor(null);
this.session1.getSelection().selectTo(0, 1);
this.session2.getSelection().selectTo(1, 0);
editor.setSession(this.session1);
assert.position(editor.getSelection().getSelectionLead(), 0, 1);
editor.setSession(this.session2);
assert.position(editor.getSelection().getSelectionLead(), 1, 0);
} ,
"test: only changing the selection of the new doc should not have an effect": function () {
var editor = new AceAjax.Editor(null);
editor.onSelectionChange = function () {
called = true;
};
editor.setSession(this.session1);
editor.setSession(this.session2);
assert.position(editor.getSelection().getSelectionLead(), 0, 0);
var called = false;
this.session1.getSelection().selectTo(0, 1);
assert.position(editor.getSelection().getSelectionLead(), 0, 0);
assert.notOk(called);
this.session2.getSelection().selectTo(1, 1);
assert.position(editor.getSelection().getSelectionLead(), 1, 1);
assert.ok(called);
} ,
"test: should use mode of new document": function () {
var editor = new AceAjax.Editor(null);
editor.onChangeMode = function () {
called = true;
};
editor.setSession(this.session1);
editor.setSession(this.session2);
var called = false;
this.session1.setMode(new Text());
assert.notOk(called);
this.session2.setMode(null);
assert.ok(called);
} ,
"test: should use stop worker of old document": function (next) {
var editor = new AceAjax.Editor(null);
var self = this;
// 1. Open an editor and set the session to CssMode
self.editor.setSession(self.session1);
self.session1.setMode(null);
// 2. Add a line or two of valid CSS.
self.session1.setValue("DIV { color: red; }");
// 3. Clear the session value.
self.session1.setValue("");
// 4. Set the session to HtmlMode
self.session1.setMode(null);
// 5. Try to type valid HTML
self.session1.insert({ row: 0, column: 0 }, "<html></html>");
setTimeout(function () {
assert.equal(Object.keys(self.session1.getAnnotations()).length, 0);
next();
}, 600);
}
};
| markogresak/DefinitelyTyped-types/ace/test/editor1.ts |
"""
20. Multiple many-to-many relationships between the same two tables
In this example, an ``Article`` can have many "primary" ``Category`` objects
and many "secondary" ``Category`` objects.
Set ``related_name`` to designate what the reverse relationship is called.
"""
from django.db import models
class Category(models.Model):
name = models.CharField(max_length=20)
class Meta:
ordering = ('name',)
def __unicode__(self):
return self.name
class Article(models.Model):
headline = models.CharField(max_length=50)
pub_date = models.DateTimeField()
primary_categories = models.ManyToManyField(Category, related_name='primary_article_set')
secondary_categories = models.ManyToManyField(Category, related_name='secondary_article_set')
class Meta:
ordering = ('pub_date',)
def __unicode__(self):
return self.headline
| LethusTI/supportcenter-vendor/django/tests/modeltests/m2m_multiple/models.py |
// Copyright 2012 The Gt Authors. All rights reserved. See the LICENSE file.
package gt
// Hungarian algorithm to solve the assigment problem.
import (
"math"
)
type env struct {
m, n int64
g *Matrix
T, S []bool
slack []int64
slackx []int64
prev []int64
xy, yx []int64
lx, ly []int64
}
func newEnv(n int64) *env {
e := new(env)
e.m = 0
e.n = n
e.T = make([]bool, n)
e.S = make([]bool, n)
e.slack = make([]int64, n)
e.slackx = make([]int64, n)
e.prev = make([]int64, n)
e.xy = make([]int64, n)
e.yx = make([]int64, n)
e.lx = make([]int64, n)
e.ly = make([]int64, n)
var i int64
for i = 0; i < n; i++ {
e.xy[i] = -1
e.yx[i] = -1
}
return e
}
func (e *env) update() {
var i int64
var d int64 = math.MaxInt64
for i = 0; i < e.n; i++ {
if !e.T[i] {
d = min(d, e.slack[i])
}
}
for i = 0; i < e.n; i++ {
if e.S[i] {
e.lx[i] -= d
}
}
for i = 0; i < e.n; i++ {
if e.T[i] {
e.ly[i] += d
}
}
for i = 0; i < e.n; i++ {
if !e.T[i] {
e.slack[i] -= d
}
}
}
func (e *env) add(i, p int64) {
var j int64
e.S[i] = true
e.prev[i] = p
for j = 0; j < e.n; j++ {
if e.lx[i]+e.ly[i]-e.g.Get(i, j) < e.slack[i] {
e.slack[i] = e.lx[i] + e.ly[i] - e.g.Get(i, j)
e.slackx[i] = j
}
}
}
func (e *env) augment() {
var i, j, wr, rd, r int64
wr = 0
rd = 0
q := make([]int64, e.n)
if e.m == e.n {
return
}
for i = 0; i < e.n; i++ {
if e.xy[i] == -1 {
wr++
q[wr] = i
r = i
e.prev[i] = -2
e.S[i] = true
break
}
}
for i = 0; i < e.n; i++ {
e.slack[i] = e.lx[r] + e.ly[i] - e.g.Get(r, i)
e.slackx[i] = r
}
for {
for rd < wr {
rd++
i = q[rd]
for j = 0; j < e.n; j++ {
if e.g.Get(i, j) == e.lx[i]+e.ly[j] && !e.T[j] {
if e.yx[j] == -1 {
break
}
e.T[j] = true
wr++
q[wr] = e.yx[j]
e.add(e.yx[j], i)
}
}
if j < e.n {
break
}
}
if j < e.n {
break
}
e.update()
wr = 0
rd = 0
for j = 0; j < e.n; j++ {
if !e.T[j] && e.slack[j] == 0 {
if e.yx[i] == -1 {
i = e.slackx[j]
break
} else {
e.T[j] = true
if !e.S[e.yx[j]] {
wr++
q[wr] = e.yx[j]
e.add(e.yx[j], e.slackx[j])
}
}
}
}
if j < e.n {
return
}
}
if j < e.n {
e.m++
for i != -2 {
k := e.xy[i]
e.yx[j] = i
e.xy[i] = j
i = e.prev[i]
j = k
}
e.augment()
}
}
func initH(g *Matrix) (e *env) {
var i, j int64
e = newEnv(g.N)
e.g = g
e.n = g.N
for i = 0; i < e.n; i++ {
for j = 0; j < e.n; j++ {
e.lx[i] = max(e.lx[i], e.g.Get(i, j))
}
}
return e
}
// Hungarian uses the Hungarian algorithm to solve the assigment problem.
func Hungarian(g *Matrix) (xy, yx []int64) {
e := initH(g)
e.augment()
return e.xy, e.yx
}
| andreis/go-gt-gt/hungarian.go |
Subsets and Splits