text
stringlengths 3
181k
| src
stringlengths 5
1.02k
|
---|---|
import * as Utility from './Utility.js'
import * as Element from './Element.js'
export var development = Utility.environment() === 'development'
/**
* @param {object} element
* @param {object?} properties
* @param {string} origin
*/
export function types (element, properties, origin) {
if (development) {
dispatch(element, properties, element.type[origin], origin)
}
}
/**
* @param {object} element
* @param {object} properties
* @param {object?} validators
* @param {string} origin
*/
export function dispatch (element, properties, validators, origin) {
if (validators) {
if (typeof validators === 'function') {
dispatch(element, properties, validators.call(element.type, properties), origin)
} else {
validate(Element.display(element), properties, validators, origin)
}
}
}
/**
* @param {string} element
* @param {object} properties
* @param {object?} validators
* @param {string} origin
*/
export function validate (element, properties, validators, origin) {
for (var key in validators) {
if (key = validators[key](properties, key, element, origin)) {
throw key
}
}
}
| thysultan/dio.js-src/Assert.js |
#ifndef FILEBAS64CALCULATOR_HPP
#define FILEBAS64CALCULATOR_HPP
#include <QWidget>
#include <QThread>
class FileBase64Calculator : public QThread {
Q_OBJECT
public:
FileBase64Calculator( QWidget* parent, QString fileName );
virtual ~FileBase64Calculator();
protected:
void run() override;
private:
const QString mFileName;
signals:
void completed( QByteArray base64 );
};
#endif // FILEBAS64CALCULATOR_HPP
| rikyoz/mrhash-include/filebase64calculator.hpp |
import { default as CodeBlock } from './Component';
export default CodeBlock;
| sanjay-notes/builders-src/library/codeBlock/index.js |
// ***********************************************************************
// Assembly : ACBr.Net.CTe
// Author : RFTD
// Created : 10-12-2016
//
// Last Modified By : RFTD
// Last Modified On : 10-12-2016
// ***********************************************************************
// <copyright file="ServicoCTe.cs" company="ACBr.Net">
// The MIT License (MIT)
// Copyright (c) 2016 Grupo ACBr.Net
//
// 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.
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace ACBr.Net.CTe.Services
{
public enum TipoServicoCTe
{
RecepcaoEvento,
CTeRecepcao,
CTeRetRecepcao,
CTeInutilizacao,
CTeConsultaProtocolo,
CTeStatusServico,
CTeConsultaCadastro,
RecepcaoEventoAN,
CTeRecepcaoOS,
DistribuicaoDFe
}
} | ACBrNet/ACBr.Net.CTe-src/ACBr.Net.CTe.Shared/Services/ServicoCTe.cs |
import React from "react"
declare module "react-loader-spinner"
{
// Main Interface for the props
interface LoaderProps<T = {}> {
/**
* @property _visible_ | Show/ Hide the loader as required
* @default false
*/
visible?: boolean;
/**
* @property _type_ | Type of spinner you want to display
* @default Audio
*/
type:
"Audio"
|"BallTriangle"
|"Bars"
|"Circles"
|"Grid"
|"Hearts"
|"Oval"
|"Puff"
|"Rings"
|"TailSpin"
|"ThreeDots"
|"Watch"
|"RevolvingDot"
|"Triangle"
|"Plane"
|"MutatingDots"
|"CradleLoader";
/**
* @property _height_ | Height prop define the height of the svg spinner.
* @default 80px
*/
height?: number | string;
/**
* @property _width_ | Width prop define the width of the spinner.
* @default 80px
*/
width?: number | string;
/**
* @property _color_ | color prop is for adding color to the spinner
* @default Blue
*/
color?: string;
/**
* @property _secondaryColor_ | secondaryColor prop for now is available on Plane and MutatingDots loaders
* @default Grey
*/
secondaryColor?: string;
/**
* @property _timeout_ | Duration in miliseconds after which spinner is disable
* d@default 0
*/
timeout?: number;
/**
* @property _radius_ | Set radius if the loader has a circle element in it
* @default value_varies
*/
radius?: number;
}
export default class Loader extends React.Component<LoaderProps>{
constructor(props: LoaderProps)
}
}
| MAN-IN-WAN/Kob-Eye-Skins/VetoccitanT3/ReactSrc/node_modules/react-loader-spinner/dist/types/index.d.ts |
/**
* @class DeviceInfo
* 设备信息。可以获取语言,操作系统和浏览器等相关信息(单例对象,直接调用)。
*/
export class DeviceInfo {
/**
* @property {string} locale
* 浏览器的locale(语言+国家)。
*/
public static locale : string;
/**
* @property {string} locale
* 浏览器的语言。
*/
public static language : string;
public static isMacOS : boolean;
public static isLinux : boolean;
public static isWindows : boolean;
public static isAndroid : boolean;
public static isIPhone : boolean;
public static isIPad: boolean;
public static isEdge: boolean;
public static isWindowsPhone : boolean;
public static isMobile: boolean;
public static isPointerSupported : boolean;
public static isMSPointerSupported : boolean;
public static isTouchSupported : boolean;
public static init(_locale:string, userAgent:string) {
DeviceInfo.locale = (_locale || navigator.language).toLowerCase();
DeviceInfo.language = DeviceInfo.locale.split("-")[0];
var ua = userAgent = userAgent || navigator.userAgent;
DeviceInfo.isWindowsPhone = ua.indexOf("Windows Phone") >= 0;
DeviceInfo.isAndroid = ua.indexOf("Android") >= 0;
DeviceInfo.isIPhone = ua.indexOf("iPhone;") >= 0;
DeviceInfo.isIPad = ua.indexOf("iPad;") >= 0;
DeviceInfo.isLinux = !DeviceInfo.isAndroid && ua.indexOf("Linux;") >= 0;
DeviceInfo.isMacOS = !DeviceInfo.isIPhone && !DeviceInfo.isIPad && ua.indexOf("Macintosh;") >= 0;
DeviceInfo.isWindows = !DeviceInfo.isWindowsPhone && ua.indexOf("Windows NT") >= 0;
DeviceInfo.isMobile = ua.indexOf("Mobile") >= 0;
DeviceInfo.isPointerSupported = window.navigator.pointerEnabled;
DeviceInfo.isMSPointerSupported = window.navigator.msPointerEnabled;
var msTouchEnabled = !!window.navigator.msMaxTouchPoints;
var generalTouchEnabled = "ontouchstart" in document.createElement("div");
DeviceInfo.isTouchSupported = !!msTouchEnabled || generalTouchEnabled;
}
}
| qtoolkit/qtk-src/base/device-info.ts |
/*
* aboutbox.h
*
* 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; version 2 of the License.
*
* 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.
*
* Author: Dariusz Gadomski <[email protected]>
*/
#ifndef ABOUTBOX_H
#define ABOUTBOX_H
#include <QtGui/QDialog>
namespace Ui {
class AboutBox;
}
class AboutBox : public QDialog {
Q_OBJECT
Q_DISABLE_COPY(AboutBox)
public:
explicit AboutBox(QWidget *parent = 0);
virtual ~AboutBox();
protected:
virtual void changeEvent(QEvent *e);
private:
Ui::AboutBox *m_ui;
};
#endif // ABOUTBOX_H
| BackupTheBerlios/tinyorganizer-src/aboutbox.h |
ক্যাডেট কলেজ ব্লগসামিয়া (৯৯-০৫)দুই লাইন
বিভাগ: ময়মনসিংহ মার্চ ২৭, ২০০৮ @ ৫:১৩ পূর্বাহ্ন ৩৩ টি মন্তব্য
২,২৭৯ বার দেখা হয়েছে
৩৩ টি মন্তব্য : “দুই লাইন”
মার্চ ২৭, ২০০৮ @ ৫:১৬ পূর্বাহ্ন
হা হা হা 😀 🙂 =))
অফটপিক...আমি ইন্টারে টেস্ট বাদে আর কোন পরীক্ষায় কেমিস্ট্রিতে পাস করি নাই...কি যে ভয় লাগতো...
মার্চ ২৭, ২০০৮ @ ৯:০৭ পূর্বাহ্ন
আহারে কি ভাল রুমমেট..কত সুন্দর কইরা ডাক দ্যায়..!! 😆
আমারে তো কানের কাছে চিৱকার না দিলে কিছুই শুনতাম না..খালি ঘ্র..ঘ্র..ঘ্র...
মার্চ ২৭, ২০০৮ @ ৯:৪৯ পূর্বাহ্ন
মার্চ ২৭, ২০০৮ @ ১০:৪২ পূর্বাহ্ন
ওই সে আমার রুমমেট ছিলো না।
আর আমার অবস্থাও সেম সেম। 😆
মার্চ ২৭, ২০০৮ @ ১০:৫৯ পূর্বাহ্ন
মজার কাহিনী।
মার্চ ২৭, ২০০৮ @ ১১:০৪ পূর্বাহ্ন
তাইলে কি ও হুজুর পার্টি!!এর পরের লাইন নিশ্চয়ই...এই সুন্দর সকালে তুই ঘুমায়া থাকবি??নামাযটা পড়ে নে...
মার্চ ২৭, ২০০৮ @ ১১:২২ পূর্বাহ্ন
আরে গান্ধা...নিজেই তো...
মার্চ ২৭, ২০০৮ @ ১১:২৭ পূর্বাহ্ন
kmon asish/asen/aso polapan...sorry busy silam..bashai akhono internet ashenai..matroi basha change korsi..plus interstate e silam..nyway..blog to joss hosse..assa akhankar jara moderator ora ki aktu bolba kobe forum ta release hobe...forum hoile mone hoi aro moja hoito...stay well every1..
মার্চ ২৭, ২০০৮ @ ১১:৩৯ পূর্বাহ্ন
ওওও...ভুলেই গেসিলাম...থুরি!!
কিন্তু তুই তো সাচ্চা না মনে হইতেসে..ভাষার যা অবস্থা দেখলাম!!
মার্চ ২৭, ২০০৮ @ ১১:৪৯ পূর্বাহ্ন
ভর্তা বানায়া বুড়িগঙ্গায় ভাসায়া দিবো...খারাপ কথা কই বলসি???
মার্চ ২৭, ২০০৮ @ ১১:৫৬ পূর্বাহ্ন
নাহ,অতি সীমিত জ্ঞান!! তুই মুসলমানের মনে কষ্ট দিসিস...আর জানিস না যে...মুসলমানের মনে কষ্ট দিলে...(কি জানি হয়??কিসু একটা তো হয়ই...)
মার্চ ২৭, ২০০৮ @ ১২:০৫ অপরাহ্ন
ভাগ এইখান দিয়া
মার্চ ২৭, ২০০৮ @ ১২:০৮ অপরাহ্ন
kothai kothai vorta banao kano. vorta khaite ki khub moja lage??
মার্চ ২৭, ২০০৮ @ ১২:১২ অপরাহ্ন
হু হু ঠিক ঠিক
মার্চ ২৭, ২০০৮ @ ১২:১৩ অপরাহ্ন
প্রবলেমটা একটু সলভ করে দে'ত...
"তুই যে নামায পড়িস না..তুই তো কাফের হই যাবি"
"কোন মুসলমানকে কাফের বলা হারাম"
"তার আগে বল,তুই নিজেকে মুসলমান দাবি করতে পারিস?"
"ইন্নামাল আমা'নু বিণ্যিয়াতি"
................................(কন্টিনিউ..)
মার্চ ২৭, ২০০৮ @ ১২:১৪ অপরাহ্ন
দোস্ত, তোর কি হইছে? শরীর খারাপ??
| c4-bn |
// Mark Stankus 1999 (c)
// Newing.h
#ifndef INCLUDED_NEWING_H
#define INCLUDED_NEWING_H
template<class T>
struct Newing {
static T * s_copy() { return new T();};
static T * s_copy(const T & x) { return new T(x);};
};
#endif
| mcdeoliveira/NC-NCGB/Compile/src/Newing.hpp |
$(function(){
function pad(num, size) {
var s = "000000000" + num;
return s.substr(s.length-size);
}
faker.date.day = function(){
return pad(1 + Math.floor(Math.random() * 31), 2);
}
faker.date.monthDigit = function(){
return pad(1 + Math.floor(Math.random() * 12), 2);
}
faker.date.time = function(){
var hours = pad(1 + Math.floor(Math.random() * 12), 2),
minutes = pad(1 + Math.floor(Math.random() * 60), 2)
return (hours + ':' + minutes);
}
faker.date.year = function(){
return (2011 + Math.floor(Math.random() * 6)).toString();
}
faker.date.monthShort = function() {
return faker.date.month().substr(0, 3);
}
faker.date.weekdayShort = function() {
return faker.date.weekday().substr(0, 3);
}
faker.random.percentage = function() {
return Math.ceil(Math.random() * 100) + '%';
}
faker.random.percentagePoint = function() {
var percentage = 1 + Math.random() * 99;
return percentage.toFixed(1) + '%';
}
$('[data-faker]').each(function(){
var $element = $(this);
var fakerCommand = $element.data('faker');
fakerCommand = fakerCommand.replace(/\[\[/g, '{{').replace(/\]\]/g, '}}');
var data = faker.fake(fakerCommand);
if($element.prop('tagName') == 'IMG'){
$element.prop('src', data);
}else{
$element.text(data);
}
});
});
| SidBala/Survey-src/app/theme/javascript/app/faker.js |
/*
* Copyright (c) 2014 Baidu.com, 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.
*/
package com.baidubce.services.ses.model;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* The detail model object of domain. It is contained by @link{GetVerifiedDomainResponse} and @link{ListVerifiedDomainResponse}.
*/
public class DomainDetailModel {
private String domain;
@JsonProperty("dkim_attr")
private DkimAttrModel dkimAttr;
@JsonProperty("domain_attr")
private DomainAttrModel domainAttr;
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public DkimAttrModel getDkimAttr() {
return dkimAttr;
}
public void setDkimAttr(DkimAttrModel dkimAttr) {
this.dkimAttr = dkimAttr;
}
public DomainAttrModel getDomainAttr() {
return domainAttr;
}
public void setDomainAttr(DomainAttrModel domainAttr) {
this.domainAttr = domainAttr;
}
@Override
public String toString() {
return "DomainDetailModel [domain=" + domain + ", dkimAttr=" + dkimAttr + ", domainAttr=" + domainAttr + "]";
}
}
| llv22/baidu_bcs_sdk_java-src/main/java/com/baidubce/services/ses/model/DomainDetailModel.java |
"""
https://leetcode.com/problems/sort-an-array/
https://leetcode.com/submissions/detail/224682134/
"""
from typing import List
class Solution:
def sortArray(self, nums: List[int]) -> List[int]:
return sorted(nums)
import unittest
class Test(unittest.TestCase):
def test(self):
solution = Solution()
self.assertEqual(solution.sortArray([5, 2, 3, 1]), [1, 2, 3, 5])
self.assertEqual(solution.sortArray(
[5, 1, 1, 2, 0, 0]), [0, 0, 1, 1, 2, 5])
if __name__ == '__main__':
unittest.main()
| vivaxy/algorithms-python/problems/sort_an_array.py |
"""Settings for the ``rosetta`` app."""
ROSETTA_STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage'
ROSETTA_WSGI_AUTO_RELOAD = True
ROSETTA_UWSGI_AUTO_RELOAD = True
| bigee/django-multilingual-project-blog-multilingual_project_blog/settings/installed_apps/rosetta.py |
package com.thinkinjava.concurrency;
import java.util.concurrent.TimeUnit;
class NeedsCleanup {
private final int id;
public NeedsCleanup(int id) { this.id = id; }
public void cleanup() {
System.out.println("clean up " + id);
}
}
class Block3 implements Runnable {
private volatile double d = 1.0;
public void run() {
try {
while(!Thread.currentThread().isInterrupted()) {
NeedsCleanup n1 = new NeedsCleanup(1);
try {
// TimeUnit.SECONDS.sleep(10);
System.out.println(System.currentTimeMillis() + ": start time-consuming ...");
for (long i = 0; i < 650000000; i++) {
d = d + (Math.PI + Math.E) / d;
}
System.out.println(System.currentTimeMillis() + ": finish");
} finally {
n1.cleanup();
}
}
} finally {
System.out.println("exiting via interrupt");
}
}
}
public class InterruptingIdioim {
public static void main(String[] args) throws Exception {
Thread t = new Thread(new Block3());
t.start();
TimeUnit.SECONDS.sleep(1);
System.out.println(System.currentTimeMillis() + ": interrupting ...");
t.interrupt();
}
}
| santiwst/thinkinjava-src/main/java/com/thinkinjava/concurrency/InterruptingIdioim.java |
define([
'angular',
'../services/services'
], function(angular, services) {
'use strict';
angular.module('filters', ['services'])
.filter('interpolate', ['version', function(version) {
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
}
}]);
}); | cungen/bookmarks-js/filters/filters.js |
#!/usr/bin/env python
# coding=utf-8
import threading
"""
构造方法:
Thread(group=None, target=None, name=None, args=(), kwargs={})
group: 线程组,目前还没有实现,库引用中提示必须是None;
target: 要执行的方法;
name: 线程名;
args/kwargs: 要传入方法的参数。
实例方法:
isAlive(): 返回线程是否在运行。正在运行指启动后、终止前。
get/setName(name): 获取/设置线程名。
is/setDaemon(bool): 获取/设置是否守护线程。初始值从创建该线程的线程继承。当没有非守护线程仍在运行时,程序将终止。
start(): 启动线程。
join([timeout]): 阻塞当前上下文环境的线程,直到调用此方法的线程终止或到达指定的timeout(可选参数)
"""
# 方法1:将要执行的方法作为参数传给Thread的构造方法
def func():
print 'func() passed to Thread'
i=0
while i<10:
print 'func is running.'
i+=1
t = threading.Thread(target=func)
print t.isAlive()
t.start()
print t.isAlive()
# 方法2:从Thread继承,并重写run()
class MyThread(threading.Thread):
def run(self):
print 'MyThread extended from Thread'
t = MyThread()
t.start()
| zhaochl/python-utils-utils/thread/thread_study_threading.py |
OW_Notification = function( itemKey )
{
var listLoaded = false;
var model, list;
//code
model = OW.Console.getData(itemKey);
list = OW.Console.getItem(itemKey);
model.addObserver(function()
{
if ( !list.opened )
{
list.setCounter(model.get('counter.new'), true);
}
});
list.onHide = function()
{
list.setCounter(0);
list.getItems().removeClass('ow_console_new_message');
};
list.onShow = function()
{
if ( model.get('counter.all') <= 0 )
{
this.showNoContent();
return;
}
if ( model.get('counter.new') > 0 || !listLoaded )
{
this.loadList();
listLoaded = true;
}
};
}
OW.Notification = null; | seret/oxtebafu-ow_static/plugins/notifications/notifications.js |
// Time: O(klogu), k is most recently number of tweets,
// u is the number of the user's following.
// Space: O(t + f), t is the total number of tweets,
// f is the total number of followings.
/**
* Definition of Tweet:
* class Tweet {
* public:
* int id;
* int user_id;
* String text;
* static Tweet create(int user_id, string tweet_text) {
* // This will create a new tweet object,
* // and auto fill id
* }
* }
*/
class MiniTwitter {
public:
MiniTwitter() : time_(0) {
}
// @param user_id an integer
// @param tweet a string
// return a tweet
Tweet postTweet(int user_id, string tweet_text) {
const auto& tweet = Tweet::create(user_id, tweet_text);
messages_[user_id].emplace_back(make_pair(++time_, tweet));
return tweet;
}
// @param user_id an integer
// return a list of 10 new feeds recently
// and sort by timeline
vector<Tweet> getNewsFeed(int user_id) {
using RIT = deque<pair<size_t, Tweet>>::reverse_iterator;
priority_queue<tuple<size_t, RIT, RIT>> heap;
if (messages_[user_id].size()) {
heap.emplace(make_tuple(messages_[user_id].rbegin()->first,
messages_[user_id].rbegin(),
messages_[user_id].rend()));
}
for (const auto& id : followings_[user_id]) {
if (messages_[id].size()) {
heap.emplace(make_tuple(messages_[id].rbegin()->first,
messages_[id].rbegin(),
messages_[id].rend()));
}
}
vector<Tweet> res;
while (!heap.empty() && res.size() < number_of_most_recent_tweets_) {
const auto& top = heap.top();
size_t t;
RIT begin, end;
tie(t, begin, end) = top;
heap.pop();
auto next = begin + 1;
if (next != end) {
heap.emplace(make_tuple(next->first, next, end));
}
res.emplace_back(begin->second);
}
return res;
}
// @param user_id an integer
// return a list of 10 new posts recently
// and sort by timeline
vector<Tweet> getTimeline(int user_id) {
vector<Tweet> res;
for (auto it = messages_[user_id].rbegin();
it != messages_[user_id].rend() &&
res.size() < number_of_most_recent_tweets_; ++it) {
res.emplace_back(it->second);
}
return res;
}
// @param from_user_id an integer
// @param to_user_id an integer
// from user_id follows to_user_id
void follow(int from_user_id, int to_user_id) {
if (from_user_id != to_user_id &&
!followings_[from_user_id].count(to_user_id)) {
followings_[from_user_id].emplace(to_user_id);
}
}
// @param from_user_id an integer
// @param to_user_id an integer
// from user_id unfollows to_user_id
void unfollow(int from_user_id, int to_user_id) {
if (followings_[from_user_id].count(to_user_id)) {
followings_[from_user_id].erase(to_user_id);
}
}
private:
const size_t number_of_most_recent_tweets_ = 10;
unordered_map<int, unordered_set<int>> followings_;
unordered_map<int, deque<pair<size_t, Tweet>>> messages_;
size_t time_;
};
| jaredkoontz/lintcode-C++/mini-twitter.cpp |
ديسمبر 2017 ~ برامج العرب ~ تحميل برامج مجانية
تنزيل برنامج ايجل جيت EagleGet 2018 لتحميل من النت الى الكمبيوتر مجانا
mhmd taha | 7:28 ص | برامج التحميل كن أول من يعلق!
تنزيل برنامج تحميل من النت الى الكمبيوتر مجانا EagleGet
يعتبر برنامج ايجل جيت من أفضل برامج التحميل من الانترنت لما تمتاز به من مميزات جعله يحتل مكانة جيدة جداً بين تطبيقات وبرامج التحميل، حيث يقوم البرنامج بتحميل كافة الملفات والمستندات والصور ومقاطع الفيديو بمجرد اضافته إلى متصفحك الخاص، ويستطيع برنامج EagleGet الوصول إلى كافة روابط التحميل الموجودة في صفحة الانترنت للتحميل منها.
يقوم برنامج EagleGet بتحميل مقاطع الفيديو والصوت والصور وكافة المستندات من الانترنت بسرعة كبيرة، بالإضافة إلى امكانية تحميل مقاطع الفيديو من اليوتيوب وتنزيلها إلى جهازك دون أية مشاكل، حيث يعتبر برنامج أيجل جيت برنامج مجاني لا يحتاج إلى أية تسجيل. التالي تستطيع تحميل جميع الملفات بمختلف أنواعها سواء كانت أفلام أو ألعاب أو برامج أو مستندات من الانترنت ومواقع الويب بسرعة كبيرة، وما يميز برنامج ايجل جيت أنه برنامج تحميل سريع ويدعم استكمال التحميل، فقد تواجهك أحيانا بعض المشاكل المتعلقة بانقطاع الانترنت أو الكهرباء أو حدوث مشكلة في الخادم المتعلق بالانترنت، بالتالي فإ، برنامج يساعدك على إستئناف عملية التحميل دون الحاجة إلى بدء تنزيل الملف من البداية.
يعتمد برنامج أيجل جيت في تحميل مختلف أنواع الملفات والمستندات على تقسيمها إلى عدة أجزاء صغيرة مما يمكنك من تحميل الملفات بسرعة كبيرة في أقصر وقت ممكن، وبالتالي يمكنك البرنامج من تحميل الملفات الكبيرة والتي تحتاج إلى وقت أطول في مدة زمنية قصيرة جداً، ويدعم برنامج EagleGet متصفحات الانترنت المشهورة مثل جوجل كروم وفايرفوكس وأوبرا وغيرها من المتصفحات الأخرى، فهو إضافة يتم تثبيتها داخل المتصفح وعليه تقوم الإضافة بتحميل أي ملف أو فيديو أو برنامج من الصفحات التي تريد تحميل منها تلك الملفات، ويمتاز برنامج إيجل جيت بأنه برنامج تحميل مجاني، ويعمل بسرعة كبيرة في تحميل الملفات مقارنة ببرامج تحميل الملفات الأخرى، فهو يقوم بتقسيم وتجزئة الملف إلى أجزاء صغيرة من أجل زيادة سرعة التحميل. البرنامج خفيف على النظام ولا يستهلك موارد الجهاز ومتوافق مع كاف أنظمة تشغيل الويندوز المختلفة.
تنزيل برنامج ايجل جيت EagleGet برابط مباشر مجانا
تحميل برنامج ميديا بلاير كلاسيك لتشغيل جميع صيغ الفيديو Media Player Classic 2018
mhmd taha | 7:19 ص | برامج تشغيل الوسائط المتعددة كن أول من يعلق!
تنزيل برنامج Media Player Classic لتشغيل مقاطع الصوت والفيديو
يعتبر برنامج ميديا بلاير كلاسيك من برامج الوسائط الرائدة في مجالها، ونظراً لظهور العديد من الصيغ المختلفة الخاصة بمقاطع الفيديو والصوتيات، فإن الأمر يتطلب برنامج يستطيع المستخدم من خلاله تشغيل تلك الوسائط دون الوقوع بأية مشاكل، يقوم برنامج Media Player Classic بتشغيل كافة أنماط وأنواع الوسائط المتعددة، دون التأثير على جودة الصوت أو الفيديو.
يحتوي برنامج Media Player Classic على واجهة بسيطة، يمكن للمستخدم من خلالها التحكم بالاعدادات المختلفة بما يتناسب ورغباته الخاصة، بالإضافة إلى امكانية تنزيل الترجمة من الانترنت ودمجها مع مقاطع الفيديو، ويستطيع برنامج ميديا بلاير كلاسيك ومشغل الفيديو للكمبيوتر من قراءة اسطوانات DVD وعرضها على جهاز | c4-ar |
Valle di Casies (Βάλε ντι Κασίες, Ιταλία) - Κριτικές - TripAdvisor
Valle di Casies: Εστιατόρια στην περιοχή
Δραστηριότητες κοντά σε: Valle di Casies
Ενημερώσεις: Βάλε ντι Κασίες
Valle di Casies, Βάλε ντι Κασίες - Κριτικές
Βάλε ντι Κασίες Αξιοθέατα
Νο 1 από 8 δραστηριότητες - Βάλε ντι Κασίες
Localita San Martino 10a, 39030, Βάλε ντι Κασίες, Ιταλία
“Μαγική διαδρομή, η φύση μεγαλειώδης.”
Στην πορεία μας από Cortina για Bruneck μπήκαμε στην κοιλάδα Valle di Casies γνωρίζοντας ότι... διαβάστε περισσότερα
Μαγική διαδρομή, η φύση μεγαλειώδης.
Στην πορεία μας από Cortina για Bruneck μπήκαμε στην κοιλάδα Valle di Casies γνωρίζοντας ότι πρόκειται για κάτι όμορφο, όμως στην πραγματικότητα ήταν κάτι πραγματικά μαγικό. Τα μικρά χωριά στην σειρά το ένα ομορφότερο από το άλλο, γνήσια τυρολέζικη αρχιτεκτονική για αγροτόσπιτα, όλες οι αποχρώσεις...Περισσότερα
Αθλητικός ταξίδι
Ebiking μέσω της Valle ντι Κασίες είναι ένα όμορφο έγινε για να εξερευνήσετε και να απολαύσετε το τοπίο. Υπάρχουν πολλά μονοπάτια πεζοπορίας στην πλευρά και μονοπάτια πεζοπορίας στο δάσος. Υπάρχουν επίσης πολλές άλλες διαδρομές πεζοπορίας και μπορείτε να επιλέξετε μια αύξηση του ποταμού, Mountain Bike...Trail, ίχνος μέσω Lucious green αγρωστώδη και στους λόφους. Μόλις έχετε το νου σας για τις καιρικές συνθήκες. Αλλάζει μια παρτίδα ακόμη και με μέσα σε μία ημέρα. Φέρτε στρώματα και raincoat για τον προγραμματισμό των δραστηριοτήτων.Περισσότερα
Το όμορφο τοπίο, ανεξάρτητα από το ποια περίοδο μπορείτε να επισκεφθείτε
Στους Δολομίτες και τις κοιλάδες τους είναι πραγματικά υπέροχη. Δεν έχει σημασία αν επισκεφθείτε το χειμώνα καλοκαίρι φθινόπωρο ή την άνοιξη, κάθε σεζόν έχει το δικό του κατάστημα. Αν θέλετε πραγματικά να χαλαρώσετε και να ξεφύγετε από όλα αυτά είναι το μέρος που πρέπει να...πάτε. Εξαιρετικό βιολογικά τρόφιμα για να απολαύσετε και καθαρότερες αέρα θα αναπνεύσετε ποτέΠερισσότερα
Χαλαρώστε στην παρθένα φύση
Ένα ήσυχο μέρος, εκτός της συνηθισμένης διαδρομής, να απολαύσετε οικογενειακές διακοπές. Δεν θα βρείτε κάτι λαμπερό ή μοντέρνα εδώ, αλλά κάποια πραγματική βόρεια φιλοξενία και την ομορφιά της φύσης
Δείτε μετά δείτε και πολλά όμορφα μικρά χωριά
Ένα υπέροχο μέρος στον κόσμο για να δείτε με την οροσειρά των Δολομιτών υψώνεται πάνω από εσάς μόνο με την προσθήκη του grandure του τόπου. Το Valle di Casies τρένα να | c4-cy |
/*
* 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.
*/
package org.apache.ignite.internal.processors.cache;
import org.apache.ignite.configuration.IgniteConfiguration;
/**
* Tests the recovery after a dynamic cache start failure.
*/
public class IgniteDynamicCacheStartFailTest extends IgniteAbstractDynamicCacheStartFailTest {
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
return cfg;
}
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
startGrids(gridCount());
awaitPartitionMapExchange();
}
/** {@inheritDoc} */
@Override protected void afterTestsStopped() throws Exception {
stopAllGrids();
super.afterTestsStopped();
}
}
| alexzaitzev/ignite-modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailTest.java |
// PR c++/69009
// { dg-do compile { target c++14 } }
using _uchar = char;
using _size_t = decltype(sizeof(_uchar));
using size_t = _size_t;
template <class T, T> struct integral_constant;
template <bool b> using bool_constant = integral_constant<bool, b>;
template <class> constexpr auto tuple_size_v = 0;
template <class T> auto const tuple_size_v<T const volatile> = tuple_size_v<T>;
template <class T>
using tuple_size = integral_constant<size_t, tuple_size_v<T>>;
template <typename Base, typename Deriv>
using is_base_of = bool_constant<__is_base_of(Base, Deriv)>;
template <class T, size_t N> void test() {
is_base_of<integral_constant<size_t, N>, tuple_size<T>> value(
is_base_of<integral_constant<size_t, N>, tuple_size<const volatile T>>);
}
void foo() { test<int, 0>; }
| selmentdev/selment-toolchain-source/gcc-latest/gcc/testsuite/g++.dg/cpp1y/var-templ47.C |
# Encoding: utf-8
#
# Cookbook Name:: openstack-network
# Recipe:: server
#
# Copyright 2013, AT&T
# Copyright 2013, SUSE Linux GmbH
#
# 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.
#
['quantum', 'neutron'].include?(node['openstack']['compute']['network']['service_type']) || return
# Make Openstack object available in Chef::Recipe
class ::Chef::Recipe
include ::Openstack
end
include_recipe 'openstack-network::common'
platform_options = node['openstack']['network']['platform']
core_plugin = node['openstack']['network']['core_plugin']
platform_options['neutron_server_packages'].each do |pkg|
package pkg do
options platform_options['package_overrides']
action :install
end
end
# Migrate network database
# If the database has never migrated, make the current version of alembic_version to Icehouse,
# else migrate the database to latest version.
# The node['openstack']['network']['plugin_config_file'] attribute is set in the common.rb recipe
bash 'migrate network database' do
plugin_config_file = node['openstack']['network']['plugin_config_file']
db_stamp = node['openstack']['network']['db_stamp']
migrate_command = "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file #{plugin_config_file}"
code <<-EOF
current_version_line=`#{migrate_command} current 2>&1 | tail -n 1`
# determine if the $current_version_line ends with ": None"
if [[ $current_version_line == *:\\ None ]]; then
#{migrate_command} stamp #{db_stamp}
else
#{migrate_command} upgrade head
fi
EOF
end
service_provider = Chef::Provider::Service::Upstart if 'ubuntu' == node['platform'] &&
Chef::VersionConstraint.new('>= 13.10').include?(node['platform_version'])
service 'neutron-server' do
provider service_provider
service_name platform_options['neutron_server_service']
supports status: true, restart: true
action :enable
end
cookbook_file 'neutron-ha-tool' do
source 'neutron-ha-tool.py'
path node['openstack']['network']['neutron_ha_cmd']
owner 'root'
group 'root'
mode 00755
end
if node['openstack']['network']['neutron_ha_cmd_cron']
# ensure period checks are offset between multiple l3 agent nodes
# and assumes splay will remain constant (i.e. based on hostname)
# Generate a uniformly distributed unique number to sleep.
checksum = Digest::MD5.hexdigest(node['fqdn'] || 'unknown-hostname')
splay = node['chef_client']['splay'].to_i || 3000
sleep_time = checksum.to_s.hex % splay
cron 'neutron-ha-healthcheck' do
minute node['openstack']['network']['cron_l3_healthcheck']
command "sleep #{sleep_time} ; . /root/openrc && #{node["openstack"]["network"]["neutron_ha_cmd"]} --l3-agent-migrate > /dev/null 2>&1"
end
cron 'neutron-ha-replicate-dhcp' do
minute node['openstack']['network']['cron_replicate_dhcp']
command "sleep #{sleep_time} ; . /root/openrc && #{node["openstack"]["network"]["neutron_ha_cmd"]} --replicate-dhcp > /dev/null 2>&1"
end
end
# the default SUSE initfile uses this sysconfig file to determine the
# neutron plugin to use
template '/etc/sysconfig/neutron' do
only_if { platform_family? 'suse' }
source 'neutron.sysconfig.erb'
owner 'root'
group 'root'
mode 00644
variables(
plugin_conf: node['openstack']['network']['plugin_conf_map'][core_plugin.split('.').last.downcase]
)
notifies :restart, 'service[neutron-server]'
end
| zxcq/chef-openstack-icehouse-ubuntu-14.04-cookbooks/openstack-network/recipes/server.rb |
(function(App) {
'use strict';
var browser = require( 'airplay-js' ).createBrowser();
var collection = App.Device.Collection;
var makeID= function (baseID) {
return 'airplay-' + baseID;
};
var Airplay = App.Device.Generic.extend ({
defaults: {
type: 'airplay'
},
makeID: makeID,
initialize: function (attrs) {
this.device = attrs.device;
this.attributes.name = this.device.name || this.device.serverInfo.model;
this.attributes.id = this.makeID(this.device.serverInfo.deviceId);
},
play: function (streamModel) {
var url = streamModel.attributes.src;
this.device.play(url);
}
});
browser.on( 'deviceOn', function( device ) {
collection.add(new Airplay ({device: device}));
});
browser.on( 'deviceOff', function( device ) {
var model = collection.get ({id: makeID(device.id)});
if (model) {
model.destroy();
}
});
browser.start();
App.Device.Airplay = Airplay;
})(window.App);
| emersion/popcorn-app-src/app/lib/device/airplay.js |
version https://git-lfs.github.com/spec/v1
oid sha256:736b814fc01fc85b8fa6bc4223a8df3cca31e445247a05b9922dc7084ce6d13e
size 1766
| yogeshsaroya/new-cdnjs-ajax/libs/yui/3.17.2/anim-color/anim-color.js |
/* Copyright (c) 2016, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file
*
* ODPDRV Strong Types. Common macros for implementing strong typing
* for ODPDRV abstract data types
*/
#ifndef ODPDRV_STRONG_TYPES_H_
#define ODPDRV_STRONG_TYPES_H_
/** Use strong typing for ODPDRV types */
#ifdef __cplusplus
#define ODPDRV_HANDLE_T(type) struct _##type { uint8_t unused_dummy_var; } *type
#else
#define odpdrv_handle_t struct { uint8_t unused_dummy_var; } *
/** C/C++ helper macro for strong typing */
#define ODPDRV_HANDLE_T(type) odpdrv_handle_t type
#endif
/** Internal macro to get value of an ODPDRV handle */
#define _odpdrv_typeval(handle) ((uint32_t)(uintptr_t)(handle))
/** Internal macro to get printable value of an ODPDRV handle */
#define _odpdrv_pri(handle) ((uint64_t)_odpdrv_typeval(handle))
/** Internal macro to convert a scalar to a typed handle */
#define _odpdrv_cast_scalar(type, val) ((type)(uintptr_t)(val))
#endif
| erachmi/odp-platform/linux-generic/include/odp/drv/plat/strong_types.h |
/**
* Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays.
* Write an algorithm to minimize the largest sum among these m subarrays.
Note:
If n is the length of array, assume the following constraints are satisfied:
1 ≤ n ≤ 1000
1 ≤ m ≤ min(50, n)
Examples:
Input:
nums = [7,2,5,10,8]
m = 2
Output:
18
Explanation:
There are four ways to split nums into two subarrays.
The best way is to split it into [7,2,5] and [10,8],
where the largest sum among the two subarrays is only 18.
*/
class Solution {
public:
/**
* nums = [1, 2, 3, 4, 5], m = 3,我们将left设为数组中的最大值5,right设为数字之和15,然后我们算出中间数为10,
* 我们接下来要做的是找出和最大且小于等于10的子数组的个数,[1, 2, 3, 4], [5],可以看到我们无法分为3组,说明mid偏大,所以我们让right=mid,
* 然后再次二分查找,算出mid=7,再次找出和最大且小于等于7的子数组的个数,[1,2,3], [4], [5],成功的找出了三组,说明mid还可以进一步降低,让right=mid,
* 然后再次二分查找,算出mid=6,再次找出和最大且小于等于6的子数组的个数,[1,2,3], [4], [5],成功的找出了三组,尝试着继续降低mid,让right=mid,
* 然后再次二分查找,算出mid=5,再次找出和最大且小于等于5的子数组的个数,[1,2], [3], [4], [5],发现有4组,此时mid太小了,应该增大mid,让left=mid+1,
* 此时left=6,right=5,循环退出了,返回left即可
*/
int splitArray(vector<int>& nums, int m) {
long long l = 0, r = 0, mid = 0;
for(int i=0; i<nums.size(); i++){
l = max(nums[i], (int)l);
r += nums[i];
}
while(l<=r){
mid = l+(r-l)/2;
if(canSplit(nums, m, mid)) r = mid-1;
else l = mid+1;
}
return l;
}
bool canSplit(vector<int>& nums, int m, long long midSum){ //找出和最大,且<=midSum的子数组的个数
long long count = 1, sum = 0;
for (int i = 0; i < nums.size(); ++i) {
sum += nums[i]; //贪心
if(sum>midSum){
sum = nums[i];
++count;
if(count>m) return false;
}
}
return true;
}
};
| Ernestyj/LeetCode-C++/410SplitArrayLargestSum.cpp |
/***
Important:
This is sample code demonstrating API, technology or techniques in development.
Although this sample code has been reviewed for technical accuracy, it is not
final. Apple is supplying this information to help you plan for the adoption of
the technologies and programming interfaces described herein. This information
is subject to change, and software implemented based on this sample code should
be tested with final operating system software and final documentation. Newer
versions of this sample code may be provided with future seeds of the API or
technology. For information about updates to this and other developer
documentation, view the New & Updated sidebars in subsequent documentation seeds.
***/
/*
File: XMLDocument.h
Abstract: Creates an XMLDocument from an NSString or NSURL.
Version: 1.0
Disclaimer: IMPORTANT: This Apple software is supplied to you by
Apple Inc. ("Apple") in consideration of your agreement to the
following terms, and your use, installation, modification or
redistribution of this Apple software constitutes acceptance of these
terms. If you do not agree with these terms, please do not use,
install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and
subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the Apple
Software, with or without modifications, in source and/or binary forms;
provided that if you redistribute the Apple Software in its entirety and
without modifications, you must retain this notice and the following
text and disclaimers in all such redistributions of the Apple Software.
Neither the name, trademarks, service marks or logos of Apple Inc.
may be used to endorse or promote products derived from the Apple
Software without specific prior written permission from Apple. Except
as expressly stated in this notice, no other rights or licenses, express
or implied, are granted by Apple herein, including but not limited to
any patent rights that may be infringed by your derivative works or by
other works in which the Apple Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Copyright (C) 2008 Apple Inc. All Rights Reserved.
*/
#import <Foundation/Foundation.h>
#import <BMCommons/BMXMLElement.h>
NS_ASSUME_NONNULL_BEGIN
/**
Class describing an XML document.
*/
@interface BMXMLDocument : NSObject
/**
* The root element for the document.
*/
@property (strong) BMXMLElement *rootElement;
/**
* String resulting from serialization of the receiver.
*/
@property (nullable, strong, readonly) NSString *XMLString;
/**
* Returns the XMLString, optionally formatting the output (ensuring indentation is correct).
*/
- (nullable NSString *)XMLStringWithFormatting:(BOOL)format;
/**
* Parses the specified data to an XML document.
*
* @param data The data to parse
* @param error Error buffer in case error occurs.
* @return The document or nil if unsuccessful
*/
+ (nullable BMXMLDocument *)documentWithData:(NSData *)data error:(NSError * _Nullable * _Nonnull)error;
/**
* Parses the specified string to an XML document.
*
* @param string The string to parse
* @param error Error buffer in case error occurs.
* @return The document or nil if unsuccessful
*/
+ (nullable BMXMLDocument *)documentWithXMLString:(NSString *)string error:(NSError * _Nullable * _Nonnull)error;
/**
* Parses data from the specified URL as an XML document.
*
* @param URL URL to the data to parse.
* @param error Error buffer in case error occurs.
* @return The document or nil if unsuccessful
*/
+ (nullable BMXMLDocument *)documentWithContentsOfURL:(NSURL *)URL error:(NSError * _Nullable * _Nonnull)error;
/**
* Document from the specified root element.
*
* @param theRootElement The root element
* @return The document
*/
+ (BMXMLDocument *)documentWithRootElement:(BMXMLElement *)theRootElement;
- (instancetype)initWithRootElement:(BMXMLElement *)theRootElement;
@end
NS_ASSUME_NONNULL_END
| werner77/BMCommons-BMCommons/Modules/BMXML/Sources/Classes/BMXMLDocument.h |
angular.module('mboaAppUtils', [])
.service('Base64Service', function () {
var keyStr = "ABCDEFGHIJKLMNOP" +
"QRSTUVWXYZabcdef" +
"ghijklmnopqrstuv" +
"wxyz0123456789+/" +
"=";
this.encode = function (input) {
var output = "",
chr1, chr2, chr3 = "",
enc1, enc2, enc3, enc4 = "",
i = 0;
while (i < input.length) {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output +
keyStr.charAt(enc1) +
keyStr.charAt(enc2) +
keyStr.charAt(enc3) +
keyStr.charAt(enc4);
chr1 = chr2 = chr3 = "";
enc1 = enc2 = enc3 = enc4 = "";
}
return output;
};
this.decode = function (input) {
var output = "",
chr1, chr2, chr3 = "",
enc1, enc2, enc3, enc4 = "",
i = 0;
// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = keyStr.indexOf(input.charAt(i++));
enc2 = keyStr.indexOf(input.charAt(i++));
enc3 = keyStr.indexOf(input.charAt(i++));
enc4 = keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
chr1 = chr2 = chr3 = "";
enc1 = enc2 = enc3 = enc4 = "";
}
};
})
.factory('StorageService', function ($rootScope) {
return {
get: function (key) {
return JSON.parse(localStorage.getItem(key));
},
save: function (key, data) {
localStorage.setItem(key, JSON.stringify(data));
},
remove: function (key) {
localStorage.removeItem(key);
},
clearAll : function () {
localStorage.clear();
}
};
})
.factory('AccessToken', function($location, $http, StorageService, $rootScope) {
var TOKEN = 'token';
var service = {};
var token = null;
service.get = function() {
// read the token from the localStorage
if (token == null) {
token = StorageService.get(TOKEN);
}
if (token != null) {
return token.access_token;
}
return null;
};
service.set = function(oauthResponse) {
token = {};
token.access_token = oauthResponse.access_token;
setExpiresAt(oauthResponse);
StorageService.save(TOKEN, token);
return token
};
service.remove = function() {
token = null;
StorageService.remove(TOKEN);
return token;
};
service.expired = function() {
return (token && token.expires_at && token.expires_at < new Date().getTime())
};
var setExpiresAt = function(oauthResponse) {
if (token) {
var now = new Date();
var minutes = parseInt(oauthResponse.expires_in) / 60;
token.expires_at = new Date(now.getTime() + minutes*60000).getTime()
}
};
return service;
});
| sltet/AngularJs-src/main/webappResources/scripts/utils.js |
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var AlignSelf = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(AlignSelf, _Declaration);
var _super = _createSuper(AlignSelf);
function AlignSelf() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = AlignSelf.prototype;
_proto.check = function check(decl) {
return decl.parent && !decl.parent.some(function (i) {
return i.prop && i.prop.startsWith('grid-');
});
}
/**
* Change property name for 2012 specs
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2012) {
return prefix + 'flex-item-align';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Return property name by final spec
*/
;
_proto.normalize = function normalize() {
return 'align-self';
}
/**
* Change value for 2012 spec and ignore prefix for 2009
*/
;
_proto.set = function set(decl, prefix) {
var spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignSelf.oldValues[decl.value] || decl.value;
return _Declaration.prototype.set.call(this, decl, prefix);
}
if (spec === 'final') {
return _Declaration.prototype.set.call(this, decl, prefix);
}
return undefined;
};
return AlignSelf;
}(Declaration);
_defineProperty(AlignSelf, "names", ['align-self', 'flex-item-align']);
_defineProperty(AlignSelf, "oldValues", {
'flex-end': 'end',
'flex-start': 'start'
});
module.exports = AlignSelf; | BigBoss424/portfolio-v8/development/node_modules/autoprefixer/lib/hacks/align-self.js |
/* @flow */
'use strict'
/* ::
import type {RouteConfiguration} from '../../types.js'
*/
const scope = require('../scope.js')
const project = require('../project.js')
const values = require('../values.js')
function readRoutes (
cwd /* : string */
) /* : Promise<Array<RouteConfiguration>> */ {
return scope.read(cwd)
.then((config) => {
return Promise.resolve()
.then(() => config.routes || project.listRoutes(cwd))
.then((routes) => routes || [])
.then((routes) => routes.map((route) => {
route.timeout = route.timeout || config.timeout || values.DEFAULT_TIMEOUT_SECONDS
return route
}))
})
}
module.exports = readRoutes
| blinkmobile/server-cli-lib/routes/read.js |
/**
* a collection of string utility functions
* @namespace utils.string
*/
/**
* converts the first character of the given string to uppercase
* @public
* @function
* @memberof utils.string
* @name capitalize
* @param {string} str the string to be capitalized
* @returns {string} the capitalized string
*/
export function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
};
/**
* returns the string stripped of whitespace from the left.
* @public
* @function
* @memberof utils.string
* @name trimLeft
* @param {string} str the string to be trimmed
* @returns {string} trimmed string
*/
export function trimLeft(str) {
return str.replace(/^\s+/, "");
};
/**
* returns the string stripped of whitespace from the right.
* @public
* @function
* @memberof utils.string
* @name trimRight
* @param {string} str the string to be trimmed
* @returns {string} trimmed string
*/
export function trimRight(str) {
return str.replace(/\s+$/, "");
};
/**
* returns true if the given string contains a numeric integer or float value
* @public
* @function
* @memberof utils.string
* @name isNumeric
* @param {string} str the string to be tested
* @returns {boolean} true if string contains only digits
*/
export function isNumeric(str) {
if (typeof str === "string") {
str = str.trim();
}
return !isNaN(str) && /[+-]?([0-9]*[.])?[0-9]+/.test(str);
};
/**
* returns true if the given string contains a true or false
* @public
* @function
* @memberof utils.string
* @name isBoolean
* @param {string} str the string to be tested
* @returns {boolean} true if the string is either true or false
*/
export function isBoolean(str) {
var trimmed = str.trim();
return (trimmed === "true") || (trimmed === "false");
};
/**
* convert a string to the corresponding hexadecimal value
* @public
* @function
* @memberof utils.string
* @name toHex
* @param {string} str the string to be converted
* @returns {string} the converted hexadecimal value
*/
export function toHex(str) {
var res = "", c = 0;
while (c < str.length) {
res += str.charCodeAt(c++).toString(16);
}
return res;
};
| melonjs/melonJS-src/utils/string.js |
//>>built
define(
//begin v1.x content
({
buttonOk: "确定",
buttonCancel: "取消",
buttonSave: "保存",
itemClose: "关闭"
})
//end v1.x content
);
| marcbuils/WorkESB-www/admin/lib/dojo/dijit/nls/zh/common.js |
// @flow
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { hashHistory } from 'react-router';
import { routerMiddleware } from 'react-router-redux';
import newDefinitionWindowReducer from '../../reducers/newDefinitionWindow';
const router = routerMiddleware(hashHistory);
const enhancer = applyMiddleware(thunk, router);
export default function configureStore(initialState: Object) {
return createStore(newDefinitionWindowReducer, initialState, enhancer);
}
| sedooe/cevirgec-app/store/newDefinitionWindow/configureStore.production.js |
/**
* @file SClientProject.h
* @author Allen Vanderlinde
* @date April 21, 2014
* @brief Class definition for Songbird's client project file, data, and information.
*/
/*
Copyright (C) 2014 by Allen Vanderlinde.
Songbird and its source code is licensed under the GNU General Public License (GPL)
and is subject to the terms and conditions provided in LICENSE.txt.
*/
#ifndef _SCLIENTPROJECT_H_
#define _SCLIENTPROJECT_H_
/**
* This object represents Songbird's client project file containing all the necessary information/data for a particular client, their various assists, and statistics.
*
* @class SClientProject
* @brief Class definition for Songbird's client project file.
*/
typedef class SClientProject {
public:
SClientProject();
~SClientProject();
private:
} /** Type-definition for SClientProject. */ ClientProject;
#endif // _SCLIENTPROJECT_H_
| allenvanderlinde/Songbird-Source/Project/SClientProject.h |
/*
* 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.
*/
package org.tallison.schema;
public abstract class IndivFieldMapper {
String toField;
public IndivFieldMapper(String toField) {
this.toField = toField;
}
public String getToField() {
return toField;
}
abstract public String[] map(String[] vals);
}
| tballison/SimpleCommonCrawlExtractor-cc-extractor/src/main/java/org/tallison/schema/IndivFieldMapper.java |
function copyTextToClipboard(ToCopy) {
var textArea = document.createElement('textarea');
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'none';
textArea.style.outline = 'none';
textArea.style.boxShadow = 'none';
textArea.style.background = 'transparent';
textArea.value = ToCopy;
document.body.appendChild(textArea);
textArea.select();
try { var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
console.log('Copying text command was ' + msg);
} catch (err) {
console.log('Oops, unable to copy');
}
document.body.removeChild(textArea);
}
| Beau-M/document-management-system-src/main/webapp/js/clipboard.js |
/**
*
*/
/**
* @author brian
*
*/
package edu.dfci.cccb.mev.t_test.domain.prototype; | apartensky/mev-t-test/domain/src/main/java/edu/dfci/cccb/mev/t_test/domain/prototype/package-info.java |
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ACC.PTAutomated")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ACC.PTAutomated")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| galguera/pt.automated-ACC.PTAutomated/ACC.PTAutomated/Properties/AssemblyInfo.cs |
package elcon.mods.wikilink.api;
public class WikiLinkAPI {
/**
* The LinkRegistry instance
*/
public static ILinkRegistry linkRegistry;
}
| ElConquistador/WikiLink-src/main/java/elcon/mods/wikilink/api/WikiLinkAPI.java |
//
// CE_SETUP.H
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This public header file specifies function prototypes that WCELOAD.EXE will call
// in the ISV application's "SETUP.DLL", as well as the supported return values.
#ifdef __cplusplus
extern "C" {
#endif
//
// Install_Init
//
// @comm Called before any part of the application is installed
//
typedef enum
{
codeINSTALL_INIT_CONTINUE = 0, // @comm Continue with the installation
codeINSTALL_INIT_CANCEL // @comm Immediately cancel the installation
}
codeINSTALL_INIT;
codeINSTALL_INIT
Install_Init(
HWND hwndParent,
BOOL fFirstCall, // is this the first time this function is being called?
BOOL fPreviouslyInstalled,
LPCTSTR pszInstallDir
);
typedef codeINSTALL_INIT (*pfnINSTALL_INIT)( HWND, BOOL, BOOL, LPCTSTR );
const TCHAR szINSTALL_INIT[] = TEXT("Install_Init");
//
// Install_Exit
//
// @comm Called after the application is installed
//
typedef enum
{
codeINSTALL_EXIT_DONE = 0, // @comm Exit the installation successfully
codeINSTALL_EXIT_UNINSTALL // @comm Uninstall the application before exiting the installation
}
codeINSTALL_EXIT;
codeINSTALL_EXIT
Install_Exit(
HWND hwndParent,
LPCTSTR pszInstallDir, // final install directory
WORD cFailedDirs,
WORD cFailedFiles,
WORD cFailedRegKeys,
WORD cFailedRegVals,
WORD cFailedShortcuts
);
typedef codeINSTALL_EXIT (*pfnINSTALL_EXIT)( HWND, LPCTSTR, WORD, WORD, WORD, WORD, WORD );
const TCHAR szINSTALL_EXIT[] = TEXT("Install_Exit");
//
// Uninstall_Init
//
// @comm Called before the application is uninstalled
//
typedef enum
{
codeUNINSTALL_INIT_CONTINUE = 0, // @comm Continue with the uninstallation
codeUNINSTALL_INIT_CANCEL // @comm Immediately cancel the uninstallation
}
codeUNINSTALL_INIT;
codeUNINSTALL_INIT
Uninstall_Init(
HWND hwndParent,
LPCTSTR pszInstallDir
);
typedef codeUNINSTALL_INIT (*pfnUNINSTALL_INIT)( HWND, LPCTSTR );
const TCHAR szUNINSTALL_INIT[] = TEXT("Uninstall_Init");
//
// Uninstall_Exit
//
// @comm Called after the application is uninstalled
//
typedef enum
{
codeUNINSTALL_EXIT_DONE = 0 // @comm Exit the uninstallation successfully
}
codeUNINSTALL_EXIT;
codeUNINSTALL_EXIT
Uninstall_Exit(
HWND hwndParent
);
typedef codeUNINSTALL_EXIT (*pfnUNINSTALL_EXIT)( HWND );
const TCHAR szUNINSTALL_EXIT[] = TEXT("Uninstall_Exit");
#ifdef __cplusplus
} // extern "C"
#endif
| axbannaz/RemoteFunctionCall-device/RFunCSetup/lce_setup.h |
using System;
namespace GridAgent.Concurrency
{
/// <summary>
/// Provides the scope for a locking operation,
/// controlled by a <see cref="GridMonitor"/>.
/// </summary>
public class GridSync
{
/// <summary>
/// Gets or sets the unique name within the <see cref="ScopeTypeName"/>.
/// This is used in conjunction with the <see cref="ScopeTypeName"/>
/// to form a unique identifier used by the <see cref="GridMonitor"/>.
/// </summary>
/// <value>The name of the GridSync;
/// unique within the context of the ScopeTypeName.</value>
public string LocalName { get; protected set; }
/// <summary>
/// Gets or sets the <code>Type</code> name
/// for scoping the <see cref="LocalName"/>.
/// This is used in conjunction with the <see cref="LocalName"/>
/// to form a unique identifier used by the <see cref="GridMonitor"/>.
/// </summary>
/// <value>The context <code>Type</code> name of the GridSync.</value>
public string ScopeTypeName { get; protected set; }
/// <summary>
/// Gets or sets the client id.
/// </summary>
/// <value>The client id.</value>
public Guid ClientId { get; protected set; }
internal GridSync(Guid clientId, Type localType, string name)
{
if (localType == null)
{
throw new ArgumentNullException("localType");
}
if (name == null)
{
throw new ArgumentNullException("name");
}
ClientId = clientId;
ScopeTypeName = localType.AssemblyQualifiedName;
LocalName = name;
}
/// <summary>
/// Initializes a new instance of the <see cref="GridSync"/> class.
/// </summary>
/// <param name="scopeTypeName">Name of the scope type.
/// <seealso cref="ScopeTypeName"/></param>
/// <param name="localName">The local name within the context
/// of the scopeTypeName. <seealso cref="ScopeTypeName"/></param>
public GridSync(Type scopeTypeName, string localName, TaskRunner taskRunner)
{
if (scopeTypeName == null)
{
throw new ArgumentNullException("scopeTypeName");
}
if (localName == null)
{
throw new ArgumentNullException("localName");
}
ClientId = taskRunner.ClientId;
ScopeTypeName = scopeTypeName.AssemblyQualifiedName;
LocalName = localName;
}
}
}
| lvaleriu/GridComputing-Source/GridAgent/Concurrency/GridSync.cs |
export module Statistics {
export function random(_nMin: number = 1, _nMax: number = 10) {
return Math.floor((Math.random() * _nMax) + _nMin);
}
export function sum(_aNr: number[]) {
let nNr = 0;
_aNr.forEach( (_nNr: number) => nNr += _nNr === null ? 0 : _nNr);
return nNr;
}
export function diff(_nNrA: number, _nNrB: number) {
return Math.abs(_nNrA - _nNrB);
}
export function sd(_aNr: number[], _nRound = 2) {
let mMean = mean(_aNr, _nRound);
if(mMean === null) {
return null;
} else {
let aDeviation: number[] = [];
let nMean = +mMean;
_aNr.forEach( (_nNr: number) => {
if(_nNr !== null) {
aDeviation.push(Math.pow(_nNr - nMean, 2));
}
});
return Math.sqrt(+mean(aDeviation, _nRound)).toFixed(_nRound);
}
}
export function countOccurences(_aNr: number[]) {
let oNrCount = {};
_aNr.forEach( (_nNr: number) => {
if(typeof(oNrCount[_nNr]) === 'undefined') {
oNrCount[_nNr] = 1;
} else {
oNrCount[_nNr]++;
}
});
return oNrCount;
}
export function mode(_aNr: number[]) {
let oNrCount = countOccurences(_aNr);
let sMaxIndex: string = null;
let aReturn: number[] = [];
for(let sNr in oNrCount) {
if(sMaxIndex === null || oNrCount[sNr] >= oNrCount[sMaxIndex]) {
sMaxIndex = sNr;
aReturn.push(+sNr);
}
}
if(aReturn.length > 0) {
if(oNrCount[aReturn[0]] < oNrCount[sMaxIndex]) {
aReturn = aReturn.slice(1);
}
}
return aReturn;
}
export function median(_aNr: number[], _nRound = 2) {
if(_aNr.length == 0) {
return null;
} else {
_aNr.sort();
if(_aNr.length % 2 == 0) {
return +mean([ _aNr[Math.floor((_aNr.length-1)/2)], _aNr[Math.ceil((_aNr.length-1)/2)] ], _nRound);
} else {
return _aNr[(_aNr.length-1)/2];
}
}
}
export function mean(_aNr: number[], _nRound = 2) {
let nN = 0;
let nSum = 0.0;
_aNr.forEach( (_nNr: number) => {
if(_nNr !== null) {
nN++;
nSum += _nNr;
}
});
return nN > 0 ? (nSum/nN).toFixed(_nRound) : null;
}
export function weightedMean(_aNr: number[], _aWeight: number[], _nRound = 2) {
let nN = 0;
let nSum = 0.0;
for(let i = 0; i < _aNr.length; i++) {
if(_aNr[i] !== null && typeof(_aWeight[i]) !== 'undefined' && _aWeight[i] > 0) {
nN += _aWeight[i];
nSum += _aNr[i]*_aWeight[i];
}
}
return nN > 0 ? (nSum/nN).toFixed(_nRound) : null;
}
} | MarHai/stuperman-src/app/module/statistics.module.ts |
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*/
/** \addtogroup hal_mpu_tests
* @{
*/
#ifndef MBED_MPU_TEST_H
#define MBED_MPU_TEST_H
#if DEVICE_MPU
#ifdef __cplusplus
extern "C" {
#endif
/** Test that ::mbed_mpu_init can be called multiple times.
*
* Given board provides MPU.
* When ::mbed_mpu_init is called multiple times.
* Then ::mbed_mpu_init are successfully performed (no exception is generated).
*
*/
void mpu_init_test(void);
/** Test that ::mbed_mpu_free disables the MPU
*
* Given board provides MPU.
* When ::mbed_mpu_free is called.
* Then execution from RAM is allowed.
*
*/
void mpu_free_test(void);
/** Test that MPU protection works for global data
*
* Given board provides MPU.
* When RAM execution is disabled with a call to ::mbed_mpu_enable_ram_xn.
* Then execution from global initialized data results in a fault.
*
*/
void mpu_fault_test_data(void);
/** Test that MPU protection works for zero initialized data
*
* Given board provides MPU.
* When RAM execution is disabled with a call to ::mbed_mpu_enable_ram_xn.
* Then execution from global uninitialized data results in a fault.
*
*/
void mpu_fault_test_bss(void);
/** Test that MPU protection works for the stack
*
* Given board provides MPU.
* When RAM execution is disabled with a call to ::mbed_mpu_enable_ram_xn.
* Then execution from stack memory results in a fault.
*
*/
void mpu_fault_test_stack(void);
/** Test that MPU protection works for the heap
*
* Given board provides MPU.
* When RAM execution is disabled with a call to ::mbed_mpu_enable_ram_xn.
* Then execution from heap memory results in a fault.
*
*/
void mpu_fault_test_heap(void);
/**@}*/
#ifdef __cplusplus
}
#endif
#endif
#endif
/** @}*/
| mbedmicro/mbed-hal/tests/TESTS/mbed_hal/mpu/mpu_test.h |
from PyQt5.QtCore import QAbstractListModel, QModelIndex, Qt
class QtListModel(QAbstractListModel):
def __init__(self, item_builder):
QAbstractListModel.__init__(self)
self._items = {}
self._itemlist = [] # For queries
self._item_builder = item_builder
def rowCount(self, parent):
if parent.isValid():
return 0
return len(self._itemlist)
def data(self, index, role):
if not index.isValid() or index.row() >= len(self._itemlist):
return None
if role != Qt.DisplayRole:
return None
return self._itemlist[index.row()]
# TODO - insertion and removal are O(n).
def _add_item(self, data, id_):
assert id_ not in self._items
next_index = len(self._itemlist)
self.beginInsertRows(QModelIndex(), next_index, next_index)
item = self._item_builder(data)
item.updated.connect(self._at_item_updated)
self._items[id_] = item
self._itemlist.append(item)
self.endInsertRows()
def _remove_item(self, id_):
assert id_ in self._items
item = self._items[id_]
item_index = self._itemlist.index(item)
self.beginRemoveRows(QModelIndex(), item_index, item_index)
item.updated.disconnect(self._at_item_updated)
del self._items[id_]
self._itemlist.pop(item_index)
self.endRemoveRows()
def _clear_items(self):
self.beginRemoveRows(QModelIndex(), 0, len(self._items) - 1)
for item in self._items.values():
item.updated.disconnect(self._at_item_updated)
self._items.clear()
self._itemlist.clear()
self.endRemoveRows()
def _at_item_updated(self, item):
item_index = self._itemlist.index(item)
index = self.index(item_index, 0)
self.dataChanged.emit(index, index)
| FAForever/client-src/util/qt_list_model.py |
$(function()
{
$.setAjaxJSONER('.resume-leave', function(data)
{
var selecter = $('.resume-leave');
if(data.result == 'success')
{
if(selecter.parents('#ajaxModal').size()) return $.reloadAjaxModal(1200);
if(data.locate) return location.href = data.locate;
return location.reload();
}
else
{
alert(data.message);
return location.reload();
}
});
});
| leowh/colla-app/crm/customer/js/contact.js |
//
// BXDatabaseObjectModelStoragePrivate.h
// BaseTen
//
// Copyright 2010 Marko Karppinen & Co. LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import <BaseTen/BXDatabaseObjectModelStorage.h>
@interface BXDatabaseObjectModelStorage (PrivateMethods)
- (void) objectModelWillDeallocate: (NSURL *) key;
@end
| gservera/baseten-Tools/ReleaseDMG/BaseTen-dmg-build/Release/BaseTen.ibplugin/Contents/Frameworks/BaseTen.framework/Versions/A/PrivateHeaders/BXDatabaseObjectModelStoragePrivate.h |
The Westin CampoReal Residences Turcifal, Ξενοδοχείο Πορτογαλία. Περιορισμένη προσφορά !
« Επιστροφή The Westin CampoReal Residences
Δείτε κι άλλες φωτογραφίες Επιβεβαίωση τιμών και διαθεσιμότητας : The Westin CampoReal Residences: Check in :
Δείτε τις τιμές The Westin CampoReal Residences - Περιγραφή Αυτό το ΠολυτελέςΔιαβάστε τη συνέχεια
ξενοδοχείο προτείνει μια περιποίηση τεσσάρων αστέρων . Θα απολαύσετε διάφορες ανέσεις όπως Business Centre.Το ξενοδοχείο The Westin CampoReal Residences έχει 203 δωμάτια. Οι τιμές του ξεκινούν από 136 Ευρώ για ένα μεσαίας ποιότητας δωμάτιο. Θα βρείτε δωμάτια Room ως και Room Βρίσκεται στα ανατολικά, 1 λεπτό απόσταση περπατώντας από το κέντρο της πόλης. Αυτό το ξενοδοχείο βρίσκεται στην διεύθυνση RUA DO CAMPO ESTRADA MUNICIPAL και είναι η ιδανική βάση για να γνωρίσετε τα αξιοθέατα της πόλης, είτε θα μείνετε για λίγες μέρες είτε η διαμονή σας είναι μεγαλύτερη. Το αεροδρόμιο Portela βρίσκεται στα 61 λεπτά με αυτοκίνητο από το ξενοδοχείο στα (30 χιλιόμετρα ).Σε αυτό το ξενοδοχείο θα βρείτε internet υψηλής ροής.Διαθέτει επίσης υπάρχει κοντά γήπεδο του golf.Μη χάσετε τις ανέσεις που διατίθενται σε αυτό το ξενοδοχείο όπως πισίνα.Ανήκει στην αλυσίδα ξενοδοχείων Westin Hotels And Resorts.
The Westin CampoReal Residences στιλ:
Αυτό το ξενοδοχείο ανήκει στην αλυσίδα : Westin Hotels And Resorts™
The Westin CampoReal Residences παροχές και υπηρεσίες
Internet υψηλής ταχÏτητας(Βρείτε άλλα ξενοδοχεία με Πρόσβαση στο Internet στο Turcifal)
Οικονομικό ξενοδοχείο, το Westin Camporeal Golf Resort & Spa παρέχει όλες τις ανέσεις όπως n.a..
Βρίσκεται στα νοτιο-δυτικά, 21 λεπτά απόσταση με αυτοκίνητο από το κέντρο της πόλης. Αυτό το ξενοδο
Με 47 δωμάτια όλων των κατηγοριών, (από Room ως και 1 double exécutive), το ξενοδοχείο Hotel Império προτείνει τιμές που ξεκινούν από 64 Ευρώ.
Το ξενοδοχείο βρίσκεται στα νοτιο-ανατολικά της πόλης 10,9 km -
Το ξενοδοχείο Quinta Das Palmeiras προσφέρει όλες τις υπηρεσίες που θα μπορούσατε να περιμένετε από ένα ξενοδοχείο τριών αστέρων στην πόλη, όπως n.a.. Είναι κάτι περισσότερο από ένα Οικονομικό ξενο
Με 24 δωμάτια όλων των κατηγοριών, (από Room ως και Room), το ξενοδοχείο Hotel Castelão προτείνει τιμές που ξεκινούν από 45 Ευρώ.
Το ξενοδοχείο βρίσκεται στα βορειο-ανατολικά της πόλης (Ericeira, Caminho dos Raposeiros), μονάχα 8 λεπτά με αυτοκίνητο από το κέντρο της.Παραλιακό ξενοδοχείο, το Quinta | c4-cy |
package ODEsolver.interpreter;
//-----------------------------------------------------------------------------
// Written 2002 by Juergen Arndt.
//
//
// File Mul.java
// Use funktion fuer das ausfuehren der multiplikation im baum
//-----------------------------------------------------------------------------
class Mul implements OpFuncPointer
{
public double exec (double a, double b)
{
return a*b;
}
}
| JPLeRouzic/PhysioSim-ODEsolver/interpreter/Mul.java |
/// <reference path="../Models/CPPTypeModel.ts" />
/// <reference path="../Generators/StringGenerator.ts" />
/// <reference path="../../typings/angularjs/angular.d.ts" />
module CodeGenerator.Controllers {
export interface CPPGeneratorScope extends angular.IScope {
typeModel: Models.CPPTypeModel;
namespaceTextBox: string;
classOutput: string;
createClass: () => void;
addMember: () => void;
}
export class CPPGeneratorController {
constructor(private $scope: CPPGeneratorScope) {
$scope.typeModel = {
className:"",
members:[],
namespaces:[],
properties:[]
}
$scope.addMember = () => { this.addMember(); };
$scope.createClass = () => { this.setClass(); };
this.setupWatches();
}
private setupWatches() : void {
//watch namespaces entry
this.$scope.$watch(() => { return this.$scope.namespaceTextBox; }, (newValue, oldValue) => {
if (newValue && this.$scope.typeModel.className && newValue !== '' && this.$scope.typeModel.className!== '') {
this.setClass();
}
});
//watch classes entry
this.$scope.$watch(() => { return this.$scope.typeModel.className; }, (newValue, oldValue) => {
if (newValue && this.$scope.namespaceTextBox && newValue !== '' && this.$scope.namespaceTextBox !== '') {
this.setClass();
}
});
}
private addMember() : void {
this.$scope.typeModel.members.push({
constant: false,
isolationLevel: Models.IsolationLevel.private,
name: '',
noexcept: false,
parameters:[],
returnType: '',
templateArgs:[],
virtual: false
})
}
private setClass() : void {
//check to see if namespaces can be split
if (!this.$scope.namespaceTextBox || this.$scope.namespaceTextBox === '') {
return;
}
//set the namespaces to a proper split
this.$scope.typeModel.namespaces = this.$scope.namespaceTextBox.split('.');
//create a class output generator and set the output to the class field
var stringGenerator = new CodeGenerator.Generators.StringGenerator(this.$scope.typeModel);
this.$scope.classOutput = stringGenerator.getClassString();
}
}
}
angular.module("CodeGenerator").controller('CPPGeneratorController',['$scope',CodeGenerator.Controllers.CPPGeneratorController]) | QiMataTechnologiesInc/CodeGenerators-Controllers/CPPGeneratorController.ts |
//
// Copyright (c) 2015 CNRS
// Authors: Florent Lamiraux
//
// This file is part of tp_rrt
// tp_rrt 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.
//
// tp_rrt 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 Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// tp_rrt If not, see
// <http://www.gnu.org/licenses/>.
#ifndef HPP_TP_HPP_STEERING_METHOD_STRAIGHT_HH
# define HPP_TP_HPP_STEERING_METHOD_STRAIGHT_HH
# include <hpp/model/joint.hh>
# include <hpp/core/steering-method.hh>
# include <hpp/tp-rrt/config.hh>
# include <hpp/tp-rrt/flat-path.hh>
# include <hpp/util/debug.hh>
# include <hpp/util/pointer.hh>
namespace hpp {
namespace tp_rrt {
/// \addtogroup steering_method
/// \{
/// Steering method that creates FlatPath instances
///
class TP_RRT_DLLAPI SteeringMethod : public core::SteeringMethod
{
public:
/// Create instance and return shared pointer
static SteeringMethodPtr_t create (const ProblemPtr_t& problem)
{
SteeringMethod* ptr = new SteeringMethod (problem);
SteeringMethodPtr_t shPtr (ptr);
ptr->init (shPtr);
return shPtr;
}
/// Copy instance and return shared pointer
static SteeringMethodPtr_t createCopy
(const SteeringMethodPtr_t& other)
{
SteeringMethod* ptr = new SteeringMethod (*other);
SteeringMethodPtr_t shPtr (ptr);
ptr->init (shPtr);
return shPtr;
}
/// Copy instance and return shared pointer
virtual core::SteeringMethodPtr_t copy () const
{
return createCopy (weak_.lock ());
}
/// create a path between two configurations
virtual PathPtr_t impl_compute (ConfigurationIn_t q1,
ConfigurationIn_t q2) const
{
PathPtr_t path = FlatPath::create (device_.lock (), q1, q2,
distanceBetweenAxes_,
constraints ());
return path;
}
protected:
/// Constructor with robot
/// Weighed distance is created from robot
SteeringMethod (const ProblemPtr_t& problem) :
core::SteeringMethod (problem), device_ (problem->robot ()), weak_ ()
{
computeDistanceBetweenAxes ();
}
/// Copy constructor
SteeringMethod (const SteeringMethod& other) :
core::SteeringMethod (other), device_ (other.device_),
distanceBetweenAxes_ (other.distanceBetweenAxes_), weak_ ()
{
}
/// Store weak pointer to itself
void init (SteeringMethodWkPtr_t weak)
{
core::SteeringMethod::init (weak);
weak_ = weak;
}
private:
void computeDistanceBetweenAxes ()
{
JointPtr_t root (device_.lock ()->rootJoint ());
// Test that kinematic chain is as expected
if (!dynamic_cast <model::JointTranslation <2>* > (root)) {
throw std::runtime_error ("root joint should be of type "
"model::JointTranslation <2>");
}
if (root->numberChildJoints () != 1) {
throw std::runtime_error ("Root joint should have one child");
}
JointPtr_t orientation (root->childJoint (0));
if (!dynamic_cast <model::jointRotation::UnBounded*> (orientation)) {
throw std::runtime_error ("second joint should be of type "
"model::jointRotation::Unbounded");
}
if (orientation->numberChildJoints () != 1) {
throw std::runtime_error ("Orientation joint should have one child");
}
JointPtr_t steeringAngle (orientation->childJoint (0));
if (!dynamic_cast <model::jointRotation::Bounded*> (steeringAngle)) {
throw std::runtime_error ("Steering angle joint should be of type "
"model::jointRotation::Unbounded");
}
const Transform3f& frontWheel (steeringAngle->positionInParentFrame ());
const vector3_t& frontWheelPosition (frontWheel.getTranslation ());
value_type y = frontWheelPosition [1];
value_type z = frontWheelPosition [2];
distanceBetweenAxes_ = sqrt (y*y + z*z);
hppDout (info, "distanceBetweenAxes_ = " << distanceBetweenAxes_);
}
DeviceWkPtr_t device_;
// distance between front and rear wheel axes.
value_type distanceBetweenAxes_;
SteeringMethodWkPtr_t weak_;
}; // SteeringMethod
/// \}
} // namespace tp_rrt
} // namespace hpp
#endif // HPP_TP_RRT_STEERING_METHOD_STRAIGHT_HH
| stonneau/tp_rrt-include/hpp/tp-rrt/steering-method.hh |
threads_init = lambda *a, **k: None
def init(a):
pass
class Source(object):
pass
class Pipeline(object):
pass
class ElementFactory(object):
def make(self, a, b):
pass
class IOCondition:
IN = 1
ERR = 8
HUP = 16
| timvideos/gst-switch-docs/fake-lib/gi/repository/Gst.py |
$(function() {
$(document).ready(function() {
onReady();
});
});
function onReady() {
var choudai = new Choudai();
init(choudai);
chrome.tabs.query({
active: true,
currentWindow: true
}, function(tabs) {
executeParseImage(choudai, tabs[0].url);
});
}
function init(choudai) {
setVisibility('#choudai-container .header', false);
$('#choudai-container .header .header-savezip').click(function() {
onSaveZipButtonClick(choudai);
});
$('#choudai-container .header .header-checkall').click(function() {
onCheckAllButtonClick();
});
$('#choudai-container .header .header-cancelall').click(function() {
onCancelAllButtonClick();
});
setVisibility('#choudai-container .items', false);
setVisibility('#choudai-container #download', false);
setVisibility('#choudai-container #progress', false);
}
function onSaveZipButtonClick(choudai) {
var imageUrlList = [];
var checkedImages = $('#choudai-container .items .item .item-checkbox').filter(':checked');
if(checkedImages.length <= 0) {
return;
}
checkedImages.each(function(index, element) {
imageUrlList.push($(element).parent().find('img').attr('src'));
});
$('#choudai-container .download-status-total').text(imageUrlList.length);
setVisibility('#choudai-container .header', false);
setVisibility('#choudai-container .items', false);
setVisibility('#choudai-container .download-result', false);
setVisibility('#choudai-container #download', true);
setVisibility('#choudai-container #progress', true);
progress(false);
choudai.download(imageUrlList, function() {
var element = $('#choudai-container .download-status-success');
element.text(parseInt(element.text()) + 1);
}, function() {
var element = $('#choudai-container .download-status-failed');
element.text(parseInt(element.text()) + 1);
}, function() {
var element = $('#choudai-container .download-status-current');
element.text(parseInt(element.text()) + 1);
progress(Math.floor(parseInt(element.text()) / parseInt($('#choudai-container .download-status-total').text()) * 100));
}, function(url) {
setVisibility('#choudai-container #download-progress', false);
setVisibility('#choudai-container .download-result', true);
$('#choudai-container .download-ziplink').attr('href', url).attr('download', new Date().getTime() + '.zip');
});
}
function onCheckAllButtonClick() {
$('#choudai-container .items .item .item-checkbox').prop('checked', true);
}
function onCancelAllButtonClick() {
$('#choudai-container .items .item .item-checkbox').prop('checked', false);
}
function executeParseImage(choudai, entryUrl) {
choudai.parse(entryUrl, function(imageUrlList) {
onParseSuccess(imageUrlList);
}, null);
}
function onParseSuccess(imageUrlList) {
if(imageUrlList.length <= 0) {
appendMessage("画像がありませんでした...");
return;
}
$('#choudai-container .header').css('display', 'block');
$('#choudai-container .loader').css('display', 'none');
$('#choudai-container .items').css('display', 'block');
for(i = 0; i < imageUrlList.length; i++) {
appendItem(imageUrlList[i]);
}
$('#choudai-container .item-image').click(function(event) {
onItemClick($(event.target).parent());
});
}
function appendItem(href) {
if(href == null) {
return;
}
$('#choudai-container .items').append('<div class="item"><div class="item-image-box"><input type="checkbox" class="item-checkbox" /><img class="item-image" src="' + href + '" alt="" /></div></div>');
}
function onItemClick(element) {
var checkbox = $(element).find('input[type = checkbox]');
$(checkbox).prop('checked', !checkbox.is(':checked'));
}
function appendMessage(value) {
setVisibility('.loader', false);
$('#choudai-container').append('<div class="message">' + value + '</div>');
}
function setVisibility(element, visibility) {
$(element).css('display', visibility ? 'block' : 'none');
}
function progress(value) {
$('#choudai-container .download-progress-progressbar').progressbar({
value: value
});
} | chuross/choudai-extension-choudai/main.js |
require File.dirname(__FILE__) + '/spec_helper'
module ErroredRender
def self.included(base)
base.class_eval do
alias_method_chain :render, :error
end
end
def render_with_error
"woo hoo"
end
end
describe SnsSassFilter do
before :each do
@stylesheet = Stylesheet.new(:name => 'test')
@stylesheet.content = file('sample.sass')
end
describe 'where the Sass filter is not set in the Stylesheet' do
it 'should render the content unaltered if the Sass filter is not applied' do
@stylesheet.filter_id = ''
@stylesheet.render.should == file('sample.sass')
end
end
describe 'where the Sass filter is selected' do
before :each do
@stylesheet.filter_id ='Sass'
end
it 'should render Sass content into CSS' do
@stylesheet.render.should == file('sample.css')
end
describe 'and Sass raises an error' do
# This spec avoids mock/stubbing Sass and responds to a real error
# Problem is, we don't have a reliable way to know what that error
# will be as Radiant may update Sass.
it 'should rescue a SyntaxError and render that an error occurred' do
@stylesheet.content = file('bad.sass')
@stylesheet.render.should =~ /^Syntax Error at line /
end
# This spec makes sure we actually process the error message and line
# number -- but we have to simulate Sass to do it. A bit tightly
# coupled (but so's our implementation). Hopefully if Sass changes
# greatly, the previous specs will catch it.
it 'should render the error message and line number' do
syntax_error = Sass::SyntaxError.new('A Message', 25)
sass_engine = mock('Sass::Engine')
sass_engine.stub!(:render).and_raise(syntax_error)
Sass::Engine.stub!(:new).and_return(sass_engine)
@stylesheet.render.should == "Syntax Error at line 25: A Message"
end
it 'should not rescue other error types' do
syntax_error = Exception.new
sass_engine = mock('Sass::Engine')
sass_engine.stub!(:render).and_raise(syntax_error)
Sass::Engine.stub!(:new).and_return(sass_engine)
lambda { @stylesheet.render }.should raise_error
end
end
end
end
private
def file(name)
File.read(File.dirname(__FILE__) + '/samples/' + name)
end
| mikehale/halefamilyfarm-vendor/extensions/sns_sass_filter/spec/sass_filter_spec.rb |
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
class Page(object):
def __init__(self, driver):
self.driver = driver
self.timeout = 30
def check_page_title(self, title):
WebDriverWait(self.driver, self.timeout).until(EC.title_contains(title))
def find_element(self, *locator):
return self.driver.find_element(*locator)
def get_title(self):
return self.driver.title
def get_current_url(self):
return self.driver.current_url
| aKumpan/Python_WebDriver-main/pages/BasePage.py |
// Copyright 2016 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.
#ifndef COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_
#define COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_
namespace safe_browsing {
// Exposes methods to check whether a particular feature has been enabled
// through Finch.
namespace V4FeatureList {
// Is the PVer4 database manager enabled? Should be true if either of those
// below are true.
bool IsLocalDatabaseManagerEnabled();
// Is the PVer4 database being checked for resource reputation? If this returns
// true, use PVer4 database for CheckBrowseUrl, otherwise use PVer3.
bool IsV4HybridEnabled();
// Is only the PVer4 database being checked for resource reputation? If this
// returns true, use PVer4 database for all SafeBrowsing operations, and don't
// update the PVer3 database at all. This is the launch configuration.
bool IsV4OnlyEnabled();
} // namespace V4FeatureList
} // namespace safe_browsing
#endif // COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_
| geminy/aidear-oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/components/safe_browsing_db/v4_feature_list.h |
733 ሰዎች እዚህ ተገኝተዋል
Bytčanský zámek (Slovenčina: Bytčiansky zámok) is a tourist attraction, one of the Castles in Bytča, ስሎቫኪያ. It is located: 411 km from Krakow, 590 km from Budapest, 590 km from ቪየና, 710 km from Wroclaw, 870 km from Łódź.
Sorry, but currently we do not have detailed information about this tourist attraction called «Bytčanský zámek» in አማርኛ. If you can tell us something interesting about it, please do it! Information on «Bytčanský zámek» is available in the following languages: Čeština, Русский, Slovenčina, Українська
, N49°13'12", E18°33'33". አቅጣጫዎችን ያግኙ
በ Bytčanský zámek ላይ Facebook
ለ Bytčanský zámek ገና ምንም ምክሮች ወይም ፍንጮች የሉም። ምናልባት ለእርስዎ ተጓlersች ጠቃሚ መረጃዎችን ለመለጠፍ እርስዎ የመጀመሪያ ሊሆኑ ይችላሉ? :) | c4-am |
/*******************************************************************************
* $Id: philipscicodetemplates.xml 276 2012-12-26 02:16:03Z wei.hu $
* *****************************************************************************
*
* <pre>
* Philips Medical Systems
* © 2010 Koninklijke Philips Electronics N.V.
*
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
*
*
* FILE NAME: TemplateDialog.js
*
* CREATED: 2016年4月12日 下午3:51:40
*
* ORIGINAL AUTHOR(S): 310078398
*
* </pre>
******************************************************************************/
define([
'app/widget/Dialog',
'dojo/_base/lang',
'dojo/_base/declare',
'dojo/text!./templates/template-dialog.html'
], function(Dialog, lang, declare, template) {
return declare('app.research.widget.dialog.TemplateDialog', Dialog, {
/**
* Override, default false
*/
showTitleBar : false,
/**
* Override, default false
*/
executeScripts : true,
/**
* Override, default width
*/
width : '900px',
/**
* Override, default height
*/
height : '590px',
/**
* title
*/
title : '',
/**
* template
*/
template : null,
/**
* content
*/
content : null,
/**
* segment instance
*/
segment : null,
/**
* Override
*/
constructor : function(options) {
lang.mixin(this, options);
this.inherited(arguments);
},
/**
* Override
*/
buildRendering : function() {
var containerNodeStr = '<div data-dojo-attach-point="containerNode" class="dijitDialogPaneContent">';
this.templateString = this.templateString.replace(containerNodeStr, containerNodeStr + template);
this.inherited(arguments);
},
/**
* Override
*/
postCreate : function() {
this.inherited(arguments);
if (this.content) {
this.contentNode.set('content', this.content);
}
if (this.segment) {
this.contentNode.addChild(this.segment);
}
},
/**
* Get Content all children or first major one
*/
getContent : function(/* Boolean */isAllChildren) {
if (isAllChildren)
return this.contentNode.getChildren();
return this.contentNode.getChildren()[0];
},
/**
* submit action
*/
_submitAction : function() {
var target = this.getContent();
if (target && target._doSubmit) {
var result = target._doSubmit();
if (result == false)
return;
}
var result = this._submitCallback();
if (result == false)
return;
this.destroyRecursive();
},
/**
* cancel action
*/
_cancelAction : function() {
var target = this.getContent();
if (target && target._doCancel) {
var result = target._doCancel();
if (result == false)
return;
}
var result = this._cancelCallback();
if (result == false)
return;
this.destroyRecursive();
},
/**
* callback for submit
*/
_submitCallback : function() {
},
/**
* callback for cancel
*/
_cancelCallback : function() {
},
/**
* inject callback functions
*/
then : function(/* Function */submitback, /* Function */cancelback) {
if (submitback) {
this._submitCallback = submitback;
}
if (cancelback) {
this._cancelCallback = cancelback;
}
return this;
}
});
}); | jpgtama/hello-dojo-WebContent/js/appWidget/app/widget/confirmDialog/TemplateDialog.js |
/********************************************************************************
* Copyright (c) 2011-2017 Red Hat Inc. and/or its affiliates and others
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* http://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.ceylon.compiler.java.metadata;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Applied to an annotation constructor, encodes the "literal"
* tuple expressions in the invocation
*/
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface TupleExprs {
TupleValue[] value();
}
| ceylon/ceylon-model/src/org/eclipse/ceylon/compiler/java/metadata/TupleExprs.java |
/* http://keith-wood.name/calendars.html
Icelandic localisation for Gregorian/Julian calendars for jQuery.
Written by Haukur H. Thorsson ([email protected]). */
(function($) {
$.calendars.calendars.gregorian.prototype.regionalOptions['is'] = {
name: 'Gregorian',
epochs: ['BCE', 'CE'],
monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
'Júlí','Ágúst','September','Október','Nóvember','Desember'],
monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
'Júl','Ágú','Sep','Okt','Nóv','Des'],
dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
dateFormat: 'dd/mm/yyyy',
firstDay: 0,
isRTL: false
};
if ($.calendars.calendars.julian) {
$.calendars.calendars.julian.prototype.regionalOptions['is'] =
$.calendars.calendars.gregorian.prototype.regionalOptions['is'];
}
})(jQuery);
| majidiust/TCS_Services-tcs_services/public/www/js/persian/jquery.calendars-is.js |
'use strict';
// Development specific configuration
// ==================================
module.exports = {
pluginStateStore: process.env.KAPTURE_PLUGIN_STORE || '/config/pluginStateStore',
settingsFileStore : '/config/system_settings.yml',
userSettingDefaults: {
rootDownloadPath: process.env.KAPTURE_DOWNLOAD_PATH || '/media',
}
};
| kapturebox/web-server/config/environment/docker.js |
//
// TWCommonLib
//
@import Foundation;
@import MapKit;
/**
Use this class instead of CLLocationManger directly - it'll warn you if you didn't extend Info.plist with required keys (iOS8) and also requestWhenInUseAuthorisation is wrapped in respondsToSelector calls (also for pre-iOS8 compatibility).
*/
@interface TWLocationUpdatesManager : NSObject
@property (strong, nonatomic, readonly) CLLocationManager *locationManager;
- (void)requestLocationUpdates;
@end
| wyszo/TWCommonLib-TWCommonLib/TWCommonLib/TWLocationUpdatesManager.h |
package vpc
//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Ipv6Address is a nested struct in vpc response
type Ipv6Address struct {
Ipv6AddressId string `json:"Ipv6AddressId" xml:"Ipv6AddressId"`
Ipv6AddressName string `json:"Ipv6AddressName" xml:"Ipv6AddressName"`
VSwitchId string `json:"VSwitchId" xml:"VSwitchId"`
VpcId string `json:"VpcId" xml:"VpcId"`
Ipv6GatewayId string `json:"Ipv6GatewayId" xml:"Ipv6GatewayId"`
Ipv6Address string `json:"Ipv6Address" xml:"Ipv6Address"`
AssociatedInstanceId string `json:"AssociatedInstanceId" xml:"AssociatedInstanceId"`
AssociatedInstanceType string `json:"AssociatedInstanceType" xml:"AssociatedInstanceType"`
Status string `json:"Status" xml:"Status"`
NetworkType string `json:"NetworkType" xml:"NetworkType"`
RealBandwidth int `json:"RealBandwidth" xml:"RealBandwidth"`
AllocationTime string `json:"AllocationTime" xml:"AllocationTime"`
Ipv6Isp string `json:"Ipv6Isp" xml:"Ipv6Isp"`
Ipv6InternetBandwidth Ipv6InternetBandwidth `json:"Ipv6InternetBandwidth" xml:"Ipv6InternetBandwidth"`
}
| tklauser/cilium-vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/vpc/struct_ipv6_address.go |
/**
* Copyright (c) 2014,Egret-Labs.org
* 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.
* * Neither the name of the Egret-Labs.org nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY EGRET-LABS.ORG 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 EGRET-LABS.ORG AND 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.
*/
egret_h5.startGame = function ()
{
var context = egret.MainContext.instance;
context.touchContext = new egret.HTML5TouchContext();
context.deviceContext = new egret.HTML5DeviceContext();
context.netContext = new egret.HTML5NetContext();
egret.StageDelegate.getInstance().setDesignSize(800, 480);
context.stage = new egret.Stage();
var scaleMode = egret.MainContext.deviceType == egret.MainContext.DEVICE_MOBILE ? egret.StageScaleMode.SHOW_ALL : egret.StageScaleMode.NO_SCALE;
context.stage.scaleMode = scaleMode;
//WebGL is a Egret's beta property. It's off by default.
//WebGL是egret的Beta特性,默认关闭
var rendererType = 0;
if (rendererType == 1)
{// egret.WebGLUtils.checkCanUseWebGL()) {
console.log("Use WebGL mode");
context.rendererContext = new egret.WebGLRenderer();
}
else
{
context.rendererContext = new egret.HTML5CanvasRenderer();
}
egret.MainContext.instance.rendererContext.texture_scale_factor = 1;
context.run();
var rootClass;
if (document_class)
{
rootClass = egret.getDefinitionByName(document_class);
}
if (rootClass)
{
var rootContainer = new rootClass();
if (rootContainer instanceof egret.DisplayObjectContainer)
{
//rootContainer.rotation = 90;
//rootContainer.x = 640;
context.stage.addChild(rootContainer);
}
else
{
throw new Error("Document Class must be the subclass to egret.DisplayObjectContainer!");
}
}
else
{
throw new Error("Document Class is not found!");
}
//处理屏幕大小改变
//implement for screen size change
var resizeTimer = null;
var doResize = function ()
{
context.stage.changeSize();
resizeTimer = null;
};
window.onresize = function ()
{
if (resizeTimer == null)
{
resizeTimer = setTimeout(doResize, 300);
}
};
}; | gaoyue1989/playEgg-PlayEgg/PlayEgg/launcher/egret_loader.js |
/* { dg-do compile } */
/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
typedef char pixel __attribute__((vector_size(4)));
typedef char vec8 __attribute__((vector_size(8)));
typedef short vec16 __attribute__((vector_size(8)));
vec16 foo (pixel a, pixel b) {
vec8 c = __builtin_vis_fpmerge (a, b);
vec16 d = { -1, -1, -1, -1 };
vec16 e = __builtin_vis_fmul8x16 (a, d);
return e;
}
vec16 bar (pixel a) {
vec16 d = { 0, 0, 0, 0 };
vec16 e = __builtin_vis_fmul8x16 (a, d); /* Mulitplication by 0 = 0. */
return e;
}
/* { dg-final { scan-assembler "fmul8x16" } } */
/* { dg-final { scan-assembler "fzero" } } */
| unofficial-opensource-apple/gcc_40-gcc/testsuite/gcc.target/sparc/combined-2.c |
Nog geen oplossing vir Amcu-staking | Maroela Media
Joseph Mathunjwa, president van Amcu tydens onderhandelinge by die KVBA Foto: Meggan Saville/SAPA
Platinumvervaardigers en die vakbond Amcu sal Donderdag weer onderhandelinge agter geslote deure hervat in ʼn poging om die staking, wat al drie maande lank duur, op te los.
Die vergadering tussen die Association of Mineworkers and Construction Union (Amcu) en die werkgewers sal by ʼn onbekende plek in Johannesburg plaasvind ná ʼn nuwe loonaanbod deur Anglo American Platinum (Amplats) en Impala Platinum (Implats) gemaak is.
Charmane Russell, woordvoerder van die Kamer van Mynwese, het Woensdag gesê ʼn finale aanbod is nog nie gemaak nie en onderhandelinge duur voort.
Deur die voorgestelde loonaanbod sal die minimum kontantbetaling (insluitend basiese loon en vakansie-, lewens- en ander toelatings) vir intreevlak ondergrondse werkers teen Julie 2017 op R12 500 per maand (R150 000 per jaar) te staan kom. Die kontantverhoging vir die werknemers styg algemeen tussen 7.5% en 10% vir alle vlakke werknemers, met toepaslike toelating vir verhogings volgens inflasie.
Die koste vir die maatskappy vir die laagste betaalde ondergrondse werknemer sal in Julie 2017 gevolglik meer as R17 500 per maand beloop. Dit sluit salaris, mediese-, aftrede-, oortyd- en bonusvoorsiening in.
Amcu-lede staak sedert 23 Januarie en dring aan op ʼn basiese intreevlaksalaris van R12 500 per maand. Amcu het die werkgewers se vorige loonaanbod van 9% verwerp.
Die staking het al tot ʼn verlies van R6 miljard in salarisse en R14 miljard in maatskappy-inkomste gelei, aldus die Kamer van Mynwese se webwerf. -SAPA
Video: Grondeienaarskap in die Wes-Kaap sal hersien word
Hoe oorleef die spul wat al 3 maande staak ? Het hulle dan geen afhanklikes nie ? Is hulle nie bekommerd dat hulle uiteindelik in die pad gesteek sal word nie ?
Nee wat, stel werklose Blankes aan wat baie graag WIL werk ten einde hul gesinne te kan onderhou, voed en versorg.
Ek. Stem saam die grootste probleem is die vakbonde dis hulle wat meer geld wil he nie die werkers .As hulle dood gaan van hongerte sal dit weer aparteit se skuld wees | c4-af |
(function($, window, document) {
/**
* @param { object } opts
*/
GoogleAnalytics = function(opts) {
var me = this;
me.opts = opts;
if (me.opts.doNotTrack) {
return;
}
me.addHeadScript();
me.initScript();
};
GoogleAnalytics.prototype = {
initScript: function() {
var ga = document.createElement('script');
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
},
addHeadScript: function() {
var me = this,
script = [
"var _gaq = _gaq || [];",
[
"_gaq.push(['_setAccount',",
'"',
me.opts.googleTrackingID,
'"',
"]);"
].join(''),
],
entity;
if (me.opts.googleAnonymizeIp) {
script.push("_gaq.push(['_gat._anonymizeIp']);");
}
if (window.basketData.hasData) {
me.addTransaction(script);
me.addTransactionData(script);
new GoogleAdds(me.opts);
script.push("_gaq.push(['_trackTrans']);");
}
script.push("_gaq.push(['_setDomainName', 'none']);");
script.push("_gaq.push(['_trackPageview']);");
entity = [
'<script>',
script.join(' '),
'</script>'
];
$(entity.join('')).appendTo('head');
},
addTransaction: function(script) {
var me = this,
data = [
'"' + me.opts.orderNumber + '"',
'"' + escape(me.opts.affiliation) + '"',
'"' + me.opts.revenue + '"',
'"' + me.opts.tax + '"',
'"' + me.opts.shipping + '"',
'"' + me.opts.city + '"',
"",
'"' + me.opts.country + '"',
].join(',');
script.push([
"_gaq.push(['_addTrans',",
data,
"]);"].join('')
);
},
addTransactionData: function(script) {
var me = this, itemString;
$.each(window.basketData.data, function(index, item) {
itemString = [
'"' + me.opts.orderNumber + '"',
'"' + item.sku + '"',
'"' + escape(item.name) + '"',
"",
'"' + item.price + '"',
'"' + item.quantity + '"',
].join(',');
script.push([
"_gaq.push(['_addItem',",
itemString,
"]);"
].join(''));
});
},
};
})(jQuery, window, document);
| shopwareLabs/SwagGoogle-Resources/frontend/js/google_analytics.js |
// app/models/user.js
// load the things we need
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var userSchema = mongoose.Schema({
local : {
email : String,
password : String,
},
facebook : {
id : String,
token : String,
email : String,
name : String
},
twitter : {
id : String,
token : String,
displayName : String,
username : String
},
google : {
id : String,
token : String,
email : String,
name : String
},
permissions : {
administrator: Boolean
},
data: {
myRoutines: Array,
completedRoutines: Array,
customRoutines: Array,
routineInProgress: Object
}
});
// methods ======================
// generating a hash
userSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
};
// checking if password is valid
userSchema.methods.validPassword = function(password) {
return bcrypt.compareSync(password, this.local.password);
};
// create the model for users and expose it to our app
module.exports = mongoose.model('User', userSchema); | samjhill/ppl-app/models/user.js |
/// Copyright (c) 2009 Microsoft Corporation
///
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
/// that the following conditions are met:
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
/// the following disclaimer.
/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
/// the following disclaimer in the documentation and/or other materials provided with the distribution.
/// * Neither the name of Microsoft nor the names of its contributors may be used to
/// endorse or promote products derived from this software without specific prior written permission.
///
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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.
ES5Harness.registerTest({
id: "15.2.3.4-4-40",
path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js",
description: "Object.getOwnPropertyNames - inherited data property of String object 'O' is not pushed into the returned array",
test: function testcase() {
try {
var str = new String("abc");
String.prototype.protoProperty = "protoString";
var result = Object.getOwnPropertyNames(str);
for (var p in result) {
if (result[p] === "protoProperty") {
return false;
}
}
return true;
} finally {
delete String.prototype.protoProperty;
}
},
precondition: function prereq() {
return fnExists(Object.getOwnPropertyNames);
}
});
| hnafar/IronJS-Src/Tests/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js |
'use strict';
module.exports = {
environment: {
name: process.env.NODE_ENV || 'development',
port: process.env.PORT || 8888,
verbose: process.env.VERBOSE || true
},
player: {
salt : process.env.PLAYER_SALT || '!pur1n+',
originRegionId : process.env.REGION_ORIGIN_ID || 'T0',
originRegionX : process.env.REGION_ORIGIN_X || 1,
originRegionY : process.env.REGION_ORIGIN_Y || 1,
defaultName : 'Unnamed',
defaultIcon : 'players/leaf.gif',
defaultInventory: {}
},
region: {
defaultNodeId: 1
},
// See https://www.npmjs.com/package/redis
redis: {
url: process.env.REDIS_URL || 'redis://127.0.0.1:6379',
options: {}
}
} | nyanofthemoon/Mooncraft-server/config.js |
var redis = require('redis')
// redis.debug_mode = true
function Queue (name, redisClient) {
this.hasQuit = false
this._name = name
this.redisClient = redisClient
this._key = Queue.PREFIX + this.name
}
Queue.PREFIX = 'dq:'
Object.defineProperty(Queue.prototype, 'name', {
enumerable: true, configurable: false,
get: function () {
return this._name
},
set: function (value) {
this._name = value
this._key = Queue.PREFIX + value
}
})
Object.defineProperty(Queue.prototype, 'key', {
enumerable: true, configurable: false,
get: function () {
return this._key
}
})
Queue.prototype.count = function (callback) {
this.redisClient.zcard(this.key, callback)
}
Queue.prototype['delete'] = function (shouldNotQuit, callback) {
if (typeof shouldNotQuit === 'function') {
callback = shouldNotQuit
shouldNotQuit = false
}
var _this = this
this.redisClient.del(this.key, function (err) {
if (err) return callback(err)
if (shouldNotQuit) return callback()
_this.redisClient.quit(callback)
})
}
Queue.prototype.destroy = Queue.prototype.delete
Queue.prototype.deq = function (count, callback) {
if (typeof count === 'function') {
callback = count
count = 1
}
this.redisClient.multi().zrange(this.key, 0, count - 1).zremrangebyrank(this.key, 0, count - 1).exec(function (err, res) {
if (err) return callback(err)
if (!res || !Array.isArray(res)) return callback(new Error('Invalid Redis response.'))
if (count === 1) callback(null, res[0][0])
else callback(null, res[0])
})
}
Queue.prototype.enq = function (val, priority, callback) {
if (typeof val !== 'string') console.warn('warning: enq() value is not a string')
switch (arguments.length) {
case 1:
priority = 0
break
case 2:
if (typeof priority === 'function') {
callback = priority
priority = 0
}
}
return this.redisClient.zadd(this.key, priority, val, callback)
}
Queue.prototype.peak = function (start, count, callback) {
var end = start + count - 1
this.redisClient.zrange(this.key, start, end, callback)
}
Queue.prototype.quit = function (callback) {
this.hasQuit = true
this.redisClient.quit(callback)
}
Queue.create = function (params, callback) {
params = params || {}
var name = params.name
var port = params.port || 6379
var host = params.host || '127.0.0.1'
var password = params.password
if (name == null) return callback(Error('Must pass queue name to input.'))
var rc = redis.createClient(port, host)
if (password) rc.auth(password)
rc.on('error', function (err) {
callback && callback(err)
})
return Queue.createFromRedisClient(name, rc, callback)
}
Queue.connect = Queue.create
Queue.createFromRedisClient = function createFromRedisClient (name, redisClient, callback) {
var q = new Queue(name, redisClient)
callback && callback(null, q)
return q
}
Queue.delete = function (params, callback) {
if (!params.name) return callback(new Error('Must pass the name.'))
Queue.create(params, function (err, q) {
if (err) return callback(err)
q.delete(callback)
})
}
Queue.list = function (params, callback) {
params.name = '__TEMP_LIST_DISCOVERY'
Queue.connect(params, function (err, q) {
if (err) return callback(err)
q.redisClient.keys('*', function (err, keys) {
if (err) return callback(err)
keys = keys.filter(function (key) {
return key.indexOf(Queue.PREFIX) === 0
}).map(function (key) {
return key.replace(Queue.PREFIX, '')
})
callback(null, keys)
})
})
}
module.exports = Queue
| jprichardson/node-dq-lib/dq.js |
/****************************************************************/
/* Driver for IR Sensor GP2Y0A710K0F (100-550cm) */
/* File : IR_100_550.h */
/* Description : */
/* Function use to get data from FarIR Sensor */
/* */
/* Author : MPE */
/* */
/****************************************************************/
#ifndef __IR_100_550_H
#define __IR_100_550_H
CPU_INT16S GetDistancefromFarIR(CPU_INT16U voltage);
#endif
| mplu/RPi-kee-driver/IR_100_550.h |
/**
* Copyright 2021 The Google Earth Engine Community Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://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.
*/
// [START earthengine__apidocs__ee_number_toint64]
// Cast a number to signed 64-bit integer: [-9223372036854776000, 9223372036854776000].
var number = ee.Number(100);
print('Number:', number);
var int64Number = number.toInt64();
print('Number cast to int64:', int64Number);
/**
* Casting numbers to int64 that are outside of its range and precision can
* modify the resulting value, note the behavior of the following scenarios.
*/
// A floating point number cast to int64 loses decimal precision.
var float = ee.Number(1.7);
print('Floating point value:', float);
var floatToInt64 = float.toInt64();
print('Floating point value cast to int64:', floatToInt64);
// A number greater than int64 range max cast to int64 becomes int64 range max.
var INT64_MAX = 9223372036854776000;
var outOfRangeHi = ee.Number(INT64_MAX + 12345);
print('Greater than int64 max:', outOfRangeHi);
var outOfRangeHiToInt64 = outOfRangeHi.toInt64();
print('Greater than int64 max cast to int64 becomes int64 max:', outOfRangeHiToInt64);
// A number greater than int64 range min cast to int64 becomes int64 range min.
var INT64_MIN = -9223372036854776000;
var outOfRangeLo = ee.Number(INT64_MIN - 12345);
print('Less than int64 min:', outOfRangeLo);
var outOfRangeLoToInt64 = outOfRangeLo.toInt64();
print('Less than int64 min cast to int64 becomes int64 min:', outOfRangeLoToInt64);
// [END earthengine__apidocs__ee_number_toint64]
| google/earthengine-community-samples/javascript/apidocs/ee-number-toint64.js |
module.exports = function(sequelize, DataTypes) {
var AggregateScore = sequelize.define('AggregateScore', {
chat_id: {
type: DataTypes.STRING,
allowNull: false
},
category_id: {
type: DataTypes.STRING,
allowNull: false
},
tone_id: {
type: DataTypes.STRING,
allowNull: false
},
score: {
type: DataTypes.STRING,
allowNull: false
}
},
{
classMethods: {
associate: function(models) {
AggregateScore.belongsTo(models.IndividualChat, {
foreignKey: {
allowNull: false
}
});
}
}
});
return AggregateScore;
}; | aldo-sanchez/rap-port-models/aggregateScore.js |
#!/usr/bin/env python
class WBSDefinitionResponse(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually."""
def __init__(self):
"""
Attributes:
swaggerTypes (dict): The key is attribute name and the value is attribute type.
attributeMap (dict): The key is attribute name and the value is json key in definition.
"""
self.swaggerTypes = {
'WBSDefinition': 'WBSDefinition',
'Code': 'str',
'Status': 'str'
}
self.attributeMap = {
'WBSDefinition': 'WBSDefinition','Code': 'Code','Status': 'Status'}
self.WBSDefinition = None # WBSDefinition
self.Code = None # str
self.Status = None # str
| sohail-aspose/Aspose_Tasks_Cloud-SDKs/Aspose.Tasks_Cloud_SDK_for_Python/asposetaskscloud/models/WBSDefinitionResponse.py |
# The Public School Arithmetic: Based on McLellan & Dewey's "Psychology of Number"
Macmillan, 1897 - Arithmetic - 346 pages
0 Reviews
Reviews aren't verified, but Google checks for and removes fake content when it's identified
### What people are saying -Write a review
We haven't found any reviews in the usual places.
### Contents
CHAPTER 1 CHAPTER II 10 CHAPTER III 20 CHAPTER IV 32 CHAPTER V 43 CHAPTER VI 59 CHAPTER VII 76 CHAPTER IX 87
CHAPTER XII 157 CHAPTER XIII 197 CHAPTER XIV 239 CHAPTER XV 274 CHAPTER XVI 288 CHAPTER XVII 297 CHAPTER XVIII 314 CHAPTER XIX 322
FRACTIONS 100 CHAPTER XI 139
### Popular passages
Page 166 - LIQUID MEASURE 4 gills (gi.) = 1 pint (pt.) 2 pints = 1 quart (qt.) 4 quarts = 1 gallon (gal...
Page 165 - MEASURE 1728 cubic inches (cu. in.)= 1 cubic foot (cu. ft.) 27 cubic feet = 1 cubic yard (cu. yd.) 166.
Page 346 - A number is divisible by 9 if the sum of its digits is divisible by 9.
Page 158 - MONEY 4 farthings (far.) = 1 penny (d.) 12 pence = 1 shilling (s...
Page 166 - Liquid Measure 4 gills (gi.) = 1 pint (pt.) 2 pints = 1 quart (qt...
Page 159 - AVoIRDUPOIS WEIGHT 16 ounces (oz.) = 1 pound (Ib.). 100 pounds = 1 hundredweight (cwt.). 20 hundredweight = 1 ton (T.).
Page 163 - Square Measure 144 square inches (sq. in.) = 1 square foot (sq. ft.) 9 square feet = 1 square yard (sq. yd.) 30j square yards = 1 square rod (sq. rd.) 160 square rods = 1 acre (A.) 640 acres = 1 square mile (sq.
Page 167 - Time 60 seconds (sec.) = 1 minute (min.) 60 minutes = 1 hour (hr.) 24 hours = 1 day (da.) 7 days = 1 week (wk.) 365 days = 1 common year (yr.) 366 days = 1 leap year 12 months (mo.) = 1 year 10 years = 1 decade 10 decades or \ , , , „ , 1=1 century (cen. or U.) 100 years / J v ' Thirty days has September, April, June, and November; All the rest have thirty-one, Excepting February alone, To which we twenty-eight assign, Till leap year gives it twenty-nine.
Page 163 - SQUARE MEASURE 144 square inches (sq. in.) = 1 square foot (sq. ft.) 9 square feet — 1 square yard (sq. yd.) 30^ square yards = 1 square rod (sq. rd.) 160 square rods = 1 acre (A.) 640 acres = 1 square mile (sq.
Page 160 - TROY WEIGHT. 24 grains (gr.) 1 pennyweight (pwt.) 20 pennyweights, 1 ounce (oz.) 12 ounces ... 1 pound (Ib.) Troy weight is used in weighing gold, silver, precious stones, etc. APOTHECARIES | finemath-3plus |
export { default as initialise } from './bootstrap';
export * from './constants'; | warebrained/basis-packages/client/src/index.js |
/*
Topic: 114. Flatten Binary Tree to Linked List
Description:
Given a binary tree, flatten it to a linked list in-place.
For example, given the following tree:
1
/ \
2 5
/ \ \
3 4 6
The flattened tree should look like:
1
\
2
\
3
\
4
\
5
\
6
*/
package main
// TreeNode Definition for a binary tree node.
type TreeNode struct {
Val int
Left *TreeNode
Right *TreeNode
}
// flatten use Morris traversal
// Time complexity: O(1)
// Space complexity: O(n)
func flatten(root *TreeNode) {
// Morris traversal (predecessor->right points to root)
// but the predecessor->right points to root->right
for root != nil {
// find predecessor
if root.Left != nil {
pre := root.Left
for pre.Right != nil {
pre = pre.Right
}
pre.Right = root.Right
root.Right = root.Left
root.Left = nil
}
// change to the next node
root = root.Right
}
}
func main() {
t := &TreeNode{
Val: 1,
Left: &TreeNode{
Val: 2,
Left: &TreeNode{Val: 3},
Right: &TreeNode{Val: 4},
},
Right: &TreeNode{
Val: 5,
Right: &TreeNode{Val: 6},
},
}
flatten(t)
}
| hsiaoairplane/LeetCode-114-Flatten-Binary-Tree-To-Linked-List/main.go |
// The 'bindings' helper will try all the well-known paths that the module might compile to based on platform / version / debug / etc
var bindings = require('bindings')('segfault-handler');
var fs = require('fs');
module.exports = {
registerHandler: function (dir) {
if (typeof dir != "string" || !dir || dir.length > 64) {
dir = ".";
}
try {
fs.mkdirSync(dir);
} catch (e) {
if (!(e && e.code == 'EEXIST')) {
throw e;
}
}
bindings.registerHandler(dir);
},
causeSegfault: bindings.causeSegfault,
causeAbort: bindings.causeAbort,
causeIllegalInstruction: bindings.causeIllegalInstruction
};
| timelapseplus/VIEW-node_modules/segfault/index.js |
'use strict'
let fs = require('fs');
let readFile = function (fileName) {
return new Promise(function (resolve, reject) {
fs.readFile(fileName, function (error, data) {
if (error) reject(error);
resolve(data);
});
});
};
function* gen() {
let f1 = yield readFile('/Users/yunwang/test/test1');
let f2 = yield readFile('/Users/yunwang/test/test2');
console.log("file test1 content:", f1.toString());
console.log("file test2 content:", f2.toString());
};
let g = gen();
g.next().value.then(data => {
return g.next(data).value;
}).then(data => {
g.next(data);
}).catch(console.log);
| wangyun1517/ES6NewFeatures-src/11generator&promise.js |
#ifndef MVC_OWNERS_H
#define MVC_OWNERS_H
class IViewO
{
public:
virtual char getUserOption()=0;
virtual void showOwneri(int pozitie)=0;
};
class ControllerO
{
Listao *owneri;
IViewO* view;
public:
void associateModel(Listao *o );
void associateView(IViewO* v );
void saltMVCContact();
void start();
};
class ViewO:public IViewO
{
Listao *owneri;
ControllerO *controller;
public:
ViewO(Listao *m, ControllerO* c): owneri(m), controller(c)
{
controller->associateModel(owneri);
controller->associateView(this);
}
char getUserOption();
void showOwneri(int pozitie);
void AfisareOwneri(int pozitie);
};
#endif | RobertAlexandroaie/C_CPP-[POO]Tema/Tema 1/Agenda/Agenda/mvc_owners.h |
'use strict'
const React = require('react')
const ReactDOM = require('react-dom')
const App = require('./app')
ReactDOM.render(<App />, document.getElementById('root'))
| js0p/sprouts-node_modules/ipfs/examples/browser-webpack/src/components/index.js |
// { dg-do compile { target c++11 } }
// Copyright (C) 2013-2017 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.
//
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// NB: Don't include any other headers in this file.
// LWG 2212 requires <utility> to define tuple_size<cv T> and
// tuple_element<cv T> specializations.
#include <utility>
typedef std::pair<int, long> test_type;
static_assert( std::tuple_size<test_type>::value == 2, "size is 2" );
static_assert( std::tuple_size<const test_type>::value == 2, "size is 2" );
static_assert( std::tuple_size<volatile test_type>::value == 2, "size is 2" );
static_assert( std::tuple_size<const volatile test_type>::value == 2,
"size is 2" );
template<std::size_t N, typename T>
using Tuple_elt = typename std::tuple_element<N, T>::type;
// This relies on the fact that <utility> includes <type_traits>:
using std::is_same;
static_assert( is_same<Tuple_elt<0, test_type>, test_type::first_type>::value,
"first type is int" );
static_assert( is_same<Tuple_elt<1, test_type>, test_type::second_type>::value,
"second type is long" );
static_assert( is_same<Tuple_elt<0, const test_type>,
const test_type::first_type>::value,
"first type is const int" );
static_assert( is_same<Tuple_elt<1, const test_type>,
const test_type::second_type>::value,
"second type is const long" );
static_assert( is_same<Tuple_elt<0, volatile test_type>,
volatile test_type::first_type>::value,
"first type is volatile int" );
static_assert( is_same<Tuple_elt<1, volatile test_type>,
volatile test_type::second_type>::value,
"second type is volatile long" );
static_assert( is_same<Tuple_elt<0, const volatile test_type>,
const volatile test_type::first_type>::value,
"first type is const volatile int" );
static_assert( is_same<Tuple_elt<1, const volatile test_type>,
const volatile test_type::second_type>::value,
"second type is const volatile long" );
| krichter722/gcc-libstdc++-v3/testsuite/20_util/pair/astuple/astuple.cc |
// { dg-options "-std=gnu++0x" }
template<typename... Types> struct Tuple { };
Tuple<> t0; // Types contains no arguments
Tuple<int> t1; // Types contains one argument: int
Tuple<int, float> t2; // Types contains two arguments: int and float
Tuple<0> error; // { dg-error "mismatch" }
// { dg-error "expected a type" "" { target *-*-* } 7 }
// { dg-error "in declaration" "" { target *-*-* } 7 }
| SanDisk-Open-Source/SSD_Dashboard-uefi/gcc/gcc-4.6.3/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C |
08.06.2007 | Pressemeddelelse
Støtte til afholdelse af VM i skolehåndbold i 2008
Kulturminister Brian Mikkelsen støtter afholdelse af VM i Skolehåndbold i 2008 med et tilskud på 200.000 kr.
BESTYRELSESMEDLEMMER TIL HESTEVÆDDELØBSSPORTENS FINANSIERINGSFOND
Kulturminister Brian Mikkelsen genudnævner Bent Knie-Andersen, Karin Nødgaard og Kurt Damsgaard til bestyrelsen for Hestevæddeløbssportens Finansieringsfond (HFF).
05.06.2007 | Pressemeddelelse
BRIAN MIKKELSEN NEDSÆTTER BOGUDVALG
Kulturminister Brian Mikkelsen nedsætter i dag et bogudvalg, som skal holde øje med, hvordan mere frie priser påvirker bogmarkedet.
14 kommuner udpeget til modelforsøg om børnekultur
Børnekulturens Netværk har udpeget 14 kommuner til at deltage i modelforsøget ”Børnekultur i kommunen – nye veje og metoder i arbejdet med børn, kultur og fritid.”
01.06.2007 | Pressemeddelelse
Ny direktør til Statens Museum for Kunst
Kulturminister Brian Mikkelsen har i dag udnævnt direktør for Kunsthallen Brandts Karsten Ohrt som ny direktør for Statens Museum for Kunst.
Brian Mikkelsen glad for FIFA's beslutning
På det internationale fodbold forbunds (FIFA) kongres i Zürich besluttede forbundet i går at tilslutte sig det internationale antidoping agenturs (WADA) kodeks fuldt ud ligesom alle de øvrige olympiske idrætsforbund.
NYT LIV I MUSIKKEN
Der vil fortsat være liv i musikken efter Kulturministeriets musikhandlingsplan ”Liv i musikken 2004-2007”. Kulturminister Brian Mikkelsen har besluttet at tildele musikken 21 mio. kr. årligt i perioden 2008-2011.
31.05.2007 | Pressemeddelelse
SØNDAG STÅR PÅ BØRN OG INDUSTRI
Historiens Dag 2007 har temaet ”Børn i industrihistorien.”
BREV TIL DR OM GENFORHANDLING AF PUBLIC SERVICE-KONTRAKT
30.05.2007 | Pressemeddelelse
4,4 mio. kr. til idrætsprojekter for børn og unge med handicap
Alle børn og unge bør have muligheden for at opleve glæden ved idræt. | c4-da |
/*
Copyright [2008] [Trevor Hogan]
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.
CODE PORTED FROM THE ORIGINAL GHOST PROJECT: http://ghost.pwner.org/
*/
#ifndef STATS_H
#define STATS_H
//
// CStats
//
// the stats class is passed a copy of every player action in ProcessAction when it's received
// then when the game is over the Save function is called
// so the idea is that you parse the actions to gather data about the game, storing the results in any member variables you need in your subclass
// and in the Save function you write the results to the database
// e.g. for dota the number of kills/deaths/assists, etc...
// the base class is almost completely empty
class CIncomingAction;
class CGHostDB;
class CStats
{
public:
CBaseGame *m_Game;
public:
CStats( CBaseGame *nGame );
virtual ~CStats( );
virtual bool ProcessAction( CIncomingAction *Action );
virtual void Save( CGHost *GHost, CGHostDB *DB, uint32_t GameID );
virtual void SetWinner(int winner);
};
#endif
| zenithtekla/G-hostOne-ghost/stats.h |
Sufficient Decrease for Deterministic Optimization
The technique of sufficient decrease (e.g., the well-known line search technique [28]) has been studied for deterministic optimization [25, 26]. For example, [25] proposed the following sufficient decrease condition:
\[F(x_{k})\leq F(x_{k-1})-\delta\|y_{k}-x_{k-1}\|^{2}, \tag{4}\]
where \(\delta\!>\!0\) is a small constant, and \(y_{k}\!=\!\mathrm{prox}_{\eta_{k}}^{r}(x_{k-1}-\eta_{k}\nabla\!f(x_{k-1}))\). Inspired by the strategy for deterministic optimization, in this paper we design a novel sufficient decrease technique for stochastic optimization, which is used to further reduce the cost function and speed up its convergence.
## 3 SVRG with Sufficient Decrease
In this section, we propose a novel sufficient decrease technique for stochastic variance reduction optimization methods, which include the widely-used SVRG method. To make sufficient decrease for stochastic optimization, we design an effective sufficient decrease strategy that can further reduce the cost function. Then a coefficient \(\theta\) is introduced to satisfy the sufficient decrease condition, and takes the decisions to shrink, expand or move in the opposite direction. Moreover, we present a variant of SVRG with sufficient decrease and momentum acceleration (called SVRG-SD). We also give two specific schemes to compute \(\theta\) for Lasso and ridge regression.
### Our Sufficient Decrease Technique
Suppose \(x_{k}^{s}=\mathrm{prox}_{\eta}^{r}(x_{k-1}^{s}-\eta[\nabla\!f_{i_{k}}(x_{k-1}^ {s})-\nabla\!f_{i_{k}^{s}}(\widetilde{x}^{s-1})+\widetilde{\mu}^{s-1}])\) for the \(s\)-th outer-iteration and the \(k\)-th inner-iteration. Unlike the full gradient method, the stochastic gradient estimator is somewhat inaccurate (i.e., it may be very different from \(\nabla\!f(x_{k-1}^{s})\)), then further moving in the updating direction may not decrease the objective value anymore [18]. That is, \(F(x_{k}^{s})\) may be larger than \(F(x_{k-1}^{s})\) even for very small step length \(\eta\!>\!0\). Motivated by this observation, we design a factor \(\theta\) to scale the current iterate \(x_{k-1}^{s}\) for the decrease of the objective function. For SVRG-SD, the cost function with respect to \(\theta\) is formulated as follows:
\[\min_{\theta\in\mathbb{R}}F(\theta x_{k-1}^{s})\!+\!\frac{\zeta(1\!-\!\theta) ^{2}}{2}\!\|\nabla\!f_{i_{k}^{s}}(x_{k-1}^{s})\!-\!\nabla\!f_{i_{k}^{s}}( \widetilde{x}^{s-1})\|^{2}, \tag{5}\]
where \(\zeta\!=\!\frac{\delta\eta}{1\!-\!L\eta}\) is a trade-off parameter between the two terms, \(\delta\) is a small constant and set to \(0.1\). The second term in (5) involves the norm of the residual of stochastic gradients, and plays the same role as the second term of the right-hand side of (4). Different from existing sufficient decrease techniques including (4), a varying factor \(\theta\) instead of a constant is introduced to scale \(x_{k-1}^{s}\) and the coefficient of the second term of (5), and \(\theta\) plays a similar role as the step-size parameter optimized via a line-search for deterministic optimization. However, line search techniques have a high computational cost in general, which limits their applicability to stochastic optimization [29].
Note that \(\theta\) is a scalar and takes the decisions to shrink, expand \(x_{k-1}^{s}\) or move in the opposite direction of \(x_{k-1}^{s}\). The detailed schemes to calculate \(\theta\) for Lasso and ridge regression are given in Section 3.3. We first present the following sufficient decrease condition in the statistical sense for stochastic optimization.
**Property 1**.: _For given \(x_{k-1}^{*}\) and the solution \(\theta_{k}\) of Problem (5), then the following inequality holds_
\[F(\theta_{k}x_{k-1}^{*})\leq F(x_{k-1}^{*})-\frac{\zeta(1-\theta_{k})^{2}}{2}\| \widetilde{p}_{i_{k}^{*}}\|^{2}, \tag{6}\]
_where \(\widetilde{p}_{i_{k}^{*}}\!=\!\nabla\!f_{i_{k}^{*}}(x_{k-1}^{*})\!-\!\nabla\! f_{i_{k}^{*}}(\widetilde{x}^{s-1})\) for SVRG-SD._
It is not hard to verify that \(F(\cdot)\) can be further decreased via our sufficient decrease technique, when the current iterate \(x_{k-1}^{*}\) is scaled by the coefficient \(\theta_{k}\). Indeed, for the special case when \(\theta_{k}\!=\!1\) for some \(k\), the inequality in (6) can be still satisfied. Unlike the sufficient decrease condition for deterministic optimization [25, 26], \(\theta_{k}\) may be a negative number, which means to move in the opposite direction of \(x_{k-1}^{*}\). | 1802.09933v1.mmd |
Replica L'l'i-Longines Qinyun uomo L4.760.4.12.2 serie orologio meccanico [5917] [9070 ] - €188.79 : replica orologi negozi online, swisswatchcopies.ru
Replica Cartier-Tonneau WE400131 donna orologio meccanico [67c5]
€248.01 €227.85
Home :: Mid-Range orologi di marca :: Longines Orologi :: Qinyun Orologi :: Replica L'l'i-Longines Qinyun uomo L4.760.4.12.2 serie orologio meccanico [5917]
Replica L'l'i-Longines Qinyun uomo L4.760.4.12.2 serie orologio meccanico [5917]
€198.71 €188.79
619 meccanico automatico | c4-co |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("path", {
fillOpacity: ".3",
d: "M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h3.87L13 7v4h4V5.33C17 4.6 16.4 4 15.67 4z"
}), h("path", {
d: "M13 12.5h2L11 20v-5.5H9l1.87-3.5H7v9.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V11h-4v1.5z"
})), 'BatteryCharging60TwoTone'); | AlloyTeam/Nuclear-components/icon/esm/battery-charging60-two-tone.js |
import OutgoingMessage from "../src/OutgoingMessage";
describe("OutgoingMessage", () => {
describe("writeHead", () => {
it("Should throws with an invalid status code", () => {
const res = new OutgoingMessage();
expect(() => {
res.writeHead(1);
}).toThrow(/^Invalid status code: 1/);
});
it("Should handle unknown status codes", () => {
const context = { res: {} };
const res = new OutgoingMessage(context);
res.writeHead(998);
expect(res.statusMessage).toBe("unknown");
expect(context.res.status).toBe(998);
});
it("Should work with headers", () => {
const context = { res: {} };
const res = new OutgoingMessage(context);
res.writeHead(200, null, { foo: "bar" });
expect(res.statusMessage).toBe("OK");
expect(context.res.status).toBe(200);
expect(context.res.headers).toEqual({ foo: "bar" });
});
it("Should work with headers with previous headers", () => {
const context = { res: {} };
const res = new OutgoingMessage(context);
res._headers = { previous: "previous" };
res._renderHeaders = () => res._headers;
res.writeHead(200, null, { foo: "bar" });
expect(res.statusMessage).toBe("OK");
expect(context.res.status).toBe(200);
expect(context.res.headers).toEqual({ foo: "bar", previous: "previous" });
});
it("Should work with a status message", () => {
const context = { res: {} };
const res = new OutgoingMessage(context);
res.writeHead(200, "baz", { foo: "bar" });
expect(res.statusMessage).toBe("baz");
expect(context.res.status).toBe(200);
expect(context.res.headers).toEqual({ foo: "bar" });
});
it("Should work with a headers as second parameter if no status message is given", () => {
const context = { res: {} };
const res = new OutgoingMessage(context);
res.writeHead(200, { foo: "bar" });
expect(res.statusMessage).toBe("OK");
expect(context.res.status).toBe(200);
expect(context.res.headers).toEqual({ foo: "bar" });
});
});
});
| yvele/azure-function-express-test/OutgoingMessage.test.js |
/** @type {import('@babel/core').TransformOptions} */
module.exports = {
presets: ['@redwoodjs/core/config/babel-preset'],
}
| ruedap/nekostagram-babel.config.js |
var eventListener = (function() {
'use strict';
//code goes here
})(); | matouk1114/learnQuery-06.event_listeners/src/eventListeners.js |
using System.ComponentModel.DataAnnotations;
namespace PT.Web.Models
{
public class ForgotViewModel
{
[Required]
[Display(Name = "Email")]
public string Email { get; set; }
}
public class LoginViewModel
{
[Required]
[Display(Name = "Email")]
[EmailAddress]
public string Email { get; set; }
[Required]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[Display(Name = "Remember me?")]
public bool RememberMe { get; set; }
}
public class RegisterViewModel
{
[Required]
[EmailAddress]
[Display(Name = "Email")]
public string Email { get; set; }
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[DataType(DataType.Password)]
[Display(Name = "Confirm password")]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; }
}
public class ResetPasswordViewModel
{
[Required]
[EmailAddress]
[Display(Name = "Email")]
public string Email { get; set; }
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[DataType(DataType.Password)]
[Display(Name = "Confirm password")]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; }
public string Code { get; set; }
}
public class ForgotPasswordViewModel
{
[Required]
[EmailAddress]
[Display(Name = "Email")]
public string Email { get; set; }
}
}
| ronaldme/PT-PT.Web/Models/AccountViewModels.cs |
Στ. Γιαννακίδης: Κομβικός ο ρόλος της Αν.Μακεδονίας–Θράκης στην βαλκανική συνανάπτυξη - Στο Κόκκινο 102.8 FM Καβάλα Ειδήσεις Ραδιόφωνο
Δευτέρα, 20/05/2019 00:34
Ο κ. Γιαννακίδης αναφέρθηκε στην πολύ θερμή υποδοχή που είχε ο πρωθυπουργός στην Ξάνθη και την ευρύτερη περιοχή, σημειώνοντας ότι «ο κόσμος αναγνωρίζει το έργο της κυβέρνησης και τις προοπτικές που έχουν δημιουργηθεί. Για πρώτη φορά μετά από πολλά χρόνια, στην Ανατολική Μακεδονία – Θράκη και στην Ξάνθη μία κυβέρνηση προσπαθεί με συγκεκριμένους όρους και πολιτικές να βοηθήσει την μεγάλη πλειοψηφία της κοινωνίας». | c4-el |
#ifndef GOSU_BUTTONSMAC_HPP
#define GOSU_BUTTONSMAC_HPP
namespace Gosu
{
//! List of all the button ids that can be used with Gosu::Input.
//! This enumeration contains ids for non-character keyboard keys (kb*),
//! mouse buttons and mouse wheel (ms*) and gamepad buttons (gp*).
enum ButtonName
{
kbRangeBegin = 0x01,
kbEscape = 0x35,
kbF1 = 0x7a,
kbF2 = 0x78,
kbF3 = 0x63,
kbF4 = 0x76,
kbF5 = 0x60,
kbF6 = 0x61,
kbF7 = 0x62,
kbF8 = 0x64,
kbF9 = 0x65,
kbF10 = 0x6d,
kbF11 = 0x67,
kbF12 = 0x6f,
kb1 = 0x12,
kb2 = 0x13,
kb3 = 0x14,
kb4 = 0x15,
kb5 = 0x17,
kb6 = 0x16,
kb7 = 0x1a,
kb8 = 0x1c,
kb9 = 0x19,
kb0 = 0x1d,
kbA = 0x00,
kbB = 0x0b,
kbC = 0x08,
kbD = 0x02,
kbE = 0x0e,
kbF = 0x03,
kbG = 0x05,
kbH = 0x04,
kbI = 0x22,
kbJ = 0x26,
kbK = 0x28,
kbL = 0x25,
kbM = 0x2e,
kbN = 0x2d,
kbO = 0x1f,
kbP = 0x23,
kbQ = 0x0c,
kbR = 0x0f,
kbS = 0x01,
kbT = 0x11,
kbU = 0x20,
kbV = 0x09,
kbW = 0x0d,
kbX = 0x07,
kbY = 0x10,
kbZ = 0x06,
kbTab = 0x30,
kbReturn = 0x24,
kbSpace = 0x31,
kbLeftShift = 0x38,
kbRightShift = 0x3c,
kbLeftControl = 0x3b,
kbRightControl = 0x3e,
kbLeftAlt = 0x3a,
kbRightAlt = 0x3d,
kbLeftMeta = 0x37,
kbRightMeta = 0x36,
kbBackspace = 0x33,
kbLeft = 0x7b,
kbRight = 0x7c,
kbUp = 0x7e,
kbDown = 0x7d,
kbHome = 0x73,
kbEnd = 0x77,
kbInsert = 0x72,
kbDelete = 0x75,
kbPageUp = 0x74,
kbPageDown = 0x79,
kbEnter = 0x4c,
kbNumpad1 = 0x53,
kbNumpad2 = 0x54,
kbNumpad3 = 0x55,
kbNumpad4 = 0x56,
kbNumpad5 = 0x57,
kbNumpad6 = 0x58,
kbNumpad7 = 0x59,
kbNumpad8 = 0x5b,
kbNumpad9 = 0x5c,
kbNumpad0 = 0x52,
kbNumpadAdd = 0x45,
kbNumpadSubtract = 0x4e,
kbNumpadMultiply = 0x43,
kbNumpadDivide = 0x4b,
kbRangeEnd = 0xffff,
msRangeBegin,
msLeft = msRangeBegin,
msRight,
msMiddle,
msWheelUp,
msWheelDown,
msRangeEnd,
gpRangeBegin,
gpLeft = gpRangeBegin,
gpRight,
gpUp,
gpDown,
gpButton0,
gpButton1,
gpButton2,
gpButton3,
gpButton4,
gpButton5,
gpButton6,
gpButton7,
gpButton8,
gpButton9,
gpButton10,
gpButton11,
gpButton12,
gpButton13,
gpButton14,
gpButton15,
gpRangeEnd = gpButton15,
kbNum = kbRangeEnd - kbRangeBegin + 1,
msNum = msRangeEnd - msRangeBegin + 1,
gpNum = gpRangeEnd - gpRangeBegin + 1,
numButtons = gpRangeEnd + 1,
noButton = 0xffffffff
};
}
#endif
| JosephAustin/Bwock-dependencies/Gosu/include/Gosu/ButtonsMac.hpp |
/* These dllimport and dllexport appearing for a symbol.
The desired behavior is that if both dllimport
and dllexport appear (in either order) the result is dllexport.
Microsoft's MSVC 2.0 allows dllimport followed by dllexport for variables,
but does not allow dllexport followed by dllimport.
In C, it's ok to redeclare a variable so this works for variables
and functions. In C++, it only works for functions. */
/* { dg-require-dll "" } */
__declspec (dllimport) int foo1 ();
__declspec (dllexport) int foo1 ();
__declspec (dllexport) int foo2 ();
__declspec (dllimport) int foo2 ();
__declspec (dllimport) int bar1;
__declspec (dllexport) int bar1;
__declspec (dllexport) int bar2;
__declspec (dllimport) int bar2;
| unofficial-opensource-apple/gcc_40-gcc/testsuite/gcc.dg/dll-2.c |
package com.coloredcarrot.nightowl.users;
public interface HumanUser extends CommandUser, WorldUser
{
public String getName();
public String getDisplayName();
public void setDisplayName(String displayName);
}
| ColoredCarrot/nightowl-src/com/coloredcarrot/nightowl/users/HumanUser.java |
//
// yhlSessionTaskManager.h
// Pods
//
// Created by yanghonglei on 16/7/8.
//
//
#import <Foundation/Foundation.h>
@interface yhlSessionTaskManager : NSObject
+ (id)sharedManager;
- (void)addGlobalTask:(NSURLSessionTask *)task;
- (void)cancelGlobalTask:(NSURLSessionTask *)task;
- (void)addTask:(NSURLSessionTask *)task forGroup:(NSString *)group;
- (void)cancelTask:(NSURLSessionTask *)task forGroup:(NSString *)group;
- (void)cancelTask:(NSURLSessionTask *)task;
- (void)cancelTasksForGroup:(NSString *)group;
@end
| yanghl/commonLib-commonLib/Classes/Network/yhlSessionTaskManager.h |
#!/usr/bin/env python
import os, sys, glob, time
def runCmd(cmd):
print cmd
os.system(cmd)
N_COLORS_LIST = [4, 6, 8, 10, 20]
inFns = glob.glob('input/*')
for ii, inFn in enumerate(inFns):
print
print '--- %s --- (%s/%s)' % (inFn, ii, len(inFns))
for N_COLORS in N_COLORS_LIST:
print
print '%s colors' % N_COLORS
tempFn = inFn.split('/')[-1].rsplit('.',1)[0] + '.reduced_color.png'
sortFn = 'output/' + inFn.split('/')[-1].rsplit('.',1)[0] + '.reduced_color.congregated.png'
finalFn = 'output/' + inFn.split('/')[-1].rsplit('.',1)[0] + '.reduced_color.congregated_%02i.png' % N_COLORS
if os.path.exists(finalFn):
continue
try:
runCmd('convert "%s" +dither -colors %s "%s"' % (inFn, N_COLORS, tempFn))
runCmd('./sort-pixels "%s"' % tempFn)
finally:
runCmd('mv "%s" "%s"' % (sortFn, finalFn))
runCmd('rm -f "%s"' % tempFn)
time.sleep(0.5)
#
| longears/sortpixels-reduce_color.py |
class Pdnsrec < Formula
desc "Non-authoritative/recursing DNS server"
homepage "https://www.powerdns.com/recursor.html"
url "https://downloads.powerdns.com/releases/pdns-recursor-4.1.1.tar.bz2"
sha256 "8feb03c7141997775cb52c131579e8e34c9896ea8bb77276328f5f6cc4e1396b"
bottle do
sha256 "acf3ac20e35b04e046d21f99f74e8301a14f16e8740ac0ab140d2979a5eb6d09" => :high_sierra
sha256 "ca5fca7f5c1f2ac202508bc09c11ceb34928e6f02363723f50c1da8ad985e6a6" => :sierra
sha256 "19c92e4a6b850eb8852640da9f10e5f71dbf272d22b17c1e78ad9dbe538c088a" => :el_capitan
end
depends_on "pkg-config" => :build
depends_on "boost"
depends_on "openssl"
depends_on "lua"
depends_on "gcc" if DevelopmentTools.clang_build_version <= 600
needs :cxx11
fails_with :clang do
build 600
cause "incomplete C++11 support"
end
def install
ENV.cxx11
args = %W[
--prefix=#{prefix}
--sysconfdir=#{etc}/powerdns
--disable-silent-rules
--with-boost=#{Formula["boost"].opt_prefix}
--with-libcrypto=#{Formula["openssl"].opt_prefix}
--with-lua
--without-net-snmp
]
system "./configure", *args
system "make", "install"
end
test do
output = shell_output("#{sbin}/pdns_recursor --version 2>&1")
assert_match "PowerDNS Recursor #{version}", output
end
end
| aren55555/homebrew-core-Formula/pdnsrec.rb |
Subsets and Splits