text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web.Http;
using Thinktecture.IdentityModel.Http.Hawk.Core;
using Thinktecture.IdentityModel.Http.Hawk.Core.Helpers;
using Thinktecture.IdentityModel.Http.Hawk.Core.MessageContracts;
using Thinktecture.IdentityModel.Http.Hawk.WebApi;

namespace Thinktecture.IdentityModel.Tests.HttpAuthentication.Hawk.IntegrationTests.Helpers
{
    class ServerFactory
    {
        internal static List<Credential> Credentials
        {
            get
            {
                return new List<Credential>()
                {
                    new Credential()
                    {
                        Id = "dh37fgj492je",
                        Algorithm = SupportedAlgorithms.SHA256,
                        User = "Steve",
                        Key = "werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn"
                    }
                };
            }
        }

        internal static Credential DefaultCredential
        {
            get
            {
                return Credentials.FirstOrDefault();
            }
        }

        internal static HttpServer Create(Func<IResponseMessage, string> normalizationCallback = null,
                                            Func<IRequestMessage, string, bool> verificationCallback = null)
        {
            var configuration = new HttpConfiguration();

            configuration.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

            var options = new Options()
            {
                ClockSkewSeconds = 60,
                LocalTimeOffsetMillis = 0,
                CredentialsCallback = (id) => Credentials.FirstOrDefault(c => c.Id == id),
                NormalizationCallback = normalizationCallback,
                VerificationCallback = verificationCallback,
                ResponsePayloadHashabilityCallback = (req) => true
            };

            var hawkHandler = new HawkAuthenticationHandler(options);
            configuration.MessageHandlers.Add(hawkHandler);

            return new HttpServer(configuration);
        }
    }
}


text:
set_name 'Product'

set_fields(
  name: :string,
  description: :text
)

set_view_schema(:type => :single_page_manager, :special_views => ['show.inline'])

describe_field :product_interests_ids, {
  relation: {
    type: :has_many,
  }
}

redpajama_set_name: RedPajamaGithub


text:
namespace v8 {
namespace internal {

class CompilationCacheShape : public BaseShape<HashTableKey*> {
 public:
  static inline bool IsMatch(HashTableKey* key, Object value) {
    return key->IsMatch(value);
  }

  static inline uint32_t Hash(ReadOnlyRoots roots, HashTableKey* key) {
    return key->Hash();
  }

  static inline uint32_t RegExpHash(String string, Smi flags);

  static inline uint32_t StringSharedHash(String source,
                                          SharedFunctionInfo shared,
                                          LanguageMode language_mode,
                                          int position);

  static inline uint32_t HashForObject(ReadOnlyRoots roots, Object object);

  static const int kPrefixSize = 0;
  // An 'entry' is essentially a grouped collection of slots. Entries are used
  // in various ways by the different caches; most store the actual key in the
  // first entry slot, but it may also be used differently.
  // Why 3 slots? Because of the eval cache.
  static const int kEntrySize = 3;
  static const bool kMatchNeedsHoleCheck = true;
};

class InfoCellPair {
 public:
  InfoCellPair() = default;
  inline InfoCellPair(Isolate* isolate, SharedFunctionInfo shared,
                      FeedbackCell feedback_cell);

  FeedbackCell feedback_cell() const {
    DCHECK(is_compiled_scope_.is_compiled());
    return feedback_cell_;
  }
  SharedFunctionInfo shared() const {
    DCHECK(is_compiled_scope_.is_compiled());
    return shared_;
  }

  bool has_feedback_cell() const {
    return !feedback_cell_.is_null() && is_compiled_scope_.is_compiled();
  }
  bool has_shared() const {
    // Only return true if SFI is compiled - the bytecode could have been
    // flushed while it's in the compilation cache, and not yet have been
    // removed form the compilation cache.
    return !shared_.is_null() && is_compiled_scope_.is_compiled();
  }

 private:
  IsCompiledScope is_compiled_scope_;
  SharedFunctionInfo shared_;
  FeedbackCell feedback_cell_;
};

EXTERN_DECLARE_HASH_TABLE(CompilationCacheTable, CompilationCacheShape)

class CompilationCacheTable
    : public HashTable<CompilationCacheTable, CompilationCacheShape> {
 public:
  NEVER_READ_ONLY_SPACE

  // The 'script' cache contains SharedFunctionInfos.
  static MaybeHandle<SharedFunctionInfo> LookupScript(
      Handle<CompilationCacheTable> table, Handle<String> src,
      Handle<Context> native_context, LanguageMode language_mode);
  static Handle<CompilationCacheTable> PutScript(
      Handle<CompilationCacheTable> cache, Handle<String> src,
      Handle<Context> native_context, LanguageMode language_mode,
      Handle<SharedFunctionInfo> value);

  // Eval code only gets cached after a second probe for the
  // code object. To do so, on first "put" only a hash identifying the
  // source is entered into the cache, mapping it to a lifetime count of
  // the hash. On each call to Age all such lifetimes get reduced, and
  // removed once they reach zero. If a second put is called while such
  // a hash is live in the cache, the hash gets replaced by an actual
  // cache entry. Age also removes stale live entries from the cache.
  // Such entries are identified by SharedFunctionInfos pointing to
  // either the recompilation stub, or to "old" code. This avoids memory
  // leaks due to premature caching of eval strings that are
  // never needed later.
  static InfoCellPair LookupEval(Handle<CompilationCacheTable> table,
                                 Handle<String> src,
                                 Handle<SharedFunctionInfo> shared,
                                 Handle<Context> native_context,
                                 LanguageMode language_mode, int position);
  static Handle<CompilationCacheTable> PutEval(
      Handle<CompilationCacheTable> cache, Handle<String> src,
      Handle<SharedFunctionInfo> outer_info, Handle<SharedFunctionInfo> value,
      Handle<Context> native_context, Handle<FeedbackCell> feedback_cell,
      int position);

  // The RegExp cache contains JSRegExp::data fixed arrays.
  Handle<Object> LookupRegExp(Handle<String> source, JSRegExp::Flags flags);
  static Handle<CompilationCacheTable> PutRegExp(
      Isolate* isolate, Handle<CompilationCacheTable> cache, Handle<String> src,
      JSRegExp::Flags flags, Handle<FixedArray> value);

  // The Code cache shares native-context-independent (NCI) code between
  // contexts.
  MaybeHandle<Code> LookupCode(Handle<SharedFunctionInfo> key);
  static Handle<CompilationCacheTable> PutCode(
      Isolate* isolate, Handle<CompilationCacheTable> cache,
      Handle<SharedFunctionInfo> key, Handle<Code> value);

  void Remove(Object value);
  void Age();

  DECL_CAST(CompilationCacheTable)

 private:
  void RemoveEntry(int entry_index);

  OBJECT_CONSTRUCTORS(CompilationCacheTable,
                      HashTable<CompilationCacheTable, CompilationCacheShape>);
};

}  // namespace internal
}  // namespace v8

#include "src/objects/object-macros-undef.h"

#endif  // V8_OBJECTS_COMPILATION_CACHE_TABLE_H_


text:
#ifndef __RANDOMMIXIN_H__
#define __RANDOMMIXIN_H__

#include <shogun/base/SGObject.h>
#include <shogun/lib/config.h>
#include <shogun/mathematics/Seedable.h>

#include <iterator>
#include <random>
#include <type_traits>

namespace shogun
{
	namespace random
	{
		/** Seeds an SGObject using a random number generator as a seed source
		 */
		template <
		    typename T, typename PRNG,
		    std::enable_if_t<std::is_base_of_v<
		        SGObject, typename std::remove_pointer_t<T>>>* =
		        nullptr>
		static inline void seed(T* object, PRNG&& prng)
		{
			if (object->has(kSeed))
				object->put(kSeed, (int32_t)prng());
		}

		template <
		    typename T, typename PRNG,
		    std::enable_if_t<std::is_base_of_v<
		        SGObject, typename std::remove_pointer_t<T>>>* =
		        nullptr>
		static inline void seed(std::shared_ptr<T> object, PRNG&& prng)
		{
			seed(object.get(), prng);
		}
	} // namespace random

	static inline void random_seed_callback(SGObject*);

	template <typename Parent, typename PRNG = std::mt19937_64>
	class RandomMixin : public Seedable<Parent>
	{
	private:
		using this_t = RandomMixin<Parent, PRNG>;

	public:
		using prng_type = PRNG;

		template <typename... T>
		RandomMixin(T... args) : Seedable<Parent>(args...)
		{
			init();
		}

		virtual std::shared_ptr<SGObject> clone(ParameterProperties pp = ParameterProperties::ALL) const override
		{
			auto clone = std::dynamic_pointer_cast<this_t>(Parent::clone());
			clone->m_prng = m_prng;
			return clone;
		}

	private:
		void init_random_seed()
		{
			typename PRNG::result_type random_data[PRNG::state_size];
			std::random_device source;
			std::generate(
			    std::begin(random_data), std::end(random_data),
			    std::ref(source));
			std::seed_seq seeds(std::begin(random_data), std::end(random_data));
			m_prng = PRNG(seeds);
		}

		bool set_random_seed()
		{
			init_random_seed();
			random_seed_callback(this);
			return true;
		}

		void init()
		{
			init_random_seed();

			Parent::add_callback_function(random::kSeed, [&]() {
				m_prng = PRNG(Seedable<Parent>::m_seed);
			});

			Parent::watch_method(
			    random::kSetRandomSeed, &this_t::set_random_seed);
		}

	protected:
		/** Seeds an SGObject using a random number generator as a seed source
		 * This is intended to seed non-parameter SGObjects created inside methods
		 */
		template <
		    typename T,
		    std::enable_if_t<std::is_base_of_v<
		        SGObject, typename std::remove_pointer<T>::type>>* =
		        nullptr>
		inline void seed(std::shared_ptr<T> object) const
		{
			random::seed(object, m_prng);
		}

		mutable PRNG m_prng;
	};

	static inline void random_seed_callback(SGObject* obj)
	{
		obj->for_each_param_of_type<SGObject*>(
		    [&](const std::string& name, SGObject** param) {
			    if ((*param)->has(random::kSeed))
				    (*param)->run(random::kSetRandomSeed);
			    else
				    random_seed_callback(*param);
		    });
	}
} // namespace shogun

#endif // __RANDOMMIXIN_H__


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AnnuaireCertifies.Domaine
{
    public class ImportGeneriqueProgressResult
    {
        public string Progress { get; set; }

        public IEnumerable<EchangeMiseADispositionLogDto> Results{get;set;}

        public ImportGeneriqueProgressResult()
        {
            Results = new List<EchangeMiseADispositionLogDto>();
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;

namespace Metrics.StupidBenchmarks
{
    public static class FixedIterationsBenchmark
    {
        public struct Result
        {
            public TimeSpan Elapsed;
            public long Total;
            public long PerSecond
            {
                get
                {
                    return Convert.ToInt64(Math.Round(Total / Elapsed.TotalSeconds));
                }
            }

            public override string ToString()
            {
                return string.Format("Runs\t{0}\nTotal\t{1}\nRate\t{2,10:N0}", Total, Elapsed, PerSecond);
            }
        }

        public static void Run<T>(Action<T> action, long iterations, int maxThreads = 16)
           where T : new()
        {
            T instance = new T();
            for (int i = maxThreads; i > 0; i--)
            {
                var result = FixedIterationsBenchmark.MeasureDuration(() => action(instance), i, iterations);
                Console.WriteLine("{0}\t{1}\t{2}\t{3,10:N0}", typeof(T).Name, i, result.PerSecond, result.Elapsed);
            }
        }

        public static Result MeasureDuration(Action action, int threadCount, long iterations)
        {
#if DEBUG
            Console.WriteLine("DEBUG MODE - results are NOT relevant");
#endif
            List<Thread> threads = new List<Thread>();
            TaskCompletionSource<int> tcs = new TaskCompletionSource<int>();

            for (int i = 0; i < threadCount; i++)
            {
                threads.Add(new Thread(s =>
                    {
                        // warm - up
                        for (int x = 0; x < 100; x++) { action(); }

                        tcs.Task.Wait();
                        for (long j = 0; j < iterations; j++)
                        {
                            action();
                        }
                    }));
            }
            // all thread will be waiting on tcs
            threads.ForEach(t => t.Start());

            var w = Stopwatch.StartNew();
            tcs.SetResult(0);
            threads.ForEach(t => t.Join());
            var elapsed = w.Elapsed;
            return new Result { Elapsed = elapsed, Total = iterations };
        }
    }
}


text:
/**
 * helper function to output debugging data to the console
 *
 * @param {String} msg text to output
 */
function logit(msg) {
	if (typeof (console) !== 'undefined') {
		console.log((new Date()).getTime() + '-' + msg);
	}
}

/**
 * helper function to output test data to reporting window
 *
 * @param {String} msg text to output
 * @param {String} CSS div id of reporting window
 */
function showit(msg, divId) {
	if (!divId) {
		divId = 'result';
	}
	var oDiv = document.getElementById(divId);
	if (oDiv.innerHTML === '') {
		oDiv.innerHTML = msg;
	} else {
		oDiv.innerHTML = oDiv.innerHTML + '
' + msg;
	}
}

var ORMMAReadyStatus = {
	NOT_FOUND: -1,
	FOUND: 1
};

window.listenerEnabled = true;
window.gotEvent = false;
window.stopLoading = false;

/**
 * called by open, calls the ormma.open method
 *
 * @see open
 * @requires ormma
 * @returns {Boolean} false - so click event can stop propogating
 */
function ormmaOpen(url) {
	if (!window.ormmaAvail) {
		return (true);
	}

	ormma.open(url);
	return (false);
}

function getExpectedState(action) {
	if (action) {
		var actionStatePairs = {
			expand: 'expanded',
			resize: 'resized',
			close: 'default',
			hide: 'hidden'
		};
		if (actionStatePairs[action]) {
			return actionStatePairs[action];
		} else {
			return '';
		}
	} else {
		logit('Required parameter action is missing.');
		return '';
	}
}

function simulateActions(actions, callback) {
	if (window.stopLoading || (typeof ormma.getViewable === 'function' && (!(ormma.getViewable() === true || ormma.getViewable() === 'true')))) {
		return;
	}
	if (actions.length > 0) {
		switch (actions[0]) {
		case 'addEventListener':
			ormma.addEventListener('stateChange', stateChangeHandler);
			window.listenerEnabled = true;
			showit('Added event listener', 'result');
			break;
		case 'removeEventListener':
			ormma.removeEventListener('stateChange', stateChangeHandler);
			window.listenerEnabled = false;
			showit('Removed event listener', 'result');
			break;
		case 'expand':
			showit('calling expand()...', 'result');
			ormma.expand({x:0, y:20, width:300, height:250});
			break;
		case 'resize':
			showit('calling resize()...', 'result');
			ormma.resize(ormma.getSize().width - 1, ormma.getSize().height + 1);
			break;
		case 'close':
			showit('calling close()...', 'result');
			ormma.close();
			break;
		case 'hidden':
			break;
		}
		setTimeout(function() {
			verifyState(getExpectedState(actions[0]), function() {
				actions.splice(0, 1);
				simulateActions(actions, callback);
			});
		}, 2000);
		return;
	}
	if (typeof callback === 'function') {
		callback.call();
	}
}

function stateChangeHandler(state) {
	gotEvent = true;
	showit('Received stateChange event. State is now ' + state, 'result');
}

function verifyState(expected, callback, sync) {
	var verify = function () {
		if (expected !== '') {
			if (expected === ormma.getState()) {
				showit('Expected state: ' + expected + '; Reported state: ' + ormma.getState() + ' - passed.', 'result');
			} else {
				showit('Expected state: ' + expected + '; Reported state: ' + ormma.getState() + ' - failed.', 'result');
			}
		} else {
			if (!window.listenerEnabled) {
				if (!gotEvent) {
					showit('No event received after listener removed - passed.', 'result');
				} else {
					showit('Still received event after listener was removed - failed.', 'result');
				}
			}
		}
		if (typeof callback === 'function') {
			callback.call();
		}
	};
	if (sync) {
		verify();
	} else {
		setTimeout(function() {
			verify();
		}, 500);
	}
}

function loadTest() {
	if (typeof ormma.getViewable === 'function' || ormma.getViewable() === true || ormma.getViewable() === 'true') { /*start the tests only when the ad is in view*/
		if (ormma.getState() === 'default') {
			showit('Expected initial state: default; Reported initial state: default - passed.', 'result');
		} else {
			showit('Expected initial state: default; Reported initial state: ' + ormma.getState() + ' - failed.', 'result');
		}

		var expectedActionsAndStates = ['addEventListener', 'expand', 'close', 'resize', 'expand', 'close', 'removeEventListener', 'expand', 'close'];
		simulateActions(expectedActionsAndStates, function() {
			var hideBtn = document.getElementById('close');
			hideBtn.style.display = 'block';
			showit('ACTION NEEDED: click close button to hide the ad', 'result');
			hideBtn.onclick = function(evt) {
				ormma.hide();
				verifyState('hidden', function() {
					ormma.show();
				});
			};
		});
		var id = setInterval(function() {
			if (!(ormma.getViewable() === true || ormma.getViewable() === 'true')) {
				window.stopLoading = true;
				setTimeout(function() {
					ormma.close();
				}, 100);
			} else {
				if (window.stopLoading) {
					window.stopLoading = false;
					loadTest();
				}
			}
		}, 1000);
	} else {
		setTimeout(function() {
			loadTest();
		}, 1000);
	}
}

/**
 * ORMMAReady called by the SDK
 * Sets global 'ormmaAvail' to true
 *
 * @requires ormma
 *
 */
function ORMMAReady(evt) {
	var msg;

	window.ormmaAvail = window.ormmaAvail || ORMMAReadyStatus.FOUND;

	if (window.ormmaAvail !== ORMMAReadyStatus.NOT_FOUND) {
		//clear any timers that have been waiting for ORMMA
		window.clearTimeout(window.ormmaWaitId);

		logit('ORMMA found');

		if (typeof ormma === 'undefined') {
			showit('ormma object not found - failed.', 'result');
			return;
		}

		//check that all expected Level1 methods are available
		var ormmaMethods = ['getState', 'addEventListener', 'removeEventListener', 'resize', 'expand', 'close', 'hide', 'show', 'getViewable'];
		var hasOrmmaMethods;
		var hasError = false;

		for (var i = 0; i < ormmaMethods.length; i++) {
			ormmaMethod = ormmaMethods[i];
			hasOrmmaMethods = (typeof(ormma[ormmaMethod]) === 'function');
			if (!hasOrmmaMethods) {
				hasError = true;
				showit(ormmaMethod + ' method not found - failed.', 'result');
 				logit ('method ' + ormmaMethod + ' not found');
			} else {
				showit(ormmaMethod + '() method found - passed.');
			}
		}

		loadTest();
	}
}

/**
 * stub function to highlight when ORMMA is not found
 */
function ORMMANotFound() {
	window.ormmaAvail = window.ormmaAvail || ORMMAReadyStatus.NOT_FOUND;
	if (window.ormmaAvail !== ORMMAReadyStatus.FOUND) {
		window.ormmaAvail = false;
		showit('Test failed.

*ORMMAReady() not found.', 'result');
		logit('ORMMA not found');
	}
}

window.ormmaWaitId = window.setTimeout(ORMMANotFound, 2000);


text:
"""
Retrieves dependencies from setup.py file
"""

import ast
from os import path

import pdb

class SetupVisitor(ast.NodeVisitor):
    def __init__(self):
        self.install_requires_parse_fail = False
        self.candidates = {}
        self.deps = []

    def visit_Assign(self, node):
        if len(node.targets) == 1 and isinstance(node.targets[0], ast.Name):
            name = node.targets[0].id
            if 'req' in name.lower() and isinstance(node.value, ast.List):
                self.candidates[name] = self.deps_from_ast_list(node.value)

    def visit_Call(self, node):
        if isinstance(node.func, ast.Name) and node.func.id == 'setup':
            for kw in node.keywords:
                if kw.arg == 'install_requires':
                    self.record_deps_from_expr(kw.value)

    def deps_from_ast_list(self, ast_list):
        d = []
        for elt in ast_list.elts:
            if isinstance(elt, ast.Str):
                d.append(elt.s)
        return d

    def record_deps_from_expr(self, expr_node):
        if isinstance(expr_node, ast.List):
            self.deps.extend(self.deps_from_ast_list(expr_node))
        elif isinstance(expr_node, ast.Name):
            if expr_node.id in self.candidates:
                self.deps.extend(self.candidates[expr_node.id])
        else:
            self.install_requires_parse_fail = True

def deps(project_dir):
    """Returns (deps, success)"""
    setup_file = path.join(project_dir, 'setup.py')
    if path.exists(setup_file):
        return deps_from_setup_file(setup_file)
    return None

def deps_from_setup_file(setup_file):
    with open(setup_file) as setupf:
        root = ast.parse(setupf.read())
        visitor = SetupVisitor()
        visitor.visit(root)
        if visitor.install_requires_parse_fail:
            return None
        else:
            return visitor.deps
    return None


text:
"""Python modules manipulation utility functions.

:type PY_SOURCE_EXTS: tuple(str)
:var PY_SOURCE_EXTS: list of possible python source file extension

:type STD_LIB_DIR: str
:var STD_LIB_DIR: directory where standard modules are located

:type BUILTIN_MODULES: dict
:var BUILTIN_MODULES: dictionary with builtin module names has key
"""
__docformat__ = "restructuredtext en"

import sys
import os
from os.path import splitext, join, abspath, isdir, dirname, exists, basename
from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY
from distutils.sysconfig import get_config_var, get_python_lib, get_python_version

try:
    import zipimport
except ImportError:
    zipimport = None

ZIPFILE = object()

from logilab.common import STD_BLACKLIST, _handle_blacklist

# Notes about STD_LIB_DIR
# Consider arch-specific installation for STD_LIB_DIR definition
# :mod:`distutils.sysconfig` contains to much hardcoded values to rely on
#
# :see: `Problems with /usr/lib64 builds <http://bugs.python.org/issue1294959>`_
# :see: `FHS <http://www.pathname.com/fhs/pub/fhs-2.3.html#LIBLTQUALGTALTERNATEFORMATESSENTIAL>`_
if sys.platform.startswith('win'):
    PY_SOURCE_EXTS = ('py', 'pyw')
    PY_COMPILED_EXTS = ('dll', 'pyd')
    STD_LIB_DIR = get_python_lib(standard_lib=1)
else:
    PY_SOURCE_EXTS = ('py',)
    PY_COMPILED_EXTS = ('so',)
    # extend lib dir with some arch-dependant paths
    STD_LIB_DIR = join(get_config_var("LIBDIR"), "python%s" % get_python_version())

BUILTIN_MODULES = dict(zip(sys.builtin_module_names,
                           [1]*len(sys.builtin_module_names)))

class NoSourceFile(Exception):
    """exception raised when we are not able to get a python
    source file for a precompiled file
    """

class LazyObject(object):
    def __init__(self, module, obj):
        self.module = module
        self.obj = obj
        self._imported = None

    def _getobj(self):
        if self._imported is None:
           self._imported = getattr(load_module_from_name(self.module),
                                    self.obj)
        return self._imported

    def __getattribute__(self, attr):
        try:
            return super(LazyObject, self).__getattribute__(attr)
        except AttributeError, ex:
            return getattr(self._getobj(), attr)

    def __call__(self, *args, **kwargs):
        return self._getobj()(*args, **kwargs)

def load_module_from_name(dotted_name, path=None, use_sys=1):
    """Load a Python module from it's name.

    :type dotted_name: str
    :param dotted_name: python name of a module or package

    :type path: list or None
    :param path:
      optional list of path where the module or package should be
      searched (use sys.path if nothing or None is given)

    :type use_sys: bool
    :param use_sys:
      boolean indicating whether the sys.modules dictionary should be
      used or not

    :raise ImportError: if the module or package is not found

    :rtype: module
    :return: the loaded module
    """
    return load_module_from_modpath(dotted_name.split('.'), path, use_sys)

def load_module_from_modpath(parts, path=None, use_sys=1):
    """Load a python module from it's splitted name.

    :type parts: list(str) or tuple(str)
    :param parts:
      python name of a module or package splitted on '.'

    :type path: list or None
    :param path:
      optional list of path where the module or package should be
      searched (use sys.path if nothing or None is given)

    :type use_sys: bool
    :param use_sys:
      boolean indicating whether the sys.modules dictionary should be used or not

    :raise ImportError: if the module or package is not found

    :rtype: module
    :return: the loaded module
    """
    if use_sys:
        try:
            return sys.modules['.'.join(parts)]
        except KeyError:
            pass
    modpath = []
    prevmodule = None
    for part in parts:
        modpath.append(part)
        curname = '.'.join(modpath)
        module = None
        if len(modpath) != len(parts):
            # even with use_sys=False, should try to get outer packages from sys.modules
            module = sys.modules.get(curname)
        if module is None:
            mp_file, mp_filename, mp_desc = find_module(part, path)
            module = load_module(curname, mp_file, mp_filename, mp_desc)
        if prevmodule:
            setattr(prevmodule, part, module)
        _file = getattr(module, '__file__', '')
        if not _file and len(modpath) != len(parts):
            raise ImportError('no module in %s' % '.'.join(parts[len(modpath):]) )
        path = [dirname( _file )]
        prevmodule = module
    return module

def load_module_from_file(filepath, path=None, use_sys=1, extrapath=None):
    """Load a Python module from it's path.

    :type filepath: str
    :param filepath: path to the python module or package

    :type path: list or None
    :param path:
      optional list of path where the module or package should be
      searched (use sys.path if nothing or None is given)

    :type use_sys: bool
    :param use_sys:
      boolean indicating whether the sys.modules dictionary should be
      used or not

    :raise ImportError: if the module or package is not found

    :rtype: module
    :return: the loaded module
    """
    modpath = modpath_from_file(filepath, extrapath)
    return load_module_from_modpath(modpath, path, use_sys)

def _check_init(path, mod_path):
    """check there are some __init__.py all along the way"""
    for part in mod_path:
        path = join(path, part)
        if not _has_init(path):
            return False
    return True

def modpath_from_file(filename, extrapath=None):
    """given a file path return the corresponding splitted module's name
    (i.e name of a module or package splitted on '.')

    :type filename: str
    :param filename: file's path for which we want the module's name

    :type extrapath: dict
    :param extrapath:
      optional extra search path, with path as key and package name for the path
      as value. This is usually useful to handle package splitted in multiple
      directories using __path__ trick.

    :raise ImportError:
      if the corresponding module's name has not been found

    :rtype: list(str)
    :return: the corresponding splitted module's name
    """
    base = splitext(abspath(filename))[0]
    if extrapath is not None:
        for path_ in extrapath:
            path = abspath(path_)
            if path and base[:len(path)] == path:
                submodpath = [pkg for pkg in base[len(path):].split(os.sep)
                              if pkg]
                if _check_init(path, submodpath[:-1]):
                    return extrapath[path_].split('.') + submodpath
    for path in sys.path:
        path = abspath(path)
        if path and base[:len(path)] == path:
            if filename.find('site-packages') != -1 and \
                   path.find('site-packages') == -1:
                continue
            modpath = [pkg for pkg in base[len(path):].split(os.sep) if pkg]
            if _check_init(path, modpath[:-1]):
                return modpath
    raise ImportError('Unable to find module for %s in %s' % (
        filename, ', \n'.join(sys.path)))

def file_from_modpath(modpath, path=None, context_file=None):
    """given a mod path (i.e. splitted module / package name), return the
    corresponding file, giving priority to source file over precompiled
    file if it exists

    :type modpath: list or tuple
    :param modpath:
      splitted module's name (i.e name of a module or package splitted
      on '.')
      (this means explicit relative imports that start with dots have
      empty strings in this list!)

    :type path: list or None
    :param path:
      optional list of path where the module or package should be
      searched (use sys.path if nothing or None is given)

    :type context_file: str or None
    :param context_file:
      context file to consider, necessary if the identifier has been
      introduced using a relative import unresolvable in the actual
      context (i.e. modutils)

    :raise ImportError: if there is no such module in the directory

    :rtype: str or None
    :return:
      the path to the module's file or None if it's an integrated
      builtin module such as 'sys'
    """
    if context_file is not None:
        context = dirname(context_file)
    else:
        context = context_file
    if modpath[0] == 'xml':
        # handle _xmlplus
        try:
            return _file_from_modpath(['_xmlplus'] + modpath[1:], path, context)
        except ImportError:
            return _file_from_modpath(modpath, path, context)
    elif modpath == ['os', 'path']:
        # FIXME: currently ignoring search_path...
        return os.path.__file__
    return _file_from_modpath(modpath, path, context)

def get_module_part(dotted_name, context_file=None):
    """given a dotted name return the module part of the name :

    >>> get_module_part('logilab.common.modutils.get_module_part')
    'logilab.common.modutils'

    :type dotted_name: str
    :param dotted_name: full name of the identifier we are interested in

    :type context_file: str or None
    :param context_file:
      context file to consider, necessary if the identifier has been
      introduced using a relative import unresolvable in the actual
      context (i.e. modutils)

    :raise ImportError: if there is no such module in the directory

    :rtype: str or None
    :return:
      the module part of the name or None if we have not been able at
      all to import the given name

    XXX: deprecated, since it doesn't handle package precedence over module
    (see #10066)
    """
    # os.path trick
    if dotted_name.startswith('os.path'):
        return 'os.path'
    parts = dotted_name.split('.')
    if context_file is not None:
        # first check for builtin module which won't be considered latter
        # in that case (path != None)
        if parts[0] in BUILTIN_MODULES:
            if len(parts) > 2:
                raise ImportError(dotted_name)
            return parts[0]
        # don't use += or insert, we want a new list to be created !
    path = None
    starti = 0
    if parts[0] == '':
        assert context_file is not None, \
                'explicit relative import, but no context_file?'
        path = [] # prevent resolving the import non-relatively
        starti = 1
    while parts[starti] == '': # for all further dots: change context
        starti += 1
        context_file = dirname(context_file)
    for i in range(starti, len(parts)):
        try:
            file_from_modpath(parts[starti:i+1],
                    path=path, context_file=context_file)
        except ImportError:
            if not i >= max(1, len(parts) - 2):
                raise
            return '.'.join(parts[:i])
    return dotted_name

def get_modules(package, src_directory, blacklist=STD_BLACKLIST):
    """given a package directory return a list of all available python
    modules in the package and its subpackages

    :type package: str
    :param package: the python name for the package

    :type src_directory: str
    :param src_directory:
      path of the directory corresponding to the package

    :type blacklist: list or tuple
    :param blacklist:
      optional list of files or directory to ignore, default to
      the value of `logilab.common.STD_BLACKLIST`

    :rtype: list
    :return:
      the list of all available python modules in the package and its
      subpackages
    """
    modules = []
    for directory, dirnames, filenames in os.walk(src_directory):
        _handle_blacklist(blacklist, dirnames, filenames)
        # check for __init__.py
        if not '__init__.py' in filenames:
            dirnames[:] = ()
            continue
        if directory != src_directory:
            dir_package = directory[len(src_directory):].replace(os.sep, '.')
            modules.append(package + dir_package)
        for filename in filenames:
            if _is_python_file(filename) and filename != '__init__.py':
                src = join(directory, filename)
                module = package + src[len(src_directory):-3]
                modules.append(module.replace(os.sep, '.'))
    return modules

def get_module_files(src_directory, blacklist=STD_BLACKLIST):
    """given a package directory return a list of all available python
    module's files in the package and its subpackages

    :type src_directory: str
    :param src_directory:
      path of the directory corresponding to the package

    :type blacklist: list or tuple
    :param blacklist:
      optional list of files or directory to ignore, default to the value of
      `logilab.common.STD_BLACKLIST`

    :rtype: list
    :return:
      the list of all available python module's files in the package and
      its subpackages
    """
    files = []
    for directory, dirnames, filenames in os.walk(src_directory):
        _handle_blacklist(blacklist, dirnames, filenames)
        # check for __init__.py
        if not '__init__.py' in filenames:
            dirnames[:] = ()
            continue
        for filename in filenames:
            if _is_python_file(filename):
                src = join(directory, filename)
                files.append(src)
    return files

def get_source_file(filename, include_no_ext=False):
    """given a python module's file name return the matching source file
    name (the filename will be returned identically if it's a already an
    absolute path to a python source file...)

    :type filename: str
    :param filename: python module's file name

    :raise NoSourceFile: if no source file exists on the file system

    :rtype: str
    :return: the absolute path of the source file if it exists
    """
    base, orig_ext = splitext(abspath(filename))
    for ext in PY_SOURCE_EXTS:
        source_path = '%s.%s' % (base, ext)
        if exists(source_path):
            return source_path
    if include_no_ext and not orig_ext and exists(base):
        return base
    raise NoSourceFile(filename)

def cleanup_sys_modules(directories):
    """remove submodules of `directories` from `sys.modules`"""
    for modname, module in sys.modules.items():
        modfile = getattr(module, '__file__', None)
        if modfile:
            for directory in directories:
                if modfile.startswith(directory):
                    del sys.modules[modname]
                    break

def is_python_source(filename):
    """
    rtype: bool
    return: True if the filename is a python source file
    """
    return splitext(filename)[1][1:] in PY_SOURCE_EXTS

def is_standard_module(modname, std_path=(STD_LIB_DIR,)):
    """try to guess if a module is a standard python module (by default,
    see `std_path` parameter's description)

    :type modname: str
    :param modname: name of the module we are interested in

    :type std_path: list(str) or tuple(str)
    :param std_path: list of path considered has standard

    :rtype: bool
    :return:
      true if the module:
      - is located on the path listed in one of the directory in `std_path`
      - is a built-in module
    """
    modname = modname.split('.')[0]
    try:
        filename = file_from_modpath([modname])
    except ImportError, ex:
        # import failed, i'm probably not so wrong by supposing it's
        # not standard...
        return 0
    # modules which are not living in a file are considered standard
    # (sys and __builtin__ for instance)
    if filename is None:
        return 1
    filename = abspath(filename)
    for path in std_path:
        path = abspath(path)
        if filename.startswith(path):
            pfx_len = len(path)
            if filename[pfx_len+1:pfx_len+14] != 'site-packages':
                return 1
            return 0
    return False

def is_relative(modname, from_file):
    """return true if the given module name is relative to the given
    file name

    :type modname: str
    :param modname: name of the module we are interested in

    :type from_file: str
    :param from_file:
      path of the module from which modname has been imported

    :rtype: bool
    :return:
      true if the module has been imported relatively to `from_file`
    """
    if not isdir(from_file):
        from_file = dirname(from_file)
    if from_file in sys.path:
        return False
    try:
        find_module(modname.split('.')[0], [from_file])
        return True
    except ImportError:
        return False

# internal only functions #####################################################

def _file_from_modpath(modpath, path=None, context=None):
    """given a mod path (i.e. splitted module / package name), return the
    corresponding file

    this function is used internally, see `file_from_modpath`'s
    documentation for more information
    """
    assert len(modpath) > 0
    if context is not None:
        try:
            mtype, mp_filename = _module_file(modpath, [context])
        except ImportError:
            mtype, mp_filename = _module_file(modpath, path)
    else:
        mtype, mp_filename = _module_file(modpath, path)
    if mtype == PY_COMPILED:
        try:
            return get_source_file(mp_filename)
        except NoSourceFile:
            return mp_filename
    elif mtype == C_BUILTIN:
        # integrated builtin module
        return None
    elif mtype == PKG_DIRECTORY:
        mp_filename = _has_init(mp_filename)
    return mp_filename

def _search_zip(modpath, pic):
    for filepath, importer in pic.items():
        if importer is not None:
            if importer.find_module(modpath[0]):
                if not importer.find_module('/'.join(modpath)):
                    raise ImportError('No module named %s in %s/%s' % (
                        '.'.join(modpath[1:]), file, modpath))
                return ZIPFILE, abspath(filepath) + '/' + '/'.join(modpath), filepath
    raise ImportError('No module named %s' % '.'.join(modpath))

def _module_file(modpath, path=None):
    """get a module type / file path

    :type modpath: list or tuple
    :param modpath:
      splitted module's name (i.e name of a module or package splitted
      on '.'), with leading empty strings for explicit relative import

    :type path: list or None
    :param path:
      optional list of path where the module or package should be
      searched (use sys.path if nothing or None is given)

    :rtype: tuple(int, str)
    :return: the module type flag and the file path for a module
    """
    # egg support compat
    try:
        pic = sys.path_importer_cache
        _path = (path is None and sys.path or path)
        for __path in _path:
            if not __path in pic:
                try:
                    pic[__path] = zipimport.zipimporter(__path)
                except zipimport.ZipImportError:
                    pic[__path] = None
        checkeggs = True
    except AttributeError:
        checkeggs = False
    imported = []
    while modpath:
        try:
            _, mp_filename, mp_desc = find_module(modpath[0], path)
        except ImportError:
            if checkeggs:
                return _search_zip(modpath, pic)[:2]
            raise
        else:
            if checkeggs:
                fullabspath = [abspath(x) for x in _path]
                try:
                    pathindex = fullabspath.index(dirname(abspath(mp_filename)))
                    emtype, emp_filename, zippath = _search_zip(modpath, pic)
                    if pathindex > _path.index(zippath):
                        # an egg takes priority
                        return emtype, emp_filename
                except ValueError:
                    # XXX not in _path
                    pass
                except ImportError:
                    pass
                checkeggs = False
        imported.append(modpath.pop(0))
        mtype = mp_desc[2]
        if modpath:
            if mtype != PKG_DIRECTORY:
                raise ImportError('No module %s in %s' % ('.'.join(modpath),
                                                          '.'.join(imported)))
            path = [mp_filename]
    return mtype, mp_filename

def _is_python_file(filename):
    """return true if the given filename should be considered as a python file

    .pyc and .pyo are ignored
    """
    for ext in ('.py', '.so', '.pyd', '.pyw'):
        if filename.endswith(ext):
            return True
    return False

def _has_init(directory):
    """if the given directory has a valid __init__ file, return its path,
    else return None
    """
    mod_or_pack = join(directory, '__init__')
    for ext in PY_SOURCE_EXTS + ('pyc', 'pyo'):
        if exists(mod_or_pack + '.' + ext):
            return mod_or_pack + '.' + ext
    return None


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**spec_signature_to_version** | **{str: (str,)}** |  | [optional]
**tool_ids** | **{str: (str,)}** |  | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
USE tempdb;
GO

IF OBJECT_ID('dbo.test_table', 'U') IS NOT NULL
	DROP TABLE dbo.test_table;
GO

-- Unnamed PRIMARY KEY in column defintion
CREATE TABLE dbo.test_table
(
	Id			INT	IDENTITY PRIMARY KEY CLUSTERED,
	myText		VARCHAR(1024)
)
GO

DROP TABLE dbo.test_table;
GO

-- Unnamed PRIMARY KEY in column defintion
CREATE TABLE dbo.test_table
(
	Id			INT	IDENTITY,
	myText		VARCHAR(1024),
	CONSTRAINT PK_Id					-- Name of index
    PRIMARY KEY CLUSTERED (Id)			-- Fields in index
    WITH (IGNORE_DUP_KEY = OFF)			-- When ON just a warning is generated, when OFF an error message is generated
)
GO

DROP TABLE dbo.test_table;
GO

-- No index
CREATE TABLE dbo.test_table
(
	Id			INT	IDENTITY,
	myText		VARCHAR(1024)
)
GO

ALTER TABLE dbo.test_table WITH NOCHECK
ADD CONSTRAINT PK_Id PRIMARY KEY CLUSTERED (Id)
WITH (FILLFACTOR = 75, ONLINE = OFF, PAD_INDEX = ON);	-- Need Enterprise addition to build index with ONLINE = ON
GO

IF OBJECT_ID('dbo.test_table', 'U') IS NOT NULL
	DROP TABLE dbo.test_table;
GO


text:
    預選課表

          週課表

      @foreach ($general->days as $d)

          id}}" class="btn-block pre_header_clear d-flex justify-content-center" href="javascript:void(0)">
            {{$d->name}}

      @endforeach

  @foreach ($general->periods as $p)

          {{$p->simple_name}}

          {{date('H:i', strtotime($p->上課時間))}}

          {{date('H:i', strtotime($p->下課時間))}}

      @foreach ($general->days as $d)

id}}">

    @foreach ($general->pre_curriculum as $c)
      @if ($c->course)
        @foreach ($c->course->times as $t)
          @if ($t->period && $t->day && $t->period->name == $p->name && $t->day->name == $d->name)

            {{$c->course->name}}

          @endif
        @endforeach
      @endif
    @endforeach

      @endforeach

  @endforeach


text:
/*
 * IMPORTANT: This header file describes INTERNAL interfaces to libdispatch
 * which are subject to change in future releases of Mac OS X. Any applications
 * relying on these interfaces WILL break.
 */

#ifndef __DISPATCH_ALLOCATOR_INTERNAL__
#define __DISPATCH_ALLOCATOR_INTERNAL__

#ifndef DISPATCH_ALLOCATOR
#if TARGET_OS_MAC && (defined(__LP64__) || TARGET_OS_EMBEDDED)
#define DISPATCH_ALLOCATOR 1
#endif
#endif

#if TARGET_IPHONE_SIMULATOR && IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED < 1090
#undef DISPATCH_USE_NANOZONE
#define DISPATCH_USE_NANOZONE 0
#endif
#ifndef DISPATCH_USE_NANOZONE
#if TARGET_OS_MAC && defined(__LP64__) && \
		(__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 || \
		__IPHONE_OS_VERSION_MIN_REQUIRED >= 70000)
#define DISPATCH_USE_NANOZONE 1
#endif
#endif

#ifndef DISPATCH_USE_MALLOCZONE
#if (TARGET_OS_MAC && !DISPATCH_USE_NANOZONE) || \
		(!TARGET_OS_MAC && HAVE_MALLOC_CREATE_ZONE)
#define DISPATCH_USE_MALLOCZONE 1
#endif
#endif

#ifndef DISPATCH_CONTINUATION_MALLOC
#if DISPATCH_USE_NANOZONE || !DISPATCH_ALLOCATOR
#define DISPATCH_CONTINUATION_MALLOC 1
#endif
#endif

#if !DISPATCH_ALLOCATOR && !DISPATCH_CONTINUATION_MALLOC
#error Invalid allocator configuration
#endif

#if DISPATCH_ALLOCATOR && DISPATCH_CONTINUATION_MALLOC
#define DISPATCH_ALLOC_NOINLINE DISPATCH_NOINLINE
#else
#define DISPATCH_ALLOC_NOINLINE
#endif

#pragma mark -
#pragma mark DISPATCH_ALLOCATOR

#if DISPATCH_ALLOCATOR

// Configuration here!
#define NUM_CPU dispatch_hw_config(logical_cpus)
#define MAGAZINES_PER_HEAP (NUM_CPU)

// Do you care about compaction or performance?
#if TARGET_OS_EMBEDDED
#define PACK_FIRST_PAGE_WITH_CONTINUATIONS 1
#else
#define PACK_FIRST_PAGE_WITH_CONTINUATIONS 0
#endif

#ifndef PAGE_MAX_SIZE
#define PAGE_MAX_SIZE PAGE_SIZE
#endif
#ifndef PAGE_MAX_MASK
#define PAGE_MAX_MASK PAGE_MASK
#endif
#define DISPATCH_ALLOCATOR_PAGE_SIZE PAGE_MAX_SIZE
#define DISPATCH_ALLOCATOR_PAGE_MASK PAGE_MAX_MASK

#if TARGET_OS_EMBEDDED
#define PAGES_PER_MAGAZINE 64
#else
#define PAGES_PER_MAGAZINE 512
#endif

// Use the largest type your platform is comfortable doing atomic ops with.
// TODO: rdar://11477843
typedef unsigned long bitmap_t;
#if defined(__LP64__)
#define BYTES_PER_BITMAP 8
#else
#define BYTES_PER_BITMAP 4
#endif

#define BITMAP_C(v) ((bitmap_t)(v))
#define BITMAP_ALL_ONES (~BITMAP_C(0))

// Stop configuring.

#define CONTINUATIONS_PER_BITMAP (BYTES_PER_BITMAP * 8)
#define BITMAPS_PER_SUPERMAP (BYTES_PER_SUPERMAP * 8)

#define BYTES_PER_MAGAZINE (PAGES_PER_MAGAZINE * DISPATCH_ALLOCATOR_PAGE_SIZE)
#define CONSUMED_BYTES_PER_BITMAP (BYTES_PER_BITMAP + \
		(DISPATCH_CONTINUATION_SIZE * CONTINUATIONS_PER_BITMAP))

#define BYTES_PER_SUPERMAP BYTES_PER_BITMAP
#define CONSUMED_BYTES_PER_SUPERMAP (BYTES_PER_SUPERMAP + \
		(BITMAPS_PER_SUPERMAP * CONSUMED_BYTES_PER_BITMAP))

#define BYTES_PER_HEAP (BYTES_PER_MAGAZINE * MAGAZINES_PER_HEAP)

#define BYTES_PER_PAGE DISPATCH_ALLOCATOR_PAGE_SIZE
#define CONTINUATIONS_PER_PAGE (BYTES_PER_PAGE / DISPATCH_CONTINUATION_SIZE)
#define BITMAPS_PER_PAGE (CONTINUATIONS_PER_PAGE / CONTINUATIONS_PER_BITMAP)

// Assumption: metadata will be only in the first page.
#define SUPERMAPS_PER_MAGAZINE ((BYTES_PER_MAGAZINE - BYTES_PER_PAGE) / \
		CONSUMED_BYTES_PER_SUPERMAP)
#define BITMAPS_PER_MAGAZINE (SUPERMAPS_PER_MAGAZINE * BITMAPS_PER_SUPERMAP)
#define CONTINUATIONS_PER_MAGAZINE \
		(BITMAPS_PER_MAGAZINE * CONTINUATIONS_PER_BITMAP)

#define HEAP_MASK (~(uintptr_t)(BYTES_PER_HEAP - 1))
#define MAGAZINE_MASK (~(uintptr_t)(BYTES_PER_MAGAZINE - 1))

// this will round up such that first_bitmap_in_same_page() can mask the address
// of a bitmap_t in the maps to obtain the first bitmap for that same page
#define ROUND_UP_TO_BITMAP_ALIGNMENT(x) \
		(((x) + ((BITMAPS_PER_PAGE * BYTES_PER_BITMAP) - 1u)) & \
		~((BITMAPS_PER_PAGE * BYTES_PER_BITMAP) - 1u))
// Since these are both powers of two, we end up with not only the max alignment,
// but happily the least common multiple, which will be the greater of the two.
#define ROUND_UP_TO_BITMAP_ALIGNMENT_AND_CONTINUATION_SIZE(x) (ROUND_UP_TO_CONTINUATION_SIZE(ROUND_UP_TO_BITMAP_ALIGNMENT(x)))
#define PADDING_TO_BITMAP_ALIGNMENT_AND_CONTINUATION_SIZE(x) (ROUND_UP_TO_BITMAP_ALIGNMENT_AND_CONTINUATION_SIZE(x) - (x))

#define PADDING_TO_CONTINUATION_SIZE(x) (ROUND_UP_TO_CONTINUATION_SIZE(x) - (x))

#if defined(__LP64__)
#define SIZEOF_HEADER 16
#else
#define SIZEOF_HEADER 8
#endif

#define SIZEOF_SUPERMAPS (BYTES_PER_SUPERMAP * SUPERMAPS_PER_MAGAZINE)
#define SIZEOF_MAPS (BYTES_PER_BITMAP * BITMAPS_PER_SUPERMAP * \
		SUPERMAPS_PER_MAGAZINE)

// header is expected to end on supermap's required alignment
#define HEADER_TO_SUPERMAPS_PADDING 0
// we want to align the maps to a continuation size, but we must also have proper padding
// so that we can perform first_bitmap_in_same_page()
#define SUPERMAPS_TO_MAPS_PADDING (PADDING_TO_BITMAP_ALIGNMENT_AND_CONTINUATION_SIZE( \
		SIZEOF_SUPERMAPS + HEADER_TO_SUPERMAPS_PADDING + SIZEOF_HEADER))

#define MAPS_TO_FPMAPS_PADDING (PADDING_TO_CONTINUATION_SIZE(SIZEOF_MAPS))

#define BYTES_LEFT_IN_FIRST_PAGE (BYTES_PER_PAGE - \
		(SIZEOF_HEADER + HEADER_TO_SUPERMAPS_PADDING + SIZEOF_SUPERMAPS + \
		SUPERMAPS_TO_MAPS_PADDING + SIZEOF_MAPS + MAPS_TO_FPMAPS_PADDING))

#if PACK_FIRST_PAGE_WITH_CONTINUATIONS

#define FULL_BITMAPS_IN_FIRST_PAGE \
		(BYTES_LEFT_IN_FIRST_PAGE / CONSUMED_BYTES_PER_BITMAP)
#define REMAINDER_IN_FIRST_PAGE (BYTES_LEFT_IN_FIRST_PAGE - \
		(FULL_BITMAPS_IN_FIRST_PAGE * CONSUMED_BYTES_PER_BITMAP) - \
		(FULL_BITMAPS_IN_FIRST_PAGE ? 0 : \
		ROUND_UP_TO_CONTINUATION_SIZE(BYTES_PER_BITMAP)))

#define REMAINDERED_CONTINUATIONS_IN_FIRST_PAGE \
		(REMAINDER_IN_FIRST_PAGE / DISPATCH_CONTINUATION_SIZE)
#define CONTINUATIONS_IN_FIRST_PAGE (FULL_BITMAPS_IN_FIRST_PAGE * \
		CONTINUATIONS_PER_BITMAP) + REMAINDERED_CONTINUATIONS_IN_FIRST_PAGE
#define BITMAPS_IN_FIRST_PAGE (FULL_BITMAPS_IN_FIRST_PAGE + \
		(REMAINDERED_CONTINUATIONS_IN_FIRST_PAGE == 0 ? 0 : 1))

#define FPMAPS_TO_FPCONTS_PADDING (PADDING_TO_CONTINUATION_SIZE(\
		BYTES_PER_BITMAP * BITMAPS_IN_FIRST_PAGE))

#else // PACK_FIRST_PAGE_WITH_CONTINUATIONS

#define MAPS_TO_CONTS_PADDING BYTES_LEFT_IN_FIRST_PAGE

#endif // PACK_FIRST_PAGE_WITH_CONTINUATIONS

#define AFTER_CONTS_PADDING (BYTES_PER_MAGAZINE - (BYTES_PER_PAGE + \
		(DISPATCH_CONTINUATION_SIZE * CONTINUATIONS_PER_MAGAZINE)))

// This is the object our allocator allocates: a chunk of memory rounded up
// from sizeof(struct dispatch_continuation_s) to the cacheline size, so
// unrelated continuations don't share cachelines. It'd be nice if
// dispatch_continuation_s included this rounding/padding, but it doesn't.
typedef char padded_continuation[DISPATCH_CONTINUATION_SIZE];

// A dispatch_heap_t is the base address of an array of dispatch_magazine_s,
// one magazine per CPU.
typedef struct dispatch_magazine_s * dispatch_heap_t;

struct dispatch_magazine_header_s {
	// Link to the next heap in the chain. Only used in magazine 0's header
	dispatch_heap_t dh_next;

	// Points to the first bitmap in the page where this CPU succesfully
	// allocated a continuation last time. Only used in the first heap.
	bitmap_t *last_found_page;
};

// A magazine is a complex data structure. It must be exactly
// PAGES_PER_MAGAZINE * PAGE_SIZE bytes long, and that value must be a
// power of 2. (See magazine_for_continuation()).
struct dispatch_magazine_s {
	// See above.
	struct dispatch_magazine_header_s header;

	// Align supermaps as needed.
#if HEADER_TO_SUPERMAPS_PADDING > 0
	char _pad0[HEADER_TO_SUPERMAPS_PADDING];
#endif

	// Second-level bitmap; each set bit means a bitmap_t in maps[][]
	// is completely full (and can be skipped while searching).
	bitmap_t supermaps[SUPERMAPS_PER_MAGAZINE];

	// Align maps to a cacheline.
#if SUPERMAPS_TO_MAPS_PADDING > 0
	char _pad1[SUPERMAPS_TO_MAPS_PADDING];
#endif

	// Each bit in maps[][] is the free/used state of a member of conts[][][].
	bitmap_t maps[SUPERMAPS_PER_MAGAZINE][BITMAPS_PER_SUPERMAP];

	// Align fp_maps to a cacheline.
#if MAPS_TO_FPMAPS_PADDING > 0
	char _pad2[MAPS_TO_FPMAPS_PADDING];
#endif

#if PACK_FIRST_PAGE_WITH_CONTINUATIONS
	// Bitmaps for the continuations that live in the first page, which
	// are treated specially (they have faster search code).
	bitmap_t fp_maps[BITMAPS_IN_FIRST_PAGE];

	// Align fp_conts to cacheline.
#if FPMAPS_TO_FPCONTS_PADDING > 0
	char _pad3[FPMAPS_TO_FPCONTS_PADDING];
#endif

	// Continuations that live in the first page.
	padded_continuation fp_conts[CONTINUATIONS_IN_FIRST_PAGE];

#else // PACK_FIRST_PAGE_WITH_CONTINUATIONS

#if MAPS_TO_CONTS_PADDING > 0
	char _pad4[MAPS_TO_CONTS_PADDING];
#endif
#endif // PACK_FIRST_PAGE_WITH_CONTINUATIONS

	// This is the big array of continuations.
	// This must start on a page boundary.
	padded_continuation conts[SUPERMAPS_PER_MAGAZINE][BITMAPS_PER_SUPERMAP]
			[CONTINUATIONS_PER_BITMAP];

	// Fill the unused space to exactly BYTES_PER_MAGAZINE
#if AFTER_CONTS_PADDING > 0
	char _pad5[AFTER_CONTS_PADDING];
#endif
};

#if DISPATCH_DEBUG
#define DISPATCH_ALLOCATOR_SCRIBBLE ((uintptr_t)0xAFAFAFAFAFAFAFAF)
#endif

#endif // DISPATCH_ALLOCATOR

#endif // __DISPATCH_ALLOCATOR_INTERNAL__


text:
module Mongoid
  module Errors

    # This error is raised when trying to create set nested documents above the
    # specified :limit
    #
    # @example Create the error.
    #   TooManyNestedAttributeRecords.new('association', limit)
    class TooManyNestedAttributeRecords < MongoidError
      def initialize(association, limit)
        super(
          compose_message(
            "too_many_nested_attribute_records",
            { association: association, limit: limit }
          )
        )
      end
    end
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>social networking – Miller Ad Agency</title>
	<atom:link href="./index.html" rel="self" type="application/rss+xml" />
	<link>./../../../index.html</link>
	<description>Your Neighborhood Ad Agency</description>
	<lastBuildDate>Sun, 11 Jun 2017 14:47:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.8</generator>
	<item>
		<title>Facebook in 2016</title>
		<link>./../../../about-miller-ad-agency/blog/facebook-in-2016/index.html</link>
		<comments>./../../../about-miller-ad-agency/blog/facebook-in-2016/index.html#respond</comments>
		<pubDate>Wed, 18 May 2016 15:30:00 +0000</pubDate>
		<dc:creator><![CDATA[Team Miller]]></dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">./../../../about-miller-ad-agency/blog/facebook-in-2016/index.html</guid>
		<description><![CDATA[
Here I will summarize the current state of one of the most popular and influential social networks currently making waves in cyber space.

The post Facebook in 2016 appeared first on Miller Ad Agency.

]]></description>
		<wfw:commentRss>./../../../about-miller-ad-agency/blog/facebook-in-2016/feed/index.html</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Media's Influence on Politics</title>
		<link>./../../../about-miller-ad-agency/blog/social-medias-influence-on-politics/index.html</link>
		<comments>./../../../about-miller-ad-agency/blog/social-medias-influence-on-politics/index.html#respond</comments>
		<pubDate>Wed, 27 Apr 2016 17:06:00 +0000</pubDate>
		<dc:creator><![CDATA[Sasha Gelemanovic]]></dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Lifestyle]]></category>
		<category><![CDATA[influence]]></category>
		<category><![CDATA[kennedy]]></category>
		<category><![CDATA[obama]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[richard nixon]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">./../../../about-miller-ad-agency/blog/social-medias-influence-on-politics/index.html</guid>
		<description><![CDATA[
Today's political campaigns are not your grandfather's campaigns, or even your father's campaigns. Gone are the days when people had to turn on the nightly news to find out what their favorite candidate was up to that day.

The post Social Media's Influence on Politics appeared first on Miller Ad Agency.

]]></description>
		<wfw:commentRss>./../../../about-miller-ad-agency/blog/social-medias-influence-on-politics/feed/index.html</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Facebook Advertising Works</title>
		<link>./../../../about-miller-ad-agency/blog/how-facebook-advertising-works/index.html</link>
		<comments>./../../../about-miller-ad-agency/blog/how-facebook-advertising-works/index.html#respond</comments>
		<pubDate>Fri, 06 Mar 2015 16:50:00 +0000</pubDate>
		<dc:creator><![CDATA[Team Miller]]></dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Advertising]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[toys]]></category>

		<guid isPermaLink="false">./../../../about-miller-ad-agency/blog/how-facebook-advertising-works/index.html</guid>
		<description><![CDATA[
From a Ever find yourself aimlessly scrolling through your Facebook newsfeed and all of a sudden you see that product you were JUST looking at on another website pop up with an alluring "sale going on now!" or an ad of a box full of dog toys and treats that you can subscribe to have […]

The post How Facebook Advertising Works appeared first on Miller Ad Agency.

]]></description>
		<wfw:commentRss>./../../../about-miller-ad-agency/blog/how-facebook-advertising-works/feed/index.html</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>


text:
using System;

internal class AA
{
    private static int Main()
    {
        uint SMALL1 = 0x00000100;
        uint SMALL2 = 0x7fffffff;
        uint BIG1 = 0x80000000;
        uint BIG2 = 0xffffffff;
        int[] array = null;
        AA[,,] marray = null;
        try
        {
            array = new int[SMALL1];
            Console.WriteLine("Test 1 passed");
        }
        catch (Exception)
        {
            Console.WriteLine("Test 1 failed");
            return 101;
        }
        try
        {
            array = new int[SMALL2];
            Console.WriteLine("Test 2 failed");
            return 102;
        }
        catch (OutOfMemoryException)
        {
            Console.WriteLine("Test 2 passed");
        }
        try
        {
            array = new int[BIG1];
            Console.WriteLine("Test 3 failed");
            return 103;
        }
        catch (OverflowException)
        {
            Console.WriteLine("Test 3 passed");
        }
        try
        {
            array = new int[BIG2];
            Console.WriteLine("Test 4 failed");
            return 104;
        }
        catch (OverflowException)
        {
            Console.WriteLine("Test 4 passed");
        }
        try
        {
            marray = new AA[SMALL1, 1, SMALL1];
            Console.WriteLine("Test 5 passed");
        }
        catch (Exception)
        {
            Console.WriteLine("Test 5 failed");
            return 105;
        }
        try
        {
            marray = new AA[2, SMALL2, SMALL2];
            Console.WriteLine("Test 6 failed");
            return 106;
        }
        catch (OutOfMemoryException)
        {
            Console.WriteLine("Test 6 passed");
        }
        try
        {
            marray = new AA[BIG1, BIG1, 2];
            Console.WriteLine("Test 7 failed");
            return 107;
        }
        catch (OverflowException)
        {
            Console.WriteLine("Test 7 passed");
        }
        try
        {
            marray = new AA[BIG2, 0, 1];
            Console.WriteLine("Test 8 failed");
            return 108;
        }
        catch (OverflowException)
        {
            Console.WriteLine("Test 8 passed");
        }
        Console.WriteLine("All tests passed");
        return 100;
    }
}


text:
/* global describe, it */

'use strict'

var Content = require('..').Content
var Cookie = require('..').Cookie
var Header = require('..').Header
var Response = require('..').Response
var validator = require('har-validator').response

require('should')

describe('Response', function () {
  it('should throw error when no url', function (done) {
    /* eslint-disable */
    (function () {
      new Response()
    }).should.throw('missing required fields')
    /* eslint-enable */

    done()
  })

  it('should create an empty object with default values', function (done) {
    var response = new Response({
      status: 200,
      statusText: 'OK'
    })

    response.should.be.an.Object
    response.should.have.property('status').and.equal(200)
    response.should.have.property('statusText').and.equal('OK')
    response.should.have.property('httpVersion').and.equal('HTTP/1.1')
    response.should.have.property('cookies').and.be.empty
    response.should.have.property('headers').and.be.empty
    response.should.have.property('redirectURL').and.be.empty
    response.should.have.property('headersSize').and.be.equal(4)
    response.should.have.property('bodySize').and.be.equal(0)
    response.should.have.property('comment').and.be.empty
    response.should.have.property('content').and.be.eql(new Content())

    validator(response).should.be.true

    done()
  })

  describe('Headers', function () {
    it('should add a single header using an object', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK'
      })

      var header = {
        name: 'foo',
        value: 'bar',
        comment: 'foo'
      }

      response.addHeader(header)

      response.should.be.an.Object
      response.should.have.property('headers').and.eql([header])

      validator(response).should.be.true

      done()
    })

    it('should add a single header using an instance', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK'
      })

      var header = new Header('foo', 'bar', 'foo')

      response.addHeader(header)

      response.should.be.an.Object
      response.should.have.property('headers').and.eql([header])

      validator(response).should.be.true

      done()
    })

    it('should set headers on creation', function (done) {
      var header = {
        name: 'foo',
        value: 'bar',
        comment: 'foo'
      }

      var response = new Response({
        status: 200,
        statusText: 'OK',
        headers: [header]
      })

      response.should.be.an.Object
      response.should.have.property('headers').and.eql([header])

      validator(response).should.be.true

      done()
    })

    it('should set headers manually', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK'
      })

      var header = {
        name: 'foo',
        value: 'bar',
        comment: 'foo'
      }

      response.headers = [header]

      response.should.be.an.Object
      response.should.have.property('headers').and.eql([header])

      validator(response).should.be.true

      done()
    })
  })

  describe('Cookies', function () {
    it('should add a single cookie using an object', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK'
      })

      var cookie = {
        name: 'foo',
        value: 'bar',
        path: '/',
        domain: 'www.ahmadnassri.com',
        expires: new Date().toISOString(),
        httpOnly: true,
        secure: true,
        comment: 'foo'
      }

      response.addCookie(cookie)

      response.should.be.an.Object
      response.should.have.property('cookies').and.eql([cookie])

      validator(response).should.be.true

      done()
    })

    it('should add a single cookie using an instance', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK'
      })

      var cookie = new Cookie({
        name: 'foo',
        value: 'bar',
        path: '/',
        domain: 'www.ahmadnassri.com',
        expires: new Date().toISOString(),
        httpOnly: true,
        secure: true,
        comment: 'foo'
      })

      response.addCookie(cookie)

      response.should.be.an.Object
      response.should.have.property('cookies').and.eql([cookie])

      validator(response).should.be.true

      done()
    })

    it('should set cookies on creation', function (done) {
      var cookie = {
        name: 'foo',
        value: 'bar',
        path: '/',
        domain: 'www.ahmadnassri.com',
        expires: new Date().toISOString(),
        httpOnly: true,
        secure: true,
        comment: 'foo'
      }

      var response = new Response({
        status: 200,
        statusText: 'OK',
        cookies: [cookie]
      })

      response.should.be.an.Object
      response.should.have.property('cookies').and.eql([cookie])

      validator(response).should.be.true

      done()
    })

    it('should set cookies manually', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK'
      })

      var cookie = {
        name: 'foo',
        value: 'bar',
        path: '/',
        domain: 'www.ahmadnassri.com',
        expires: new Date().toISOString(),
        httpOnly: true,
        secure: true,
        comment: 'foo'
      }

      response.cookies = [cookie]

      response.should.be.an.Object
      response.should.have.property('cookies').and.eql([cookie])

      validator(response).should.be.true

      done()
    })
  })

  describe('headersSize', function () {
    it('should not allow setting value', function (done) {
      /* eslint-disable */
      (function () {
        var response = new Response({
          status: 200,
          statusText: 'OK'
        })

        response.headersSize = 2
      }).should.throw('not allowed')
      /* eslint-enable */

      done()
    })

    it('should calculate headers size', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK',
        headers: [new Header('foo', 'bar')]
      })

      response.headersSize.should.equal(12)

      done()
    })
  })

  describe('content', function () {
    it('should allow setting content from constructor', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK',
        content: new Content()
      })

      response.should.have.property('content').and.be.eql(new Content())

      done()
    })

    it('should calculate content size', function (done) {
      var response = new Response({
        status: 200,
        statusText: 'OK',
        content: new Content({
          text: 'foo'
        })
      })

      response.should.have.property('bodySize').and.be.eql(3)

      done()
    })

    it('should not allow setting bodySize value', function (done) {
      /* eslint-disable */
      (function () {
        var response = new Response({
          status: 200,
          statusText: 'OK'
        })

        response.bodySize = 2
      }).should.throw('not allowed')
      /* eslint-enable */

      done()
    })
  })
})


text:
This is a basic example using the 'distroless' base image and adding an application.

The dockerfile also includes busybox from gcr.io/distroless/base:debug - this is only for debug, you should not
need it for production.

## Test app

The included application is the Istio 'echo' test app, found in istio/pkg/test/echo. This is used in most e2e tests
in Istio, and will be used to run the e2e tests for CloudRun.

It will dump request headers and information, and it supports a number of options for testing.


text:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;

namespace FineUI.Examples.aspnet
{
    public partial class ueditor : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //string content = "初始化内容";
                //PageContext.RegisterStartupScript(String.Format("updateUEditor({0});", JsHelper.Enquote(content)));

            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string ueditorContent = Request.Form["UEditor1"].ToString();
            Alert.ShowInTop(HttpUtility.HtmlEncode(ueditorContent));
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            string content = "
FineUI - 基于 ExtJS 的专业 ASP.NET 控件库,拥有完善的 AJAX 支持和丰富的界面效果。
";

            PageContext.RegisterStartupScript(String.Format("updateUEditor({0});", JsHelper.Enquote(content)));
        }

    }
}


text:
"""Public Key Sign wrapper."""

from typing import Type
from absl import logging

from tink.proto import tink_pb2
from tink import core
from tink.signature import _public_key_sign
from tink.signature import _public_key_verify

class _WrappedPublicKeySign(_public_key_sign.PublicKeySign):
  """Implements PublicKeySign for a set of PublicKeySign primitives."""

  def __init__(self, primitives_set: core.PrimitiveSet):
    self._primitive_set = primitives_set

  def sign(self, data: bytes) -> bytes:
    """Computes the signature for data using the primary primitive.

    Args:
      data: The input data.

    Returns:
      The signature.
    """
    primary = self._primitive_set.primary()

    if not primary:
      raise core.TinkError('primary primitive not set')

    sign_data = data
    if primary.output_prefix_type == tink_pb2.LEGACY:
      sign_data = sign_data + b'\x00'

    return primary.identifier + primary.primitive.sign(sign_data)

class PublicKeySignWrapper(
    core.PrimitiveWrapper[_public_key_sign.PublicKeySign,
                          _public_key_sign.PublicKeySign]):
  """A PrimitiveWrapper for the PublicKeySign primitive.

  The returned primitive works with a keyset (rather than a single key). To sign
  a message, it uses the primary key in the keyset, and prepends to the
  signature a certain prefix associated with the primary key.
  """

  def wrap(self, primitives_set: core.PrimitiveSet
          ) -> _WrappedPublicKeySign:
    return _WrappedPublicKeySign(primitives_set)

  def primitive_class(self) -> Type[_public_key_sign.PublicKeySign]:
    return _public_key_sign.PublicKeySign

  def input_primitive_class(self) -> Type[_public_key_sign.PublicKeySign]:
    return _public_key_sign.PublicKeySign

class _WrappedPublicKeyVerify(_public_key_verify.PublicKeyVerify):
  """Implements PublicKeyVerify for a set of PublicKeyVerify primitives."""

  def __init__(self, primitives_set: core.PrimitiveSet):
    self._primitive_set = primitives_set

  def verify(self, signature: bytes, data: bytes):
    """Verifies that signature is a digital signature for data.

    Args:
      signature: The signature bytes to be checked.
      data: The data bytes to be checked.

    Raises:
      tink_error.TinkError if the verification fails.
    """
    if len(signature) <= core.crypto_format.NON_RAW_PREFIX_SIZE:
      # This also rejects raw signatures with size of 4 bytes or fewer.
      # We're not aware of any schemes that output signatures that small.
      raise core.TinkError('signature too short')

    key_id = signature[:core.crypto_format.NON_RAW_PREFIX_SIZE]
    raw_sig = signature[core.crypto_format.NON_RAW_PREFIX_SIZE:]

    for entry in self._primitive_set.primitive_from_identifier(key_id):
      try:
        if entry.output_prefix_type == tink_pb2.LEGACY:
          entry.primitive.verify(raw_sig, data + b'\x00')
        else:
          entry.primitive.verify(raw_sig, data)
        # Signature is valid, we can return
        return
      except core.TinkError as err:
        logging.info('signature prefix matches a key, but cannot verify: %s',
                     err)

    # No matching key succeeded with verification, try all RAW keys
    for entry in self._primitive_set.raw_primitives():
      try:
        entry.primitive.verify(signature, data)
        # Signature is valid, we can return
        return
      except core.TinkError:
        pass

    raise core.TinkError('invalid signature')

class PublicKeyVerifyWrapper(
    core.PrimitiveWrapper[_public_key_verify.PublicKeyVerify,
                          _public_key_verify.PublicKeyVerify]):
  """WrappedPublicKeyVerify is the PrimitiveWrapper for PublicKeyVerify.

  The returned primitive works with a keyset (rather than a single key). To sign
  a message, it uses the primary key in the keyset, and prepends to the
  signature a certain prefix associated with the primary key.

  The returned primitive works with a keyset (rather than a single key). To
  verify a signature, the primitive uses the prefix of the signature to
  efficiently select the right key in the set. If there is no key associated
  with the prefix or if the keys associated with the prefix do not work, the
  primitive tries all keys with tink_pb2.OutputPrefixType = tink_pb2.RAW.
  """

  def wrap(self, primitives_set: core.PrimitiveSet
          ) -> _WrappedPublicKeyVerify:
    return _WrappedPublicKeyVerify(primitives_set)

  def primitive_class(self) -> Type[_public_key_verify.PublicKeyVerify]:
    return _public_key_verify.PublicKeyVerify

  def input_primitive_class(self) -> Type[_public_key_verify.PublicKeyVerify]:
    return _public_key_verify.PublicKeyVerify


text:
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)
require File.expand_path('../shared/enumeratorize', __FILE__)
require File.expand_path('../shared/delete_if', __FILE__)
require File.expand_path('../../enumerable/shared/enumeratorized', __FILE__)

describe "Array#delete_if" do
  before do
    @a = [ "a", "b", "c" ]
  end

  it "removes each element for which block returns true" do
    @a = [ "a", "b", "c" ]
    @a.delete_if { |x| x >= "b" }
    @a.should == ["a"]
  end

  it "returns self" do
    @a.delete_if{ true }.equal?(@a).should be_true
  end

  it_behaves_like :enumeratorize, :delete_if

  it "returns self when called on an Array emptied with #shift" do
    array = [1]
    array.shift
    array.delete_if { |x| true }.should equal(array)
  end

  it "returns an Enumerator if no block given, and the enumerator can modify the original array" do
    enum = @a.delete_if
    enum.should be_an_instance_of(enumerator_class)
    @a.should_not be_empty
    enum.each { true }
    @a.should be_empty
  end

  it "returns an Enumerator if no block given, and the array is frozen" do
    @a.freeze.delete_if.should be_an_instance_of(enumerator_class)
  end

  it "raises a RuntimeError on a frozen array" do
    lambda { ArraySpecs.frozen_array.delete_if {} }.should raise_error(RuntimeError)
  end

  it "raises a RuntimeError on an empty frozen array" do
    lambda { ArraySpecs.empty_frozen_array.delete_if {} }.should raise_error(RuntimeError)
  end

  it "keeps tainted status" do
    @a.taint
    @a.tainted?.should be_true
    @a.delete_if{ true }
    @a.tainted?.should be_true
  end

  it "keeps untrusted status" do
    @a.untrust
    @a.untrusted?.should be_true
    @a.delete_if{ true }
    @a.untrusted?.should be_true
  end

  it_behaves_like :enumeratorized_with_origin_size, :delete_if, [1,2,3]
  it_behaves_like :delete_if, :delete_if
end


text:
#pragma once
#include <aws/iotanalytics/IoTAnalytics_EXPORTS.h>
#include <aws/iotanalytics/IoTAnalyticsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/iotanalytics/model/RetentionPeriod.h>
#include <aws/iotanalytics/model/DatasetAction.h>
#include <aws/iotanalytics/model/DatasetTrigger.h>
#include <utility>

namespace Aws
{
namespace IoTAnalytics
{
namespace Model
{

  /**
   */
  class AWS_IOTANALYTICS_API UpdateDatasetRequest : public IoTAnalyticsRequest
  {
  public:
    UpdateDatasetRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "UpdateDataset"; }

    Aws::String SerializePayload() const override;

    /**
     *
The name of the data set to update.

     */
    inline const Aws::String& GetDatasetName() const{ return m_datasetName; }

    /**
     *
The name of the data set to update.

     */
    inline void SetDatasetName(const Aws::String& value) { m_datasetNameHasBeenSet = true; m_datasetName = value; }

    /**
     *
The name of the data set to update.

     */
    inline void SetDatasetName(Aws::String&& value) { m_datasetNameHasBeenSet = true; m_datasetName = std::move(value); }

    /**
     *
The name of the data set to update.

     */
    inline void SetDatasetName(const char* value) { m_datasetNameHasBeenSet = true; m_datasetName.assign(value); }

    /**
     *
The name of the data set to update.

     */
    inline UpdateDatasetRequest& WithDatasetName(const Aws::String& value) { SetDatasetName(value); return *this;}

    /**
     *
The name of the data set to update.

     */
    inline UpdateDatasetRequest& WithDatasetName(Aws::String&& value) { SetDatasetName(std::move(value)); return *this;}

    /**
     *
The name of the data set to update.

     */
    inline UpdateDatasetRequest& WithDatasetName(const char* value) { SetDatasetName(value); return *this;}

    /**
     *
A list of "DatasetAction" objects.

     */
    inline const Aws::Vector<DatasetAction>& GetActions() const{ return m_actions; }

    /**
     *
A list of "DatasetAction" objects.

     */
    inline void SetActions(const Aws::Vector<DatasetAction>& value) { m_actionsHasBeenSet = true; m_actions = value; }

    /**
     *
A list of "DatasetAction" objects.

     */
    inline void SetActions(Aws::Vector<DatasetAction>&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); }

    /**
     *
A list of "DatasetAction" objects.

     */
    inline UpdateDatasetRequest& WithActions(const Aws::Vector<DatasetAction>& value) { SetActions(value); return *this;}

    /**
     *
A list of "DatasetAction" objects.

     */
    inline UpdateDatasetRequest& WithActions(Aws::Vector<DatasetAction>&& value) { SetActions(std::move(value)); return *this;}

    /**
     *
A list of "DatasetAction" objects.

     */
    inline UpdateDatasetRequest& AddActions(const DatasetAction& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }

    /**
     *
A list of "DatasetAction" objects.

     */
    inline UpdateDatasetRequest& AddActions(DatasetAction&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; }

    /**
     *
A list of "DatasetTrigger" objects. The list can be empty or can contain up
     * to five DataSetTrigger objects.

     */
    inline const Aws::Vector<DatasetTrigger>& GetTriggers() const{ return m_triggers; }

    /**
     *
A list of "DatasetTrigger" objects. The list can be empty or can contain up
     * to five DataSetTrigger objects.

     */
    inline void SetTriggers(const Aws::Vector<DatasetTrigger>& value) { m_triggersHasBeenSet = true; m_triggers = value; }

    /**
     *
A list of "DatasetTrigger" objects. The list can be empty or can contain up
     * to five DataSetTrigger objects.

     */
    inline void SetTriggers(Aws::Vector<DatasetTrigger>&& value) { m_triggersHasBeenSet = true; m_triggers = std::move(value); }

    /**
     *
A list of "DatasetTrigger" objects. The list can be empty or can contain up
     * to five DataSetTrigger objects.

     */
    inline UpdateDatasetRequest& WithTriggers(const Aws::Vector<DatasetTrigger>& value) { SetTriggers(value); return *this;}

    /**
     *
A list of "DatasetTrigger" objects. The list can be empty or can contain up
     * to five DataSetTrigger objects.

     */
    inline UpdateDatasetRequest& WithTriggers(Aws::Vector<DatasetTrigger>&& value) { SetTriggers(std::move(value)); return *this;}

    /**
     *
A list of "DatasetTrigger" objects. The list can be empty or can contain up
     * to five DataSetTrigger objects.

     */
    inline UpdateDatasetRequest& AddTriggers(const DatasetTrigger& value) { m_triggersHasBeenSet = true; m_triggers.push_back(value); return *this; }

    /**
     *
A list of "DatasetTrigger" objects. The list can be empty or can contain up
     * to five DataSetTrigger objects.

     */
    inline UpdateDatasetRequest& AddTriggers(DatasetTrigger&& value) { m_triggersHasBeenSet = true; m_triggers.push_back(std::move(value)); return *this; }

    /**
     *
How long, in days, message data is kept for the data set.

     */
    inline const RetentionPeriod& GetRetentionPeriod() const{ return m_retentionPeriod; }

    /**
     *
How long, in days, message data is kept for the data set.

     */
    inline void SetRetentionPeriod(const RetentionPeriod& value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = value; }

    /**
     *
How long, in days, message data is kept for the data set.

     */
    inline void SetRetentionPeriod(RetentionPeriod&& value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = std::move(value); }

    /**
     *
How long, in days, message data is kept for the data set.

     */
    inline UpdateDatasetRequest& WithRetentionPeriod(const RetentionPeriod& value) { SetRetentionPeriod(value); return *this;}

    /**
     *
How long, in days, message data is kept for the data set.

     */
    inline UpdateDatasetRequest& WithRetentionPeriod(RetentionPeriod&& value) { SetRetentionPeriod(std::move(value)); return *this;}

  private:

    Aws::String m_datasetName;
    bool m_datasetNameHasBeenSet;

    Aws::Vector<DatasetAction> m_actions;
    bool m_actionsHasBeenSet;

    Aws::Vector<DatasetTrigger> m_triggers;
    bool m_triggersHasBeenSet;

    RetentionPeriod m_retentionPeriod;
    bool m_retentionPeriodHasBeenSet;
  };

} // namespace Model
} // namespace IoTAnalytics
} // namespace Aws


text:
NS_ASSUME_NONNULL_BEGIN

@implementation DWTitleDetailCellModel

@synthesize style = _style;
@synthesize title = _title;
@synthesize plainDetail = _plainDetail;
@synthesize userItem = _userItem;
@synthesize attributedDetail = _attributedDetail;
@synthesize copyableData = _copyableData;
@synthesize detailAlignment = _detailAlignment;

- (instancetype)initWithTitle:(nullable NSString *)title
                     userItem:(id<DWDPBasicUserItem>)userItem
                 copyableData:(nullable NSString *)copyableData {
    self = [super init];
    if (self) {
        _style = DWTitleDetailItemStyle_User;
        _title = [title copy];
        _userItem = userItem;
        _copyableData = [copyableData copy];
    }
    return self;
}

- (instancetype)initWithStyle:(DWTitleDetailItemStyle)style plainCenteredDetail:(NSString *)plainDetail {
    return [self initWithStyle:style
                         title:nil
                   plainDetail:plainDetail
              attributedDetail:nil
                  copyableData:nil
               detailAlignment:NSTextAlignmentCenter];
}

- (instancetype)initWithStyle:(DWTitleDetailItemStyle)style plainLeftAlignedDetail:(NSString *)plainDetail {
    return [self initWithStyle:style
                         title:nil
                   plainDetail:plainDetail
              attributedDetail:nil
                  copyableData:nil
               detailAlignment:NSTextAlignmentLeft];
}

- (instancetype)initWithStyle:(DWTitleDetailItemStyle)style
                        title:(nullable NSString *)title
                  plainDetail:(NSString *)plainDetail {
    return [self initWithStyle:style
                         title:title
                   plainDetail:plainDetail
              attributedDetail:nil
                  copyableData:nil
               detailAlignment:NSTextAlignmentRight];
}

- (instancetype)initWithStyle:(DWTitleDetailItemStyle)style
                        title:(nullable NSString *)title
             attributedDetail:(NSAttributedString *)attributedDetail {
    return [self initWithStyle:style
                         title:title
                   plainDetail:nil
              attributedDetail:attributedDetail
                  copyableData:nil
               detailAlignment:NSTextAlignmentRight];
}

- (instancetype)initWithStyle:(DWTitleDetailItemStyle)style
                        title:(nullable NSString *)title
             attributedDetail:(NSAttributedString *)attributedDetail
                 copyableData:(nullable NSString *)copyableData {
    return [self initWithStyle:style
                         title:title
                   plainDetail:nil
              attributedDetail:attributedDetail
                  copyableData:copyableData
               detailAlignment:NSTextAlignmentRight];
}

- (instancetype)initWithStyle:(DWTitleDetailItemStyle)style
                        title:(nullable NSString *)title
                  plainDetail:(nullable NSString *)plainDetail
             attributedDetail:(nullable NSAttributedString *)attributedDetail
                 copyableData:(nullable NSString *)copyableData
              detailAlignment:(NSTextAlignment)detailAlignment {
    self = [super init];
    if (self) {
        _style = style;
        _title = [title copy];
        _plainDetail = [plainDetail copy];
        _attributedDetail = [attributedDetail copy];
        _copyableData = [copyableData copy];
        _detailAlignment = detailAlignment;
    }
    return self;
}

@end

NS_ASSUME_NONNULL_END


text:
<about-navigation></about-navigation>

Home

News

{{ news.title }}

{{ news.title }}

 {{ news.published }}  {{ news.author }}

Schreibe einen Kommentar

                    <form role="form">

                            <input type="text" class="form-control" id="inputName" placeholder="Name">

                            <input type="email" class="form-control" id="inputEmail" placeholder="E-Mail">

                            <textarea class="form-control" rows="3" placeholder="Ihr Kommentar"></textarea>

                        <button type="submit" class="btn btn-primary">Absenden</button>
                    </form>

{{ comment.author }}
                            {{ comment.published }}

                        {{ comment.text }}

News durchsuchen

                        <input type="text" class="form-control">

                        <button class="btn btn-default" type="button">

                        </button>

KLJB Wetten


text:
package org.apache.carbondata.processing.loading.csvinput;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * Customarized reader class to read data from file
 * until the upper threshold reached.
 */
public class BoundedInputStream extends InputStream {

  /**
   * byte value of the new line character
   */
  private static final byte END_OF_LINE_BYTE_VALUE = '\n';

  /**
   * number of extra character to read
   */
  private static final int NUMBER_OF_EXTRA_CHARACTER_TO_READ = 100;

  /**
   * number of bytes remaining
   */
  private long remaining;
  /**
   * to check whether end of line is found
   */
  private boolean endOfLineFound = false;

  private DataInputStream in;

  public BoundedInputStream(DataInputStream in, long limit) {
    this.in = in;
    this.remaining = limit;
  }

  /**
   * Below method will be used to read the data from file
   *
   * @throws IOException
   *           problem while reading
   */
  @Override
  public int read() throws IOException {
    if (this.remaining == 0) {
      return -1;
    } else {
      int var1 = this.in.read();
      if (var1 >= 0) {
        --this.remaining;
      }

      return var1;
    }
  }

  /**
   * Below method will be used to read the data from file. If limit reaches in
   * that case it will read until new line character is reached
   *
   * @param buffer
   *          buffer in which data will be read
   * @param offset
   *          from position to buffer will be filled
   * @param length
   *          number of character to be read
   * @throws IOException
   *           problem while reading
   */
  @Override
  public int read(byte[] buffer, int offset, int length) throws IOException {
    if (this.remaining == 0) {
      return -1;
    } else {
      if (this.remaining < length) {
        length = (int) this.remaining;
      }

      length = this.in.read(buffer, offset, length);
      if (length >= 0) {
        this.remaining -= length;
        if (this.remaining == 0 && !endOfLineFound) {
          endOfLineFound = true;
          this.remaining += NUMBER_OF_EXTRA_CHARACTER_TO_READ;
        } else if (endOfLineFound) {
          int end = offset + length;
          for (int i = offset; i < end; i++) {
            if (buffer[i] == END_OF_LINE_BYTE_VALUE) {
              this.remaining = 0;
              return (i - offset) + 1;
            }
          }
          this.remaining += NUMBER_OF_EXTRA_CHARACTER_TO_READ;
        }
      }
      return length;
    }
  }

  @Override
  public void close() throws IOException {
    if (in != null) {
      in.close();
    }
  }

  public long getRemaining() {
    return  this.remaining;
  }

}


text:
using System;

namespace Piranha.Localization
{
	/// <summary>
	/// A language in the localization module.
	/// </summary>
	public class Language
	{
		/// <summary>
		/// Gets/sets the culture name.
		/// </summary>
		public string Culture { get; set; }

		/// <summary>
		/// Gets/sets the display name.
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// Gets/sets the url prefix
		/// </summary>
		public string UrlPrefix { get; set; }
	}
}


text:
require 'factory_girl'

FactoryGirl.define do
  factory :user do
    sequence(:email) {|n| "user#{n}@example.com" }
    password 'password'
    password_confirmation 'password'
  end

end


text:
package com.bignerdranch.android.locatr;

public class GalleryItem {
    private String mCaption;
    private String mId;
    private String mUrl;
    private double mLat;
    private double mLon;

    public String getUrl() {
        return mUrl;
    }

    public void setUrl(String url) {
        mUrl = url;
    }

    public String getCaption() {
        return mCaption;
    }

    public void setCaption(String caption) {
        mCaption = caption;
    }

    public String getId() {
        return mId;
    }

    public void setId(String id) {
        mId = id;
    }

    public double getLat() {
        return mLat;
    }

    public void setLat(double lat) {
        mLat = lat;
    }

    public double getLon() {
        return mLon;
    }

    public void setLon(double lon) {
        mLon = lon;
    }

    @Override
    public String toString() {
        return mCaption;
    }
}


text:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

    <!-- Define the background properties like color etc -->
    <item android:id="@android:id/background">
        <shape>
            <gradient
                android:startColor="@color/checker_board_light"
                android:centerColor="@color/checker_board_light"
                android:centerY="1.0"
                android:endColor="@color/checker_board_light"
                android:angle="270"
            />
        </shape>
    </item>

    <!-- Define the progress properties like start color, end color etc -->
    <item android:id="@android:id/progress">
        <clip>
            <shape>
                <gradient
                    android:startColor="@color/colorPrimary"
                    android:centerColor="@color/colorPrimary"
                    android:centerY="1.0"
                    android:endColor="@color/colorPrimary"
                    android:angle="270"
                />
            </shape>
        </clip>
    </item>
</layer-list>


text:
cask 'feeder' do
  version '3.6.2'
  sha256 '1e9952d59cdb18ebe9ca38df290e6f176499df82841d5b5be8f3ad0502edf96a'

  url "https://reinventedsoftware.com/feeder/downloads/Feeder_#{version}.dmg"
  appcast "https://reinventedsoftware.com/feeder/downloads/Feeder#{version.major}.xml"
  name 'Feeder'
  homepage 'https://reinventedsoftware.com/feeder/'

  app "Feeder #{version.major}.app"
end


text:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<TITLE>CLHS: Permuted Symbol Index (Non-Alphabetic)</TITLE>
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="The Harlequin Group Limited">
<LINK REL=TOP HREF="../FrontMatter/index.html">
<LINK REL=COPYRIGHT HREF="../FrontMatter/About-HyperSpec.html#Legal">
<LINK REL=DISCLAIMER HREF="../FrontMatter/About-HyperSpec.html#Disclaimer">
<LINK REL=UP HREF="../FrontMatter/Symbol-Index.html">

Permuted Symbol Index (Non-Alphabetic)

                   &allow-other-keys
                   &aux
                   &body
                   &environment
                   &key
                   &optional
                   &rest
                   &whole
                   *
                 do*
                let*
               list*
               prog*
                   **
                   ***
                   *break-on-signals*
                   *compile-file-pathname*
                   *compile-file-truename*
                   *compile-print*
                   *compile-verbose*
                   *debug-io*
                   *debugger-hook*
                   *default-pathname-defaults*
                   *error-output*
                   *features*
                   *gensym-counter*
                   *load-pathname*
                   *load-print*
                   *load-truename*
                   *load-verbose*
                   *macroexpand-hook*
                   *modules*
                   *package*
                   *print-array*
                   *print-base*
                   *print-case*
                   *print-circle*
                   *print-escape*
                   *print-gensym*
                   *print-length*
                   *print-level*
                   *print-lines*
                   *print-miser-width*
                   *print-pprint-dispatch*
                   *print-pretty*
                   *print-radix*
                   *print-readably*
                   *print-right-margin*
                   *query-io*
                   *random-state*
                   *read-base*
                   *read-default-float-format*
                   *read-eval*
                   *read-suppress*
                   *readtable*
                   *standard-input*
                   *standard-output*
                   *terminal-io*
                   *trace-output*
                   +
                  1+
                   ++
                   +++
                   -
                   /
                   //
                   ///
                   /=
               char/=
             string/=
           bit-andc1
            bit-orc1
             boole-1
         boole-andc1
            boole-c1
          boole-orc1
            logandc1
             logorc1
       macroexpand-1
multiple-value-prog1
               prin1
               prog1
                   1+
                   1-
               prin1-to-string
           bit-andc2
            bit-orc2
             boole-2
         boole-andc2
            boole-c2
          boole-orc2
            logandc2
             logorc2
               prog2
                   <
               char<
             string<
                   <=
               char<=
             string<=
                  /=
                  <=
                   =
                  >=
              char/=
              char<=
               char=
              char>=
            string/=
            string<=
             string=
            string>=
                   >
               char>
             string>
                   >=
               char>=
             string>=

Copyright 1996, The Harlequin Group Limited.  All Rights Reserved.