text
stringlengths 3
181k
| src
stringlengths 5
1.02k
|
---|---|
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import tempfile
from snapcraft import (
libraries,
tests,
)
class TestLdLibraryPathParser(tests.TestCase):
def _write_conf_file(self, contents):
tmp = tempfile.NamedTemporaryFile(delete=False, mode='w')
self.addCleanup(os.remove, tmp.name)
tmp.write(contents)
tmp.close()
return tmp.name
def test_extract_ld_library_paths(self):
file_path = self._write_conf_file("""# This is a comment
/foo/bar
/colon:/separated,/comma\t/tab /space # This is another comment
/baz""")
self.assertEqual(['/foo/bar', '/colon', '/separated', '/comma',
'/tab', '/space', '/baz'],
libraries._extract_ld_library_paths(file_path))
| rbreitenmoser/snapcraft-snapcraft/tests/test_libraries.py |
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('element/locale/sr', ['module', 'exports'], factory);
} else if (typeof exports !== "undefined") {
factory(module, exports);
} else {
var mod = {
exports: {}
};
factory(mod, mod.exports);
global.ELEMENT.lang = global.ELEMENT.lang || {};
global.ELEMENT.lang.sr = mod.exports;
}
})(this, function (module, exports) {
'use strict';
exports.__esModule = true;
exports.default = {
el: {
colorpicker: {
confirm: 'OK',
clear: 'Поништи'
},
datepicker: {
now: 'Сад',
today: 'Данас',
cancel: 'Откажи',
clear: 'Бриши',
confirm: 'OK',
selectDate: 'Изабери датум',
selectTime: 'Изабери време',
startDate: 'Датум почетка',
startTime: 'Време почетка',
endDate: 'Датум завршетка',
endTime: 'Време завршетка',
prevYear: 'Претходна година',
nextYear: 'Следећа година',
prevMonth: 'Претходни месец',
nextMonth: 'Следећи месец',
year: 'година',
month1: 'јануар',
month2: 'фебруар',
month3: 'март',
month4: 'април',
month5: 'мај',
month6: 'јун',
month7: 'јул',
month8: 'август',
month9: 'септембар',
month10: 'октобар',
month11: 'новембар',
month12: 'децембар',
week: 'седмица',
weeks: {
sun: 'Нед',
mon: 'Пон',
tue: 'Уто',
wed: 'Сре',
thu: 'Чет',
fri: 'Пет',
sat: 'Суб'
},
months: {
jan: 'јан',
feb: 'феб',
mar: 'мар',
apr: 'апр',
may: 'мај',
jun: 'јун',
jul: 'јул',
aug: 'авг',
sep: 'сеп',
oct: 'окт',
nov: 'нов',
dec: 'дец'
}
},
select: {
loading: 'Учитавање',
noMatch: 'Нема резултата',
noData: 'Нема података',
placeholder: 'Изабери'
},
cascader: {
noMatch: 'Нема резултата',
loading: 'Учитавање',
placeholder: 'Изабери'
},
pagination: {
goto: 'Иди на',
pagesize: '/страни',
total: 'Укупно {total}',
pageClassifier: ''
},
messagebox: {
title: 'Порука',
confirm: 'OK',
cancel: 'Откажи',
error: 'Неисправан унос'
},
upload: {
deleteTip: 'притисни БРИШИ да обришеш',
delete: 'Бриши',
preview: 'Види',
continue: 'Настави'
},
table: {
emptyText: 'Нема података',
confirmFilter: 'Потврди',
resetFilter: 'Ресетуј',
clearFilter: 'Све',
sumText: 'Збир'
},
tree: {
emptyText: 'Нема података'
},
transfer: {
noMatch: 'Нема резултата',
noData: 'Нема података',
titles: ['Листа 1', 'Листа 2'], // to be translated
filterPlaceholder: 'Унеси кључну реч', // to be translated
noCheckedFormat: '{total} ставки', // to be translated
hasCheckedFormat: '{checked}/{total} обележених' // to be translated
}
}
};
module.exports = exports['default'];
}); | Qinjianbo/blog-node_modules/element-ui/lib/umd/locale/sr.js |
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// frameworks to use
frameworks: ['jasmine'],
preprocessors: {
'*.ts': ['typescript']
},
typescriptPreprocessor: {
typings: [
'../typings/jasmine/*.d.ts'
],
options: {
sourceMap: true
}
},
files: ['*.ts'],
// list of files to exclude
exclude: [],
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['dots'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_DEBUG,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: true,
plugins: [
'karma-jasmine',
'karma-chrome-launcher',
'karma-phantomjs-launcher',
require('../index.js')
]
});
};
| andrislapsa/karma-typescript-preprocessor-test/karma.conf.js |
/*
** This file is part of upas.
**
** upas is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** upas 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PORTAUDIO_HPP_
# define PORTAUDIO_HPP_
# include "portaudio/portaudio.h"
# define NUM_CHANNELS 2
// paFloat32 float
// paInt32 int
// paInt16 short
class PortAudio
{
protected:
PaStream* stream;
PaStreamParameters inputParameters;
PaStreamParameters outputParameters;
PaSampleFormat sampleFormat;
int sampleRate;
int framesPerBuffer;
PaStreamCallback *inputCallback;
PaStreamCallback *outputCallback;
PaStreamCallback *inputOutputCallback;
bool muteState;
private:
bool checkReturn(PaError err) const;
public:
PortAudio(PaSampleFormat format,
int sampleRate = 32000,
int framesPerBuffer = 512);
~PortAudio();
// Getters / Setters
void mute();
void unmute();
bool isMute() const;
void setSampleFormat(PaSampleFormat format);
PaSampleFormat getSampleFormat() const;
void setInputCallback(PaStreamCallback *);
PaStreamCallback *getInputCallback(void);
void setOutputCallback(PaStreamCallback *);
PaStreamCallback *getOutputCallback(void);
void setInputOutputCallback(PaStreamCallback *);
PaStreamCallback *getInputOutputCallback(void);
// Device-related methods
PaDeviceIndex getDefaultInputDevice();
PaDeviceIndex getDefaultOutputDevice();
PaDeviceInfo const *getInputDeviceInfo() const;
PaDeviceInfo const *getOutputDeviceInfo() const;
// Stream-related methods
bool startStream() const;
bool closeStream() const;
bool isStreamActive() const;
bool openInputStream(void *callbackArg = NULL);
bool openOutputStream(void *callbackArg = NULL);
bool openInputOutputStream(void *callbackArg = NULL);
// tools
void sleep(int) const;
};
#endif // PORTAUDIO_HPP_
| yoones/upas-include/PortAudio.hpp |
/* Image_def.h
*
* Copyright (C) 1992-2011,2017,2018 Paul Boersma
*
* This code 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 2 of the License, or (at
* your option) any later version.
*
* This code is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this work. If not, see <http://www.gnu.org/licenses/>.
*/
#define ooSTRUCT Image
oo_DEFINE_CLASS (Image, Sampled)
oo_DOUBLE (ymin)
oo_DOUBLE (ymax)
oo_INTEGER (ny)
oo_DOUBLE (dy)
oo_DOUBLE (y1)
oo_BYTEMAT (z, ny, nx)
oo_END_CLASS (Image)
#undef ooSTRUCT
/* End of file Image_def.h */
| YannickJadoul/Parselmouth-praat/fon/Image_def.h |
package network
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
ClusterNetworkDefault = "default"
EgressNetworkPolicyMaxRules = 50
)
// +genclient=true
type ClusterNetwork struct {
metav1.TypeMeta
metav1.ObjectMeta
Network string
HostSubnetLength uint32
ServiceNetwork string
PluginName string
}
type ClusterNetworkList struct {
metav1.TypeMeta
metav1.ListMeta
Items []ClusterNetwork
}
// HostSubnet encapsulates the inputs needed to define the container subnet network on a node
type HostSubnet struct {
metav1.TypeMeta
metav1.ObjectMeta
// host may just be an IP address, resolvable hostname or a complete DNS
Host string
HostIP string
Subnet string
}
// HostSubnetList is a collection of HostSubnets
type HostSubnetList struct {
metav1.TypeMeta
metav1.ListMeta
Items []HostSubnet
}
// NetNamespace holds the network id against its name
type NetNamespace struct {
metav1.TypeMeta
metav1.ObjectMeta
NetName string
NetID uint32
}
// NetNamespaceList is a collection of NetNamespaces
type NetNamespaceList struct {
metav1.TypeMeta
metav1.ListMeta
Items []NetNamespace
}
// EgressNetworkPolicyRuleType gives the type of an EgressNetworkPolicyRule
type EgressNetworkPolicyRuleType string
const (
EgressNetworkPolicyRuleAllow EgressNetworkPolicyRuleType = "Allow"
EgressNetworkPolicyRuleDeny EgressNetworkPolicyRuleType = "Deny"
)
// EgressNetworkPolicyPeer specifies a target to apply egress policy to
type EgressNetworkPolicyPeer struct {
CIDRSelector string
DNSName string
}
// EgressNetworkPolicyRule contains a single egress network policy rule
type EgressNetworkPolicyRule struct {
Type EgressNetworkPolicyRuleType
To EgressNetworkPolicyPeer
}
// EgressNetworkPolicySpec provides a list of policies on outgoing traffic
type EgressNetworkPolicySpec struct {
Egress []EgressNetworkPolicyRule
}
// EgressNetworkPolicy describes the current egress network policy
type EgressNetworkPolicy struct {
metav1.TypeMeta
metav1.ObjectMeta
Spec EgressNetworkPolicySpec
}
// EgressNetworkPolicyList is a collection of EgressNetworkPolicy
type EgressNetworkPolicyList struct {
metav1.TypeMeta
metav1.ListMeta
Items []EgressNetworkPolicy
}
| smarterclayton/origin-pkg/sdn/apis/network/types.go |
# DO NOT STRUGGLE ON THIS PROBLEM FOR MORE THAN 30 MINUTES!
# This challenge is based off of Example 1 (session 3/2-examples/1_hashes)
# modify it such that it also accepts in the hash, a color (whose values are red("#FF0000"), green("#00FF00"), and blue(#0000FF) )
# if the color is set, then it should show up in the style
# It should also not be necessary to pass in the hash, if you don't want to specify options
#
#
# EXAMPLE:
#
# html = HTMLTag.new 'p', 'Hello World', :multiline => false, :color => :red
# html.to_s # => <p style="color:#FF0000">Hello World</p>
#
# sports = [
# HTMLTag.new('li', 'baseball', :multiline => false, :color => :red, :font => :serif) ,
# HTMLTag.new('li', 'soccer', :multiline => false, :color => :green, :font => :sans_serif) ,
# HTMLTag.new('li', 'football', :multiline => false, :color => :blue, :font => :monospace) ,
# ]
#
# ordered_list = HTMLTag.new 'ol' , sports.join , :multiline => true
#
# puts ordered_list # => (as output)
# <ol >
# <li style='color:#FF0000;font-family:"Times New Roman", "Georgia"'>baseball</li>
# <li style='color:#00FF00;font-family:"Arial", "Verdana"'>soccer</li>
# <li style='color:#0000FF;font-family:"Courier New", "Lucida Console"'>football</li>
# </ol>
class HTMLTag
FONTS = {
:serif => '"Times New Roman", "Georgia"',
:sans_serif => '"Arial", "Verdana"',
:monospace => '"Courier New", "Lucida Console"'
}
COLORS = {
:red => "#FF0000",
:green => "#00FF00",
:blue => "#0000FF"
}
attr_accessor :name, :innerHTML, :options
# options: :multiline should be true or false
def initialize(name, innerHTML, options={})
@name, @innerHTML, @options = name, innerHTML, options
end
def font
font = options[:font] # one of :serif, :sans_serif, or :monospace
FONTS[font]
end
def color
color = options[:color]
COLORS[color]
end
def style
if !!options[:font] && !!options[:color]
return "style='font-family:#{font};color:#{color};'"
elsif !!options[:font] && !options[:color]
return "style='font-family:#{font};'"
elsif !options[:font] && !!options[:color]
return "style='color:#{color};'"
end
return nil
end
def to_s
line_end = if options[:multiline] then "\n" else "" end
"<#{name} #{style}>#{line_end}" \
"#{innerHTML.chomp}#{line_end}" \
"</#{name}>\n"
end
end
# html = HTMLTag.new 'p', 'Hello World', :multiline => false,:font => :serif, :color => :red
# p html.to_s
#color:#FF0000;
#"<p style='font-family:\"Times New Roman\", \"Georgia\"'>Hello World</p>\n"
#"<p style='color:#FF0000;font-family:\"Times New Roman\", \"Georgia\"'>Hello World</p>\n"
| chn-challenger/ruby-kickstart-1-session3/3-challenge/7_hashes.rb |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from rest_framework import permissions
# initiate logger
logging.getLogger(__name__)
class CategoryPermissions(permissions.DjangoModelPermissions):
"""CategoryPermissions"""
class PostPermissions(permissions.DjangoModelPermissions):
"""PostPermissions"""
class AnnouncementPermissions(permissions.DjangoModelPermissions):
"""AnnouncementPermissions"""
| Diwaniya-Labs/django-rest-forum-discussion/permissions.py |
package org.gradle.test.performance.mediummonolithicjavaproject.p266;
public class Production5321 {
private String property0;
public String getProperty0() {
return property0;
}
public void setProperty0(String value) {
property0 = value;
}
private String property1;
public String getProperty1() {
return property1;
}
public void setProperty1(String value) {
property1 = value;
}
private String property2;
public String getProperty2() {
return property2;
}
public void setProperty2(String value) {
property2 = value;
}
private String property3;
public String getProperty3() {
return property3;
}
public void setProperty3(String value) {
property3 = value;
}
private String property4;
public String getProperty4() {
return property4;
}
public void setProperty4(String value) {
property4 = value;
}
private String property5;
public String getProperty5() {
return property5;
}
public void setProperty5(String value) {
property5 = value;
}
private String property6;
public String getProperty6() {
return property6;
}
public void setProperty6(String value) {
property6 = value;
}
private String property7;
public String getProperty7() {
return property7;
}
public void setProperty7(String value) {
property7 = value;
}
private String property8;
public String getProperty8() {
return property8;
}
public void setProperty8(String value) {
property8 = value;
}
private String property9;
public String getProperty9() {
return property9;
}
public void setProperty9(String value) {
property9 = value;
}
} | oehme/analysing-gradle-performance-my-app/src/main/java/org/gradle/test/performance/mediummonolithicjavaproject/p266/Production5321.java |
'use strict';
module.exports = function stringifyAndNormalize(contents) {
return JSON.stringify(contents, null, 2) + '\n';
};
| DanielJRaine/employee-forms-auth-node_modules/ember-cli/lib/utilities/stringify-and-normalize.js |
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package cn.com.smartdevices.bracelet.model;
public class
implements
{
public int getDayStepGoal()
{
return 8000;
}
public int getSleep()
{
return 0;
}
public int getSleepDeepTime()
{
return 0;
}
public long getSleepRiseTime()
{
return 0L;
}
public int getSleepShallowTime()
{
return 0;
}
public long getSleepStartTime()
{
return 0L;
}
public int getSleepWakeTime()
{
return 0;
}
public int getStepActiveTime()
{
return 0;
}
public int getStepCalorie()
{
return 0;
}
public int getStepContinueTime()
{
return 0;
}
public int getStepDistance()
{
return 0;
}
public int getStepRunDistance()
{
return 0;
}
public int getStepRunTime()
{
return 0;
}
public int getStepWalkTime()
{
return 0;
}
public int getSteps()
{
return 0;
}
public int getUserSleepEnd()
{
return 0x80000000;
}
public int getUserSleepStart()
{
return 0x80000000;
}
public boolean isEmpty()
{
return true;
}
public ()
{
}
}
| vishnudevk/MiBandDecompiled-Original Files/source/src/cn/com/smartdevices/bracelet/model/DaySportData$SummaryEmpty.java |
Dirwyn ymyrraeth i ben yn raddol yn Ynys Môn - BBC Cymru Fyw
Mae Gweinidog Llywodraeth Leol Cymru wedi amlinellu cynlluniau i ddod ag ymyrraeth Llywodraeth Cymru yng Nghyngor Sir Ynys Môn i ben yn raddol.Mewn datganiad ysgrifenedig, esboniodd Carl Sargeant i Aelodau Cynulliad fod y cyngor, sydd ar hyn o bryd dan stiwardiaeth pum comisiynydd a gafodd eu penodi gan y Gweinidog ym mis Mawrth 2011, yn gwneud "cynnydd da" ac erbyn hyn yn canolbwyntio'n effeithiol ac yn gyson ar y materion hynny sy'n bwysig i'r ynys.Serch hynny, dywedodd y byddai'n ymestyn ei gyfarwyddyd presennol o ddiwedd Mai hyd at ddiwedd Medi 2012 er mwyn galluogi aelodau newydd o'r tîm uwch-reoli i gael eu penodi a setlo i mewn i'w swyddi newydd.'Rhai pryderon'"Mae fy Nghomisiynwyr wedi dod i'r casgliad, er bod yna rai pryderon o hyd ynghylch llywodraethu'r cyngor, nad oes yna unrhyw beryglon difrifol erbyn hyn," meddai."Mae'r Archwilydd Cyffredinol wedi dod i'r un casgliad, ac wedi argymell y dylwn ddechrau cynllunio sut i ddod â fy ymyrraeth i ben."
Mae fy Nghomisiynwyr wedi dod i'r casgliad, er bod yna rai pryderon o hyd ynghylch llywodraethu'r Cyngor, nad oes yna unrhyw beryglon difrifol erbyn hynCarl Sargeant AC, Gweinidog Llywodraeth Leol
Bydd Comisiynwyr yn aros mewn grym nes i'r uwch-dîm fod yn ei le. Os yw'r Gweinidog a hwythau yn fodlon bryd hynny bod y cynghorwyr a'r uwch-dîm rheoli yn barod i gymryd yr awenau, ac os bydd cynnydd mewn meysydd eraill yn parhau, yna dywedodd y Gweinidog y byddai'n dirwyn ei ymyrraeth i ben. Byddai hynny'n golygu, i ddechrau, lleihau presenoldeb a chyfrifoldebau'r Comisiynwyr. Byddai'r Cynghorwyr yn ailafael yn yr awenau, ond gallai'r Comisiynwyr wyrdroi unrhyw benderfyniad y maen nhw'n eu hystyried yn annoeth neu'n afresymol. Byddai hefyd yn bosib i'r Comisiynwyr gymryd yr awenau'n llawn eto petai'r adferiad yn pallu.Wedi'r etholiad"Bydd y dull hwn o weithredu yn caniatáu i ni brofi pa mor gynaliadwy yw'r newid, o fewn amgylchedd sydd wedi'i reoli," ychwanegodd Mr Sargeant.
Mae'r cyfnod yma o ymyrraeth wedi bod yn siwrne heriol, ond angenrheidiol, i'r awdurdodCynghorydd Bryan Owen, Arweinydd Cyngor Sir Ynys Môn
"Bydd yn golygu y gallwn symud yn gynnar i sefyllfa o wneud penderfyniadau yn lleol, ond gyda dulliau diogelu priodol."Os bydd hynny'n llwyddiannus, dylwn allu dirwyn fy ymyrraeth i ben yn llwyr yn fuan wedi'r etholiadau'r flwyddyn nesaf."Wrth ymateb i ddatganiad y Gweinidog | c4-cy |
/*
* © Crown Copyright 2013
*
* 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 uk.nhs.hdn.common.parsers.json.jsonParseEventHandlers.schemaViolationInvalidJsonExceptions;
public final class UnexpectedConstantStringValueForSchemaViolationInvalidJsonException extends SchemaViolationInvalidJsonException
{
public UnexpectedConstantStringValueForSchemaViolationInvalidJsonException()
{
super("unexpected constant string value for schema");
}
}
| health-and-care-developer-network/health-and-care-developer-network-source/common/common-parsers-json/uk/nhs/hdn/common/parsers/json/jsonParseEventHandlers/schemaViolationInvalidJsonExceptions/UnexpectedConstantStringValueForSchemaViolationInvalidJsonException.java |
var textBase = require("ui/text-base");
var proxy = require("ui/core/proxy");
var dependencyObservable = require("ui/core/dependency-observable");
var enums = require("ui/enums");
var keyboardTypeProperty = new dependencyObservable.Property("keyboardType", "EditableTextBase", new proxy.PropertyMetadata(undefined, dependencyObservable.PropertyMetadataSettings.None));
var returnKeyTypeProperty = new dependencyObservable.Property("returnKeyType", "EditableTextBase", new proxy.PropertyMetadata(undefined, dependencyObservable.PropertyMetadataSettings.None));
var editableProperty = new dependencyObservable.Property("editable", "EditableTextBase", new proxy.PropertyMetadata(true, dependencyObservable.PropertyMetadataSettings.None));
var updateTextTriggerProperty = new dependencyObservable.Property("updateTextTrigger", "EditableTextBase", new proxy.PropertyMetadata(enums.UpdateTextTrigger.textChanged, dependencyObservable.PropertyMetadataSettings.None));
var autocapitalizationTypeProperty = new dependencyObservable.Property("autocapitalizationType", "EditableTextBase", new proxy.PropertyMetadata(enums.AutocapitalizationType.sentences, dependencyObservable.PropertyMetadataSettings.None));
var autocorrectProperty = new dependencyObservable.Property("autocorrect", "EditableTextBase", new proxy.PropertyMetadata(undefined, dependencyObservable.PropertyMetadataSettings.None));
exports.hintProperty = new dependencyObservable.Property("hint", "EditableTextBase", new proxy.PropertyMetadata(""));
function onKeyboardTypePropertyChanged(data) {
var editableTextBase = data.object;
editableTextBase._onKeyboardTypePropertyChanged(data);
}
keyboardTypeProperty.metadata.onSetNativeValue = onKeyboardTypePropertyChanged;
function onReturnKeyTypePropertyChanged(data) {
var editableTextBase = data.object;
editableTextBase._onReturnKeyTypePropertyChanged(data);
}
returnKeyTypeProperty.metadata.onSetNativeValue = onReturnKeyTypePropertyChanged;
function onEditablePropertyChanged(data) {
var editableTextBase = data.object;
editableTextBase._onEditablePropertyChanged(data);
}
editableProperty.metadata.onSetNativeValue = onEditablePropertyChanged;
function onAutocapitalizationTypePropertyChanged(data) {
var editableTextBase = data.object;
editableTextBase._onAutocapitalizationTypePropertyChanged(data);
}
autocapitalizationTypeProperty.metadata.onSetNativeValue = onAutocapitalizationTypePropertyChanged;
function onAutocorrectPropertyChanged(data) {
var editableTextBase = data.object;
editableTextBase._onAutocorrectPropertyChanged(data);
}
autocorrectProperty.metadata.onSetNativeValue = onAutocorrectPropertyChanged;
function onHintPropertyChanged(data) {
var editableTextBase = data.object;
editableTextBase._onHintPropertyChanged(data);
}
exports.hintProperty.metadata.onSetNativeValue = onHintPropertyChanged;
var EditableTextBase = (function (_super) {
__extends(EditableTextBase, _super);
function EditableTextBase(options) {
_super.call(this, options);
}
Object.defineProperty(EditableTextBase.prototype, "keyboardType", {
get: function () {
return this._getValue(EditableTextBase.keyboardTypeProperty);
},
set: function (value) {
this._setValue(EditableTextBase.keyboardTypeProperty, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(EditableTextBase.prototype, "returnKeyType", {
get: function () {
return this._getValue(EditableTextBase.returnKeyTypeProperty);
},
set: function (value) {
this._setValue(EditableTextBase.returnKeyTypeProperty, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(EditableTextBase.prototype, "editable", {
get: function () {
return this._getValue(EditableTextBase.editableProperty);
},
set: function (value) {
this._setValue(EditableTextBase.editableProperty, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(EditableTextBase.prototype, "updateTextTrigger", {
get: function () {
return this._getValue(EditableTextBase.updateTextTriggerProperty);
},
set: function (value) {
this._setValue(EditableTextBase.updateTextTriggerProperty, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(EditableTextBase.prototype, "autocapitalizationType", {
get: function () {
return this._getValue(EditableTextBase.autocapitalizationTypeProperty);
},
set: function (value) {
this._setValue(EditableTextBase.autocapitalizationTypeProperty, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(EditableTextBase.prototype, "autocorrect", {
get: function () {
return this._getValue(EditableTextBase.autocorrectProperty);
},
set: function (value) {
this._setValue(EditableTextBase.autocorrectProperty, value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(EditableTextBase.prototype, "hint", {
get: function () {
return this._getValue(EditableTextBase.hintProperty);
},
set: function (value) {
this._setValue(EditableTextBase.hintProperty, value);
},
enumerable: true,
configurable: true
});
EditableTextBase.prototype.dismissSoftInput = function () {
};
EditableTextBase.prototype._onKeyboardTypePropertyChanged = function (data) {
};
EditableTextBase.prototype._onReturnKeyTypePropertyChanged = function (data) {
};
EditableTextBase.prototype._onEditablePropertyChanged = function (data) {
};
EditableTextBase.prototype._onAutocapitalizationTypePropertyChanged = function (data) {
};
EditableTextBase.prototype._onAutocorrectPropertyChanged = function (data) {
};
EditableTextBase.prototype._onHintPropertyChanged = function (data) {
};
EditableTextBase.keyboardTypeProperty = keyboardTypeProperty;
EditableTextBase.returnKeyTypeProperty = returnKeyTypeProperty;
EditableTextBase.editableProperty = editableProperty;
EditableTextBase.updateTextTriggerProperty = updateTextTriggerProperty;
EditableTextBase.autocapitalizationTypeProperty = autocapitalizationTypeProperty;
EditableTextBase.autocorrectProperty = autocorrectProperty;
EditableTextBase.hintProperty = exports.hintProperty;
return EditableTextBase;
})(textBase.TextBase);
exports.EditableTextBase = EditableTextBase;
| sflament/nativescript-drag-between-listviews-platforms/android/src/main/assets/app/tns_modules/ui/editable-text-base/editable-text-base-common.js |
#! /usr/bin/env python3
# script to permute motif files
# define functions
def read_in_motif_file(infile):
motifs = {}
I = open(infile)
header = ''
for i in range(0, 9):
header += I.readline()
motif = ''
counter = 0
for Line in I:
if 'MOTIF' in Line:
motif = Line
if motif in motifs:
motif = motif.replace(' \n', '_%s \n' % (counter))
counter += 1
elif 'letter-probability' in Line:
read_motif = True
motifs[motif] = {}
motifs[motif]['real_motif'] = [Line]
elif Line == '\n':
read_motif = False
elif Line.count('\t') == 4 and read_motif:
motifs[motif]['real_motif'] += [Line]
I.close()
return (motifs, header)
def permutate_motifs(motifs):
"""
generates a pool of unique permutations
"""
for m in motifs:
permutations_temp = itertools.permutations(motifs[m]['real_motif'][1:])
permutations = []
for p in permutations_temp:
permutations += [p]
motifs[m]['permutations'] = list(set(permutations))
return (motifs)
def write_permutated_motifs(outfile, motifs, header):
O = open(outfile, 'w')
O.write(header)
for m in motifs:
if len(motifs[m]['permutations']) > 0: # if there are permutatations left, write a random permutations
tmp = motifs[m]['permutations'].pop(random.randint(0, len(motifs[m]['permutations']) - 1))
if not tmp == motifs[m]['real_motif'][
1:]: # make sure the permutated motif is not the same as the real motif
O.write('%s\n\n%s%s\n' % (m.split('\n')[0], motifs[m]['real_motif'][0], ''.join(tmp)))
elif len(motifs[m]['permutations']) > 0:
tmp = motifs[m]['permutations'].pop(random.randint(0, len(motifs[m]['permutations'])) - 1)
O.write('%s\n\n%s%s\n' % (m.split('\n')[0], motifs[m]['real_motif'][0], ''.join(tmp)))
else: # if there are no more permutations to choose from, write original motif
O.write('%s\n\n%s\n' % (m.split('\n')[0], ''.join(motifs[m]['real_motif'])))
else: # if there are no more permutations to choose from, write original motif
O.write('%s\n\n%s\n' % (m.split('\n')[0], ''.join(motifs[m]['real_motif'])))
O.close()
return
# run script
if __name__ == '__main__':
# required packages
import random
import itertools
import argparse
# input
parser = argparse.ArgumentParser(description='Takes a meme formatted motif file and permutates each motif n times.')
parser.add_argument('meme_file', metavar='motifs.meme',
help='Meme formatted files with motifs to permutate for p-value calculations of motif enrichment.')
parser.add_argument('output_prefix', metavar='prefix_for_path',
help='prefix for for all permuation files to. Permuations will be written to PREFIX.permuation.i.meme')
# options
parser.add_argument('-n', dest='repeats', default=100, help='number of permutations to perform')
# parse arguments
args = parser.parse_args()
meme_file = args.meme_file
output_prefix = args.output_prefix
num_perm = args.repeats
# run
MOTIFS, HEADER = read_in_motif_file(meme_file)
PERMS = permutate_motifs(MOTIFS)
O = open('%s.number_of_unique_motifs.txt' % (output_prefix), 'w')
O.write('motif\tpermutation\n')
for m in PERMS:
O.write('%s\t%s\n' % (m.split('\n')[0], len(PERMS[m]['permutations'])))
O.close()
for i in range(0, num_perm):
write_permutated_motifs('%s.permutation.%s.meme' % (output_prefix, i), MOTIFS, HEADER)
| dieterich-lab/FUCHS-FUCHS/permutate_motifs.py |
actions [:create, :delete, :restore, :backup]
default_action :create
attribute :id , kind_of: String , name_attribute: true
attribute :aws_access_key , kind_of: String
attribute :aws_secret_access_key , kind_of: String
attribute :allocated_storage , kind_of: Integer , required: true
attribute :auto_minor_version_upgrade , kind_of: [TrueClass,FalseClass] , default: true
attribute :availability_zone , kind_of: String
attribute :region , kind_of: String
attribute :backup_retention_period , kind_of: Integer
attribute :character_set_name , kind_of: String
attribute :db_instance_class , kind_of: String , required: true
attribute :db_instance_identifier , kind_of: String
attribute :db_name , kind_of: String
attribute :db_parameter_group_name , kind_of: String
attribute :db_subnet_group_name , kind_of: String
attribute :db_security_groups , kind_of: Array
attribute :engine , kind_of: String , required: true , default: 'postgres'
attribute :engine_version , kind_of: String
attribute :iops , kind_of: Integer
attribute :license_model , kind_of: String
attribute :master_user_password , kind_of: String , required: true
attribute :master_username , kind_of: String , required: true
attribute :multi_az , kind_of: [TrueClass,FalseClass] , default: false
attribute :option_group_name , kind_of: String
attribute :port , kind_of: Integer
attribute :preferred_backup_window , kind_of: String
attribute :preferred_maintenance_window , kind_of: String
attribute :publicly_accessible , kind_of: [TrueClass,FalseClass] , default: false
attribute :skip_final_snapshot , kind_of: [TrueClass,FalseClass] , default: false
attribute :region , kind_of: [String,NilClass] , default: nil
attribute :storage_type , kind_of: String
attribute :tags , kind_of: Array
attribute :vpc_security_group_ids , kind_of: Array
attribute :snapshot_id , kind_of: [String,NilClass] , default: nil
attr_accessor :exists
| gosuri/aws-rds-cookbook-resources/default.rb |
var nc1 = require('../lib/nats').connect();
var nc2 = require('../lib/nats').connect();
///////////////////////////////////////
// Publish/Subscribe Performance
///////////////////////////////////////
var loop = 2000000;
var hash = 2500;
console.log('Publish/Subscribe Performance Test');
nc1.on('connect', function() {
var received = 0;
var start = new Date();
nc1.subscribe('test', function() {
received += 1;
if (received === loop) {
var stop = new Date();
var mps = parseInt(loop/((stop-start)/1000));
console.log('\nPublished/Subscribe at ' + mps + ' msgs/sec');
console.log('Received ' + received + ' messages');
process.exit();
}
});
// Make sure sub is registered
nc1.flush(function() {
for (var i=0; i<loop; i++) {
nc2.publish('test', 'ok');
if (i % hash === 0) {
process.stdout.write('+');
}
}
});
});
| bigleuxenchef/Working-JSNatsSamples/node_modules/nats/benchmark/pub_sub_perf.js |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012, John Haddon. 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 John Haddon nor the names of
// any other contributors to this software 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.
//
//////////////////////////////////////////////////////////////////////////
#ifndef GAFFERSCENEBINDINGS_PATHMATCHERDATABINDING_H
#define GAFFERSCENEBINDINGS_PATHMATCHERDATABINDING_H
namespace GafferSceneBindings
{
void bindPathMatcherData();
} // namespace GafferSceneBindings
#endif // GAFFERSCENEBINDINGS_PATHMATCHERDATABINDING_H
| chippey/gaffer-include/GafferSceneBindings/PathMatcherDataBinding.h |
//! moment.js locale configuration
//! locale : Talossan [tzl]
//! author : Robin van der Vliet : https://github.com/robin0van0der0v
//! author : Iustì Canun
import moment from '../moment';
// After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
// This is currently too difficult (maybe even impossible) to add.
export default moment.defineLocale('tzl', {
months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),
monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
longDateFormat: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM [dallas] YYYY',
LLL: 'D. MMMM [dallas] YYYY HH.mm',
LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'
},
meridiemParse: /d\'o|d\'a/i,
isPM: function (input) {
return 'd\'o' === input.toLowerCase();
},
meridiem: function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'd\'o' : 'D\'O';
} else {
return isLower ? 'd\'a' : 'D\'A';
}
},
calendar: {
sameDay: '[oxhi à] LT',
nextDay: '[demà à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[ieiri à] LT',
lastWeek: '[sür el] dddd [lasteu à] LT',
sameElse: 'L'
},
relativeTime: {
future: 'osprei %s',
past: 'ja%s',
s: processRelativeTime,
m: processRelativeTime,
mm: processRelativeTime,
h: processRelativeTime,
hh: processRelativeTime,
d: processRelativeTime,
dd: processRelativeTime,
M: processRelativeTime,
MM: processRelativeTime,
y: processRelativeTime,
yy: processRelativeTime
},
ordinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
});
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
's': ['viensas secunds', '\'iensas secunds'],
'm': ['\'n míut', '\'iens míut'],
'mm': [number + ' míuts', '' + number + ' míuts'],
'h': ['\'n þora', '\'iensa þora'],
'hh': [number + ' þoras', '' + number + ' þoras'],
'd': ['\'n ziua', '\'iensa ziua'],
'dd': [number + ' ziuas', '' + number + ' ziuas'],
'M': ['\'n mes', '\'iens mes'],
'MM': [number + ' mesen', '' + number + ' mesen'],
'y': ['\'n ar', '\'iens ar'],
'yy': [number + ' ars', '' + number + ' ars']
};
return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);
}
| ohmygodvt95/wevivu-vendor/assets/components/moment/src/locale/tzl.js |
/*
Package slackchannelrouter provides a router to be used with the flog package ( https://github.com/reiver/go-flog ).
Recommended Usage
The Slack channel router is blocking. And since it is making an API request to
Slack's API servers (across the Internet) it can block for some time.
To deal with this, it is recommended you wrap the Slack channel router in a flog.NonBlockingRouter.
For example:
var slackChannelRouter flog.Router = slackchannelrouter.New(token, channel, username, iconEmoji)
slackChannelRouter = flog.NewNonBlockingRouter(slackChannelRouter)
Basic Usage
Putting this altogether, basic usage look something like this:
var slackChannelRouter flog.Router = slackchannelrouter.New(token, channel, username, iconEmoji)
// Note that 'filterMessageForSlackFunc' is some func that decides which messages are
// allowed to get posted to Slack.
slackChannelRouter = flog.NewFilteringRouter(slackChannelRouter, filterMessageForSlackFunc)
slackChannelRouter = flog.NewNonBlockingRouter(slackChannelRouter)
flogger := flog.New(slackChannelRouter)
(Although likely you would be using other routers too, besides just the Slack channel router.)
Advange Usage
You may want to modify the log before sending it to Slack.
For example, if you logged the following message:
flogger.Printf("Received error: %v", err)
And again for example, let's say that message gets rendered as:
Received error: Could not connect to queue server.
Then we might want to change this message before posting it to Slack,
as follows:
@group: Received error: Could not connect to queue server. :feelsgood:
To do that we would use the flog.MappingRouter.
So for example using that, plus also the flog.NonBlockingRouter mentioned already:
var slackChannelRouter flog.Router = slackchannelrouter.New(token, channel, username, iconEmoji)
slackChannelRouter = NewMappingRouter(slackChannelRouter, func(message string, context map[string]interface{})(string, map[string]interface{}){
newMessage := fmt.Sprintf("@group: %s :feelsgood:", message)
return newMessage, context
})
slackChannelRouter = flog.NewNonBlockingRouter(slackChannelRouter)
Flogger
For more information on the flogger, see the flog package: https://github.com/reiver/go-flog
*/
package slackchannelrouter
| reiver/go-slackchannelrouter-doc.go |
// Copyright 2016 janobono. All rights reserved.
// Use of this source code is governed by a Apache 2.0
// license that can be found in the LICENSE file.
package sql
// Update update
type Update struct {
criteriaManager CriteriaManager
table Table
columns []Column
values []interface{}
}
// UPDATE update
func UPDATE(table Table) *Update {
u := new(Update)
u.table = table
return u
}
// SET set
func (u *Update) SET(col interface{}, val interface{}) *Update {
columns, ok := col.([]Column)
if ok {
values, _ := col.([]interface{})
if len(columns) != len(values) {
panic("Wrong parameters length.")
}
for i, c := range columns {
set(u, c, values[i])
}
return u
}
c, ok := col.(Column)
if ok {
set(u, c, val)
return u
}
panic("Wrong parameter types.")
}
func set(u *Update, column Column, value interface{}) {
if u.columns == nil {
u.columns = make([]Column, 0)
}
if u.values == nil {
u.values = make([]interface{}, 0)
}
u.columns = append(u.columns, column)
u.values = append(u.values, value)
}
// WHERE where
func (u *Update) WHERE(column Column, condition Condition, value interface{}, representation string) *Update {
u.criteriaManager.AddCriterion(column, condition, value, representation, AND)
return u
}
// AND and
func (u *Update) AND(column Column, condition Condition, value interface{}, representation string) *Update {
u.criteriaManager.AddCriterion(column, condition, value, representation, AND)
return u
}
// OR or
func (u *Update) OR(column Column, condition Condition, value interface{}, representation string) *Update {
u.criteriaManager.AddCriterion(column, condition, value, representation, OR)
return u
}
// NEXT next group of criteria
func (u *Update) NEXT(operator Operator) *Update {
u.criteriaManager.Next(operator)
return u
}
// IN one level in
func (u *Update) IN(operator Operator) *Update {
u.criteriaManager.In(operator)
return u
}
// OUT one level up
func (u *Update) OUT() *Update {
u.criteriaManager.Out()
return u
}
// CriteriaManager returns criteria manager
func (u *Update) CriteriaManager() *CriteriaManager {
return &u.criteriaManager
}
// Table returns table
func (u *Update) Table() *Table {
return &u.table
}
// Columns returns columns
func (u *Update) Columns() *[]Column {
return &u.columns
}
// DataTypes slice of columns dataTypes
func (u *Update) DataTypes() []DataType {
result := make([]DataType, len(u.columns))
for index, column := range u.columns {
result[index] = *column.DataType()
}
return result
}
// Values returns values
func (u *Update) Values() *[]interface{} {
return &u.values
}
| janobono/r3n-sql/update.go |
(function() {
'use strict';
angular
.module('rainbowAngular')
.service('webDevTec', webDevTec);
/** @ngInject */
function webDevTec() {
var data = [
{
'title': 'AngularJS',
'url': 'https://angularjs.org/',
'description': 'HTML enhanced for web apps!',
'logo': 'angular.png'
},
{
'title': 'BrowserSync',
'url': 'http://browsersync.io/',
'description': 'Time-saving synchronised browser testing.',
'logo': 'browsersync.png'
},
{
'title': 'GulpJS',
'url': 'http://gulpjs.com/',
'description': 'The streaming build system.',
'logo': 'gulp.png'
},
{
'title': 'Jasmine',
'url': 'http://jasmine.github.io/',
'description': 'Behavior-Driven JavaScript.',
'logo': 'jasmine.png'
},
{
'title': 'Karma',
'url': 'http://karma-runner.github.io/',
'description': 'Spectacular Test Runner for JavaScript.',
'logo': 'karma.png'
},
{
'title': 'Protractor',
'url': 'https://github.com/angular/protractor',
'description': 'End to end test framework for AngularJS applications built on top of WebDriverJS.',
'logo': 'protractor.png'
},
{
'title': 'Bootstrap',
'url': 'http://getbootstrap.com/',
'description': 'Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.',
'logo': 'bootstrap.png'
},
{
'title': 'Angular Strap',
'url': 'http://mgcrea.github.io/angular-strap/',
'description': 'AngularJS 1.2+ native directives for Bootstrap 3.',
'logo': 'angular-strap.png'
},
{
'title': 'Stylus',
'url': 'http://learnboost.github.io/stylus/',
'description': 'Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS. Supporting both an indented syntax and regular CSS style.',
'logo': 'stylus.png'
}
];
this.getTec = getTec;
function getTec() {
return data;
}
}
})();
| eduardiazf/rainbow-angular-src/app/components/webDevTec/webDevTec.service.js |
/*
* [origin: Linux kernel include/asm-arm/arch-at91/at91sam9261_matrix.h]
*
* Copyright (C) 2007 Atmel Corporation.
*
* Memory Controllers (MATRIX, EBI) - System peripherals registers.
* Based on AT91SAM9261 datasheet revision D.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef AT91SAM9261_MATRIX_H
#define AT91SAM9261_MATRIX_H
#ifndef __ASSEMBLY__
struct at91_matrix {
u32 mcfg; /* Master Configuration Registers */
u32 scfg[5]; /* Slave Configuration Registers */
u32 filler[6];
u32 ebicsa; /* EBI Chip Select Assignment Register */
};
#endif /* __ASSEMBLY__ */
#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
#define AT91_MATRIX_ULBT_FOUR (2 << 0)
#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
#define AT91_MATRIX_FIXED_DEFMSTR_SHIFT 18
#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
#define AT91_MATRIX_M0PR_SHIFT 0
#define AT91_MATRIX_M1PR_SHIFT 4
#define AT91_MATRIX_M2PR_SHIFT 8
#define AT91_MATRIX_M3PR_SHIFT 12
#define AT91_MATRIX_M4PR_SHIFT 16
#define AT91_MATRIX_M5PR_SHIFT 20
#define AT91_MATRIX_RCB0 (1 << 0)
#define AT91_MATRIX_RCB1 (1 << 1)
#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
#define AT91_MATRIX_DBPUC (1 << 8)
#define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
#define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
#endif
| lxl1140989/dmsdk-uboot/u-boot-dm6291/arch/arm/include/asm/arch-at91/at91sam9261_matrix.h |
/* ./gnu/conf.h. Generated from conf.h.in by configure. */
/* Define as 1 if this compiler supports long long. */
#define HAVE_LONG_LONG 1
/* Define as 1 if you have string.h */
#define HAVE_STRING_H 1
/* Define as 1 if you have stdlib.h */
#define HAVE_STDLIB_H 1
/* Define as 1 if you have malloc.h */
/* #undef HAVE_MALLOC_H */
/* Define as 1 if you have unistd.h */
#define HAVE_UNISTD_H 1
/* Define as 1 if you have getopt.h */
#define HAVE_GETOPT_H 1
/* Define as 1 if you have values.h */
/* #undef HAVE_VALUES_H */
/* Define as 1 if you have dlfcn.h */
#define HAVE_DLFCN_H 1
/* Define as 1 if you have sys/un.h */
#define HAVE_SYS_UN_H 1
/* Define as 1 if you have sys/shm.h */
#define HAVE_SYS_SHM_H 1
/* Define as 1 if you have sys/mman.h */
#define HAVE_SYS_MMAN_H 1
/* Define as 1 if you have sys/ipc.h */
#define HAVE_SYS_IPC_H 1
/* Define as 1 if you have socklen_t */
#define HAVE_SOCKLEN_T 1
/* Define as 1 if you have strchr */
#define HAVE_STRCHR 1
/* Define as 1 if you have memcpy */
#define HAVE_MEMCPY 1
/* Define as 1 if you have snprintf */
#define HAVE_SNPRINTF 1
/* Define as 1 if you have Tcl */
#define HAVE_TCL 1
/* Define as 1 if you have Xt */
/* #undef HAVE_XT */
/* Define as 1 if you are running Cygwin. */
/* #undef HAVE_CYGWIN */
/* Define as 1 if you are running MinGW. */
/* #undef HAVE_MINGW32 */
| SAOImageDS9/SAOImageDS9-funtools/gnu/conf.h |
# frozen_string_literal: true
#
# deep_merge.rb
#
module Puppet::Parser::Functions
newfunction(:deep_merge, type: :rvalue, doc: <<-'DOC') do |args|
@summary
Recursively merges two or more hashes together and returns the resulting hash.
@example Example usage
$hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
$hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } }
$merged_hash = deep_merge($hash1, $hash2)
The resulting hash is equivalent to:
$merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } }
When there is a duplicate key that is a hash, they are recursively merged.
When there is a duplicate key that is not a hash, the key in the rightmost hash will "win."
@return [Hash] The merged hash
DOC
if args.length < 2
raise Puppet::ParseError, "deep_merge(): wrong number of arguments (#{args.length}; must be at least 2)"
end
deep_merge = proc do |hash1, hash2|
hash1.merge(hash2) do |_key, old_value, new_value|
if old_value.is_a?(Hash) && new_value.is_a?(Hash)
deep_merge.call(old_value, new_value)
else
new_value
end
end
end
result = {}
args.each do |arg|
next if arg.is_a?(String) && arg.empty? # empty string is synonym for puppet's undef
# If the argument was not a hash, skip it.
unless arg.is_a?(Hash)
raise Puppet::ParseError, "deep_merge: unexpected argument type #{arg.class}, only expects hash arguments"
end
result = deep_merge.call(result, arg)
end
return(result)
end
end
| puppetlabs/puppetlabs-stdlib-lib/puppet/parser/functions/deep_merge.rb |
'use strict';
const express = require('express');
const session = require('express-session');
const Auth = require('shopify-token');
const auth = new Auth({
'apiKey': process.env.SHOPIFY_API_KEY,
'sharedSecret': process.env.SHOPIFY_SECRET,
'redirectUri': process.env.SHOPIFY_REDIRECT_URI,
'scopes': ['read_orders', 'read_products', 'read_customers',
'write_orders']
});
const app = express();
app.use(session({
secret: 'icanhascheezburger',
saveUninitialized: false,
resave: false
}));
app.get('/', (req, res) => {
if (req.session.token) return res.send(`Token ${req.session.token}`);
// generate a random nonce
const nonce = auth.generateNonce();
// generate the authorization URL
const uri = auth.generateAuthUrl(req.query.shop, undefined, nonce);
// save nonce in session for later verification
req.session.state = nonce;
res.redirect(uri);
});
app.get('/callback', (req, res) => {
const state = req.query.state;
if (
typeof state !== 'string' ||
state !== req.session.state || // validate state
!auth.verifyHmac(req.query) // validate hmac
) {
return res.status(400).send('Security check failed');
}
// exchange auth code for permanent access token
auth.getAccessToken(req.query.shop, req.query.code)
.then((token) => {
console.log(token);
req.session.token = token;
req.session.state = undefined;
res.redirect('/');
})
.catch((err) => {
console.error(err.stack);
res.status(500).send(err);
});
});
const msg = 'open https://{PROXY_TO_LOCALHOST}/?shop={SHOP_TO_REQUEST_ACCESS}';
app.listen(8080, () => console.log(msg));
| joyrexus/shopify-auth-demo-index.js |
# frozen_string_literal: true
# Copyright 2021 Google 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
#
# 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.
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
module Google
module Ads
module GoogleAds
module V9
module Services
module AdGroupCriterionLabelService
# Path helper methods for the AdGroupCriterionLabelService API.
module Paths
##
# Create a fully-qualified AdGroupCriterion resource string.
#
# The resource will be in the following format:
#
# `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`
#
# @param customer_id [String]
# @param ad_group_id [String]
# @param criterion_id [String]
#
# @return [::String]
def ad_group_criterion_path customer_id:, ad_group_id:, criterion_id:
raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/"
"customers/#{customer_id}/adGroupCriteria/#{ad_group_id}~#{criterion_id}"
end
##
# Create a fully-qualified AdGroupCriterionLabel resource string.
#
# The resource will be in the following format:
#
# `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}`
#
# @param customer_id [String]
# @param ad_group_id [String]
# @param criterion_id [String]
# @param label_id [String]
#
# @return [::String]
def ad_group_criterion_label_path customer_id:, ad_group_id:, criterion_id:, label_id:
raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/"
raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/"
"customers/#{customer_id}/adGroupCriterionLabels/#{ad_group_id}~#{criterion_id}~#{label_id}"
end
##
# Create a fully-qualified Label resource string.
#
# The resource will be in the following format:
#
# `customers/{customer_id}/labels/{label_id}`
#
# @param customer_id [String]
# @param label_id [String]
#
# @return [::String]
def label_path customer_id:, label_id:
raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/"
"customers/#{customer_id}/labels/#{label_id}"
end
extend self
end
end
end
end
end
end
end
| googleads/google-ads-ruby-lib/google/ads/google_ads/v9/services/ad_group_criterion_label_service/paths.rb |
/*
* Copyright 1999-2000,2004 The Apache Software Foundation.
*
* 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.
*/
/*
* $Id: Win32Defs.hpp 191054 2005-06-17 02:56:35Z jberry $
*/
// ---------------------------------------------------------------------------
// NT and Win98 always run the CPU in little endian mode.
// ---------------------------------------------------------------------------
#define ENDIANMODE_LITTLE
// ---------------------------------------------------------------------------
// Define all the required platform types. For Win32, void* is interoperable
// with the HANDLE type.
// ---------------------------------------------------------------------------
typedef void* FileHandle;
| KrisDM/corinet-incl/xercesc/util/Platforms/Win32/Win32Defs.hpp |
#ifndef FAILURE_H
#define FAILURE_H
#include <iosfwd>
class Failure
{
public:
Failure (const char* condition, const char* testName,
const char* fileName, int lineNumber);
const char* Condition() const;
const char* TestName() const;
private:
friend std::ostream& operator<< (std::ostream& stream, const Failure& failure);
const char* m_condition;
const char* m_testName;
const char* m_fileName;
int m_lineNumber;
};
#endif
| Spicery/ginger-apps/CppUnitLite2/src/Failure.h |
/**********
This library 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 2.1 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
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 Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
// Copyright (c) 1996-2012 Live Networks, Inc. All rights reserved.
// Bit Vector data structure
// C++ header
#ifndef _BIT_VECTOR_HH
#define _BIT_VECTOR_HH
class BitVector {
public:
BitVector(unsigned char* baseBytePtr,
unsigned baseBitOffset,
unsigned totNumBits);
void setup(unsigned char* baseBytePtr,
unsigned baseBitOffset,
unsigned totNumBits);
void putBits(unsigned from, unsigned numBits); // "numBits" <= 32
void put1Bit(unsigned bit);
unsigned getBits(unsigned numBits); // "numBits" <= 32
unsigned get1Bit();
void skipBits(unsigned numBits);
unsigned curBitIndex() const { return fCurBitIndex; }
unsigned totNumBits() const { return fTotNumBits; }
unsigned numBitsRemaining() const { return fTotNumBits - fCurBitIndex; }
unsigned get_expGolomb();
// Returns the value of the next bits, assuming that they were encoded using an exponential-Golomb code of order 0
private:
unsigned char* fBaseBytePtr;
unsigned fBaseBitOffset;
unsigned fTotNumBits;
unsigned fCurBitIndex;
};
// A general bit copy operation:
void shiftBits(unsigned char* toBasePtr, unsigned toBitOffset,
unsigned char const* fromBasePtr, unsigned fromBitOffset,
unsigned numBits);
#endif
| hatboyzero/live456-liveMedia/src/BitVector.hh |
The OEIS is supported by the many generous donors to the OEIS Foundation.
Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
A119752 a(1)=2; a(n)=first even number greater than a(n-1) such that a(i)+a(n)+1 is prime for all i=1,2,...,n. 9
2, 8, 14, 44, 224, 638, 1274, 4004, 675404, 2203958, 3075158, 6195234164, 77989711184, 4566262987328 (list; graph; refs; listen; history; text; internal format)
OFFSET 1,1 LINKS Table of n, a(n) for n=1..14. MAPLE R:= [2]: count:= 1: for k from 4 by 2 while count < 11 do if isprime(2*k+1) and andmap(isprime, [seq(R[i]+k+1, i=1..count)]) then R:= [op(R), k]; count:= count+1 fi od: R; # Robert Israel, Mar 06 2023 MATHEMATICA Table[If[n == 1, a[1] = 2, j = a[n - 1] + 2; While[a[n] = j; ! AllTrue[Table[a[i] + a[n] + 1, {i, 1, n}], PrimeQ], j += 2]; j] , {n, 1, 9}] (* Robert Price, Apr 03 2019 *) PROG (PARI) isok(va, k, n) = if (isprime(2*k+1), for (i=1, n-1, if (! isprime(va[i]+k+1), return(0))); return(1)); lista(nn) = my(va=vector(nn)); va[1]=2; for (n=2, nn, my(k=va[n-1]+2); while (!isok(va, k, n), k+=2); va[n] = k); va; \\ Michel Marcus, Mar 06 2023 CROSSREFS Cf. A119751. Sequence in context: A039660 A333053 A333054 * A111001 A055258 A277649 Adjacent sequences: A119749 A119750 A119751 * A119753 A119754 A119755 KEYWORD nonn,more,hard AUTHOR Walter Kehowski, Jun 17 2006 EXTENSIONS a(13)-a(14) from Donovan Johnson, Mar 23 2008 STATUS approved
Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.
Last modified April 22 01:34 EDT 2024. Contains 371887 sequences. (Running on oeis4.) | finemath-3plus |
Java Reference
In-Depth Information
1. { 0 = 0 } x= 0; { x = 0 }
2. { x+1 = 0 } x= x+1; { x = 0 }
3. { x + n+1 = sum of 1..n } x= x + n+1; { x = sum of 1..n }
4. { x = sum of 1..n-1 } n= n-1; { x = sum of 1..n }
5. { b = z*x*x y } z= z*x; { b = z*x y }
6. { b = z*x*x y-1 } y= y-1; { b = z*x*x y }
7. { 0 = a*(2*y) 2 + b*(2*y) + c } y= 2*y; { 0 = a*y 2 + b*y + c }
Take a look at the following use of the assignment statement axiom:
{ y=0 } x= e; { y=0 }
Any constant could be substituted for 0 , and any variable (except x ) could be
substituted for y . Thus, this Hoare triple indicates that an assignment to x cannot
change any other variable! No side effects are allowed during evaluation of e . For
example, evaluation of e cannot call a function that changes a field of an object
that is visible where this assignment statement is, for that would be a side effect.
A form of assignment statement axiom can be developed that caters to side
effects, but it is far more complicated. If you want to use the simple assignment
statement axiom that we have introduced, you cannot allow side effects.
IV.3.3
Multiple assignment statement
A favorite assignment statement among people in the formal development of pro-
grams is the multiple assignment statement , which allows several variables to be
assigned simultaneously. The first multiple assignment below swaps the values
of x and y . The second rotates the values u , v , and w . With the third, if x is 4 ini-
tially, upon termination x is 5 and y is 4 :
x, y= y, x;
u, v, w= v, w, u;
x, y= x+1, x;
The multiple assignment is not a Java statement. When developing program,
use of the multiple assignment along the way helps understanding and helps
reduce errors. Below is the multiple-assignment definition for assignment to two
variables. It extends in the obvious way to more variables.
Multiple-assignment statement axiom . For all assertions R,
{ e is well-defined and [v,w\e,f]R } v, w= e, f; { R }
IV.3.4
Sequencing
We give an inference rule that allows us to conclude:
Search WWH ::
Custom Search | finemath-3plus |
var Logger = require('js-logger'),
extend = require('underscore').extend,
clone = require('underscore').clone,
without = require('underscore').without,
intersection = require('underscore').intersection,
pluck = require('underscore').pluck,
EventEmitter = require('events').EventEmitter,
AppDispatcher = require('../dispatcher/dispatcher'),
Payload = require('../constants/constants').Payload,
ActionTypes = require('../constants/constants').ActionTypes,
ServicesStore = require('../stores/services');
var state = {};
function removeService(list, id) {
return without(list, id);
}
function addService(ordered, list, id) {
list = list || [];
return intersection(ordered, list.concat(id));
}
var Store = extend(new EventEmitter(), {
togglePreferredService: function (serviceId) {
var allServices;
if (state.preferredServices && state.preferredServices.indexOf(serviceId) > -1) {
state.preferredServices = removeService(state.preferredServices, serviceId);
} else {
allServices = pluck(ServicesStore.getAllServicesAsArray(), 'id');
state.preferredServices = addService(allServices, state.preferredServices, serviceId);
}
},
getState: function () {
return clone(state);
},
emitChange: function () {
this.emit('change');
},
addChangeListener: function (callback) {
this.on('change', callback);
}
});
Store.dispatchToken = AppDispatcher.register(function (payload) {
var source = payload.source,
action = payload.action;
switch(action.type) {
case ActionTypes.RECEIVE_RADIO_SETTINGS:
Logger.debug('Radio Settings: ', action.type, action.state);
if (source === Payload.SERVER_ACTION) {
Logger.debug('Radio Settings: SERVER', action.type, action.state);
state = clone(action.state);
Store.emitChange();
}
break;
case ActionTypes.SETTINGS:
if (source === Payload.SERVER_ACTION && action.state.topic === 'settings.radio') {
Logger.debug('Radio Settings: SERVER', action.type, action.state);
state = clone(action.state.data);
Store.emitChange();
}
break;
}
});
module.exports = Store; | radiodan/magic-button-app/ui/static/js/stores/radio-settings.js |
from db import SQLite3
from datetime import datetime
class BaseDatabaseObject(object):
def __init__(self):
self.db = SQLite3()
def insert(self, table, data):
k = [i for i in data]
v = [data[i] for i in data]
try:
self.db.execute("insert into %s (%s) values (%s);" \
% (table, ','.join(k), ','.join(['?' for i in v])), v)
except:
self.db.rollback()
return 0
self.db.commit()
return 1
def update(self, table, data, where):
v = [k + "=?" for k in data]
query = "update %s set %s where %s;" % \
(table, ','.join(v), where[0])
try:
self.db.execute(query, tuple([data[k] for k in data]) + tuple(where[1:]))
except:
self.db.rollback()
return 0
self.db.commit()
return 1
def exists(self):
pass
class Pages(BaseDatabaseObject):
data = {
'url': None,
'category': None,
'classified': 0,
'deleted': 0,
'updated': None
}
def save(self):
self.data['updated'] = str(datetime.today())
if self.exists():
where = ['url=?', self.data['url']]
return BaseDatabaseObject.update(self, 'pages', self.data, where)
else:
return BaseDatabaseObject.insert(self, 'pages', self.data)
def exists(self):
db = SQLite3().cursor()
db.execute("select count(*) from pages where url=?", (self.data['url'],))
return db.fetchone()[0]
def main():
pass
if __name__ == '__main__': main() | after12am/expecto-machine_learning/feed_classifier/src/core/db/mapper.py |
/*
* Copyright 2010-2012 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 "../AmazonServiceRequestConfig.h"
/**
* Get Attributes Request
*
* \ingroup SimpleDB
*/
@interface SimpleDBGetAttributesRequest:AmazonServiceRequestConfig
{
NSString *domainName;
NSString *itemName;
NSMutableArray *attributeNames;
bool consistentRead;
bool consistentReadIsSet;
}
/**
* The name of the domain in which to perform the operation.
*/
@property (nonatomic, retain) NSString *domainName;
/**
* The name of the item.
*/
@property (nonatomic, retain) NSString *itemName;
/**
* The names of the attributes.
*/
@property (nonatomic, retain) NSMutableArray *attributeNames;
/**
* Determines whether or not strong consistency should be enforced when
* data is read from SimpleDB. If <code>true</code>, any data previously
* written to SimpleDB will be returned. Otherwise, results will be
* consistent eventually, and the client may not see data that was
* written immediately before your read.
*/
@property (nonatomic) bool consistentRead;
@property (nonatomic, readonly) bool consistentReadIsSet;
/**
* Default constructor for a new GetAttributesRequest object. Callers should use the
* property methods to initialize this object after creating it.
*/
-(id)init;
/**
* Constructs a new GetAttributesRequest object.
* Callers should use properties to initialize any additional object members.
*
* @param theDomainName The name of the domain in which to perform the
* operation.
* @param theItemName The name of the item.
*/
-(id)initWithDomainName:(NSString *)theDomainName andItemName:(NSString *)theItemName;
/**
* Adds a single object to attributeNames.
* This function will alloc and init attributeNames if not already done.
*/
-(void)addAttributeName:(NSString *)attributeNameObject;
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*/
-(NSString *)description;
@end
| tomandersen/aws-sdk-for-ios-src/include/SimpleDB/SimpleDBGetAttributesRequest.h |
مؤسسة ينابيع الذهب تدشن توزيع السلال الغذائية الرمضانية بمديريتي رداع والعرش بمحافظة البيضاء | وكالة اليقين
مؤسسة ينابيع الذهب تدشن توزيع السلال الغذائية الرمضانية بمديريتي رداع والعرش بمحافظة البيضاء
Previous articleبنيان توزع 500 سلة غذائية بمديرية الصليف في الحديدة
Next articleقابَلَ مسؤولين إسرائيليين.. الكشف عن مكان تواجد “ابن سلمان” | c4-ar |
/* Copyright (C) 2013-2014 Computer Sciences Corporation
*
* 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. */
module.exports = {
SSL: {
SSL_DIR_KEY: "ezbake.security.ssl.dir",
PRIVATE_KEY_FILE: "ezbake.ssl.privatekey.file",
DEFAULT_PRIVATE_KEY_FILE: "application.priv",
PUBLIC_KEY_FILE: "ezbake.ssl.servicekey.file",
DEFAULT_PUBLIC_KEY_FILE: "application.pub",
CERT_FILE: "ezbake.ssl.certificate.file",
DEFAULT_CERT_FILE: "application.crt",
DEFAULT_CA_FILE: "ezbakeca.crt"
},
CHAR_SET: "utf8"
} | infochimps-forks/ezbake-common-nodejs-thrift-utils/lib/constants.js |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Mycroft documentation build configuration file
#
import sys
import os
sys.path.insert(0, os.path.abspath('../'))
# General Configuration
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon'
]
autodoc_mock_imports = [
'speech_recognition',
'pyaudio',
'pyalsaaudio',
'pocketsphinx',
'padatious',
'alsaaudio'
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
# General Info
project = 'Mycroft'
copyright = '2017, Mycroft AI'
author = 'Mycroft AI'
version = '0.1.0'
release = '0.1.0' # Includes alpha/beta/rc tags.
language = None
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# Syntax Highlighting
pygments_style = 'sphinx'
todo_include_todos = False
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_options = {
'navigation_depth': 4,
}
html_static_path = []
htmlhelp_basename = 'Mycroftdoc'
# Options for LaTeX output
latex_elements = {}
latex_documents = [
(master_doc, 'Mycroft.tex', 'Mycroft Documentation',
'Matthew Scholefield', 'manual'),
]
# Options for manual page output
man_pages = [
(master_doc, 'mycroft', 'Mycroft Documentation',
[author], 1)
]
# Options for Texinfo output
texinfo_documents = [
(master_doc, 'Mycroft', 'Mycroft Documentation',
author, 'Mycroft', 'Mycroft Artificial Intelligence Platform.',
'Miscellaneous'),
]
# Options for Napoleon
napoleon_google_docstring = True
napoleon_numpy_docstring = False
| JarbasAI/JarbasAI-doc/conf.py |
/*
*
* Copyright (C) 2011, The Locker Project
* All rights reserved.
*
* Please see the LICENSE file for more information.
*
*/
// present a single page listing all the services discovered in this locker, scanning the /Apps /Collections /Contexts and /SourceSinks dirs
// enable start/stop on all (that you can)
var rootHost = process.argv[2];
var rootPort = process.argv[3];
if (!rootHost || !rootPort)
{
process.stderr.write("missing host and port arguments\n");
process.exit(1);
}
var lockerPort = rootPort.substring(1);
var lockerBase = 'http://'+rootHost+':'+lockerPort;
var fs = require('fs'),
path = require('path'),
url = require('url'),
sys = require('sys'),
express = require('express'),
connect = require('connect'),
http = require('http'),
wwwdude = require('wwwdude'),
wwwdude_client = wwwdude.createClient({
encoding: 'utf-8'
});
var app = express.createServer();
app.use(connect.bodyParser());
app.use(connect.cookieParser());
app.use(connect.session({secret : "locker"}));
var map;
app.get('/', function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/html','Access-Control-Allow-Origin' : '*' });
wwwdude_client.get(lockerBase + '/map').addListener('success', function(data, resp) {
map = JSON.parse(data);
fs.readFile("dashboard.html", function(err, data) {
res.write(data, "binary");
res.end();
});
});
});
// doesn't this exist somewhere? was easier to write than find out, meh!
function intersect(a,b)
{
if(!a || !b) return false;
for(var i=0;i<a.length;i++)
{
for(var j=0;j<b.length;j++)
{
if(a[i] == b[j]) return a[i];
}
}
return false;
}
app.get('/post2install', function(req, res){
var id = parseInt(req.param('id'));
var js = map.available[id];
var httpClient = http.createClient(lockerPort);
var request = httpClient.request('POST', '/install', {'Content-Type':'application/json'});
var item = JSON.stringify(map.available[req.param('id')]);
request.write(JSON.stringify(map.available[req.param('id')]));
request.end();
request.on('response',
function(response) {
var data = '';
response.on('data', function(chunk) {
data += chunk;
});
response.on('end', function() {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.write('<a href="/">back</a><br>Installed: '+data);
res.end();
});
});
});
app.get('/*', function (req, res) {
var uri = url.parse(req.url).pathname;
var filename = path.join(process.cwd(), uri);
path.exists(filename, function(exists) {
if(!exists) {
res.writeHead(404, {"Content-Type": "text/plain"});
res.write("404 Not Found\n");
res.end();
return;
}
fs.readFile(filename, "binary", function(err, file) {
if(err) {
res.writeHead(500, {"Content-Type": "text/plain"});
res.write(err + "\n");
res.end();
return;
}
var fileExtension = filename.substring(filename.lastIndexOf(".") + 1);
var contentType, contentLength;
switch (fileExtension)
{
case "png": contentType = "image/png"; break;
case "jpg": contentType = "image/jpeg"; break;
case "gif": contentType = "image/gif"; break;
}
if (contentType)
{
res.writeHead(200, { "Content-Type": contentType });
res.write(file);
}
else
{
res.writeHead(200);
res.write(file, "binary");
}
res.end();
});
});
});
console.log('http://'+rootHost+':'+rootPort+'/');
app.listen(rootPort);
| maxogden/Locker-Ops/Dashboard/dashboard.js |
Πρώτη Δημοσίευση: Πέμπτη, 17. 03. 2011 - 17:19
Σκοπός της επίσκεψης είναι η ενημέρωση για τις κινήσεις της ελληνικής πλευράς για την αποτελεσματικότερη διαχείριση των μεταναστευτικών ροών, αλλά και την αντιμετώπιση πιθανών κυμάτων προσφύγων από την Β. Αφρική, λόγω της τεταμένης κατάστασης που επικρατεί εκεί.
Επιπλέον, για τον ίδιο σκοπό, η Υφυπουργός θα συναντηθεί με τον Υπουργό Εσωτερικών της Κύπρου, κ. Νεοκλή Σηλικιώτη (10.30π.μ), καθώς και την Υπουργό Εργασίας, κα Σωτηρούλα Χαραλάμπους (13.00), προκειμένου να ανταλλάξουν απόψεις σχετικά με τις πολιτικές ένταξης των νομίμων μεταναστών, τις πολιτικές μετακλήσεων εξειδικευμένου προσωπικού, αλλά και την πιο αποτελεσματική διασύνδεση των αναγκών της αγοράς εργασίας με τα μεταναστευτικά ρεύματα.
Περισσότερα σε αυτή την κατηγορία: « "Μεταγραφή" Λιάσκου στο ΛΑΟΣ Παντοδύναμοι οι ορκωτοί ελεγκτές »
Τραμπ: Ανακοίνωσε «παύση» της μετανάστευσης για 60 ημέρες | c4-el |
/*
* R.app : a Cocoa front end to: "R A Computer Language for Statistical Data Analysis"
*
* R.app Copyright notes:
* Copyright (C) 2004-12 The R Foundation
* written by Stefano M. Iacus and Simon Urbanek
*
*
* R Copyright notes:
* Copyright (C) 1995-1996 Robert Gentleman and Ross Ihaka
* Copyright (C) 1998-2001 The R Development Core Team
* Copyright (C) 2002-2004 The R Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* A copy of the GNU General Public License is available via WWW at
* http://www.gnu.org/copyleft/gpl.html. You can also obtain it by
* writing to the Free Software Foundation, Inc., 59 Temple Place,
* Suite 330, Boston, MA 02111-1307 USA.
*
* RScriptEditorTextStorage.h
*
* Created by Hans-J. Bibiko on 01/03/2012.
*
*/
#import <Cocoa/Cocoa.h>
#define R_MAX_FOLDED_ITEMS 1024
@interface RScriptEditorTextStorage : NSTextStorage
{
NSTextStorage *_attributedString;
NSInteger foldedRanges[R_MAX_FOLDED_ITEMS][3];
NSInteger foldedCounter;
NSInteger currentMaxFoldedIndex;
id selfDelegate;
IMP _getImp;
IMP _setImp;
IMP _strImp;
IMP _replImp;
IMP _editImp;
IMP _getlImp;
}
- (id)initWithDelegate:(id)theDelegate;
- (NSInteger)foldedAtIndex:(NSInteger)index;
- (NSInteger)foldedForIndicatorAtIndex:(NSInteger)index;
- (NSRange)foldedRangeAtIndex:(NSInteger)index;
- (NSInteger)registerFoldedRange:(NSRange)range;
- (BOOL)inFoldedRangeForRange:(NSRange)range;
- (BOOL)removeFoldedRangeWithIndex:(NSInteger)index;
- (void)removeAllFoldedRanges;
- (BOOL)existsFoldedRange:(NSRange)range;
- (BOOL)hasFoldedItems;
@end
| RevolutionAnalytics/RRO-RRO-src/OSX/Mac-GUI/RScriptEditorTextStorage.h |
const log = require('log');
const resources = require('resources');
module.exports = {
connect (socket, details) {
const { io, data, connections } = resources;
const { userId, spaceCode, roomTag } = socket.handshake.query;
log.sockets.debug(`${socket.id} ${socket.userId} is now connected.`);
data.models.realtime_space.
findOne({ code: spaceCode }).
then(space => {
let roomsQuery;
if (roomTag) {
roomsQuery = {};
roomsQuery.or = [
{ space: space.id, tag: roomTag },
{ space: space.id, tag: null }
];
}
else {
roomsQuery = { space: space.id };
}
return data.models.realtime_space_room.find(roomsQuery).populate('users');
}).
then(rooms => {
rooms.
filter(room => {
return room.users.find(user => user.user === userId && !user.inactive);
}).
forEach(room => {
// Join user socket in room.
socket.join(room.id);
// Add user-room to connections list.
const con = connections.add({
user: socket.userId,
room: room.id,
socket: socket.id,
});
// Inform room users about user connection.
socket.to(room.id).emit('room:user:connect', con);
log.sockets.debug(`${socket.id} ${socket.userId} joined ${room.id}.`);
});
}).
catch(err => {
log.sockets.error(`${socket.id} ${socket.userId} could not be connected:`, err);
socket.error(err);
});
},
disconnecting (socket, details) {
const { io, connections } = resources;
const { userId } = socket.handshake.query;
// When user is disconnected, inform all her rooms users about the disconnection.
Object.keys(socket.rooms).forEach(room => {
const con = connections.getAll().find(con => {
return con.socket === socket.id && String(con.room) === String(room) && con.user === userId;
});
socket.to(room).emit('room:user:disconnect', con);
log.sockets.debug(`${socket.id} ${socket.userId} left ${room}.`);
});
// Remove socket from connections list.
connections.removeBySocket(socket.id);
},
disconnect (socket, details) {
log.sockets.debug(`${socket.id} ${socket.userId} was disconnected.`);
},
};
| calumet/realtime-app/events/users.js |
/**
* Copyright (C) 2015 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
/**
* Conventions and templates to aid the construction of rate swaps.
*/
package com.opengamma.strata.product.swap.type;
| ChinaQuants/Strata-modules/product/src/main/java/com/opengamma/strata/product/swap/type/package-info.java |
var expect = require('chai').expect;
(typeof window === 'undefined' ? describe : describe.skip)('proxy configuration vars', function () {
var testrun;
describe('lowercase', function () {
var proxyHost,
proxyPort,
proxyUrlForHttpRequest;
before(function (done) {
proxyHost = 'localhost';
proxyPort = global.servers.proxy.split(':')[2];
proxyUrlForHttpRequest = 'http://' + proxyHost + ':' + proxyPort;
process.env.http_proxy = proxyUrlForHttpRequest; // eslint-disable-line no-process-env
this.run({
collection: {
item: {
request: 'http://postman-echo.com/get'
}
}
}, function (err, results) {
testrun = results;
done(err);
});
});
after(function () {
delete process.env.http_proxy; // eslint-disable-line no-process-env
});
it('should have started and completed the test run', function () {
expect(testrun).to.be.ok;
expect(testrun).to.nested.include({
'done.calledOnce': true,
'start.calledOnce': true
});
});
it('should receive response from the proxy', function () {
var response = testrun.request.getCall(0).args[2].json();
expect(testrun.request.calledOnce).to.be.ok; // one request
expect(response).to.have.nested.property('headers.x-postman-proxy', 'true');
});
});
describe('uppercase', function () {
var proxyHost,
proxyPort,
proxyUrlForHttpRequest;
before(function (done) {
proxyHost = 'localhost';
proxyPort = global.servers.proxy.split(':')[2];
proxyUrlForHttpRequest = 'http://' + proxyHost + ':' + proxyPort;
process.env.HTTP_PROXY = proxyUrlForHttpRequest; // eslint-disable-line no-process-env
this.run({
collection: {
item: {
request: 'http://postman-echo.com/get'
}
}
}, function (err, results) {
testrun = results;
done(err);
});
});
after(function () {
delete process.env.HTTP_PROXY; // eslint-disable-line no-process-env
});
it('should have started and completed the test run', function () {
expect(testrun).to.be.ok;
expect(testrun).to.nested.include({
'done.calledOnce': true,
'start.calledOnce': true
});
});
it('should receive response from the proxy', function () {
var response = testrun.request.getCall(0).args[2].json();
expect(testrun.request.calledOnce).to.be.ok; // one request
expect(response).to.have.nested.property('headers.x-postman-proxy', 'true');
});
});
});
| postmanlabs/postman-runtime-test/integration/sanity/proxy-http-vars.test.js |
package cuina;
/**
* Ein Event für ein globales Ereignis in der Engine.
* Globale Ereignisse betreffen die Engine selbst, wie auch die Session und die Szene.
* @author TheWhiteShadow
*/
public final class GameEvent
{
/** Signalisiert das Starten der Engine. */
public static final int START_GAME = 1;
/** Signalisiert das Erstellen eines Session. */
public static final int OPEN_SESSION = 2;
/** Signalisiert das Speichern einer Session. */
public static final int SESSION_SAVED = 3;
/** Signalisiert das Laden einer Session. */
public static final int SESSION_LOADED = 4;
/** Signalisiert das Beenden einer Session. */
public static final int CLOSING_SESSION = 5;
/** Signalisiert das Wechseln der Szene. */
public static final int NEW_SCENE = 6;
/** Signalisiert das Herunterfahren der Engine. */
public static final int END_GAME = 7;
/** Gibt den Typ des Events an. */
public int type;
/** Gibt die aktuelle Szene an. */
public Scene scene;
/** Gibt die aktuelle Session an. */
public GameSession session;
/**
* Erstellt ein neues GameEvent.
* @param type Event-Typ.
* @param scene aktuelle Szene.
* @param session aktuelle Session.
*/
public GameEvent(int type, Scene scene, GameSession session)
{
this.type = type;
this.scene = scene;
this.session = session;
}
}
| TheWhiteShadow3/cuina-engine/src/cuina/GameEvent.java |
//
// DropboxErrors.h
// Pods
//
// Created by Михаил Мотыженков on 14.04.16.
//
//
#ifndef DropboxErrors_h
#define DropboxErrors_h
#import "DropboxError.h"
#import "DropboxErrorBadInputParameter.h"
#import "DropboxErrorBadOrExpiredToken.h"
#import "DropboxErrorEndpointSpecific.h"
#import "DropboxErrorTooManyRequests.h"
#import "DropboxErrorDropboxServers.h"
#import "ObjectiveDropboxError.h"
#endif /* DropboxErrors_h */
| zlib/ObjectiveDropbox-Pod/Classes/Entities/Errors/DropboxErrors.h |
/*
* Copyright (C) 2013-2022 Byron 3D Games Studio (www.b3dgs.com) Pierre-Alexandre ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.b3dgs.lionengine.game.feature.tile.map.pathfinding;
/**
* Node in the path.
*/
public final class Node implements Comparable<Node>
{
/** Minimum to string length. */
private static final int MIN_LENGTH = 45;
/** Node location x. */
private final int x;
/** Node location y. */
private final int y;
/** Node parent. */
private Node parent;
/** Node depth. */
private int depth;
/** Node cost. */
private double cost;
/** Node heuristic value. */
private double heuristic;
/**
* Constructor.
*
* @param x The location x.
* @param y The location y.
*/
public Node(int x, int y)
{
super();
this.x = x;
this.y = y;
}
/**
* Set the node parent.
*
* @param parent The node parent.
* @return depth The from parent.
*/
public int setParent(Node parent)
{
if (parent != null)
{
depth = parent.getDepth() + 1;
}
this.parent = parent;
return depth;
}
/**
* Set cost.
*
* @param cost The node cost.
*/
public void setCost(double cost)
{
this.cost = cost;
}
/**
* Set heuristic value.
*
* @param heuristic The heuristic value.
*/
public void setHeuristic(double heuristic)
{
this.heuristic = heuristic;
}
/**
* Set node depth.
*
* @param depth The node depth.
*/
public void setDepth(int depth)
{
this.depth = depth;
}
/**
* Get location x.
*
* @return The location x.
*/
public int getX()
{
return x;
}
/**
* Get location y.
*
* @return The location y.
*/
public int getY()
{
return y;
}
/**
* Get cost.
*
* @return The cost.
*/
public double getCost()
{
return cost;
}
/**
* Get node parent reference.
*
* @return The node parent reference.
*/
public Node getParent()
{
return parent;
}
/**
* Get heuristic value.
*
* @return The heuristic value.
*/
public double getHeuristic()
{
return heuristic;
}
/**
* Get node depth.
*
* @return The node depth.
*/
public int getDepth()
{
return depth;
}
/*
* Comparable
*/
@Override
public int compareTo(Node other)
{
int res = Double.compare(getCost(), other.getCost());
if (res == 0)
{
res = Double.compare(getHeuristic(), other.getHeuristic());
}
return res;
}
@Override
public boolean equals(Object object)
{
if (this == object)
{
return true;
}
if (object == null || object.getClass() != getClass())
{
return false;
}
final Node node = (Node) object;
return x == node.x && y == node.y;
}
@Override
public int hashCode()
{
int hash = 12;
hash = hash * 17 + x;
hash = hash * 31 + y;
return hash;
}
@Override
public String toString()
{
return new StringBuilder(MIN_LENGTH).append(getClass().getSimpleName())
.append(" [")
.append(toStringCoordinates())
.append(", depth=")
.append(depth)
.append(", cost=")
.append(cost)
.append(", heuristic=")
.append(heuristic)
.append(", parent=")
.append(parent != null ? '{' + parent.toStringCoordinates() + '}' : null)
.append("]")
.toString();
}
/**
* @return Coordinates.
*/
public String toStringCoordinates()
{
return "x=" + x + ", y=" + y;
}
}
| b3dgs/lionengine-lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/Node.java |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
export default [
'es-PR',
[
['a. m.', 'p. m.'],
,
],
,
[
['d', 'l', 'm', 'm', 'j', 'v', 's'], ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'],
['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'],
['DO', 'LU', 'MA', 'MI', 'JU', 'VI', 'SA']
],
[
['D', 'L', 'M', 'M', 'J', 'V', 'S'], ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'],
['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'],
['DO', 'LU', 'MA', 'MI', 'JU', 'VI', 'SA']
],
[
['E', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
[
'ene.', 'feb.', 'mar.', 'abr.', 'may.', 'jun.', 'jul.', 'ago.', 'sep.', 'oct.', 'nov.', 'dic.'
],
[
'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre',
'octubre', 'noviembre', 'diciembre'
]
],
, [['a. C.', 'd. C.'], , ['antes de Cristo', 'después de Cristo']], 0, [6, 0],
['MM/dd/yy', 'MM/dd/y', 'd \'de\' MMMM \'de\' y', 'EEEE, d \'de\' MMMM \'de\' y'],
['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'],
[
'{1} {0}',
,
'{1}, {0}',
],
['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],
['#,##0.###', '#,##0 %', '¤#,##0.00', '#E0'], '$', 'dólar estadounidense', function(n: number):
number {
if (n === 1)
return 1;
return 5;
}
];
| aboveyou00/angular-packages/common/locales/es-PR.ts |
# Taken from http://pragprog.com/titles/fr_ltp/learn-to-program
#
# Write a Deaf Grandma program. Whatever you say to grandma (whatever
# you type in), she should respond with HUH?! SPEAK UP, SONNY!, unless
# you shout it (type in all capitals). If you shout, she can hear you
# (or at least she thinks so) and yells back, NO, NOT SINCE 1938!
# You can't stop talking to grandma until you shout BYE.
#
# Hint: Don't forget about chomp! "BYE\n" is not the same as "BYE"
# (check the String cheatsheet if you need)
#
# remember, you can try your program by going to the terminal and typing $ ruby 9_input_output_logic_string.rb
#
# example:
#
#
# USER: $ ruby 9_input_output_logic_string.rb
# USER: hi grandma.
# GRANDMA: HUH?! SPEAK UP, SONNY!
# USER: HI GRANDMA!
# GRANDMA: NO, NOT SINCE 1938!
# USER: bye
# GRANDMA: HUH?! SPEAK UP, SONNY!
# USER: BYE
# String class to check caps
class String
def caps?
self == self.upcase ? true : false
end
end
# Loop unless BYE is received
def deaf_grandma
while (input = gets.chomp) && ( input !~ /BYE/)
if input.caps? && input != ""
puts "NO, NOT SINCE 1938!"
else
puts "HUH?! SPEAK UP, SONNY!"
end
end
end
# This will call your code so you can run it from the terminal.
# But not call it otherwise, so that it will work with our tests.
deaf_grandma if $0 == __FILE__ | JonLz/ruby-kickstart-session2/challenge/9_input_output_logic_string.rb |
import React from "react"
import { stringify } from "querystring"
import { SearchResultsSkeleton } from "v2/Apps/Search/Components/SearchResultsSkeleton"
import { StitchWrapper } from "desktop/components/react/stitch_components/StitchWrapper"
import { stitch } from "@artsy/stitch"
import { getContextPageFromReq } from "lib/getContextPage"
import { OwnerType } from "@artsy/cohesion"
export const searchMiddleware = async (req, res, next) => {
const { pageType } = getContextPageFromReq(req)
if (pageType === OwnerType.search) {
try {
if (!req.query.term) {
if (req.query.q) {
const query = stringify({ term: req.query.q })
res.locals.sd.searchQuery = req.query.q
res.redirect(302, `/search?${query}`)
return
} else {
res.redirect(302, "/")
return
}
} else {
res.locals.sd.searchQuery = req.query.term
}
// Turn off pre-fetching, since those will be intercepted
// and routed client-side.
res.locals.sd.ENABLE_INSTANT_PAGE = false
const layout = await stitch({
basePath: __dirname,
layout: "../../../../components/main_layout/templates/artsy_v2.jade",
blocks: {
loadingComponent: _props => {
return (
<StitchWrapper>
<SearchResultsSkeleton />
</StitchWrapper>
)
},
},
locals: {
...res.locals,
pageType,
},
})
const status = 200
res.locals.PAGE_CACHE = {
status,
key: req.url,
html: layout,
}
res.status(status).send(layout)
return
} catch (error) {
console.error(error)
next(error)
}
}
next()
}
| eessex/force-src/desktop/apps/artsy-v2/apps/search/searchMiddleware.tsx |
import pylab as pl
def panelplot(numRows, numCols):
""" draw a panel of (numRows, numCols) plots with axes in the right places """
subplots = []
# no space between the panels
pl.rcParams.update({'figure.subplot.wspace':0,'figure.subplot.hspace':0})
for i in range(numRows*numCols):
ax= pl.subplot(numRows,numCols,i+1)
# only put left ticks on the left plots, right ticks on the right, lower on the lower
left_tick = i%numCols==0
right_tick = (i+1)%numCols==0
for tick in ax.yaxis.get_major_ticks():
tick.label1On=left_tick
tick.label2On=right_tick
lower_tick = i>=(numRows-1)*numCols
for tick in ax.xaxis.get_major_ticks():
tick.label1On=lower_tick
subplots.append(ax)
return subplots
if __name__=='__main__':
subplots = panelplot(3,3)
from numpy import arange
x = arange(20)
for ax in subplots:
# set this to be the current axes
pl.axes(ax)
pl.plot(x,x)
pl.ylim(0,19.9)
pl.xlim(0,19.9)
pl.show() | Lowingbn/iccpy-figures/panelplot.py |
Randall (lungsod sa Tinipong Bansa, Minnesota) - Wikipedia
Tiganos: 46°05′28″N 94°30′13″W / 46.09108°N 94.50362°V / 46.09108; -94.50362
Randall (lungsod sa Tinipong Bansa, Minnesota)
Alang sa ubang mga dapit sa mao gihapon nga ngalan, tan-awa ang Randall.
46°05′28″N 94°30′13″W / 46.09108°N 94.50362°V / 46.09108; -94.50362
5042586
Lungsod ang Randall sa Tinipong Bansa.[1] Ang Randall nahimutang sa kondado sa Morrison County ug estado sa Minnesota, sa sidlakang bahin sa nasod, 1,600 km sa amihanan-kasadpan sa ulohang dakbayan Washington, D.C. 363 metros ibabaw sa dagat kahaboga ang nahimutangan sa Randall[1], ug adunay 650 ka molupyo.[2]
Ang yuta palibot sa Randall kay patag.[saysay 1] Ang kinahabogang dapit sa palibot dunay gihabogon nga 384 ka metro ug 1.9 km sa sidlakan sa Randall.[saysay 2] Dunay mga 6 ka tawo kada kilometro kwadrado sa palibot sa Randall may kaayo gamay nga populasyon.[4] Ang kinadul-ang mas dakong lungsod mao ang Little Falls, 16.7 km sa habagatan-sidlakan sa Randall. Hapit nalukop sa kaumahan ang palibot sa Randall.[5] Sa rehiyon palibot sa Randall, mga lanaw, kapuloan, ug mga luuk talagsaon komon.[saysay 3]
Ang klima hemiboreal.[6] Ang kasarangang giiniton 5 °C. Ang kinainitan nga bulan Hulyo, sa 20 °C, ug ang kinabugnawan Pebrero, sa -14 °C.[7] Ang kasarangang pag-ulan 970 milimetro matag tuig. Ang kinabasaan nga bulan Mayo, sa 187 milimetro nga ulan, ug ang kinaugahan Enero, sa 31 milimetro.[8]
Nahimutangan sa Randall sa Tinipong Bansa.
↑ 1.0 1.1 1.2 Randall sa Geonames.org (cc-by); post updated 2011-05-14; database download sa 2017-02-28
Gikuha gikan sa "https://ceb.wikipedia.org/w/index.php?title=Randall_(lungsod_sa_Tinipong_Bansa,_Minnesota)&oldid=28037048" | c4-ceb |
package patterns.other.reactor.example;
interface EventHandler {
void handle(Event event);
}
| codetplace/design-patterns-java-src/patterns/other/reactor/example/EventHandler.java |
/*
* A Key Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2017 Jinhao([email protected])
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* @file: nana/key_type.hpp
*/
#ifndef NANA_KEY_TYPE_HPP
#define NANA_KEY_TYPE_HPP
namespace nana
{
namespace detail
{
class key_interface
{
public:
virtual ~key_interface(){}
virtual bool same_type(const key_interface*) const noexcept = 0;
virtual bool compare(const key_interface*) const noexcept = 0; ///< is this key less than right key? [call it less(rk), less_than(rk) or compare_less(rk)?: if (lk.less_than(rk )) ]
}; //end class key_interface
//Use less compare for equal compare [call it equal_by_less()?]
inline bool pred_equal(const key_interface * left, const key_interface* right) noexcept
{
return (left->same_type(right) && (left->compare(right) == false) && (right->compare(left) == false));
}
template<typename T>
struct type_escape
{
using type = T;
};
template<>
struct type_escape<char*>
{
using type = ::std::string;
};
template<>
struct type_escape<const char*>
{
using type = ::std::string;
};
template<int Size>
struct type_escape<char[Size]>
{
using type = ::std::string;
};
template<int Size>
struct type_escape<const char[Size]>
{
using type = ::std::string;
};
template<>
struct type_escape<wchar_t*>
{
using type = ::std::wstring;
};
template<>
struct type_escape<const wchar_t*>
{
using type = ::std::wstring;
};
template<int Size>
struct type_escape<wchar_t[Size]>
{
using type = ::std::wstring;
};
template<int Size>
struct type_escape<const wchar_t[Size]>
{
using type = ::std::wstring;
};
}
template<typename T, typename Compare>
class key
: public detail::key_interface
{
public:
typedef detail::key_interface key_interface;
typedef T key_type;
key(const key_type& k)
: key_object_(k)
{}
key(key_type&& k)
: key_object_(std::move(k))
{
}
public:
//implement key_interface methods
bool same_type(const key_interface * p) const noexcept override
{
return (nullptr != dynamic_cast<const key*>(p));
}
bool compare(const key_interface* p) const noexcept override
{
auto rhs = dynamic_cast<const key*>(p);
return rhs && compare_(key_object_, rhs->key_object_);
}
private:
Compare compare_;
key_type key_object_;
};
}
#endif
| LiveAsynchronousVisualizedArchitecture/lava-Brandisher/include/nana/key_type.hpp |
Holiday House Aurora (Cortona, Italien) - Pensionat - anmeldelser - TripAdvisor
Nr. 38 af 42 B&B’er/kroer i Cortona Via Italo Scotoni 41/A, 52044, Cortona, Italien Hotelfaciliteter
og 5 websteder mere! 16 billeder mere Værelse/suite (4)Se album Badeværelse (4)Se album Hotel og udendørsarealer (2)Se album Se alle billeder Professionelle billederBilleder fra rejsende (16)Vis kort
Slet Holiday House Aurora fra Gemte sider Du har tilføjet Holiday House Aurora til Gemte sider Tilføj billede
Begynd din anmeldelse af Holiday House Aurora Klik her for at vurdere
De rejsende snakker begejstret om disse hoteller i Cortona Villa Marsili Hotel
Vis priser Locanda i Grifi
Vis priser Relais La Corte dei Papi
Vis priser Relais Il Falconiere & Spa
Vis priser Cortona Resort & Spa
Opdaterer listen... Udforsk lignende hoteller Il Giardino di Romi 11 anmeldelserVis priser 14.0 km Casa Bellavista B&B 213 anmeldelserVis priser 9.0 km Villa di Piazzano 603 anmeldelserVis priser 5.1 km Vis alle hoteller i Cortona Gennemse steder i nærheden
Nr. 1 af 42 i Cortona 213 anmeldelser
Nr. 1 af 24 i Cortona 651 anmeldelser
Nr. 15 af 24 i Cortona 20 anmeldelser
Nr. 3 af 24 i Cortona 586 anmeldelser
I nærheden af Holiday House Aurora Bedst bedømte seværdigheder i nærheden 35 anmeldelser Cortona Wine Tours
56 anmeldelser Santa Maria del Calcinaio
Gennemse alle seværdigheder Bedst bedømte restauranter i nærheden 36 anmeldelser Pasticceria Vannelli Pagina Ufficiale
27 anmeldelser Bar L'Etrusco Pasticceria
642 anmeldelser Preludio
Supplerende oplysninger om Holiday House Aurora
Adresse: Via Italo Scotoni 41/A, 52044, Cortona, Italien Beliggenhed:
TripAdvisor er stolte af at være samarbejdspartner med Booking.com, Priceline, Expedia, Travelocity, Hotels.com, Orbitz, Odigeo og Hotwire, så du med ro i sindet kan reservere på Holiday House Aurora. Vi hjælper millioner af rejsende hver måned med at finde det perfekte hotel til både ferier og forretningsrejser og altid med de bedste rabatter og særtilbud.
Her er de spørgsmål, som de rejsende har stillet, med svar fra personalet på Holiday House Aurora og andre rejsende.
1 spørgsmål Stil et spørgsmål Har du spørgsmål? Få svar fra ansatte på Holiday House Aurora og tidligere gæster. | c4-da |
/*
* AscEmu Framework based on ArcEmu MMORPG Server
* Copyright (c) 2014-2021 AscEmu Team <http://www.ascemu.org>
* Copyright (C) 2008-2012 ArcEmu Team <http://www.ArcEmu.org/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _FASTQUEUE_H
#define _FASTQUEUE_H
/// dummy lock to use a non-locked queue.
class DummyLock
{
public:
inline void Acquire() { }
inline void Release() { }
};
/// linked-list style queue
template<class T, class LOCK>
class FastQueue
{
struct node
{
T element;
node* next;
};
node* last;
node* first;
LOCK m_lock;
public:
FastQueue()
{
last = nullptr;
first = nullptr;
}
~FastQueue()
{
Clear();
}
void Clear()
{
// clear any elements
while(last != nullptr)
Pop();
}
void Push(T elem)
{
m_lock.Acquire();
node* n = new node;
if (last)
last->next = n;
else
first = n;
last = n;
n->next = nullptr;
n->element = elem;
m_lock.Release();
}
T Pop()
{
m_lock.Acquire();
if (first == nullptr)
{
m_lock.Release();
return nullptr;
}
T ret = first->element;
node* td = first;
first = td->next;
if (!first)
last = nullptr;
delete td;
m_lock.Release();
return ret;
}
T front()
{
m_lock.Acquire();
if (first == nullptr)
{
m_lock.Release();
return nullptr;
}
T ret = first->element;
m_lock.Release();
return ret;
}
void pop_front()
{
m_lock.Acquire();
if (first == nullptr)
{
m_lock.Release();
return;
}
node* td = first;
first = td->next;
if (!first)
last = nullptr;
delete td;
m_lock.Release();
}
bool HasItems()
{
bool ret;
m_lock.Acquire();
ret = (first != nullptr);
m_lock.Release();
return ret;
}
};
#endif //_FASTQUEUE_H
| Appled/AscEmu-src/shared/FastQueue.h |
# Showing that $S_{n}^{2}$ converges to $\sigma ^{2}$ in probability
Let $x_{1},...,x_{n} \sim F$ where the expected value of $F$ is $\mu$ and the variance is $\sigma^{2}$.
$S_{n}^{2}=\frac{1}{n-1}\sum_{i=1}^{n}\left(x_{i}-\overline{x}\right)^{2}$
converges in probability to the variance. What I have tried so far is to use Chebyshev's in equality - since I know that $S_{n}$ is unbiased, given an $\epsilon >0$ we get:
$P\left(\left|S_{n}^{2}-\sigma^{2}\right|\geq\epsilon\right)\leq\frac{Var\left(S_{n}^{2}\right)}{\epsilon^{2}}$
I thought somehow with manipulation I can bound it with something that can converge to zero. However finding the variance of $S_{n}^{2}$ got really complicated, and I think that there should be an easier way. Should I proceed with finding the variance of $S_{n}^{2}$ ? Can somebody give me a clue? I would really appreciate it. Thanks!
$$S_{n}^{2}=\frac{1}{n-1}\sum_{i=1}^{n}\left(x_{i}-\overline{x}\right)^{2}=\dfrac{n}{n-1}\left({\overline{x^2}-\left(\overline x\right)^2}\right),$$ where $\overline{x^2} = \dfrac{\sum_{i=1}^n x_i^2}{n}$. Law of Large Numbers implies that $$\overline{x^2} = \dfrac{\sum_{i=1}^n x_i^2}{n} \xrightarrow{p} \mathbb Ex_1^2=\sigma^2+\mu^2 \text{ as } n\to\infty$$ and $$\overline{x} = \dfrac{\sum_{i=1}^n x_i}{n} \xrightarrow{p} \mathbb Ex_1=\mu \text{ as } n\to\infty.$$ And $\tfrac{n}{n-1}\to 1$ as $n\to\infty$. By the properties of convergence in probability, $$S_{n}^{2}= \underbrace{\dfrac{n}{n-1}}_{\begin{matrix}\downarrow\\ 1\end{matrix}}\biggl({\underbrace{\overline{x^2}}_{\begin{matrix}\downarrow_p \\ \sigma^2+\mu^2\end{matrix}}-\underbrace{\left(\overline x\right)^2}_{\begin{matrix}\downarrow_p \\ \mu^2\end{matrix}}}\biggr) \xrightarrow{p} 1\cdot (\sigma^2+\mu^2 - \mu^2)=\sigma^2.$$
You cannot use Chebyshev inequality without any knowledge on higher moments of samples. The variance $Var(S_n^2)$ exists if 4th moment exists: $$\mathbb Ex_1^4<\infty.$$ And we are given only that first two moments exist, and this is sufficient for convergence in probability of $S_n^2$.
• @RationalHusky The answer is above: variance $Var(S^2_n)$ exists if (and only if) $4$th moment exists: – NCh Mar 17 '17 at 12:15
• @NCh by the way, something that gets me confused a lot. If I understood correctly what you did above, you treated the mean $\overline{x}$ as a constant and not as a random variable, why is that? They do this a lot in the statistics courses that I took\taking. Sometime we treat it as random variable and sometimes as constant (mean of the sample) – mathstackuser123 Mar 20 '17 at 9:17
• @mathstackuser123 1) I never treat $\overline x$ as a constant. 2) the above statement on convergence in probability is valid under the condition that the variance $Var(x_1)$ exists only. This convergence is a simple consequence of weak law of large numbers: en.wikipedia.org/wiki/Law_of_large_numbers#Weak_law. But you tried to prove this convergence using Chebyshev inequality. You cannot use this instrument when 4th moments are infinite. In this case right hand side of inequality is infinite too. – NCh Mar 20 '17 at 10:56 | finemath-3plus |
exports.ACCESS_KEY = '<PLEASE APPLY YOUR ACCESS KEY>';
exports.SECRET_KEY = '<DONT SEND YOUR SECRET KEY TO ANYONE>';
exports.USER_AGENT = 'qiniu nodejs-sdk v6.1.3';
exports.UP_HOST = 'http://up.qbox.me';
exports.RS_HOST = 'http://rs.qbox.me';
exports.RSF_HOST = 'http://rsf.qbox.me';
exports.RPC_TIMEOUT = 3600000; // default rpc timeout: one hour
| MichaelTsao/yanpei-web/js/node_modules/leancloud-storage/node_modules/qiniu/qiniu/conf.js |
var TextHelper = {
zeroPad: function(value, length) {
value = value.toString();
if (value.length >= length) {
return value;
} else {
return this.zeroPad('0' + value, length);
}
},
dateText: function(time) {
var d = new Date();
if (typeof time != 'undefined') {
d = new Date(Date.parse(time));
}
return this.zeroPad(d.getHours(), 2) + ':' + this.zeroPad(d.getMinutes(), 2);
},
truncateName: function(text) {
return text.truncate(15);
},
truncateRoomName: function(text) {
return text.truncate(15);
},
decorateMessage: function(text) {
return EmoteHelper.insertEmotes(this.autoLink(this.textilize(text)));
},
textilize: function(text) {
function escape_regex(text) { return text.replace(/([\*\?\+\^\?])/g, "\\$1"); }
function openTag(text) { return '<' + text + '>'; }
function closeTag(text) { return '</' + text + '>'; }
var map = { '_': 'em', '*': 'strong' };
$H(map).each(function(mapping) {
var result = '';
var m = escape_regex(mapping[0]);
var mr = new RegExp('(' + m + ')');
var matcher = new RegExp('(^|\\s+)(' + m + ')([^\\s][^' + mapping[0] + ']*[^\\s])(' + m + ')', 'g');
if (text.match(matcher)) {
var open = false;
text.split(matcher).each(function(segment) {
if (segment == mapping[0]) {
var tag = open ? closeTag(mapping[1]) : openTag(mapping[1]);
result += segment.replace(mr, tag);
open = !open;
} else {
result += segment;
}
});
if (open) result += closeTag(mapping[1]);
text = result;
}
});
return text;
},
autoLink: function(text) {
var result = '';
try {
if (!LinkHelper.url(text)) {
return text;
}
$A(text.split(/(https?:\/\/[^\s]*)/gi)).each(function(link) {
if (link.match(/href="/)) {
result += link;
} else {
if (LinkHelper.youtube_url(link) && !JsChat.user.hideImages) {
result += link.replace(link, LinkHelper.youtube(link));
} else if (LinkHelper.vimeo_url(link) && !JsChat.user.hideImages) {
result += link.replace(link, LinkHelper.vimeo(link));
} else if (LinkHelper.image_url(link) && !JsChat.user.hideImages) {
result += link.replace(link, LinkHelper.image(link));
} else if (LinkHelper.twitpic_url(link) && !JsChat.user.hideImages) {
result += link.replace(link, LinkHelper.twitpic(link));
} else if (LinkHelper.url(link)) {
result += link.replace(link, LinkHelper.link(link));
} else {
result += link;
}
}
});
} catch (exception) {
}
return result;
}
};
| rwaldron/jschat-lib/jschat/http/public/javascripts/app/helpers/text_helper.js |
# GraphCL: Contrastive Self-Supervised Learning of Graph Representations
Hakim Hafidi
Mounir Ghogho
TICLab, College of Engineering and Architecture, Universite Internationale de Rabat, Morocco
Philippe Ciblat
LTCI, Communications and Electronics Department, Telecom ParisTech, Institut Polytechnique de Paris, France
[email protected]
Ananthram Swami
United States Army Research Laboratory, Adelphi, Maryland, USA
[email protected]
###### Abstract
We propose Graph Contrastive Learning (GraphCL), a general framework for learning node representations in a self supervised manner. GraphCL learns node embeddings by maximizing the similarity between the representations of two randomly perturbed versions of the intrinsic features and link structure of the same node's local subgraph. We use graph neural networks to produce two representations of the same node and leverage a contrastive learning loss to maximize agreement between them. In both transductive and inductive learning setups, we demonstrate that our approach significantly outperforms the state-of-the-art in unsupervised learning on a number of node classification benchmarks.
## 1 Introduction
In many fields, the rapidly increasing volume and complexity of data hinders actionable insights. Graphs offer an unifying framework for aligning structured and unstructured data. However, graphs have long been poorly exploited because of their complexity, and limited approaches in dealing with content associated with nodes and links. Recently, graph representation learning has attracted the attention of the scientific community as a way of analysing graphs and helping to leverage the richness of information that resides in unstructured data. Graphs are characterized by a set of nodes, which represent the entities, and a set of links connecting them. Nodes may be of different types, and may further be associated with several features. And links may represent different relationships and may also be associated with different attributes or semantic content. One of the major challenges facing graph representation learning is learning node embeddings which capture both node features and the graph structure. These representations can then be fed into downstream machine learning models.
Most successful approaches for graph representation have been great efforts to generalize neural networks to graph data and fall under the umbrella of Graph Neural Networks (GNNs) or Deep Geometric Learning (Atwood and Towsley, 2016; Kipf and Welling, 2016; Bronstein et al., 2017; Xu et al., 2018). These approaches have achieved remarkable results in a number of important tasks such as node classification (Hamilton et al., 2017; Chami et al., 2019; Luan et al., 2019) and link prediction (Kipf and Welling, 2016; Zhang and Chen, 2018). However, these methods are very reliant on human intervention and suffer from the necessity of some form of supervision. This requires a high cost, expert knowledge in the domain and the use of annotated data, which is not often available. Thus, the need to develop methods capable of learning representations in an unsupervised manner is essential.
In order to compensate for the absence of labels or predefined tasks, some unsupervised methods have adopted the homophily hypothesis, which states that linked nodes should be adjacent in the embedding space (Hoff et al., 2002). Inspired by the Skipgram algorithm for embedding words into a latent space, where adjacent vectors correspond to co-occurring words in a sentence (Mikolov et al., 2013), a majority of these methods use random walks to generate sentence-like sequences where co-occurring nodes are close in the embedding space (Perozzi et al., 2014; Grover and Leskovec, 2016). Other methods such as autoencoders, also employ the homophily hypothesis by reconstructing either the adjacency matrix or the neighborhood of a node (Wang et al., 2016; Kipf and Welling, 2016). Despite their success in learning relatively powerful representations, relying on the homophily hypothesis biases these methods towards emphasizing the direct proximity of nodes over topological information (Wang et al., 2016). More recently, (Velickovic et al., 2018) proposed Deep Graph Infomax (DGI) that learns representations by training a discriminator to distinguish between representations of nodes that belong to the graph from nodes coming from a corrupted graph. Leveraging recent advances in unsupervised visual representations (Hjelm et al., 2018), the success of DGI has been attributed to the maximization of mutual information between global and local parts of the input. This requires learning global representations of the entire graph which can be very costly and even intractable when dealing with large graphs.
In this work, we introduce GraphCL, a general contrastive learning framework that learns node embeddings by maximizing agreement/similarity between the representations of two randomly perturbed versions of the same node's local subgraph. In addition to learning node representations that are robust to random perturbations of the graph, GraphCL allows for an efficient self-supervised learning of node representations.
GraphCL is inspired by the success of a recent approach which leverages contrastive learning losses to learn visual representations that capture shared information across multiple views of the same image. These methods are based on the assumption that _important_ information is shared between different views of the world. The authors of Chen et al. (2020) use data augmentation techniques to generate multiple views of the same image, while Tian et al. (2019) consider different channels of an image as different views.
In GraphCL, for each node, random perturbations are applied to its \(L\)-hop subgraph. The perturbation consists of randomly dropping a subset of edges and nodes' intrinsic features of its \(L\)-hop subgraph. The dropout probabilities are hyperparameters in the learning process.
We show that GraphCL achieves a new state-of-the-art in unsupervised node representation by demonstrating how it consistently outperforms previous state-of-the-art methods on both transductive and inductive setups.
## 2 Related work
Most unsupervised graph representation learning methods can be described as contrastive approaches. Their main objective is to train an encoder to be contrastive between pairs of samples that follow observations in the data and thus capture statistical dependencies of interest (a.k.a positive examples) and those that are not (a.k.a negative examples). Contrastive approaches have had great success for learning words representations (Mikolov et al., 2013; Collobert and Weston, 2008). They have also been used for learning visual representations dating back to (Hadsell et al., 2006), and have started to show promising results in recent works (Misra and van der Maaten, 2019; Zhuang et al., 2019), achieving competitive results when compared to strong supervised baselines (Chen et al., 2020). Researchers have extended many of these methods to learn representations of graph structured data. DeepWalk (Perozzi et al., 2014) and Node2vec (Grover and Leskovec, 2016) are inspired by language models such as Word2vec (Mikolov et al., 2013). DGI (Velickovic et al., 2018) adapted ideas from Deep InfoMax (Hjelm et al., 2018) method that learns representations of high-dimensional data. GraphCL is also contrastive in this sense, as we learn a classifier to distinguish between positive examples (i.e., pairs of augmented views of the same node) and representations of the other nodes.
Contrastive methods differ in the choice of different components such as a sampling strategy to select positive and negative examples and an encoder to embed a data sample into a destination space. The above mentioned methods on graph representation learning often take into account the structure of the graph; positive and negative examples correspond to adjacent and distant nodes respectively.
DeepWalk and Node2vec, for example, use different policies to generate fixed length random walks to find positive examples whereas random nodes correspond to negative examples. Both methods use a lookup table as an encoder. Graph Autoencoder encourages the use of first order neighbors as positive examples and use Graph Convolutional Networks as encoders (Kipf and Welling, 2016), while (Bojchevski and Gunnemann, 2017) use higher order neighbors as positive examples and use a Multi-Layer Perceptron to encode node features. DGI employs a different strategy: node representations obtained from the graph correspond to positive examples, while negative examples correspond to embeddings of a corrupted graph. DGI also uses different architectures of Graph Convolutional Networks as encoders (Kipf and Welling, 2016; Hamilton et al., 2017).
Graph convolution Networks enforce an inductive bias that adjacent nodes have similar representations. Instead of explicitly injecting the graph structure information to sample positive and negative examples, we leverage the latest insights about GCN encoders and employ a strategy that is completely different from the methods discussed above. We get two different representations of each node by randomly sampling two subgraphs around the node. These two representations will correspond to a pair of positive examples.
## 3 Methodology
In this section, we define some needed notation, formulate the learning problem of interest, and then provide details of the proposed solution. | 2007.08025v1.mmd |
# What is the Excel formula for subtracting dates?
## What is the Excel formula for subtracting dates?
Type =C2-B2, and then press RETURN . Excel displays the result as the number of days between the two dates (104). Select cell D2. Excel adjusts the cell references automatically to include the correct values for each row.
### How do I subtract a date from a number in Excel?
Add days to or subtract days from a date
1. Open a new sheet in a workbook.
2. In cell A1, type 2/8/12.
3. In cell B1, type =A1-15, and then press RETURN . This formula subtracts 15 days from the date in cell A1.
4. In cell C1, type =A1+30, and then press RETURN .
5. In cell D1, type =C1-15, and then press RETURN .
#### How do I subtract days from two dates in Excel?
To find the number of days between these two dates, you can enter “=B2-B1” (without the quotes into cell B3). Once you hit enter, Excel will automatically calculate the number of days between the two dates entered.
How do you subtract two dates?
How to subtract two dates in Excel to find the difference in years
1. Place your start and end dates into distinct cells.
2. Prepare the DATEDIF function by typing “=DATEDIF” into another cell.
3. Open the formula with an open parenthesis.
4. Insert the start date and add a comma.
5. Insert the end date and add a comma.
How do you subtract dates in sheets?
How to subtract dates in Google Sheets easily
1. =MINUS([end_date],[start_date])
2. =DAYS([end_date],[start_date])
3. =NETWORKDAYS([start_date],[end_date])
## How do I subtract 1 year from a date in Excel?
In your Excel worksheet, the formulas may look as follows:
1. To add years to a date in Excel: =DATE(YEAR(A2) + 5, MONTH(A2), DAY(A2)) The formula adds 5 years to the date in cell A2.
2. To subtract years from a date in Excel: =DATE(YEAR(A2) – 5, MONTH(A2), DAY(A2)) The formula subtracts 5 years from the date in cell A2.
### Why can’t I subtract dates in Excel?
Solution: Check your system’s date and time settings to make sure that they match the format of the dates referred to in the formula. If necessary, update the formula to the correct format.
#### How do I subtract days from a date in sheets?
How do I subtract 10 days from a date in Excel?
Therefore, you can add or subtract days as easy as adding or minus the number of days in Excel. 1. Select a blank cell you will place the calculating result, type the formula =A2+10, and press the Enter key. Note: For subtracting 10 days from the date, please use this formula =A2–10.
How do you subtract dates in dd mm yyyy in Excel?
Simply use the formula =B1-A1, where B1 is the later date/time. The key is to format the result using the Custom format [h]:mm . Select the cell with the subtraction formula, right-click and click on Format Cells, then the Number tab, select Custom, and fill in the Type field. Was this reply helpful?
## How do I return a value between two dates in Excel?
If date is between two dates
1. Generic formula. =IF(AND(A1>=start,A1<=end),”x”,””)
2. To test if a date is between two dates, you can use the IF function with the AND function.
3. In this example, the goal is to check if a given date is between two other dates, labeled “Start” and “End” in the example shown.
### How do you subtract a date from today’s date?
We have a simple subtraction using the TODAY function of Excel. The formula in C4, =TODAY()-B4, tells Excel to subtract the date in cell B4 from today’s date, which is April 6, 2020.
#### How do I calculate 7 days from a date in Excel?
• September 4, 2022 | finemath-3plus |
export import ACM = require('./acm');
export import APIGateway = require('./apigateway');
export import ApplicationAutoScaling = require('./applicationautoscaling');
export import AppStream = require('./appstream');
export import AutoScaling = require('./autoscaling');
export import Batch = require('./batch');
export import Budgets = require('./budgets');
export import CloudDirectory = require('./clouddirectory');
export import CloudFormation = require('./cloudformation');
export import CloudFront = require('./cloudfront');
export import CloudHSM = require('./cloudhsm');
export import CloudSearch = require('./cloudsearch');
export import CloudSearchDomain = require('./cloudsearchdomain');
export import CloudTrail = require('./cloudtrail');
export import CloudWatch = require('./cloudwatch');
export import CloudWatchEvents = require('./cloudwatchevents');
export import CloudWatchLogs = require('./cloudwatchlogs');
export import CodeBuild = require('./codebuild');
export import CodeCommit = require('./codecommit');
export import CodeDeploy = require('./codedeploy');
export import CodePipeline = require('./codepipeline');
export import CognitoIdentity = require('./cognitoidentity');
export import CognitoIdentityServiceProvider = require('./cognitoidentityserviceprovider');
export import CognitoSync = require('./cognitosync');
export import ConfigService = require('./configservice');
export import CUR = require('./cur');
export import DataPipeline = require('./datapipeline');
export import DeviceFarm = require('./devicefarm');
export import DirectConnect = require('./directconnect');
export import DirectoryService = require('./directoryservice');
export import Discovery = require('./discovery');
export import DMS = require('./dms');
export import DynamoDB = require('./dynamodb');
export import DynamoDBStreams = require('./dynamodbstreams');
export import EC2 = require('./ec2');
export import ECR = require('./ecr');
export import ECS = require('./ecs');
export import EFS = require('./efs');
export import ElastiCache = require('./elasticache');
export import ElasticBeanstalk = require('./elasticbeanstalk');
export import ELB = require('./elb');
export import ELBv2 = require('./elbv2');
export import EMR = require('./emr');
export import ES = require('./es');
export import ElasticTranscoder = require('./elastictranscoder');
export import Firehose = require('./firehose');
export import GameLift = require('./gamelift');
export import Glacier = require('./glacier');
export import Health = require('./health');
export import IAM = require('./iam');
export import ImportExport = require('./importexport');
export import Inspector = require('./inspector');
export import Iot = require('./iot');
export import IotData = require('./iotdata');
export import Kinesis = require('./kinesis');
export import KinesisAnalytics = require('./kinesisanalytics');
export import KMS = require('./kms');
export import Lambda = require('./lambda');
export import LexRuntime = require('./lexruntime');
export import Lightsail = require('./lightsail');
export import MachineLearning = require('./machinelearning');
export import MarketplaceCommerceAnalytics = require('./marketplacecommerceanalytics');
export import MarketplaceMetering = require('./marketplacemetering');
export import MTurk = require('./mturk');
export import MobileAnalytics = require('./mobileanalytics');
export import OpsWorks = require('./opsworks');
export import OpsWorksCM = require('./opsworkscm');
export import Organizations = require('./organizations');
export import Pinpoint = require('./pinpoint');
export import Polly = require('./polly');
export import RDS = require('./rds');
export import Redshift = require('./redshift');
export import Rekognition = require('./rekognition');
export import ResourceGroupsTaggingAPI = require('./resourcegroupstaggingapi');
export import Route53 = require('./route53');
export import Route53Domains = require('./route53domains');
export import S3 = require('./s3');
export import ServiceCatalog = require('./servicecatalog');
export import SES = require('./ses');
export import Shield = require('./shield');
export import SimpleDB = require('./simpledb');
export import SMS = require('./sms');
export import Snowball = require('./snowball');
export import SNS = require('./sns');
export import SQS = require('./sqs');
export import SSM = require('./ssm');
export import StorageGateway = require('./storagegateway');
export import StepFunctions = require('./stepfunctions');
export import STS = require('./sts');
export import Support = require('./support');
export import SWF = require('./swf');
export import XRay = require('./xray');
export import WAF = require('./waf');
export import WAFRegional = require('./wafregional');
export import WorkDocs = require('./workdocs');
export import WorkSpaces = require('./workspaces');
export import CodeStar = require('./codestar');
export import LexModelBuildingService = require('./lexmodelbuildingservice');
| Mangahigh/quizbot-alexa-src/node_modules/aws-sdk/clients/all.d.ts |
// Generated by desperion protocol_builder
#ifndef core_paddock_item_hpp
#define core_paddock_item_hpp
namespace protocol
{
struct paddock_item : object_item_in_role_play
{
item_durability_ptr durability;
int16_t id() const override
{ return 185; }
paddock_item(const int16_t & cell_id, const int16_t & object_g_i_d, const item_durability_ptr & durability) : object_item_in_role_play { cell_id,object_g_i_d }
{
_data << durability->buffer();
}
paddock_item(byte_buffer & data) : object_item_in_role_play { data }
{
durability = std::make_unique<item_durability>(data);
}
};
using paddock_item_ptr = std::unique_ptr<paddock_item>;
}
#endif
| scalexm/desperion-src/core/protocol/types/game/paddock/paddock_item.hpp |
በዉኃ የሚያድገዉን ተክል ለዉኃ ማጣሪያ | ጤና እና አካባቢ | DW | 03.01.2017
በዉኃ የሚያድገዉን ተክል ለዉኃ ማጣሪያ
በመላዉ ዓለም 750 ሚሊየን የሚሆን ህዝብ ንፁሕ ዉኃ የማግኘት ዕድል እንደሌለዉ በጎርጎሪዮሳዊዉ 2014 ዓ,ም በተባበሩት መንግሥታት የዓለም የጤና ድርጅት አማካኝነት የተሠራ አንድ ጥናት ያመለክታል። በተቅማጥ፣ በቂ ዉኃ ባለመጠጣት እንዲሁም የእጅን ንፅሕና በአግባቡ ባለመጠበቅ ምክንያት ደግሞ በዓመት የ842 ሺህ ሰዎች ሕይወት ይቀጠፋል።
ዉኃ ማጣሪያ ተክል
Permalink https://p.dw.com/p/2VD5H
ዉኃን የሚያጣራዉ የጉልፍ ተክል
ንፁሕ መስሎ በሚታይ ዉኃ ዉስጥ ጀርሞችን ጨምሮ ለጤና እንከን የሆነ የተለያየ ነገር ሊገኝበት ስለሚችል ለመጠጥ ከመዋሉ በፊት ማጣራት የሚቻልበት መንገድ ቢኖር ይመከራል። መረጃዎች እንደሚያመለክቱትም ከሎሚ እና የሙዝ ልጣጭ አንስቶ የተለያዩ ተክሎች እንደየአቅማቸዉ ዉኃን ለማጣራት ይረዳሉ። ከሳምንታት በፊት ከኢትዮጵያ ከወደ ደቡብ ኦሞ ዞን የደረሰን አንድ የዝግጅታ | c4-am |
/*
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.c1x.ir;
import static com.sun.c1x.util.Util.*;
import com.oracle.max.criutils.*;
import com.sun.cri.bytecode.*;
import com.sun.cri.ci.*;
import com.sun.cri.ri.*;
/**
* The {@code UnsafeCast} instruction represents a {@link Bytecodes#UNSAFE_CAST}.
*/
public final class UnsafeCast extends Instruction {
public final RiType toType;
/**
* The instruction that produced the value being unsafe cast.
*/
private Value value;
/**
* Denotes if this is a redundant cast at the machine level. That is the source
* and the destination kind are implemented by the same machine kind.
*/
public final boolean redundant;
/**
* Creates a new UnsafeCast instruction.
*
* @param toType the the being cast to
* @param value the value being cast
*/
public UnsafeCast(RiType toType, Value value, boolean redundant) {
super(toType.kind(false).stackKind());
this.toType = toType;
this.value = value;
this.redundant = redundant;
}
/**
* Gets the first non-redundant value derived from this value. If this
* value is not {@linkplain #redundant}, then it is returned. Otherwise,
* the first value found by following {@link #value()} that is not an
* unsafe cast or is not redundant is returned.
*/
public Value nonRedundantReplacement() {
if (!redundant) {
return this;
}
if (!(value instanceof UnsafeCast)) {
return value;
}
return ((UnsafeCast) value).nonRedundantReplacement();
}
/**
* Gets the instruction that produced the value being unsafe cast.
*/
public Value value() {
return value;
}
@Override
public RiResolvedType declaredType() {
return (toType instanceof RiResolvedType) ? (RiResolvedType) toType : null;
}
@Override
public RiResolvedType exactType() {
return (declaredType() != null) ? declaredType().exactType() : null;
}
@Override
public void accept(ValueVisitor v) {
v.visitUnsafeCast(this);
}
/**
* Iterates over the input values to this instruction.
* @param closure the closure to apply
*/
@Override
public void inputValuesDo(ValueClosure closure) {
value = closure.apply(value);
}
@Override
public void print(LogStream out) {
out.print("unsafe_cast(").
print(valueString(value)).
print(") ").
print(CiUtil.toJavaName(toType));
}
}
| arodchen/MaxSim-maxine/com.oracle.max.c1x/src/com/sun/c1x/ir/UnsafeCast.java |
/**
* 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 org.cdlflex.ui.resource;
/**
* Resource reference for the main bootstrap theme css.
*/
public class BootstrapThemeResourceReference extends ManagedCssResourceReference {
private static final long serialVersionUID = 1L;
public static final String DEFAULT_VERSION = "3.3.6";
private static final BootstrapThemeResourceReference INSTANCE = new BootstrapThemeResourceReference();
public BootstrapThemeResourceReference() {
this(DEFAULT_VERSION);
}
public BootstrapThemeResourceReference(String version) {
super("bootstrap", "css/bootstrap-theme.min.css", version);
}
public BootstrapThemeResourceReference(Class<?> scope, String name) {
super(scope, name);
}
/**
* Returns a singleton instance of this resource reference using the default version.
*
* @return a resource reference instance
*/
public static BootstrapThemeResourceReference get() {
return INSTANCE;
}
}
| flex-oss/flex-ui-flex-ui-core/src/main/java/org/cdlflex/ui/resource/BootstrapThemeResourceReference.java |
from setuptools import setup
setup(
name='bdranalytics',
version='0.3',
license='Apache License 2.0',
author='bigdatarepublic',
author_email='[email protected]',
url='http://www.bigdatarepublic.nl',
long_description="README.md",
packages=['bdranalytics',
'bdranalytics.images',
'bdranalytics.keras',
'bdranalytics.pdlearn',
'bdranalytics.plot',
'bdranalytics.sklearn'],
include_package_data=True,
package_data={'bdranalytics': ['data/*.dat'],
'bdranalytics.images': ['bdr.gif']},
description="Making data science workflows easier.",
python_requires='>3.5',
install_requires=[
"NumPy>=1.6.1",
"SciPy>=0.9",
"scikit-learn>=0.18",
"keras",
"pandas",
"matplotlib",
],
setup_requires=["pytest-runner"],
tests_require=["pytest"]
)
| BigDataRepublic/bdr-analytics-py-setup.py |
// Created file "Lib\src\sensorsapi\sensorsapi"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(GUID_PROCESSOR_PERF_BOOST_POLICY, 0x45bcc044, 0xd885, 0x43e2, 0x86, 0x05, 0xee, 0x0e, 0xc6, 0xe9, 0x6b, 0x59);
| Frankie-PellesC/fSDK-Lib/src/sensorsapi/sensorsapi0000004C.c |
var searchData=
[
['mqtt_20client_20library_20for_20c',['MQTT Client library for C',['../index.html',1,'']]]
];
| t-moe/mqttblesensors-cli/paho-1.0.3-Linux/share/doc/MQTTClient/html/search/pages_1.js |
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by MGenTest.rc
//
#define IDS_APP_TITLE 103
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
| rualark/MGen-MGenTest/Resource.h |
package Clases;
import java.sql.Date;
public class Prestamo {
private int id;
private int id_cuenta;
private double importe;
private Date fecha;
private int cant_cuotas;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getId_cuenta() {
return id_cuenta;
}
public void setId_cuenta(int id_cuenta) {
this.id_cuenta = id_cuenta;
}
public double getImporte() {
return importe;
}
public void setImporte(double importe) {
this.importe = importe;
}
public Date getFecha() {
return fecha;
}
public void setFecha(Date fecha) {
this.fecha = fecha;
}
public int getCant_cuotas() {
return cant_cuotas;
}
public void setCant_cuotas(int cant_cuotas) {
this.cant_cuotas = cant_cuotas;
}
public Prestamo(int id, int id_cuenta, double importe, Date fecha,
int cant_cuotas) {
super();
this.id = id;
this.id_cuenta = id_cuenta;
this.importe = importe;
this.fecha = fecha;
this.cant_cuotas = cant_cuotas;
}
}
| AdrianPautasso/Java-TPFinal-2016-src/Clases/Prestamo.java |
/*
* dselect - Debian package maintenance user interface
* helpmsgs.h - external definitions for the list of help messages
*
* Copyright © 1995 Ian Jackson <[email protected]>
*
* This 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 2 of the License, or
* (at your option) any later version.
*
* This is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef HELPMSGS_H
#define HELPMSGS_H
struct helpmessage {
const char *title;
const char *text;
};
extern const struct helpmessage hlp_listkeys;
extern const struct helpmessage hlp_mainintro;
extern const struct helpmessage hlp_readonlyintro;
extern const struct helpmessage hlp_recurintro;
extern const struct helpmessage hlp_displayexplain1;
extern const struct helpmessage hlp_displayexplain2;
extern const struct helpmessage hlp_methintro;
extern const struct helpmessage hlp_methkeys;
#endif /* HELPMSGS_H */
| guillemj/dpkg-dselect/helpmsgs.h |
#define MICROPY_HW_BOARD_NAME "keithp.com snekboard"
#define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA02)
#define MICROPY_HW_NEOPIXEL (&pin_PB11)
#define SPI_FLASH_MOSI_PIN &pin_PB22
#define SPI_FLASH_MISO_PIN &pin_PB03
#define SPI_FLASH_SCK_PIN &pin_PB23
#define SPI_FLASH_CS_PIN &pin_PA27
// These are pins not to reset.
#define MICROPY_PORT_A (PORT_PB11)
#define MICROPY_PORT_B ( 0 )
#define MICROPY_PORT_C ( 0 )
#define BOARD_HAS_CRYSTAL 0
#define DEFAULT_I2C_BUS_SCL (&pin_PA08) /* ANALOG 5 */
#define DEFAULT_I2C_BUS_SDA (&pin_PA09) /* ANALOG 6 */
#define DEFAULT_UART_BUS_RX (&pin_PB08) /* ANALOG 1 */
#define DEFAULT_UART_BUS_TX (&pin_PB09) /* ANALOG 2 */
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
| adafruit/micropython-ports/atmel-samd/boards/snekboard/mpconfigboard.h |
// Generated by CoffeeScript 1.10.0
var Escaper, Pattern;
Pattern = require('./Pattern');
Escaper = (function() {
var ch;
function Escaper() {}
Escaper.LIST_ESCAPEES = ['\\', '\\\\', '\\"', '"', "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", (ch = String.fromCharCode)(0x0085), ch(0x00A0), ch(0x2028), ch(0x2029)];
Escaper.LIST_ESCAPED = ['\\\\', '\\"', '\\"', '\\"', "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", "\\N", "\\_", "\\L", "\\P"];
Escaper.MAPPING_ESCAPEES_TO_ESCAPED = (function() {
var i, j, mapping, ref;
mapping = {};
for (i = j = 0, ref = Escaper.LIST_ESCAPEES.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
mapping[Escaper.LIST_ESCAPEES[i]] = Escaper.LIST_ESCAPED[i];
}
return mapping;
})();
Escaper.PATTERN_CHARACTERS_TO_ESCAPE = new Pattern('[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9');
Escaper.PATTERN_MAPPING_ESCAPEES = new Pattern(Escaper.LIST_ESCAPEES.join('|').split('\\').join('\\\\'));
Escaper.PATTERN_SINGLE_QUOTING = new Pattern('[\\s\'":{}[\\],&*#?]|^[-?|<>=!%@`]');
Escaper.requiresDoubleQuoting = function(value) {
return this.PATTERN_CHARACTERS_TO_ESCAPE.test(value);
};
Escaper.escapeWithDoubleQuotes = function(value) {
var result;
result = this.PATTERN_MAPPING_ESCAPEES.replace(value, (function(_this) {
return function(str) {
return _this.MAPPING_ESCAPEES_TO_ESCAPED[str];
};
})(this));
return '"' + result + '"';
};
Escaper.requiresSingleQuoting = function(value) {
return this.PATTERN_SINGLE_QUOTING.test(value);
};
Escaper.escapeWithSingleQuotes = function(value) {
return "'" + value.replace(/'/g, "''") + "'";
};
return Escaper;
})();
module.exports = Escaper;
| UnnikrishnanBhargavakurup/behavedrupal-themes/semanticui/libs/node_modules/yamljs/lib/Escaper.js |
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.lastindexof
es5id: 15.4.4.15-8-b-i-15
description: >
Array.prototype.lastIndexOf - element to be retrieved is inherited
accessor property on an Array
---*/
Object.defineProperty(Array.prototype, "0", {
get: function() {
return 10;
},
configurable: true
});
Object.defineProperty(Array.prototype, "1", {
get: function() {
return 20;
},
configurable: true
});
Object.defineProperty(Array.prototype, "2", {
get: function() {
return 30;
},
configurable: true
});
assert.sameValue([, , , ].lastIndexOf(10), 0, '[, , , ].lastIndexOf(10)');
assert.sameValue([, , , ].lastIndexOf(20), 1, '[, , , ].lastIndexOf(20)');
assert.sameValue([, , , ].lastIndexOf(30), 2, '[, , , ].lastIndexOf(30)');
| sebastienros/jint-Jint.Tests.Test262/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-15.js |
// Locale support -*- C++ -*-
// Copyright (C) 2000-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/ctype_inline.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{locale}
*/
//
// ISO C++ 14882: 22.1 Locales
//
// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
// functions go in ctype.cc
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
bool
ctype<char>::
is(mask __m, char __c) const
{ return _M_table[(unsigned char)(__c)] & __m; }
const char*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
while (__low < __high)
*__vec++ = _M_table[*__low++];
return __high;
}
const char*
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
while (__low < __high && !this->is(__m, *__low))
++__low;
return __low;
}
const char*
ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const
{
while (__low < __high && this->is(__m, *__low) != 0)
++__low;
return __low;
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
| iains/darwin-gcc-4-8-libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h |
//
// DropletViewController.h
// Digital Ocean Manager
//
// Created by Philip Heinser on 05.04.13.
// Copyright (c) 2013 Philip Heinser. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
@interface DODropletViewController : UIViewController <UIActionSheetDelegate>
@property DODroplet *droplet;
@property (weak, nonatomic) IBOutlet UILabel *ipLabel;
@property (weak, nonatomic) IBOutlet UILabel *imageLabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
@property (weak, nonatomic) IBOutlet UILabel *sizeLabel;
@property (weak, nonatomic) IBOutlet UIView *whiteOverlayTopView;
@property (weak, nonatomic) IBOutlet MKMapView *mapView;
@property (weak, nonatomic) IBOutlet UIToolbar *toolbar;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *refreshButton;
- (IBAction)toogleToolbar:(id)sender;
- (IBAction)showPowerOptions:(id)sender;
- (IBAction)refreshDroplet:(id)sender;
- (IBAction)takeSnapshot;
@end
| philipheinser/DigitalOcean-Manager-DigitalOceanManager/DODropletViewController.h |
var app = (function(document) {
'use strict';
var docElem = document.documentElement,
_userAgentInit = function() {
docElem.setAttribute('data-useragent', navigator.userAgent);
},
_foundationInit = function() {
// if we see .js-randomize class, we will randomize items for Orbit slider
$('.js-randomize-items').each(function() {
// get current list
var list = $(this);
// get array of list items in current list
var listArr = list.children();
// sort array of list items in current list randomly
listArr.sort(function() {
// Get a random number between 0 and 10
var temp = parseInt(Math.random() * 10);
// Get 1 or 0, whether temp is odd or even
var isOddOrEven = temp % 2;
// Get +1 or -1, whether temp greater or smaller than 5
var isPosOrNeg = temp > 5 ? 1 : -1;
// Return -1, 0, or +1
return(isOddOrEven*isPosOrNeg);
})
// append list items to list
.appendTo(list);
});
},
_init = function() {
// Init Zurb Foundation framework
_foundationInit();
// User Agent workaround
_userAgentInit();
};
return {
init: _init
};
})(document, $);
(function() {
'use strict';
app.init();
})();
| wpioneer/wptemplate-hyperstarter-static/js/app.js |
'use strict';
var ListViewDataSource = require('ListViewDataSource');
var SwipeableListViewDataSource = function () {
function SwipeableListViewDataSource(params) {
var _this = this;
babelHelpers.classCallCheck(this, SwipeableListViewDataSource);
this._dataSource = new ListViewDataSource({
getRowData: params.getRowData,
getSectionHeaderData: params.getSectionHeaderData,
rowHasChanged: function rowHasChanged(row1, row2) {
return row1.id !== _this._previousOpenRowID && row2.id === _this._openRowID || row1.id === _this._previousOpenRowID && row2.id !== _this._openRowID || params.rowHasChanged(row1, row2);
},
sectionHeaderHasChanged: params.sectionHeaderHasChanged
});
}
babelHelpers.createClass(SwipeableListViewDataSource, [{
key: 'cloneWithRowsAndSections',
value: function cloneWithRowsAndSections(dataBlob, sectionIdentities, rowIdentities) {
this._dataSource = this._dataSource.cloneWithRowsAndSections(dataBlob, sectionIdentities, rowIdentities);
this._dataBlob = dataBlob;
this.rowIdentities = this._dataSource.rowIdentities;
this.sectionIdentities = this._dataSource.sectionIdentities;
return this;
}
}, {
key: 'getDataSource',
value: function getDataSource() {
return this._dataSource;
}
}, {
key: 'getOpenRowID',
value: function getOpenRowID() {
return this._openRowID;
}
}, {
key: 'getFirstRowID',
value: function getFirstRowID() {
if (this.rowIdentities) {
return this.rowIdentities[0] && this.rowIdentities[0][0];
}
return Object.keys(this._dataBlob)[0];
}
}, {
key: 'setOpenRowID',
value: function setOpenRowID(rowID) {
this._previousOpenRowID = this._openRowID;
this._openRowID = rowID;
this._dataSource = this._dataSource.cloneWithRowsAndSections(this._dataBlob, this.sectionIdentities, this.rowIdentities);
return this;
}
}]);
return SwipeableListViewDataSource;
}();
module.exports = SwipeableListViewDataSource; | hoffmannmatheus/ppg-spot-ui-react-native-packager-cache-P4da/eKYVDiIK1c0vpgPRrk8C9c=/05/97a880f5f8d65109f733d3e0c49e6dbbc3f085SwipeableListViewDataSource.js |
/*
* Copyright (c) 2008-2018, Hazelcast, 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.hazelcast.util.collection;
import java.util.Arrays;
/**
* Convenient method for array manipulations.
*
*/
public final class ArrayUtils {
private ArrayUtils() {
}
/**
* Create copy of the src array.
*
* @param src
* @param <T>
* @return copy of the original array
*/
public static <T> T[] createCopy(T[] src) {
return Arrays.copyOf(src, src.length);
}
/**
* Copy src array into destination and skip null values.
* Warning: It does not do any validation. It expect the dst[] is
* created with right capacity.
*
* You can calculate required capacity as <code>src.length - getNoOfNullItems(src)</code>
*
* @param src source array
* @param dst destination. It has to have the right capacity
* @param <T>
*/
public static <T> void copyWithoutNulls(T[] src, T[] dst) {
int skipped = 0;
for (int i = 0; i < src.length; i++) {
T object = src[i];
if (object == null) {
skipped++;
} else {
dst[i - skipped] = object;
}
}
}
public static <T> boolean contains(T[] array, T item) {
for (T o : array) {
if (o == null) {
if (item == null) {
return true;
}
} else {
if (o.equals(item)) {
return true;
}
}
}
return false;
}
public static <T> T getItemAtPositionOrNull(T[] array, int position) {
if (array.length > position) {
return array[position];
}
return null;
}
/**
* Copies in order {@code sourceFirst} and {@code sourceSecond} into {@code dest}.
* @param sourceFirst
* @param sourceSecond
* @param dest
* @param <T>
*/
public static <T> void concat(T[] sourceFirst, T[] sourceSecond, T[] dest) {
System.arraycopy(sourceFirst, 0, dest, 0, sourceFirst.length);
System.arraycopy(sourceSecond, 0, dest, sourceFirst.length, sourceSecond.length);
}
/**
* Bounds check when copying to/from a buffer
*
* @param capacity capacity of the buffer
* @param index index of copying will start from/to
* @param length length of the buffer that will be read/writen
*/
public static void boundsCheck(int capacity, int index, int length) {
if (capacity < 0 || index < 0 || length < 0 || (index > (capacity - length))) {
throw new IndexOutOfBoundsException(String.format("index=%d, length=%d, capacity=%d", index, length, capacity));
}
}
}
| dsukhoroslov/hazelcast-hazelcast/src/main/java/com/hazelcast/util/collection/ArrayUtils.java |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
const u = undefined;
function plural(n: number): number {
if (n === Math.floor(n) && n >= 0 && n <= 1 || n === Math.floor(n) && n >= 11 && n <= 99)
return 1;
return 5;
}
export default [
'tzm',
[['Zdat azal', 'Ḍeffir aza'], u, u],
u,
[
['A', 'A', 'A', 'A', 'A', 'A', 'A'], ['Asa', 'Ayn', 'Asn', 'Akr', 'Akw', 'Asm', 'Asḍ'],
['Asamas', 'Aynas', 'Asinas', 'Akras', 'Akwas', 'Asimwas', 'Asiḍyas'],
['Asa', 'Ayn', 'Asn', 'Akr', 'Akw', 'Asm', 'Asḍ']
],
u,
[
['Y', 'Y', 'M', 'I', 'M', 'Y', 'Y', 'Ɣ', 'C', 'K', 'N', 'D'],
['Yen', 'Yeb', 'Mar', 'Ibr', 'May', 'Yun', 'Yul', 'Ɣuc', 'Cut', 'Kṭu', 'Nwa', 'Duj'],
[
'Yennayer', 'Yebrayer', 'Mars', 'Ibrir', 'Mayyu', 'Yunyu', 'Yulyuz', 'Ɣuct', 'Cutanbir',
'Kṭuber', 'Nwanbir', 'Dujanbir'
]
],
u,
[['ZƐ', 'ḌƐ'], u, ['Zdat Ɛisa (TAƔ)', 'Ḍeffir Ɛisa (TAƔ)']],
1,
[6, 0],
['dd/MM/y', 'd MMM y', 'd MMMM y', 'EEEE, d MMMM y'],
['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'],
['{1} {0}', u, u, u],
[',', ' ', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],
['#,##0.###', '#,##0%', '#,##0.00 ¤', '#E0'],
'MAD',
'MAD',
'Derhem Umeṛṛuki',
{'JPY': ['JP¥', '¥'], 'USD': ['US$', '$']},
'ltr',
plural
];
| mgechev/angular-packages/common/locales/tzm.ts |
/*
* Copyright (C) 2012-2015 DataStax Inc.
*
* 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.datastax.driver.core.policies;
import java.net.InetSocketAddress;
/**
* The default {@link AddressTranslater} used by the driver that do no
* translation.
*/
public class IdentityTranslater implements AddressTranslater {
/**
* Translates a Cassandra {@code rpc_address} to another address if necessary.
* <p/>
* This method is the identity function, it always return the address passed
* in argument, doing no translation.
*
* @param address the address of a node as returned by Cassandra.
* @return {@code address} unmodified.
*/
public InetSocketAddress translate(InetSocketAddress address) {
return address;
}
}
| mike-tr-adamson/java-driver-driver-core/src/main/java/com/datastax/driver/core/policies/IdentityTranslater.java |
/* =========================================================
* rewritten by Amr Bedair <[email protected]>
* @since booster v4.0.0-beta-2
*
* ========================================================= */
(function($){
var checkedItems = [];
/**
* Init events for Bulk Actions
* @param id string the ID of the grid view container
*/
$.fn.yiiGridView.initBulkActions = function (id) {
$(document).on("click change", "#"+id+" input[type=checkbox]", function() {
var grid = $('#'+id);
if ($("#"+id+' tbody input[type=checkbox]:checked').length) {
$(".bulk-actions-btn", grid).removeClass("disabled");
$("div.bulk-actions-blocker", grid).hide();
} else {
$(".bulk-actions-btn", grid).addClass("disabled");
$("div.bulk-actions-blocker", grid).show();
}
});
};
/**
* Updating checkboxes after grid ajax updating
* @param id string the ID of the grid view container
*/
$.fn.yiiGridView.afterUpdateGrid = function (id) {
if ($("#"+id+' tbody input[type=checkbox]:checked').length) {
var grid = $('#'+id);
$(".bulk-actions-btn", grid).removeClass("disabled");
$("div.bulk-actions-blocker", grid).hide();
$.each($("#"+id+' tbody input[type=checkbox]:checked'), function(index, item) {
var row = $("input[value="+item+"]", grid);
if (!row.is(':checked'))
row.attr("checked", "checked");
});
}
};
/**
* Returns array of checked items ids
* @returns {Array}
*/
$.fn.yiiGridView.getCheckedRowsIds = function (id) {
return $("#"+id+' tbody input[type=checkbox]:checked').map(function() { return $(this).val(); }).get();
}
})(jQuery); | DeadLockMk1/Yogurt-yogurt/protected/extensions/booster/assets/js/jquery.saveselection.gridview.js |
var baseUrl = '/marked/quality';
function Quality(){};
Quality.prototype = {
list : function(){
htmlobj=$.ajax({url:baseUrl+"?action=list&module_flag="+$("#module_flag").val()+"&func_flag="+$("#func_flag").val()+"&tac_name="+encodeURI($("#tac_name").val())+"&ajaxid="+Math.random(),async:false});
$("#quality_list").html(htmlobj.responseText);
$("#quality_show").hide();
$("#quality_create").hide();
$("#quality_createschedule").hide();
$("#quality_list").show();
},
show : function(func_tac_id){
htmlobj=$.ajax({url:baseUrl+"?action=show&module_flag="+$("#module_flag").val()+"&func_flag="+$("#func_flag").val()+"&func_tac_id="+func_tac_id+"&ajaxid="+Math.random(),async:false});
$("#quality_show").html(htmlobj.responseText);
$("#quality_create").hide();
$("#quality_createschedule").hide();
$("#quality_list").show();
$("#quality_show").show();
},
del : function(func_tac_id){
if(!confirm("ÄúÈ·¶¨É¾³ýÂð£¿")){
return;
}
htmlobj=$.ajax({url:baseUrl+"?action=delete&module_flag="+$("#module_flag").val()+"&func_flag="+$("#func_flag").val()+"&func_tac_id="+func_tac_id+"&ajaxid="+Math.random(),async:false});
if (htmlobj.responseText=="1"){
alert("²Ù×÷³É¹¦");
quality.list();
}else if(htmlobj.responseText=="0"){
alert("²Ù×÷ʧ°Ü");
quality.list();
}else{
alert(htmlobj.responseText);
}
},
createinit : function(){
htmlobj=$.ajax({url:baseUrl+"?action=createinit&module_flag="+$("#module_flag").val()+"&func_flag="+$("#func_flag").val()+"&ajaxid="+Math.random(),async:false});
$("#quality_create").html(htmlobj.responseText);
$("#quality_list").hide();
$("#quality_show").hide();
$("#quality_createschedule").hide();
$("#quality_create").show();
},
create : function(){
tac_id=$("input[name='tac']:checked").val();
if(typeof(tac_id)=="undefined"){
$("#info_1").html("ÇëÑ¡Ôñ²ßÂÔ");
return;
}
htmlobj=$.ajax({url:baseUrl+"?action=create&module_flag="+$("#module_flag").val()+"&func_flag="+$("#func_flag").val()+"&tac_id="+tac_id+"&ajaxid="+Math.random(),async:false});
if (htmlobj.responseText=="1"){
alert("²Ù×÷³É¹¦");
quality.list();
}else if(htmlobj.responseText=="0"){
alert("²Ù×÷ʧ°Ü");
quality.list();
}else{
alert(htmlobj.responseText);
}
},
createschedule : function(func_tac_id){
htmlobj=$.ajax({url:baseUrl+"?action=createschedule&module_flag="+$("#module_flag").val()+"&func_flag="+$("#func_flag").val()+"&func_tac_id="+func_tac_id+"&ajaxid="+Math.random(),async:false});
$("#quality_createschedule").html(htmlobj.responseText);
$("#quality_show").hide();
$("#quality_create").hide();
$("#quality_list").show();
$("#quality_createschedule").show();
}
};
var quality = null;
$(document).ready(function(){
quality = new Quality();
quality.list();
}); | Superjom/webp-webp/webp/static/js/marked/quality.js |
//
// ExyGraph.h
// ExyGraph
//
// Created by Henry Popp on 5/5/15.
// Copyright (c) 2015 Henry Popp. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for ExyGraph.
FOUNDATION_EXPORT double ExyGraphVersionNumber;
//! Project version string for ExyGraph.
FOUNDATION_EXPORT const unsigned char ExyGraphVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ExyGraph/PublicHeader.h>
| hpopp/ExyGraph-ExyGraph/ExyGraph.h |
#!/usr/bin/env python
from distutils.core import setup
description = "A wrapper around Kenneth Reitz' tablib to work with Django models."
VERSION = '2.2.2'
setup(
name='django-tablib',
version=VERSION,
author='Joshua Ourisman',
author_email='[email protected]',
url='http://bitbucket.org/Josh/django-tablib',
description=description,
long_description=description,
license='MIT',
platforms=['any'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
packages=['django_tablib',],
package_data = {'django_tablib': ['templates/tablib/*',],},
install_requires=['django', 'tablib',],
)
| dimagi/django-tablib-setup.py |
import angular from 'angular';
import {loginComponent} from './login.component';
const loginConfig = ($stateProvider) => {
'use strict';
$stateProvider
.state('app.login', {
url: '/login',
layout: 'mainMenu',
component: 'login'
});
};
loginConfig.$inject = ['$stateProvider'];
const login = angular.module('login', [])
.config(loginConfig)
.component('login', loginComponent);
export {login}; | GinesOrtiz/angularES6seed-src/app/components/auth/login/index.js |
//
// THEPeerNetworking.h
// ThaliMobile
//
// Created by Brian Lambert on 5/13/15.
//
//
#import <Foundation/Foundation.h>
#import "THEPeerNetworkingDelegate.h"
// THEPeerNetworking interface.
@interface THEPeerNetworking : NSObject
// Properties.
@property (nonatomic, weak) id<THEPeerNetworkingDelegate> delegate;
// Class initializer.
- (instancetype)initWithServiceType:(NSString *)serviceType
peerIdentifier:(NSUUID *)peerIdentifier
peerName:(NSString *)peerName;
// Starts peer networking.
- (void)start;
// Stops peer networking.
- (void)stop;
// Connects to the peer server with the specified peer identifier.
- (BOOL)connectToPeerServerWithPeerIdentifier:(NSUUID *)peerIdentifier;
// Connects from the peer server with the specified peer identifier.
- (BOOL)disconnectFromPeerServerWithPeerIdentifier:(NSUUID *)peerIdentifier;
@end
| thaliproject/ThaliMobile-iOS-ThaliMobile/Classes/THEPeerNetworking.h |
import IndexList from './src/index-list.vue';
module.exports = IndexList;
| varrant/xdc-blog-src/plugin/mint-ui/packages/index-list/index.js |
/* */
module.exports = require('./test/index');
| bhayden1/GarrisonPush-web/jspm_packages/npm/[email protected]/test.js |
(function ($, window) {
}).call(this, jQuery, window);
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip();
$('.my-dropdown').dropdown();
$('.my-dropdown').tooltip();
});
jQuery(document).ready(function($) {
$('.clickable_row tr').click(function() {
window.document.location = $(this).data('url');
});
}); | quaintm/octopus-octopus/static/js/script.js |
/**
* Created by Wayne on 16/3/16.
*/
'use strict';
var city = require('../controllers/city'),
userFilter = require('../../../libraries/filters/user');
module.exports = function (app) {
app.route('/city/get').get(userFilter.requireUser, city.getCities);
app.route('/city/set').get(userFilter.requireUser, city.setCities);
app.route('/city/updateLocation').get(city.updateLocation);
};
| hardylake8020/youka-server-tender/app/routes/city.server.routes.js |
--<<card 导表开始>>
local super = require "script.card.water.card132001"
ccard232001 = class("ccard232001",super,{
sid = 232001,
race = 3,
name = "秘教暗影祭司",
type = 201,
magic_immune = 0,
assault = 0,
sneer = 0,
atkcnt = 1,
shield = 0,
warcry = 1,
dieeffect = 0,
sneak = 0,
magic_hurt_adden = 0,
cure_to_hurt = 0,
recoverhp_multi = 1,
magic_hurt_multi = 1,
max_amount = 2,
composechip = 100,
decomposechip = 10,
atk = 4,
maxhp = 5,
crystalcost = 6,
targettype = 2,
halo = nil,
desc = "战吼:获得一个攻击力小于或等于2的敌方随从的控制权。",
effect = {
onuse = nil,
ondie = nil,
onhurt = nil,
onrecoverhp = nil,
onbeginround = nil,
onendround = nil,
ondelsecret = nil,
onputinwar = nil,
onremovefromwar = nil,
onaddweapon = nil,
onputinhand = nil,
before_die = nil,
after_die = nil,
before_hurt = nil,
after_hurt = nil,
before_recoverhp = nil,
after_recoverhp = nil,
before_beginround = nil,
after_beginround = nil,
before_endround = nil,
after_endround = nil,
before_attack = nil,
after_attack = nil,
before_playcard = nil,
after_playcard = nil,
before_putinwar = nil,
after_putinwar = nil,
before_removefromwar = nil,
after_removefromwar = nil,
before_addsecret = nil,
after_addsecret = nil,
before_delsecret = nil,
after_delsecret = nil,
before_addweapon = nil,
after_addweapon = nil,
before_delweapon = nil,
after_delweapon = nil,
before_putinhand = nil,
after_putinhand = nil,
before_removefromhand = nil,
after_removefromhand = nil,
},
})
function ccard232001:init(conf)
super.init(self,conf)
--<<card 导表结束>>
end --导表生成
function ccard232001:load(data)
if not data or not next(data) then
return
end
super.load(self,data)
-- todo: load data
end
function ccard232001:save()
local data = super.save(self)
-- todo: save data
return data
end
return ccard232001
| sundream/gamesrv-script/card/water/card232001.lua |
//
// SDLFileWrapper.h
// SmartDeviceLink-iOS
//
// Created by Joel Fischer on 5/11/16.
// Copyright © 2016 smartdevicelink. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SDLFileManagerConstants.h"
@class SDLFile;
NS_ASSUME_NONNULL_BEGIN
@interface SDLFileWrapper : NSObject
@property (strong, nonatomic, readonly) SDLFile *file;
@property (copy, nonatomic, readonly) SDLFileManagerUploadCompletionHandler completionHandler;
- (instancetype)initWithFile:(SDLFile *)file completionHandler:(SDLFileManagerUploadCompletionHandler)completionHandler;
+ (instancetype)wrapperWithFile:(SDLFile *)file completionHandler:(SDLFileManagerUploadCompletionHandler)completionHandler;
@end
NS_ASSUME_NONNULL_END | smartdevicelink/sdl_ios-SmartDeviceLink/private/SDLFileWrapper.h |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
- Downloads last month
- 29