text
stringlengths
3
181k
src
stringlengths
5
1.02k
#-*- coding: UTF-8 -*- from __future__ import division import nltk import re, pprint import os from urllib import urlopen import sys reload(sys) sys.setdefaultencoding('utf8') # 词形归并 raw = """DENNIS: Listen, strange women lying in ponds distributing swords is no basis for a system of government. Supreme executive power derives from a mandate from the masses, not from some farcical aquatic ceremony. """ tokens = nltk.word_tokenize(raw) print tokens # stemmer 去梗机 —— 词干提取 porter = nltk.PorterStemmer() lancaster = nltk.LancasterStemmer() # 可以看到Porter的效果更好一点 print [porter.stem(t) for t in tokens] print [lancaster.stem(t) for t in tokens] # 词形归并 wnl = nltk.WordNetLemmatizer() print [wnl.lemmatize(t) for t in tokens]
xinghalo/DMInAction-src/nlp/chap03/10SpecificationProcess.py
/* Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments Copyright (C) ITsysCOM GmbH This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/> */ package v1 import ( "github.com/cgrates/cgrates/utils" ) // Creates a new ActionTriggers profile within a tariff plan func (self *ApierV1) SetTPActionTriggers(attrs utils.TPActionTriggers, reply *string) error { if missing := utils.MissingStructFields(&attrs, []string{"TPid", "ID"}); len(missing) != 0 { return utils.NewErrMandatoryIeMissing(missing...) } if err := self.StorDb.SetTPActionTriggers([]*utils.TPActionTriggers{&attrs}); err != nil { return utils.NewErrServerError(err) } *reply = utils.OK return nil } type AttrGetTPActionTriggers struct { TPid string // Tariff plan id ID string // ActionTrigger id } // Queries specific ActionTriggers profile on tariff plan func (self *ApierV1) GetTPActionTriggers(attrs AttrGetTPActionTriggers, reply *utils.TPActionTriggers) error { if missing := utils.MissingStructFields(&attrs, []string{"TPid", "ID"}); len(missing) != 0 { //Params missing return utils.NewErrMandatoryIeMissing(missing...) } if ats, err := self.StorDb.GetTPActionTriggers(attrs.TPid, attrs.ID); err != nil { return utils.NewErrServerError(err) } else if len(ats) == 0 { return utils.ErrNotFound } else { *reply = *ats[0] } return nil } type AttrGetTPActionTriggerIds struct { TPid string // Tariff plan id utils.Paginator } // Queries ActionTriggers identities on specific tariff plan. func (self *ApierV1) GetTPActionTriggerIds(attrs AttrGetTPActionTriggerIds, reply *[]string) error { if missing := utils.MissingStructFields(&attrs, []string{"TPid"}); len(missing) != 0 { //Params missing return utils.NewErrMandatoryIeMissing(missing...) } if ids, err := self.StorDb.GetTpTableIds(attrs.TPid, utils.TBLTPActionTriggers, utils.TPDistinctIds{"tag"}, nil, &attrs.Paginator); err != nil { return utils.NewErrServerError(err) } else if ids == nil { return utils.ErrNotFound } else { *reply = ids } return nil } // Removes specific ActionTriggers on Tariff plan func (self *ApierV1) RemTPActionTriggers(attrs AttrGetTPActionTriggers, reply *string) error { if missing := utils.MissingStructFields(&attrs, []string{"TPid", "ID"}); len(missing) != 0 { //Params missing return utils.NewErrMandatoryIeMissing(missing...) } if err := self.StorDb.RemTpData(utils.TBLTPActionTriggers, attrs.TPid, map[string]string{"tag": attrs.ID}); err != nil { return utils.NewErrServerError(err) } else { *reply = utils.OK } return nil }
marcinkowalczyk/cgrates-apier/v1/tpactiontriggers.go
var mongoose = require('mongoose'); var db = mongoose.createConnection('mongodb://localhost/i2e'); db.on('error', function(err){ if(err) throw err; }); db.once('open', function callback () { console.info('Mongo db connected successfully'); }); module.exports = db;
akshatsinha/invoice-to-excel-models/db.js
/*=========================================================================\ * Copyright(C)2016 Chudai. * * File name : test.cpp * Version : v1.0.0 * Author : 初代 * Date : 2016/08/24 * Description : * Function list: 1. * 2. * 3. * History : \*=========================================================================*/ /*-----------------------------------------------------------* * 头文件 * *-----------------------------------------------------------*/ //还未完成: //疑问: // "a\n\rb\n\r\rc\n\r\rddddd.e" 最后的dddd.e这个文件是哪一层的呢? //理解错了! class Solution { public: int lengthLongestPath(string input) { //1. 如果是文件,并且\t多于栈顶的,则计算长度 //2. 如果是文件,但\t小于栈顶的,则出栈直到栈空或者栈顶\t小于文件\t. //3. 如果不是文件,并且\t多于栈顶的, 则入栈 //4. 如果不是文件,冰球\t小于栈顶的,则出栈 int maxlen = 0; int curlen = 0; stack<pair<int, string> > aidStack; int countT; string fileOrDir; int fileFlag = 0; int i = 0; int len = input.size(); for (i = 0; i < len; ) { fileOrDir = ""; countT = 0; fileFlag = 0; //计算\t的个数 if (i < len && input[i] == '\n') { i++; while(input[i] == '\t' && i < len) //计算\t的个数 { countT++; i++; } } for (; input[i] != '\n' && i < len; i++) { if (input[i] == '.') { fileFlag = 1; } fileOrDir += input[i]; } //2. 如果是文件,但\t小于栈顶的,则出栈直到栈空或者栈顶\t小于文件\t. //4. 如果不是文件,冰球\t小于栈顶的,则出栈 while(!aidStack.empty() && aidStack.top().first >= countT) { curlen -= aidStack.top().second.size(); aidStack.pop(); } if (1 == fileFlag) //是文件 { //1. 如果是文件,并且\t多于栈顶的,则计算长度 if (curlen + fileOrDir.size() > maxlen) { maxlen = curlen + fileOrDir.size(); } } else { //3. 如果不是文件,并且\t多于栈顶的, 则入栈 aidStack.push(make_pair(countT, fileOrDir+"/")); curlen += fileOrDir.size() + 1; } } return maxlen; } };
isshe/3.LeetCode-String/Medium/388_最长绝对文件路径/lengthLongestPath.cpp
/* * Copyright 2004-2010 Brian S O'Neill * * 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.cojen.classfile; /** * A specialized, faster BitSet used by InstructionList. * * @author Brian S O'Neill */ final class BitList implements Cloneable { // Bits are stored little endian. private int[] mData; /** * @param capacity initial amount of bits to store */ public BitList(int capacity) { mData = new int[(capacity + 31) >> 5]; } public boolean get(int index) { return (mData[index >> 5] & (0x80000000 >>> index)) != 0; } /** * @param fromIndex inclusive * @return -1 if not found */ public int nextSetBit(int fromIndex) { int i = fromIndex >> 5; int[] data = mData; if (i >= data.length) { return -1; } int v = data[i] & (0xffffffff >>> fromIndex); while (true) { if (v != 0) { return (i << 5) + Integer.numberOfLeadingZeros(v); } if (++i >= data.length) { return -1; } v = data[i]; } } /** * @param fromIndex inclusive * @return non-negative index */ public int nextClearBit(int fromIndex) { int i = fromIndex >> 5; int[] data = mData; if (i >= data.length) { return fromIndex; } int v = ~data[i] & (0xffffffff >>> fromIndex); while (true) { if (v != 0) { return (i << 5) + Integer.numberOfLeadingZeros(v); } if (++i >= data.length) { return data.length << 32; } v = ~data[i]; } } /** * @return true if any change made */ public boolean set(int index) { int i = index >> 5; int v = mData[i]; return v != (mData[i] = v | (0x80000000 >>> index)); } /** * @return true if any changes made */ public boolean or(BitList list) { boolean changes = ensureCapacity(list.capacity()); for (int i=list.mData.length; --i >= 0; ) { int v = mData[i]; changes |= (v != (mData[i] = v | list.mData[i])); } return changes; } public boolean isAllClear() { for (int i=mData.length; --i >= 0; ) { if (mData[i] != 0) { return false; } } return true; } public boolean isAllSet() { for (int i=mData.length; --i >= 0; ) { if (mData[i] != 0xffffffff) { return false; } } return true; } /** * @return true if the bitwise or of the two lists is different than the * bitwise xor. */ public boolean intersects(BitList list) { if (list != null) { for (int i=Math.min(mData.length, list.mData.length); --i >= 0; ) { int v1 = mData[i]; int v2 = list.mData[i]; if ((v1 | v2) != (v1 ^ v2)) { return true; } } } return false; } public int hashCode() { int hash = 0; for (int i=mData.length; --i >= 0; ) { hash = hash * 31 + mData[i]; } return hash; } public int capacity() { return mData.length << 5; } public boolean equals(Object obj) { if (obj instanceof BitList) { return java.util.Arrays.equals(mData, ((BitList)obj).mData); } return false; } public BitList copy() { return (BitList)clone(); } public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(); } } public String toString() { StringBuffer buf = new StringBuffer(mData.length + 2); buf.append('['); for (int i=0; i<mData.length; i++) { String binary = Integer.toBinaryString(mData[i]); for (int j=binary.length(); j<32; j++) { buf.append('0'); } buf.append(binary); } buf.append(']'); return buf.toString(); } private boolean ensureCapacity(int capacity) { int len = (capacity + 31) >> 5; if (len > mData.length) { int[] newData = new int[len]; System.arraycopy(mData, 0, newData, 0, mData.length); mData = newData; return true; } return false; } }
zkmake520/Android_Search-indextank-engine-master/cojen-2.2.1-sources/org/cojen/classfile/BitList.java
#ifndef MACRO_H #define MACRO_H #ifdef SERVER #define show_error(args...) fprintf(stderr, args); #define show_msg(args...) fprintf(stdout, args); #else extern int daemon; #define show_error(args...) if(!daemon) fprintf(stderr, args); #define show_msg(args...) if(!daemon) fprintf(stdout, args); #endif #define NET_BUFFER_SIZE 4096 #define BUFFER_SIZE 1024 #define DEFAULT_IP "127.0.0.1" #define DEFAULT_PORT 8080 #endif
Vuzi/SimpleRobots-common/includes/macro.h
/* globals SystemJS */ SystemJS.config({ paths: { 'github:': 'lib/jspm/github/', 'npm:': 'lib/jspm/npm/' }, browserConfig: { 'baseURL': '/' }, devConfig: { 'map': { 'babel-runtime': 'npm:[email protected]', 'core-js': 'npm:[email protected]', 'fs': 'github:jspm/[email protected]', 'path': 'github:jspm/[email protected]', 'plugin-babel': 'npm:[email protected]' }, 'packages': { 'npm:[email protected]': { 'map': {} }, 'npm:[email protected]': { 'map': { 'systemjs-json': 'github:systemjs/[email protected]' } } } }, transpiler: 'plugin-babel', babelOptions: { 'stage': 0, 'optional': [ 'runtime', 'optimisation.modules.system' ], 'blacklist': [] }, defaultExtension: false, packageConfigPaths: [ 'npm:@*/*.json', 'npm:*.json', 'github:*/*.json' ], map: { 'babel': 'npm:[email protected]', 'underscore': 'npm:[email protected]', 'assert': 'github:jspm/[email protected]', 'compare-versions': 'npm:[email protected]', 'domready': 'npm:[email protected]', 'json': 'github:systemjs/[email protected]', 'jst': 'github:podio/[email protected]', 'lodash': 'npm:[email protected]', 'process': 'github:jspm/[email protected]', 'preload-js': 'npm:[email protected]', 'text': 'github:systemjs/[email protected]', 'tiny-emitter': 'npm:[email protected]', 'ua-parser-js': 'npm:[email protected]', 'whatwg-fetch': 'npm:[email protected]' }, meta: { '*.json': { 'loader': 'json' }, '*.html': { 'loader': 'jst' } }, packages: { 'npm:[email protected]': { 'map': { 'systemjs-json': 'github:systemjs/[email protected]' } } } })
naso/zero-jspm-src/jspm.config.js
/** @file This GUID can be installed to the device handle to specify that the device is the console-in device. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __CONSOLE_IN_DEVICE_H__ #define __CONSOLE_IN_DEVICE_H__ #define EFI_CONSOLE_IN_DEVICE_GUID \ { 0xd3b36f2b, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } } extern EFI_GUID gEfiConsoleInDeviceGuid; #endif
eaas-framework/virtualbox-src/VBox/Devices/EFI/Firmware/MdeModulePkg/Include/Guid/ConsoleInDevice.h
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package polly const ( // ErrCodeInvalidLexiconException for service response error code // "InvalidLexiconException". // // Amazon Polly can't find the specified lexicon. Verify that the lexicon's // name is spelled correctly, and then try again. ErrCodeInvalidLexiconException = "InvalidLexiconException" // ErrCodeInvalidNextTokenException for service response error code // "InvalidNextTokenException". // // The NextToken is invalid. Verify that it's spelled correctly, and then try // again. ErrCodeInvalidNextTokenException = "InvalidNextTokenException" // ErrCodeInvalidSampleRateException for service response error code // "InvalidSampleRateException". // // The specified sample rate is not valid. ErrCodeInvalidSampleRateException = "InvalidSampleRateException" // ErrCodeInvalidSsmlException for service response error code // "InvalidSsmlException". // // The SSML you provided is invalid. Verify the SSML syntax, spelling of tags // and values, and then try again. ErrCodeInvalidSsmlException = "InvalidSsmlException" // ErrCodeLexiconNotFoundException for service response error code // "LexiconNotFoundException". // // Amazon Polly can't find the specified lexicon. This could be caused by a // lexicon that is missing, its name is misspelled or specifying a lexicon that // is in a different region. // // Verify that the lexicon exists, is in the region (see ListLexicons) and that // you spelled its name is spelled correctly. Then try again. ErrCodeLexiconNotFoundException = "LexiconNotFoundException" // ErrCodeLexiconSizeExceededException for service response error code // "LexiconSizeExceededException". // // The maximum size of the specified lexicon would be exceeded by this operation. ErrCodeLexiconSizeExceededException = "LexiconSizeExceededException" // ErrCodeMarksNotSupportedForFormatException for service response error code // "MarksNotSupportedForFormatException". // // Speech marks are not supported for the OutputFormat selected. Speech marks // are only available for content in json format. ErrCodeMarksNotSupportedForFormatException = "MarksNotSupportedForFormatException" // ErrCodeMaxLexemeLengthExceededException for service response error code // "MaxLexemeLengthExceededException". // // The maximum size of the lexeme would be exceeded by this operation. ErrCodeMaxLexemeLengthExceededException = "MaxLexemeLengthExceededException" // ErrCodeMaxLexiconsNumberExceededException for service response error code // "MaxLexiconsNumberExceededException". // // The maximum number of lexicons would be exceeded by this operation. ErrCodeMaxLexiconsNumberExceededException = "MaxLexiconsNumberExceededException" // ErrCodeServiceFailureException for service response error code // "ServiceFailureException". // // An unknown condition has caused a service failure. ErrCodeServiceFailureException = "ServiceFailureException" // ErrCodeSsmlMarksNotSupportedForTextTypeException for service response error code // "SsmlMarksNotSupportedForTextTypeException". // // SSML speech marks are not supported for plain text-type input. ErrCodeSsmlMarksNotSupportedForTextTypeException = "SsmlMarksNotSupportedForTextTypeException" // ErrCodeTextLengthExceededException for service response error code // "TextLengthExceededException". // // The value of the "Text" parameter is longer than the accepted limits. The // limit for input text is a maximum of 6000 characters total, of which no more // than 3000 can be billed characters. SSML tags are not counted as billed characters. ErrCodeTextLengthExceededException = "TextLengthExceededException" // ErrCodeUnsupportedPlsAlphabetException for service response error code // "UnsupportedPlsAlphabetException". // // The alphabet specified by the lexicon is not a supported alphabet. Valid // values are x-sampa and ipa. ErrCodeUnsupportedPlsAlphabetException = "UnsupportedPlsAlphabetException" // ErrCodeUnsupportedPlsLanguageException for service response error code // "UnsupportedPlsLanguageException". // // The language specified in the lexicon is unsupported. For a list of supported // languages, see Lexicon Attributes (http://docs.aws.amazon.com/polly/latest/dg/API_LexiconAttributes.html). ErrCodeUnsupportedPlsLanguageException = "UnsupportedPlsLanguageException" )
yonjah/rclone-vendor/github.com/aws/aws-sdk-go/service/polly/errors.go
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.common.transport; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import java.io.IOException; import java.util.HashMap; import java.util.Map; import static java.util.Collections.unmodifiableMap; /** * A global registry of all supported types of {@link TransportAddress}s. This registry is not open for modification by plugins. */ public abstract class TransportAddressSerializers { private static final Map<Short, CheckedBiFunction<StreamInput, String, TransportAddress>> ADDRESS_REGISTRY; static { Map<Short, CheckedBiFunction<StreamInput, String, TransportAddress>> registry = new HashMap<>(); addAddressType(registry, InetSocketTransportAddress.TYPE_ID, InetSocketTransportAddress::new); addAddressType(registry, LocalTransportAddress.TYPE_ID, LocalTransportAddress::new); ADDRESS_REGISTRY = unmodifiableMap(registry); } private static void addAddressType(Map<Short, CheckedBiFunction<StreamInput, String, TransportAddress>> registry, short uniqueAddressTypeId, CheckedBiFunction<StreamInput, String, TransportAddress> address) { if (registry.containsKey(uniqueAddressTypeId)) { throw new IllegalStateException("Address [" + uniqueAddressTypeId + "] already bound"); } registry.put(uniqueAddressTypeId, address); } public static TransportAddress addressFromStream(StreamInput input) throws IOException { return addressFromStream(input, null); } public static TransportAddress addressFromStream(StreamInput input, String hostString) throws IOException { // TODO why don't we just use named writeables here? short addressUniqueId = input.readShort(); CheckedBiFunction<StreamInput, String, TransportAddress> addressType = ADDRESS_REGISTRY.get(addressUniqueId); if (addressType == null) { throw new IOException("No transport address mapped to [" + addressUniqueId + "]"); } return addressType.apply(input, hostString); } public static void addressToStream(StreamOutput out, TransportAddress address) throws IOException { out.writeShort(address.uniqueAddressTypeId()); address.writeTo(out); } /** A BiFuntion that can throw an IOException */ @FunctionalInterface interface CheckedBiFunction<T, U, R> { /** * Applies this function to the given arguments. * * @param t the first function argument * @param u the second function argument * @return the function result */ R apply(T t, U u) throws IOException; } }
strapdata/elassandra5-rc-core/src/main/java/org/elasticsearch/common/transport/TransportAddressSerializers.java
""" Django settings for qlinkplanner project. Generated by 'django-admin startproject' using Django 1.11.3. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.environ['SECRET'] # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True # Allowed hosts that can reach the planner ALLOWED_HOSTS = [ 'localhost', os.environ['URL'] ] # Application definition INSTALLED_APPS = [ 'planner', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'qlinkplanner.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'qlinkplanner.wsgi.application' # Database # https://docs.djangoproject.com/en/1.11/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Password validation # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/1.11/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles') STATIC_URL = '/static/' # Extra places for collectstatic to find static files. STATICFILES_DIRS = ( os.path.join(PROJECT_ROOT, '../planner/static'), ) # Simplified static file serving. # https://warehouse.python.org/project/whitenoise/ STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' ## Logging LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': ('%(asctime)s [%(process)d] [%(levelname)s] ' 'pathname=%(pathname)s lineno=%(lineno)s ' 'funcname=%(funcName)s message=%(message)s'), 'datefmt': '%Y-%m-%d %H:%M:%S' }, 'simple': { 'format': '%(levelname)s %(message)s' } }, 'handlers': { 'null': { 'level': 'DEBUG', 'class': 'logging.NullHandler', }, 'console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'verbose' } }, 'loggers': { 'qlinkplanner': { 'handlers': ['console', ], 'level': 'INFO', } } }
nickubels/qlinkplanner-qlinkplanner/settings.py
قطع الأسلاك الموليبدينوم الساخن الصفحة الرئيسية > قائمة المنتجات > قطع الأسلاك الموليبدينوم الساخن (قطع الأسلاك الموليبدينوم الساخن)إجمالي المنتجات ل24) نحن المتخصصة قطع الأسلاك الموليبدينوم الساخن المصنعين والموردين / مصنع من الصين. الجملة قطع الأسلاك الموليبدينوم الساخن بجودة عالية كما السعر المنخفض / رخيصة، واحدة من قطع الأسلاك الموليبدينوم الساخن العلامات التجارية الرائدة من الصين، Baoji Zhipu Non-Ferrous Metals Processing Co., Ltd.. الجملة قطع الأسلاك الموليبدينوم الساخن من الصين، والحاجة إلى إيجاد رخيصة قطع الأسلاك الموليبدينوم الساخن انخفاض الأسعار ولكن الشركات المصنعة. مجرد العثور على العلامات التجارية ذات جودة عالية على قطع الأسلاك الموليبدينوم الساخن إنتاج المصنع، يمكنك أيضا ردود فعل حول ما تريد، والبدء في توفير واستكشاف لدينا قطع الأسلاك الموليبدينوم الساخن، نحن 'ليرة لبنانية الرد عليك في أسرع.
c4-ar
package fr.ironcraft.phonecraft.utils; import java.lang.ref.Reference; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.net.URLClassLoader; import java.net.URL; import java.lang.ref.ReferenceQueue; import java.lang.ref.SoftReference; /** * @authors Dermenslof, DrenBx */ public class DynamicClassLoader extends URLClassLoader { HashMap<Integer, Object[]> constantVals = new HashMap<Integer, Object[]>(); static ConcurrentHashMap<String, Reference<Class>>classCache = new ConcurrentHashMap<String, Reference<Class> >(); static final URL[] EMPTY_URLS = new URL[]{}; static final ReferenceQueue rq = new ReferenceQueue(); public DynamicClassLoader() { super(EMPTY_URLS,(Thread.currentThread().getContextClassLoader() == null || Thread.currentThread().getContextClassLoader() == ClassLoader.getSystemClassLoader()) ? Compiler.class.getClassLoader():Thread.currentThread().getContextClassLoader()); } public DynamicClassLoader(ClassLoader parent) { super(EMPTY_URLS,parent); } static public <K,V> void clearCache(ReferenceQueue rq, ConcurrentHashMap<K, Reference<V>> cache) { //cleanup any dead entries if(rq.poll() != null) { while(rq.poll() != null) ; for(Map.Entry<K, Reference<V>> e : cache.entrySet()) { Reference<V> val = e.getValue(); if(val != null && val.get() == null) cache.remove(e.getKey(), val); } } } public Class defineClass(String name, byte[] bytes, Object srcForm) { clearCache(rq, classCache); Class c = defineClass(name, bytes, 0, bytes.length); classCache.put(name, new SoftReference(c,rq)); return c; } protected Class<?> findClass(String name) throws ClassNotFoundException { Reference<Class> cr = classCache.get(name); if(cr != null) { Class c = cr.get(); if(c != null) return c; else classCache.remove(name, cr); } return super.findClass(name); } public void registerConstants(int id, Object[] val) { constantVals.put(id, val); } public Object[] getConstants(int id) { return constantVals.get(id); } public void addURL(URL url) { super.addURL(url); } }
Dermenslof/Modjam-src/main/java/fr/ironcraft/phonecraft/utils/DynamicClassLoader.java
Aktion gegen Gewalt an Frauen: Auch Landau tanzt bei »One Billion Rising« / Stadt Landau Aktion gegen Gewalt an Frauen: Auch Landau tanzt bei »One Billion Rising« Gute Laune, ernstes Thema: Auf dem Landauer Rathausplatz wird in diesem Jahr wieder bei »One Billion Rising« getanzt. © Stadt Landau in der Pfalz Eine Milliarde erhebt sich: Auch in diesem Jahr beteiligt sich die Stadt Landau an der weltweiten Aktion „One Billion Rising“. Gemeinsam mit dem Förderverein der Frauenzufluchtsstätte Südpfalz lädt die städtische Gleichstellungsbeauftragte Evi Julier am Freitag, 14. Februar, um 17 Uhr auf den Rathausplatz, um gemeinsam zu tanzen und ein Zeichen gegen Gewalt an Frauen zu setzen. Die Schirmherrschaft für die Veranstaltung hat Oberbürgermeister Thomas Hirsch übernommen. Die Aktion „One Billion Rising“ wurde im Jahr 2012 durch die US-amerikanische Frauenrechtlerin Eve Ensler ins Leben gerufen. Weltweit sind Frauen seither aufgerufen, am 14. Februar ihre Häuser bzw. Arbeitsstellen zu verlassen, um gemeinsam zu tanzen und ein Zeichen gegen Gewalt an Frauen zu setzen.
c4-de
/* neubot/www/js/i18n.js */ /*- * Copyright (c) 2011 Alessio Palmero Aprosio <[email protected]>, * Universita' degli Studi di Milano * * This file is part of Neubot <http://www.neubot.org/>. * * Neubot 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. * * Neubot 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 Neubot. If not, see <http://www.gnu.org/licenses/>. */ var LANG = {}; var i18n = { get: function(label) { if (LANG[label]) { return LANG[label]; } else { return label; } }, getLanguageInUse: function() { var lang = undefined; jQuery.ajax({ url: utils.makeURL('/api/config'), data: {}, type: 'GET', dataType: 'json', error: function() { return; }, success: function(data) { lang = data['www.lang']; } }); if (!lang || lang == 'default') { if (navigator.userLanguage) { lang = navigator.userLanguage.toLowerCase().substring(0,2); } else if (navigator.language) { lang = navigator.language.toLowerCase().substring(0,2); } } return lang; }, translate_page: function(data, patt) { jQuery(".i18n").each(function(index, element) { var classList = jQuery(element).attr('class').split(/\s+/); jQuery.each(classList, function(i, v) { if ((result = patt.exec(v)) && LANG[result[1]]) { switch (element.tagName.toLowerCase()) { case "textarea": jQuery(element).text(LANG[result[1]]); break; default: jQuery(element).html(LANG[result[1]]); break; } } }); }); }, translate: function() { var lang = this.getLanguageInUse(); jQuery.ajax({ url: "lang/" + lang + ".js", dataType: 'script', context: this, error: function () { jQuery(".i18n").css("visibility", "visible"); }, success: function(data) { this.translate_page(data, /^(i18n_.*)$/i); jQuery(".i18n").css("visibility", "visible"); } }); } };
neubot/neubot-www-www/js/i18n.js
// // PetAddViewController.h // PetClinic // // Created by Tekhne on 11/23/13. // Copyright (c) 2013 Tekhne. All rights reserved. // #import <UIKit/UIKit.h> #import <MobileCoreServices/MobileCoreServices.h> #import "AppDelegate.h" #import "Pet.h" @interface PetAddEditViewController : UIViewController <UIImagePickerControllerDelegate, UIPopoverControllerDelegate, UINavigationControllerDelegate> @property (nonatomic) BOOL editMode; @property (nonatomic, strong) Pet *pet; @property (weak, nonatomic) IBOutlet UIImageView *imgPhoto; @property (weak, nonatomic) IBOutlet UITextField *txtName; @property (weak, nonatomic) IBOutlet UITextField *txtBirthdate; @property (weak, nonatomic) IBOutlet UITextField *txtWeight; @property (weak, nonatomic) IBOutlet UIPickerView *pickGenderKindBreed; - (IBAction)save:(id)sender; - (IBAction)cancel:(id)sender; - (IBAction)camera:(id)sender; - (IBAction)album:(id)sender; @end
wavecos/PetClinic_curso_ios-PetClinic/PetAddEditViewController.h
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask import render_template as flask_render_template, request, jsonify, Response from six import wraps from werkzeug.wrappers import Response as WerkzeugResponse def render_template(template_name, track_next=True, **kwargs): return flask_render_template(template_name, **kwargs) def render(tpl=None, section="home", fmt="html"): """ Render output to the clients browser. This function will handle both HTML and JSON output by setting the fmt flag to the desired format :param tpl: Template to use for HTML output :type tpl: string :param section: Section name of the template :type section: string :param fmt: Format of output (html or json) :type fmt: string :return: Rendered route output :rtype: string """ def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): template_name = tpl if template_name is None: template_name = request.endpoint.replace('.', '/') + '.html' ctx = f(*args, **kwargs) if ctx is None: ctx = {} elif isinstance(ctx, WerkzeugResponse): return ctx if fmt == "json": #return Response(json.dumps(ctx), mimetype='application/json') return jsonify(ctx) else: return flask_render_template(template_name, section=section, **ctx) return decorated_function return decorator
leighmacdonald/tranny-tranny/ui.py
/*jshint node:true*/ /* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { var app = new EmberAddon(defaults, { // Add options here }); /* This build file specifies the options for the dummy test app of this addon, located in `/tests/dummy` This build file does *not* influence how the addon or the app using it behave. You most likely want to be modifying `./index.js` or app's build file */ app.import('bower_components/kendo-ui/styles/kendo.common-material.core.min.css'); app.import('bower_components/kendo-ui/styles/kendo.common-material.min.css'); app.import('bower_components/kendo-ui/styles/kendo.material.min.css'); app.import('bower_components/kendo-ui/src/js/cultures/kendo.culture.ru-RU.js'); return app.toTree(); };
Jake2000/ember-kendo-ui-ember-cli-build.js
package com.fyp.hongqiaoservice.utils; /** * Created by Administrator on 2015/3/8. */ public class Constant { public static String URL="http://218.242.28.182/HQHubAndroid/servlet"; public static String FlightQueryServlet = "/FlightQueryServlet?"; public static String TrainQueryServlet = "/TrainQueryServlet?"; public static String BookingQueryServlet = "/BookingServlet?"; }
ahhbzyz/HongqiaoService-app/src/main/java/com/fyp/hongqiaoservice/utils/Constant.java
// // CQCommonUtiles.h // CQFramework // // Created by runo on 16/11/7. // Copyright © 2016年 com.runo. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> @interface CQCommonUtiles : NSObject #pragma mark - 网络状态 +(BOOL)cqIsConnectNetwork;//判断是否有网 +(void)cqStartNetworkStatusListener:(void(^)(NSString *networkStatus))listener; +(void)cqStopNetworkStatusListener;//停止网络状态监听 #pragma mark - 提示框 +(void)cqShowWarningAlert:(NSString *)message;//警告框 +(void)cqShowTipsAlert:(NSString *)message;//提示框 +(void)cqShowTipsAlert:(NSString *)message Title:(NSString *)title;//弹框,带标题 +(void)cqShowTipsAlert:(NSString *)message AtController:(UIViewController *)vc YesAction:(void(^)(void))yesblock;//带确定事件的提示弹出框 +(void)cqShowYesOrNoAlert:(UIViewController *)vc Title:(NSString *)title Message:(NSString *)message Yes:(void(^)(void))yesBlock No:(void(^)(void))noBlock;//确定取消框,中间弹出 +(void)cqShowYesOrNoSheet:(UIViewController *)vc Title:(NSString *)title Message:(NSString *)message Yes:(void(^)(void))yesBlock No:(void(^)(void))noBlock;//确定弹出框,底部弹出 +(void)cqShowYesOrNoTextAlert:(UIViewController *)vc Title:(NSString *)title Message:(NSString *)message Yes:(void (^)(UITextField *textTF))yesBlock No:(void (^)(UITextField *textTF))noBlock;//显示输入文本框的alert #pragma mark - FileOprator //获取沙盒文件夹路径 +(NSString *)cqGetLibraryPath; +(NSString *)cqGetDocumentPath; +(NSString *)cqGetCachePath; +(BOOL)cqCreateDirectory:(NSString *)directoryPath; +(BOOL)cqCreateFile:(NSString *)filePath; +(BOOL)cqDeleteFile:(NSString *)filePath; +(BOOL)cqFileIsExist:(NSString *)filePath; +(BOOL)cqMoveFileFrom:(NSString *)srcPath To:(NSString *)desPath;//src文件不再有 + (unsigned long long)cqFolderSizeAtPath:(NSString*)folderPath; + (unsigned long long)cqFileSizeAtPath:(NSString *)filePath; +(NSString *)cqSizeToString:(unsigned long long)size;//获得bit存储容量大小(字符串 #pragma mark - Color +(UIColor *)cqColorForHexString:(NSString *)hexStr; +(UIColor *)cqColorForHexString:(NSString *)hexStr Alpha:(CGFloat)alpha; #pragma mark - Other +(NSString *)cqGetSerialNumberString:(NSString *)numberStr; +(NSArray *)cqGetAddressInfoList; +(NSArray *)cqGetChinaList;//所有 省 +(NSArray *)cqGetCitysByProvince:(NSString *)province;//这个省的 所有市 +(NSArray *)cqGetCountyByCity:(NSString *)city;//这个市的 所有区县 @end
MartinOSix/DemoKit-dOC/CQFramework/CQFramework/CQFramework/Utiles/CQCommonUtiles.h
// Scorings.js define(["jquery", "backbone", "models/Scoring"], function ($, Backbone, Scoring) { var cryto = require("cipher"); var Scorings = Backbone.Collection.extend({ url: function () { return "app/data/enciphered-scorings.json"; }, parse: function (response) { var deciphered = { stream: { value: response.a }, key: { value: 'houseofcards'} }; var parsed = decipher(deciphered); return JSON.parse(deciphered.stream.value); }, model: Scoring }); return Scorings; } );
gracianani/Seemecard-app/collections/Scorings.js
require 'package' class Maven < Package description 'Apache Maven is a software project management and comprehension tool.' homepage 'https://maven.apache.org/' version '3.5.2' license 'Apache-2.0' compatibility 'all' source_url 'http://mirror.csclub.uwaterloo.ca/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz' source_sha256 '707b1f6e390a65bde4af4cdaf2a24d45fc19a6ded00fff02e91626e3e42ceaff' binary_url ({ aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/maven/3.5.2_armv7l/maven-3.5.2-chromeos-armv7l.tar.xz', armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/maven/3.5.2_armv7l/maven-3.5.2-chromeos-armv7l.tar.xz', i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/maven/3.5.2_i686/maven-3.5.2-chromeos-i686.tar.xz', x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/maven/3.5.2_x86_64/maven-3.5.2-chromeos-x86_64.tar.xz', }) binary_sha256 ({ aarch64: 'ab7d4fa404f53d5876e0a977a4eeaf1d38f3d9738ece113c9507c968ed2eac91', armv7l: 'ab7d4fa404f53d5876e0a977a4eeaf1d38f3d9738ece113c9507c968ed2eac91', i686: '8dcd4e8924457622ccd8770258274f16a63156a6fdb05b3a55320dabaa9733d0', x86_64: '62475788ab2144a67de31b08a946d613c277f9557f2122aff8cc996bd87bde2f', }) depends_on 'jdk8' def self.install system "mkdir -p #{CREW_DEST_PREFIX}/bin" system "mkdir -p #{CREW_DEST_PREFIX}/share/apache-maven" system "cp -r . #{CREW_DEST_PREFIX}/share/apache-maven" system "ln -s #{CREW_PREFIX}/share/apache-maven/bin/mvn #{CREW_DEST_PREFIX}/bin" end end
skycocker/chromebrew-packages/maven.rb
package com.github.openplay.service; public interface BeneficiaryService { }
metchegaray33/GameAndGain-src/main/java/com/github/openplay/service/BeneficiaryService.java
/** * Copyright 2012-2015 Rafal Lewczuk <[email protected]> * * ZORKA 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. * * ZORKA 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 * ZORKA. If not, see <http://www.gnu.org/licenses/>. */ package com.jitlogic.zorka.core.test.support; import java.util.concurrent.Executor; public class TestExecutor implements Executor { public void execute(Runnable command) { command.run(); } }
lionelliang/zorka-zorka-core/src/test/java/com/jitlogic/zorka/core/test/support/TestExecutor.java
'use strict' // styles require('vigour-scratch') require('./style.less') // dependencies var Element = require('../../element') /** * Navbar */ module.exports = new Element({ css: { name: 'navbar', atomic: 'molecule' } }).Constructor
vigour-io/uikit-lib/layout/navbar/index.js
# S-Cool Revision Summary ## S-Cool Revision Summary #### Transformers The great thing about a.c. electricity is that you can transform it! For instance, you can step its voltage up or down. Transformers work on the principles of electromagnetism and electromagnetic induction. The iron core increases the flux density (or field strength) in the secondary coils. The larger the number of coils, the greater the flux linkage and therefore the greater the induced e.m.f. in the secondary coil. You must have an alternating current in the primary coil or the field will not be changing and no emf will be induced in the secondary. #### The Turns Rule If you change the number of turns in the coils you change the induced emf. This allows you to change (transform) the voltage from the primary to the secondary coil. The Turns Rule is: Where: Ns = number of turns on the secondary coil Np = number of turns on the primary coil Vs = voltage across the secondary coil Vp = voltage across the primary coil #### Rectifying A.C. You should be able to draw circuits and outputs for half wave and full wave rectification circuits. Placing a capacitor in parallel with the resistor smoothes the current through the resistor by providing extra charge when the supply voltage drops. Transformers The turns rule: #### Symbols Transformers Ns = the number of turns in the secondary coil Np = the number of turns in the primary coil Vs = the voltage in the secondary coil Vp = the voltage in the primary coil Is = the current in the secondary coil Ip = the current in the primary coil
finemath-3plus
/************************************************************************ Copyright (C) 2011 - 2014 Project Wolframe. All rights reserved. This file is part of Project Wolframe. Commercial Usage Licensees holding valid Project Wolframe Commercial licenses may use this file in accordance with the Project Wolframe Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between the licensee and Project Wolframe. GNU General Public License Usage Alternatively, you can redistribute this file 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. Wolframe 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 Wolframe. If not, see <http://www.gnu.org/licenses/>. If you have questions regarding the use of this file, please contact Project Wolframe. ************************************************************************/ /// \brief Interface for special purpose memory allocators /// \file utils/allocators.hpp #ifndef _UTILS_ALLOCATORS_HPP_INCLUDED #define _UTILS_ALLOCATORS_HPP_INCLUDED #include <cstddef> #include <stdexcept> #include <new> namespace _Wolframe { namespace utils { /// \class GreedySmallChunkAllocator /// \brief Interface for an allocator for small chunks without a free. Memory is freed in the destructor of the allocator class GreedySmallChunkAllocator { public: GreedySmallChunkAllocator(); ~GreedySmallChunkAllocator(); void* alloc( std::size_t nofBytes); private: class MemChunk; MemChunk* m_chunk; }; /// \class ArrayDoublingAllocator /// \brief Interface for an allocator implemented with the strategy of array doubling class ArrayDoublingAllocator { public: ArrayDoublingAllocator(); ~ArrayDoublingAllocator(); std::size_t alloc( std::size_t nofBytes); const void* base() const {return m_ar;} void* base() {return m_ar;} std::size_t size() const {return m_pos;} private: enum {InitBlockSize=(1<<14)}; char* m_ar; std::size_t m_size; std::size_t m_pos; }; /// \class TypedArrayDoublingAllocator /// \brief Interface for an array doubling allocator that allocates only one fixed size type of element template <typename Type> struct TypedArrayDoublingAllocator :public ArrayDoublingAllocator { const Type* base() const { return (const Type*)ArrayDoublingAllocator::base(); } Type* base() { return (Type*)ArrayDoublingAllocator::base(); } const Type& operator[]( std::size_t idx) const { if (idx > size()/sizeof(Type)) { throw std::logic_error( "Array bounds access"); } return ((const Type*)ArrayDoublingAllocator::base())[ idx]; } Type& operator[]( std::size_t idx) { if (idx > size()/sizeof(Type)) { throw std::logic_error( "Array bounds access"); } return ((Type*)ArrayDoublingAllocator::base())[ idx]; } std::size_t alloc( unsigned int nof) { std::size_t mm = nof * sizeof(Type); if (mm < nof) throw std::bad_alloc(); std::size_t idx = ArrayDoublingAllocator::alloc( mm); return idx / sizeof(Type); } }; }}//namespace #endif
ProjectTegano/Tegano-include/utils/allocators.hpp
 namespace jmespath.net.tests.Parser { using FactAttribute = Xunit.FactAttribute; public class SliceExpressionTest : ParserTestBase { [Fact] public void ParseSliceExpression_IndexExpression() { const string json = "{\"foo\": [0, 1, 2, 3]}"; const string expression = "foo[0:4:1]"; const string expected = "[0,1,2,3]"; Assert(expression, json, expected); } [Fact] public void ParseSliceExpression_BracketSpecifier() { const string json = "[0, 1, 2, 3]"; const string expression = "[0:4:1]"; const string expected= "[0,1,2,3]"; Assert(expression, json, expected); } [Fact] public void ParseSliceExpression_BracketSpecifier_Empty() { const string json = "[0, 1, 2, 3]"; const string expression = "[]"; const string expected = "[0,1,2,3]"; Assert(expression, json, expected); } [Fact] public void ParseSliceExpression_Compliance() { Assert("foo[:10:]", "{\"foo\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],\"bar\": {\"baz\": 1}}", "[0,1,2,3,4,5,6,7,8,9]"); Assert("foo[1:9]", "{\"foo\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],\"bar\": {\"baz\": 1}}", "[1,2,3,4,5,6,7,8]"); Assert("foo[::1]", "{\"foo\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],\"bar\": {\"baz\": 1}}", "[0,1,2,3,4,5,6,7,8,9]"); Assert("foo[10:0:-1]", "{\"foo\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],\"bar\": {\"baz\": 1}}", "[9,8,7,6,5,4,3,2,1]"); Assert("foo[10:5:-1]", "{\"foo\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],\"bar\": {\"baz\": 1}}", "[9,8,7,6]"); Assert("foo[:2].a", "{\"foo\": [{\"a\": 1}, {\"a\": 2}, {\"a\": 3}],\"bar\": [{\"a\": {\"b\": 1}}, {\"a\": {\"b\": 2}},{\"a\": {\"b\": 3}}],\"baz\": 50}", "[1,2]"); } } }
jdevillard/JmesPath.Net-tests/jmespathnet.tests/Parser/SliceExpressionTest.cs
define({ "_widgetLabel": "Mesura" });
tmcgee/cmv-wab-widgets-wab/2.15/widgets/Measurement/nls/ca/strings.js
package com.springmvc.example.dto; public class UserDTO { private long id; private String fullName; private String emailId; private String password; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } public String getEmailId() { return emailId; } public void setEmailId(String emailId) { this.emailId = emailId; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
GeekBrains/springmvc-jpa-springmvc/springmvc-core/src/main/java/com/springmvc/example/dto/UserDTO.java
module.exports = require('./lib/easy-folderator');
littlebigberry/easy-folderator-index.js
$(document).ready(function(){ 'use strict'; $(document).on('click', '#bookstore2', function(e) { e.preventDefault(); document.title = "Bookstore2"; $('#navbar>a').removeClass(); $('#bookstore2').addClass('selected'); $.ajax({ type: 'get', url: 'bookstore2/shopPage.php', dataType: 'json', success: function(data){ $('#main').children().remove(); $('#main').append(data.html); console.log('Ajax request returned successfully.'); initCart(); } }); }); // Init the shopping cart var initCart = function() { $.ajax({ type: 'post', url: 'bookstore2/shop.php', dataType: 'json', success: function(data){ updateCart(data); console.log('Ajax request returned successfully. Shopping cart initiated.'); }, error: function(jqXHR, textStatus, errorThrown){ console.log('Ajax request failed: ' + textStatus + ', ' + errorThrown); } }); }; // Function to update shopping cart var updateCart = function(data) { $('#content') .html(data.content); $('#numitems') .html(data.numitems); $('#sum') .html(data.sum); $('#status') .html('Shopping cart refreshed.'); $.each(data.items, function(){ console.log('item.'); }); setTimeout(function(){ $('#status') .fadeOut(function(){ $('#status') .html('') .fadeIn(); }); }, 1000); console.log('Shopping cart updated.'); }; // Callback when making a purchase $(document).on('click', '.purchase', function() { var id = $(this).attr('id'); $.ajax({ type: 'post', url: 'bookstore2/shop.php?action=add', data: { itemid: id }, dataType: 'json', success: function(data){ updateCart(data); console.log('Ajax request returned successfully.'); }, error: function(jqXHR, textStatus, errorThrown){ console.log('Ajax request failed: ' + textStatus + ', ' + errorThrown); }, }); console.log('Clicked to buy id: ' + id); }); // Callback to clear all values in shopping cart $(document).on('click', "#clear", function() { $.ajax({ type: 'post', url: 'bookstore2/shop.php?action=clear', dataType: 'json', success: function(data){ updateCart(data); console.log('Ajax request returned successfully.'); }, error: function(jqXHR, textStatus, errorThrown){ console.log('Ajax request failed: ' + textStatus + ', ' + errorThrown); }, }); console.log('Clearing shopping cart.'); }); $(document).on('click', '#checkout', function(){ //Get the html for the checkout page var sum = $('#sum').text(); console.log(sum); $.ajax({ type: 'get', data: 'sum=' + sum, url: 'bookstore2/checkoutPage.php', dataType: 'json', success: function(data){ $('#main').children().remove(); $('#main').append(data.html); console.log('Ajax request returned successfully.'); } }); // Get the sum from the shopping cart $.ajax({ type: 'post', url: 'bookstore2/checkout.php?action=sum', dataType: 'json', success: function(data){ $('#sum') .html(data.sum); console.log('Ajax request returned successfully. Sum updated.'); }, error: function(jqXHR, textStatus, errorThrown){ console.log('Ajax request failed: ' + textStatus + ', ' + errorThrown); } }); }); /** * Check if form is valid */ $(document).on('submit', '#form1', function(event) { var theForm = $('#form1'); var formData = theForm.serialize(); //formData.push({ name: 'doPay', value: true }); console.log("Form: " + formData); console.log('form submitted, preventing default event'); event.preventDefault(); $('#output') .removeClass() .addClass('working') .html('<img src="http://dbwebb.se/img/loader.gif"/> Doing payment, please wait and do NOT reload this page...'); $.ajax({ type: 'post', url: 'bookstore2/checkout.php?action=pay', data: formData, dataType: 'json', success: function(data){ var errors = ''; $.each(data.errors || [], function(index, error) { errors += '<p>' + error.label + ' ' + error.message + '</p>'; }); $('#output') .removeClass() .addClass(data.outputClass) .html('<p>' + data.output + '</p>' + errors); $('#sum') .html(data.sum); console.log('Ajax request returned successfully. ' + data); }, error: function(jqXHR, textStatus, errorThrown){ console.log('Ajax request failed: ' + textStatus + ', ' + errorThrown); } }); console.log('Form submitted, lets wait for a response.'); }); console.log('Ready to roll.'); });
krissm/phpjs-js/main.js
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Entry Schema */ var EntrySchema = new Schema({ title: { type: String, required: true }, resourceId: Schema.Types.ObjectId, url: String, enclosure: { type: String, unique: true }, pubDate: Date, description: String, authors: [String], topics: { type: [String] } }); mongoose.model('Entry', EntrySchema);
tim-ojo/podcast-discovery-app/models/entry.server.model.js
(function () { 'use strict'; this.export = function () { /** * Command: add(1)(5) - adds args to each value * @author Nate Ferrero */ this.each = function (args, val) { args.forEach(function (arg) { val += arg; }); return val; }; }; }).call(typeof module === 'undefined' ? this['cmd:lib'].add = {} : this);
NateFerrero/cmd.js-src/lib/add.js
# 1. Create a new API key: https://exchange.gemini.com/settings/api # 2. Enter API key & secret below # 3. Optionally add any settings here that you want to override in settings.py API_KEY = 'gemini_API_KEY_here' API_SECRET = 'gemini_API_SECRET_here'
pirate/bitcoin-trader-secrets_default.py
/** * @file ajax_loader.js * * detachable ajax 'next page' loader * */ /** * - elementSelector: the item's class or id. e.g. '.mission-tile', or '#btn-upload'. Don't include '$' * - linkSelector: the next button's class or id. e.g. '.button.next', or '#btn-next'. Don't include '$' * - destination: the item list container's class or id. e.g. '.item-list'. Don't include '$' * - preprocess: callback function that is used to process the items. This happens before items added to DOM * - callback: callback function after the items are added to DOM * */ var ajaxLoader = function(elementSelector, linkSelector, destination, preprocess, callback, loadingIndicator, completeIndicator) { var _self = this; this.ajaxing = false; this.elementSelector = elementSelector; this.linkSelector = linkSelector; this.destination = destination; this.preprocess = preprocess; this.callback = callback; this.loadingIndicator = loadingIndicator; this.completeIndicator = completeIndicator; this.ajax = null; if (_self.loadingIndicator) { _self.loadingIndicator = $(_self.loadingIndicator); } $(this.linkSelector).hide(); this.load = function() { if (!_self.ajaxing) { _self.ajaxing = true; if ($(_self.linkSelector).length > 0) { if (_self.loadingIndicator) { $(_self.destination).append(_self.loadingIndicator); } var url = $(_self.linkSelector).attr('href'); if (!url.startsWith('http://') && !url.startsWith('https://')) { url = '/'+ url; } _self.ajax = $.get(url, function(data) { if (_self.loadingIndicator) { _self.loadingIndicator.remove(); } _self.ajaxing = false; _self.ajax = null; var tiles = $(data).find(_self.elementSelector), btn = $(data).find(_self.linkSelector); if (_self.preprocess) { _self.preprocess(tiles); } $(_self.destination).append(tiles); if (btn.length > 0) { $(_self.linkSelector).replaceWith(btn.hide()); }else{ $(_self.linkSelector).remove(); } if (_self.callback) { _self.callback(tiles); } if ($(_self.linkSelector).length === 0) { _self.destruct(); } }); } } }; this.abort = function() { if (_self.ajax) { _self.ajax.abort(); _self.ajax = null; _self.ajaxing = false; if (_self.loadingIndicator) { _self.loadingIndicator.remove(); } } }; this.destruct = function() { if (_self.completeIndicator) { $(_self.destination).append(_self.completeIndicator); } delete this.load; delete this.ajaxing; delete this.abort; delete this.elementSelector; delete this.linkSelector; delete this.destination; delete this.preprocess; delete this.callback; delete this.ajax; delete this.loadingIndicator; delete this.completeIndicator; delete this.destruct; }; return this; };
salted-herring/salted-js-src/ajax_loader.js
/* * Copyright (C) 2005-2008 Voice Sistem SRL * * This file is part of Open SIP Server. * * DROUTING OpenSIPS-module 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. * * DROUTING OpenSIPS-module 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * For any questions about this software and its license, please contact * Voice Sistem at following e-mail address: * [email protected] * * History: * --------- * 2005-07-27 first version (bogdan) */ #ifndef dr_parse_h_ #define dr_parse_h_ #define SEP '|' #define SEP1 ',' #define CARRIER_MARKER '#' #define IS_SPACE(s)\ ((s)==' ' || (s)=='\t' || (s)=='\r' || (s)=='\n') #define EAT_SPACE(s)\ while((s) && IS_SPACE(*(s))) (s)++ #endif
chiforbogdan/opensips-modules/drouting/parse.h
module.exports = function(grunt){ var filename = "leap-<%= pkg.version %>" var banner = "/*! \ \n * LeapJS v<%= pkg.version %> \ \n * http://github.com/leapmotion/leapjs/ \ \n * \ \n * Copyright 2013 LeapMotion, Inc. and other contributors \ \n * Released under the BSD-2-Clause license \ \n * http://github.com/leapmotion/leapjs/blob/master/LICENSE.txt \ \n */" grunt.initConfig({ pkg: grunt.file.readJSON("package.json"), // This updates the version.js to match pkg.version 'string-replace': { build: { files: { 'lib/': 'lib/version.js', './': 'bower.json', 'examples/': 'examples/*', 'test/': 'test/helpers/browser.html' }, options:{ replacements: [ // version.js { pattern: /(full:\s)'.*'/, replacement: "$1'<%= pkg.version %>'" }, { pattern: /(major:\s)\d/, replacement: "$1<%= pkg.version.split('.')[0] %>" }, { pattern: /(minor:\s)\d/, replacement: "$1<%= pkg.version.split('.')[1] %>" }, { pattern: /(dot:\s)\d/, replacement: "$1<%= pkg.version.split('.')[2] %>" }, // bower.json { pattern: /"version": "\d.\d.\d"/, replacement: '"version": "<%= pkg.version %>"' }, // examples { pattern: /leap.*\.js/, replacement: filename + '.js' } ] } } }, clean: { build: { src: ['./leap-*.js'] } }, browserify: { build: { options: { ignore: ['lib/connection/node.js'] }, src: 'template/entry.js', dest: filename + '.js' } }, uglify: { build: { src: filename + '.js', dest: filename + '.min.js' } }, usebanner: { build: { options: { banner: banner }, src: [filename + '.js', filename + '.min.js'] } }, watch: { files: 'lib/*', tasks: ['default'] }, exec: { 'test-browser': './node_modules/.bin/mocha-phantomjs -R dot test/helpers/browser.html', 'test-node': './node_modules/.bin/mocha lib/index.js test/helpers/node.js test/*.js -R dot', 'test-integration': 'node integration_test/reconnection.js && node integration_test/protocol_versions.js' } }); require('load-grunt-tasks')(grunt); grunt.registerTask('default', [ 'string-replace', 'clean', 'browserify', 'uglify', 'usebanner' ]); grunt.registerTask('test', [ 'default', 'exec:test-browser', 'exec:test-node', 'exec:test-integration' ]); }
wily44/T-Plot-Gruntfile.js
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import <iWorkImport/KNAnimationEffect.h> #import "KNAnimationPluginArchiving-Protocol.h" #import "KNChunkableBuildAnimator-Protocol.h" #import "KNFrameBuildAnimator-Protocol.h" @class KNMotionBlurAnimationPluginWrapper, NSMutableArray; // Not exported @interface KNBuildBlinds : KNAnimationEffect <KNChunkableBuildAnimator, KNFrameBuildAnimator, KNAnimationPluginArchiving> { KNMotionBlurAnimationPluginWrapper *_motionBlurWrapper; NSMutableArray *_layerToOldParentArray; } + (void)downgradeAttributes:(id *)arg1 animationName:(id *)arg2 warning:(id *)arg3 type:(int)arg4 isToClassic:(_Bool)arg5 version:(unsigned long long)arg6; + (void)upgradeAttributes:(id *)arg1 animationName:(id)arg2 warning:(id *)arg3 type:(int)arg4 isFromClassic:(_Bool)arg5 version:(unsigned long long)arg6; + (id)blindsAnimationsWithContext:(id)arg1 animationContext:(id)arg2 layerToOldParentArray:(id)arg3; + (id)layersFromParticles:(id)arg1 withBounds:(struct CGRect)arg2 mainLayer:(id)arg3 animationContext:(id)arg4; + (id)generateParticles:(unsigned long long)arg1 withBounds:(struct CGRect)arg2 direction:(unsigned long long)arg3 animationContext:(id)arg4; + (id)thumbnailImageNameForType:(int)arg1; + (int)rendererTypeForCapabilities:(id)arg1; + (_Bool)requiresSingleTexturePerStage; + (id)defaultAttributes; + (void)fillLocalizedDirectionMenu:(id)arg1 forType:(int)arg2; + (unsigned long long)directionType; + (id)localizedMenuString:(int)arg1; + (id)supportedTypes; + (id)animationFilter; + (int)animationCategory; + (id)animationName; - (void)renderFrameWithContext:(id)arg1; - (struct CGRect)frameOfEffectWithFrame:(struct CGRect)arg1 context:(id)arg2; - (id)animationsWithContext:(id)arg1; - (void)animationDidEndWithContext:(id)arg1; - (void)animationWillBeginWithContext:(id)arg1; - (void)dealloc; @end
matthewsot/CocoaSharp-Headers/PrivateFrameworks/iWorkImport/KNBuildBlinds.h
"use strict"; /* this is reusable for the admin and staff user filtering */ angular.module("wrektranet.userFilterCtrl", []) .controller('userFilterCtrl', [ '$scope', 'Restangular', 'promiseTracker', function($scope, Restangular, promiseTracker) { // fixes weird history bug in chrome. clicking a user and going back // makes a json request instead of html Restangular.setRequestSuffix('?1'); $scope.users = []; $scope.loadingTracker = promiseTracker(); $scope.search = {}; // pagination $scope.currentPage = 1; $scope.maxSize = 11; $scope.itemsPerPage = 20; $scope.category = null; $scope.status = 'active'; $scope.filterByRole = function(row) { if ($scope.roleName) { return !!_.where(row.roles, { name: $scope.roleName }).length; } else { return true; } } $scope.filterByShow = function(row) { if ($scope.showName) { return !!_.where(row.shows, { name: $scope.showName }).length; } else { return true; } } $scope.filterByTeam = function(row) { if ($scope.teamName) { return !!_.where(row.teams, { name: $scope.teamName }).length; } else { return true; } } $scope.concatenateRoles = function(roles) { return _.pluck(roles, 'full_name').join(', ') } $scope.concatenateShows = function(shows) { return _.pluck(shows, 'name').join(', ') } $scope.concatenateTeams = function(teams) { return _.pluck(teams, 'name').join(', ') } $scope.init = function(baseUrl, itemsPerPage) { Restangular.setBaseUrl('/' + baseUrl); if (itemsPerPage) { $scope.itemsPerPage = itemsPerPage; } var promise = Restangular.one('users').getList() .then(function(users) { $scope.users = users; }); $scope.$watch('category', function(newValue, oldValue) { if ($scope.search) { delete $scope.search.exec_staff; delete $scope.search.admin; switch (newValue) { case 'admin': $scope.search.admin = "true"; break; case 'exec_staff': $scope.search.exec_staff = "true"; break; } } }); $scope.loadingTracker.addPromise(promise); } } ]);
wrekatlanta/wrektranet-app/assets/javascripts/controllers/userFilterCtrl.js
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.notifications; /** * Constants used in more than a single Notification class, e.g. intents and extra names. */ public class NotificationConstants { // These actions have to be synchronized with the receiver defined in AndroidManifest.xml. public static final String ACTION_CLICK_NOTIFICATION = "org.chromium.chrome.browser.notifications.CLICK_NOTIFICATION"; public static final String ACTION_CLOSE_NOTIFICATION = "org.chromium.chrome.browser.notifications.CLOSE_NOTIFICATION"; public static final String EXTRA_NOTIFICATION_ID = "notification_id"; // TODO(peter): Remove these extras once Notifications are powered by a database on the // native side, that contains all the additional information. public static final String EXTRA_NOTIFICATION_PLATFORM_ID = "notification_platform_id"; public static final String EXTRA_NOTIFICATION_DATA = "notification_data"; /** * Unique identifier for a single sync notification. Since the notification ID is reused, * old notifications will be overwritten. */ public static final int NOTIFICATION_ID_SYNC = 1; /** * Unique identifier for the "Signed in to Chrome" notification. */ public static final int NOTIFICATION_ID_SIGNED_IN = 2; }
markYoungH/chromium.src-chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationConstants.java
/** * This file is provided by Facebook for testing and evaluation purposes * only. Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var ChatServerActionCreators = require('../actions/ChatServerActionCreators'); // !!! Please Note !!! // We are using localStorage as an example, but in a real-world scenario, this // would involve XMLHttpRequest, or perhaps a newer client-server protocol. // The function signatures below might be similar to what you would build, but // the contents of the functions are just trying to simulate client-server // communication and server-side processing. module.exports = { getAllMessages: function() { // simulate retrieving data from a database var rawMessages = JSON.parse(localStorage.getItem('messages')); // simulate success callback ChatServerActionCreators.receiveAll(rawMessages); }, createMessage: function(message, threadName) { // simulate writing to a database var rawMessages = JSON.parse(localStorage.getItem('messages')); var timestamp = Date.now(); var id = 'm_' + timestamp; var threadID = message.threadID || ('t_' + Date.now()); var createdMessage = { id: id, threadID: threadID, threadName: threadName, authorName: message.authorName, text: message.text, timestamp: timestamp }; rawMessages.push(createdMessage); localStorage.setItem('messages', JSON.stringify(rawMessages)); // simulate success callback setTimeout(function() { ChatServerActionCreators.receiveCreatedMessage(createdMessage); }, 0); } };
eroluysal/react-flux-chat-example-src/js/utils/ChatWebAPIUtils.js
class Empty(Exception): pass class Stack: def __init__(self): self.items = [] def push(self, v): self.items.append(v) def pop(self): if self.is_empty(): raise Empty('The stack is empty') return self.items.pop() def peek(self): if self.is_empty(): raise Empty('The stack is empty') return self.items[-1] def size(self): return len(self.items) def is_empty(self): return self.items == []
vadim-ivlev/STUDY-coding/stack.py
Total: \$0.00 # Addition/Subtraction Problem Challenges: Apart and Together - SCISSOR MADNESS! Product Rating File Type PDF (Acrobat) Document File Be sure that you have an application to open this file type before downloading and/or purchasing. 5 MB|21 pages Share Product Description Here's the deal: you want your students to practice addition and subtraction, and you'd like to do more than give them another cruddy worksheet, and you want EVERYONE to be challenged! You also want to be able to customize the activities so that each student gets the appropriate support and challenge, but you don't want to print ten different worksheets! Here's what I came up with: give students problems where they have to add AND subtract in the same problem. Example: What are 2 numbers that are 3 apart and add up to 13? (Algebraically that would be X - Y = 3, and X + Y = 13, but you wouldn't do that with young children, okay?) So how do your students solve this? Well, they can use the strategy "guess, check, adjust," which means they start with two numbers that add up to 13, say 10 and 3, and then check: are they 3 apart? No! They're 7 apart! So they have to adjust, but to adjust they use one of the properties of addition: "compensation." They take something from the 10 and give it to the 3 so that the numbers are closer together. Say they use 2, and now it's 8 and 5, which, wouldn't you know, add up to 13 and are 3 apart! Wow, wasn't that fun? Okay, that's one part of it, but here's the REALLY COOL innovation: the problems have been formatted in a square grid, so that you can cut out problem strips in groups of 3, which your students can attach to the answer sheet. After they've completed a strip, you or a partner can check the answers, and then give them a second strip to complete - the strips have been sequenced so that they get trickier as you move across, or the same as you move down. Does a student need to be encouraged to do harder problems? Cut off a horizontal strip; need more practice with similar levels of challenge? Cut off a vertical strip. There are also "warm up" and "ready, steady, go" problem strips, which introduce students to the concept of "apart & together." I've included black & white as well as color versions of this activity as well as samples of students' work. There are over 45 different problems for students to work on and thousands of way to arrange the strip by using a pair of scissors! Total Pages 21 pages N/A Teaching Duration N/A Report this Resource \$4.95 More products from SamizdatMath \$0.00 \$0.00 \$0.00 \$0.00 \$0.00 \$4.95
finemath-3plus
Schemas.Message = new SimpleSchema({ fileId: { type: String, label: "File Id", optional: true }, timestamp: { type: Date, label: "Timestamp", defaultValue: new Date(), optional: true }, userId: { type: String, label: "User Id", optional: true }, message: { type: String, label: "Message", optional: true }, viewed: { type: Object, label: 'Viewed', optional: true, blackbox: true } }); Message.attachSchema(Schemas.Message);
loredanacirstea/meteor-svg-app-common/schema/schema_message.js
package org.uberfire.wbtest.selenium; import org.openqa.selenium.WebDriver; /** * Selenium Page Object for the UberFire MultiListWorkbenchPanelView. */ public class MultiListPanelWrapper extends AbstractWorkbenchPanelWrapper { public MultiListPanelWrapper( WebDriver driver, String panelId ) { super( driver, panelId ); } // TODO methods for listing parts and switching parts, checking if panel is focused, etc. }
psiroky/uberfire-uberfire-workbench/uberfire-workbench-client-tests/src/test/java/org/uberfire/wbtest/selenium/MultiListPanelWrapper.java
Цитрусови аромати | Парфюмни групи ян. 31, 2009 by Ева Михова in Парфюмни групи Всеки парфюм в тази група се състои от основен цитрусов аромат на лимон, портокал, мандарина или грейпфрут, допълнен с други цитрусови елементи като портокалов цвят, масло нероли (дестилирано масло от портокалов цвят) или petit grain. Отличават се със свежест и лекота. Понякога в тях присъстват цветни или шипрови нотки, а комбинирани с билкови аромати като мента, розмарин и мащерка, оформят групата на цитрусово-зелените парфюми, в която спадат лекия унисекс CK – Calvin Klein, Green Tea на Elizabeth Arden и Eau Torride – “огнената вода” на Givenchy. Tagged with: цитрусово-зелен
c4-bg
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The primary maintainer of this project is # Arezqui Belaid <[email protected]> # # IMPORT SETTINGS # =============== from settings import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } # Celery test BROKER_BACKEND = "memory" CELERY_ALWAYS_EAGER = True SOUTH_TESTS_MIGRATE = False # LOGGING # ======= LOGGING = { 'version': 1, 'disable_existing_loggers': True, } # INSTALLED_APPS += ('django_nose', ) # TEST_RUNNER = 'django_nose.run_tests'
romonzaman/newfies-dialer-install/conf/settings_travis.py
using Chocolatey.Explorer.Powershell; using NUnit.Framework; namespace Chocolatey.Explorer.Test.Powershell { public class TestRunSync { [Test] public void IfCanRunCommand() { var runSync = new RunSync(); runSync.Run("write test"); } [Test] public void IfCanRunCommandAndReturnOutput() { var runSync = new RunSync(); var result = ""; runSync.OutputChanged += (x) => result = x; runSync.Run("write test"); Assert.AreEqual("test\r\n\r\n", result); } [Test] public void IfCanRunCommandAndRaiseEventRunFinished() { var runSync = new RunSync(); var result = 0; runSync.RunFinished += () => result = 1; runSync.Run("write test"); Assert.AreEqual(1, result); } [Test] public void IfCanRunCommandWithNoOutputRaisesEvenOutputChanged() { var runSync = new RunSync(); var result = ""; runSync.OutputChanged += (x) => result = x; runSync.Run("write"); Assert.AreEqual("No output", result); } [Test] public void IfCanRunCommandWithNoOutputRaisesEventRunFinished() { var runSync = new RunSync(); var result = 0; runSync.RunFinished += () => result = 1; runSync.Run("write"); Assert.AreEqual(1, result); } [Test] public void IfCanRunWrongCommandRaisesEventOutputChanged() { var runSync = new RunSync(); var result = ""; runSync.OutputChanged += (x) => result = x; runSync.Run("thingdingding"); Assert.AreEqual("No output", result); } [Test] public void IfCanRunWrongCommandWithNoOutputRaisesEventRunFinished() { var runSync = new RunSync(); var result = 0; runSync.RunFinished += () => result = 1; runSync.Run("thingdingding"); Assert.AreEqual(1, result); } } }
mwrock/ChocolateyGUI-Chocolatey.Explorer.Test/Powershell/TestRunSync.cs
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2022 Ryo Suzuki // Copyright (c) 2016-2022 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # include "D3D11Texture2DDesc.hpp" namespace s3d { D3D11Texture2DDesc::D3D11Texture2DDesc(const Size& _size, const TextureFormat& _format, const TextureDesc _desc, const uint32 _mipLevels, const uint32 _multisampleCount, const uint32 _multismapleQuality, const D3D11_USAGE _usage, const uint32 _bindFlags, const uint32 _CPUAccessFlags, const uint32 _miscFlags) noexcept : size{ _size } , format{ _format } , desc{ _desc } , mipLevels{ _mipLevels } , multisampleCount{ _multisampleCount } , multismapleQuality{ _multismapleQuality } , usage{ _usage } , bindFlags{ _bindFlags } , CPUAccessFlags{ _CPUAccessFlags } , miscFlags{ _miscFlags } {} uint32 D3D11Texture2DDesc::stride() const noexcept { return (format.pixelSize() * size.x); } bool D3D11Texture2DDesc::isSRGB() const noexcept { return format.isSRGB(); } D3D11_TEXTURE2D_DESC D3D11Texture2DDesc::makeTEXTURE2D_DESC() const noexcept { return CD3D11_TEXTURE2D_DESC(DXGI_FORMAT(format.DXGIFormat()), size.x, size.y, 1, mipLevels, bindFlags, usage, CPUAccessFlags, multisampleCount, multismapleQuality, miscFlags); } D3D11_SHADER_RESOURCE_VIEW_DESC D3D11Texture2DDesc::makeSHADER_RESOURCE_VIEW_DESC() const noexcept { return D3D11_SHADER_RESOURCE_VIEW_DESC{ .Format = DXGI_FORMAT(format.DXGIFormat()), .ViewDimension = ((multisampleCount == 1) ? D3D11_SRV_DIMENSION_TEXTURE2D : D3D11_SRV_DIMENSION_TEXTURE2DMS), .Texture2D = { 0, mipLevels } }; } D3D11_RENDER_TARGET_VIEW_DESC D3D11Texture2DDesc::makeD3D11_RENDER_TARGET_VIEW_DESC() const noexcept { D3D11_RENDER_TARGET_VIEW_DESC rtvDesc{ .Format = DXGI_FORMAT(format.DXGIFormat()), .ViewDimension = ((multisampleCount == 1) ? D3D11_RTV_DIMENSION_TEXTURE2D : D3D11_RTV_DIMENSION_TEXTURE2DMS) }; if (rtvDesc.ViewDimension == D3D11_RTV_DIMENSION_TEXTURE2D) { rtvDesc.Texture2D = { 0 }; } return rtvDesc; } }
Siv3D/OpenSiv3D-Siv3D/src/Siv3D-Platform/WindowsDesktop/Siv3D/Texture/D3D11/D3D11Texture2DDesc.cpp
var assert = require('assert'); var duck = require('../lib/rubberduck'); var events = require('events'); describe('Synchronous function wrapping', function() { it('wraps anonymous functions', function(done) { // Create an event emitter to attach to the wrapped function var emitter = new events.EventEmitter(); // The function to wrap var fn = function() { assert.ok(true, 'Fn called'); return 'asserting'; }; var wrapped = duck.wrap.fn(emitter, fn); // Emitted before emitter.on('before', function(args) { assert.equal(args[0], 'assert'); }); // Emitted after emitter.on('after', function(result) { assert.equal(result, 'asserting'); done(); }); assert.equal(wrapped('assert'), 'asserting'); }); it('wraps named functions on objects', function(done) { var emitter = new events.EventEmitter(); var fn = function() { assert.ok(true, 'Fn called'); return 'asserting'; }; var wrapped = duck.wrap.fn(emitter, fn, false, 'quack'); emitter.on('before', function(args, context, method) { assert.equal(args[0], 'assert'); assert.equal(method, 'quack'); }); emitter.on('beforeQuack', function(args) { assert.equal(args[0], 'assert'); }); emitter.on('after', function(result, args, context, method) { assert.equal(result, 'asserting'); assert.equal(method, 'quack'); }); emitter.on('afterQuack', function(result) { assert.equal(result, 'asserting'); done(); }); assert.equal(wrapped('assert'), 'asserting'); }); it('wraps keeping the scope', function(done) { var obj = { number: 42, method: function() { return this.number; } }; var emitter = new events.EventEmitter(); var wrapped = duck.wrap.fn(emitter, obj.method, false, 'method', obj); emitter.on('after', function(result) { assert.equal(result, 42); done(); }); assert.equal(wrapped(), 42); }); });
waynebunch/feathers-chat-node_modules/rubberduck/test/wrap.fn.test.js
'use strict'; // Flags: --expose_internals --no-warnings // The --no-warnings flag only supresses writing the warning to stderr, not the // emission of the corresponding event. This test file can be run without it. const common = require('../common'); process.noDeprecation = true; const assert = require('assert'); function listener() { common.fail('received unexpected warning'); } process.addListener('warning', listener); const internalUtil = require('internal/util'); internalUtil.printDeprecationMessage('Something is deprecated.'); // The warning would be emitted in the next tick, so continue after that. process.nextTick(common.mustCall(() => { // Check that deprecations can be re-enabled. process.noDeprecation = false; process.removeListener('warning', listener); process.addListener('warning', common.mustCall((warning) => { assert.strictEqual(warning.name, 'DeprecationWarning'); assert.strictEqual(warning.message, 'Something else is deprecated.'); })); internalUtil.printDeprecationMessage('Something else is deprecated.'); }));
domino-team/openwrt-cc-package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/test/parallel/test-process-no-deprecation.js
# -*- coding: utf-8 -*- # # furl - URL manipulation made simple. # # Arthur Grunseid # grunseid.com # [email protected] # # License: Build Amazing Things (Unlicense) import sys if sys.version_info[0] == 2: basestring = basestring else: basestring = (str, bytes) if list(sys.version_info[:2]) >= [2, 7]: from collections import OrderedDict else: from ordereddict import OrderedDict class UnicodeMixin(object): """ Mixin class to handle defining the proper __str__/__unicode__ methods in Python 2 or 3. """ if sys.version_info[0] >= 3: # Python 3 def __str__(self): return self.__unicode__() else: # Python 2 def __str__(self): return self.__unicode__().encode('utf8')
penyatree/furl-furl/compat.py
/* Copyright (c) 2015 Sandro Knauß <[email protected]> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef ACTIONPIPETHROUGH_TEST_H #define ACTIONPIPETHROUGH_TEST_H #include <QtCore/QObject> namespace MailCommon { class FilterAction; } class FilterActionPipeThroughTest : public QObject { Q_OBJECT private Q_SLOTS: void testWithNoCommand(); void testCommandWithoutOutput(); void testWithMailOutput(); void testCopyMail(); void testXUidChange(); void testXUidUnchange(); void testXUidRemoved(); private: void setOutput(MailCommon::FilterAction *filter, const QByteArray &output); }; #endif
kolab-groupware/kdepim-mailcommon/filter/tests/actionpipethrough.h
function ProfileController($scope, $gloriaAPI, $timeout, $gloriaLocale, Login, $filter) { $scope.ready = false; $scope.initValues = function() { $scope.update = { fault : {}, styles : { password : {} } }; }; $scope.avatar = {}; $scope.about = { infoLoaded : false, ocupations : [ 'student', 'scientist', 'other' ], langOcupations : [ 'profile.about.ocupation.student', 'profile.about.ocupation.scientist', 'profile.about.ocupation.other' ], selectOcupation : function(index) { $gloriaAPI.setOcupation($scope.about.ocupations[index], function( data) { $scope.about.ocupation = $scope.about.langOcupations[index]; }, function(error) { }); } }; $scope.initValues(); $scope.warningColor = 'rgb(255, 82, 0)'; $gloriaLocale.loadResource('profile/lang', 'profile', function() { $scope.avatar.adHtml = "<p>" + $filter('highlight')($filter('i18n')('profile.avatar.ad'), 'Gravatar.com') + "</p>"; $scope.ready = true; }); $gloriaAPI.getUserInformation(function(data) { $scope.about.ocupation = 'profile.about.ocupation.' + data.ocupation; $gloriaAPI.getUserKarma(data.name, function(karmaData) { if (karmaData != undefined && karmaData != '') { $scope.about.karma = karmaData.karma[0]; console.log(karmaData); } else { $scope.about.karma = "?"; } $scope.about.infoLoaded = true; }, function(error) { $scope.about.infoLoaded = true; }); }, function(error) { $scope.about.infoLoaded = true; }); $scope.updatePassword = function() { if ($scope.update.password != $scope.update.repPassword) { $scope.update.fault.reason = "match"; $scope.update.styles.password.borderColor = $scope.warningColor; $scope.update.fault.on = true; } else { Login .changePassword( $scope.update.password, function() { $scope.update.fault.on = false; $scope.update.success = true; // $scope.update.timer = // $timeout($scope.update.timeout, 2000); }, function(data, status) { if (status == 406) { $scope.update.styles.password.borderColor = $scope.warningColor; if (data.type == "validation") { if (data.description == "password") { $scope.update.fault.reason = 'inv-password'; } else { $scope.update.fault.reason = 'unknown'; } } else { $scope.update.fault.reason = 'unknown'; } } else { $scope.update.fault.reason = 'server'; } $scope.update.fault.on = true; }); } }; /* * $scope.update.timeout = function () { $scope.login.disconnect(); * $scope.gotoWelcome(); }; */ $scope.$watch('update.password', function() { if ($scope.update.fault.on && $scope.update.password != undefined) { $scope.update.styles.password.borderColor = undefined; $scope.update.fault.on = false; } }); $scope.$watch('update.repPassword', function() { if ($scope.update.fault.on && $scope.update.repPassword != undefined) { $scope.update.styles.password.borderColor = undefined; $scope.update.fault.on = false; } }); $scope.$on('$destroy', function() { // $timeout.cancel($scope.update.timer); }); }
fserena/GLORIAHub-WebContent/profile/js/profile.js
from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ def min_length_three(value): if len(value) < 3: raise ValidationError( _('%(value)s has less than three characters'), params={'value': value}, )
smith2255/notes-notemaker/validators.py
/* ============================================================================== This file is part of the JUCE library - "Jules' Utility Class Extensions" Copyright 2004-11 by Raw Material Software Ltd. ------------------------------------------------------------------------------ JUCE can be redistributed and/or modified under the terms of the GNU General Public License (Version 2), as published by the Free Software Foundation. A copy of the license is included in the JUCE distribution, or can be found online at www.gnu.org/licenses. JUCE 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. ------------------------------------------------------------------------------ To release a closed-source product which uses JUCE, commercial licenses are available: visit www.rawmaterialsoftware.com/juce for more information. ============================================================================== */ #ifndef __JUCE_NEWLINE_JUCEHEADER__ #define __JUCE_NEWLINE_JUCEHEADER__ //============================================================================== /** This class is used for represent a new-line character sequence. To write a new-line to a stream, you can use the predefined 'newLine' variable, e.g. @code myOutputStream << "Hello World" << newLine << newLine; @endcode The exact character sequence that will be used for the new-line can be set and retrieved with OutputStream::setNewLineString() and OutputStream::getNewLineString(). */ class JUCE_API NewLine { public: /** Returns the default new-line sequence that the library uses. @see OutputStream::setNewLineString() */ static const char* getDefault() noexcept { return "\r\n"; } /** Returns the default new-line sequence that the library uses. @see getDefault() */ operator String() const { return getDefault(); } }; //============================================================================== /** A predefined object representing a new-line, which can be written to a string or stream. To write a new-line to a stream, you can use the predefined 'newLine' variable like this: @code myOutputStream << "Hello World" << newLine << newLine; @endcode */ extern NewLine newLine; //============================================================================== /** Writes a new-line sequence to a string. You can use the predefined object 'newLine' to invoke this, e.g. @code myString << "Hello World" << newLine << newLine; @endcode */ JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const NewLine&); #endif // __JUCE_NEWLINE_JUCEHEADER__
connerlacy/QuNeoDemo-JuceLibraryCode/modules/juce_core/text/juce_NewLine.h
/*global jQuery, $, angular*/ 'use strict'; /** * @ngdoc function * @name myApp.controller:MainCtrl * @description * # MainCtrl * Controller of the angularBluemixSeedApp */ angular.module('myApp') .controller('MainCtrl', ['$scope', 'contentFactory', function($scope, contentFactory) { // Getting web content (wc) $scope.wc = {}; contentFactory.getContent().then(function(response) { $scope.wc = response.data; }).catch(function (response) { console.error('MainCtrl error', response.status, response.data); }).finally(function(){ console.log('MainCtrl ready!'); }); $scope.username = ''; $scope.result = ''; $scope.demoPrintUsername = function() { $scope.result = $scope.username; if ($scope.result !== '') { angular.element('.demo-print').show(); } }; $scope.test = 'watch'; }]);
rubengmz/bluemix-nodeangularseed-gulp-app/ng-app/controllers/main.controller.js
import {Component} from './Component'; import {attributes, copy} from './prototype/attributes'; import {CompositionError} from './errors'; @attributes( copy('position', 'rotation', 'quaternion', 'target') ) /** * @class CameraComponent * @category core * @param {Object} [params] - The parameters object. * @param {Object} [instructions] - The instructions object. * @extends module:core.Component * @memberof module:core */ class CameraComponent extends Component { /** * Default values for parameters * @member {Object} module:core.CameraComponent#defaults * @static * @default * { * build: true, * * position: {x: 0, y: 0, z: 0}, * rotation: {x: 0, y: 0, z: 0} * } */ static defaults = { ...Component.defaults, build: true, position: {x: 0, y: 0, z: 0}, rotation: {x: 0, y: 0, z: 0} }; /** * Static instructions * @member {Object} module:core.CameraComponent#instructions * @static * @default * { * position: ['x', 'y', 'z'], * rotation: ['x', 'y', 'z'], * scale: ['x', 'y', 'z'] * } */ static instructions = { position: ['x', 'y', 'z'], rotation: ['x', 'y', 'z'], scale: ['x', 'y', 'z'] }; static from(camera, params = {}) { params.build = false; const component = new CameraComponent(params); component.native = camera; component.wrap(); return component; } constructor(params, defaults = CameraComponent.defaults, instructions = CameraComponent.instructions) { super(params, defaults, instructions); if (this.params.build) { const build = this.build(this.params); if (!build) { throw new CompositionError( 'CameraComponent', '.build() method should return a THREE.Object3D or a Promise resolved with THREE.Object3D.', this ); } if (build instanceof Promise) { build.then(native => { this.native = native; }); } else this.native = build; this.wait(this.wrap()); } this.applyCommand('postIntegrate'); } // BUILDING & WRAPPING /** * @method build * @instance * @description Build livecycle should return a native object. * @throws {CompositionError} * @memberof module:core.CameraComponent */ build() { throw new CompositionError( 'CameraComponent', 'Instance should have it\'s own .build().', this ); } /** * @method wrap * @instance * @description Wraps transforms (`position` & `rotation`) * @return {Promise} Resolved when action is completed * @memberof module:core.CameraComponent */ wrap() { return new Promise(resolve => { this.defer(() => { this.position.set(this.params.position.x, this.params.position.y, this.params.position.z); this.rotation.set(this.params.rotation.x, this.params.rotation.y, this.params.rotation.z); this.applyBridge({onWrap: 1}); resolve(this); }); }); } /** * @method copy * @instance * @description Copy source transforms & execute `Component.copy()` * @param {CameraComponent} source - The camera component to copy * @return {this} CameraComponent * @memberof module:core.CameraComponent */ copy(source) { return super.copy(source, () => { if (this.target) this.target.copy(source.target()); this.position.copy(source.position); this.rotation.copy(source.rotation); this.quaternion.copy(source.quaternion); }); } /** * @method clone * @instance * @description Make a clone of this CameraComponent using `.copy()` * @return {CameraComponent} clone of this object * @memberof module:core.CameraComponent */ clone() { return new this.constructor({build: false}).copy(this); } } export { CameraComponent };
WhitestormJS/whs.js-src/core/CameraComponent.js
var app = require('./server'), http = require('http'); process.env.NODE_ENV = 'development'; var server = http.createServer(app); server.listen(3999); if (module.hot) { // This will handle HMR and reload the server module.hot.accept('./server', function() { server.removeListener('request', app); app = require('./server'); server.on('request', app); console.log('Server reloaded!'); }); }
testpackbin/testpackbin-start.js
LIBVIRT_CONST = { 'VIR_SECURITY_MODEL_BUFLEN': 257, 'VIR_SECURITY_LABEL_BUFLEN': 4097, 'VIR_SECURITY_DOI_BUFLEN': 257, 'VIR_UUID_BUFLEN': 16, } class Enum(object): def __init__(self, *keys): self._keys = keys for i, k in enumerate(keys): setattr(self, k, i) def __getitem__(self, key): return self._keys[key] def __contains__(self, key): return key < len(self._keys) packet_type = Enum('CALL', 'REPLY', 'EVENT', 'STREAM') status = Enum('OK', 'ERROR', 'CONTINUE')
GaretJax/ipd-ipd/libvirt/constants.py
#ifndef INCLUDED_GETOPT_PORT_H #define INCLUDED_GETOPT_PORT_H #if defined(__cplusplus) extern "C" { #endif extern const int no_argument; extern const int required_argument; extern const int optional_argument; extern char* optarg; extern int optind, opterr, optopt; struct option { const char* name; int has_arg; int* flag; int val; }; int getopt(int argc, char* const argv[], const char* optstring); int getopt_long(int argc, char* const argv[], const char* optstring, const struct option* longopts, int* longindex); #if defined(__cplusplus) } #endif #endif // INCLUDED_GETOPT_PORT_H
binhfile/stm32-freertos-extralib/posix/include/getopt.h
/* * This file is part of helper, licensed under the MIT License. * * Copyright (c) lucko (Luck) <[email protected]> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package me.lucko.helper.cache; import com.google.common.base.Preconditions; import java.util.Objects; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; /** * An expiring supplier extension. * * <p>The delegate supplier is only called on executions of {@link #get()} if the * result isn't already calculated.</p> * * @param <T> the supplied type */ public final class Expiring<T> implements Supplier<T> { public static <T> Expiring<T> suppliedBy(Supplier<T> supplier, long duration, TimeUnit unit) { Objects.requireNonNull(supplier, "supplier"); Preconditions.checkArgument(duration > 0); Objects.requireNonNull(unit, "unit"); return new Expiring<>(supplier, duration, unit); } private final Supplier<T> supplier; private final long durationNanos; private volatile T value; // when to expire. 0 means "not yet initialized". private volatile long expirationNanos; private Expiring(Supplier<T> supplier, long duration, TimeUnit unit) { this.supplier = supplier; this.durationNanos = unit.toNanos(duration); } @Override public T get() { long nanos = this.expirationNanos; long now = System.nanoTime(); if (nanos == 0 || now - nanos >= 0) { synchronized (this) { if (nanos == this.expirationNanos) { // recheck for lost race // compute the value using the delegate T t = this.supplier.get(); this.value = t; // reset expiration timer nanos = now + this.durationNanos; // In the very unlikely event that nanos is 0, set it to 1; // no one will notice 1 ns of tardiness. this.expirationNanos = (nanos == 0) ? 1 : nanos; return t; } } } return this.value; } }
lucko/helper-helper/src/main/java/me/lucko/helper/cache/Expiring.java
public class FightSystem { /** * @return The winner of the fight */ public Fighter Fight(Fighter fighter1, Fighter fighter2) { while(fighter1.isAlive() && fighter2.isAlive()) { fighter1.hit(fighter2); if(fighter2.isAlive()) fighter2.hit(fighter1); } if(fighter1.isAlive()) return fighter1; else return fighter2; } }
PaulPidou/text-game-src/FightSystem.java
package zombie_dice; import java.util.Arrays; public class GameState { // ==================== METHODS ==================== public GameState(int _players, int _currentPlayer, int[] _scores) { assert _players > 0; players = _players; assert _currentPlayer < _players; currentPlayer = _currentPlayer; assert _scores.length == _players; if (_currentPlayer != 0) { for (int currentPlayer = _currentPlayer; currentPlayer != _players; ++currentPlayer) { assert _scores[currentPlayer] < ZombieDice.WINNING_SCORE; } } scores = _scores; } public GameState(int _players, int _currentPlayer, int _uniformScore) { assert _players > 0; players = _players; assert _currentPlayer < _players; currentPlayer = _currentPlayer; assert _uniformScore >= 0; if (_currentPlayer != 0) { assert _uniformScore < ZombieDice.WINNING_SCORE; } scores = new int[players]; Arrays.fill(scores, _uniformScore); } public int players() { return players; } public int currentPlayer() { return currentPlayer; } public int[] scores() { return scores; } public void nextPlayer() { currentPlayer = ++currentPlayer % players; } public void print() { System.out.println("----- PRINTING GAMESTATE -----"); System.out.println("PLAYERS:\t" + players); System.out.println("CURRENT_PLAYER:\t" + currentPlayer); System.out.println("SCORES:\t\t" + Arrays.toString(scores)); System.out.println("----- FINISHED PRINTING GAMESTATE -----"); } // ==================== VARIABLES ==================== private int players, currentPlayer; private int[] scores; }
gtobkin/zombie-dice-src/zombie_dice/GameState.java
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ This module implements symmetry-related structure forms. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "Mar 9, 2012" import numpy as np from pymatgen.core.structure import Structure class SymmetrizedStructure(Structure): """ This class represents a symmetrized structure, i.e. a structure where the spacegroup and symmetry operations are defined. This class is typically not called but instead is typically obtained by calling pymatgen.symmetry.analyzer.SpacegroupAnalyzer.get_symmetrized_structure. Args: structure (Structure): Original structure spacegroup (Spacegroup): An input spacegroup from SpacegroupAnalyzer. equivalent_positions: Equivalent positions from SpacegroupAnalyzer. .. attribute: equivalent_indices indices of structure grouped by equivalency """ def __init__(self, structure, spacegroup, equivalent_positions): super(SymmetrizedStructure, self).__init__( structure.lattice, [site.species_and_occu for site in structure], structure.frac_coords, site_properties=structure.site_properties) self._spacegroup = spacegroup u, inv = np.unique(equivalent_positions, return_inverse = True) self.equivalent_indices = [[] for i in range(len(u))] self._equivalent_sites = [[] for i in range(len(u))] for i, inv in enumerate(inv): self.equivalent_indices[inv].append(i) self._equivalent_sites[inv].append(self.sites[i]) @property def equivalent_sites(self): """ All the sites grouped by symmetry equivalence in the form of [[sites in group1], [sites in group2], ...] """ return self._equivalent_sites def find_equivalent_sites(self, site): """ Finds all symmetrically equivalent sites for a particular site Args: site (PeriodicSite): A site in the structure Returns: ([PeriodicSite]): List of all symmetrically equivalent sites. """ for sites in self.equivalent_sites: if site in sites: return sites raise ValueError("Site not in structure")
sonium0/pymatgen-pymatgen/symmetry/structure.py
/* * Copyright (C) 2002-2003 Jean-Charles Salzeber <[email protected]> * * This file is part of penggy. * * 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. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * $Id$ * */ #ifndef __P3_HEADER_H__ #define __P3_HEADER_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #define P3_MAX_SIZE 1800 #define P3_SIZE_OFFSET 3 #define P3_DATA_OFFSET 8 struct p3hdr { u_int8_t magic; /* always 0x5a */ u_int16_t checksum; /* a simple CRC16 on the packet not including magic */ u_int16_t size; /* total size of the packet from next byte, not including the stop byte */ u_int8_t seq; u_int8_t ack; #if WORDS_BIGENDIAN u_int8_t client:1; /* this bit is always set for client */ u_int8_t type:7; /* see beelow */ #else u_int8_t type:7; /* see beelow */ u_int8_t client:1; /* this is always set for client */ #endif } __attribute__ ((packed)); #define PACKET_MIN_SEQ 0x10 #define PACKET_MAX_SEQ 0x7f #define P3_MAGIC 0x5a #define P3_STOP 0x0d #define TYPE_DATA 0x20 /* Normal data packet */ #define TYPE_SS 0x21 #define TYPE_SSR 0x22 #define TYPE_INIT 0x23 /* The initial packet to establish the connection to the server */ #define TYPE_ACK 0x24 /* An acknowledgement packet */ #define TYPE_NACK 0x25 /* sent when there is a break in the packet numbering */ #define TYPE_PING 0x26 /* an explicit acknowledgement demand this is especially useful to see if host is alive */ #endif /* __P3_HEADER_H__ */
balr0g/pengfork-include/p3/header.h
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "AM", "PM" ], "DAY": [ "dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi" ], "ERANAMES": [ "avant J\u00e9sus-Christ", "apr\u00e8s J\u00e9sus-Christ" ], "ERAS": [ "av. J.-C.", "ap. J.-C." ], "MONTH": [ "janvier", "f\u00e9vrier", "mars", "avril", "mai", "juin", "juillet", "ao\u00fbt", "septembre", "octobre", "novembre", "d\u00e9cembre" ], "SHORTDAY": [ "dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam." ], "SHORTMONTH": [ "janv.", "f\u00e9vr.", "mars", "avr.", "mai", "juin", "juil.", "ao\u00fbt", "sept.", "oct.", "nov.", "d\u00e9c." ], "fullDate": "EEEE d MMMM y", "longDate": "d MMMM y", "medium": "d MMM y HH:mm:ss", "mediumDate": "d MMM y", "mediumTime": "HH:mm:ss", "short": "dd/MM/y HH:mm", "shortDate": "dd/MM/y", "shortTime": "HH:mm" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "\u00a3", "DECIMAL_SEP": ",", "GROUP_SEP": "\u00a0", "PATTERNS": [ { "gSize": 3, "lgSize": 3, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, { "gSize": 3, "lgSize": 3, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "-", "negSuf": "\u00a0\u00a4", "posPre": "", "posSuf": "\u00a0\u00a4" } ] }, "id": "fr-sy", "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} }); }]);
vvp5511/VelvetPath-webapp/Scripts/i18n/angular-locale_fr-sy.js
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) // Copyright 2008-2016 National ICT Australia (NICTA) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ------------------------------------------------------------------------ //! \addtogroup fn_inplace_trans //! @{ template<typename eT> inline typename enable_if2 < is_cx<eT>::no, void >::result inplace_htrans ( Mat<eT>& X, const char* method = "std" ) { arma_extra_debug_sigprint(); inplace_strans(X, method); } template<typename eT> inline typename enable_if2 < is_cx<eT>::yes, void >::result inplace_htrans ( Mat<eT>& X, const char* method = "std" ) { arma_extra_debug_sigprint(); const char sig = (method != nullptr) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'l')), "inplace_htrans(): unknown method specified" ); const bool low_memory = (sig == 'l'); if( (low_memory == false) || (X.n_rows == X.n_cols) ) { op_htrans::apply_mat_inplace(X); } else { inplace_strans(X, method); X = conj(X); } } template<typename eT> inline typename enable_if2 < is_cx<eT>::no, void >::result inplace_trans ( Mat<eT>& X, const char* method = "std" ) { arma_extra_debug_sigprint(); const char sig = (method != nullptr) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'l')), "inplace_trans(): unknown method specified" ); inplace_strans(X, method); } template<typename eT> inline typename enable_if2 < is_cx<eT>::yes, void >::result inplace_trans ( Mat<eT>& X, const char* method = "std" ) { arma_extra_debug_sigprint(); const char sig = (method != nullptr) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'l')), "inplace_trans(): unknown method specified" ); inplace_htrans(X, method); } //! @}
kumanna/armadillo-debian-include/armadillo_bits/fn_inplace_trans.hpp
'use strict'; angular.module('SatanApp.paktas', []) .controller('PaktasController', ['$scope', 'paktasFactory', 'paktasVardaiFactory', function($scope, paktasFactory, paktasVardaiFactory) { $scope.paktas = { vardas: '', pastas: '', pastas2: '', lytis: 'abominacija', titulas: '', atvykstu: '', kunas: '', apigosiki: '', pasiulymas: '' }; $scope.gautiTitula = function () { $scope.paktas.titulas = paktasVardaiFactory.getTitle($scope.paktas.lytis, $scope.paktas.vardas); }; $scope.validateTitulas = function () { //console.log($scope.paktas.vardas.length > 2 , $scope.paktas.pastas , $scope.paktas.pastas == $scope.paktas.pastas2); return (($scope.paktas.vardas.length > 2) && $scope.paktas.pastas && $scope.paktas.pastas == $scope.paktas.pastas2) }; $scope.validatePoreikiai = function () { //console.log($scope.paktas.atvykstu.length > 0 , $scope.paktas.kunas.length > 0 , $scope.paktas.apigosiki.length > 0); return ($scope.paktas.atvykstu.length > 0 && $scope.paktas.kunas.length > 0 && $scope.paktas.apigosiki.length > 0) }; /*console.log(paktasVardaiFactory.getTitle('istvirkelis', 'Pranas')); console.log(paktasVardaiFactory.getTitle('istvirkele', 'Gertrūda')); console.log(paktasVardaiFactory.getTitle('abominacija', 'Leonidas')); */ $scope.registered = false; $scope.registerAcademon = function () { var academon = { vardas: $scope.paktas.vardas, pastas: $scope.paktas.pastas, lytis: $scope.paktas.lytis, titulas: $scope.paktas.titulas, atvykstu: $scope.paktas.atvykstu, kunas: $scope.paktas.kunas, apigosiki: $scope.paktas.apigosiki, pasiulymas: $scope.paktas.pasiulymas }; paktasFactory.insertAkademons(academon).then(function(response){ $scope.registered = true; $scope.error = null; }, function (error) { $scope.registered = true; $scope.error = error; }) } }]);
dearlordlt/festas-app/akademonai/ad.paktas/paktas.js
// This file was procedurally generated from the following sources: // - src/declarations/redeclare-with-function-declaration.case // - src/declarations/redeclare-allow-sloppy-function/block-attempt-to-redeclare-generator-declaration.template /*--- description: redeclaration with FunctionDeclaration (GeneratorDeclaration in BlockStatement) esid: sec-block-static-semantics-early-errors features: [generators] flags: [generated] negative: phase: parse type: SyntaxError info: | Block : { StatementList } It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains any duplicate entries. ---*/ throw "Test262: This statement should not be evaluated."; { function* f() {} function f() {} }
sebastienros/jint-Jint.Tests.Test262/test/language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js
Sehen Sie hier detailliert das Wetter bzw. den Wetterbericht für die nächsten 48 Stunden. Bitte beachten Sie, dass die Basis für diese Kompaktvorhersage das Wettermodell ist, das im Schnitt die beste Vorhersage für Greifenhain (Spree-Neiße, Brandenburg, Deutschland) liefert. Alternativ haben wir nicht nur die ortsbezogene Ausgabe der Wetterprognosen, sondern auch noch sämtliche dazugehörige Modellkarten im Angebot. Für Greifenhain sind folgende Wettermodelle verfügbar: ECMWF/Global Euro HD (ECMWF), Rapid ECMWF/Global Euro HD (Rapid ECMWF), Global US Standard (FV3) (GFS/FV3), Global US Standard (GFS), Europa HD (ICON-EU), Mitteleuropa Rapid Update HD (COSMO-D2), Global German Standard (ICON), Mitteleuropa Super HD (Super HD), Europa Swiss HD 4x4 (Swiss HD 4x4), Europa Britain HD (EURO-4), Mitteleuropa French HD (AROME), Global French Standard (ARPEGE), Global Britain Standard (UKMO), Europa Dutch Standard (HIRLAM-KNMI), Global Australian Standard (ACCESS-G), Europa Finnish HD (HIRLAM-FMI), Global Canadian Standard (GEM) - Kartenausschnitt ist Brandenburg. Aktuelles Wetter - Wir haben für Sie auf einen Blick alle relevanten Informationen rund um das Wetter in Greifenhain (Spree-Neiße, Brandenburg, Deutschland) zusammengestellt. Sollten aktuell Unwetterwarnungen für Greifenhain vorliegen, so bekommen Sie diese hier am Kopf der Seite angezeigt, mit einer kurzen Zusammenfassung, um was für ein Unwetter es sich handelt, wie stark es aktuell ist und wo die Gefahren dabei sind. Ob es in Greifenhain gerade regnet oder, ob in Kürze Regen zu erwarten ist, können Sie auf dem unserem hochaufgelösten Regenradar "Radar HD" für Brandenburg sehen. Wo sich aktuell Gewitter befinden und wo in den letzten Wochen und Monaten Blitze in Greifenhain und Umgebung eingeschlagen haben und wie stark diese waren, finden Sie in unserem Blitzanalyse-Tool. Ob gerade die Sonne scheint oder ob dichte Bewölkung in Greifenhain herrscht, können Sie bei uns entweder auf unseren hochaufgelösten Satellitenbildern von Greifenhain oder auch unter Messwerte Brandenburg sehen. Die nächstgelegenen Orte rund um Greifenhain - Kolonie Greifenhain, Buchholz, Ressen, Radensdorf, Neupetershain Nord, Göritz, Domsdorf, Petershain, Lubochow, Pritzen
c4-de
/* * Copyright 2014-2019 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. */ package com.amazonaws.services.waf.model.waf_regional.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.waf.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * ListIPSetsResult JSON Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ListIPSetsResultJsonUnmarshaller implements Unmarshaller<ListIPSetsResult, JsonUnmarshallerContext> { public ListIPSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListIPSetsResult listIPSetsResult = new ListIPSetsResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return listIPSetsResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("NextMarker", targetDepth)) { context.nextToken(); listIPSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("IPSets", targetDepth)) { context.nextToken(); listIPSetsResult.setIPSets(new ListUnmarshaller<IPSetSummary>(IPSetSummaryJsonUnmarshaller.getInstance()).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return listIPSetsResult; } private static ListIPSetsResultJsonUnmarshaller instance; public static ListIPSetsResultJsonUnmarshaller getInstance() { if (instance == null) instance = new ListIPSetsResultJsonUnmarshaller(); return instance; } }
jentfoo/aws-sdk-java-aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/model/waf_regional/transform/ListIPSetsResultJsonUnmarshaller.java
'use strict'; import { module } from 'angular'; import { STAGE_COMMON_MODULE } from '../common/stage.common.module'; import { CORE_PIPELINE_CONFIG_STAGES_STAGE_MODULE } from '../stage.module'; import { CORE_PIPELINE_CONFIG_STAGES_TAGIMAGE_TAGIMAGESTAGE } from './tagImageStage'; export const CORE_PIPELINE_CONFIG_STAGES_TAGIMAGE_TAGIMAGESTAGE_MODULE = 'spinnaker.core.pipeline.stage.tagImage'; export const name = CORE_PIPELINE_CONFIG_STAGES_TAGIMAGE_TAGIMAGESTAGE_MODULE; // for backwards compatibility module(CORE_PIPELINE_CONFIG_STAGES_TAGIMAGE_TAGIMAGESTAGE_MODULE, [ CORE_PIPELINE_CONFIG_STAGES_STAGE_MODULE, STAGE_COMMON_MODULE, CORE_PIPELINE_CONFIG_STAGES_TAGIMAGE_TAGIMAGESTAGE, ]);
spinnaker/deck-packages/core/src/pipeline/config/stages/tagImage/tagImageStage.module.js
public class HttpBrowserCapabilities : System.Web.Configuration.HttpCapabilitiesBase, System.Web.UI.IFilterResolutionService { // Constructors public HttpBrowserCapabilities() {} // Methods public void DisableOptimizedCacheKey() {} public System.Web.UI.HtmlTextWriter CreateHtmlTextWriter(System.IO.TextWriter w) {} public System.Version[] GetClrVersions() {} public bool IsBrowser(string browserName) {} public void AddBrowser(string browserName) {} public Type GetType() {} public virtual string ToString() {} public virtual bool Equals(object obj) {} public virtual int GetHashCode() {} // Properties public bool UseOptimizedCacheKey { get{} } public string Item { get{} } public System.Collections.IDictionary Capabilities { get{} set{} } public System.Collections.IDictionary Adapters { get{} } public string HtmlTextWriter { get{} set{} } public string Id { get{} } public System.Collections.ArrayList Browsers { get{} } public System.Version ClrVersion { get{} } public string Type { get{} } public string Browser { get{} } public string Version { get{} } public int MajorVersion { get{} } public string MinorVersionString { get{} } public double MinorVersion { get{} } public string Platform { get{} } public Type TagWriter { get{} } public System.Version EcmaScriptVersion { get{} } public System.Version MSDomVersion { get{} } public System.Version W3CDomVersion { get{} } public bool Beta { get{} } public bool Crawler { get{} } public bool AOL { get{} } public bool Win16 { get{} } public bool Win32 { get{} } public bool Frames { get{} } public bool RequiresControlStateInSession { get{} } public bool Tables { get{} } public bool Cookies { get{} } public bool VBScript { get{} } public bool JavaScript { get{} } public bool JavaApplets { get{} } public System.Version JScriptVersion { get{} } public bool ActiveXControls { get{} } public bool BackgroundSounds { get{} } public bool CDF { get{} } public string MobileDeviceManufacturer { get{} } public string MobileDeviceModel { get{} } public string GatewayVersion { get{} } public int GatewayMajorVersion { get{} } public double GatewayMinorVersion { get{} } public string PreferredRenderingType { get{} } public string PreferredRequestEncoding { get{} } public string PreferredResponseEncoding { get{} } public string PreferredRenderingMime { get{} } public string PreferredImageMime { get{} } public int ScreenCharactersWidth { get{} } public int ScreenCharactersHeight { get{} } public int ScreenPixelsWidth { get{} } public int ScreenPixelsHeight { get{} } public int ScreenBitDepth { get{} } public bool IsColor { get{} } public string InputType { get{} } public int NumberOfSoftkeys { get{} } public int MaximumSoftkeyLabelLength { get{} } public bool CanInitiateVoiceCall { get{} } public bool CanSendMail { get{} } public bool HasBackButton { get{} } public bool RendersWmlDoAcceptsInline { get{} } public bool RendersWmlSelectsAsMenuCards { get{} } public bool RendersBreaksAfterWmlAnchor { get{} } public bool RendersBreaksAfterWmlInput { get{} } public bool RendersBreakBeforeWmlSelectAndInput { get{} } public bool RequiresPhoneNumbersAsPlainText { get{} } public bool RequiresUrlEncodedPostfieldValues { get{} } public string RequiredMetaTagNameValue { get{} } public bool RendersBreaksAfterHtmlLists { get{} } public bool RequiresUniqueHtmlInputNames { get{} } public bool RequiresUniqueHtmlCheckboxNames { get{} } public bool SupportsCss { get{} } public bool HidesRightAlignedMultiselectScrollbars { get{} } public bool IsMobileDevice { get{} } public bool RequiresAttributeColonSubstitution { get{} } public bool CanRenderOneventAndPrevElementsTogether { get{} } public bool CanRenderInputAndSelectElementsTogether { get{} } public bool CanRenderAfterInputOrSelectElement { get{} } public bool CanRenderPostBackCards { get{} } public bool CanRenderMixedSelects { get{} } public bool CanCombineFormsInDeck { get{} } public bool CanRenderSetvarZeroWithMultiSelectionList { get{} } public bool SupportsImageSubmit { get{} } public bool RequiresUniqueFilePathSuffix { get{} } public bool RequiresNoBreakInFormatting { get{} } public bool RequiresLeadingPageBreak { get{} } public bool SupportsSelectMultiple { get{} } public bool SupportsBold { get{} } public bool SupportsItalic { get{} } public bool SupportsFontSize { get{} } public bool SupportsFontName { get{} } public bool SupportsFontColor { get{} } public bool SupportsBodyColor { get{} } public bool SupportsDivAlign { get{} } public bool SupportsDivNoWrap { get{} } public bool RequiresContentTypeMetaTag { get{} } public bool RequiresDBCSCharacter { get{} } public bool RequiresHtmlAdaptiveErrorReporting { get{} } public bool RequiresOutputOptimization { get{} } public bool SupportsAccesskeyAttribute { get{} } public bool SupportsInputIStyle { get{} } public bool SupportsInputMode { get{} } public bool SupportsIModeSymbols { get{} } public bool SupportsJPhoneSymbols { get{} } public bool SupportsJPhoneMultiMediaAttributes { get{} } public int MaximumRenderedPageSize { get{} } public bool RequiresSpecialViewStateEncoding { get{} } public bool SupportsQueryStringInFormAction { get{} } public bool SupportsCacheControlMetaTag { get{} } public bool SupportsUncheck { get{} } public bool CanRenderEmptySelects { get{} } public bool SupportsRedirectWithCookie { get{} } public bool SupportsEmptyStringInCookieValue { get{} } public int DefaultSubmitButtonLimit { get{} } public bool SupportsXmlHttp { get{} } public bool SupportsCallback { get{} } public int MaximumHrefLength { get{} } }
Pengfei-Gao/source-Insight-3-for-centos7-SourceInsight3/NetFramework/HttpBrowserCapabilities.cs
//// [inOperatorWithValidOperands.ts] var x: any; // valid left operands // the left operand is required to be of type Any, the String primitive type, or the Number primitive type var a1: string; var a2: number; var ra1 = x in x; var ra2 = a1 in x; var ra3 = a2 in x; var ra4 = '' in x; var ra5 = 0 in x; // valid right operands // the right operand is required to be of type Any, an object type, or a type parameter type var b1: {}; var rb1 = x in b1; var rb2 = x in {}; function foo<T>(t: T) { var rb3 = x in t; } interface X { x: number } interface Y { y: number } var c1: X | Y; var c2: X; var c3: Y; var rc1 = x in c1; var rc2 = x in (c2 || c3); //// [inOperatorWithValidOperands.js] var x; // valid left operands // the left operand is required to be of type Any, the String primitive type, or the Number primitive type var a1; var a2; var ra1 = x in x; var ra2 = a1 in x; var ra3 = a2 in x; var ra4 = '' in x; var ra5 = 0 in x; // valid right operands // the right operand is required to be of type Any, an object type, or a type parameter type var b1; var rb1 = x in b1; var rb2 = x in {}; function foo(t) { var rb3 = x in t; } var c1; var c2; var c3; var rc1 = x in c1; var rc2 = x in (c2 || c3);
yortus/TypeScript-tests/baselines/reference/inOperatorWithValidOperands.js
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::CognitiveServices::SpellCheck::V1_0 module Models # # Model object. # # class SpellCheck < Answer include MsRestAzure def initialize @_type = "SpellCheck" end attr_accessor :_type # @return [Array<SpellingFlaggedToken>] attr_accessor :flagged_tokens # # Mapper for SpellCheck class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { client_side_validation: true, required: false, serialized_name: 'SpellCheck', type: { name: 'Composite', class_name: 'SpellCheck', model_properties: { _type: { client_side_validation: true, required: true, serialized_name: '_type', type: { name: 'String' } }, id: { client_side_validation: true, required: false, read_only: true, serialized_name: 'id', type: { name: 'String' } }, flagged_tokens: { client_side_validation: true, required: true, serialized_name: 'flaggedTokens', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'SpellingFlaggedTokenElementType', type: { name: 'Composite', class_name: 'SpellingFlaggedToken' } } } } } } } end end end end
Azure/azure-sdk-for-ruby-data/azure_cognitiveservices_spellcheck/lib/1.0/generated/azure_cognitiveservices_spellcheck/models/spell_check.rb
/******************************************************************************* * Copyright 2013-2014 alladin-IT GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package at.alladin.rmbt.db.fields; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import org.json.JSONObject; public class StringField extends FieldAdapter<String> { private static final long serialVersionUID = 1L; public StringField(final String dbKey, final String jsonKey) { super(dbKey, jsonKey, false); } public StringField(final String dbKey, final String jsonKey, final boolean readOnly) { super(dbKey, jsonKey, readOnly); } @Override public void setString(final String string) { value = string; } @Override public void setField(final ResultSet rs) throws SQLException { value = rs.getString(dbKey); } @Override public void getField(final PreparedStatement ps, final int idx) throws SQLException { if (value == null) ps.setNull(idx, Types.VARCHAR); else ps.setString(idx, value); } @Override public void setField(final JSONObject obj) { if (jsonKey != null && obj.has(jsonKey)) value = obj.optString(jsonKey, null); } }
SPECURE/ratel-nettest-RMBTControlServer/src/at/alladin/rmbt/db/fields/StringField.java
// // Cusp.h // Cusp // // Created by Ke Yang on 9/15/16. // Copyright © 2016 com.keyofvv. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for Cusp. FOUNDATION_EXPORT double CuspVersionNumber; //! Project version string for Cusp. FOUNDATION_EXPORT const unsigned char CuspVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <Cusp/PublicHeader.h>
keyOfVv/Cusp-Cusp/Cusp.h
var crypto = require("crypto"); Q = require("q"), _ = require("underscore"); module.exports = { permissions: function(){ if (this.session && this.session._id == this.value) return ["remove"] else return ["create"]; }, actions: { "create": function(req,res){ var md5 = crypto.createHash("md5"); var dfd = Q.defer(); var _this = this; _this.app.models.user.find({or: [ {nick: _this.data.login, password: _this.data.password}, {email: _this.data.login, password: _this.data.password} ]}).run(function(e,docs){ console.log(e,docs); if (e) return dfd.reject([500,e]); if (docs.length == 0) dfd.reject([403,{message: "Wrong user or password"}]); else if (obj.length > 1){ console.log("Error: You have to many users in database with this credentials!") dfd.reject({message: "Too many users with this credentials!"}); } else { try{ new _this.model({ "user": obj[0], "created": new Date(), "last_view": new Date(), "session_id": md5.update(obj[0]+new Date().toISOString()).digest("hex"), "expires": req.body.remember?new Date(Date.now() + 1000*3600*24*365*10):new Date(Date.now() + 1000*3600*6) }).save().then(function(a){ res.cookie( _this.cookieName, a.get("session_id"), req.body.remember?{expires: new Date(Date.now() + 1000000000000)}:{}); dfd.resolve(a) },dfd.reject); } catch(e){ m.log(e.message); } } }); return dfd.promise; }, "remove": m.ResourceController.actions.remove } };
Kreees/muon-user-server/app/actions/session.js
var ec = {}; var value; try { if (args.stringify === 'true') { if (typeof args.value === 'string') { value = args.value } else { value = JSON.stringify(args.value) } } else { value = JSON.parse(args.value); } } catch(err) { value = args.value; } ec[args.key] = value; var result = { Type: entryTypes.note, Contents: ec, ContentsFormat: formats.json, HumanReadable: 'Key ' + args.key + ' set' }; if (!args.append || args.append === 'false') { setContext(args.key, value); } else { result.EntryContext = ec; } return result;
VirusTotal/content-Packs/CommonScripts/Scripts/Set/Set.js
/** * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. * * 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. * * 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. */ package com.iucn.whp.dbservice.model.impl; /** * The extended model implementation for the whp_sites_external_documents service. Represents a row in the &quot;whp_whp_sites_external_documents&quot; database table, with each column mapped to a property of this class. * * <p> * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link com.iucn.whp.dbservice.model.whp_sites_external_documents} interface. * </p> * * @author alok.sen */ public class whp_sites_external_documentsImpl extends whp_sites_external_documentsBaseImpl { /* * NOTE FOR DEVELOPERS: * * Never reference this class directly. All methods that expect a whp_sites_external_documents model instance should use the {@link com.iucn.whp.dbservice.model.whp_sites_external_documents} interface instead. */ public whp_sites_external_documentsImpl() { } }
iucn-whp/world-heritage-outlook-portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/model/impl/whp_sites_external_documentsImpl.java
'use strict'; var bcrypt = require('bcryptjs'); var mongoose = require('mongoose'), Schema = mongoose.Schema; var schema = new Schema({ email: { type: String, unique: true, lowercase: true }, password: { type: String, select: false }, displayName: String, picture: String, facebook: String, foursquare: String, google: String, github: String, linkedin: String, live: String, yahoo: String, twitter: String, phone: String, fullName: String, address1:String, address2:String, city:String, region:String, postal:String }); schema.pre('save', function(next) { var user = this; if (!user.isModified('password')) { return next(); } bcrypt.genSalt(10, function(err, salt) { bcrypt.hash(user.password, salt, function(err, hash) { user.password = hash; next(); }); }); }); schema.methods.comparePassword = function(password, done) { bcrypt.compare(password, this.password, function(err, isMatch) { done(err, isMatch); }); }; module.exports = mongoose.model('User', schema);
keslavi/Sandbox1-server/auth/user.model.js
// Star is only for type parameter initialization type Foo<*> = number;
wcjohnson/babylon-lightscript-test/fixtures/flow/type-parameter-declaration/star/actual.js
export let data = { messages: { sessionTimedOut: 'Your session has timedout!', accessDenied: 'Access Denied!', internalServerError: 'Internal Server Error!', requestTimeout: 'Request Timeout!', notAuthorized: 'You are not authorized!', pleaseLogin: 'Please login!', errorHappend: 'Upss... Error!', loading: 'Loading' } };
lubo-gadjev/aurelia-auth-session-src/resources/en-US.js
declare module "foo" { declare export type * from "bar"; }
cbishopvelti/babylon-test/fixtures/flow/declare-export/export-type-star-from/actual.js
// // NBCWorkflowPreWorkflowTasks.h // NBICreator // // Created by Erik Berglund. // Copyright (c) 2015 NBICreator. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #import <Foundation/Foundation.h> @class NBCWorkflowItem; #import "NBCWorkflowProgressViewController.h" @protocol NBCWorkflowPreWorkflowTaskControllerDelegate - (void)preWorkflowTasksCompleted; - (void)preWorkflowTasksFailedWithError:(NSError *)error; @end @interface NBCWorkflowPreWorkflowTaskController : NSObject { id _delegate; } @property (nonatomic, weak) id progressDelegate; - (id)initWithDelegate:(id<NBCWorkflowPreWorkflowTaskControllerDelegate>)delegate; - (void)runPreWorkflowTasks:(NSDictionary *)preWorkflowTasks workflowItem:(NBCWorkflowItem *)workflowItem; @end
NBICreator/NBICreator-NBICreator/Workflow/NBCWorkflowPreWorkflowTaskController.h
“Машинките” на Чочков наказаха и Локомотив (Пловдив) – Спортният сайт на Пазарджик ноември 11, 2019 pzsport 124 0 коментара деца, ДЮШ, Локомотив (Пловдив), Хебър След няколкоседмично прекъсване се поднови първенството на БФС за деца, зона Пловдив. Набор 2010 на Хебър се изправиха срещу Локомотив (Пловдив) и продължиха победния си ход, след като спечелиха миналата седмица купа Пловдив. Този път в завързан мач, „зелените” победиха с 2:1. През първите 2 третини, пазарджикли мушнаха по един гол, чрез Алекс Хавальов и дръпнаха с 2:0. Вратарят на Хебър Денис Спасов, спаси няколко опасни положения пред вратата си. Именно той обаче, чрез единствената си грешка в мача даде шанс на локомотивци да намалят през третата част за 2:1. Малко след това Боян Ибушев от Хебър имаше страхотен шанс да довърши съперника, но не отигра добре и интригата се запази още няколко минути до края на мача. Сега големият въпрос е как ще завърши голямото дерби между непобедените досега Ботев (Пловдив) и Хебър, които ще се срещнат в директен двубой другата седмица. ← СК Тонус-спорт донесе на града ни куп медали СК “Делфин” грабна 5 медала от “Замората” → октомври 18, 2018 pzsport 0
c4-bg
/** * Test readCommitted lookup/graphLookup. 'db' must be the test database for either the replica set * primary or mongos instance. 'secondary' is the shard/replica set secondary. If 'db' is backed * by a mongos instance then the associated cluster should have only a single shard. 'rst' is the * ReplSetTest instance associated with the replica set/shard. */ function testReadCommittedLookup(db, secondary, rst) { /** * Uses the 'rsSyncApplyStop' fail point to stop application of oplog entries on the given * secondary. */ function pauseReplication(sec) { assert.commandWorked( sec.adminCommand({configureFailPoint: "rsSyncApplyStop", mode: "alwaysOn"}), "failed to enable fail point on secondary"); } /** * Turns off the 'rsSyncApplyStop' fail point to resume application of oplog entries on the * given secondary. */ function resumeReplication(sec) { assert.commandWorked(sec.adminCommand({configureFailPoint: "rsSyncApplyStop", mode: "off"}), "failed to disable fail point on secondary"); } const aggCmdLookupObj = { aggregate: "local", pipeline: [ { $lookup: { from: "foreign", localField: "foreignKey", foreignField: "matchedField", as: "match", } }, ], cursor: {}, readConcern: { level: "majority", } }; const aggCmdGraphLookupObj = { aggregate: "local", pipeline: [{ $graphLookup: { from: "foreign", startWith: '$foreignKey', connectFromField: 'foreignKey', connectToField: "matchedField", as: "match" } }], cursor: {}, readConcern: { level: "majority", } }; // Seed matching data. const majorityWriteConcernObj = {writeConcern: {w: "majority", wtimeout: 60 * 1000}}; db.local.deleteMany({}, majorityWriteConcernObj); const localId = db.local.insertOne({foreignKey: "x"}, majorityWriteConcernObj).insertedId; db.foreign.deleteMany({}, majorityWriteConcernObj); const foreignId = db.foreign.insertOne({matchedField: "x"}, majorityWriteConcernObj).insertedId; const expectedMatchedResult = [{ _id: localId, foreignKey: "x", match: [ {_id: foreignId, matchedField: "x"}, ], }]; const expectedUnmatchedResult = [{ _id: localId, foreignKey: "x", match: [], }]; // Confirm lookup/graphLookup return the matched result. let result = db.runCommand(aggCmdLookupObj).cursor.firstBatch; assert.eq(result, expectedMatchedResult); result = db.runCommand(aggCmdGraphLookupObj).cursor.firstBatch; assert.eq(result, expectedMatchedResult); // Stop oplog application on the secondary so that it won't acknowledge updates. pauseReplication(secondary); // Update foreign data to no longer match, without a majority write concern. db.foreign.updateOne({_id: foreignId}, {$set: {matchedField: "non-match"}}); // lookup/graphLookup should not see the update, since it has not been acknowledged by the // secondary. result = db.runCommand(aggCmdLookupObj).cursor.firstBatch; assert.eq(result, expectedMatchedResult); result = db.runCommand(aggCmdGraphLookupObj).cursor.firstBatch; assert.eq(result, expectedMatchedResult); // Restart oplog application on the secondary and wait for it's snapshot to catch up. resumeReplication(secondary); rst.awaitLastOpCommitted(); // Now lookup/graphLookup should report that the documents don't match. result = db.runCommand(aggCmdLookupObj).cursor.firstBatch; assert.eq(result, expectedUnmatchedResult); result = db.runCommand(aggCmdGraphLookupObj).cursor.firstBatch; assert.eq(result, expectedUnmatchedResult); }
christkv/mongo-shell-test/jstests/libs/read_committed_lib.js
KARA/NOVEREN Hedeland Deponi: Påbud 20150113 KaraNoveren Hedeland deponi påbud Miljøstyrelsen har meddelt påbud om fortsat afværgepumpning og monitering for phenoxysyrer i grundvand ved Hedeland Deponi. Påbuddet er givet til ejeren af deponiet KARA/NOVEREN. Klagefrist: 10. februar 2015 kl. 16.00 Miljøstyrelsen har meddelt påbud til KARA/NOVEREN Hedeland Deponi beliggende Roskildevej 87, 4030 Tune. - påbud Hedeland Deponi Med påbuddet skal KARA/NOVEREN forsætte afværgepumpning for phenoxysyrer i grundvand i DGU nr. 206.1057 og monitere i omkringliggende boringer, indtil resultaterne af forsøgsafværgepumpningen for perioden marts til december 2014 er rapporteret, og der er aftalt ny afværge- og moniteringsprogram. Afgørelsen kan påklages til Natur- og Miljøklagenævnet af: En eventuel klage kan indgives via Natur- og Miljøklagenævnets Klageportal, som tilgås via Borger.dk eller Virk.dk. Vejledning om hvordan borgere, virksomheder og organisationer logger på og anvender Klageportalen findes på www.nmkn.dk , www.borger.dk eller www.virk.dk . Klagen skal være modtaget senest den 10. februar 2015. Alternativt kan en eventuel klage sendes skriftligt til Miljøstyrelsen Virksomheder, Strandgade 29, 1401 København K eller . Klagen skal være modtaget senest den 10. februar 2015 inden kl. 16.00. Miljøstyrelsen Virksomheder videresender klagen til Natur- og Miljøklagenævnet via Klageportalen.
c4-da
/*- * Copyright (c) 1982, 1986, 1989, 1991, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. * * @(#)signal.h 8.4 (Berkeley) 5/4/95 * $FreeBSD$ */ #ifndef _SYS__SIGSET_H_ #define _SYS__SIGSET_H_ /* * sigset_t macros. */ #define _SIG_WORDS 4 #define _SIG_MAXSIG 128 #define _SIG_IDX(sig) ((sig) - 1) #define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) #define _SIG_BIT(sig) (1 << (_SIG_IDX(sig) & 31)) #define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0) typedef struct __sigset { __uint32_t __bits[_SIG_WORDS]; } __sigset_t; #if defined(_KERNEL) && defined(COMPAT_43) typedef unsigned int osigset_t; #endif #endif /* !_SYS__SIGSET_H_ */
jhbsz/OSI-OS-sys/sys/_sigset.h
Formamide,N-methyl-N-[2-methyl-4-[[(methylamino)carbonyl]oxy]phenyl]- (CAS No. 10233-98-4) Suppliers @ ChemicalRegister.com Skype Formamide,N-methyl-N-[2-methyl-4-[[(methylamino)carbonyl]oxy]phenyl]- (CAS No. 10233-98-4) Suppliers EMAIL INQUIRY to 2 Formamide,N-methyl-N-[2-methyl-4-[[(methylamino)carbonyl]oxy]phenyl]- (CAS No. 10233-98-4) suppliers IUPAC Name: [4-[formyl(methyl)amino]-3-methylphenyl] N-methylcarbamate | CAS Registry Number: 10233-98-4 Synonyms: BRN 2740010, Methylcarbamic acid ester with 4'-hydroxy-N-methyl-o-formotoluidide, CARBAMIC ACID, METHYL-, ESTER with 4'-HYDROXY-N-METHYL-o-FORMOTOLUIDIDE, AC1L18E0, LS-50186, 4-[formyl(methyl)amino]-3-methylphenyl methylcarbamate, [4-[formyl(methyl)amino]-3-methylphenyl] N-methylcarbamate InChIKey: MPQHMJZTYSTFTQ-UHFFFAOYSA-N
c4-af
#ifndef OPTIONS_HH #define OPTIONS_HH /* * Global variables of the process. * * All boolean option variables are FALSE by default. */ static bool option_nontrivial= false; /* The -a option (consider all trivial dependencies to be non-trivial) */ static bool option_debug= false; /* The -d option (debug mode) */ static bool option_explain= false; /* The -E option (explain error messages) */ static bool option_nonoptional= false; /* The -g option (consider all optional dependencies to be non-optional) */ static bool option_interactive= false; /* The -i option (interactive mode) */ static bool option_literal= false; /* The -J option (literal interpretation of arguments) */ static bool option_keep_going= false; /* The -k option (keep going) */ static bool option_no_delete= false; /* The -K option (don't delete partially built files) */ static bool option_print= false; /* The -P option (print rules) */ static bool option_question= false; /* The -q option (question mode) */ static bool option_silent= false; /* The -s option (silent) */ static bool option_individual= false; /* The -x option (use sh -x) */ static bool option_statistics= false; /* The -z option (output statistics) */ enum class Order { DFS = 0, RANDOM= 1, /* -M mode is coded as Order::RANDOM */ }; static Order order= Order::DFS; bool option_parallel= false; /* Whether the -j option is used with a value >1 */ static bool order_vec; /* Whether to use vectors for randomization */ const char **envp_global; /* The envp variable. Set in main(). */ static const char *dollar_zero; /* Does the same as program_invocation_name (which is a GNU extension, * so we don't use it); the value of argv[0], set in main() */ #endif /* ! OPTIONS_HH */
kunegis/stu-options.hh
#ifndef LW_MORPHOLOGYENGINE_MECAB_INCLUDED #define LW_MORPHOLOGYENGINE_MECAB_INCLUDED GList* lw_morphologyengine_mecab_analyze (LwMorphologyEngine*, const gchar*); mecab_t* lw_morphologyengine_mecab_new (void); #endif
zakkudo/gwaei-src/libwaei/include/libwaei/morphologyengine-mecab.h
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; const common = require('../common'); const assert = require('assert'); const util = require('util'); const [, , modeArgv, sectionArgv] = process.argv; if (modeArgv === 'child') child(sectionArgv); else parent(); function parent() { test('foo,tud,bar', true, 'tud'); test('foo,tud', true, 'tud'); test('tud,bar', true, 'tud'); test('tud', true, 'tud'); test('foo,bar', false, 'tud'); test('', false, 'tud'); test('###', true, '###'); test('hi:)', true, 'hi:)'); test('f$oo', true, 'f$oo'); test('f$oo', false, 'f.oo'); test('no-bar-at-all', false, 'bar'); test('test-abc', true, 'test-abc'); test('test-a', false, 'test-abc'); test('test-*', true, 'test-abc'); test('test-*c', true, 'test-abc'); test('test-*abc', true, 'test-abc'); test('abc-test', true, 'abc-test'); test('a*-test', true, 'abc-test'); test('*-test', true, 'abc-test'); } function test(environ, shouldWrite, section, forceColors = false) { let expectErr = ''; const expectOut = 'ok\n'; const spawn = require('child_process').spawn; const child = spawn(process.execPath, [__filename, 'child', section], { env: Object.assign(process.env, { NODE_DEBUG: environ, FORCE_COLOR: forceColors ? 'true' : 'false' }) }); if (shouldWrite) { if (forceColors) { const { colors, styles } = util.inspect; const addCodes = (arr) => [`\x1B[${arr[0]}m`, `\x1B[${arr[1]}m`]; const num = addCodes(colors[styles.number]); const str = addCodes(colors[styles.string]); const regexp = addCodes(colors[styles.regexp]); const start = `${section.toUpperCase()} ${num[0]}${child.pid}${num[1]}`; const debugging = `${regexp[0]}/debugging/${regexp[1]}`; expectErr = `${start}: this { is: ${str[0]}'a'${str[1]} } ${debugging}\n` + `${start}: num=1 str=a obj={"foo":"bar"}\n`; } else { const start = `${section.toUpperCase()} ${child.pid}`; expectErr = `${start}: this { is: 'a' } /debugging/\n` + `${start}: num=1 str=a obj={"foo":"bar"}\n`; } } let err = ''; child.stderr.setEncoding('utf8'); child.stderr.on('data', (c) => { err += c; }); let out = ''; child.stdout.setEncoding('utf8'); child.stdout.on('data', (c) => { out += c; }); child.on('close', common.mustCall((c) => { assert(!c); assert.strictEqual(err, expectErr); assert.strictEqual(out, expectOut); // Run the test again, this time with colors enabled. if (!forceColors) { test(environ, shouldWrite, section, true); } })); } function child(section) { const tty = require('tty'); // Make sure we check for colors, no matter of the stream's default. Object.defineProperty(process.stderr, 'hasColors', { value: tty.WriteStream.prototype.hasColors }); // eslint-disable-next-line no-restricted-syntax const debug = util.debuglog(section, common.mustCall((cb) => { assert.strictEqual(typeof cb, 'function'); })); debug('this', { is: 'a' }, /debugging/); debug('num=%d str=%s obj=%j', 1, 'a', { foo: 'bar' }); console.log('ok'); }
enclose-io/compiler-current/test/sequential/test-util-debug.js
import org.junit.*; import play.test.*; import models.*; public class YamlTest extends UnitTest { @Test public void testYamlLoading() { Fixtures.deleteAll(); Fixtures.load("yamlTestData.yml"); YamlModel ym = YamlModel.all().first(); assertEquals("Morten", ym.name); //check binary assertEquals("This String is stored in yaml file using base64", new String(ym.binaryData)); } }
lafayette/JBTT-framework/samples-and-tests/just-test-cases/test/YamlTest.java
/* * Copyright 2014-2019 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. */ package com.amazonaws.services.alexaforbusiness.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.services.alexaforbusiness.model.*; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * SortMarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class SortMarshaller { private static final MarshallingInfo<String> KEY_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD) .marshallLocationName("Key").build(); private static final MarshallingInfo<String> VALUE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD) .marshallLocationName("Value").build(); private static final SortMarshaller instance = new SortMarshaller(); public static SortMarshaller getInstance() { return instance; } /** * Marshall the given parameter object. */ public void marshall(Sort sort, ProtocolMarshaller protocolMarshaller) { if (sort == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(sort.getKey(), KEY_BINDING); protocolMarshaller.marshall(sort.getValue(), VALUE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
jentfoo/aws-sdk-java-aws-java-sdk-alexaforbusiness/src/main/java/com/amazonaws/services/alexaforbusiness/model/transform/SortMarshaller.java
Duphaston s krvácením - Výživa Duphaston s krvácením Spotting: na pozadí duphastonového mazanice Pokud již těhotná žena pije Duphaston a šmejdek nepřestal existovat (nebo naopak to tam nebylo, ale začalo), tato situace rozhodně vyžaduje lékařskou péči. Okamžitě to řekněte svému lékaři. S největší pravděpodobností vám řekne, abyste pokračovali v pití tohoto léku, možná dokonce zvýšili dávku. Toto rozhodnutí však může učinit pouze lékař.! Je důležité, a jak dlouho po zahájení administrace začíná propouštění. Některé ženy se bojí, domnívají se, že jejich období přichází a těhotenství je ohroženo Pokud lékař rozhodne, že je vhodné dát nastávající matku do nemocnice, neodporujte směru hospitalizace. První týdny těhotenství jsou nejvíce odpovědné, obtížné a riskantní. Proč dochází k výboji hnědého trimestru Dříve, když společnost nebyla z hlediska antikoncepce tak pokročilá, ženy více znaly své tělo. Například si všimli bílého nebo průhledného výboje uprostřed cyklu a uvědomili si, že jde o ovulaci. Cítí každá žena dnes své tělo? Proto se musíte podívat na nejmenší změny. Ve většině případů nepředstavuje mírný hnědý výboj v prvním trimestru hrozbu. Musíte pochopit jejich povahu, proto není nutné být gynekologem. A nezapomeňte sdělit všechny informace lékaři. Množství vypouštění; Konzistence sekretů; Frekvence projevů propouštění; Pach a podrážděnost kůže z nich. Pokud se jedná o krátkodobé vypouštění rozmazané přírody, jedná se o jednoduché, hnědé nebo světle hnědé, bez zápachu a jiné příznaky, zpravidla není čeho se bát. Ale nezapomeňte jít k lékaři! Fyziologický výtok je často zavedením vajíčka do sliznice dělohy. Takový proces trvá déle než jeden den, někdy to trvá půl až tři týdny. Implantace je často doprovázena prasknutím malých cév a krev se mísí s vaginálním výtokem. Druhou běžnou příčinou takového nahnědlého výboje je reakce ženského těla na hormonální změny. A krevní nečistoty se mísí se slizničními vaginálními sekrecemi přesně v těch dnech, kdy měla přijít menstruace. Jako by tyto hnědé sekrety přišly na jejich místo. Vypouštění je však vzácné, trvá několik dní, nemá zápach. Červený nebo žlutý výboj je alarmující signál, na který bude lékař reagovat.. Silné krvácení po užití léku Výskyt krvácení z dělohy je považován za jednu z nejčastějších gynekologických diagnóz. Proč děloha krvácí? Takové odchylky v těle naznačují, že se vyskytují hormonální poruchy. Krvácení může nastat v každém věku, zatímco hlavní příčiny výskytu jsou: porušení funkčnosti reprodukčních ženských orgánů; diagnostika průvodních onemocnění endokrinního systému; indikace pro chirurgickou léčbu; dopad četných stresových situací; účinek použitých drog; Posledně uvedený důvod je považován za zásadní, protože na pozadí těchto změn se vytváří tzv. Anovulace - stav, během kterého vejce nemá schopnost opustit vaječní
c4-cs
/* istanbul ignore file */ import Vue from 'vue' import VueI18n from 'vue-i18n' Vue.use(VueI18n) function loadLocaleMessages () { const locales = require.context('@/locales', false, /^\.\/[a-z]{2,4}(-([A-Z][a-z]{3}|[0-9]{3}))?(-([A-Z]{2}|[0-9]{3}))?\.json$/) const messages = {} locales.keys().forEach(key => { const matched = key.match(/([A-Za-z0-9-_]+)\./i) if (matched && matched.length > 1) { const locale = matched[1] messages[locale] = locales(key) } }) return messages } export default new VueI18n({ locale: process.env.VUE_APP_I18N_LOCALE || 'en', fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en', messages: loadLocaleMessages() })
portphilio/portphilio-src/i18n.js
# Definition for singly-linked list with a random pointer. # class RandomListNode(object): # def __init__(self, x): # self.label = x # self.next = None # self.random = None class Solution(object): def dfs(self,hashmap,node): newnode=RandomListNode(node.label) hashmap[node]=newnode if node.random: if node.random not in hashmap: self.dfs(hashmap,node.random) hashmap[node].random=hashmap[node.random] if node.next: if node.next not in hashmap: self.dfs(hashmap,node.next) hashmap[node].next=hashmap[node.next] def copyRandomList(self, head): """ :type head: RandomListNode :rtype: RandomListNode """ if not head: return None # map to search hashmap={} self.dfs(hashmap,head) return hashmap[head]
Tanych/CodeTracking-138-Copy-List-with-Random-Pointer/solution.py