text
stringlengths
2
100k
meta
dict
#!/usr/bin/env bash set -e # Helper to check a file matches its known hash # Call it with: # $1: the full path to the file to check # $2: the path of the file containing all the the expected hashes h_file="${1}" file="${2}" # Does the hash-file exist? if [ ! -f "${h_file}" ]; then exit 0 fi # Check one hash for a file # $1: known hash # $2: file (full path) check_one_hash() { _h="${1}" _known="${2}" _file="${3}" # Note: md5 is supported, but undocumented on purpose. # Note: sha3 is not supported, since there is currently no implementation # (the NIST has yet to publish the parameters). case "${_h}" in md5|sha1) ;; sha224|sha256|sha384|sha512) ;; *) # Unknown hash, exit with error printf "ERROR: unknown hash '%s' for '%s'\n" \ "${_h}" "${_file##*/}" >&2 exit 1 ;; esac # Do the hashes match? _hash=$( ${_h}sum "${_file}" |cut -d ' ' -f 1 ) if [ "${_hash}" = "${_known}" ]; then printf "%s: OK (%s: %s)\n" "${_file##*/}" "${_h}" "${_hash}" return 0 fi printf "ERROR: %s has wrong %s hash:\n" "${_file##*/}" "${_h}" >&2 printf "ERROR: expected: %s\n" "${_known}" >&2 printf "ERROR: got : %s\n" "${_hash}" >&2 printf "ERROR: Incomplete download, or man-in-the-middle (MITM) attack\n" >&2 exit 1 } # Do we know one or more hashes for that file? nb_checks=0 while read t h f; do case "${t}" in ''|'#'*) # Skip comments and empty lines continue ;; *) if [ "${f}" = "${file##*/}" ]; then check_one_hash "${t}" "${h}" "${file}" : $((nb_checks++)) fi ;; esac done <"${h_file}" if [ ${nb_checks} -eq 0 ]; then if [ -n "${BR2_ENFORCE_CHECK_HASH}" ]; then printf "ERROR: No hash found for %s\n" "${file}" >&2 exit 1 else printf "WARNING: No hash found for %s\n" "${file}" >&2 fi fi
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/preference_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" android:background="@color/transparent" android:focusable="false" android:textSize="14sp" android:fontFamily="sans-serif-medium" android:textAllCaps="true" android:textStyle="normal" android:textColor="@color/grey" tools:text="UNINSTALL" /> </FrameLayout>
{ "pile_set_name": "Github" }
/***********************license start*************** * Author: Cavium Networks * * Contact: [email protected] * This file is part of the OCTEON SDK * * Copyright (c) 2003-2008 Cavium Networks * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, Version 2, as * published by the Free Software Foundation. * * This file is distributed in the hope that it will be useful, but * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or * NONINFRINGEMENT. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with this file; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * or visit http://www.gnu.org/licenses/. * * This file may also be available under a different license from Cavium. * Contact Cavium Networks for more information ***********************license end**************************************/ #ifndef __CVMX_H__ #define __CVMX_H__ #include <linux/kernel.h> #include <linux/string.h> #include "cvmx-asm.h" #include "cvmx-packet.h" #include "cvmx-sysinfo.h" #include "cvmx-ciu-defs.h" #include "cvmx-gpio-defs.h" #include "cvmx-iob-defs.h" #include "cvmx-ipd-defs.h" #include "cvmx-l2c-defs.h" #include "cvmx-l2d-defs.h" #include "cvmx-l2t-defs.h" #include "cvmx-led-defs.h" #include "cvmx-mio-defs.h" #include "cvmx-pow-defs.h" #include "cvmx-bootinfo.h" #include "cvmx-bootmem.h" #include "cvmx-l2c.h" #ifndef CVMX_ENABLE_DEBUG_PRINTS #define CVMX_ENABLE_DEBUG_PRINTS 1 #endif #if CVMX_ENABLE_DEBUG_PRINTS #define cvmx_dprintf printk #else #define cvmx_dprintf(...) {} #endif #define CVMX_MAX_CORES (16) #define CVMX_CACHE_LINE_SIZE (128) /* In bytes */ #define CVMX_CACHE_LINE_MASK (CVMX_CACHE_LINE_SIZE - 1) /* In bytes */ #define CVMX_CACHE_LINE_ALIGNED __attribute__ ((aligned(CVMX_CACHE_LINE_SIZE))) #define CAST64(v) ((long long)(long)(v)) #define CASTPTR(type, v) ((type *)(long)(v)) /* * Returns processor ID, different Linux and simple exec versions * provided in the cvmx-app-init*.c files. */ static inline uint32_t cvmx_get_proc_id(void) __attribute__ ((pure)); static inline uint32_t cvmx_get_proc_id(void) { uint32_t id; asm("mfc0 %0, $15,0" : "=r"(id)); return id; } /* turn the variable name into a string */ #define CVMX_TMP_STR(x) CVMX_TMP_STR2(x) #define CVMX_TMP_STR2(x) #x /** * Builds a bit mask given the required size in bits. * * @bits: Number of bits in the mask * Returns The mask */ static inline uint64_t cvmx_build_mask(uint64_t bits) { return ~((~0x0ull) << bits); } /** * Builds a memory address for I/O based on the Major and Sub DID. * * @major_did: 5 bit major did * @sub_did: 3 bit sub did * Returns I/O base address */ static inline uint64_t cvmx_build_io_address(uint64_t major_did, uint64_t sub_did) { return (0x1ull << 48) | (major_did << 43) | (sub_did << 40); } /** * Perform mask and shift to place the supplied value into * the supplied bit rage. * * Example: cvmx_build_bits(39,24,value) * <pre> * 6 5 4 3 3 2 1 * 3 5 7 9 1 3 5 7 0 * +-------+-------+-------+-------+-------+-------+-------+------+ * 000000000000000000000000___________value000000000000000000000000 * </pre> * * @high_bit: Highest bit value can occupy (inclusive) 0-63 * @low_bit: Lowest bit value can occupy inclusive 0-high_bit * @value: Value to use * Returns Value masked and shifted */ static inline uint64_t cvmx_build_bits(uint64_t high_bit, uint64_t low_bit, uint64_t value) { return (value & cvmx_build_mask(high_bit - low_bit + 1)) << low_bit; } enum cvmx_mips_space { CVMX_MIPS_SPACE_XKSEG = 3LL, CVMX_MIPS_SPACE_XKPHYS = 2LL, CVMX_MIPS_SPACE_XSSEG = 1LL, CVMX_MIPS_SPACE_XUSEG = 0LL }; /* These macros for use when using 32 bit pointers. */ #define CVMX_MIPS32_SPACE_KSEG0 1l #define CVMX_ADD_SEG32(segment, add) \ (((int32_t)segment << 31) | (int32_t)(add)) #define CVMX_IO_SEG CVMX_MIPS_SPACE_XKPHYS /* These macros simplify the process of creating common IO addresses */ #define CVMX_ADD_SEG(segment, add) \ ((((uint64_t)segment) << 62) | (add)) #ifndef CVMX_ADD_IO_SEG #define CVMX_ADD_IO_SEG(add) CVMX_ADD_SEG(CVMX_IO_SEG, (add)) #endif /** * Convert a memory pointer (void*) into a hardware compatable * memory address (uint64_t). Octeon hardware widgets don't * understand logical addresses. * * @ptr: C style memory pointer * Returns Hardware physical address */ static inline uint64_t cvmx_ptr_to_phys(void *ptr) { if (sizeof(void *) == 8) { /* * We're running in 64 bit mode. Normally this means * that we can use 40 bits of address space (the * hardware limit). Unfortunately there is one case * were we need to limit this to 30 bits, sign * extended 32 bit. Although these are 64 bits wide, * only 30 bits can be used. */ if ((CAST64(ptr) >> 62) == 3) return CAST64(ptr) & cvmx_build_mask(30); else return CAST64(ptr) & cvmx_build_mask(40); } else { return (long)(ptr) & 0x1fffffff; } } /** * Convert a hardware physical address (uint64_t) into a * memory pointer (void *). * * @physical_address: * Hardware physical address to memory * Returns Pointer to memory */ static inline void *cvmx_phys_to_ptr(uint64_t physical_address) { if (sizeof(void *) == 8) { /* Just set the top bit, avoiding any TLB uglyness */ return CASTPTR(void, CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS, physical_address)); } else { return CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, physical_address)); } } /* The following #if controls the definition of the macro CVMX_BUILD_WRITE64. This macro is used to build a store operation to a full 64bit address. With a 64bit ABI, this can be done with a simple pointer access. 32bit ABIs require more complicated assembly */ /* We have a full 64bit ABI. Writing to a 64bit address can be done with a simple volatile pointer */ #define CVMX_BUILD_WRITE64(TYPE, ST) \ static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ { \ *CASTPTR(volatile TYPE##_t, addr) = val; \ } /* The following #if controls the definition of the macro CVMX_BUILD_READ64. This macro is used to build a load operation from a full 64bit address. With a 64bit ABI, this can be done with a simple pointer access. 32bit ABIs require more complicated assembly */ /* We have a full 64bit ABI. Writing to a 64bit address can be done with a simple volatile pointer */ #define CVMX_BUILD_READ64(TYPE, LT) \ static inline TYPE##_t cvmx_read64_##TYPE(uint64_t addr) \ { \ return *CASTPTR(volatile TYPE##_t, addr); \ } /* The following defines 8 functions for writing to a 64bit address. Each takes two arguments, the address and the value to write. cvmx_write64_int64 cvmx_write64_uint64 cvmx_write64_int32 cvmx_write64_uint32 cvmx_write64_int16 cvmx_write64_uint16 cvmx_write64_int8 cvmx_write64_uint8 */ CVMX_BUILD_WRITE64(int64, "sd"); CVMX_BUILD_WRITE64(int32, "sw"); CVMX_BUILD_WRITE64(int16, "sh"); CVMX_BUILD_WRITE64(int8, "sb"); CVMX_BUILD_WRITE64(uint64, "sd"); CVMX_BUILD_WRITE64(uint32, "sw"); CVMX_BUILD_WRITE64(uint16, "sh"); CVMX_BUILD_WRITE64(uint8, "sb"); #define cvmx_write64 cvmx_write64_uint64 /* The following defines 8 functions for reading from a 64bit address. Each takes the address as the only argument cvmx_read64_int64 cvmx_read64_uint64 cvmx_read64_int32 cvmx_read64_uint32 cvmx_read64_int16 cvmx_read64_uint16 cvmx_read64_int8 cvmx_read64_uint8 */ CVMX_BUILD_READ64(int64, "ld"); CVMX_BUILD_READ64(int32, "lw"); CVMX_BUILD_READ64(int16, "lh"); CVMX_BUILD_READ64(int8, "lb"); CVMX_BUILD_READ64(uint64, "ld"); CVMX_BUILD_READ64(uint32, "lw"); CVMX_BUILD_READ64(uint16, "lhu"); CVMX_BUILD_READ64(uint8, "lbu"); #define cvmx_read64 cvmx_read64_uint64 static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val) { cvmx_write64(csr_addr, val); /* * Perform an immediate read after every write to an RSL * register to force the write to complete. It doesn't matter * what RSL read we do, so we choose CVMX_MIO_BOOT_BIST_STAT * because it is fast and harmless. */ if (((csr_addr >> 40) & 0x7ffff) == (0x118)) cvmx_read64(CVMX_MIO_BOOT_BIST_STAT); } static inline void cvmx_write_io(uint64_t io_addr, uint64_t val) { cvmx_write64(io_addr, val); } static inline uint64_t cvmx_read_csr(uint64_t csr_addr) { uint64_t val = cvmx_read64(csr_addr); return val; } static inline void cvmx_send_single(uint64_t data) { const uint64_t CVMX_IOBDMA_SENDSINGLE = 0xffffffffffffa200ull; cvmx_write64(CVMX_IOBDMA_SENDSINGLE, data); } static inline void cvmx_read_csr_async(uint64_t scraddr, uint64_t csr_addr) { union { uint64_t u64; struct { uint64_t scraddr:8; uint64_t len:8; uint64_t addr:48; } s; } addr; addr.u64 = csr_addr; addr.s.scraddr = scraddr >> 3; addr.s.len = 1; cvmx_send_single(addr.u64); } /* Return true if Octeon is CN38XX pass 1 */ static inline int cvmx_octeon_is_pass1(void) { #if OCTEON_IS_COMMON_BINARY() return 0; /* Pass 1 isn't supported for common binaries */ #else /* Now that we know we're built for a specific model, only check CN38XX */ #if OCTEON_IS_MODEL(OCTEON_CN38XX) return cvmx_get_proc_id() == OCTEON_CN38XX_PASS1; #else return 0; /* Built for non CN38XX chip, we're not CN38XX pass1 */ #endif #endif } static inline unsigned int cvmx_get_core_num(void) { unsigned int core_num; CVMX_RDHWRNV(core_num, 0); return core_num; } /** * Returns the number of bits set in the provided value. * Simple wrapper for POP instruction. * * @val: 32 bit value to count set bits in * * Returns Number of bits set */ static inline uint32_t cvmx_pop(uint32_t val) { uint32_t pop; CVMX_POP(pop, val); return pop; } /** * Returns the number of bits set in the provided value. * Simple wrapper for DPOP instruction. * * @val: 64 bit value to count set bits in * * Returns Number of bits set */ static inline int cvmx_dpop(uint64_t val) { int pop; CVMX_DPOP(pop, val); return pop; } /** * Provide current cycle counter as a return value * * Returns current cycle counter */ static inline uint64_t cvmx_get_cycle(void) { uint64_t cycle; CVMX_RDHWR(cycle, 31); return cycle; } /** * Wait for the specified number of cycle * */ static inline void cvmx_wait(uint64_t cycles) { uint64_t done = cvmx_get_cycle() + cycles; while (cvmx_get_cycle() < done) ; /* Spin */ } /** * Reads a chip global cycle counter. This counts CPU cycles since * chip reset. The counter is 64 bit. * This register does not exist on CN38XX pass 1 silicion * * Returns Global chip cycle count since chip reset. */ static inline uint64_t cvmx_get_cycle_global(void) { if (cvmx_octeon_is_pass1()) return 0; else return cvmx_read64(CVMX_IPD_CLK_COUNT); } /** * This macro spins on a field waiting for it to reach a value. It * is common in code to need to wait for a specific field in a CSR * to match a specific value. Conceptually this macro expands to: * * 1) read csr at "address" with a csr typedef of "type" * 2) Check if ("type".s."field" "op" "value") * 3) If #2 isn't true loop to #1 unless too much time has passed. */ #define CVMX_WAIT_FOR_FIELD64(address, type, field, op, value, timeout_usec)\ ( \ { \ int result; \ do { \ uint64_t done = cvmx_get_cycle() + (uint64_t)timeout_usec * \ cvmx_sysinfo_get()->cpu_clock_hz / 1000000; \ type c; \ while (1) { \ c.u64 = cvmx_read_csr(address); \ if ((c.s.field) op(value)) { \ result = 0; \ break; \ } else if (cvmx_get_cycle() > done) { \ result = -1; \ break; \ } else \ cvmx_wait(100); \ } \ } while (0); \ result; \ }) /***************************************************************************/ static inline void cvmx_reset_octeon(void) { union cvmx_ciu_soft_rst ciu_soft_rst; ciu_soft_rst.u64 = 0; ciu_soft_rst.s.soft_rst = 1; cvmx_write_csr(CVMX_CIU_SOFT_RST, ciu_soft_rst.u64); } /* Return the number of cores available in the chip */ static inline uint32_t cvmx_octeon_num_cores(void) { uint32_t ciu_fuse = (uint32_t) cvmx_read_csr(CVMX_CIU_FUSE) & 0xffff; return cvmx_pop(ciu_fuse); } /** * Read a byte of fuse data * @byte_addr: address to read * * Returns fuse value: 0 or 1 */ static uint8_t cvmx_fuse_read_byte(int byte_addr) { union cvmx_mio_fus_rcmd read_cmd; read_cmd.u64 = 0; read_cmd.s.addr = byte_addr; read_cmd.s.pend = 1; cvmx_write_csr(CVMX_MIO_FUS_RCMD, read_cmd.u64); while ((read_cmd.u64 = cvmx_read_csr(CVMX_MIO_FUS_RCMD)) && read_cmd.s.pend) ; return read_cmd.s.dat; } /** * Read a single fuse bit * * @fuse: Fuse number (0-1024) * * Returns fuse value: 0 or 1 */ static inline int cvmx_fuse_read(int fuse) { return (cvmx_fuse_read_byte(fuse >> 3) >> (fuse & 0x7)) & 1; } static inline int cvmx_octeon_model_CN36XX(void) { return OCTEON_IS_MODEL(OCTEON_CN38XX) && !cvmx_octeon_is_pass1() && cvmx_fuse_read(264); } static inline int cvmx_octeon_zip_present(void) { return octeon_has_feature(OCTEON_FEATURE_ZIP); } static inline int cvmx_octeon_dfa_present(void) { if (!OCTEON_IS_MODEL(OCTEON_CN38XX) && !OCTEON_IS_MODEL(OCTEON_CN31XX) && !OCTEON_IS_MODEL(OCTEON_CN58XX)) return 0; else if (OCTEON_IS_MODEL(OCTEON_CN3020)) return 0; else if (cvmx_octeon_is_pass1()) return 1; else return !cvmx_fuse_read(120); } static inline int cvmx_octeon_crypto_present(void) { return octeon_has_feature(OCTEON_FEATURE_CRYPTO); } #endif /* __CVMX_H__ */
{ "pile_set_name": "Github" }
project_path: /web/_project.yaml book_path: /web/shows/_book.yaml {# wf_updated_on: 2015-11-16 #} {# wf_published_on: 2015-11-16 #} {# wf_youtube_id: m2a9hlUFRhg #} # Keynote by Darin Fisher, VP of Chrome (Chrome Dev Summit 2015) {: .page-title } <div class="video-wrapper"> <iframe class="devsite-embedded-youtube-video" data-video-id="m2a9hlUFRhg" data-autohide="1" data-showinfo="0" frameborder="0" allowfullscreen> </iframe> </div> Join Darin Fisher, VP of Chrome as he talks the past, present and future of the web. Watch more talks from Chrome Dev Summit 2015: https://goo.gl/e4c7vD Subscribe to the Chrome Developers channel at: https://goo.gl/OUF4e2
{ "pile_set_name": "Github" }
package com.android.internal.telephony; import android.os.SystemProperties; import android.text.TextUtils; import android.util.Log; import java.util.Locale; public class HwCustMccTableImpl extends HwCustMccTable { private static final boolean IS_CUST_LOCALE_CONFIG = SystemProperties.getBoolean("ro.hw_tp.mexico_locale", false); private static final String LOG_TAG = "MccTable"; private static final String[] MEXICO_MCC = {"334", "222", "206"}; public Locale getCustSpecialLocaleConfig(String imsi) { if (!IS_CUST_LOCALE_CONFIG || TextUtils.isEmpty(imsi)) { return null; } int i = 0; while (true) { String[] strArr = MEXICO_MCC; if (i >= strArr.length) { return null; } if (imsi.startsWith(strArr[i])) { Log.d(LOG_TAG, "Mexico special locale config, set default language to es_mx"); return new Locale("es", "mx"); } i++; } } }
{ "pile_set_name": "Github" }
<%= this.foo %>
{ "pile_set_name": "Github" }
# Copyright (C) 2011 Google Inc. All rights reserved. # Copyright (C) 2014 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import os import os.path import shutil import tempfile from webkitpy.common.checkout.scm.detection import detect_scm_system from webkitpy.common.system.executive import ScriptError class BuiltinsGeneratorTests: def __init__(self, reset_results, executive): self.reset_results = reset_results self.executive = executive def generate_from_js_builtins(self, builtins_file, output_directory, framework_name="", combined_outputs=False, generate_wrapper=False): cmd = ['python', 'JavaScriptCore/Scripts/generate-js-builtins.py', '--output-directory', output_directory, '--force', '--framework', framework_name, '--test'] if combined_outputs: cmd.append('--combined') if generate_wrapper: cmd.append('--wrappers') cmd.append(builtins_file) exit_code = 0 try: stderr_output = self.executive.run_command(cmd) if stderr_output: self.write_error_file(builtins_file, output_directory, stderr_output) except ScriptError, e: print e.output exit_code = e.exit_code return exit_code def write_error_file(self, input_filepath, output_directory, error_output): output_filepath = os.path.join(output_directory, os.path.basename(input_filepath) + '-error') with open(output_filepath, "w") as output_file: output_file.write(error_output) def detect_changes(self, work_directory, reference_directory): changes_found = False for output_file in os.listdir(work_directory): cmd = ['diff', '-u', '-N', os.path.join(reference_directory, output_file), os.path.join(work_directory, output_file)] exit_code = 0 try: output = self.executive.run_command(cmd) except ScriptError, e: output = e.output exit_code = e.exit_code if exit_code or output: print 'FAIL: %s' % output_file print output changes_found = True else: print 'PASS: %s' % output_file return changes_found def run_tests(self, input_directory, reference_directory): work_directory = reference_directory passed = True for input_file in os.listdir(input_directory): (test_name, extension) = os.path.splitext(input_file) if extension != '.js': continue # Generate output into the work directory (either the given one or a # temp one if not reset_results is performed) if not self.reset_results: work_directory = tempfile.mkdtemp() (framework_name, test_case, output_mode) = test_name.split('-') if not framework_name or not output_mode or not test_case: print "Invalid test case name: should be Framework-TestCaseName-OutputMode.js" continue combined_outputs = output_mode == "Combined" generate_wrapper = framework_name == "WebCore" if self.generate_from_js_builtins(os.path.join(input_directory, input_file), work_directory, framework_name=framework_name, combined_outputs=combined_outputs, generate_wrapper=generate_wrapper): passed = False if self.reset_results: print "Reset results for test: %s" % (input_file) continue # Detect changes if self.detect_changes(work_directory, reference_directory): passed = False shutil.rmtree(work_directory) return passed def main(self): current_scm = detect_scm_system(os.curdir) os.chdir(os.path.join(current_scm.checkout_root, 'Source')) all_tests_passed = True input_directory = os.path.join('JavaScriptCore', 'Scripts', 'tests', 'builtins') reference_directory = os.path.join('JavaScriptCore', 'Scripts', 'tests', 'builtins', 'expected') if not self.run_tests(input_directory, reference_directory): all_tests_passed = False print '' if all_tests_passed: print 'All tests PASS!' return 0 else: print 'Some tests FAIL! (To update the reference files, execute "run-builtins-generator-tests --reset-results")' return -1
{ "pile_set_name": "Github" }
# Copyright (c) 2018, 2020, Oracle Corporation and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. ------------ Description: ------------ This test performs some basic end-to-end introspector tests while emulating (mocking) the operator pod. It's useful for verifying the introspector is working correctly, and for quickly testing changes to its overall flow. The test mainly works via a series of yaml and python template files in combination with a set of environment variables. The environment variables, such as PV_ROOT, DOMAIN_UID, NAMESPACE, IMAGE_NAME, ..., all have defaults, or can be passed in. See the 'export' calls in introspectTest.sh for the complete list. The test can work with any arbitrary domain, or it can create a domain. ---------- Usage: ---------- (1) Make sure a WebLogic image is available. This test does not build, tag, or pull images to a local repo. One way to do this when running locally is to run the integration tests. (Note that this test doesn't depend on Operator image as of 2018/10/16, but may in the future.) (2) Optionally specify values for input env vars (see introspectTest.sh for the list). (3) For a non Model In Image domain type. Run introspectTest.sh For a Model In Image domain type. export DOMAIN_SOURCE_TYPE=FromModel Run introspectTest.sh ------------------- Internal Test Flow: ------------------- () Set various env vars to their defaults if not already set. See PV_ROOT, DOMAIN_UID, NAMESPACE, in the implementation in introspectTest.sh () Cleanup test files from previous run. Cleanup files in /tmp/introspect () Cleanup test k8s artifacts and any old created domain. <operator-src>/src/integration-tests/bash/cleanup.sh () Create a test directory in the k8s cluster via kubectl run. See createTestRoot.sh () Deploy pv/pvc for use by introspector job pod, the domain create step, and wl pods. (If PV_COMMENT != "#"). wl-pv.yamlt, wl-pvc.yamlt () Deploy a secret for the admin credentials. wl-secret.yamlt () Create a domain home. wl-create-domain-pod.yamlt, wl-create-domain-pod.sh, wl-create-domain-pod.pyt () Run the introspector job pod (as a direct pod instead of a job) wl-instrospect-pod.yamlt wl-instrospect-pod.sh <operator-src>/operator/src/main/resources/scripts/introspectDomain.sh <operator-src>/operator/src/main/resources/scripts/startNodeManager.sh <operator-src>/operator/src/main/resources/scripts/introspectDomain.py () Parse the introspector job pod's output into files and deploy them in a configmap. () Start the admin server pod. The startServer.sh and start-server.py scripts will use files from the configmap for situational config and login credentials. wl-pod.yamlt <operator-src>/operator/src/main/resources/scripts/startServer.sh <operator-src>/operator/src/main/resources/scripts/start-server.py () Deploy a NodePort service for the admin server pod (used by managed server pod). wl-nodeport-svc.yamlt () Start a managed server pod. The startServer.sh and start-server.py scripts will use files from the configmap for situational config and login credentials. wl-pod.yamlt <operator-src>/operator/src/main/resources/scripts/startServer.sh <operator-src>/operator/src/main/resources/scripts/start-server.py
{ "pile_set_name": "Github" }
// Copyright (c) 2018-2019 // Cem Bassoy // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // The authors gratefully acknowledge the support of // Fraunhofer and Google in producing this work // which started as a Google Summer of Code project. // /// \file tensor.hpp Definition for the class vector and its derivative #ifndef BOOST_NUMERIC_UBLAS_TENSOR_HPP #define BOOST_NUMERIC_UBLAS_TENSOR_HPP #include "tensor/functions.hpp" #include "tensor/operators_arithmetic.hpp" #include "tensor/operators_comparison.hpp" #include "tensor/extents.hpp" #include "tensor/strides.hpp" #include "tensor/ostream.hpp" #include "tensor/tensor.hpp" #endif // BOOST_NUMERIC_UBLAS_TENSOR_HPP
{ "pile_set_name": "Github" }
/* * Copyright (C) 2007,2008 Nobuhiro Iwamatsu * * u-boot/board/r7780mp/lowlevel_init.S * * SPDX-License-Identifier: GPL-2.0+ */ #include <config.h> #include <asm/processor.h> #include <asm/macro.h> /* * Board specific low level init code, called _very_ early in the * startup sequence. Relocation to SDRAM has not happened yet, no * stack is available, bss section has not been initialised, etc. * * (Note: As no stack is available, no subroutines can be called...). */ .global lowlevel_init .text .align 2 lowlevel_init: write32 CCR_A, CCR_D /* Address of Cache Control Register */ /* Instruction Cache Invalidate */ write32 FRQCR_A, FRQCR_D /* Frequency control register */ /* pin_multi_setting */ write32 BBG_PMMR_A, BBG_PMMR_D_PMSR1 write32 BBG_PMSR1_A, BBG_PMSR1_D write32 BBG_PMMR_A, BBG_PMMR_D_PMSR2 write32 BBG_PMSR2_A, BBG_PMSR2_D write32 BBG_PMMR_A, BBG_PMMR_D_PMSR3 write32 BBG_PMSR3_A, BBG_PMSR3_D write32 BBG_PMMR_A, BBG_PMMR_D_PMSR4 write32 BBG_PMSR4_A, BBG_PMSR4_D write32 BBG_PMMR_A, BBG_PMMR_D_PMSRG write32 BBG_PMSRG_A, BBG_PMSRG_D /* cpg_setting */ write32 FRQCR_A, FRQCR_D write32 DLLCSR_A, DLLCSR_D nop nop nop nop nop nop nop nop nop nop /* wait 200us */ mov.l REPEAT0_R3, r3 mov #0, r2 repeat0: add #1, r2 cmp/hs r3, r2 bf repeat0 nop /* bsc_setting */ write32 MMSELR_A, MMSELR_D write32 BCR_A, BCR_D write32 CS0BCR_A, CS0BCR_D write32 CS1BCR_A, CS1BCR_D write32 CS2BCR_A, CS2BCR_D write32 CS4BCR_A, CS4BCR_D write32 CS5BCR_A, CS5BCR_D write32 CS6BCR_A, CS6BCR_D write32 CS0WCR_A, CS0WCR_D write32 CS1WCR_A, CS1WCR_D write32 CS2WCR_A, CS2WCR_D write32 CS4WCR_A, CS4WCR_D write32 CS5WCR_A, CS5WCR_D write32 CS6WCR_A, CS6WCR_D write32 CS5PCR_A, CS5PCR_D write32 CS6PCR_A, CS6PCR_D /* ddr_setting */ /* wait 200us */ mov.l REPEAT0_R3, r3 mov #0, r2 repeat1: add #1, r2 cmp/hs r3, r2 bf repeat1 nop mov.l MIM_U_A, r0 mov.l MIM_U_D, r1 synco mov.l r1, @r0 synco mov.l MIM_L_A, r0 mov.l MIM_L_D0, r1 synco mov.l r1, @r0 synco mov.l STR_L_A, r0 mov.l STR_L_D, r1 synco mov.l r1, @r0 synco mov.l SDR_L_A, r0 mov.l SDR_L_D, r1 synco mov.l r1, @r0 synco nop nop nop nop mov.l SCR_L_A, r0 mov.l SCR_L_D0, r1 synco mov.l r1, @r0 synco mov.l SCR_L_A, r0 mov.l SCR_L_D1, r1 synco mov.l r1, @r0 synco nop nop nop mov.l EMRS_A, r0 mov.l EMRS_D, r1 synco mov.l r1, @r0 synco nop nop nop mov.l MRS1_A, r0 mov.l MRS1_D, r1 synco mov.l r1, @r0 synco nop nop nop mov.l SCR_L_A, r0 mov.l SCR_L_D2, r1 synco mov.l r1, @r0 synco nop nop nop mov.l SCR_L_A, r0 mov.l SCR_L_D3, r1 synco mov.l r1, @r0 synco nop nop nop mov.l SCR_L_A, r0 mov.l SCR_L_D4, r1 synco mov.l r1, @r0 synco nop nop nop mov.l MRS2_A, r0 mov.l MRS2_D, r1 synco mov.l r1, @r0 synco nop nop nop mov.l SCR_L_A, r0 mov.l SCR_L_D5, r1 synco mov.l r1, @r0 synco /* wait 200us */ mov.l REPEAT0_R1, r3 mov #0, r2 repeat2: add #1, r2 cmp/hs r3, r2 bf repeat2 synco mov.l MIM_L_A, r0 mov.l MIM_L_D1, r1 synco mov.l r1, @r0 synco rts nop .align 4 RWTCSR_D_1: .word 0xA507 RWTCSR_D_2: .word 0xA507 RWTCNT_D: .word 0x5A00 .align 2 BBG_PMMR_A: .long 0xFF800010 BBG_PMSR1_A: .long 0xFF800014 BBG_PMSR2_A: .long 0xFF800018 BBG_PMSR3_A: .long 0xFF80001C BBG_PMSR4_A: .long 0xFF800020 BBG_PMSRG_A: .long 0xFF800024 BBG_PMMR_D_PMSR1: .long 0xffffbffd BBG_PMSR1_D: .long 0x00004002 BBG_PMMR_D_PMSR2: .long 0xfc21a7ff BBG_PMSR2_D: .long 0x03de5800 BBG_PMMR_D_PMSR3: .long 0xfffffff8 BBG_PMSR3_D: .long 0x00000007 BBG_PMMR_D_PMSR4: .long 0xdffdfff9 BBG_PMSR4_D: .long 0x20020006 BBG_PMMR_D_PMSRG: .long 0xffffffff BBG_PMSRG_D: .long 0x00000000 FRQCR_A: .long FRQCR DLLCSR_A: .long 0xffc40010 FRQCR_D: .long 0x40233035 DLLCSR_D: .long 0x00000000 /* for DDR-SDRAM */ MIM_U_A: .long MIM_1 MIM_L_A: .long MIM_2 SCR_U_A: .long SCR_1 SCR_L_A: .long SCR_2 STR_U_A: .long STR_1 STR_L_A: .long STR_2 SDR_U_A: .long SDR_1 SDR_L_A: .long SDR_2 EMRS_A: .long 0xFEC02000 MRS1_A: .long 0xFEC00B08 MRS2_A: .long 0xFEC00308 MIM_U_D: .long 0x00004000 MIM_L_D0: .long 0x03e80009 MIM_L_D1: .long 0x03e80209 SCR_L_D0: .long 0x3 SCR_L_D1: .long 0x2 SCR_L_D2: .long 0x2 SCR_L_D3: .long 0x4 SCR_L_D4: .long 0x4 SCR_L_D5: .long 0x0 STR_L_D: .long 0x000f0000 SDR_L_D: .long 0x00000400 EMRS_D: .long 0x0 MRS1_D: .long 0x0 MRS2_D: .long 0x0 /* Cache Controller */ CCR_A: .long CCR MMUCR_A: .long MMUCR RWTCNT_A: .long WTCNT CCR_D: .long 0x0000090b CCR_D_2: .long 0x00000103 MMUCR_D: .long 0x00000004 MSTPCR0_D: .long 0x00001001 MSTPCR2_D: .long 0xffffffff /* local Bus State Controller */ MMSELR_A: .long MMSELR BCR_A: .long BCR CS0BCR_A: .long CS0BCR CS1BCR_A: .long CS1BCR CS2BCR_A: .long CS2BCR CS4BCR_A: .long CS4BCR CS5BCR_A: .long CS5BCR CS6BCR_A: .long CS6BCR CS0WCR_A: .long CS0WCR CS1WCR_A: .long CS1WCR CS2WCR_A: .long CS2WCR CS4WCR_A: .long CS4WCR CS5WCR_A: .long CS5WCR CS6WCR_A: .long CS6WCR CS5PCR_A: .long CS5PCR CS6PCR_A: .long CS6PCR MMSELR_D: .long 0xA5A50003 BCR_D: .long 0x00000000 CS0BCR_D: .long 0x77777770 CS1BCR_D: .long 0x77777670 CS2BCR_D: .long 0x77777770 CS4BCR_D: .long 0x77777770 CS5BCR_D: .long 0x77777670 CS6BCR_D: .long 0x77777770 CS0WCR_D: .long 0x00020006 CS1WCR_D: .long 0x00232304 CS2WCR_D: .long 0x7777770F CS4WCR_D: .long 0x7777770F CS5WCR_D: .long 0x00101006 CS6WCR_D: .long 0x77777703 CS5PCR_D: .long 0x77000000 CS6PCR_D: .long 0x77000000 REPEAT0_R3: .long 0x00002000 REPEAT0_R1: .long 0x0000200
{ "pile_set_name": "Github" }
{-# OPTIONS_GHC -fno-warn-orphans #-} module Pos.Core.Common.StakeholderId ( StakeholderId ) where import Universum import Text.JSON.Canonical (FromObjectKey (..), JSValue (..), ReportSchemaErrors, ToObjectKey (..)) import Pos.Core.Common.AddressHash import Pos.Crypto (decodeAbstractHash, hashHexF) import Pos.Crypto.Signing (PublicKey) import Pos.Util.Json.Canonical (formatJSString) import Pos.Util.Json.Parse (tryParseString) -- | Stakeholder identifier (stakeholders are identified by their public keys) type StakeholderId = AddressHash PublicKey instance Monad m => ToObjectKey m StakeholderId where toObjectKey = pure . formatJSString hashHexF instance ReportSchemaErrors m => FromObjectKey m StakeholderId where fromObjectKey = fmap Just . tryParseString (decodeAbstractHash) . JSString
{ "pile_set_name": "Github" }
/* * $Id: es6.js,v 0.1 2017/11/29 21:43:17 ufolux Exp ufolux $ * * use mocha to test me * http://visionmedia.github.com/mocha/ */ import {Base64} from '../base64' var assert = assert || require("assert"); var is = function (a, e, m) { return function () { assert.equal(a, e, m) } }; if ('extendString' in Base64){ Base64.extendString(); describe('String', function () { it('.toBase64', is('小飼弾'.toBase64(), '5bCP6aO85by+')); it('.toBase64', is('小飼弾'.toBase64(true), '5bCP6aO85by-')); it('.toBase64URI', is('小飼弾'.toBase64URI(), '5bCP6aO85by-')); it('.fromBase64', is('5bCP6aO85by+'.fromBase64(), '小飼弾')); it('.fromBase64', is('5bCP6aO85by-'.fromBase64(), '小飼弾')); }); }
{ "pile_set_name": "Github" }
// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 6651CADA18775B1500A95F2F /* SYShape+Bezier.m in Sources */ = {isa = PBXBuildFile; fileRef = 6651CAD918775B1500A95F2F /* SYShape+Bezier.m */; }; 6651CADE18775B5D00A95F2F /* UIColor+ColorWithHex.m in Sources */ = {isa = PBXBuildFile; fileRef = 6651CADD18775B5D00A95F2F /* UIColor+ColorWithHex.m */; }; 6651CADF18775B7800A95F2F /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6693BBD7187755E1002898D6 /* libc++.dylib */; }; 6651CAE518775CB000A95F2F /* MMFilledShapeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6651CAE418775CB000A95F2F /* MMFilledShapeView.m */; }; 6651CAEA18775CBA00A95F2F /* SYSaveMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6651CAE718775CBA00A95F2F /* SYSaveMessageView.m */; }; 6651CAEB18775CBA00A95F2F /* SYTableBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 6651CAE918775CBA00A95F2F /* SYTableBase.m */; }; 6651CAEE18775CC200A95F2F /* TCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6651CAED18775CC200A95F2F /* TCViewController.m */; }; 6693BB6F18775521002898D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6693BB6E18775521002898D6 /* Foundation.framework */; }; 6693BB7118775521002898D6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6693BB7018775521002898D6 /* CoreGraphics.framework */; }; 6693BB7318775521002898D6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6693BB7218775521002898D6 /* UIKit.framework */; }; 6693BB7918775521002898D6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6693BB7718775521002898D6 /* InfoPlist.strings */; }; 6693BB7B18775521002898D6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6693BB7A18775521002898D6 /* main.m */; }; 6693BB7F18775521002898D6 /* MMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6693BB7E18775521002898D6 /* MMAppDelegate.m */; }; 6693BBCA1877557E002898D6 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6693BBC91877557E002898D6 /* Images.xcassets */; }; 6693BBD01877559E002898D6 /* 01-refresh.png in Resources */ = {isa = PBXBuildFile; fileRef = 6693BBCB1877559E002898D6 /* 01-refresh.png */; }; 6693BBD11877559E002898D6 /* 110-bug.png in Resources */ = {isa = PBXBuildFile; fileRef = 6693BBCC1877559E002898D6 /* 110-bug.png */; }; 6693BBD21877559E002898D6 /* ListGlyphs.png in Resources */ = {isa = PBXBuildFile; fileRef = 6693BBCD1877559E002898D6 /* ListGlyphs.png */; }; 6693BBD31877559E002898D6 /* LittleClipper.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6693BBCE1877559E002898D6 /* LittleClipper.xib */; }; 6693BBD41877559E002898D6 /* UnitTestCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6693BBCF1877559E002898D6 /* UnitTestCell.xib */; }; 66AFAD491A8DE0FF00FD0263 /* TouchShape.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66AFAD481A8DE0FF00FD0263 /* TouchShape.framework */; }; 66AFAD4C1A8DE15C00FD0263 /* ClippingBezier.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66AFAD4B1A8DE15C00FD0263 /* ClippingBezier.framework */; }; 66AFAD501A8DE1DE00FD0263 /* PerformanceBezier.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66AFAD4E1A8DE1DE00FD0263 /* PerformanceBezier.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 6616CCD318B6AF1A00CAD0F3 /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Crashlytics.framework; path = ../Project/Crashlytics.framework; sourceTree = "<group>"; }; 6651CAD818775B1500A95F2F /* SYShape+Bezier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SYShape+Bezier.h"; path = "../../Project/SYShape+Bezier.h"; sourceTree = "<group>"; }; 6651CAD918775B1500A95F2F /* SYShape+Bezier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SYShape+Bezier.m"; path = "../../Project/SYShape+Bezier.m"; sourceTree = "<group>"; }; 6651CADC18775B5D00A95F2F /* UIColor+ColorWithHex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+ColorWithHex.h"; sourceTree = "<group>"; }; 6651CADD18775B5D00A95F2F /* UIColor+ColorWithHex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+ColorWithHex.m"; sourceTree = "<group>"; }; 6651CAE318775CB000A95F2F /* MMFilledShapeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MMFilledShapeView.h; path = LittleClipper/MMFilledShapeView.h; sourceTree = SOURCE_ROOT; }; 6651CAE418775CB000A95F2F /* MMFilledShapeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MMFilledShapeView.m; path = LittleClipper/MMFilledShapeView.m; sourceTree = SOURCE_ROOT; }; 6651CAE618775CBA00A95F2F /* SYSaveMessageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SYSaveMessageView.h; path = LittleClipper/SYSaveMessageView.h; sourceTree = SOURCE_ROOT; }; 6651CAE718775CBA00A95F2F /* SYSaveMessageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SYSaveMessageView.m; path = LittleClipper/SYSaveMessageView.m; sourceTree = SOURCE_ROOT; }; 6651CAE818775CBA00A95F2F /* SYTableBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SYTableBase.h; path = LittleClipper/SYTableBase.h; sourceTree = SOURCE_ROOT; }; 6651CAE918775CBA00A95F2F /* SYTableBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SYTableBase.m; path = LittleClipper/SYTableBase.m; sourceTree = SOURCE_ROOT; }; 6651CAEC18775CC200A95F2F /* TCViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TCViewController.h; path = LittleClipper/TCViewController.h; sourceTree = SOURCE_ROOT; }; 6651CAED18775CC200A95F2F /* TCViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TCViewController.m; path = LittleClipper/TCViewController.m; sourceTree = SOURCE_ROOT; }; 6693BB6B18775521002898D6 /* LittleClipper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LittleClipper.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6693BB6E18775521002898D6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6693BB7018775521002898D6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 6693BB7218775521002898D6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 6693BB7618775521002898D6 /* LittleClipper-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "LittleClipper-Info.plist"; sourceTree = "<group>"; }; 6693BB7818775521002898D6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 6693BB7A18775521002898D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 6693BB7C18775521002898D6 /* LittleClipper-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "LittleClipper-Prefix.pch"; sourceTree = "<group>"; }; 6693BB7D18775521002898D6 /* MMAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MMAppDelegate.h; sourceTree = "<group>"; }; 6693BB7E18775521002898D6 /* MMAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MMAppDelegate.m; sourceTree = "<group>"; }; 6693BBC91877557E002898D6 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; }; 6693BBCB1877559E002898D6 /* 01-refresh.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "01-refresh.png"; sourceTree = "<group>"; }; 6693BBCC1877559E002898D6 /* 110-bug.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "110-bug.png"; sourceTree = "<group>"; }; 6693BBCD1877559E002898D6 /* ListGlyphs.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ListGlyphs.png; sourceTree = "<group>"; }; 6693BBCE1877559E002898D6 /* LittleClipper.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LittleClipper.xib; sourceTree = "<group>"; }; 6693BBCF1877559E002898D6 /* UnitTestCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UnitTestCell.xib; sourceTree = "<group>"; }; 6693BBD5187755DC002898D6 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; 6693BBD7187755E1002898D6 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; }; 6693BBDB187755F6002898D6 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; 6693BBDD18775601002898D6 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 6693BBDF1877560A002898D6 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; 6693BBE118775612002898D6 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 6693BBE318775618002898D6 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 6693BBE518775622002898D6 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 6693BBE71877562A002898D6 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 6693BBE91877562E002898D6 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 6693BBEB1877563D002898D6 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 6693BBED18775642002898D6 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 66AFAD481A8DE0FF00FD0263 /* TouchShape.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TouchShape.framework; path = "../Submodules/touch-chart/TouchChart/build/Debug-iphoneos/TouchShape.framework"; sourceTree = "<group>"; }; 66AFAD4B1A8DE15C00FD0263 /* ClippingBezier.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ClippingBezier.framework; path = "../Submodules/ClippingBezier/build/Debug-iphoneos/ClippingBezier.framework"; sourceTree = "<group>"; }; 66AFAD4E1A8DE1DE00FD0263 /* PerformanceBezier.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PerformanceBezier.framework; path = "../Submodules/ClippingBezier/Submodules/DrawKit-iOS/Submodules/PerformanceBezier/build/Debug-iphoneos/PerformanceBezier.framework"; sourceTree = "<group>"; }; 66AFAD511A8DE26700FD0263 /* DrawKit-iOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "DrawKit-iOS.framework"; path = "../Submodules/ClippingBezier/Submodules/DrawKit-iOS/build/Debug-iphoneos/DrawKit-iOS.framework"; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 6693BB6818775521002898D6 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 66AFAD501A8DE1DE00FD0263 /* PerformanceBezier.framework in Frameworks */, 66AFAD4C1A8DE15C00FD0263 /* ClippingBezier.framework in Frameworks */, 66AFAD491A8DE0FF00FD0263 /* TouchShape.framework in Frameworks */, 6651CADF18775B7800A95F2F /* libc++.dylib in Frameworks */, 6693BB7118775521002898D6 /* CoreGraphics.framework in Frameworks */, 6693BB7318775521002898D6 /* UIKit.framework in Frameworks */, 6693BB6F18775521002898D6 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 6651CADB18775B3800A95F2F /* Categories */ = { isa = PBXGroup; children = ( 6651CADC18775B5D00A95F2F /* UIColor+ColorWithHex.h */, 6651CADD18775B5D00A95F2F /* UIColor+ColorWithHex.m */, ); name = Categories; sourceTree = "<group>"; }; 6651CAEF187760ED00A95F2F /* External */ = { isa = PBXGroup; children = ( 6651CAD818775B1500A95F2F /* SYShape+Bezier.h */, 6651CAD918775B1500A95F2F /* SYShape+Bezier.m */, ); name = External; sourceTree = "<group>"; }; 6693BB6218775521002898D6 = { isa = PBXGroup; children = ( 6693BB7418775521002898D6 /* LittleClipper */, 6693BB6D18775521002898D6 /* Frameworks */, 6693BB6C18775521002898D6 /* Products */, ); sourceTree = "<group>"; }; 6693BB6C18775521002898D6 /* Products */ = { isa = PBXGroup; children = ( 6693BB6B18775521002898D6 /* LittleClipper.app */, ); name = Products; sourceTree = "<group>"; }; 6693BB6D18775521002898D6 /* Frameworks */ = { isa = PBXGroup; children = ( 66AFAD511A8DE26700FD0263 /* DrawKit-iOS.framework */, 66AFAD4E1A8DE1DE00FD0263 /* PerformanceBezier.framework */, 66AFAD4B1A8DE15C00FD0263 /* ClippingBezier.framework */, 66AFAD481A8DE0FF00FD0263 /* TouchShape.framework */, 6616CCD318B6AF1A00CAD0F3 /* Crashlytics.framework */, 6693BBED18775642002898D6 /* AudioToolbox.framework */, 6693BBEB1877563D002898D6 /* CFNetwork.framework */, 6693BBE91877562E002898D6 /* CoreLocation.framework */, 6693BBE71877562A002898D6 /* libz.dylib */, 6693BBE518775622002898D6 /* MobileCoreServices.framework */, 6693BBE318775618002898D6 /* QuartzCore.framework */, 6693BBE118775612002898D6 /* Security.framework */, 6693BBDF1877560A002898D6 /* StoreKit.framework */, 6693BBDD18775601002898D6 /* SystemConfiguration.framework */, 6693BBDB187755F6002898D6 /* libsqlite3.dylib */, 6693BBD7187755E1002898D6 /* libc++.dylib */, 6693BBD5187755DC002898D6 /* MessageUI.framework */, 6693BB6E18775521002898D6 /* Foundation.framework */, 6693BB7018775521002898D6 /* CoreGraphics.framework */, 6693BB7218775521002898D6 /* UIKit.framework */, ); name = Frameworks; sourceTree = "<group>"; }; 6693BB7418775521002898D6 /* LittleClipper */ = { isa = PBXGroup; children = ( 6651CAEF187760ED00A95F2F /* External */, 6651CADB18775B3800A95F2F /* Categories */, 6693BBA418775543002898D6 /* ShapeFillerView */, 6693BBAB18775543002898D6 /* Paint Code */, 6693BBB218775543002898D6 /* View Controllers */, 6693BB7D18775521002898D6 /* MMAppDelegate.h */, 6693BB7E18775521002898D6 /* MMAppDelegate.m */, 6693BBC91877557E002898D6 /* Images.xcassets */, 6693BB7518775521002898D6 /* Supporting Files */, ); path = LittleClipper; sourceTree = "<group>"; }; 6693BB7518775521002898D6 /* Supporting Files */ = { isa = PBXGroup; children = ( 6693BBCB1877559E002898D6 /* 01-refresh.png */, 6693BBCC1877559E002898D6 /* 110-bug.png */, 6693BBCD1877559E002898D6 /* ListGlyphs.png */, 6693BBCE1877559E002898D6 /* LittleClipper.xib */, 6693BBCF1877559E002898D6 /* UnitTestCell.xib */, 6693BB7618775521002898D6 /* LittleClipper-Info.plist */, 6693BB7718775521002898D6 /* InfoPlist.strings */, 6693BB7A18775521002898D6 /* main.m */, 6693BB7C18775521002898D6 /* LittleClipper-Prefix.pch */, ); name = "Supporting Files"; sourceTree = "<group>"; }; 6693BBA418775543002898D6 /* ShapeFillerView */ = { isa = PBXGroup; children = ( 6651CAE318775CB000A95F2F /* MMFilledShapeView.h */, 6651CAE418775CB000A95F2F /* MMFilledShapeView.m */, ); name = ShapeFillerView; path = ../../Project/LittleClipper; sourceTree = "<group>"; }; 6693BBAB18775543002898D6 /* Paint Code */ = { isa = PBXGroup; children = ( 6651CAE618775CBA00A95F2F /* SYSaveMessageView.h */, 6651CAE718775CBA00A95F2F /* SYSaveMessageView.m */, 6651CAE818775CBA00A95F2F /* SYTableBase.h */, 6651CAE918775CBA00A95F2F /* SYTableBase.m */, ); name = "Paint Code"; path = ../../Project/LittleClipper; sourceTree = "<group>"; }; 6693BBB218775543002898D6 /* View Controllers */ = { isa = PBXGroup; children = ( 6651CAEC18775CC200A95F2F /* TCViewController.h */, 6651CAED18775CC200A95F2F /* TCViewController.m */, ); name = "View Controllers"; path = ../../Project/LittleClipper; sourceTree = "<group>"; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 6693BB6A18775521002898D6 /* LittleClipper */ = { isa = PBXNativeTarget; buildConfigurationList = 6693BB9718775522002898D6 /* Build configuration list for PBXNativeTarget "LittleClipper" */; buildPhases = ( 6693BB6718775521002898D6 /* Sources */, 6693BB6818775521002898D6 /* Frameworks */, 6693BB6918775521002898D6 /* Resources */, 6616CC9718B6847B00CAD0F3 /* ShellScript */, ); buildRules = ( ); dependencies = ( ); name = LittleClipper; productName = LittleClipper; productReference = 6693BB6B18775521002898D6 /* LittleClipper.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 6693BB6318775521002898D6 /* Project object */ = { isa = PBXProject; attributes = { CLASSPREFIX = MM; LastUpgradeCheck = 0820; ORGANIZATIONNAME = "Adam Wulf"; TargetAttributes = { 6693BB6A18775521002898D6 = { DevelopmentTeam = MU27A4SCKC; }; }; }; buildConfigurationList = 6693BB6618775521002898D6 /* Build configuration list for PBXProject "LittleClipper" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = 6693BB6218775521002898D6; productRefGroup = 6693BB6C18775521002898D6 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 6693BB6A18775521002898D6 /* LittleClipper */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 6693BB6918775521002898D6 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 6693BB7918775521002898D6 /* InfoPlist.strings in Resources */, 6693BBD01877559E002898D6 /* 01-refresh.png in Resources */, 6693BBD21877559E002898D6 /* ListGlyphs.png in Resources */, 6693BBD41877559E002898D6 /* UnitTestCell.xib in Resources */, 6693BBCA1877557E002898D6 /* Images.xcassets in Resources */, 6693BBD11877559E002898D6 /* 110-bug.png in Resources */, 6693BBD31877559E002898D6 /* LittleClipper.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 6616CC9718B6847B00CAD0F3 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "./../Frameworks/Crashlytics.framework/run 9e59cb6d909c971a2db30c84cb9be7f37273a7af 0e5d6861b92a7859ecb87362f5b611251a8128c79cc2af6283e5e9ef13d1e59e"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 6693BB6718775521002898D6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 6693BB7F18775521002898D6 /* MMAppDelegate.m in Sources */, 6651CAEA18775CBA00A95F2F /* SYSaveMessageView.m in Sources */, 6693BB7B18775521002898D6 /* main.m in Sources */, 6651CAEE18775CC200A95F2F /* TCViewController.m in Sources */, 6651CAE518775CB000A95F2F /* MMFilledShapeView.m in Sources */, 6651CADA18775B1500A95F2F /* SYShape+Bezier.m in Sources */, 6651CAEB18775CBA00A95F2F /* SYTableBase.m in Sources */, 6651CADE18775B5D00A95F2F /* UIColor+ColorWithHex.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 6693BB7718775521002898D6 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( 6693BB7818775521002898D6 /* en */, ); name = InfoPlist.strings; sourceTree = "<group>"; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 6693BB9518775522002898D6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = 2; }; name = Debug; }; 6693BB9618775522002898D6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = 2; VALIDATE_PRODUCT = YES; }; name = Release; }; 6693BB9818775522002898D6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; DEVELOPMENT_TEAM = MU27A4SCKC; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "LittleClipper/LittleClipper-Prefix.pch"; INFOPLIST_FILE = "LittleClipper/LittleClipper-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-ObjC++", "-lstdc++", ); PRODUCT_BUNDLE_IDENTIFIER = "com.milestonemade.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; name = Debug; }; 6693BB9918775522002898D6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; DEVELOPMENT_TEAM = MU27A4SCKC; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "LittleClipper/LittleClipper-Prefix.pch"; INFOPLIST_FILE = "LittleClipper/LittleClipper-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-ObjC++", "-lstdc++", ); PRODUCT_BUNDLE_IDENTIFIER = "com.milestonemade.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 6693BB6618775521002898D6 /* Build configuration list for PBXProject "LittleClipper" */ = { isa = XCConfigurationList; buildConfigurations = ( 6693BB9518775522002898D6 /* Debug */, 6693BB9618775522002898D6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 6693BB9718775522002898D6 /* Build configuration list for PBXNativeTarget "LittleClipper" */ = { isa = XCConfigurationList; buildConfigurations = ( 6693BB9818775522002898D6 /* Debug */, 6693BB9918775522002898D6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 6693BB6318775521002898D6 /* Project object */; }
{ "pile_set_name": "Github" }
g21 f1 g0x0y0z0 g2 x50.00 y0 i[25.00 - [0.0099 * sqrt[2]]] m2
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <definitions id="definitions" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" targetNamespace="Examples" xmlns:tns="Examples"> <message id="_13" name="newMessage"> </message> <process id="process" isClosed="false" isExecutable="true" processType="Public"> <startEvent id="_2" isInterrupting="true" name="Start Event" parallelMultiple="false"> <outgoing>_3</outgoing> </startEvent> <endEvent id="_4" name="End Event"> <incoming>_11</incoming> </endEvent> <intermediateCatchEvent id="_7" name="Intermediate Catch Event" parallelMultiple="false"> <incoming>_3</incoming> <outgoing>_11</outgoing> <messageEventDefinition id="_7_ED_1" messageRef="_13"/> </intermediateCatchEvent> <sequenceFlow id="_11" sourceRef="_7" targetRef="_4"/> <sequenceFlow id="_3" sourceRef="_2" targetRef="_7"/> <association associationDirection="None" id="_14" sourceRef="_7" targetRef="_13"/> </process> </definitions>
{ "pile_set_name": "Github" }
//===--- Cache-Mac.cpp - Caching mechanism implementation -----------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors //===----------------------------------------------------------------------===// // This source file is part of the polarphp.org open source project // // Copyright (c) 2017 - 2019 polarphp software foundation // Copyright (c) 2017 - 2019 zzu_softboy <[email protected]> // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://polarphp.org/LICENSE.txt for license information // See https://polarphp.org/CONTRIBUTORS.txt for the list of polarphp project authors // // Created by polarboy on 2019/11/30. //===----------------------------------------------------------------------===// // // This file implements the caching mechanism using darwin's libcache. // //===----------------------------------------------------------------------===// #include "polarphp/basic/Cache.h" #include "llvm/ADT/SmallString.h" #include <cache.h> namespace polar::sys { using llvm::StringRef; CacheImpl::ImplTy CacheImpl::create(StringRef Name, const CallBacks &callbacks) { llvm::SmallString<32> NameBuf(Name); cache_attributes_t attrs = { CACHE_ATTRIBUTES_VERSION_2, callbacks.keyHashCB, callbacks.keyIsEqualCB, nullptr, callbacks.keyDestroyCB, callbacks.valueReleaseCB, nullptr, nullptr, callbacks.userData, callbacks.valueRetainCB, }; cache_t *cacheOut = nullptr; cache_create(NameBuf.c_str(), &attrs, &cacheOut); assert(cacheOut); return cacheOut; } void CacheImpl::setAndRetain(void *key, void *value, size_t cost) { cache_set_and_retain(static_cast<cache_t*>(impl), key, value, cost); } bool CacheImpl::getAndRetain(const void *key, void **valueOut) { int ret = cache_get_and_retain(static_cast<cache_t*>(impl), const_cast<void*>(key), valueOut); return ret == 0; } void CacheImpl::releaseValue(void *value) { cache_release_value(static_cast<cache_t*>(impl), value); } bool CacheImpl::remove(const void *key) { int ret = cache_remove(static_cast<cache_t*>(impl), const_cast<void*>(key)); return ret == 0; } void CacheImpl::removeAll() { cache_remove_all(static_cast<cache_t*>(impl)); } void CacheImpl::destroy() { cache_destroy(static_cast<cache_t*>(impl)); } } // polar::sys
{ "pile_set_name": "Github" }
--- Lib/distutils/cygwinccompiler.py +++ Lib/distutils/cygwinccompiler.py @@ -129,11 +129,11 @@ class CygwinCCompiler (UnixCCompiler): # Hard-code GCC because that's what this is all about. # XXX optimization, warnings etc. should be customizable. - self.set_executables(compiler='gcc -mcygwin -O -Wall', - compiler_so='gcc -mcygwin -mdll -O -Wall', - compiler_cxx='g++ -mcygwin -O -Wall', - linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin %s' % + self.set_executables(compiler='gcc @DMSW@ -Wall', + compiler_so='gcc @DMSW@ -mdll -O -Wall', + compiler_cxx='g++ @DMSW@ -O -Wall', + linker_exe='gcc', + linker_so=('%s %s' % (self.linker_dll, shared_option))) # cygwin and mingw32 need different sets of libraries @@ -319,11 +319,11 @@ class Mingw32CCompiler (CygwinCCompiler): else: entry_point = '' - self.set_executables(compiler='gcc -mno-cygwin -O -Wall', - compiler_so='gcc -mno-cygwin -mdll -O -Wall', - compiler_cxx='g++ -mno-cygwin -O -Wall', - linker_exe='gcc -mno-cygwin', - linker_so='%s -mno-cygwin %s %s' + self.set_executables(compiler='gcc @DMSW@ -O -Wall', + compiler_so='gcc @DMSW@ -mdll -O -Wall', + compiler_cxx='g++ @DMSW@ -O -Wall', + linker_exe='gcc @DMSW@', + linker_so='%s @DMSW@ %s %s' % (self.linker_dll, shared_option, entry_point)) # Maybe we should also append -mthreads, but then the finished
{ "pile_set_name": "Github" }
/* * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ #include "AnyInt.h" #include "IntArgbPre.h" #include "AlphaMacros.h" #include "IntArgb.h" #include "IntRgb.h" #include "ThreeByteBgr.h" #include "ByteGray.h" #include "ByteIndexed.h" /* * This file declares, registers, and defines the various graphics * primitive loops to manipulate surfaces of type "IntArgbPre". * * See also LoopMacros.h */ RegisterFunc RegisterIntArgbPre; DECLARE_CONVERT_BLIT(IntArgbPre, IntArgb); DECLARE_CONVERT_BLIT(IntArgb, IntArgbPre); DECLARE_CONVERT_BLIT(IntRgb, IntArgbPre); DECLARE_CONVERT_BLIT(ThreeByteBgr, IntArgbPre); DECLARE_CONVERT_BLIT(ByteGray, IntArgbPre); DECLARE_CONVERT_BLIT(ByteIndexed, IntArgbPre); DECLARE_SCALE_BLIT(IntArgbPre, IntArgb); DECLARE_SCALE_BLIT(IntArgb, IntArgbPre); DECLARE_SCALE_BLIT(IntRgb, IntArgbPre); DECLARE_SCALE_BLIT(ThreeByteBgr, IntArgbPre); DECLARE_SCALE_BLIT(ByteGray, IntArgbPre); DECLARE_SCALE_BLIT(ByteIndexed, IntArgbPre); DECLARE_XPAR_CONVERT_BLIT(ByteIndexedBm, IntArgbPre); DECLARE_XPAR_SCALE_BLIT(ByteIndexedBm, IntArgbPre); DECLARE_XPAR_BLITBG(ByteIndexedBm, IntArgbPre); DECLARE_XOR_BLIT(IntArgb, IntArgbPre); DECLARE_SRC_MASKFILL(IntArgbPre); DECLARE_SRCOVER_MASKFILL(IntArgbPre); DECLARE_ALPHA_MASKFILL(IntArgbPre); DECLARE_SRCOVER_MASKBLIT(IntArgb, IntArgbPre); DECLARE_ALPHA_MASKBLIT(IntArgb, IntArgbPre); DECLARE_SRCOVER_MASKBLIT(IntArgbPre, IntArgbPre); DECLARE_ALPHA_MASKBLIT(IntArgbPre, IntArgbPre); DECLARE_ALPHA_MASKBLIT(IntRgb, IntArgbPre); DECLARE_SOLID_DRAWGLYPHLISTAA(IntArgbPre); DECLARE_SOLID_DRAWGLYPHLISTLCD(IntArgbPre); DECLARE_TRANSFORMHELPER_FUNCS(IntArgbPre); NativePrimitive IntArgbPrePrimitives[] = { REGISTER_ANYINT_ISOCOPY_BLIT(IntArgbPre), REGISTER_ANYINT_ISOSCALE_BLIT(IntArgbPre), REGISTER_CONVERT_BLIT(IntArgbPre, IntArgb), REGISTER_CONVERT_BLIT(IntArgb, IntArgbPre), REGISTER_CONVERT_BLIT(IntRgb, IntArgbPre), REGISTER_CONVERT_BLIT(ThreeByteBgr, IntArgbPre), REGISTER_CONVERT_BLIT(ByteGray, IntArgbPre), REGISTER_CONVERT_BLIT(ByteIndexed, IntArgbPre), REGISTER_SCALE_BLIT(IntArgbPre, IntArgb), REGISTER_SCALE_BLIT(IntArgb, IntArgbPre), REGISTER_SCALE_BLIT(IntRgb, IntArgbPre), REGISTER_SCALE_BLIT(ThreeByteBgr, IntArgbPre), REGISTER_SCALE_BLIT(ByteGray, IntArgbPre), REGISTER_SCALE_BLIT(ByteIndexed, IntArgbPre), REGISTER_XPAR_CONVERT_BLIT(ByteIndexedBm, IntArgbPre), REGISTER_XPAR_SCALE_BLIT(ByteIndexedBm, IntArgbPre), REGISTER_XPAR_BLITBG(ByteIndexedBm, IntArgbPre), REGISTER_XOR_BLIT(IntArgb, IntArgbPre), REGISTER_SRC_MASKFILL(IntArgbPre), REGISTER_SRCOVER_MASKFILL(IntArgbPre), REGISTER_ALPHA_MASKFILL(IntArgbPre), REGISTER_SRCOVER_MASKBLIT(IntArgb, IntArgbPre), REGISTER_ALPHA_MASKBLIT(IntArgb, IntArgbPre), REGISTER_SRCOVER_MASKBLIT(IntArgbPre, IntArgbPre), REGISTER_ALPHA_MASKBLIT(IntArgbPre, IntArgbPre), REGISTER_ALPHA_MASKBLIT(IntRgb, IntArgbPre), REGISTER_SOLID_DRAWGLYPHLISTAA(IntArgbPre), REGISTER_SOLID_DRAWGLYPHLISTLCD(IntArgbPre), REGISTER_TRANSFORMHELPER_FUNCS(IntArgbPre), }; jboolean RegisterIntArgbPre(JNIEnv *env) { return RegisterPrimitives(env, IntArgbPrePrimitives, ArraySize(IntArgbPrePrimitives)); } jint PixelForIntArgbPre(SurfaceDataRasInfo *pRasInfo, jint rgb) { jint a, r, g, b; if (((rgb >> 24) + 1) == 0) { return rgb; } ExtractIntDcmComponents1234(rgb, a, r, g, b); r = MUL8(a, r); g = MUL8(a, g); b = MUL8(a, b); return ComposeIntDcmComponents1234(a, r, g, b); } DEFINE_CONVERT_BLIT(IntArgbPre, IntArgb, 1IntArgb) DEFINE_CONVERT_BLIT(IntArgb, IntArgbPre, 1IntArgb) DEFINE_CONVERT_BLIT(IntRgb, IntArgbPre, 1IntArgb) DEFINE_CONVERT_BLIT(ThreeByteBgr, IntArgbPre, 1IntArgb) DEFINE_CONVERT_BLIT(ByteGray, IntArgbPre, 1IntArgb) DEFINE_CONVERT_BLIT_LUT8(ByteIndexed, IntArgbPre, ConvertOnTheFly) DEFINE_SCALE_BLIT(IntArgbPre, IntArgb, 1IntArgb) DEFINE_SCALE_BLIT(IntArgb, IntArgbPre, 1IntArgb) DEFINE_SCALE_BLIT(IntRgb, IntArgbPre, 1IntArgb) DEFINE_SCALE_BLIT(ThreeByteBgr, IntArgbPre, 1IntArgb) DEFINE_SCALE_BLIT(ByteGray, IntArgbPre, 1IntArgb) DEFINE_SCALE_BLIT_LUT8(ByteIndexed, IntArgbPre, ConvertOnTheFly) DEFINE_XPAR_CONVERT_BLIT_LUT8(ByteIndexedBm, IntArgbPre, ConvertOnTheFly) DEFINE_XPAR_SCALE_BLIT_LUT8(ByteIndexedBm, IntArgbPre, ConvertOnTheFly) DEFINE_XPAR_BLITBG_LUT8(ByteIndexedBm, IntArgbPre, ConvertOnTheFly) DEFINE_XOR_BLIT(IntArgb, IntArgbPre, AnyInt) DEFINE_SRC_MASKFILL(IntArgbPre, 4ByteArgb) DEFINE_SRCOVER_MASKFILL(IntArgbPre, 4ByteArgb) DEFINE_ALPHA_MASKFILL(IntArgbPre, 4ByteArgb) DEFINE_SRCOVER_MASKBLIT(IntArgb, IntArgbPre, 4ByteArgb) DEFINE_ALPHA_MASKBLIT(IntArgb, IntArgbPre, 4ByteArgb) DEFINE_SRCOVER_MASKBLIT(IntArgbPre, IntArgbPre, 4ByteArgb) DEFINE_ALPHA_MASKBLIT(IntArgbPre, IntArgbPre, 4ByteArgb) DEFINE_ALPHA_MASKBLIT(IntRgb, IntArgbPre, 4ByteArgb) DEFINE_SOLID_DRAWGLYPHLISTAA(IntArgbPre, 4ByteArgb) DEFINE_SOLID_DRAWGLYPHLISTLCD(IntArgbPre, 4ByteArgb) DEFINE_TRANSFORMHELPERS(IntArgbPre)
{ "pile_set_name": "Github" }
/////////////////////////////////////////////////////////////////////////////// // For information as to what this class does, see the Javadoc, below. // // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, // // 2007, 2008, 2009, 2010, 2014, 2015 by Peter Spirtes, Richard Scheines, Joseph // // Ramsey, and Clark Glymour. // // // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // /////////////////////////////////////////////////////////////////////////////// package edu.cmu.tetradapp.model.datamanip; import edu.cmu.tetrad.data.*; import edu.cmu.tetrad.graph.Node; import java.util.List; /** * Add description * * @author Tyler Gibson */ class RemoveMissingCasesDataFilter implements DataFilter { public DataSet filter(DataSet data) { List<Node> variables = data.getVariables(); int numRows = 0; ROWS: for (int row = 0; row < data.getNumRows(); row++) { for (int col = 0; col < data.getNumColumns(); col++) { Node variable = data.getVariable(col); if (((Variable) variable).isMissingValue(data.getObject(row, col))) { continue ROWS; } } numRows++; } DataSet newDataSet = new BoxDataSet(new DoubleDataBox(numRows, variables.size()), variables); int newRow = 0; ROWS: for (int row = 0; row < data.getNumRows(); row++) { for (int col = 0; col < data.getNumColumns(); col++) { Node variable = data.getVariable(col); if (((Variable) variable).isMissingValue(data.getObject(row, col))) { continue ROWS; } } for (int col = 0; col < data.getNumColumns(); col++) { newDataSet.setObject(newRow, col, data.getObject(row, col)); } newRow++; } return newDataSet; } }
{ "pile_set_name": "Github" }
/* Simple DirectMedia Layer Copyright (C) 1997-2016 Sam Lantinga <[email protected]> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ /** * \file SDL_test_font.h * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. */ #ifndef _SDL_test_font_h #define _SDL_test_font_h #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* Function prototypes */ #define FONT_CHARACTER_SIZE 8 /** * \brief Draw a string in the currently set font. * * \param renderer The renderer to draw on. * \param x The X coordinate of the upper left corner of the character. * \param y The Y coordinate of the upper left corner of the character. * \param c The character to draw. * * \returns Returns 0 on success, -1 on failure. */ int SDLTest_DrawCharacter( SDL_Renderer *renderer, int x, int y, char c ); /** * \brief Draw a string in the currently set font. * * \param renderer The renderer to draw on. * \param x The X coordinate of the upper left corner of the string. * \param y The Y coordinate of the upper left corner of the string. * \param s The string to draw. * * \returns Returns 0 on success, -1 on failure. */ int SDLTest_DrawString( SDL_Renderer * renderer, int x, int y, const char *s ); /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #include "close_code.h" #endif /* _SDL_test_font_h */ /* vi: set ts=4 sw=4 expandtab: */
{ "pile_set_name": "Github" }
/***************************************************************************/ /* */ /* afwrtsys.h */ /* */ /* Auto-fitter writing systems (specification only). */ /* */ /* Copyright 2013-2018 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef AFWRTSYS_H_ #define AFWRTSYS_H_ /* Since preprocessor directives can't create other preprocessor */ /* directives, we have to include the header files manually. */ #include "afdummy.h" #include "aflatin.h" #include "afcjk.h" #include "afindic.h" #ifdef FT_OPTION_AUTOFIT2 #include "aflatin2.h" #endif #endif /* AFWRTSYS_H_ */ /* The following part can be included multiple times. */ /* Define `WRITING_SYSTEM' as needed. */ /* Add new writing systems here. The arguments are the writing system */ /* name in lowercase and uppercase, respectively. */ WRITING_SYSTEM( dummy, DUMMY ) WRITING_SYSTEM( latin, LATIN ) WRITING_SYSTEM( cjk, CJK ) WRITING_SYSTEM( indic, INDIC ) #ifdef FT_OPTION_AUTOFIT2 WRITING_SYSTEM( latin2, LATIN2 ) #endif /* END */
{ "pile_set_name": "Github" }
// Unity C# reference source // Copyright (c) Unity Technologies. For terms of use, see // https://unity3d.com/legal/licenses/Unity_Reference_Only_License using System; using System.Linq; using UnityEngine; using System.Collections.Generic; namespace UnityEditor.Sprites { // DefaultPackerPolicy will pack rectangles no matter what Sprite mesh type is unless their packing tag contains "[TIGHT]". internal class DefaultPackerPolicy : IPackerPolicy { protected class Entry { public Sprite sprite; public AtlasSettings settings; public string atlasName; public SpritePackingMode packingMode; public int anisoLevel; } private const uint kDefaultPaddingPower = 3; // Good for base and two mip levels. public virtual int GetVersion() { return 1; } public virtual bool AllowSequentialPacking { get { return false; } } protected virtual string TagPrefix { get { return "[TIGHT]"; } } protected virtual bool AllowTightWhenTagged { get { return true; } } protected virtual bool AllowRotationFlipping { get { return false; } } public void OnGroupAtlases(BuildTarget target, PackerJob job, int[] textureImporterInstanceIDs) { List<Entry> entries = new List<Entry>(); string targetName = ""; if (target != BuildTarget.NoTarget) { targetName = BuildPipeline.GetBuildTargetName(target); } foreach (int instanceID in textureImporterInstanceIDs) { TextureImporter ti = EditorUtility.InstanceIDToObject(instanceID) as TextureImporter; TextureFormat desiredFormat; ColorSpace colorSpace; int compressionQuality; ti.ReadTextureImportInstructions(target, out desiredFormat, out colorSpace, out compressionQuality); TextureImporterSettings tis = new TextureImporterSettings(); ti.ReadTextureSettings(tis); bool hasAlphaSplittingForCompression = (targetName != "" && HasPlatformEnabledAlphaSplittingForCompression(targetName, ti)); Sprite[] sprites = AssetDatabase.LoadAllAssetRepresentationsAtPath(ti.assetPath).Select(x => x as Sprite).Where(x => x != null).ToArray(); foreach (Sprite sprite in sprites) { Entry entry = new Entry(); entry.sprite = sprite; entry.settings.format = desiredFormat; entry.settings.colorSpace = colorSpace; // Use Compression Quality for Grouping later only for Compressed Formats. Otherwise leave it Empty. entry.settings.compressionQuality = UnityEditor.TextureUtil.IsCompressedTextureFormat(desiredFormat) ? compressionQuality : 0; entry.settings.filterMode = Enum.IsDefined(typeof(FilterMode), ti.filterMode) ? ti.filterMode : FilterMode.Bilinear; entry.settings.maxWidth = 2048; entry.settings.maxHeight = 2048; entry.settings.generateMipMaps = ti.mipmapEnabled; entry.settings.enableRotation = AllowRotationFlipping; entry.settings.allowsAlphaSplitting = TextureImporter.IsTextureFormatETC1Compression(desiredFormat) && hasAlphaSplittingForCompression; if (ti.mipmapEnabled) entry.settings.paddingPower = kDefaultPaddingPower; else entry.settings.paddingPower = (uint)EditorSettings.spritePackerPaddingPower; entry.atlasName = ParseAtlasName(ti.spritePackingTag); entry.packingMode = GetPackingMode(ti.spritePackingTag, tis.spriteMeshType); entry.anisoLevel = ti.anisoLevel; entries.Add(entry); } Resources.UnloadAsset(ti); } // First split sprites into groups based on atlas name var atlasGroups = from e in entries group e by e.atlasName; foreach (var atlasGroup in atlasGroups) { int page = 0; // Then split those groups into smaller groups based on texture settings var settingsGroups = from t in atlasGroup group t by t.settings; foreach (var settingsGroup in settingsGroups) { string atlasName = atlasGroup.Key; if (settingsGroups.Count() > 1) atlasName += string.Format(" (Group {0})", page); AtlasSettings settings = settingsGroup.Key; settings.anisoLevel = 1; // Use the highest aniso level from all entries in this atlas if (settings.generateMipMaps) foreach (Entry entry in settingsGroup) if (entry.anisoLevel > settings.anisoLevel) settings.anisoLevel = entry.anisoLevel; job.AddAtlas(atlasName, settings); foreach (Entry entry in settingsGroup) { job.AssignToAtlas(atlasName, entry.sprite, entry.packingMode, SpritePackingRotation.None); } ++page; } } } protected bool HasPlatformEnabledAlphaSplittingForCompression(string targetName, TextureImporter ti) { TextureImporterPlatformSettings platformSettings = ti.GetPlatformTextureSettings(targetName); return (platformSettings.overridden && platformSettings.allowsAlphaSplitting); } protected bool IsTagPrefixed(string packingTag) { packingTag = packingTag.Trim(); if (packingTag.Length < TagPrefix.Length) return false; return (packingTag.Substring(0, TagPrefix.Length) == TagPrefix); } private string ParseAtlasName(string packingTag) { string name = packingTag.Trim(); if (IsTagPrefixed(name)) name = name.Substring(TagPrefix.Length).Trim(); return (name.Length == 0) ? "(unnamed)" : name; } private SpritePackingMode GetPackingMode(string packingTag, SpriteMeshType meshType) { if (meshType == SpriteMeshType.Tight) if (IsTagPrefixed(packingTag) == AllowTightWhenTagged) return SpritePackingMode.Tight; return SpritePackingMode.Rectangle; } } }
{ "pile_set_name": "Github" }
#!/usr/bin/env python """ Python Character Mapping Codec for ROT13. This codec de/encodes from str to str. Written by Marc-Andre Lemburg ([email protected]). """ import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self, input, errors='strict'): return (input.translate(rot13_map), len(input)) def decode(self, input, errors='strict'): return (input.translate(rot13_map), len(input)) class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): return input.translate(rot13_map) class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False): return input.translate(rot13_map) class StreamWriter(Codec,codecs.StreamWriter): pass class StreamReader(Codec,codecs.StreamReader): pass ### encodings module API def getregentry(): return codecs.CodecInfo( name='rot-13', encode=Codec().encode, decode=Codec().decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamwriter=StreamWriter, streamreader=StreamReader, _is_text_encoding=False, ) ### Map rot13_map = codecs.make_identity_dict(range(256)) rot13_map.update({ 0x0041: 0x004e, 0x0042: 0x004f, 0x0043: 0x0050, 0x0044: 0x0051, 0x0045: 0x0052, 0x0046: 0x0053, 0x0047: 0x0054, 0x0048: 0x0055, 0x0049: 0x0056, 0x004a: 0x0057, 0x004b: 0x0058, 0x004c: 0x0059, 0x004d: 0x005a, 0x004e: 0x0041, 0x004f: 0x0042, 0x0050: 0x0043, 0x0051: 0x0044, 0x0052: 0x0045, 0x0053: 0x0046, 0x0054: 0x0047, 0x0055: 0x0048, 0x0056: 0x0049, 0x0057: 0x004a, 0x0058: 0x004b, 0x0059: 0x004c, 0x005a: 0x004d, 0x0061: 0x006e, 0x0062: 0x006f, 0x0063: 0x0070, 0x0064: 0x0071, 0x0065: 0x0072, 0x0066: 0x0073, 0x0067: 0x0074, 0x0068: 0x0075, 0x0069: 0x0076, 0x006a: 0x0077, 0x006b: 0x0078, 0x006c: 0x0079, 0x006d: 0x007a, 0x006e: 0x0061, 0x006f: 0x0062, 0x0070: 0x0063, 0x0071: 0x0064, 0x0072: 0x0065, 0x0073: 0x0066, 0x0074: 0x0067, 0x0075: 0x0068, 0x0076: 0x0069, 0x0077: 0x006a, 0x0078: 0x006b, 0x0079: 0x006c, 0x007a: 0x006d, }) ### Filter API def rot13(infile, outfile): outfile.write(codecs.encode(infile.read(), 'rot-13')) if __name__ == '__main__': import sys rot13(sys.stdin, sys.stdout)
{ "pile_set_name": "Github" }
// CodeContracts // // Copyright (c) Microsoft Corporation // // All rights reserved. // // MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // File System.ServiceModel.Configuration.IssuedTokenClientElement.cs // Automatically generated contract file. using System.Collections.Generic; using System.IO; using System.Text; using System.Diagnostics.Contracts; using System; // Disable the "this variable is not used" warning as every field would imply it. #pragma warning disable 0414 // Disable the "this variable is never assigned to". #pragma warning disable 0067 // Disable the "this event is never assigned to". #pragma warning disable 0649 // Disable the "this variable is never used". #pragma warning disable 0169 // Disable the "new keyword not required" warning. #pragma warning disable 0109 // Disable the "extern without DllImport" warning. #pragma warning disable 0626 // Disable the "could hide other member" warning, can happen on certain properties. #pragma warning disable 0108 namespace System.ServiceModel.Configuration { sealed public partial class IssuedTokenClientElement : System.Configuration.ConfigurationElement { #region Methods and constructors public void Copy(System.ServiceModel.Configuration.IssuedTokenClientElement from) { } public IssuedTokenClientElement() { } #endregion #region Properties and indexers public bool CacheIssuedTokens { get { return default(bool); } set { } } public System.ServiceModel.Security.SecurityKeyEntropyMode DefaultKeyEntropyMode { get { return default(System.ServiceModel.Security.SecurityKeyEntropyMode); } set { } } public int IssuedTokenRenewalThresholdPercentage { get { return default(int); } set { } } public IssuedTokenClientBehaviorsElementCollection IssuerChannelBehaviors { get { return default(IssuedTokenClientBehaviorsElementCollection); } } public IssuedTokenParametersEndpointAddressElement LocalIssuer { get { return default(IssuedTokenParametersEndpointAddressElement); } } public string LocalIssuerChannelBehaviors { get { return default(string); } set { } } public TimeSpan MaxIssuedTokenCachingTime { get { return default(TimeSpan); } set { } } protected override System.Configuration.ConfigurationPropertyCollection Properties { get { return default(System.Configuration.ConfigurationPropertyCollection); } } #endregion } }
{ "pile_set_name": "Github" }
package org.grobid.core.utilities; import org.apache.commons.io.IOUtils; import org.grobid.core.exceptions.GrobidResourceException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import static org.apache.commons.lang3.StringUtils.isEmpty; /** * Utilities related to file and directory management. * <p> * Created by lfoppiano on 04/08/16. */ public class IOUtilities { private static final Logger LOGGER = LoggerFactory.getLogger(IOUtilities.class); /** * Creates a file and writes some content in it. * * @param file The file to write in. * @param content the content to write * @throws IOException */ public static void writeInFile(String file, String content) throws IOException { FileWriter filew = new FileWriter(new File(file)); BufferedWriter buffw = new BufferedWriter(filew); buffw.write(content); buffw.close(); } /** * Read a file and return the content. * * @param pPathToFile path to file to read. * @return String contained in the document. * @throws IOException */ public static String readFile(String pPathToFile) throws IOException { StringBuffer out = new StringBuffer(); FileInputStream inputStrem = new FileInputStream(new File(pPathToFile)); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); byte buf[] = new byte[1024]; int len; while ((len = inputStrem.read(buf)) > 0) { outStream.write(buf, 0, len); out.append(outStream.toString()); } IOUtils.closeQuietly(inputStrem); IOUtils.closeQuietly(outStream); return out.toString(); } /** * Write an input stream in temp directory. */ public static File writeInputFile(InputStream inputStream) { LOGGER.debug(">> set origin document for stateless service'..."); File originFile = null; OutputStream out = null; try { originFile = newTempFile("origin", ".pdf"); out = new FileOutputStream(originFile); byte buf[] = new byte[1024]; int len; while ((len = inputStream.read(buf)) > 0) { out.write(buf, 0, len); } } catch (IOException e) { LOGGER.error( "An internal error occurs, while writing to disk (file to write '" + originFile + "').", e); originFile = null; } finally { try { if (out != null) { out.close(); } inputStream.close(); } catch (IOException e) { LOGGER.error("An internal error occurs, while writing to disk (file to write '" + originFile + "').", e); originFile = null; } } return originFile; } /** * Creates a new not used temporary file and returns it. */ public static File newTempFile(String fileName, String extension) { try { return File.createTempFile(fileName, extension, GrobidProperties.getTempPath()); } catch (IOException e) { throw new GrobidResourceException( "Could not create temprorary file, '" + fileName + "." + extension + "' under path '" + GrobidProperties.getTempPath() + "'.", e); } } /** * Delete the temporary file. */ public static void removeTempFile(final File file) { try { // sanity cleaning Utilities.deleteOldies(GrobidProperties.getTempPath(), 300); LOGGER.debug("Removing " + file.getAbsolutePath()); file.delete(); } catch (Exception exp) { LOGGER.error("Error while deleting the temporary file: ", exp); } } /** * Delete temporary directory. */ public static void removeTempDirectory(final String path) { try { LOGGER.debug("Removing " + path); File theDirectory = new File(path); if (theDirectory.exists()) { theDirectory.delete(); } } catch (Exception exp) { LOGGER.error("Error while deleting the temporary directory: ", exp); } } }
{ "pile_set_name": "Github" }
module.exports = ({ error }) => error("fpack build index.js");
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: bbba4b95cc404ba449156b0adb4d3f10 NativeFormatImporter: externalObjects: {} mainObjectFileID: 4300000 userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
" Menu Translations: Turkish source <sfile>:p:h/menu_tr_tr.cp1254.vim
{ "pile_set_name": "Github" }
#!/bin/bash source ${HOME}/.bashrc.rdbox-hq ipcalc -n "${AWS_VPC_CIDR}" | grep 'Address' | awk '{print $2}' #
{ "pile_set_name": "Github" }
/* iCheck plugin Minimal skin, black ----------------------------------- */ .icheckbox_minimal, .iradio_minimal { display: inline-block; *display: inline; vertical-align: middle; margin: 0; padding: 0; width: 18px; height: 18px; background: url(minimal.png) no-repeat; border: none; cursor: pointer; } .icheckbox_minimal { background-position: 0 0; } .icheckbox_minimal.hover { background-position: -20px 0; } .icheckbox_minimal.checked { background-position: -40px 0; } .icheckbox_minimal.disabled { background-position: -60px 0; cursor: default; } .icheckbox_minimal.checked.disabled { background-position: -80px 0; } .iradio_minimal { background-position: -100px 0; } .iradio_minimal.hover { background-position: -120px 0; } .iradio_minimal.checked { background-position: -140px 0; } .iradio_minimal.disabled { background-position: -160px 0; cursor: default; } .iradio_minimal.checked.disabled { background-position: -180px 0; } /* Retina support */ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min-device-pixel-ratio: 1.5) { .icheckbox_minimal, .iradio_minimal { background-image: url([email protected]); -webkit-background-size: 200px 20px; background-size: 200px 20px; } }
{ "pile_set_name": "Github" }
// Copyright 2018 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/snapshot/embedded/embedded-file-writer.h" #include <cinttypes> #include "src/codegen/source-position-table.h" #include "src/objects/code-inl.h" namespace v8 { namespace internal { void EmbeddedFileWriter::WriteBuiltin(PlatformEmbeddedFileWriterBase* w, const i::EmbeddedData* blob, const int builtin_id) const { const bool is_default_variant = std::strcmp(embedded_variant_, kDefaultEmbeddedVariant) == 0; i::EmbeddedVector<char, kTemporaryStringLength> builtin_symbol; if (is_default_variant) { // Create nicer symbol names for the default mode. i::SNPrintF(builtin_symbol, "Builtins_%s", i::Builtins::name(builtin_id)); } else { i::SNPrintF(builtin_symbol, "%s_Builtins_%s", embedded_variant_, i::Builtins::name(builtin_id)); } // Labels created here will show up in backtraces. We check in // Isolate::SetEmbeddedBlob that the blob layout remains unchanged, i.e. // that labels do not insert bytes into the middle of the blob byte // stream. w->DeclareFunctionBegin(builtin_symbol.begin()); const std::vector<byte>& current_positions = source_positions_[builtin_id]; // The code below interleaves bytes of assembly code for the builtin // function with source positions at the appropriate offsets. Vector<const byte> vpos(current_positions.data(), current_positions.size()); v8::internal::SourcePositionTableIterator positions( vpos, SourcePositionTableIterator::kExternalOnly); const uint8_t* data = reinterpret_cast<const uint8_t*>( blob->InstructionStartOfBuiltin(builtin_id)); uint32_t size = blob->PaddedInstructionSizeOfBuiltin(builtin_id); uint32_t i = 0; uint32_t next_offset = static_cast<uint32_t>(positions.done() ? size : positions.code_offset()); while (i < size) { if (i == next_offset) { // Write source directive. w->SourceInfo(positions.source_position().ExternalFileId(), GetExternallyCompiledFilename( positions.source_position().ExternalFileId()), positions.source_position().ExternalLine()); positions.Advance(); next_offset = static_cast<uint32_t>( positions.done() ? size : positions.code_offset()); } CHECK_GE(next_offset, i); WriteBinaryContentsAsInlineAssembly(w, data + i, next_offset - i); i = next_offset; } w->DeclareFunctionEnd(builtin_symbol.begin()); } void EmbeddedFileWriter::WriteFileEpilogue(PlatformEmbeddedFileWriterBase* w, const i::EmbeddedData* blob) const { { i::EmbeddedVector<char, kTemporaryStringLength> embedded_blob_symbol; i::SNPrintF(embedded_blob_symbol, "v8_%s_embedded_blob_", embedded_variant_); w->Comment("Pointer to the beginning of the embedded blob."); w->SectionData(); w->AlignToDataAlignment(); w->DeclarePointerToSymbol(embedded_blob_symbol.begin(), EmbeddedBlobDataSymbol().c_str()); w->Newline(); } { i::EmbeddedVector<char, kTemporaryStringLength> embedded_blob_size_symbol; i::SNPrintF(embedded_blob_size_symbol, "v8_%s_embedded_blob_size_", embedded_variant_); w->Comment("The size of the embedded blob in bytes."); w->SectionRoData(); w->AlignToDataAlignment(); w->DeclareUint32(embedded_blob_size_symbol.begin(), blob->size()); w->Newline(); } #if defined(V8_OS_WIN64) { i::EmbeddedVector<char, kTemporaryStringLength> unwind_info_symbol; i::SNPrintF(unwind_info_symbol, "%s_Builtins_UnwindInfo", embedded_variant_); w->MaybeEmitUnwindData(unwind_info_symbol.begin(), EmbeddedBlobDataSymbol().c_str(), blob, reinterpret_cast<const void*>(&unwind_infos_[0])); } #endif // V8_OS_WIN64 w->FileEpilogue(); } namespace { int WriteDirectiveOrSeparator(PlatformEmbeddedFileWriterBase* w, int current_line_length, DataDirective directive) { int printed_chars; if (current_line_length == 0) { printed_chars = w->IndentedDataDirective(directive); DCHECK_LT(0, printed_chars); } else { printed_chars = fprintf(w->fp(), ","); DCHECK_EQ(1, printed_chars); } return current_line_length + printed_chars; } int WriteLineEndIfNeeded(PlatformEmbeddedFileWriterBase* w, int current_line_length, int write_size) { static const int kTextWidth = 100; // Check if adding ',0xFF...FF\n"' would force a line wrap. This doesn't use // the actual size of the string to be written to determine this so it's // more conservative than strictly needed. if (current_line_length + strlen(",0x") + write_size * 2 > kTextWidth) { fprintf(w->fp(), "\n"); return 0; } else { return current_line_length; } } } // namespace // static void EmbeddedFileWriter::WriteBinaryContentsAsInlineAssembly( PlatformEmbeddedFileWriterBase* w, const uint8_t* data, uint32_t size) { int current_line_length = 0; uint32_t i = 0; // Begin by writing out byte chunks. const DataDirective directive = w->ByteChunkDataDirective(); const int byte_chunk_size = DataDirectiveSize(directive); for (; i + byte_chunk_size < size; i += byte_chunk_size) { current_line_length = WriteDirectiveOrSeparator(w, current_line_length, directive); current_line_length += w->WriteByteChunk(data + i); current_line_length = WriteLineEndIfNeeded(w, current_line_length, byte_chunk_size); } if (current_line_length != 0) w->Newline(); current_line_length = 0; // Write any trailing bytes one-by-one. for (; i < size; i++) { current_line_length = WriteDirectiveOrSeparator(w, current_line_length, kByte); current_line_length += w->HexLiteral(data[i]); current_line_length = WriteLineEndIfNeeded(w, current_line_length, 1); } if (current_line_length != 0) w->Newline(); } int EmbeddedFileWriter::LookupOrAddExternallyCompiledFilename( const char* filename) { auto result = external_filenames_.find(filename); if (result != external_filenames_.end()) { return result->second; } int new_id = ExternalFilenameIndexToId(static_cast<int>(external_filenames_.size())); external_filenames_.insert(std::make_pair(filename, new_id)); external_filenames_by_index_.push_back(filename); DCHECK_EQ(external_filenames_by_index_.size(), external_filenames_.size()); return new_id; } const char* EmbeddedFileWriter::GetExternallyCompiledFilename( int fileid) const { size_t index = static_cast<size_t>(ExternalFilenameIdToIndex(fileid)); DCHECK_GE(index, 0); DCHECK_LT(index, external_filenames_by_index_.size()); return external_filenames_by_index_[index]; } int EmbeddedFileWriter::GetExternallyCompiledFilenameCount() const { return static_cast<int>(external_filenames_.size()); } void EmbeddedFileWriter::PrepareBuiltinSourcePositionMap(Builtins* builtins) { for (int i = 0; i < Builtins::builtin_count; i++) { // Retrieve the SourcePositionTable and copy it. Code code = builtins->builtin(i); // Verify that the code object is still the "real code" and not a // trampoline (which wouldn't have source positions). DCHECK(!code.is_off_heap_trampoline()); std::vector<unsigned char> data( code.SourcePositionTable().GetDataStartAddress(), code.SourcePositionTable().GetDataEndAddress()); source_positions_[i] = data; } } } // namespace internal } // namespace v8
{ "pile_set_name": "Github" }
/*! * jQuery UI Tabs 1.9.2 * http://jqueryui.com * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/tabs/ * * Depends: * jquery.ui.core.js * jquery.ui.widget.js */ (function( $, undefined ) { var tabId = 0, rhash = /#.*$/; function getNextTabId() { return ++tabId; } function isLocal( anchor ) { return anchor.hash.length > 1 && anchor.href.replace( rhash, "" ) === location.href.replace( rhash, "" ) // support: Safari 5.1 // Safari 5.1 doesn't encode spaces in window.location // but it does encode spaces from anchors (#8777) .replace( /\s/g, "%20" ); } $.widget( "ui.tabs", { version: "1.9.2", delay: 300, options: { active: null, collapsible: false, event: "click", heightStyle: "content", hide: null, show: null, // callbacks activate: null, beforeActivate: null, beforeLoad: null, load: null }, _create: function() { var that = this, options = this.options, active = options.active, locationHash = location.hash.substring( 1 ); this.running = false; this.element .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) .toggleClass( "ui-tabs-collapsible", options.collapsible ) // Prevent users from focusing disabled tabs via click .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) { if ( $( this ).is( ".ui-state-disabled" ) ) { event.preventDefault(); } }) // support: IE <9 // Preventing the default action in mousedown doesn't prevent IE // from focusing the element, so if the anchor gets focused, blur. // We don't have to worry about focusing the previously focused // element since clicking on a non-focusable element should focus // the body anyway. .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { this.blur(); } }); this._processTabs(); if ( active === null ) { // check the fragment identifier in the URL if ( locationHash ) { this.tabs.each(function( i, tab ) { if ( $( tab ).attr( "aria-controls" ) === locationHash ) { active = i; return false; } }); } // check for a tab marked active via a class if ( active === null ) { active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); } // no active tab, set to false if ( active === null || active === -1 ) { active = this.tabs.length ? 0 : false; } } // handle numbers: negative, out of range if ( active !== false ) { active = this.tabs.index( this.tabs.eq( active ) ); if ( active === -1 ) { active = options.collapsible ? false : 0; } } options.active = active; // don't allow collapsible: false and active: false if ( !options.collapsible && options.active === false && this.anchors.length ) { options.active = 0; } // Take disabling tabs via class attribute from HTML // into account and update option properly. if ( $.isArray( options.disabled ) ) { options.disabled = $.unique( options.disabled.concat( $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { return that.tabs.index( li ); }) ) ).sort(); } // check for length avoids error when initializing empty list if ( this.options.active !== false && this.anchors.length ) { this.active = this._findActive( this.options.active ); } else { this.active = $(); } this._refresh(); if ( this.active.length ) { this.load( options.active ); } }, _getCreateEventData: function() { return { tab: this.active, panel: !this.active.length ? $() : this._getPanelForTab( this.active ) }; }, _tabKeydown: function( event ) { var focusedTab = $( this.document[0].activeElement ).closest( "li" ), selectedIndex = this.tabs.index( focusedTab ), goingForward = true; if ( this._handlePageNav( event ) ) { return; } switch ( event.keyCode ) { case $.ui.keyCode.RIGHT: case $.ui.keyCode.DOWN: selectedIndex++; break; case $.ui.keyCode.UP: case $.ui.keyCode.LEFT: goingForward = false; selectedIndex--; break; case $.ui.keyCode.END: selectedIndex = this.anchors.length - 1; break; case $.ui.keyCode.HOME: selectedIndex = 0; break; case $.ui.keyCode.SPACE: // Activate only, no collapsing event.preventDefault(); clearTimeout( this.activating ); this._activate( selectedIndex ); return; case $.ui.keyCode.ENTER: // Toggle (cancel delayed activation, allow collapsing) event.preventDefault(); clearTimeout( this.activating ); // Determine if we should collapse or activate this._activate( selectedIndex === this.options.active ? false : selectedIndex ); return; default: return; } // Focus the appropriate tab, based on which key was pressed event.preventDefault(); clearTimeout( this.activating ); selectedIndex = this._focusNextTab( selectedIndex, goingForward ); // Navigating with control key will prevent automatic activation if ( !event.ctrlKey ) { // Update aria-selected immediately so that AT think the tab is already selected. // Otherwise AT may confuse the user by stating that they need to activate the tab, // but the tab will already be activated by the time the announcement finishes. focusedTab.attr( "aria-selected", "false" ); this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); this.activating = this._delay(function() { this.option( "active", selectedIndex ); }, this.delay ); } }, _panelKeydown: function( event ) { if ( this._handlePageNav( event ) ) { return; } // Ctrl+up moves focus to the current tab if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { event.preventDefault(); this.active.focus(); } }, // Alt+page up/down moves focus to the previous/next tab (and activates) _handlePageNav: function( event ) { if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { this._activate( this._focusNextTab( this.options.active - 1, false ) ); return true; } if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { this._activate( this._focusNextTab( this.options.active + 1, true ) ); return true; } }, _findNextTab: function( index, goingForward ) { var lastTabIndex = this.tabs.length - 1; function constrain() { if ( index > lastTabIndex ) { index = 0; } if ( index < 0 ) { index = lastTabIndex; } return index; } while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { index = goingForward ? index + 1 : index - 1; } return index; }, _focusNextTab: function( index, goingForward ) { index = this._findNextTab( index, goingForward ); this.tabs.eq( index ).focus(); return index; }, _setOption: function( key, value ) { if ( key === "active" ) { // _activate() will handle invalid values and update this.options this._activate( value ); return; } if ( key === "disabled" ) { // don't use the widget factory's disabled handling this._setupDisabled( value ); return; } this._super( key, value); if ( key === "collapsible" ) { this.element.toggleClass( "ui-tabs-collapsible", value ); // Setting collapsible: false while collapsed; open first panel if ( !value && this.options.active === false ) { this._activate( 0 ); } } if ( key === "event" ) { this._setupEvents( value ); } if ( key === "heightStyle" ) { this._setupHeightStyle( value ); } }, _tabId: function( tab ) { return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId(); }, _sanitizeSelector: function( hash ) { return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; }, refresh: function() { var options = this.options, lis = this.tablist.children( ":has(a[href])" ); // get disabled tabs from class attribute from HTML // this will get converted to a boolean if needed in _refresh() options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { return lis.index( tab ); }); this._processTabs(); // was collapsed or no tabs if ( options.active === false || !this.anchors.length ) { options.active = false; this.active = $(); // was active, but active tab is gone } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { // all remaining tabs are disabled if ( this.tabs.length === options.disabled.length ) { options.active = false; this.active = $(); // activate previous tab } else { this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); } // was active, active tab still exists } else { // make sure active index is correct options.active = this.tabs.index( this.active ); } this._refresh(); }, _refresh: function() { this._setupDisabled( this.options.disabled ); this._setupEvents( this.options.event ); this._setupHeightStyle( this.options.heightStyle ); this.tabs.not( this.active ).attr({ "aria-selected": "false", tabIndex: -1 }); this.panels.not( this._getPanelForTab( this.active ) ) .hide() .attr({ "aria-expanded": "false", "aria-hidden": "true" }); // Make sure one tab is in the tab order if ( !this.active.length ) { this.tabs.eq( 0 ).attr( "tabIndex", 0 ); } else { this.active .addClass( "ui-tabs-active ui-state-active" ) .attr({ "aria-selected": "true", tabIndex: 0 }); this._getPanelForTab( this.active ) .show() .attr({ "aria-expanded": "true", "aria-hidden": "false" }); } }, _processTabs: function() { var that = this; this.tablist = this._getList() .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) .attr( "role", "tablist" ); this.tabs = this.tablist.find( "> li:has(a[href])" ) .addClass( "ui-state-default ui-corner-top" ) .attr({ role: "tab", tabIndex: -1 }); this.anchors = this.tabs.map(function() { return $( "a", this )[ 0 ]; }) .addClass( "ui-tabs-anchor" ) .attr({ role: "presentation", tabIndex: -1 }); this.panels = $(); this.anchors.each(function( i, anchor ) { var selector, panel, panelId, anchorId = $( anchor ).uniqueId().attr( "id" ), tab = $( anchor ).closest( "li" ), originalAriaControls = tab.attr( "aria-controls" ); // inline tab if ( isLocal( anchor ) ) { selector = anchor.hash; panel = that.element.find( that._sanitizeSelector( selector ) ); // remote tab } else { panelId = that._tabId( tab ); selector = "#" + panelId; panel = that.element.find( selector ); if ( !panel.length ) { panel = that._createPanel( panelId ); panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); } panel.attr( "aria-live", "polite" ); } if ( panel.length) { that.panels = that.panels.add( panel ); } if ( originalAriaControls ) { tab.data( "ui-tabs-aria-controls", originalAriaControls ); } tab.attr({ "aria-controls": selector.substring( 1 ), "aria-labelledby": anchorId }); panel.attr( "aria-labelledby", anchorId ); }); this.panels .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) .attr( "role", "tabpanel" ); }, // allow overriding how to find the list for rare usage scenarios (#7715) _getList: function() { return this.element.find( "ol,ul" ).eq( 0 ); }, _createPanel: function( id ) { return $( "<div>" ) .attr( "id", id ) .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) .data( "ui-tabs-destroy", true ); }, _setupDisabled: function( disabled ) { if ( $.isArray( disabled ) ) { if ( !disabled.length ) { disabled = false; } else if ( disabled.length === this.anchors.length ) { disabled = true; } } // disable tabs for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { $( li ) .addClass( "ui-state-disabled" ) .attr( "aria-disabled", "true" ); } else { $( li ) .removeClass( "ui-state-disabled" ) .removeAttr( "aria-disabled" ); } } this.options.disabled = disabled; }, _setupEvents: function( event ) { var events = { click: function( event ) { event.preventDefault(); } }; if ( event ) { $.each( event.split(" "), function( index, eventName ) { events[ eventName ] = "_eventHandler"; }); } this._off( this.anchors.add( this.tabs ).add( this.panels ) ); this._on( this.anchors, events ); this._on( this.tabs, { keydown: "_tabKeydown" } ); this._on( this.panels, { keydown: "_panelKeydown" } ); this._focusable( this.tabs ); this._hoverable( this.tabs ); }, _setupHeightStyle: function( heightStyle ) { var maxHeight, overflow, parent = this.element.parent(); if ( heightStyle === "fill" ) { // IE 6 treats height like minHeight, so we need to turn off overflow // in order to get a reliable height // we use the minHeight support test because we assume that only // browsers that don't support minHeight will treat height as minHeight if ( !$.support.minHeight ) { overflow = parent.css( "overflow" ); parent.css( "overflow", "hidden"); } maxHeight = parent.height(); this.element.siblings( ":visible" ).each(function() { var elem = $( this ), position = elem.css( "position" ); if ( position === "absolute" || position === "fixed" ) { return; } maxHeight -= elem.outerHeight( true ); }); if ( overflow ) { parent.css( "overflow", overflow ); } this.element.children().not( this.panels ).each(function() { maxHeight -= $( this ).outerHeight( true ); }); this.panels.each(function() { $( this ).height( Math.max( 0, maxHeight - $( this ).innerHeight() + $( this ).height() ) ); }) .css( "overflow", "auto" ); } else if ( heightStyle === "auto" ) { maxHeight = 0; this.panels.each(function() { maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); }).height( maxHeight ); } }, _eventHandler: function( event ) { var options = this.options, active = this.active, anchor = $( event.currentTarget ), tab = anchor.closest( "li" ), clickedIsActive = tab[ 0 ] === active[ 0 ], collapsing = clickedIsActive && options.collapsible, toShow = collapsing ? $() : this._getPanelForTab( tab ), toHide = !active.length ? $() : this._getPanelForTab( active ), eventData = { oldTab: active, oldPanel: toHide, newTab: collapsing ? $() : tab, newPanel: toShow }; event.preventDefault(); if ( tab.hasClass( "ui-state-disabled" ) || // tab is already loading tab.hasClass( "ui-tabs-loading" ) || // can't switch durning an animation this.running || // click on active header, but not collapsible ( clickedIsActive && !options.collapsible ) || // allow canceling activation ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { return; } options.active = collapsing ? false : this.tabs.index( tab ); this.active = clickedIsActive ? $() : tab; if ( this.xhr ) { this.xhr.abort(); } if ( !toHide.length && !toShow.length ) { $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); } if ( toShow.length ) { this.load( this.tabs.index( tab ), event ); } this._toggle( event, eventData ); }, // handles show/hide for selecting tabs _toggle: function( event, eventData ) { var that = this, toShow = eventData.newPanel, toHide = eventData.oldPanel; this.running = true; function complete() { that.running = false; that._trigger( "activate", event, eventData ); } function show() { eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); if ( toShow.length && that.options.show ) { that._show( toShow, that.options.show, complete ); } else { toShow.show(); complete(); } } // start out by hiding, then showing, then completing if ( toHide.length && this.options.hide ) { this._hide( toHide, this.options.hide, function() { eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); show(); }); } else { eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); toHide.hide(); show(); } toHide.attr({ "aria-expanded": "false", "aria-hidden": "true" }); eventData.oldTab.attr( "aria-selected", "false" ); // If we're switching tabs, remove the old tab from the tab order. // If we're opening from collapsed state, remove the previous tab from the tab order. // If we're collapsing, then keep the collapsing tab in the tab order. if ( toShow.length && toHide.length ) { eventData.oldTab.attr( "tabIndex", -1 ); } else if ( toShow.length ) { this.tabs.filter(function() { return $( this ).attr( "tabIndex" ) === 0; }) .attr( "tabIndex", -1 ); } toShow.attr({ "aria-expanded": "true", "aria-hidden": "false" }); eventData.newTab.attr({ "aria-selected": "true", tabIndex: 0 }); }, _activate: function( index ) { var anchor, active = this._findActive( index ); // trying to activate the already active panel if ( active[ 0 ] === this.active[ 0 ] ) { return; } // trying to collapse, simulate a click on the current active header if ( !active.length ) { active = this.active; } anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; this._eventHandler({ target: anchor, currentTarget: anchor, preventDefault: $.noop }); }, _findActive: function( index ) { return index === false ? $() : this.tabs.eq( index ); }, _getIndex: function( index ) { // meta-function to give users option to provide a href string instead of a numerical index. if ( typeof index === "string" ) { index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); } return index; }, _destroy: function() { if ( this.xhr ) { this.xhr.abort(); } this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); this.tablist .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) .removeAttr( "role" ); this.anchors .removeClass( "ui-tabs-anchor" ) .removeAttr( "role" ) .removeAttr( "tabIndex" ) .removeData( "href.tabs" ) .removeData( "load.tabs" ) .removeUniqueId(); this.tabs.add( this.panels ).each(function() { if ( $.data( this, "ui-tabs-destroy" ) ) { $( this ).remove(); } else { $( this ) .removeClass( "ui-state-default ui-state-active ui-state-disabled " + "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) .removeAttr( "tabIndex" ) .removeAttr( "aria-live" ) .removeAttr( "aria-busy" ) .removeAttr( "aria-selected" ) .removeAttr( "aria-labelledby" ) .removeAttr( "aria-hidden" ) .removeAttr( "aria-expanded" ) .removeAttr( "role" ); } }); this.tabs.each(function() { var li = $( this ), prev = li.data( "ui-tabs-aria-controls" ); if ( prev ) { li.attr( "aria-controls", prev ); } else { li.removeAttr( "aria-controls" ); } }); this.panels.show(); if ( this.options.heightStyle !== "content" ) { this.panels.css( "height", "" ); } }, enable: function( index ) { var disabled = this.options.disabled; if ( disabled === false ) { return; } if ( index === undefined ) { disabled = false; } else { index = this._getIndex( index ); if ( $.isArray( disabled ) ) { disabled = $.map( disabled, function( num ) { return num !== index ? num : null; }); } else { disabled = $.map( this.tabs, function( li, num ) { return num !== index ? num : null; }); } } this._setupDisabled( disabled ); }, disable: function( index ) { var disabled = this.options.disabled; if ( disabled === true ) { return; } if ( index === undefined ) { disabled = true; } else { index = this._getIndex( index ); if ( $.inArray( index, disabled ) !== -1 ) { return; } if ( $.isArray( disabled ) ) { disabled = $.merge( [ index ], disabled ).sort(); } else { disabled = [ index ]; } } this._setupDisabled( disabled ); }, load: function( index, event ) { index = this._getIndex( index ); var that = this, tab = this.tabs.eq( index ), anchor = tab.find( ".ui-tabs-anchor" ), panel = this._getPanelForTab( tab ), eventData = { tab: tab, panel: panel }; // not remote if ( isLocal( anchor[ 0 ] ) ) { return; } this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); // support: jQuery <1.8 // jQuery <1.8 returns false if the request is canceled in beforeSend, // but as of 1.8, $.ajax() always returns a jqXHR object. if ( this.xhr && this.xhr.statusText !== "canceled" ) { tab.addClass( "ui-tabs-loading" ); panel.attr( "aria-busy", "true" ); this.xhr .success(function( response ) { // support: jQuery <1.8 // http://bugs.jquery.com/ticket/11778 setTimeout(function() { panel.html( response ); that._trigger( "load", event, eventData ); }, 1 ); }) .complete(function( jqXHR, status ) { // support: jQuery <1.8 // http://bugs.jquery.com/ticket/11778 setTimeout(function() { if ( status === "abort" ) { that.panels.stop( false, true ); } tab.removeClass( "ui-tabs-loading" ); panel.removeAttr( "aria-busy" ); if ( jqXHR === that.xhr ) { delete that.xhr; } }, 1 ); }); } }, // TODO: Remove this function in 1.10 when ajaxOptions is removed _ajaxSettings: function( anchor, event, eventData ) { var that = this; return { url: anchor.attr( "href" ), beforeSend: function( jqXHR, settings ) { return that._trigger( "beforeLoad", event, $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) ); } }; }, _getPanelForTab: function( tab ) { var id = $( tab ).attr( "aria-controls" ); return this.element.find( this._sanitizeSelector( "#" + id ) ); } }); // DEPRECATED if ( $.uiBackCompat !== false ) { // helper method for a lot of the back compat extensions $.ui.tabs.prototype._ui = function( tab, panel ) { return { tab: tab, panel: panel, index: this.anchors.index( tab ) }; }; // url method $.widget( "ui.tabs", $.ui.tabs, { url: function( index, url ) { this.anchors.eq( index ).attr( "href", url ); } }); // TODO: Remove _ajaxSettings() method when removing this extension // ajaxOptions and cache options $.widget( "ui.tabs", $.ui.tabs, { options: { ajaxOptions: null, cache: false }, _create: function() { this._super(); var that = this; this._on({ tabsbeforeload: function( event, ui ) { // tab is already cached if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) { event.preventDefault(); return; } ui.jqXHR.success(function() { if ( that.options.cache ) { $.data( ui.tab[ 0 ], "cache.tabs", true ); } }); }}); }, _ajaxSettings: function( anchor, event, ui ) { var ajaxOptions = this.options.ajaxOptions; return $.extend( {}, ajaxOptions, { error: function( xhr, status ) { try { // Passing index avoid a race condition when this method is // called after the user has selected another tab. // Pass the anchor that initiated this request allows // loadError to manipulate the tab content panel via $(a.hash) ajaxOptions.error( xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] ); } catch ( error ) {} } }, this._superApply( arguments ) ); }, _setOption: function( key, value ) { // reset cache if switching from cached to not cached if ( key === "cache" && value === false ) { this.anchors.removeData( "cache.tabs" ); } this._super( key, value ); }, _destroy: function() { this.anchors.removeData( "cache.tabs" ); this._super(); }, url: function( index ){ this.anchors.eq( index ).removeData( "cache.tabs" ); this._superApply( arguments ); } }); // abort method $.widget( "ui.tabs", $.ui.tabs, { abort: function() { if ( this.xhr ) { this.xhr.abort(); } } }); // spinner $.widget( "ui.tabs", $.ui.tabs, { options: { spinner: "<em>Loading&#8230;</em>" }, _create: function() { this._super(); this._on({ tabsbeforeload: function( event, ui ) { // Don't react to nested tabs or tabs that don't use a spinner if ( event.target !== this.element[ 0 ] || !this.options.spinner ) { return; } var span = ui.tab.find( "span" ), html = span.html(); span.html( this.options.spinner ); ui.jqXHR.complete(function() { span.html( html ); }); } }); } }); // enable/disable events $.widget( "ui.tabs", $.ui.tabs, { options: { enable: null, disable: null }, enable: function( index ) { var options = this.options, trigger; if ( index && options.disabled === true || ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) { trigger = true; } this._superApply( arguments ); if ( trigger ) { this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); } }, disable: function( index ) { var options = this.options, trigger; if ( index && options.disabled === false || ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) { trigger = true; } this._superApply( arguments ); if ( trigger ) { this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); } } }); // add/remove methods and events $.widget( "ui.tabs", $.ui.tabs, { options: { add: null, remove: null, tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>" }, add: function( url, label, index ) { if ( index === undefined ) { index = this.anchors.length; } var doInsertAfter, panel, options = this.options, li = $( options.tabTemplate .replace( /#\{href\}/g, url ) .replace( /#\{label\}/g, label ) ), id = !url.indexOf( "#" ) ? url.replace( "#", "" ) : this._tabId( li ); li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true ); li.attr( "aria-controls", id ); doInsertAfter = index >= this.tabs.length; // try to find an existing element before creating a new one panel = this.element.find( "#" + id ); if ( !panel.length ) { panel = this._createPanel( id ); if ( doInsertAfter ) { if ( index > 0 ) { panel.insertAfter( this.panels.eq( -1 ) ); } else { panel.appendTo( this.element ); } } else { panel.insertBefore( this.panels[ index ] ); } } panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ).hide(); if ( doInsertAfter ) { li.appendTo( this.tablist ); } else { li.insertBefore( this.tabs[ index ] ); } options.disabled = $.map( options.disabled, function( n ) { return n >= index ? ++n : n; }); this.refresh(); if ( this.tabs.length === 1 && options.active === false ) { this.option( "active", 0 ); } this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); return this; }, remove: function( index ) { index = this._getIndex( index ); var options = this.options, tab = this.tabs.eq( index ).remove(), panel = this._getPanelForTab( tab ).remove(); // If selected tab was removed focus tab to the right or // in case the last tab was removed the tab to the left. // We check for more than 2 tabs, because if there are only 2, // then when we remove this tab, there will only be one tab left // so we don't need to detect which tab to activate. if ( tab.hasClass( "ui-tabs-active" ) && this.anchors.length > 2 ) { this._activate( index + ( index + 1 < this.anchors.length ? 1 : -1 ) ); } options.disabled = $.map( $.grep( options.disabled, function( n ) { return n !== index; }), function( n ) { return n >= index ? --n : n; }); this.refresh(); this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) ); return this; } }); // length method $.widget( "ui.tabs", $.ui.tabs, { length: function() { return this.anchors.length; } }); // panel ids (idPrefix option + title attribute) $.widget( "ui.tabs", $.ui.tabs, { options: { idPrefix: "ui-tabs-" }, _tabId: function( tab ) { var a = tab.is( "li" ) ? tab.find( "a[href]" ) : tab; a = a[0]; return $( a ).closest( "li" ).attr( "aria-controls" ) || a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) || this.options.idPrefix + getNextTabId(); } }); // _createPanel method $.widget( "ui.tabs", $.ui.tabs, { options: { panelTemplate: "<div></div>" }, _createPanel: function( id ) { return $( this.options.panelTemplate ) .attr( "id", id ) .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) .data( "ui-tabs-destroy", true ); } }); // selected option $.widget( "ui.tabs", $.ui.tabs, { _create: function() { var options = this.options; if ( options.active === null && options.selected !== undefined ) { options.active = options.selected === -1 ? false : options.selected; } this._super(); options.selected = options.active; if ( options.selected === false ) { options.selected = -1; } }, _setOption: function( key, value ) { if ( key !== "selected" ) { return this._super( key, value ); } var options = this.options; this._super( "active", value === -1 ? false : value ); options.selected = options.active; if ( options.selected === false ) { options.selected = -1; } }, _eventHandler: function() { this._superApply( arguments ); this.options.selected = this.options.active; if ( this.options.selected === false ) { this.options.selected = -1; } } }); // show and select event $.widget( "ui.tabs", $.ui.tabs, { options: { show: null, select: null }, _create: function() { this._super(); if ( this.options.active !== false ) { this._trigger( "show", null, this._ui( this.active.find( ".ui-tabs-anchor" )[ 0 ], this._getPanelForTab( this.active )[ 0 ] ) ); } }, _trigger: function( type, event, data ) { var tab, panel, ret = this._superApply( arguments ); if ( !ret ) { return false; } if ( type === "beforeActivate" ) { tab = data.newTab.length ? data.newTab : data.oldTab; panel = data.newPanel.length ? data.newPanel : data.oldPanel; ret = this._super( "select", event, { tab: tab.find( ".ui-tabs-anchor" )[ 0], panel: panel[ 0 ], index: tab.closest( "li" ).index() }); } else if ( type === "activate" && data.newTab.length ) { ret = this._super( "show", event, { tab: data.newTab.find( ".ui-tabs-anchor" )[ 0 ], panel: data.newPanel[ 0 ], index: data.newTab.closest( "li" ).index() }); } return ret; } }); // select method $.widget( "ui.tabs", $.ui.tabs, { select: function( index ) { index = this._getIndex( index ); if ( index === -1 ) { if ( this.options.collapsible && this.options.selected !== -1 ) { index = this.options.selected; } else { return; } } this.anchors.eq( index ).trigger( this.options.event + this.eventNamespace ); } }); // cookie option (function() { var listId = 0; $.widget( "ui.tabs", $.ui.tabs, { options: { cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true } }, _create: function() { var options = this.options, active; if ( options.active == null && options.cookie ) { active = parseInt( this._cookie(), 10 ); if ( active === -1 ) { active = false; } options.active = active; } this._super(); }, _cookie: function( active ) { var cookie = [ this.cookie || ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ]; if ( arguments.length ) { cookie.push( active === false ? -1 : active ); cookie.push( this.options.cookie ); } return $.cookie.apply( null, cookie ); }, _refresh: function() { this._super(); if ( this.options.cookie ) { this._cookie( this.options.active, this.options.cookie ); } }, _eventHandler: function() { this._superApply( arguments ); if ( this.options.cookie ) { this._cookie( this.options.active, this.options.cookie ); } }, _destroy: function() { this._super(); if ( this.options.cookie ) { this._cookie( null, this.options.cookie ); } } }); })(); // load event $.widget( "ui.tabs", $.ui.tabs, { _trigger: function( type, event, data ) { var _data = $.extend( {}, data ); if ( type === "load" ) { _data.panel = _data.panel[ 0 ]; _data.tab = _data.tab.find( ".ui-tabs-anchor" )[ 0 ]; } return this._super( type, event, _data ); } }); // fx option // The new animation options (show, hide) conflict with the old show callback. // The old fx option wins over show/hide anyway (always favor back-compat). // If a user wants to use the new animation API, they must give up the old API. $.widget( "ui.tabs", $.ui.tabs, { options: { fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 } }, _getFx: function() { var hide, show, fx = this.options.fx; if ( fx ) { if ( $.isArray( fx ) ) { hide = fx[ 0 ]; show = fx[ 1 ]; } else { hide = show = fx; } } return fx ? { show: show, hide: hide } : null; }, _toggle: function( event, eventData ) { var that = this, toShow = eventData.newPanel, toHide = eventData.oldPanel, fx = this._getFx(); if ( !fx ) { return this._super( event, eventData ); } that.running = true; function complete() { that.running = false; that._trigger( "activate", event, eventData ); } function show() { eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); if ( toShow.length && fx.show ) { toShow .animate( fx.show, fx.show.duration, function() { complete(); }); } else { toShow.show(); complete(); } } // start out by hiding, then showing, then completing if ( toHide.length && fx.hide ) { toHide.animate( fx.hide, fx.hide.duration, function() { eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); show(); }); } else { eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); toHide.hide(); show(); } } }); } })( jQuery );
{ "pile_set_name": "Github" }
T1 Thing-Nominal 16 17 雾 T2 Thing-Nominal 21 22 雾 T3 Metric 32 35 十几米 T4 Location-Name 42 44 庐山 T5 Thing-Nominal 49 50 云 T6 Thing-Nominal 50 51 峰 T7 Thing-Nominal 51 52 林 T8 Thing-Nominal 52 53 谷 T9 Location-Nominal 83 85 峰岫 T10 Location-Nominal 91 93 树林 T11 Thing-Nominal 99 101 树木 T12 Thing-Nominal 110 112 松树 R1 General-Special Arg1:T12 Arg2:T11 T13 Thing-Nominal 115 116 松 T14 Thing-Nominal 122 123 根 T15 Thing-Nominal 123 124 干 R2 Part-Whole Arg1:T14 Arg2:T13 R3 Part-Whole Arg1:T15 Arg2:T13 T16 Thing-Nominal 127 130 泰山松 T17 Metric 134 139 几万上千年 T18 Location-Nominal 147 148 山 T19 Location-Nominal 151 154 石级路 T20 Thing-Nominal 160 162 野花 T21 Thing-Nominal 162 164 野草 R4 Located Arg1:T20 Arg2:T19 R5 Located Arg1:T21 Arg2:T19 R6 Near Arg1:T19 Arg2:T18 T22 Location-Name 191 193 泰山 T23 Location-Nominal 207 221 极美的泰山青绿的自然景观幽处 * Coreference T23 T19 T24 Thing-Nominal 234 235 云 T25 Thing-Nominal 235 236 山 T26 Thing-Nominal 236 237 雾 T27 Location-Nominal 240 243;244 245 丛林深 谷 T28 Thing-Nominal 250 252 小溪 T29 Thing-Nominal 252 254 山涧 R7 Located Arg1:T28 Arg2:T27 R8 Located Arg1:T29 Arg2:T27 T30 Thing-Nominal 259 261 飞瀑 R9 Located Arg1:T30 Arg2:T27 T31 Location-Name 267 269 泰山 T32 Thing-Nominal 272 276 泰山水流 R10 Located Arg1:T32 Arg2:T31 T33 Thing-Nominal 301 302 雾 T34 Thing-Nominal 321 322 雾 T35 Thing-Nominal 327 331 泰山峰峦 T36 Thing-Nominal 337 341 石山叠层 R11 Part-Whole Arg1:T36 Arg2:T35 T37 Thing-Pronoun 332 334 本体 * Coreference T37 T35 T38 Thing-Nominal 343 346 泰山石 * Coreference T38 T36 T39 Person-Pronoun 352 354 我们 T40 Location-Nominal 357 359 山路 T41 Thing-Nominal 374 377 泰山石 T42 Thing-Nominal 381 384 泰山石 T43 Thing-Nominal 398 404 泰山摩崖石刻 * Coreference T43 T42 T48 T44 Metric 394 397 千百年 T45 Metric 413 415 一部 T46 Metric 415 418 几千年 T47 Organization-Nominal 410 412 祖国 T48 Thing-Nominal 424 426 宝藏 T49 Location-Name 431 433 泰山 T50 Person-Nominal 445 447 名人 T51 Thing-Nominal 447 449 墨迹 T52 Thing-Nominal 454 456 石刻 T53 Thing-Nominal 456 458 石碑 T54 Metric 459 465 一千四百多处 T55 Thing-Nominal 469 470 花 T56 Thing-Nominal 471 472 草 T57 Thing-Nominal 475 477 玉石 T58 Location-Pronoun 485 489 这座名山 * Coreference T58 T49 T59 Person-Nominal 492 494 游人 T60 Organization-Nominal 498 500 祖国 T61 Metric 500 502;503 504 几千 年 T62 Person-Nominal 510 512 人们 T63 Location-Nominal 522 525 南天门 T64 Metric 530 534 一华里长 T65 Location-Name 535 537 天街 T66 Location-Name 522 525 南天门 T67 Thing-Nominal 549 550 雾 T68 Person-Pronoun 552 554 我们 T69 Person-Name 559 562 郭沫若 T70 Time-Explicit 572 578 改革开放以前 T71 Location-Name 579 580;581 582 天 街 T72 Location-Nominal 587 591 几间小铺 * Coreference T72 T71 T76 T73 Thing-Nominal 597 599 楼阁 T74 Thing-Nominal 602 604 建筑 T75 Thing-Nominal 607 609 道路 T76 Location-Nominal 619 621 闹市 T77 Thing-Nominal 624 626 店肆 T78 Person-Nominal 634 636 旅客 T79 Person-Nominal 636 638 游人 T80 Person-Nominal 672 676 历代名人 T81 Location-Nominal 678 681 岩体上 T82 Thing-Nominal 682 684 镌刻 R12 Near Arg1:T82 Arg2:T71 T83 Person-Nominal 689 690 人 T84 Thing-Nominal 700 702;703 707 唐代 摩崖石刻 R13 General-Special Arg1:T84 Arg2:T82 T85 Location-Name 711 715 大观峰壁 T86 Thing-Name 719 727 《纪泰山铭》镌刻 * Coreference T86 T84 T87 T87 Thing-Pronoun 728 730 此碑 T88 Metric 731 737 13??3米 T89 Metric 739 743 5?3米 T90 Time-Explicit 745 751 唐开元十四年 T91 Time-Explicit 752 758 公元726年 * Coreference T91 T90 T92 Person-Name 759 761 玄宗 T93 Location-Name 764 766 泰山 T94 Thing-Nominal 768 769 笔 T95 Thing-Nominal 775 776 字 T96 Metric 777 779 六寸 T97 Thing-Nominal 803 805 碑文 T98 Person-Nominal 807 809 从臣 T99 Location-Nominal 821 826 登顶的道路 T100 Location-Nominal 828 834 几处陡坡险路 R14 Part-Whole Arg1:T100 Arg2:T99 T101 Metric 828 830 几处 T102 Location-Name 863 865 泰山 T103 Person-Nominal 876 878 导游 T104 Time-Implicit 886 891 晴朗的日子 T105 Location-Name 903 905 泰山 T106 Thing-Nominal 910 912 雾蔼 T109 Thing-Nominal 926 928 白云 T110 Thing-Nominal 928 930 蓝天 T111 Thing-Nominal 931 933 飞鸟 T107 Thing-Nominal 921 923 层峦 T108 Thing-Nominal 923 925 叠峰 T112 Location-Name 942 944 泰山 T113 Thing-Pronoun 951 953 这雾 * Coreference T113 T106 T114 Time-Implicit 953 962 自上山以后几个小时 T115 Location-Name 970 972 泰山 T116 Person-Pronoun 977 979 我们 T117 Location-Name 994 997 碧霞寺 T118 Location-Name 1001 1005 大观雄峰 T119 Location-Name 1006 1009 唐摩崖 T120 Location-Nominal 1011 1012 路 T121 Person-Pronoun 1018 1020 我们 T122 Location-Name 1025 1028 日观峰 T123 Location-Name 1032 1034 岱顶 R15 Part-Whole Arg1:T123 Arg2:T112 R16 Near Arg1:T118 Arg2:T117 * Coreference T119 T118 R17 Near Arg1:T122 Arg2:T118 R18 Part-Whole Arg1:T117 Arg2:T112 T124 Thing-Nominal 1035 1036 日 T125 Location-Nominal 1042 1045 峰北侧 T126 Location-Pronoun 1042 1043 峰 * Coreference T126 T122 T127 Thing-Nominal 1047 1049 巨石 T128 Metric 1057 1059 二丈 T129 Thing-Nominal 1063 1066 拱北石 T130 Thing-Nominal 1071 1074 探海石 * Coreference T129 T127 T130 T131 Location-Pronoun 1078 1079 峰 * Coreference T131 T123 T132 Location-Nominal 1078 1080 峰前 T133 Thing-Nominal 1095 1097 碑石 T134 Person-Name 1105 1108 徐志摩 T135 Thing-Nominal 1144 1146 雾霭 T136 Thing-Nominal 1156 1161 嶙峋的山峰 T137 Thing-Nominal 1165 1172 稀疏的一丝浮云 T138 Thing-Nominal 1173 1174;1175 1181 虚 无缥缈的远山 T139 Location-Nominal 1186 1188 近岫 T140 Thing-Nominal 1191 1193 青松 T141 Thing-Nominal 1193 1195 翠柏 T142 Thing-Nominal 1196 1198 奇楼 T143 Thing-Nominal 1198 1200 巧阁 T144 Location-Name 1215 1217 泰山 T145 Time-Implicit 1242 1244 翌晨 T146 Location-Name 1254 1256 泰山 T147 Thing-Nominal 1256 1257 日 T148 Person-Pronoun 1271 1273 我们 T149 Location-Nominal 1290 1294 泰山顶巅 T150 Location-Name 1298 1302 玉皇顶峰 T151 Location-Name 1306 1309 天柱峰 * Coreference T151 T150 T149 T152 Location-Name 1290 1292 泰山 T153 Location-Name 1315 1317 泰山 T154 Location-Name 1324 1326 泰山 T155 Person-Name 1331 1333 孔子 T156 Location-Name 1334 1336 东山 T157 Location-Nominal 1338 1339 鲁 T158 Location-Name 1341 1343 泰山 T159 Person-Name 1349 1351 杜甫 T160 Thing-Nominal 1362 1363 山 T161 Person-Nominal 1366 1368 古人 T162 Location-Name 1370 1372 泰山 T163 Location-Name 1386 1388 泰山 T164 Person-Pronoun 1409 1411 我们 T165 Location-Nominal 1412 1414 小路 T166 Location-Name 1421 1423 天街 T167 Metric 1426 1430 九个小时 T168 Location-Name 1434 1436 泰山 T169 Location-Name 1442 1445 泰安市 T170 Thing-Nominal 1449 1451 暴雨 T171 Person-Pronoun 1454 1455 我 T172 Thing-Nominal 1461 1463 浓雾 T173 Location-Name 1467 1469 泰山 T174 Thing-Pronoun 1474 1476 这雨 * Coreference T174 T170 T175 Thing-Nominal 1487 1488 雨
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <title>OpenLayers ArcGIS Cache Example (MapServer Access)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="../theme/default/style.css" type="text/css"> <link rel="stylesheet" href="style.css" type="text/css"> <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script> <script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers/Layer/ArcGISCache.js" type="text/javascript"></script> <script type="text/javascript"> var map, cacheLayer, testLayer, //This layer requires meta data about the ArcGIS service. Typically you should use a //JSONP call to get this dynamically. For this example, we are just going to hard-code //an example that we got from here (yes, it's very big): // http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json&pretty=true layerInfo = { "currentVersion" : 10.01, "serviceDescription" : "This worldwide street map presents highway-level data for the world and street-level data for the United States, Canada, Japan, Southern Africa, and a number of countries in Europe and elsewhere. This comprehensive street map includes highways, major roads, minor roads, railways, water features, administrative boundaries, cities, parks, and landmarks, overlaid on shaded relief imagery for added context. The street map was developed by ESRI using ESRI basemap data, AND road data, USGS elevation data, and UNEP-WCMC parks and protected areas for the world, and Tele Atlas Dynamap® and Multinet® street data for North America and Europe. Coverage for street-level data in Europe includes Andorra, Austria, Belgium, Czech Republic, Denmark, France, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Luxembourg, Netherlands, Northern Ireland (Belfast only), Norway, Poland, Portugal, San Marino, Slovakia, Spain, Sweden, and Switzerland. Coverage for street-level data elsewhere in the world includes China (Hong Kong only), Colombia, Egypt (Cairo only), Indonesia (Jakarta only), Japan, Mexico (Mexico City only), Russia (Moscow and St. Petersburg only), South Africa, Thailand, and Turkey (Istanbul and Ankara only). For more information on this map, visit us \u003ca href=\"http://goto.arcgisonline.com/maps/World_Street_Map \" target=\"_new\"\u003eonline\u003c/a\u003e.", "mapName" : "Layers", "description" : "This worldwide street map presents highway-level data for the world and street-level data for the United States, Canada, Japan, Southern Africa, most countries in Europe, and several other countries. This comprehensive street map includes highways, major roads, minor roads, one-way arrow indicators, railways, water features, administrative boundaries, cities, parks, and landmarks, overlaid on shaded relief imagery for added context. The map also includes building footprints for selected areas in the United States and Europe and parcel boundaries for much of the lower 48 states.\n\nThe street map was developed by ESRI using ESRI basemap data, DeLorme base map layers, AND road data, USGS elevation data, UNEP-WCMC parks and protected areas for the world, Tele Atlas Dynamap® and Multinet® street data for North America and Europe, and First American parcel data for the United States. Coverage for street-level data in Europe includes Andorra, Austria, Belgium, Czech Republic, Denmark, France, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Luxembourg, Netherlands, Norway, Poland, Portugal, San Marino, Slovakia, Spain, Sweden, and Switzerland. Coverage for street-level data elsewhere in the world includes China (Hong Kong only), Colombia, Egypt (Cairo only), Indonesia (Jakarta only), Japan, Mexico, Russia, South Africa, Thailand, and Turkey (Istanbul and Ankara only). For more information on this map, visit us online at http://goto.arcgisonline.com/maps/World_Street_Map\n", "copyrightText" : "Sources: ESRI, DeLorme, AND, Tele Atlas, First American, ESRI Japan, UNEP-WCMC, USGS, METI, ESRI Hong Kong, ESRI Thailand, Procalculo Prosis", "layers" : [ { "id" : 0, "name" : "World Street Map", "parentLayerId" : -1, "defaultVisibility" : true, "subLayerIds" : null, "minScale" : 0, "maxScale" : 0 } ], "tables" : [ ], "spatialReference" : { "wkid" : 102100 }, "singleFusedMapCache" : true, "tileInfo" : { "rows" : 256, "cols" : 256, "dpi" : 96, "format" : "JPEG", "compressionQuality" : 90, "origin" : { "x" : -20037508.342787, "y" : 20037508.342787 }, "spatialReference" : { "wkid" : 102100 }, "lods" : [ {"level" : 0, "resolution" : 156543.033928, "scale" : 591657527.591555}, {"level" : 1, "resolution" : 78271.5169639999, "scale" : 295828763.795777}, {"level" : 2, "resolution" : 39135.7584820001, "scale" : 147914381.897889}, {"level" : 3, "resolution" : 19567.8792409999, "scale" : 73957190.948944}, {"level" : 4, "resolution" : 9783.93962049996, "scale" : 36978595.474472}, {"level" : 5, "resolution" : 4891.96981024998, "scale" : 18489297.737236}, {"level" : 6, "resolution" : 2445.98490512499, "scale" : 9244648.868618}, {"level" : 7, "resolution" : 1222.99245256249, "scale" : 4622324.434309}, {"level" : 8, "resolution" : 611.49622628138, "scale" : 2311162.217155}, {"level" : 9, "resolution" : 305.748113140558, "scale" : 1155581.108577}, {"level" : 10, "resolution" : 152.874056570411, "scale" : 577790.554289}, {"level" : 11, "resolution" : 76.4370282850732, "scale" : 288895.277144}, {"level" : 12, "resolution" : 38.2185141425366, "scale" : 144447.638572}, {"level" : 13, "resolution" : 19.1092570712683, "scale" : 72223.819286}, {"level" : 14, "resolution" : 9.55462853563415, "scale" : 36111.909643}, {"level" : 15, "resolution" : 4.77731426794937, "scale" : 18055.954822}, {"level" : 16, "resolution" : 2.38865713397468, "scale" : 9027.977411}, {"level" : 17, "resolution" : 1.19432856685505, "scale" : 4513.988705} ] }, "initialExtent" : { "xmin" : -20037507.0671618, "ymin" : -20037507.0671618, "xmax" : 20037507.0671618, "ymax" : 20037507.0671619, "spatialReference" : { "wkid" : 102100 } }, "fullExtent" : { "xmin" : -20037507.0671618, "ymin" : -19971868.8804086, "xmax" : 20037507.0671618, "ymax" : 19971868.8804086, "spatialReference" : { "wkid" : 102100 } }, "units" : "esriMeters", "supportedImageFormatTypes" : "PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP", "documentInfo" : { "Title" : "World Street Map", "Author" : "ESRI", "Comments" : "", "Subject" : "streets, highways, major roads, railways, water features, administrative boundaries, cities, parks, protected areas, landmarks ", "Category" : "transportation(Transportation Networks) ", "Keywords" : "World, Global, 2009, Japan, UNEP-WCMC", "Credits" : "" }, "capabilities" : "Map" }; function init(){ //The max extent for spherical mercator var maxExtent = new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34); //Max extent from layerInfo above var layerMaxExtent = new OpenLayers.Bounds( layerInfo.fullExtent.xmin, layerInfo.fullExtent.ymin, layerInfo.fullExtent.xmax, layerInfo.fullExtent.ymax ); var resolutions = []; for (var i=0; i<layerInfo.tileInfo.lods.length; i++) { resolutions.push(layerInfo.tileInfo.lods[i].resolution); } map = new OpenLayers.Map('map', { maxExtent: maxExtent, StartBounds: layerMaxExtent, units: (layerInfo.units == "esriFeet") ? 'ft' : 'm', resolutions: resolutions, tileSize: new OpenLayers.Size(layerInfo.tileInfo.width, layerInfo.tileInfo.height), projection: 'EPSG:' + layerInfo.spatialReference.wkid }); cacheLayer = new OpenLayers.Layer.ArcGISCache( "AGSCache", "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer", { isBaseLayer: true, //From layerInfo above resolutions: resolutions, tileSize: new OpenLayers.Size(layerInfo.tileInfo.cols, layerInfo.tileInfo.rows), tileOrigin: new OpenLayers.LonLat(layerInfo.tileInfo.origin.x , layerInfo.tileInfo.origin.y), maxExtent: layerMaxExtent, projection: 'EPSG:' + layerInfo.spatialReference.wkid }); // create Google Mercator layers testLayer = new OpenLayers.Layer.Google( "Google Streets", {'sphericalMercator': true} ); map.addLayers([testLayer, cacheLayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl( new OpenLayers.Control.MousePosition() ); map.zoomToExtent(new OpenLayers.Bounds(-8341644, 4711236, -8339198, 4712459)); } </script> </head> <body onload="init()"> <h1 id="title">OpenLayers ArcGIS Cache Example (MapServer Access)</h1> <div id="tags"> arcgis, arcgiscache, cache, tms </div> <p id="shortdesc"> Demonstrates the basic initialization of the ArcGIS Cache layer using a prebuilt configuration, and standard tile access. </p> <div id="map" class="smallmap"></div> <div id="docs"> <p>This example demonstrates using the ArcGISCache layer for accessing ESRI's ArcGIS Server (AGS) Map Cache tiles through an AGS MapServer. Toggle the visibility of the AGS layer to demonstrate how the two maps are lined up correctly.</p> <h2>Notes on this layer</h2> <p>A few attempts have been made at this kind of layer before. See <a href="http://trac.osgeo.org/openlayers/ticket/1967">here</a> and <a href="http://trac.osgeo.org/openlayers/browser/sandbox/tschaub/arcgiscache/lib/OpenLayers/Layer/ArcGISCache.js">here</a>. A problem the users encounter is that the tiles seem to "jump around". This is due to the fact that the max extent for the cached layer actually changes at each zoom level due to the way these caches are constructed. We have attempted to use the resolutions, tile size, and tile origin from the cache meta data to make the appropriate changes to the max extent of the tile to compensate for this behavior.</p> You will need to know: <ul> <li>Max Extent: The max extent of the layer</li> <li>Resolutions: An array of resolutions, one for each zoom level</li> <li>Tile Origin: The location of the tile origin for the cache in the upper left.</li> <li>Tile Size: The size of each tile in the cache. Commonly 256 x 256</li> </ul> <p>It's important that you set the correct values in your layer, and these values will differ from layer to layer. You can find these values for your layer in a metadata page in ArcGIS Server. (ie. <a href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer">http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer</a>)</p> <ul> <li>Max Extent: Full Extent</li> <li>Resolutions: Tile Info -> Levels of Detail -> Resolution</li> <li>Tile Origin: Origin -> X,Y</li> <li>Tile Size: Tile Info -> Height,Width</li> </ul> <h2> Other Examples </h2> <p>This is one of three examples for this layer. You can also configure this layer to use <a href="arcgiscache_direct.html">prebuilt tiles in a file store (not a live server).</a> It is also possible to let this <a href="arcgiscache_jsonp.html">layer 'auto-configure' itself using the capabilities json object from the server itself when using a live ArcGIS server.</a> </p> </div> </body> </html>
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_31) on Mon May 14 18:45:48 PDT 2012 --> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <TITLE> MergedStream (Jackson-core 2.0.2 API) </TITLE> <META NAME="date" CONTENT="2012-05-14"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="MergedStream (Jackson-core 2.0.2 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MergedStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><script type="text/javascript"><!-- google_ad_client = "pub-1467773697956887"; /* Jackson-ad-small */ google_ad_slot = "6699487946"; google_ad_width = 234; google_ad_height = 60; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../com/fasterxml/jackson/core/io/JsonStringEncoder.html" title="class in com.fasterxml.jackson.core.io"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../com/fasterxml/jackson/core/io/NumberInput.html" title="class in com.fasterxml.jackson.core.io"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/fasterxml/jackson/core/io/MergedStream.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="MergedStream.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.fasterxml.jackson.core.io</FONT> <BR> Class MergedStream</H2> <PRE> <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.fasterxml.jackson.core.io.MergedStream</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A></DD> </DL> <HR> <DL> <DT><PRE>public final class <B>MergedStream</B><DT>extends <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></DL> </PRE> <P> Simple <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><CODE>InputStream</CODE></A> implementation that is used to "unwind" some data previously read from an input stream; so that as long as some of that data remains, it's returned; but as long as it's read, we'll just use data from the underlying original stream. This is similar to <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/PushbackInputStream.html?is-external=true" title="class or interface in java.io"><CODE>PushbackInputStream</CODE></A>, but here there's only one implicit pushback, when instance is constructed. <P> <P> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;<A HREF="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#_context">_context</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#MergedStream(com.fasterxml.jackson.core.io.IOContext, java.io.InputStream, byte[], int, int)">MergedStream</A></B>(<A HREF="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</A>&nbsp;context, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;in, byte[]&nbsp;buf, int&nbsp;start, int&nbsp;end)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#available()">available</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#close()">close</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#mark(int)">mark</A></B>(int&nbsp;readlimit)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#markSupported()">markSupported</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#read()">read</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#read(byte[])">read</A></B>(byte[]&nbsp;b)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#read(byte[], int, int)">read</A></B>(byte[]&nbsp;b, int&nbsp;off, int&nbsp;len)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#reset()">reset</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;long</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/core/io/MergedStream.html#skip(long)">skip</A></B>(long&nbsp;n)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="_context"><!-- --></A><H3> _context</H3> <PRE> protected final <A HREF="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</A> <B>_context</B></PRE> <DL> <DL> </DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="MergedStream(com.fasterxml.jackson.core.io.IOContext, java.io.InputStream, byte[], int, int)"><!-- --></A><H3> MergedStream</H3> <PRE> public <B>MergedStream</B>(<A HREF="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</A>&nbsp;context, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;in, byte[]&nbsp;buf, int&nbsp;start, int&nbsp;end)</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="available()"><!-- --></A><H3> available</H3> <PRE> public int <B>available</B>() throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#available()" title="class or interface in java.io">available</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="close()"><!-- --></A><H3> close</H3> <PRE> public void <B>close</B>() throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in interface <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="mark(int)"><!-- --></A><H3> mark</H3> <PRE> public void <B>mark</B>(int&nbsp;readlimit)</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#mark(int)" title="class or interface in java.io">mark</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="markSupported()"><!-- --></A><H3> markSupported</H3> <PRE> public boolean <B>markSupported</B>()</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#markSupported()" title="class or interface in java.io">markSupported</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="read()"><!-- --></A><H3> read</H3> <PRE> public int <B>read</B>() throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read()" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="read(byte[])"><!-- --></A><H3> read</H3> <PRE> public int <B>read</B>(byte[]&nbsp;b) throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read(byte[])" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="read(byte[], int, int)"><!-- --></A><H3> read</H3> <PRE> public int <B>read</B>(byte[]&nbsp;b, int&nbsp;off, int&nbsp;len) throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#read(byte[], int, int)" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="reset()"><!-- --></A><H3> reset</H3> <PRE> public void <B>reset</B>() throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#reset()" title="class or interface in java.io">reset</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="skip(long)"><!-- --></A><H3> skip</H3> <PRE> public long <B>skip</B>(long&nbsp;n) throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true#skip(long)" title="class or interface in java.io">skip</A></CODE> in class <CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR><td rowspan='3'><script type="text/javascript"><!-- google_ad_client = "pub-1467773697956887"; /* Jackson-ad-small */ google_ad_slot = "6699487946"; google_ad_width = 234; google_ad_height = 60; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <!-- GA --> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-140287-6"); pageTracker._trackPageview(); } catch(err) {} </script> </td> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MergedStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../com/fasterxml/jackson/core/io/JsonStringEncoder.html" title="class in com.fasterxml.jackson.core.io"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../com/fasterxml/jackson/core/io/NumberInput.html" title="class in com.fasterxml.jackson.core.io"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/fasterxml/jackson/core/io/MergedStream.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="MergedStream.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright &#169; 2012 <a href="http://fasterxml.com">fasterxml.com</a>. All Rights Reserved. </BODY> </HTML>
{ "pile_set_name": "Github" }
import Vue from 'vue' import Router from 'vue-router' const Index = resolve => require(['/page/index'], resolve) const Login = resolve => require(['/page/Login/login'], resolve) const Home = resolve => require(['/page/Home/home'], resolve) const GoodS = resolve => require(['/page/Goods/goods'], resolve) const goodsDetails = resolve => require(['/page/Goods/goodsDetails'], resolve) const Cart = resolve => require(['/page/Cart/cart'], resolve) const order = resolve => require(['/page/Order/order'], resolve) const user = resolve => require(['/page/User/user'], resolve) const orderList = resolve => require(['/page/User/children/order'], resolve) const information = resolve => require(['/page/User/children/information'], resolve) const addressList = resolve => require(['/page/User/children/addressList'], resolve) const coupon = resolve => require(['/page/User/children/coupon'], resolve) const recycle = resolve => require(['/page/User/children/recycle'], resolve) const support = resolve => require(['/page/User/children/support'], resolve) const checkout = resolve => require(['/page/Checkout/checkout'], resolve) const payment = resolve => require(['/page/Order/payment'], resolve) const paysuccess = resolve => require(['/page/Order/paysuccess'], resolve) Vue.use(Router) export default new Router({ mode: 'history', base: '/demo/shop', routes: [ { path: '/', component: Index, name: 'index', redirect: '/home', children: [ {path: 'home', component: Home}, {path: 'goods', component: GoodS}, {path: 'goodsDetails', name: 'goodsDetails', component: goodsDetails} ] }, {path: '/login', name: 'login', component: Login}, {path: '/cart', name: 'cart', component: Cart}, { path: '/order', name: 'order', component: order, children: [ {path: 'paysuccess', name: 'paysuccess', component: paysuccess}, {path: 'payment', name: 'payment', component: payment} ] }, { path: '/user', name: 'user', component: user, redirect: '/user/orderList', children: [ {path: 'orderList', name: '订单列表', component: orderList}, {path: 'information', name: '账户资料', component: information}, {path: 'addressList', name: '收货地址', component: addressList}, {path: 'coupon', name: '我的优惠', component: coupon}, {path: 'support', name: '售后服务', component: support}, {path: 'recycle', name: '以旧换新', component: recycle} ] }, {path: '/checkout', name: 'checkout', component: checkout}, {path: '*', redirect: '/home'} ] })
{ "pile_set_name": "Github" }
/* YUI 3.17.2 (build 9c3c78e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add("lang/datatype-date-format_tr-TR",function(e){e.Intl.add("datatype-date-format","tr-TR",{a:["Paz","Pzt","Sal","\u00c7ar","Per","Cum","Cmt"],A:["Pazar","Pazartesi","Sal\u0131","\u00c7ar\u015famba","Per\u015fembe","Cuma","Cumartesi"],b:["Oca","\u015eub","Mar","Nis","May","Haz","Tem","A\u011fu","Eyl","Eki","Kas","Ara"],B:["Ocak","\u015eubat","Mart","Nisan","May\u0131s","Haziran","Temmuz","A\u011fustos","Eyl\u00fcl","Ekim","Kas\u0131m","Aral\u0131k"],c:"%d %b %Y %a %H:%M:%S %Z",p:["AM","PM"],P:["am","pm"],x:"%d.%m.%Y",X:"%H:%M:%S"})},"3.17.2");
{ "pile_set_name": "Github" }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = cloneNode; var _definitions = require("../definitions"); const has = Function.call.bind(Object.prototype.hasOwnProperty); function cloneIfNode(obj, deep) { if (obj && typeof obj.type === "string" && obj.type !== "CommentLine" && obj.type !== "CommentBlock") { return cloneNode(obj, deep); } return obj; } function cloneIfNodeOrArray(obj, deep) { if (Array.isArray(obj)) { return obj.map(node => cloneIfNode(node, deep)); } return cloneIfNode(obj, deep); } function cloneNode(node, deep = true) { if (!node) return node; const { type } = node; const newNode = { type }; if (type === "Identifier") { newNode.name = node.name; if (has(node, "optional") && typeof node.optional === "boolean") { newNode.optional = node.optional; } if (has(node, "typeAnnotation")) { newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true) : node.typeAnnotation; } } else if (!has(_definitions.NODE_FIELDS, type)) { throw new Error(`Unknown node type: "${type}"`); } else { for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { if (has(node, field)) { newNode[field] = deep ? cloneIfNodeOrArray(node[field], true) : node[field]; } } } if (has(node, "loc")) { newNode.loc = node.loc; } if (has(node, "leadingComments")) { newNode.leadingComments = node.leadingComments; } if (has(node, "innerComments")) { newNode.innerComments = node.innerComments; } if (has(node, "trailingComments")) { newNode.trailingComments = node.trailingComments; } if (has(node, "extra")) { newNode.extra = Object.assign({}, node.extra); } return newNode; }
{ "pile_set_name": "Github" }
#include <QtScript/QScriptEngine> #include <QtScript/QScriptContext> #include <QtScript/QScriptValue> #include <QtCore/QStringList> #include <QtCore/QDebug> #include <qmetaobject.h> #include <qfont.h> #include <QStringList> #include <QVariant> #include <qdatastream.h> #include <qfont.h> #include <qpaintdevice.h> #include <qstringlist.h> static const char * const qtscript_QFont_function_names[] = { "QFont" // static , "cacheStatistics" , "cleanup" , "initialize" , "insertSubstitution" , "insertSubstitutions" , "removeSubstitution" , "substitute" , "substitutes" , "substitutions" // prototype , "bold" , "capitalization" , "defaultFamily" , "exactMatch" , "family" , "fixedPitch" , "fromString" , "handle" , "isCopyOf" , "italic" , "kerning" , "key" , "lastResortFamily" , "lastResortFont" , "letterSpacing" , "letterSpacingType" , "equals" , "operator_less" , "overline" , "pixelSize" , "pointSize" , "pointSizeF" , "rawMode" , "rawName" , "readFrom" , "resolve" , "setBold" , "setCapitalization" , "setFamily" , "setFixedPitch" , "setItalic" , "setKerning" , "setLetterSpacing" , "setOverline" , "setPixelSize" , "setPointSize" , "setPointSizeF" , "setRawMode" , "setRawName" , "setStretch" , "setStrikeOut" , "setStyle" , "setStyleHint" , "setStyleStrategy" , "setUnderline" , "setWeight" , "setWordSpacing" , "stretch" , "strikeOut" , "style" , "styleHint" , "styleStrategy" , "toString" , "underline" , "weight" , "wordSpacing" , "writeTo" }; static const char * const qtscript_QFont_function_signatures[] = { "\nQFont arg__1\nQFont arg__1, QPaintDevice pd\nString family, int pointSize, int weight, bool italic" // static , "" , "" , "" , "String arg__1, String arg__2" , "String arg__1, List arg__2" , "String arg__1" , "String arg__1" , "String arg__1" , "" // prototype , "" , "" , "" , "" , "" , "" , "String arg__1" , "" , "QFont arg__1" , "" , "" , "" , "" , "" , "" , "" , "QFont arg__1" , "QFont arg__1" , "" , "" , "" , "" , "" , "" , "QDataStream arg__1" , "\nQFont arg__1\nuint mask" , "bool arg__1" , "Capitalization arg__1" , "String arg__1" , "bool arg__1" , "bool b" , "bool arg__1" , "SpacingType type, qreal spacing" , "bool arg__1" , "int arg__1" , "int arg__1" , "qreal arg__1" , "bool arg__1" , "String arg__1" , "int arg__1" , "bool arg__1" , "Style style" , "StyleHint arg__1, StyleStrategy arg__2" , "StyleStrategy s" , "bool arg__1" , "int arg__1" , "qreal spacing" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "QDataStream arg__1" }; static const int qtscript_QFont_function_lengths[] = { 4 // static , 0 , 0 , 0 , 2 , 2 , 1 , 1 , 1 , 0 // prototype , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 }; static QScriptValue qtscript_QFont_throw_ambiguity_error_helper( QScriptContext *context, const char *functionName, const char *signatures) { QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); QStringList fullSignatures; for (int i = 0; i < lines.size(); ++i) fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); return context->throwError(QString::fromLatin1("QFont::%0(): could not find a function match; candidates are:\n%1") .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); } static const QMetaObject *qtscript_QFont_metaObject() { return &QFont::staticMetaObject; } Q_DECLARE_METATYPE(QFont*) Q_DECLARE_METATYPE(QFont::StyleStrategy) Q_DECLARE_METATYPE(QFont::SpacingType) Q_DECLARE_METATYPE(QFont::StyleHint) Q_DECLARE_METATYPE(QFont::Weight) Q_DECLARE_METATYPE(QFont::Capitalization) Q_DECLARE_METATYPE(QFont::Stretch) Q_DECLARE_METATYPE(QFont::Style) Q_DECLARE_METATYPE(Qt::HANDLE) Q_DECLARE_METATYPE(QDataStream*) Q_DECLARE_METATYPE(QPaintDevice*) static QScriptValue qtscript_create_enum_class_helper( QScriptEngine *engine, QScriptEngine::FunctionSignature construct, QScriptEngine::FunctionSignature valueOf, QScriptEngine::FunctionSignature toString) { QScriptValue proto = engine->newObject(); proto.setProperty(QString::fromLatin1("valueOf"), engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); proto.setProperty(QString::fromLatin1("toString"), engine->newFunction(toString), QScriptValue::SkipInEnumeration); return engine->newFunction(construct, proto, 1); } // // QFont::StyleStrategy // static const QFont::StyleStrategy qtscript_QFont_StyleStrategy_values[] = { QFont::PreferDefault , QFont::PreferBitmap , QFont::PreferDevice , QFont::PreferOutline , QFont::ForceOutline , QFont::PreferMatch , QFont::PreferQuality , QFont::PreferAntialias , QFont::NoAntialias , QFont::OpenGLCompatible , QFont::ForceIntegerMetrics , QFont::NoFontMerging }; static const char * const qtscript_QFont_StyleStrategy_keys[] = { "PreferDefault" , "PreferBitmap" , "PreferDevice" , "PreferOutline" , "ForceOutline" , "PreferMatch" , "PreferQuality" , "PreferAntialias" , "NoAntialias" , "OpenGLCompatible" , "ForceIntegerMetrics" , "NoFontMerging" }; static QString qtscript_QFont_StyleStrategy_toStringHelper(QFont::StyleStrategy value) { const QMetaObject *meta = qtscript_QFont_metaObject(); int idx = meta->indexOfEnumerator("StyleStrategy"); Q_ASSERT(idx != -1); QMetaEnum menum = meta->enumerator(idx); return QString::fromLatin1(menum.valueToKey(value)); } static QScriptValue qtscript_QFont_StyleStrategy_toScriptValue(QScriptEngine *engine, const QFont::StyleStrategy &value) { QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); return clazz.property(qtscript_QFont_StyleStrategy_toStringHelper(value)); } static void qtscript_QFont_StyleStrategy_fromScriptValue(const QScriptValue &value, QFont::StyleStrategy &out) { out = qvariant_cast<QFont::StyleStrategy>(value.toVariant()); } static QScriptValue qtscript_construct_QFont_StyleStrategy(QScriptContext *context, QScriptEngine *engine) { int arg = context->argument(0).toInt32(); const QMetaObject *meta = qtscript_QFont_metaObject(); int idx = meta->indexOfEnumerator("StyleStrategy"); Q_ASSERT(idx != -1); QMetaEnum menum = meta->enumerator(idx); if (menum.valueToKey(arg) != 0) return qScriptValueFromValue(engine, static_cast<QFont::StyleStrategy>(arg)); return context->throwError(QString::fromLatin1("StyleStrategy(): invalid enum value (%0)").arg(arg)); } static QScriptValue qtscript_QFont_StyleStrategy_valueOf(QScriptContext *context, QScriptEngine *engine) { QFont::StyleStrategy value = qscriptvalue_cast<QFont::StyleStrategy>(context->thisObject()); return QScriptValue(engine, static_cast<int>(value)); } static QScriptValue qtscript_QFont_StyleStrategy_toString(QScriptContext *context, QScriptEngine *engine) { QFont::StyleStrategy value = qscriptvalue_cast<QFont::StyleStrategy>(context->thisObject()); return QScriptValue(engine, qtscript_QFont_StyleStrategy_toStringHelper(value)); } static QScriptValue qtscript_create_QFont_StyleStrategy_class(QScriptEngine *engine, QScriptValue &clazz) { QScriptValue ctor = qtscript_create_enum_class_helper( engine, qtscript_construct_QFont_StyleStrategy, qtscript_QFont_StyleStrategy_valueOf, qtscript_QFont_StyleStrategy_toString); qScriptRegisterMetaType<QFont::StyleStrategy>(engine, qtscript_QFont_StyleStrategy_toScriptValue, qtscript_QFont_StyleStrategy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); for (int i = 0; i < 12; ++i) { clazz.setProperty(QString::fromLatin1(qtscript_QFont_StyleStrategy_keys[i]), engine->newVariant(qVariantFromValue(qtscript_QFont_StyleStrategy_values[i])), QScriptValue::ReadOnly | QScriptValue::Undeletable); } return ctor; } // // QFont::SpacingType // static const QFont::SpacingType qtscript_QFont_SpacingType_values[] = { QFont::PercentageSpacing , QFont::AbsoluteSpacing }; static const char * const qtscript_QFont_SpacingType_keys[] = { "PercentageSpacing" , "AbsoluteSpacing" }; static QString qtscript_QFont_SpacingType_toStringHelper(QFont::SpacingType value) { if ((value >= QFont::PercentageSpacing) && (value <= QFont::AbsoluteSpacing)) return qtscript_QFont_SpacingType_keys[static_cast<int>(value)-static_cast<int>(QFont::PercentageSpacing)]; return QString(); } static QScriptValue qtscript_QFont_SpacingType_toScriptValue(QScriptEngine *engine, const QFont::SpacingType &value) { QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); return clazz.property(qtscript_QFont_SpacingType_toStringHelper(value)); } static void qtscript_QFont_SpacingType_fromScriptValue(const QScriptValue &value, QFont::SpacingType &out) { out = qvariant_cast<QFont::SpacingType>(value.toVariant()); } static QScriptValue qtscript_construct_QFont_SpacingType(QScriptContext *context, QScriptEngine *engine) { int arg = context->argument(0).toInt32(); if ((arg >= QFont::PercentageSpacing) && (arg <= QFont::AbsoluteSpacing)) return qScriptValueFromValue(engine, static_cast<QFont::SpacingType>(arg)); return context->throwError(QString::fromLatin1("SpacingType(): invalid enum value (%0)").arg(arg)); } static QScriptValue qtscript_QFont_SpacingType_valueOf(QScriptContext *context, QScriptEngine *engine) { QFont::SpacingType value = qscriptvalue_cast<QFont::SpacingType>(context->thisObject()); return QScriptValue(engine, static_cast<int>(value)); } static QScriptValue qtscript_QFont_SpacingType_toString(QScriptContext *context, QScriptEngine *engine) { QFont::SpacingType value = qscriptvalue_cast<QFont::SpacingType>(context->thisObject()); return QScriptValue(engine, qtscript_QFont_SpacingType_toStringHelper(value)); } static QScriptValue qtscript_create_QFont_SpacingType_class(QScriptEngine *engine, QScriptValue &clazz) { QScriptValue ctor = qtscript_create_enum_class_helper( engine, qtscript_construct_QFont_SpacingType, qtscript_QFont_SpacingType_valueOf, qtscript_QFont_SpacingType_toString); qScriptRegisterMetaType<QFont::SpacingType>(engine, qtscript_QFont_SpacingType_toScriptValue, qtscript_QFont_SpacingType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); for (int i = 0; i < 2; ++i) { clazz.setProperty(QString::fromLatin1(qtscript_QFont_SpacingType_keys[i]), engine->newVariant(qVariantFromValue(qtscript_QFont_SpacingType_values[i])), QScriptValue::ReadOnly | QScriptValue::Undeletable); } return ctor; } // // QFont::StyleHint // static const QFont::StyleHint qtscript_QFont_StyleHint_values[] = { QFont::Helvetica , QFont::Times , QFont::Courier , QFont::OldEnglish , QFont::System , QFont::AnyStyle , QFont::Cursive , QFont::Monospace , QFont::Fantasy }; static const char * const qtscript_QFont_StyleHint_keys[] = { "Helvetica" , "Times" , "Courier" , "OldEnglish" , "System" , "AnyStyle" , "Cursive" , "Monospace" , "Fantasy" }; static QString qtscript_QFont_StyleHint_toStringHelper(QFont::StyleHint value) { if ((value >= QFont::Helvetica) && (value <= QFont::Fantasy)) return qtscript_QFont_StyleHint_keys[static_cast<int>(value)-static_cast<int>(QFont::Helvetica)]; return QString(); } static QScriptValue qtscript_QFont_StyleHint_toScriptValue(QScriptEngine *engine, const QFont::StyleHint &value) { QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); return clazz.property(qtscript_QFont_StyleHint_toStringHelper(value)); } static void qtscript_QFont_StyleHint_fromScriptValue(const QScriptValue &value, QFont::StyleHint &out) { out = qvariant_cast<QFont::StyleHint>(value.toVariant()); } static QScriptValue qtscript_construct_QFont_StyleHint(QScriptContext *context, QScriptEngine *engine) { int arg = context->argument(0).toInt32(); if ((arg >= QFont::Helvetica) && (arg <= QFont::Fantasy)) return qScriptValueFromValue(engine, static_cast<QFont::StyleHint>(arg)); return context->throwError(QString::fromLatin1("StyleHint(): invalid enum value (%0)").arg(arg)); } static QScriptValue qtscript_QFont_StyleHint_valueOf(QScriptContext *context, QScriptEngine *engine) { QFont::StyleHint value = qscriptvalue_cast<QFont::StyleHint>(context->thisObject()); return QScriptValue(engine, static_cast<int>(value)); } static QScriptValue qtscript_QFont_StyleHint_toString(QScriptContext *context, QScriptEngine *engine) { QFont::StyleHint value = qscriptvalue_cast<QFont::StyleHint>(context->thisObject()); return QScriptValue(engine, qtscript_QFont_StyleHint_toStringHelper(value)); } static QScriptValue qtscript_create_QFont_StyleHint_class(QScriptEngine *engine, QScriptValue &clazz) { QScriptValue ctor = qtscript_create_enum_class_helper( engine, qtscript_construct_QFont_StyleHint, qtscript_QFont_StyleHint_valueOf, qtscript_QFont_StyleHint_toString); qScriptRegisterMetaType<QFont::StyleHint>(engine, qtscript_QFont_StyleHint_toScriptValue, qtscript_QFont_StyleHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); for (int i = 0; i < 9; ++i) { clazz.setProperty(QString::fromLatin1(qtscript_QFont_StyleHint_keys[i]), engine->newVariant(qVariantFromValue(qtscript_QFont_StyleHint_values[i])), QScriptValue::ReadOnly | QScriptValue::Undeletable); } return ctor; } // // QFont::Weight // static const QFont::Weight qtscript_QFont_Weight_values[] = { QFont::Light , QFont::Normal , QFont::DemiBold , QFont::Bold , QFont::Black }; static const char * const qtscript_QFont_Weight_keys[] = { "Light" , "Normal" , "DemiBold" , "Bold" , "Black" }; static QString qtscript_QFont_Weight_toStringHelper(QFont::Weight value) { for (int i = 0; i < 5; ++i) { if (qtscript_QFont_Weight_values[i] == value) return QString::fromLatin1(qtscript_QFont_Weight_keys[i]); } return QString(); } static QScriptValue qtscript_QFont_Weight_toScriptValue(QScriptEngine *engine, const QFont::Weight &value) { QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); return clazz.property(qtscript_QFont_Weight_toStringHelper(value)); } static void qtscript_QFont_Weight_fromScriptValue(const QScriptValue &value, QFont::Weight &out) { out = qvariant_cast<QFont::Weight>(value.toVariant()); } static QScriptValue qtscript_construct_QFont_Weight(QScriptContext *context, QScriptEngine *engine) { int arg = context->argument(0).toInt32(); for (int i = 0; i < 5; ++i) { if (qtscript_QFont_Weight_values[i] == arg) return qScriptValueFromValue(engine, static_cast<QFont::Weight>(arg)); } return context->throwError(QString::fromLatin1("Weight(): invalid enum value (%0)").arg(arg)); } static QScriptValue qtscript_QFont_Weight_valueOf(QScriptContext *context, QScriptEngine *engine) { QFont::Weight value = qscriptvalue_cast<QFont::Weight>(context->thisObject()); return QScriptValue(engine, static_cast<int>(value)); } static QScriptValue qtscript_QFont_Weight_toString(QScriptContext *context, QScriptEngine *engine) { QFont::Weight value = qscriptvalue_cast<QFont::Weight>(context->thisObject()); return QScriptValue(engine, qtscript_QFont_Weight_toStringHelper(value)); } static QScriptValue qtscript_create_QFont_Weight_class(QScriptEngine *engine, QScriptValue &clazz) { QScriptValue ctor = qtscript_create_enum_class_helper( engine, qtscript_construct_QFont_Weight, qtscript_QFont_Weight_valueOf, qtscript_QFont_Weight_toString); qScriptRegisterMetaType<QFont::Weight>(engine, qtscript_QFont_Weight_toScriptValue, qtscript_QFont_Weight_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); for (int i = 0; i < 5; ++i) { clazz.setProperty(QString::fromLatin1(qtscript_QFont_Weight_keys[i]), engine->newVariant(qVariantFromValue(qtscript_QFont_Weight_values[i])), QScriptValue::ReadOnly | QScriptValue::Undeletable); } return ctor; } // // QFont::Capitalization // static const QFont::Capitalization qtscript_QFont_Capitalization_values[] = { QFont::MixedCase , QFont::AllUppercase , QFont::AllLowercase , QFont::SmallCaps , QFont::Capitalize }; static const char * const qtscript_QFont_Capitalization_keys[] = { "MixedCase" , "AllUppercase" , "AllLowercase" , "SmallCaps" , "Capitalize" }; static QString qtscript_QFont_Capitalization_toStringHelper(QFont::Capitalization value) { if ((value >= QFont::MixedCase) && (value <= QFont::Capitalize)) return qtscript_QFont_Capitalization_keys[static_cast<int>(value)-static_cast<int>(QFont::MixedCase)]; return QString(); } static QScriptValue qtscript_QFont_Capitalization_toScriptValue(QScriptEngine *engine, const QFont::Capitalization &value) { QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); return clazz.property(qtscript_QFont_Capitalization_toStringHelper(value)); } static void qtscript_QFont_Capitalization_fromScriptValue(const QScriptValue &value, QFont::Capitalization &out) { out = qvariant_cast<QFont::Capitalization>(value.toVariant()); } static QScriptValue qtscript_construct_QFont_Capitalization(QScriptContext *context, QScriptEngine *engine) { int arg = context->argument(0).toInt32(); if ((arg >= QFont::MixedCase) && (arg <= QFont::Capitalize)) return qScriptValueFromValue(engine, static_cast<QFont::Capitalization>(arg)); return context->throwError(QString::fromLatin1("Capitalization(): invalid enum value (%0)").arg(arg)); } static QScriptValue qtscript_QFont_Capitalization_valueOf(QScriptContext *context, QScriptEngine *engine) { QFont::Capitalization value = qscriptvalue_cast<QFont::Capitalization>(context->thisObject()); return QScriptValue(engine, static_cast<int>(value)); } static QScriptValue qtscript_QFont_Capitalization_toString(QScriptContext *context, QScriptEngine *engine) { QFont::Capitalization value = qscriptvalue_cast<QFont::Capitalization>(context->thisObject()); return QScriptValue(engine, qtscript_QFont_Capitalization_toStringHelper(value)); } static QScriptValue qtscript_create_QFont_Capitalization_class(QScriptEngine *engine, QScriptValue &clazz) { QScriptValue ctor = qtscript_create_enum_class_helper( engine, qtscript_construct_QFont_Capitalization, qtscript_QFont_Capitalization_valueOf, qtscript_QFont_Capitalization_toString); qScriptRegisterMetaType<QFont::Capitalization>(engine, qtscript_QFont_Capitalization_toScriptValue, qtscript_QFont_Capitalization_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); for (int i = 0; i < 5; ++i) { clazz.setProperty(QString::fromLatin1(qtscript_QFont_Capitalization_keys[i]), engine->newVariant(qVariantFromValue(qtscript_QFont_Capitalization_values[i])), QScriptValue::ReadOnly | QScriptValue::Undeletable); } return ctor; } // // QFont::Stretch // static const QFont::Stretch qtscript_QFont_Stretch_values[] = { QFont::UltraCondensed , QFont::ExtraCondensed , QFont::Condensed , QFont::SemiCondensed , QFont::Unstretched , QFont::SemiExpanded , QFont::Expanded , QFont::ExtraExpanded , QFont::UltraExpanded }; static const char * const qtscript_QFont_Stretch_keys[] = { "UltraCondensed" , "ExtraCondensed" , "Condensed" , "SemiCondensed" , "Unstretched" , "SemiExpanded" , "Expanded" , "ExtraExpanded" , "UltraExpanded" }; static QString qtscript_QFont_Stretch_toStringHelper(QFont::Stretch value) { for (int i = 0; i < 9; ++i) { if (qtscript_QFont_Stretch_values[i] == value) return QString::fromLatin1(qtscript_QFont_Stretch_keys[i]); } return QString(); } static QScriptValue qtscript_QFont_Stretch_toScriptValue(QScriptEngine *engine, const QFont::Stretch &value) { QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); return clazz.property(qtscript_QFont_Stretch_toStringHelper(value)); } static void qtscript_QFont_Stretch_fromScriptValue(const QScriptValue &value, QFont::Stretch &out) { out = qvariant_cast<QFont::Stretch>(value.toVariant()); } static QScriptValue qtscript_construct_QFont_Stretch(QScriptContext *context, QScriptEngine *engine) { int arg = context->argument(0).toInt32(); for (int i = 0; i < 9; ++i) { if (qtscript_QFont_Stretch_values[i] == arg) return qScriptValueFromValue(engine, static_cast<QFont::Stretch>(arg)); } return context->throwError(QString::fromLatin1("Stretch(): invalid enum value (%0)").arg(arg)); } static QScriptValue qtscript_QFont_Stretch_valueOf(QScriptContext *context, QScriptEngine *engine) { QFont::Stretch value = qscriptvalue_cast<QFont::Stretch>(context->thisObject()); return QScriptValue(engine, static_cast<int>(value)); } static QScriptValue qtscript_QFont_Stretch_toString(QScriptContext *context, QScriptEngine *engine) { QFont::Stretch value = qscriptvalue_cast<QFont::Stretch>(context->thisObject()); return QScriptValue(engine, qtscript_QFont_Stretch_toStringHelper(value)); } static QScriptValue qtscript_create_QFont_Stretch_class(QScriptEngine *engine, QScriptValue &clazz) { QScriptValue ctor = qtscript_create_enum_class_helper( engine, qtscript_construct_QFont_Stretch, qtscript_QFont_Stretch_valueOf, qtscript_QFont_Stretch_toString); qScriptRegisterMetaType<QFont::Stretch>(engine, qtscript_QFont_Stretch_toScriptValue, qtscript_QFont_Stretch_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); for (int i = 0; i < 9; ++i) { clazz.setProperty(QString::fromLatin1(qtscript_QFont_Stretch_keys[i]), engine->newVariant(qVariantFromValue(qtscript_QFont_Stretch_values[i])), QScriptValue::ReadOnly | QScriptValue::Undeletable); } return ctor; } // // QFont::Style // static const QFont::Style qtscript_QFont_Style_values[] = { QFont::StyleNormal , QFont::StyleItalic , QFont::StyleOblique }; static const char * const qtscript_QFont_Style_keys[] = { "StyleNormal" , "StyleItalic" , "StyleOblique" }; static QString qtscript_QFont_Style_toStringHelper(QFont::Style value) { if ((value >= QFont::StyleNormal) && (value <= QFont::StyleOblique)) return qtscript_QFont_Style_keys[static_cast<int>(value)-static_cast<int>(QFont::StyleNormal)]; return QString(); } static QScriptValue qtscript_QFont_Style_toScriptValue(QScriptEngine *engine, const QFont::Style &value) { QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); return clazz.property(qtscript_QFont_Style_toStringHelper(value)); } static void qtscript_QFont_Style_fromScriptValue(const QScriptValue &value, QFont::Style &out) { out = qvariant_cast<QFont::Style>(value.toVariant()); } static QScriptValue qtscript_construct_QFont_Style(QScriptContext *context, QScriptEngine *engine) { int arg = context->argument(0).toInt32(); if ((arg >= QFont::StyleNormal) && (arg <= QFont::StyleOblique)) return qScriptValueFromValue(engine, static_cast<QFont::Style>(arg)); return context->throwError(QString::fromLatin1("Style(): invalid enum value (%0)").arg(arg)); } static QScriptValue qtscript_QFont_Style_valueOf(QScriptContext *context, QScriptEngine *engine) { QFont::Style value = qscriptvalue_cast<QFont::Style>(context->thisObject()); return QScriptValue(engine, static_cast<int>(value)); } static QScriptValue qtscript_QFont_Style_toString(QScriptContext *context, QScriptEngine *engine) { QFont::Style value = qscriptvalue_cast<QFont::Style>(context->thisObject()); return QScriptValue(engine, qtscript_QFont_Style_toStringHelper(value)); } static QScriptValue qtscript_create_QFont_Style_class(QScriptEngine *engine, QScriptValue &clazz) { QScriptValue ctor = qtscript_create_enum_class_helper( engine, qtscript_construct_QFont_Style, qtscript_QFont_Style_valueOf, qtscript_QFont_Style_toString); qScriptRegisterMetaType<QFont::Style>(engine, qtscript_QFont_Style_toScriptValue, qtscript_QFont_Style_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); for (int i = 0; i < 3; ++i) { clazz.setProperty(QString::fromLatin1(qtscript_QFont_Style_keys[i]), engine->newVariant(qVariantFromValue(qtscript_QFont_Style_values[i])), QScriptValue::ReadOnly | QScriptValue::Undeletable); } return ctor; } // // QFont // static QScriptValue qtscript_QFont_prototype_call(QScriptContext *context, QScriptEngine *) { #if QT_VERSION > 0x040400 Q_ASSERT(context->callee().isFunction()); uint _id = context->callee().data().toUInt32(); #else uint _id; if (context->callee().isFunction()) _id = context->callee().data().toUInt32(); else _id = 0xBABE0000 + 57; #endif Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); _id &= 0x0000FFFF; QFont* _q_self = qscriptvalue_cast<QFont*>(context->thisObject()); if (!_q_self) { return context->throwError(QScriptContext::TypeError, QString::fromLatin1("QFont.%0(): this object is not a QFont") .arg(qtscript_QFont_function_names[_id+10])); } switch (_id) { case 0: if (context->argumentCount() == 0) { bool _q_result = _q_self->bold(); return QScriptValue(context->engine(), _q_result); } break; case 1: if (context->argumentCount() == 0) { QFont::Capitalization _q_result = _q_self->capitalization(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 2: if (context->argumentCount() == 0) { QString _q_result = _q_self->defaultFamily(); return QScriptValue(context->engine(), _q_result); } break; case 3: if (context->argumentCount() == 0) { bool _q_result = _q_self->exactMatch(); return QScriptValue(context->engine(), _q_result); } break; case 4: if (context->argumentCount() == 0) { QString _q_result = _q_self->family(); return QScriptValue(context->engine(), _q_result); } break; case 5: if (context->argumentCount() == 0) { bool _q_result = _q_self->fixedPitch(); return QScriptValue(context->engine(), _q_result); } break; case 6: if (context->argumentCount() == 1) { QString _q_arg0 = context->argument(0).toString(); bool _q_result = _q_self->fromString(_q_arg0); return QScriptValue(context->engine(), _q_result); } break; case 7: if (context->argumentCount() == 0) { Qt::HANDLE _q_result = _q_self->handle(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 8: if (context->argumentCount() == 1) { QFont _q_arg0 = qscriptvalue_cast<QFont>(context->argument(0)); bool _q_result = _q_self->isCopyOf(_q_arg0); return QScriptValue(context->engine(), _q_result); } break; case 9: if (context->argumentCount() == 0) { bool _q_result = _q_self->italic(); return QScriptValue(context->engine(), _q_result); } break; case 10: if (context->argumentCount() == 0) { bool _q_result = _q_self->kerning(); return QScriptValue(context->engine(), _q_result); } break; case 11: if (context->argumentCount() == 0) { QString _q_result = _q_self->key(); return QScriptValue(context->engine(), _q_result); } break; case 12: if (context->argumentCount() == 0) { QString _q_result = _q_self->lastResortFamily(); return QScriptValue(context->engine(), _q_result); } break; case 13: if (context->argumentCount() == 0) { QString _q_result = _q_self->lastResortFont(); return QScriptValue(context->engine(), _q_result); } break; case 14: if (context->argumentCount() == 0) { qreal _q_result = _q_self->letterSpacing(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 15: if (context->argumentCount() == 0) { QFont::SpacingType _q_result = _q_self->letterSpacingType(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 16: if (context->argumentCount() == 1) { QFont _q_arg0 = qscriptvalue_cast<QFont>(context->argument(0)); bool _q_result = _q_self->operator==(_q_arg0); return QScriptValue(context->engine(), _q_result); } break; case 17: if (context->argumentCount() == 1) { QFont _q_arg0 = qscriptvalue_cast<QFont>(context->argument(0)); bool _q_result = _q_self->operator<(_q_arg0); return QScriptValue(context->engine(), _q_result); } break; case 18: if (context->argumentCount() == 0) { bool _q_result = _q_self->overline(); return QScriptValue(context->engine(), _q_result); } break; case 19: if (context->argumentCount() == 0) { int _q_result = _q_self->pixelSize(); return QScriptValue(context->engine(), _q_result); } break; case 20: if (context->argumentCount() == 0) { int _q_result = _q_self->pointSize(); return QScriptValue(context->engine(), _q_result); } break; case 21: if (context->argumentCount() == 0) { qreal _q_result = _q_self->pointSizeF(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 22: if (context->argumentCount() == 0) { bool _q_result = _q_self->rawMode(); return QScriptValue(context->engine(), _q_result); } break; case 23: if (context->argumentCount() == 0) { QString _q_result = _q_self->rawName(); return QScriptValue(context->engine(), _q_result); } break; case 24: if (context->argumentCount() == 1) { QDataStream* _q_arg0 = qscriptvalue_cast<QDataStream*>(context->argument(0)); operator>>(*_q_arg0, *_q_self); return context->engine()->undefinedValue(); } break; case 25: if (context->argumentCount() == 0) { uint _q_result = _q_self->resolve(); return QScriptValue(context->engine(), _q_result); } if (context->argumentCount() == 1) { if ((qMetaTypeId<QFont>() == context->argument(0).toVariant().userType())) { QFont _q_arg0 = qscriptvalue_cast<QFont>(context->argument(0)); QFont _q_result = _q_self->resolve(_q_arg0); return qScriptValueFromValue(context->engine(), _q_result); } else if (context->argument(0).isNumber()) { uint _q_arg0 = context->argument(0).toUInt32(); _q_self->resolve(_q_arg0); return context->engine()->undefinedValue(); } } break; case 26: if (context->argumentCount() == 1) { bool _q_arg0 = context->argument(0).toBoolean(); _q_self->setBold(_q_arg0); return context->engine()->undefinedValue(); } break; case 27: if (context->argumentCount() == 1) { QFont::Capitalization _q_arg0 = qscriptvalue_cast<QFont::Capitalization>(context->argument(0)); _q_self->setCapitalization(_q_arg0); return context->engine()->undefinedValue(); } break; case 28: if (context->argumentCount() == 1) { QString _q_arg0 = context->argument(0).toString(); _q_self->setFamily(_q_arg0); return context->engine()->undefinedValue(); } break; case 29: if (context->argumentCount() == 1) { bool _q_arg0 = context->argument(0).toBoolean(); _q_self->setFixedPitch(_q_arg0); return context->engine()->undefinedValue(); } break; case 30: if (context->argumentCount() == 1) { bool _q_arg0 = context->argument(0).toBoolean(); _q_self->setItalic(_q_arg0); return context->engine()->undefinedValue(); } break; case 31: if (context->argumentCount() == 1) { bool _q_arg0 = context->argument(0).toBoolean(); _q_self->setKerning(_q_arg0); return context->engine()->undefinedValue(); } break; case 32: if (context->argumentCount() == 2) { QFont::SpacingType _q_arg0 = qscriptvalue_cast<QFont::SpacingType>(context->argument(0)); qreal _q_arg1 = qscriptvalue_cast<qreal>(context->argument(1)); _q_self->setLetterSpacing(_q_arg0, _q_arg1); return context->engine()->undefinedValue(); } break; case 33: if (context->argumentCount() == 1) { bool _q_arg0 = context->argument(0).toBoolean(); _q_self->setOverline(_q_arg0); return context->engine()->undefinedValue(); } break; case 34: if (context->argumentCount() == 1) { int _q_arg0 = context->argument(0).toInt32(); _q_self->setPixelSize(_q_arg0); return context->engine()->undefinedValue(); } break; case 35: if (context->argumentCount() == 1) { int _q_arg0 = context->argument(0).toInt32(); _q_self->setPointSize(_q_arg0); return context->engine()->undefinedValue(); } break; case 36: if (context->argumentCount() == 1) { qreal _q_arg0 = qscriptvalue_cast<qreal>(context->argument(0)); _q_self->setPointSizeF(_q_arg0); return context->engine()->undefinedValue(); } break; case 37: if (context->argumentCount() == 1) { bool _q_arg0 = context->argument(0).toBoolean(); _q_self->setRawMode(_q_arg0); return context->engine()->undefinedValue(); } break; case 38: if (context->argumentCount() == 1) { QString _q_arg0 = context->argument(0).toString(); _q_self->setRawName(_q_arg0); return context->engine()->undefinedValue(); } break; case 39: if (context->argumentCount() == 1) { int _q_arg0 = context->argument(0).toInt32(); _q_self->setStretch(_q_arg0); return context->engine()->undefinedValue(); } break; case 40: if (context->argumentCount() == 1) { bool _q_arg0 = context->argument(0).toBoolean(); _q_self->setStrikeOut(_q_arg0); return context->engine()->undefinedValue(); } break; case 41: if (context->argumentCount() == 1) { QFont::Style _q_arg0 = qscriptvalue_cast<QFont::Style>(context->argument(0)); _q_self->setStyle(_q_arg0); return context->engine()->undefinedValue(); } break; case 42: if (context->argumentCount() == 1) { QFont::StyleHint _q_arg0 = qscriptvalue_cast<QFont::StyleHint>(context->argument(0)); _q_self->setStyleHint(_q_arg0); return context->engine()->undefinedValue(); } if (context->argumentCount() == 2) { QFont::StyleHint _q_arg0 = qscriptvalue_cast<QFont::StyleHint>(context->argument(0)); QFont::StyleStrategy _q_arg1 = qscriptvalue_cast<QFont::StyleStrategy>(context->argument(1)); _q_self->setStyleHint(_q_arg0, _q_arg1); return context->engine()->undefinedValue(); } break; case 43: if (context->argumentCount() == 1) { QFont::StyleStrategy _q_arg0 = qscriptvalue_cast<QFont::StyleStrategy>(context->argument(0)); _q_self->setStyleStrategy(_q_arg0); return context->engine()->undefinedValue(); } break; case 44: if (context->argumentCount() == 1) { bool _q_arg0 = context->argument(0).toBoolean(); _q_self->setUnderline(_q_arg0); return context->engine()->undefinedValue(); } break; case 45: if (context->argumentCount() == 1) { int _q_arg0 = context->argument(0).toInt32(); _q_self->setWeight(_q_arg0); return context->engine()->undefinedValue(); } break; case 46: if (context->argumentCount() == 1) { qreal _q_arg0 = qscriptvalue_cast<qreal>(context->argument(0)); _q_self->setWordSpacing(_q_arg0); return context->engine()->undefinedValue(); } break; case 47: if (context->argumentCount() == 0) { int _q_result = _q_self->stretch(); return QScriptValue(context->engine(), _q_result); } break; case 48: if (context->argumentCount() == 0) { bool _q_result = _q_self->strikeOut(); return QScriptValue(context->engine(), _q_result); } break; case 49: if (context->argumentCount() == 0) { QFont::Style _q_result = _q_self->style(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 50: if (context->argumentCount() == 0) { QFont::StyleHint _q_result = _q_self->styleHint(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 51: if (context->argumentCount() == 0) { QFont::StyleStrategy _q_result = _q_self->styleStrategy(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 52: if (context->argumentCount() == 0) { QString _q_result = _q_self->toString(); return QScriptValue(context->engine(), _q_result); } break; case 53: if (context->argumentCount() == 0) { bool _q_result = _q_self->underline(); return QScriptValue(context->engine(), _q_result); } break; case 54: if (context->argumentCount() == 0) { int _q_result = _q_self->weight(); return QScriptValue(context->engine(), _q_result); } break; case 55: if (context->argumentCount() == 0) { qreal _q_result = _q_self->wordSpacing(); return qScriptValueFromValue(context->engine(), _q_result); } break; case 56: if (context->argumentCount() == 1) { QDataStream* _q_arg0 = qscriptvalue_cast<QDataStream*>(context->argument(0)); operator<<(*_q_arg0, *_q_self); return context->engine()->undefinedValue(); } break; default: Q_ASSERT(false); } return qtscript_QFont_throw_ambiguity_error_helper(context, qtscript_QFont_function_names[_id+10], qtscript_QFont_function_signatures[_id+10]); } static QScriptValue qtscript_QFont_static_call(QScriptContext *context, QScriptEngine *) { uint _id = context->callee().data().toUInt32(); Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); _id &= 0x0000FFFF; switch (_id) { case 0: if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { return context->throwError(QString::fromLatin1("QFont(): Did you forget to construct with 'new'?")); } if (context->argumentCount() == 0) { QFont _q_cpp_result; QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); return _q_result; } else if (context->argumentCount() == 1) { if ((qMetaTypeId<QFont>() == context->argument(0).toVariant().userType())) { QFont _q_arg0 = qscriptvalue_cast<QFont>(context->argument(0)); QFont _q_cpp_result(_q_arg0); QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); return _q_result; } else if (context->argument(0).isString()) { QString _q_arg0 = context->argument(0).toString(); QFont _q_cpp_result(_q_arg0); QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); return _q_result; } } else if (context->argumentCount() == 2) { if ((qMetaTypeId<QFont>() == context->argument(0).toVariant().userType()) && qscriptvalue_cast<QPaintDevice*>(context->argument(1))) { QFont _q_arg0 = qscriptvalue_cast<QFont>(context->argument(0)); QPaintDevice* _q_arg1 = qscriptvalue_cast<QPaintDevice*>(context->argument(1)); QFont _q_cpp_result(_q_arg0, _q_arg1); QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); return _q_result; } else if (context->argument(0).isString() && context->argument(1).isNumber()) { QString _q_arg0 = context->argument(0).toString(); int _q_arg1 = context->argument(1).toInt32(); QFont _q_cpp_result(_q_arg0, _q_arg1); QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); return _q_result; } } else if (context->argumentCount() == 3) { QString _q_arg0 = context->argument(0).toString(); int _q_arg1 = context->argument(1).toInt32(); int _q_arg2 = context->argument(2).toInt32(); QFont _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); return _q_result; } else if (context->argumentCount() == 4) { QString _q_arg0 = context->argument(0).toString(); int _q_arg1 = context->argument(1).toInt32(); int _q_arg2 = context->argument(2).toInt32(); bool _q_arg3 = context->argument(3).toBoolean(); QFont _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); return _q_result; } break; case 1: if (context->argumentCount() == 0) { QFont::cacheStatistics(); return context->engine()->undefinedValue(); } break; case 2: if (context->argumentCount() == 0) { QFont::cleanup(); return context->engine()->undefinedValue(); } break; case 3: if (context->argumentCount() == 0) { QFont::initialize(); return context->engine()->undefinedValue(); } break; case 4: if (context->argumentCount() == 2) { QString _q_arg0 = context->argument(0).toString(); QString _q_arg1 = context->argument(1).toString(); QFont::insertSubstitution(_q_arg0, _q_arg1); return context->engine()->undefinedValue(); } break; case 5: if (context->argumentCount() == 2) { QString _q_arg0 = context->argument(0).toString(); QStringList _q_arg1; qScriptValueToSequence(context->argument(1), _q_arg1); QFont::insertSubstitutions(_q_arg0, _q_arg1); return context->engine()->undefinedValue(); } break; case 6: if (context->argumentCount() == 1) { QString _q_arg0 = context->argument(0).toString(); QFont::removeSubstitution(_q_arg0); return context->engine()->undefinedValue(); } break; case 7: if (context->argumentCount() == 1) { QString _q_arg0 = context->argument(0).toString(); QString _q_result = QFont::substitute(_q_arg0); return QScriptValue(context->engine(), _q_result); } break; case 8: if (context->argumentCount() == 1) { QString _q_arg0 = context->argument(0).toString(); QStringList _q_result = QFont::substitutes(_q_arg0); return qScriptValueFromSequence(context->engine(), _q_result); } break; case 9: if (context->argumentCount() == 0) { QStringList _q_result = QFont::substitutions(); return qScriptValueFromSequence(context->engine(), _q_result); } break; default: Q_ASSERT(false); } return qtscript_QFont_throw_ambiguity_error_helper(context, qtscript_QFont_function_names[_id], qtscript_QFont_function_signatures[_id]); } QScriptValue qtscript_create_QFont_class(QScriptEngine *engine) { engine->setDefaultPrototype(qMetaTypeId<QFont*>(), QScriptValue()); QScriptValue proto = engine->newVariant(qVariantFromValue((QFont*)0)); for (int i = 0; i < 57; ++i) { QScriptValue fun = engine->newFunction(qtscript_QFont_prototype_call, qtscript_QFont_function_lengths[i+10]); fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); proto.setProperty(QString::fromLatin1(qtscript_QFont_function_names[i+10]), fun, QScriptValue::SkipInEnumeration); } engine->setDefaultPrototype(qMetaTypeId<QFont>(), proto); engine->setDefaultPrototype(qMetaTypeId<QFont*>(), proto); QScriptValue ctor = engine->newFunction(qtscript_QFont_static_call, proto, qtscript_QFont_function_lengths[0]); ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); for (int i = 0; i < 9; ++i) { QScriptValue fun = engine->newFunction(qtscript_QFont_static_call, qtscript_QFont_function_lengths[i+1]); fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); ctor.setProperty(QString::fromLatin1(qtscript_QFont_function_names[i+1]), fun, QScriptValue::SkipInEnumeration); } ctor.setProperty(QString::fromLatin1("StyleStrategy"), qtscript_create_QFont_StyleStrategy_class(engine, ctor)); ctor.setProperty(QString::fromLatin1("SpacingType"), qtscript_create_QFont_SpacingType_class(engine, ctor)); ctor.setProperty(QString::fromLatin1("StyleHint"), qtscript_create_QFont_StyleHint_class(engine, ctor)); ctor.setProperty(QString::fromLatin1("Weight"), qtscript_create_QFont_Weight_class(engine, ctor)); ctor.setProperty(QString::fromLatin1("Capitalization"), qtscript_create_QFont_Capitalization_class(engine, ctor)); ctor.setProperty(QString::fromLatin1("Stretch"), qtscript_create_QFont_Stretch_class(engine, ctor)); ctor.setProperty(QString::fromLatin1("Style"), qtscript_create_QFont_Style_class(engine, ctor)); return ctor; }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ /* * This header file contains some internal resampling functions. * */ #ifndef COMMON_AUDIO_SIGNAL_PROCESSING_RESAMPLE_BY_2_INTERNAL_H_ #define COMMON_AUDIO_SIGNAL_PROCESSING_RESAMPLE_BY_2_INTERNAL_H_ #include <stdint.h> /******************************************************************* * resample_by_2_fast.c * Functions for internal use in the other resample functions ******************************************************************/ void WebRtcSpl_DownBy2IntToShort(int32_t* in, int32_t len, int16_t* out, int32_t* state); void WebRtcSpl_DownBy2ShortToInt(const int16_t* in, int32_t len, int32_t* out, int32_t* state); void WebRtcSpl_UpBy2ShortToInt(const int16_t* in, int32_t len, int32_t* out, int32_t* state); void WebRtcSpl_UpBy2IntToInt(const int32_t* in, int32_t len, int32_t* out, int32_t* state); void WebRtcSpl_UpBy2IntToShort(const int32_t* in, int32_t len, int16_t* out, int32_t* state); void WebRtcSpl_LPBy2ShortToInt(const int16_t* in, int32_t len, int32_t* out, int32_t* state); void WebRtcSpl_LPBy2IntToInt(const int32_t* in, int32_t len, int32_t* out, int32_t* state); #endif // COMMON_AUDIO_SIGNAL_PROCESSING_RESAMPLE_BY_2_INTERNAL_H_
{ "pile_set_name": "Github" }
# HTTP API Design Standards ## Guidelines This document provides guidelines and examples for GoCardless APIs, encouraging consistency, maintainability, and best practices. ### Sources: - https://github.com/interagent/http-api-design - https://www.gov.uk/service-manual/making-software/apis.html - http://www.mnot.net/blog/ - http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api - https://github.com/WhiteHouse/api-standards - http://apigee.com/about/content/api-fa%C3%A7ade-pattern - https://pages.apigee.com/web-api-design-ebook.html - https://groups.google.com/forum/#!forum/api-craft ## JSON API All endpoints must follow the core [JSON API spec](http://jsonapi.org/format/) Changes from JSON API: - The primary resource must be keyed by its resource type. The endpoint URL must also match the resource type. - API errors do not currently follow the JSON API spec. - Updates should always return `200 OK` with the full resource to simplify internal logic. Example of keying the resource by type: ```json GET /posts/1 ``` ```json { "posts": { "id": 1 } } ``` ## JSON only The API should only support JSON. Reference: http://www.mnot.net/blog/2012/04/13/json_or_xml_just_decide ## General guidelines - A URL identifies a resource. - URLs should include nouns, not verbs. - For consistency, only use plural nouns (e.g. "posts" instead of "post"). - Use HTTP verbs (`GET`, `POST`, `PUT`, `DELETE`) to operate on resources. - Use filtering instead of nested resources: `/payments?subscription=xyz` rather than `/subscriptions/xyz/payments`. Nested resources enforce relationships that could change and makes clients harder to write. - API versions should be represented as dates documented in a changelog. Version number should not be in the URL. - API should be behind a subdomain: `api.gocardless.com` ## RESTful URLs ### Good URL examples - List of payments: - `GET https://api.gocardless.com/payments` - Filtering is a query: - `GET https://api.gocardless.com/payments?status=failed&sort_field=-created` - `GET https://api.gocardless.com/payments?sort_field=created` - A single payment: - `GET https://api.gocardless.com/payments/1234` - All amendments in (or belonging to) this subscription: - `GET https://api.gocardless.com/subscription_amendments?subscription=1234` - Include nested resources in a comma separated list: - `GET https://api.gocardless.com/payments/1234?include=events` - Include only selected fields in a comma separated list: - `GET https://api.gocardless.com/payments/1234?fields=amount` - Get multiple resources: - `GET https://api.gocardless.com/payments/1234,444,555,666` - Action on resource: - `POST https://api.gocardless.com/payments/1234/actions/cancel` ### Bad URL examples - Singular nouns: - `GET https://api.gocardless.com/payment` - `GET https://api.gocardless.com/payment/123` - `GET https://api.gocardless.com/payment/action` - Verbs in the URL: - `GET https://api.gocardless.com/payment/create` - Nested resources: - `GET https://api.gocardless.com/subscriptions/1234/amendments` - Filtering outside of query string: - `GET https://api.gocardless.com/payments/desc` - Filtering to get multiple resources: - `GET https://api.gocardless.com/payments?id[]=11&id[]=22` ## HTTP verbs Here's an example of how HTTP verbs map to create, read, update, delete operations in a particular context: | HTTP METHOD | POST | GET | PUT | PATCH | DELETE | |:------------- |:-------------- |:------------ |:------------ |:------------ |:------------ | | CRUD OP | CREATE | READ | UPDATE | UPDATE | DELETE | | /plans | Create new plan| List plans | Bulk update | Error | Delete all plans | | /plans/1234 | Error | Show Plan If exists | If exists, full/partial update Plan; If not, error | If exists, update Plan using JSON Patch format; If not, error | Delete Plan | ## Actions Avoid resource actions. Create separate resources where possible. #### Good ```http POST /refunds?payment=ID&amount=1000 ``` #### Bad ```http POST /payments/ID/refund ``` Where special actions are required, place them under an `actions` prefix. Actions should always be idempotent. ```http POST /payments/ID/actions/cancel ``` ## Responses Don’t set values in keys. #### Good ```json "tags": [ {"id": "125", "name": "Environment"}, {"id": "834", "name": "Water Quality"} ] ``` #### Bad ```json "tags": [ {"125": "Environment"}, {"834": "Water Quality"} ] ``` ## String IDs Always return string ids. Some languages, like JavaScript, don't support big ints. Serialize/deserialize ints to strings if storing ids as ints. ## Error handling Error responses should include a message for the user, an internal error type (corresponding to some specific internally determined constant represented as a string), and links to info for developers. There must only be one top level error. Errors should be returned in turn. This makes internal error logic and dealing with errors as a consumer of the API easier. Validation and resource errors are nested in the top level error under `errors`. The error is nested in `error` to make it possible to add, for example, deprecation errors on successful requests. The HTTP status `code` is used as a top level error, `type` is used as a sub error, and nested `errors` may have more specific `type` errors, such as `invalid_field`. ### Formating errors vs integration errors Formatting errors should be separate from errors handled by the integration. Formatting errors include things like field presence and length, and are returned when incorrect data is sent to the API. An example of an error that should be handled by the integration is attempting to create a payment against a mandate that has expired. This is an edge case that the API integration needs to handle. Do not mask these errors as validation errors. Return them as a top level error instead. ### Top level error - Top level errors MUST implement `request_id`, `type`, `code` and `message`. - `type` MUST relate to the `reason`. For example, use it to categorise the error: `reason: api_error`. - `message` MUST be specific. - Top level errors MAY implement `documentation_url`, `request_url` and `id`. - Only return `id` for server errors (5xx). The `id` should point to the exception you track internally. ```json { "error": { "documentation_url": "https://api.gocardless.com/docs/beta/errors#access_forbidden", "request_url": "https://api.gocardless.com/requests/REQUEST_ID", "request_id": "REQUEST_ID", "id": "ERROR_ID", "type": "access_forbidden", "code": 403, "message": "You don't have the right permissions to access this resource" } } ``` ### Nested errors - Nested errors MUST implement `reason` and `message`. - `reason` MUST be specific to the error. - Nested errors MAY implement `field`. ```json { "error": { "top level errors": "...", "errors": [{ "field": "account_number", "reason": "missing_field", "message": "Account number is required" }] } } ``` ### HTTP status code summary - `200 OK` - everything worked as expected. - `400 Bad Request` - e.g. invalid JSON. - `401 Unauthorized` - no valid API key provided. - `402 Request Failed` - parameters were valid but request failed. - `403 Forbidden` - missing or invalid permissions. - `404 Not Found` - the requested item doesn’t exist. - `422 Unprocessable Entity` - parameters were invalid/validation failed. - `500, 502, 503, 504 Server errors` - something went wrong on GoCardless’ end. #### 400 Bad Request - When the request body contains malformed JSON. - When the JSON is valid but the document structure is invalid (e.g. passing an array when an object should be passed). #### 422 Unprocessable Entity - When model validations fail for fields (e.g. name too long). - Trying to create a resource when a related resource is in a bad state. ## What changes are considered “backwards-compatible”? - Adding new API resources. - Adding new optional request parameters to existing API methods. - Adding new properties to existing API responses. - Changing the order of properties in existing API responses. - Changing the length or format of object IDs or other opaque strings. - This includes adding or removing fixed prefixes (such as ch_ on charge IDs). - You can safely assume object IDs we generate will never exceed 128 characters, but you should be able to handle IDs of up to that length. If for example you’re using MySQL, you should store IDs in a VARCHAR(128) COLLATE utf8_bin column (the COLLATE configuration ensures case-sensitivity in lookups). - Adding new event types. Your webhook listener should gracefully handle unfamiliar events types. ## Versioning changes The versioning scheme is designed to promote incremental improvement to the API and discourage rewrites. Server initiated events such as webhooks should not contain serialised resources. If a resource changed, provide its id instead and let the client request it using a version. ### Format Versions should be dated as ISO8601 (YYYY-MM-DD) - Good: 2014-05-04 - Bad: v-1.1, v1.2, 1.3, v1, v2 ### Version maintenance Maintain old API versions for at least 6 months. ### Implementation guidelines The API version must be set using a custom HTTP header. The API version must not be defined in the URL structure (e.g. `/v1`) because it makes incremental change impossible. #### HTTP Header `GoCardless-Version: 2014-05-04` Enforce the header on all requests. Validate the version against available versions. Do not allow dates up to a version. The API changelog must only contain backwards-incompatible changes. All non-breaking changes are automatically available to old versions. Reference: https://stripe.com/docs/upgrades ## X-Headers The use of `X-Custom-Header` has [been deprecated](http://tools.ietf.org/html/rfc6648). ## Resource filtering Resource filters MUST be in singular form. Multiple ids should be supplied to a filter as a comma separated list, and should be translated into an `OR` query. Chaining multiple filters with `&` should be translated into an `AND` query. #### Good ```http GET /refunds?payment=ID1,ID2&customer=ID1 ``` #### Bad ```http GET /refunds?payments=ID1,ID2&customer=ID1 ``` ## Pagination All list/index endpoints must be paginated by default. Pagination must be reverse chronological. Only support cursor or time based pagination. #### Defaults `limit=50` `after=NEWEST_RESOURCE` `before=null` #### Limits `limit=500` Parameters: | Name | Type | Description | | ------------- |:-------------:| -----:| | `after` | string | id to start after | | `before` | string | id to start before | | `limit` | string | number of records | ### Response Paginated results are always enveloped: ``` { "meta": { "cursors": { "after": "abcd1234", "before": "wxyz0987" }, "limit": 50 }, "payments": [{ … }, …] } ``` ## Updates Full or partial updates using `PUT` should replace any parameters passed and ignore fields not submitted. ``` GET /items/id_123 { "id": "id_123", "meta": { "created": "date", "published": false } } ``` ``` PUT /items/id_123 { "meta": { "published": true } } { "id": "id_123", "meta": { "published": false } } ``` ### PATCH Updates PATCH is reserved for [JSON Patch](http://jsonapi.org/format/#patch) operations. ## JSON encode POST, PUT & PATCH bodies `POST`, `PUT` and `PATCH` expect JSON bodies in the request. `Content-Type` header MUST be set to `application/json`. For unsupported media types a `415` (Unsupported Media Type) response code is returned. ## Caching Most responses return an `ETag` header. Many responses also return a `Last-Modified` header. The values of these headers can be used to make subsequent requests to those resources using the `If-None-Match` and `If-Modified-Since` headers, respectively. If the resource has not changed, the server will return a `304 Not Modified`. Note that making a conditional request and receiving a 304 response does _not_ count against your rate limit, so we encourage you to use it whenever possible. `Cache-Control: private, max-age=60` `ETag: <hash of contents>` `Last-Modified: updated_at` #### Vary header The following header values must be declared in the Vary header: `Accept`, `Authorization` and `Cookie`. Any of these headers can change the representation of the data and should invalidate a cached version. This can be useful if users have different accounts to do admin, each with different privileges and resource visibility. Reference: https://www.mnot.net/cache_docs/ ## Compression All responses should support gzip. ## Result filtering, sorting & searching See JSON-API: http://jsonapi.org/format/#fetching-filtering ## Pretty printed responses JSON responses should be pretty printed. ## Time zone/dates Explicitly provide an ISO8601 timestamp with timezone information (DateTime in UTC). Use the exact timestamp for API calls that allow a timestamp to be specified. These timestamps look something like `2014-02-27T15:05:06+01:00`. ISO 8601 UTC format: YYYY-MM-DDTHH:MM:SSZ. ## HTTP rate limiting All endpoints must be rate limited. The current rate limit status is returned in the HTTP headers of all API requests. ```http Rate-Limit-Limit: 5000 Rate-Limit-Remaining: 4994 Rate-Limit-Reset: Thu, 01 Dec 1994 16:00:00 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Retry-After: Thu, 01 May 2014 16:00:00 GMT RateLimit-Reset uses the HTTP header date format: RFC 1123 (Thu, 01 Dec 1994 16:00:00 GMT) ``` Exceeding rate limit: ```http // 429 Too Many Requests { "message": "API rate limit exceeded.", "type": "rate_limit_exceeded", "documentation_url": "http://developer.gocardless.com/#rate_limit_exceeded" } ``` ## CORS Support Cross Origin Resource Sharing (CORS) for AJAX requests. Resources: - [CORS W3C working draft](https://www.w3.org/TR/cors/) - [HTML5 Rocks](http://www.html5rocks.com/en/tutorials/cors/) Any domain that is registered against the requesting account is accepted. ```http $ curl -i https://api.gocardless.com -H "Origin: http://dvla.com" HTTP/1.1 302 Found Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Link, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, OAuth-Scopes, Accepted-OAuth-Scopes Access-Control-Allow-Credentials: false // CORS Preflight request // OPTIONS 200 Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Requested-With Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE Access-Control-Expose-Headers: ETag, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset Access-Control-Max-Age: 86400 Access-Control-Allow-Credentials: false ``` ## TLS/SSL All API request MUST be made over SSL, including outgoing web hooks. Any non-secure requests return `ssl_required`, and no redirects are performed. ```http HTTP/1.1 403 Forbidden Content-Length: 35 { "message": "API requests must be made over HTTPS", "type": "ssl_required", "docs": "https://developer.gocardless.com/errors#ssl_required" } ``` ## Include related resource representations See JSON-API: http://jsonapi.org/format/#fetching-includes ## Limit fields in response See JSON-API: http://jsonapi.org/format/#fetching-sparse-fieldsets ## Unique request identifiers Set a `Request-Id` header to aid debugging across services.
{ "pile_set_name": "Github" }
--- -api-id: T:Windows.UI.Xaml.Controls.TwoPaneView -api-type: winrt class ms.custom: 19H1 --- <!-- Class syntax. public class TwoPaneView : Control, Control --> # Windows.UI.Xaml.Controls.TwoPaneView ## -description Represents a container with two views that size and position content in the available space, either side-by-side or top-bottom. ## -remarks ## -see-also ## -examples
{ "pile_set_name": "Github" }
# technic_wrench traducido por Carlos Barraza Wrench = Llave Inglesa %s with items = %s con elementos
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <sphinx:docset> <sphinx:schema> <sphinx:field name="title"/> <sphinx:field name="content"/> <sphinx:attr name="gid" type="int" default="1"/> </sphinx:schema> <sphinx:killlist> <id>2</id> <id>3</id> </sphinx:killlist> <sphinx:document id="1"> <gid>123</gid> <title>test one</title> <title>duplicate title</title> <content>updated with new content and gid</content> </sphinx:document> <sphinx:document id="5"> <gid>1</gid> <gid>2</gid> <title>test five</title> <content>newly inserted</content> </sphinx:document> </sphinx:docset>
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: ccf2553d159754da6b08936ec9999869 NativeFormatImporter: userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2008-2009, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // * Neither the name of Image Engine Design nor the names of any // other contributors to this software may be used to endorse or // promote products derived from this software without specific prior // written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ////////////////////////////////////////////////////////////////////////// #include "IECore/DataConversion.h" #include "IECore/HalfTypeTraits.h" #include "boost/mpl/and.hpp" #include "boost/mpl/not.hpp" #include "boost/mpl/or.hpp" #include "boost/type_traits/is_floating_point.hpp" #include "boost/type_traits/is_integral.hpp" #include "boost/type_traits/is_same.hpp" #include "boost/type_traits/is_signed.hpp" #include "boost/type_traits/is_unsigned.hpp" #include "boost/utility/enable_if.hpp" #include <algorithm> #include <limits.h> #include <math.h> namespace IECore { template<typename F, typename T> struct ScaledDataConversion< F, T, typename boost::enable_if< boost::is_same< F, T> >::type > : public DataConversion< F, T > { typedef ScaledDataConversion< T, F > InverseType; typedef boost::true_type IsIdentity; inline T operator()( F f ) const { return f; } InverseType inverse() const { return InverseType(); } }; template<typename F, typename T> struct ScaledDataConversion< F, T, typename boost::enable_if< boost::mpl::and_< boost::mpl::not_< boost::is_same< F, T> >, boost::mpl::and_< boost::mpl::and_< boost::is_integral<F>, boost::is_integral<T> >, boost::is_signed<T> > > >::type > : public DataConversion< F, T > { typedef ScaledDataConversion< T, F > InverseType; T operator()( F f ) const { BOOST_STATIC_ASSERT( boost::is_signed< T >::value ); float result = static_cast<float>(f) / std::numeric_limits<F>::max() * std::numeric_limits<T>::max(); return static_cast<T>( round( result ) ); } InverseType inverse() const { return InverseType(); } }; template<typename F, typename T> struct ScaledDataConversion< F, T, typename boost::enable_if< boost::mpl::and_< boost::mpl::not_< boost::is_same< F, T> >, boost::mpl::and_< boost::mpl::and_< boost::is_integral<F>, boost::is_integral<T> >, boost::is_unsigned<T> > > >::type > : public DataConversion< F, T > { T operator()( F f ) const { BOOST_STATIC_ASSERT( boost::is_unsigned< T >::value ); f = std::max<F>( f, (F)(std::numeric_limits<T>::min() ) ); float result = static_cast<float>(f) / std::numeric_limits<F>::max() * std::numeric_limits<T>::max(); return static_cast<T>( round( result ) ); } }; template<typename F, typename T> struct ScaledDataConversion< F, T, typename boost::enable_if< boost::mpl::and_< boost::mpl::not_< boost::is_same< F, T> >, boost::mpl::and_< boost::mpl::and_< boost::is_floating_point<F>, boost::is_integral<T> >, boost::is_signed<T> > > >::type > : public DataConversion< F, T > { T operator()( F f ) const { BOOST_STATIC_ASSERT( boost::is_signed< T >::value ); f = std::max<F>( f, (F)( -1.0 ) ); f = std::min<F>( f, (F)( 1.0 ) ); float result = static_cast<float>(f) * std::numeric_limits<T>::max(); return static_cast<T>( round( result ) ); } }; template<typename F, typename T> struct ScaledDataConversion< F, T, typename boost::enable_if< boost::mpl::and_< boost::mpl::not_< boost::is_same< F, T> >, boost::mpl::and_< boost::mpl::and_< boost::is_floating_point<F>, boost::is_integral<T> >, boost::is_unsigned<T> > > >::type > : public DataConversion< F, T > { T operator()( F f ) const { BOOST_STATIC_ASSERT( boost::is_unsigned< T >::value ); f = std::max<F>( f, (F)(std::numeric_limits<T>::min() ) ); f = std::min<F>( f, (F)( 1.0 ) ); float result = static_cast<float>(f) * std::numeric_limits<T>::max(); return static_cast<T>( round( result ) ); } }; template<typename F, typename T> struct ScaledDataConversion< F, T, typename boost::enable_if< boost::mpl::and_< boost::mpl::not_< boost::is_same< F, T> >, boost::mpl::and_< boost::is_integral<F>, boost::is_floating_point<T> > > >::type > : public DataConversion< F, T > { typedef ScaledDataConversion< T, F > InverseType; T operator()( F f ) const { float result = static_cast<float>(f) / std::numeric_limits<F>::max(); return static_cast<T>( result ); } InverseType inverse() const { return InverseType(); } }; template<typename F, typename T> struct ScaledDataConversion< F, T, typename boost::enable_if< boost::mpl::and_< boost::mpl::not_< boost::is_same< F, T> >, boost::mpl::and_< boost::is_floating_point<F>, boost::is_floating_point<T> > > >::type > : public DataConversion< F, T > { typedef ScaledDataConversion< T, F > InverseType; inline T operator()( F f ) const { return static_cast<T>( f ); } InverseType inverse() const { return InverseType(); } }; }
{ "pile_set_name": "Github" }
## # This file is part of WhatWeb and may be subject to # redistribution and commercial restrictions. Please see the WhatWeb # web site for more information on licensing and terms of use. # http://www.morningstarsecurity.com/research/whatweb ## # Version 0.2 # # Updated matches and version detection ## Plugin.define "Umbraco" do author "Brendan Coles <[email protected]>" # 2010-06-12 version "0.2" description "umbraco is an open source project with roots back to year 2000 even though it wasn't released as open source until 2004. - homepage: http://www.umbraco.org" # About 24,400 results for "powered by umbraco" @ 2010-06-08 # 27 results for "site powered by umbraco" @ 2010-06-08 # 17 results for "site powered by umbraco v4" @ 2010-06-08 # Dorks # dorks [ '"site powered by umbraco"' ] matches [ # GHDB Match { :ghdb=>'"powered by umbraco"', :certainty=>25 }, # Meta generator { :text=>'<meta name="generator" content="umbraco" />' }, # Powered by text { :regexp=>/Powered by[^<]*<a[\s]+href="http:\/\/[www.]*umbraco.org[^>]*>Umbraco<\/a>/i }, # Version detection # Powered by text { :version=>/powered by[^<]*<a[\s]+href="http:\/\/[www.]*umbraco.org[^>]*>umbraco v([^<]+)<\/a>/i }, # Version detection # Powered by text # 4.x { :regexp=>/powered by[^<]*<a[\s]+href="http:\/\/[www.]*umbraco.org[^>]*>umbraco v4<\/a>/i, :version=>"4.x" }, # Version detection # Meta generator { :version=>/<meta name="generator"[^>]*content="umbraco[\s]+([0-9\.]+)"/i }, ] end
{ "pile_set_name": "Github" }
<!DOCTYPE HTML> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (13.0.2) on Wed Feb 26 13:47:05 EST 2020 --> <title>oracle.kubernetes.operator.rest.resource Class Hierarchy (weblogic-kubernetes-operator 2.5.0 API)</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="dc.created" content="2020-02-26"> <meta name="description" content="tree: package: oracle.kubernetes.operator.rest.resource"> <meta name="generator" content="javadoc/PackageTreeWriter"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> <script type="text/javascript" src="../../../../../script-dir/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif]--> <script type="text/javascript" src="../../../../../script-dir/jquery-3.4.1.js"></script> <script type="text/javascript" src="../../../../../script-dir/jquery-ui.js"></script> </head> <body class="package-tree"> <script type="text/javascript">var pathtoroot = "../../../../../"; loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <header role="banner"> <nav role="navigation"> <div class="fixedNav"> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a id="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../index.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <div class="navListSearch"><label for="search">SEARCH:</label> <input type="text" id="search" value="search" disabled="disabled"> <input type="reset" id="reset" value="reset" disabled="disabled"> </div> </div> <a id="skip.navbar.top"> <!-- --> </a> <!-- ========= END OF TOP NAVBAR ========= --> </div> <div class="navPadding">&nbsp;</div> <script type="text/javascript"><!-- $('.navPadding').css('padding-top', $('.fixedNav').css("height")); //--> </script> </nav> </header> <main role="main"> <div class="header"> <h1 class="title">Hierarchy For Package oracle.kubernetes.operator.rest.resource</h1> <span class="packageHierarchyLabel">Package Hierarchies:</span> <ul class="horizontal"> <li><a href="../../../../../overview-tree.html">All Packages</a></li> </ul> </div> <div class="contentContainer"> <section class="hierarchy"> <h2 title="Class Hierarchy">Class Hierarchy</h2> <ul> <li class="circle">java.lang.Object <ul> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="BaseResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">BaseResource</span></a> <ul> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="ClusterResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">ClusterResource</span></a></li> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="ClustersResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">ClustersResource</span></a></li> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="DomainResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">DomainResource</span></a></li> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="DomainsResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">DomainsResource</span></a></li> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="ScaleClusterResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">ScaleClusterResource</span></a></li> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="SwaggerResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">SwaggerResource</span></a></li> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="VersionResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">VersionResource</span></a></li> <li class="circle">oracle.kubernetes.operator.rest.resource.<a href="VersionsResource.html" title="class in oracle.kubernetes.operator.rest.resource"><span class="typeNameLink">VersionsResource</span></a></li> </ul> </li> </ul> </li> </ul> </section> </div> </main> <footer role="contentinfo"> <nav role="navigation"> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a id="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../index.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <a id="skip.navbar.bottom"> <!-- --> </a> <!-- ======== END OF BOTTOM NAVBAR ======= --> </nav> <p class="legalCopy"><small>Copyright &#169; 2017&#x2013;2020. All rights reserved.</small></p> </footer> </body> </html>
{ "pile_set_name": "Github" }
<?php $entity = elgg_extract('entity', $vars); $entity_rows = ['type', 'subtype', 'owner_guid', 'container_guid', 'access_id', 'time_created', 'time_updated', 'last_action', 'enabled']; $entity_info = '<table class="elgg-table">'; foreach ($entity_rows as $entity_row) { $value = elgg_view('output/text', ['value' => $entity->$entity_row]); $entity_info .= '<tr>'; $entity_info .= '<td>' . $entity_row . '</td><td>' . $value . '</td>'; $entity_info .= '</tr>'; } $entity_info .= '</table>'; echo elgg_view_module('info', elgg_echo('developers:entity_explorer:info:attributes'), $entity_info);
{ "pile_set_name": "Github" }
# Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in D:\sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <title>EKB</title> <subtitle>EKB Series</subtitle> <link>http://localhost:5000/sink/atom.xml</link> <id>1234</id> <updated>2009-08-05T00:00:00Z</updated> <author> <name>Eric Gaumer</name> <email>[email protected]</email> </author> <entry> <title>Gulf Coast Underwater</title> <link>SERIES62.xml</link> <id>10293284</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Nextoons: The Nicktoons Film Festival</title> <link>SERIES62.xml</link> <id>10293285</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Champions League Classic Highlights</title> <link>SERIES62.xml</link> <id>10293286</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Play It Again FSN</title> <link>SERIES62.xml</link> <id>10293287</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>SEC Rewind</title> <link>SERIES62.xml</link> <id>10293288</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Rendimiento Límite</title> <link>SERIES62.xml</link> <id>10293289</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Scottish Soccer</title> <link>SERIES62.xml</link> <id>10293290</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Music from a Small Hall</title> <link>SERIES62.xml</link> <id>10293291</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Mix Flicks</title> <link>SERIES62.xml</link> <id>10293292</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>K9 Karma</title> <link>SERIES62.xml</link> <id>10293293</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Scottish Premier League Soccer</title> <link>SERIES62.xml</link> <id>10293294</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Dream Decoders</title> <link>SERIES62.xml</link> <id>10293295</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>American Biker</title> <link>SERIES62.xml</link> <id>10293296</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Pesca Radical</title> <link>SERIES62.xml</link> <id>10293297</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>4 Directions</title> <link>SERIES62.xml</link> <id>10293298</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>But Can They Sing?</title> <link>SERIES62.xml</link> <id>10293299</id> <updated>2009-08-13T16:43:42Z</updated> <summary>VH1 asks the question But Can They Sing when they put nine celebrities with proven talents in other areas in front of a microphone This is their chance to prove to America that they have what it takes to become a pop star Celebrity participants are actors Morgan Fairchild Joe Pantaliano Antonio Sabato Jr Michael Copon Bai Ling model Kim Alexis Carmine Gotti boxing great Larry</summary> </entry> <entry> <title>CIN Bengals</title> <link>SERIES62.xml</link> <id>10293300</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Super Agent [TV Series]</title> <link>SERIES62.xml</link> <id>10293301</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Nine sports agents compete to be selected as agent for USC All American defensive lineman Shaun Cody One agent will be eliminated in each episode as they fail to make it through the tasks assigned them to Cody s satisfaction</summary> </entry> <entry> <title>Glory Boys</title> <link>SERIES62.xml</link> <id>10293302</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Battle in the Atlantic</title> <link>SERIES62.xml</link> <id>10293303</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>La Mafia</title> <link>SERIES62.xml</link> <id>10293304</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>BUF Bills</title> <link>SERIES62.xml</link> <id>10293305</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>CHI Bears</title> <link>SERIES62.xml</link> <id>10293306</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>CAR Panthers</title> <link>SERIES62.xml</link> <id>10293307</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>College Sailing</title> <link>SERIES62.xml</link> <id>10293308</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Natalie Gulbis Show</title> <link>SERIES62.xml</link> <id>10293309</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Geldof in Africa</title> <link>SERIES62.xml</link> <id>10293310</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>ATL Falcons</title> <link>SERIES62.xml</link> <id>10293311</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>BAL Ravens</title> <link>SERIES62.xml</link> <id>10293312</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Financing Your Future III</title> <link>SERIES62.xml</link> <id>10293313</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>2005 IWLC</title> <link>SERIES62.xml</link> <id>10293314</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Imprescindibles</title> <link>SERIES62.xml</link> <id>10293315</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Les Rois maudits</title> <link>SERIES62.xml</link> <id>10293316</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Asian Angels</title> <link>SERIES62.xml</link> <id>10293317</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Fresh Baked Videogames</title> <link>SERIES62.xml</link> <id>10293318</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Pac-10 College Hoops</title> <link>SERIES62.xml</link> <id>10293319</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Unknown Civil War</title> <link>SERIES62.xml</link> <id>10293320</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Made You Look: Top 25 Moments of BET</title> <link>SERIES62.xml</link> <id>10293321</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Encuentros Peligrosos</title> <link>SERIES62.xml</link> <id>10293322</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Cheer Squad</title> <link>SERIES62.xml</link> <id>10293323</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>College Hoops</title> <link>SERIES62.xml</link> <id>10293324</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Connection Special</title> <link>SERIES62.xml</link> <id>10293325</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Weather Channel Top 10</title> <link>SERIES62.xml</link> <id>10293326</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Bo & Hope Through the Years</title> <link>SERIES62.xml</link> <id>10293327</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Best Ranger 2006</title> <link>SERIES62.xml</link> <id>10293328</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Bell City Chase 2005</title> <link>SERIES62.xml</link> <id>10293329</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Creativity and Innovation</title> <link>SERIES62.xml</link> <id>10293330</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Folktales From Japan</title> <link>SERIES62.xml</link> <id>10293331</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Medical Matter Hotline</title> <link>SERIES62.xml</link> <id>10293332</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Ancient Marvels</title> <link>SERIES62.xml</link> <id>10293333</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Revelaciones</title> <link>SERIES62.xml</link> <id>10293334</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Media Meet</title> <link>SERIES62.xml</link> <id>10293335</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Ciudad de Ayer y de Hoy</title> <link>SERIES62.xml</link> <id>10293336</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Coca-Cola League Two Soccer</title> <link>SERIES62.xml</link> <id>10293337</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Beyond Boundaries</title> <link>SERIES62.xml</link> <id>10293339</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>TB Buccaneers</title> <link>SERIES62.xml</link> <id>10293340</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The 1st Amendment Stand-Up</title> <link>SERIES62.xml</link> <id>10293341</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Stunt Junkies: Go Big or Go Home</title> <link>SERIES62.xml</link> <id>10293342</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Teen Angels</title> <link>SERIES62.xml</link> <id>10293344</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>24 heures à Istanbul</title> <link>SERIES62.xml</link> <id>10293345</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Megamudanzas</title> <link>SERIES62.xml</link> <id>10293346</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Robinsons [TV Series]</title> <link>SERIES62.xml</link> <id>10293347</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Ed Robinson The Office s Martin Freeman works in re insurance until his colleague and secret lover is promoted and fires him He realises that re insurance is not where his passions lie and after being asked Tell us about yourself and being unable to come up with an answer Well I m medium height brown hair decides to reasses his life Ed s sister Victoria Abigail</summary> </entry> <entry> <title>Super 14 Rugby</title> <link>SERIES62.xml</link> <id>10293348</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>V-Twin Motorcycle TV</title> <link>SERIES62.xml</link> <id>10293349</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Spotlighting the great custom motorcycle builders of the world.</summary> </entry> <entry> <title>Man vs. Vegas</title> <link>SERIES62.xml</link> <id>10293350</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Broadway: El Musical Americano</title> <link>SERIES62.xml</link> <id>10293351</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Auto Primer</title> <link>SERIES62.xml</link> <id>10293352</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>TCL Classic Highlights</title> <link>SERIES62.xml</link> <id>10293353</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>DEN Broncos</title> <link>SERIES62.xml</link> <id>10293354</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>DET Lions</title> <link>SERIES62.xml</link> <id>10293355</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Frog Stories From Mercer Mayer</title> <link>SERIES62.xml</link> <id>10293356</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Discovering Wild Canada</title> <link>SERIES62.xml</link> <id>10293357</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>American Revolutions</title> <link>SERIES62.xml</link> <id>10293358</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Documentaries about subjects relating to the culture surrounding country music.</summary> </entry> <entry> <title>Wild on Tara</title> <link>SERIES62.xml</link> <id>10293359</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Milan en Europa</title> <link>SERIES62.xml</link> <id>10293360</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Maximum Disclosure</title> <link>SERIES62.xml</link> <id>10293361</id> <updated>2009-08-13T16:43:42Z</updated> <summary>TLC brings six people with similar life experiences from different socioeconomic race and gender backgrounds together for a revealing group discussion to expose and explore an important issue or a unique lifestyle Some topics discussed are moms on meth anorexics and bulimics and cheaters to name a few NBC journalist Alison Stewart leads the discussions and asks the hard questions</summary> </entry> <entry> <title>Día Mundial de la Juventud 2005</title> <link>SERIES62.xml</link> <id>10293362</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Scandinavian TPC Highlights</title> <link>SERIES62.xml</link> <id>10293363</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Stoke by Nayland Open Highlights</title> <link>SERIES62.xml</link> <id>10293364</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Soul Deep: La Historia de la Música Negra</title> <link>SERIES62.xml</link> <id>10293365</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Pasaporte a Europa con Samantha Brown</title> <link>SERIES62.xml</link> <id>10293366</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Motocross Files</title> <link>SERIES62.xml</link> <id>10293367</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Global Villager</title> <link>SERIES62.xml</link> <id>10293368</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>From Junky to Funky</title> <link>SERIES62.xml</link> <id>10293369</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Other people's trash is turned into treasures.</summary> </entry> <entry> <title>Behind the Design of HGTV's Dream Home 2006</title> <link>SERIES62.xml</link> <id>10293370</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>You: The Owner's Manual With Dr. Mehmet Oz</title> <link>SERIES62.xml</link> <id>10293371</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>L'histoire à table</title> <link>SERIES62.xml</link> <id>10293372</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Grandes Complots de la Modernidad</title> <link>SERIES62.xml</link> <id>10293373</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>UR Fave 50.05</title> <link>SERIES62.xml</link> <id>10293374</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Fútbol Liga de UEFA Champions</title> <link>SERIES62.xml</link> <id>10293375</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Promenades d'architectes</title> <link>SERIES62.xml</link> <id>10293376</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Animal Planet Heroes Phoenix</title> <link>SERIES62.xml</link> <id>10293377</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Short Takes</title> <link>SERIES62.xml</link> <id>10293378</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Ultimate Plastic Surgery: Before & After</title> <link>SERIES62.xml</link> <id>10293379</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Clásicos de Milan</title> <link>SERIES62.xml</link> <id>10293380</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Volvo China Open Highlights</title> <link>SERIES62.xml</link> <id>10293381</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Case Crackers</title> <link>SERIES62.xml</link> <id>10293382</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Case Crackers features some of the world s best sleuths who implement the latest technology to catch tough criminals Each episode features a dramatic re enactment of the crime and then follows the forensic experts as they unravel the crime clue by clue</summary> </entry> <entry> <title>National Science Education Standards</title> <link>SERIES62.xml</link> <id>10293383</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>NH Outlook Special</title> <link>SERIES62.xml</link> <id>10293384</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Mega-Weather</title> <link>SERIES62.xml</link> <id>10293385</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Parco P.I.</title> <link>SERIES62.xml</link> <id>10293386</id> <updated>2009-08-13T16:43:42Z</updated> <summary>This is a show about a real private investigator Vinny Parco who operates Intercontinental Investigations in New York City In addition to his wife and three children who help with the business he has the assistance of a group of women who go undercover called Parco s Angels Vinny is also the author of 3 books in the field</summary> </entry> <entry> <title>HARDtalk in Africa</title> <link>SERIES62.xml</link> <id>10293387</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Starved [TV Series]</title> <link>SERIES62.xml</link> <id>10293388</id> <updated>2009-08-13T16:43:42Z</updated> <summary>In keeping with its policy of serving up TV fare unlike anything else ever seen on any other network, cable or otherwise, the {@FX} network unveiled {#Starved}, the world's first {\sitcom} about eating disorders, on August 4, 2005. The series was created by {$Eric Schaeffer}, a seasoned TV writer and real-life anorexic. {$Schaeffer} cast himself as {%Sam}, a commodities broker suffering not only from anorexia but also compulsive-eating syndrome (his addiction to chocolate had reached ridiculously monumental dimensions), who regularly attended meetings of an eating-disorder support group, the Belttighteners. The remaining cast members likewise carried over their genuine eating problems to the characters they portrayed: {$Laura Benanti} was {%Billie}, an anorexic-bulimic, bisexual aspiring singer, whom {%Sam} alternately despised and adored; {$Sterling K. Brown} was {%Adam}, a NYPD cop whose chronic bulimia had led him to commit minor crimes to feed his ailment; and {$Del Pentecost} was {%Dan}, a writer and overeater who always managed to find an excuse to put off his much-needed gastric bypass surgery. In the tradition of {#Seinfeld}, the four main characters were not terribly likeable or admirable, but all were eminently watchable. Although {#Starved} was positively reviewed in most trade papers, it did not meet with the approval of the National Eating Disorders Association, who disdained the show as "no laughing matter." Ironically sponsored by several prominent fast-food chains, {#Starved} first aired in tandem with another cutting-edge {@FX} {\sitcom}, {#It's Always Sunny in Philadelphia}. ~ Hal Erickson, All Movie Guide</summary> </entry> <entry> <title>America in the Forties: A Sentimental Journey</title> <link>SERIES62.xml</link> <id>10293389</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Breaking Bonaduce [TV Series]</title> <link>SERIES62.xml</link> <id>10293390</id> <updated>2009-08-13T16:43:42Z</updated> <summary>VH1 takes you on an inside tour of the unconventional relationship between former child TV star Danny Bonaduce and his wife Gretchen Follow the couple as they seek help from Dr Garry Corgiatt through couples therapy Dr Garry will challenge the couple to tackle their mountain of issues including Danny s infidelity addiction and celebrity Danny and Gretchen tied the knot after knowing</summary> </entry> <entry> <title>Animales de Brasil</title> <link>SERIES62.xml</link> <id>10293391</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Legs on the Med</title> <link>SERIES62.xml</link> <id>10293392</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>HGTV Presents: Your Ultimate Home</title> <link>SERIES62.xml</link> <id>10293393</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The F...ing Fulfords</title> <link>SERIES62.xml</link> <id>10293394</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>New Zealand NPC Rugby</title> <link>SERIES62.xml</link> <id>10293395</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Alaska!</title> <link>SERIES62.xml</link> <id>10293396</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Five Takes (Europe)</title> <link>SERIES62.xml</link> <id>10293397</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Women's Rugby</title> <link>SERIES62.xml</link> <id>10293398</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>College Track and Field</title> <link>SERIES62.xml</link> <id>10293399</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Race Car Driver</title> <link>SERIES62.xml</link> <id>10293400</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Science of the Bible [TV Documentary Series]</title> <link>SERIES62.xml</link> <id>10293401</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Book TV: Harlem Book Fair</title> <link>SERIES62.xml</link> <id>10293402</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Women's College Gymnastics</title> <link>SERIES62.xml</link> <id>10293403</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The 10th China National Games</title> <link>SERIES62.xml</link> <id>10293404</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Beach Girls</title> <link>SERIES62.xml</link> <id>10293405</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Three teenage girls take a vow of eternal friendship during the summer of 1985 in the beachside community of Hubbard's Point. Years later, after one of the women has passed away, her widower (Lowe) returns to the beach town with his teenage daughter (Hobbs), both seeking a connection to her life.</summary> </entry> <entry> <title>TV Land Confidential</title> <link>SERIES62.xml</link> <id>10293406</id> <updated>2009-08-13T16:43:42Z</updated> <summary>TV Land Confidential digs in deep to bring you the inside scoop on what really went on behind the scenes in some of your favorite shows Learn about love on the set health problems that altered the direction of a show unaired pilots and casting choices that never happened TV Land Confidential brings you the stories from the stars the producers and the network executives who have the</summary> </entry> <entry> <title>Remixed</title> <link>SERIES62.xml</link> <id>10293407</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Margot</title> <link>SERIES62.xml</link> <id>10293408</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Bring Home the Exotic</title> <link>SERIES62.xml</link> <id>10293409</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Fieras de Ingenieria</title> <link>SERIES62.xml</link> <id>10293410</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>King of Vegas</title> <link>SERIES62.xml</link> <id>10293411</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Chicago Medical</title> <link>SERIES62.xml</link> <id>10293412</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Persiguiendo la Fe</title> <link>SERIES62.xml</link> <id>10293413</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Eye on Policing</title> <link>SERIES62.xml</link> <id>10293414</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Nassau Legislature</title> <link>SERIES62.xml</link> <id>10293415</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Women Behind Bars</title> <link>SERIES62.xml</link> <id>10293416</id> <updated>2009-08-13T16:43:42Z</updated> <summary>A series profiling imprisoned women who have been convicted of murder.</summary> </entry> <entry> <title>Speed Grapher</title> <link>SERIES62.xml</link> <id>10293417</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Anime about a former war photographer who infiltrates a secret pleasure-club for Tokyo's elite.</summary> </entry> <entry> <title>The Bachelor: London Calling</title> <link>SERIES62.xml</link> <id>10293418</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>College Rugby</title> <link>SERIES62.xml</link> <id>10293419</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Big Ten Spring Football</title> <link>SERIES62.xml</link> <id>10293420</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Carefree Gardener</title> <link>SERIES62.xml</link> <id>10293421</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Naked Earth</title> <link>SERIES62.xml</link> <id>10293422</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Qui and Ey</title> <link>SERIES62.xml</link> <id>10293423</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Writer's Block</title> <link>SERIES62.xml</link> <id>10293424</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Country Fried Planet</title> <link>SERIES62.xml</link> <id>10293425</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Shape of the Future</title> <link>SERIES62.xml</link> <id>10293426</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>America's Prom Queen</title> <link>SERIES62.xml</link> <id>10293427</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Historia Secreta</title> <link>SERIES62.xml</link> <id>10293428</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Iowa Journal</title> <link>SERIES62.xml</link> <id>10293429</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Issues of interest to Iowa residents are examined.</summary> </entry> <entry> <title>Enchantments: Discover New Mexico</title> <link>SERIES62.xml</link> <id>10293430</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>FFA</title> <link>SERIES62.xml</link> <id>10293431</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Sarah Jane Adventures [TV Series]</title> <link>SERIES62.xml</link> <id>10293432</id> <updated>2009-08-13T16:43:42Z</updated> <summary>In this {@BBC} {\science fiction} series - a spinoff of the long-running {#Doctor Who} - {%Sarah Jane Smith} ({$Elisabeth Sladen}), a companion of the third and fourth incarnations of {%Doctor Who} (from the original series, not the 2005 revival) sets off on a series of fantastic missions that include saving the world from evil alien takeovers, and helping lost extraterrestrials find their way home from time to time. She is aided in her missions by a team of young assistants including {%Luke Smith} ({$Tommy Knight}) and {%Maria Jackson} ({$Yasmin Paige} of {#Ballet Shoes}). ~ Nathan Southern, All Movie Guide</summary> </entry> <entry> <title>El Futuro del Petr¿leo, Debate de los Mexicanos</title> <link>SERIES62.xml</link> <id>10293433</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Ganges: River of Life</title> <link>SERIES62.xml</link> <id>10293434</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Pokemon: DP Battle Dimension</title> <link>SERIES62.xml</link> <id>10293435</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Latitudes & Attitudes</title> <link>SERIES62.xml</link> <id>10293436</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The International Dancesport World Championships 2007</title> <link>SERIES62.xml</link> <id>10293437</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>PWBA Bowling</title> <link>SERIES62.xml</link> <id>10293438</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Great Canadian Lakes</title> <link>SERIES62.xml</link> <id>10293439</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Real Housewives of New York City [TV Series]</title> <link>SERIES62.xml</link> <id>10293440</id> <updated>2009-08-13T16:43:42Z</updated> <summary>This reality show follows the melodrama that takes place within a social circle of Manhattan women whose husbands have tremendous wealth. Many of the socialites are in fact, not housewives at all and manage careers of their own, but all of them are married to millionaires, placing them in an elite and sometimes isolated culture within the city. ~ Cammila Albertson, All Movie Guide</summary> </entry> <entry> <title>Myles of Style</title> <link>SERIES62.xml</link> <id>10293441</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Crime 360</title> <link>SERIES62.xml</link> <id>10293442</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Crime 360 is a show utilizing high tech CGI graphics to examine non fiction real time crime drama Viewers are brought along for the ride as the theories forensics and evidence of a case are brought to life through incredible CGI visualizations and state of the art 3D photography Viewers experience the investigation as if they were there right from the moment detectives are called to the</summary> </entry> <entry> <title>North Carolina Gubernatorial Forum</title> <link>SERIES62.xml</link> <id>10293443</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Run That by Me Again</title> <link>SERIES62.xml</link> <id>10293444</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Life in Cold Blood</title> <link>SERIES62.xml</link> <id>10293445</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Explorando el Mundo Salvaje</title> <link>SERIES62.xml</link> <id>10293446</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Date My House</title> <link>SERIES62.xml</link> <id>10293447</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>ME Live! From Austin</title> <link>SERIES62.xml</link> <id>10293448</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Music concert series.</summary> </entry> <entry> <title>Ch¿re Betty</title> <link>SERIES62.xml</link> <id>10293449</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>DEA</title> <link>SERIES62.xml</link> <id>10293450</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Big, Bigger, Biggest</title> <link>SERIES62.xml</link> <id>10293451</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Crook & Chase</title> <link>SERIES62.xml</link> <id>10293452</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Country music performances and interviews.</summary> </entry> <entry> <title>Indoors Out</title> <link>SERIES62.xml</link> <id>10293453</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Yard Crashers</title> <link>SERIES62.xml</link> <id>10293454</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Projects for the yard.</summary> </entry> <entry> <title>Tracey Ullman's State of the Union [TV Series]</title> <link>SERIES62.xml</link> <id>10293455</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Wa$ted</title> <link>SERIES62.xml</link> <id>10293456</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Woodworking</title> <link>SERIES62.xml</link> <id>10293457</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>High School Confidential</title> <link>SERIES62.xml</link> <id>10293458</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>America the Wright Way</title> <link>SERIES62.xml</link> <id>10293459</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>State Parole</title> <link>SERIES62.xml</link> <id>10293460</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Parole officers are shadowed in this reality series.</summary> </entry> <entry> <title>Battle of the Brains</title> <link>SERIES62.xml</link> <id>10293461</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>I Survived</title> <link>SERIES62.xml</link> <id>10293462</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>ReelzChannel Spotlight</title> <link>SERIES62.xml</link> <id>10293463</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>AMA Supercross Racing</title> <link>SERIES62.xml</link> <id>10293464</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Miss Rap Supreme</title> <link>SERIES62.xml</link> <id>10293465</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>YO! MTV Hits</title> <link>SERIES62.xml</link> <id>10293466</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>T.O.P. Army Fighter</title> <link>SERIES62.xml</link> <id>10293467</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Salvando las Especies en Peligro</title> <link>SERIES62.xml</link> <id>10293468</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Perfiles de varias especies amenazadas con la extinci�n.</summary> </entry> <entry> <title>Cooking for Real</title> <link>SERIES62.xml</link> <id>10293469</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Affordable and accessible ingredients are featured in this cooking series that incorporates diverse influences into classic comfort foods.</summary> </entry> <entry> <title>Global Voices</title> <link>SERIES62.xml</link> <id>10293470</id> <updated>2009-08-13T16:43:42Z</updated> <summary>International independent documentary series.</summary> </entry> <entry> <title>Unnatural Causes: Is Inequality Making Us Sick?</title> <link>SERIES62.xml</link> <id>10293471</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Socio-economic and racial inequalities in health.</summary> </entry> <entry> <title>The All-for-Nots</title> <link>SERIES62.xml</link> <id>10293472</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Following the indie pop-rock band as they tour America.</summary> </entry> <entry> <title>Beijing, Are You Ready?</title> <link>SERIES62.xml</link> <id>10293473</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Beijing, China, prepares for the 2008 Olympic Games.</summary> </entry> <entry> <title>National Arenacross Series Racing</title> <link>SERIES62.xml</link> <id>10293474</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Deion & Pilar: Prime Time Love</title> <link>SERIES62.xml</link> <id>10293475</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Historias del Cuerpo</title> <link>SERIES62.xml</link> <id>10293476</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>GAC Drafting Partners</title> <link>SERIES62.xml</link> <id>10293477</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Fitness Show</title> <link>SERIES62.xml</link> <id>10293478</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Fitness and healthy lifestyle program hosted by Colin Hoobler.</summary> </entry> <entry> <title>Starz Exclusive</title> <link>SERIES62.xml</link> <id>10293479</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>The Big 4-0</title> <link>SERIES62.xml</link> <id>10293480</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Take a look at some real life 40th birthday bashes that run the gamut from touching to over the top</summary> </entry> <entry> <title>Planeta Finito</title> <link>SERIES62.xml</link> <id>10293481</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Las ciudades m�s interesantes del mundo.</summary> </entry> <entry> <title>Traves¿as Asombrosas</title> <link>SERIES62.xml</link> <id>10293482</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Vietnamese American Journey</title> <link>SERIES62.xml</link> <id>10293483</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry> <entry> <title>Deliver Me</title> <link>SERIES62.xml</link> <id>10293484</id> <updated>2009-08-13T16:43:42Z</updated> <summary>Following the lives of three OB-GYNs who are also busy mothers juggling demands of their careers while raising young children.</summary> </entry> <entry> <title>Sound Check at Momo's</title> <link>SERIES62.xml</link> <id>10293485</id> <updated>2009-08-13T16:43:42Z</updated> <summary>No Description</summary> </entry></feed>
{ "pile_set_name": "Github" }
<Node name="FEM" processor="0"> <EulerImplicitSolver rayleighStiffness="0.01" rayleighMass="0.1" /> <ParallelCGLinearSolver iterations="25" threshold="0.00000001" /> <SparseGridTopology name="sparse" n="6 6 6" filename="file"/> <MechanicalObject dx="0" dy="0" dz="0" rx="0" ry="0" rz="0" scale="1.0" template="CudaVec3f"/> <UniformMass totalmass="5" /> <TetrahedronFEMForceField name="FEM" youngModulus="5000" poissonRatio="0.3" method="large"/> <Node name="VisualNode"> <MeshLoader name="loader" filename="file" /> <MeshTopology src="@loader"/> <MappedObject name="Mapped" template="CudaVec3f" /> <CudaVisualModel computeNormals="true" template="CudaVec3f" name="Visual" diffuse="0.8 0.8 0.8 1.0" /> <BarycentricMapping input="@.." output="@Mapped" /> </Node> <Node name="CollisionNode"> <SparseGridTopology name="sparse" n="6 6 6" filename="file"/> <MechanicalObject /> <SphereCollisionModel /> <BarycentricMapping /> </Node> </Node>
{ "pile_set_name": "Github" }
/* Copyright Rene Rivera 2013-2015 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_PREDEF_ARCHITECTURE_BLACKFIN_H #define BOOST_PREDEF_ARCHITECTURE_BLACKFIN_H #include <boost/predef/version_number.h> #include <boost/predef/make.h> /*` [heading `BOOST_ARCH_BLACKFIN`] Blackfin Processors from Analog Devices. [table [[__predef_symbol__] [__predef_version__]] [[`__bfin__`] [__predef_detection__]] [[`__BFIN__`] [__predef_detection__]] [[`bfin`] [__predef_detection__]] [[`BFIN`] [__predef_detection__]] ] */ #define BOOST_ARCH_BLACKFIN BOOST_VERSION_NUMBER_NOT_AVAILABLE #if defined(__bfin__) || defined(__BFIN__) || \ defined(bfin) || defined(BFIN) # undef BOOST_ARCH_BLACKFIN # define BOOST_ARCH_BLACKFIN BOOST_VERSION_NUMBER_AVAILABLE #endif #if BOOST_ARCH_BLACKFIN # define BOOST_ARCH_BLACKFIN_AVAILABLE #endif #define BOOST_ARCH_BLACKFIN_NAME "Blackfin" #endif #include <boost/predef/detail/test.h> BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_BLACKFIN,BOOST_ARCH_BLACKFIN_NAME)
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- from django.apps import apps from django.db import migrations, models from django.db.models import F def copy_field(apps, schema_editor): CertificateGenerationCourseSetting = apps.get_model('certificates', 'CertificateGenerationCourseSetting') CertificateGenerationCourseSetting.objects.all().update(self_generation_enabled=F('enabled')) def undo_copy(apps, schema_editor): CertificateGenerationCourseSetting = apps.get_model('certificates', 'CertificateGenerationCourseSetting') CertificateGenerationCourseSetting.objects.all().update(enabled=F('self_generation_enabled')) class Migration(migrations.Migration): """ Adds new field 'language_specific_templates_enabled'. Also adds field 'self_generation_enabled' which is a replacement for 'enabled' Lastly, copies data from 'enabled' to 'self_generation_enabled' """ dependencies = [ ('certificates', '0008_schema__remove_badges'), ] operations = [ migrations.AddField( model_name='certificategenerationcoursesetting', name='language_specific_templates_enabled', field=models.BooleanField(default=False, help_text="Render translated certificates rather than using the platform's default language. Available translations are controlled by the certificate template."), ), migrations.AddField( model_name='certificategenerationcoursesetting', name='self_generation_enabled', field=models.BooleanField(default=False, help_text='Allow students to generate their own certificates for the course. Enabling this does NOT affect usage of the management command used for batch certificate generation.'), ), migrations.AlterField( model_name='certificategenerationcoursesetting', name='enabled', field=models.BooleanField(default=False, help_text='DEPRECATED, please use self_generation_enabled instead.'), ), migrations.RunPython(copy_field, reverse_code=undo_copy), ]
{ "pile_set_name": "Github" }
<nav class="navbar navbar-inverse navbar-static-top"> <div id="navbar-container" class="container-fluid"> <div id="navbar-top" class="row navbar-collapse collapse"> <ul class="nav navbar-nav"> <li><a href="//puppet.com" class="home">Accueil</a></li> <li><a href="//forge.puppet.com" class="offsite forge">Forge</a></li> <li><a href="//puppet.com/puppetconf" class="offsite">PuppetConf</a></li> <li class="active"><a href="/" class="offsite docs">Documents</a></li> <li><a href="//learn.puppet.com" class="offsite learn">Apprentissage</a></li> <li class="navbar-gap"><a href="/download/">Téléchargez les docs</a></li> <li><a href="//puppet.com/support">Support &amp; services</a></li> <li><a href="//puppet.com/contact">Nous contacter</a></li> </ul> </div><!--/.nav-collapse --> <div id="navbar-bottom" class="row"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a id="navbar-logo" class="navbar-brand" href="//puppet.com"><img src="/images/puppet-logo/puppet-logo-amber-white-lg.png" alt="Puppet"></a> </div> <div class="navbar-header hidden-xs"> <a id="navbar-site-name" class="navbar-brand" href="/">Documents</a> </div> <form class="navbar-form navbar-right navbar-collapse collapse" role="search"> <div class="form-group"> <input type="text" class="form-control" id="search-container" placeholder="Search..."> <img class="search-white" id="search-icon" src="/images/puppet-icons/search-white-2.svg" alt="Search"> </div> </form> </div> </div> </nav>
{ "pile_set_name": "Github" }
--- title: Setup weight: 200 ---
{ "pile_set_name": "Github" }
/* Generated by ts-generator ver. 0.0.8 */ /* tslint:disable */ import { Contract, Signer } from "ethers"; import { Provider } from "@ethersproject/providers"; import { DataTypesPure } from "./DataTypesPure"; export class DataTypesPureFactory { static connect( address: string, signerOrProvider: Signer | Provider ): DataTypesPure { return new Contract(address, _abi, signerOrProvider) as DataTypesPure; } } const _abi = [ { inputs: [], name: "pure_address", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_bool", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_bytes", outputs: [ { internalType: "bytes", name: "", type: "bytes" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_bytes1", outputs: [ { internalType: "bytes1", name: "", type: "bytes1" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_enum", outputs: [ { internalType: "enum DataTypesPure.Enum1", name: "", type: "uint8" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_int256", outputs: [ { internalType: "int256", name: "", type: "int256" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_int8", outputs: [ { internalType: "int8", name: "", type: "int8" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_named", outputs: [ { internalType: "uint256", name: "uint256_1", type: "uint256" }, { internalType: "uint256", name: "uint256_2", type: "uint256" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_stat_array", outputs: [ { internalType: "uint8[3]", name: "", type: "uint8[3]" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_string", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_struct", outputs: [ { components: [ { internalType: "uint256", name: "uint256_0", type: "uint256" }, { internalType: "uint256", name: "uint256_1", type: "uint256" } ], internalType: "struct DataTypesPure.Struct1", name: "", type: "tuple" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_tuple", outputs: [ { internalType: "uint256", name: "", type: "uint256" }, { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_uint256", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "pure", type: "function" }, { inputs: [], name: "pure_uint8", outputs: [ { internalType: "uint8", name: "", type: "uint8" } ], stateMutability: "pure", type: "function" } ];
{ "pile_set_name": "Github" }
***Contribute to Cosmetic Transparency*** - Open Beauty Facts is a cosmetic products database made by everyone, for everyone. - You can use it to make better cosmetic choices, and as it is open data, anyone can re-use it for any purpose. - Open Beauty Facts is a non-profit project developed by thousands of volunteers from around the world. We have lots of exciting projects you can contribute to in many different ways. - You can start contributing today by adding a product from your cosmetic cupboard. *** Get the Facts *** - Cosmetics additives, F.I.L. codes, CI-numbers, INCI (International Nomenclature of Cosmetic Ingredients), ingredient list, allergens, packaging codes... - Open Beauty Facts helps you to make sense of the fine print on products labels. - You don't need to be a chemist and learn latin anymore to decypher an ingredient list :-) - You can scan: aftershaves, body lotions, creams, deodorant, eyeliner, foundation, fragrance, lipstick, makeup, mask, perfume, shampoo, soap, shower gel, nail polish and much more… - We think it can be useful for people with skin conditions like acne, psoriasis, eczema… to make better cosmetic choices. *** Works well in any condition *** - You can add new products, even if you don't have an Internet connection right now. - The app loads only the strict necessary to reduce data and battery consumption - You don't need a camera to look up a product. You can also type the barcode if you lack a camera or have an issue with it. *** Your cosmetics, your data *** - Your data is yours, and is never sent online - You can use the app anonymously - You can export your scan history Note: Open Beauty Facts is being built, the site and the application are based on Open Food Facts and changes will be made to take into account the specificities of cosmetics. Open Beauty Facts is also available on the web at https://world.openbeautyfacts.org Questions, feedback : [email protected] For human food, you can install Open Food Facts, for pet food, Open Pet Food Facts, and for all other products, Open Products Facts.
{ "pile_set_name": "Github" }
{ "title": "cpt templet for specify pdf template", "description": "three information requirements for users", "properties" : { "name": { "type": "string", "description": "the name of certificate owner" }, "date": { "type": "string", "description": "the date of issue" }, "issuer": { "type": "string", "description": "the issuer" } }, "required": ["name", "date", "issuer"] }
{ "pile_set_name": "Github" }
SET GLOBAL innodb_file_per_table = 1; SELECT @@innodb_file_per_table; @@innodb_file_per_table 1 SET GLOBAL innodb_file_format = `Barracuda`; SELECT @@innodb_file_format; @@innodb_file_format Barracuda set global innodb_large_prefix=1; SELECT @@innodb_large_prefix; @@innodb_large_prefix 1 DROP DATABASE IF EXISTS testdb_wl6445; CREATE DATABASE testdb_wl6445; case # 1 SET GLOBAL innodb_file_per_table = 1; SET GLOBAL innodb_file_format = `Barracuda`; USE testdb_wl6445; CREATE TABLE t1 ( i int PRIMARY KEY , j blob) ENGINE = InnoDB; INSERT INTO t1 VALUES (1,repeat('a',200)),(2,repeat('b',200)),(3,repeat('c',200)); SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc USE testdb_wl6445; SELECT i FROM t1 ORDER BY i; i 1 2 3 INSERT INTO t1 VALUES (11,repeat('a',200)),(12,repeat('b',200)),(13,repeat('c',200)); ERROR HY000: Can't lock file (errno: 165 - Table is read only) SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc INSERT INTO t1 VALUES (11,repeat('a',200)),(12,repeat('b',200)),(13,repeat('c',200)); ERROR HY000: Can't lock file (errno: 165 - Table is read only) SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc CREATE TABLE t2 ( i int , j blob) ENGINE = Innodb; ERROR HY000: InnoDB is in read only mode. UPDATE t1 SET i = i+1; ERROR HY000: Can't lock file (errno: 165 - Table is read only) FLUSH STATUS; FLUSH LOGS; FLUSH TABLES t1; FLUSH TABLES WITH READ LOCK; UNLOCK TABLES; DROP DATABASE IF EXISTS testdb_wl6445; case # 2 DROP DATABASE IF EXISTS testdb_wl6445; CREATE DATABASE testdb_wl6445; USE testdb_wl6445; CREATE TABLE t1 ( i int PRIMARY KEY , j blob) ENGINE = InnoDB; INSERT INTO t1 VALUES (1,repeat('a',200)),(2,repeat('b',200)),(3,repeat('c',200)); SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc CREATE TABLE t2 ( i int PRIMARY KEY , j blob) ENGINE = InnoDB; INSERT INTO t2 VALUES (1,repeat('a',200)),(2,repeat('b',200)),(3,repeat('c',200)); SELECT i,LEFT(j,20) FROM t2 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc UPDATE t2 SET i = i + 10; SELECT i,LEFT(j,20) FROM t2 ORDER BY i; i LEFT(j,20) 11 aaaaaaaaaaaaaaaaaaaa 12 bbbbbbbbbbbbbbbbbbbb 13 cccccccccccccccccccc DELETE FROM t2; SELECT i,LEFT(j,20) FROM t2 ORDER BY i; i LEFT(j,20) USE testdb_wl6445; SELECT i FROM t1 ORDER BY i; i 1 2 3 SELECT i FROM t2 ORDER BY i; i INSERT INTO t1 VALUES (11,repeat('a',200)),(12,repeat('b',200)),(13,repeat('c',200)); ERROR HY000: Can't lock file (errno: 165 - Table is read only) SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc INSERT INTO t1 VALUES (11,repeat('a',200)),(12,repeat('b',200)),(13,repeat('c',200)); ERROR HY000: Can't lock file (errno: 165 - Table is read only) SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc CREATE TABLE t2 ( i int , j blob) ENGINE = Innodb; ERROR 42S01: Table 't2' already exists CREATE TABLE t3 ( i int , j blob) ENGINE = Innodb; ERROR HY000: InnoDB is in read only mode. UPDATE t1 SET i = i+1; ERROR HY000: Can't lock file (errno: 165 - Table is read only) FLUSH STATUS; FLUSH LOGS; FLUSH TABLES t1,t2; FLUSH TABLES WITH READ LOCK; UNLOCK TABLES; case # 3 # Try to restart the server without --innodb-read-only after removing # write permissions of system tablespace. Server should not start. # This confirms server is not automatically started in read-only mode. USE testdb_wl6445; DROP DATABASE testdb_wl6445; SET GLOBAL INNODB_FILE_FORMAT=Antelope; SET GLOBAL INNODB_FILE_PER_TABLE=1; SET GLOBAL innodb_large_prefix = 0;
{ "pile_set_name": "Github" }
#Skewness 3 library(e1071) data(airquality) ozone <- airquality$Ozone ozone <- ozone[!is.na(ozone)] hist(ozone, col = "tomato") skewness(ozone)
{ "pile_set_name": "Github" }
#!/bin/sh # SPDX-License-Identifier: BSD-2-Clause # X-SPDX-Copyright-Text: (c) Solarflare Communications Inc me=$(basename "$0") bin=$(cd "$(dirname "$0")" && /bin/pwd) zf_usage_msg() { echo echo "usage:" echo " $me [options] <command> <command-args>" echo echo "options:" echo " -l --loglevel -- set mask of logging levels" echo " -h --help -- print this usage message" echo } zf_usage_error() { zf_usage_msg >&2 exit 1 } add_attr() { if [ -n "$ZF_ATTR" ]; then ZF_ATTR="$ZF_ATTR;$1" else ZF_ATTR="$1" fi export ZF_ATTR } while [ $# -gt 0 ]; do case "$1" in -h|--help) zf_usage_msg exit 0 ;; -l|--loglevel) shift add_attr log_level="$1" ;; --loglevel=*) add_attr log_level="${1#--loglevel=}" ;; -l*) add_attr log_level="${1#-l}" ;; -*) zf_usage_error ;; *) break ;; esac shift done [ $# -gt 0 ] || zf_usage_error dir="/usr/lib64/zf/debug:/usr/lib/zf/debug:/usr/lib/x86_64-linux-gnu/zf/debug" if [ -n "$LD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="$dir:$LD_LIBRARY_PATH" else LD_LIBRARY_PATH="$dir" fi export LD_LIBRARY_PATH exec "$@"
{ "pile_set_name": "Github" }
'use strict'; // Disabled for now b/c it conflicts with session leak tests // before(function() { // this.client = this.configuration.newClient({}, { poolSize: 1 }); // return Promise.resolve() // .then(() => this.client.connect()) // .then(() => { // this.adminDb = this.client.db(this.configuration.db).admin(); // return this.adminDb.serverStatus(); // }) // .then(serverStatus => { // this._currentConnections = serverStatus.connections.current; // this._connectionChangedTests = []; // }); // }); // beforeEach(function() { // return Promise.resolve() // .then(() => this.adminDb.serverStatus()) // .then(serverStatus => { // this._currentConnections = serverStatus.connections.current; // }); // }); // afterEach(function() { // return Promise.resolve() // .then(() => this.adminDb.serverStatus()) // .then(serverStatus => { // const currentConnections = serverStatus.connections.current; // if (this._currentConnections !== currentConnections) { // console.log('connections: ', this._currentConnections, '-->', currentConnections); // this._connectionChangedTests.push({ // test: this.currentTest, // previous: this._currentConnections, // current: currentConnections // }); // } // this._currentConnections = currentConnections; // }); // }); // after(function() { // return this.client.close().then(() => { // if (this._connectionChangedTests.length) { // console.group('The following tests had unstable connection counts:'); // console.log('| previous | current | name |'); // console.log('| -------- | ---- | ---- |'); // this._connectionChangedTests.forEach(({ test, previous, current }) => { // const name = test.fullTitle(); // previous = previous.toString(10).padStart(8); // current = current.toString(10).padStart(4); // console.log(`| ${previous} | ${current} | ${name} |`); // }); // console.groupEnd(); // } // }); // });
{ "pile_set_name": "Github" }
/* * * Copyright 2018 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include_next <sched.h> #ifndef ASYLO_PLATFORM_POSIX_INCLUDE_SCHED_H_ #define ASYLO_PLATFORM_POSIX_INCLUDE_SCHED_H_ #include <internal/sched.h> #ifdef __cplusplus extern "C" { #endif // The clone flags used in clone(2). Currently only creating a thread through // clone(2) is supported. Please use fork(2) for cloning a process. #define CLONE_THREAD 0x10000 #define CLONE_SETTLS 0x80000 // The maximum number of CPUs we support. Should match KLINUX_CPU_SET_MAX_CPUS // in asylo/platform/system_call/type_conversions/kernel_types.h. #define CPU_SETSIZE CPU_SET_MAX_CPUS // Represents a set of (up to) CPU_SETSIZE CPUs as a bitset. typedef CpuSet cpu_set_t; // We implement a subset of the macros from CPU_SET(3) here. #define CPU_ZERO(set) CpuSetZero((set)) #define CPU_SET(cpu, set) CpuSetAddBit((cpu), (set)) #define CPU_CLR(cpu, set) CpuSetClearBit((cpu), (set)) #define CPU_ISSET(cpu, set) CpuSetCheckBit((cpu), (set)) #define CPU_COUNT(set) CpuSetCountBits((set)) #define CPU_EQUAL(set1, set2) CpuSetEqual((set1), (set2)) // Calls sched_getaffinity() on the host, then translates the host's mask to a // bridge_cpu_set_t for transmission across the enclave boundary, and finally // translates that to the enclave's cpu_set_t type (defined above). int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask); int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset); // Implemented as call to host sched_yield(). int sched_yield(void); int sched_getcpu(void); #ifdef __cplusplus } // extern "C" #endif #endif // ASYLO_PLATFORM_POSIX_INCLUDE_SCHED_H_
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>cc.mrbird</groupId> <artifactId>Security</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Security</name> <description>Demo project for Spring Boot</description> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.14.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.social</groupId> <artifactId>spring-social-config</artifactId> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.7</version> </dependency> <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>
{ "pile_set_name": "Github" }
#include <thread> void some_function() {} void some_other_function(int) {} std::thread f() { void some_function(); return std::thread(some_function); } std::thread g() { void some_other_function(int); std::thread t(some_other_function,42); return t; } int main() { std::thread t1=f(); t1.join(); std::thread t2=g(); t2.join(); }
{ "pile_set_name": "Github" }
<p class="may_delete"> <%= t('pageflow.admin.users.me.delete_account_hint') %> <%= link_to(t('pageflow.admin.users.me.delete_account'), main_app.delete_me_admin_users_path, class: 'delete_account') %> </p>
{ "pile_set_name": "Github" }
#ifndef CAFFE_IMAGE_DATA_LAYER_HPP_ #define CAFFE_IMAGE_DATA_LAYER_HPP_ #include <string> #include <utility> #include <vector> #include "caffe/blob.hpp" #include "caffe/data_transformer.hpp" #include "caffe/internal_thread.hpp" #include "caffe/layer.hpp" #include "caffe/layers/base_data_layer.hpp" #include "caffe/proto/caffe.pb.h" namespace caffe { /** * @brief Provides data to the Net from image files. * * TODO(dox): thorough documentation for Forward and proto params. */ template <typename Dtype> class ImageDataLayer : public BasePrefetchingDataLayer<Dtype> { public: explicit ImageDataLayer(const LayerParameter& param) : BasePrefetchingDataLayer<Dtype>(param) {} virtual ~ImageDataLayer(); virtual void DataLayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top); virtual inline const char* type() const { return "ImageData"; } virtual inline int ExactNumBottomBlobs() const { return 0; } virtual inline int ExactNumTopBlobs() const { return 2; } protected: shared_ptr<Caffe::RNG> prefetch_rng_; virtual void ShuffleImages(); virtual void load_batch(Batch<Dtype>* batch); vector<std::pair<std::string, int> > lines_; int lines_id_; }; } // namespace caffe #endif // CAFFE_IMAGE_DATA_LAYER_HPP_
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <project xmlns="http://www.xilinx.com/XMLSchema" xmlns:xil_pn="http://www.xilinx.com/XMLSchema"> <header> <!-- ISE source project file created by Project Navigator. --> <!-- --> <!-- This file contains project source information including a list of --> <!-- project source files, project and process properties. This file, --> <!-- along with the project source files, is sufficient to open and --> <!-- implement in ISE Project Navigator. --> <!-- --> <!-- Copyright (c) 1995-2013 Xilinx, Inc. All rights reserved. --> </header> <version xil_pn:ise_version="14.7" xil_pn:schema_version="2"/> <files> <file xil_pn:name="../aes_composite_enc.v" xil_pn:type="FILE_VERILOG"> <association xil_pn:name="BehavioralSimulation" xil_pn:seqID="1"/> <association xil_pn:name="Implementation" xil_pn:seqID="2"/> </file> <file xil_pn:name="../chip_sasebo_gii_aes.v" xil_pn:type="FILE_VERILOG"> <association xil_pn:name="BehavioralSimulation" xil_pn:seqID="2"/> <association xil_pn:name="Implementation" xil_pn:seqID="3"/> </file> <file xil_pn:name="../lbus_if.v" xil_pn:type="FILE_VERILOG"> <association xil_pn:name="BehavioralSimulation" xil_pn:seqID="3"/> <association xil_pn:name="Implementation" xil_pn:seqID="1"/> </file> <file xil_pn:name="../sakura_g_main_r1.ucf" xil_pn:type="FILE_UCF"> <association xil_pn:name="Implementation" xil_pn:seqID="0"/> </file> </files> <properties> <property xil_pn:name="AES Initial Vector spartan6" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="AES Key (Hex String) spartan6" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Add I/O Buffers" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Allow Logic Optimization Across Hierarchy" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Allow SelectMAP Pins to Persist" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Allow Unexpanded Blocks" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Allow Unmatched LOC Constraints" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Allow Unmatched Timing Group Constraints" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Analysis Effort Level" xil_pn:value="Standard" xil_pn:valueState="default"/> <property xil_pn:name="Asynchronous To Synchronous" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Auto Implementation Compile Order" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Auto Implementation Top" xil_pn:value="false" xil_pn:valueState="non-default"/> <property xil_pn:name="Automatic BRAM Packing" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Automatically Insert glbl Module in the Netlist" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Automatically Run Generate Target PROM/ACE File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="BRAM Utilization Ratio" xil_pn:value="100" xil_pn:valueState="default"/> <property xil_pn:name="Bring Out Global Set/Reset Net as a Port" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Bring Out Global Tristate Net as a Port" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Bus Delimiter" xil_pn:value="&lt;>" xil_pn:valueState="default"/> <property xil_pn:name="Case" xil_pn:value="Maintain" xil_pn:valueState="default"/> <property xil_pn:name="Case Implementation Style" xil_pn:value="None" xil_pn:valueState="default"/> <property xil_pn:name="Change Device Speed To" xil_pn:value="-2" xil_pn:valueState="default"/> <property xil_pn:name="Change Device Speed To Post Trace" xil_pn:value="-2" xil_pn:valueState="default"/> <property xil_pn:name="Combinatorial Logic Optimization" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Compile EDK Simulation Library" xil_pn:value="false" xil_pn:valueState="non-default"/> <property xil_pn:name="Compile SIMPRIM (Timing) Simulation Library" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Compile UNISIM (Functional) Simulation Library" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Compile XilinxCoreLib (CORE Generator) Simulation Library" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Compile for HDL Debugging" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Configuration Clk (Configuration Pins)" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="Configuration Pin Done" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="Configuration Pin M0" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="Configuration Pin M1" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="Configuration Pin M2" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="Configuration Pin Program" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="Configuration Rate spartan6" xil_pn:value="26" xil_pn:valueState="non-default"/> <property xil_pn:name="Correlate Output to Input Design" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Create ASCII Configuration File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Create Binary Configuration File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Create Bit File" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Create I/O Pads from Ports" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Create IEEE 1532 Configuration File spartan6" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Create Logic Allocation File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Create Mask File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Create ReadBack Data Files" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Cross Clock Analysis" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="DSP Utilization Ratio" xil_pn:value="100" xil_pn:valueState="default"/> <property xil_pn:name="Delay Values To Be Read from SDF" xil_pn:value="Setup Time" xil_pn:valueState="default"/> <property xil_pn:name="Device" xil_pn:value="xc6slx75" xil_pn:valueState="non-default"/> <property xil_pn:name="Device Family" xil_pn:value="Spartan6" xil_pn:valueState="non-default"/> <property xil_pn:name="Device Speed Grade/Select ABS Minimum" xil_pn:value="-2" xil_pn:valueState="default"/> <property xil_pn:name="Disable Detailed Package Model Insertion" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Do Not Escape Signal and Instance Names in Netlist" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Done (Output Events)" xil_pn:value="Default (4)" xil_pn:valueState="default"/> <property xil_pn:name="Drive Awake Pin During Suspend/Wake Sequence spartan6" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Drive Done Pin High" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Enable BitStream Compression" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Enable Cyclic Redundancy Checking (CRC) spartan6" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Enable Debugging of Serial Mode BitStream" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Enable External Master Clock spartan6" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Enable Hardware Co-Simulation" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Enable Internal Done Pipe" xil_pn:value="true" xil_pn:valueState="non-default"/> <property xil_pn:name="Enable Message Filtering" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Enable Multi-Pin Wake-Up Suspend Mode spartan6" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Enable Multi-Threading" xil_pn:value="Off" xil_pn:valueState="default"/> <property xil_pn:name="Enable Multi-Threading par spartan6" xil_pn:value="Off" xil_pn:valueState="default"/> <property xil_pn:name="Enable Outputs (Output Events)" xil_pn:value="Default (5)" xil_pn:valueState="default"/> <property xil_pn:name="Enable Suspend/Wake Global Set/Reset spartan6" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Encrypt Bitstream spartan6" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Encrypt Key Select spartan6" xil_pn:value="BBRAM" xil_pn:valueState="default"/> <property xil_pn:name="Equivalent Register Removal Map" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Equivalent Register Removal XST" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Essential Bits" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Evaluation Development Board" xil_pn:value="" xil_pn:valueState="non-default"/> <property xil_pn:name="Exclude Compilation of Deprecated EDK Cores" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Exclude Compilation of EDK Sub-Libraries" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Extra Cost Tables Map" xil_pn:value="0" xil_pn:valueState="default"/> <property xil_pn:name="Extra Effort (Highest PAR level only)" xil_pn:value="None" xil_pn:valueState="default"/> <property xil_pn:name="FPGA Start-Up Clock" xil_pn:value="CCLK" xil_pn:valueState="default"/> <property xil_pn:name="FSM Encoding Algorithm" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="FSM Style" xil_pn:value="LUT" xil_pn:valueState="default"/> <property xil_pn:name="Filter Files From Compile Order" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Flatten Output Netlist" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Functional Model Target Language ArchWiz" xil_pn:value="Verilog" xil_pn:valueState="default"/> <property xil_pn:name="Functional Model Target Language Coregen" xil_pn:value="Verilog" xil_pn:valueState="default"/> <property xil_pn:name="Functional Model Target Language Schematic" xil_pn:value="Verilog" xil_pn:valueState="default"/> <property xil_pn:name="GTS Cycle During Suspend/Wakeup Sequence spartan6" xil_pn:value="4" xil_pn:valueState="default"/> <property xil_pn:name="GWE Cycle During Suspend/Wakeup Sequence spartan6" xil_pn:value="5" xil_pn:valueState="default"/> <property xil_pn:name="Generate Architecture Only (No Entity Declaration)" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Asynchronous Delay Report" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Clock Region Report" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Constraints Interaction Report" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Constraints Interaction Report Post Trace" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Datasheet Section" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Generate Datasheet Section Post Trace" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Generate Detailed MAP Report" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Multiple Hierarchical Netlist Files" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Post-Place &amp; Route Power Report" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Post-Place &amp; Route Simulation Model" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate RTL Schematic" xil_pn:value="Yes" xil_pn:valueState="default"/> <property xil_pn:name="Generate SAIF File for Power Optimization/Estimation Par" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Testbench File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Timegroups Section" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generate Timegroups Section Post Trace" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Generics, Parameters" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Global Optimization Goal" xil_pn:value="AllClockNets" xil_pn:valueState="default"/> <property xil_pn:name="Global Optimization map spartan6" xil_pn:value="Off" xil_pn:valueState="default"/> <property xil_pn:name="Global Set/Reset Port Name" xil_pn:value="GSR_PORT" xil_pn:valueState="default"/> <property xil_pn:name="Global Tristate Port Name" xil_pn:value="GTS_PORT" xil_pn:valueState="default"/> <property xil_pn:name="Hierarchy Separator" xil_pn:value="/" xil_pn:valueState="default"/> <property xil_pn:name="ISim UUT Instance Name" xil_pn:value="UUT" xil_pn:valueState="default"/> <property xil_pn:name="Ignore User Timing Constraints Map" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Ignore User Timing Constraints Par" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Implementation Top" xil_pn:value="Module|CHIP_SAKURA_G_AES" xil_pn:valueState="non-default"/> <property xil_pn:name="Implementation Top File" xil_pn:value="../chip_sasebo_gii_aes.v" xil_pn:valueState="non-default"/> <property xil_pn:name="Implementation Top Instance Path" xil_pn:value="/CHIP_SAKURA_G_AES" xil_pn:valueState="non-default"/> <property xil_pn:name="Include 'uselib Directive in Verilog File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Include SIMPRIM Models in Verilog File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Include UNISIM Models in Verilog File" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Include sdf_annotate task in Verilog File" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Incremental Compilation" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Insert Buffers to Prevent Pulse Swallowing" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Instantiation Template Target Language Xps" xil_pn:value="Verilog" xil_pn:valueState="default"/> <property xil_pn:name="JTAG Pin TCK" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="JTAG Pin TDI" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="JTAG Pin TDO" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="JTAG Pin TMS" xil_pn:value="Pull Up" xil_pn:valueState="default"/> <property xil_pn:name="Keep Hierarchy" xil_pn:value="No" xil_pn:valueState="default"/> <property xil_pn:name="LUT Combining Map" xil_pn:value="Off" xil_pn:valueState="default"/> <property xil_pn:name="LUT Combining Xst" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Language" xil_pn:value="VHDL" xil_pn:valueState="default"/> <property xil_pn:name="Last Applied Goal" xil_pn:value="Balanced" xil_pn:valueState="default"/> <property xil_pn:name="Last Applied Strategy" xil_pn:value="Xilinx Default (unlocked)" xil_pn:valueState="default"/> <property xil_pn:name="Last Unlock Status" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Launch SDK after Export" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Library for Verilog Sources" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Load glbl" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Manual Implementation Compile Order" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Map Slice Logic into Unused Block RAMs" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Mask Pins for Multi-Pin Wake-Up Suspend Mode spartan6" xil_pn:value="0x00" xil_pn:valueState="default"/> <property xil_pn:name="Max Fanout" xil_pn:value="100000" xil_pn:valueState="default"/> <property xil_pn:name="Maximum Compression" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Maximum Number of Lines in Report" xil_pn:value="1000" xil_pn:valueState="default"/> <property xil_pn:name="Maximum Signal Name Length" xil_pn:value="20" xil_pn:valueState="default"/> <property xil_pn:name="Move First Flip-Flop Stage" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Move Last Flip-Flop Stage" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="MultiBoot: Insert IPROG CMD in the Bitfile spartan6" xil_pn:value="Enable" xil_pn:valueState="default"/> <property xil_pn:name="MultiBoot: Next Configuration Mode spartan6" xil_pn:value="001" xil_pn:valueState="default"/> <property xil_pn:name="MultiBoot: Starting Address for Golden Configuration spartan6" xil_pn:value="0x00000000" xil_pn:valueState="default"/> <property xil_pn:name="MultiBoot: Starting Address for Next Configuration spartan6" xil_pn:value="0x00000000" xil_pn:valueState="default"/> <property xil_pn:name="MultiBoot: Use New Mode for Next Configuration spartan6" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="MultiBoot: User-Defined Register for Failsafe Scheme spartan6" xil_pn:value="0x0000" xil_pn:valueState="default"/> <property xil_pn:name="Netlist Hierarchy" xil_pn:value="As Optimized" xil_pn:valueState="default"/> <property xil_pn:name="Netlist Translation Type" xil_pn:value="Timestamp" xil_pn:valueState="default"/> <property xil_pn:name="Number of Clock Buffers" xil_pn:value="16" xil_pn:valueState="default"/> <property xil_pn:name="Number of Paths in Error/Verbose Report" xil_pn:value="3" xil_pn:valueState="default"/> <property xil_pn:name="Number of Paths in Error/Verbose Report Post Trace" xil_pn:value="3" xil_pn:valueState="default"/> <property xil_pn:name="Optimization Effort spartan6" xil_pn:value="Normal" xil_pn:valueState="default"/> <property xil_pn:name="Optimization Goal" xil_pn:value="Speed" xil_pn:valueState="default"/> <property xil_pn:name="Optimize Instantiated Primitives" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Other Bitgen Command Line Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Bitgen Command Line Options spartan6" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Compiler Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Compiler Options Map" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Compiler Options Par" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Compiler Options Translate" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Compxlib Command Line Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Map Command Line Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other NETGEN Command Line Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Ngdbuild Command Line Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Place &amp; Route Command Line Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Simulator Commands Behavioral" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Simulator Commands Post-Map" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Simulator Commands Post-Route" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other Simulator Commands Post-Translate" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other XPWR Command Line Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Other XST Command Line Options" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Output Extended Identifiers" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Output File Name" xil_pn:value="CHIP_SAKURA_G_AES" xil_pn:valueState="default"/> <property xil_pn:name="Overwrite Compiled Libraries" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Pack I/O Registers into IOBs" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Pack I/O Registers/Latches into IOBs" xil_pn:value="Off" xil_pn:valueState="default"/> <property xil_pn:name="Package" xil_pn:value="csg484" xil_pn:valueState="default"/> <property xil_pn:name="Perform Advanced Analysis" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Perform Advanced Analysis Post Trace" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Perform Timing-Driven Packing and Placement" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Place &amp; Route Effort Level (Overall)" xil_pn:value="High" xil_pn:valueState="default"/> <property xil_pn:name="Place And Route Mode" xil_pn:value="Normal Place and Route" xil_pn:valueState="default"/> <property xil_pn:name="Place MultiBoot Settings into Bitstream spartan6" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Placer Effort Level Map" xil_pn:value="High" xil_pn:valueState="default"/> <property xil_pn:name="Placer Extra Effort Map" xil_pn:value="None" xil_pn:valueState="default"/> <property xil_pn:name="Port to be used" xil_pn:value="Auto - default" xil_pn:valueState="default"/> <property xil_pn:name="Post Map Simulation Model Name" xil_pn:value="CHIP_SAKURA_G_AES_map.v" xil_pn:valueState="default"/> <property xil_pn:name="Post Place &amp; Route Simulation Model Name" xil_pn:value="CHIP_SAKURA_G_AES_timesim.v" xil_pn:valueState="default"/> <property xil_pn:name="Post Synthesis Simulation Model Name" xil_pn:value="CHIP_SAKURA_G_AES_synthesis.v" xil_pn:valueState="default"/> <property xil_pn:name="Post Translate Simulation Model Name" xil_pn:value="CHIP_SAKURA_G_AES_translate.v" xil_pn:valueState="default"/> <property xil_pn:name="Power Reduction Map spartan6" xil_pn:value="Off" xil_pn:valueState="default"/> <property xil_pn:name="Power Reduction Par" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Power Reduction Xst" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Preferred Language" xil_pn:value="Verilog" xil_pn:valueState="default"/> <property xil_pn:name="Produce Verbose Report" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Project Description" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Property Specification in Project File" xil_pn:value="Store all values" xil_pn:valueState="default"/> <property xil_pn:name="RAM Extraction" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="RAM Style" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="ROM Extraction" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="ROM Style" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Read Cores" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Reduce Control Sets" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Regenerate Core" xil_pn:value="Under Current Project Setting" xil_pn:valueState="default"/> <property xil_pn:name="Register Balancing" xil_pn:value="No" xil_pn:valueState="default"/> <property xil_pn:name="Register Duplication Map" xil_pn:value="Off" xil_pn:valueState="default"/> <property xil_pn:name="Register Duplication Xst" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Register Ordering spartan6" xil_pn:value="4" xil_pn:valueState="default"/> <property xil_pn:name="Release Write Enable (Output Events)" xil_pn:value="Default (6)" xil_pn:valueState="default"/> <property xil_pn:name="Rename Design Instance in Testbench File to" xil_pn:value="UUT" xil_pn:valueState="default"/> <property xil_pn:name="Rename Top Level Architecture To" xil_pn:value="Structure" xil_pn:valueState="default"/> <property xil_pn:name="Rename Top Level Entity to" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Rename Top Level Module To" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Report Fastest Path(s) in Each Constraint" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Report Fastest Path(s) in Each Constraint Post Trace" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Report Paths by Endpoint" xil_pn:value="3" xil_pn:valueState="default"/> <property xil_pn:name="Report Paths by Endpoint Post Trace" xil_pn:value="3" xil_pn:valueState="default"/> <property xil_pn:name="Report Type" xil_pn:value="Verbose Report" xil_pn:valueState="default"/> <property xil_pn:name="Report Type Post Trace" xil_pn:value="Verbose Report" xil_pn:valueState="default"/> <property xil_pn:name="Report Unconstrained Paths" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Report Unconstrained Paths Post Trace" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Reset On Configuration Pulse Width" xil_pn:value="100" xil_pn:valueState="default"/> <property xil_pn:name="Resource Sharing" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Retain Hierarchy" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Retry Configuration if CRC Error Occurs spartan6" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Revision Select" xil_pn:value="00" xil_pn:valueState="default"/> <property xil_pn:name="Revision Select Tristate" xil_pn:value="Disable" xil_pn:valueState="default"/> <property xil_pn:name="Run Design Rules Checker (DRC)" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Run for Specified Time" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Run for Specified Time Map" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Run for Specified Time Par" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Run for Specified Time Translate" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Safe Implementation" xil_pn:value="No" xil_pn:valueState="default"/> <property xil_pn:name="Security" xil_pn:value="Enable Readback and Reconfiguration" xil_pn:valueState="default"/> <property xil_pn:name="Selected Simulation Root Source Node Behavioral" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Selected Simulation Root Source Node Post-Map" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Selected Simulation Root Source Node Post-Route" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Selected Simulation Root Source Node Post-Translate" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Selected Simulation Source Node" xil_pn:value="UUT" xil_pn:valueState="default"/> <property xil_pn:name="Set SPI Configuration Bus Width spartan6" xil_pn:value="1" xil_pn:valueState="default"/> <property xil_pn:name="Setup External Master Clock Division spartan6" xil_pn:value="1" xil_pn:valueState="default"/> <property xil_pn:name="Shift Register Extraction" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Shift Register Minimum Size spartan6" xil_pn:value="2" xil_pn:valueState="default"/> <property xil_pn:name="Show All Models" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Simulation Model Target" xil_pn:value="Verilog" xil_pn:valueState="default"/> <property xil_pn:name="Simulation Run Time ISim" xil_pn:value="1000 ns" xil_pn:valueState="default"/> <property xil_pn:name="Simulation Run Time Map" xil_pn:value="1000 ns" xil_pn:valueState="default"/> <property xil_pn:name="Simulation Run Time Par" xil_pn:value="1000 ns" xil_pn:valueState="default"/> <property xil_pn:name="Simulation Run Time Translate" xil_pn:value="1000 ns" xil_pn:valueState="default"/> <property xil_pn:name="Simulator" xil_pn:value="ISim (VHDL/Verilog)" xil_pn:valueState="default"/> <property xil_pn:name="Slice Utilization Ratio" xil_pn:value="100" xil_pn:valueState="default"/> <property xil_pn:name="Specify 'define Macro Name and Value" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Specify Top Level Instance Names Behavioral" xil_pn:value="Default" xil_pn:valueState="default"/> <property xil_pn:name="Specify Top Level Instance Names Post-Map" xil_pn:value="Default" xil_pn:valueState="default"/> <property xil_pn:name="Specify Top Level Instance Names Post-Route" xil_pn:value="Default" xil_pn:valueState="default"/> <property xil_pn:name="Specify Top Level Instance Names Post-Translate" xil_pn:value="Default" xil_pn:valueState="default"/> <property xil_pn:name="Speed Grade" xil_pn:value="-2" xil_pn:valueState="non-default"/> <property xil_pn:name="Starting Placer Cost Table (1-100) Map spartan6" xil_pn:value="1" xil_pn:valueState="default"/> <property xil_pn:name="Synthesis Tool" xil_pn:value="XST (VHDL/Verilog)" xil_pn:valueState="default"/> <property xil_pn:name="Target Simulator" xil_pn:value="Please Specify" xil_pn:valueState="default"/> <property xil_pn:name="Timing Mode Map" xil_pn:value="Performance Evaluation" xil_pn:valueState="default"/> <property xil_pn:name="Timing Mode Par" xil_pn:value="Performance Evaluation" xil_pn:valueState="default"/> <property xil_pn:name="Top-Level Module Name in Output Netlist" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Top-Level Source Type" xil_pn:value="HDL" xil_pn:valueState="default"/> <property xil_pn:name="Trim Unconnected Signals" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Tristate On Configuration Pulse Width" xil_pn:value="0" xil_pn:valueState="default"/> <property xil_pn:name="Unused IOB Pins" xil_pn:value="Pull Down" xil_pn:valueState="default"/> <property xil_pn:name="Use 64-bit PlanAhead on 64-bit Systems" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Use Clock Enable" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Project File Behavioral" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Project File Post-Map" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Project File Post-Route" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Project File Post-Translate" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Simulation Command File Behavioral" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Simulation Command File Map" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Simulation Command File Par" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Simulation Command File Translate" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Waveform Configuration File Behav" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Waveform Configuration File Map" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Waveform Configuration File Par" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Custom Waveform Configuration File Translate" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use DSP Block spartan6" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Use LOC Constraints" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="Use RLOC Constraints" xil_pn:value="Yes" xil_pn:valueState="default"/> <property xil_pn:name="Use Smart Guide" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Use Synchronous Reset" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Use Synchronous Set" xil_pn:value="Auto" xil_pn:valueState="default"/> <property xil_pn:name="Use Synthesis Constraints File" xil_pn:value="true" xil_pn:valueState="default"/> <property xil_pn:name="User Browsed Strategy Files" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="UserID Code (8 Digit Hexadecimal)" xil_pn:value="0xFFFFFFFF" xil_pn:valueState="default"/> <property xil_pn:name="VCCAUX Voltage Level spartan6" xil_pn:value="2.5V" xil_pn:valueState="default"/> <property xil_pn:name="VHDL Source Analysis Standard" xil_pn:value="VHDL-93" xil_pn:valueState="default"/> <property xil_pn:name="Value Range Check" xil_pn:value="false" xil_pn:valueState="default"/> <property xil_pn:name="Verilog Macros" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="Wait for DCM and PLL Lock (Output Events) spartan6" xil_pn:value="Default (NoWait)" xil_pn:valueState="default"/> <property xil_pn:name="Wakeup Clock spartan6" xil_pn:value="Startup Clock" xil_pn:valueState="default"/> <property xil_pn:name="Watchdog Timer Value spartan6" xil_pn:value="0xFFFF" xil_pn:valueState="default"/> <property xil_pn:name="Working Directory" xil_pn:value="." xil_pn:valueState="non-default"/> <property xil_pn:name="Write Timing Constraints" xil_pn:value="false" xil_pn:valueState="default"/> <!-- --> <!-- The following properties are for internal use only. These should not be modified.--> <!-- --> <property xil_pn:name="PROP_BehavioralSimTop" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="PROP_DesignName" xil_pn:value="sakura-g_main" xil_pn:valueState="non-default"/> <property xil_pn:name="PROP_DevFamilyPMName" xil_pn:value="spartan6" xil_pn:valueState="default"/> <property xil_pn:name="PROP_FPGAConfiguration" xil_pn:value="FPGAConfiguration" xil_pn:valueState="default"/> <property xil_pn:name="PROP_PostMapSimTop" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="PROP_PostParSimTop" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="PROP_PostSynthSimTop" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="PROP_PostXlateSimTop" xil_pn:value="" xil_pn:valueState="default"/> <property xil_pn:name="PROP_PreSynthesis" xil_pn:value="PreSynthesis" xil_pn:valueState="default"/> <property xil_pn:name="PROP_intProjectCreationTimestamp" xil_pn:value="2013-02-01T19:22:13" xil_pn:valueState="non-default"/> <property xil_pn:name="PROP_intWbtProjectID" xil_pn:value="F8C3A3FC1BFA40FE924222689B3C9CC5" xil_pn:valueState="non-default"/> <property xil_pn:name="PROP_intWorkingDirLocWRTProjDir" xil_pn:value="Same" xil_pn:valueState="non-default"/> <property xil_pn:name="PROP_intWorkingDirUsed" xil_pn:value="No" xil_pn:valueState="non-default"/> </properties> <bindings/> <libraries/> <autoManagedFiles> <!-- The following files are identified by `include statements in verilog --> <!-- source files and are automatically managed by Project Navigator. --> <!-- --> <!-- Do not hand-edit this section, as it will be overwritten when the --> <!-- project is analyzed based on files automatically identified as --> <!-- include files. --> </autoManagedFiles> </project>
{ "pile_set_name": "Github" }
/* * Board functions for TI AM335X based pxm2 board * (C) Copyright 2013 Siemens Schweiz AG * (C) Heiko Schocher, DENX Software Engineering, [email protected]. * * Based on: * u-boot:/board/ti/am335x/board.c * * Board functions for TI AM335X based boards * * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/ * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <errno.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> #include <asm/arch/omap.h> #include <asm/arch/ddr_defs.h> #include <asm/arch/clock.h> #include <asm/arch/gpio.h> #include <asm/arch/mmc_host_def.h> #include <asm/arch/sys_proto.h> #include "../../../drivers/video/da8xx-fb.h" #include <asm/io.h> #include <asm/emif.h> #include <asm/gpio.h> #include <i2c.h> #include <miiphy.h> #include <cpsw.h> #include <watchdog.h> #include "board.h" #include "../common/factoryset.h" #include "pmic.h" #include <nand.h> #include <bmp_layout.h> DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_SPL_BUILD static void board_init_ddr(void) { struct emif_regs pxm2_ddr3_emif_reg_data = { .sdram_config = 0x41805332, .sdram_tim1 = 0x666b3c9, .sdram_tim2 = 0x243631ca, .sdram_tim3 = 0x33f, .emif_ddr_phy_ctlr_1 = 0x100005, .zq_config = 0, .ref_ctrl = 0x81a, }; struct ddr_data pxm2_ddr3_data = { .datardsratio0 = 0x81204812, .datawdsratio0 = 0, .datafwsratio0 = 0x8020080, .datawrsratio0 = 0x4010040, }; struct cmd_control pxm2_ddr3_cmd_ctrl_data = { .cmd0csratio = 0x80, .cmd0iclkout = 0, .cmd1csratio = 0x80, .cmd1iclkout = 0, .cmd2csratio = 0x80, .cmd2iclkout = 0, }; const struct ctrl_ioregs ioregs = { .cm0ioctl = DXR2_IOCTRL_VAL, .cm1ioctl = DXR2_IOCTRL_VAL, .cm2ioctl = DXR2_IOCTRL_VAL, .dt0ioctl = DXR2_IOCTRL_VAL, .dt1ioctl = DXR2_IOCTRL_VAL, }; config_ddr(DDR_PLL_FREQ, &ioregs, &pxm2_ddr3_data, &pxm2_ddr3_cmd_ctrl_data, &pxm2_ddr3_emif_reg_data, 0); } /* * voltage switching for MPU frequency switching. * @module = mpu - 0, core - 1 * @vddx_op_vol_sel = vdd voltage to set */ #define MPU 0 #define CORE 1 int voltage_update(unsigned int module, unsigned char vddx_op_vol_sel) { uchar buf[4]; unsigned int reg_offset; if (module == MPU) reg_offset = PMIC_VDD1_OP_REG; else reg_offset = PMIC_VDD2_OP_REG; /* Select VDDx OP */ if (i2c_read(PMIC_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) return 1; buf[0] &= ~PMIC_OP_REG_CMD_MASK; if (i2c_write(PMIC_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) return 1; /* Configure VDDx OP Voltage */ if (i2c_read(PMIC_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) return 1; buf[0] &= ~PMIC_OP_REG_SEL_MASK; buf[0] |= vddx_op_vol_sel; if (i2c_write(PMIC_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) return 1; if (i2c_read(PMIC_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) return 1; if ((buf[0] & PMIC_OP_REG_SEL_MASK) != vddx_op_vol_sel) return 1; return 0; } #define OSC (V_OSCK/1000000) const struct dpll_params dpll_mpu_pxm2 = { 720, OSC-1, 1, -1, -1, -1, -1}; void spl_siemens_board_init(void) { uchar buf[4]; /* * pxm2 PMIC code. All boards currently want an MPU voltage * of 1.2625V and CORE voltage of 1.1375V to operate at * 720MHz. */ if (i2c_probe(PMIC_CTRL_I2C_ADDR)) return; /* VDD1/2 voltage selection register access by control i/f */ if (i2c_read(PMIC_CTRL_I2C_ADDR, PMIC_DEVCTRL_REG, 1, buf, 1)) return; buf[0] |= PMIC_DEVCTRL_REG_SR_CTL_I2C_SEL_CTL_I2C; if (i2c_write(PMIC_CTRL_I2C_ADDR, PMIC_DEVCTRL_REG, 1, buf, 1)) return; /* Frequency switching for OPP 120 */ if (voltage_update(MPU, PMIC_OP_REG_SEL_1_2_6) || voltage_update(CORE, PMIC_OP_REG_SEL_1_1_3)) { printf("voltage update failed\n"); } } #endif /* if def CONFIG_SPL_BUILD */ int read_eeprom(void) { /* nothing ToDo here for this board */ return 0; } #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \ (defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD)) static void cpsw_control(int enabled) { /* VTP can be added here */ return; } static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, .phy_addr = 0, .phy_if = PHY_INTERFACE_MODE_RMII, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, .phy_addr = 1, .phy_if = PHY_INTERFACE_MODE_RMII, }, }; static struct cpsw_platform_data cpsw_data = { .mdio_base = CPSW_MDIO_BASE, .cpsw_base = CPSW_BASE, .mdio_div = 0xff, .channels = 4, .cpdma_reg_ofs = 0x800, .slaves = 1, .slave_data = cpsw_slaves, .ale_reg_ofs = 0xd00, .ale_entries = 1024, .host_port_reg_ofs = 0x108, .hw_stats_reg_ofs = 0x900, .bd_ram_ofs = 0x2000, .mac_control = (1 << 5), .control = cpsw_control, .host_port_num = 0, .version = CPSW_CTRL_VERSION_2, }; #endif /* #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) */ #if defined(CONFIG_DRIVER_TI_CPSW) || \ (defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) int board_eth_init(bd_t *bis) { int n = 0; #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \ (defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD)) struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; #ifdef CONFIG_FACTORYSET int rv; if (!is_valid_ether_addr(factory_dat.mac)) printf("Error: no valid mac address\n"); else eth_setenv_enetaddr("ethaddr", factory_dat.mac); #endif /* #ifdef CONFIG_FACTORYSET */ /* Set rgmii mode and enable rmii clock to be sourced from chip */ writel(RGMII_MODE_ENABLE , &cdev->miisel); rv = cpsw_register(&cpsw_data); if (rv < 0) printf("Error %d registering CPSW switch\n", rv); else n += rv; #endif return n; } #endif /* #if defined(CONFIG_DRIVER_TI_CPSW) */ #if defined(CONFIG_VIDEO) && !defined(CONFIG_SPL_BUILD) static struct da8xx_panel lcd_panels[] = { /* AUO G156XW01 V1 */ [0] = { .name = "AUO_G156XW01_V1", .width = 1376, .height = 768, .hfp = 14, .hbp = 64, .hsw = 56, .vfp = 1, .vbp = 28, .vsw = 3, .pxl_clk = 60000000, .invert_pxl_clk = 0, }, /* AUO B101EVN06 V0 */ [1] = { .name = "AUO_B101EVN06_V0", .width = 1280, .height = 800, .hfp = 52, .hbp = 84, .hsw = 36, .vfp = 3, .vbp = 14, .vsw = 6, .pxl_clk = 60000000, .invert_pxl_clk = 0, }, /* * Settings from factoryset * stored in EEPROM */ [2] = { .name = "factoryset", .width = 0, .height = 0, .hfp = 0, .hbp = 0, .hsw = 0, .vfp = 0, .vbp = 0, .vsw = 0, .pxl_clk = 60000000, .invert_pxl_clk = 0, }, }; static const struct display_panel disp_panel = { WVGA, 32, 16, COLOR_ACTIVE, }; static const struct lcd_ctrl_config lcd_cfg = { &disp_panel, .ac_bias = 255, .ac_bias_intrpt = 0, .dma_burst_sz = 16, .bpp = 32, .fdd = 0x80, .tft_alt_mode = 0, .stn_565_mode = 0, .mono_8bit_mode = 0, .invert_line_clock = 1, .invert_frm_clock = 1, .sync_edge = 0, .sync_ctrl = 1, .raster_order = 0, }; static int set_gpio(int gpio, int state) { gpio_request(gpio, "temp"); gpio_direction_output(gpio, state); gpio_set_value(gpio, state); gpio_free(gpio); return 0; } static int enable_backlight(void) { set_gpio(BOARD_LCD_POWER, 1); set_gpio(BOARD_BACK_LIGHT, 1); set_gpio(BOARD_TOUCH_POWER, 1); return 0; } static int enable_pwm(void) { struct pwmss_regs *pwmss = (struct pwmss_regs *)PWMSS0_BASE; struct pwmss_ecap_regs *ecap; int ticks = PWM_TICKS; int duty = PWM_DUTY; ecap = (struct pwmss_ecap_regs *)AM33XX_ECAP0_BASE; /* enable clock */ setbits_le32(&pwmss->clkconfig, ECAP_CLK_EN); /* TimeStam Counter register */ writel(0xdb9, &ecap->tsctr); /* config period */ writel(ticks - 1, &ecap->cap3); writel(ticks - 1, &ecap->cap1); setbits_le16(&ecap->ecctl2, (ECTRL2_MDSL_ECAP | ECTRL2_SYNCOSEL_MASK | 0xd0)); /* config duty */ writel(duty, &ecap->cap2); writel(duty, &ecap->cap4); /* start */ setbits_le16(&ecap->ecctl2, ECTRL2_CTRSTP_FREERUN); return 0; } static struct dpll_regs dpll_lcd_regs = { .cm_clkmode_dpll = CM_WKUP + 0x98, .cm_idlest_dpll = CM_WKUP + 0x48, .cm_clksel_dpll = CM_WKUP + 0x54, }; /* no console on this board */ int board_cfb_skip(void) { return 1; } #define PLL_GET_M(v) ((v >> 8) & 0x7ff) #define PLL_GET_N(v) (v & 0x7f) static int get_clk(struct dpll_regs *dpll_regs) { unsigned int val; unsigned int m, n; int f = 0; val = readl(dpll_regs->cm_clksel_dpll); m = PLL_GET_M(val); n = PLL_GET_N(val); f = (m * V_OSCK) / n; return f; }; int clk_get(int clk) { return get_clk(&dpll_lcd_regs); }; static int conf_disp_pll(int m, int n) { struct cm_perpll *cmper = (struct cm_perpll *)CM_PER; struct cm_dpll *cmdpll = (struct cm_dpll *)CM_DPLL; struct dpll_params dpll_lcd = {m, n, -1, -1, -1, -1, -1}; u32 *const clk_domains[] = { &cmper->lcdclkctrl, 0 }; u32 *const clk_modules_explicit_en[] = { &cmper->lcdclkctrl, &cmper->lcdcclkstctrl, &cmper->epwmss0clkctrl, 0 }; do_enable_clocks(clk_domains, clk_modules_explicit_en, 1); writel(0x0, &cmdpll->clklcdcpixelclk); do_setup_dpll(&dpll_lcd_regs, &dpll_lcd); return 0; } static int board_video_init(void) { conf_disp_pll(24, 1); if (factory_dat.pxm50) da8xx_video_init(&lcd_panels[0], &lcd_cfg, lcd_cfg.bpp); else da8xx_video_init(&lcd_panels[1], &lcd_cfg, lcd_cfg.bpp); enable_pwm(); enable_backlight(); return 0; } #endif #include "../common/board.c"
{ "pile_set_name": "Github" }
/** * editor_plugin_src.js * * Copyright 2009, Moxiecode Systems AB * Released under LGPL License. * * License: http://tinymce.moxiecode.com/license * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { var DOM = tinymce.DOM; tinymce.create('tinymce.plugins.FullScreenPlugin', { init : function(ed, url) { var t = this, s = {}, vp, posCss; t.editor = ed; // Register commands ed.addCommand('mceFullScreen', function() { var win, de = DOM.doc.documentElement; if (ed.getParam('fullscreen_is_enabled')) { if (ed.getParam('fullscreen_new_window')) closeFullscreen(); // Call to close in new window else { DOM.win.setTimeout(function() { tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc); tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent()); tinyMCE.remove(ed); DOM.remove('mce_fullscreen_container'); de.style.overflow = ed.getParam('fullscreen_html_overflow'); DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow')); DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly')); tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings }, 10); } return; } if (ed.getParam('fullscreen_new_window')) { win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); try { win.resizeTo(screen.availWidth, screen.availHeight); } catch (e) { // Ignore } } else { tinyMCE.oldSettings = tinyMCE.settings; // Store old settings s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto'; s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1); vp = DOM.getViewPort(); s.fullscreen_scrollx = vp.x; s.fullscreen_scrolly = vp.y; // Fixes an Opera bug where the scrollbars doesn't reappear if (tinymce.isOpera && s.fullscreen_overflow == 'visible') s.fullscreen_overflow = 'auto'; // Fixes an IE bug where horizontal scrollbars would appear if (tinymce.isIE && s.fullscreen_overflow == 'scroll') s.fullscreen_overflow = 'auto'; // Fixes an IE bug where the scrollbars doesn't reappear if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll')) s.fullscreen_html_overflow = 'auto'; if (s.fullscreen_overflow == '0px') s.fullscreen_overflow = ''; DOM.setStyle(DOM.doc.body, 'overflow', 'hidden'); de.style.overflow = 'hidden'; //Fix for IE6/7 vp = DOM.getViewPort(); DOM.win.scrollTo(0, 0); if (tinymce.isIE) vp.h -= 1; // Use fixed position if it exists if (tinymce.isIE6) posCss = 'absolute;top:' + vp.y; else posCss = 'fixed;top:0'; n = DOM.add(DOM.doc.body, 'div', { id : 'mce_fullscreen_container', style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'}); DOM.add(n, 'div', {id : 'mce_fullscreen'}); tinymce.each(ed.settings, function(v, n) { s[n] = v; }); s.id = 'mce_fullscreen'; s.width = n.clientWidth; s.height = n.clientHeight - 15; s.fullscreen_is_enabled = true; s.fullscreen_editor_id = ed.id; s.theme_advanced_resizing = false; s.save_onsavecallback = function() { ed.setContent(tinyMCE.get(s.id).getContent()); ed.execCommand('mceSave'); }; tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) { s[k] = v; }); if (s.theme_advanced_toolbar_location === 'external') s.theme_advanced_toolbar_location = 'top'; t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s); t.fullscreenEditor.onInit.add(function() { t.fullscreenEditor.setContent(ed.getContent()); t.fullscreenEditor.focus(); }); t.fullscreenEditor.render(); t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container'); t.fullscreenElement.update(); //document.body.overflow = 'hidden'; t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() { var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize; // Get outer/inner size to get a delta size that can be used to calc the new iframe size outerSize = fed.dom.getSize(fed.getContainer().firstChild); innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]); fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h); }); } }); // Register buttons ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'}); ed.onNodeChange.add(function(ed, cm) { cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled')); }); }, getInfo : function() { return { longname : 'Fullscreen', author : 'Moxiecode Systems AB', authorurl : 'http://tinymce.moxiecode.com', infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen', version : tinymce.majorVersion + "." + tinymce.minorVersion }; } }); // Register plugin tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin); })();
{ "pile_set_name": "Github" }
# /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002-2011) */ # /* Revised by Edward Diener (2011,2015) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_EAT_HPP # define BOOST_PREPROCESSOR_TUPLE_EAT_HPP # # include <boost/preprocessor/config/config.hpp> # # /* BOOST_PP_EAT */ # # if BOOST_PP_VARIADICS # define BOOST_PP_EAT(...) # else # define BOOST_PP_EAT(x) # endif # # /* BOOST_PP_TUPLE_EAT */ # # if BOOST_PP_VARIADICS # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_EAT # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_I(size) # else # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_OO((size)) # define BOOST_PP_TUPLE_EAT_OO(par) BOOST_PP_TUPLE_EAT_I ## par # endif # define BOOST_PP_TUPLE_EAT_I(size) BOOST_PP_TUPLE_EAT_ ## size # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_EAT_N(size) BOOST_PP_TUPLE_EAT_N_I(size) # else # define BOOST_PP_TUPLE_EAT_N(size) BOOST_PP_TUPLE_EAT_N_OO((size)) # define BOOST_PP_TUPLE_EAT_N_OO(par) BOOST_PP_TUPLE_EAT_N_I ## par # endif # define BOOST_PP_TUPLE_EAT_N_I(size) BOOST_PP_TUPLE_EAT_ ## size # # define BOOST_PP_TUPLE_EAT_1(e0) # define BOOST_PP_TUPLE_EAT_2(e0, e1) # define BOOST_PP_TUPLE_EAT_3(e0, e1, e2) # define BOOST_PP_TUPLE_EAT_4(e0, e1, e2, e3) # define BOOST_PP_TUPLE_EAT_5(e0, e1, e2, e3, e4) # define BOOST_PP_TUPLE_EAT_6(e0, e1, e2, e3, e4, e5) # define BOOST_PP_TUPLE_EAT_7(e0, e1, e2, e3, e4, e5, e6) # define BOOST_PP_TUPLE_EAT_8(e0, e1, e2, e3, e4, e5, e6, e7) # define BOOST_PP_TUPLE_EAT_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) # define BOOST_PP_TUPLE_EAT_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) # define BOOST_PP_TUPLE_EAT_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) # define BOOST_PP_TUPLE_EAT_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) # define BOOST_PP_TUPLE_EAT_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) # define BOOST_PP_TUPLE_EAT_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) # define BOOST_PP_TUPLE_EAT_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) # define BOOST_PP_TUPLE_EAT_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) # define BOOST_PP_TUPLE_EAT_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) # define BOOST_PP_TUPLE_EAT_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) # define BOOST_PP_TUPLE_EAT_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) # define BOOST_PP_TUPLE_EAT_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) # define BOOST_PP_TUPLE_EAT_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) # define BOOST_PP_TUPLE_EAT_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) # define BOOST_PP_TUPLE_EAT_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) # define BOOST_PP_TUPLE_EAT_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) # define BOOST_PP_TUPLE_EAT_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) # define BOOST_PP_TUPLE_EAT_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) # define BOOST_PP_TUPLE_EAT_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) # define BOOST_PP_TUPLE_EAT_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) # define BOOST_PP_TUPLE_EAT_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) # define BOOST_PP_TUPLE_EAT_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) # define BOOST_PP_TUPLE_EAT_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) # define BOOST_PP_TUPLE_EAT_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) # define BOOST_PP_TUPLE_EAT_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) # define BOOST_PP_TUPLE_EAT_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) # define BOOST_PP_TUPLE_EAT_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) # define BOOST_PP_TUPLE_EAT_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) # define BOOST_PP_TUPLE_EAT_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) # define BOOST_PP_TUPLE_EAT_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) # define BOOST_PP_TUPLE_EAT_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) # define BOOST_PP_TUPLE_EAT_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) # define BOOST_PP_TUPLE_EAT_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) # define BOOST_PP_TUPLE_EAT_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) # define BOOST_PP_TUPLE_EAT_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) # define BOOST_PP_TUPLE_EAT_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) # define BOOST_PP_TUPLE_EAT_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) # define BOOST_PP_TUPLE_EAT_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) # define BOOST_PP_TUPLE_EAT_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) # define BOOST_PP_TUPLE_EAT_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) # define BOOST_PP_TUPLE_EAT_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) # define BOOST_PP_TUPLE_EAT_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) # define BOOST_PP_TUPLE_EAT_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) # define BOOST_PP_TUPLE_EAT_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) # define BOOST_PP_TUPLE_EAT_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) # define BOOST_PP_TUPLE_EAT_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) # define BOOST_PP_TUPLE_EAT_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) # define BOOST_PP_TUPLE_EAT_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) # define BOOST_PP_TUPLE_EAT_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) # define BOOST_PP_TUPLE_EAT_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) # define BOOST_PP_TUPLE_EAT_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) # define BOOST_PP_TUPLE_EAT_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) # define BOOST_PP_TUPLE_EAT_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) # define BOOST_PP_TUPLE_EAT_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) # define BOOST_PP_TUPLE_EAT_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) # define BOOST_PP_TUPLE_EAT_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) # # endif
{ "pile_set_name": "Github" }
/* * "streamable kanji code filter and converter" * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. * * LICENSE NOTICES * * This file is part of "streamable kanji code filter and converter", * which is distributed under the terms of GNU Lesser General Public * License (version 2) as published by the Free Software Foundation. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with "streamable kanji code filter and converter"; * if not, write to the Free Software Foundation, Inc., 59 Temple Place, * Suite 330, Boston, MA 02111-1307 USA * * The author of this file: * */ /* * The source code included in this files was separated from mbfilter_ja.h * by moriyoshi koizumi <[email protected]> on 4 dec 2002. * */ #ifndef MBFL_MBFILTER_EUC_JP_WIN_H #define MBFL_MBFILTER_EUC_JP_WIN_H #include "mbfilter.h" extern const mbfl_encoding mbfl_encoding_eucjp_win; extern const struct mbfl_identify_vtbl vtbl_identify_eucjpwin; extern const struct mbfl_convert_vtbl vtbl_eucjpwin_wchar; extern const struct mbfl_convert_vtbl vtbl_wchar_eucjpwin; int mbfl_filt_conv_eucjpwin_wchar(int c, mbfl_convert_filter *filter); int mbfl_filt_conv_wchar_eucjpwin(int c, mbfl_convert_filter *filter); #endif /* MBFL_MBFILTER_EUC_JP_WIN_H */
{ "pile_set_name": "Github" }
import { useFlag } from '@console/shared/src/hooks/flag'; import { K8sKind } from '@console/internal/module/k8s'; import { NODE_MAINTENANCE_FLAG, NODE_MAINTENANCE_OLD_FLAG } from '../features'; import { NodeMaintenanceModel, NodeMaintenanceOldModel } from '../models'; export const useMaintenanceCapability = (): [boolean, K8sKind] => { const hasNodeMaintenanceCapability = useFlag(NODE_MAINTENANCE_FLAG); const hasNodeMaintenanceOldCapability = useFlag(NODE_MAINTENANCE_OLD_FLAG); return [ hasNodeMaintenanceCapability || hasNodeMaintenanceOldCapability, hasNodeMaintenanceCapability ? NodeMaintenanceModel : NodeMaintenanceOldModel, ]; };
{ "pile_set_name": "Github" }
# BAtoHilmRhoH Calculate iteratively the relief along an interface with lateral density variations that corresponds to a given Bouguer anomaly using the algorithm of Wieczorek and Phillips (1998). # Usage call BAtoHilmRhoH (`cilm`, `ba`, `grid`, `lmax`, `nmax`, `mass`, `r0`, `rho`, `gridtype`, `w`, `plx`, `zero`, `filtertype`, `filterdeg`, `lmaxcalc`, `exitstatus`) # Parameters `cilm` : output, real(dp), dimension (2, `lmaxcalc`+1, `lmaxcalc`+1) : An estimate of the real spherical harmonic coefficients (geodesy normalized) of relief along an interface with lateraly varying density contrast `rho` that satisfies the Bouguer anomaly `ba`. The degree-zero term corresponds to the mean radius of the relief. `ba` : input, real(dp), dimension (2, `lmaxcalc`+1, `lmaxcalc`+1) : The real spherical harmonic coefficients of the Bouguer anomaly referenced to a spherical interface `r0`. `grid` : input, real(dp), dimension (`lmax`+1, 2\*`lmax`+1) for `gridtype` 1, (2\*`lmax`+2, 2\*`lmax`+2) for `gridtype` 2, (2\*`lmax`+2, 4\*`lmax`+4) for `gridtype` 3 : The initial estimate for the radii of the interface evaluated on a grid corresponding to a function of maximum spherical harmonic degree `lmax`. This is calculated by a call to either `MakeGridGLQ` or `MakeGridDH`. This grid must contain the degree-0 average radius of the interface. `lmax` : input, integer : The spherical harmonic bandwidth of the input relief `grid`, which determines the dimensions of `grid`. If `lmaxcalc` is not set, this determines also the maximum spherical harmonic degree of the output spherical harmonic coefficients of the relief and the input spherical harmonics of the Bouguer anomaly. `nmax` : input, integer : The maximum order used in the Taylor-series expansion used in calculating the potential coefficients. `mass` : input, real(dp) : The mass of the planet in kg. `r0` : input, real(dp) : The reference radius of the Bouguer anomaly `ba`. `rho` : input, real(dp), dimension (`lmax`+1, 2\*`lmax`+1) for `gridtype` 1, (2\*`lmax`+2, 2\*`lmax`+2) for `gridtype` 2, (2\*`lmax`+2, 4\*`lmax`+4) for `gridtype` 3 : The density contrast of the relief in kg/m^3, with the same dimensions as `grid`. `gridtype` : input, integer : 1 = Gauss-Legendre grids, calculated using `SHGLQ` and `MakeGridGLQ`. 2 = Equally sampled Driscoll-Healy grids, `n` by `n`, calculated using `MakeGridDH`. 3 = Equally spaced Driscoll-Healy grids, `n` by 2`n`, calculated using `MakeGridDH`. `w` : optional, input, real(dp), dimension (`lmax`+1) : The weights used in the Gauss-Legendre quadrature. These are calculated from a call to `SHGLQ`. If present, one of `plx` or `zero` must also be present. `plx` : optional, input, real(dp), dimension (`lmax`+1, (`lmax`+1)\*(`lmax`+2)/2) : An array of the associated Legendre functions calculated at the nodes used in the Gauss-Legendre quadrature. These are determined from a call to `SHGLQ`. `zero` : optional, input, real(dp), dimension (`lmax`+1) : The nodes used in the Gauss-Legendre quadrature over latitude, calculated by a call to `SHGLQ`. `filtertype` : optional, input, integer, default = 0 : Apply a filter when calculating the relief in order to minimize the destabilizing effects of downward continuation which amplify uncertainties in the Bouguer anomaly. If 0, no filtering is applied. If 1, use the minimum amplitude filter `DownContFilterMA`. If 2, use the minimum curvature filter `DownContFilterMC`. `filterdeg` : optional, input, integer : The spherical harmonic degree for which the filter is 0.5. `lmaxcalc` : optional, input, integer, default = `lmax` : The maximum degree that will be calculated in the spherical harmonic expansions. `exitstatus` : output, optional, integer : If present, instead of executing a STOP when an error is encountered, the variable exitstatus will be returned describing the error. 0 = No errors; 1 = Improper dimensions of input array; 2 = Improper bounds for input variable; 3 = Error allocating memory; 4 = File IO error. # Description `BAtoHilmRhoH` is used to solve iteratively for the relief along an interface with lateral variations in density that corresponds to a given Bouguer anomaly. This is equation 18 of Wieczorek and Phillips (1998), modified to account for density variations as in equation 30 of Wieczorek 2007, which implicitly takes into consideration the finite-amplitude correction. Each iteration takes as input a guess for the relief and outputs the iteratively improved spherical harmonic coefficients of this relief. These coefficients can then be re-expanded and re-input into this routine as the next guess. For the initial guess, it is often sufficient to use the relief predicted using the first-order "mass sheet" approximation. The input relief `grid` can be of one of three type specified by `gridtype`: 1 for Gauss-Legendre grids, 2 for equally sampled Driscoll-Healy grids (`n` by `n`), and 3 for equally spaced Driscoll-Healy grids (`n` by 2`n`). If the algorithm does not converge, one might want to try damping the initial estimate. Alternatively, iterations of the following form have proven successfulin in damping oscilations between successive iterations: `h3 = (h2+h1)/2` `h4 = f(h3)` It is important to understand that as an intermediate step, this routine calculates the spherical harmonic coefficients of the density multiplied by the relief raised to the nth power. As such, if the input function is bandlimited to degree `L`, the resulting function will thus be bandlimited to degree `L*nmax`. This subroutine implicitly assumes that `lmax` is greater than or equal to `L*nmax`. If this is not the case, then aliasing will occur. In practice, for accurate results, it is found that `lmax` needs only to be about twice the size of `L`, though this should be verified for each application. Thus, if the input function is considered to be bandlimited to degree `L`, the function should be evaluated on a grid corresponding to a maximum degree of about `2L`. If the input grid is evaluated on the Gauss-Legendre points, it is necessary to specify the optional parameters `w` and` zero`, or `w` and `plx`, which are calculated by a call to `SHGLQ`. If memory is not an issue, the algorithm can be speeded up by inputing the optional array `plx` of precomputed associated Legendre functions on the Gauss-Legendre nodes. If `plx` is not specified, then it is necessary to input the optional array `zero` that contains the latitudinal Gauss-Legendre quadrature nodes. This routine uses geodesy 4-pi normalized spherical harmonics that exclude the Condon-Shortley phase; This can not be modified. # References Wieczorek, M. A. and R. J. Phillips, Potential anomalies on a sphere: applications to the thickness of the lunar crust, J. Geophys. Res., 103, 1715-1724, 1998. # See also [batohilm](batohilm.html), [cilmplus](cilmplus.html), [cilmplusrhoh](cilmplusrhoh.html), [shexpandglq](shexpandglq.html), [makegridglq](makegridglq.html), [shglq](shglq.html), [shexpanddh](shexpanddh.html), [makegriddh](makegriddh.html), [glqgridcoord](glqgridcoord.html), [downcontfilterma](downcontfilterma.html), [downcontfiltermc](downcontfiltermc.html)
{ "pile_set_name": "Github" }
// // Observable+Bind.swift // Rx // // Created by Krunoslav Zaher on 8/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // import Foundation #if !RX_NO_MODULE import RxSwift #endif extension ObservableType { /** Creates new subscription and sends elements to observer. In this form it's equivalent to `subscribe` method, but it communicates intent better, and enables writing more consistent binding code. - parameter observer: Observer that receives events. - returns: Disposable object that can be used to unsubscribe the observer. */ @warn_unused_result(message="http://git.io/rxs.ud") public func bindTo<O: ObserverType where O.E == E>(observer: O) -> Disposable { return self.subscribe(observer) } /** Creates new subscription and sends elements to variable. In case error occurs in debug mode, `fatalError` will be raised. In case error occurs in release mode, `error` will be logged. - parameter variable: Target variable for sequence elements. - returns: Disposable object that can be used to unsubscribe the observer. */ @warn_unused_result(message="http://git.io/rxs.ud") public func bindTo(variable: Variable<E>) -> Disposable { return subscribe { e in switch e { case let .Next(element): variable.value = element case let .Error(error): let error = "Binding error to variable: \(error)" #if DEBUG rxFatalError(error) #else print(error) #endif case .Completed: break } } } /** Subscribes to observable sequence using custom binder function. - parameter binder: Function used to bind elements from `self`. - returns: Object representing subscription. */ @warn_unused_result(message="http://git.io/rxs.ud") public func bindTo<R>(binder: Self -> R) -> R { return binder(self) } /** Subscribes to observable sequence using custom binder function and final parameter passed to binder function after `self` is passed. public func bindTo<R1, R2>(binder: Self -> R1 -> R2, curriedArgument: R1) -> R2 { return binder(self)(curriedArgument) } - parameter binder: Function used to bind elements from `self`. - parameter curriedArgument: Final argument passed to `binder` to finish binding process. - returns: Object representing subscription. */ @warn_unused_result(message="http://git.io/rxs.ud") public func bindTo<R1, R2>(binder: Self -> R1 -> R2, curriedArgument: R1) -> R2 { return binder(self)(curriedArgument) } /** Subscribes an element handler to an observable sequence. In case error occurs in debug mode, `fatalError` will be raised. In case error occurs in release mode, `error` will be logged. - parameter onNext: Action to invoke for each element in the observable sequence. - returns: Subscription object used to unsubscribe from the observable sequence. */ @warn_unused_result(message="http://git.io/rxs.ud") public func bindNext(onNext: E -> Void) -> Disposable { return subscribe(onNext: onNext, onError: { error in let error = "Binding error: \(error)" #if DEBUG rxFatalError(error) #else print(error) #endif }) } }
{ "pile_set_name": "Github" }
header formats arrayFormat <api> ^2
{ "pile_set_name": "Github" }
const devMiddleware = require('webpack-dev-middleware') module.exports = (compiler, opts) => { const expressMiddleware = devMiddleware(compiler, opts) return async (ctx, next) => { await expressMiddleware(ctx.req, { end: (content) => { ctx.body = content }, setHeader: (name, value) => { ctx.set(name, value) } }, next) } }
{ "pile_set_name": "Github" }
// Boost.Geometry // Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERIOR_ITERATOR_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERIOR_ITERATOR_HPP #include <boost/range/iterator.hpp> #include <boost/range/value_type.hpp> #include <boost/geometry/core/interior_type.hpp> namespace boost { namespace geometry { #ifndef DOXYGEN_NO_DETAIL namespace detail { /*! \brief Structure defining the type of interior rings iterator \note If the Geometry is const, const iterator is defined. \tparam Geometry \tparam_geometry */ template <typename Geometry> struct interior_iterator { typedef typename boost::range_iterator < typename geometry::interior_type<Geometry>::type >::type type; }; template <typename BaseT, typename T> struct copy_const { typedef T type; }; template <typename BaseT, typename T> struct copy_const<BaseT const, T> { typedef T const type; }; template <typename Geometry> struct interior_ring_iterator { typedef typename boost::range_iterator < typename copy_const < typename geometry::interior_type<Geometry>::type, typename boost::range_value < typename geometry::interior_type<Geometry>::type >::type >::type >::type type; }; } // namespace detail #endif // DOXYGEN_NO_DETAIL }} // namespace boost::geometry #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERIOR_ITERATOR_HPP
{ "pile_set_name": "Github" }
///////////////////////////////////////////////////////////////////////// // $Id$ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2013 Volker Ruppert // Copyright (C) 2001-2017 The Bochs Project // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ///////////////////////////////////////////////////////////////////////// #ifndef BX_COMPAT_H #define BX_COMPAT_H // copied from bochs.h #ifdef WIN32 # include <windows.h> #endif #include <stdio.h> #include <stdlib.h> #include <errno.h> #ifndef _MSC_VER # include <unistd.h> #else # include <io.h> #endif #include <time.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #ifdef BXIMAGE // copied from siminterface.h enum { BX_HDIMAGE_MODE_FLAT, BX_HDIMAGE_MODE_CONCAT, BX_HDIMAGE_MODE_EXTDISKSIM, BX_HDIMAGE_MODE_DLL_HD, BX_HDIMAGE_MODE_SPARSE, BX_HDIMAGE_MODE_VMWARE3, BX_HDIMAGE_MODE_VMWARE4, BX_HDIMAGE_MODE_UNDOABLE, BX_HDIMAGE_MODE_GROWING, BX_HDIMAGE_MODE_VOLATILE, BX_HDIMAGE_MODE_VVFAT, BX_HDIMAGE_MODE_VPC, BX_HDIMAGE_MODE_VBOX }; #define BX_HDIMAGE_MODE_LAST BX_HDIMAGE_MODE_VBOX #define BX_HDIMAGE_MODE_UNKNOWN -1 extern const char *hdimage_mode_names[]; #endif // definitions for compatibility with Bochs #ifndef UNUSED # define UNUSED(x) ((void)x) #endif #ifdef BXIMAGE #define BX_DEBUG(x) #define BX_INFO(x) { if (bx_interactive) { (printf) x ; printf("\n"); } } #define BX_ERROR(x) { (printf) x ; printf("\n"); } #define BX_PANIC(x) { (printf) x ; printf("\n"); myexit(1); } #define BX_FATAL(x) { (printf) x ; printf("\n"); myexit(1); } #else #define BX_DEBUG(x) { if (bx_loglev == 3) { (printf) x ; printf("\n"); } } #define BX_INFO(x) { if (bx_loglev >= 2) { (printf) x ; printf("\n"); } } #define BX_ERROR(x) { if (bx_loglev >= 1) { (printf) x ; printf("\n"); } } #endif #define BX_ASSERT(x) #ifdef BXIMAGE extern int bx_interactive; class device_image_t; void myexit(int code); device_image_t* init_image(Bit8u image_mode); #define DEV_hdimage_init_image(a,b,c) init_image(a) #else #define BX_PATHNAME_LEN 512 extern int bx_loglev; #endif #endif
{ "pile_set_name": "Github" }
/** * Copyright (c) 2010 Johns Hopkins University. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * - Neither the name of the copyright holders nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SOURCEROUTING_H #define SOURCEROUTING_H #include "AM.h" #include "message.h" #define UQ_SRP_CLIENT "SRP.client" enum { SRP_MAX_PATHLEN = 10, AM_SRP = 0x76, }; typedef uint8_t sourceroute_id_t; typedef nx_uint8_t nx_sourceroute_id_t; //TODO: for generic sub-layers, route should be a nx_uint8_t[] typedef nx_struct { nx_uint8_t sr_len; nx_uint8_t hops_left; nx_uint8_t seqno; nx_sourceroute_id_t payload_id; nx_am_addr_t route[SRP_MAX_PATHLEN]; } sr_header_t; #endif
{ "pile_set_name": "Github" }
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace Kafka.Client.ZooKeeperIntegration.Listeners { using Kafka.Client.Cfg; using Kafka.Client.Cluster; using Kafka.Client.Consumers; using Kafka.Client.Exceptions; using Kafka.Client.Requests; using Kafka.Client.Utils; using Kafka.Client.ZooKeeperIntegration.Events; using log4net; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Configuration; using System.Globalization; using System.Linq; using System.Reflection; using System.Threading; using System.Threading.Tasks; using ZooKeeperNet; internal class ZKRebalancerListener<TData> : IZooKeeperChildListener { public static log4net.ILog Logger = log4net.LogManager.GetLogger("ZKRebalancerListener"); public event EventHandler ConsumerRebalance; private IDictionary<string, IList<string>> oldPartitionsPerTopicMap = new Dictionary<string, IList<string>>(); private IDictionary<string, IList<string>> oldConsumersPerTopicMap = new Dictionary<string, IList<string>>(); private IDictionary<string, IDictionary<int, PartitionTopicInfo>> topicRegistry; private readonly IDictionary<Tuple<string, string>, BlockingCollection<FetchedDataChunk>> queues; private readonly string consumerIdString; private readonly object syncLock = new object(); private readonly object asyncLock = new object(); private readonly ConsumerConfiguration config; private readonly IZooKeeperClient zkClient; private readonly ZKGroupDirs dirs; private readonly Fetcher fetcher; private readonly ZookeeperConsumerConnector zkConsumerConnector; private readonly IDictionary<string, IList<KafkaMessageStream<TData>>> kafkaMessageStreams; private readonly TopicCount topicCount; private volatile CancellationTokenSource rebalanceCancellationTokenSource = new CancellationTokenSource(); private volatile bool isRebalanceRunning = false; internal ZKRebalancerListener( ConsumerConfiguration config, string consumerIdString, IDictionary<string, IDictionary<int, PartitionTopicInfo>> topicRegistry, IZooKeeperClient zkClient, ZookeeperConsumerConnector zkConsumerConnector, IDictionary<Tuple<string, string>, BlockingCollection<FetchedDataChunk>> queues, Fetcher fetcher, IDictionary<string, IList<KafkaMessageStream<TData>>> kafkaMessageStreams, TopicCount topicCount) { this.consumerIdString = consumerIdString; this.config = config; this.topicRegistry = topicRegistry; this.zkClient = zkClient; this.dirs = new ZKGroupDirs(config.GroupId); this.zkConsumerConnector = zkConsumerConnector; this.queues = queues; this.fetcher = fetcher; this.kafkaMessageStreams = kafkaMessageStreams; this.topicCount = topicCount; } /// <summary> /// Called when the children of the given path changed /// </summary> /// <param name="args">The <see cref="Kafka.Client.ZooKeeperIntegration.Events.ZooKeeperChildChangedEventArgs"/> instance containing the event data /// as parent path and children (null if parent was deleted). /// </param> /// <remarks> /// http://zookeeper.wiki.sourceforge.net/ZooKeeperWatches /// </remarks> public void HandleChildChange(ZooKeeperChildChangedEventArgs args) { Guard.NotNull(args, "args"); Guard.NotNullNorEmpty(args.Path, "args.Path"); Guard.NotNull(args.Children, "args.Children"); Logger.Info("Performing rebalancing. Consumers have been added or removed from the consumer group: " + args.Path); AsyncRebalance(); } /// <summary> /// Resets the state of listener. /// </summary> public void ResetState() { Logger.Info("enter ResetState ..."); try { zkClient.SlimLock.EnterWriteLock(); this.topicRegistry.Clear(); } catch (Exception ex) { Logger.ErrorFormat("error in ResetState : {0}", ex.FormatException()); } finally { zkClient.SlimLock.ExitWriteLock(); } this.oldConsumersPerTopicMap.Clear(); this.oldPartitionsPerTopicMap.Clear(); Logger.Info("finish ResetState."); } public void AsyncRebalance(int waitRebalanceFinishTimeoutInMs = 0) { lock (this.asyncLock) { // Stop currently running rebalance StopRebalance(); // Run new rebalance operation asynchronously Logger.Info("Asynchronously running rebalance operation"); Task.Factory.StartNew(() => SyncedRebalance(rebalanceCancellationTokenSource)); // Set flag to indicate that rebalance is running isRebalanceRunning = true; } if (waitRebalanceFinishTimeoutInMs > 0) { DateTime timeStartWait = DateTime.UtcNow; while (isRebalanceRunning == true) { Logger.Info("Waiting for rebalance operation finish"); Thread.Sleep(100); if ((DateTime.UtcNow - timeStartWait).TotalMilliseconds > waitRebalanceFinishTimeoutInMs) { Logger.WarnFormat("After wait more than {0} ms, the latest isRebalanceRunning:{1} ", waitRebalanceFinishTimeoutInMs, isRebalanceRunning); break; } } Logger.InfoFormat("Finish Wait for rebalance operation. isRebalanceRunning:{0}", isRebalanceRunning); } } public void StopRebalance() { // Pulse cancellation token to stop currently running rebalance operation Logger.Info("Pulsing cancellation token to stop currently running rebalance operation"); rebalanceCancellationTokenSource.Cancel(); // Wait until rebalance operation has successfully terminated while (isRebalanceRunning == true) { Logger.Info("Waiting for rebalance operation to successfully terminate"); Thread.Sleep(1000); } // Now it is safe to reset cancellation token source Logger.Info("Create cancellation token"); rebalanceCancellationTokenSource = new CancellationTokenSource(); } public void ShutdownFetchers() { if (this.fetcher != null) { this.fetcher.Shutdown(); } foreach (KeyValuePair<string, IDictionary<int, PartitionTopicInfo>> topic in topicRegistry) { foreach (KeyValuePair<int, PartitionTopicInfo> partition in topic.Value) { partition.Value.ConsumeOffsetValid = false; } } } protected virtual void OnConsumerRebalance(EventArgs args) { try { EventHandler handler = ConsumerRebalance; if (handler != null) { handler(this, args); } } catch (Exception ex) { Logger.Error("Exception occurred within event handler for ConsumerRebalance event: " + ex.Message); } } private void SyncedRebalance(CancellationTokenSource cancellationTokenSource) { Logger.InfoFormat("Consumer {0} has entered rebalance", consumerIdString); lock (this.syncLock) { while (!cancellationTokenSource.IsCancellationRequested) { // Notify listeners that a rebalance is occurring OnConsumerRebalance(EventArgs.Empty); Logger.InfoFormat("Begin rebalancing consumer {0}", consumerIdString); try { // Query ZooKeeper for current broker metadata var cluster = new Cluster(zkClient); // Begin consumer rebalance if (Rebalance(cluster, cancellationTokenSource)) { Logger.InfoFormat("End rebalancing consumer {0}", consumerIdString); break; } else { Logger.ErrorFormat("Rebalance return false, will retry. "); } } catch (ObjectDisposedException objDisposedEx) { // some lower methods have methods like EnsureNotDisposed() implemented and so we should expect to catch here Logger.InfoFormat("ObjectDisposedException in rebalance. Assume end of SyncedRebalance. Exception occurred during rebalance {1} for consumer {2}", this.config.ConsumeGroupRebalanceRetryIntervalMs, objDisposedEx.FormatException(), consumerIdString); cancellationTokenSource.Cancel(); } catch (Exception ex) { // Some unknown exception occurred, bail Logger.ErrorFormat("Exception in rebalance. Will retry after {0} ms. Exception occurred during rebalance {1} for consumer {2}", this.config.ConsumeGroupRebalanceRetryIntervalMs, ex.FormatException(), consumerIdString); Thread.Sleep(this.config.ConsumeGroupRebalanceRetryIntervalMs); continue; } } // Clear flag on exit to indicate rebalance has completed isRebalanceRunning = false; } Logger.InfoFormat("Consumer {0} has exited rebalance", consumerIdString); } private bool Rebalance(Cluster cluster, CancellationTokenSource cancellationTokenSource) { TopicCount topicCount = this.GetTopicCount(this.consumerIdString); IDictionary<string, IList<string>> topicThreadIdsMap = topicCount.GetConsumerThreadIdsPerTopic(); if (!topicThreadIdsMap.Any()) { Logger.ErrorFormat("Consumer ID is not registered to any topics in ZK. Exiting rebalance"); return false; } var consumersPerTopicMap = this.GetConsumersPerTopic(this.config.GroupId); var brokers = ZkUtils.GetAllBrokersInCluster(zkClient); if (!brokers.Any()) { Logger.Warn("No brokers found when trying to rebalance."); zkClient.Subscribe(ZooKeeperClient.DefaultBrokerIdsPath, this); this.zkConsumerConnector.subscribedChildCollection.Add(new Tuple<string, IZooKeeperChildListener>(ZooKeeperClient.DefaultBrokerIdsPath, this)); Logger.ErrorFormat("Subscribe count: subscribedChildCollection:{0} , subscribedZookeeperStateCollection:{1} subscribedZookeeperDataCollection:{2} " , this.zkConsumerConnector.subscribedChildCollection.Count, this.zkConsumerConnector.subscribedZookeeperStateCollection.Count, this.zkConsumerConnector.subscribedZookeeperDataCollection.Count); return false; } var partitionsPerTopicMap = ZkUtils.GetPartitionsForTopics(this.zkClient, topicThreadIdsMap.Keys); // Check if we've been canceled externally before we dive into the rebalance if (cancellationTokenSource.IsCancellationRequested) { Logger.ErrorFormat("Rebalance operation has been canceled externally by a future rebalance event. Exiting immediately"); return false; } this.CloseFetchers(cluster, topicThreadIdsMap, this.zkConsumerConnector); this.ReleasePartitionOwnership(topicThreadIdsMap); try { foreach (var item in topicThreadIdsMap) { var topic = item.Key; var consumerThreadIdSet = item.Value; topicRegistry.Add(topic, new ConcurrentDictionary<int, PartitionTopicInfo>()); var topicDirs = new ZKGroupTopicDirs(config.GroupId, topic); List<string> curConsumers = new List<string>(consumersPerTopicMap[topic]); curConsumers.Sort(); List<string> curPartitions = partitionsPerTopicMap[topic].OrderBy(p => int.Parse(p)).ToList(); Logger.InfoFormat( "{4} Partitions. {5} ConsumerClients. Consumer {0} rebalancing the following partitions: {1} for topic {2} with consumers: {3}", this.consumerIdString, string.Join(",", curPartitions), topic, string.Join(",", curConsumers), curPartitions.Count, curConsumers.Count); var numberOfPartsPerConsumer = curPartitions.Count / curConsumers.Count; Logger.Info("Number of partitions per consumer is: " + numberOfPartsPerConsumer); var numberOfConsumersWithExtraPart = curPartitions.Count % curConsumers.Count; Logger.Info("Number of consumers with an extra partition are: " + numberOfConsumersWithExtraPart); foreach (string consumerThreadId in consumerThreadIdSet) { var myConsumerPosition = curConsumers.IndexOf(consumerThreadId); Logger.Info("Consumer position for consumer " + consumerThreadId + " is: " + myConsumerPosition); if (myConsumerPosition < 0) { continue; } var startPart = (numberOfPartsPerConsumer * myConsumerPosition) + Math.Min(myConsumerPosition, numberOfConsumersWithExtraPart); Logger.Info("Starting partition is: " + startPart); var numberOfParts = numberOfPartsPerConsumer + (myConsumerPosition + 1 > numberOfConsumersWithExtraPart ? 0 : 1); Logger.Info("Number of partitions to work on is: " + numberOfParts); if (numberOfParts <= 0) { Logger.InfoFormat("No broker partitions consumed by consumer thread {0} for topic {1}", consumerThreadId, item.Key); } else { for (int i = startPart; i < startPart + numberOfParts; i++) { var partition = curPartitions[i]; Logger.InfoFormat("{0} attempting to claim partition {1}", consumerThreadId, partition); bool ownPartition = ProcessPartition(topicDirs, partition, topic, consumerThreadId, curConsumers, curPartitions, cancellationTokenSource); if (!ownPartition) { Logger.InfoFormat("{0} failed to claim partition {1} for topic {2}. Exiting rebalance", consumerThreadId, partition, topic); return false; } } } } } } catch (Exception ex) { Logger.ErrorFormat("error when rebalance: {0}", ex.FormatException()); return false; } // If we get here, we know that we have owned all partitions successfully, // therefore it is safe to update fetcher threads and begin dequeuing Logger.Info("All partitions were successfully owned. Updating fetchers"); this.UpdateFetcher(cluster); return true; } private bool ProcessPartition(ZKGroupTopicDirs topicDirs, string partition, string topic, string consumerThreadId, List<string> curConsumers, List<string> curPartitions, CancellationTokenSource cancellationTokenSource) { bool partitionOwned = false; // Loop until we can successfully acquire partition, or are canceled by a // future rebalance event var partitionOwnerPath = topicDirs.ConsumerOwnerDir + "/" + partition; while (true) { var currentPartitionOwner = zkClient.ReadData<string>(partitionOwnerPath, true); if (currentPartitionOwner == null || currentPartitionOwner.Equals(consumerThreadId)) { Logger.InfoFormat("{0} is null or equals our consumer ID. Reflect partition ownership in ZK", partitionOwnerPath); AddPartitionTopicInfo(topicDirs, partition, topic, consumerThreadId); if (ReflectPartitionOwnershipDecision(topic, partition, consumerThreadId)) { partitionOwned = true; break; } } if (cancellationTokenSource.IsCancellationRequested) { Logger.Info("Rebalance operation has been canceled externally by a future rebalance event. Exiting immediately"); break; } else { Logger.InfoFormat("{0} exists with value {1}. Sleep and retry ownership attempt", partitionOwnerPath, currentPartitionOwner); Thread.Sleep(1000); } } return partitionOwned; } private bool ReflectPartitionOwnershipDecision(string topic, string partition, string consumerThreadId) { bool ownershipReflected = false; var topicDirs = new ZKGroupTopicDirs(config.GroupId, topic); var partitionOwnerPath = topicDirs.ConsumerOwnerDir + "/" + partition; try { Logger.InfoFormat("Consumer {0} will own partition {1} for topic {2}, will create ZK path {3}", consumerThreadId, partition, topic, partitionOwnerPath); try { zkClient.SlimLock.EnterWriteLock(); ZkUtils.CreateEphemeralPathExpectConflict(zkClient, partitionOwnerPath, consumerThreadId); Logger.InfoFormat("Consumer {0} SUCC owned partition {1} for topic {2} . finish create ZK path {3} .", consumerThreadId, partition, topic, partitionOwnerPath); ownershipReflected = true; } catch (Exception ex) { Logger.InfoFormat("Consumer {0} FAILED owned partition {1} for topic {2} . finish create ZK path {3} error:{4}.", consumerThreadId, partition, topic, partitionOwnerPath, ex.FormatException()); } finally { zkClient.SlimLock.ExitWriteLock(); } } catch (KeeperException e) { if (e.ErrorCode == KeeperException.Code.NODEEXISTS) { Logger.InfoFormat("{0} failed to own partition {1} for topic {2}. Waiting for the partition owner to be deleted", consumerThreadId, partition, topic); ownershipReflected = false; } else throw; } return ownershipReflected; } private void CloseFetchers(Cluster cluster, IDictionary<string, IList<string>> relevantTopicThreadIdsMap, ZookeeperConsumerConnector zkConsumerConnector) { Logger.Info("enter CloseFetchers ..."); var queuesToBeCleared = queues.Where(q => relevantTopicThreadIdsMap.ContainsKey(q.Key.Item1)).Select(q => q.Value).ToList(); CloseFetchersForQueues(cluster, queuesToBeCleared, this.kafkaMessageStreams, zkConsumerConnector); Logger.Info("exit CloseFetchers"); } private void UpdateFetcher(Cluster cluster) { var allPartitionInfos = new List<PartitionTopicInfo>(); foreach (var partitionInfos in this.topicRegistry.Values) { foreach (var partition in partitionInfos.Values) { allPartitionInfos.Add(partition); } } Logger.InfoFormat("Consumer {0} selected partitions : {1}", consumerIdString, string.Join(",", allPartitionInfos.OrderBy(x => x.PartitionId).Select(y => y.ToString()))); if (this.fetcher != null) { this.fetcher.InitConnections(allPartitionInfos, cluster); } } private void AddPartitionTopicInfo(ZKGroupTopicDirs topicDirs, string partition, string topic, string consumerThreadId) { var partitionId = int.Parse(partition); var partTopicInfoMap = this.topicRegistry[topic]; //find the leader for this partition var leaderOpt = ZkUtils.GetLeaderForPartition(this.zkClient, topic, partitionId); if (!leaderOpt.HasValue) { throw new NoBrokersForPartitionException(string.Format("No leader available for partitions {0} on topic {1}", partition, topic)); } else { Logger.InfoFormat("Leader for partition {0} for topic {1} is {2}", partition, topic, leaderOpt.Value); } var leader = leaderOpt.Value; var znode = topicDirs.ConsumerOffsetDir + "/" + partition; var offsetCommitedString = this.zkClient.ReadData<string>(znode, true); //if first time starting a consumer, set the initial offset based on the config long offset = -1; long offsetCommited = -1; if (offsetCommitedString != null) { offsetCommited = long.Parse(offsetCommitedString); offset = offsetCommited + 1; } Logger.InfoFormat("Final offset {0} for topic {1} partition {2} OffsetCommited {3}" , offset, topic, partition, offsetCommited); var queue = this.queues[new Tuple<string, string>(topic, consumerThreadId)]; var partTopicInfo = new PartitionTopicInfo( topic, leader, partitionId, queue, offsetCommited, offset, this.config.FetchSize, offsetCommited); partTopicInfoMap[partitionId] = partTopicInfo; Logger.InfoFormat("{0} selected new offset {1}", partTopicInfo, offset); } private void ReleasePartitionOwnership(IDictionary<string, IList<string>> topicThreadIdsMap) { try { Logger.Info("Will release partition ownership"); this.zkConsumerConnector.ReleaseAllPartitionOwnerships(); Logger.Info("Will clean up topicRegistry ..."); foreach (var item in topicThreadIdsMap) { var topic = item.Key; bool removeTopic = topicRegistry.Remove(topic); Logger.InfoFormat("clean up topicRegistry result for topic {0} is {1} ", topic, removeTopic); } Logger.Info("Finish clean up topicRegistry"); } catch (Exception ex) { Logger.ErrorFormat("error in ReleasePartitionOwnership : {0}", ex.FormatException()); } Logger.Info("Finish release partition ownership"); } private TopicCount GetTopicCount(string consumerId) { var topicCountJson = this.zkClient.ReadData<string>(this.dirs.ConsumerRegistryDir + "/" + consumerId); return TopicCount.ConstructTopicCount(consumerId, topicCountJson); } private IDictionary<string, IList<string>> GetConsumersPerTopic(string group) { var consumers = this.zkClient.GetChildrenParentMayNotExist(this.dirs.ConsumerRegistryDir); var consumersPerTopicMap = new Dictionary<string, IList<string>>(); foreach (var consumer in consumers) { TopicCount topicCount = GetTopicCount(consumer); foreach (KeyValuePair<string, IList<string>> consumerThread in topicCount.GetConsumerThreadIdsPerTopic()) { foreach (string consumerThreadId in consumerThread.Value) { if (!consumersPerTopicMap.ContainsKey(consumerThread.Key)) { consumersPerTopicMap.Add(consumerThread.Key, new List<string> { consumerThreadId }); } else { consumersPerTopicMap[consumerThread.Key].Add(consumerThreadId); } } } } foreach (KeyValuePair<string, IList<string>> item in consumersPerTopicMap) { item.Value.ToList().Sort(); } return consumersPerTopicMap; } private void CloseFetchersForQueues(Cluster cluster, IEnumerable<BlockingCollection<FetchedDataChunk>> queuesToBeCleared, IDictionary<string, IList<KafkaMessageStream<TData>>> kafkaMessageStreams, ZookeeperConsumerConnector zkConsumerConnector) { if (this.fetcher != null) { var allPartitionInfos = new List<PartitionTopicInfo>(); foreach (var item in this.topicRegistry.Values) { foreach (var partitionTopicInfo in item.Values) { allPartitionInfos.Add(partitionTopicInfo); } } fetcher.Shutdown(); fetcher.ClearFetcherQueues(allPartitionInfos, cluster, queuesToBeCleared, kafkaMessageStreams); Logger.Info("Committing all offsets after clearing the fetcher queues"); if (this.config.AutoCommit) { zkConsumerConnector.CommitOffsets(); } } } } }
{ "pile_set_name": "Github" }
.ex2-3-4 pre { text-align: center; } .ex2-3-4 pre span { text-align: left; display: inline-block; white-space: pre; }
{ "pile_set_name": "Github" }
var Stream = require('stream').Stream, util = require('util'), driver = require('websocket-driver'), Headers = require('websocket-driver/lib/websocket/driver/headers'), API = require('./websocket/api'), EventTarget = require('./websocket/api/event_target'), Event = require('./websocket/api/event'); var EventSource = function(request, response, options) { this.writable = true; options = options || {}; this._stream = response.socket; this._ping = options.ping || this.DEFAULT_PING; this._retry = options.retry || this.DEFAULT_RETRY; var scheme = driver.isSecureRequest(request) ? 'https:' : 'http:'; this.url = scheme + '//' + request.headers.host + request.url; this.lastEventId = request.headers['last-event-id'] || ''; this.readyState = API.CONNECTING; var headers = new Headers(), self = this; if (options.headers) { for (var key in options.headers) headers.set(key, options.headers[key]); } if (!this._stream || !this._stream.writable) return; process.nextTick(function() { self._open() }); this._stream.setTimeout(0); this._stream.setNoDelay(true); var handshake = 'HTTP/1.1 200 OK\r\n' + 'Content-Type: text/event-stream\r\n' + 'Cache-Control: no-cache, no-store\r\n' + 'Connection: close\r\n' + headers.toString() + '\r\n' + 'retry: ' + Math.floor(this._retry * 1000) + '\r\n\r\n'; this._write(handshake); this._stream.on('drain', function() { self.emit('drain') }); if (this._ping) this._pingTimer = setInterval(function() { self.ping() }, this._ping * 1000); ['error', 'end'].forEach(function(event) { self._stream.on(event, function() { self.close() }); }); }; util.inherits(EventSource, Stream); EventSource.isEventSource = function(request) { if (request.method !== 'GET') return false; var accept = (request.headers.accept || '').split(/\s*,\s*/); return accept.indexOf('text/event-stream') >= 0; }; var instance = { DEFAULT_PING: 10, DEFAULT_RETRY: 5, _write: function(chunk) { if (!this.writable) return false; try { return this._stream.write(chunk, 'utf8'); } catch (e) { return false; } }, _open: function() { if (this.readyState !== API.CONNECTING) return; this.readyState = API.OPEN; var event = new Event('open'); event.initEvent('open', false, false); this.dispatchEvent(event); }, write: function(message) { return this.send(message); }, end: function(message) { if (message !== undefined) this.write(message); this.close(); }, send: function(message, options) { if (this.readyState > API.OPEN) return false; message = String(message).replace(/(\r\n|\r|\n)/g, '$1data: '); options = options || {}; var frame = ''; if (options.event) frame += 'event: ' + options.event + '\r\n'; if (options.id) frame += 'id: ' + options.id + '\r\n'; frame += 'data: ' + message + '\r\n\r\n'; return this._write(frame); }, ping: function() { return this._write(':\r\n\r\n'); }, close: function() { if (this.readyState > API.OPEN) return false; this.readyState = API.CLOSED; this.writable = false; if (this._pingTimer) clearInterval(this._pingTimer); if (this._stream) this._stream.end(); var event = new Event('close'); event.initEvent('close', false, false); this.dispatchEvent(event); return true; } }; for (var method in instance) EventSource.prototype[method] = instance[method]; for (var key in EventTarget) EventSource.prototype[key] = EventTarget[key]; module.exports = EventSource;
{ "pile_set_name": "Github" }
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/acm-pca/model/ValidityPeriodType.h> #include <aws/core/utils/HashingUtils.h> #include <aws/core/Globals.h> #include <aws/core/utils/EnumParseOverflowContainer.h> using namespace Aws::Utils; namespace Aws { namespace ACMPCA { namespace Model { namespace ValidityPeriodTypeMapper { static const int END_DATE_HASH = HashingUtils::HashString("END_DATE"); static const int ABSOLUTE_HASH = HashingUtils::HashString("ABSOLUTE"); static const int DAYS_HASH = HashingUtils::HashString("DAYS"); static const int MONTHS_HASH = HashingUtils::HashString("MONTHS"); static const int YEARS_HASH = HashingUtils::HashString("YEARS"); ValidityPeriodType GetValidityPeriodTypeForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == END_DATE_HASH) { return ValidityPeriodType::END_DATE; } else if (hashCode == ABSOLUTE_HASH) { return ValidityPeriodType::ABSOLUTE; } else if (hashCode == DAYS_HASH) { return ValidityPeriodType::DAYS; } else if (hashCode == MONTHS_HASH) { return ValidityPeriodType::MONTHS; } else if (hashCode == YEARS_HASH) { return ValidityPeriodType::YEARS; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast<ValidityPeriodType>(hashCode); } return ValidityPeriodType::NOT_SET; } Aws::String GetNameForValidityPeriodType(ValidityPeriodType enumValue) { switch(enumValue) { case ValidityPeriodType::END_DATE: return "END_DATE"; case ValidityPeriodType::ABSOLUTE: return "ABSOLUTE"; case ValidityPeriodType::DAYS: return "DAYS"; case ValidityPeriodType::MONTHS: return "MONTHS"; case ValidityPeriodType::YEARS: return "YEARS"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue)); } return {}; } } } // namespace ValidityPeriodTypeMapper } // namespace Model } // namespace ACMPCA } // namespace Aws
{ "pile_set_name": "Github" }
IMPLEMENTATION MODULE blk; __IMP_SWITCHES__ __RANGECHECK_OFF__ __STACKCHECK_OFF__ __DEBUG_OFF__ #ifdef HM2 #ifdef __LONG_WHOLE__ (*$!i+: Modul muss mit $i- uebersetzt werden! *) (*$!w+: Modul muss mit $w- uebersetzt werden! *) #else (*$!i-: Modul muss mit $i+ uebersetzt werden! *) (*$!w-: Modul muss mit $w+ uebersetzt werden! *) #endif #endif (*****************************************************************************) (* 04-Dez-95, Holger Kleinschmidt *) (*****************************************************************************) INLINE_CODE_IMPORT VAL_INTRINSIC FROM SYSTEM IMPORT (* TYPE *) ADDRESS; FROM PORTAB IMPORT (* TYPE *) UNSIGNEDLONG; FROM types IMPORT (* TYPE *) int, sizeT; (*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*) __PROCFRAME_OFF__ PROCEDURE memswap ((* EIN/ -- *) blk1 : ADDRESS; (* EIN/ -- *) blk2 : ADDRESS; (* EIN/ -- *) len : sizeT ); BEGIN #if (defined HM2) (* move.l D2,-(SP) movea.l 8(SP),A0 movea.l 12(SP),A1 move.l 16(SP),D0 *) CODE(2F02H,206FH,0008H,226FH,000CH,202FH,0010H); #elif (defined MM2) (* move.l -(A3),D0 movea.l -(A3),A1 movea.l -(A3),A0 tst.l D0 *) CODE(2023H,2263H,2063H,4A80H); #elif (defined TDIM2) (* movea.l 12(SP),A0 movea.l 8(SP),A1 move.l 4(SP),D0 *) CODE(206FH,000CH,226FH,0008H,202FH,0004H); #elif (defined LPRM2) || (defined SPCM2) (* movea.l 20(A6),A0 movea.l 16(A6),A1 move.l 12(A6),D0 *) CODE(206EH,0014H,226EH,0010H,202EH,000CH); #endif (* ; A0: Adresse1 ; A1: Adresse2 ; D0: Anzahl beq ende ; B: len = 0, nix zu tun move.w A0,D1 move.w A1,D2 eor.b D2,D1 ; genau eine der Adressen ungerade ? btst #0,D1 ; beq.s fastswap ; B: nein, es kann schnell getauscht werden move.w D0,D1 ; die Anzahl Bytes im unvollstaendigen 4-er- neg.w D1 ; Block und entsprechenden Index in die andi.w #3,D1 ; Kopieranweisungen berechnen add.w D1,D1 ; * 6 move.w D1,D2 ; add.w D1,D1 ; add.w D2,D1 ; addq.l #3,D0 ; + 1 Block, falls unvollst. Block (d0 MOD 4 # 0) lsr.l #2,D0 ; Anzahl kompletter 4-er Bloecke [+ unvollst. Block] jmp sloop4(PC,D1.w) ; ersten vollst. oder unvollst. Block tauschen sloop4: ; jeweils 4 Bytes tauschen move.b (A0),D1 move.b (A1),(A0)+ move.b D1,(A1)+ move.b (A0),D1 move.b (A1),(A0)+ move.b D1,(A1)+ move.b (A0),D1 move.b (A1),(A0)+ move.b D1,(A1)+ move.b (A0),D1 move.b (A1),(A0)+ move.b D1,(A1)+ subq.l #1,D0 bne.s sloop4 bra.s ende ; fertig fastswap: btst #0,D2 ; beide Adr. ungerade oder beide gerade ? beq.s tst16 ; B: beide gerade move.b (A0),D1 ; sonst ein Byte vorneweg tauschen move.b (A1),(A0)+ ; -> gerade Adresse move.b D1,(A1)+ subq.l #1,D0 ; eins weniger zu tauschen tst16: move.w D0,D2 ; fuer spaeteren Ueberhangtest lsr.l #2,D0 ; Anzahl auszutauschender Langworte beq.s tst2 ; B: weniger als 4 Bytes swap D2 ; D2 retten move.w D0,D1 ; die Anzahl Bytes im unvollstaendigen 16-er- neg.w D1 ; Block und entsprechenden Index in die andi.w #3,D1 ; Kopieranweisungen berechnen add.w D1,D1 ; * 6 move.w D1,D2 ; add.w D1,D1 ; add.w D2,D1 ; swap D2 addq.l #3,D0 ; + 1 Block, falls unvollst. Block (d0 MOD 4 # 0) lsr.l #2,D0 ; Anzahl kompletter 16-er Bloecke [+ unvollst. Block] jmp floop16(PC,D1.w) ; ersten vollst. oder unvollst. Block tauschen * Hier laesst sich durch den Einsatz von MOVEM-Befehlen * nichts beschleunigen floop16: ; jeweils 16 Bytes tauschen move.l (A0),D1 move.l (A1),(A0)+ move.l D1,(A1)+ move.l (A0),D1 move.l (A1),(A0)+ move.l D1,(A1)+ move.l (A0),D1 move.l (A1),(A0)+ move.l D1,(A1)+ move.l (A0),D1 move.l (A1),(A0)+ move.l D1,(A1)+ subq.l #1,D0 bne.s floop16 tst2: btst #1,D2 ; noch ein zusaetzl. Wort auszutauschen ? beq.s tst1 ; B: nein move.w (A0),D1 move.w (A1),(A0)+ move.w D1,(A1)+ tst1: btst #0,D2 ; noch ein Byte ? beq.s ende ; B: nein, fertig move.b (A0),D1 move.b (A1),(A0) move.b D1,(A1) ende: *) CODE(6700H,00A8H,3208H,3409H,0B501H,0801H,0000H,6736H); CODE(3200H,4441H,0241H,0003H,0D241H,3401H,0D241H,0D242H); CODE(5680H,0E488H,4EFBH,1002H,1210H,10D1H,12C1H,1210H); CODE(10D1H,12C1H,1210H,10D1H,12C1H,1210H,10D1H,12C1H); CODE(5380H,66E4H,6064H,0802H,0000H,6708H,1210H,10D1H); CODE(12C1H,5380H,3400H,0E488H,6738H,4842H,3200H,4441H); CODE(0241H,0003H,0D241H,3401H,0D241H,0D242H,4842H,5680H); CODE(0E488H,4EFBH,1002H,2210H,20D1H,22C1H,2210H,20D1H); CODE(22C1H,2210H,20D1H,22C1H,2210H,20D1H,22C1H,5380H); CODE(66E4H,0802H,0001H,6706H,3210H,30D1H,32C1H,0802H); CODE(0000H,6706H,1210H,1091H,1281H); #if (defined HM2) (* move.l (SP)+,D2 movea.l (SP)+,A0 lea 12(SP),SP jmp (A0) *) CODE(241FH,205FH,4FEFH,000CH,4ED0H); #elif (defined TDIM2) (* rts *) CODE(4E75H); #endif END memswap; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) __PROCFRAME_OFF__ PROCEDURE memmove ((* EIN/ -- *) dst : ADDRESS; (* EIN/ -- *) src : ADDRESS; (* EIN/ -- *) len : sizeT ); BEGIN #if (defined HM2) (* move.l D2,-(SP) movea.l 12(SP),A0 movea.l 8(SP),A1 move.l 16(SP),D0 *) CODE(2F02H,206FH,000CH,226FH,0008H,202FH,0010H); #elif (defined MM2) (* move.l -(A3),D0 movea.l -(A3),A0 movea.l -(A3),A1 tst.l D0 *) CODE(2023H,2063H,2263H,4A80H); #elif (defined TDIM2) (* movea.l 8(SP),A0 movea.l 12(SP),A1 move.l 4(SP),D0 *) CODE(206FH,0008H,226FH,000CH,202FH,0004H); #elif (defined LPRM2) || (defined SPCM2) (* movea.l 16(A6),A0 movea.l 20(A6),A1 move.l 12(A6),D0 *) CODE(206EH,0010H,226EH,0014H,202EH,000CH); #endif (* ; A0: Quelladresse ; A1: Zieladresse ; D0: Laenge beq ende ; B: len = 0, nix zu tun cmpa.l A0,A1 ; Zieladresse groesser als Quelladresse ? bhi special ; B: ja, muss von hinten nach vorne kopiert werden, ; falls sich die Bereiche ueberschneiden move.w A0,D1 ; genau eine Adresse ungerade ? move.w A1,D2 ; eor.b D2,D1 ; btst #0,D1 ; beq.s nfastcpy ; B: nein, beide gerade/ungerade -> schnell kopieren * Es muss langsam byteweise kopiert werden. * Der Trick mit dem Sprung in die Kopieranweisungen stammt aus * dem "bcopy()" der GnuLib/MiNTLib move.w D0,D1 ; die Anzahl Bytes im unvollstaendigen 8-er- neg.w D1 ; Block und entsprechenden Index in die andi.w #7,D1 ; Kopieranweisungen berechnen add.w D1,D1 ; * 2 addq.l #7,D0 ; + 1 Block, falls unvollst. Block (d0 MOD 8 # 0) lsr.l #3,D0 ; Anzahl kompletter 8-er Bloecke [+ unvollst. Block] jmp nloop8(PC,D1.w) ; ersten vollst. oder unvollst. Block kopieren nloop8: ; jeweils 8 Byte kopieren move.b (A0)+,(A1)+ move.b (A0)+,(A1)+ move.b (A0)+,(A1)+ move.b (A0)+,(A1)+ move.b (A0)+,(A1)+ move.b (A0)+,(A1)+ move.b (A0)+,(A1)+ move.b (A0)+,(A1)+ subq.l #1,D0 bne.s nloop8 bra ende nfastcpy: btst #0,D2 ; beide Adressen ungerade ? beq.s ntst256 ; B: nein move.b (A0)+,(A1)+ ; ein Byte vorneweg -> gerade Adressen subq.l #1,D0 ; ein Byte weniger zu kopieren ntst256: move.b D0,D1 ; Anzahl der Bytes < 256 merken lsr.l #8,D0 ; Anzahl zu kopierender 256-Bytes-Bloecke beq.s ntst32 ; B: weniger als 256 Bytes movem.l D3-D7/A2-A6,-(SP) nloop256: ; jeweils 256 Bytes kopieren movem.l (A0)+,D2-D7/A2-A6 movem.l D2-D7/A2-A6,(A1) movem.l (A0)+,D2-D7/A2-A6 movem.l D2-D7/A2-A6,44(A1) movem.l (A0)+,D2-D7/A2-A6 movem.l D2-D7/A2-A6,88(A1) movem.l (A0)+,D2-D7/A2-A6 movem.l D2-D7/A2-A6,132(A1) movem.l (A0)+,D2-D7/A2-A6 movem.l D2-D7/A2-A6,176(A1) movem.l (A0)+,D2-D7/A2-A4 movem.l D2-D7/A2-A4,220(A1) lea 256(A1),A1 subq.l #1,D0 bne.s nloop256 movem.l (SP)+,D3-D7/A2-A6 ntst32: move.b D1,D0 ; D0 ist Null, deswegen automatisch Wortgroesse lsr.w #2,D0 ; Anzahl zu kopierender Langworte beq.s ntst2 ; B: weniger als 4 Byte move.w D0,D2 ; die Anzahl Bytes im unvollstaendigen 32-er- neg.w D2 ; Block und entsprechenden Index in die andi.w #7,D2 ; Kopieranweisungen berechnen add.w D2,D2 ; * 2 subq.l #1,D0 ; - 1 Block, falls kein unvollst. Block (d0 MOD 8 = 0) lsr.w #3,D0 ; Anzahl von 32-er-Bloecken [- unvollst Block] jmp nloop32(PC,D2.w) ; ersten vollst. oder unvollst. Block kopieren nloop32: ; jeweils 32 Byte kopieren move.l (A0)+,(A1)+ move.l (A0)+,(A1)+ move.l (A0)+,(A1)+ move.l (A0)+,(A1)+ move.l (A0)+,(A1)+ move.l (A0)+,(A1)+ move.l (A0)+,(A1)+ move.l (A0)+,(A1)+ dbra D0,nloop32 ntst2: btst #1,D1 ; ein zusaetzliches Wort ? beq.s ntst1 ; B: nein move.w (A0)+,(A1)+ ntst1: btst #0,D1 ; ein zusaetzliches Byte ? beq ende ; B: nein, fertig move.b (A0)+,(A1)+ bra ende * wie oben, nur alles von hinten nach vorne kopieren special: adda.l D0,A0 adda.l D0,A1 move.w A0,D1 move.w A1,D2 eor.b D2,D1 btst #0,D1 beq.s sfastcpy move.w D0,D1 neg.w D1 andi.w #7,D1 add.w D1,D1 addq.l #7,D0 lsr.l #3,D0 jmp sloop8(PC,D1.w) sloop8: move.b -(A0),-(A1) move.b -(A0),-(A1) move.b -(A0),-(A1) move.b -(A0),-(A1) move.b -(A0),-(A1) move.b -(A0),-(A1) move.b -(A0),-(A1) move.b -(A0),-(A1) subq.l #1,D0 bne.s sloop8 bra ende sfastcpy: btst #0,D2 beq.s stst256 move.b -(A0),-(A1) subq.l #1,D0 stst256: move.b D0,D1 lsr.l #8,D0 beq.s stst32 movem.l D3-D7/A2-A6,-(SP) sloop256: movem.l -44(A0),D2-D7/A2-A6 movem.l D2-D7/A2-A6,-(A1) movem.l -88(A0),D2-D7/A2-A6 movem.l D2-D7/A2-A6,-(A1) movem.l -132(A0),D2-D7/A2-A6 movem.l D2-D7/A2-A6,-(A1) movem.l -176(A0),D2-D7/A2-A6 movem.l D2-D7/A2-A6,-(A1) movem.l -220(A0),D2-D7/A2-A6 movem.l D2-D7/A2-A6,-(A1) movem.l -256(A0),D2-D7/A2-A4 movem.l D2-D7/A2-A4,-(A1) lea -256(A0),A0 subq.l #1,D0 bne.s sloop256 movem.l (SP)+,D3-D7/A2-A6 stst32: move.b D1,D0 lsr.w #2,D0 beq.s stst2 move.w D0,D2 neg.w D2 andi.w #7,D2 add.w D2,D2 subq.l #1,D0 lsr.w #3,D0 jmp sloop32(PC,D2.w) sloop32: move.l -(A0),-(A1) move.l -(A0),-(A1) move.l -(A0),-(A1) move.l -(A0),-(A1) move.l -(A0),-(A1) move.l -(A0),-(A1) move.l -(A0),-(A1) move.l -(A0),-(A1) dbra D0,sloop32 stst2: btst #1,D1 beq.s stst1 move.w -(A0),-(A1) stst1: btst #0,D1 beq.s ende move.b -(A0),-(A1) ende: *) CODE(6700H,01ACH,0B3C8H,6200H,00D4H,3208H,3409H,0B501H); CODE(0801H,0000H,672AH,3200H,4441H,0241H,0007H,0D241H); CODE(5E80H,0E688H,4EFBH,1002H,12D8H,12D8H,12D8H,12D8H); CODE(12D8H,12D8H,12D8H,12D8H,5380H,66ECH,6000H,0170H); CODE(0802H,0000H,6704H,12D8H,5380H,1200H,0E088H,674AH); CODE(48E7H,1F3EH,4CD8H,7CFCH,48D1H,7CFCH,4CD8H,7CFCH); CODE(48E9H,7CFCH,002CH,4CD8H,7CFCH,48E9H,7CFCH,0058H); CODE(4CD8H,7CFCH,48E9H,7CFCH,0084H,4CD8H,7CFCH,48E9H); CODE(7CFCH,00B0H,4CD8H,1CFCH,48E9H,1CFCH,00DCH,43E9H); CODE(0100H,5380H,66BEH,4CDFH,7CF8H,1001H,0E448H,6726H); CODE(3400H,4442H,0242H,0007H,0D442H,5380H,0E648H,4EFBH); CODE(2002H,22D8H,22D8H,22D8H,22D8H,22D8H,22D8H,22D8H); CODE(22D8H,51C8H,0FFEEH,0801H,0001H,6702H,32D8H,0801H); CODE(0000H,6700H,00DAH,12D8H,6000H,00D4H,0D1C0H,0D3C0H); CODE(3208H,3409H,0B501H,0801H,0000H,672AH,3200H,4441H); CODE(0241H,0007H,0D241H,5E80H,0E688H,4EFBH,1002H,1320H); CODE(1320H,1320H,1320H,1320H,1320H,1320H,1320H,5380H); CODE(66ECH,6000H,009AH,0802H,0000H,6704H,1320H,5380H); CODE(1200H,0E088H,674CH,48E7H,1F3EH,4CE8H,7CFCH,0FFD4H); CODE(48E1H,3F3EH,4CE8H,7CFCH,0FFA8H,48E1H,3F3EH,4CE8H); CODE(7CFCH,0FF7CH,48E1H,3F3EH,4CE8H,7CFCH,0FF50H,48E1H); CODE(3F3EH,4CE8H,7CFCH,0FF24H,48E1H,3F3EH,4CE8H,1CFCH); CODE(0FF00H,48E1H,3F38H,41E8H,0FF00H,5380H,66BCH,4CDFH); CODE(7CF8H,1001H,0E448H,6726H,3400H,4442H,0242H,0007H); CODE(0D442H,5380H,0E648H,4EFBH,2002H,2320H,2320H,2320H); CODE(2320H,2320H,2320H,2320H,2320H,51C8H,0FFEEH,0801H); CODE(0001H,6702H,3320H,0801H,0000H,6702H,1320H); #if (defined HM2) (* move.l (SP)+,D2 movea.l (SP)+,A0 lea 12(SP),SP jmp (A0) *) CODE(241FH,205FH,4FEFH,000CH,4ED0H); #elif (defined TDIM2) (* rts *) CODE(4E75H); #endif END memmove; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) PROCEDURE bcopy ((* EIN/ -- *) src : ADDRESS; (* EIN/ -- *) dst : ADDRESS; (* EIN/ -- *) len : sizeT ); BEGIN memmove(dst, src, len); END bcopy; (*---------------------------------------------------------------------------*) __PROCFRAME_OFF__ PROCEDURE memset ((* EIN/ -- *) dst : ADDRESS; (* EIN/ -- *) val : int; (* EIN/ -- *) len : sizeT ); BEGIN #if (defined HM2) (* move.l D2,-(SP) ; benutztes Register retten movea.l 8(SP),A0 #if (defined __LONG_WHOLE__) move.w 12+2(SP),D1 move.l 16(SP),D0 #else move.w 12(SP),D1 move.l 14(SP),D0 #endif *) CODE(2F02H,206FH,0008H); #if (defined __LONG_WHOLE__) CODE(322FH,000EH,202FH,0010H); #else CODE(322FH,000CH,202FH,000EH); #endif #elif (defined MM2) (* move.l -(A3),D0 #if (defined __LONG_WHOLE__) move.l -(A3),D1 #else move.w -(A3),D1 #endif movea.l -(A3),A0 tst.l D0 *) CODE(2023H); #if (defined __LONG_WHOLE__) CODE(2223H); #else CODE(3223H); #endif CODE(2063H,4A80H); #elif (defined TDIM2) (* movea.l 10(SP),A0 move.w 8(SP),D1 move.l 4(SP),D0 *) CODE(206FH,000AH,322FH,0008H,202FH,0004H); #elif (defined LPRM2) || (defined SPCM2) (* movea.l 18(A6),A0 move.w 16(A6),D1 move.l 12(A6),D0 *) CODE(206EH,0012H,322EH,0010H,202EH,000CH); #endif (* ; A0: Startadresse ; D0: Anzahl ; D1: Muster beq ende ; B: len = 0, nix zu tun move.b D1,D2 ; Muster auf alle vier Bytes in D1 verteilen lsl.w #8,D2 ; move.b D1,D2 ; move.w D2,D1 ; swap D1 ; move.w D2,D1 ; move.w A0,D2 ; Anfangsadresse ungerade ? btst #0,D2 ; beq.s tst256 ; B: nein move.b D1,(A0)+ ; sonst ein Byte vorneweg kopieren subq.l #1,D0 tst256: move.b D0,D2 ; Anzahl der Bytes < 256 merken lsr.l #8,D0 ; Anzahl der 256-Bytes-Bloecke beq.s tst32 ; B: weniger als 256 Bytes movem.l D2-D7/A2-A6,-(SP) move.l D1,D2 move.l D1,D3 move.l D1,D4 move.l D1,D5 move.l D1,D6 move.l D1,D7 movea.l D1,A1 movea.l D1,A2 movea.l D1,A3 movea.l D1,A4 movea.l D1,A5 movea.l D1,A6 loop256: movem.l D1-D7/A1-A6,(A0) movem.l D1-D7/A1-A6,52(A0) movem.l D1-D7/A1-A6,104(A0) movem.l D1-D7/A1-A6,156(A0) movem.l D1-D7/A1-A5,208(A0) lea 256(A0),A0 subq.l #1,D0 bne.s loop256 movem.l (SP)+,D2-D7/A2-A6 tst32: move.b D2,D0 ; D0 ist Null, deswegen automatisch Wortgroesse movea.w D0,A1 ; Anzahl der Bytes fuer spaeteren Ueberhangtest merken lsr.w #2,D0 ; Anzahl von Langworten beq.s tst2 ; B: weniger als 4 Bytes zu kopieren move.w D0,D2 ; die Anzahl Bytes im unvollstaendigen 32-er- neg.w D2 ; Block und entsprechenden Index in die andi.w #7,D2 ; Kopieranweisungen berechnen add.w D2,D2 ; * 2 subq.w #1,D0 ; - 1 Block, falls kein unvollst. Block (d0 MOD 8 = 0) lsr.w #3,D0 ; Anzahl kompletter 32-Byte-Bloecke [+ unvollst. Block] jmp loop32(PC,D2.w) ; ersten kompletten oder unvollst. Block fuellen loop32: ; jeweils 32 Byte fuellen move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ dbra D0,loop32 ; naechsten kompletten Block fuellen tst2: move.w A1,D2 btst #1,D2 ; ein zusaetzliches Wort ? beq.s tst1 ; B: nein move.w D1,(A0)+ tst1: btst #0,D2 ; ein zusaetzliches Byte ? beq.s ende ; B: nein move.b D1,(A0)+ ende: *) CODE(6700H,00A4H,1401H,0E14AH,1401H,3202H,4841H,3202H); CODE(3408H,0802H,0000H,6704H,10C1H,5380H,1400H,0E088H); CODE(6744H,48E7H,3F3EH,2401H,2601H,2801H,2A01H,2C01H); CODE(2E01H,2241H,2441H,2641H,2841H,2A41H,2C41H,48D0H); CODE(7EFEH,48E8H,7EFEH,0034H,48E8H,7EFEH,0068H,48E8H); CODE(7EFEH,009CH,48E8H,3EFEH,00D0H,41E8H,0100H,5380H); CODE(66DCH,4CDFH,7CFCH,1002H,3240H,0E448H,6726H,3400H); CODE(4442H,0242H,0007H,0D442H,5340H,0E648H,4EFBH,2002H); CODE(20C1H,20C1H,20C1H,20C1H,20C1H,20C1H,20C1H,20C1H); CODE(51C8H,0FFEEH,3409H,0802H,0001H,6702H,30C1H,0802H); CODE(0000H,6702H,10C1H); #if (defined HM2) (* move.l (SP)+,D2 movea.l (SP)+,A0 #if (defined __LONG_WHOLE__) lea 12(SP),SP #else lea 10(SP),SP #endif jmp (A0) *) CODE(241FH,205FH); #if (defined __LONG_WHOLE__) CODE(4FEFH,000CH); #else CODE(4FEFH,000AH); #endif CODE(4ED0H); #elif (defined TDIM2) (* rts *) CODE(4E75H); #endif END memset; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) __PROCFRAME_OFF__ PROCEDURE memfill ((* EIN/ -- *) dst : ADDRESS; (* EIN/ -- *) val : UNSIGNEDLONG; (* EIN/ -- *) len : sizeT ); BEGIN #if (defined HM2) (* move.l D2,-(SP) ; benutztes Register retten movea.l 8(SP),A0 move.l 12(SP),D1 move.l 16(SP),D0 *) CODE(2F02H,206FH,0008H,222FH,000CH,202FH,0010H); #elif (defined MM2) (* move.l -(A3),D0 move.l -(A3),D1 movea.l -(A3),A0 tst.l D0 *) CODE(2023H,2223H,2063H,4A80H); #elif (defined TDIM2) (* movea.l 12(SP),A0 move.l 8(SP),D1 move.l 4(SP),D0 *) CODE(206FH,000CH,222FH,0008H,202FH,0004H); #elif (defined LPRM2) || (defined SPCM2) (* movea.l 20(A6),A0 move.l 16(A6),D1 move.l 12(A6),D0 *) CODE(206EH,0014H,222EH,0010H,202EH,000CH); #endif (* ; A0: Startadresse ; D0: Anzahl ; D1: Muster beq ende ; B: len = 0, nix zu tun move.w A0,D2 ; Anfangsadresse ungerade ? btst #0,D2 ; beq.s tst256 ; B: nein rol.l #8,D1 ; es soll ja mit dem hoechstwertigen Byte ; des Musters begonnen werden, damit gibt es ; auch ein kontinuierliches Muster beginnend ; mit einer ungeraden Adr. (die drei folgenden ; Bytes ruecken bei dem ROTATE-Befehl entsprechend ; auf, und das erste Byte folgt wieder dahinter) move.b D1,(A0)+ ; sonst ein Byte vorneweg kopieren subq.l #1,D0 tst256: move.b D0,D2 ; Anzahl der Bytes < 256 merken lsr.l #8,D0 ; Anzahl der 256-Bytes-Bloecke beq.s tst32 ; B: weniger als 256 Bytes movem.l D2-D7/A2-A6,-(SP) move.l D1,D2 move.l D1,D3 move.l D1,D4 move.l D1,D5 move.l D1,D6 move.l D1,D7 movea.l D1,A1 movea.l D1,A2 movea.l D1,A3 movea.l D1,A4 movea.l D1,A5 movea.l D1,A6 loop256: movem.l D1-D7/A1-A6,(A0) movem.l D1-D7/A1-A6,52(A0) movem.l D1-D7/A1-A6,104(A0) movem.l D1-D7/A1-A6,156(A0) movem.l D1-D7/A1-A5,208(A0) lea 256(A0),A0 subq.l #1,D0 bne.s loop256 movem.l (SP)+,D2-D7/A2-A6 tst32: move.b D2,D0 ; D0 ist Null, deswegen automatisch Wortgroesse movea.w D0,A1 ; Anzahl der Bytes fuer spaeteren Ueberhangtest merken lsr.w #2,D0 ; Anzahl von Langworten beq.s tst2 ; B: weniger als 4 Byte zu kopieren move.w D0,D2 ; die Anzahl Bytes im unvollstaendigen 32-er- neg.w D2 ; Block und entsprechenden Index in die andi.w #7,D2 ; Kopieranweisungen berechnen add.w D2,D2 ; * 2 subq.w #1,D0 ; - 1 Block, falls kein unvollst. Block (d0 MOD 8 = 0) lsr.w #3,D0 ; Anzahl kompletter 32-Byte-Bloecke [+ unvollst. Block] jmp loop32(PC,D2.w) ; ersten kompletten oder unvollst. Block fuellen loop32: ; jeweils 32 Byte fuellen move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ move.l D1,(A0)+ dbra D0,loop32 ; naechsten kompletten Block fuellen tst2: move.w A1,D2 btst #1,D2 ; ein zusaetzliches Wort ? beq.s tst1 ; B: nein swap D1 ; die ersten zwei Byte des Musters schreiben move.w D1,(A0)+ ; und die naechsten zwei ins obere Wort tst1: btst #0,D2 ; ein zusaetzliches Byte ? beq.s ende ; B: nein rol.l #8,D1 ; damit ist das auf das letzte bisher geschriebene ; Byte des Musters folgende im unteren Byte des ; Registers move.b D1,(A0) ende: *) CODE(6700H,009EH,3408H,0802H,0000H,6706H,0E199H,10C1H); CODE(5380H,1400H,0E088H,6744H,48E7H,3F3EH,2401H,2601H); CODE(2801H,2A01H,2C01H,2E01H,2241H,2441H,2641H,2841H); CODE(2A41H,2C41H,48D0H,7EFEH,48E8H,7EFEH,0034H,48E8H); CODE(7EFEH,0068H,48E8H,7EFEH,009CH,48E8H,3EFEH,00D0H); CODE(41E8H,0100H,5380H,66DCH,4CDFH,7CFCH,1002H,3240H); CODE(0E448H,6726H,3400H,4442H,0242H,0007H,0D442H,5340H); CODE(0E648H,4EFBH,2002H,20C1H,20C1H,20C1H,20C1H,20C1H); CODE(20C1H,20C1H,20C1H,51C8H,0FFEEH,3409H,0802H,0001H); CODE(6704H,4841H,30C1H,0802H,0000H,6704H,0E199H,1081H); #if (defined HM2) (* move.l (SP)+,D2 movea.l (SP)+,A0 lea 12(SP),SP jmp (A0) *) CODE(241FH,205FH,4FEFH,000CH,4ED0H); #elif (defined TDIM2) (* rts *) CODE(4E75H); #endif END memfill; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) PROCEDURE bzero ((* EIN/ -- *) dst : ADDRESS; (* EIN/ -- *) len : sizeT ); BEGIN memfill(dst, VAL(UNSIGNEDLONG,0), len); END bzero; (*---------------------------------------------------------------------------*) __PROCFRAME_OFF__ PROCEDURE memchr ((* EIN/ -- *) src : ADDRESS; (* EIN/ -- *) val : int; (* EIN/ -- *) len : sizeT ): ADDRESS; BEGIN #if (defined HM2) (* move.l D2,-(SP) movea.l 8(SP),A0 #if (defined __LONG_WHOLE__) move.w 12+2(SP),D1 move.l 16(SP),D0 #else move.w 12(SP),D1 move.l 14(SP),D0 #endif *) CODE(2F02H,206FH,0008H); #if (defined __LONG_WHOLE__) CODE(322FH,000EH,202FH,0010H); #else CODE(322FH,000CH,202FH,000EH); #endif #elif (defined MM2) (* move.l -(A3),D0 #if (defined __LONG_WHOLE__) move.l -(A3),D1 #else move.w -(A3),D1 #endif movea.l -(A3),A0 tst.l D0 *) CODE(2023H); #if (defined __LONG_WHOLE__) CODE(2223H); #else CODE(3223H); #endif CODE(2063H,4A80H); #elif (defined TDIM2) (* movea.l 10(SP),A0 move.w 8(SP),D1 move.l 4(SP),D0 *) CODE(206FH,000AH,322FH,0008H,202FH,0004H); #elif (defined LPRM2) || (defined SPCM2) (* movea.l 18(A6),A0 move.w 16(A6),D1 move.l 12(A6),D0 *) CODE(206EH,0012H,322EH,0010H,202EH,000CH); #endif (* beq.s ende subq.l #1,D0 move.l D0,D2 swap D2 lp: cmp.b (A0)+,D1 start: dbeq D0,lp dbeq D2,lp beq.s found moveq #0,D0 bra.s ende found: move.l A0,D0 subq.l #1,D0 ende: *) CODE(671AH,5380H,2400H,4842H,0B218H,57C8H,0FFFCH,57CAH); CODE(0FFF8H,6704H,7000H,6004H,2008H,5380H); #if (defined HM2) CODE(241FH); (* move.l (SP)+,D2 *) CODE(205FH); (* movea.l (SP)+,A0 *) #if (defined __LONG_WHOLE__) CODE(4FEFH,000CH); (* lea 12(SP),SP *) #else CODE(4FEFH,000AH); (* lea 10(SP),SP *) #endif CODE(4ED0H); (* jmp (A0) *) #elif (defined MM2) && (defined __RES_ON_STACK__) CODE(26C0H); (* move.l D0,(A3)+ *) #elif (defined LPRM2) || (defined SPCM2) CODE(2D40H,0016H); (* move.l D0,22(A6) *) CODE(4E5EH); (* unlk A6 *) CODE(285FH); (* movea.l (SP)+,A4 *) CODE(205FH); (* movea.l (SP)+,A0 *) CODE(4FEFH,000AH); (* lea 10(SP),SP *) CODE(4ED0H); (* jmp (A0) *) #elif (defined TDIM2) CODE(2F40H,000EH); (* move.l D0,14(SP) *) CODE(4E75H); (* rts *) #endif END memchr; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) __PROCFRAME_OFF__ PROCEDURE memcmp ((* EIN/ -- *) blk1 : ADDRESS; (* EIN/ -- *) blk2 : ADDRESS; (* EIN/ -- *) len : sizeT ): int; BEGIN #if (defined HM2) (* move.w D2,-(SP) movea.l 6(SP),A0 movea.l 10(SP),A1 move.l 14(SP),D0 *) CODE(3F02H,206FH,0006H,226FH,000AH,202FH,000EH); #elif (defined MM2) (* move.l -(A3),D0 movea.l -(A3),A1 movea.l -(A3),A0 tst.l D0 *) CODE(2023H,2263H,2063H,4A80H); #elif (defined TDIM2) (* movea.l 12(SP),A0 movea.l 8(SP),A1 move.l 4(SP),D0 *) CODE(206FH,000CH,226FH,0008H,202FH,0004H); #elif (defined LPRM2) || (defined SPCM2) (* movea.l 20(A6),A0 movea.l 16(A6),A1 move.l 12(A6),D0 *) CODE(206EH,0014H,226EH,0010H,202EH,000CH); #endif (* beq.s equal move.w A0,D1 move.w A1,D2 eor.b D2,D1 ; genau eine der Adressen ungerade ? btst #0,D1 ; beq.s fastcmp ; B: nein slowcmp: cmpm.b (A0)+,(A1)+ bne.s notequal subq.l #1,D0 bne.s slowcmp bra.s equal fastcmp: btst #0,D2 ; beide Adressen ungerade ? beq.s longcnt ; B: nein, beide gerade cmpm.b (A0)+,(A1)+ ; sonst ein Byte vergl. -> gerade Adr. bne.s notequal ; B: schon das erste Byte unterschiedlich subq.l #1, D0 ; sonst ein Byte weniger zu vergleichen longcnt: move.b D0,D2 ; fuer Ueberhangtest lsr.l #2,D0 ; Anzahl zu vergleichender Langworte beq.s tstwcmp ; B: weniger als 4 Bytes zu vergleichen cmplp: cmpm.l (A0)+,(A1)+ bne.s notequal subq.l #1,D0 bne.s cmplp tstwcmp: btst #1,D2 ; noch mindestens ein abschliessendes Wort vergl. ? beq.s tstbcmp ; B: nein cmpm.w (A0)+,(A1)+ ; letztes Wort auch gleich ? bne.s notequal ; B: nein tstbcmp: btst #0,D2 ; noch ein abschliessendes Byte vergl. ? beq.s equal ; B: nein, Bloecke sind gleich cmpm.b (A0)+,(A1)+ ; letztes Byte auch gleich ? bne.s notequal ; B: nein equal: moveq #0,D0 bra.s ende notequal: bhi.s less ; B: blk1 < blk2 moveq #1,D0 ; sonst blk1 > blk2 bra.s ende less: moveq #-1,D0 ende: *) CODE(6744H,3208H,3409H,0B501H,0801H,0000H,670AH,0B308H); CODE(6638H,5380H,66F8H,602EH,0802H,0000H,6706H,0B308H); CODE(6628H,5380H,1400H,0E488H,6708H,0B388H,661CH,5380H); CODE(66F8H,0802H,0001H,6704H,0B348H,660EH,0802H,0000H); CODE(6704H,0B308H,6604H,7000H,6008H,6204H,7001H,6002H); CODE(70FFH); #if (defined HM2) CODE(341FH); (* move.w (SP)+,D2 *) CODE(205FH); (* movea.l (SP)+,A0 *) CODE(4FEFH,000CH); (* lea 12(SP),SP *) CODE(4ED0H); (* jmp (A0) *) #elif (defined MM2) #ifdef __RES_ON_STACK__ #ifdef __LONG_WHOLE__ CODE(26C0H); (* move.l D0,(A3)+ *) #else CODE(36C0H); (* move.w D0,(A3)+ *) #endif #endif #elif (defined LPRM2) || (defined SPCM2) CODE(3D40H,0018H); (* move.w D0,24(A6) *) CODE(4E5EH); (* unlk A6 *) CODE(285FH); (* movea.l (SP)+,A4 *) CODE(205FH); (* movea.l (SP)+,A0 *) CODE(4FEFH,000CH); (* lea 12(SP),SP *) CODE(4ED0H); (* jmp (A0) *) #elif (defined TDIM2) CODE(3F40H,0010H); (* move.w D0,16(SP) *) CODE(4E75H); (* rts *) #endif END memcmp; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) #if (defined LPRM2) || (defined SPCM2) PROCEDURE memalloc ((* EIN/ -- *) size : sizeT; (* -- /AUS *) VAR old : ADDRESS; (* -- /AUS *) VAR adr : ADDRESS ); BEGIN (* movea.l (SP)+,A6 ; A6 -> lokale Variablen des Aufrufers movea.l (SP)+,A4 ; A4 -> globale Variablen des Aufrufers movea.l (SP)+,A1 ; A1 := RTN-Adresse movea.l (SP)+,A2 ; A2 -> <adr> movea.l (SP)+,A0 ; A0 -> <old> move.l (SP)+,D0 ; D0 := <size> move.l SP,(A0) ; <old> := Stackpointer vor Aufruf der Funktion addq.l #1,D0 ; <size> auf gerade Anzahl aufrunden bclr #0,D0 ; suba.l D0,SP ; Neuer Stackpointer move.l SP,(A2) ; <adr> := Neuer Stackpointer jmp (A1) ; RETURN *) CODE(2C5FH,285FH,225FH,245FH,205FH,201FH,208FH,5280H); CODE(0880H,0000H,9FC0H,248FH,4ED1H); END memalloc; (*---------------------------------------------------------------------------*) PROCEDURE memdealloc ((* EIN/ -- *) old : ADDRESS ); BEGIN (* movea.l (SP)+,A6 ; A6 -> lokale Variablen des Aufrufers movea.l (SP)+,A4 ; A4 -> globale Variablen des Aufrufers movea.l (SP)+,A1 ; A1 := RTN-Adresse movea.l (SP),SP ; Stack setzen jmp (A1) ; RETURN *) CODE(2C5FH,285FH,225FH,2E57H,4ED1H); END memdealloc; #elif (defined TDIM2) __PROCFRAME_OFF__ PROCEDURE memalloc ((* EIN/ -- *) size : sizeT; (* -- /AUS *) VAR old : ADDRESS; (* -- /AUS *) VAR adr : ADDRESS ); BEGIN (* movea.l (SP)+,A1 ; A1 := RTN-Adresse movea.l (SP)+,A2 ; A2 -> <adr> movea.l (SP)+,A0 ; A0 -> <old> move.l (SP)+,D0 ; D0 := <size> move.l SP,(A0) ; <old> := Stackpointer vor Aufruf der Funktion addq.l #1,D0 ; <size> auf gerade Anzahl aufrunden bclr #0,D0 ; suba.l D0,SP ; Neuer Stackpointer move.l SP,(A2) ; <adr> := Neuer Stackpointer lea -12(SP),SP ; fuer Parameterkorrektur vom Aufrufer jmp (A1) ; RETURN *) CODE(225FH,245FH,205FH,201FH,208FH,5280H,0880H,0000H); CODE(9FC0H,248FH,4FEFH,0FFF4H,4ED1H); END memalloc; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) __PROCFRAME_OFF__ PROCEDURE memdealloc ((* EIN/ -- *) old : ADDRESS ); BEGIN (* movea.l (SP)+,A1 ; A1 := RTN-Adresse movea.l (SP),SP ; Stackpointer setzen subq.l #4,SP ; fuer Parameterkorrektur vom Aufrufer jmp (A1) ; RETURN *) CODE(225FH,2E57H,598FH,4ED1H); END memdealloc; __PROCFRAME_ON__ #elif (defined HM2) __PROCFRAME_OFF__ PROCEDURE memalloc ((* EIN/ -- *) size : sizeT; (* -- /AUS *) VAR old : ADDRESS; (* -- /AUS *) VAR adr : ADDRESS ); BEGIN (* movea.l (SP)+,A1 ; A1 := RTN-Adresse move.l (SP)+,D0 ; D0 := <size> movea.l (SP)+,A0 ; A0 -> <old> move.l (SP)+,D1 ; D1 -> <adr> move.l SP,(A0) ; <old> := Stackpointer vor Aufruf der Funktion addq.l #1,D0 ; <size> auf gerade Anzahl aufrunden bclr #0,D0 ; suba.l D0,SP ; Neuer Stackpointer movea.l D1,A0 ; <adr> := Neuer Stackpointer move.l SP,(A0) ; jmp (A1) ; RETURN *) CODE(225FH,201FH,205FH,221FH,208FH,5280H,0880H,0000H); CODE(9FC0H,2041H,208FH,4ED1H); END memalloc; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) __PROCFRAME_OFF__ PROCEDURE memdealloc ((* EIN/ -- *) old : ADDRESS ); BEGIN (* movea.l (SP)+,A1 ; A1 := RTN-Adresse movea.l (SP),SP ; Stackpointer setzen jmp (A1) ; RETURN *) CODE(225FH,2E57H,4ED1H); END memdealloc; __PROCFRAME_ON__ #elif (defined MM2) __PROCFRAME_OFF__ PROCEDURE memalloc ((* EIN/ -- *) size : sizeT; (* -- /AUS *) VAR old : ADDRESS; (* -- /AUS *) VAR adr : ADDRESS ); BEGIN ASSEMBLER MOVEA.L -(A3),A2 ; A2 -> <adr> MOVEA.L -(A3),A0 ; A0 -> <old> MOVE.L -(A3),D0 ; D0 := <size> MOVEA.L (A7)+,A1 ; A1 := RTN-Adresse MOVE.L A7,(A0) ; <old> := Stackpointer vor Aufruf der Funktion ADDQ.L #1,D0 ; <size> auf gerade Anzahl aufrunden BCLR #0,D0 ; SUBA.L D0,A7 ; Neuer Stackpointer MOVE.L A7,(A2) ; <adr> := Neuer Stackpointer JMP (A1) ; RETURN END; END memalloc; __PROCFRAME_ON__ (*---------------------------------------------------------------------------*) __PROCFRAME_OFF__ PROCEDURE memdealloc ((* EIN/ -- *) old : ADDRESS ); BEGIN ASSEMBLER MOVEA.L (A7)+,A1 ; A1 := RTN-Adresse MOVEA.L -(A3),A7 ; Stackpointer setzen JMP (A1) ; RETURN END; END memdealloc; __PROCFRAME_ON__ #endif END blk.
{ "pile_set_name": "Github" }
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.hibernate.jsr303.tck.tests.constraints.constraintcomposition; import com.google.gwt.core.ext.UnableToCompleteException; import org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.OverriddenAttributesMustMatchInTypeValidatorFactory.OverriddenAttributesMustMatchInTypeValidator; import org.hibernate.jsr303.tck.util.TckCompileTestCase; import java.util.regex.Pattern; import javax.validation.ConstraintDefinitionException; import javax.validation.UnexpectedTypeException; /** * Test wrapper for {@link ConstraintCompositionTest} tests that are meant to * fail to compile. */ public class ConstraintCompositionCompileTest extends TckCompileTestCase { /** * Replacement for * {@link ConstraintCompositionTest#testAllComposingConstraintsMustBeApplicableToAnnotatedType()} * * @throws UnableToCompleteException */ public void testAllComposingConstraintsMustBeApplicableToAnnotatedType() throws UnableToCompleteException { assertBeanValidatorFailsToCompile( MustBeApplicableValidatorFactory.MustBeApplicableValidator.class, Shoe.class, UnexpectedTypeException.class, Pattern.compile( "No \\@org\\.hibernate\\.jsr303\\.tck\\.tests\\.constraints\\.constraintcomposition" + "\\.NotEmpty\\(" + "((\\s)*(message=\\{constraint\\.notEmpty\\}|payload=\\[\\]|groups=\\[\\])(,)?){3}" + "\\) ConstraintValidator for type int")); } /** * Replacement for * {@link ConstraintCompositionTest#testOverriddenAttributesMustMatchInType()} * * @throws UnableToCompleteException */ public void testOverriddenAttributesMustMatchInType() throws UnableToCompleteException { assertValidatorFailsToCompile( OverriddenAttributesMustMatchInTypeValidator.class, ConstraintDefinitionException.class, Pattern.compile("Unable to create a validator for " + "org.hibernate.jsr303.tck.tests.constraints.constraintcomposition." + "ConstraintCompositionTest.DummyEntityWithZipCode " + "because The overriding type of a composite constraint must be " + "identical to the overridden one. " + "Expected int found class java.lang.String", Pattern.LITERAL)); } }
{ "pile_set_name": "Github" }
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the forecast-2018-06-26.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.ForecastService.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ForecastService.Model.Internal.MarshallTransformations { /// <summary> /// ListForecastExportJobs Request Marshaller /// </summary> public class ListForecastExportJobsRequestMarshaller : IMarshaller<IRequest, ListForecastExportJobsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((ListForecastExportJobsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListForecastExportJobsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.ForecastService"); string target = "AmazonForecast.ListForecastExportJobs"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2018-06-26"; request.HttpMethod = "POST"; request.ResourcePath = "/"; request.MarshallerVersion = 2; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetFilters()) { context.Writer.WritePropertyName("Filters"); context.Writer.WriteArrayStart(); foreach(var publicRequestFiltersListValue in publicRequest.Filters) { context.Writer.WriteObjectStart(); var marshaller = FilterMarshaller.Instance; marshaller.Marshall(publicRequestFiltersListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(publicRequest.MaxResults); } if(publicRequest.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(publicRequest.NextToken); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static ListForecastExportJobsRequestMarshaller _instance = new ListForecastExportJobsRequestMarshaller(); internal static ListForecastExportJobsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListForecastExportJobsRequestMarshaller Instance { get { return _instance; } } } }
{ "pile_set_name": "Github" }
<?php /* Copyright (C) 2005-2008 Laurent Destailleur <[email protected]> * Copyright (C) 2005-2009 Regis Houssin <[email protected]> * Copyright (C) 2013 Juanjo Menent <[email protected]> * Copyright (C) 2020 Open-DSI <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * or see http://www.gnu.org/ */ /** * \file htdocs/core/modules/takepos/mod_takepos_ref_simple.php * \ingroup takepos * \brief File with Simple ref numbering module for takepos */ dol_include_once('/core/modules/takepos/modules_takepos.php'); /** * Class to manage ref numbering of takepos cards with rule Simple. */ class mod_takepos_ref_simple extends ModeleNumRefTakepos { /** * Dolibarr version of the loaded document 'development', 'experimental', 'dolibarr' * @var string */ public $version = 'dolibarr'; /** * Prefix * @var string */ public $prefix = 'TC'; /** * @var string Error code (or message) */ public $error = ''; /** * Name * @var string */ public $nom = 'Simple'; /** * Return description of numbering module * * @return string Text with description */ public function info() { global $langs; return $langs->trans('SimpleNumRefModelDesc', $this->prefix.'0-'); } /** * Return an example of numbering module values * * @return string Example */ public function getExample() { return $this->prefix.'0-0501-0001'; } /** * Test si les numeros deja en vigueur dans la base ne provoquent pas de * de conflits qui empechera cette numerotation de fonctionner. * * @return boolean false si conflit, true si ok */ public function canBeActivated() { global $conf, $langs, $db; $pryymm = ''; $max = ''; $pos_source = 0; // First, we get the max value $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; $sql .= " FROM ".MAIN_DB_PREFIX."facture"; $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) { $row = $db->fetch_row($resql); if ($row) { $pryymm = substr($row[0], 0, 6); $max = $row[0]; } } if (!$pryymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $pryymm)) { return true; } else { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; } } /** * Return next value * * @param Societe $objsoc Object third party * @param Facture $invoice Object invoice * @param string $mode 'next' for next value or 'last' for last value * @return string Next value */ public function getNextValue($objsoc = null, $invoice = null, $mode = 'next') { global $db; $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // First, we get the max value $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL $sql .= " FROM ".MAIN_DB_PREFIX."facture"; $sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source)."-____-%'"; $sql .= " AND entity IN (".getEntity('invoicenumber', 1, $invoice).")"; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); if ($obj) $max = intval($obj->max); else $max = 0; } else { dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); return -1; } if ($mode == 'last') { if ($max >= (pow(10, 4) - 1)) $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is else $num = sprintf("%04s", $max); $ref = ''; $sql = "SELECT ref as ref"; $sql .= " FROM ".MAIN_DB_PREFIX."facture"; $sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source)."-____-".$num."'"; $sql .= " AND entity IN (".getEntity('invoicenumber', 1, $invoice).")"; $sql .= " ORDER BY ref DESC"; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); if ($obj) $ref = $obj->ref; } else dol_print_error($db); return $ref; } elseif ($mode == 'next') { $date = $invoice->date; // This is invoice date (not creation date) $yymm = strftime("%y%m", $date); if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is else $num = sprintf("%04s", $max + 1); dol_syslog(get_class($this)."::getNextValue return ".$this->prefix.$pos_source.'-'.$yymm.'-'.$num); return $this->prefix.$pos_source.'-'.$yymm.'-'.$num; } else dol_print_error('', 'Bad parameter for getNextValue'); } /** * Return next free value * * @param Societe $objsoc Object third party * @param Object $objforref Object for number to search * @return string Next free value */ public function getNumRef($objsoc, $objforref) { return $this->getNextValue($objsoc, $objforref); } }
{ "pile_set_name": "Github" }
db SUNFLORA ; 192 db 75, 75, 55, 30, 105, 85 ; hp atk def spd sat sdf db GRASS, GRASS ; type db 120 ; catch rate db 146 ; base exp db NO_ITEM, NO_ITEM ; items db GENDER_F50 ; gender ratio db 100 ; unknown 1 db 20 ; step cycles to hatch db 5 ; unknown 2 IF DEF(_GOLD) INCBIN "gfx/pokemon/sunflora/front_gold.dimensions" ELIF DEF(_SILVER) INCBIN "gfx/pokemon/sunflora/front_silver.dimensions" ENDC dw NULL, NULL ; unused (beta front/back pics) db GROWTH_MEDIUM_SLOW ; growth rate dn EGG_PLANT, EGG_PLANT ; egg groups ; tm/hm learnset tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH ; end
{ "pile_set_name": "Github" }
MIIF4AoBAKCCBdkwggXVBgkrBgEFBQcwAQEEggXGMIIFwjCBmaIWBBT0zghPr/K8 jV5hpjGMML9Q+DwzShgPMjAxMjEwMTAxMjA5NTlaMG4wbDBEMAkGBSsOAwIaBQAE FLdXtbacB/gWIxOOkMkqDr4yAaoxBBRge2YaRQ2XyolQL30EzTSo//z9SwILBAAA AAABL07hRxCAABgPMjAxMjEwMDEwNjAwMDBaoBEYDzIwMTMwNDE1MDYwMDAwWjAL BgkqhkiG9w0BAQUDggEBAGZY28eFWl169g7puLnKSeEzi6Ma5/rErOveFRp052ck 785B83HWkNmW/Bgw7Ws6Y7jBJce6ZQ5TMhwgNP34HuG/mVyn2ZjtCe4KKFBVnZV7 mHGx93jgKkQvdp4pbNKxZ504eZDp8UOlR9+uwWOWHVObn7o+2N8iWKErSbZ2uX54 Ajk8Hg/XN5wI4RUtcK3QpZSf3Ren5iit4NInwCpmTOkDz/IVK96BWaEQICq4VlHG ziD0H0SlBQCdcSPzZndGoCtIhNyJEL3O2y3Grg4X1XH7VeeyGesuTLEIAEMHJPJD TOVNoe5YPRK9Tqb+6jsubw8X/1b72kw3xVgb6MfC0tqgggQQMIIEDDCCBAgwggLw oAMCAQICCwQAAAAAAThXoveHMA0GCSqGSIb3DQEBBQUAMFcxCzAJBgNVBAYTAkJF MRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRsw GQYDVQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwHhcNMTIwNzA1MTgwMDAwWhcNMTMw NzA1MTgwMDAwWjBZMQswCQYDVQQGEwJCRTEZMBcGA1UEChMQR2xvYmFsU2lnbiBu di1zYTEvMC0GA1UEAxMmR2xvYmFsU2lnbiBPQ1NQIGZvciBSb290IFIxIC0gQnJh bmNoIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDMQY/h5DSRT24n mMtD19lrn8WZzOoIl+Z9qOsrLLjEQeTMDlL7JPZh5pLaHHb6kSWT+O/RcEwpw6Dq H9jtAgDOsGoN7gCK7wJbIvn4MdmkXZqVBcVl3uLuII3v1CPnlc/zoz5d9qXcZKb6 YuzseyzhDPecQ+7l2NVAUOFUj8GXOZi//bIveMsm+/zSLMfriIC84Uym2QY649SC aFNbtF/tR6upvLCLe0b2D1g+OBfGqZasi3QI5uX6lT0gHbCnPhRo3uxG2+S4KL3M 9sndMByrR5K6QuVf7UqA1vt0CfbA2OUXwcH5x3/TsHxtXDj2F/fWnC9QBBSN5n4I G8K7ZpYtAgMBAAGjgdIwgc8wDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBT0zghP r/K8jV5hpjGMML9Q+DwzSjBMBgNVHSAERTBDMEEGCSsGAQQBoDIBXzA0MDIGCCsG AQUFBwIBFiZodHRwczovL3d3dy5nbG9iYWxzaWduLmNvbS9yZXBvc2l0b3J5LzAJ BgNVHRMEAjAAMBMGA1UdJQQMMAoGCCsGAQUFBwMJMB8GA1UdIwQYMBaAFGB7ZhpF DZfKiVAvfQTNNKj//P1LMA8GCSsGAQUFBzABBQQCBQAwDQYJKoZIhvcNAQEFBQAD ggEBAGU9HIQImzhTHkQLyA178dUdnF5E3DdzmNtwVV3cxGrFOLMpciMQLioQ/xp5 t6j5Mshlp59imFylqowRRxRy4aN5TtMCufNh7yHIxI2Dt4O6qpPM946t5CJkMy+k 63pXz2xFIxaJDzAmzpWzu70OY0jrh3dZa8NR4AvhtoZ8zFE6suva6ZGK7JIoINaA j5uyZ0qU+7vFwV1awdReNV6494z/HRjs1n956mNbalB9mKp9XXyfZlix/nN5mTJd NlJqz7QjnCzZRM/Gfamzk8L3/CPS3XmSblFyn6SeZ92Vms4PNqZiEUNa2TMKXQR1 EMiDRMkyfIIMI80VgRvvzCiOt0c=
{ "pile_set_name": "Github" }
# Use one of these commands to build the manifest for Node.js: # # - make # - make DEBUG=1 # - make SGX=1 # - make SGX=1 DEBUG=1 # # Use `make clean` to remove Graphene-generated files. THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST))) NODEJS_DIR ?= /usr/bin/ # Relative path to Graphene root and key for enclave signing GRAPHENEDIR ?= ../.. SGX_SIGNER_KEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline else GRAPHENEDEBUG = none endif .PHONY: all all: nodejs.manifest pal_loader ifeq ($(SGX),1) all: nodejs.token endif include ../../Scripts/Makefile.configs # Node.js dependencies (generated from ldd). For SGX, the manifest needs to list all the libraries # loaded during execution, so that the signer can include the file hashes. # We need to replace Glibc dependencies with Graphene-specific Glibc. The Glibc binaries are # already listed in the manifest template, so we can skip them from the ldd results. GLIBC_DEPS = linux-vdso.so.1 /lib64/ld-linux-x86-64.so.2 libc.so.6 libm.so.6 librt.so.1 \ libdl.so.2 libpthread.so.0 libutil.so.1 libresolv.so.2 libnss_dns.so.2 # List all the Node.js dependencies, besides Glibc libraries .INTERMEDIATE: nodejs-deps nodejs-deps: @ldd $(NODEJS_DIR)nodejs | \ awk '{if ($$2 =="=>") {print $$1}}' | \ sort | uniq | grep -v -x $(patsubst %,-e %,$(GLIBC_DEPS)) > $@ # Generate manifest rules for Node.js dependencies .INTERMEDIATE: nodejs-trusted-libs nodejs-trusted-libs: nodejs-deps @for F in `cat nodejs-deps`; do \ P=`ldd $(NODEJS_DIR)nodejs | grep $$F | awk '{print $$3; exit}'`; \ N=`echo $$F | tr --delete '.' | tr --delete '-' | tr --delete '+'`; \ echo -n "sgx.trusted_files.$$N = file:$$P\\\\n"; \ done > $@ nodejs.manifest: nodejs.manifest.template nodejs-trusted-libs @sed -e 's|$$(GRAPHENEDIR)|'"$(GRAPHENEDIR)"'|g' \ -e 's|$$(GRAPHENEDEBUG)|'"$(GRAPHENEDEBUG)"'|g' \ -e 's|$$(NODEJS_DIR)|'"$(NODEJS_DIR)"'|g' \ -e 's|$$(NODEJS_TRUSTED_LIBS)|'"`cat nodejs-trusted-libs`"'|g' \ -e 's|$$(ARCH_LIBDIR)|'"$(ARCH_LIBDIR)"'|g' \ $< > $@ # Generate SGX-specific manifest, enclave signature, and token for enclave initialization nodejs.manifest.sgx: nodejs.manifest helloworld.js $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \ -libpal $(GRAPHENEDIR)/Runtime/libpal-Linux-SGX.so \ -key $(SGX_SIGNER_KEY) \ -manifest $< -output $@ nodejs.sig: nodejs.manifest.sgx nodejs.token: nodejs.sig $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-get-token -output $@ -sig $< # Extra executables pal_loader: ln -s $(GRAPHENEDIR)/Runtime/pal_loader $@ .PHONY: check check: all ./pal_loader nodejs.manifest helloworld.js > OUTPUT @grep -q "Hello World" OUTPUT && echo "[ Success 1/1 ]" @rm OUTPUT .PHONY: clean clean: $(RM) *.manifest *.manifest.sgx *.token *.sig pal_loader OUTPUT .PHONY: distclean distclean: clean
{ "pile_set_name": "Github" }
/* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MY_GLOBAL_INCLUDED #define MY_GLOBAL_INCLUDED /* This is the include file that should be included 'first' in every C file. */ /* Client library users on Windows need this macro defined here. */ #if !defined(__WIN__) && defined(_WIN32) #define __WIN__ #endif /* InnoDB depends on some MySQL internals which other plugins should not need. This is because of InnoDB's foreign key support, "safe" binlog truncation, and other similar legacy features. We define accessors for these internals unconditionally, but do not expose them in mysql/plugin.h. They are declared in ha_innodb.h for InnoDB's use. */ #define INNODB_COMPATIBILITY_HOOKS #ifdef __CYGWIN__ /* We use a Unix API, so pretend it's not Windows */ #undef WIN #undef WIN32 #undef _WIN #undef _WIN32 #undef _WIN64 #undef __WIN__ #undef __WIN32__ #define HAVE_ERRNO_AS_DEFINE #endif /* __CYGWIN__ */ #if defined(i386) && !defined(__i386__) #define __i386__ #endif /* Macros to make switching between C and C++ mode easier */ #ifdef __cplusplus #define C_MODE_START extern "C" { #define C_MODE_END } #else #define C_MODE_START #define C_MODE_END #endif #ifdef __cplusplus #define CPP_UNNAMED_NS_START namespace { #define CPP_UNNAMED_NS_END } #endif #include <my_config.h> #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE #define HAVE_PSI_INTERFACE #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */ /* Make it easier to add conditional code in _expressions_ */ #ifdef __WIN__ #define IF_WIN(A,B) A #else #define IF_WIN(A,B) B #endif #ifdef HAVE_purify #define IF_PURIFY(A,B) A #else #define IF_PURIFY(A,B) B #endif #ifndef EMBEDDED_LIBRARY #ifdef WITH_NDB_BINLOG #define HAVE_NDB_BINLOG 1 #endif #endif /* !EMBEDDED_LIBRARY */ #ifndef EMBEDDED_LIBRARY #define HAVE_REPLICATION #define HAVE_EXTERNAL_CLIENT #endif #if defined (_WIN32) /* off_t is 32 bit long. We do not use C runtime functions with off_t but native Win32 file IO APIs, that work with 64 bit offsets. */ #undef SIZEOF_OFF_T #define SIZEOF_OFF_T 8 /* Prevent inclusion of Windows GDI headers - they define symbol ERROR that conflicts with mysql headers. */ #ifndef NOGDI #define NOGDI #endif /* Include common headers.*/ #include <winsock2.h> #include <ws2tcpip.h> /* SOCKET */ #include <io.h> /* access(), chmod() */ #include <process.h> /* getpid() */ #define sleep(a) Sleep((a)*1000) /* Define missing access() modes. */ #define F_OK 0 #define W_OK 2 #define R_OK 4 /* Test for read permission. */ /* Define missing file locking constants. */ #define F_RDLCK 1 #define F_WRLCK 2 #define F_UNLCK 3 #define F_TO_EOF 0x3FFFFFFF /* Shared memory and named pipe connections are supported. */ #define HAVE_SMEM 1 #define HAVE_NAMED_PIPE 1 #define shared_memory_buffer_length 16000 #define default_shared_memory_base_name "MYSQL" #endif /* _WIN32*/ /* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */ #if defined(_AIX) && defined(_LARGE_FILE_API) #undef _LARGE_FILE_API #endif /* The macros below are used to allow build of Universal/fat binaries of MySQL and MySQL applications under darwin. */ #if defined(__APPLE__) && defined(__MACH__) # undef SIZEOF_CHARP # undef SIZEOF_SHORT # undef SIZEOF_INT # undef SIZEOF_LONG # undef SIZEOF_LONG_LONG # undef SIZEOF_OFF_T # undef WORDS_BIGENDIAN # define SIZEOF_SHORT 2 # define SIZEOF_INT 4 # define SIZEOF_LONG_LONG 8 # define SIZEOF_OFF_T 8 # if defined(__i386__) || defined(__ppc__) # define SIZEOF_CHARP 4 # define SIZEOF_LONG 4 # elif defined(__x86_64__) || defined(__ppc64__) # define SIZEOF_CHARP 8 # define SIZEOF_LONG 8 # else # error Building FAT binary for an unknown architecture. # endif # if defined(__ppc__) || defined(__ppc64__) # define WORDS_BIGENDIAN # endif #endif /* defined(__APPLE__) && defined(__MACH__) */ /* The macros below are borrowed from include/linux/compiler.h in the Linux kernel. Use them to indicate the likelyhood of the truthfulness of a condition. This serves two purposes - newer versions of gcc will be able to optimize for branch predication, which could yield siginficant performance gains in frequently executed sections of the code, and the other reason to use them is for documentation */ #if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) #define __builtin_expect(x, expected_value) (x) #endif #define likely(x) __builtin_expect((x),1) #define unlikely(x) __builtin_expect((x),0) /* Fix problem with S_ISLNK() on Linux */ #if defined(TARGET_OS_LINUX) || defined(__GLIBC__) #undef _GNU_SOURCE #define _GNU_SOURCE 1 #endif /* Temporary solution to solve bug#7156. Include "sys/types.h" before the thread headers, else the function madvise() will not be defined */ #if defined(HAVE_SYS_TYPES_H) && ( defined(sun) || defined(__sun) ) #include <sys/types.h> #endif #ifdef HAVE_THREADS_WITHOUT_SOCKETS /* MIT pthreads does not work with unix sockets */ #undef HAVE_SYS_UN_H #endif #define __EXTENSIONS__ 1 /* We want some extension */ #ifndef __STDC_EXT__ #define __STDC_EXT__ 1 /* To get large file support on hpux */ #endif /* Solaris 9 include file <sys/feature_tests.h> refers to X/Open document System Interfaces and Headers, Issue 5 saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes, but apparently other systems (namely FreeBSD) don't agree. On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600. Furthermore, it tests that if a program requires older standard (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be run on a new compiler (that defines _STDC_C99) and issues an #error. It's also an #error if a program requires new standard (_XOPEN_SOURCE=600 or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99. To add more to this mess, Sun Studio C compiler defines _STDC_C99 while C++ compiler does not! So, in a desperate attempt to get correct prototypes for both C and C++ code, we define either _XOPEN_SOURCE=600 or _XOPEN_SOURCE=500 depending on the compiler's announced C standard support. Cleaner solutions are welcome. */ #ifdef __sun #if __STDC_VERSION__ - 0 >= 199901L #define _XOPEN_SOURCE 600 #else #define _XOPEN_SOURCE 500 #endif #endif #if !defined(__WIN__) #ifndef _POSIX_PTHREAD_SEMANTICS #define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */ #endif #if !defined(SCO) #define _REENTRANT 1 /* Some thread libraries require this */ #endif #if !defined(_THREAD_SAFE) && !defined(_AIX) #define _THREAD_SAFE /* Required for OSF1 */ #endif #if defined(HPUX10) || defined(HPUX11) C_MODE_START /* HPUX needs this, signal.h bug */ #include <pthread.h> C_MODE_END #else #include <pthread.h> /* AIX must have this included first */ #endif #if !defined(SCO) && !defined(_REENTRANT) #define _REENTRANT 1 /* Threads requires reentrant code */ #endif #endif /* !defined(__WIN__) */ /* Go around some bugs in different OS and compilers */ #ifdef _AIX /* By [email protected] */ #define _H_STRINGS #define _SYS_STREAM_H /* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */ #define ulonglong2double(A) my_ulonglong2double(A) #define my_off_t2double(A) my_ulonglong2double(A) C_MODE_START inline double my_ulonglong2double(unsigned long long A) { return (double A); } C_MODE_END #endif /* _AIX */ #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ #undef HAVE_SNPRINTF #endif #ifdef HAVE_BROKEN_PREAD /* pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without installing the kernel patch PHKL_20349 or greater */ #undef HAVE_PREAD #undef HAVE_PWRITE #endif #ifdef UNDEF_HAVE_INITGROUPS /* For AIX 4.3 */ #undef HAVE_INITGROUPS #endif #if defined(_lint) && !defined(lint) #define lint #endif #if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG) #define _LONG_LONG 1 /* For AIX string library */ #endif #ifndef stdin #include <stdio.h> #endif #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_STDDEF_H #include <stddef.h> #endif #include <math.h> #ifdef HAVE_LIMITS_H #include <limits.h> #endif #ifdef HAVE_FLOAT_H #include <float.h> #endif #ifdef HAVE_FENV_H #include <fenv.h> /* For fesetround() */ #endif #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif #ifdef HAVE_SYS_TIMEB_H #include <sys/timeb.h> /* Avoid warnings on SCO */ #endif #if TIME_WITH_SYS_TIME # include <sys/time.h> # include <time.h> #else # if HAVE_SYS_TIME_H # include <sys/time.h> # else # include <time.h> # endif #endif /* TIME_WITH_SYS_TIME */ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #if defined(__cplusplus) && defined(NO_CPLUSPLUS_ALLOCA) #undef HAVE_ALLOCA #undef HAVE_ALLOCA_H #endif #ifdef HAVE_ALLOCA_H #include <alloca.h> #endif #include <errno.h> /* Recommended by debian */ /* We need the following to go around a problem with openssl on solaris */ #if defined(HAVE_CRYPT_H) #include <crypt.h> #endif /* A lot of our programs uses asserts, so better to always include it This also fixes a problem when people uses DBUG_ASSERT without including assert.h */ #include <assert.h> /* an assert that works at compile-time. only for constant expression */ #ifdef _some_old_compiler_that_does_not_understand_the_construct_below_ #define compile_time_assert(X) do { } while(0) #else #define compile_time_assert(X) \ do \ { \ typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \ } while(0) #endif /* Go around some bugs in different OS and compilers */ #if defined (HPUX11) && defined(_LARGEFILE_SOURCE) #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE #endif #endif #if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H) #include <sys/stream.h> /* HPUX 10.20 defines ulong here. UGLY !!! */ #define HAVE_ULONG #endif #if defined(HPUX10) && defined(_LARGEFILE64_SOURCE) /* Fix bug in setrlimit */ #undef setrlimit #define setrlimit cma_setrlimit64 #endif /* Declare madvise where it is not declared for C++, like Solaris */ #if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus) extern "C" int madvise(void *addr, size_t len, int behav); #endif #define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ #define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ /* Paranoid settings. Define I_AM_PARANOID if you are paranoid */ #ifdef I_AM_PARANOID #define DONT_ALLOW_USER_CHANGE 1 #define DONT_USE_MYSQL_PWD 1 #endif /* Does the system remember a signal handler after a signal ? */ #if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION) #define SIGNAL_HANDLER_RESET_ON_DELIVERY #endif /* Deprecated workaround for false-positive uninitialized variables warnings. Those should be silenced using tool-specific heuristics. Enabled by default for g++ due to the bug referenced below. */ #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ (defined(__GNUC__) && defined(__cplusplus)) #define LINT_INIT(var) var= 0 #else #define LINT_INIT(var) #endif #ifndef SO_EXT #ifdef _WIN32 #define SO_EXT ".dll" #elif defined(__APPLE__) #define SO_EXT ".dylib" #else #define SO_EXT ".so" #endif #endif /* Suppress uninitialized variable warning without generating code. The _cplusplus is a temporary workaround for C++ code pending a fix for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772). */ #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ defined(__cplusplus) || !defined(__GNUC__) #define UNINIT_VAR(x) x= 0 #else /* GCC specific self-initialization which inhibits the warning. */ #define UNINIT_VAR(x) x= x #endif #if !defined(HAVE_UINT) #undef HAVE_UINT #define HAVE_UINT typedef unsigned int uint; typedef unsigned short ushort; #endif #define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; } #define test(a) ((a) ? 1 : 0) #define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) #define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) #define test_all_bits(a,b) (((a) & (b)) == (b)) #define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0]))) /* Define some general constants */ #ifndef TRUE #define TRUE (1) /* Logical true */ #define FALSE (0) /* Logical false */ #endif #include <my_compiler.h> /* The DBUG_ON flag always takes precedence over default DBUG_OFF */ #if defined(DBUG_ON) && defined(DBUG_OFF) #undef DBUG_OFF #endif /* We might be forced to turn debug off, if not turned off already */ #if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF) # define DBUG_OFF # ifdef DBUG_ON # undef DBUG_ON # endif #endif /* Some types that is different between systems */ typedef int File; /* File descriptor */ #ifdef _WIN32 typedef SOCKET my_socket; #else typedef int my_socket; /* File descriptor for sockets */ #define INVALID_SOCKET -1 #endif /* Type for fuctions that handles signals */ #define sig_handler RETSIGTYPE C_MODE_START typedef void (*sig_return)();/* Returns type from signal */ C_MODE_END #if defined(__GNUC__) && !defined(_lint) typedef char pchar; /* Mixed prototypes can take char */ typedef char puchar; /* Mixed prototypes can take char */ typedef char pbool; /* Mixed prototypes can take char */ typedef short pshort; /* Mixed prototypes can take short int */ typedef float pfloat; /* Mixed prototypes can take float */ #else typedef int pchar; /* Mixed prototypes can't take char */ typedef uint puchar; /* Mixed prototypes can't take char */ typedef int pbool; /* Mixed prototypes can't take char */ typedef int pshort; /* Mixed prototypes can't take short int */ typedef double pfloat; /* Mixed prototypes can't take float */ #endif C_MODE_START typedef int (*qsort_cmp)(const void *,const void *); typedef int (*qsort_cmp2)(const void*, const void *,const void *); C_MODE_END #define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */ #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif typedef SOCKET_SIZE_TYPE size_socket; #ifndef SOCKOPT_OPTLEN_TYPE #define SOCKOPT_OPTLEN_TYPE size_socket #endif /* file create flags */ #ifndef O_SHARE /* Probably not windows */ #define O_SHARE 0 /* Flag to my_open for shared files */ #ifndef O_BINARY #define O_BINARY 0 /* Flag to my_open for binary files */ #endif #ifndef FILE_BINARY #define FILE_BINARY O_BINARY /* Flag to my_fopen for binary streams */ #endif #ifdef HAVE_FCNTL #define HAVE_FCNTL_LOCK #define F_TO_EOF 0L /* Param to lockf() to lock rest of file */ #endif #endif /* O_SHARE */ #ifndef O_TEMPORARY #define O_TEMPORARY 0 #endif #ifndef O_SHORT_LIVED #define O_SHORT_LIVED 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif /* additional file share flags for win32 */ #ifdef __WIN__ #define _SH_DENYRWD 0x110 /* deny read/write mode & delete */ #define _SH_DENYWRD 0x120 /* deny write mode & delete */ #define _SH_DENYRDD 0x130 /* deny read mode & delete */ #define _SH_DENYDEL 0x140 /* deny delete only */ #endif /* __WIN__ */ /* General constants */ #define FN_LEN 256 /* Max file name len */ #define FN_HEADLEN 253 /* Max length of filepart of file name */ #define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */ #define FN_REFLEN 512 /* Max length of full path-name */ #define FN_EXTCHAR '.' #define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */ #define FN_CURLIB '.' /* ./ is used as abbrev for current dir */ #define FN_PARENTDIR ".." /* Parent directory; Must be a string */ #ifdef _WIN32 #define FN_LIBCHAR '\\' #define FN_LIBCHAR2 '/' #define FN_DIRSEP "/\\" /* Valid directory separators */ #define FN_EXEEXT ".exe" #define FN_SOEXT ".dll" #define FN_ROOTDIR "\\" #define FN_DEVCHAR ':' #define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */ #define FN_NO_CASE_SENCE /* Files are not case-sensitive */ #else #define FN_LIBCHAR '/' #define FN_LIBCHAR2 '/' #define FN_DIRSEP "/" /* Valid directory separators */ #define FN_EXEEXT "" #define FN_SOEXT ".so" #define FN_ROOTDIR "/" #endif /* MY_FILE_MIN is Windows speciality and is used to quickly detect the mismatch of CRT and mysys file IO usage on Windows at runtime. CRT file descriptors can be in the range 0-2047, whereas descriptors returned by my_open() will start with 2048. If a file descriptor with value less then MY_FILE_MIN is passed to mysys IO function, chances are it stemms from open()/fileno() and not my_open()/my_fileno. For Posix, mysys functions are light wrappers around libc, and MY_FILE_MIN is logically 0. */ #ifdef _WIN32 #define MY_FILE_MIN 2048 #else #define MY_FILE_MIN 0 #endif /* MY_NFILE is the default size of my_file_info array. It is larger on Windows, because it all file handles are stored in my_file_info Default size is 16384 and this should be enough for most cases.If it is not enough, --max-open-files with larger value can be used. For Posix , my_file_info array is only used to store filenames for error reporting and its size is not a limitation for number of open files. */ #ifdef _WIN32 #define MY_NFILE (16384 + MY_FILE_MIN) #else #define MY_NFILE 64 #endif #ifndef OS_FILE_LIMIT #define OS_FILE_LIMIT UINT_MAX #endif /* Io buffer size; Must be a power of 2 and a multiple of 512. May be smaller what the disk page size. This influences the speed of the isam btree library. eg to big to slow. */ #define IO_SIZE 4096 /* How much overhead does malloc have. The code often allocates something like 1024-MALLOC_OVERHEAD bytes */ #define MALLOC_OVERHEAD 8 /* get memory in huncs */ #define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD) /* Typical record cash */ #define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD) /* Typical key cash */ #define KEY_CACHE_SIZE (uint) (8*1024*1024) /* Default size of a key cache block */ #define KEY_CACHE_BLOCK_SIZE (uint) 1024 /* Some things that this system doesn't have */ #ifdef _WIN32 #define NO_DIR_LIBRARY /* Not standard dir-library */ #endif /* Some defines of functions for portability */ #undef remove /* Crashes MySQL on SCO 5.0.0 */ #ifndef __WIN__ #define closesocket(A) close(A) #endif #if (_MSC_VER) #if !defined(_WIN64) inline double my_ulonglong2double(unsigned long long value) { long long nr=(long long) value; if (nr >= 0) return (double) nr; return (18446744073709551616.0 + (double) nr); } #define ulonglong2double my_ulonglong2double #define my_off_t2double my_ulonglong2double #endif /* _WIN64 */ inline unsigned long long my_double2ulonglong(double d) { double t= d - (double) 0x8000000000000000ULL; if (t >= 0) return ((unsigned long long) t) + 0x8000000000000000ULL; return (unsigned long long) d; } #define double2ulonglong my_double2ulonglong #endif #ifndef ulonglong2double #define ulonglong2double(A) ((double) (ulonglong) (A)) #define my_off_t2double(A) ((double) (my_off_t) (A)) #endif #ifndef double2ulonglong #define double2ulonglong(A) ((ulonglong) (double) (A)) #endif #ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif #define ulong_to_double(X) ((double) (ulong) (X)) #ifndef STACK_DIRECTION #error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS" #endif #if !defined(HAVE_STRTOK_R) #define strtok_r(A,B,C) strtok((A),(B)) #endif /* This is from the old m-machine.h file */ #if SIZEOF_LONG_LONG > 4 #define HAVE_LONG_LONG 1 #endif /* Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined. */ #if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN) #define LONGLONG_MIN ((long long) 0x8000000000000000LL) #define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL) #endif #if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX) /* First check for ANSI C99 definition: */ #ifdef ULLONG_MAX #define ULONGLONG_MAX ULLONG_MAX #else #define ULONGLONG_MAX ((unsigned long long)(~0ULL)) #endif #endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/ #define INT_MIN64 (~0x7FFFFFFFFFFFFFFFLL) #define INT_MAX64 0x7FFFFFFFFFFFFFFFLL #define INT_MIN32 (~0x7FFFFFFFL) #define INT_MAX32 0x7FFFFFFFL #define UINT_MAX32 0xFFFFFFFFL #define INT_MIN24 (~0x007FFFFF) #define INT_MAX24 0x007FFFFF #define UINT_MAX24 0x00FFFFFF #define INT_MIN16 (~0x7FFF) #define INT_MAX16 0x7FFF #define UINT_MAX16 0xFFFF #define INT_MIN8 (~0x7F) #define INT_MAX8 0x7F #define UINT_MAX8 0xFF /* From limits.h instead */ #ifndef DBL_MIN #define DBL_MIN 4.94065645841246544e-324 #define FLT_MIN ((float)1.40129846432481707e-45) #endif #ifndef DBL_MAX #define DBL_MAX 1.79769313486231470e+308 #define FLT_MAX ((float)3.40282346638528860e+38) #endif #ifndef SIZE_T_MAX #define SIZE_T_MAX (~((size_t) 0)) #endif #ifndef isfinite #ifdef HAVE_FINITE #define isfinite(x) finite(x) #else #define finite(x) (1.0 / fabs(x) > 0.0) #endif /* HAVE_FINITE */ #endif /* isfinite */ #include <math.h> #ifndef HAVE_ISNAN #define isnan(x) ((x) != (x)) #endif C_MODE_START extern double my_double_isnan(double x); C_MODE_END #ifdef HAVE_ISINF /* Check if C compiler is affected by GCC bug #39228 */ #if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF) /* Force store/reload of the argument to/from a 64-bit double */ static inline double my_isinf(double x) { volatile double t= x; return isinf(t); } #else /* System-provided isinf() is available and safe to use */ #define my_isinf(X) isinf(X) #endif #else /* !HAVE_ISINF */ #define my_isinf(X) (!finite(X) && !isnan(X)) #endif /* Define missing math constants. */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #ifndef M_E #define M_E 2.7182818284590452354 #endif #ifndef M_LN2 #define M_LN2 0.69314718055994530942 #endif /* Max size that must be added to a so that we know Size to make adressable obj. */ #if SIZEOF_CHARP == 4 typedef long my_ptrdiff_t; #else typedef long long my_ptrdiff_t; #endif #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) /* Size to make adressable obj. */ #define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size) #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B)) /* Custom version of standard offsetof() macro which can be used to get offsets of members in class for non-POD types (according to the current version of C++ standard offsetof() macro can't be used in such cases and attempt to do so causes warnings to be emitted, OTOH in many cases it is still OK to assume that all instances of the class has the same offsets for the same members). This is temporary solution which should be removed once File_parser class and related routines are refactored. */ #define my_offsetof(TYPE, MEMBER) \ ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10)) #define NullS (char *) 0 #ifdef STDCALL #undef STDCALL #endif #ifdef _WIN32 #define STDCALL __stdcall #else #define STDCALL #endif /* Typdefs for easyier portability */ #ifndef HAVE_UCHAR typedef unsigned char uchar; /* Short for unsigned char */ #endif #ifndef HAVE_INT8 typedef signed char int8; /* Signed integer >= 8 bits */ #endif #ifndef HAVE_UINT8 typedef unsigned char uint8; /* Unsigned integer >= 8 bits */ #endif #ifndef HAVE_INT16 typedef short int16; #endif #ifndef HAVE_UINT16 typedef unsigned short uint16; #endif #if SIZEOF_INT == 4 #ifndef HAVE_INT32 typedef int int32; #endif #ifndef HAVE_UINT32 typedef unsigned int uint32; #endif #elif SIZEOF_LONG == 4 #ifndef HAVE_INT32 typedef long int32; #endif #ifndef HAVE_UINT32 typedef unsigned long uint32; #endif #else #error Neither int or long is of 4 bytes width #endif #if !defined(HAVE_ULONG) && !defined(__USE_MISC) typedef unsigned long ulong; /* Short for unsigned long */ #endif #ifndef longlong_defined /* Using [unsigned] long long is preferable as [u]longlong because we use [unsigned] long long unconditionally in many places, for example in constants with [U]LL suffix. */ #if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8 typedef unsigned long long int ulonglong; /* ulong or unsigned long long */ typedef long long int longlong; #else typedef unsigned long ulonglong; /* ulong or unsigned long long */ typedef long longlong; #endif #endif #ifndef HAVE_INT64 typedef longlong int64; #endif #ifndef HAVE_UINT64 typedef ulonglong uint64; #endif #if defined(NO_CLIENT_LONG_LONG) typedef unsigned long my_ulonglong; #elif defined (__WIN__) typedef unsigned __int64 my_ulonglong; #else typedef unsigned long long my_ulonglong; #endif #if SIZEOF_CHARP == SIZEOF_INT typedef int intptr; #elif SIZEOF_CHARP == SIZEOF_LONG typedef long intptr; #elif SIZEOF_CHARP == SIZEOF_LONG_LONG typedef long long intptr; #else #error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(long long) #endif #define MY_ERRPTR ((void*)(intptr)1) #if defined(_WIN32) typedef unsigned long long my_off_t; typedef unsigned long long os_off_t; #else typedef off_t os_off_t; #if SIZEOF_OFF_T > 4 typedef ulonglong my_off_t; #else typedef unsigned long my_off_t; #endif #endif /*_WIN32*/ #define MY_FILEPOS_ERROR (~(my_off_t) 0) /* TODO Convert these to use Bitmap class. */ typedef ulonglong table_map; /* Used for table bits in join */ typedef ulonglong nesting_map; /* Used for flags of nesting constructs */ #if defined(__WIN__) #define socket_errno WSAGetLastError() #define SOCKET_EINTR WSAEINTR #define SOCKET_EAGAIN WSAEINPROGRESS #define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK #define SOCKET_EADDRINUSE WSAEADDRINUSE #define SOCKET_ETIMEDOUT WSAETIMEDOUT #define SOCKET_ECONNRESET WSAECONNRESET #define SOCKET_ENFILE ENFILE #define SOCKET_EMFILE EMFILE #else /* Unix */ #define socket_errno errno #define closesocket(A) close(A) #define SOCKET_EINTR EINTR #define SOCKET_EAGAIN EAGAIN #define SOCKET_EWOULDBLOCK EWOULDBLOCK #define SOCKET_EADDRINUSE EADDRINUSE #define SOCKET_ETIMEDOUT ETIMEDOUT #define SOCKET_ECONNRESET ECONNRESET #define SOCKET_ENFILE ENFILE #define SOCKET_EMFILE EMFILE #endif typedef int myf; /* Type of MyFlags in my_funcs */ typedef char my_bool; /* Small bool */ /* Macros for converting *constants* to the right type */ #define MYF(v) (myf) (v) #ifndef LL #ifdef HAVE_LONG_LONG #define LL(A) A ## LL #else #define LL(A) A ## L #endif #endif #ifndef ULL #ifdef HAVE_LONG_LONG #define ULL(A) A ## ULL #else #define ULL(A) A ## UL #endif #endif /* Defines to make it possible to prioritize register assignments. No longer that important with modern compilers. */ #ifndef USING_X #define reg1 register #define reg2 register #define reg3 register #define reg4 register #define reg5 register #define reg6 register #define reg7 register #define reg8 register #define reg9 register #define reg10 register #define reg11 register #define reg12 register #define reg13 register #define reg14 register #define reg15 register #define reg16 register #endif /* Some helper macros */ #define YESNO(X) ((X) ? "yes" : "no") #define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */ #define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */ #include <my_byteorder.h> #ifdef HAVE_CHARSET_utf8 #define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8" #else #define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME #endif #if defined(EMBEDDED_LIBRARY) && !defined(HAVE_EMBEDDED_PRIVILEGE_CONTROL) #define NO_EMBEDDED_ACCESS_CHECKS #endif #if defined(_WIN32) #define dlsym(lib, name) (void*)GetProcAddress((HMODULE)lib, name) #define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0) #define dlclose(lib) FreeLibrary((HMODULE)lib) #ifndef HAVE_DLOPEN #define HAVE_DLOPEN #endif #endif #ifdef HAVE_DLOPEN #if defined(HAVE_DLFCN_H) #include <dlfcn.h> #endif #endif #ifndef HAVE_DLERROR #ifdef _WIN32 #define DLERROR_GENERATE(errmsg, error_number) \ char win_errormsg[2048]; \ if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, \ 0, error_number, 0, win_errormsg, 2048, NULL)) \ { \ char *ptr; \ for (ptr= &win_errormsg[0] + strlen(win_errormsg) - 1; \ ptr >= &win_errormsg[0] && strchr("\r\n\t\0x20", *ptr); \ ptr--) \ *ptr= 0; \ errmsg= win_errormsg; \ } \ else \ errmsg= "" #define dlerror() "" #define dlopen_errno GetLastError() #else /* _WIN32 */ #define dlerror() "No support for dynamic loading (static build?)" #define DLERROR_GENERATE(errmsg, error_number) errmsg= dlerror() #define dlopen_errno errno #endif /* _WIN32 */ #else /* HAVE_DLERROR */ #define DLERROR_GENERATE(errmsg, error_number) errmsg= dlerror() #define dlopen_errno errno #endif /* HAVE_DLERROR */ /* * Include standard definitions of operator new and delete. */ #ifdef __cplusplus #include <new> #endif /* Length of decimal number represented by INT32. */ #define MY_INT32_NUM_DECIMAL_DIGITS 11U /* Length of decimal number represented by INT64. */ #define MY_INT64_NUM_DECIMAL_DIGITS 21U /* Define some useful general macros (should be done after all headers). */ #define MY_MAX(a, b) ((a) > (b) ? (a) : (b)) #define MY_MIN(a, b) ((a) < (b) ? (a) : (b)) /* Only Linux is known to need an explicit sync of the directory to make sure a file creation/deletion/renaming in(from,to) this directory durable. */ #ifdef TARGET_OS_LINUX #define NEED_EXPLICIT_SYNC_DIR 1 #else /* On linux default rwlock scheduling policy is good enough for waiting_threads.c, on other systems use our special implementation (which is slower). QQ perhaps this should be tested in configure ? how ? */ #define WT_RWLOCKS_USE_MUTEXES 1 #endif #if !defined(__cplusplus) && !defined(bool) #define bool In_C_you_should_use_my_bool_instead() #endif /* Provide __func__ macro definition for platforms that miss it. */ #if __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 # define __func__ __FUNCTION__ # else # define __func__ "<unknown>" # endif #elif defined(_MSC_VER) # if _MSC_VER < 1300 # define __func__ "<unknown>" # else # define __func__ __FUNCTION__ # endif #elif defined(__BORLANDC__) # define __func__ __FUNC__ #else # define __func__ "<unknown>" #endif #ifndef HAVE_RINT /** All integers up to this number can be represented exactly as double precision values (DBL_MANT_DIG == 53 for IEEE 754 hardware). */ #define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1) /** rint(3) implementation for platforms that do not have it. Always rounds to the nearest integer with ties being rounded to the nearest even integer to mimic glibc's rint() behavior in the "round-to-nearest" FPU mode. Hardware-specific optimizations are possible (frndint on x86). Unlike this implementation, hardware will also honor the FPU rounding mode. */ static inline double rint(double x) { double f, i; f = modf(x, &i); /* All doubles with absolute values > MAX_EXACT_INTEGER are even anyway, no need to check it. */ if (x > 0.0) i += (double) ((f > 0.5) || (f == 0.5 && i <= (double) MAX_EXACT_INTEGER && (longlong) i % 2)); else i -= (double) ((f < -0.5) || (f == -0.5 && i >= (double) -MAX_EXACT_INTEGER && (longlong) i % 2)); return i; } #endif /* HAVE_RINT */ /* MYSQL_PLUGIN_IMPORT macro is used to export mysqld data (i.e variables) for usage in storage engine loadable plugins. Outside of Windows, it is dummy. */ #ifndef MYSQL_PLUGIN_IMPORT #if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN)) #define MYSQL_PLUGIN_IMPORT __declspec(dllimport) #else #define MYSQL_PLUGIN_IMPORT #endif #endif #include <my_dbug.h> /* Defines that are unique to the embedded version of MySQL */ #ifdef EMBEDDED_LIBRARY /* Things we don't need in the embedded version of MySQL */ /* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ #undef HAVE_OPENSSL #undef HAVE_SMEM /* No shared memory */ #endif /* EMBEDDED_LIBRARY */ enum loglevel { ERROR_LEVEL= 0, WARNING_LEVEL= 1, INFORMATION_LEVEL= 2 }; /* Visual Studio before the version 2010 did not have lldiv_t. In Visual Studio 2010, _MSC_VER is defined as 1600. */ #if defined(_MSC_VER) && (_MSC_VER < 1600) typedef struct { long long int quot; /* Quotient. */ long long int rem; /* Remainder. */ } lldiv_t; #endif #endif // MY_GLOBAL_INCLUDED
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$/android"> <sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" /> </content> <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Flutter for Android" level="project" /> </component> </module>
{ "pile_set_name": "Github" }
package cmd import ( "context" "fmt" "io" "os" "os/signal" "syscall" "github.com/golang/protobuf/ptypes/empty" "github.com/mitchellh/go-homedir" "github.com/mosuka/cete/client" "github.com/mosuka/cete/marshaler" "github.com/mosuka/cete/protobuf" "github.com/spf13/cobra" "github.com/spf13/viper" ) var ( watchCmd = &cobra.Command{ Use: "watch", Short: "Watch a node updates", Long: "Watch a node updates", RunE: func(cmd *cobra.Command, args []string) error { grpcAddress = viper.GetString("grpc_address") certificateFile = viper.GetString("certificate_file") commonName = viper.GetString("common_name") c, err := client.NewGRPCClientWithContextTLS(grpcAddress, context.Background(), certificateFile, commonName) if err != nil { return err } defer func() { _ = c.Close() }() req := &empty.Empty{} watchClient, err := c.Watch(req) if err != nil { return err } go func() { for { resp, err := watchClient.Recv() if err == io.EOF { break } if err != nil { break } switch resp.Event.Type { case protobuf.Event_Join: eventReq := &protobuf.SetMetadataRequest{} if eventData, err := marshaler.MarshalAny(resp.Event.Data); err != nil { _, _ = fmt.Fprintln(os.Stderr, fmt.Sprintf("%s, %v", resp.Event.Type.String(), err)) } else { if eventData == nil { _, _ = fmt.Fprintln(os.Stderr, fmt.Sprintf("%s, nil", resp.Event.Type.String())) } else { eventReq = eventData.(*protobuf.SetMetadataRequest) } } fmt.Printf("%s, %v\n", resp.Event.Type.String(), eventReq) case protobuf.Event_Leave: eventReq := &protobuf.DeleteMetadataRequest{} if eventData, err := marshaler.MarshalAny(resp.Event.Data); err != nil { _, _ = fmt.Fprintln(os.Stderr, fmt.Sprintf("%s, %v", resp.Event.Type.String(), err)) } else { if eventData == nil { _, _ = fmt.Fprintln(os.Stderr, fmt.Sprintf("%s, nil", resp.Event.Type.String())) } else { eventReq = eventData.(*protobuf.DeleteMetadataRequest) } } fmt.Printf("%s, %v\n", resp.Event.Type.String(), eventReq) case protobuf.Event_Set: putRequest := &protobuf.SetRequest{} if putRequestInstance, err := marshaler.MarshalAny(resp.Event.Data); err != nil { _, _ = fmt.Fprintln(os.Stderr, fmt.Sprintf("%s, %v", resp.Event.Type.String(), err)) } else { if putRequestInstance == nil { _, _ = fmt.Fprintln(os.Stderr, fmt.Sprintf("%s, nil", resp.Event.Type.String())) } else { putRequest = putRequestInstance.(*protobuf.SetRequest) } } fmt.Printf("%s, %v\n", resp.Event.Type.String(), putRequest) case protobuf.Event_Delete: deleteRequest := &protobuf.DeleteRequest{} if deleteRequestInstance, err := marshaler.MarshalAny(resp.Event.Data); err != nil { _, _ = fmt.Fprintln(os.Stderr, fmt.Sprintf("%s, %v", resp.Event.Type.String(), err)) } else { if deleteRequestInstance == nil { _, _ = fmt.Fprintln(os.Stderr, fmt.Sprintf("%s, nil", resp.Event.Type.String())) } else { deleteRequest = deleteRequestInstance.(*protobuf.DeleteRequest) } } fmt.Printf("%s, %v\n", resp.Event.Type.String(), deleteRequest) } } }() quitCh := make(chan os.Signal, 1) signal.Notify(quitCh, os.Kill, os.Interrupt, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT) <-quitCh return nil }, } ) func init() { rootCmd.AddCommand(watchCmd) cobra.OnInitialize(func() { if configFile != "" { viper.SetConfigFile(configFile) } else { home, err := homedir.Dir() if err != nil { _, _ = fmt.Fprintln(os.Stderr, err) os.Exit(1) } viper.AddConfigPath("/etc") viper.AddConfigPath(home) viper.SetConfigName("cete") } viper.SetEnvPrefix("CETE") viper.AutomaticEnv() if err := viper.ReadInConfig(); err != nil { switch err.(type) { case viper.ConfigFileNotFoundError: // cete.yaml does not found in config search path default: _, _ = fmt.Fprintln(os.Stderr, err) os.Exit(1) } } }) watchCmd.PersistentFlags().StringVar(&configFile, "config-file", "", "config file. if omitted, cete.yaml in /etc and home directory will be searched") watchCmd.PersistentFlags().StringVar(&grpcAddress, "grpc-address", ":9000", "gRPC server listen address") watchCmd.PersistentFlags().StringVar(&certificateFile, "certificate-file", "", "path to the client server TLS certificate file") watchCmd.PersistentFlags().StringVar(&commonName, "common-name", "", "certificate common name") _ = viper.BindPFlag("grpc_address", watchCmd.PersistentFlags().Lookup("grpc-address")) _ = viper.BindPFlag("certificate_file", watchCmd.PersistentFlags().Lookup("certificate-file")) _ = viper.BindPFlag("common_name", watchCmd.PersistentFlags().Lookup("common-name")) }
{ "pile_set_name": "Github" }
var ja = { "audio": "オーディオ", "video": "ビデオ", "playerHeading": "メディアプレイヤー", "faster": "はやく", "slower": "おそく", "play": "再生", "pause": "一時停止", "stop": "停止", "restart": "再開", "prevChapter": "前のチャプター", "nextChapter": "次のチャプター", "prevTrack": "前のトラック", "nextTrack": "次のトラック", "rewind": "巻き戻し", "forward": "早送り", "captions": "キャプション", "showCaptions": "キャプションを表示する", "hideCaptions": "キャプションを非表示にする", "captionsOff": "キャプションを消す", "showTranscript": "書き起こしの表示", "hideTranscript": "書き起こしを非表示にする", "turnOnDescriptions": "音声解説を出す", "turnOffDescriptions": "音声解説を出さない", "chapters": "チャプター", "newChapter": "新しいチャプター", "language": "言語", "sign": "手話", "showSign": "手話を表示", "hideSign": "手話を非表示", "seekbarLabel": "timeline", "mute": "消音", "unmute": "消音解除", "volume": "音量", "volumeHelp": "クリックして音量スライダーを操作します", "volumeUpDown": "音量の上下", "volumeSliderClosed": "音量スライダー終了", "preferences": "設定", "enterFullScreen": "全画面表示", "exitFullScreen": "全画面表示の終了", "fullScreen": "全画面表示", "speed": "再生速度", "and": "と", "or": "または", "spacebar": "スペースキー", "transcriptTitle": "書き起こし", "lyricsTitle": "歌詞", "autoScroll": "自動スクロール", "unknown": "不明", "statusPlaying": "再生中", "statusPaused": "一時停止中", "statusStopped": "停止", "statusWaiting": "待機中", "statusBuffering": "バッファリング中", "statusUsingDesc": "解説付き動画を使います", "statusLoadingDesc": "解説付き動画を読み込み中", "statusUsingNoDesc": "解説なしのバージョンを使います", "statusLoadingNoDesc": "解説なしのバージョンを読み込んでいます", "statusLoadingNext": "次のトラックを読み込んでいます", "statusEnd": "トラックの終わり", "selectedTrack": "選択されたトラック", "alertDescribedVersion": "この動画の音声解説付きバージョンを使います", "alertNonDescribedVersion": "この動画の解説なしバージョンを使います", "fallbackError1": "申し訳ございません。あなたのブラウザはこれを再生できません", "fallbackError2": "以下のブラウザではこのプレイヤーが利用可能であることが知られています", "orHigher": "以降", "prefMenuCaptions": "キャプション", "prefMenuDescriptions": "音声解説", "prefMenuKeyboard": "キーボード", "prefMenuTranscript": "字幕", "prefTitleCaptions": "キャプションの設定", "prefTitleDescriptions": "音声解説の設定", "prefTitleKeyboard": "キーボードの設定", "prefTitleTranscript": "字幕の設定", "prefIntroCaptions": "以下の設定は、キャプションがどう表示されるかをコントロールします。", "prefIntroDescription1": "このメディアプレイヤーは次の2つの方法で音声解説をサポートします: ", "prefIntroDescription2": "現在の動画では次の方法が選択可能です: ", "prefIntroDescriptionNone": "現在の動画にはどちらの形式の音声解説も含まれていません。", "prefIntroDescription3": "次のフォームを使って、音声解説に関連する設定を保存できます。", "prefIntroDescription4": "設定が保存されたら、音声解説ボタンによって音声解説の表示・非表示を切り替えることができます。", "prefIntroKeyboard1": "このページのメディアプレイヤーは、キーボード・ショートカットを使ってこのページのどこからでも操作できます(下の一覧を参照してください)。", "prefIntroKeyboard2": "修飾キー(Shift、Alt と Control) は以下で割り当てることができます。", "prefIntroKeyboard3": "注意: いくつかのキーの組み合わせは、ブラウザやアプリケーション・ソフトで使われているものと衝突する可能性があります。ご利用の環境で正しく動作する、様々なキーの組み合わせを試してください。", "prefIntroTranscript": "以下の設定はインタラクティブな字幕に作用します。", "prefCookieWarning": "設定を変更するにはCookieが必要です。", "prefHeadingKeyboard1": "ショートカットの修飾キー", "prefHeadingKeyboard2": "現在のキーボード・ショートカット", "prefHeadingDescription": "音声解説", "prefHeadingTextDescription": "テキストによる音声解説", "prefHeadingCaptions": "キャプション", "prefHeadingTranscript": "インタラクティブな字幕", "prefAltKey": "Alt", "prefCtrlKey": "Control", "prefShiftKey": "Shift", "escapeKey": "Escape", "escapeKeyFunction": "現在のダイアログやポップアップメニューを閉じる", "prefDescFormat": "フォーマットの選択", "prefDescFormatHelp": "両方のフォーマットが利用可能な場合、どちらかのみ利用されます。", "prefDescFormatOption1": "解説付きの代替バージョンのビデオ", "prefDescFormatOption1b": "解説付きの代替バージョン", "prefDescFormatOption2": "テキストによる解説(スクリーンリーダーによって読み上げられる)", "prefDescFormatOption2b": "テキストによる解説", "prefDescPause": "解説が表示されたら動画を自動的に停止する", "prefVisibleDesc": "解説が見えるようにする", "prefHighlight": "メディアの再生に合わせて字幕をハイライトする", "prefTabbable": "キーボード操作可能な字幕", "prefCaptionsFont": "フォント", "prefCaptionsColor": "文字色", "prefCaptionsBGColor": "背景色", "prefCaptionsSize": "フォントサイズ", "prefCaptionsOpacity": "不透明度", "prefCaptionsStyle": "書式", "serif": "serif", "sans": "sans-serif", "cursive": "cursive", "fantasy": "fantasy", "monospace": "monospace", "white": "白", "yellow": "黄色", "green": "緑", "cyan": "シアン", "blue": "青", "magenta": "マゼンタ", "red": "赤", "black": "黒", "transparent": "透明", "solid": "不透明", "captionsStylePopOn": "ポップ・オン", "captionsStyleRollUp": "ロール・アップ", "prefCaptionsPosition": "位置", "captionsPositionOverlay": "オーバーレイ表示", "captionsPositionBelow": "動画の下部", "sampleCaptionText": "キャプション表示の例", "prefSuccess": "変更が保存されました。", "prefNoChange": "設定が変更されていません。", "help": "ヘルプ", "helpTitle": "ヘルプ", "save": "保存", "cancel": "キャンセル", "ok": "ok", "done": "終了", "closeButtonLabel": "ダイアログを閉じる", "windowButtonLabel": "ウィンドウの設定", "windowMove": "移動", "windowMoveAlert": "マウスをドラッグするか矢印キーでウィンドウを移動できます; Enterで終了", "windowResize": "サイズを変える", "windowResizeHeading": "ウィンドウのサイズ変更", "windowResizeAlert": "ウィンドウのサイズが変更されました。", "windowClose": "閉じる", "width": "幅", "height": "高さ", "windowSendBack": "背面へ移動", "windowSendBackAlert": "このウィンドウはこのページの他のオブジェクトより背面になりました。", "windowBringTop": "前面へ移動", "windowBringTopAlert": "このウィンドウはこのページの他のオブジェクトより前面になりました。", "resultsSummary1": "You searched for:", "resultsSummary2": "Found", "resultsSummary3": "matching items.", "resultsSummary4": "Click the time associated with any item to play the video from that point.", "noResultsFound": "No results found.", "searchButtonLabel": "Play at", "hour": "hour", "minute": "minute", "second": "second", "hours": "hours", "minutes": "minutes", "seconds": "seconds", "enableKeyboardShortcuts": "Enable keyboard shortcuts" };
{ "pile_set_name": "Github" }
/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */ /* Written by Saji Nediyanchath ([email protected]). */ jQuery(function($){ $.datepicker.regional['ml'] = { closeText: 'ശരി', prevText: 'മുന്നത്തെ', nextText: 'അടുത്തത് ', currentText: 'ഇന്ന്', monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്‍ച്ച്','ഏപ്രില്‍','മേയ്','ജൂണ്‍', 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്‍','ഒക്ടോബര്‍','നവംബര്‍','ഡിസംബര്‍'], monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്‍', 'ഏപ്രി', 'മേയ്', 'ജൂണ്‍', 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'], dayNames: ['ഞായര്‍', 'തിങ്കള്‍', 'ചൊവ്വ', 'ബുധന്‍', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'], weekHeader: 'ആ', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: ''}; $.datepicker.setDefaults($.datepicker.regional['ml']); });
{ "pile_set_name": "Github" }
/** @overview @author Michael Mathews <[email protected]> @license Apache License 2.0 - See file 'LICENSE.md' in this project. */ /** Functionality related to JSDoc tags. @module jsdoc/tag @requires jsdoc/tag/dictionary @requires jsdoc/tag/validator @requires jsdoc/tag/type */ (function() { var jsdoc = { tag: { dictionary: require('jsdoc/tag/dictionary'), validator: require('jsdoc/tag/validator'), type: require('jsdoc/tag/type') } }; /** Constructs a new tag object. Calls the tag validator. @class @classdesc Represents a single doclet tag. @param {string} tagTitle @param {string=} tagBody @param {object=} meta */ exports.Tag = function(tagTitle, tagBody, meta) { var tagDef = jsdoc.tag.dictionary.lookUp(tagTitle), meta = meta || {}; this.originalTitle = trim(tagTitle); /** The title part of the tag: @title text */ this.title = jsdoc.tag.dictionary.normalise( this.originalTitle ); /** The text part of the tag: @title text */ this.text = trim(tagBody, tagDef.keepsWhitespace); if (this.text) { if (tagDef.onTagText) { this.text = tagDef.onTagText(this.text); } if (tagDef.canHaveType) { /** The value propertiy represents the result of parsing the tag text. */ this.value = {}; var [ /*Array.<string>*/ typeNames, /*any*/ remainingText, /*?boolean*/ optional, /*?boolean*/ nullable, /*?boolean*/ variable ] = jsdoc.tag.type.parse(this.text); if (typeNames.length) { this.value.type = { names: typeNames, optional: optional, nullable: nullable, variable: variable }; } if (remainingText) { if (tagDef.canHaveName) { var [paramName, paramDesc, paramOptional, paramDefault] = parseParamText(remainingText); // note the dash is a special case: as a param name it means "no name" if (paramName && paramName !== '-') { this.value.name = paramName; } if (paramDesc) { this.value.description = paramDesc; } if (paramOptional) { this.value.optional = paramOptional; } if (paramDefault) { this.value.defaultvalue = paramDefault; } } else { this.value.description = remainingText; } } } else { this.value = this.text; } } jsdoc.tag.validator.validate(this, meta); } function trim(text, newlines) { if (!text) { return ''; } if (newlines) { return text.replace(/^[\n\r\f]+|[\n\r\f]+$/g, ''); } else { return text.replace(/^\s+|\s+$/g, ''); } } /** Parse the parameter name and parameter desc from the tag text. @inner @method parseParamText @memberof module:jsdoc/tag @param {string} tagText @returns {Array.<string, string, boolean, boolean>} [pname, pdesc, poptional, pdefault]. */ function parseParamText(tagText) { var pname, pdesc, poptional, pdefault; // like: pname, pname pdesc, or name - pdesc tagText.match(/^(\[[^\]]+\]|\S+)((?:\s*\-\s*|\s+)(\S[\s\S]*))?$/); pname = RegExp.$1; pdesc = RegExp.$3; if ( /^\[\s*(.+?)\s*\]$/.test(pname) ) { pname = RegExp.$1; poptional = true; if ( /^(.+?)\s*=\s*(.+)$/.test(pname) ) { pname = RegExp.$1; pdefault = RegExp.$2; } } return [pname, pdesc, poptional, pdefault]; } })();
{ "pile_set_name": "Github" }
/* file: outlierdetection_univariate_dense_default_batch_fpt_dispatcher.cpp */ /******************************************************************************* * Copyright 2014-2020 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ /* //++ // Implementation of container for univariate outlier detection. //-- */ #include "algorithms/outlier_detection/outlier_detection_univariate.h" #include "src/algorithms/outlierdetection_univariate/outlierdetection_univariate_batch_container.h" #include "src/algorithms/outlierdetection_univariate/outlierdetection_univariate_kernel.h" namespace daal { namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(univariate_outlier_detection::BatchContainer, batch, DAAL_FPTYPE, univariate_outlier_detection::defaultDense) } // namespace algorithms } // namespace daal
{ "pile_set_name": "Github" }
test-route53: @scripts/ssh ${DIR_KEY_PAIR}/${AWS_EC2_KEY_NAME}.pem `terraform output bastion-ip` \ "( nslookup etcd.`terraform output internal-tld` )" @scripts/ssh ${DIR_KEY_PAIR}/${AWS_EC2_KEY_NAME}.pem `terraform output bastion-ip` \ "( dig `terraform output internal-tld` ANY )" @scripts/ssh ${DIR_KEY_PAIR}/${AWS_EC2_KEY_NAME}.pem `terraform output bastion-ip` \ "( dig +noall +answer SRV _etcd-server._tcp.`terraform output internal-tld` )" @scripts/ssh ${DIR_KEY_PAIR}/${AWS_EC2_KEY_NAME}.pem `terraform output bastion-ip` \ "( dig +noall +answer SRV _etcd-client._tcp.`terraform output internal-tld` )" @scripts/ssh ${DIR_KEY_PAIR}/${AWS_EC2_KEY_NAME}.pem `terraform output bastion-ip` \ "( dig +noall +answer etcd.`terraform output internal-tld` )" .PHONY: test-route53
{ "pile_set_name": "Github" }