text
stringlengths
14
1.5M
meta
stringlengths
51
1.92k
source
stringclasses
6 values
using UnityEngine; namespace DPek.Raconteur.Util { /// <summary> /// A utility for converting hex strings such as #F93 to colors. /// </summary> public class ColorHexConverter { private ColorHexConverter() { // Prevent instantiation } /// <summary> /// Converts a single hex character to the corresponding int value. /// </summary> /// <param name="ch"> /// The character to get the hex value of. /// </param> /// <returns> /// The number value of the hex character. /// </returns> private static int FromHex(char c) { c = char.ToLower(c); // Check if the character is a letter if (96 < c && c < 103) { return c - 86; } // Check if the character is a number else if (47 < c && c < 58) { return c - 48; } // Invalid character var msg = "\'" + c + "\' is not a hex character."; throw new System.ArgumentException(msg); } /// <summary> /// Converts a hex string to a number. /// </summary> /// <param name="str"> /// The string to get the hex value of. /// </param> /// <returns> /// The number value of the hex string. /// </returns> private static int FromHex(string str) { int totalVal = 0; for (int i = str.Length - 1; i >= 0; --i) { totalVal *= 16; totalVal += FromHex(str[i]); } return totalVal; } /// <summary> /// Parses a hex string in the format #RGB or RGB. /// /// The hex string (when considered without the '#' character) may be /// any multiple of 3. For example, if the hex string is #FF9930, the /// format is assumed to be #RRGGBB or RRGGBB. /// </summary> /// <param name="str"> /// The hex string that defines the color. /// </param> /// <returns> /// The color as defined by the hex string. /// </returns> public static Color FromRGB(string str) { if (str[0] == '#') { str = str.Substring(1); } // Figure out the size of each color in the #RGB format int size = str.Length / 3; float maxVal = Mathf.Pow(16, size); // Calculate RGB values float r, g, b = 0; r = FromHex(str.Substring(0, size)) / maxVal; g = FromHex(str.Substring(size, size)) / maxVal; b = FromHex(str.Substring(size * 2, size)) / maxVal; return new Color(r, g, b); } /// <summary> /// Parses a hex string in the format #RGBA or RGBA. /// /// The hex string (when considered without the '#' character) may be /// any multiple of 4. For example, if the hex string is #FF993055, the /// format is assumed to be #RRGGBBAA or RRGGBBAA. /// </summary> /// <param name="str"> /// The hex string that defines the color. /// </param> /// <returns> /// The color as defined by the hex string. /// </returns> public static Color FromRGBA(string str) { if (str[0] == '#') { str = str.Substring(1); } // Figure out the size of each color in the #RGBA format int size = str.Length / 4; float maxVal = Mathf.Pow(16, size); // Calculate RGBA values float r, g, b, a = 0; r = FromHex(str.Substring(0, size)) / maxVal; g = FromHex(str.Substring(size, size)) / maxVal; b = FromHex(str.Substring(size * 2, size)) / maxVal; a = FromHex(str.Substring(size * 3, size)) / maxVal; return new Color(r, g, b, a); } } }
{'content_hash': '8020aa1fc258294dc62b79dbd67b86ac', 'timestamp': '', 'source': 'github', 'line_count': 126, 'max_line_length': 73, 'avg_line_length': 25.80952380952381, 'alnum_prop': 0.5962484624846248, 'repo_name': 'exodrifter/unity-raconteur', 'id': '9338484807276a9400d271e8b2ba65f970acef8e', 'size': '3254', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'Util/ColorHexConverter.cs', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C#', 'bytes': '240713'}]}
GitHub
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Dojox Widget Unit Test Runner</title> <meta http-equiv="REFRESH" content="0;url=../../../util/doh/runner.html?test=dojox/treemap/tests/module"></HEAD> <BODY> Redirecting to D.O.H runner. </BODY> </HTML>
{'content_hash': '008bc3bbffd28e6e1ac09c1fffd23a20', 'timestamp': '', 'source': 'github', 'line_count': 9, 'max_line_length': 116, 'avg_line_length': 33.55555555555556, 'alnum_prop': 0.6589403973509934, 'repo_name': 'heypano/learningdojo', 'id': 'f52905b9cbcfb02f5af418687f31e76ee9e357bf', 'size': '302', 'binary': False, 'copies': '18', 'ref': 'refs/heads/master', 'path': 'dojotoolkit_tutorial/js/libraries/dojo/dojox/treemap/tests/runTests.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ActionScript', 'bytes': '21071'}, {'name': 'Batchfile', 'bytes': '2292'}, {'name': 'CSS', 'bytes': '2531222'}, {'name': 'Groff', 'bytes': '684'}, {'name': 'HTML', 'bytes': '12925893'}, {'name': 'Java', 'bytes': '131059'}, {'name': 'JavaScript', 'bytes': '18952884'}, {'name': 'Makefile', 'bytes': '1824'}, {'name': 'PHP', 'bytes': '531136'}, {'name': 'Perl', 'bytes': '6881'}, {'name': 'Python', 'bytes': '1386'}, {'name': 'Ruby', 'bytes': '911'}, {'name': 'Shell', 'bytes': '21731'}, {'name': 'XQuery', 'bytes': '799'}, {'name': 'XSLT', 'bytes': '104207'}]}
GitHub
import sys from time import sleep from datetime import datetime from courtutils.databases.postgres import PostgresDatabase from courtreader import readers from courtutils.logger import get_logger log = get_logger() reader = readers.DistrictCourtReader() db = PostgresDatabase('district') def update_case(fips): cases_to_fix = db.get_cases_with_no_past_due(fips, 'criminal') for case_to_fix in cases_to_fix: time_cap_1 = datetime.now() case = { 'fips': fips, 'case_number': case_to_fix[0], 'details_fetched_for_hearing_date': case_to_fix[1], 'collected': datetime.now() } case['details'] = reader.get_case_details_by_number( fips, 'criminal', case_to_fix[0], case['details_url'] if 'details_url' in case else None) time_cap_2 = datetime.now() if 'error' in case['details']: log.warn('Could not collect case details for %s in %s', case_to_fix[0], case['fips']) else: log.info('%s %s', fips, case['details']['CaseNumber']) last_case_collected = datetime.now() db.replace_case_details(case, 'criminal') log.info('%s %s', int((time_cap_2 - time_cap_1).total_seconds()), int((datetime.now() - time_cap_2).total_seconds())) while True: try: reader.connect() if len(sys.argv) > 1: update_case(sys.argv[1]) else: courts = list(db.get_courts()) for court in courts: update_case(court['fips']) except Exception: print 'Exception. Starting over.' except KeyboardInterrupt: raise try: reader.log_off() except Exception: print 'Could not log off' except KeyboardInterrupt: raise sleep(10)
{'content_hash': '3939a74ebfb555a45099453a12900a2b', 'timestamp': '', 'source': 'github', 'line_count': 58, 'max_line_length': 68, 'avg_line_length': 32.258620689655174, 'alnum_prop': 0.5740245857830037, 'repo_name': 'bschoenfeld/va-court-scraper', 'id': 'efea981257cfba36e85994d3221889cb924530fe', 'size': '1871', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'archived/fix_past_due_issue.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '43814'}, {'name': 'Python', 'bytes': '189578'}]}
GitHub
package com.distelli.europa.filters; import com.distelli.europa.EuropaRequestContext; import com.distelli.europa.models.SslSettings; import com.distelli.webserver.RequestFilter; import com.distelli.webserver.RequestFilterChain; import com.distelli.webserver.WebConstants; import com.distelli.webserver.WebResponse; import lombok.extern.log4j.Log4j; import javax.inject.Inject; import javax.inject.Provider; @Log4j public class ForceHttpsFilter implements RequestFilter<EuropaRequestContext> { @Inject protected Provider<SslSettings> _sslSettingsProvider; @Inject private HttpAlwaysAllowedPaths _httpAlwaysAllowedPaths; public ForceHttpsFilter() { } @Override public WebResponse filter(EuropaRequestContext requestContext, RequestFilterChain next) { String protocol = requestContext.getProto(); String path = requestContext.getPath(); // The health check endpoint needs to work over HTTP if(protocol.equalsIgnoreCase("http") && !_httpAlwaysAllowedPaths.isHttpAlwaysAllowedPath(path)) { SslSettings sslSettings = _sslSettingsProvider.get(); if (sslSettings != null && sslSettings.getForceHttps()) { StringBuilder newLocation = new StringBuilder(); newLocation.append("https://"); String hostName = sslSettings.getDnsName(); if (null == hostName) { hostName = requestContext.getHost(""); } newLocation.append(hostName); newLocation.append(requestContext.getOriginalPath()); if (null != requestContext.getQueryString()) { newLocation.append("?"); newLocation.append(requestContext.getQueryString()); } WebResponse redirectResponse = new WebResponse(307); redirectResponse.setResponseHeader(WebConstants.LOCATION_HEADER, newLocation.toString()); return redirectResponse; } } return next.filter(requestContext); } }
{'content_hash': '7e1c351dd58aed80f5c57d4283eb3bf6', 'timestamp': '', 'source': 'github', 'line_count': 55, 'max_line_length': 105, 'avg_line_length': 38.10909090909091, 'alnum_prop': 0.6655534351145038, 'repo_name': 'Distelli/europa', 'id': '1721b1ab1a8cbdb40e0ba3dcb8b348dbebe75b82', 'size': '2096', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/com/distelli/europa/filters/ForceHttpsFilter.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '62392'}, {'name': 'Java', 'bytes': '547246'}, {'name': 'JavaScript', 'bytes': '270941'}, {'name': 'Makefile', 'bytes': '1060'}, {'name': 'Shell', 'bytes': '1137'}]}
GitHub
const electron = require('electron') // Module to control application life. const app = electron.app // Module to create native browser window. const BrowserWindow = electron.BrowserWindow require('electron-debug')({showDevTools: false}) // php var path = require('path') var php = require('gulp-connect-php') php.server({ port: 8088, hostname: '127.0.0.1', base: path.resolve(__dirname) + '/web', // router: path.resolve(__dirname) + '/project/drupal/router.php', keepalive: false, open: false, // this is now pointing to a possible local installation of php, that is best for portability // feel free to change with a system-wide installed php, that is dirty & working, but less portable bin: path.resolve(__dirname) + '/bin/php', root: '/', stdio: 'inherit', ini: path.resolve(__dirname) + '/bin/php.ini' }) // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let mainWindow app.setName('Electron Drupal') // Quit when all windows are closed. app.on('window-all-closed', function () { // On OS X it is common for applications and their menu bar // to stay active until the user quits explicitly with Cmd + Q if (process.platform !== 'darwin') { app.quit() } php.closeServer() }) // This method will be called when Electron has finished // initialization and is ready to create browser windows. app.on('ready', function () { // Create the browser window. mainWindow = new BrowserWindow({ width: 1024, height: 768, nodeIntegration: true, title: 'Electron Drupal', icon: path.resolve(__dirname) + '/app/images/app-icon.png' // webPreferences: { // webSecurity: false // } }) // and load the app's front controller. Feel free to change with app_dev.php mainWindow.loadURL('http://127.0.0.1:8088/index.php') // Uncomment to open the DevTools. // mainWindow.webContents.openDevTools(); mainWindow.on('unresponsive', function () { console.log('stopped') }) // Emitted when the window is closed. mainWindow.on('closed', function () { // Dereference the window object, usually you would store windows // in an array if your app supports multi windows, this is the time // when you should delete the corresponding element. php.closeServer() mainWindow = null }) })
{'content_hash': '42bcd2f68cd3053c0e977f6563987e77', 'timestamp': '', 'source': 'github', 'line_count': 74, 'max_line_length': 103, 'avg_line_length': 32.351351351351354, 'alnum_prop': 0.6883876357560568, 'repo_name': 'seanbuscay/electron-drupal', 'id': '342b94ddde9dd6f2884d2a5f0543ee854649f36e', 'size': '2394', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'main.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '2288'}, {'name': 'JavaScript', 'bytes': '2394'}, {'name': 'Shell', 'bytes': '1795'}]}
GitHub
#region License // Copyright (c) 2021, FluentMigrator Project // // 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. #endregion using System; using FluentMigrator.Builders.Insert; using FluentMigrator.Infrastructure; using FluentMigrator.Infrastructure.Extensions; namespace FluentMigrator.Postgres { public static partial class PostgresExtensions { public const string OverridingIdentityValues = "PostgresOverridingIdentityValues"; /// <summary> /// Adds an OVERRIDING SYSTEM VALUE clause in the current <see cref="IInsertDataSyntax"/> expression. /// This enables the system-generated values to be overriden with the user-specified explicit values (other than <c>DEFAULT</c>) /// for identity columns defined as <c>GENERATED ALWAYS</c> /// </summary> /// <param name="expression">The current <see cref="IInsertDataSyntax"/> expression</param> /// <returns>The current <see cref="IInsertDataSyntax"/> expression</returns> public static IInsertDataSyntax WithOverridingSystemValue(this IInsertDataSyntax expression) => SetOverridingIdentityValues(expression, PostgresOverridingIdentityValuesType.System, nameof(WithOverridingSystemValue)); /// <summary> /// Adds an OVERRIDING USER VALUE clause in the current <see cref="IInsertDataSyntax"/> expression. /// Any user-specified values will be ignored and the system-generated values will be applied /// for identity columns defined as <c>GENERATED BY DEFAULT</c> /// </summary> /// <param name="expression">The current <see cref="IInsertDataSyntax"/> expression</param> /// <returns>The current <see cref="IInsertDataSyntax"/> expression</returns> public static IInsertDataSyntax WithOverridingUserValue(this IInsertDataSyntax expression) => SetOverridingIdentityValues(expression, PostgresOverridingIdentityValuesType.User, nameof(WithOverridingUserValue)); /// <summary> /// Set the additional feature for overriding identity values with the specified <see cref="PostgresOverridingIdentityValuesType"/> /// on the provided <see cref="IInsertDataSyntax"/> expression /// </summary> /// <exception cref="InvalidOperationException"></exception> private static IInsertDataSyntax SetOverridingIdentityValues( IInsertDataSyntax expression, PostgresOverridingIdentityValuesType overridingType, string callingMethod) { if (!(expression is ISupportAdditionalFeatures castExpression)) { throw new InvalidOperationException( string.Format( ErrorMessages.MethodXMustBeCalledOnObjectImplementingY, callingMethod, nameof(ISupportAdditionalFeatures))); } castExpression.SetAdditionalFeature(OverridingIdentityValues, overridingType); return expression; } } }
{'content_hash': '9338558621ab37b19e785b7a01001cd7', 'timestamp': '', 'source': 'github', 'line_count': 73, 'max_line_length': 139, 'avg_line_length': 48.534246575342465, 'alnum_prop': 0.6999717753316399, 'repo_name': 'amroel/fluentmigrator', 'id': '03b2985a58ea28c0282f178c89418496dcd85312', 'size': '3545', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'src/FluentMigrator.Extensions.Postgres/Postgres/PostgresExtensions.OverridingIdentityValues.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '4797478'}, {'name': 'Rich Text Format', 'bytes': '154299'}, {'name': 'Shell', 'bytes': '325'}]}
GitHub
import sys import platform __all__ = ['install', 'NullFinder', 'Protocol'] try: from typing import Protocol except ImportError: # pragma: no cover from ..typing_extensions import Protocol # type: ignore def install(cls): """ Class decorator for installation on sys.meta_path. Adds the backport DistributionFinder to sys.meta_path and attempts to disable the finder functionality of the stdlib DistributionFinder. """ sys.meta_path.append(cls()) disable_stdlib_finder() return cls def disable_stdlib_finder(): """ Give the backport primacy for discovering path-based distributions by monkey-patching the stdlib O_O. See #91 for more background for rationale on this sketchy behavior. """ def matches(finder): return getattr( finder, '__module__', None ) == '_frozen_importlib_external' and hasattr(finder, 'find_distributions') for finder in filter(matches, sys.meta_path): # pragma: nocover del finder.find_distributions class NullFinder: """ A "Finder" (aka "MetaClassFinder") that never finds any modules, but may find distributions. """ @staticmethod def find_spec(*args, **kwargs): return None # In Python 2, the import system requires finders # to have a find_module() method, but this usage # is deprecated in Python 3 in favor of find_spec(). # For the purposes of this finder (i.e. being present # on sys.meta_path but having no other import # system functionality), the two methods are identical. find_module = find_spec def pypy_partial(val): """ Adjust for variable stacklevel on partial under PyPy. Workaround for #327. """ is_pypy = platform.python_implementation() == 'PyPy' return val + is_pypy
{'content_hash': '9a8dbb920f8f8b8584c5d2f74a6d311f', 'timestamp': '', 'source': 'github', 'line_count': 71, 'max_line_length': 83, 'avg_line_length': 25.746478873239436, 'alnum_prop': 0.6668490153172867, 'repo_name': 'pypa/setuptools', 'id': 'ef3136f8d2a13c3d251e146d8d754e21c3ed1c38', 'size': '1828', 'binary': False, 'copies': '2', 'ref': 'refs/heads/main', 'path': 'setuptools/_vendor/importlib_metadata/_compat.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '2173'}, {'name': 'C', 'bytes': '36107'}, {'name': 'HTML', 'bytes': '266'}, {'name': 'Python', 'bytes': '4027592'}]}
GitHub
<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>private</groupId> <!-- Artifact Id must be in a form of "${product}.${vendor}.${platform}", those properties will be extracted from it later by regexp --> <!-- The product is "jre", the vendor is one of {oracle, openjdk}, and the platform is one of {masOS, win32, win64, linux32, linux64} --> <artifactId>jre.intellij.macOS</artifactId> <!-- JRE version, e.g.,1.8.0_102, ... --> <version>8u152b1056.10</version> <name>The entire JRE packed into the JAR.</name> <description>This is handy for building installers or deploy as required. Helps reducing the size of the source code repository.</description> <!--name>Nuix Native Launcher.</name> <description>This is handy for inclusion with an HTTP Server. Helps reducing the size of the source code repository.</description--> <organization> <name>Individual</name> <url>https://github.com/alex-vas/jar-pack</url> </organization> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.12</version> <executions> <!-- Perform series of regular expressions to set up some properties --> <execution> <id>regex-product-property</id> <goals> <goal>regex-property</goal> </goals> <configuration> <name>packed.product</name> <value>${project.artifactId}</value> <regex>^([^.]+)\.([^.]+)\.([^.]+)$</regex> <replacement>$1</replacement> <failIfNoMatch>true</failIfNoMatch> </configuration> </execution> <execution> <id>regex-vendor-property</id> <goals> <goal>regex-property</goal> </goals> <configuration> <name>packed.vendor</name> <value>${project.artifactId}</value> <regex>^([^.]+)\.([^.]+)\.([^.]+)$</regex> <replacement>$2</replacement> <failIfNoMatch>true</failIfNoMatch> </configuration> </execution> <execution> <id>regex-platform-property</id> <goals> <goal>regex-property</goal> </goals> <configuration> <name>packed.platform</name> <value>${project.artifactId}</value> <regex>^([^.]+)\.([^.]+)\.([^.]+)$</regex> <replacement>$3</replacement> <failIfNoMatch>true</failIfNoMatch> </configuration> </execution> <execution> <id>regex-path-property</id> <goals> <goal>regex-property</goal> </goals> <configuration> <name>packed.path</name> <value>${project.artifactId}-${project.version}</value> <regex>.*</regex> <replacement>$0</replacement> <failIfNoMatch>true</failIfNoMatch> </configuration> </execution> <execution> <id>regex-classname-property</id> <goals> <goal>regex-property</goal> </goals> <configuration> <name>packed.class.name</name> <value>JarPack_${packed.product}_${packed.vendor}_${packed.platform}_${project.version}</value> <regex>\W</regex> <replacement>_</replacement> <failIfNoMatch>false</failIfNoMatch> </configuration> </execution> <!-- Include generated source with compile --> <execution> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${project.build.directory}/generated-sources/replacer</source> </sources> </configuration> </execution> </executions> </plugin> <!-- Generate the source code --> <plugin> <groupId>com.google.code.maven-replacer-plugin</groupId> <artifactId>replacer</artifactId> <version>1.5.3</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>replace</goal> </goals> </execution> </executions> <configuration> <file>${basedir}/src/main/java/com/nuix/utils/jarpack/impl/JarPackImplementationTemplate.java</file> <outputFile>${basedir}/target/generated-sources/replacer/com/nuix/utils/jarpack/impl/${packed.class.name}.java</outputFile> <replacements> <replacement> <token>JarPackImplementationTemplate</token> <value>\${packed.class.name}</value> </replacement> <replacement> <token>"product"</token> <value>"\${packed.product}"</value> </replacement> <replacement> <token>"vendor"</token> <value>"\${packed.vendor}"</value> </replacement> <replacement> <token>"platform"</token> <value>"\${packed.platform}"</value> </replacement> <replacement> <token>"version"</token> <value>"\${project.version}"</value> </replacement> <replacement> <token>"path"</token> <value>"\${packed.path}"</value> </replacement> </replacements> </configuration> </plugin> <!-- Specify Java Source code level --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <!-- Copy data/ directory into the jar --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>copy-resources</id> <phase>compile</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <!-- XXX Check the progress of https://issues.apache.org/jira/browse/MRESOURCES-132 and https://issues.apache.org/jira/browse/MRESOURCES-236 What we really want is to copy permissions (specifically chmod +x) into the archive --> <outputDirectory>${basedir}/target/classes/${packed.path}</outputDirectory> <resources> <resource> <directory>data</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> <!-- Set JRE permissions for files (specifically chmod +x) // this is to compensate for the fact that resource copy routine above doesn't copy permissions, see the comment above --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <executions> <execution> <id>chmod-resources</id> <phase>compile</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <!-- JRE files --> <chmod dir="${basedir}/target/classes" includes="**/bin/*" perm="+x"/> <chmod dir="${basedir}/target/classes" includes="**/lib/jspawnhelper" perm="+x"/> <!-- macOS --> <chmod dir="${basedir}/target/classes" includes="**/lib/**/*.dylib*" perm="+x"/> <!-- macOS --> <chmod dir="${basedir}/target/classes" includes="**/lib/jexec" perm="+x"/> <!-- Linux --> <chmod dir="${basedir}/target/classes" includes="**/lib/**/*.so" perm="+x"/> <!-- Linux --> </target> </configuration> </execution> </executions> </plugin> <!-- Generate list and MD5s for the data/ files --> <plugin> <groupId>net.ju-n.maven.plugins</groupId> <artifactId>checksum-maven-plugin</artifactId> <version>1.3</version> <executions> <execution> <id>generate-artifact-checksum</id> <phase>prepare-package</phase> <goals> <goal>files</goal> </goals> </execution> </executions> <configuration> <fileSets> <fileSet> <directory>data</directory> </fileSet> </fileSets> <includeRelativePath>true</includeRelativePath> <individualFiles>false</individualFiles> <csvSummary>false</csvSummary> <xmlSummary>true</xmlSummary> <xmlSummaryFile>${basedir}/target/classes/META-INF/${packed.path}/file-list.xml</xmlSummaryFile> </configuration> </plugin> </plugins> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> <!-- Eclipse auto-generated code --> <pluginManagement> <plugins> <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <versionRange>[1.12,)</versionRange> <goals> <goal>regex-property</goal> <goal>add-source</goal> </goals> </pluginExecutionFilter> <action> <execute /> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId>com.google.code.maven-replacer-plugin</groupId> <artifactId>replacer</artifactId> <versionRange>[1.5.3,)</versionRange> <goals> <goal>replace</goal> </goals> </pluginExecutionFilter> <action> <execute /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build> </project>
{'content_hash': '9c04b21ee502782c683afab7aee9ae9f', 'timestamp': '', 'source': 'github', 'line_count': 310, 'max_line_length': 193, 'avg_line_length': 47.480645161290326, 'alnum_prop': 0.41178069162307224, 'repo_name': 'alex-vas/jar-pack', 'id': '0e8bbf1c556902cfbfbaccc8920bc69105f3201b', 'size': '14719', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'pom.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '6134'}, {'name': 'Shell', 'bytes': '161'}]}
GitHub
declare module "material-ui-superselectfield" { import * as React from "react" interface IMaterialUISuperSelectFieldProps { name: string; value: object[] | object | null; multiple?: boolean; key?: string; onChange?: (...args: any[]) => void; onSelect?: (...args: any[]) => void; onMenuOpen?: (...args: any[]) => void; openImmediately?: boolean; errorText?: any; errorTextStyle?: Object; underlineErrorStyle?: Object; noMatchFoundStyle?: Object; selectionsRenderer?: (...args: any[]) => void; checkPosition?: string; hintText?: string; nb2show?: number; elementHeight?: number | number[]; style?: Object; innerDivStyle?: Object; selectedMenuItemStyle?: Object; hoverColor?: string; floatingLabel?: any; hintTextAutocomplete?: string; noMatchFound?: string; anchorOrigin?: { vertical: string, horizontal: string }; canAutoPosition?: boolean; disabled?: boolean; onAutoCompleteTyping?: (...args: any[]) => void; children?: any; showAutocompleteThreshold?: number; autocompleteFilter?: (...args: any[]) => void; useLayerForClickAway?: boolean; menuStyle?: Object; menuGroupStyle?: Object; menuFooterStyle?: Object; footerActionsRenderer?: any; checkedIcon?: any; unCheckedIcon?: any; floatingLabelStyle?: Object; floatingLabelFocusStyle?: Object; underlineStyle?: Object; underlineFocusStyle?: Object; autocompleteUnderlineStyle?: Object; autocompleteUnderlineFocusStyle?: Object; keepSearchOnSelect?: boolean; } export default class SuperSelectField extends React.Component<IMaterialUISuperSelectFieldProps, any> {} }
{'content_hash': '9a49c1776dae78f38de359cdcce30539', 'timestamp': '', 'source': 'github', 'line_count': 53, 'max_line_length': 107, 'avg_line_length': 35.716981132075475, 'alnum_prop': 0.6080295826730058, 'repo_name': 'detroit-labs/typed-things', 'id': 'eaaf69d8a8e7db121089dfd504032fbba8fd25c9', 'size': '1893', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'material-ui-superselectfield/material-ui-superselectfield.d.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'TypeScript', 'bytes': '218231'}]}
GitHub
package com.jstaormina.rundeckplugin; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.Execute; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.rundeck.api.RunJob; import org.rundeck.api.RunJobBuilder; import org.rundeck.api.RundeckClient; import org.rundeck.api.domain.RundeckExecution; import java.util.Properties; import java.util.concurrent.TimeUnit; @Mojo(name = "run-job") @Execute(phase = LifecyclePhase.VERIFY) public class RunJobMojo extends AbstractRundeckMojo { private static final long POLLING_INTERVAL_SECONDS = 5L; private static final long POLLING_INTERVAL_MILLIS = 5000L; private static final TimeUnit INTERVAL_UNIT = TimeUnit.SECONDS; @Parameter private String jobUuid; @Parameter private Properties nodeFilters; @Parameter private Properties options; public String getJobUuid() { return jobUuid; } public void setJobUuid(String jobUuid) { this.jobUuid = jobUuid; } public Properties getNodeFilters() { return nodeFilters; } public void setNodeFilters(Properties nodeFilters) { this.nodeFilters = nodeFilters; } public Properties getOptions() { return options; } public void setOptions(Properties options) { this.options = options; } public void execute() throws MojoExecutionException, MojoFailureException { this.getLog().info("Rundeck Instance:\n\turl: " + this.getUrl() + "\n\ttoken: " + this.getToken()); RundeckClient rundeckClient = this.getRundeckClient(); this.getLog().info("Job : " + this.jobUuid + "\n\tnodes: " + this.nodeFilters + "\n\toptions: " + this.options); RunJob job = RunJobBuilder.builder().setJobId(this.jobUuid).setNodeFilters(this.nodeFilters).setOptions(this.options) .build(); RundeckExecution execution = rundeckClient.runJob(job, POLLING_INTERVAL_SECONDS, INTERVAL_UNIT); StringBuilder sb = new StringBuilder().append("Job: ").append(job.getJobId()).append("\n\tStatus: ") .append(execution.getStatus()).append("\n\t").append(execution.getUrl()); String executionStatus = sb.toString(); if (!execution.getStatus().equals(RundeckExecution.ExecutionStatus.SUCCEEDED)) { this.getLog().error(executionStatus.toString()); throw new MojoFailureException(executionStatus); } else { this.getLog().info(executionStatus); } } }
{'content_hash': '7e731ca0b02b9026de1ad48c90ef6dde', 'timestamp': '', 'source': 'github', 'line_count': 79, 'max_line_length': 120, 'avg_line_length': 34.31645569620253, 'alnum_prop': 0.7004795278495021, 'repo_name': 'jstaormina/rundeck-maven-plugin', 'id': 'b6a03b7ae8a968c5179fd7698d7e2b97d60396dc', 'size': '2711', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/com/jstaormina/rundeckplugin/RunJobMojo.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '8314'}]}
GitHub
import os import pytfa from cobra.io import load_matlab_model from pytfa.io import load_thermoDB, \ read_lexicon, annotate_from_lexicon, \ read_compartment_data, apply_compartment_data from pytfa.optim.variables import DeltaG,DeltaGstd,ThermoDisplacement from pytfa.analysis import variability_analysis, \ apply_reaction_variability, \ apply_generic_variability, \ apply_directionality from cobra.io import load_matlab_model, load_json_model from pytfa.io import import_matlab_model, load_thermoDB, \ read_lexicon, annotate_from_lexicon, \ read_compartment_data, apply_compartment_data CPLEX = 'optlang-cplex' GUROBI = 'optlang-gurobi' GLPK = 'optlang-glpk' # # Load the cobra_model # cobra_model = load_matlab_model('../models/small_ecoli.mat') # # Load reaction DB # thermo_data = load_thermoDB('../data/thermo_data.thermodb') # lexicon = read_lexicon('../models/small_ecoli/lexicon.csv') # compartment_data = read_compartment_data('../models/small_ecoli/compartment_data.json') cobra_model = load_json_model('../models/iJO1366.json') thermo_data = load_thermoDB('../data/thermo_data.thermodb') lexicon = read_lexicon('../models/iJO1366/lexicon.csv') compartment_data = read_compartment_data('../models/iJO1366/compartment_data.json') # Initialize the cobra_model mytfa = pytfa.ThermoModel(thermo_data, cobra_model) # Annotate the cobra_model annotate_from_lexicon(mytfa, lexicon) apply_compartment_data(mytfa, compartment_data) # Initialize the cobra_model tmodel = pytfa.ThermoModel(thermo_data, cobra_model) tmodel.name = 'tutorial' # Annotate the cobra_model annotate_from_lexicon(tmodel, lexicon) apply_compartment_data(tmodel, compartment_data) # Set the solver tmodel.solver = GUROBI ## TFA conversion tmodel.prepare() tmodel.convert(add_displacement = True) ## Info on the cobra_model tmodel.print_info() ## Optimality solution = tmodel.optimize() # Apply the directionality of the solution to the cobra_model fixed_directionality_model = apply_directionality(tmodel, solution) # Calculate variability analysis on all continuous variables tva_fluxes = variability_analysis(fixed_directionality_model, kind='reactions') thermo_vars = [DeltaG,DeltaGstd,ThermoDisplacement] tva_thermo = variability_analysis(fixed_directionality_model, kind=thermo_vars) tight_model = apply_reaction_variability(fixed_directionality_model, tva_fluxes) tight_model = apply_generic_variability (tight_model , tva_thermo) ## Sample space from pytfa.optim import strip_from_integer_variables from pytfa.analysis import sample continuous_model = strip_from_integer_variables(tight_model) sampling = sample(continuous_model, 10, processes = 10) directory = 'outputs/' if not os.path.exists(directory): os.makedirs(directory) ########################### ### Escher ### ########################### ## Extract variable values for visualisation with Escher from pytfa.io.viz import export_variable_for_escher # Oppose sign to have reaction in the right direction thermo_values = -1*sampling.median() export_variable_for_escher(tmodel = continuous_model, variable_type = ThermoDisplacement, data = thermo_values, filename = directory+'tutorial_sampling_median_thermo_disp.csv') # Oppose sign to have reaction in the right direction thermo_values = -1*sampling.mean() export_variable_for_escher(tmodel = continuous_model, variable_type = ThermoDisplacement, data = thermo_values, filename = directory+'tutorial_sampling_mean_thermo_disp.csv') ## Extract energy dissipation from a solution from pytfa.analysis import calculate_dissipation dissipation = calculate_dissipation(tmodel, solution) dissipation.to_csv(directory+'tutorial_sampling_dissipation.csv') ########################### ### Plotting ### ########################### from pytfa.io.plotting import plot_histogram from bokeh.plotting import show, output_file filename = directory+'tutorial_sampling_fig_{}_histogram.html' for vid in ['LnGamma_PFK', 'LnGamma_FBA']: output_file(filename.format(vid)) values = sampling[vid] p = plot_histogram(values) p.title.text = 'Samples of {}'.format(vid) show(p)
{'content_hash': 'a9c2eb963165830052584b80d01cce9a', 'timestamp': '', 'source': 'github', 'line_count': 135, 'max_line_length': 91, 'avg_line_length': 33.91851851851852, 'alnum_prop': 0.6732911115964184, 'repo_name': 'EPFL-LCSB/pytfa', 'id': 'f8373a2c00d0d2700ab6f378f8f80e16944a783c', 'size': '4626', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tutorials/tutorial_sampling.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '135'}, {'name': 'Dockerfile', 'bytes': '1568'}, {'name': 'Python', 'bytes': '297754'}, {'name': 'Shell', 'bytes': '7910'}]}
GitHub
@implementation ABI43_0_0EXAdsDFPBannerView { DFPBannerView *_bannerView; id<ABI43_0_0EXEventEmitterService> _eventEmitter; } - (GADAdSize)getAdSizeFromString:(NSString *)bannerSize { if ([bannerSize isEqualToString:@"banner"]) { return kGADAdSizeBanner; } else if ([bannerSize isEqualToString:@"largeBanner"]) { return kGADAdSizeLargeBanner; } else if ([bannerSize isEqualToString:@"mediumRectangle"]) { return kGADAdSizeMediumRectangle; } else if ([bannerSize isEqualToString:@"fullBanner"]) { return kGADAdSizeFullBanner; } else if ([bannerSize isEqualToString:@"leaderboard"]) { return kGADAdSizeLeaderboard; } else if ([bannerSize isEqualToString:@"smartBannerPortrait"]) { return kGADAdSizeSmartBannerPortrait; } else if ([bannerSize isEqualToString:@"smartBannerLandscape"]) { return kGADAdSizeSmartBannerLandscape; } else { return kGADAdSizeBanner; } } - (void)loadBanner { if (_adUnitID && _bannerSize && _onSizeChange && _onDidFailToReceiveAdWithError && _additionalRequestParams) { GADAdSize size = [self getAdSizeFromString:_bannerSize]; _bannerView = [[DFPBannerView alloc] initWithAdSize:size]; [_bannerView setAppEventDelegate:self]; if (!CGRectEqualToRect(self.bounds, _bannerView.bounds)) { if (self.onSizeChange) { self.onSizeChange(@{ @"width" : [NSNumber numberWithFloat:_bannerView.bounds.size.width], @"height" : [NSNumber numberWithFloat:_bannerView.bounds.size.height] }); } } _bannerView.delegate = self; _bannerView.adUnitID = _adUnitID; _bannerView.rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController; GADRequest *request = [GADRequest request]; GADExtras *extras = [[GADExtras alloc] init]; extras.additionalParameters = _additionalRequestParams; [request registerAdNetworkExtras:extras]; [_bannerView loadRequest:request]; } } - (void)setOnSizeChange:(ABI43_0_0EXDirectEventBlock)block { _onSizeChange = block; [self loadBanner]; } - (void)setOnDidFailToReceiveAdWithError:(ABI43_0_0EXDirectEventBlock)block { _onDidFailToReceiveAdWithError = block; [self loadBanner]; } - (void)adView:(DFPBannerView *)banner didReceiveAppEvent:(NSString *)name withInfo:(NSString *)info { if (self.onAdmobDispatchAppEvent) { self.onAdmobDispatchAppEvent(@{name : info}); } } - (void)setBannerSize:(NSString *)bannerSize { if (![bannerSize isEqual:_bannerSize]) { _bannerSize = bannerSize; if (_bannerView) { [_bannerView removeFromSuperview]; } [self loadBanner]; } } - (void)setAdUnitID:(NSString *)adUnitID { if (![adUnitID isEqual:_adUnitID]) { _adUnitID = adUnitID; if (_bannerView) { [_bannerView removeFromSuperview]; } [self loadBanner]; } } - (void)setAdditionalRequestParams:(NSDictionary *)additionalRequestParams { if (![additionalRequestParams isEqual:_additionalRequestParams]) { _additionalRequestParams = additionalRequestParams; if (_bannerView) { [_bannerView removeFromSuperview]; } [self loadBanner]; } } - (void)layoutSubviews { [super layoutSubviews]; _bannerView.frame = CGRectMake( self.bounds.origin.x, self.bounds.origin.y, _bannerView.frame.size.width, _bannerView.frame.size.height ); [self addSubview:_bannerView]; } - (void)removeFromSuperview { [super removeFromSuperview]; } /// Tells the delegate an ad request loaded an ad. - (void)adViewDidReceiveAd:(DFPBannerView *)adView { if (self.onAdViewDidReceiveAd) { self.onAdViewDidReceiveAd(@{}); } } /// Tells the delegate an ad request failed. - (void)adView:(DFPBannerView *)adView didFailToReceiveAdWithError:(GADRequestError *)error { if (self.onDidFailToReceiveAdWithError) { self.onDidFailToReceiveAdWithError(@{ @"error" : [error description] }); } } /// Tells the delegate that a full screen view will be presented in response /// to the user clicking on an ad. - (void)adViewWillPresentScreen:(DFPBannerView *)adView { if (self.onAdViewWillPresentScreen) { self.onAdViewWillPresentScreen(@{}); } } /// Tells the delegate that the full screen view will be dismissed. - (void)adViewWillDismissScreen:(DFPBannerView *)adView { if (self.onAdViewWillDismissScreen) { self.onAdViewWillDismissScreen(@{}); } } /// Tells the delegate that the full screen view has been dismissed. - (void)adViewDidDismissScreen:(DFPBannerView *)adView { if (self.onAdViewDidDismissScreen) { self.onAdViewDidDismissScreen(@{}); } } /// Tells the delegate that a user click will open another app (such as /// the App Store), backgrounding the current app. - (void)adViewWillLeaveApplication:(DFPBannerView *)adView { if (self.onAdViewWillLeaveApplication) { self.onAdViewWillLeaveApplication(@{}); } } @end
{'content_hash': '046b4b4eb81c5e37991bfa03bec1d1f0', 'timestamp': '', 'source': 'github', 'line_count': 159, 'max_line_length': 112, 'avg_line_length': 31.89308176100629, 'alnum_prop': 0.6884243738907513, 'repo_name': 'exponentjs/exponent', 'id': 'f0407a93ba0de91bc35da250fff5c70ac21304c9', 'size': '5200', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'ios/versioned/sdk43/EXAdsAdMob/EXAdsAdMob/ABI43_0_0EXAdsDFPBannerView.m', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Assembly', 'bytes': '96902'}, {'name': 'Batchfile', 'bytes': '382'}, {'name': 'C', 'bytes': '896724'}, {'name': 'C++', 'bytes': '867983'}, {'name': 'CSS', 'bytes': '6732'}, {'name': 'HTML', 'bytes': '152590'}, {'name': 'IDL', 'bytes': '897'}, {'name': 'Java', 'bytes': '4588748'}, {'name': 'JavaScript', 'bytes': '9343259'}, {'name': 'Makefile', 'bytes': '8790'}, {'name': 'Objective-C', 'bytes': '10675806'}, {'name': 'Objective-C++', 'bytes': '364286'}, {'name': 'Perl', 'bytes': '5860'}, {'name': 'Prolog', 'bytes': '287'}, {'name': 'Python', 'bytes': '97564'}, {'name': 'Ruby', 'bytes': '45432'}, {'name': 'Shell', 'bytes': '6501'}]}
GitHub
package models; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.Table; import org.apache.commons.lang3.StringUtils; import play.Logger; import play.data.validation.ValidationError; import uk.bl.Const; import com.avaje.ebean.ExpressionList; import com.avaje.ebean.Page; import com.fasterxml.jackson.annotation.JsonIgnore; @Entity @Table(name = "role") public class Role extends ActModel { /** * */ private static final long serialVersionUID = 5670206529564297517L; @ManyToMany @JoinTable(name = "permission_role", joinColumns = { @JoinColumn(name = "role_id", referencedColumnName="id") }, inverseJoinColumns = { @JoinColumn(name = "permission_id", referencedColumnName="id") }) public List<Permission> permissions = new ArrayList<>(); @JsonIgnore @ManyToMany @JoinTable(name = "role_user", joinColumns = { @JoinColumn(name = "role_id", referencedColumnName="id") }, inverseJoinColumns = { @JoinColumn(name = "user_id", referencedColumnName="id") }) public List<User> users; @Column(columnDefinition = "text") public String name; @JsonIgnore @Column(columnDefinition = "text") public String description; @JsonIgnore @Column(columnDefinition = "text") public String revision; public static final Finder<Long, Role> find = new Finder<Long, Role>(Long.class, Role.class); public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList<>(); if (name == null || name.length() == 0) { errors.add(new ValidationError("name", "No name was given.")); } if (errors.size() > 0) return errors; return null; } /** * Retrieve all roles. */ public static List<Role> findAll() { return find.all(); } public static List<Role> findNonSysAdminRoles() { return find.where().ne("name", "sys_admin").findList(); } /** * Retrieve an object by Id (id). * @param nid * @return object */ public static Role findById(Long id) { Role res = find.where().eq(Const.ID, id).findUnique(); return res; } public static Role findByName(String name) { return find.where() .eq("name", name) .findUnique(); } /** * This method filters roles by name and returns a list of filtered Role objects. * @param name * @return */ public static List<Role> filterByName(String name) { List<Role> res = new ArrayList<Role>(); ExpressionList<Role> ll = find.where().icontains("name", name); res = ll.findList(); return res; } /** * This method checks if this Role has a permission passed as string parameter. * @param permissionName * @return true if exists */ public boolean hasPermission(String permissionName) { if (StringUtils.isNotEmpty(permissionName)) { Permission permission = Permission.findByName(permissionName); if (this.permissions.contains(permission)) { return true; } } return false; } /** * This method checks whether user has a permission by its id. * @param permissionName * @return true if exists */ public boolean hasPermission(Long permissionId) { if (permissionId != null) { Permission permission = Permission.findById(permissionId); if (this.permissions.contains(permission)) { return true; } } return false; } // public static List<Permission> getNotAssignedPermissions(List<Permission> assignedPermissions) { // return Permission.find.where().not(Expr.in("permissions", assignedPermissions)).findList(); // } /** * This method returns permissions that are not assigned to this role. * @return list of Permission objects */ public static List<Permission> getNotAssignedPermissions(List<Permission> assignedPermissions) { List<Permission> allPermissionList = Permission.findAll(); // Logger.debug("Permissions count: " + allPermissionList.size()); List<Permission> res = new ArrayList<Permission>(); if (assignedPermissions != null && assignedPermissions.size() > 0) { Iterator<Permission> itrAllPermissions = allPermissionList.iterator(); while (itrAllPermissions.hasNext()) { Permission curPermission = itrAllPermissions.next(); // Logger.debug("curPermission: " + curPermission.name); if (!assignedPermissions.contains(curPermission)) { res.add(curPermission); } } } return res; } // // public static List<Permission> getNotAssignedPermissions(String permissionsStr) { // List<Permission> allPermissionList = Permission.findAll(); //// Logger.debug("Permissions count: " + allPermissionList.size()); // List<Permission> res = new ArrayList<Permission>(); // if (permissionsStr != null && permissionsStr.length() > 0) { // List<String> assignedList = Arrays.asList(permissionsStr.split(Const.COMMA + " ")); //// Logger.debug("original permissions: " + permissionsStr); //// Logger.debug("assignedList: " + assignedList); // Iterator<Permission> itrAllPermissions = allPermissionList.iterator(); // while (itrAllPermissions.hasNext()) { // Permission curPermission = itrAllPermissions.next(); //// Logger.debug("curPermission: " + curPermission.name); // if (!assignedList.contains(curPermission.name)) { // res.add(curPermission); // } // } // } // return res; // } // /** // * This method checks if a given role is included in the list of passed user roles. // * Simple "contains" method of string does not help for roles since part of the role name // * like "exper_user" could be a name of the other role like "user". // * @param roleName The given role name // * @param roles The user roles as a string separated by comma // * @return true if role name is included // */ // public static boolean isIncludedByUrl(Long roleId, String url) { // boolean res = false; //// Logger.debug("isIncludedByUrl() roleId: " + roleId + ",url: " + url); // try { // if (StringUtils.isNotEmpty(url)) { // List<Role> roles = User.findByUrl(url).roles; //// Logger.debug("roles.size: "+ roles.size()); // res = isIncluded(roleId, roles); // } // } catch (Exception e) { // Logger.debug("User is not yet stored in database."); // } // return res; // } /** * This method evaluates index of the role in the role enumeration. * @param roles * @return */ public static int getRoleSeverity(List<Role> roles) { int res = Const.Roles.values().length; if (roles != null && roles.size() > 0 ) { Iterator<Role> itr = roles.iterator(); while (itr.hasNext()) { Role currentRole = itr.next(); int currentLevel = Const.Roles.valueOf(currentRole.name).ordinal(); if (currentLevel < res) { res = currentLevel; } } } return res; } /** * This method validates whether user is allowed to * change given role. * @param role * @param user * @return true if user is allowed */ public static boolean isAllowed(Role role, User user) { boolean res = false; if (role != null && role.name != null && role.name.length() > 0) { try { int roleIndex = Const.Roles.valueOf(role.name).ordinal(); int userIndex = getRoleSeverity(user.roles); // Logger.debug("roleIndex: " + roleIndex + ", userIndex: " + userIndex); if (roleIndex >= userIndex) { res = true; } } catch (Exception e) { Logger.debug("New created role is allowed."); res = true; } } // Logger.debug("role allowance check: " + role + ", user: " + user + ", res: " + res); return res; } /** * This method initializes User object by the default Role. * @param userUrl * @return */ public static List<Role> setDefaultRole() { List<Role> res = new ArrayList<Role>(); Role role = findByName(Const.DEFAULT_ROLE); if (role != null && role.name != null && role.name.length() > 0) { res.add(role); } return res; } /** * This method initializes User object by the default Role by the role name. * @param userUrl * @return */ public static List<Role> setRoleByName(String roleName) { List<Role> res = new ArrayList<Role>(); Role role = findByName(roleName); if (role != null && role.name != null && role.name.length() > 0) { res.add(role); } return res; } /** * Return a page of User * * @param page Page to display * @param pageSize Number of Roles per page * @param sortBy User property used for sorting * @param order Sort order (either or asc or desc) * @param filter Filter applied on the name column */ public static Page<Role> page(int page, int pageSize, String sortBy, String order, String filter) { return find.where().icontains("name", filter) .orderBy(sortBy + " " + order) .findPagingList(pageSize) .setFetchAhead(false) .getPage(page); } public String permissionsAsString() { // Logger.debug("permissionsAsString"); List<String> names = new ArrayList<String>(); for (Permission permission : this.permissions) { names.add(permission.name); } return StringUtils.join(names, ", "); } public static Map<String, String> options() { LinkedHashMap<String,String> options = new LinkedHashMap<String,String>(); for(Role s : Role.findAll()) { options.put(s.id.toString(), s.name); } return options; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; Role other = (Role) obj; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } @Override public String toString() { return "Role [permissions=" + permissions + ", users=" + users + ", name=" + name + ", description=" + description + ", revision=" + revision + "]"; } }
{'content_hash': 'de6c90e453897a6126a87f1625734214', 'timestamp': '', 'source': 'github', 'line_count': 361, 'max_line_length': 113, 'avg_line_length': 30.56786703601108, 'alnum_prop': 0.6248300860897146, 'repo_name': 'ukwa/w3act', 'id': 'b8444a9dc973f09920740a2a8e789cc85537b58a', 'size': '11035', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/models/Role.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP.NET', 'bytes': '316343'}, {'name': 'Batchfile', 'bytes': '1891'}, {'name': 'CSS', 'bytes': '20478'}, {'name': 'CoffeeScript', 'bytes': '14638'}, {'name': 'Cycript', 'bytes': '2615'}, {'name': 'Dockerfile', 'bytes': '1726'}, {'name': 'Gherkin', 'bytes': '6627'}, {'name': 'HTML', 'bytes': '676900'}, {'name': 'Java', 'bytes': '2184470'}, {'name': 'JavaScript', 'bytes': '256432'}, {'name': 'Less', 'bytes': '26554'}, {'name': 'PLpgSQL', 'bytes': '2408'}, {'name': 'Scala', 'bytes': '3263'}, {'name': 'Shell', 'bytes': '11023'}]}
GitHub
var fs = require('fs'); var falafel = require('falafel'); var filename = process.argv[2]; var code1 = fs.readFileSync(filename).toString(); var summary = {}; var Keys = { AssignmentExpression: ['left', 'right'], ArrayExpression: ['elements'], BlockStatement: ['body'], BinaryExpression: ['left', 'right'], BreakStatement: ['label'], CallExpression: ['callee', 'arguments'], CatchClause: ['param', 'body'], ConditionalExpression: ['test', 'consequent', 'alternate'], ContinueStatement: ['label'], DoWhileStatement: ['body', 'test'], DebuggerStatement: [], EmptyStatement: [], ExpressionStatement: ['expression'], ForStatement: ['init', 'test', 'update', 'body'], ForInStatement: ['left', 'right', 'body'], FunctionDeclaration: ['id', 'params', 'body'], FunctionExpression: ['id', 'params', 'body'], Identifier: [], IfStatement: ['test', 'consequent', 'alternate'], Literal: [], LabeledStatement: ['label', 'body'], LogicalExpression: ['left', 'right'], MemberExpression: ['object', 'property'], NewExpression: ['callee', 'arguments'], ObjectExpression: ['properties'], Program: ['body'], Property: ['key', 'value'], ReturnStatement: ['argument'], SequenceExpression: ['expressions'], SwitchStatement: ['descriminant', 'cases'], SwitchCase: ['test', 'consequent'], ThisExpression: [], ThrowStatement: ['argument'], TryStatement: ['block', 'handlers', 'finalizer'], UnaryExpression: ['argument'], UpdateExpression: ['argument'], VariableDeclaration: ['declarations'], VariableDeclarator: ['id', 'init'], WhileStatement: ['test', 'body'], WithStatement: ['object', 'body'] }; /////////////////////////////// PHASE0 related START ////////////////////////////////// var temporalNameMaker = function () { "use strict"; this.functionNameCnt = 0; this.variableNameCnt = 0; }; temporalNameMaker.prototype = { makeVariableName: function () { "use strict"; return 'TempV'+this.variableNameCnt++; }, makeFunctionName: function () { "use strict"; return 'TempF'+this.functionNameCnt++; }, deleteFuncName: function() { "use strict"; this.functionNameCnt--; }, deleteVarName: function() { "use strict"; this.variableNameCnt--; } }; // make a nameMaker for global scope (just temporal way to distinguish all temporal variables.. var globalNameMaker = new temporalNameMaker (); var hashVarStmt = {}; var hashVarObj = { check: function (splitString) { "use strict"; if (hashVarStmt[splitString] === undefined) { return false; } else { return true; } }, insert: function (tempName, splitString) { "use strict"; hashVarStmt[splitString] = tempName; }, get: function (tempName, splitString) { "use strict"; return hashVarStmt[splitString]; } }; // split one expression manually function SplitExpression(node) { "use strict"; var originExp = node.source().toString(); var bracketCnt = 0; var start=0, end=0; var sliceArr = []; // parsing process while (true) { if (originExp[end] === '.') { // if there is a dot, save one block to sliceArr sliceArr.push(originExp.slice(start, end)); start = end + 1; // move start point } else if (originExp[end] === '(') { while (true) { if (originExp[end] === '(') { bracketCnt++; } if (originExp[end] === ')') { bracketCnt--; } if (bracketCnt === 0) { break; } end++; } } else if (originExp[end] === '[') { while (true) { if (originExp[end] === '[') { bracketCnt++; } if (originExp[end] === ']') { bracketCnt--; } if (bracketCnt === 0) { break; } end++; } } end++; if (end === originExp.length) { sliceArr.push(originExp.slice(start, end)); break; } } // parsing done. // now, it will make temporal variables for simplifying an expression if (sliceArr[0] !== undefined && sliceArr[0][0] === '$' && sliceArr.length < 2) { return null; } if (sliceArr[0][0] !== '$' && sliceArr.length < 3) { // if there is only one dot -> we don't have to make a temporal variable return null; } var returnArr = []; var name = globalNameMaker.makeVariableName(); var index; if (sliceArr[0][0] === '$') { returnArr = 'var ' + name + ' = ' + sliceArr[0] + ';\n'; index = 1; } else { returnArr = 'var ' + name + ' = ' + sliceArr[0] + '.' + sliceArr[1] + ';\n'; index = 2; } var lastName = name; while (true) { if (index === sliceArr.length-1) { node.update(name + '.' + sliceArr[index]); return returnArr; } name = globalNameMaker.makeVariableName(); returnArr = returnArr + 'var ' + name + ' = ' + lastName + '.' + sliceArr[index] + ';\n'; lastName = name; index++; } } /* getStableNode: it will find a stable node for adding temporal variables in front of statement */ function getStableNode(node) { "use strict"; var indexNode = node.parent; if (indexNode.type === 'Program' || indexNode.type === 'BlockStatement') { return indexNode.body[0]; } while(true) { //console.log("======================"); if(indexNode.parent.type !== 'CallExpression') { if (indexNode.type === 'IfStatement' && indexNode.parent.type !== 'IfStatement') { break; } if (indexNode.type === 'Program' || indexNode.type === 'BlockStatement') { indexNode = indexNode.body[0]; break; } if (indexNode.type === "VariableDeclaration" || indexNode.type === "AssignmentExpression" || indexNode.type === "ExpressionStatement" || indexNode.type === "ForStatement" || indexNode.type === "WhileStatement") { break; } } indexNode = indexNode.parent; } return indexNode; } // Phase0 function which gets code and returns modified code. function checkPullArgu(argument) { "use strict"; var returnString = null; for (var i in argument) { if (argument[i].type !== 'ArrayExpression' && argument[i].type !== 'Literal' && argument[i].type !== 'Identifier') { var name = globalNameMaker.makeVariableName(); if (returnString === null) { returnString = 'var ' + name + ' = ' + argument[i].source() + ';\n'; } else { returnString = returnString + '\n' + 'var ' + name + ' = ' + argument[i].source() + ';\n'; } argument[i].update(name); } } return returnString; } function pullExpression(node) { "use strict"; var returnString = null; var name = globalNameMaker.makeVariableName(); returnString = 'var ' + name + ' = ' + node.source() + ';\n'; node.update(name); return returnString; } module.exports = { phase0: function (code) { "use strict"; /* Phase 0A - anonymous function naming */ var phase0A = falafel(code, function(node) { var temp, tempFuncName, indexNum; if (node.type === 'CallExpression') { if (node.callee.type === 'FunctionExpression') { temp = node.callee.source().toString(); indexNum = temp.indexOf("function") + 8; tempFuncName = globalNameMaker.makeFunctionName(); temp = temp.slice(0, indexNum) + " " + tempFuncName + " " + temp.slice(indexNum + Math.abs(0)); node.callee.update(tempFuncName); node.parent.update(temp + '\n' + node.parent.source()); } else { for (var i in node.arguments) { if (node.arguments[i] !== undefined && node.arguments[i].type === 'FunctionExpression') { temp = node.arguments[i].source().toString(); tempFuncName = globalNameMaker.makeFunctionName(); indexNum = temp.indexOf("function") + 8; tempFuncName = globalNameMaker.makeFunctionName(); temp = temp.slice(0, indexNum) + " " + tempFuncName + " " + temp.slice(indexNum + Math.abs(0)); node.arguments[i].update(tempFuncName); node.parent.update(temp + '\n' + node.parent.source()); } } } } }).toString(); /* Phase 0B - pull out all arguments except literal, Identifier, and Array*/ /* The reason of doing Phase 0D: It will be easier to track DOM dependancy */ var parentArr = [], splitArr = []; var phase0B = falafel (phase0A, function(node) { var tempUpdate; if (node.arguments !== undefined) { tempUpdate = checkPullArgu(node.arguments); if (tempUpdate !== null) { var stableNode = getStableNode(node); parentArr.push(stableNode); splitArr.push(tempUpdate); } } var index = parentArr.length; var gatherString = []; while (true) { if (parentArr[index-1] === node) { // check whether stable node is same as node, then gather gatherString gatherString = splitArr[index-1] + gatherString; parentArr.pop(); splitArr.pop(); } else { if (gatherString !== null) { node.update(gatherString + node.source()); } break; } index--; } }).toString(); /* Phase 0C - pulling out expression statements from objectExpression */ // ex) var a = { index: this.c.d('a1'), ...}; // => var a = { index: undefined, ... }; // a.index = a.c.d('a1'); var phase0C = falafel(phase0B, function(node) { if (node.type === 'ObjectExpression') { var name; if (node.parent.type === 'VariableDeclarator') { name = node.parent.id.source(); } else if (node.parent.type === 'AssignmentExpression') { name = node.parent.left.source(); } else { if (node.parent.type !== 'ReturnStatement') { console.log('I am not covering Phase0B'); } } var tempSource = []; for (var i in node.properties) { var tempNode1 = node.properties[i].value; if (tempNode1.type === 'CallExpression' || tempNode1.type === 'MemberExpression') { if (node.properties[i].key.source()[0] === "\"" || node.properties[i].key.source()[0] === "\'") { tempSource = tempSource + '\n' + name + '[' + node.properties[i].key.source() + ']'; } else { tempSource = tempSource + '\n' + name + '.' + node.properties[i].key.source(); } tempSource = tempSource + ' = ' + tempNode1.source().replace(/this/g, name) + ';'; tempNode1.update('undefined'); } } if (tempSource !== []) { node.parent.parent.update(node.parent.parent.source() + tempSource); } } }).toString(); /* Phase 0E - split all statements into single actions */ var phase0D = falafel(phase0C, function(node) { var tempSplit = null; if (node.type === 'MemberExpression') { if (node.property.type !== 'Literal' && node.property.type !== 'Identifier') { //console.log(node.property.source()); tempSplit = pullExpression(node.property); } } if (tempSplit !== null) { var stableNode = getStableNode(node); parentArr.push(stableNode); splitArr.push(tempSplit); } var index = parentArr.length; var gatherString = []; while (true) { if (parentArr[index-1] === node) { // check whether stable node is same as node, then gather gatherString gatherString = splitArr[index-1] + gatherString; parentArr.pop(); splitArr.pop(); } else { if (gatherString !== null) { node.update(gatherString + node.source()); } break; } index--; } }).toString(); /* Phase 0D - split all statements into single actions */ var phase0E = falafel(phase0D, function(node) { var tempSplit; if (node.type === 'CallExpression' || node.type === 'MemberExpression') { if (checkMinConCallOrMem(node)) { tempSplit = SplitExpression(node); if (tempSplit !== null) { var stableNode = getStableNode(node); parentArr.push(stableNode); splitArr.push(tempSplit); } } } var index = parentArr.length; var gatherString = []; while (true) { if (parentArr[index-1] === node) { // check whether stable node is same as node, then gather gatherString gatherString = splitArr[index-1] + gatherString; parentArr.pop(); splitArr.pop(); } else { if (gatherString !== null) { node.update(gatherString + node.source()); } break; } index--; } }).toString(); /* Phase 0F - normalize the assignment form */ // ex) a.b = c.d; ==> var temp = c.d; a.b = temp; var phase0F = falafel(phase0E, function(node) { var set = false; if (node.type === 'AssignmentExpression') { if (node.left.type === 'MemberExpression') { if (node.right.type === 'CallExpression' && node.right.callee.type === 'MemberExpression') { set = true; } else if (node.right.type === 'MemberExpression') { set = true; } } } if (set === true) { var name = globalNameMaker.makeVariableName(); var string = 'var ' + name + " = " + node.right.source() + ";\n" + node.left.source() + " = " + name; node.update(string); } }).toString(); /* Phase 0G - if there is a return format which is not literal and identifier, then change it */ // ex) return (a-b); ==> temp = a-b; return temp; var phase0G = falafel(phase0F, function(node) { var tempSplit = null; if (node.type === 'ReturnStatement') { if (node.argument !== null && node.argument.type !== 'Literal' && node.argument.type !== 'Identifier') { tempSplit = pullExpression(node.argument); } } if (tempSplit !== null) { var stableNode = getStableNode(node); parentArr.push(stableNode); splitArr.push(tempSplit); } var index = parentArr.length; var gatherString = []; while (true) { if (parentArr[index-1] === node) { // check whether stable node is same as node, then gather gatherString gatherString = splitArr[index-1] + gatherString; parentArr.pop(); splitArr.pop(); } else { if (gatherString !== null) { node.update(gatherString + node.source()); } break; } index--; } }).toString(); // result of phase0 return phase0G; }, phase1: function (code) { "use strict"; var scopeHistory = []; var lastNode; falafel(code, function(node) { lastNode = node; }); enter2(lastNode, scopeHistory); // should update summary summary.FunctionTree = FunctionTree; return summary; } }; /////////////////////////////// PHASE0 related END ////////////////////////////////// /////////////////////////////// PHASE2 related START ////////////////////////////////// function getArgumentName(node) { "use strict"; var argu = []; for (var i in node) { argu.push(getCode(node[i])); } return argu; } function getCode(node) { "use strict"; var tempString = []; if (node.type === 'Identifier') { return node.name; } else if (node.type === 'Literal') { return node.value; } else if (node.type === 'MemberExpression') { return getCode(node.object) + '.' + getCode(node.property); } else if (node.type === 'CallExpression') { for (var i in node.arguments) { tempString.push(getCode(node.arguments[i])); } return getCode(node.callee) + '(' + tempString + ')'; } else if (node.type === 'BinaryExpression' || node.type === 'AssignmentExpression') { return getCode(node.left) + node.operator + getCode(node.right); } else if (node.type === 'UpdateExpression') { if (node.prefix) { return node.operator + getCode(node.argument); } else { return getCode(node.argument) + node.operator; } } else { console.log(node); console.log("!!! get code !!! " + node); } } function makeFunctionObj() { "use strict"; var returnObj = {}; returnObj.calls = []; returnObj.installs = []; returnObj.writes = []; returnObj.reads = []; returnObj.DomRef = []; return returnObj; } var FunctionTree = {}; function addNewScope(node, scopeArr) { "use strict"; if (node.type === 'FunctionDeclaration') { if (node.id.type === 'Identifier') { scopeArr.push(node.id.name); FunctionTree[node.id.name] = makeFunctionObj(); return true; } else { console.log("Not cover node.id.type != Identifier"); } } else if (node.type === 'FunctionExpression') { var name; if (node.parent.type === 'CallExpression' && node.parent.parent === 'AssignmentExpression') { scopeArr.push(getCode(node.parent.parent.left)); FunctionTree[getCode(node.parent.parent.left)] = makeFunctionObj(); return true; } else if (node.parent.type === 'VariableDeclarator') { scopeArr.push(getCode(node.parent.id)); FunctionTree[getCode(node.parent.id)] = makeFunctionObj(); return true; } else if (node.parent.type === 'Property') { if (node.parent.parent.parent.type === 'VariableDeclarator') { name = getCode(node.parent.parent.parent.id) + '.' + getCode(node.parent.key); scopeArr.push(name); FunctionTree[name] = makeFunctionObj(); return true; } else if (node.parent.parent.parent.type === 'AssignmentExpression') { name = getCode(node.parent.parent.parent.left) + '.' + getCode(node.parent.key); scopeArr.push(name); FunctionTree[name] = makeFunctionObj(); return true; } } else { console.log("I have to cover this case! "); } } else if (node.type === 'Program') { scopeArr.push('global'); FunctionTree.global = makeFunctionObj(); return true; } return false; } function enter2(node, scopeArr) { "use strict"; var i; if (typeof node === 'object') { if (node !== null) { var shouldpop = addNewScope(node, scopeArr); if (node.type === undefined) { for (i in node) { enter2(node[i], scopeArr); } } else { for (i=0; i<Keys[node.type].length; i++) { enter2(node[Keys[node.type][i]], scopeArr); } } checkDomRelation(node, scopeArr); if (shouldpop) { scopeArr.pop(); } } } } function phase2(code) { "use strict"; var scopeHistory = []; var lastNode; falafel(code, function(node) { lastNode = node; }); enter2(lastNode, scopeHistory); // should update summary summary.FunctionTree = FunctionTree; } /////////////////////////////// PHASE2 related END ////////////////////////////////// /////////////////////////////// PHASE3 related START ////////////////////////////////// /*********** DomRef, Read, Write, Install **********/ // DomRef, Read: var temp = a.b; var temp = a('t1').b; var temp = a.b('t1'); var temp = a('t1').b('t2'); // temp = a.b; temp = a('t1').b; temp = a.b('t1'); temp = a('t1').b('t2'); // Write, install: a.b; a('t1').b; a.b('t1'); a('t1').b('t2'); function addType0(type, tag, node, scopeArr) { "use strict"; var indexNode = node; var insertString = '('; for (var i in indexNode.arguments) { if (indexNode.arguments[i].type === 'Literal') { insertString = insertString + indexNode.arguments[i].value + ', '; } else if (indexNode.arguments[i].type === 'Identifier') { insertString = insertString + indexNode.arguments[i].name + ', '; } } insertString = insertString.substring(0, insertString.length-2); insertString = insertString + ')'; indexNode = indexNode.parent; if (indexNode.type === 'AssignmentExpression' || indexNode.type === 'VariableDeclarator') { if (indexNode.type === 'AssignmentExpression') { insertString = getCode(indexNode.left) + ': ' + insertString; } else if (indexNode.type === 'VariableDeclarator') { insertString = getCode(indexNode.id) + ': ' + insertString; } FunctionTree[scopeArr[scopeArr.length-1]][type].push(insertString); } else if (indexNode.type === 'Property') { if (indexNode.parent.parent.type === 'AssignmentExpression') { insertString = getCode(indexNode.parent.parent.left) + '.' + getCode(indexNode.key) + ': ' + insertString; } else if (indexNode.parent.parent.type === 'VariableDeclarator') { insertString = getCode(indexNode.parent.parent.id) + '.' + getCode(indexNode.key) + ': ' + insertString; } FunctionTree[scopeArr[scopeArr.length-1]][type].push(insertString); } } function addType1(type, tag, node, scopeArr) { "use strict"; var indexNode = node.callee; var insertString = []; while (true) { if (indexNode.type === 'CallExpression') { if (insertString.length === 0) { insertString = insertString + indexNode.arguments[0].value; } else { insertString = insertString + indexNode.arguments[0].value + ')'; } break; } else if (indexNode.type === 'MemberExpression') { insertString = '(' + indexNode.object.name + ', ' + tag + ', '; indexNode = indexNode.parent; } else { console.log('1111111?????? unexpected'); } } indexNode = indexNode.parent; if (indexNode.type === 'AssignmentExpression' || indexNode.type === 'VariableDeclarator') { if (indexNode.type === 'AssignmentExpression') { insertString = getCode(indexNode.left) + ': ' + insertString; } else if (indexNode.type === 'VariableDeclarator') { insertString = getCode(indexNode.id) + ': ' + insertString; } FunctionTree[scopeArr[scopeArr.length-1]][type].push(insertString); } else if (indexNode.type === 'Property') { if (indexNode.parent.parent.type === 'AssignmentExpression') { insertString = getCode(indexNode.parent.parent.left) + '.' + getCode(indexNode.key) + ': ' + insertString; } else if (indexNode.parent.parent.type === 'VariableDeclarator') { insertString = getCode(indexNode.parent.parent.id) + '.' + getCode(indexNode.key) + ': ' + insertString; } FunctionTree[scopeArr[scopeArr.length-1]][type].push(insertString); } } function addType2(type, tag, node, scopeArr) { "use strict"; var indexNode = node.parent; var insertString = []; while (true) { if (indexNode.type === 'CallExpression') { insertString = insertString + '{' + getArgumentName(indexNode.arguments) + '})'; break; } else if (indexNode.type === 'MemberExpression') { insertString = '(' + indexNode.object.name + ', ' + tag + ', '; indexNode = indexNode.parent; } else { console.log('22222222?????? unexpected'); } } FunctionTree[scopeArr[scopeArr.length-1]][type].push(insertString); } var DomRefList = function () { "use strict"; this.$ = { result: function(node, scopeArr) { addType0('DomRef', 'getDom', node, scopeArr); } }; this.getElementById = { result: function(node, scopeArr) { addType1('DomRef', 'getById', node, scopeArr); } }; this.getElementsByTagName = { result: function(node, scopeArr) { addType1('DomRef', 'getByTag', node, scopeArr); } }; this.createElement = { result: function(node, scopeArr) { addType1('DomRef', 'createElement', node, scopeArr); } }; this.createTextNode = { result: function(node, scopeArr) { addType1('DomRef', 'createTextNode', node, scopeArr); } }; }; var domRef = new DomRefList(); var DomReadList = function () { "use strict"; this.getAttribute = { result: function(node, scopeArr) { addType1('reads', 'getByTag', node, scopeArr); } }; }; var domRead = new DomReadList(); var DomWriteList = function () { "use strict"; this.addClass = { result: function(node, scopeArr) { addType2('writes', 'addclass', node, scopeArr); } }; this.setAttribute = { result: function(node, scopeArr) { addType2('writes', 'attribute', node, scopeArr); } }; this.appendChild = { result: function(node, scopeArr) { addType2('writes', 'appendChild', node, scopeArr); } }; this.removeChild = { result: function(node, scopeArr) { addType2('writes', 'removeChild', node, scopeArr); } }; }; var domWrite = new DomWriteList(); var DomInstallList = function () { "use strict"; this.click = { result: function(node, scopeArr) { addType2('installs', 'click', node, scopeArr); } }; this.addEventListener = { result: function(node, scopeArr) { addType2('installs', 'addEvent', node, scopeArr); } }; this.ready = { result: function(node, scopeArr) { addType2('installs', 'ready', node, scopeArr); } } }; var domInstall = new DomInstallList(); function check(obj, name) { "use strict"; if (typeof obj[name] !== 'function' && obj[name] !== undefined) { return true; } else { return false; } } function checkDomRelation(node1, scopeArr) { "use strict"; if (node1.type === 'CallExpression' || node1.type === 'MemberExpression') { if (node1.parent.type !== 'CallExpression' && node1.parent.type !== 'MemberExpression') { var test = false; falafel(node1.source().toString(), function(node) { if (node.type === 'Identifier') { if (check(domRef, node.name)) { domRef[node.name].result(node1, scopeArr); test = true; } else if (check(domRead, node.name)) { domRead[node.name].result(node1, scopeArr); test = true; } else if (check(domWrite, node.name)) { domWrite[node.name].result(node, scopeArr); test = true; } else if (check(domInstall, node.name)) { domInstall[node.name].result(node, scopeArr); test = true; } } }); // If test is false, it is call expression if (test === false && node1.type === 'CallExpression') { FunctionTree[scopeArr[scopeArr.length-1]].calls.push(node1.source()); } } } return {'result': false}; } /////////////////////////////// PHASE3 related END ////////////////////////////////// ////////////////////////////////running part///////////////////////////////////// var testMode = process.argv[3]; if (testMode === "printNode") { } else { //var resultCodePhase0 = phase0(code1); //console.log(resultCodePhase0); //phase2 just updates summary (no need return) //phase2(resultCodePhase0); //console.log("Result of phase2"); //console.log(summary.FunctionTree); //phase3(read-write) and phase5(installs) are involved in phase2 } /////////////////////////////////////////////////////////////////////////////////// // CHECK the TYPE whether it is CALLexpression(1) OR MEMberexpression(2) function checkTypeCallOrMem(type) { "use strict"; if (type === 'CallExpression') { return 1; } else if (type === 'MemberExpression') { return 2; } else { return 0; } } // CHECK the TYPE whether it is IDEtifier(1) OR LITeral(2) function checkTypeIdeOrLit(type) { "use strict"; if (type === 'Identifier') { return 1; } else if (type === 'Literal') { return 2; } else { return 0; } } // CHECK MINimum CONdition of CALLexpression OR MEMberexpression function checkMinConCallOrMem(expression) { "use strict"; var firstCheck=false, secondCheck=false; if (expression === null) { return false; } if (checkTypeCallOrMem(expression.type) === 1) { // CallExpression // check callee // is it CallExpression or MemberExpression? if (checkTypeCallOrMem(expression.callee.type) > 0) { firstCheck = checkMinConCallOrMem(expression.callee); // or Identifier then true } else if (checkTypeIdeOrLit(expression.callee.type) === 1) { firstCheck = true; // if not, false.. } else { if (expression.callee.type === 'ThisExpression') { firstCheck = true; } else { firstCheck = false; } } secondCheck = true; } else if (checkTypeCallOrMem(expression.type) === 2) { // check object if (checkTypeCallOrMem(expression.object.type) > 0) { firstCheck = checkMinConCallOrMem(expression.object); } else if (checkTypeIdeOrLit(expression.object.type) > 0) { firstCheck = true; } else { if (expression.object.type === 'ThisExpression') { firstCheck = true; } else { firstCheck = false; } } // check property if (checkTypeCallOrMem(expression.property.type) > 0) { secondCheck = checkMinConCallOrMem(expression.property); } else if (checkTypeIdeOrLit(expression.property.type) > 0) { secondCheck = true; } else { if (expression.property.type === 'ThisExpression') { secondCheck = true; } else { secondCheck = false; } } } else { if (expression.type === 'ThisExpression') { return true; } else { firstCheck = false; } } // return part return firstCheck && secondCheck; } /* Phase 0B - pulling out objectExpression from CallExpression */ // ex) wrapper = $("<div />", { // "class" : defaults.todoTask, // "id" : defaults.taskId + params.id, // "data" : params.id // }).appendTo(parent); // => var TempV0 = { "class" : ...., "id" : ... }; // wrapper = $("<div />", TempV0).appendTo(parent); /* var phase0B = falafel(phase0A, function(node) { if (node.type === 'ObjectExpression' && node.parent.type === 'CallExpression') { var name = globalNameMaker.makeVariableName(); var insertString = 'var ' + name + ' = ' + node.source() + ';\n'; node.update(name); var stableNode = getStableNode(node); parentArr.push(stableNode); splitArr.push(insertString); } var index = parentArr.length; var gatherString = []; while (true) { if (parentArr[index-1] === node) { // check whether stable node is same as node, then gather gatherString gatherString = splitArr[index-1] + gatherString; parentArr.pop(); splitArr.pop(); } else { if (gatherString !== null) { node.update(gatherString + node.source()); } break; } index--; } }).toString(); */
{'content_hash': 'a477f106eb5e95b32e57af5567bf924b', 'timestamp': '', 'source': 'github', 'line_count': 932, 'max_line_length': 224, 'avg_line_length': 37.7156652360515, 'alnum_prop': 0.5012944155216068, 'repo_name': 'sch8906/static-dom-analysis', 'id': 'cf68b2018207f87c0e819bbe7053a464b4e1a2cf', 'size': '35151', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/stage1.js', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '1502'}, {'name': 'Batchfile', 'bytes': '51892'}, {'name': 'C', 'bytes': '5920393'}, {'name': 'C++', 'bytes': '62217699'}, {'name': 'CMake', 'bytes': '281692'}, {'name': 'CSS', 'bytes': '351684'}, {'name': 'DTrace', 'bytes': '1931'}, {'name': 'Emacs Lisp', 'bytes': '393'}, {'name': 'Groff', 'bytes': '26536'}, {'name': 'HTML', 'bytes': '1244526'}, {'name': 'Java', 'bytes': '13062'}, {'name': 'JavaScript', 'bytes': '10662654'}, {'name': 'Lex', 'bytes': '24544'}, {'name': 'M4', 'bytes': '93160'}, {'name': 'Makefile', 'bytes': '81506'}, {'name': 'Objective-C', 'bytes': '2003253'}, {'name': 'Objective-C++', 'bytes': '4774084'}, {'name': 'PHP', 'bytes': '99614'}, {'name': 'Perl', 'bytes': '1692031'}, {'name': 'Perl6', 'bytes': '87417'}, {'name': 'Prolog', 'bytes': '67'}, {'name': 'Python', 'bytes': '5408368'}, {'name': 'QMake', 'bytes': '266744'}, {'name': 'Rebol', 'bytes': '290'}, {'name': 'Ruby', 'bytes': '147259'}, {'name': 'SMT', 'bytes': '7222'}, {'name': 'Shell', 'bytes': '128645'}, {'name': 'Yacc', 'bytes': '140457'}]}
GitHub
<?php // autoload_psr4.php @generated by Composer $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'), 'Wn\\Generators\\' => array($vendorDir . '/wn/lumen-generators/src'), 'When\\' => array($vendorDir . '/tplaner/when/src'), 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), 'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), 'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'), 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), 'SocialiteProviders\\Manager\\Test\\' => array($vendorDir . '/socialiteproviders/manager/tests'), 'SocialiteProviders\\Manager\\' => array($vendorDir . '/socialiteproviders/manager/src'), 'SocialiteProviders\\Google\\' => array($vendorDir . '/socialiteproviders/google'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), 'League\\OAuth1\\' => array($vendorDir . '/league/oauth1-client/src'), 'League\\Flysystem\\AwsS3v3\\' => array($vendorDir . '/league/flysystem-aws-s3-v3/src'), 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'), 'Laravel\\Socialite\\' => array($vendorDir . '/laravel/socialite/src'), 'Laravel\\Lumen\\' => array($vendorDir . '/laravel/lumen-framework/src'), 'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'), 'Illuminate\\View\\' => array($vendorDir . '/illuminate/view'), 'Illuminate\\Validation\\' => array($vendorDir . '/illuminate/validation'), 'Illuminate\\Translation\\' => array($vendorDir . '/illuminate/translation'), 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/support'), 'Illuminate\\Session\\' => array($vendorDir . '/illuminate/session'), 'Illuminate\\Queue\\' => array($vendorDir . '/illuminate/queue'), 'Illuminate\\Pipeline\\' => array($vendorDir . '/illuminate/pipeline'), 'Illuminate\\Pagination\\' => array($vendorDir . '/illuminate/pagination'), 'Illuminate\\Mail\\' => array($vendorDir . '/illuminate/mail'), 'Illuminate\\Http\\' => array($vendorDir . '/illuminate/http'), 'Illuminate\\Hashing\\' => array($vendorDir . '/illuminate/hashing'), 'Illuminate\\Filesystem\\' => array($vendorDir . '/illuminate/filesystem'), 'Illuminate\\Events\\' => array($vendorDir . '/illuminate/events'), 'Illuminate\\Encryption\\' => array($vendorDir . '/illuminate/encryption'), 'Illuminate\\Database\\' => array($vendorDir . '/illuminate/database'), 'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'), 'Illuminate\\Container\\' => array($vendorDir . '/illuminate/container'), 'Illuminate\\Console\\' => array($vendorDir . '/illuminate/console'), 'Illuminate\\Config\\' => array($vendorDir . '/illuminate/config'), 'Illuminate\\Cache\\' => array($vendorDir . '/illuminate/cache'), 'Illuminate\\Bus\\' => array($vendorDir . '/illuminate/bus'), 'Illuminate\\Broadcasting\\' => array($vendorDir . '/illuminate/broadcasting'), 'Illuminate\\Auth\\' => array($vendorDir . '/illuminate/auth'), 'Ical\\' => array($vendorDir . '/calendar/icsfile/src'), 'Hashids\\' => array($vendorDir . '/hashids/hashids/src'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), 'FastRoute\\' => array($vendorDir . '/nikic/fast-route/src'), 'Faker\\' => array($vendorDir . '/fzaninotto/faker/src/Faker'), 'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'), 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), 'Cron\\' => array($vendorDir . '/mtdowling/cron-expression/src/Cron'), 'Collective\\Html\\' => array($vendorDir . '/vluzrmos/collective-html/src'), 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), 'Aws\\' => array($vendorDir . '/aws/aws-sdk-php/src'), 'App\\' => array($baseDir . '/app'), );
{'content_hash': '86c85fdd6d0a7a0aaed7433e343d278d', 'timestamp': '', 'source': 'github', 'line_count': 75, 'max_line_length': 200, 'avg_line_length': 70.53333333333333, 'alnum_prop': 0.6512287334593573, 'repo_name': 'RbnAlexs/GoogleApi', 'id': '9677237eee94d1b777f4ea9f8b8b8932ca681933', 'size': '5290', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'vendor/composer/autoload_psr4.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '553'}, {'name': 'CSS', 'bytes': '53806'}, {'name': 'HTML', 'bytes': '37402'}, {'name': 'JavaScript', 'bytes': '1616841'}, {'name': 'PHP', 'bytes': '57058'}, {'name': 'Shell', 'bytes': '71'}]}
GitHub
{% extends "invalid-base.html" %} {% block body %}Child {{ block.super }}{% endblock %}
{'content_hash': '1f72b09faedb5c1888027f176e1ccea7', 'timestamp': '', 'source': 'github', 'line_count': 3, 'max_line_length': 53, 'avg_line_length': 29.666666666666668, 'alnum_prop': 0.6067415730337079, 'repo_name': 'kylef/Stencil', 'id': '23aea65eb7fdae2854b27b01523eb93c3daf9822', 'size': '89', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Tests/StencilTests/fixtures/invalid-child-super.html', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'HTML', 'bytes': '405'}, {'name': 'Swift', 'bytes': '137851'}]}
GitHub
#ifndef D_LCDIntfMock_h #define D_LCDIntfMock_h #include <stdint.h> extern "C" { #include "MockPeriphIO.h" }; enum { LCDINTFMOCK_WRITE_INSTRUCTION_CALL = 1, LCDINTFMOCK_WRITE_DATA_CALL, LCDINTFMOCK_READ_INSTRUCTION_CALL, LCDINTFMOCK_READ_DATA_CALL, LCDINTFMOCK_WAIT_WHILE_BUSY_CALL, LCDINTFMOCK_WAIT_COMPLETE, LCDINTFMOCK_WAIT_TIMEOUT, }; inline void LCDIntfMock_Expect_WriteInstruction(int32_t i) { MockPeriphIO_Expect_Write(LCDINTFMOCK_WRITE_INSTRUCTION_CALL, i); } inline void LCDIntfMock_Expect_WriteData(int32_t d) { MockPeriphIO_Expect_Write(LCDINTFMOCK_WRITE_DATA_CALL, d); } inline void LCDIntfMock_Expect_ReadDataThenReturn(int32_t retVal) { MockPeriphIO_Expect_ReadThenReturn(LCDINTFMOCK_READ_DATA_CALL, retVal); } inline void LCDIntfMock_Expect_ReadInstructionThenReturn(int32_t retVal) { MockPeriphIO_Expect_ReadThenReturn(LCDINTFMOCK_READ_INSTRUCTION_CALL, retVal); } inline void LCDIntfMock_Expect_WaitWhileBusyThenReturn(int32_t retVal) { MockPeriphIO_Expect_ReadThenReturn(LCDINTFMOCK_WAIT_WHILE_BUSY_CALL, retVal); } #endif /* #ifndef D_LCDIntfMock_h */
{'content_hash': 'beab84087dd255e72066a036c8e23ade', 'timestamp': '', 'source': 'github', 'line_count': 51, 'max_line_length': 75, 'avg_line_length': 22.41176470588235, 'alnum_prop': 0.7550306211723534, 'repo_name': 'tkorenko/LCDDriver', 'id': '5f27a0445873cee63d9ece48b9d7e5ba8e5cd227', 'size': '1143', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/LCDDriver/LCDIntfMock.h', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'C', 'bytes': '32786'}, {'name': 'C++', 'bytes': '54613'}, {'name': 'Makefile', 'bytes': '2712'}, {'name': 'Shell', 'bytes': '1414'}]}
GitHub
package com.siyeh.ig.junit; import com.intellij.psi.PsiMethodCallExpression; import com.siyeh.InspectionGadgetsBundle; import com.siyeh.ig.BaseInspection; import com.siyeh.ig.BaseInspectionVisitor; import com.siyeh.ig.testFrameworks.AssertHint; import org.jetbrains.annotations.NotNull; public class AssertEqualsBetweenInconvertibleTypesInspection extends BaseInspection { @Override @NotNull public String getDisplayName() { return InspectionGadgetsBundle.message("assertequals.between.inconvertible.types.display.name"); } @Override @NotNull public String buildErrorString(Object... infos) { return (String)infos[0]; } @Override public boolean isEnabledByDefault() { return true; } @Override public BaseInspectionVisitor buildVisitor() { return new AssertEqualsBetweenInconvertibleTypesVisitor(); } private static class AssertEqualsBetweenInconvertibleTypesVisitor extends BaseInspectionVisitor { @Override public void visitMethodCallExpression(@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final String compatibilityErrorMessage = AssertHint.areExpectedActualTypesCompatible(expression, false); if (compatibilityErrorMessage != null) { registerMethodCallError(expression, compatibilityErrorMessage); } } } }
{'content_hash': 'f32e6f44b7b42ed133d83311199d51f8', 'timestamp': '', 'source': 'github', 'line_count': 46, 'max_line_length': 110, 'avg_line_length': 29.5, 'alnum_prop': 0.7848194546794399, 'repo_name': 'semonte/intellij-community', 'id': '869140f04f5979aee9c1376c1970c58d9f94b418', 'size': '1956', 'binary': False, 'copies': '17', 'ref': 'refs/heads/master', 'path': 'plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/junit/AssertEqualsBetweenInconvertibleTypesInspection.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'AMPL', 'bytes': '20665'}, {'name': 'AspectJ', 'bytes': '182'}, {'name': 'Batchfile', 'bytes': '60580'}, {'name': 'C', 'bytes': '211556'}, {'name': 'C#', 'bytes': '1264'}, {'name': 'C++', 'bytes': '197528'}, {'name': 'CMake', 'bytes': '1675'}, {'name': 'CSS', 'bytes': '201445'}, {'name': 'CoffeeScript', 'bytes': '1759'}, {'name': 'Erlang', 'bytes': '10'}, {'name': 'Groovy', 'bytes': '3222009'}, {'name': 'HLSL', 'bytes': '57'}, {'name': 'HTML', 'bytes': '1895767'}, {'name': 'J', 'bytes': '5050'}, {'name': 'Java', 'bytes': '164918191'}, {'name': 'JavaScript', 'bytes': '570364'}, {'name': 'Jupyter Notebook', 'bytes': '93222'}, {'name': 'Kotlin', 'bytes': '4472431'}, {'name': 'Lex', 'bytes': '147154'}, {'name': 'Makefile', 'bytes': '2352'}, {'name': 'NSIS', 'bytes': '51270'}, {'name': 'Objective-C', 'bytes': '27941'}, {'name': 'Perl', 'bytes': '903'}, {'name': 'Perl6', 'bytes': '26'}, {'name': 'Protocol Buffer', 'bytes': '6680'}, {'name': 'Python', 'bytes': '25421481'}, {'name': 'Roff', 'bytes': '37534'}, {'name': 'Ruby', 'bytes': '1217'}, {'name': 'Scala', 'bytes': '11698'}, {'name': 'Shell', 'bytes': '65719'}, {'name': 'Smalltalk', 'bytes': '338'}, {'name': 'TeX', 'bytes': '25473'}, {'name': 'Thrift', 'bytes': '1846'}, {'name': 'TypeScript', 'bytes': '9469'}, {'name': 'Visual Basic', 'bytes': '77'}, {'name': 'XSLT', 'bytes': '113040'}]}
GitHub
package org.lwjgl.opengl; import static org.lwjgl.system.Checks.*; import static org.lwjgl.system.JNI.*; /** * Native bindings to the <a href="http://www.opengl.org/registry/specs/NV/conservative_raster_dilate.txt">NV_conservative_raster_dilate</a> extension. * * <p>This extension extends the conservative rasterization funtionality provided by NV_conservative_raster. It provides a new control to generate an * "over-conservative" rasterization by dilating primitives prior to rasterization.</p> * * <p>When using conservative raster to bin geometry, this extension provides a programmable overlap region between adjacent primitives. Regular * rasterization bins triangles with a shared edge uniquely into pixels. Conservative raster has a one-pixel overlap along the shared edge. Using a * half-pixel raster dilation, this overlap region increases to two pixels.</p> * * <p>Requires {@link NVConservativeRaster NV_conservative_raster}.</p> */ public class NVConservativeRasterDilate { /** Accepted by the {@code pname} parameter of ConservativeRasterParameterfNV, GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ public static final int GL_CONSERVATIVE_RASTER_DILATE_NV = 0x9379, GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV = 0x937A, GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV = 0x937B; protected NVConservativeRasterDilate() { throw new UnsupportedOperationException(); } static boolean isAvailable(GLCapabilities caps) { return checkFunctions( caps.glConservativeRasterParameterfNV ); } // --- [ glConservativeRasterParameterfNV ] --- public static void glConservativeRasterParameterfNV(int pname, float value) { long __functionAddress = GL.getCapabilities().glConservativeRasterParameterfNV; if ( CHECKS ) checkFunctionAddress(__functionAddress); callV(__functionAddress, pname, value); } }
{'content_hash': 'd2e8ae9bb789ec393ef2cb8175a52cd6', 'timestamp': '', 'source': 'github', 'line_count': 46, 'max_line_length': 151, 'avg_line_length': 41.06521739130435, 'alnum_prop': 0.7691900476442562, 'repo_name': 'MatthijsKamstra/haxejava', 'id': 'eca330369a2ba7908601772a77fa065c15c574c0', 'size': '2022', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '04lwjgl/code/lwjgl/org/lwjgl/opengl/NVConservativeRasterDilate.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '122'}, {'name': 'Haxe', 'bytes': '1163'}, {'name': 'JavaScript', 'bytes': '724'}, {'name': 'PHP', 'bytes': '25278'}]}
GitHub
<?xml version="1.0" ?><!DOCTYPE TS><TS language="gu_IN" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Ocoin</source> <translation>બીટકોઈન વિષે</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Ocoin&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Dr. Kimoto Chan</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Ocoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Ocoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Ocoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Ocoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>(no label)</source> <translation type="unfinished"/> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation type="unfinished"/> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BOUNTYCOINS&lt;/b&gt;!</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation type="unfinished"/> </message> <message> <location line="-56"/> <source>Ocoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your Ocoins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation type="unfinished"/> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation type="unfinished"/> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>OcoinGUI</name> <message> <location filename="../Ocoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation type="unfinished"/> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Quit application</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Show information about Ocoin</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"/> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a Ocoin address</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Modify configuration options for Ocoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"/> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-165"/> <location line="+530"/> <source>Ocoin</source> <translation type="unfinished"/> </message> <message> <location line="-530"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About Ocoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your Ocoin addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Ocoin addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Ocoin client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Ocoin network</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation type="unfinished"/> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Ocoin address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location filename="../Ocoin.cpp" line="+111"/> <source>A fatal error occurred. Ocoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation type="unfinished"/> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation type="unfinished"/> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>New sending address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Ocoin address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation type="unfinished"/> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Ocoin-Qt</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>version</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>UI options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start Ocoin after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start Ocoin on system login</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the Ocoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Connect to the Ocoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Ocoin.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Whether to show Ocoin addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation type="unfinished"/> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Ocoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"/> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Ocoin network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-124"/> <source>Balance:</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-78"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+107"/> <source>Immature:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation type="unfinished"/> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start Ocoin: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-217"/> <source>Client version</source> <translation type="unfinished"/> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation type="unfinished"/> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Startup time</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Network</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the Ocoin-Qt help message to get a list with possible Ocoin command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation type="unfinished"/> </message> <message> <location line="-260"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>Ocoin - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Ocoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the Ocoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation type="unfinished"/> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Ocoin RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Balance:</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>123.456 MEC</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"/> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Ocoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Ocoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Ocoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Ocoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter Ocoin signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation type="unfinished"/> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>Dr. Kimoto Chan</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Status</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Source</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Generated</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>label</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation type="unfinished"/> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Net amount</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Message</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Comment</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Debug information</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Transaction</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>true</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>false</source> <translation type="unfinished"/> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Amount</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation type="unfinished"/> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Today</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This week</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Last month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This year</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Range...</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>To yourself</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Other</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Min amount</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>ID</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>to</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>Ocoin-core</name> <message> <location filename="../Ocoinstrings.cpp" line="+94"/> <source>Ocoin version</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Send command to -server or Ocoind</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Specify configuration file (default: Ocoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Specify pid file (default: Ocoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 7951 or testnet: 17951)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 7950 or testnet: 17950)</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=bitcoinrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Ocoin Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Ocoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Ocoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>SSL options: (see the Ocoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"/> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation type="unfinished"/> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"/> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+165"/> <source>This help message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"/> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation type="unfinished"/> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Ocoin</source> <translation type="unfinished"/> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Ocoin to complete</source> <translation type="unfinished"/> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation type="unfinished"/> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Ocoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="-57"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
{'content_hash': '4de5251c00dca568b21765d8179f70a3', 'timestamp': '', 'source': 'github', 'line_count': 2917, 'max_line_length': 395, 'avg_line_length': 34.00788481316421, 'alnum_prop': 0.5671112186369089, 'repo_name': 'bankonme/OSC', 'id': '2081fa309836f447dcb2c1692a8d4453457961cf', 'size': '99223', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'src/qt/locale/Ocoin_gu_IN.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '9230'}, {'name': 'C++', 'bytes': '1608562'}, {'name': 'Makefile', 'bytes': '3840'}, {'name': 'NSIS', 'bytes': '6015'}, {'name': 'Objective-C', 'bytes': '791'}, {'name': 'Objective-C++', 'bytes': '2550'}, {'name': 'OpenEdge ABL', 'bytes': '2490234'}, {'name': 'Python', 'bytes': '2994'}, {'name': 'QMake', 'bytes': '12225'}, {'name': 'Shell', 'bytes': '1153'}]}
GitHub
// Copyright © 2015 ~ 2017 Sunsoft Studio, All rights reserved. // Umizoo is a framework can help you develop DDD and CQRS style applications. // // Created by young.han with Visual Studio 2017 on 2017-08-06. using System; using System.Collections.Generic; namespace Umizoo.Infrastructure.Composition { /// <summary> /// 对象容器接口 /// </summary> public interface IObjectContainer { ICollection<TypeRegistration> RegisteredTypes { get; } /// <summary> /// 判断此类型是否已注册 /// </summary> bool IsRegistered(Type type, string name = null); /// <summary> /// 注册一个类型 /// </summary> void RegisterInstance(Type type, object instance, string name = null); /// <summary> /// 注册一个类型 /// </summary> void RegisterType(Type type, string name = null, Lifecycle lifetime = Lifecycle.Singleton); /// <summary> /// 注册一个类型 /// </summary> void RegisterType(Type @from, Type to, string name = null, Lifecycle lifetime = Lifecycle.Singleton); /// <summary> /// 获取类型对应的实例 /// </summary> object Resolve(Type type, string name = null); /// <summary> /// 获取类型所有的实例 /// </summary> IEnumerable<object> ResolveAll(Type type); bool Complete(); IObjectContainer Parent { get; } IObjectContainer CreateChildContainer(); } }
{'content_hash': 'df6ee32b385a41129ad1be6d192bce9c', 'timestamp': '', 'source': 'github', 'line_count': 54, 'max_line_length': 109, 'avg_line_length': 26.74074074074074, 'alnum_prop': 0.5893351800554016, 'repo_name': 'imyounghan/umizoo', 'id': '70bf3e1d4c8e57edcc5c232db97a7bcaebd7738b', 'size': '1551', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Umizoo/Infrastructure/Composition/IObjectContainer.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '510829'}]}
GitHub
<?php # Generated by the protocol buffer compiler. DO NOT EDIT! # source: grafeas/v1/cvss.proto namespace Grafeas\V1\CVSS; use UnexpectedValueException; /** * Protobuf type <code>grafeas.v1.CVSS.Authentication</code> */ class Authentication { /** * Generated from protobuf enum <code>AUTHENTICATION_UNSPECIFIED = 0;</code> */ const AUTHENTICATION_UNSPECIFIED = 0; /** * Generated from protobuf enum <code>AUTHENTICATION_MULTIPLE = 1;</code> */ const AUTHENTICATION_MULTIPLE = 1; /** * Generated from protobuf enum <code>AUTHENTICATION_SINGLE = 2;</code> */ const AUTHENTICATION_SINGLE = 2; /** * Generated from protobuf enum <code>AUTHENTICATION_NONE = 3;</code> */ const AUTHENTICATION_NONE = 3; private static $valueToName = [ self::AUTHENTICATION_UNSPECIFIED => 'AUTHENTICATION_UNSPECIFIED', self::AUTHENTICATION_MULTIPLE => 'AUTHENTICATION_MULTIPLE', self::AUTHENTICATION_SINGLE => 'AUTHENTICATION_SINGLE', self::AUTHENTICATION_NONE => 'AUTHENTICATION_NONE', ]; public static function name($value) { if (!isset(self::$valueToName[$value])) { throw new UnexpectedValueException(sprintf( 'Enum %s has no name defined for value %s', __CLASS__, $value)); } return self::$valueToName[$value]; } public static function value($name) { $const = __CLASS__ . '::' . strtoupper($name); if (!defined($const)) { throw new UnexpectedValueException(sprintf( 'Enum %s has no value defined for name %s', __CLASS__, $name)); } return constant($const); } }
{'content_hash': '7622d3e32a5c596daedf073b94690331', 'timestamp': '', 'source': 'github', 'line_count': 59, 'max_line_length': 84, 'avg_line_length': 28.983050847457626, 'alnum_prop': 0.6152046783625731, 'repo_name': 'googleapis/php-grafeas', 'id': '83e50d12e1209a10294a8227bbac84293cb4f398', 'size': '1710', 'binary': False, 'copies': '3', 'ref': 'refs/heads/main', 'path': 'src/V1/CVSS/Authentication.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'PHP', 'bytes': '104577'}, {'name': 'Python', 'bytes': '2842'}]}
GitHub
@implementation WeatherDescription @synthesize weatherID = _weatherID; @synthesize description = _description; @synthesize pictureURL = _pictureURL; // class meta-data method // note: this method is only for internal use, DO NOT CHANGE! +(PicoClassSchema *)getClassMetaData { return nil; } // property meta-data method // note: this method is only for internal use, DO NOT CHANGE! +(NSMutableDictionary *)getPropertyMetaData { NSMutableDictionary *map = [OrderedDictionary dictionary]; PicoPropertySchema *ps = nil; ps = [[PicoPropertySchema alloc] initWithKind:PICO_KIND_ELEMENT xmlName:@"WeatherID" propertyName:@"weatherID" type:PICO_TYPE_SHORT clazz:nil]; [map setObject:ps forKey:@"weatherID"]; ps = [[PicoPropertySchema alloc] initWithKind:PICO_KIND_ELEMENT xmlName:@"Description" propertyName:@"description" type:PICO_TYPE_STRING clazz:nil]; [map setObject:ps forKey:@"description"]; ps = [[PicoPropertySchema alloc] initWithKind:PICO_KIND_ELEMENT xmlName:@"PictureURL" propertyName:@"pictureURL" type:PICO_TYPE_STRING clazz:nil]; [map setObject:ps forKey:@"pictureURL"]; return map; } @end
{'content_hash': '3b836638dff5bd84ead27539ca19f52e', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 152, 'avg_line_length': 39.724137931034484, 'alnum_prop': 0.7421875, 'repo_name': 'maxep/PicoKit', 'id': '616750c13b5f22f3eb5872c12a2b7f68c9ffdf2f', 'size': '1316', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Examples/Weather/Weather/com/cdyne/ws/weatherws/WeatherDescription.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '1834'}, {'name': 'JavaScript', 'bytes': '1796'}, {'name': 'Objective-C', 'bytes': '313328'}, {'name': 'Ruby', 'bytes': '2392'}]}
GitHub
<?php namespace BusinessLogicLibrary\QueryFilter\Exception; class QueryFilterException extends \Exception { }
{'content_hash': 'f2a05fb69a923bdb21200595e4827bf3', 'timestamp': '', 'source': 'github', 'line_count': 9, 'max_line_length': 53, 'avg_line_length': 12.555555555555555, 'alnum_prop': 0.8230088495575221, 'repo_name': 'harpcio/zf2-demo', 'id': 'ac1863bc2fbfa9945402d108ae1713dc91b56a4c', 'size': '384', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'module/BusinessLogicLibrary/src/BusinessLogicLibrary/QueryFilter/Exception/QueryFilterException.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '724'}, {'name': 'CSS', 'bytes': '1087'}, {'name': 'HTML', 'bytes': '22208'}, {'name': 'PHP', 'bytes': '615491'}]}
GitHub
/* Generated by */ #include <winpr/assert.h> #include <freerdp/settings.h> #include <freerdp/log.h> #include "../core/settings.h" #define TAG FREERDP_TAG("common.settings") static BOOL update_string(char** current, const char* next, size_t next_len, BOOL cleanup) { if (cleanup) { if (*current) memset(*current, 0, strlen(*current)); free(*current); } if (!next && (next_len > 0)) { *current = calloc(next_len, 1); return (*current != NULL); } *current = (next ? strndup(next, next_len) : NULL); return !next || (*current != NULL); } BOOL freerdp_settings_get_bool(const rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { case FreeRDP_AllowCacheWaitingList: return settings->AllowCacheWaitingList; case FreeRDP_AllowDesktopComposition: return settings->AllowDesktopComposition; case FreeRDP_AllowFontSmoothing: return settings->AllowFontSmoothing; case FreeRDP_AllowUnanouncedOrdersFromServer: return settings->AllowUnanouncedOrdersFromServer; case FreeRDP_AltSecFrameMarkerSupport: return settings->AltSecFrameMarkerSupport; case FreeRDP_AsyncChannels: return settings->AsyncChannels; case FreeRDP_AsyncUpdate: return settings->AsyncUpdate; case FreeRDP_AudioCapture: return settings->AudioCapture; case FreeRDP_AudioPlayback: return settings->AudioPlayback; case FreeRDP_Authentication: return settings->Authentication; case FreeRDP_AuthenticationOnly: return settings->AuthenticationOnly; case FreeRDP_AutoAcceptCertificate: return settings->AutoAcceptCertificate; case FreeRDP_AutoDenyCertificate: return settings->AutoDenyCertificate; case FreeRDP_AutoLogonEnabled: return settings->AutoLogonEnabled; case FreeRDP_AutoReconnectionEnabled: return settings->AutoReconnectionEnabled; case FreeRDP_BitmapCacheEnabled: return settings->BitmapCacheEnabled; case FreeRDP_BitmapCachePersistEnabled: return settings->BitmapCachePersistEnabled; case FreeRDP_BitmapCacheV3Enabled: return settings->BitmapCacheV3Enabled; case FreeRDP_BitmapCompressionDisabled: return settings->BitmapCompressionDisabled; case FreeRDP_CertificateCallbackPreferPEM: return settings->CertificateCallbackPreferPEM; case FreeRDP_CertificateUseKnownHosts: return settings->CertificateUseKnownHosts; case FreeRDP_ColorPointerFlag: return settings->ColorPointerFlag; case FreeRDP_CompressionEnabled: return settings->CompressionEnabled; case FreeRDP_ConsoleSession: return settings->ConsoleSession; case FreeRDP_CredentialsFromStdin: return settings->CredentialsFromStdin; case FreeRDP_DeactivateClientDecoding: return settings->DeactivateClientDecoding; case FreeRDP_Decorations: return settings->Decorations; case FreeRDP_DesktopResize: return settings->DesktopResize; case FreeRDP_DeviceRedirection: return settings->DeviceRedirection; case FreeRDP_DisableCredentialsDelegation: return settings->DisableCredentialsDelegation; case FreeRDP_DisableCtrlAltDel: return settings->DisableCtrlAltDel; case FreeRDP_DisableCursorBlinking: return settings->DisableCursorBlinking; case FreeRDP_DisableCursorShadow: return settings->DisableCursorShadow; case FreeRDP_DisableFullWindowDrag: return settings->DisableFullWindowDrag; case FreeRDP_DisableMenuAnims: return settings->DisableMenuAnims; case FreeRDP_DisableRemoteAppCapsCheck: return settings->DisableRemoteAppCapsCheck; case FreeRDP_DisableThemes: return settings->DisableThemes; case FreeRDP_DisableWallpaper: return settings->DisableWallpaper; case FreeRDP_DrawAllowColorSubsampling: return settings->DrawAllowColorSubsampling; case FreeRDP_DrawAllowDynamicColorFidelity: return settings->DrawAllowDynamicColorFidelity; case FreeRDP_DrawAllowSkipAlpha: return settings->DrawAllowSkipAlpha; case FreeRDP_DrawGdiPlusCacheEnabled: return settings->DrawGdiPlusCacheEnabled; case FreeRDP_DrawGdiPlusEnabled: return settings->DrawGdiPlusEnabled; case FreeRDP_DrawNineGridEnabled: return settings->DrawNineGridEnabled; case FreeRDP_DumpRemoteFx: return settings->DumpRemoteFx; case FreeRDP_DynamicDaylightTimeDisabled: return settings->DynamicDaylightTimeDisabled; case FreeRDP_DynamicResolutionUpdate: return settings->DynamicResolutionUpdate; case FreeRDP_EmbeddedWindow: return settings->EmbeddedWindow; case FreeRDP_EnableWindowsKey: return settings->EnableWindowsKey; case FreeRDP_EncomspVirtualChannel: return settings->EncomspVirtualChannel; case FreeRDP_ExtSecurity: return settings->ExtSecurity; case FreeRDP_ExternalCertificateManagement: return settings->ExternalCertificateManagement; case FreeRDP_FIPSMode: return settings->FIPSMode; case FreeRDP_FastPathInput: return settings->FastPathInput; case FreeRDP_FastPathOutput: return settings->FastPathOutput; case FreeRDP_ForceEncryptedCsPdu: return settings->ForceEncryptedCsPdu; case FreeRDP_ForceMultimon: return settings->ForceMultimon; case FreeRDP_FrameMarkerCommandEnabled: return settings->FrameMarkerCommandEnabled; case FreeRDP_Fullscreen: return settings->Fullscreen; case FreeRDP_GatewayBypassLocal: return settings->GatewayBypassLocal; case FreeRDP_GatewayEnabled: return settings->GatewayEnabled; case FreeRDP_GatewayHttpTransport: return settings->GatewayHttpTransport; case FreeRDP_GatewayHttpUseWebsockets: return settings->GatewayHttpUseWebsockets; case FreeRDP_GatewayRpcTransport: return settings->GatewayRpcTransport; case FreeRDP_GatewayUdpTransport: return settings->GatewayUdpTransport; case FreeRDP_GatewayUseSameCredentials: return settings->GatewayUseSameCredentials; case FreeRDP_GfxAVC444: return settings->GfxAVC444; case FreeRDP_GfxAVC444v2: return settings->GfxAVC444v2; case FreeRDP_GfxH264: return settings->GfxH264; case FreeRDP_GfxPlanar: return settings->GfxPlanar; case FreeRDP_GfxProgressive: return settings->GfxProgressive; case FreeRDP_GfxProgressiveV2: return settings->GfxProgressiveV2; case FreeRDP_GfxSendQoeAck: return settings->GfxSendQoeAck; case FreeRDP_GfxSmallCache: return settings->GfxSmallCache; case FreeRDP_GfxThinClient: return settings->GfxThinClient; case FreeRDP_GrabKeyboard: return settings->GrabKeyboard; case FreeRDP_GrabMouse: return settings->GrabMouse; case FreeRDP_HasExtendedMouseEvent: return settings->HasExtendedMouseEvent; case FreeRDP_HasHorizontalWheel: return settings->HasHorizontalWheel; case FreeRDP_HasMonitorAttributes: return settings->HasMonitorAttributes; case FreeRDP_HiDefRemoteApp: return settings->HiDefRemoteApp; case FreeRDP_IPv6Enabled: return settings->IPv6Enabled; case FreeRDP_IgnoreCertificate: return settings->IgnoreCertificate; case FreeRDP_JpegCodec: return settings->JpegCodec; case FreeRDP_ListMonitors: return settings->ListMonitors; case FreeRDP_LocalConnection: return settings->LocalConnection; case FreeRDP_LogonErrors: return settings->LogonErrors; case FreeRDP_LogonNotify: return settings->LogonNotify; case FreeRDP_LongCredentialsSupported: return settings->LongCredentialsSupported; case FreeRDP_LyncRdpMode: return settings->LyncRdpMode; case FreeRDP_MaximizeShell: return settings->MaximizeShell; case FreeRDP_MouseAttached: return settings->MouseAttached; case FreeRDP_MouseHasWheel: return settings->MouseHasWheel; case FreeRDP_MouseMotion: return settings->MouseMotion; case FreeRDP_MouseUseRelativeMove: return settings->MouseUseRelativeMove; case FreeRDP_MstscCookieMode: return settings->MstscCookieMode; case FreeRDP_MultiTouchGestures: return settings->MultiTouchGestures; case FreeRDP_MultiTouchInput: return settings->MultiTouchInput; case FreeRDP_NSCodec: return settings->NSCodec; case FreeRDP_NSCodecAllowDynamicColorFidelity: return settings->NSCodecAllowDynamicColorFidelity; case FreeRDP_NSCodecAllowSubsampling: return settings->NSCodecAllowSubsampling; case FreeRDP_NegotiateSecurityLayer: return settings->NegotiateSecurityLayer; case FreeRDP_NetworkAutoDetect: return settings->NetworkAutoDetect; case FreeRDP_NlaSecurity: return settings->NlaSecurity; case FreeRDP_NoBitmapCompressionHeader: return settings->NoBitmapCompressionHeader; case FreeRDP_OldLicenseBehaviour: return settings->OldLicenseBehaviour; case FreeRDP_PasswordIsSmartcardPin: return settings->PasswordIsSmartcardPin; case FreeRDP_PercentScreenUseHeight: return settings->PercentScreenUseHeight; case FreeRDP_PercentScreenUseWidth: return settings->PercentScreenUseWidth; case FreeRDP_PlayRemoteFx: return settings->PlayRemoteFx; case FreeRDP_PreferIPv6OverIPv4: return settings->PreferIPv6OverIPv4; case FreeRDP_PrintReconnectCookie: return settings->PrintReconnectCookie; case FreeRDP_PromptForCredentials: return settings->PromptForCredentials; case FreeRDP_RdpSecurity: return settings->RdpSecurity; case FreeRDP_RedirectClipboard: return settings->RedirectClipboard; case FreeRDP_RedirectDrives: return settings->RedirectDrives; case FreeRDP_RedirectHomeDrive: return settings->RedirectHomeDrive; case FreeRDP_RedirectParallelPorts: return settings->RedirectParallelPorts; case FreeRDP_RedirectPrinters: return settings->RedirectPrinters; case FreeRDP_RedirectSerialPorts: return settings->RedirectSerialPorts; case FreeRDP_RedirectSmartCards: return settings->RedirectSmartCards; case FreeRDP_RefreshRect: return settings->RefreshRect; case FreeRDP_RemdeskVirtualChannel: return settings->RemdeskVirtualChannel; case FreeRDP_RemoteAppLanguageBarSupported: return settings->RemoteAppLanguageBarSupported; case FreeRDP_RemoteApplicationMode: return settings->RemoteApplicationMode; case FreeRDP_RemoteAssistanceMode: return settings->RemoteAssistanceMode; case FreeRDP_RemoteAssistanceRequestControl: return settings->RemoteAssistanceRequestControl; case FreeRDP_RemoteConsoleAudio: return settings->RemoteConsoleAudio; case FreeRDP_RemoteFxCodec: return settings->RemoteFxCodec; case FreeRDP_RemoteFxImageCodec: return settings->RemoteFxImageCodec; case FreeRDP_RemoteFxOnly: return settings->RemoteFxOnly; case FreeRDP_RestrictedAdminModeRequired: return settings->RestrictedAdminModeRequired; case FreeRDP_SaltedChecksum: return settings->SaltedChecksum; case FreeRDP_SendPreconnectionPdu: return settings->SendPreconnectionPdu; case FreeRDP_ServerMode: return settings->ServerMode; case FreeRDP_SmartSizing: return settings->SmartSizing; case FreeRDP_SmartcardEmulation: return settings->SmartcardEmulation; case FreeRDP_SmartcardLogon: return settings->SmartcardLogon; case FreeRDP_SoftwareGdi: return settings->SoftwareGdi; case FreeRDP_SoundBeepsEnabled: return settings->SoundBeepsEnabled; case FreeRDP_SpanMonitors: return settings->SpanMonitors; case FreeRDP_SupportAsymetricKeys: return settings->SupportAsymetricKeys; case FreeRDP_SupportDisplayControl: return settings->SupportDisplayControl; case FreeRDP_SupportDynamicChannels: return settings->SupportDynamicChannels; case FreeRDP_SupportDynamicTimeZone: return settings->SupportDynamicTimeZone; case FreeRDP_SupportEchoChannel: return settings->SupportEchoChannel; case FreeRDP_SupportErrorInfoPdu: return settings->SupportErrorInfoPdu; case FreeRDP_SupportGeometryTracking: return settings->SupportGeometryTracking; case FreeRDP_SupportGraphicsPipeline: return settings->SupportGraphicsPipeline; case FreeRDP_SupportHeartbeatPdu: return settings->SupportHeartbeatPdu; case FreeRDP_SupportMonitorLayoutPdu: return settings->SupportMonitorLayoutPdu; case FreeRDP_SupportMultitransport: return settings->SupportMultitransport; case FreeRDP_SupportSSHAgentChannel: return settings->SupportSSHAgentChannel; case FreeRDP_SupportStatusInfoPdu: return settings->SupportStatusInfoPdu; case FreeRDP_SupportVideoOptimized: return settings->SupportVideoOptimized; case FreeRDP_SuppressOutput: return settings->SuppressOutput; case FreeRDP_SurfaceCommandsEnabled: return settings->SurfaceCommandsEnabled; case FreeRDP_SurfaceFrameMarkerEnabled: return settings->SurfaceFrameMarkerEnabled; case FreeRDP_SuspendInput: return settings->SuspendInput; case FreeRDP_TcpKeepAlive: return settings->TcpKeepAlive; case FreeRDP_TlsSecurity: return settings->TlsSecurity; case FreeRDP_ToggleFullscreen: return settings->ToggleFullscreen; case FreeRDP_TransportDump: return settings->TransportDump; case FreeRDP_TransportDumpReplay: return settings->TransportDumpReplay; case FreeRDP_UnicodeInput: return settings->UnicodeInput; case FreeRDP_UnmapButtons: return settings->UnmapButtons; case FreeRDP_UseMultimon: return settings->UseMultimon; case FreeRDP_UseRdpSecurityLayer: return settings->UseRdpSecurityLayer; case FreeRDP_UsingSavedCredentials: return settings->UsingSavedCredentials; case FreeRDP_VideoDisable: return settings->VideoDisable; case FreeRDP_VmConnectMode: return settings->VmConnectMode; case FreeRDP_WaitForOutputBufferFlush: return settings->WaitForOutputBufferFlush; case FreeRDP_Workarea: return settings->Workarea; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_bool(rdpSettings* settings, size_t id, BOOL val) { union { void* v; const void* cv; BOOL c; const BOOL cc; } cnv; WINPR_ASSERT(settings); cnv.c = val; switch (id) { case FreeRDP_AllowCacheWaitingList: settings->AllowCacheWaitingList = cnv.c; break; case FreeRDP_AllowDesktopComposition: settings->AllowDesktopComposition = cnv.c; break; case FreeRDP_AllowFontSmoothing: settings->AllowFontSmoothing = cnv.c; break; case FreeRDP_AllowUnanouncedOrdersFromServer: settings->AllowUnanouncedOrdersFromServer = cnv.c; break; case FreeRDP_AltSecFrameMarkerSupport: settings->AltSecFrameMarkerSupport = cnv.c; break; case FreeRDP_AsyncChannels: settings->AsyncChannels = cnv.c; break; case FreeRDP_AsyncUpdate: settings->AsyncUpdate = cnv.c; break; case FreeRDP_AudioCapture: settings->AudioCapture = cnv.c; break; case FreeRDP_AudioPlayback: settings->AudioPlayback = cnv.c; break; case FreeRDP_Authentication: settings->Authentication = cnv.c; break; case FreeRDP_AuthenticationOnly: settings->AuthenticationOnly = cnv.c; break; case FreeRDP_AutoAcceptCertificate: settings->AutoAcceptCertificate = cnv.c; break; case FreeRDP_AutoDenyCertificate: settings->AutoDenyCertificate = cnv.c; break; case FreeRDP_AutoLogonEnabled: settings->AutoLogonEnabled = cnv.c; break; case FreeRDP_AutoReconnectionEnabled: settings->AutoReconnectionEnabled = cnv.c; break; case FreeRDP_BitmapCacheEnabled: settings->BitmapCacheEnabled = cnv.c; break; case FreeRDP_BitmapCachePersistEnabled: settings->BitmapCachePersistEnabled = cnv.c; break; case FreeRDP_BitmapCacheV3Enabled: settings->BitmapCacheV3Enabled = cnv.c; break; case FreeRDP_BitmapCompressionDisabled: settings->BitmapCompressionDisabled = cnv.c; break; case FreeRDP_CertificateCallbackPreferPEM: settings->CertificateCallbackPreferPEM = cnv.c; break; case FreeRDP_CertificateUseKnownHosts: settings->CertificateUseKnownHosts = cnv.c; break; case FreeRDP_ColorPointerFlag: settings->ColorPointerFlag = cnv.c; break; case FreeRDP_CompressionEnabled: settings->CompressionEnabled = cnv.c; break; case FreeRDP_ConsoleSession: settings->ConsoleSession = cnv.c; break; case FreeRDP_CredentialsFromStdin: settings->CredentialsFromStdin = cnv.c; break; case FreeRDP_DeactivateClientDecoding: settings->DeactivateClientDecoding = cnv.c; break; case FreeRDP_Decorations: settings->Decorations = cnv.c; break; case FreeRDP_DesktopResize: settings->DesktopResize = cnv.c; break; case FreeRDP_DeviceRedirection: settings->DeviceRedirection = cnv.c; break; case FreeRDP_DisableCredentialsDelegation: settings->DisableCredentialsDelegation = cnv.c; break; case FreeRDP_DisableCtrlAltDel: settings->DisableCtrlAltDel = cnv.c; break; case FreeRDP_DisableCursorBlinking: settings->DisableCursorBlinking = cnv.c; break; case FreeRDP_DisableCursorShadow: settings->DisableCursorShadow = cnv.c; break; case FreeRDP_DisableFullWindowDrag: settings->DisableFullWindowDrag = cnv.c; break; case FreeRDP_DisableMenuAnims: settings->DisableMenuAnims = cnv.c; break; case FreeRDP_DisableRemoteAppCapsCheck: settings->DisableRemoteAppCapsCheck = cnv.c; break; case FreeRDP_DisableThemes: settings->DisableThemes = cnv.c; break; case FreeRDP_DisableWallpaper: settings->DisableWallpaper = cnv.c; break; case FreeRDP_DrawAllowColorSubsampling: settings->DrawAllowColorSubsampling = cnv.c; break; case FreeRDP_DrawAllowDynamicColorFidelity: settings->DrawAllowDynamicColorFidelity = cnv.c; break; case FreeRDP_DrawAllowSkipAlpha: settings->DrawAllowSkipAlpha = cnv.c; break; case FreeRDP_DrawGdiPlusCacheEnabled: settings->DrawGdiPlusCacheEnabled = cnv.c; break; case FreeRDP_DrawGdiPlusEnabled: settings->DrawGdiPlusEnabled = cnv.c; break; case FreeRDP_DrawNineGridEnabled: settings->DrawNineGridEnabled = cnv.c; break; case FreeRDP_DumpRemoteFx: settings->DumpRemoteFx = cnv.c; break; case FreeRDP_DynamicDaylightTimeDisabled: settings->DynamicDaylightTimeDisabled = cnv.c; break; case FreeRDP_DynamicResolutionUpdate: settings->DynamicResolutionUpdate = cnv.c; break; case FreeRDP_EmbeddedWindow: settings->EmbeddedWindow = cnv.c; break; case FreeRDP_EnableWindowsKey: settings->EnableWindowsKey = cnv.c; break; case FreeRDP_EncomspVirtualChannel: settings->EncomspVirtualChannel = cnv.c; break; case FreeRDP_ExtSecurity: settings->ExtSecurity = cnv.c; break; case FreeRDP_ExternalCertificateManagement: settings->ExternalCertificateManagement = cnv.c; break; case FreeRDP_FIPSMode: settings->FIPSMode = cnv.c; break; case FreeRDP_FastPathInput: settings->FastPathInput = cnv.c; break; case FreeRDP_FastPathOutput: settings->FastPathOutput = cnv.c; break; case FreeRDP_ForceEncryptedCsPdu: settings->ForceEncryptedCsPdu = cnv.c; break; case FreeRDP_ForceMultimon: settings->ForceMultimon = cnv.c; break; case FreeRDP_FrameMarkerCommandEnabled: settings->FrameMarkerCommandEnabled = cnv.c; break; case FreeRDP_Fullscreen: settings->Fullscreen = cnv.c; break; case FreeRDP_GatewayBypassLocal: settings->GatewayBypassLocal = cnv.c; break; case FreeRDP_GatewayEnabled: settings->GatewayEnabled = cnv.c; break; case FreeRDP_GatewayHttpTransport: settings->GatewayHttpTransport = cnv.c; break; case FreeRDP_GatewayHttpUseWebsockets: settings->GatewayHttpUseWebsockets = cnv.c; break; case FreeRDP_GatewayRpcTransport: settings->GatewayRpcTransport = cnv.c; break; case FreeRDP_GatewayUdpTransport: settings->GatewayUdpTransport = cnv.c; break; case FreeRDP_GatewayUseSameCredentials: settings->GatewayUseSameCredentials = cnv.c; break; case FreeRDP_GfxAVC444: settings->GfxAVC444 = cnv.c; break; case FreeRDP_GfxAVC444v2: settings->GfxAVC444v2 = cnv.c; break; case FreeRDP_GfxH264: settings->GfxH264 = cnv.c; break; case FreeRDP_GfxPlanar: settings->GfxPlanar = cnv.c; break; case FreeRDP_GfxProgressive: settings->GfxProgressive = cnv.c; break; case FreeRDP_GfxProgressiveV2: settings->GfxProgressiveV2 = cnv.c; break; case FreeRDP_GfxSendQoeAck: settings->GfxSendQoeAck = cnv.c; break; case FreeRDP_GfxSmallCache: settings->GfxSmallCache = cnv.c; break; case FreeRDP_GfxThinClient: settings->GfxThinClient = cnv.c; break; case FreeRDP_GrabKeyboard: settings->GrabKeyboard = cnv.c; break; case FreeRDP_GrabMouse: settings->GrabMouse = cnv.c; break; case FreeRDP_HasExtendedMouseEvent: settings->HasExtendedMouseEvent = cnv.c; break; case FreeRDP_HasHorizontalWheel: settings->HasHorizontalWheel = cnv.c; break; case FreeRDP_HasMonitorAttributes: settings->HasMonitorAttributes = cnv.c; break; case FreeRDP_HiDefRemoteApp: settings->HiDefRemoteApp = cnv.c; break; case FreeRDP_IPv6Enabled: settings->IPv6Enabled = cnv.c; break; case FreeRDP_IgnoreCertificate: settings->IgnoreCertificate = cnv.c; break; case FreeRDP_JpegCodec: settings->JpegCodec = cnv.c; break; case FreeRDP_ListMonitors: settings->ListMonitors = cnv.c; break; case FreeRDP_LocalConnection: settings->LocalConnection = cnv.c; break; case FreeRDP_LogonErrors: settings->LogonErrors = cnv.c; break; case FreeRDP_LogonNotify: settings->LogonNotify = cnv.c; break; case FreeRDP_LongCredentialsSupported: settings->LongCredentialsSupported = cnv.c; break; case FreeRDP_LyncRdpMode: settings->LyncRdpMode = cnv.c; break; case FreeRDP_MaximizeShell: settings->MaximizeShell = cnv.c; break; case FreeRDP_MouseAttached: settings->MouseAttached = cnv.c; break; case FreeRDP_MouseHasWheel: settings->MouseHasWheel = cnv.c; break; case FreeRDP_MouseMotion: settings->MouseMotion = cnv.c; break; case FreeRDP_MouseUseRelativeMove: settings->MouseUseRelativeMove = cnv.c; break; case FreeRDP_MstscCookieMode: settings->MstscCookieMode = cnv.c; break; case FreeRDP_MultiTouchGestures: settings->MultiTouchGestures = cnv.c; break; case FreeRDP_MultiTouchInput: settings->MultiTouchInput = cnv.c; break; case FreeRDP_NSCodec: settings->NSCodec = cnv.c; break; case FreeRDP_NSCodecAllowDynamicColorFidelity: settings->NSCodecAllowDynamicColorFidelity = cnv.c; break; case FreeRDP_NSCodecAllowSubsampling: settings->NSCodecAllowSubsampling = cnv.c; break; case FreeRDP_NegotiateSecurityLayer: settings->NegotiateSecurityLayer = cnv.c; break; case FreeRDP_NetworkAutoDetect: settings->NetworkAutoDetect = cnv.c; break; case FreeRDP_NlaSecurity: settings->NlaSecurity = cnv.c; break; case FreeRDP_NoBitmapCompressionHeader: settings->NoBitmapCompressionHeader = cnv.c; break; case FreeRDP_OldLicenseBehaviour: settings->OldLicenseBehaviour = cnv.c; break; case FreeRDP_PasswordIsSmartcardPin: settings->PasswordIsSmartcardPin = cnv.c; break; case FreeRDP_PercentScreenUseHeight: settings->PercentScreenUseHeight = cnv.c; break; case FreeRDP_PercentScreenUseWidth: settings->PercentScreenUseWidth = cnv.c; break; case FreeRDP_PlayRemoteFx: settings->PlayRemoteFx = cnv.c; break; case FreeRDP_PreferIPv6OverIPv4: settings->PreferIPv6OverIPv4 = cnv.c; break; case FreeRDP_PrintReconnectCookie: settings->PrintReconnectCookie = cnv.c; break; case FreeRDP_PromptForCredentials: settings->PromptForCredentials = cnv.c; break; case FreeRDP_RdpSecurity: settings->RdpSecurity = cnv.c; break; case FreeRDP_RedirectClipboard: settings->RedirectClipboard = cnv.c; break; case FreeRDP_RedirectDrives: settings->RedirectDrives = cnv.c; break; case FreeRDP_RedirectHomeDrive: settings->RedirectHomeDrive = cnv.c; break; case FreeRDP_RedirectParallelPorts: settings->RedirectParallelPorts = cnv.c; break; case FreeRDP_RedirectPrinters: settings->RedirectPrinters = cnv.c; break; case FreeRDP_RedirectSerialPorts: settings->RedirectSerialPorts = cnv.c; break; case FreeRDP_RedirectSmartCards: settings->RedirectSmartCards = cnv.c; break; case FreeRDP_RefreshRect: settings->RefreshRect = cnv.c; break; case FreeRDP_RemdeskVirtualChannel: settings->RemdeskVirtualChannel = cnv.c; break; case FreeRDP_RemoteAppLanguageBarSupported: settings->RemoteAppLanguageBarSupported = cnv.c; break; case FreeRDP_RemoteApplicationMode: settings->RemoteApplicationMode = cnv.c; break; case FreeRDP_RemoteAssistanceMode: settings->RemoteAssistanceMode = cnv.c; break; case FreeRDP_RemoteAssistanceRequestControl: settings->RemoteAssistanceRequestControl = cnv.c; break; case FreeRDP_RemoteConsoleAudio: settings->RemoteConsoleAudio = cnv.c; break; case FreeRDP_RemoteFxCodec: settings->RemoteFxCodec = cnv.c; break; case FreeRDP_RemoteFxImageCodec: settings->RemoteFxImageCodec = cnv.c; break; case FreeRDP_RemoteFxOnly: settings->RemoteFxOnly = cnv.c; break; case FreeRDP_RestrictedAdminModeRequired: settings->RestrictedAdminModeRequired = cnv.c; break; case FreeRDP_SaltedChecksum: settings->SaltedChecksum = cnv.c; break; case FreeRDP_SendPreconnectionPdu: settings->SendPreconnectionPdu = cnv.c; break; case FreeRDP_ServerMode: settings->ServerMode = cnv.c; break; case FreeRDP_SmartSizing: settings->SmartSizing = cnv.c; break; case FreeRDP_SmartcardEmulation: settings->SmartcardEmulation = cnv.c; break; case FreeRDP_SmartcardLogon: settings->SmartcardLogon = cnv.c; break; case FreeRDP_SoftwareGdi: settings->SoftwareGdi = cnv.c; break; case FreeRDP_SoundBeepsEnabled: settings->SoundBeepsEnabled = cnv.c; break; case FreeRDP_SpanMonitors: settings->SpanMonitors = cnv.c; break; case FreeRDP_SupportAsymetricKeys: settings->SupportAsymetricKeys = cnv.c; break; case FreeRDP_SupportDisplayControl: settings->SupportDisplayControl = cnv.c; break; case FreeRDP_SupportDynamicChannels: settings->SupportDynamicChannels = cnv.c; break; case FreeRDP_SupportDynamicTimeZone: settings->SupportDynamicTimeZone = cnv.c; break; case FreeRDP_SupportEchoChannel: settings->SupportEchoChannel = cnv.c; break; case FreeRDP_SupportErrorInfoPdu: settings->SupportErrorInfoPdu = cnv.c; break; case FreeRDP_SupportGeometryTracking: settings->SupportGeometryTracking = cnv.c; break; case FreeRDP_SupportGraphicsPipeline: settings->SupportGraphicsPipeline = cnv.c; break; case FreeRDP_SupportHeartbeatPdu: settings->SupportHeartbeatPdu = cnv.c; break; case FreeRDP_SupportMonitorLayoutPdu: settings->SupportMonitorLayoutPdu = cnv.c; break; case FreeRDP_SupportMultitransport: settings->SupportMultitransport = cnv.c; break; case FreeRDP_SupportSSHAgentChannel: settings->SupportSSHAgentChannel = cnv.c; break; case FreeRDP_SupportStatusInfoPdu: settings->SupportStatusInfoPdu = cnv.c; break; case FreeRDP_SupportVideoOptimized: settings->SupportVideoOptimized = cnv.c; break; case FreeRDP_SuppressOutput: settings->SuppressOutput = cnv.c; break; case FreeRDP_SurfaceCommandsEnabled: settings->SurfaceCommandsEnabled = cnv.c; break; case FreeRDP_SurfaceFrameMarkerEnabled: settings->SurfaceFrameMarkerEnabled = cnv.c; break; case FreeRDP_SuspendInput: settings->SuspendInput = cnv.c; break; case FreeRDP_TcpKeepAlive: settings->TcpKeepAlive = cnv.c; break; case FreeRDP_TlsSecurity: settings->TlsSecurity = cnv.c; break; case FreeRDP_ToggleFullscreen: settings->ToggleFullscreen = cnv.c; break; case FreeRDP_TransportDump: settings->TransportDump = cnv.c; break; case FreeRDP_TransportDumpReplay: settings->TransportDumpReplay = cnv.c; break; case FreeRDP_UnicodeInput: settings->UnicodeInput = cnv.c; break; case FreeRDP_UnmapButtons: settings->UnmapButtons = cnv.c; break; case FreeRDP_UseMultimon: settings->UseMultimon = cnv.c; break; case FreeRDP_UseRdpSecurityLayer: settings->UseRdpSecurityLayer = cnv.c; break; case FreeRDP_UsingSavedCredentials: settings->UsingSavedCredentials = cnv.c; break; case FreeRDP_VideoDisable: settings->VideoDisable = cnv.c; break; case FreeRDP_VmConnectMode: settings->VmConnectMode = cnv.c; break; case FreeRDP_WaitForOutputBufferFlush: settings->WaitForOutputBufferFlush = cnv.c; break; case FreeRDP_Workarea: settings->Workarea = cnv.c; break; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; } UINT16 freerdp_settings_get_uint16(const rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { case FreeRDP_DesktopOrientation: return settings->DesktopOrientation; case FreeRDP_ProxyPort: return settings->ProxyPort; case FreeRDP_TLSMaxVersion: return settings->TLSMaxVersion; case FreeRDP_TLSMinVersion: return settings->TLSMinVersion; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_uint16(rdpSettings* settings, size_t id, UINT16 val) { union { void* v; const void* cv; UINT16 c; const UINT16 cc; } cnv; WINPR_ASSERT(settings); cnv.c = val; switch (id) { case FreeRDP_DesktopOrientation: settings->DesktopOrientation = cnv.c; break; case FreeRDP_ProxyPort: settings->ProxyPort = cnv.c; break; case FreeRDP_TLSMaxVersion: settings->TLSMaxVersion = cnv.c; break; case FreeRDP_TLSMinVersion: settings->TLSMinVersion = cnv.c; break; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; } INT16 freerdp_settings_get_int16(const rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_int16(rdpSettings* settings, size_t id, INT16 val) { union { void* v; const void* cv; INT16 c; const INT16 cc; } cnv; WINPR_ASSERT(settings); cnv.c = val; switch (id) { default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; } UINT32 freerdp_settings_get_uint32(const rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { case FreeRDP_AcceptedCertLength: return settings->AcceptedCertLength; case FreeRDP_AuthenticationLevel: return settings->AuthenticationLevel; case FreeRDP_AutoReconnectMaxRetries: return settings->AutoReconnectMaxRetries; case FreeRDP_BitmapCacheV2NumCells: return settings->BitmapCacheV2NumCells; case FreeRDP_BitmapCacheV3CodecId: return settings->BitmapCacheV3CodecId; case FreeRDP_BitmapCacheVersion: return settings->BitmapCacheVersion; case FreeRDP_BrushSupportLevel: return settings->BrushSupportLevel; case FreeRDP_ChannelCount: return settings->ChannelCount; case FreeRDP_ChannelDefArraySize: return settings->ChannelDefArraySize; case FreeRDP_ClientBuild: return settings->ClientBuild; case FreeRDP_ClientRandomLength: return settings->ClientRandomLength; case FreeRDP_ClientSessionId: return settings->ClientSessionId; case FreeRDP_ClusterInfoFlags: return settings->ClusterInfoFlags; case FreeRDP_ColorDepth: return settings->ColorDepth; case FreeRDP_CompDeskSupportLevel: return settings->CompDeskSupportLevel; case FreeRDP_CompressionLevel: return settings->CompressionLevel; case FreeRDP_ConnectionType: return settings->ConnectionType; case FreeRDP_CookieMaxLength: return settings->CookieMaxLength; case FreeRDP_DesktopHeight: return settings->DesktopHeight; case FreeRDP_DesktopPhysicalHeight: return settings->DesktopPhysicalHeight; case FreeRDP_DesktopPhysicalWidth: return settings->DesktopPhysicalWidth; case FreeRDP_DesktopPosX: return settings->DesktopPosX; case FreeRDP_DesktopPosY: return settings->DesktopPosY; case FreeRDP_DesktopScaleFactor: return settings->DesktopScaleFactor; case FreeRDP_DesktopWidth: return settings->DesktopWidth; case FreeRDP_DeviceArraySize: return settings->DeviceArraySize; case FreeRDP_DeviceCount: return settings->DeviceCount; case FreeRDP_DeviceScaleFactor: return settings->DeviceScaleFactor; case FreeRDP_DrawNineGridCacheEntries: return settings->DrawNineGridCacheEntries; case FreeRDP_DrawNineGridCacheSize: return settings->DrawNineGridCacheSize; case FreeRDP_DynamicChannelArraySize: return settings->DynamicChannelArraySize; case FreeRDP_DynamicChannelCount: return settings->DynamicChannelCount; case FreeRDP_EarlyCapabilityFlags: return settings->EarlyCapabilityFlags; case FreeRDP_EncryptionLevel: return settings->EncryptionLevel; case FreeRDP_EncryptionMethods: return settings->EncryptionMethods; case FreeRDP_ExtEncryptionMethods: return settings->ExtEncryptionMethods; case FreeRDP_Floatbar: return settings->Floatbar; case FreeRDP_FrameAcknowledge: return settings->FrameAcknowledge; case FreeRDP_GatewayAcceptedCertLength: return settings->GatewayAcceptedCertLength; case FreeRDP_GatewayCredentialsSource: return settings->GatewayCredentialsSource; case FreeRDP_GatewayPort: return settings->GatewayPort; case FreeRDP_GatewayUsageMethod: return settings->GatewayUsageMethod; case FreeRDP_GfxCapsFilter: return settings->GfxCapsFilter; case FreeRDP_GlyphSupportLevel: return settings->GlyphSupportLevel; case FreeRDP_JpegCodecId: return settings->JpegCodecId; case FreeRDP_JpegQuality: return settings->JpegQuality; case FreeRDP_KeySpec: return settings->KeySpec; case FreeRDP_KeyboardCodePage: return settings->KeyboardCodePage; case FreeRDP_KeyboardFunctionKey: return settings->KeyboardFunctionKey; case FreeRDP_KeyboardHook: return settings->KeyboardHook; case FreeRDP_KeyboardLayout: return settings->KeyboardLayout; case FreeRDP_KeyboardSubType: return settings->KeyboardSubType; case FreeRDP_KeyboardType: return settings->KeyboardType; case FreeRDP_LargePointerFlag: return settings->LargePointerFlag; case FreeRDP_LoadBalanceInfoLength: return settings->LoadBalanceInfoLength; case FreeRDP_MaxTimeInCheckLoop: return settings->MaxTimeInCheckLoop; case FreeRDP_MonitorAttributeFlags: return settings->MonitorAttributeFlags; case FreeRDP_MonitorCount: return settings->MonitorCount; case FreeRDP_MonitorDefArraySize: return settings->MonitorDefArraySize; case FreeRDP_MonitorFlags: return settings->MonitorFlags; case FreeRDP_MonitorLocalShiftX: return settings->MonitorLocalShiftX; case FreeRDP_MonitorLocalShiftY: return settings->MonitorLocalShiftY; case FreeRDP_MultifragMaxRequestSize: return settings->MultifragMaxRequestSize; case FreeRDP_MultitransportFlags: return settings->MultitransportFlags; case FreeRDP_NSCodecColorLossLevel: return settings->NSCodecColorLossLevel; case FreeRDP_NSCodecId: return settings->NSCodecId; case FreeRDP_NegotiationFlags: return settings->NegotiationFlags; case FreeRDP_NumMonitorIds: return settings->NumMonitorIds; case FreeRDP_OffscreenCacheEntries: return settings->OffscreenCacheEntries; case FreeRDP_OffscreenCacheSize: return settings->OffscreenCacheSize; case FreeRDP_OffscreenSupportLevel: return settings->OffscreenSupportLevel; case FreeRDP_OsMajorType: return settings->OsMajorType; case FreeRDP_OsMinorType: return settings->OsMinorType; case FreeRDP_Password51Length: return settings->Password51Length; case FreeRDP_PduSource: return settings->PduSource; case FreeRDP_PercentScreen: return settings->PercentScreen; case FreeRDP_PerformanceFlags: return settings->PerformanceFlags; case FreeRDP_PointerCacheSize: return settings->PointerCacheSize; case FreeRDP_PreconnectionId: return settings->PreconnectionId; case FreeRDP_ProxyType: return settings->ProxyType; case FreeRDP_RdpVersion: return settings->RdpVersion; case FreeRDP_ReceivedCapabilitiesSize: return settings->ReceivedCapabilitiesSize; case FreeRDP_RedirectedSessionId: return settings->RedirectedSessionId; case FreeRDP_RedirectionAcceptedCertLength: return settings->RedirectionAcceptedCertLength; case FreeRDP_RedirectionFlags: return settings->RedirectionFlags; case FreeRDP_RedirectionPasswordLength: return settings->RedirectionPasswordLength; case FreeRDP_RedirectionPreferType: return settings->RedirectionPreferType; case FreeRDP_RedirectionTsvUrlLength: return settings->RedirectionTsvUrlLength; case FreeRDP_RemoteAppNumIconCacheEntries: return settings->RemoteAppNumIconCacheEntries; case FreeRDP_RemoteAppNumIconCaches: return settings->RemoteAppNumIconCaches; case FreeRDP_RemoteApplicationExpandCmdLine: return settings->RemoteApplicationExpandCmdLine; case FreeRDP_RemoteApplicationExpandWorkingDir: return settings->RemoteApplicationExpandWorkingDir; case FreeRDP_RemoteApplicationSupportLevel: return settings->RemoteApplicationSupportLevel; case FreeRDP_RemoteApplicationSupportMask: return settings->RemoteApplicationSupportMask; case FreeRDP_RemoteFxCaptureFlags: return settings->RemoteFxCaptureFlags; case FreeRDP_RemoteFxCodecId: return settings->RemoteFxCodecId; case FreeRDP_RemoteFxCodecMode: return settings->RemoteFxCodecMode; case FreeRDP_RemoteWndSupportLevel: return settings->RemoteWndSupportLevel; case FreeRDP_RequestedProtocols: return settings->RequestedProtocols; case FreeRDP_SelectedProtocol: return settings->SelectedProtocol; case FreeRDP_ServerCertificateLength: return settings->ServerCertificateLength; case FreeRDP_ServerPort: return settings->ServerPort; case FreeRDP_ServerRandomLength: return settings->ServerRandomLength; case FreeRDP_ShareId: return settings->ShareId; case FreeRDP_SmartSizingHeight: return settings->SmartSizingHeight; case FreeRDP_SmartSizingWidth: return settings->SmartSizingWidth; case FreeRDP_StaticChannelArraySize: return settings->StaticChannelArraySize; case FreeRDP_StaticChannelCount: return settings->StaticChannelCount; case FreeRDP_TargetNetAddressCount: return settings->TargetNetAddressCount; case FreeRDP_TcpAckTimeout: return settings->TcpAckTimeout; case FreeRDP_TcpConnectTimeout: return settings->TcpConnectTimeout; case FreeRDP_TcpKeepAliveDelay: return settings->TcpKeepAliveDelay; case FreeRDP_TcpKeepAliveInterval: return settings->TcpKeepAliveInterval; case FreeRDP_TcpKeepAliveRetries: return settings->TcpKeepAliveRetries; case FreeRDP_ThreadingFlags: return settings->ThreadingFlags; case FreeRDP_TlsSecLevel: return settings->TlsSecLevel; case FreeRDP_VirtualChannelChunkSize: return settings->VirtualChannelChunkSize; case FreeRDP_VirtualChannelCompressionFlags: return settings->VirtualChannelCompressionFlags; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_uint32(rdpSettings* settings, size_t id, UINT32 val) { union { void* v; const void* cv; UINT32 c; const UINT32 cc; } cnv; WINPR_ASSERT(settings); cnv.c = val; switch (id) { case FreeRDP_AcceptedCertLength: settings->AcceptedCertLength = cnv.c; break; case FreeRDP_AuthenticationLevel: settings->AuthenticationLevel = cnv.c; break; case FreeRDP_AutoReconnectMaxRetries: settings->AutoReconnectMaxRetries = cnv.c; break; case FreeRDP_BitmapCacheV2NumCells: settings->BitmapCacheV2NumCells = cnv.c; break; case FreeRDP_BitmapCacheV3CodecId: settings->BitmapCacheV3CodecId = cnv.c; break; case FreeRDP_BitmapCacheVersion: settings->BitmapCacheVersion = cnv.c; break; case FreeRDP_BrushSupportLevel: settings->BrushSupportLevel = cnv.c; break; case FreeRDP_ChannelCount: settings->ChannelCount = cnv.c; break; case FreeRDP_ChannelDefArraySize: settings->ChannelDefArraySize = cnv.c; break; case FreeRDP_ClientBuild: settings->ClientBuild = cnv.c; break; case FreeRDP_ClientRandomLength: settings->ClientRandomLength = cnv.c; break; case FreeRDP_ClientSessionId: settings->ClientSessionId = cnv.c; break; case FreeRDP_ClusterInfoFlags: settings->ClusterInfoFlags = cnv.c; break; case FreeRDP_ColorDepth: settings->ColorDepth = cnv.c; break; case FreeRDP_CompDeskSupportLevel: settings->CompDeskSupportLevel = cnv.c; break; case FreeRDP_CompressionLevel: settings->CompressionLevel = cnv.c; break; case FreeRDP_ConnectionType: settings->ConnectionType = cnv.c; break; case FreeRDP_CookieMaxLength: settings->CookieMaxLength = cnv.c; break; case FreeRDP_DesktopHeight: settings->DesktopHeight = cnv.c; break; case FreeRDP_DesktopPhysicalHeight: settings->DesktopPhysicalHeight = cnv.c; break; case FreeRDP_DesktopPhysicalWidth: settings->DesktopPhysicalWidth = cnv.c; break; case FreeRDP_DesktopPosX: settings->DesktopPosX = cnv.c; break; case FreeRDP_DesktopPosY: settings->DesktopPosY = cnv.c; break; case FreeRDP_DesktopScaleFactor: settings->DesktopScaleFactor = cnv.c; break; case FreeRDP_DesktopWidth: settings->DesktopWidth = cnv.c; break; case FreeRDP_DeviceArraySize: settings->DeviceArraySize = cnv.c; break; case FreeRDP_DeviceCount: settings->DeviceCount = cnv.c; break; case FreeRDP_DeviceScaleFactor: settings->DeviceScaleFactor = cnv.c; break; case FreeRDP_DrawNineGridCacheEntries: settings->DrawNineGridCacheEntries = cnv.c; break; case FreeRDP_DrawNineGridCacheSize: settings->DrawNineGridCacheSize = cnv.c; break; case FreeRDP_DynamicChannelArraySize: settings->DynamicChannelArraySize = cnv.c; break; case FreeRDP_DynamicChannelCount: settings->DynamicChannelCount = cnv.c; break; case FreeRDP_EarlyCapabilityFlags: settings->EarlyCapabilityFlags = cnv.c; break; case FreeRDP_EncryptionLevel: settings->EncryptionLevel = cnv.c; break; case FreeRDP_EncryptionMethods: settings->EncryptionMethods = cnv.c; break; case FreeRDP_ExtEncryptionMethods: settings->ExtEncryptionMethods = cnv.c; break; case FreeRDP_Floatbar: settings->Floatbar = cnv.c; break; case FreeRDP_FrameAcknowledge: settings->FrameAcknowledge = cnv.c; break; case FreeRDP_GatewayAcceptedCertLength: settings->GatewayAcceptedCertLength = cnv.c; break; case FreeRDP_GatewayCredentialsSource: settings->GatewayCredentialsSource = cnv.c; break; case FreeRDP_GatewayPort: settings->GatewayPort = cnv.c; break; case FreeRDP_GatewayUsageMethod: settings->GatewayUsageMethod = cnv.c; break; case FreeRDP_GfxCapsFilter: settings->GfxCapsFilter = cnv.c; break; case FreeRDP_GlyphSupportLevel: settings->GlyphSupportLevel = cnv.c; break; case FreeRDP_JpegCodecId: settings->JpegCodecId = cnv.c; break; case FreeRDP_JpegQuality: settings->JpegQuality = cnv.c; break; case FreeRDP_KeySpec: settings->KeySpec = cnv.c; break; case FreeRDP_KeyboardCodePage: settings->KeyboardCodePage = cnv.c; break; case FreeRDP_KeyboardFunctionKey: settings->KeyboardFunctionKey = cnv.c; break; case FreeRDP_KeyboardHook: settings->KeyboardHook = cnv.c; break; case FreeRDP_KeyboardLayout: settings->KeyboardLayout = cnv.c; break; case FreeRDP_KeyboardSubType: settings->KeyboardSubType = cnv.c; break; case FreeRDP_KeyboardType: settings->KeyboardType = cnv.c; break; case FreeRDP_LargePointerFlag: settings->LargePointerFlag = cnv.c; break; case FreeRDP_LoadBalanceInfoLength: settings->LoadBalanceInfoLength = cnv.c; break; case FreeRDP_MaxTimeInCheckLoop: settings->MaxTimeInCheckLoop = cnv.c; break; case FreeRDP_MonitorAttributeFlags: settings->MonitorAttributeFlags = cnv.c; break; case FreeRDP_MonitorCount: settings->MonitorCount = cnv.c; break; case FreeRDP_MonitorDefArraySize: settings->MonitorDefArraySize = cnv.c; break; case FreeRDP_MonitorFlags: settings->MonitorFlags = cnv.c; break; case FreeRDP_MonitorLocalShiftX: settings->MonitorLocalShiftX = cnv.c; break; case FreeRDP_MonitorLocalShiftY: settings->MonitorLocalShiftY = cnv.c; break; case FreeRDP_MultifragMaxRequestSize: settings->MultifragMaxRequestSize = cnv.c; break; case FreeRDP_MultitransportFlags: settings->MultitransportFlags = cnv.c; break; case FreeRDP_NSCodecColorLossLevel: settings->NSCodecColorLossLevel = cnv.c; break; case FreeRDP_NSCodecId: settings->NSCodecId = cnv.c; break; case FreeRDP_NegotiationFlags: settings->NegotiationFlags = cnv.c; break; case FreeRDP_NumMonitorIds: settings->NumMonitorIds = cnv.c; break; case FreeRDP_OffscreenCacheEntries: settings->OffscreenCacheEntries = cnv.c; break; case FreeRDP_OffscreenCacheSize: settings->OffscreenCacheSize = cnv.c; break; case FreeRDP_OffscreenSupportLevel: settings->OffscreenSupportLevel = cnv.c; break; case FreeRDP_OsMajorType: settings->OsMajorType = cnv.c; break; case FreeRDP_OsMinorType: settings->OsMinorType = cnv.c; break; case FreeRDP_Password51Length: settings->Password51Length = cnv.c; break; case FreeRDP_PduSource: settings->PduSource = cnv.c; break; case FreeRDP_PercentScreen: settings->PercentScreen = cnv.c; break; case FreeRDP_PerformanceFlags: settings->PerformanceFlags = cnv.c; break; case FreeRDP_PointerCacheSize: settings->PointerCacheSize = cnv.c; break; case FreeRDP_PreconnectionId: settings->PreconnectionId = cnv.c; break; case FreeRDP_ProxyType: settings->ProxyType = cnv.c; break; case FreeRDP_RdpVersion: settings->RdpVersion = cnv.c; break; case FreeRDP_ReceivedCapabilitiesSize: settings->ReceivedCapabilitiesSize = cnv.c; break; case FreeRDP_RedirectedSessionId: settings->RedirectedSessionId = cnv.c; break; case FreeRDP_RedirectionAcceptedCertLength: settings->RedirectionAcceptedCertLength = cnv.c; break; case FreeRDP_RedirectionFlags: settings->RedirectionFlags = cnv.c; break; case FreeRDP_RedirectionPasswordLength: settings->RedirectionPasswordLength = cnv.c; break; case FreeRDP_RedirectionPreferType: settings->RedirectionPreferType = cnv.c; break; case FreeRDP_RedirectionTsvUrlLength: settings->RedirectionTsvUrlLength = cnv.c; break; case FreeRDP_RemoteAppNumIconCacheEntries: settings->RemoteAppNumIconCacheEntries = cnv.c; break; case FreeRDP_RemoteAppNumIconCaches: settings->RemoteAppNumIconCaches = cnv.c; break; case FreeRDP_RemoteApplicationExpandCmdLine: settings->RemoteApplicationExpandCmdLine = cnv.c; break; case FreeRDP_RemoteApplicationExpandWorkingDir: settings->RemoteApplicationExpandWorkingDir = cnv.c; break; case FreeRDP_RemoteApplicationSupportLevel: settings->RemoteApplicationSupportLevel = cnv.c; break; case FreeRDP_RemoteApplicationSupportMask: settings->RemoteApplicationSupportMask = cnv.c; break; case FreeRDP_RemoteFxCaptureFlags: settings->RemoteFxCaptureFlags = cnv.c; break; case FreeRDP_RemoteFxCodecId: settings->RemoteFxCodecId = cnv.c; break; case FreeRDP_RemoteFxCodecMode: settings->RemoteFxCodecMode = cnv.c; break; case FreeRDP_RemoteWndSupportLevel: settings->RemoteWndSupportLevel = cnv.c; break; case FreeRDP_RequestedProtocols: settings->RequestedProtocols = cnv.c; break; case FreeRDP_SelectedProtocol: settings->SelectedProtocol = cnv.c; break; case FreeRDP_ServerCertificateLength: settings->ServerCertificateLength = cnv.c; break; case FreeRDP_ServerPort: settings->ServerPort = cnv.c; break; case FreeRDP_ServerRandomLength: settings->ServerRandomLength = cnv.c; break; case FreeRDP_ShareId: settings->ShareId = cnv.c; break; case FreeRDP_SmartSizingHeight: settings->SmartSizingHeight = cnv.c; break; case FreeRDP_SmartSizingWidth: settings->SmartSizingWidth = cnv.c; break; case FreeRDP_StaticChannelArraySize: settings->StaticChannelArraySize = cnv.c; break; case FreeRDP_StaticChannelCount: settings->StaticChannelCount = cnv.c; break; case FreeRDP_TargetNetAddressCount: settings->TargetNetAddressCount = cnv.c; break; case FreeRDP_TcpAckTimeout: settings->TcpAckTimeout = cnv.c; break; case FreeRDP_TcpConnectTimeout: settings->TcpConnectTimeout = cnv.c; break; case FreeRDP_TcpKeepAliveDelay: settings->TcpKeepAliveDelay = cnv.c; break; case FreeRDP_TcpKeepAliveInterval: settings->TcpKeepAliveInterval = cnv.c; break; case FreeRDP_TcpKeepAliveRetries: settings->TcpKeepAliveRetries = cnv.c; break; case FreeRDP_ThreadingFlags: settings->ThreadingFlags = cnv.c; break; case FreeRDP_TlsSecLevel: settings->TlsSecLevel = cnv.c; break; case FreeRDP_VirtualChannelChunkSize: settings->VirtualChannelChunkSize = cnv.c; break; case FreeRDP_VirtualChannelCompressionFlags: settings->VirtualChannelCompressionFlags = cnv.c; break; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; } INT32 freerdp_settings_get_int32(const rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { case FreeRDP_XPan: return settings->XPan; case FreeRDP_YPan: return settings->YPan; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_int32(rdpSettings* settings, size_t id, INT32 val) { union { void* v; const void* cv; INT32 c; const INT32 cc; } cnv; WINPR_ASSERT(settings); cnv.c = val; switch (id) { case FreeRDP_XPan: settings->XPan = cnv.c; break; case FreeRDP_YPan: settings->YPan = cnv.c; break; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; } UINT64 freerdp_settings_get_uint64(const rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { case FreeRDP_ParentWindowId: return settings->ParentWindowId; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_uint64(rdpSettings* settings, size_t id, UINT64 val) { union { void* v; const void* cv; UINT64 c; const UINT64 cc; } cnv; WINPR_ASSERT(settings); cnv.c = val; switch (id) { case FreeRDP_ParentWindowId: settings->ParentWindowId = cnv.c; break; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; } INT64 freerdp_settings_get_int64(const rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_int64(rdpSettings* settings, size_t id, INT64 val) { union { void* v; const void* cv; INT64 c; const INT64 cc; } cnv; WINPR_ASSERT(settings); cnv.c = val; switch (id) { default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; } const char* freerdp_settings_get_string(const rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { case FreeRDP_AcceptedCert: return settings->AcceptedCert; case FreeRDP_ActionScript: return settings->ActionScript; case FreeRDP_AllowedTlsCiphers: return settings->AllowedTlsCiphers; case FreeRDP_AlternateShell: return settings->AlternateShell; case FreeRDP_AssistanceFile: return settings->AssistanceFile; case FreeRDP_AuthenticationPackageList: return settings->AuthenticationPackageList; case FreeRDP_AuthenticationServiceClass: return settings->AuthenticationServiceClass; case FreeRDP_BitmapCachePersistFile: return settings->BitmapCachePersistFile; case FreeRDP_CardName: return settings->CardName; case FreeRDP_CertificateAcceptedFingerprints: return settings->CertificateAcceptedFingerprints; case FreeRDP_CertificateContent: return settings->CertificateContent; case FreeRDP_CertificateFile: return settings->CertificateFile; case FreeRDP_CertificateName: return settings->CertificateName; case FreeRDP_ClientAddress: return settings->ClientAddress; case FreeRDP_ClientDir: return settings->ClientDir; case FreeRDP_ClientHostname: return settings->ClientHostname; case FreeRDP_ClientProductId: return settings->ClientProductId; case FreeRDP_ComputerName: return settings->ComputerName; case FreeRDP_ConfigPath: return settings->ConfigPath; case FreeRDP_ConnectionFile: return settings->ConnectionFile; case FreeRDP_ContainerName: return settings->ContainerName; case FreeRDP_CspName: return settings->CspName; case FreeRDP_CurrentPath: return settings->CurrentPath; case FreeRDP_Domain: return settings->Domain; case FreeRDP_DrivesToRedirect: return settings->DrivesToRedirect; case FreeRDP_DumpRemoteFxFile: return settings->DumpRemoteFxFile; case FreeRDP_DynamicDSTTimeZoneKeyName: return settings->DynamicDSTTimeZoneKeyName; case FreeRDP_GatewayAcceptedCert: return settings->GatewayAcceptedCert; case FreeRDP_GatewayAccessToken: return settings->GatewayAccessToken; case FreeRDP_GatewayDomain: return settings->GatewayDomain; case FreeRDP_GatewayHostname: return settings->GatewayHostname; case FreeRDP_GatewayPassword: return settings->GatewayPassword; case FreeRDP_GatewayUsername: return settings->GatewayUsername; case FreeRDP_HomePath: return settings->HomePath; case FreeRDP_ImeFileName: return settings->ImeFileName; case FreeRDP_KerberosArmor: return settings->KerberosArmor; case FreeRDP_KerberosCache: return settings->KerberosCache; case FreeRDP_KerberosKdcUrl: return settings->KerberosKdcUrl; case FreeRDP_KerberosKeytab: return settings->KerberosKeytab; case FreeRDP_KerberosLifeTime: return settings->KerberosLifeTime; case FreeRDP_KerberosRealm: return settings->KerberosRealm; case FreeRDP_KerberosRenewableLifeTime: return settings->KerberosRenewableLifeTime; case FreeRDP_KerberosStartTime: return settings->KerberosStartTime; case FreeRDP_KeyboardRemappingList: return settings->KeyboardRemappingList; case FreeRDP_NtlmSamFile: return settings->NtlmSamFile; case FreeRDP_Password: return settings->Password; case FreeRDP_PasswordHash: return settings->PasswordHash; case FreeRDP_Pkcs11Module: return settings->Pkcs11Module; case FreeRDP_PkinitAnchors: return settings->PkinitAnchors; case FreeRDP_PlayRemoteFxFile: return settings->PlayRemoteFxFile; case FreeRDP_PreconnectionBlob: return settings->PreconnectionBlob; case FreeRDP_PrivateKeyContent: return settings->PrivateKeyContent; case FreeRDP_PrivateKeyFile: return settings->PrivateKeyFile; case FreeRDP_ProxyHostname: return settings->ProxyHostname; case FreeRDP_ProxyPassword: return settings->ProxyPassword; case FreeRDP_ProxyUsername: return settings->ProxyUsername; case FreeRDP_RDP2TCPArgs: return settings->RDP2TCPArgs; case FreeRDP_ReaderName: return settings->ReaderName; case FreeRDP_RedirectionAcceptedCert: return settings->RedirectionAcceptedCert; case FreeRDP_RedirectionDomain: return settings->RedirectionDomain; case FreeRDP_RedirectionTargetFQDN: return settings->RedirectionTargetFQDN; case FreeRDP_RedirectionTargetNetBiosName: return settings->RedirectionTargetNetBiosName; case FreeRDP_RedirectionUsername: return settings->RedirectionUsername; case FreeRDP_RemoteApplicationCmdLine: return settings->RemoteApplicationCmdLine; case FreeRDP_RemoteApplicationFile: return settings->RemoteApplicationFile; case FreeRDP_RemoteApplicationGuid: return settings->RemoteApplicationGuid; case FreeRDP_RemoteApplicationIcon: return settings->RemoteApplicationIcon; case FreeRDP_RemoteApplicationName: return settings->RemoteApplicationName; case FreeRDP_RemoteApplicationProgram: return settings->RemoteApplicationProgram; case FreeRDP_RemoteApplicationWorkingDir: return settings->RemoteApplicationWorkingDir; case FreeRDP_RemoteAssistancePassStub: return settings->RemoteAssistancePassStub; case FreeRDP_RemoteAssistancePassword: return settings->RemoteAssistancePassword; case FreeRDP_RemoteAssistanceRCTicket: return settings->RemoteAssistanceRCTicket; case FreeRDP_RemoteAssistanceSessionId: return settings->RemoteAssistanceSessionId; case FreeRDP_ServerHostname: return settings->ServerHostname; case FreeRDP_ShellWorkingDirectory: return settings->ShellWorkingDirectory; case FreeRDP_SmartcardCertificate: return settings->SmartcardCertificate; case FreeRDP_SmartcardPrivateKey: return settings->SmartcardPrivateKey; case FreeRDP_SspiModule: return settings->SspiModule; case FreeRDP_TargetNetAddress: return settings->TargetNetAddress; case FreeRDP_TlsSecretsFile: return settings->TlsSecretsFile; case FreeRDP_TransportDumpFile: return settings->TransportDumpFile; case FreeRDP_Username: return settings->Username; case FreeRDP_WindowTitle: return settings->WindowTitle; case FreeRDP_WmClass: return settings->WmClass; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } char* freerdp_settings_get_string_writable(rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { case FreeRDP_AcceptedCert: return settings->AcceptedCert; case FreeRDP_ActionScript: return settings->ActionScript; case FreeRDP_AllowedTlsCiphers: return settings->AllowedTlsCiphers; case FreeRDP_AlternateShell: return settings->AlternateShell; case FreeRDP_AssistanceFile: return settings->AssistanceFile; case FreeRDP_AuthenticationPackageList: return settings->AuthenticationPackageList; case FreeRDP_AuthenticationServiceClass: return settings->AuthenticationServiceClass; case FreeRDP_BitmapCachePersistFile: return settings->BitmapCachePersistFile; case FreeRDP_CardName: return settings->CardName; case FreeRDP_CertificateAcceptedFingerprints: return settings->CertificateAcceptedFingerprints; case FreeRDP_CertificateContent: return settings->CertificateContent; case FreeRDP_CertificateFile: return settings->CertificateFile; case FreeRDP_CertificateName: return settings->CertificateName; case FreeRDP_ClientAddress: return settings->ClientAddress; case FreeRDP_ClientDir: return settings->ClientDir; case FreeRDP_ClientHostname: return settings->ClientHostname; case FreeRDP_ClientProductId: return settings->ClientProductId; case FreeRDP_ComputerName: return settings->ComputerName; case FreeRDP_ConfigPath: return settings->ConfigPath; case FreeRDP_ConnectionFile: return settings->ConnectionFile; case FreeRDP_ContainerName: return settings->ContainerName; case FreeRDP_CspName: return settings->CspName; case FreeRDP_CurrentPath: return settings->CurrentPath; case FreeRDP_Domain: return settings->Domain; case FreeRDP_DrivesToRedirect: return settings->DrivesToRedirect; case FreeRDP_DumpRemoteFxFile: return settings->DumpRemoteFxFile; case FreeRDP_DynamicDSTTimeZoneKeyName: return settings->DynamicDSTTimeZoneKeyName; case FreeRDP_GatewayAcceptedCert: return settings->GatewayAcceptedCert; case FreeRDP_GatewayAccessToken: return settings->GatewayAccessToken; case FreeRDP_GatewayDomain: return settings->GatewayDomain; case FreeRDP_GatewayHostname: return settings->GatewayHostname; case FreeRDP_GatewayPassword: return settings->GatewayPassword; case FreeRDP_GatewayUsername: return settings->GatewayUsername; case FreeRDP_HomePath: return settings->HomePath; case FreeRDP_ImeFileName: return settings->ImeFileName; case FreeRDP_KerberosArmor: return settings->KerberosArmor; case FreeRDP_KerberosCache: return settings->KerberosCache; case FreeRDP_KerberosKdcUrl: return settings->KerberosKdcUrl; case FreeRDP_KerberosKeytab: return settings->KerberosKeytab; case FreeRDP_KerberosLifeTime: return settings->KerberosLifeTime; case FreeRDP_KerberosRealm: return settings->KerberosRealm; case FreeRDP_KerberosRenewableLifeTime: return settings->KerberosRenewableLifeTime; case FreeRDP_KerberosStartTime: return settings->KerberosStartTime; case FreeRDP_KeyboardRemappingList: return settings->KeyboardRemappingList; case FreeRDP_NtlmSamFile: return settings->NtlmSamFile; case FreeRDP_Password: return settings->Password; case FreeRDP_PasswordHash: return settings->PasswordHash; case FreeRDP_Pkcs11Module: return settings->Pkcs11Module; case FreeRDP_PkinitAnchors: return settings->PkinitAnchors; case FreeRDP_PlayRemoteFxFile: return settings->PlayRemoteFxFile; case FreeRDP_PreconnectionBlob: return settings->PreconnectionBlob; case FreeRDP_PrivateKeyContent: return settings->PrivateKeyContent; case FreeRDP_PrivateKeyFile: return settings->PrivateKeyFile; case FreeRDP_ProxyHostname: return settings->ProxyHostname; case FreeRDP_ProxyPassword: return settings->ProxyPassword; case FreeRDP_ProxyUsername: return settings->ProxyUsername; case FreeRDP_RDP2TCPArgs: return settings->RDP2TCPArgs; case FreeRDP_ReaderName: return settings->ReaderName; case FreeRDP_RedirectionAcceptedCert: return settings->RedirectionAcceptedCert; case FreeRDP_RedirectionDomain: return settings->RedirectionDomain; case FreeRDP_RedirectionTargetFQDN: return settings->RedirectionTargetFQDN; case FreeRDP_RedirectionTargetNetBiosName: return settings->RedirectionTargetNetBiosName; case FreeRDP_RedirectionUsername: return settings->RedirectionUsername; case FreeRDP_RemoteApplicationCmdLine: return settings->RemoteApplicationCmdLine; case FreeRDP_RemoteApplicationFile: return settings->RemoteApplicationFile; case FreeRDP_RemoteApplicationGuid: return settings->RemoteApplicationGuid; case FreeRDP_RemoteApplicationIcon: return settings->RemoteApplicationIcon; case FreeRDP_RemoteApplicationName: return settings->RemoteApplicationName; case FreeRDP_RemoteApplicationProgram: return settings->RemoteApplicationProgram; case FreeRDP_RemoteApplicationWorkingDir: return settings->RemoteApplicationWorkingDir; case FreeRDP_RemoteAssistancePassStub: return settings->RemoteAssistancePassStub; case FreeRDP_RemoteAssistancePassword: return settings->RemoteAssistancePassword; case FreeRDP_RemoteAssistanceRCTicket: return settings->RemoteAssistanceRCTicket; case FreeRDP_RemoteAssistanceSessionId: return settings->RemoteAssistanceSessionId; case FreeRDP_ServerHostname: return settings->ServerHostname; case FreeRDP_ShellWorkingDirectory: return settings->ShellWorkingDirectory; case FreeRDP_SmartcardCertificate: return settings->SmartcardCertificate; case FreeRDP_SmartcardPrivateKey: return settings->SmartcardPrivateKey; case FreeRDP_SspiModule: return settings->SspiModule; case FreeRDP_TargetNetAddress: return settings->TargetNetAddress; case FreeRDP_TlsSecretsFile: return settings->TlsSecretsFile; case FreeRDP_TransportDumpFile: return settings->TransportDumpFile; case FreeRDP_Username: return settings->Username; case FreeRDP_WindowTitle: return settings->WindowTitle; case FreeRDP_WmClass: return settings->WmClass; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_string_(rdpSettings* settings, size_t id, const char* val, size_t len, BOOL cleanup) { union { void* v; const void* cv; char* c; const char* cc; } cnv; WINPR_ASSERT(settings); cnv.cc = val; switch (id) { case FreeRDP_AcceptedCert: return update_string(&settings->AcceptedCert, cnv.cc, len, cleanup); case FreeRDP_ActionScript: return update_string(&settings->ActionScript, cnv.cc, len, cleanup); case FreeRDP_AllowedTlsCiphers: return update_string(&settings->AllowedTlsCiphers, cnv.cc, len, cleanup); case FreeRDP_AlternateShell: return update_string(&settings->AlternateShell, cnv.cc, len, cleanup); case FreeRDP_AssistanceFile: return update_string(&settings->AssistanceFile, cnv.cc, len, cleanup); case FreeRDP_AuthenticationPackageList: return update_string(&settings->AuthenticationPackageList, cnv.cc, len, cleanup); case FreeRDP_AuthenticationServiceClass: return update_string(&settings->AuthenticationServiceClass, cnv.cc, len, cleanup); case FreeRDP_BitmapCachePersistFile: return update_string(&settings->BitmapCachePersistFile, cnv.cc, len, cleanup); case FreeRDP_CardName: return update_string(&settings->CardName, cnv.cc, len, cleanup); case FreeRDP_CertificateAcceptedFingerprints: return update_string(&settings->CertificateAcceptedFingerprints, cnv.cc, len, cleanup); case FreeRDP_CertificateContent: return update_string(&settings->CertificateContent, cnv.cc, len, cleanup); case FreeRDP_CertificateFile: return update_string(&settings->CertificateFile, cnv.cc, len, cleanup); case FreeRDP_CertificateName: return update_string(&settings->CertificateName, cnv.cc, len, cleanup); case FreeRDP_ClientAddress: return update_string(&settings->ClientAddress, cnv.cc, len, cleanup); case FreeRDP_ClientDir: return update_string(&settings->ClientDir, cnv.cc, len, cleanup); case FreeRDP_ClientHostname: return update_string(&settings->ClientHostname, cnv.cc, len, cleanup); case FreeRDP_ClientProductId: return update_string(&settings->ClientProductId, cnv.cc, len, cleanup); case FreeRDP_ComputerName: return update_string(&settings->ComputerName, cnv.cc, len, cleanup); case FreeRDP_ConfigPath: return update_string(&settings->ConfigPath, cnv.cc, len, cleanup); case FreeRDP_ConnectionFile: return update_string(&settings->ConnectionFile, cnv.cc, len, cleanup); case FreeRDP_ContainerName: return update_string(&settings->ContainerName, cnv.cc, len, cleanup); case FreeRDP_CspName: return update_string(&settings->CspName, cnv.cc, len, cleanup); case FreeRDP_CurrentPath: return update_string(&settings->CurrentPath, cnv.cc, len, cleanup); case FreeRDP_Domain: return update_string(&settings->Domain, cnv.cc, len, cleanup); case FreeRDP_DrivesToRedirect: return update_string(&settings->DrivesToRedirect, cnv.cc, len, cleanup); case FreeRDP_DumpRemoteFxFile: return update_string(&settings->DumpRemoteFxFile, cnv.cc, len, cleanup); case FreeRDP_DynamicDSTTimeZoneKeyName: return update_string(&settings->DynamicDSTTimeZoneKeyName, cnv.cc, len, cleanup); case FreeRDP_GatewayAcceptedCert: return update_string(&settings->GatewayAcceptedCert, cnv.cc, len, cleanup); case FreeRDP_GatewayAccessToken: return update_string(&settings->GatewayAccessToken, cnv.cc, len, cleanup); case FreeRDP_GatewayDomain: return update_string(&settings->GatewayDomain, cnv.cc, len, cleanup); case FreeRDP_GatewayHostname: return update_string(&settings->GatewayHostname, cnv.cc, len, cleanup); case FreeRDP_GatewayPassword: return update_string(&settings->GatewayPassword, cnv.cc, len, cleanup); case FreeRDP_GatewayUsername: return update_string(&settings->GatewayUsername, cnv.cc, len, cleanup); case FreeRDP_HomePath: return update_string(&settings->HomePath, cnv.cc, len, cleanup); case FreeRDP_ImeFileName: return update_string(&settings->ImeFileName, cnv.cc, len, cleanup); case FreeRDP_KerberosArmor: return update_string(&settings->KerberosArmor, cnv.cc, len, cleanup); case FreeRDP_KerberosCache: return update_string(&settings->KerberosCache, cnv.cc, len, cleanup); case FreeRDP_KerberosKdcUrl: return update_string(&settings->KerberosKdcUrl, cnv.cc, len, cleanup); case FreeRDP_KerberosKeytab: return update_string(&settings->KerberosKeytab, cnv.cc, len, cleanup); case FreeRDP_KerberosLifeTime: return update_string(&settings->KerberosLifeTime, cnv.cc, len, cleanup); case FreeRDP_KerberosRealm: return update_string(&settings->KerberosRealm, cnv.cc, len, cleanup); case FreeRDP_KerberosRenewableLifeTime: return update_string(&settings->KerberosRenewableLifeTime, cnv.cc, len, cleanup); case FreeRDP_KerberosStartTime: return update_string(&settings->KerberosStartTime, cnv.cc, len, cleanup); case FreeRDP_KeyboardRemappingList: return update_string(&settings->KeyboardRemappingList, cnv.cc, len, cleanup); case FreeRDP_NtlmSamFile: return update_string(&settings->NtlmSamFile, cnv.cc, len, cleanup); case FreeRDP_Password: return update_string(&settings->Password, cnv.cc, len, cleanup); case FreeRDP_PasswordHash: return update_string(&settings->PasswordHash, cnv.cc, len, cleanup); case FreeRDP_Pkcs11Module: return update_string(&settings->Pkcs11Module, cnv.cc, len, cleanup); case FreeRDP_PkinitAnchors: return update_string(&settings->PkinitAnchors, cnv.cc, len, cleanup); case FreeRDP_PlayRemoteFxFile: return update_string(&settings->PlayRemoteFxFile, cnv.cc, len, cleanup); case FreeRDP_PreconnectionBlob: return update_string(&settings->PreconnectionBlob, cnv.cc, len, cleanup); case FreeRDP_PrivateKeyContent: return update_string(&settings->PrivateKeyContent, cnv.cc, len, cleanup); case FreeRDP_PrivateKeyFile: return update_string(&settings->PrivateKeyFile, cnv.cc, len, cleanup); case FreeRDP_ProxyHostname: return update_string(&settings->ProxyHostname, cnv.cc, len, cleanup); case FreeRDP_ProxyPassword: return update_string(&settings->ProxyPassword, cnv.cc, len, cleanup); case FreeRDP_ProxyUsername: return update_string(&settings->ProxyUsername, cnv.cc, len, cleanup); case FreeRDP_RDP2TCPArgs: return update_string(&settings->RDP2TCPArgs, cnv.cc, len, cleanup); case FreeRDP_ReaderName: return update_string(&settings->ReaderName, cnv.cc, len, cleanup); case FreeRDP_RedirectionAcceptedCert: return update_string(&settings->RedirectionAcceptedCert, cnv.cc, len, cleanup); case FreeRDP_RedirectionDomain: return update_string(&settings->RedirectionDomain, cnv.cc, len, cleanup); case FreeRDP_RedirectionTargetFQDN: return update_string(&settings->RedirectionTargetFQDN, cnv.cc, len, cleanup); case FreeRDP_RedirectionTargetNetBiosName: return update_string(&settings->RedirectionTargetNetBiosName, cnv.cc, len, cleanup); case FreeRDP_RedirectionUsername: return update_string(&settings->RedirectionUsername, cnv.cc, len, cleanup); case FreeRDP_RemoteApplicationCmdLine: return update_string(&settings->RemoteApplicationCmdLine, cnv.cc, len, cleanup); case FreeRDP_RemoteApplicationFile: return update_string(&settings->RemoteApplicationFile, cnv.cc, len, cleanup); case FreeRDP_RemoteApplicationGuid: return update_string(&settings->RemoteApplicationGuid, cnv.cc, len, cleanup); case FreeRDP_RemoteApplicationIcon: return update_string(&settings->RemoteApplicationIcon, cnv.cc, len, cleanup); case FreeRDP_RemoteApplicationName: return update_string(&settings->RemoteApplicationName, cnv.cc, len, cleanup); case FreeRDP_RemoteApplicationProgram: return update_string(&settings->RemoteApplicationProgram, cnv.cc, len, cleanup); case FreeRDP_RemoteApplicationWorkingDir: return update_string(&settings->RemoteApplicationWorkingDir, cnv.cc, len, cleanup); case FreeRDP_RemoteAssistancePassStub: return update_string(&settings->RemoteAssistancePassStub, cnv.cc, len, cleanup); case FreeRDP_RemoteAssistancePassword: return update_string(&settings->RemoteAssistancePassword, cnv.cc, len, cleanup); case FreeRDP_RemoteAssistanceRCTicket: return update_string(&settings->RemoteAssistanceRCTicket, cnv.cc, len, cleanup); case FreeRDP_RemoteAssistanceSessionId: return update_string(&settings->RemoteAssistanceSessionId, cnv.cc, len, cleanup); case FreeRDP_ServerHostname: return update_string(&settings->ServerHostname, cnv.cc, len, cleanup); case FreeRDP_ShellWorkingDirectory: return update_string(&settings->ShellWorkingDirectory, cnv.cc, len, cleanup); case FreeRDP_SmartcardCertificate: return update_string(&settings->SmartcardCertificate, cnv.cc, len, cleanup); case FreeRDP_SmartcardPrivateKey: return update_string(&settings->SmartcardPrivateKey, cnv.cc, len, cleanup); case FreeRDP_SspiModule: return update_string(&settings->SspiModule, cnv.cc, len, cleanup); case FreeRDP_TargetNetAddress: return update_string(&settings->TargetNetAddress, cnv.cc, len, cleanup); case FreeRDP_TlsSecretsFile: return update_string(&settings->TlsSecretsFile, cnv.cc, len, cleanup); case FreeRDP_TransportDumpFile: return update_string(&settings->TransportDumpFile, cnv.cc, len, cleanup); case FreeRDP_Username: return update_string(&settings->Username, cnv.cc, len, cleanup); case FreeRDP_WindowTitle: return update_string(&settings->WindowTitle, cnv.cc, len, cleanup); case FreeRDP_WmClass: return update_string(&settings->WmClass, cnv.cc, len, cleanup); default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; } BOOL freerdp_settings_set_string_len(rdpSettings* settings, size_t id, const char* val, size_t len) { return freerdp_settings_set_string_(settings, id, val, len, TRUE); } BOOL freerdp_settings_set_string(rdpSettings* settings, size_t id, const char* val) { size_t len = 0; if (val) len = strlen(val); return freerdp_settings_set_string_(settings, id, val, len, TRUE); } void* freerdp_settings_get_pointer_writable(rdpSettings* settings, size_t id) { WINPR_ASSERT(settings); switch (id) { case FreeRDP_BitmapCacheV2CellInfo: return settings->BitmapCacheV2CellInfo; case FreeRDP_ChannelDefArray: return settings->ChannelDefArray; case FreeRDP_ClientAutoReconnectCookie: return settings->ClientAutoReconnectCookie; case FreeRDP_ClientRandom: return settings->ClientRandom; case FreeRDP_ClientTimeZone: return settings->ClientTimeZone; case FreeRDP_DeviceArray: return settings->DeviceArray; case FreeRDP_DynamicChannelArray: return settings->DynamicChannelArray; case FreeRDP_FragCache: return settings->FragCache; case FreeRDP_GlyphCache: return settings->GlyphCache; case FreeRDP_LoadBalanceInfo: return settings->LoadBalanceInfo; case FreeRDP_MonitorDefArray: return settings->MonitorDefArray; case FreeRDP_MonitorIds: return settings->MonitorIds; case FreeRDP_OrderSupport: return settings->OrderSupport; case FreeRDP_Password51: return settings->Password51; case FreeRDP_RdpServerCertificate: return settings->RdpServerCertificate; case FreeRDP_RdpServerRsaKey: return settings->RdpServerRsaKey; case FreeRDP_ReceivedCapabilities: return settings->ReceivedCapabilities; case FreeRDP_RedirectionPassword: return settings->RedirectionPassword; case FreeRDP_RedirectionTsvUrl: return settings->RedirectionTsvUrl; case FreeRDP_ServerAutoReconnectCookie: return settings->ServerAutoReconnectCookie; case FreeRDP_ServerCertificate: return settings->ServerCertificate; case FreeRDP_ServerRandom: return settings->ServerRandom; case FreeRDP_StaticChannelArray: return settings->StaticChannelArray; case FreeRDP_TargetNetAddresses: return settings->TargetNetAddresses; case FreeRDP_TargetNetPorts: return settings->TargetNetPorts; case FreeRDP_instance: return settings->instance; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } } BOOL freerdp_settings_set_pointer(rdpSettings* settings, size_t id, const void* val) { union { void* v; const void* cv; } cnv; WINPR_ASSERT(settings); cnv.cv = val; switch (id) { case FreeRDP_BitmapCacheV2CellInfo: settings->BitmapCacheV2CellInfo = cnv.v; break; case FreeRDP_ChannelDefArray: settings->ChannelDefArray = cnv.v; break; case FreeRDP_ClientAutoReconnectCookie: settings->ClientAutoReconnectCookie = cnv.v; break; case FreeRDP_ClientRandom: settings->ClientRandom = cnv.v; break; case FreeRDP_ClientTimeZone: settings->ClientTimeZone = cnv.v; break; case FreeRDP_DeviceArray: settings->DeviceArray = cnv.v; break; case FreeRDP_DynamicChannelArray: settings->DynamicChannelArray = cnv.v; break; case FreeRDP_FragCache: settings->FragCache = cnv.v; break; case FreeRDP_GlyphCache: settings->GlyphCache = cnv.v; break; case FreeRDP_LoadBalanceInfo: settings->LoadBalanceInfo = cnv.v; break; case FreeRDP_MonitorDefArray: settings->MonitorDefArray = cnv.v; break; case FreeRDP_MonitorIds: settings->MonitorIds = cnv.v; break; case FreeRDP_OrderSupport: settings->OrderSupport = cnv.v; break; case FreeRDP_Password51: settings->Password51 = cnv.v; break; case FreeRDP_RdpServerCertificate: settings->RdpServerCertificate = cnv.v; break; case FreeRDP_RdpServerRsaKey: settings->RdpServerRsaKey = cnv.v; break; case FreeRDP_ReceivedCapabilities: settings->ReceivedCapabilities = cnv.v; break; case FreeRDP_RedirectionPassword: settings->RedirectionPassword = cnv.v; break; case FreeRDP_RedirectionTsvUrl: settings->RedirectionTsvUrl = cnv.v; break; case FreeRDP_ServerAutoReconnectCookie: settings->ServerAutoReconnectCookie = cnv.v; break; case FreeRDP_ServerCertificate: settings->ServerCertificate = cnv.v; break; case FreeRDP_ServerRandom: settings->ServerRandom = cnv.v; break; case FreeRDP_StaticChannelArray: settings->StaticChannelArray = cnv.v; break; case FreeRDP_TargetNetAddresses: settings->TargetNetAddresses = cnv.v; break; case FreeRDP_TargetNetPorts: settings->TargetNetPorts = cnv.v; break; case FreeRDP_instance: settings->instance = cnv.v; break; default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; } return TRUE; }
{'content_hash': '684c3003788d1793d5aba095e11551ca', 'timestamp': '', 'source': 'github', 'line_count': 3391, 'max_line_length': 99, 'avg_line_length': 23.464169861397817, 'alnum_prop': 0.757399424384481, 'repo_name': 'awakecoding/FreeRDP', 'id': '255a4c917805667e20dc6e09ff11168be4939f8e', 'size': '79567', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'libfreerdp/common/settings_getters.c', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '15084706'}, {'name': 'C#', 'bytes': '6365'}, {'name': 'C++', 'bytes': '138156'}, {'name': 'CMake', 'bytes': '635168'}, {'name': 'CSS', 'bytes': '5696'}, {'name': 'HTML', 'bytes': '99139'}, {'name': 'Java', 'bytes': '371005'}, {'name': 'Lua', 'bytes': '27390'}, {'name': 'Makefile', 'bytes': '1677'}, {'name': 'Objective-C', 'bytes': '517001'}, {'name': 'Perl', 'bytes': '8044'}, {'name': 'Python', 'bytes': '53966'}, {'name': 'Rich Text Format', 'bytes': '937'}, {'name': 'Roff', 'bytes': '12141'}, {'name': 'Shell', 'bytes': '33001'}]}
GitHub
<!DOCTYPE html> <html> <head> <!-- meta information --> <meta charset="utf-8"> <meta name="description" content="{% for post in site.posts %}{% unless post.next %}{% unless forloop.first %}{% endunless %} {{ post.date | date:..." > <meta name="author" content="7122016"> <!-- Enable responsiveness on mobile devices--> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <!-- title --> <title>0x6CAC60 &middot; </title> <!-- icons --> <link rel="shortcut icon" href="/public/images/favicon.ico" /> <!-- stylesheets --> <link rel="stylesheet" href="/public/css/responsive.gs.12col.css"> <link rel="stylesheet" href="/public/css/animate.min.css"> <link rel="stylesheet" href="/public/css/main.css"> <!-- Google fonts --> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic&subset=latin-ext"> <!-- feed links --> <link rel="alternate" href="http://localhost:4000/feed.xml" type="application/rss+xml" title=""> </head> <body> <div class="container azul"> <header class="top row gutters"> <div class="col span_2 center"> <!-- TODO: add baseurl to the logo link --> <a href="http://localhost:4000" id="logo" title="7122016" style="background-image: url(/public/images/);"></a> </div> <nav class="col span_10 top-navbar"> <a href="/" title="Anasayfa" >Anasayfa</a> <a href="/iletisim.html" title="Hakkında" >Hakkında</a> </nav> </header> <h2><center>Gönderiler</center></h2> <section class="archive"> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/volatility" title="Volatility" class="col span_8">Volatility</a> <div class="post-date col span_4"> <time datetime="2017-05-09">9 May</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/kioptrix-level-1" title="Kioptrix Level 1 Çözüm" class="col span_8">Kioptrix Level 1 Çözüm</a> <div class="post-date col span_4"> <time datetime="2017-04-26">26 April</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/multi-threads-example" title="Thread-MultiThreading Örneği (C)" class="col span_8">Thread-MultiThreading Örneği (C)</a> <div class="post-date col span_4"> <time datetime="2017-04-21">21 April</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/exploitation-giris" title="Exploitation'a Giriş (Uygulama)" class="col span_8">Exploitation'a Giriş (Uygulama)</a> <div class="post-date col span_4"> <time datetime="2017-04-18">18 April</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/dvwa-cozumler-low-level" title="DVWA (Low-Level) Çözümleri" class="col span_8">DVWA (Low-Level) Çözümleri</a> <div class="post-date col span_4"> <time datetime="2017-03-27">27 March</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/basic-linux-komutlari" title="Temel Linux Komutları" class="col span_8">Temel Linux Komutları</a> <div class="post-date col span_4"> <time datetime="2017-03-21">21 March</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/basic-linux-shell-fork-execvp" title="C ile Basit Linux Shell" class="col span_8">C ile Basit Linux Shell</a> <div class="post-date col span_4"> <time datetime="2017-03-19">19 March</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/client-server-perl-python" title="Client-Server Örnekleri (Perl - Python)" class="col span_8">Client-Server Örnekleri (Perl - Python)</a> <div class="post-date col span_4"> <time datetime="2017-03-18">18 March</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/wfp1-sql-injection-cozumleri" title="WEB For Pentester 1 - SQL Injections Bölümü Çözümleri" class="col span_8">WEB For Pentester 1 - SQL Injections Bölümü Çözümleri</a> <div class="post-date col span_4"> <time datetime="2017-03-17">17 March</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/http-api" title="PHP ve Perl Kullanarak HttpApi Oluşturma" class="col span_8">PHP ve Perl Kullanarak HttpApi Oluşturma</a> <div class="post-date col span_4"> <time datetime="2017-03-15">15 March</time> </div> </article> </div></div> <div class="bundle row gutters fadeInDown animated"> <h2 class="post-year col span_2">2017</h2> <div class="posts-by-year col span_10"> <article class="row gutters"> <a href="/jekyll-ile-blog-kurulumu" title="Jekyll İle Blog Oluşturma" class="col span_8">Jekyll İle Blog Oluşturma</a> <div class="post-date col span_4"> <time datetime="2017-03-14">14 March</time> </div> </article> </div></div> </section> <footer> <p> Tüm hakları <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/deed.en_US">Creative Commons Attribution-NonCommercial 4.0 International License</a>. altında saklıdır. </p> </footer> </div> <!-- scripts --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="/public/js/jquery.fitvids.js"></script> <script> $(document).ready(function(){ $("article").fitVids(); }); </script> </body> </html>
{'content_hash': 'c20c9e1c87d3dc5a089541439d8a09fb', 'timestamp': '', 'source': 'github', 'line_count': 326, 'max_line_length': 182, 'avg_line_length': 21.70245398773006, 'alnum_prop': 0.6296819787985866, 'repo_name': '0x6cac60/0x6cac60.github.io', 'id': '5aba88703aabcfbe5b29fd0ac95e4d80a205b5ba', 'size': '7123', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_site/index.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '14636'}, {'name': 'HTML', 'bytes': '120347'}, {'name': 'JavaScript', 'bytes': '5396'}, {'name': 'Ruby', 'bytes': '2078'}]}
GitHub
<?php namespace Phalcon\Db\Adapter\MongoDB\Operation; use MongoDB\Driver\Command; use MongoDB\Driver\Query; use MongoDB\Driver\Server; use MongoDB\Driver\Exception\RuntimeException; use Phalcon\Db\Adapter\MongoDB\Exception\InvalidArgumentException; use Phalcon\Db\Adapter\MongoDB\Functions; use Phalcon\Db\Adapter\MongoDB\Model\IndexInfoIterator; use Phalcon\Db\Adapter\MongoDB\Model\IndexInfoIteratorIterator; use EmptyIterator; /** * Operation for the listIndexes command. * * @api * @see MongoDB\Collection::listIndexes() * @see http://docs.mongodb.org/manual/reference/command/listIndexes/ */ class ListIndexes implements Executable { private static $errorCodeDatabaseNotFound=60; private static $errorCodeNamespaceNotFound=26; private static $wireVersionForCommand=3; private $databaseName; private $collectionName; private $options; /** * Constructs a listIndexes command. * * Supported options: * * * maxTimeMS (integer): The maximum amount of time to allow the query to * run. * * @param string $databaseName Database name * @param string $collectionName Collection name * @param array $options Command options * * @throws InvalidArgumentException */ public function __construct($databaseName, $collectionName, array $options = []) { if (isset($options['maxTimeMS'])&&!is_integer($options['maxTimeMS'])) { throw InvalidArgumentException::invalidType('"maxTimeMS" option', $options['maxTimeMS'], 'integer'); } $this->databaseName =(string)$databaseName; $this->collectionName=(string)$collectionName; $this->options =$options; } /** * Execute the operation. * * @see Executable::execute() * * @param Server $server * * @return IndexInfoIterator */ public function execute(Server $server) { return Functions::serverSupportsFeature($server, self::$wireVersionForCommand) ?$this->executeCommand($server) :$this->executeLegacy($server); } /** * Returns information for all indexes for this collection using the * listIndexes command. * * @param Server $server * * @return IndexInfoIteratorIterator */ private function executeCommand(Server $server) { $cmd=['listIndexes'=>$this->collectionName]; if (isset($this->options['maxTimeMS'])) { $cmd['maxTimeMS']=$this->options['maxTimeMS']; } try { $cursor=$server->executeCommand($this->databaseName, new Command($cmd)); } catch (RuntimeException $e) { /* The server may return an error if the collection does not exist. * Check for possible error codes (see: SERVER-20463) and return an * empty iterator instead of throwing. */ if ($e->getCode()===self::$errorCodeNamespaceNotFound||$e->getCode()===self::$errorCodeDatabaseNotFound) { return new IndexInfoIteratorIterator(new EmptyIterator); } throw $e; } $cursor->setTypeMap(['root'=>'array','document'=>'array']); return new IndexInfoIteratorIterator($cursor); } /** * Returns information for all indexes for this collection by querying the * "system.indexes" collection (MongoDB <3.0). * * @param Server $server * * @return IndexInfoIteratorIterator */ private function executeLegacy(Server $server) { $filter=['ns'=>$this->databaseName.'.'.$this->collectionName]; $options=isset($this->options['maxTimeMS'])?['modifiers'=>['$maxTimeMS'=>$this->options['maxTimeMS']]]:[]; $cursor=$server->executeQuery($this->databaseName.'.system.indexes', new Query($filter, $options)); $cursor->setTypeMap(['root'=>'array','document'=>'array']); return new IndexInfoIteratorIterator($cursor); } }
{'content_hash': '4953a4a9cb6d24ed5cdd881245e70d79', 'timestamp': '', 'source': 'github', 'line_count': 127, 'max_line_length': 118, 'avg_line_length': 31.480314960629922, 'alnum_prop': 0.639319659829915, 'repo_name': 'twistersfury/incubator', 'id': '474c0877308e36e6d949b03790a1c945812ef91b', 'size': '3998', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Library/Phalcon/Db/Adapter/MongoDB/Operation/ListIndexes.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'PHP', 'bytes': '998766'}, {'name': 'Shell', 'bytes': '4252'}]}
GitHub
import sphinx_material # -- Project information ----------------------------------------------------- project = 'Phimp.me' copyright = '2019, FOSSASIA' author = 'FOSSASIA' master_doc = 'index' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['m2r', 'sphinx_material',"sphinx_git"] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_material' # Get the them path html_theme_path = sphinx_material.html_theme_path() # Register the required helpers for the html context html_context = sphinx_material.get_html_context() # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] html_theme_options = { # Set the color and the accent color 'color_primary': 'blue', 'color_accent': 'light-blue', }
{'content_hash': '21ae0606e358da7e0ae45a79f426b5b1', 'timestamp': '', 'source': 'github', 'line_count': 48, 'max_line_length': 78, 'avg_line_length': 33.75, 'alnum_prop': 0.6592592592592592, 'repo_name': 'phimpme/android-prototype', 'id': '592d1987c9022dd07997197a5c24965ef3a6a10a', 'size': '2222', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docs/sources/conf.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '2827335'}, {'name': 'PHP', 'bytes': '78'}, {'name': 'Perl', 'bytes': '12726'}, {'name': 'Shell', 'bytes': '175'}]}
GitHub
#ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_ #define _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_ 1 #include "TProtocol.h" #include "TOneWayProtocol.h" #include <boost/shared_ptr.hpp> namespace apache { namespace thrift { namespace protocol { /* !!! EXPERIMENTAL CODE !!! This protocol is very much a work in progress. It doesn't handle many cases properly. It throws exceptions in many cases. It probably segfaults in many cases. Bug reports and feature requests are welcome. Complaints are not. :R */ /** * Protocol that prints the payload in a nice human-readable format. * Reading from this protocol is not supported. * */ class TDebugProtocol : public TWriteOnlyProtocol { private: enum write_state_t { UNINIT , STRUCT , LIST , SET , MAP_KEY , MAP_VALUE }; public: TDebugProtocol(boost::shared_ptr<TTransport> trans) : TWriteOnlyProtocol(trans, "TDebugProtocol") , string_limit_(DEFAULT_STRING_LIMIT) , string_prefix_size_(DEFAULT_STRING_PREFIX_SIZE) { write_state_.push_back(UNINIT); } static const int32_t DEFAULT_STRING_LIMIT = 256; static const int32_t DEFAULT_STRING_PREFIX_SIZE = 16; void setStringSizeLimit(int32_t string_limit) { string_limit_ = string_limit; } void setStringPrefixSize(int32_t string_prefix_size) { string_prefix_size_ = string_prefix_size; } virtual uint32_t writeMessageBegin(const std::string& name, const TMessageType messageType, const int32_t seqid); virtual uint32_t writeMessageEnd(); uint32_t writeStructBegin(const char* name); uint32_t writeStructEnd(); uint32_t writeFieldBegin(const char* name, const TType fieldType, const int16_t fieldId); uint32_t writeFieldEnd(); uint32_t writeFieldStop(); uint32_t writeMapBegin(const TType keyType, const TType valType, const uint32_t size); uint32_t writeMapEnd(); uint32_t writeListBegin(const TType elemType, const uint32_t size); uint32_t writeListEnd(); uint32_t writeSetBegin(const TType elemType, const uint32_t size); uint32_t writeSetEnd(); uint32_t writeBool(const bool value); uint32_t writeByte(const int8_t byte); uint32_t writeI16(const int16_t i16); uint32_t writeI32(const int32_t i32); uint32_t writeI64(const int64_t i64); uint32_t writeDouble(const double dub); uint32_t writeString(const std::string& str); uint32_t writeBinary(const std::string& str); private: void indentUp(); void indentDown(); uint32_t writePlain(const std::string& str); uint32_t writeIndented(const std::string& str); uint32_t startItem(); uint32_t endItem(); uint32_t writeItem(const std::string& str); static std::string fieldTypeName(TType type); int32_t string_limit_; int32_t string_prefix_size_; std::string indent_str_; static const int indent_inc = 2; std::vector<write_state_t> write_state_; std::vector<int> list_idx_; }; /** * Constructs debug protocol handlers */ class TDebugProtocolFactory : public TProtocolFactory { public: TDebugProtocolFactory() {} virtual ~TDebugProtocolFactory() {} boost::shared_ptr<TProtocol> getProtocol(boost::shared_ptr<TTransport> trans) { return boost::shared_ptr<TProtocol>(new TDebugProtocol(trans)); } }; }}} // apache::thrift::protocol // TODO(dreiss): Move (part of) ThriftDebugString into a .cpp file and remove this. #include <transport/TBufferTransports.h> namespace apache { namespace thrift { template<typename ThriftStruct> std::string ThriftDebugString(const ThriftStruct& ts) { using namespace apache::thrift::transport; using namespace apache::thrift::protocol; TMemoryBuffer* buffer = new TMemoryBuffer; boost::shared_ptr<TTransport> trans(buffer); TDebugProtocol protocol(trans); ts.write(&protocol); uint8_t* buf; uint32_t size; buffer->getBuffer(&buf, &size); return std::string((char*)buf, (unsigned int)size); } // TODO(dreiss): This is badly broken. Don't use it unless you are me. #if 0 template<typename Object> std::string DebugString(const std::vector<Object>& vec) { using namespace apache::thrift::transport; using namespace apache::thrift::protocol; TMemoryBuffer* buffer = new TMemoryBuffer; boost::shared_ptr<TTransport> trans(buffer); TDebugProtocol protocol(trans); // I am gross! protocol.writeStructBegin("SomeRandomVector"); // TODO: Fix this with a trait. protocol.writeListBegin((TType)99, vec.size()); typename std::vector<Object>::const_iterator it; for (it = vec.begin(); it != vec.end(); ++it) { it->write(&protocol); } protocol.writeListEnd(); uint8_t* buf; uint32_t size; buffer->getBuffer(&buf, &size); return std::string((char*)buf, (unsigned int)size); } #endif // 0 }} // apache::thrift #endif // #ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_
{'content_hash': '0fb6756f0e3816a9a609c67442ed5339', 'timestamp': '', 'source': 'github', 'line_count': 208, 'max_line_length': 83, 'avg_line_length': 24.02403846153846, 'alnum_prop': 0.6850110066039624, 'repo_name': 'ajayanandgit/mbunit-v3', 'id': 'ab69e0ca5b9f7f194c9ea56660a39574db41742a', 'size': '5800', 'binary': False, 'copies': '10', 'ref': 'refs/heads/master', 'path': 'tools/Thrift/src/lib/cpp/src/protocol/TDebugProtocol.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '8718'}, {'name': 'Batchfile', 'bytes': '31812'}, {'name': 'C', 'bytes': '1006'}, {'name': 'C#', 'bytes': '13534505'}, {'name': 'C++', 'bytes': '136700'}, {'name': 'CSS', 'bytes': '14400'}, {'name': 'HTML', 'bytes': '117545'}, {'name': 'JavaScript', 'bytes': '6632'}, {'name': 'Objective-C', 'bytes': '1024'}, {'name': 'PowerShell', 'bytes': '11691'}, {'name': 'Ruby', 'bytes': '3597212'}, {'name': 'Visual Basic', 'bytes': '12688'}, {'name': 'XSLT', 'bytes': '123017'}]}
GitHub
use std::intrinsics::{TyDesc, get_tydesc, visit_tydesc, TyVisitor, Disr, Opaque}; struct MyVisitor { types: Vec<String> , } impl TyVisitor for MyVisitor { fn visit_bot(&mut self) -> bool { self.types.push("bot".to_string()); println!("visited bot type"); true } fn visit_nil(&mut self) -> bool { self.types.push("nil".to_string()); println!("visited nil type"); true } fn visit_bool(&mut self) -> bool { self.types.push("bool".to_string()); println!("visited bool type"); true } fn visit_int(&mut self) -> bool { self.types.push("int".to_string()); println!("visited int type"); true } fn visit_i8(&mut self) -> bool { self.types.push("i8".to_string()); println!("visited i8 type"); true } fn visit_i16(&mut self) -> bool { self.types.push("i16".to_string()); println!("visited i16 type"); true } fn visit_i32(&mut self) -> bool { true } fn visit_i64(&mut self) -> bool { true } fn visit_uint(&mut self) -> bool { true } fn visit_u8(&mut self) -> bool { true } fn visit_u16(&mut self) -> bool { true } fn visit_u32(&mut self) -> bool { true } fn visit_u64(&mut self) -> bool { true } fn visit_f32(&mut self) -> bool { true } fn visit_f64(&mut self) -> bool { true } fn visit_char(&mut self) -> bool { true } fn visit_estr_slice(&mut self) -> bool { true } fn visit_box(&mut self, _mtbl: uint, _inner: *const TyDesc) -> bool { true } fn visit_uniq(&mut self, _mtbl: uint, _inner: *const TyDesc) -> bool { true } fn visit_ptr(&mut self, _mtbl: uint, _inner: *const TyDesc) -> bool { true } fn visit_rptr(&mut self, _mtbl: uint, _inner: *const TyDesc) -> bool { true } fn visit_evec_slice(&mut self, _mtbl: uint, _inner: *const TyDesc) -> bool { true } fn visit_evec_fixed(&mut self, _n: uint, _sz: uint, _align: uint, _inner: *const TyDesc) -> bool { true } fn visit_enter_rec(&mut self, _n_fields: uint, _sz: uint, _align: uint) -> bool { true } fn visit_rec_field(&mut self, _i: uint, _name: &str, _mtbl: uint, _inner: *const TyDesc) -> bool { true } fn visit_leave_rec(&mut self, _n_fields: uint, _sz: uint, _align: uint) -> bool { true } fn visit_enter_class(&mut self, _name: &str, _named_fields: bool, _n_fields: uint, _sz: uint, _align: uint) -> bool { true } fn visit_class_field(&mut self, _i: uint, _name: &str, _named: bool, _mtbl: uint, _inner: *const TyDesc) -> bool { true } fn visit_leave_class(&mut self, _name: &str, _named_fields: bool, _n_fields: uint, _sz: uint, _align: uint) -> bool { true } fn visit_enter_tup(&mut self, _n_fields: uint, _sz: uint, _align: uint) -> bool { true } fn visit_tup_field(&mut self, _i: uint, _inner: *const TyDesc) -> bool { true } fn visit_leave_tup(&mut self, _n_fields: uint, _sz: uint, _align: uint) -> bool { true } fn visit_enter_enum(&mut self, _n_variants: uint, _get_disr: unsafe extern fn(ptr: *const Opaque) -> Disr, _sz: uint, _align: uint) -> bool { true } fn visit_enter_enum_variant(&mut self, _variant: uint, _disr_val: Disr, _n_fields: uint, _name: &str) -> bool { true } fn visit_enum_variant_field(&mut self, _i: uint, _offset: uint, _inner: *const TyDesc) -> bool { true } fn visit_leave_enum_variant(&mut self, _variant: uint, _disr_val: Disr, _n_fields: uint, _name: &str) -> bool { true } fn visit_leave_enum(&mut self, _n_variants: uint, _get_disr: unsafe extern fn(ptr: *const Opaque) -> Disr, _sz: uint, _align: uint) -> bool { true } fn visit_enter_fn(&mut self, _purity: uint, _proto: uint, _n_inputs: uint, _retstyle: uint) -> bool { true } fn visit_fn_input(&mut self, _i: uint, _mode: uint, _inner: *const TyDesc) -> bool { true } fn visit_fn_output(&mut self, _retstyle: uint, _variadic: bool, _inner: *const TyDesc) -> bool { true } fn visit_leave_fn(&mut self, _purity: uint, _proto: uint, _n_inputs: uint, _retstyle: uint) -> bool { true } fn visit_trait(&mut self, _name: &str) -> bool { true } fn visit_param(&mut self, _i: uint) -> bool { true } fn visit_self(&mut self) -> bool { true } } fn visit_ty<T>(v: &mut MyVisitor) { unsafe { visit_tydesc(get_tydesc::<T>(), v as &mut TyVisitor) } } pub fn main() { let mut v = MyVisitor {types: Vec::new()}; visit_ty::<bool>(&mut v); visit_ty::<int>(&mut v); visit_ty::<i8>(&mut v); visit_ty::<i16>(&mut v); for s in v.types.iter() { println!("type: {}", (*s).clone()); } let vec_types: Vec<String> = v.types.clone().move_iter().collect(); assert_eq!(vec_types, vec!("bool".to_string(), "int".to_string(), "i8".to_string(), "i16".to_string())); }
{'content_hash': '541da3bb78de963bb86d8b6c86e04c96', 'timestamp': '', 'source': 'github', 'line_count': 136, 'max_line_length': 95, 'avg_line_length': 40.25, 'alnum_prop': 0.5109609061015711, 'repo_name': 'nham/rust', 'id': 'e17f140994421a6d7e348d5dfd55f0d65f9d6998', 'size': '5942', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/test/run-pass/reflect-visit-type.rs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ANTLR', 'bytes': '3206'}, {'name': 'Assembly', 'bytes': '25901'}, {'name': 'Awk', 'bytes': '159'}, {'name': 'C', 'bytes': '685127'}, {'name': 'C++', 'bytes': '54059'}, {'name': 'CSS', 'bytes': '19937'}, {'name': 'Emacs Lisp', 'bytes': '43154'}, {'name': 'JavaScript', 'bytes': '32402'}, {'name': 'Perl', 'bytes': '1076'}, {'name': 'Puppet', 'bytes': '11385'}, {'name': 'Python', 'bytes': '99103'}, {'name': 'Rust', 'bytes': '16506854'}, {'name': 'Shell', 'bytes': '281700'}, {'name': 'VimL', 'bytes': '34089'}]}
GitHub
<html><!-- Created using the cpp_pretty_printer from the dlib C++ library. See http://dlib.net for updates. --><head><title>dlib C++ Library - rsignaler_extension_abstract.h</title></head><body bgcolor='white'><pre> <font color='#009900'>// Copyright (C) 2006 Davis E. King (davis@dlib.net) </font><font color='#009900'>// License: Boost Software License See LICENSE.txt for the full license. </font><font color='#0000FF'>#undef</font> DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_ <font color='#0000FF'>#ifdef</font> DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_ <font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='threads_kernel_abstract.h.html'>threads_kernel_abstract.h</a>" <font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='rmutex_extension_abstract.h.html'>rmutex_extension_abstract.h</a>" <font color='#0000FF'>namespace</font> dlib <b>{</b> <font color='#009900'>// ---------------------------------------------------------------------------------------- </font> <font color='#0000FF'>class</font> <b><a name='rsignaler'></a>rsignaler</b> <b>{</b> <font color='#009900'>/*! WHAT THIS OBJECT REPRESENTS This object represents an event signaling system for threads. It gives a thread the ability to wake up other threads that are waiting for a particular signal. Each rsignaler object is associated with one and only one rmutex object. More than one rsignaler object may be associated with a single rmutex but a signaler object may only be associated with a single rmutex. NOTE: You must guard against spurious wakeups. This means that a thread might return from a call to wait even if no other thread called signal. This is rare but must be guarded against. Also note that this object is identical to the signaler object except that it works with rmutex objects rather than mutex objects. !*/</font> <font color='#0000FF'>public</font>: <b><a name='rsignaler'></a>rsignaler</b> <font face='Lucida Console'>(</font> <font color='#0000FF'>const</font> rmutex<font color='#5555FF'>&amp;</font> associated_mutex <font face='Lucida Console'>)</font>; <font color='#009900'>/*! ensures - #*this is properly initialized - #get_mutex() == associated_mutex throws - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create the signaler. !*/</font> ~<b><a name='rsignaler'></a>rsignaler</b> <font face='Lucida Console'>(</font> <font face='Lucida Console'>)</font>; <font color='#009900'>/*! ensures - all resources allocated by *this have been freed !*/</font> <font color='#0000FF'><u>void</u></font> <b><a name='wait'></a>wait</b> <font face='Lucida Console'>(</font> <font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>; <font color='#009900'>/*! requires - get_mutex() is locked and owned by the calling thread ensures - atomically unlocks get_mutex() and blocks the calling thread - calling thread may wake if another thread calls signal() or broadcast() on *this - when wait() returns the calling thread again has a lock on get_mutex() !*/</font> <font color='#0000FF'><u>bool</u></font> <b><a name='wait_or_timeout'></a>wait_or_timeout</b> <font face='Lucida Console'>(</font> <font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> milliseconds <font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>; <font color='#009900'>/*! requires - get_mutex() is locked and owned by the calling thread ensures - atomically unlocks get_mutex() and blocks the calling thread - calling thread may wake if another thread calls signal() or broadcast() on *this - after the specified number of milliseconds has elapsed the calling thread will wake once get_mutex() is free - when wait returns the calling thread again has a lock on get_mutex() - returns false if the call to wait_or_timeout timed out - returns true if the call did not time out !*/</font> <font color='#0000FF'><u>void</u></font> <b><a name='signal'></a>signal</b> <font face='Lucida Console'>(</font> <font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>; <font color='#009900'>/*! ensures - if (at least one thread is waiting on *this) then - at least one of the waiting threads will wake !*/</font> <font color='#0000FF'><u>void</u></font> <b><a name='broadcast'></a>broadcast</b> <font face='Lucida Console'>(</font> <font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>; <font color='#009900'>/*! ensures - any and all threads waiting on *this will wake !*/</font> <font color='#0000FF'>const</font> rmutex<font color='#5555FF'>&amp;</font> <b><a name='get_mutex'></a>get_mutex</b> <font face='Lucida Console'>(</font> <font face='Lucida Console'>)</font> <font color='#0000FF'>const</font>; <font color='#009900'>/*! ensures - returns a const reference to the rmutex associated with *this !*/</font> <font color='#0000FF'>private</font>: <font color='#009900'>// restricted functions </font> <b><a name='rsignaler'></a>rsignaler</b><font face='Lucida Console'>(</font>rsignaler<font color='#5555FF'>&amp;</font><font face='Lucida Console'>)</font>; <font color='#009900'>// copy constructor </font> rsignaler<font color='#5555FF'>&amp;</font> <b><a name='operator'></a>operator</b><font color='#5555FF'>=</font><font face='Lucida Console'>(</font>rsignaler<font color='#5555FF'>&amp;</font><font face='Lucida Console'>)</font>; <font color='#009900'>// assignment operator </font> <b>}</b>; <font color='#009900'>// ---------------------------------------------------------------------------------------- </font> <b>}</b> <font color='#0000FF'>#endif</font> <font color='#009900'>// DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_ </font> </pre></body></html>
{'content_hash': '18e23f1abdb350270a030fe9a2b33cf2', 'timestamp': '', 'source': 'github', 'line_count': 126, 'max_line_length': 291, 'avg_line_length': 54.01587301587302, 'alnum_prop': 0.5740523067881281, 'repo_name': 'weinitom/robot', 'id': '2f170a4b32746c5f0c8c932bb05dc1e02fff7b1c', 'size': '6806', 'binary': False, 'copies': '12', 'ref': 'refs/heads/master', 'path': 'attention_tracker/dlib-18.18/docs/dlib/threads/rsignaler_extension_abstract.h.html', 'mode': '33261', 'license': 'bsd-3-clause', 'language': [{'name': 'Batchfile', 'bytes': '102'}, {'name': 'C', 'bytes': '65630'}, {'name': 'C++', 'bytes': '26679542'}, {'name': 'CMake', 'bytes': '74823'}, {'name': 'CSS', 'bytes': '39095'}, {'name': 'HTML', 'bytes': '86448401'}, {'name': 'JavaScript', 'bytes': '164134'}, {'name': 'Makefile', 'bytes': '45669'}, {'name': 'Matlab', 'bytes': '524'}, {'name': 'Python', 'bytes': '141320'}, {'name': 'Shell', 'bytes': '222'}, {'name': 'XSLT', 'bytes': '36884'}]}
GitHub
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 74); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(97), baseMatchesProperty = __webpack_require__(140), identity = __webpack_require__(13), isArray = __webpack_require__(0), property = __webpack_require__(150); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(41); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(86), createBaseEach = __webpack_require__(49); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(40), isLength = __webpack_require__(29); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(77), getValue = __webpack_require__(83); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(9), getRawTag = __webpack_require__(79), objectToString = __webpack_require__(80); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(88), baseKeys = __webpack_require__(48), isArrayLike = __webpack_require__(4); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 8 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(2); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 10 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(6), isObjectLike = __webpack_require__(8); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(11); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 13 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { var toFinite = __webpack_require__(164); /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { var arrayAggregator = __webpack_require__(84), baseAggregator = __webpack_require__(85), baseIteratee = __webpack_require__(1), isArray = __webpack_require__(0); /** * Creates a function like `_.groupBy`. * * @private * @param {Function} setter The function to set accumulator values. * @param {Function} [initializer] The accumulator object initializer. * @returns {Function} Returns the new aggregator function. */ function createAggregator(setter, initializer) { return function(collection, iteratee) { var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; return func(collection, setter, baseIteratee(iteratee, 2), accumulator); }; } module.exports = createAggregator; /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(99), listCacheDelete = __webpack_require__(100), listCacheGet = __webpack_require__(101), listCacheHas = __webpack_require__(102), listCacheSet = __webpack_require__(103); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(30); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(5); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(117); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 20 */ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(30), isArrayLike = __webpack_require__(4), isIndex = __webpack_require__(28), isObject = __webpack_require__(10); /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } module.exports = isIterateeCall; /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(54), isFlattenable = __webpack_require__(169); /** * The base implementation of `_.flatten` with support for restricting flattening. * * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } module.exports = baseFlatten; /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(20), baseIteratee = __webpack_require__(1), baseMap = __webpack_require__(65), isArray = __webpack_require__(0); /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee, 3)); } module.exports = map; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { var baseValues = __webpack_require__(177), keys = __webpack_require__(7); /** * Creates an array of the own enumerable string keyed property values of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property values. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.values(new Foo); * // => [1, 2] (iteration order is not guaranteed) * * _.values('hi'); * // => ['h', 'i'] */ function values(object) { return object == null ? [] : baseValues(object, keys(object)); } module.exports = values; /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { var baseRandom = __webpack_require__(71); /** * A specialized version of `_.shuffle` which mutates and sets the size of `array`. * * @private * @param {Array} array The array to shuffle. * @param {number} [size=array.length] The size of `array`. * @returns {Array} Returns `array`. */ function shuffleSelf(array, size) { var index = -1, length = array.length, lastIndex = length - 1; size = size === undefined ? length : size; while (++index < size) { var rand = baseRandom(index, lastIndex), value = array[rand]; array[rand] = array[index]; array[index] = value; } array.length = size; return array; } module.exports = shuffleSelf; /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(39); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(90), isObjectLike = __webpack_require__(8); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 28 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 29 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 30 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(5), root = __webpack_require__(2); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(109), mapCacheDelete = __webpack_require__(116), mapCacheGet = __webpack_require__(118), mapCacheHas = __webpack_require__(119), mapCacheSet = __webpack_require__(120); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 33 */ /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(35), toKey = __webpack_require__(12); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /* 35 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(0), isKey = __webpack_require__(36), stringToPath = __webpack_require__(142), toString = __webpack_require__(145); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(0), isSymbol = __webpack_require__(11); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 37 */ /***/ (function(module, exports) { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /* 38 */ /***/ (function(module, exports) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(5); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(6), isObject = __webpack_require__(10); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(78))) /***/ }), /* 42 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /* 43 */ /***/ (function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(2), stubFalse = __webpack_require__(91); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(45)(module))) /***/ }), /* 45 */ /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(92), baseUnary = __webpack_require__(47), nodeUtil = __webpack_require__(93); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 47 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(94), nativeKeys = __webpack_require__(95); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(4); /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } module.exports = createBaseEach; /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(16), stackClear = __webpack_require__(104), stackDelete = __webpack_require__(105), stackGet = __webpack_require__(106), stackHas = __webpack_require__(107), stackSet = __webpack_require__(108); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(121), isObjectLike = __webpack_require__(8); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(122), arraySome = __webpack_require__(53), cacheHas = __webpack_require__(125); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /* 53 */ /***/ (function(module, exports) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /* 54 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(135), Map = __webpack_require__(31), Promise = __webpack_require__(136), Set = __webpack_require__(137), WeakMap = __webpack_require__(138), baseGetTag = __webpack_require__(6), toSource = __webpack_require__(42); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(10); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /* 57 */ /***/ (function(module, exports) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /* 58 */ /***/ (function(module, exports) { /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } module.exports = baseProperty; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { var arrayEach = __webpack_require__(153), baseEach = __webpack_require__(3), castFunction = __webpack_require__(60), isArray = __webpack_require__(0); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. * The iteratee is invoked with three arguments: (value, index|key, collection). * Iteratee functions may exit iteration early by explicitly returning `false`. * * **Note:** As with other "Collections" methods, objects with a "length" * property are iterated like arrays. To avoid this behavior use `_.forIn` * or `_.forOwn` for object iteration. * * @static * @memberOf _ * @since 0.1.0 * @alias each * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEachRight * @example * * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. * * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { var func = isArray(collection) ? arrayEach : baseEach; return func(collection, castFunction(iteratee)); } module.exports = forEach; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(13); /** * Casts `value` to `identity` if it's not a function. * * @private * @param {*} value The value to inspect. * @returns {Function} Returns cast function. */ function castFunction(value) { return typeof value == 'function' ? value : identity; } module.exports = castFunction; /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { var arrayEachRight = __webpack_require__(155), baseEachRight = __webpack_require__(62), castFunction = __webpack_require__(60), isArray = __webpack_require__(0); /** * This method is like `_.forEach` except that it iterates over elements of * `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @alias eachRight * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEach * @example * * _.forEachRight([1, 2], function(value) { * console.log(value); * }); * // => Logs `2` then `1`. */ function forEachRight(collection, iteratee) { var func = isArray(collection) ? arrayEachRight : baseEachRight; return func(collection, castFunction(iteratee)); } module.exports = forEachRight; /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwnRight = __webpack_require__(156), createBaseEach = __webpack_require__(49); /** * The base implementation of `_.forEachRight` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEachRight = createBaseEach(baseForOwnRight, true); module.exports = baseEachRight; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(3); /** * The base implementation of `_.filter` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function baseFilter(collection, predicate) { var result = []; baseEach(collection, function(value, index, collection) { if (predicate(value, index, collection)) { result.push(value); } }); return result; } module.exports = baseFilter; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { var baseIteratee = __webpack_require__(1), isArrayLike = __webpack_require__(4), keys = __webpack_require__(7); /** * Creates a `_.find` or `_.findLast` function. * * @private * @param {Function} findIndexFunc The function to find the collection index. * @returns {Function} Returns the new find function. */ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); if (!isArrayLike(collection)) { var iteratee = baseIteratee(predicate, 3); collection = keys(collection); predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } var index = findIndexFunc(collection, predicate, fromIndex); return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } module.exports = createFind; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(3), isArrayLike = __webpack_require__(4); /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } module.exports = baseMap; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(6), isArray = __webpack_require__(0), isObjectLike = __webpack_require__(8); /** `Object#toString` result references. */ var stringTag = '[object String]'; /** * Checks if `value` is classified as a `String` primitive or object. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); * // => true * * _.isString(1); * // => false */ function isString(value) { return typeof value == 'string' || (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } module.exports = isString; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(13), overRest = __webpack_require__(183), setToString = __webpack_require__(184); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(20), baseIteratee = __webpack_require__(1), baseMap = __webpack_require__(65), baseSortBy = __webpack_require__(190), baseUnary = __webpack_require__(47), compareMultiple = __webpack_require__(191), identity = __webpack_require__(13); /** * The base implementation of `_.orderBy` without param guards. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. * @param {string[]} orders The sort orders of `iteratees`. * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { var index = -1; iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); return { 'criteria': criteria, 'index': ++index, 'value': value }; }); return baseSortBy(result, function(object, other) { return compareMultiple(object, other, orders); }); } module.exports = baseOrderBy; /***/ }), /* 69 */ /***/ (function(module, exports) { /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} accumulator The initial value. * @param {boolean} initAccum Specify using the first or last element of * `collection` as the initial value. * @param {Function} eachFunc The function to iterate over `collection`. * @returns {*} Returns the accumulated value. */ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index, collection) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection); }); return accumulator; } module.exports = baseReduce; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { var baseRandom = __webpack_require__(71); /** * A specialized version of `_.sample` for arrays. * * @private * @param {Array} array The array to sample. * @returns {*} Returns the random element. */ function arraySample(array) { var length = array.length; return length ? array[baseRandom(0, length - 1)] : undefined; } module.exports = arraySample; /***/ }), /* 71 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeFloor = Math.floor, nativeRandom = Math.random; /** * The base implementation of `_.random` without support for returning * floating-point numbers. * * @private * @param {number} lower The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the random number. */ function baseRandom(lower, upper) { return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); } module.exports = baseRandom; /***/ }), /* 72 */ /***/ (function(module, exports) { /** * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. * @param {number} [lower] The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the clamped number. */ function baseClamp(number, lower, upper) { if (number === number) { if (upper !== undefined) { number = number <= upper ? number : upper; } if (lower !== undefined) { number = number >= lower ? number : lower; } } return number; } module.exports = baseClamp; /***/ }), /* 73 */ /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /* 74 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_collection__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_collection___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_collection__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__people__ = __webpack_require__(216); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__styles_sass__ = __webpack_require__(217); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__styles_sass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__styles_sass__); const managerGroups = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_collection__["groupBy"])(__WEBPACK_IMPORTED_MODULE_1__people__["a" /* default */], 'manager') const root = document.querySelector('.root'); root.innerHTML = '<pre>' + JSON.stringify(managerGroups, null, 2) + '</p>'; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { 'countBy': __webpack_require__(76), 'each': __webpack_require__(152), 'eachRight': __webpack_require__(154), 'every': __webpack_require__(158), 'filter': __webpack_require__(161), 'find': __webpack_require__(162), 'findLast': __webpack_require__(166), 'flatMap': __webpack_require__(168), 'flatMapDeep': __webpack_require__(170), 'flatMapDepth': __webpack_require__(171), 'forEach': __webpack_require__(59), 'forEachRight': __webpack_require__(61), 'groupBy': __webpack_require__(172), 'includes': __webpack_require__(173), 'invokeMap': __webpack_require__(178), 'keyBy': __webpack_require__(188), 'map': __webpack_require__(23), 'orderBy': __webpack_require__(189), 'partition': __webpack_require__(193), 'reduce': __webpack_require__(194), 'reduceRight': __webpack_require__(196), 'reject': __webpack_require__(198), 'sample': __webpack_require__(200), 'sampleSize': __webpack_require__(202), 'shuffle': __webpack_require__(205), 'size': __webpack_require__(208), 'some': __webpack_require__(213), 'sortBy': __webpack_require__(215) }; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(26), createAggregator = __webpack_require__(15); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an object composed of keys generated from the results of running * each element of `collection` thru `iteratee`. The corresponding value of * each key is the number of times the key was returned by `iteratee`. The * iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 0.5.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * * _.countBy([6.1, 4.2, 6.3], Math.floor); * // => { '4': 1, '6': 2 } * * // The `_.property` iteratee shorthand. * _.countBy(['one', 'two', 'three'], 'length'); * // => { '3': 2, '5': 1 } */ var countBy = createAggregator(function(result, value, key) { if (hasOwnProperty.call(result, key)) { ++result[key]; } else { baseAssignValue(result, key, 1); } }); module.exports = countBy; /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(40), isMasked = __webpack_require__(81), isObject = __webpack_require__(10), toSource = __webpack_require__(42); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /* 78 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(9); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /* 80 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(82); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(2); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /* 83 */ /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /* 84 */ /***/ (function(module, exports) { /** * A specialized version of `baseAggregator` for arrays. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. * @returns {Function} Returns `accumulator`. */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { var value = array[index]; setter(accumulator, value, iteratee(value), array); } return accumulator; } module.exports = arrayAggregator; /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(3); /** * Aggregates elements of `collection` on `accumulator` with keys transformed * by `iteratee` and values set by `setter`. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. * @returns {Function} Returns `accumulator`. */ function baseAggregator(collection, setter, iteratee, accumulator) { baseEach(collection, function(value, key, collection) { setter(accumulator, value, iteratee(value), collection); }); return accumulator; } module.exports = baseAggregator; /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { var baseFor = __webpack_require__(87), keys = __webpack_require__(7); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }), /* 87 */ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(43); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(89), isArguments = __webpack_require__(27), isArray = __webpack_require__(0), isBuffer = __webpack_require__(44), isIndex = __webpack_require__(28), isTypedArray = __webpack_require__(46); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /* 89 */ /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /* 90 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(6), isObjectLike = __webpack_require__(8); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /* 91 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(6), isLength = __webpack_require__(29), isObjectLike = __webpack_require__(8); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /* 93 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(41); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(45)(module))) /***/ }), /* 94 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(96); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 96 */ /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { var baseIsMatch = __webpack_require__(98), getMatchData = __webpack_require__(139), matchesStrictComparable = __webpack_require__(57); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }), /* 98 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(50), baseIsEqual = __webpack_require__(51); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }), /* 99 */ /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /* 100 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(17); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(17); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /* 102 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(17); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /* 103 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(17); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(16); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /* 105 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /* 106 */ /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /* 107 */ /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /* 108 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(16), Map = __webpack_require__(31), MapCache = __webpack_require__(32); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /* 109 */ /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__(110), ListCache = __webpack_require__(16), Map = __webpack_require__(31); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(111), hashDelete = __webpack_require__(112), hashGet = __webpack_require__(113), hashHas = __webpack_require__(114), hashSet = __webpack_require__(115); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(18); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /* 112 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(18); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(18); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(18); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(19); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /* 117 */ /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(19); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /* 119 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(19); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /* 120 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(19); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /* 121 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(50), equalArrays = __webpack_require__(52), equalByTag = __webpack_require__(126), equalObjects = __webpack_require__(130), getTag = __webpack_require__(55), isArray = __webpack_require__(0), isBuffer = __webpack_require__(44), isTypedArray = __webpack_require__(46); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(32), setCacheAdd = __webpack_require__(123), setCacheHas = __webpack_require__(124); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /* 123 */ /***/ (function(module, exports) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }), /* 124 */ /***/ (function(module, exports) { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }), /* 125 */ /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /* 126 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(9), Uint8Array = __webpack_require__(127), eq = __webpack_require__(30), equalArrays = __webpack_require__(52), mapToArray = __webpack_require__(128), setToArray = __webpack_require__(129); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(2); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 128 */ /***/ (function(module, exports) { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }), /* 129 */ /***/ (function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /* 130 */ /***/ (function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(131); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /* 131 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(132), getSymbols = __webpack_require__(133), keys = __webpack_require__(7); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /* 132 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(54), isArray = __webpack_require__(0); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(33), stubArray = __webpack_require__(134); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 134 */ /***/ (function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /* 135 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(5), root = __webpack_require__(2); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(5), root = __webpack_require__(2); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /* 137 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(5), root = __webpack_require__(2); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /* 138 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(5), root = __webpack_require__(2); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 139 */ /***/ (function(module, exports, __webpack_require__) { var isStrictComparable = __webpack_require__(56), keys = __webpack_require__(7); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }), /* 140 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(51), get = __webpack_require__(141), hasIn = __webpack_require__(147), isKey = __webpack_require__(36), isStrictComparable = __webpack_require__(56), matchesStrictComparable = __webpack_require__(57), toKey = __webpack_require__(12); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }), /* 141 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(34); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(143); /** Used to match property names within property paths. */ var reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (reLeadingDot.test(string)) { result.push(''); } string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /* 143 */ /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__(144); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /* 144 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(32); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /* 145 */ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(146); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /* 146 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(9), arrayMap = __webpack_require__(20), isArray = __webpack_require__(0), isSymbol = __webpack_require__(11); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /* 147 */ /***/ (function(module, exports, __webpack_require__) { var baseHasIn = __webpack_require__(148), hasPath = __webpack_require__(149); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }), /* 148 */ /***/ (function(module, exports) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(35), isArguments = __webpack_require__(27), isArray = __webpack_require__(0), isIndex = __webpack_require__(28), isLength = __webpack_require__(29), toKey = __webpack_require__(12); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /* 150 */ /***/ (function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(58), basePropertyDeep = __webpack_require__(151), isKey = __webpack_require__(36), toKey = __webpack_require__(12); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }), /* 151 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(34); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(59); /***/ }), /* 153 */ /***/ (function(module, exports) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(61); /***/ }), /* 155 */ /***/ (function(module, exports) { /** * A specialized version of `_.forEachRight` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEachRight(array, iteratee) { var length = array == null ? 0 : array.length; while (length--) { if (iteratee(array[length], length, array) === false) { break; } } return array; } module.exports = arrayEachRight; /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { var baseForRight = __webpack_require__(157), keys = __webpack_require__(7); /** * The base implementation of `_.forOwnRight` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwnRight(object, iteratee) { return object && baseForRight(object, iteratee, keys); } module.exports = baseForOwnRight; /***/ }), /* 157 */ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(43); /** * This function is like `baseFor` except that it iterates over properties * in the opposite order. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseForRight = createBaseFor(true); module.exports = baseForRight; /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { var arrayEvery = __webpack_require__(159), baseEvery = __webpack_require__(160), baseIteratee = __webpack_require__(1), isArray = __webpack_require__(0), isIterateeCall = __webpack_require__(21); /** * Checks if `predicate` returns truthy for **all** elements of `collection`. * Iteration is stopped once `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index|key, collection). * * **Note:** This method returns `true` for * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of * elements of empty collections. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. * @example * * _.every([true, 1, null, 'yes'], Boolean); * // => false * * var users = [ * { 'user': 'barney', 'age': 36, 'active': false }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * // The `_.matches` iteratee shorthand. * _.every(users, { 'user': 'barney', 'active': false }); * // => false * * // The `_.matchesProperty` iteratee shorthand. * _.every(users, ['active', false]); * // => true * * // The `_.property` iteratee shorthand. * _.every(users, 'active'); * // => false */ function every(collection, predicate, guard) { var func = isArray(collection) ? arrayEvery : baseEvery; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined; } return func(collection, baseIteratee(predicate, 3)); } module.exports = every; /***/ }), /* 159 */ /***/ (function(module, exports) { /** * A specialized version of `_.every` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. */ function arrayEvery(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (!predicate(array[index], index, array)) { return false; } } return true; } module.exports = arrayEvery; /***/ }), /* 160 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(3); /** * The base implementation of `_.every` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false` */ function baseEvery(collection, predicate) { var result = true; baseEach(collection, function(value, index, collection) { result = !!predicate(value, index, collection); return result; }); return result; } module.exports = baseEvery; /***/ }), /* 161 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(33), baseFilter = __webpack_require__(63), baseIteratee = __webpack_require__(1), isArray = __webpack_require__(0); /** * Iterates over elements of `collection`, returning an array of all elements * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * **Note:** Unlike `_.remove`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * _.filter(users, function(o) { return !o.active; }); * // => objects for ['fred'] * * // The `_.matches` iteratee shorthand. * _.filter(users, { 'age': 36, 'active': true }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.filter(users, ['active', false]); * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, baseIteratee(predicate, 3)); } module.exports = filter; /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { var createFind = __webpack_require__(64), findIndex = __webpack_require__(163); /** * Iterates over elements of `collection`, returning the first element * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false }, * { 'user': 'pebbles', 'age': 1, 'active': true } * ]; * * _.find(users, function(o) { return o.age < 40; }); * // => object for 'barney' * * // The `_.matches` iteratee shorthand. * _.find(users, { 'age': 1, 'active': true }); * // => object for 'pebbles' * * // The `_.matchesProperty` iteratee shorthand. * _.find(users, ['active', false]); * // => object for 'fred' * * // The `_.property` iteratee shorthand. * _.find(users, 'active'); * // => object for 'barney' */ var find = createFind(findIndex); module.exports = find; /***/ }), /* 163 */ /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(37), baseIteratee = __webpack_require__(1), toInteger = __webpack_require__(14); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.findIndex(users, function(o) { return o.user == 'barney'; }); * // => 0 * * // The `_.matches` iteratee shorthand. * _.findIndex(users, { 'user': 'fred', 'active': false }); * // => 1 * * // The `_.matchesProperty` iteratee shorthand. * _.findIndex(users, ['active', false]); * // => 0 * * // The `_.property` iteratee shorthand. * _.findIndex(users, 'active'); * // => 2 */ function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; /***/ }), /* 164 */ /***/ (function(module, exports, __webpack_require__) { var toNumber = __webpack_require__(165); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308; /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } module.exports = toFinite; /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(10), isSymbol = __webpack_require__(11); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { var createFind = __webpack_require__(64), findLastIndex = __webpack_require__(167); /** * This method is like `_.find` except that it iterates over elements of * `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * _.findLast([1, 2, 3, 4], function(n) { * return n % 2 == 1; * }); * // => 3 */ var findLast = createFind(findLastIndex); module.exports = findLast; /***/ }), /* 167 */ /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(37), baseIteratee = __webpack_require__(1), toInteger = __webpack_require__(14); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * This method is like `_.findIndex` except that it iterates over elements * of `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': false } * ]; * * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); * // => 2 * * // The `_.matches` iteratee shorthand. * _.findLastIndex(users, { 'user': 'barney', 'active': true }); * // => 0 * * // The `_.matchesProperty` iteratee shorthand. * _.findLastIndex(users, ['active', false]); * // => 2 * * // The `_.property` iteratee shorthand. * _.findLastIndex(users, 'active'); * // => 0 */ function findLastIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = length - 1; if (fromIndex !== undefined) { index = toInteger(fromIndex); index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } return baseFindIndex(array, baseIteratee(predicate, 3), index, true); } module.exports = findLastIndex; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(22), map = __webpack_require__(23); /** * Creates a flattened array of values by running each element in `collection` * thru `iteratee` and flattening the mapped results. The iteratee is invoked * with three arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * * function duplicate(n) { * return [n, n]; * } * * _.flatMap([1, 2], duplicate); * // => [1, 1, 2, 2] */ function flatMap(collection, iteratee) { return baseFlatten(map(collection, iteratee), 1); } module.exports = flatMap; /***/ }), /* 169 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(9), isArguments = __webpack_require__(27), isArray = __webpack_require__(0); /** Built-in value references. */ var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; /***/ }), /* 170 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(22), map = __webpack_require__(23); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * This method is like `_.flatMap` except that it recursively flattens the * mapped results. * * @static * @memberOf _ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * * function duplicate(n) { * return [[[n, n]]]; * } * * _.flatMapDeep([1, 2], duplicate); * // => [1, 1, 2, 2] */ function flatMapDeep(collection, iteratee) { return baseFlatten(map(collection, iteratee), INFINITY); } module.exports = flatMapDeep; /***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(22), map = __webpack_require__(23), toInteger = __webpack_require__(14); /** * This method is like `_.flatMap` except that it recursively flattens the * mapped results up to `depth` times. * * @static * @memberOf _ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. * @example * * function duplicate(n) { * return [[[n, n]]]; * } * * _.flatMapDepth([1, 2], duplicate, 2); * // => [[1, 1], [2, 2]] */ function flatMapDepth(collection, iteratee, depth) { depth = depth === undefined ? 1 : toInteger(depth); return baseFlatten(map(collection, iteratee), depth); } module.exports = flatMapDepth; /***/ }), /* 172 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(26), createAggregator = __webpack_require__(15); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an object composed of keys generated from the results of running * each element of `collection` thru `iteratee`. The order of grouped values * is determined by the order they occur in `collection`. The corresponding * value of each key is an array of elements responsible for generating the * key. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * * _.groupBy([6.1, 4.2, 6.3], Math.floor); * // => { '4': [4.2], '6': [6.1, 6.3] } * * // The `_.property` iteratee shorthand. * _.groupBy(['one', 'two', 'three'], 'length'); * // => { '3': ['one', 'two'], '5': ['three'] } */ var groupBy = createAggregator(function(result, value, key) { if (hasOwnProperty.call(result, key)) { result[key].push(value); } else { baseAssignValue(result, key, [value]); } }); module.exports = groupBy; /***/ }), /* 173 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(174), isArrayLike = __webpack_require__(4), isString = __webpack_require__(66), toInteger = __webpack_require__(14), values = __webpack_require__(24); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {boolean} Returns `true` if `value` is found, else `false`. * @example * * _.includes([1, 2, 3], 1); * // => true * * _.includes([1, 2, 3], 1, 2); * // => false * * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { collection = isArrayLike(collection) ? collection : values(collection); fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; var length = collection.length; if (fromIndex < 0) { fromIndex = nativeMax(length + fromIndex, 0); } return isString(collection) ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } module.exports = includes; /***/ }), /* 174 */ /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(37), baseIsNaN = __webpack_require__(175), strictIndexOf = __webpack_require__(176); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; /***/ }), /* 175 */ /***/ (function(module, exports) { /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } module.exports = baseIsNaN; /***/ }), /* 176 */ /***/ (function(module, exports) { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /* 177 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(20); /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names * of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the array of property values. */ function baseValues(object, props) { return arrayMap(props, function(key) { return object[key]; }); } module.exports = baseValues; /***/ }), /* 178 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(38), baseEach = __webpack_require__(3), baseInvoke = __webpack_require__(179), baseRest = __webpack_require__(67), isArrayLike = __webpack_require__(4); /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments * are provided to each invoked method. If `path` is a function, it's invoked * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Array|Function|string} path The path of the method to invoke or * the function invoked per iteration. * @param {...*} [args] The arguments to invoke each method with. * @returns {Array} Returns the array of results. * @example * * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); * // => [[1, 5, 7], [1, 2, 3]] * * _.invokeMap([123, 456], String.prototype.split, ''); * // => [['1', '2', '3'], ['4', '5', '6']] */ var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value) { result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); }); return result; }); module.exports = invokeMap; /***/ }), /* 179 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(38), castPath = __webpack_require__(35), last = __webpack_require__(180), parent = __webpack_require__(181), toKey = __webpack_require__(12); /** * The base implementation of `_.invoke` without support for individual * method arguments. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the method to invoke. * @param {Array} args The arguments to invoke the method with. * @returns {*} Returns the result of the invoked method. */ function baseInvoke(object, path, args) { path = castPath(path, object); object = parent(object, path); var func = object == null ? object : object[toKey(last(path))]; return func == null ? undefined : apply(func, object, args); } module.exports = baseInvoke; /***/ }), /* 180 */ /***/ (function(module, exports) { /** * Gets the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {*} Returns the last element of `array`. * @example * * _.last([1, 2, 3]); * // => 3 */ function last(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } module.exports = last; /***/ }), /* 181 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(34), baseSlice = __webpack_require__(182); /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } module.exports = parent; /***/ }), /* 182 */ /***/ (function(module, exports) { /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } module.exports = baseSlice; /***/ }), /* 183 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(38); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /* 184 */ /***/ (function(module, exports, __webpack_require__) { var baseSetToString = __webpack_require__(185), shortOut = __webpack_require__(187); /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); module.exports = setToString; /***/ }), /* 185 */ /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(186), defineProperty = __webpack_require__(39), identity = __webpack_require__(13); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /* 186 */ /***/ (function(module, exports) { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /* 187 */ /***/ (function(module, exports) { /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } module.exports = shortOut; /***/ }), /* 188 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(26), createAggregator = __webpack_require__(15); /** * Creates an object composed of keys generated from the results of running * each element of `collection` thru `iteratee`. The corresponding value of * each key is the last element responsible for generating the key. The * iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * * var array = [ * { 'dir': 'left', 'code': 97 }, * { 'dir': 'right', 'code': 100 } * ]; * * _.keyBy(array, function(o) { * return String.fromCharCode(o.code); * }); * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } * * _.keyBy(array, 'dir'); * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { baseAssignValue(result, key, value); }); module.exports = keyBy; /***/ }), /* 189 */ /***/ (function(module, exports, __webpack_require__) { var baseOrderBy = __webpack_require__(68), isArray = __webpack_require__(0); /** * This method is like `_.sortBy` except that it allows specifying the sort * orders of the iteratees to sort by. If `orders` is unspecified, all values * are sorted in ascending order. Otherwise, specify an order of "desc" for * descending or "asc" for ascending sort order of corresponding values. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] * The iteratees to sort by. * @param {string[]} [orders] The sort orders of `iteratees`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {Array} Returns the new sorted array. * @example * * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 34 }, * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 36 } * ]; * * // Sort by `user` in ascending order and by `age` in descending order. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ function orderBy(collection, iteratees, orders, guard) { if (collection == null) { return []; } if (!isArray(iteratees)) { iteratees = iteratees == null ? [] : [iteratees]; } orders = guard ? undefined : orders; if (!isArray(orders)) { orders = orders == null ? [] : [orders]; } return baseOrderBy(collection, iteratees, orders); } module.exports = orderBy; /***/ }), /* 190 */ /***/ (function(module, exports) { /** * The base implementation of `_.sortBy` which uses `comparer` to define the * sort order of `array` and replaces criteria objects with their corresponding * values. * * @private * @param {Array} array The array to sort. * @param {Function} comparer The function to define sort order. * @returns {Array} Returns `array`. */ function baseSortBy(array, comparer) { var length = array.length; array.sort(comparer); while (length--) { array[length] = array[length].value; } return array; } module.exports = baseSortBy; /***/ }), /* 191 */ /***/ (function(module, exports, __webpack_require__) { var compareAscending = __webpack_require__(192); /** * Used by `_.orderBy` to compare multiple properties of a value to another * and stable sort them. * * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, * specify an order of "desc" for descending or "asc" for ascending sort order * of corresponding values. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {boolean[]|string[]} orders The order to sort by for each property. * @returns {number} Returns the sort order indicator for `object`. */ function compareMultiple(object, other, orders) { var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; while (++index < length) { var result = compareAscending(objCriteria[index], othCriteria[index]); if (result) { if (index >= ordersLength) { return result; } var order = orders[index]; return result * (order == 'desc' ? -1 : 1); } } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circumstances, to provide the same value for // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 // for more details. // // This also ensures a stable sort in V8 and other engines. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. return object.index - other.index; } module.exports = compareMultiple; /***/ }), /* 192 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(11); /** * Compares values to sort them in ascending order. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {number} Returns the sort order indicator for `value`. */ function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || (valIsNull && othIsDefined && othIsReflexive) || (!valIsDefined && othIsReflexive) || !valIsReflexive) { return 1; } if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || (othIsNull && valIsDefined && valIsReflexive) || (!othIsDefined && valIsReflexive) || !othIsReflexive) { return -1; } } return 0; } module.exports = compareAscending; /***/ }), /* 193 */ /***/ (function(module, exports, __webpack_require__) { var createAggregator = __webpack_require__(15); /** * Creates an array of elements split into two groups, the first of which * contains elements `predicate` returns truthy for, the second of which * contains elements `predicate` returns falsey for. The predicate is * invoked with one argument: (value). * * @static * @memberOf _ * @since 3.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of grouped elements. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': false }, * { 'user': 'fred', 'age': 40, 'active': true }, * { 'user': 'pebbles', 'age': 1, 'active': false } * ]; * * _.partition(users, function(o) { return o.active; }); * // => objects for [['fred'], ['barney', 'pebbles']] * * // The `_.matches` iteratee shorthand. * _.partition(users, { 'age': 1, 'active': false }); * // => objects for [['pebbles'], ['barney', 'fred']] * * // The `_.matchesProperty` iteratee shorthand. * _.partition(users, ['active', false]); * // => objects for [['barney', 'pebbles'], ['fred']] * * // The `_.property` iteratee shorthand. * _.partition(users, 'active'); * // => objects for [['fred'], ['barney', 'pebbles']] */ var partition = createAggregator(function(result, value, key) { result[key ? 0 : 1].push(value); }, function() { return [[], []]; }); module.exports = partition; /***/ }), /* 194 */ /***/ (function(module, exports, __webpack_require__) { var arrayReduce = __webpack_require__(195), baseEach = __webpack_require__(3), baseIteratee = __webpack_require__(1), baseReduce = __webpack_require__(69), isArray = __webpack_require__(0); /** * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.reduce`, `_.reduceRight`, and `_.transform`. * * The guarded methods are: * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, * and `sortBy` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { * return sum + n; * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); * return result; * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ function reduce(collection, iteratee, accumulator) { var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); } module.exports = reduce; /***/ }), /* 195 */ /***/ (function(module, exports) { /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } module.exports = arrayReduce; /***/ }), /* 196 */ /***/ (function(module, exports, __webpack_require__) { var arrayReduceRight = __webpack_require__(197), baseEachRight = __webpack_require__(62), baseIteratee = __webpack_require__(1), baseReduce = __webpack_require__(69), isArray = __webpack_require__(0); /** * This method is like `_.reduce` except that it iterates over elements of * `collection` from right to left. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. * @see _.reduce * @example * * var array = [[0, 1], [2, 3], [4, 5]]; * * _.reduceRight(array, function(flattened, other) { * return flattened.concat(other); * }, []); * // => [4, 5, 2, 3, 0, 1] */ function reduceRight(collection, iteratee, accumulator) { var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3; return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); } module.exports = reduceRight; /***/ }), /* 197 */ /***/ (function(module, exports) { /** * A specialized version of `_.reduceRight` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the last element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduceRight(array, iteratee, accumulator, initAccum) { var length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[--length]; } while (length--) { accumulator = iteratee(accumulator, array[length], length, array); } return accumulator; } module.exports = arrayReduceRight; /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(33), baseFilter = __webpack_require__(63), baseIteratee = __webpack_require__(1), isArray = __webpack_require__(0), negate = __webpack_require__(199); /** * The opposite of `_.filter`; this method returns the elements of `collection` * that `predicate` does **not** return truthy for. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.filter * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': false }, * { 'user': 'fred', 'age': 40, 'active': true } * ]; * * _.reject(users, function(o) { return !o.active; }); * // => objects for ['fred'] * * // The `_.matches` iteratee shorthand. * _.reject(users, { 'age': 40, 'active': true }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.reject(users, ['active', false]); * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. * _.reject(users, 'active'); * // => objects for ['barney'] */ function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, negate(baseIteratee(predicate, 3))); } module.exports = reject; /***/ }), /* 199 */ /***/ (function(module, exports) { /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that negates the result of the predicate `func`. The * `func` predicate is invoked with the `this` binding and arguments of the * created function. * * @static * @memberOf _ * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { * return n % 2 == 0; * } * * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); * // => [1, 3, 5] */ function negate(predicate) { if (typeof predicate != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } return function() { var args = arguments; switch (args.length) { case 0: return !predicate.call(this); case 1: return !predicate.call(this, args[0]); case 2: return !predicate.call(this, args[0], args[1]); case 3: return !predicate.call(this, args[0], args[1], args[2]); } return !predicate.apply(this, args); }; } module.exports = negate; /***/ }), /* 200 */ /***/ (function(module, exports, __webpack_require__) { var arraySample = __webpack_require__(70), baseSample = __webpack_require__(201), isArray = __webpack_require__(0); /** * Gets a random element from `collection`. * * @static * @memberOf _ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to sample. * @returns {*} Returns the random element. * @example * * _.sample([1, 2, 3, 4]); * // => 2 */ function sample(collection) { var func = isArray(collection) ? arraySample : baseSample; return func(collection); } module.exports = sample; /***/ }), /* 201 */ /***/ (function(module, exports, __webpack_require__) { var arraySample = __webpack_require__(70), values = __webpack_require__(24); /** * The base implementation of `_.sample`. * * @private * @param {Array|Object} collection The collection to sample. * @returns {*} Returns the random element. */ function baseSample(collection) { return arraySample(values(collection)); } module.exports = baseSample; /***/ }), /* 202 */ /***/ (function(module, exports, __webpack_require__) { var arraySampleSize = __webpack_require__(203), baseSampleSize = __webpack_require__(204), isArray = __webpack_require__(0), isIterateeCall = __webpack_require__(21), toInteger = __webpack_require__(14); /** * Gets `n` random elements at unique keys from `collection` up to the * size of `collection`. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to sample. * @param {number} [n=1] The number of elements to sample. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the random elements. * @example * * _.sampleSize([1, 2, 3], 2); * // => [3, 1] * * _.sampleSize([1, 2, 3], 4); * // => [2, 3, 1] */ function sampleSize(collection, n, guard) { if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { n = 1; } else { n = toInteger(n); } var func = isArray(collection) ? arraySampleSize : baseSampleSize; return func(collection, n); } module.exports = sampleSize; /***/ }), /* 203 */ /***/ (function(module, exports, __webpack_require__) { var baseClamp = __webpack_require__(72), copyArray = __webpack_require__(73), shuffleSelf = __webpack_require__(25); /** * A specialized version of `_.sampleSize` for arrays. * * @private * @param {Array} array The array to sample. * @param {number} n The number of elements to sample. * @returns {Array} Returns the random elements. */ function arraySampleSize(array, n) { return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); } module.exports = arraySampleSize; /***/ }), /* 204 */ /***/ (function(module, exports, __webpack_require__) { var baseClamp = __webpack_require__(72), shuffleSelf = __webpack_require__(25), values = __webpack_require__(24); /** * The base implementation of `_.sampleSize` without param guards. * * @private * @param {Array|Object} collection The collection to sample. * @param {number} n The number of elements to sample. * @returns {Array} Returns the random elements. */ function baseSampleSize(collection, n) { var array = values(collection); return shuffleSelf(array, baseClamp(n, 0, array.length)); } module.exports = baseSampleSize; /***/ }), /* 205 */ /***/ (function(module, exports, __webpack_require__) { var arrayShuffle = __webpack_require__(206), baseShuffle = __webpack_require__(207), isArray = __webpack_require__(0); /** * Creates an array of shuffled values, using a version of the * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to shuffle. * @returns {Array} Returns the new shuffled array. * @example * * _.shuffle([1, 2, 3, 4]); * // => [4, 1, 3, 2] */ function shuffle(collection) { var func = isArray(collection) ? arrayShuffle : baseShuffle; return func(collection); } module.exports = shuffle; /***/ }), /* 206 */ /***/ (function(module, exports, __webpack_require__) { var copyArray = __webpack_require__(73), shuffleSelf = __webpack_require__(25); /** * A specialized version of `_.shuffle` for arrays. * * @private * @param {Array} array The array to shuffle. * @returns {Array} Returns the new shuffled array. */ function arrayShuffle(array) { return shuffleSelf(copyArray(array)); } module.exports = arrayShuffle; /***/ }), /* 207 */ /***/ (function(module, exports, __webpack_require__) { var shuffleSelf = __webpack_require__(25), values = __webpack_require__(24); /** * The base implementation of `_.shuffle`. * * @private * @param {Array|Object} collection The collection to shuffle. * @returns {Array} Returns the new shuffled array. */ function baseShuffle(collection) { return shuffleSelf(values(collection)); } module.exports = baseShuffle; /***/ }), /* 208 */ /***/ (function(module, exports, __webpack_require__) { var baseKeys = __webpack_require__(48), getTag = __webpack_require__(55), isArrayLike = __webpack_require__(4), isString = __webpack_require__(66), stringSize = __webpack_require__(209); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** * Gets the size of `collection` by returning its length for array-like * values or the number of own enumerable string keyed properties for objects. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * * _.size([1, 2, 3]); * // => 3 * * _.size({ 'a': 1, 'b': 2 }); * // => 2 * * _.size('pebbles'); * // => 7 */ function size(collection) { if (collection == null) { return 0; } if (isArrayLike(collection)) { return isString(collection) ? stringSize(collection) : collection.length; } var tag = getTag(collection); if (tag == mapTag || tag == setTag) { return collection.size; } return baseKeys(collection).length; } module.exports = size; /***/ }), /* 209 */ /***/ (function(module, exports, __webpack_require__) { var asciiSize = __webpack_require__(210), hasUnicode = __webpack_require__(211), unicodeSize = __webpack_require__(212); /** * Gets the number of symbols in `string`. * * @private * @param {string} string The string to inspect. * @returns {number} Returns the string size. */ function stringSize(string) { return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); } module.exports = stringSize; /***/ }), /* 210 */ /***/ (function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(58); /** * Gets the size of an ASCII `string`. * * @private * @param {string} string The string inspect. * @returns {number} Returns the string size. */ var asciiSize = baseProperty('length'); module.exports = asciiSize; /***/ }), /* 211 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsZWJ = '\\u200d'; /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** * Checks if `string` contains Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ function hasUnicode(string) { return reHasUnicode.test(string); } module.exports = hasUnicode; /***/ }), /* 212 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + rsAstralRange + ']', rsCombo = '[' + rsComboRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** * Gets the size of a Unicode `string`. * * @private * @param {string} string The string inspect. * @returns {number} Returns the string size. */ function unicodeSize(string) { var result = reUnicode.lastIndex = 0; while (reUnicode.test(string)) { ++result; } return result; } module.exports = unicodeSize; /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { var arraySome = __webpack_require__(53), baseIteratee = __webpack_require__(1), baseSome = __webpack_require__(214), isArray = __webpack_require__(0), isIterateeCall = __webpack_require__(21); /** * Checks if `predicate` returns truthy for **any** element of `collection`. * Iteration is stopped once `predicate` returns truthy. The predicate is * invoked with three arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. * @example * * _.some([null, 0, 'yes', false], Boolean); * // => true * * var users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false } * ]; * * // The `_.matches` iteratee shorthand. * _.some(users, { 'user': 'barney', 'active': false }); * // => false * * // The `_.matchesProperty` iteratee shorthand. * _.some(users, ['active', false]); * // => true * * // The `_.property` iteratee shorthand. * _.some(users, 'active'); * // => true */ function some(collection, predicate, guard) { var func = isArray(collection) ? arraySome : baseSome; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined; } return func(collection, baseIteratee(predicate, 3)); } module.exports = some; /***/ }), /* 214 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(3); /** * The base implementation of `_.some` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function baseSome(collection, predicate) { var result; baseEach(collection, function(value, index, collection) { result = predicate(value, index, collection); return !result; }); return !!result; } module.exports = baseSome; /***/ }), /* 215 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(22), baseOrderBy = __webpack_require__(68), baseRest = __webpack_require__(67), isIterateeCall = __webpack_require__(21); /** * Creates an array of elements, sorted in ascending order by the results of * running each element in a collection thru each iteratee. This method * performs a stable sort, that is, it preserves the original sort order of * equal elements. The iteratees are invoked with one argument: (value). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {...(Function|Function[])} [iteratees=[_.identity]] * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } var length = iteratees.length; if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { iteratees = []; } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); module.exports = sortBy; /***/ }), /* 216 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; const people = [{ manager: 'Jen', name: 'Bob' }, { manager: 'Jen', name: 'Sue' }, { manager: 'Bob', name: 'Shirley' }, { manager: 'Bob', name: 'Terrence' }] /* harmony default export */ __webpack_exports__["a"] = (people); /***/ }), /* 217 */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(218); if(typeof content === 'string') content = [[module.i, content, '']]; // Prepare cssTransformation var transform; var options = {} options.transform = transform // add the styles to the DOM var update = __webpack_require__(220)(content, options); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { // When the styles change, update the <style> tags if(!content.locals) { module.hot.accept("!!../node_modules/css-loader/index.js!../node_modules/sass-loader/lib/loader.js!./styles.sass", function() { var newContent = require("!!../node_modules/css-loader/index.js!../node_modules/sass-loader/lib/loader.js!./styles.sass"); if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; update(newContent); }); } // When the module is disposed, remove the <style> tags module.hot.dispose(function() { update(); }); } /***/ }), /* 218 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(219)(undefined); // imports // module exports.push([module.i, "pre {\n padding: 20px;\n background: #2b3a4a;\n color: #dedede;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); }\n", ""]); // exports /***/ }), /* 219 */ /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function(useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if(item[2]) { return "@media " + item[2] + "{" + content + "}"; } else { return content; } }).join(""); }; // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") modules = [[null, modules, ""]]; var alreadyImportedModules = {}; for(var i = 0; i < this.length; i++) { var id = this[i][0]; if(typeof id === "number") alreadyImportedModules[id] = true; } for(i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { if(mediaQuery && !item[2]) { item[2] = mediaQuery; } else if(mediaQuery) { item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; } /***/ }), /* 220 */ /***/ (function(module, exports, __webpack_require__) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var stylesInDom = {}; var memoize = function (fn) { var memo; return function () { if (typeof memo === "undefined") memo = fn.apply(this, arguments); return memo; }; }; var isOldIE = memoize(function () { // Test for IE <= 9 as proposed by Browserhacks // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // Tests for existence of standard globals is to allow style-loader // to operate correctly into non-standard environments // @see https://github.com/webpack-contrib/style-loader/issues/177 return window && document && document.all && !window.atob; }); var getElement = (function (fn) { var memo = {}; return function(selector) { if (typeof memo[selector] === "undefined") { memo[selector] = fn.call(this, selector); } return memo[selector] }; })(function (target) { return document.querySelector(target) }); var singleton = null; var singletonCounter = 0; var stylesInsertedAtTop = []; var fixUrls = __webpack_require__(221); module.exports = function(list, options) { if (typeof DEBUG !== "undefined" && DEBUG) { if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); } options = options || {}; options.attrs = typeof options.attrs === "object" ? options.attrs : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page if (!options.singleton) options.singleton = isOldIE(); // By default, add <style> tags to the <head> element if (!options.insertInto) options.insertInto = "head"; // By default, add <style> tags to the bottom of the target if (!options.insertAt) options.insertAt = "bottom"; var styles = listToStyles(list, options); addStylesToDom(styles, options); return function update (newList) { var mayRemove = []; for (var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id]; domStyle.refs--; mayRemove.push(domStyle); } if(newList) { var newStyles = listToStyles(newList, options); addStylesToDom(newStyles, options); } for (var i = 0; i < mayRemove.length; i++) { var domStyle = mayRemove[i]; if(domStyle.refs === 0) { for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j](); delete stylesInDom[domStyle.id]; } } }; }; function addStylesToDom (styles, options) { for (var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id]; if(domStyle) { domStyle.refs++; for(var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]); } for(; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j], options)); } } else { var parts = []; for(var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j], options)); } stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; } } } function listToStyles (list, options) { var styles = []; var newStyles = {}; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var css = item[1]; var media = item[2]; var sourceMap = item[3]; var part = {css: css, media: media, sourceMap: sourceMap}; if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]}); else newStyles[id].parts.push(part); } return styles; } function insertStyleElement (options, style) { var target = getElement(options.insertInto) if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid."); } var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1]; if (options.insertAt === "top") { if (!lastStyleElementInsertedAtTop) { target.insertBefore(style, target.firstChild); } else if (lastStyleElementInsertedAtTop.nextSibling) { target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling); } else { target.appendChild(style); } stylesInsertedAtTop.push(style); } else if (options.insertAt === "bottom") { target.appendChild(style); } else { throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."); } } function removeStyleElement (style) { if (style.parentNode === null) return false; style.parentNode.removeChild(style); var idx = stylesInsertedAtTop.indexOf(style); if(idx >= 0) { stylesInsertedAtTop.splice(idx, 1); } } function createStyleElement (options) { var style = document.createElement("style"); options.attrs.type = "text/css"; addAttrs(style, options.attrs); insertStyleElement(options, style); return style; } function createLinkElement (options) { var link = document.createElement("link"); options.attrs.type = "text/css"; options.attrs.rel = "stylesheet"; addAttrs(link, options.attrs); insertStyleElement(options, link); return link; } function addAttrs (el, attrs) { Object.keys(attrs).forEach(function (key) { el.setAttribute(key, attrs[key]); }); } function addStyle (obj, options) { var style, update, remove, result; // If a transform function was defined, run it on the css if (options.transform && obj.css) { result = options.transform(obj.css); if (result) { // If transform returns a value, use that instead of the original css. // This allows running runtime transformations on the css. obj.css = result; } else { // If the transform function returns a falsy value, don't add this css. // This allows conditional loading of css return function() { // noop }; } } if (options.singleton) { var styleIndex = singletonCounter++; style = singleton || (singleton = createStyleElement(options)); update = applyToSingletonTag.bind(null, style, styleIndex, false); remove = applyToSingletonTag.bind(null, style, styleIndex, true); } else if ( obj.sourceMap && typeof URL === "function" && typeof URL.createObjectURL === "function" && typeof URL.revokeObjectURL === "function" && typeof Blob === "function" && typeof btoa === "function" ) { style = createLinkElement(options); update = updateLink.bind(null, style, options); remove = function () { removeStyleElement(style); if(style.href) URL.revokeObjectURL(style.href); }; } else { style = createStyleElement(options); update = applyToTag.bind(null, style); remove = function () { removeStyleElement(style); }; } update(obj); return function updateStyle (newObj) { if (newObj) { if ( newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap ) { return; } update(obj = newObj); } else { remove(); } }; } var replaceText = (function () { var textStore = []; return function (index, replacement) { textStore[index] = replacement; return textStore.filter(Boolean).join('\n'); }; })(); function applyToSingletonTag (style, index, remove, obj) { var css = remove ? "" : obj.css; if (style.styleSheet) { style.styleSheet.cssText = replaceText(index, css); } else { var cssNode = document.createTextNode(css); var childNodes = style.childNodes; if (childNodes[index]) style.removeChild(childNodes[index]); if (childNodes.length) { style.insertBefore(cssNode, childNodes[index]); } else { style.appendChild(cssNode); } } } function applyToTag (style, obj) { var css = obj.css; var media = obj.media; if(media) { style.setAttribute("media", media) } if(style.styleSheet) { style.styleSheet.cssText = css; } else { while(style.firstChild) { style.removeChild(style.firstChild); } style.appendChild(document.createTextNode(css)); } } function updateLink (link, options, obj) { var css = obj.css; var sourceMap = obj.sourceMap; /* If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled and there is no publicPath defined then lets turn convertToAbsoluteUrls on by default. Otherwise default to the convertToAbsoluteUrls option directly */ var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap; if (options.convertToAbsoluteUrls || autoFixUrls) { css = fixUrls(css); } if (sourceMap) { // http://stackoverflow.com/a/26603875 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */"; } var blob = new Blob([css], { type: "text/css" }); var oldSrc = link.href; link.href = URL.createObjectURL(blob); if(oldSrc) URL.revokeObjectURL(oldSrc); } /***/ }), /* 221 */ /***/ (function(module, exports) { /** * When source maps are enabled, `style-loader` uses a link element with a data-uri to * embed the css on the page. This breaks all relative urls because now they are relative to a * bundle instead of the current page. * * One solution is to only use full urls, but that may be impossible. * * Instead, this function "fixes" the relative urls to be absolute according to the current page location. * * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command. * */ module.exports = function (css) { // get current location var location = typeof window !== "undefined" && window.location; if (!location) { throw new Error("fixUrls requires window.location"); } // blank or null? if (!css || typeof css !== "string") { return css; } var baseUrl = location.protocol + "//" + location.host; var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/"); // convert each url(...) /* This regular expression is just a way to recursively match brackets within a string. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens ( = Start a capturing group (?: = Start a non-capturing group [^)(] = Match anything that isn't a parentheses | = OR \( = Match a start parentheses (?: = Start another non-capturing groups [^)(]+ = Match anything that isn't a parentheses | = OR \( = Match a start parentheses [^)(]* = Match anything that isn't a parentheses \) = Match a end parentheses ) = End Group *\) = Match anything and then a close parens ) = Close non-capturing group * = Match anything ) = Close capturing group \) = Match a close parens /gi = Get all matches, not the first. Be case insensitive. */ var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) { // strip quotes (if they exist) var unquotedOrigUrl = origUrl .trim() .replace(/^"(.*)"$/, function(o, $1){ return $1; }) .replace(/^'(.*)'$/, function(o, $1){ return $1; }); // already a full url? no change if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) { return fullMatch; } // convert the url to a full url var newUrl; if (unquotedOrigUrl.indexOf("//") === 0) { //TODO: should we add protocol? newUrl = unquotedOrigUrl; } else if (unquotedOrigUrl.indexOf("/") === 0) { // path should be relative to the base url newUrl = baseUrl + unquotedOrigUrl; // already starts with '/' } else { // path should be relative to current directory newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './' } // send back the fixed url(...) return "url(" + JSON.stringify(newUrl) + ")"; }); // send back the fixed css return fixedCss; }; /***/ }) /******/ ]);
{'content_hash': '29a41660ad402e93e4da37ab485cff63', 'timestamp': '', 'source': 'github', 'line_count': 7856, 'max_line_length': 157, 'avg_line_length': 25.75, 'alnum_prop': 0.6327783599944634, 'repo_name': 'mayank-mittal/Handson', 'id': '4bfba5936857a33de6daaa49579a5512f585c59d', 'size': '202292', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'webpack-learn/dist/app.bundle.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '116'}, {'name': 'CSS', 'bytes': '13691'}, {'name': 'HTML', 'bytes': '66883'}, {'name': 'Java', 'bytes': '4011'}, {'name': 'JavaScript', 'bytes': '453255'}, {'name': 'Objective-C', 'bytes': '13293'}, {'name': 'PHP', 'bytes': '13484'}, {'name': 'Python', 'bytes': '5503'}, {'name': 'TypeScript', 'bytes': '10487'}]}
GitHub
package quizleague.web.site.team import scalajs.js import quizleague.web.core.RouteComponent import quizleague.web.core.GridSizeComponentConfig import quizleague.web.site.SideMenu import quizleague.web.site.login.LoginService object TeamsComponent extends RouteComponent with GridSizeComponentConfig { val template=""" <v-container v-bind="gridSize" fluid> <v-layout> <v-flex><ql-text-box><ql-named-text name="teams-header"></ql-named-text></ql-text-box></v-flex> </v-layout> </v-container>""" override val mounted = ({(c:facade) => { //super.mounted.call(c) LoginService.userProfile.filter(_ != null).subscribe(u => c.$router.push(s"/team/${u.team.id}")) }}:js.ThisFunction) } object TeamsTitleComponent extends RouteComponent{ val template=""" <v-toolbar color="amber lighten-3" dense class="subtitle-background" > <ql-title>Teams</ql-title> <v-toolbar-title> Teams </v-toolbar-title> </v-toolbar>""" } object StartTeamPage extends RouteComponent with GridSizeComponentConfig{ val template=""" <v-container v-bind="gridSize" fluid> <v-layout> <v-flex><ql-text-box><ql-named-text name="start-team"></ql-named-text></ql-text-box></v-flex> </v-layout> </v-container>""" } object StartTeamTitleComponent extends RouteComponent{ val template=""" <v-toolbar color="amber lighten-3" dense class="subtitle-background" > <ql-title>Starting a Team</ql-title> <v-toolbar-title> Starting a Team </v-toolbar-title> </v-toolbar>""" }
{'content_hash': 'ff8ee2e154f18b14b872abfc790edf35', 'timestamp': '', 'source': 'github', 'line_count': 64, 'max_line_length': 105, 'avg_line_length': 26.203125, 'alnum_prop': 0.6356589147286822, 'repo_name': 'gumdrop/quizleague', 'id': 'a37a90c735d0db9c6247467ecc15e81761f4e220', 'size': '1677', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'js/src/main/scala/quizleague/web/site/team/TeamsComponent.scala', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '6574'}, {'name': 'HTML', 'bytes': '17798'}, {'name': 'Scala', 'bytes': '510294'}]}
GitHub
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title> SOTA Summit Candidates in Primary Mesh 5440 2W x 2H Area</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script src="./5440.js" type="text/javascript"></script> </head> <body> <p>SOTA Summit Candidates in Primary Mesh 5440 2W x 2H Area</p> <div id="map" style="width:80%; height:100%; float:left"></div> <div id="list" style="width:20%; height:100; float:left"> <select id="select" onchange="selectSummit(value)" style="width:30%px" size=35></select> </div> </body> </html>
{'content_hash': '78dafd2a8e1f47210955227d2e37a1e0', 'timestamp': '', 'source': 'github', 'line_count': 17, 'max_line_length': 92, 'avg_line_length': 47.8235294117647, 'alnum_prop': 0.6531365313653137, 'repo_name': 'w-ockham/SOTA-FindSummits', 'id': 'c61e2befbae3d932c2fb4e2bf5dce55209031870', 'size': '813', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'example/all/5440.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C++', 'bytes': '23438'}, {'name': 'HTML', 'bytes': '46763'}, {'name': 'JavaScript', 'bytes': '3708041'}, {'name': 'Makefile', 'bytes': '10242'}, {'name': 'Python', 'bytes': '16314'}]}
GitHub
using namespace boost; using namespace boost::interprocess; using namespace boost::posix_time; static void ipcThread2(void* pArg); #ifdef MAC_OSX // URI handling not implemented on OSX yet void ipcInit() { } #else static void ipcThread(void* pArg) { IMPLEMENT_RANDOMIZE_STACK(ipcThread(pArg)); // Make this thread recognisable as the GUI-IPC thread RenameThread("bitcoin-gui-ipc"); try { ipcThread2(pArg); } catch (std::exception& e) { PrintExceptionContinue(&e, "ipcThread()"); } catch (...) { PrintExceptionContinue(NULL, "ipcThread()"); } printf("ipcThread exited\n"); } static void ipcThread2(void* pArg) { printf("ipcThread started\n"); message_queue* mq = (message_queue*)pArg; char buffer[MAX_URI_LENGTH + 1] = ""; size_t nSize = 0; unsigned int nPriority = 0; loop { ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100); if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d)) { uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize)); Sleep(1000); } if (fShutdown) break; } // Remove message queue message_queue::remove(BITCOINURI_QUEUE_NAME); // Cleanup allocated memory delete mq; } void ipcInit() { message_queue* mq = NULL; char buffer[MAX_URI_LENGTH + 1] = ""; size_t nSize = 0; unsigned int nPriority = 0; try { mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH); // Make sure we don't lose any cpgcoin: URIs for (int i = 0; i < 2; i++) { ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(1); if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d)) { uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize)); } else break; } // Make sure only one instance is listening message_queue::remove(BITCOINURI_QUEUE_NAME); delete mq; mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH); } catch (interprocess_exception &ex) { printf("ipcInit() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what()); return; } if (!CreateThread(ipcThread, mq)) { delete mq; return; } } #endif
{'content_hash': '3f4f1ac82391d081e73a680423257175', 'timestamp': '', 'source': 'github', 'line_count': 101, 'max_line_length': 101, 'avg_line_length': 24.673267326732674, 'alnum_prop': 0.5878812199036918, 'repo_name': 'knappy214/cpgcoin', 'id': '15099a1500555b1bec0d0d8a6666fc56bed3ea10', 'size': '3372', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/qt/qtipcserver.cpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '14362'}, {'name': 'C++', 'bytes': '1435346'}, {'name': 'Groff', 'bytes': '12841'}, {'name': 'Makefile', 'bytes': '4555'}, {'name': 'NSIS', 'bytes': '6096'}, {'name': 'Objective-C++', 'bytes': '2463'}, {'name': 'Python', 'bytes': '47538'}, {'name': 'QMake', 'bytes': '11401'}, {'name': 'Shell', 'bytes': '4568'}]}
GitHub
<?xml version="1.0" encoding="UTF-8"?> <!-- Pass: (3000) The units returned by the assignment rule that assigns value to a compartment must be consistent with either the units declared for that compartment or the default units for the compartment. --> <sbml xmlns="http://www.sbml.org/sbml/level2/version2" level="2" version="2"> <model> <listOfCompartments> <compartment id="c" constant="false" spatialDimensions="1"/> </listOfCompartments> <listOfParameters> <parameter id="p" value="1" units="metre" constant="false"/> <parameter id="p1" value="1" units="dimensionless" constant="false"/> </listOfParameters> <listOfRules> <assignmentRule variable="c"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <times/> <ci> p </ci> <ci> p1 </ci> </apply> </math> </assignmentRule> </listOfRules> </model> </sbml>
{'content_hash': '096ccf20976b4c6257fad859d1c553ac', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 77, 'avg_line_length': 33.10344827586207, 'alnum_prop': 0.6125, 'repo_name': 'TheCoSMoCompany/biopredyn', 'id': 'ea9c169ecc7d033d4fe6280efb249ffa6c1a93aa', 'size': '960', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'Prototype/src/libsbml-5.10.0/src/sbml/validator/test/test-data/sbml-unit-constraints/10511-pass-00-10.xml', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '3535918'}, {'name': 'C++', 'bytes': '26120778'}, {'name': 'CMake', 'bytes': '455400'}, {'name': 'CSS', 'bytes': '49020'}, {'name': 'Gnuplot', 'bytes': '206'}, {'name': 'HTML', 'bytes': '193068'}, {'name': 'Java', 'bytes': '66517'}, {'name': 'JavaScript', 'bytes': '3847'}, {'name': 'Makefile', 'bytes': '30905'}, {'name': 'Perl', 'bytes': '3018'}, {'name': 'Python', 'bytes': '7891301'}, {'name': 'Shell', 'bytes': '247654'}, {'name': 'TeX', 'bytes': '22566'}, {'name': 'XSLT', 'bytes': '55564'}]}
GitHub
#import <Foundation/Foundation.h> NSString* IString(NSString* s);
{'content_hash': 'd24b8846efab1d3c122f195153f31f1c', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 33, 'avg_line_length': 13.8, 'alnum_prop': 0.7391304347826086, 'repo_name': 'arciem/LibArciem', 'id': '479d04e1d7b3f9f4f7b86f1fbbfacdf7bc2a9282', 'size': '795', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Arciem/ObjC/Essentials/I18nUtils.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '1234'}, {'name': 'C++', 'bytes': '144627'}, {'name': 'F#', 'bytes': '350'}, {'name': 'Objective-C', 'bytes': '872971'}]}
GitHub
@interface PKTNestedTestModel : PKTModel @property (nonatomic, assign, readonly) NSUInteger objectID; @property (nonatomic, copy, readonly) NSString *firstValue; @end
{'content_hash': '7ad256a27c6980129e0faa634c1f47eb', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 60, 'avg_line_length': 28.166666666666668, 'alnum_prop': 0.7928994082840237, 'repo_name': 'podio/podio-objc', 'id': '7c54b11560967fff3e066f3012e4c88b9647b0af', 'size': '349', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'PodioKitTests/PKTNestedTestModel.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '402'}, {'name': 'Objective-C', 'bytes': '754338'}, {'name': 'Python', 'bytes': '64138'}, {'name': 'Ruby', 'bytes': '7357'}]}
GitHub
<?php //Composer autoloader require_once '../vendor/autoload.php'; require_once 'config.php'; require_once 'core/Database.php'; require_once 'core/App.php'; require_once 'core/Controller.php';
{'content_hash': '093fcead6b2426ae704243a84d949bfc', 'timestamp': '', 'source': 'github', 'line_count': 8, 'max_line_length': 38, 'avg_line_length': 24.125, 'alnum_prop': 0.7461139896373057, 'repo_name': 'prajyotpro/phpmvc', 'id': '5e8eb43002205cde26b40197247c3673904e25ae', 'size': '193', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/init.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ApacheConf', 'bytes': '202'}, {'name': 'PHP', 'bytes': '5687'}]}
GitHub
package net.katagaitai.phpscan.command; import lombok.Value; import net.katagaitai.phpscan.compiler.PhpFunction; import net.katagaitai.phpscan.interpreter.Interpreter; @Value public class CreateStaticMethod implements Command { private PhpFunction phpFunction; public String toString() { return phpFunction.toString(); } @Override public void accept(Interpreter vm) { vm.accept(this); } }
{'content_hash': 'cfa024d2b34866a63d036268e4713b84', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 54, 'avg_line_length': 20.2, 'alnum_prop': 0.7871287128712872, 'repo_name': 'AsaiKen/phpscan', 'id': 'e2e5a917f8fd0fc5f9188aa6437382b7bfd2b688', 'size': '404', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/net/katagaitai/phpscan/command/CreateStaticMethod.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '831845'}, {'name': 'Java', 'bytes': '2850984'}, {'name': 'Lex', 'bytes': '447022'}, {'name': 'PHP', 'bytes': '18405534'}, {'name': 'Shell', 'bytes': '144'}]}
GitHub
<?php /** * Base class that represents a query for the 'ref_seance_horaire' table. * * * * @method RefSeanceHoraireQuery orderBySeanceHoraireId($order = Criteria::ASC) Order by the seance_horaire_id column * @method RefSeanceHoraireQuery orderBySeanceHoraire($order = Criteria::ASC) Order by the seance_horaire column * * @method RefSeanceHoraireQuery groupBySeanceHoraireId() Group by the seance_horaire_id column * @method RefSeanceHoraireQuery groupBySeanceHoraire() Group by the seance_horaire column * * @method RefSeanceHoraireQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method RefSeanceHoraireQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query * @method RefSeanceHoraireQuery innerJoin($relation) Adds a INNER JOIN clause to the query * * @method RefSeanceHoraireQuery leftJoinTblAdherent($relationAlias = null) Adds a LEFT JOIN clause to the query using the TblAdherent relation * @method RefSeanceHoraireQuery rightJoinTblAdherent($relationAlias = null) Adds a RIGHT JOIN clause to the query using the TblAdherent relation * @method RefSeanceHoraireQuery innerJoinTblAdherent($relationAlias = null) Adds a INNER JOIN clause to the query using the TblAdherent relation * * @method RefSeanceHoraire findOne(PropelPDO $con = null) Return the first RefSeanceHoraire matching the query * @method RefSeanceHoraire findOneOrCreate(PropelPDO $con = null) Return the first RefSeanceHoraire matching the query, or a new RefSeanceHoraire object populated from the query conditions when no match is found * * @method RefSeanceHoraire findOneBySeanceHoraireId(int $seance_horaire_id) Return the first RefSeanceHoraire filtered by the seance_horaire_id column * @method RefSeanceHoraire findOneBySeanceHoraire(string $seance_horaire) Return the first RefSeanceHoraire filtered by the seance_horaire column * * @method array findBySeanceHoraireId(int $seance_horaire_id) Return RefSeanceHoraire objects filtered by the seance_horaire_id column * @method array findBySeanceHoraire(string $seance_horaire) Return RefSeanceHoraire objects filtered by the seance_horaire column * * @package propel.generator.lib.model.om */ abstract class BaseRefSeanceHoraireQuery extends ModelCriteria { /** * Initializes internal state of BaseRefSeanceHoraireQuery object. * * @param string $dbName The dabase name * @param string $modelName The phpName of a model, e.g. 'Book' * @param string $modelAlias The alias for the model in this query, e.g. 'b' */ public function __construct($dbName = 'propel', $modelName = 'RefSeanceHoraire', $modelAlias = null) { parent::__construct($dbName, $modelName, $modelAlias); } /** * Returns a new RefSeanceHoraireQuery object. * * @param string $modelAlias The alias of a model in the query * @param Criteria $criteria Optional Criteria to build the query from * * @return RefSeanceHoraireQuery */ public static function create($modelAlias = null, $criteria = null) { if ($criteria instanceof RefSeanceHoraireQuery) { return $criteria; } $query = new RefSeanceHoraireQuery(); if (null !== $modelAlias) { $query->setModelAlias($modelAlias); } if ($criteria instanceof Criteria) { $query->mergeWith($criteria); } return $query; } /** * Find object by primary key. * Propel uses the instance pool to skip the database if the object exists. * Go fast if the query is untouched. * * <code> * $obj = $c->findPk(12, $con); * </code> * * @param mixed $key Primary key to use for the query * @param PropelPDO $con an optional connection object * * @return RefSeanceHoraire|array|mixed the result, formatted by the current formatter */ public function findPk($key, $con = null) { if ($key === null) { return null; } if ((null !== ($obj = RefSeanceHorairePeer::getInstanceFromPool((string) $key))) && !$this->formatter) { // the object is alredy in the instance pool return $obj; } if ($con === null) { $con = Propel::getConnection(RefSeanceHorairePeer::DATABASE_NAME, Propel::CONNECTION_READ); } $this->basePreSelect($con); if ($this->formatter || $this->modelAlias || $this->with || $this->select || $this->selectColumns || $this->asColumns || $this->selectModifiers || $this->map || $this->having || $this->joins) { return $this->findPkComplex($key, $con); } else { return $this->findPkSimple($key, $con); } } /** * Find object by primary key using raw SQL to go fast. * Bypass doSelect() and the object formatter by using generated code. * * @param mixed $key Primary key to use for the query * @param PropelPDO $con A connection object * * @return RefSeanceHoraire A model object, or null if the key is not found */ protected function findPkSimple($key, $con) { $sql = 'SELECT `SEANCE_HORAIRE_ID`, `SEANCE_HORAIRE` FROM `ref_seance_horaire` WHERE `SEANCE_HORAIRE_ID` = :p0'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->execute(); } catch (Exception $e) { Propel::log($e->getMessage(), Propel::LOG_ERR); throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e); } $obj = null; if ($row = $stmt->fetch(PDO::FETCH_NUM)) { $obj = new RefSeanceHoraire(); $obj->hydrate($row); RefSeanceHorairePeer::addInstanceToPool($obj, (string) $key); } $stmt->closeCursor(); return $obj; } /** * Find object by primary key. * * @param mixed $key Primary key to use for the query * @param PropelPDO $con A connection object * * @return RefSeanceHoraire|array|mixed the result, formatted by the current formatter */ protected function findPkComplex($key, $con) { // As the query uses a PK condition, no limit(1) is necessary. $criteria = $this->isKeepQuery() ? clone $this : $this; $stmt = $criteria ->filterByPrimaryKey($key) ->doSelect($con); return $criteria->getFormatter()->init($criteria)->formatOne($stmt); } /** * Find objects by primary key * <code> * $objs = $c->findPks(array(12, 56, 832), $con); * </code> * @param array $keys Primary keys to use for the query * @param PropelPDO $con an optional connection object * * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter */ public function findPks($keys, $con = null) { if ($con === null) { $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ); } $this->basePreSelect($con); $criteria = $this->isKeepQuery() ? clone $this : $this; $stmt = $criteria ->filterByPrimaryKeys($keys) ->doSelect($con); return $criteria->getFormatter()->init($criteria)->format($stmt); } /** * Filter the query by primary key * * @param mixed $key Primary key to use for the query * * @return RefSeanceHoraireQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { return $this->addUsingAlias(RefSeanceHorairePeer::SEANCE_HORAIRE_ID, $key, Criteria::EQUAL); } /** * Filter the query by a list of primary keys * * @param array $keys The list of primary key to use for the query * * @return RefSeanceHoraireQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { return $this->addUsingAlias(RefSeanceHorairePeer::SEANCE_HORAIRE_ID, $keys, Criteria::IN); } /** * Filter the query on the seance_horaire_id column * * Example usage: * <code> * $query->filterBySeanceHoraireId(1234); // WHERE seance_horaire_id = 1234 * $query->filterBySeanceHoraireId(array(12, 34)); // WHERE seance_horaire_id IN (12, 34) * $query->filterBySeanceHoraireId(array('min' => 12)); // WHERE seance_horaire_id > 12 * </code> * * @param mixed $seanceHoraireId The value to use as filter. * Use scalar values for equality. * Use array values for in_array() equivalent. * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return RefSeanceHoraireQuery The current query, for fluid interface */ public function filterBySeanceHoraireId($seanceHoraireId = null, $comparison = null) { if (is_array($seanceHoraireId) && null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(RefSeanceHorairePeer::SEANCE_HORAIRE_ID, $seanceHoraireId, $comparison); } /** * Filter the query on the seance_horaire column * * Example usage: * <code> * $query->filterBySeanceHoraire('fooValue'); // WHERE seance_horaire = 'fooValue' * $query->filterBySeanceHoraire('%fooValue%'); // WHERE seance_horaire LIKE '%fooValue%' * </code> * * @param string $seanceHoraire The value to use as filter. * Accepts wildcards (* and % trigger a LIKE) * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return RefSeanceHoraireQuery The current query, for fluid interface */ public function filterBySeanceHoraire($seanceHoraire = null, $comparison = null) { if (null === $comparison) { if (is_array($seanceHoraire)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $seanceHoraire)) { $seanceHoraire = str_replace('*', '%', $seanceHoraire); $comparison = Criteria::LIKE; } } return $this->addUsingAlias(RefSeanceHorairePeer::SEANCE_HORAIRE, $seanceHoraire, $comparison); } /** * Filter the query by a related TblAdherent object * * @param TblAdherent $tblAdherent the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return RefSeanceHoraireQuery The current query, for fluid interface */ public function filterByTblAdherent($tblAdherent, $comparison = null) { if ($tblAdherent instanceof TblAdherent) { return $this ->addUsingAlias(RefSeanceHorairePeer::SEANCE_HORAIRE_ID, $tblAdherent->getSeanceHoraireId(), $comparison); } elseif ($tblAdherent instanceof PropelCollection) { return $this ->useTblAdherentQuery() ->filterByPrimaryKeys($tblAdherent->getPrimaryKeys()) ->endUse(); } else { throw new PropelException('filterByTblAdherent() only accepts arguments of type TblAdherent or PropelCollection'); } } /** * Adds a JOIN clause to the query using the TblAdherent relation * * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return RefSeanceHoraireQuery The current query, for fluid interface */ public function joinTblAdherent($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('TblAdherent'); // create a ModelJoin object for this join $join = new ModelJoin(); $join->setJoinType($joinType); $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); if ($previousJoin = $this->getPreviousJoin()) { $join->setPreviousJoin($previousJoin); } // add the ModelJoin to the current object if($relationAlias) { $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { $this->addJoinObject($join, 'TblAdherent'); } return $this; } /** * Use the TblAdherent relation TblAdherent object * * @see useQuery() * * @param string $relationAlias optional alias for the relation, * to be used as main alias in the secondary query * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return TblAdherentQuery A secondary query class using the current class as primary query */ public function useTblAdherentQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { return $this ->joinTblAdherent($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'TblAdherent', 'TblAdherentQuery'); } /** * Exclude object from result * * @param RefSeanceHoraire $refSeanceHoraire Object to remove from the list of results * * @return RefSeanceHoraireQuery The current query, for fluid interface */ public function prune($refSeanceHoraire = null) { if ($refSeanceHoraire) { $this->addUsingAlias(RefSeanceHorairePeer::SEANCE_HORAIRE_ID, $refSeanceHoraire->getSeanceHoraireId(), Criteria::NOT_EQUAL); } return $this; } } // BaseRefSeanceHoraireQuery
{'content_hash': 'd1b3634bc9534594f946119146b0db9a', 'timestamp': '', 'source': 'github', 'line_count': 347, 'max_line_length': 216, 'avg_line_length': 37.04034582132565, 'alnum_prop': 0.6922119349568194, 'repo_name': 'kamguir/salleSport', 'id': 'bf1c92c0f56487fa7e921bd494baac166279bed0', 'size': '12853', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/model/om/BaseRefSeanceHoraireQuery.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '215628'}, {'name': 'JavaScript', 'bytes': '29491'}, {'name': 'PHP', 'bytes': '5027363'}, {'name': 'Shell', 'bytes': '614'}]}
GitHub
package me.alb_i986.selenium.tinafw.config; import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; import me.alb_i986.selenium.tinafw.config.ConfigException; import me.alb_i986.selenium.tinafw.config.PropertyLoader; import me.alb_i986.selenium.tinafw.config.PropertyLoaderFromResource; import org.junit.Test; public class PropertyLoaderFromResourceTest { /** * Testing the constructor * {@link PropertyLoaderFromResource#PropertyLoaderFromResource(String, boolean)}. * * <ul> * <li>Given a resource which does not exist * <li>When I instantiate a {@link PropertyLoaderFromResource} with * that resource, and the resource is <i>not</i> required * <li>Then an exception should <i>not</i> be thrown * </ul> */ @Test public void givenNonExistentResourceWhenNewAndResourceIsNotRequired() { String resourceName = givenNonExistingResource(); boolean isResourceRequired = false; new PropertyLoaderFromResource(resourceName, isResourceRequired); // here it should NOT throw an exception } /** * Testing the constructor * {@link PropertyLoaderFromResource#PropertyLoaderFromResource(String, boolean)}. * * <ul> * <li>Given a resource which does not exist * <li>When I instantiate a {@link PropertyLoaderFromResource} with * that resource, and the resource is required * <li>Then an exception should be thrown * </ul> */ @Test(expected = ConfigException.class) public void givenNonExistentResourceWhenNewAndResourceIsRequired() { String resourceName = givenNonExistingResource(); boolean isResourceRequired = true; new PropertyLoaderFromResource(resourceName, isResourceRequired); // here it should throw an exception } /** * Testing {@link PropertyLoaderFromResource#getProperty(String)}. * * <ul> * <li>Given an existing resource * <li>When I get a defined property * <li>Then the value returned should be not null * </ul> */ @Test public void givenExistingResourceWhenGetExistingProperty() { String value = whenGetProperty("existing.property"); assertNotNull(value); } /** * Testing {@link PropertyLoaderFromResource#getProperty(String)}. * * <ul> * <li>Given an existing resource * <li>When I get a property whose value is an empty string * <li>Then the value returned should be an empty string * </ul> */ @Test public void givenExistingResourceWhenGetExistingEmptyProperty() { String value = whenGetProperty("empty.property"); assertNotNull(value); assertThat(value, isEmptyString()); } /** * Testing {@link PropertyLoaderFromResource#getProperty(String)}. * * <ul> * <li>Given an existing resource * <li>When I get a property whose value is a string made up of spaces only (many) * <li>Then the value returned should be an empty string * (the original spaces should be discarded by the system) * </ul> */ @Test public void givenExistingResourceWhenGetExistingEmptyPropertyWithManySpaces() { String value = whenGetProperty("empty.property.with.many.spaces"); assertNotNull(value); assertThat(value, isEmptyString()); } /** * Testing {@link PropertyLoaderFromResource#getProperty(String)}. * * <ul> * <li>Given an existing resource * <li>When I get a property whose value ends with spaces * <li>Then the value returned should contain all of the original ending spaces * </ul> */ @Test public void givenExistingResourceWhenGetExistingPropertyWhoseValueHasEndingSpaces() { String value = whenGetProperty("empty.property.whose.value.has.ending.spaces"); assertNotNull(value); assertThat(value, is("asd ")); } private String givenExistingResource() { String resourceName = getClass().getSimpleName() + ".properties"; assertNotNull("The resource " + resourceName + " should exist", getClass().getResourceAsStream(resourceName)); return resourceName; } private String givenNonExistingResource() { String resourceName = "/non-existent-resource.properties"; assertNull("The resource " + resourceName + " should not exist", getClass().getResourceAsStream(resourceName)); return resourceName; } private String whenGetProperty(String propertyName) { String resourceName = givenExistingResource(); PropertyLoader propLoader = new PropertyLoaderFromResource(resourceName, true); String value = propLoader.getProperty(propertyName); return value; } }
{'content_hash': '72b7ddfbd0005c54345b5a7260a3d663', 'timestamp': '', 'source': 'github', 'line_count': 136, 'max_line_length': 86, 'avg_line_length': 32.30882352941177, 'alnum_prop': 0.7387346381429222, 'repo_name': 'alb-i986/selenium-tinafw', 'id': '00c39c278d349eb76d1a115fa5dc8534997657d9', 'size': '4394', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/test/java/me/alb_i986/selenium/tinafw/config/PropertyLoaderFromResourceTest.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '118055'}, {'name': 'Shell', 'bytes': '1792'}]}
GitHub
/** * Creates a rule that will be applied when an MDC-Web component is within the context of an RTL layout. * * Usage Example: * ```scss * .mdc-foo { * position: absolute; * left: 0; * * @include mdc-rtl { * left: auto; * right: 0; * } * * &__bar { * margin-left: 4px; * @include mdc-rtl(".mdc-foo") { * margin-left: auto; * margin-right: 4px; * } * } * } * * .mdc-foo--mod { * padding-left: 4px; * * @include mdc-rtl { * padding-left: auto; * padding-right: 4px; * } * } * ``` * * Note that this works by checking for [dir="rtl"] on an ancestor element. While this will work * in most cases, it will in some cases lead to false negatives, e.g. * * ```html * <html dir="rtl"> * <!-- ... --> * <div dir="ltr"> * <div class="mdc-foo">Styled incorrectly as RTL!</div> * </div> * </html> * ``` * * In the future, selectors such as :dir (http://mdn.io/:dir) will help us mitigate this. */ /** * Takes a base box-model property - e.g. margin / border / padding - along with a default * direction and value, and emits rules which apply the value to the * "<base-property>-<default-direction>" property by default, but flips the direction * when within an RTL context. * * For example: * * ```scss * .mdc-foo { * @include mdc-rtl-reflexive-box(margin, left, 8px); * } * ``` * is equivalent to: * * ```scss * .mdc-foo { * margin-left: 8px; * * @include mdc-rtl { * margin-right: 8px; * margin-left: 0; * } * } * ``` * whereas: * * ```scss * .mdc-foo { * @include mdc-rtl-reflexive-box(margin, right, 8px); * } * ``` * is equivalent to: * * ```scss * .mdc-foo { * margin-right: 8px; * * @include mdc-rtl { * margin-right: 0; * margin-left: 8px; * } * } * ``` * * You can also pass a 4th optional $root-selector argument which will be forwarded to `mdc-rtl`, * e.g. `@include mdc-rtl-reflexive-box-property(margin, left, 8px, ".mdc-component")`. * * Note that this function will always zero out the original value in an RTL context. If you're * trying to flip the values, use mdc-rtl-reflexive-property(). */ /** * Takes a base property and emits rules that assign <base-property>-left to <left-value> and * <base-property>-right to <right-value> in a LTR context, and vice versa in a RTL context. * For example: * * ```scss * .mdc-foo { * @include mdc-rtl-reflexive-property(margin, auto, 12px); * } * ``` * is equivalent to: * * ```scss * .mdc-foo { * margin-left: auto; * margin-right: 12px; * * @include mdc-rtl { * margin-left: 12px; * margin-right: auto; * } * } * ``` * * A 4th optional $root-selector argument can be given, which will be passed to `mdc-rtl`. */ /** * Takes an argument specifying a horizontal position property (either "left" or "right") as well * as a value, and applies that value to the specified position in a LTR context, and flips it in a * RTL context. For example: * * ```scss * .mdc-foo { * @include mdc-rtl-reflexive-position(left, 0); * position: absolute; * } * ``` * is equivalent to: * * ```scss * .mdc-foo { * position: absolute; * left: 0; * right: initial; * * @include mdc-rtl { * right: 0; * left: initial; * } * } * ``` * An optional third $root-selector argument may also be given, which is passed to `mdc-rtl`. */ /* Precomputed linear color channel values, for use in contrast calculations. See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests Algorithm, for c in 0 to 255: f(c) { c = c / 255; return c < 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4); } This lookup table is needed since there is no `pow` in SASS. */ /** * Calculate the luminance for a color. * See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests */ /** * Calculate the contrast ratio between two colors. * See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests */ /** * Determine whether to use dark or light text on top of given color. * Returns "dark" for dark text and "light" for light text. */ /* Main theme colors. If you're a user customizing your color scheme in SASS, these are probably the only variables you need to change. */ /* Indigo 500 */ /* Pink A200 */ /* White */ /* Which set of text colors to use for each main theme color (light or dark) */ /* Text colors according to light vs dark and text type */ /* Primary text colors for each of the theme colors */ /* Precomputed linear color channel values, for use in contrast calculations. See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests Algorithm, for c in 0 to 255: f(c) { c = c / 255; return c < 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4); } This lookup table is needed since there is no `pow` in SASS. */ /** * Calculate the luminance for a color. * See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests */ /** * Calculate the contrast ratio between two colors. * See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests */ /** * Determine whether to use dark or light text on top of given color. * Returns "dark" for dark text and "light" for light text. */ /* Main theme colors. If you're a user customizing your color scheme in SASS, these are probably the only variables you need to change. */ /* Indigo 500 */ /* Pink A200 */ /* White */ /* Which set of text colors to use for each main theme color (light or dark) */ /* Text colors according to light vs dark and text type */ /* Primary text colors for each of the theme colors */ /** * Applies the correct theme color style to the specified property. * $property is typically color or background-color, but can be any CSS property that accepts color values. * $style should be one of the map keys in $mdc-theme-property-values (_variables.scss). */ /** * Creates a rule to be used in MDC-Web components for dark theming, and applies the provided contents. * Should provide the $root-selector option if applied to anything other than the root selector. * When used with a modifier class, provide a second argument of `true` for the $compound parameter * to specify that this should be attached as a compound class. * * Usage example: * * ```scss * .mdc-foo { * color: black; * * @include mdc-theme-dark { * color: white; * } * * &__bar { * background: black; * * @include mdc-theme-dark(".mdc-foo") { * background: white; * } * } * } * * .mdc-foo--disabled { * opacity: .38; * * @include mdc-theme-dark(".mdc-foo", true) { * opacity: .5; * } * } * ``` */ /* TODO(sgomes): Figure out what to do about desktop font sizes. */ /* TODO(sgomes): Figure out what to do about i18n and i18n font sizes. */ /* TODO(sgomes): Figure out what to do about desktop font sizes. */ /* TODO(sgomes): Figure out what to do about i18n and i18n font sizes. */ .mdc-textfield { font-family: Roboto, sans-serif; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; font-size: 1rem; letter-spacing: 0.04em; display: inline-block; margin-bottom: 8px; will-change: opacity, transform, color; } .mdc-textfield__input { color: rgba(0, 0, 0, 0.87); color: var(--mdc-theme-text-primary-on-light, rgba(0, 0, 0, 0.87)); padding: 0 0 8px; border: none; background: none; font-size: inherit; appearance: none; } .mdc-textfield__input::placeholder { color: rgba(0, 0, 0, 0.38); color: var(--mdc-theme-text-hint-on-light, rgba(0, 0, 0, 0.38)); transition: color 180ms cubic-bezier(0.4, 0, 0.2, 1); opacity: 1; } .mdc-textfield__input:focus { outline: none; } .mdc-textfield__input:focus::placeholder { color: rgba(0, 0, 0, 0.54); color: var(--mdc-theme-text-secondary-on-light, rgba(0, 0, 0, 0.54)); } .mdc-textfield__input:invalid { box-shadow: none; } .mdc-textfield__input--theme-dark, .mdc-theme--dark .mdc-textfield__input { color: white; } .mdc-textfield__input--theme-dark::placeholder, .mdc-theme--dark .mdc-textfield__input::placeholder { color: rgba(255, 255, 255, 0.5); color: var(--mdc-theme-text-hint-on-dark, rgba(255, 255, 255, 0.5)); } .mdc-textfield__input--theme-dark:focus::placeholder, .mdc-theme--dark .mdc-textfield__input:focus::placeholder { color: rgba(255, 255, 255, 0.7); color: var(--mdc-theme-text-secondary-on-dark, rgba(255, 255, 255, 0.7)); } .mdc-textfield__label { color: rgba(0, 0, 0, 0.38); color: var(--mdc-theme-text-hint-on-light, rgba(0, 0, 0, 0.38)); position: absolute; bottom: 8px; left: 0; transform-origin: left top; transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1), color 180ms cubic-bezier(0.4, 0, 0.2, 1); cursor: text; } [dir="rtl"] .mdc-textfield .mdc-textfield__label, .mdc-textfield[dir="rtl"] .mdc-textfield__label { right: 0; left: auto; transform-origin: right top; } .mdc-textfield--theme-dark .mdc-textfield__label, .mdc-theme--dark .mdc-textfield__label { color: rgba(255, 255, 255, 0.5); color: var(--mdc-theme-text-hint-on-dark, rgba(255, 255, 255, 0.5)); } .mdc-textfield__label--float-above { transform: translateY(-100%) scale(0.75, 0.75); cursor: auto; } .mdc-textfield__input:-webkit-autofill + .mdc-textfield__label { transform: translateY(-100%) scale(0.75, 0.75); cursor: auto; } .mdc-textfield--upgraded:not(.mdc-textfield--fullwidth) { display: inline-flex; position: relative; box-sizing: border-box; align-items: flex-end; margin-top: 16px; } .mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline) { height: 48px; } .mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline)::after { position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; transform: translateY(50%) scaleY(1); transform-origin: center bottom; transition: background-color 180ms cubic-bezier(0.4, 0, 0.2, 1), transform 180ms cubic-bezier(0.4, 0, 0.2, 1); background-color: rgba(0, 0, 0, 0.12); content: ""; } .mdc-textfield--theme-dark .mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline)::after, .mdc-theme--dark .mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline)::after { background-color: rgba(255, 255, 255, 0.12); } .mdc-textfield--upgraded:not(.mdc-textfield--fullwidth) .mdc-textfield__label { pointer-events: none; } .mdc-textfield--focused.mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline)::after { background-color: #3f51b5; background-color: var(--mdc-theme-primary, #3f51b5); transform: translateY(100%) scaleY(2); transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1); } .mdc-textfield--theme-dark.mdc-textfield--focused.mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline)::after, .mdc-theme--dark .mdc-textfield--focused.mdc-textfield--upgraded:not(.mdc-textfield--fullwidth):not(.mdc-textfield--multiline)::after { background-color: #3f51b5; background-color: var(--mdc-theme-primary, #3f51b5); transform: translateY(100%) scaleY(2); transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1); } .mdc-textfield--focused .mdc-textfield__label { color: #3f51b5; color: var(--mdc-theme-primary, #3f51b5); } .mdc-textfield--theme-dark .mdc-textfield--focused .mdc-textfield__label, .mdc-theme--dark .mdc-textfield--focused .mdc-textfield__label { color: #3f51b5; color: var(--mdc-theme-primary, #3f51b5); } .mdc-textfield--dense { margin-top: 12px; margin-bottom: 4px; font-size: .813rem; } .mdc-textfield--dense .mdc-textfield__label--float-above { transform: translateY(calc(-100% - 2px)) scale(0.923, 0.923); } .mdc-textfield--invalid:not(.mdc-textfield--focused)::after, .mdc-textfield--invalid:not(.mdc-textfield--focused).mdc-textfield--upgraded::after { background-color: #d50000; } .mdc-textfield--invalid:not(.mdc-textfield--focused) .mdc-textfield__label { color: #d50000; } .mdc-textfield--theme-dark.mdc-textfield--invalid:not(.mdc-textfield--focused)::after, .mdc-textfield--theme-dark.mdc-textfield--invalid:not(.mdc-textfield--focused).mdc-textfield--upgraded::after, .mdc-theme--dark .mdc-textfield--invalid:not(.mdc-textfield--focused)::after, .mdc-theme--dark .mdc-textfield--invalid:not(.mdc-textfield--focused).mdc-textfield--upgraded::after { background-color: #ff6e6e; } .mdc-textfield--theme-dark.mdc-textfield--invalid:not(.mdc-textfield--focused) .mdc-textfield__label, .mdc-theme--dark .mdc-textfield--invalid:not(.mdc-textfield--focused) .mdc-textfield__label { color: #ff6e6e; } .mdc-textfield--disabled { border-bottom: 1px dotted rgba(35, 31, 32, 0.26); } .mdc-textfield--disabled::after { display: none; } .mdc-textfield--disabled .mdc-textfield__input { padding-bottom: 7px; } .mdc-textfield--theme-dark.mdc-textfield--disabled, .mdc-theme--dark .mdc-textfield--disabled { border-bottom: 1px dotted rgba(255, 255, 255, 0.3); } .mdc-textfield--disabled .mdc-textfield__input, .mdc-textfield--disabled .mdc-textfield__label, .mdc-textfield--disabled + .mdc-textfield-helptext { color: rgba(0, 0, 0, 0.38); color: var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38)); } .mdc-textfield--theme-dark .mdc-textfield--disabled .mdc-textfield__input, .mdc-theme--dark .mdc-textfield--disabled .mdc-textfield__input, .mdc-textfield--theme-dark .mdc-textfield--disabled .mdc-textfield__label, .mdc-theme--dark .mdc-textfield--disabled .mdc-textfield__label { color: rgba(255, 255, 255, 0.5); color: var(--mdc-theme-text-disabled-on-dark, rgba(255, 255, 255, 0.5)); } .mdc-textfield--theme-dark.mdc-textfield--disabled + .mdc-textfield-helptext, .mdc-theme--dark .mdc-textfield--disabled + .mdc-textfield-helptext { color: rgba(255, 255, 255, 0.5); color: var(--mdc-theme-text-disabled-on-dark, rgba(255, 255, 255, 0.5)); } .mdc-textfield--disabled .mdc-textfield__label { bottom: 7px; cursor: default; } .mdc-textfield__input:required + .mdc-textfield__label::after { margin-left: 1px; content: "*"; } .mdc-textfield--focused .mdc-textfield__input:required + .mdc-textfield__label::after { color: #d50000; } .mdc-textfield--focused .mdc-textfield--theme-dark .mdc-textfield__input:required + .mdc-textfield__label::after, .mdc-textfield--focused .mdc-theme--dark .mdc-textfield__input:required + .mdc-textfield__label::after { color: #ff6e6e; } .mdc-textfield--multiline { display: flex; height: initial; transition: none; } .mdc-textfield--multiline::after { content: initial; } .mdc-textfield--multiline .mdc-textfield__input { padding: 4px; transition: border-color 180ms cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 2px; } .mdc-textfield--theme-dark .mdc-textfield--multiline .mdc-textfield__input, .mdc-theme--dark .mdc-textfield--multiline .mdc-textfield__input { border-color: rgba(255, 255, 255, 0.12); } .mdc-textfield--multiline .mdc-textfield__input:focus { border-color: #3f51b5; border-color: var(--mdc-theme-primary, #3f51b5); } .mdc-textfield--multiline .mdc-textfield__input:invalid:not(:focus) { border-color: #d50000; } .mdc-textfield--theme-dark .mdc-textfield--multiline .mdc-textfield__input:invalid:not(:focus), .mdc-theme--dark .mdc-textfield--multiline .mdc-textfield__input:invalid:not(:focus) { border-color: #ff6e6e; } .mdc-textfield--multiline .mdc-textfield__label { top: 6px; bottom: initial; left: 4px; } [dir="rtl"] .mdc-textfield--multiline .mdc-textfield--multiline .mdc-textfield__label, .mdc-textfield--multiline[dir="rtl"] .mdc-textfield--multiline .mdc-textfield__label { right: 4px; left: auto; } .mdc-textfield--multiline .mdc-textfield__label--float-above { transform: translateY(calc(-100% - 6px)) scale(0.923, 0.923); } .mdc-textfield--multiline.mdc-textfield--disabled { border-bottom: none; } .mdc-textfield--multiline.mdc-textfield--disabled .mdc-textfield__input { border: 1px dotted rgba(35, 31, 32, 0.26); } .mdc-textfield--theme-dark .mdc-textfield--multiline.mdc-textfield--disabled .mdc-textfield__input, .mdc-theme--dark .mdc-textfield--multiline.mdc-textfield--disabled .mdc-textfield__input { border-color: rgba(255, 255, 255, 0.3); } .mdc-textfield--fullwidth { display: block; width: 100%; box-sizing: border-box; margin: 0; border: none; border-bottom: 1px solid rgba(0, 0, 0, 0.12); outline: none; } .mdc-textfield--fullwidth:not(.mdc-textfield--multiline) { height: 56px; } .mdc-textfield--fullwidth.mdc-textfield--multiline { padding: 20px 0 0; } .mdc-textfield--fullwidth.mdc-textfield--dense:not(.mdc-textfield--multiline) { height: 48px; } .mdc-textfield--fullwidth.mdc-textfield--dense.mdc-textfield--multiline { padding: 16px 0 0; } .mdc-textfield--fullwidth.mdc-textfield--disabled, .mdc-textfield--fullwidth.mdc-textfield--disabled.mdc-textfield--multiline { border-bottom: 1px dotted rgba(0, 0, 0, 0.12); } .mdc-textfield--fullwidth--theme-dark, .mdc-theme--dark .mdc-textfield--fullwidth { border-bottom: 1px solid rgba(255, 255, 255, 0.12); } .mdc-textfield--fullwidth--theme-dark.mdc-textfield--disabled, .mdc-textfield--fullwidth--theme-dark.mdc-textfield--disabled.mdc-textfield--multiline, .mdc-theme--dark .mdc-textfield--fullwidth.mdc-textfield--disabled, .mdc-theme--dark .mdc-textfield--fullwidth.mdc-textfield--disabled.mdc-textfield--multiline { border-bottom: 1px dotted rgba(255, 255, 255, 0.12); } .mdc-textfield--fullwidth .mdc-textfield__input { width: 100%; height: 100%; padding: 0; resize: none; border: none !important; } .mdc-textfield:not(.mdc-textfield--upgraded):not(.mdc-textfield--multiline) .mdc-textfield__input { transition: border-bottom-color 180ms cubic-bezier(0.4, 0, 0.2, 1); border-bottom: 1px solid rgba(0, 0, 0, 0.12); } .mdc-textfield:not(.mdc-textfield--upgraded) .mdc-textfield__input:focus { border-color: #3f51b5; border-color: var(--mdc-theme-primary, #3f51b5); } .mdc-textfield:not(.mdc-textfield--upgraded) .mdc-textfield__input:disabled { color: rgba(0, 0, 0, 0.38); color: var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38)); border-style: dotted; border-color: rgba(35, 31, 32, 0.26); } .mdc-textfield:not(.mdc-textfield--upgraded) .mdc-textfield__input:invalid:not(:focus) { border-color: #d50000; } .mdc-textfield--theme-dark:not(.mdc-textfield--upgraded) .mdc-textfield__input:not(:focus), .mdc-theme--dark .mdc-textfield:not(.mdc-textfield--upgraded) .mdc-textfield__input:not(:focus) { border-color: rgba(255, 255, 255, 0.12); } .mdc-textfield--theme-dark:not(.mdc-textfield--upgraded) .mdc-textfield__input:disabled, .mdc-theme--dark .mdc-textfield:not(.mdc-textfield--upgraded) .mdc-textfield__input:disabled { color: rgba(255, 255, 255, 0.5); color: var(--mdc-theme-text-disabled-on-dark, rgba(255, 255, 255, 0.5)); border-color: rgba(255, 255, 255, 0.3); } .mdc-textfield--theme-dark:not(.mdc-textfield--upgraded) .mdc-textfield__input:invalid:not(:focus), .mdc-theme--dark .mdc-textfield:not(.mdc-textfield--upgraded) .mdc-textfield__input:invalid:not(:focus) { border-color: #ff6e6e; } .mdc-textfield-helptext { color: rgba(0, 0, 0, 0.38); color: var(--mdc-theme-text-hint-on-light, rgba(0, 0, 0, 0.38)); margin: 0; transition: opacity 180ms cubic-bezier(0.4, 0, 0.2, 1); font-size: .75rem; opacity: 0; will-change: opacity; } .mdc-textfield-helptext--theme-dark, .mdc-theme--dark .mdc-textfield-helptext { color: rgba(255, 255, 255, 0.5); color: var(--mdc-theme-text-hint-on-dark, rgba(255, 255, 255, 0.5)); } .mdc-textfield + .mdc-textfield-helptext { margin-bottom: 8px; } .mdc-textfield--dense + .mdc-textfield-helptext { margin-bottom: 4px; } .mdc-textfield--focused + .mdc-textfield-helptext:not(.mdc-textfield-helptext--validation-msg) { opacity: 1; } .mdc-textfield-helptext--persistent { transition: none; opacity: 1; will-change: initial; } .mdc-textfield--invalid + .mdc-textfield-helptext--validation-msg { color: #d50000; opacity: 1; } .mdc-textfield--theme-dark.mdc-textfield--invalid + .mdc-textfield-helptext--validation-msg, .mdc-theme--dark .mdc-textfield--invalid + .mdc-textfield-helptext--validation-msg { color: #ff6e6e; } .mdc-form-field > .mdc-textfield + label { align-self: flex-start; }
{'content_hash': 'c6c7df31c345e2f7d21c88c53424bacf', 'timestamp': '', 'source': 'github', 'line_count': 571, 'max_line_length': 197, 'avg_line_length': 36.63922942206655, 'alnum_prop': 0.6581903350700253, 'repo_name': 'BCM-Company/octohydra', 'id': 'ed5e311331e3b72fe7658989d1f2e7e573809a33', 'size': '21013', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'node_modules/@material/textfield/dist/mdc.textfield.css', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '547'}, {'name': 'CSS', 'bytes': '42690'}, {'name': 'HTML', 'bytes': '36989'}, {'name': 'JavaScript', 'bytes': '11271'}]}
GitHub
<?php /** * Created by PhpStorm. * User: exodus4d * Date: 28.04.15 * Time: 21:27 */ namespace Exodus4D\Pathfinder\Controller; use Exodus4D\Pathfinder\Controller\Ccp as Ccp; use Exodus4D\Pathfinder\Lib\Config; use Exodus4D\Pathfinder\Lib\Resource; class AppController extends Controller { /** * @param \Base $f3 * @param $params * @return bool */ public function beforeroute(\Base $f3, $params) : bool { // page title $f3->set('tplPageTitle', Config::getPathfinderData('name')); // main page content $f3->set('tplPageContent', Config::getPathfinderData('view.login')); // body element class $f3->set('tplBodyClass', 'pf-landing'); // JS main file $f3->set('tplJsView', 'login'); if($return = parent::beforeroute($f3, $params)){ // href for SSO Auth $f3->set('tplAuthType', $f3->get('BASE') . $f3->alias( 'sso', ['action' => 'requestAuthorization'] )); // characters from cookies $f3->set('cookieCharacters', $this->getCookieByName(self::COOKIE_PREFIX_CHARACTER, true)); $f3->set('getCharacterGrid', function($characters){ return ( ((12 / count($characters)) <= 3) ? 3 : (12 / count($characters)) ); }); } return $return; } /** * event handler after routing * @param \Base $f3 */ public function afterroute(\Base $f3){ parent::afterroute($f3); // clear all SSO related temp data if($f3->exists(Ccp\Sso::SESSION_KEY_SSO)){ $f3->clear(Ccp\Sso::SESSION_KEY_SSO); } } /** * show main login (index) page * @param \Base $f3 */ public function init(\Base $f3){ $resource = Resource::instance(); $resource->register('script', 'app/login'); $resource->register('script', 'app/mappage', 'prefetch'); $resource->register('image', 'sso/signature.png'); $resource->register('image', 'sso/gameplay.png'); } }
{'content_hash': 'ea7303e4c34c965b81e4fa76c9517c8e', 'timestamp': '', 'source': 'github', 'line_count': 75, 'max_line_length': 114, 'avg_line_length': 27.466666666666665, 'alnum_prop': 0.5645631067961165, 'repo_name': 'exodus4d/pathfinder', 'id': 'b9880f4cda252eeb721e4f4e86bcf1bb13c73053', 'size': '2060', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/Controller/AppController.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '378365'}, {'name': 'HTML', 'bytes': '453443'}, {'name': 'JavaScript', 'bytes': '2609425'}, {'name': 'PHP', 'bytes': '997459'}]}
GitHub
require 'test_helper' module Shipit class CSVSerializerTest < ActiveSupport::TestCase test "blank values are dumped as nil" do assert_dumped nil, '' assert_dumped nil, ' ' assert_dumped nil, nil assert_dumped nil, [] end test "blank values are loaded as an empty array" do assert_loaded [], '' assert_loaded [], ' ' assert_loaded [], nil end test "load split the words by comma" do assert_loaded %w(foo bar), 'foo,bar' end test "dump join the words with a comma" do assert_dumped 'foo,bar', %w(foo bar) end private def assert_dumped(expected, object) message = "Expected CSVSerializer.dump(#{object.inspect}) to eq #{expected.inspect}" if expected.nil? assert_nil Shipit::CSVSerializer.dump(object), message else assert_equal(expected, Shipit::CSVSerializer.dump(object), message) end end def assert_loaded(expected, payload) message = "Expected CSVSerializer.load(#{payload.inspect}) to eq #{expected.inspect}" if expected.nil? assert_nil Shipit::CSVSerializer.load(payload), message else assert_equal(expected, Shipit::CSVSerializer.load(payload), message) end end end end
{'content_hash': '1b8b40da813ebff37abd3d7114229544', 'timestamp': '', 'source': 'github', 'line_count': 46, 'max_line_length': 91, 'avg_line_length': 27.695652173913043, 'alnum_prop': 0.6420722135007849, 'repo_name': 'perobertson/shipit-engine', 'id': 'ed1ca73a458d12a7555e8d5c22d798b7a2b2f201', 'size': '1274', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/unit/csv_serializer_test.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '31587'}, {'name': 'CoffeeScript', 'bytes': '15372'}, {'name': 'HTML', 'bytes': '44306'}, {'name': 'JavaScript', 'bytes': '596'}, {'name': 'Python', 'bytes': '206'}, {'name': 'Ruby', 'bytes': '447800'}, {'name': 'Shell', 'bytes': '5802'}]}
GitHub
namespace WFA_psychometric_chart { partial class comfort_zone { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(comfort_zone)); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label7 = new System.Windows.Forms.Label(); this.textBox4 = new System.Windows.Forms.TextBox(); this.textBox3 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.btn_ok = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.label8 = new System.Windows.Forms.Label(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.btn_color = new System.Windows.Forms.Button(); this.label17 = new System.Windows.Forms.Label(); this.tb_name = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); this.btn_delete = new System.Windows.Forms.Button(); this.btn_update = new System.Windows.Forms.Button(); this.btn_add = new System.Windows.Forms.Button(); this.comboBox2 = new System.Windows.Forms.ComboBox(); this.label9 = new System.Windows.Forms.Label(); this.tb_maxhum = new System.Windows.Forms.TextBox(); this.tb_minhum = new System.Windows.Forms.TextBox(); this.tb_maxtemp = new System.Windows.Forms.TextBox(); this.tb_mintemp = new System.Windows.Forms.TextBox(); this.label10 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.label7); this.groupBox1.Controls.Add(this.textBox4); this.groupBox1.Controls.Add(this.textBox3); this.groupBox1.Controls.Add(this.textBox2); this.groupBox1.Controls.Add(this.textBox1); this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label1); resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // // comboBox1 // this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox1.FormattingEnabled = true; resources.ApplyResources(this.comboBox1, "comboBox1"); this.comboBox1.Name = "comboBox1"; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // // label7 // resources.ApplyResources(this.label7, "label7"); this.label7.Name = "label7"; // // textBox4 // resources.ApplyResources(this.textBox4, "textBox4"); this.textBox4.Name = "textBox4"; this.textBox4.ReadOnly = true; this.textBox4.TextChanged += new System.EventHandler(this.textBox4_TextChanged); // // textBox3 // resources.ApplyResources(this.textBox3, "textBox3"); this.textBox3.Name = "textBox3"; this.textBox3.ReadOnly = true; this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged); // // textBox2 // resources.ApplyResources(this.textBox2, "textBox2"); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged); // // textBox1 // resources.ApplyResources(this.textBox1, "textBox1"); this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // // label4 // resources.ApplyResources(this.label4, "label4"); this.label4.Name = "label4"; // // label5 // resources.ApplyResources(this.label5, "label5"); this.label5.Name = "label5"; // // label6 // resources.ApplyResources(this.label6, "label6"); this.label6.Name = "label6"; // // label3 // resources.ApplyResources(this.label3, "label3"); this.label3.Name = "label3"; // // label2 // resources.ApplyResources(this.label2, "label2"); this.label2.Name = "label2"; // // label1 // resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // // btn_ok // resources.ApplyResources(this.btn_ok, "btn_ok"); this.btn_ok.Name = "btn_ok"; this.btn_ok.UseVisualStyleBackColor = true; this.btn_ok.Click += new System.EventHandler(this.button1_Click); // // button2 // resources.ApplyResources(this.button2, "button2"); this.button2.Name = "button2"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // label8 // resources.ApplyResources(this.label8, "label8"); this.label8.Name = "label8"; // // checkBox1 // resources.ApplyResources(this.checkBox1, "checkBox1"); this.checkBox1.Name = "checkBox1"; this.checkBox1.UseVisualStyleBackColor = true; this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // groupBox2 // this.groupBox2.Controls.Add(this.btn_color); this.groupBox2.Controls.Add(this.label17); this.groupBox2.Controls.Add(this.tb_name); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.btn_delete); this.groupBox2.Controls.Add(this.btn_update); this.groupBox2.Controls.Add(this.btn_add); this.groupBox2.Controls.Add(this.comboBox2); this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.tb_maxhum); this.groupBox2.Controls.Add(this.tb_minhum); this.groupBox2.Controls.Add(this.tb_maxtemp); this.groupBox2.Controls.Add(this.tb_mintemp); this.groupBox2.Controls.Add(this.label10); this.groupBox2.Controls.Add(this.label11); this.groupBox2.Controls.Add(this.label12); this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label14); this.groupBox2.Controls.Add(this.label15); resources.ApplyResources(this.groupBox2, "groupBox2"); this.groupBox2.Name = "groupBox2"; this.groupBox2.TabStop = false; // // btn_color // resources.ApplyResources(this.btn_color, "btn_color"); this.btn_color.Name = "btn_color"; this.btn_color.UseVisualStyleBackColor = true; this.btn_color.Click += new System.EventHandler(this.btn_color_Click); // // label17 // resources.ApplyResources(this.label17, "label17"); this.label17.Name = "label17"; // // tb_name // resources.ApplyResources(this.tb_name, "tb_name"); this.tb_name.Name = "tb_name"; // // label16 // resources.ApplyResources(this.label16, "label16"); this.label16.Name = "label16"; // // btn_delete // resources.ApplyResources(this.btn_delete, "btn_delete"); this.btn_delete.Name = "btn_delete"; this.btn_delete.UseVisualStyleBackColor = true; this.btn_delete.Click += new System.EventHandler(this.btn_delete_Cl); // // btn_update // resources.ApplyResources(this.btn_update, "btn_update"); this.btn_update.Name = "btn_update"; this.btn_update.UseVisualStyleBackColor = true; this.btn_update.Click += new System.EventHandler(this.btn_update_Click); // // btn_add // resources.ApplyResources(this.btn_add, "btn_add"); this.btn_add.Name = "btn_add"; this.btn_add.UseVisualStyleBackColor = true; this.btn_add.Click += new System.EventHandler(this.btn_add_Click); // // comboBox2 // this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox2.FormattingEnabled = true; this.comboBox2.Items.AddRange(new object[] { resources.GetString("comboBox2.Items"), resources.GetString("comboBox2.Items1"), resources.GetString("comboBox2.Items2"), resources.GetString("comboBox2.Items3"), resources.GetString("comboBox2.Items4"), resources.GetString("comboBox2.Items5"), resources.GetString("comboBox2.Items6"), resources.GetString("comboBox2.Items7"), resources.GetString("comboBox2.Items8")}); resources.ApplyResources(this.comboBox2, "comboBox2"); this.comboBox2.Name = "comboBox2"; this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged); // // label9 // resources.ApplyResources(this.label9, "label9"); this.label9.Name = "label9"; // // tb_maxhum // resources.ApplyResources(this.tb_maxhum, "tb_maxhum"); this.tb_maxhum.Name = "tb_maxhum"; this.tb_maxhum.TextChanged += new System.EventHandler(this.tb_maxhum_TextChanged); // // tb_minhum // resources.ApplyResources(this.tb_minhum, "tb_minhum"); this.tb_minhum.Name = "tb_minhum"; this.tb_minhum.TextChanged += new System.EventHandler(this.tb_minhum_TextChanged); // // tb_maxtemp // resources.ApplyResources(this.tb_maxtemp, "tb_maxtemp"); this.tb_maxtemp.Name = "tb_maxtemp"; this.tb_maxtemp.TextChanged += new System.EventHandler(this.tb_maxtemp_TextChanged); // // tb_mintemp // resources.ApplyResources(this.tb_mintemp, "tb_mintemp"); this.tb_mintemp.Name = "tb_mintemp"; this.tb_mintemp.TextChanged += new System.EventHandler(this.tb_mintemp_TextChanged); // // label10 // resources.ApplyResources(this.label10, "label10"); this.label10.Name = "label10"; // // label11 // resources.ApplyResources(this.label11, "label11"); this.label11.Name = "label11"; // // label12 // resources.ApplyResources(this.label12, "label12"); this.label12.Name = "label12"; // // label13 // resources.ApplyResources(this.label13, "label13"); this.label13.Name = "label13"; // // label14 // resources.ApplyResources(this.label14, "label14"); this.label14.Name = "label14"; // // label15 // resources.ApplyResources(this.label15, "label15"); this.label15.Name = "label15"; // // comfort_zone // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.groupBox2); this.Controls.Add(this.checkBox1); this.Controls.Add(this.label8); this.Controls.Add(this.button2); this.Controls.Add(this.btn_ok); this.Controls.Add(this.groupBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "comfort_zone"; this.Load += new System.EventHandler(this.comfort_zone_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.Label label7; private System.Windows.Forms.TextBox textBox4; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button btn_ok; private System.Windows.Forms.Button button2; private System.Windows.Forms.Label label8; private System.Windows.Forms.CheckBox checkBox1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.Label label9; private System.Windows.Forms.TextBox tb_maxhum; private System.Windows.Forms.TextBox tb_minhum; private System.Windows.Forms.TextBox tb_maxtemp; private System.Windows.Forms.TextBox tb_mintemp; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label15; private System.Windows.Forms.Button btn_delete; private System.Windows.Forms.Button btn_update; private System.Windows.Forms.Button btn_add; private System.Windows.Forms.TextBox tb_name; private System.Windows.Forms.Label label16; private System.Windows.Forms.Button btn_color; private System.Windows.Forms.Label label17; } }
{'content_hash': '74d74244aae668ae081bbb6c9d9f2847', 'timestamp': '', 'source': 'github', 'line_count': 397, 'max_line_length': 144, 'avg_line_length': 43.80352644836272, 'alnum_prop': 0.5716503737780334, 'repo_name': 'temcocontrols/T3000_Building_Automation_System', 'id': 'dd014c8c591c2cb66342a9c78545d61cd307bd29', 'size': '17392', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Psychrometric Tool/Psychro Tool/WFA_psychometric_chart/WFA_psychometric_chart/comfort_zone.Designer.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '555'}, {'name': 'C', 'bytes': '4704332'}, {'name': 'C#', 'bytes': '9337521'}, {'name': 'C++', 'bytes': '15665753'}, {'name': 'CMake', 'bytes': '169395'}, {'name': 'CSS', 'bytes': '111688'}, {'name': 'Dockerfile', 'bytes': '210'}, {'name': 'HTML', 'bytes': '125316'}, {'name': 'Inno Setup', 'bytes': '5879'}, {'name': 'JavaScript', 'bytes': '1789138'}, {'name': 'Makefile', 'bytes': '6851'}, {'name': 'Meson', 'bytes': '7623'}, {'name': 'NASL', 'bytes': '14427'}, {'name': 'Objective-C', 'bytes': '7094'}, {'name': 'Perl', 'bytes': '40922'}, {'name': 'PowerShell', 'bytes': '4726'}, {'name': 'Python', 'bytes': '1992'}, {'name': 'Shell', 'bytes': '143'}]}
GitHub
"""TensorFlow Probability math functions.""" from tensorflow_probability.python.internal import all_util from tensorflow_probability.python.math import ode from tensorflow_probability.python.math import psd_kernels from tensorflow_probability.python.math.bessel import bessel_iv_ratio from tensorflow_probability.python.math.bessel import bessel_ive from tensorflow_probability.python.math.bessel import bessel_kve from tensorflow_probability.python.math.bessel import log_bessel_ive from tensorflow_probability.python.math.bessel import log_bessel_kve from tensorflow_probability.python.math.custom_gradient import custom_gradient from tensorflow_probability.python.math.diag_jacobian import diag_jacobian from tensorflow_probability.python.math.generic import log1mexp from tensorflow_probability.python.math.generic import log_add_exp from tensorflow_probability.python.math.generic import log_combinations from tensorflow_probability.python.math.generic import log_cosh from tensorflow_probability.python.math.generic import log_cumsum_exp from tensorflow_probability.python.math.generic import log_sub_exp from tensorflow_probability.python.math.generic import reduce_kahan_sum from tensorflow_probability.python.math.generic import reduce_log_harmonic_mean_exp from tensorflow_probability.python.math.generic import reduce_logmeanexp from tensorflow_probability.python.math.generic import reduce_weighted_logsumexp from tensorflow_probability.python.math.generic import smootherstep from tensorflow_probability.python.math.generic import soft_sorting_matrix from tensorflow_probability.python.math.generic import soft_threshold from tensorflow_probability.python.math.generic import softplus_inverse from tensorflow_probability.python.math.generic import sqrt1pm1 from tensorflow_probability.python.math.gradient import value_and_gradient from tensorflow_probability.python.math.gram_schmidt import gram_schmidt from tensorflow_probability.python.math.integration import trapz from tensorflow_probability.python.math.interpolation import batch_interp_rectilinear_nd_grid from tensorflow_probability.python.math.interpolation import batch_interp_regular_1d_grid from tensorflow_probability.python.math.interpolation import batch_interp_regular_nd_grid from tensorflow_probability.python.math.interpolation import interp_regular_1d_grid from tensorflow_probability.python.math.linalg import cholesky_concat from tensorflow_probability.python.math.linalg import cholesky_update from tensorflow_probability.python.math.linalg import fill_triangular from tensorflow_probability.python.math.linalg import fill_triangular_inverse from tensorflow_probability.python.math.linalg import hpsd_logdet from tensorflow_probability.python.math.linalg import hpsd_quadratic_form_solve from tensorflow_probability.python.math.linalg import hpsd_quadratic_form_solvevec from tensorflow_probability.python.math.linalg import hpsd_solve from tensorflow_probability.python.math.linalg import hpsd_solvevec from tensorflow_probability.python.math.linalg import lu_matrix_inverse from tensorflow_probability.python.math.linalg import lu_reconstruct from tensorflow_probability.python.math.linalg import lu_solve from tensorflow_probability.python.math.linalg import pivoted_cholesky from tensorflow_probability.python.math.linalg import sparse_or_dense_matmul from tensorflow_probability.python.math.linalg import sparse_or_dense_matvecmul from tensorflow_probability.python.math.minimize import minimize from tensorflow_probability.python.math.minimize import minimize_stateless from tensorflow_probability.python.math.minimize import MinimizeTraceableQuantities from tensorflow_probability.python.math.numeric import clip_by_value_preserve_gradient from tensorflow_probability.python.math.numeric import log1psquare from tensorflow_probability.python.math.root_search import bracket_root from tensorflow_probability.python.math.root_search import find_root_chandrupatla from tensorflow_probability.python.math.root_search import find_root_secant from tensorflow_probability.python.math.root_search import secant_root from tensorflow_probability.python.math.scan_associative import scan_associative from tensorflow_probability.python.math.sparse import dense_to_sparse from tensorflow_probability.python.math.special import atan_difference from tensorflow_probability.python.math.special import betainc from tensorflow_probability.python.math.special import betaincinv from tensorflow_probability.python.math.special import dawsn from tensorflow_probability.python.math.special import erfcinv from tensorflow_probability.python.math.special import erfcx from tensorflow_probability.python.math.special import igammacinv from tensorflow_probability.python.math.special import igammainv from tensorflow_probability.python.math.special import lambertw from tensorflow_probability.python.math.special import lambertw_winitzki_approx from tensorflow_probability.python.math.special import lbeta from tensorflow_probability.python.math.special import log_gamma_correction from tensorflow_probability.python.math.special import log_gamma_difference from tensorflow_probability.python.math.special import logerfc from tensorflow_probability.python.math.special import logerfcx from tensorflow_probability.python.math.special import owens_t from tensorflow_probability.python.math.special import round_exponential_bump_function from tensorflow.python.util import deprecation # pylint: disable=g-direct-tensorflow-import _allowed_symbols = [ 'atan_difference', 'betainc', 'betaincinv', 'batch_interp_rectilinear_nd_grid', 'batch_interp_regular_1d_grid', 'batch_interp_regular_nd_grid', 'bessel_iv_ratio', 'bessel_ive', 'bessel_kve', 'bracket_root', 'cholesky_concat', 'cholesky_update', 'clip_by_value_preserve_gradient', 'custom_gradient', 'dawsn', 'dense_to_sparse', 'diag_jacobian', 'erfcinv', 'erfcx', 'igammacinv', 'igammainv', 'find_root_chandrupatla', 'find_root_secant', 'fill_triangular', 'fill_triangular_inverse', 'gram_schmidt', 'hpsd_logdet', 'hpsd_solve', 'hpsd_solvevec', 'hpsd_quadratic_form_solve', 'hpsd_quadratic_form_solvevec', 'interp_regular_1d_grid', 'lambertw', 'lambertw_winitzki_approx', 'lbeta', 'log_bessel_ive', 'log_bessel_kve', 'log1mexp', 'log1psquare', 'log_add_exp', 'log_combinations', 'log_cosh', 'log_cumsum_exp', 'logerfc', 'logerfcx', 'log_gamma_correction', 'log_gamma_difference', 'log_sub_exp', 'lu_matrix_inverse', 'lu_reconstruct', 'lu_solve', 'minimize', 'minimize_stateless', 'MinimizeTraceableQuantities', 'ode', 'owens_t', 'pivoted_cholesky', 'psd_kernels', 'reduce_kahan_sum', 'reduce_log_harmonic_mean_exp', 'reduce_logmeanexp', 'reduce_weighted_logsumexp', 'round_exponential_bump_function', 'scan_associative', 'secant_root', 'smootherstep', 'soft_sorting_matrix', 'soft_threshold', 'softplus_inverse', 'sparse_or_dense_matmul', 'sparse_or_dense_matvecmul', 'sqrt1pm1', 'trapz', 'value_and_gradient', ] all_util.remove_undocumented(__name__, _allowed_symbols)
{'content_hash': '1ba3e23066db76f3687ce371f7b3786a', 'timestamp': '', 'source': 'github', 'line_count': 158, 'max_line_length': 93, 'avg_line_length': 46.120253164556964, 'alnum_prop': 0.800741045697818, 'repo_name': 'tensorflow/probability', 'id': '4c68bea79eec6c705179648691aab1e079d36ca0', 'size': '7965', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'tensorflow_probability/python/math/__init__.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Jupyter Notebook', 'bytes': '55552121'}, {'name': 'Python', 'bytes': '17339674'}, {'name': 'Shell', 'bytes': '24852'}, {'name': 'Starlark', 'bytes': '663851'}]}
GitHub
<html> <body> Provides implementations of the <code>ghidra.framework.model</code> interfaces that deal with the Project and Project management. </body> </html>
{'content_hash': 'd3186ca3004fad312ad88a2ba4548d7a', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 109, 'avg_line_length': 26.666666666666668, 'alnum_prop': 0.775, 'repo_name': 'NationalSecurityAgency/ghidra', 'id': '4615acc6b9322a86d0944eb90f7a174a7ff11e45', 'size': '160', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Ghidra/Framework/Project/src/main/java/ghidra/framework/project/package.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Assembly', 'bytes': '77536'}, {'name': 'Batchfile', 'bytes': '21610'}, {'name': 'C', 'bytes': '1132868'}, {'name': 'C++', 'bytes': '7334484'}, {'name': 'CSS', 'bytes': '75788'}, {'name': 'GAP', 'bytes': '102771'}, {'name': 'GDB', 'bytes': '3094'}, {'name': 'HTML', 'bytes': '4121163'}, {'name': 'Hack', 'bytes': '31483'}, {'name': 'Haskell', 'bytes': '453'}, {'name': 'Java', 'bytes': '88669329'}, {'name': 'JavaScript', 'bytes': '1109'}, {'name': 'Lex', 'bytes': '22193'}, {'name': 'Makefile', 'bytes': '15883'}, {'name': 'Objective-C', 'bytes': '23937'}, {'name': 'Pawn', 'bytes': '82'}, {'name': 'Python', 'bytes': '587415'}, {'name': 'Shell', 'bytes': '234945'}, {'name': 'TeX', 'bytes': '54049'}, {'name': 'XSLT', 'bytes': '15056'}, {'name': 'Xtend', 'bytes': '115955'}, {'name': 'Yacc', 'bytes': '127754'}]}
GitHub
package avrora.sim.mcu; import java.util.LinkedList; import avrora.sim.Simulator; import avrora.sim.clock.ClockDomain; import avrora.sim.platform.Platform; import avrora.sim.state.BooleanRegister; import avrora.sim.state.BooleanView; /** * The <code>Microcontroller</code> interface corresponds to a hardware device that implements the AVR * instruction set. This interface contains methods that get commonly needed information about the particular * hardware device and and can load programs onto this virtual device. * * @author Ben L. Titzer */ public interface Microcontroller { /** * The <code>Pin</code> interface encapsulates the notion of a physical pin on the microcontroller chip. * It is generally used in wiring up external devices to the microcontroller. * * @author Ben L. Titzer */ public interface Pin { /** * Listener which will be called if the value of a pin changes. */ public interface InputListener { /** * Called when the value of <code>input</code> was changed. * * @param input input which was affected * @param newValue new value of the input */ void onInputChanged(Input input, boolean newValue); } /** * The <code>Input</code> interface represents an input pin. When the pin is configured to be an input * and the microcontroller attempts to read from this pin, the installed instance of this interface * will be called. */ public interface Input { /** * The <code>read()</code> method is called by the simulator when the program attempts to read the * level of the pin. The device can then compute and return the current level of the pin. * * @return true if the level of the pin is high; false otherwise */ public boolean read(); /** * Registers a {@link PinChangeListener}. * * @param listener listener to register */ public void registerListener(InputListener listener); /** * Unregisters a {@link PinChangeListener} if found, or does nothing otherwise. * * @param listener listener to unregister. */ public void unregisterListener(InputListener listener); } /** ListenableInput which is implemented using a BooleanView */ public class ListenableBooleanViewInput extends ListenableInput implements BooleanView.ValueSetListener { /*** * Value of this input */ private BooleanView level; /** * Creates this input pin and creates a new BooleanRegister as a value basis. */ public ListenableBooleanViewInput() { this(new BooleanRegister()); } /** * Creates this input pin and uses an existing BooleanView * @param view existing BooleanView to use */ public ListenableBooleanViewInput(BooleanView view) { setLevelView(view); } /** * Returns the view used as pin level */ public BooleanView getLevelView() { return level; } /** * Changes the view used for pin level */ public void setLevelView(BooleanView view) { boolean hadLevel = (level != null); if (hadLevel) { // unregister previously registered views level.setValueSetListener(null); } level = view; level.setValueSetListener(this); if (hadLevel) { notifyListeners(level.getValue()); // value might have changed -> re-test this! } } /** * Changes the level of this pin by modifying the underlying view. */ public void setLevel(boolean newLevel) { level.setValue(newLevel); } /** * Returns the level of this pin by reading the underlying view. * @return */ public boolean getLevel() { return level.getValue(); } @Override public boolean read() { return level.getValue(); } @Override public void onValueSet(BooleanView view, boolean newValue) { this.notifyListeners(newValue); } } /** Abstract implementation of <code>Input</code> which supports InputListeners. */ public abstract class ListenableInput implements Input { private LinkedList<InputListener> listeners; private boolean oldValue; /** Checks if a change in level has occured, and notifies all listeners. */ protected void update() { boolean newValue = read(); if (oldValue != newValue) { notifyListeners(newValue); oldValue = newValue; } } /** Notifies every listener about a changed value. */ protected void notifyListeners(boolean newValue) { if (listeners != null) { for (InputListener l : listeners) { l.onInputChanged(this, newValue); } } } public void registerListener(InputListener listener) { if (listeners == null) { listeners = new LinkedList<InputListener>(); } listeners.add(listener); } public void unregisterListener(InputListener listener) { if (listeners != null) { if (listeners.remove(listener) && listeners.isEmpty()) { listeners = null; } } } } /** * The <code>Output</code> interface represents an output pin. When the pin is configured to be an * output and the microcontroller attempts to wrote to this pin, the installed instance of this * interface will be called. */ public interface Output { /** * The <code>write()</code> method is called by the simulator when the program writes a logical * level to the pin. The device can then take the appropriate action. * * @param level a boolean representing the logical level of the write */ public void write(boolean level); } /** * The <code>connect()</code> method will connect this pin to the specified input. Attempts by the * microcontroller to read from this pin when it is configured as an input will then call this * instance's <code>read()</code> method. * * @param i the <code>Input</code> instance to connect to */ public void connectInput(Input i); /** * The <code>connect()</code> method will connect this pin to the specified output. Attempts by the * microcontroller to write to this pin when it is configured as an output will then call this * instance's <code>write()</code> method. * * @param o the <code>Output</code> instance to connect to */ public void connectOutput(Output o); /** * The <code>setInput()</code> method sets the current level of the pin. This can be used <b>additionally</b> * to <code>connectInput()</code> to trigger interrupts. * * @param level the <code>Intput</code> */ public void setInput(Boolean level); } /** * The <code>getSimulator()</code> method gets a simulator instance that is capable of emulating this * hardware device. * * @return a <code>Simulator</code> instance corresponding to this device */ public Simulator getSimulator(); /** * The <code>getPlatform()</code> method gets a platform instance that contains this microcontroller. * * @return the platform instance containing this microcontroller, if it exists; null otherwise */ public Platform getPlatform(); /** * The <code>setPlatform()</code> method sets the platform instance that contains this microcontroller. * @param p the new platform for this microcontroller */ public void setPlatform(Platform p); /** * The <code>getPin()</code> method looks up the named pin and returns a reference to that pin. Names of * pins should be UPPERCASE. The intended users of this method are external device implementors which * connect their devices to the microcontroller through the pins. * * @param name the name of the pin; for example "PA0" or "OC1A" * @return a reference to the <code>Pin</code> object corresponding to the named pin if it exists; null * otherwise */ public Pin getPin(String name); /** * The <code>getPin()</code> method looks up the specified pin by its number and returns a reference to * that pin. The intended users of this method are external device implementors which connect their * devices to the microcontroller through the pins. * * @param num the pin number to look up * @return a reference to the <code>Pin</code> object corresponding to the named pin if it exists; null * otherwise */ public Pin getPin(int num); /** * The <code>sleep()</code> method puts the microcontroller into the sleep mode defined by its * internal sleep configuration register. It may shutdown devices and disable some clocks. This * method should only be called from within the interpreter. */ public void sleep(); /** * The <code>wakeup()</code> method wakes the microcontroller from a sleep mode. It may resume * devices, turn clocks back on, etc. This method is expected to return the number of cycles that * is required for the microcontroller to wake completely from the sleep state it was in. * * @return cycles required to wake from the current sleep mode */ public int wakeup(); /** * The <code>getClockDomain()</code> method returns the clock domain for this microcontroller. The clock * domain contains all of the clocks attached to the microcontroller and platform, including the main clock. * @return an instance of the <code>ClockDomain</code> class representing the clock domain for this * microcontroller */ public ClockDomain getClockDomain(); /** * The <code>getRegisterSet()</code> method returns the register set containing all of the IO registers * for this microcontroller. * @return a reference to the <code>RegisterSet</code> instance which stores all of the IO registers * for this microcontroller. */ public RegisterSet getRegisterSet(); /** * The <code>getProperties()</code> method gets an object that describes the microcontroller * including the size of the RAM, EEPROM, flash, etc. * @return an instance of the <code>MicrocontrollerProperties</code> class that contains all * the relevant information about this microcontroller */ public MCUProperties getProperties(); }
{'content_hash': 'ffc5214b91223c2c7923f2901217280a', 'timestamp': '', 'source': 'github', 'line_count': 307, 'max_line_length': 117, 'avg_line_length': 38.68078175895766, 'alnum_prop': 0.5827368421052631, 'repo_name': 'cmorty/avrora', 'id': '32dd71a5bf5a338dbef8038dfd0711543c6a629c', 'size': '13490', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'src/avrora/sim/mcu/Microcontroller.java', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Assembly', 'bytes': '1255'}, {'name': 'C', 'bytes': '9831'}, {'name': 'Java', 'bytes': '4272471'}, {'name': 'Scilab', 'bytes': '579046'}, {'name': 'Shell', 'bytes': '24242'}]}
GitHub
require 'nokogiri' module Lakes class Texas class WaterDataParser include Lakes::Helper attr_reader :raw_text attr_reader :conservation_pool_elevation_in_ft_msl attr_reader :percentage_full def initialize(text) @raw_text = text # File.write("test/data/water_data/Abilene.txt", @raw_text) # puts "WaterDataParser: raw_text: #{@raw_text}" parse end def parse html_doc = Nokogiri::HTML(@raw_text) cons_pool_elevation_header_element = html_doc.xpath('//td[contains(text(), "Conservation pool elevation")]').first cons_pool_elevation_root = cons_pool_elevation_header_element.try(:next_element) @conservation_pool_elevation_in_ft_msl = cleanup_raw_text(cons_pool_elevation_root.try(:text)) .try(:match, /([0-9,\.]+)/) .try(:captures) .try(:first) .try(:gsub, ',', '') .try(:to_f) percentage_full_element = cleanup_raw_text(html_doc.css('div.page-title h2 small').try(:text)) @percentage_full = percentage_full_element .try(:match, /^([0-9]+\.?[0-9]+)/) .try(:captures) .try(:first) .try(:to_f) end end end end
{'content_hash': '5ec3b01542345040b00ba0f35fe881ab', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 122, 'avg_line_length': 32.60526315789474, 'alnum_prop': 0.5851493139628733, 'repo_name': 'ssherman/lakes', 'id': '85b667fc2cc7b4282d06e731083fdbb39d1bebd4', 'size': '1239', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/lakes/texas/water_data_parser.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '399523'}, {'name': 'Ruby', 'bytes': '33635'}, {'name': 'Shell', 'bytes': '131'}]}
GitHub
namespace sfutils { namespace geometry { class GeometrySquareIso : public GeometrySquareIsoBase { public: GeometrySquareIso(float scale); virtual ~GeometrySquareIso(); virtual sf::Vector2f mapCoordsToPixel(const sf::Vector2i& coord) const override; virtual sf::Vector2i mapPixelToCoords(const sf::Vector2f& pos) const override; }; } } #endif
{'content_hash': 'ea9c1833b75bbaffc821bd2783ffac13', 'timestamp': '', 'source': 'github', 'line_count': 17, 'max_line_length': 96, 'avg_line_length': 27.529411764705884, 'alnum_prop': 0.5854700854700855, 'repo_name': 'Krozark/SFML-utils', 'id': '9726340cb0cdd6c7fb1f00df80dbcb6edc39d0f7', 'size': '596', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'include/SFML-utils/map/geometry/GeometrySquareIso.hpp', 'mode': '33261', 'license': 'bsd-2-clause', 'language': [{'name': 'C++', 'bytes': '322814'}, {'name': 'CMake', 'bytes': '98823'}, {'name': 'Smarty', 'bytes': '40872'}]}
GitHub
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; import { AppRoutingModule, routedComponents } from './app-routing.module'; import { CarDetailComponent } from 'src_app_car-detail_car-detail.component'; import { CarsService } from 'src_app_services_cars.service'; @NgModule({ imports: [ BrowserModule, HttpModule, AppRoutingModule ], declarations: [ AppComponent, CarDetailComponent, routedComponents ], providers: [ CarsService ], bootstrap: [AppComponent], }) export class AppModule { }
{'content_hash': '1b941d7e65ddafc264f1e2c9db514a24', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 77, 'avg_line_length': 27.615384615384617, 'alnum_prop': 0.6643454038997214, 'repo_name': 'irega/angular-scalable-logic-architecture', 'id': '8c5574d377ea18efbcdfdf744a9a16ac308c8245', 'size': '718', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/app/app.module.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '1173'}, {'name': 'JavaScript', 'bytes': '22564'}, {'name': 'TypeScript', 'bytes': '8173'}]}
GitHub
/* eslint no-unused-expressions: 0 */ import $ from 'jquery'; import querySelector from '../src/query-selector'; import { fixture, clear, matchers } from './helpers'; describe('querySelector', () => { beforeEach(() => { window.jasmine.addMatchers(matchers); }); afterEach(clear); describe('HTMLElement instance given as a tree', () => { it('select all children elements which matched by selector', () => { const treeClass = 'tree'; const nodeClass = 'node'; fixture(` <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> `); const tree = document.querySelector(`.${treeClass}`); const expectedClass = 'is-matched'; querySelector(tree, `.${nodeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${nodeClass}`).toHaveCSSClass(expectedClass); }); it('select tree element if matched by selector', () => { const treeClass = 'tree'; fixture(`<div class="${treeClass}"></div>`); const expectedClass = 'is-matched'; const tree = document.querySelector(`.${treeClass}`); querySelector(tree, `.${treeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${treeClass}`).toHaveCSSClass(expectedClass); }); }); describe('NodeList instance given as a tree', () => { it('select all children elements which matched by selector', () => { const treeClass = 'tree'; const nodeClass = 'node'; fixture(` <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> `); const trees = document.querySelectorAll(`.${treeClass}`); const expectedClass = 'is-matched'; querySelector(trees, `.${nodeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${nodeClass}`).toHaveCSSClass(expectedClass); }); it('select each tree element if matched by selector', () => { const treeClass = 'tree'; fixture(` <div class="${treeClass}"></div> <div class="${treeClass}"></div> <div class="${treeClass}"></div> `); const expectedClass = 'is-matched'; const trees = document.querySelectorAll(`.${treeClass}`); querySelector(trees, `.${treeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${treeClass}`).toHaveCSSClass(expectedClass); }); }); describe('array of HTMLElement instances given as a tree', () => { it('select all children elements which matched by selector', () => { const treeClass = 'tree'; const nodeClass = 'node'; fixture(` <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> `); const trees = [].slice.call(document.querySelectorAll(`.${treeClass}`)); const expectedClass = 'is-matched'; querySelector(trees, `.${nodeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${nodeClass}`).toHaveCSSClass(expectedClass); }); it('select each tree element if matched by selector', () => { const treeClass = 'tree'; fixture(` <div class="${treeClass}"></div> <div class="${treeClass}"></div> <div class="${treeClass}"></div> `); const expectedClass = 'is-matched'; const trees = [].slice.call(document.querySelectorAll(`.${treeClass}`)); querySelector(trees, `.${treeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${treeClass}`).toHaveCSSClass(expectedClass); }); }); describe('jQuery object given as a tree', () => { it('select all children elements which matched by selector', () => { const treeClass = 'tree'; const nodeClass = 'node'; fixture(` <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> `); const trees = $(`.${treeClass}`); const expectedClass = 'is-matched'; querySelector(trees, `.${nodeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${nodeClass}`).toHaveCSSClass(expectedClass); }); it('select each tree element if matched by selector', () => { const treeClass = 'tree'; fixture(` <div class="${treeClass}"></div> <div class="${treeClass}"></div> <div class="${treeClass}"></div> `); const expectedClass = 'is-matched'; const trees = $(`.${treeClass}`); querySelector(trees, `.${treeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${treeClass}`).toHaveCSSClass(expectedClass); }); }); describe('selector given as a tree', () => { it('select all children elements which matched by selector', () => { const treeClass = 'tree'; const nodeClass = 'node'; fixture(` <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> <div class="${treeClass}"> <div class="${nodeClass}"></div> </div> `); const expectedClass = 'is-matched'; querySelector(`.${treeClass}`, `.${nodeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${nodeClass}`).toHaveCSSClass(expectedClass); }); it('select each tree element if matched by selector', () => { const treeClass = 'tree'; fixture(` <div class="${treeClass}"></div> <div class="${treeClass}"></div> <div class="${treeClass}"></div> `); const expectedClass = 'is-matched'; querySelector(`.${treeClass}`, `.${treeClass}`).forEach((node) => { node.className = `${node.className} ${expectedClass}`; }); expect(`.${treeClass}`).toHaveCSSClass(expectedClass); }); describe('when selector contains blocks shortcuts', () => { it('select all children elements which matched by selector', () => { const treeBlock = 'tree'; const nodeClass = 'node'; fixture(` <div data-block="${treeBlock}"> <div class="${nodeClass}"></div> </div> <div data-block="${treeBlock}"> <div class="${nodeClass}"></div> </div> <div data-block="${treeBlock}"> <div class="${nodeClass}"></div> </div> `); const expectedClass = 'is-matched'; querySelector(`@@${treeBlock}`, `.${nodeClass}`).forEach((node) => { node.className = expectedClass; }); expect(`.${nodeClass}`).toHaveCSSClass(expectedClass); }); it('select each tree element if matched by selector', () => { const treeBlock = 'tree-block'; fixture(` <div data-block="@@${treeBlock}"></div> <div data-block="@@${treeBlock}"></div> <div data-block="@@${treeBlock}"></div> `); const expectedClass = 'is-matched'; querySelector(`@@${treeBlock}`, `@@${treeBlock}`).forEach((node) => { node.className = expectedClass; }); expect(`[data-block~="${treeBlock}"]`).toHaveCSSClass(expectedClass); }); }); describe('when selector contains roles shortcuts', () => { it('select all children elements which matched by selector', () => { const treeRole = 'tree'; const nodeClass = 'node'; fixture(` <div data-role="${treeRole}"> <div class="${nodeClass}"></div> </div> <div data-role="${treeRole}"> <div class="${nodeClass}"></div> </div> <div data-role="${treeRole}"> <div class="${nodeClass}"></div> </div> `); const expectedClass = 'is-matched'; querySelector(`@${treeRole}`, `.${nodeClass}`).forEach((node) => { node.className = expectedClass; }); expect(`.${nodeClass}`).toHaveCSSClass(expectedClass); }); it('select each tree element if matched by selector', () => { const treeRole = 'tree-block'; fixture(` <div data-role="@${treeRole}"></div> <div data-role="@${treeRole}"></div> <div data-role="@${treeRole}"></div> `); const expectedClass = 'is-matched'; querySelector(`@${treeRole}`, `@${treeRole}`).forEach((node) => { node.className = expectedClass; }); expect(`[data-role~="${treeRole}"]`).toHaveCSSClass(expectedClass); }); }); }); describe('blocks and roles shortcuts in selector', () => { it('supports blocks shortcuts in selector', () => { const treeClass = 'tree'; const nodeBlock = 'node'; fixture(` <div class="${treeClass}"> <div data-block="${nodeBlock}"></div> </div> <div class="${treeClass}"> <div data-block="${nodeBlock}"></div> </div> <div class="${treeClass}"> <div data-block="${nodeBlock}"></div> </div> `); const expectedClass = 'is-matched'; querySelector(`.${treeClass}`, `@@${nodeBlock}`).forEach((node) => { node.className = expectedClass; }); expect(`[data-block="${nodeBlock}"]`).toHaveCSSClass(expectedClass); }); it('supports roles shortcuts in selector', () => { const treeClass = 'tree'; const nodeRole = 'node'; fixture(` <div class="${treeClass}"> <div data-role="${nodeRole}"></div> </div> <div class="${treeClass}"> <div data-role="${nodeRole}"></div> </div> <div class="${treeClass}"> <div data-role="${nodeRole}"></div> </div> `); const expectedClass = 'is-matched'; querySelector(`.${treeClass}`, `@${nodeRole}`).forEach((node) => { node.className = expectedClass; }); expect(`[data-role="${nodeRole}"]`).toHaveCSSClass(expectedClass); }); }); });
{'content_hash': 'd534bb00bbfa2d7f72199d797648afdc', 'timestamp': '', 'source': 'github', 'line_count': 389, 'max_line_length': 78, 'avg_line_length': 28.18508997429306, 'alnum_prop': 0.5317402407880336, 'repo_name': 'demiazz/lighty-plugin-legacy', 'id': '093f698ede4f81f78b02e79787c9eb0d3e147ecc', 'size': '10964', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'spec/query-selector.spec.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '51387'}]}
GitHub
@interface LMStyleFormatCell : UITableViewCell @property (nonatomic, weak) id<LMStyleSettings> delegate; @property (nonatomic, assign) NSInteger selectedIndex; @end
{'content_hash': '7946ea0e71eaa88ab632b736be95ebd1', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 57, 'avg_line_length': 27.833333333333332, 'alnum_prop': 0.8083832335329342, 'repo_name': 'littleMeaning/SimpleWord', 'id': '79fd3279f728032ef72eb26d748cb06c2aa39223', 'size': '365', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'SimpleWord/LMStyleFormatCell.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '102971'}]}
GitHub
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any redistribution of this code must retain the above /// copyright and this notice and otherwise comply with the Use Terms. /** * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js * @description Array.prototype.reduceRight - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present */ function testcase() { var initialValue = 10; return initialValue === [].reduceRight(function () { }, initialValue); } runTestCase(testcase);
{'content_hash': '9ebd6b266a33120837f016244242a1a5', 'timestamp': '', 'source': 'github', 'line_count': 17, 'max_line_length': 116, 'avg_line_length': 43.1764705882353, 'alnum_prop': 0.6866485013623979, 'repo_name': 'hippich/typescript', 'id': '6207502d1e6a7e2f937e1b5dde66d35808952c08', 'size': '734', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'tests/Fidelity/test262/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Elixir', 'bytes': '3294'}, {'name': 'JavaScript', 'bytes': '24658966'}, {'name': 'Shell', 'bytes': '386'}, {'name': 'TypeScript', 'bytes': '18276884'}]}
GitHub
using System; /* Problem 8. Prime Number Check Write an expression that checks if given positive integer number n (n ≤ 100) is prime (i.e. it is divisible without remainder only to itself and 1). Note: You should check if the number is positive */ class PrimeNumberCheck { static void Main() { int n = int.Parse(Console.ReadLine()); string result; int b = 0; for (int i = 2; i < n; i++) { bool isPrimeOrNot = n % i == 0; result = isPrimeOrNot.ToString().ToLower(); if (result == "true") { Console.WriteLine("false"); break; } b++; } if (b == n - 2) { Console.WriteLine("true"); } if (n <= 1) { Console.WriteLine("false"); } } }
{'content_hash': '825b2e94d15acc3cf93934c28028d20a', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 86, 'avg_line_length': 24.083333333333332, 'alnum_prop': 0.48327566320645904, 'repo_name': 'iliyaST/TelerikAcademy', 'id': '52292f5f0655667c307c9de474b2d33caf7e38af', 'size': '871', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'C#1/03-Operators-and-Expressions/08.PrimeNumberCheck/Program.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '303'}, {'name': 'C#', 'bytes': '2931171'}, {'name': 'CSS', 'bytes': '169885'}, {'name': 'CoffeeScript', 'bytes': '1076'}, {'name': 'HTML', 'bytes': '8977397'}, {'name': 'JavaScript', 'bytes': '1658788'}, {'name': 'PLSQL', 'bytes': '4342'}]}
GitHub
#ifndef _MSC_VER # include <stdint.h> # include <stdbool.h> #else # include "win32/stdbool.h" # include "win32/stdint.h" #endif #include <limits.h> #include <ruby.h> #include "rbffi.h" #include "rbffi_endian.h" #include "AbstractMemory.h" #define BUFFER_EMBED_MAXLEN (8) typedef struct Buffer { AbstractMemory memory; union { VALUE rbParent; /* link to parent buffer */ char* storage; /* start of malloc area */ long embed[BUFFER_EMBED_MAXLEN / sizeof(long)]; /* storage for tiny allocations */ } data; } Buffer; static VALUE buffer_allocate(VALUE klass); static VALUE buffer_initialize(int argc, VALUE* argv, VALUE self); static void buffer_release(Buffer* ptr); static void buffer_mark(Buffer* ptr); static VALUE buffer_free(VALUE self); static VALUE BufferClass = Qnil; static VALUE buffer_allocate(VALUE klass) { Buffer* buffer; VALUE obj; obj = Data_Make_Struct(klass, Buffer, NULL, buffer_release, buffer); buffer->data.rbParent = Qnil; buffer->memory.flags = MEM_RD | MEM_WR; return obj; } static void buffer_release(Buffer* ptr) { if ((ptr->memory.flags & MEM_EMBED) == 0 && ptr->data.storage != NULL) { xfree(ptr->data.storage); ptr->data.storage = NULL; } xfree(ptr); } /* * call-seq: initialize(size, count=1, clear=false) * @param [Integer, Symbol, #size] Type or size in bytes of a buffer cell * @param [Fixnum] count number of cell in the Buffer * @param [Boolean] clear if true, set the buffer to all-zero * @return [self] * @raise {NoMemoryError} if failed to allocate memory for Buffer * A new instance of Buffer. */ static VALUE buffer_initialize(int argc, VALUE* argv, VALUE self) { VALUE rbSize = Qnil, rbCount = Qnil, rbClear = Qnil; Buffer* p; int nargs; Data_Get_Struct(self, Buffer, p); nargs = rb_scan_args(argc, argv, "12", &rbSize, &rbCount, &rbClear); p->memory.typeSize = rbffi_type_size(rbSize); p->memory.size = p->memory.typeSize * (nargs > 1 ? NUM2LONG(rbCount) : 1); if (p->memory.size > BUFFER_EMBED_MAXLEN) { p->data.storage = xmalloc(p->memory.size + 7); if (p->data.storage == NULL) { rb_raise(rb_eNoMemError, "Failed to allocate memory size=%lu bytes", p->memory.size); return Qnil; } /* ensure the memory is aligned on at least a 8 byte boundary */ p->memory.address = (void *) (((uintptr_t) p->data.storage + 0x7) & (uintptr_t) ~0x7UL); if (p->memory.size > 0 && (nargs < 3 || RTEST(rbClear))) { memset(p->memory.address, 0, p->memory.size); } } else { p->memory.flags |= MEM_EMBED; p->memory.address = (void *) &p->data.embed[0]; } if (rb_block_given_p()) { return rb_ensure(rb_yield, self, buffer_free, self); } return self; } /* * call-seq: initialize_copy(other) * @return [self] * DO NOT CALL THIS METHOD. */ static VALUE buffer_initialize_copy(VALUE self, VALUE other) { AbstractMemory* src; Buffer* dst; Data_Get_Struct(self, Buffer, dst); src = rbffi_AbstractMemory_Cast(other, BufferClass); if ((dst->memory.flags & MEM_EMBED) == 0 && dst->data.storage != NULL) { xfree(dst->data.storage); } dst->data.storage = xmalloc(src->size + 7); if (dst->data.storage == NULL) { rb_raise(rb_eNoMemError, "failed to allocate memory size=%lu bytes", src->size); return Qnil; } dst->memory.address = (void *) (((uintptr_t) dst->data.storage + 0x7) & (uintptr_t) ~0x7UL); dst->memory.size = src->size; dst->memory.typeSize = src->typeSize; /* finally, copy the actual buffer contents */ memcpy(dst->memory.address, src->address, src->size); return self; } static VALUE buffer_alloc_inout(int argc, VALUE* argv, VALUE klass) { return buffer_initialize(argc, argv, buffer_allocate(klass)); } static VALUE slice(VALUE self, long offset, long len) { Buffer* ptr; Buffer* result; VALUE obj = Qnil; Data_Get_Struct(self, Buffer, ptr); checkBounds(&ptr->memory, offset, len); obj = Data_Make_Struct(BufferClass, Buffer, buffer_mark, -1, result); result->memory.address = ptr->memory.address + offset; result->memory.size = len; result->memory.flags = ptr->memory.flags; result->memory.typeSize = ptr->memory.typeSize; result->data.rbParent = self; return obj; } /* * call-seq: + offset * @param [Numeric] offset * @return [Buffer] a new instance of Buffer pointing from offset until end of previous buffer. * Add a Buffer with an offset */ static VALUE buffer_plus(VALUE self, VALUE rbOffset) { Buffer* ptr; long offset = NUM2LONG(rbOffset); Data_Get_Struct(self, Buffer, ptr); return slice(self, offset, ptr->memory.size - offset); } /* * call-seq: slice(offset, length) * @param [Numeric] offset * @param [Numeric] length * @return [Buffer] a new instance of Buffer * Slice an existing Buffer. */ static VALUE buffer_slice(VALUE self, VALUE rbOffset, VALUE rbLength) { return slice(self, NUM2LONG(rbOffset), NUM2LONG(rbLength)); } /* * call-seq: inspect * @return [String] * Inspect a Buffer. */ static VALUE buffer_inspect(VALUE self) { char tmp[100]; Buffer* ptr; Data_Get_Struct(self, Buffer, ptr); snprintf(tmp, sizeof(tmp), "#<FFI:Buffer:%p address=%p size=%ld>", ptr, ptr->memory.address, ptr->memory.size); return rb_str_new2(tmp); } #if BYTE_ORDER == LITTLE_ENDIAN # define SWAPPED_ORDER BIG_ENDIAN #else # define SWAPPED_ORDER LITTLE_ENDIAN #endif /* * Set or get endianness of Buffer. * @overload order * @return [:big, :little] * Get endianness of Buffer. * @overload order(order) * @param [:big, :little, :network] order * @return [self] * Set endianness of Buffer (+:network+ is an alias for +:big+). */ static VALUE buffer_order(int argc, VALUE* argv, VALUE self) { Buffer* ptr; Data_Get_Struct(self, Buffer, ptr); if (argc == 0) { int order = (ptr->memory.flags & MEM_SWAP) == 0 ? BYTE_ORDER : SWAPPED_ORDER; return order == BIG_ENDIAN ? ID2SYM(rb_intern("big")) : ID2SYM(rb_intern("little")); } else { VALUE rbOrder = Qnil; int order = BYTE_ORDER; if (rb_scan_args(argc, argv, "1", &rbOrder) < 1) { rb_raise(rb_eArgError, "need byte order"); } if (SYMBOL_P(rbOrder)) { ID id = SYM2ID(rbOrder); if (id == rb_intern("little")) { order = LITTLE_ENDIAN; } else if (id == rb_intern("big") || id == rb_intern("network")) { order = BIG_ENDIAN; } } if (order != BYTE_ORDER) { Buffer* p2; VALUE retval = slice(self, 0, ptr->memory.size); Data_Get_Struct(retval, Buffer, p2); p2->memory.flags |= MEM_SWAP; return retval; } return self; } } /* Only used to free the buffer if the yield in the initializer throws an exception */ static VALUE buffer_free(VALUE self) { Buffer* ptr; Data_Get_Struct(self, Buffer, ptr); if ((ptr->memory.flags & MEM_EMBED) == 0 && ptr->data.storage != NULL) { xfree(ptr->data.storage); ptr->data.storage = NULL; } return self; } static void buffer_mark(Buffer* ptr) { rb_gc_mark(ptr->data.rbParent); } void rbffi_Buffer_Init(VALUE moduleFFI) { VALUE ffi_AbstractMemory = rbffi_AbstractMemoryClass; /* * Document-class: FFI::Buffer < FFI::AbstractMemory * * A Buffer is a function argument type. It should be use with functions playing with C arrays. */ BufferClass = rb_define_class_under(moduleFFI, "Buffer", ffi_AbstractMemory); /* * Document-variable: FFI::Buffer */ rb_global_variable(&BufferClass); rb_define_alloc_func(BufferClass, buffer_allocate); /* * Document-method: alloc_inout * call-seq: alloc_inout(*args) * Create a new Buffer for in and out arguments (alias : <i>new_inout</i>). */ rb_define_singleton_method(BufferClass, "alloc_inout", buffer_alloc_inout, -1); /* * Document-method: alloc_out * call-seq: alloc_out(*args) * Create a new Buffer for out arguments (alias : <i>new_out</i>). */ rb_define_singleton_method(BufferClass, "alloc_out", buffer_alloc_inout, -1); /* * Document-method: alloc_in * call-seq: alloc_in(*args) * Create a new Buffer for in arguments (alias : <i>new_in</i>). */ rb_define_singleton_method(BufferClass, "alloc_in", buffer_alloc_inout, -1); rb_define_alias(rb_singleton_class(BufferClass), "new_in", "alloc_in"); rb_define_alias(rb_singleton_class(BufferClass), "new_out", "alloc_out"); rb_define_alias(rb_singleton_class(BufferClass), "new_inout", "alloc_inout"); rb_define_method(BufferClass, "initialize", buffer_initialize, -1); rb_define_method(BufferClass, "initialize_copy", buffer_initialize_copy, 1); rb_define_method(BufferClass, "order", buffer_order, -1); rb_define_method(BufferClass, "inspect", buffer_inspect, 0); rb_define_alias(BufferClass, "length", "total"); rb_define_method(BufferClass, "+", buffer_plus, 1); rb_define_method(BufferClass, "slice", buffer_slice, 2); }
{'content_hash': '183428614a0a86b400e82564de6a0b6d', 'timestamp': '', 'source': 'github', 'line_count': 337, 'max_line_length': 115, 'avg_line_length': 27.747774480712167, 'alnum_prop': 0.6251737782055395, 'repo_name': 'jonpstone/portfolio-project-rails-mean-movie-reviews', 'id': 'faf4834d028a7fe7b7a9f963e93222f6b84cee04', 'size': '11045', 'binary': False, 'copies': '151', 'ref': 'refs/heads/master', 'path': 'vendor/bundle/ruby/2.4.0/gems/ffi-1.9.21/ext/ffi_c/Buffer.c', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '424250'}, {'name': 'HTML', 'bytes': '38458'}, {'name': 'JavaScript', 'bytes': '574752'}, {'name': 'Ruby', 'bytes': '107581'}]}
GitHub
"use strict"; exports.__esModule = true; var _extends2 = require("babel-runtime/helpers/extends"); var _extends3 = _interopRequireDefault(_extends2); exports.inferInputObjectStructureFromFields = inferInputObjectStructureFromFields; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _require = require(`graphql`), GraphQLInputObjectType = _require.GraphQLInputObjectType, GraphQLBoolean = _require.GraphQLBoolean, GraphQLString = _require.GraphQLString, GraphQLFloat = _require.GraphQLFloat, GraphQLInt = _require.GraphQLInt, GraphQLID = _require.GraphQLID, GraphQLList = _require.GraphQLList, GraphQLEnumType = _require.GraphQLEnumType, GraphQLNonNull = _require.GraphQLNonNull, GraphQLScalarType = _require.GraphQLScalarType, GraphQLObjectType = _require.GraphQLObjectType, GraphQLInterfaceType = _require.GraphQLInterfaceType, GraphQLUnionType = _require.GraphQLUnionType; var _ = require(`lodash`); var report = require(`gatsby-cli/lib/reporter`); var createTypeName = require(`./create-type-name`); var createKey = require(`./create-key`); function makeNullable(type) { if (type instanceof GraphQLNonNull) { return type.ofType; } return type; } function convertToInputType(type, typeMap) { // track types already processed in current tree, to avoid infinite recursion if (typeMap.has(type)) { return null; } var nextTypeMap = new Set(Array.from(typeMap).concat([type])); if (type instanceof GraphQLScalarType || type instanceof GraphQLEnumType) { return type; } else if (type instanceof GraphQLObjectType) { var fields = _.transform(type.getFields(), function (out, fieldConfig, key) { var type = convertToInputType(fieldConfig.type, nextTypeMap); if (type) out[key] = { type }; }); if (Object.keys(fields).length === 0) { return null; } return new GraphQLInputObjectType({ name: createTypeName(`${type.name}InputObject`), fields }); } else if (type instanceof GraphQLList) { var innerType = convertToInputType(type.ofType, nextTypeMap); return innerType ? new GraphQLList(makeNullable(innerType)) : null; } else if (type instanceof GraphQLNonNull) { var _innerType = convertToInputType(type.ofType, nextTypeMap); return _innerType ? new GraphQLNonNull(makeNullable(_innerType)) : null; } else { var message = type ? `for type: ${type.name}` : ``; if (type instanceof GraphQLInterfaceType) { message = `GraphQLInterfaceType not yet implemented ${message}`; } else if (type instanceof GraphQLUnionType) { message = `GraphQLUnionType not yet implemented ${message}`; } else { message = `Invalid input type ${message}`; } report.verbose(message); } return null; } var scalarFilterMap = { Int: { eq: { type: GraphQLInt }, ne: { type: GraphQLInt } }, Float: { eq: { type: GraphQLFloat }, ne: { type: GraphQLFloat } }, ID: { eq: { type: GraphQLID }, ne: { type: GraphQLID } }, String: { eq: { type: GraphQLString }, ne: { type: GraphQLString }, regex: { type: GraphQLString }, glob: { type: GraphQLString } }, Boolean: { eq: { type: GraphQLBoolean }, ne: { type: GraphQLBoolean } } }; function convertToInputFilter(prefix, type) { if (type instanceof GraphQLScalarType) { var name = type.name; var fields = scalarFilterMap[name]; if (fields == null) return null; return new GraphQLInputObjectType({ name: createTypeName(`${prefix}Query${name}`), fields: fields }); } else if (type instanceof GraphQLInputObjectType) { return new GraphQLInputObjectType({ name: createTypeName(`${prefix}{type.name}`), fields: _.transform(type.getFields(), function (out, fieldConfig, key) { var type = convertToInputFilter(`${prefix}${_.upperFirst(key)}`, fieldConfig.type); if (type) out[key] = { type }; }) }); } else if (type instanceof GraphQLList) { var innerType = type.ofType; var innerFilter = convertToInputFilter(`${prefix}ListElem`, innerType); var innerFields = innerFilter ? innerFilter.getFields() : {}; return new GraphQLInputObjectType({ name: createTypeName(`${prefix}QueryList`), fields: (0, _extends3.default)({}, innerFields, { in: { type: new GraphQLList(innerType) } }) }); } else if (type instanceof GraphQLNonNull) { return convertToInputFilter(prefix, type.ofType); } return null; } function extractFieldNamesFromInputField(prefix, type, accu) { if (type instanceof GraphQLScalarType || type instanceof GraphQLList) { accu.push(prefix); } else if (type instanceof GraphQLInputObjectType) { _.each(type.getFields(), function (fieldConfig, key) { extractFieldNamesFromInputField(`${prefix}___${key}`, fieldConfig.type, accu); }); } else if (type instanceof GraphQLNonNull) { extractFieldNamesFromInputField(prefix, type.ofType, accu); } } // convert output fields to output fields and a list of fields to sort on function inferInputObjectStructureFromFields(_ref) { var fields = _ref.fields, _ref$typeName = _ref.typeName, typeName = _ref$typeName === undefined ? `` : _ref$typeName; var inferredFields = {}; var sort = []; _.each(fields, function (fieldConfig, key) { var inputType = convertToInputType(fieldConfig.type, new Set()); var inputFilter = inputType && convertToInputFilter(_.upperFirst(key), inputType); if (!inputFilter) return; inferredFields[createKey(key)] = { type: inputFilter // Add sorting (but only to the top level). };if (typeName) { extractFieldNamesFromInputField(key, inputType, sort); } }); return { inferredFields, sort }; } //# sourceMappingURL=infer-graphql-input-fields-from-fields.js.map
{'content_hash': 'c05f1deb07351c1f5ce747b74a13880e', 'timestamp': '', 'source': 'github', 'line_count': 180, 'max_line_length': 95, 'avg_line_length': 32.75555555555555, 'alnum_prop': 0.6797829036635007, 'repo_name': 'amiechen/amiechen.github.io', 'id': 'bdf9b2f1e2385e4e8da56a19cf87effa936a6216', 'size': '5896', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'node_modules/gatsby/dist/schema/infer-graphql-input-fields-from-fields.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '13627'}, {'name': 'HTML', 'bytes': '7824'}, {'name': 'JavaScript', 'bytes': '368'}]}
GitHub
import s from 'underscore.string'; import { Logger } from '../../../logger'; import { settings } from '../../../settings'; import { Users } from '../../../models/server'; import { hasPermission } from '../../../authorization'; const logger = new Logger('getFullUserData'); const defaultFields = { name: 1, username: 1, status: 1, utcOffset: 1, type: 1, active: 1, reason: 1, }; const fullFields = { emails: 1, phone: 1, statusConnection: 1, createdAt: 1, lastLogin: 1, services: 1, requirePasswordChange: 1, requirePasswordChangeReason: 1, roles: 1, }; let publicCustomFields = {}; let customFields = {}; settings.get('Accounts_CustomFields', (key, value) => { publicCustomFields = {}; customFields = {}; if (!value.trim()) { return; } try { const customFieldsOnServer = JSON.parse(value.trim()); Object.keys(customFieldsOnServer).forEach((key) => { const element = customFieldsOnServer[key]; if (element.public) { publicCustomFields[`customFields.${ key }`] = 1; } customFields[`customFields.${ key }`] = 1; }); } catch (e) { logger.warn(`The JSON specified for "Accounts_CustomFields" is invalid. The following error was thrown: ${ e }`); } }); export const getFullUserData = function({ userId, filter, limit: l }) { const username = s.trim(filter); const userToRetrieveFullUserData = Users.findOneByUsername(username, { fields: { username: 1 } }); const isMyOwnInfo = userToRetrieveFullUserData && userToRetrieveFullUserData._id === userId; const viewFullOtherUserInfo = hasPermission(userId, 'view-full-other-user-info'); const limit = !viewFullOtherUserInfo ? 1 : l; if (!username && limit <= 1) { return undefined; } const _customFields = isMyOwnInfo || viewFullOtherUserInfo ? customFields : publicCustomFields; const fields = isMyOwnInfo || viewFullOtherUserInfo ? { ...defaultFields, ...fullFields, ..._customFields } : { ...defaultFields, ..._customFields }; const options = { fields, limit, sort: { username: 1 }, }; if (!username) { return Users.find({}, options); } if (limit === 1) { return Users.findByUsername(userToRetrieveFullUserData.username, options); } const usernameReg = new RegExp(s.escapeRegExp(username), 'i'); return Users.findByUsernameNameOrEmailAddress(usernameReg, options); };
{'content_hash': '3f37ca97a7adf019302db0954ff060ed', 'timestamp': '', 'source': 'github', 'line_count': 93, 'max_line_length': 115, 'avg_line_length': 24.870967741935484, 'alnum_prop': 0.6796368352788587, 'repo_name': '4thParty/Rocket.Chat', 'id': '04a667bac1c37cdbd050f62f79e145103d840bbf', 'size': '2313', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'app/lib/server/functions/getFullUserData.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '549'}, {'name': 'CSS', 'bytes': '390935'}, {'name': "Cap'n Proto", 'bytes': '3959'}, {'name': 'CoffeeScript', 'bytes': '30843'}, {'name': 'Dockerfile', 'bytes': '1874'}, {'name': 'HTML', 'bytes': '657188'}, {'name': 'JavaScript', 'bytes': '4580635'}, {'name': 'Ruby', 'bytes': '4653'}, {'name': 'Shell', 'bytes': '32548'}, {'name': 'Standard ML', 'bytes': '1843'}]}
GitHub
package org.scalastyle import _root_.scalariform.lexer.Token import _root_.scalariform.lexer.Comment import scala.collection.mutable.ListBuffer import scala.collection.mutable.HashMap case class CommentFilter(id: Option[String], start: Option[LineColumn], end: Option[LineColumn]) case class CommentInter(id: Option[String], position: Int, off: Boolean) object CommentFilter { private[this] val OnOff = """//\s*scalastyle:(on|off)(.*)""".r private[this] val OneLine = """//\s*scalastyle:ignore(.*)""".r private[this] val allMatchers = List(OnOff, OneLine) private[this] def isComment(s: String): Boolean = allMatchers.exists(_.pattern.matcher(s.trim).matches) def findScalastyleComments(tokens: List[Comment]): Iterable[Comment] = { tokens.filter(c => isComment(c.text)) } def findCommentFilters(comments: List[Comment], lines: Lines): List[CommentFilter] = findOneLineCommentFilters(comments, lines) ++ findOnOffCommentFilters(comments, lines) private[this] def checkEmpty(s:String) = if (s != "") Some(s) else None private[this] def splitIds(s: String, notEmpty: Boolean = false):List[String] = s.trim.split("\\s+").toList match { case Nil if(notEmpty) => List("") case ls: List[String] => ls } private[this] def findOneLineCommentFilters(comments: List[Comment], lines: Lines):List[CommentFilter] = for { comment <- comments OneLine(s) <- List(comment.text.trim) (start, end) <- lines.toFullLineTuple(comment.token.offset).toList id <- splitIds(s, true) } yield CommentFilter(checkEmpty(id), Some(start), Some(end)) private[this] def findOnOffCommentFilters(comments: List[Comment], lines: Lines): List[CommentFilter] = { val it:List[CommentInter] = for { comment <- comments OnOff(onoff, idString) <- List(comment.text.trim) // this is a bit ugly id <- splitIds( idString ) } yield CommentInter( checkEmpty(id) , comment.token.offset , onoff == "off" ) val list = ListBuffer[CommentFilter]() var inMap = new HashMap[Option[String], Boolean]() var start = new HashMap[Option[String], Option[LineColumn]]() it.foreach(ci => { (inMap.getOrElse(ci.id, false), ci.off) match { case (true, false) => { // off then on, add a new CommentFilter list += CommentFilter(ci.id, start.getOrElse(ci.id, None), lines.toLineColumn(ci.position)) inMap.put(ci.id, false) start.remove(ci.id) } case (true, true) => // off then off, do nothing case (false, false) => // on then on, do nothing case (false, true) => { // on then off, reset start start.put(ci.id, lines.toLineColumn(ci.position)) inMap.put(ci.id, true) } } }) inMap.foreach( e => { if (e._2) { list += CommentFilter(e._1, start.getOrElse(e._1, None), None) } }) list.toList } def filterApplies[T <: FileSpec](m: Message[T], commentFilters: List[CommentFilter]): Boolean = { m match { case m: StyleError[_] => { val filters = commentFilters.filter(cf => !cf.id.isDefined || cf.id.get == m.key) filters.find(cf => gte(m.lineNumber, cf.start) && lte(m.lineNumber, cf.end)).isEmpty } case _ => true } } protected def gte(line1: Option[Int], lineColumn: Option[LineColumn]) = line1.isEmpty || lineColumn.isEmpty || line1.get >= lineColumn.get.line protected def lte(line1: Option[Int], lineColumn: Option[LineColumn]) = line1.isEmpty || lineColumn.isEmpty || line1.get <= lineColumn.get.line }
{'content_hash': 'e0745170be735261f9ae649491c0b9a6', 'timestamp': '', 'source': 'github', 'line_count': 93, 'max_line_length': 145, 'avg_line_length': 39.89247311827957, 'alnum_prop': 0.6307277628032345, 'repo_name': 'kciesielski/scalastyle', 'id': '63e2d892d59138745d52f2a4a4e70aa5fbdd7f8c', 'size': '4440', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'src/main/scala/org/scalastyle/CommentFilter.scala', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Scala', 'bytes': '337055'}]}
GitHub
class Xdelta < Formula desc "Binary diff, differential compression tools" homepage "http://xdelta.org" url "https://xdelta.googlecode.com/files/xdelta3-3.0.6.tar.gz" sha256 "b9a439c27c26e8397dd1b438a2fac710b561e0961fe75682230e6c8f69340da5" def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end end
{'content_hash': 'f38822b861ae202af319a741c01fb739', 'timestamp': '', 'source': 'github', 'line_count': 12, 'max_line_length': 75, 'avg_line_length': 34.0, 'alnum_prop': 0.6936274509803921, 'repo_name': 'tomekr/homebrew', 'id': '37d9b96e7fc017d79d1a7d860e2f095fe7936bf1', 'size': '408', 'binary': False, 'copies': '125', 'ref': 'refs/heads/master', 'path': 'Library/Formula/xdelta.rb', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'C++', 'bytes': '5889'}, {'name': 'Groff', 'bytes': '29626'}, {'name': 'Perl', 'bytes': '608'}, {'name': 'PostScript', 'bytes': '485'}, {'name': 'Ruby', 'bytes': '5188910'}, {'name': 'Shell', 'bytes': '21029'}]}
GitHub
import { Component, OnInit } from '@angular/core'; import { Service354Service } from '../../services/service-354.service'; @Component({ selector: 'app-comp-354', templateUrl: './comp-354.component.html', styleUrls: ['./comp-354.component.css'] }) export class Comp354Component implements OnInit { constructor(private _service: Service354Service) { } ngOnInit() { } }
{'content_hash': 'b8b67f59bffbe92b1308c6adf1d6b35e', 'timestamp': '', 'source': 'github', 'line_count': 18, 'max_line_length': 71, 'avg_line_length': 21.444444444444443, 'alnum_prop': 0.6917098445595855, 'repo_name': 'angular/angular-cli-stress-test', 'id': '3b6a1436d8abe781e182f75eaf22f8a36748e2bb', 'size': '588', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/app/components/comp-354/comp-354.component.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1040888'}, {'name': 'HTML', 'bytes': '300322'}, {'name': 'JavaScript', 'bytes': '2404'}, {'name': 'TypeScript', 'bytes': '8535506'}]}
GitHub
package ro.androidiasi.codecamp.data.source.remote; /** * Created by andrei on 21/04/16. */ import android.support.annotation.NonNull; import org.androidannotations.annotations.EBean; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.util.List; import ro.androidiasi.codecamp.data.source.DataConference; import ro.androidiasi.codecamp.data.source.ILoadCallback; import ro.androidiasi.codecamp.data.source.remote.exception.DataUnavailable; /** * Does the same as {@link FileRemoteDataSource} but with a file from the double-iu-s */ @EBean public class ConnectAPIRemoteDataSource extends BaseRemoteDataSource{ @Override public void startCodecampJsonRequest() throws DataUnavailable { super.startCodecampJsonRequest(); try { String url = mConference.getConnectJsonURL(); String jsonData = retrieveDataFromUrl(url); this.onSuccess(jsonData); } catch (IOException ex) { this.onFailure(ex); } } @Override public void startConferencesRequest(ILoadCallback<List<DataConference>> pLoadCallback) throws DataUnavailable { try { String url = DataConference.CONFERENCES_LIST_URL; String jsonData = retrieveDataFromUrl(url); pLoadCallback.onSuccess(getDataConferencesFromJson(jsonData)); } catch (IOException ex) { this.onFailure(ex); } } @NonNull private String retrieveDataFromUrl(String url) throws IOException { StringBuilder json = new StringBuilder(); URL codecampJsonURL = new URL(url); BufferedReader in = new BufferedReader( new InputStreamReader( codecampJsonURL.openStream(), "UTF-8")); String inputLine; while ((inputLine = in.readLine()) != null) json.append(inputLine); in.close(); return json.toString(); } public void invalidate() { } }
{'content_hash': '84614cdf02158f9bee51a3e3f01758e2', 'timestamp': '', 'source': 'github', 'line_count': 65, 'max_line_length': 115, 'avg_line_length': 31.16923076923077, 'alnum_prop': 0.6771964461994077, 'repo_name': 'AndroidIasi/CodeCamp', 'id': '4b1def293dbbbdaddebc21c9d129e9b8f829a8b6', 'size': '2026', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'data/src/main/java/ro/androidiasi/codecamp/data/source/remote/ConnectAPIRemoteDataSource.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '187998'}]}
GitHub
package org.apache.pulsar.broker.lookup; import static com.google.common.base.Preconditions.checkNotNull; import static org.apache.pulsar.common.api.Commands.newLookupErrorResponse; import static org.apache.pulsar.common.api.Commands.newLookupResponse; import java.net.URI; import java.net.URISyntaxException; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import javax.ws.rs.DefaultValue; import javax.ws.rs.Encoded; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import javax.ws.rs.container.AsyncResponse; import javax.ws.rs.container.Suspended; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import org.apache.pulsar.broker.PulsarService; import org.apache.pulsar.broker.authentication.AuthenticationDataSource; import org.apache.pulsar.broker.web.NoSwaggerDocumentation; import org.apache.pulsar.broker.web.PulsarWebResource; import org.apache.pulsar.broker.web.RestException; import org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse.LookupType; import org.apache.pulsar.common.api.proto.PulsarApi.ServerError; import org.apache.pulsar.common.lookup.data.LookupData; import org.apache.pulsar.common.naming.NamespaceBundle; import org.apache.pulsar.common.naming.TopicDomain; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.util.Codec; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import dlshade.org.apache.commons.lang3.StringUtils; import io.netty.buffer.ByteBuf; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; @Path("/v2/destination/") @NoSwaggerDocumentation public class TopicLookup extends PulsarWebResource { @GET @Path("{topic-domain}/{property}/{cluster}/{namespace}/{topic}") @Produces(MediaType.APPLICATION_JSON) public void lookupTopicAsync(@PathParam("topic-domain") String topicDomain, @PathParam("property") String property, @PathParam("cluster") String cluster, @PathParam("namespace") String namespace, @PathParam("topic") @Encoded String encodedTopic, @QueryParam("authoritative") @DefaultValue("false") boolean authoritative, @Suspended AsyncResponse asyncResponse) { String topicName = Codec.decode(encodedTopic); TopicDomain domain = null; try { domain = TopicDomain.getEnum(topicDomain); } catch (IllegalArgumentException e) { log.error("[{}] Invalid topic-domain {}", clientAppId(), topicDomain, e); throw new RestException(Status.METHOD_NOT_ALLOWED, "Unsupported topic domain " + topicDomain); } TopicName topic = TopicName.get(domain.value(), property, cluster, namespace, topicName); if (!pulsar().getBrokerService().getLookupRequestSemaphore().tryAcquire()) { log.warn("No broker was found available for topic {}", topic); asyncResponse.resume(new WebApplicationException(Response.Status.SERVICE_UNAVAILABLE)); return; } try { validateClusterOwnership(topic.getCluster()); checkConnect(topic); validateGlobalNamespaceOwnership(topic.getNamespaceObject()); } catch (WebApplicationException we) { // Validation checks failed log.error("Validation check failed: {}", we.getMessage()); completeLookupResponseExceptionally(asyncResponse, we); return; } catch (Throwable t) { // Validation checks failed with unknown error log.error("Validation check failed: {}", t.getMessage(), t); completeLookupResponseExceptionally(asyncResponse, new RestException(t)); return; } CompletableFuture<Optional<LookupResult>> lookupFuture = pulsar().getNamespaceService().getBrokerServiceUrlAsync(topic, authoritative); lookupFuture.thenAccept(optionalResult -> { if (optionalResult == null || !optionalResult.isPresent()) { log.warn("No broker was found available for topic {}", topic); completeLookupResponseExceptionally(asyncResponse, new WebApplicationException(Response.Status.SERVICE_UNAVAILABLE)); return; } LookupResult result = optionalResult.get(); // We have found either a broker that owns the topic, or a broker to which we should redirect the client to if (result.isRedirect()) { boolean newAuthoritative = this.isLeaderBroker(); URI redirect; try { String redirectUrl = isRequestHttps() ? result.getLookupData().getHttpUrlTls() : result.getLookupData().getHttpUrl(); checkNotNull(redirectUrl, "Redirected cluster's service url is not configured"); redirect = new URI(String.format("%s%s%s?authoritative=%s", redirectUrl, "/lookup/v2/destination/", topic.getLookupName(), newAuthoritative)); } catch (URISyntaxException | NullPointerException e) { log.error("Error in preparing redirect url for {}: {}", topic, e.getMessage(), e); completeLookupResponseExceptionally(asyncResponse, e); return; } if (log.isDebugEnabled()) { log.debug("Redirect lookup for topic {} to {}", topic, redirect); } completeLookupResponseExceptionally(asyncResponse, new WebApplicationException(Response.temporaryRedirect(redirect).build())); } else { // Found broker owning the topic if (log.isDebugEnabled()) { log.debug("Lookup succeeded for topic {} -- broker: {}", topic, result.getLookupData()); } completeLookupResponseSuccessfully(asyncResponse, result.getLookupData()); } }).exceptionally(exception -> { log.warn("Failed to lookup broker for topic {}: {}", topic, exception.getMessage(), exception); completeLookupResponseExceptionally(asyncResponse, exception); return null; }); } @GET @Path("{topic-domain}/{property}/{cluster}/{namespace}/{topic}/bundle") @Produces(MediaType.APPLICATION_JSON) @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission"), @ApiResponse(code = 405, message = "Invalid topic domain type") }) public String getNamespaceBundle(@PathParam("topic-domain") String topicDomain, @PathParam("property") String property, @PathParam("cluster") String cluster, @PathParam("namespace") String namespace, @PathParam("topic") @Encoded String topicName) { topicName = Codec.decode(topicName); TopicDomain domain = null; try { domain = TopicDomain.getEnum(topicDomain); } catch (IllegalArgumentException e) { log.error("[{}] Invalid topic-domain {}", clientAppId(), topicDomain, e); throw new RestException(Status.METHOD_NOT_ALLOWED, "Bundle lookup can not be done on topic domain " + topicDomain); } TopicName topic = TopicName.get(domain.value(), property, cluster, namespace, topicName); validateSuperUserAccess(); try { NamespaceBundle bundle = pulsar().getNamespaceService().getBundle(topic); return bundle.getBundleRange(); } catch (Exception e) { log.error("[{}] Failed to get namespace bundle for {}", clientAppId(), topic, e); throw new RestException(e); } } /** * * Lookup broker-service address for a given namespace-bundle which contains given topic. * * a. Returns broker-address if namespace-bundle is already owned by any broker * b. If current-broker receives lookup-request and if it's not a leader * then current broker redirects request to leader by returning leader-service address. * c. If current-broker is leader then it finds out least-loaded broker to own namespace bundle and * redirects request by returning least-loaded broker. * d. If current-broker receives request to own the namespace-bundle then it owns a bundle and returns * success(connect) response to client. * * @param pulsarService * @param topicName * @param authoritative * @param clientAppId * @param requestId * @return */ public static CompletableFuture<ByteBuf> lookupTopicAsync(PulsarService pulsarService, TopicName topicName, boolean authoritative, String clientAppId, AuthenticationDataSource authenticationData, long requestId) { final CompletableFuture<ByteBuf> validationFuture = new CompletableFuture<>(); final CompletableFuture<ByteBuf> lookupfuture = new CompletableFuture<>(); final String cluster = topicName.getCluster(); // (1) validate cluster getClusterDataIfDifferentCluster(pulsarService, cluster, clientAppId).thenAccept(differentClusterData -> { if (differentClusterData != null) { if (log.isDebugEnabled()) { log.debug("[{}] Redirecting the lookup call to {}/{} cluster={}", clientAppId, differentClusterData.getBrokerServiceUrl(), differentClusterData.getBrokerServiceUrlTls(), cluster); } validationFuture.complete(newLookupResponse(differentClusterData.getBrokerServiceUrl(), differentClusterData.getBrokerServiceUrlTls(), true, LookupType.Redirect, requestId, false)); } else { // (2) authorize client try { checkAuthorization(pulsarService, topicName, clientAppId, authenticationData); } catch (RestException authException) { log.warn("Failed to authorized {} on cluster {}", clientAppId, topicName.toString()); validationFuture.complete( newLookupErrorResponse(ServerError.AuthorizationError, authException.getMessage(), requestId)); return; } catch (Exception e) { log.warn("Unknown error while authorizing {} on cluster {}", clientAppId, topicName.toString()); validationFuture.completeExceptionally(e); return; } // (3) validate global namespace checkLocalOrGetPeerReplicationCluster(pulsarService, topicName.getNamespaceObject()) .thenAccept(peerClusterData -> { if (peerClusterData == null) { // (4) all validation passed: initiate lookup validationFuture.complete(null); return; } // if peer-cluster-data is present it means namespace is owned by that peer-cluster and // request should be redirect to the peer-cluster if (StringUtils.isBlank(peerClusterData.getBrokerServiceUrl()) && StringUtils.isBlank(peerClusterData.getBrokerServiceUrl())) { validationFuture.complete( newLookupErrorResponse(ServerError.MetadataError, "Redirected cluster's brokerService url is not configured", requestId)); return; } validationFuture.complete(newLookupResponse(peerClusterData.getBrokerServiceUrl(), peerClusterData.getBrokerServiceUrlTls(), true, LookupType.Redirect, requestId, false)); }).exceptionally(ex -> { validationFuture .complete(newLookupErrorResponse(ServerError.MetadataError, ex.getMessage(), requestId)); return null; }); } }).exceptionally(ex -> { validationFuture.completeExceptionally(ex); return null; }); // Initiate lookup once validation completes validationFuture.thenAccept(validaitonFailureResponse -> { if (validaitonFailureResponse != null) { lookupfuture.complete(validaitonFailureResponse); } else { pulsarService.getNamespaceService().getBrokerServiceUrlAsync(topicName, authoritative) .thenAccept(lookupResult -> { if (log.isDebugEnabled()) { log.debug("[{}] Lookup result {}", topicName.toString(), lookupResult); } if (!lookupResult.isPresent()) { lookupfuture.complete(newLookupErrorResponse(ServerError.ServiceNotReady, "No broker was available to own " + topicName, requestId)); return; } LookupData lookupData = lookupResult.get().getLookupData(); if (lookupResult.get().isRedirect()) { boolean newAuthoritative = isLeaderBroker(pulsarService); lookupfuture.complete( newLookupResponse(lookupData.getBrokerUrl(), lookupData.getBrokerUrlTls(), newAuthoritative, LookupType.Redirect, requestId, false)); } else { // When running in standalone mode we want to redirect the client through the service // url, so that the advertised address configuration is not relevant anymore. boolean redirectThroughServiceUrl = pulsarService.getConfiguration() .isRunningStandalone(); lookupfuture.complete( newLookupResponse(lookupData.getBrokerUrl(), lookupData.getBrokerUrlTls(), true /* authoritative */, LookupType.Connect, requestId, redirectThroughServiceUrl)); } }).exceptionally(ex -> { if (ex instanceof CompletionException && ex.getCause() instanceof IllegalStateException) { log.info("Failed to lookup {} for topic {} with error {}", clientAppId, topicName.toString(), ex.getCause().getMessage()); } else { log.warn("Failed to lookup {} for topic {} with error {}", clientAppId, topicName.toString(), ex.getMessage(), ex); } lookupfuture.complete( newLookupErrorResponse(ServerError.ServiceNotReady, ex.getMessage(), requestId)); return null; }); } }).exceptionally(ex -> { if (ex instanceof CompletionException && ex.getCause() instanceof IllegalStateException) { log.info("Failed to lookup {} for topic {} with error {}", clientAppId, topicName.toString(), ex.getCause().getMessage()); } else { log.warn("Failed to lookup {} for topic {} with error {}", clientAppId, topicName.toString(), ex.getMessage(), ex); } lookupfuture.complete(newLookupErrorResponse(ServerError.ServiceNotReady, ex.getMessage(), requestId)); return null; }); return lookupfuture; } private void completeLookupResponseExceptionally(AsyncResponse asyncResponse, Throwable t) { pulsar().getBrokerService().getLookupRequestSemaphore().release(); asyncResponse.resume(t); } private void completeLookupResponseSuccessfully(AsyncResponse asyncResponse, LookupData lookupData) { pulsar().getBrokerService().getLookupRequestSemaphore().release(); asyncResponse.resume(lookupData); } private static final Logger log = LoggerFactory.getLogger(TopicLookup.class); }
{'content_hash': '0785060c9a9f92a4ac9005037ed31e60', 'timestamp': '', 'source': 'github', 'line_count': 324, 'max_line_length': 162, 'avg_line_length': 52.45987654320987, 'alnum_prop': 0.6021650879566982, 'repo_name': 'sschepens/pulsar', 'id': 'f08530a74b7e8a9e9dd4c5ad1cde8eae283325ae', 'size': '17805', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookup.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '78182'}, {'name': 'C++', 'bytes': '978407'}, {'name': 'CMake', 'bytes': '20054'}, {'name': 'CSS', 'bytes': '29074'}, {'name': 'Groovy', 'bytes': '20837'}, {'name': 'HCL', 'bytes': '11887'}, {'name': 'HTML', 'bytes': '98559'}, {'name': 'Java', 'bytes': '8337326'}, {'name': 'JavaScript', 'bytes': '3803'}, {'name': 'Makefile', 'bytes': '2365'}, {'name': 'Python', 'bytes': '237158'}, {'name': 'Ruby', 'bytes': '7575'}, {'name': 'Shell', 'bytes': '95109'}]}
GitHub
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("CurrencyTranslator.Service")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("CurrencyTranslator.Service")] [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("2bfd29dc-974f-4756-b2c2-d5c1f2fde3a2")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{'content_hash': '6130819f5fb10a95bf372fadd798abfc', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 84, 'avg_line_length': 40.083333333333336, 'alnum_prop': 0.7519057519057519, 'repo_name': 'SeRgI1982/CurrencyTranslator', 'id': '934073cf4b0fb1dc2b604d518325ac929f1ce99b', 'size': '1446', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/CurrencyTranslator/CurrencyTranslator.Service/Properties/AssemblyInfo.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '38414'}]}
GitHub
package references import "jvmgo/ch09/instructions/base" import "jvmgo/ch09/rtda" import "jvmgo/ch09/rtda/heap" // Fetch field from object type GET_FIELD struct{ base.Index16Instruction } func (self *GET_FIELD) Execute(frame *rtda.Frame) { cp := frame.Method().Class().ConstantPool() fieldRef := cp.GetConstant(self.Index).(*heap.FieldRef) field := fieldRef.ResolvedField() if field.IsStatic() { panic("java.lang.IncompatibleClassChangeError") } stack := frame.OperandStack() ref := stack.PopRef() if ref == nil { panic("java.lang.NullPointerException") } descriptor := field.Descriptor() slotId := field.SlotId() slots := ref.Fields() switch descriptor[0] { case 'Z', 'B', 'C', 'S', 'I': stack.PushInt(slots.GetInt(slotId)) case 'F': stack.PushFloat(slots.GetFloat(slotId)) case 'J': stack.PushLong(slots.GetLong(slotId)) case 'D': stack.PushDouble(slots.GetDouble(slotId)) case 'L', '[': stack.PushRef(slots.GetRef(slotId)) default: // todo } }
{'content_hash': 'd30553f8da473487f175c72e8e492cd2', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 56, 'avg_line_length': 23.023255813953487, 'alnum_prop': 0.694949494949495, 'repo_name': 'zxh0/jvmgo-book', 'id': '9d35deaf863118bb68f92e9fe7556211f23c50fd', 'size': '990', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'v1/code/go/src/jvmgo/ch09/instructions/references/getfield.go', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Go', 'bytes': '1150025'}, {'name': 'Java', 'bytes': '340414'}, {'name': 'Shell', 'bytes': '3789'}]}
GitHub
int foo(int);
{'content_hash': 'eddd70a3178af91f97eb1279e09a9d8f', 'timestamp': '', 'source': 'github', 'line_count': 1, 'max_line_length': 13, 'avg_line_length': 14.0, 'alnum_prop': 0.6428571428571429, 'repo_name': 'zcoinofficial/zcoin', 'id': '744ec33955221f455fdf3ee505804113950ed6ba', 'size': '30', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/tor/scripts/maint/checkspace_tests/dubious.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '977651'}, {'name': 'C', 'bytes': '23449469'}, {'name': 'C++', 'bytes': '11590916'}, {'name': 'CMake', 'bytes': '96751'}, {'name': 'CSS', 'bytes': '42324'}, {'name': 'Dockerfile', 'bytes': '3182'}, {'name': 'Gnuplot', 'bytes': '940'}, {'name': 'HTML', 'bytes': '55527'}, {'name': 'Java', 'bytes': '30290'}, {'name': 'Lua', 'bytes': '3321'}, {'name': 'M4', 'bytes': '354106'}, {'name': 'Makefile', 'bytes': '176315'}, {'name': 'NASL', 'bytes': '177'}, {'name': 'Objective-C++', 'bytes': '6795'}, {'name': 'PHP', 'bytes': '4871'}, {'name': 'POV-Ray SDL', 'bytes': '1480'}, {'name': 'Perl', 'bytes': '18265'}, {'name': 'Python', 'bytes': '1731667'}, {'name': 'QMake', 'bytes': '1352'}, {'name': 'Roff', 'bytes': '2388'}, {'name': 'Ruby', 'bytes': '3216'}, {'name': 'Rust', 'bytes': '119897'}, {'name': 'Sage', 'bytes': '30192'}, {'name': 'Shell', 'bytes': '314196'}, {'name': 'SmPL', 'bytes': '5488'}, {'name': 'SourcePawn', 'bytes': '12001'}, {'name': 'q', 'bytes': '5584'}]}
GitHub
<?php namespace App\Test\TestCase\Model\Table; use App\Model\Table\RoomsTable; use Cake\ORM\TableRegistry; use Cake\TestSuite\TestCase; /** * App\Model\Table\RoomsTable Test Case */ class RoomsTableTest extends TestCase { /** * Test subject * * @var \App\Model\Table\RoomsTable */ public $Rooms; /** * Fixtures * * @var array */ public $fixtures = [ 'app.rooms', 'app.statuses' ]; /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $config = TableRegistry::exists('Rooms') ? [] : ['className' => RoomsTable::class]; $this->Rooms = TableRegistry::get('Rooms', $config); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->Rooms); parent::tearDown(); } /** * Test initialize method * * @return void */ public function testInitialize() { $this->markTestIncomplete('Not implemented yet.'); } /** * Test validationDefault method * * @return void */ public function testValidationDefault() { $this->markTestIncomplete('Not implemented yet.'); } /** * Test buildRules method * * @return void */ public function testBuildRules() { $this->markTestIncomplete('Not implemented yet.'); } }
{'content_hash': 'fe21b81d936a063c79b273b6a17d6106', 'timestamp': '', 'source': 'github', 'line_count': 84, 'max_line_length': 91, 'avg_line_length': 17.55952380952381, 'alnum_prop': 0.5369491525423729, 'repo_name': 'Ashrafdev/rooms_crud_assessment', 'id': 'b0bb900bd993304fbb459f8a95f0aaf23ce4b651', 'size': '1475', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/TestCase/Model/Table/RoomsTableTest.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '433'}, {'name': 'Batchfile', 'bytes': '834'}, {'name': 'CSS', 'bytes': '12827'}, {'name': 'JavaScript', 'bytes': '13739'}, {'name': 'PHP', 'bytes': '110910'}, {'name': 'Shell', 'bytes': '1457'}]}
GitHub
package es.predictia.util; import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.joda.time.DateTime; import org.joda.time.Duration; import org.joda.time.Interval; public class FileLister { private final File startDir; public FileLister(File startDir) throws FileNotFoundException{ if(startDir == null) throw new IllegalArgumentException("Directory should not be null."); if(!startDir.exists()) throw new FileNotFoundException("Directory does not exist: " + startDir); if(!startDir.isDirectory()) throw new IllegalArgumentException("Is not a directory: " + startDir); if(!startDir.canRead()) throw new IllegalArgumentException("Directory cannot be read: " + startDir); this.startDir = startDir; } public List<File> getFileList(){ List<File> result = getFileListingNoSort(startDir); if(sortResult != null){ if(sortResult){ Collections.sort(result); } } return result; } private Boolean sortResult; public Boolean getSortResult() { return sortResult; } public void setSortResult(Boolean sortResult) { this.sortResult = sortResult; } private Duration maxDirectoryAge, maxFileAge; public Duration getMaxDirectoryAge() { return maxDirectoryAge; } public void setMaxDirectoryAge(Duration maxDirectoryAge) { this.maxDirectoryAge = maxDirectoryAge; } public Duration getMaxFileAge() { return maxFileAge; } public void setMaxFileAge(Duration maxFileAge) { this.maxFileAge = maxFileAge; } public File getStartDir() { return startDir; } private Pattern filePattern, dirPattern; public Pattern getFilePattern() { return filePattern; } public void setFilePattern(Pattern filePattern) { this.filePattern = filePattern; } public Pattern getDirPattern() { return dirPattern; } public void setDirPattern(Pattern dirPattern) { this.dirPattern = dirPattern; } private List<File> getFileListingNoSort(File aStartingDir){ List<File> result = new ArrayList<File>(); File[] filesAndDirs = aStartingDir.listFiles(); List<File> filesDirs = Arrays.asList(filesAndDirs); for (File file : filesDirs) { if (!file.isFile()) { boolean explore = true; if(maxDirectoryAge != null){ Duration dirAge = getAge(new DateTime(file.lastModified())); if(dirAge.isLongerThan(maxDirectoryAge)) explore = false; } if(explore){ if(dirPattern != null){ Matcher m = dirPattern.matcher(file.getName()); if(!m.find()) explore = false; } } if(explore){ List<File> deeperList = getFileListingNoSort(file); result.addAll(deeperList); } } else{ // añado si no es un directorio boolean add = true; if(maxFileAge != null){ Duration fileAge = getAge(new DateTime(file.lastModified())); if(fileAge.isLongerThan(maxFileAge)) add = false; } if(add){ if(filePattern != null){ Matcher m = filePattern.matcher(file.getName()); if(!m.find()) add = false; } } if(add) result.add(file); } } return result; } private static Duration getAge(DateTime creationDate){ Interval i = new Interval(creationDate, new DateTime()); return i.toDuration(); } }
{'content_hash': 'a6c8b881052f7aa7f2e2dd847db80d44', 'timestamp': '', 'source': 'github', 'line_count': 125, 'max_line_length': 102, 'avg_line_length': 26.704, 'alnum_prop': 0.7088076692630317, 'repo_name': 'Predictia/util', 'id': '051b47b3f327761554a53943f6c2edb7fb3ca01b', 'size': '3339', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/es/predictia/util/FileLister.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '230075'}]}
GitHub
title: Customer Empathy localeTitle: Empatía del cliente --- ## Empatía del cliente Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/user-experience-research/customer-empathy/index.md) . [Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) . #### Más información:
{'content_hash': '73c09bd7acaaa2c1d63247834d48d373', 'timestamp': '', 'source': 'github', 'line_count': 10, 'max_line_length': 173, 'avg_line_length': 43.8, 'alnum_prop': 0.7853881278538812, 'repo_name': 'HKuz/FreeCodeCamp', 'id': '78f562b097afce66c6389ccda56863af5ca4c0b4', 'size': '451', 'binary': False, 'copies': '4', 'ref': 'refs/heads/fix/JupyterNotebook', 'path': 'guide/spanish/user-experience-research/customer-empathy/index.md', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '193850'}, {'name': 'HTML', 'bytes': '100244'}, {'name': 'JavaScript', 'bytes': '522369'}]}
GitHub
<?php class EmptyHoofdaannemerFixture extends CakeTestFixture { public $name = 'Hoofdaannemer'; public $fields = array('id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary')); public $records = array(); }
{'content_hash': 'a8c9ba5899fd171df5826d6c9e106fe3', 'timestamp': '', 'source': 'github', 'line_count': 9, 'max_line_length': 119, 'avg_line_length': 28.333333333333332, 'alnum_prop': 0.6313725490196078, 'repo_name': 'accelcloud/ecd', 'id': '404a601e44d0138883b662e0cf705b8b7a555344', 'size': '255', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/tests/fixtures/empty_hoofdaannemer_fixture.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '821'}, {'name': 'Batchfile', 'bytes': '1013'}, {'name': 'CSS', 'bytes': '50508'}, {'name': 'JavaScript', 'bytes': '144685'}, {'name': 'PHP', 'bytes': '9465186'}, {'name': 'Python', 'bytes': '3979'}, {'name': 'Shell', 'bytes': '3551'}]}
GitHub
from ScopeFoundry.data_browser import DataBrowserView import pyqtgraph as pg import numpy as np from qtpy import QtWidgets import h5py class AugerSyncRasterScanH5(DataBrowserView): name = 'auger_sync_raster_scan' def setup(self): self.settings.New('frame', dtype=int) #self.settings.New('sub_frame', dtype=int) self.settings.New('source', dtype=str, choices=('SEM', 'Auger')) self.settings.New('SEM_chan', dtype=int, vmin=0, vmax=1) self.settings.New('Auger_chan', dtype=int, vmin=0, vmax=7) self.settings.New('auto_level', dtype=bool, initial=True) for name in ['frame', 'source','SEM_chan', 'Auger_chan', 'auto_level']: self.settings.get_lq(name).add_listener(self.update_display) self.ui = QtWidgets.QWidget() self.ui.setLayout(QtWidgets.QVBoxLayout()) self.ui.layout().addWidget(self.settings.New_UI(), stretch=0) self.info_label = QtWidgets.QLabel() self.ui.layout().addWidget(self.info_label, stretch=0) self.imview = pg.ImageView() self.ui.layout().addWidget(self.imview, stretch=1) #self.graph_layout = pg.GraphicsLayoutWidget() #self.graph_layout.addPlot() def on_change_data_filename(self, fname): try: self.dat = h5py.File(fname) M = self.measurement = self.dat['measurement/auger_sync_raster_scan'] nframe, nsubframe, ny, nx, nadc_chan = M['adc_map'].shape self.settings.frame.change_min_max(0, nframe-1) self.settings.sub_frame.change_min_max(0, nsubframe-1) self.update_display() except Exception as err: self.imview.setImage(np.zeros((10,10))) self.databrowser.ui.statusbar.showMessage("failed to load %s:\n%s" %(fname, err)) raise(err) def is_file_supported(self, fname): return "auger_sync_raster_scan.h5" in fname def update_display(self): M = self.measurement ke = M['ke'] ii = self.settings['frame'] jj = 0 #self.settings['sub_frame'] source = self.settings['source'] if source=='SEM': kk = self.settings['SEM_chan'] im = M['adc_map'][ii, jj, :,:, kk] ke_info = " ke {:.1f} eV".format(ke[0,ii]) else: kk = self.settings['Auger_chan'] im = M['auger_chan_map'][ii, jj, :,:, kk] ke_info = " ke {:.1f} eV".format(ke[kk,ii]) self.imview.setImage(im.T, autoLevels=self.settings['auto_level'], ) info = "Frame {} {} chan {} ".format(ii,source, kk) self.info_label.setText(info+ke_info)
{'content_hash': '1145785db632c351c63dc7c77ae86b0e', 'timestamp': '', 'source': 'github', 'line_count': 71, 'max_line_length': 93, 'avg_line_length': 39.0, 'alnum_prop': 0.5734922354640665, 'repo_name': 'ScopeFoundry/FoundryDataBrowser', 'id': 'a4a3b4cdc5ce35cf7aba6a1c7a4b62e5f137bc3b', 'size': '2769', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'viewers/auger_sync_raster_scan.py', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Batchfile', 'bytes': '95'}, {'name': 'Jupyter Notebook', 'bytes': '62358'}, {'name': 'Python', 'bytes': '335233'}, {'name': 'Shell', 'bytes': '57'}]}
GitHub
<?php namespace CmsPermissions\Exception; /** * Invalid role exception for CmsPermissions */ class InvalidRoleException extends InvalidArgumentException { /** * @param mixed $role * @return self */ public static function invalidRoleInstance($role) { return new self( sprintf( 'Invalid role of type "%s" provided', is_object($role) ? get_class($role) : gettype($role) ) ); } }
{'content_hash': '4f08504d17b7142bd91e733b065b2880', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 59, 'avg_line_length': 20.153846153846153, 'alnum_prop': 0.5267175572519084, 'repo_name': 'coolms/permissions', 'id': '89e26e9440126d555d7918920eaf591f257f73f9', 'size': '878', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Exception/InvalidRoleException.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'PHP', 'bytes': '36777'}]}
GitHub
#import "CPScatterPlotPlugIn.h" @implementation CPScatterPlotPlugIn /* * NOTE: It seems that QC plugins don't inherit dynamic input ports which is * why all of the accessor declarations are duplicated here */ /* * Accessor for the output image */ @dynamic outputImage; /* * Dynamic accessors for the static PlugIn inputs */ @dynamic inputPixelsWide, inputPixelsHigh; @dynamic inputPlotAreaColor; @dynamic inputAxisColor, inputAxisLineWidth, inputAxisMinorTickWidth, inputAxisMajorTickWidth, inputAxisMajorTickLength, inputAxisMinorTickLength; @dynamic inputMajorGridLineWidth, inputMinorGridLineWidth; @dynamic inputXMin, inputXMax, inputYMin, inputYMax; @dynamic inputXMajorIntervals, inputYMajorIntervals, inputXMinorIntervals, inputYMinorIntervals; +(NSDictionary *)attributes { return [NSDictionary dictionaryWithObjectsAndKeys: @"Core Plot Scatter Plot", QCPlugInAttributeNameKey, @"Scatter plot", QCPlugInAttributeDescriptionKey, nil]; } -(void)addPlotWithIndex:(NSUInteger)index { // Create input ports for the new plot [self addInputPortWithType:QCPortTypeStructure forKey:[NSString stringWithFormat:@"plotXNumbers%i", index] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"X Values %i", index + 1], QCPortAttributeNameKey, QCPortTypeStructure, QCPortAttributeTypeKey, nil]]; [self addInputPortWithType:QCPortTypeStructure forKey:[NSString stringWithFormat:@"plotYNumbers%i", index] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"Y Values %i", index + 1], QCPortAttributeNameKey, QCPortTypeStructure, QCPortAttributeTypeKey, nil]]; CGColorRef lineColor = [self newDefaultColorForPlot:index alpha:1.0]; [self addInputPortWithType:QCPortTypeColor forKey:[NSString stringWithFormat:@"plotDataLineColor%i", index] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"Plot Line Color %i", index + 1], QCPortAttributeNameKey, QCPortTypeColor, QCPortAttributeTypeKey, lineColor, QCPortAttributeDefaultValueKey, nil]]; CGColorRelease(lineColor); CGColorRef fillColor = [self newDefaultColorForPlot:index alpha:0.25]; [self addInputPortWithType:QCPortTypeColor forKey:[NSString stringWithFormat:@"plotFillColor%i", index] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"Plot Fill Color %i", index + 1], QCPortAttributeNameKey, QCPortTypeColor, QCPortAttributeTypeKey, fillColor, QCPortAttributeDefaultValueKey, nil]]; CGColorRelease(fillColor); [self addInputPortWithType:QCPortTypeNumber forKey:[NSString stringWithFormat:@"plotDataLineWidth%i", index] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"Plot Line Width %i", index + 1], QCPortAttributeNameKey, QCPortTypeNumber, QCPortAttributeTypeKey, [NSNumber numberWithInt:1.0], QCPortAttributeDefaultValueKey, [NSNumber numberWithFloat:0.0], QCPortAttributeMinimumValueKey, nil]]; [self addInputPortWithType:QCPortTypeIndex forKey:[NSString stringWithFormat:@"plotDataSymbols%i", index] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"Data Symbols %i", index + 1], QCPortAttributeNameKey, QCPortTypeIndex, QCPortAttributeTypeKey, [NSArray arrayWithObjects:@"Empty", @"Circle", @"Triangle", @"Square", @"Plus", @"Star", @"Diamond", @"Pentagon", @"Hexagon", @"Dash", @"Snow", nil], QCPortAttributeMenuItemsKey, [NSNumber numberWithInt:0], QCPortAttributeDefaultValueKey, [NSNumber numberWithInt:0], QCPortAttributeMinimumValueKey, [NSNumber numberWithInt:10], QCPortAttributeMaximumValueKey, nil]]; CGColorRef symbolColor = [self newDefaultColorForPlot:index alpha:0.25]; [self addInputPortWithType:QCPortTypeColor forKey:[NSString stringWithFormat:@"plotDataSymbolColor%i", index] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"Data Symbol Color %i", index + 1], QCPortAttributeNameKey, QCPortTypeColor, QCPortAttributeTypeKey, symbolColor, QCPortAttributeDefaultValueKey, nil]]; CGColorRelease(symbolColor); // Add the new plot to the graph CPTScatterPlot *scatterPlot = [[[CPTScatterPlot alloc] init] autorelease]; scatterPlot.identifier = [NSString stringWithFormat:@"Data Source Plot %i", index + 1]; // Line Style lineColor = [self newDefaultColorForPlot:index alpha:1.0]; fillColor = [self newDefaultColorForPlot:index alpha:0.25]; CPTMutableLineStyle *lineStyle = [CPTMutableLineStyle lineStyle]; lineStyle.lineWidth = 3.f; lineStyle.lineColor = [CPTColor colorWithCGColor:lineColor]; scatterPlot.dataLineStyle = lineStyle; scatterPlot.areaFill = [CPTFill fillWithColor:[CPTColor colorWithCGColor:fillColor]]; scatterPlot.dataSource = self; [graph addPlot:scatterPlot]; CGColorRelease(lineColor); CGColorRelease(fillColor); } -(void)removePlots:(NSUInteger)count { // Clean up a deleted plot for ( int i = numberOfPlots; i > numberOfPlots - count; i-- ) { [self removeInputPortForKey:[NSString stringWithFormat:@"plotXNumbers%i", i - 1]]; [self removeInputPortForKey:[NSString stringWithFormat:@"plotYNumbers%i", i - 1]]; [self removeInputPortForKey:[NSString stringWithFormat:@"plotDataLineColor%i", i - 1]]; [self removeInputPortForKey:[NSString stringWithFormat:@"plotFillColor%i", i - 1]]; [self removeInputPortForKey:[NSString stringWithFormat:@"plotDataLineWidth%i", i - 1]]; [self removeInputPortForKey:[NSString stringWithFormat:@"plotDataSymbols%i", i - 1]]; [self removeInputPortForKey:[NSString stringWithFormat:@"plotDataSymbolColor%i", i - 1]]; [graph removePlot:[[graph allPlots] lastObject]]; } } -(CPTPlotSymbol *)plotSymbol:(NSUInteger)index { NSString *key = [NSString stringWithFormat:@"plotDataSymbols%i", index]; NSUInteger value = [[self valueForInputKey:key] unsignedIntValue]; switch ( value ) { case 1: return [CPTPlotSymbol ellipsePlotSymbol]; case 2: return [CPTPlotSymbol trianglePlotSymbol]; case 3: return [CPTPlotSymbol rectanglePlotSymbol]; case 4: return [CPTPlotSymbol plusPlotSymbol]; case 5: return [CPTPlotSymbol starPlotSymbol]; case 6: return [CPTPlotSymbol diamondPlotSymbol]; case 7: return [CPTPlotSymbol pentagonPlotSymbol]; case 8: return [CPTPlotSymbol hexagonPlotSymbol]; case 9: return [CPTPlotSymbol dashPlotSymbol]; case 10: return [CPTPlotSymbol snowPlotSymbol]; default: return nil; } } -(CGColorRef)dataSymbolColor:(NSUInteger)index { NSString *key = [NSString stringWithFormat:@"plotDataSymbolColor%i", index]; return (CGColorRef)[self valueForInputKey : key]; } -(BOOL)configurePlots { // Adjust the plots configuration using the QC input ports for ( CPTScatterPlot *plot in [graph allPlots] ) { int index = [[graph allPlots] indexOfObject:plot]; CPTMutableLineStyle *lineStyle = [CPTMutableLineStyle lineStyle]; lineStyle.lineColor = [CPTColor colorWithCGColor:(CGColorRef)[self dataLineColor:index]]; lineStyle.lineWidth = [self dataLineWidth:index]; plot.dataLineStyle = lineStyle; lineStyle.lineColor = [CPTColor colorWithCGColor:[self dataSymbolColor:index]]; plot.plotSymbol = [self plotSymbol:index]; plot.plotSymbol.lineStyle = lineStyle; plot.plotSymbol.fill = [CPTFill fillWithColor:[CPTColor colorWithCGColor:[self dataSymbolColor:index]]]; plot.plotSymbol.size = CGSizeMake(10.0, 10.0); plot.areaFill = [CPTFill fillWithColor:[CPTColor colorWithCGColor:(CGColorRef)[self areaFillColor:index]]]; plot.areaBaseValue = CPTDecimalFromFloat( MAX( self.inputYMin, MIN(self.inputYMax, 0.0) ) ); [plot reloadData]; } return YES; } #pragma mark - #pragma markData source methods -(NSUInteger)numberOfRecordsForPlot:(CPTPlot *)plot { NSUInteger plotIndex = [[graph allPlots] indexOfObject:plot]; NSString *xKey = [NSString stringWithFormat:@"plotXNumbers%i", plotIndex]; NSString *yKey = [NSString stringWithFormat:@"plotYNumbers%i", plotIndex]; if ( ![self valueForInputKey:xKey] || ![self valueForInputKey:yKey] ) { return 0; } else if ( [[self valueForInputKey:xKey] count] != [[self valueForInputKey:yKey] count] ) { return 0; } return [[self valueForInputKey:xKey] count]; } -(NSNumber *)numberForPlot:(CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index { NSUInteger plotIndex = [[graph allPlots] indexOfObject:plot]; NSString *xKey = [NSString stringWithFormat:@"plotXNumbers%i", plotIndex]; NSString *yKey = [NSString stringWithFormat:@"plotYNumbers%i", plotIndex]; if ( ![self valueForInputKey:xKey] || ![self valueForInputKey:yKey] ) { return nil; } else if ( [[self valueForInputKey:xKey] count] != [[self valueForInputKey:yKey] count] ) { return nil; } NSString *key = (fieldEnum == CPTScatterPlotFieldX) ? xKey : yKey; NSDictionary *dict = [self valueForInputKey:key]; NSString *dictionaryKey = [NSString stringWithFormat:@"%i", index]; NSNumber *number = [dict valueForKey:dictionaryKey]; if ( number == nil ) { NSLog(@"No value for key: %@", dictionaryKey); NSLog(@"Dict: %@", dict); } return number; } @end
{'content_hash': 'f896e5fa5f4e902ddc36d18936030750', 'timestamp': '', 'source': 'github', 'line_count': 258, 'max_line_length': 184, 'avg_line_length': 36.2906976744186, 'alnum_prop': 0.7523229734059597, 'repo_name': 'escoz/core-plot', 'id': 'be9669c255e1a778fe373a587f59052f98665dcb', 'size': '9363', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'QCPlugin/CPScatterPlotPlugin.m', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '16505'}, {'name': 'D', 'bytes': '343'}, {'name': 'JavaScript', 'bytes': '333823'}, {'name': 'Objective-C', 'bytes': '1529101'}, {'name': 'Perl', 'bytes': '5096'}, {'name': 'Python', 'bytes': '10576'}, {'name': 'Shell', 'bytes': '631'}]}
GitHub
class Admin::ApplicationController < ApplicationController before_action :authorize_admin! def index @thinkers = Thinker.all @thoughts = Thought.all @categories = Category.all @comments = Comment.all @attendances = Attendance.all end private def authorize_admin! authenticate_thinker! unless current_thinker.admin? flash[:alert] = "You do not have permission to perform this action" redirect_to thoughts_path end end end
{'content_hash': '271f41eeaac8b779e7e191049d7933a6', 'timestamp': '', 'source': 'github', 'line_count': 25, 'max_line_length': 70, 'avg_line_length': 18.52, 'alnum_prop': 0.7300215982721382, 'repo_name': 'leog7one/thinkalyke', 'id': '22dce3d53c8055c09fbd35f03a7675dd953b724f', 'size': '463', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/controllers/admin/application_controller.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '11641'}, {'name': 'CoffeeScript', 'bytes': '2532'}, {'name': 'HTML', 'bytes': '32027'}, {'name': 'JavaScript', 'bytes': '693'}, {'name': 'Ruby', 'bytes': '65395'}]}
GitHub
/** * User registration */ import React, { Component } from 'react'; import { StyleSheet, Text, TextInput, Button, Dimensions, View } from 'react-native'; const { width, height } = Dimensions.get('window'); export default class Registration extends Component { constructor(props) { super(props); } componentWillMount() { } render() { return ( <View style={styles.container}> <Text style={styles.title_text}>User Registration</Text> <TextInput style={styles.input} placeholder="Email Address" /> <TextInput style={styles.input} placeholder="Username" /> <Button title="Submit" style={styles.submit_button} /> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, alignItems : "center", flexDirection : "column", justifyContent : "center", }, input: { width: 300, height: 100 }, submit_button:{ marginTop: 200 }, title_text:{ fontSize: 20 } }); module.exports = Registration;
{'content_hash': '947aa4cd69b66e4986a972617c7565a9', 'timestamp': '', 'source': 'github', 'line_count': 69, 'max_line_length': 66, 'avg_line_length': 16.81159420289855, 'alnum_prop': 0.5482758620689655, 'repo_name': 'muthuvijay/traceof', 'id': '1e30bc7270b3d2c8a6611d3e26b239d3bae29378', 'size': '1160', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/register.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '1468'}, {'name': 'JavaScript', 'bytes': '21573'}, {'name': 'Objective-C', 'bytes': '4419'}, {'name': 'Python', 'bytes': '1639'}]}
GitHub
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" /> <link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/> <link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/> <!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]--> <style type="text/css" media="all"> @import url('../../../../../style.css'); @import url('../../../../../tree.css'); </style> <script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script> <script src="../../../../../package-nodes-tree.js" type="text/javascript"></script> <script src="../../../../../clover-tree.js" type="text/javascript"></script> <script src="../../../../../clover.js" type="text/javascript"></script> <script src="../../../../../clover-descriptions.js" type="text/javascript"></script> <script src="../../../../../cloud.js" type="text/javascript"></script> <title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title> </head> <body> <div id="page"> <header id="header" role="banner"> <nav class="aui-header aui-dropdown2-trigger-group" role="navigation"> <div class="aui-header-inner"> <div class="aui-header-primary"> <h1 id="logo" class="aui-header-logo aui-header-logo-clover"> <a href="http://openclover.org" title="Visit OpenClover home page"><span class="aui-header-logo-device">OpenClover</span></a> </h1> </div> <div class="aui-header-secondary"> <ul class="aui-nav"> <li id="system-help-menu"> <a class="aui-nav-link" title="Open online documentation" target="_blank" href="http://openclover.org/documentation"> <span class="aui-icon aui-icon-small aui-iconfont-help">&#160;Help</span> </a> </li> </ul> </div> </div> </nav> </header> <div class="aui-page-panel"> <div class="aui-page-panel-inner"> <div class="aui-page-panel-nav aui-page-panel-nav-clover"> <div class="aui-page-header-inner" style="margin-bottom: 20px;"> <div class="aui-page-header-image"> <a href="http://cardatechnologies.com" target="_top"> <div class="aui-avatar aui-avatar-large aui-avatar-project"> <div class="aui-avatar-inner"> <img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/> </div> </div> </a> </div> <div class="aui-page-header-main" > <h1> <a href="http://cardatechnologies.com" target="_top"> ABA Route Transit Number Validator 1.0.1-SNAPSHOT </a> </h1> </div> </div> <nav class="aui-navgroup aui-navgroup-vertical"> <div class="aui-navgroup-inner"> <ul class="aui-nav"> <li class=""> <a href="../../../../../dashboard.html">Project overview</a> </li> </ul> <div class="aui-nav-heading packages-nav-heading"> <strong>Packages</strong> </div> <div class="aui-nav project-packages"> <form method="get" action="#" class="aui package-filter-container"> <input type="text" autocomplete="off" class="package-filter text" placeholder="Type to filter packages..." name="package-filter" id="package-filter" title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/> </form> <p class="package-filter-no-results-message hidden"> <small>No results found.</small> </p> <div class="packages-tree-wrapper" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator"> <div class="packages-tree-container"></div> <div class="clover-packages-lozenges"></div> </div> </div> </div> </nav> </div> <section class="aui-page-panel-content"> <div class="aui-page-panel-content-clover"> <div class="aui-page-header-main"><ol class="aui-nav aui-nav-breadcrumbs"> <li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li> <li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li> <li><a href="test-Test_AbaRouteValidator_15.html">Class Test_AbaRouteValidator_15</a></li> </ol></div> <h1 class="aui-h2-clover"> Test testAbaNumberCheck_32880_bad </h1> <table class="aui"> <thead> <tr> <th>Test</th> <th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th> <th><label title="When the test execution was started">Start time</label></th> <th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th> <th><label title="A failure or error message if the test is not successful.">Message</label></th> </tr> </thead> <tbody> <tr> <td> <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_15.html?line=8996#src-8996" >testAbaNumberCheck_32880_bad</a> </td> <td> <span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span> </td> <td> 7 Aug 12:44:20 </td> <td> 0.0 </td> <td> <div></div> <div class="errorMessage"></div> </td> </tr> </tbody> </table> <div>&#160;</div> <table class="aui aui-table-sortable"> <thead> <tr> <th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th> <th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> testAbaNumberCheck_32880_bad</th> </tr> </thead> <tbody> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.AbaRouteValidationException</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/exceptions/AbaRouteValidationException.html?id=32771#AbaRouteValidationException" title="AbaRouteValidationException" name="sl-43">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.AbaRouteValidationException</a> </td> <td> <span class="sortValue">0.5714286</span>57.1% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td> </tr> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/ErrorCodes.html?id=32771#ErrorCodes" title="ErrorCodes" name="sl-42">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</a> </td> <td> <span class="sortValue">0.5714286</span>57.1% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td> </tr> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=32771#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a> </td> <td> <span class="sortValue">0.29411766</span>29.4% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="29.4% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:29.4%"></div></div></div> </td> </tr> </tbody> </table> </div> <!-- class="aui-page-panel-content-clover" --> <footer id="footer" role="contentinfo"> <section class="footer-body"> <ul> <li> Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1 on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT. </li> </ul> <ul> <li>OpenClover is free and open-source software. </li> </ul> </section> </footer> </section> <!-- class="aui-page-panel-content" --> </div> <!-- class="aui-page-panel-inner" --> </div> <!-- class="aui-page-panel" --> </div> <!-- id="page" --> </body> </html>
{'content_hash': '4e9f4e133e358b4b3d9307574337a55c', 'timestamp': '', 'source': 'github', 'line_count': 235, 'max_line_length': 359, 'avg_line_length': 46.744680851063826, 'alnum_prop': 0.5302685480200273, 'repo_name': 'dcarda/aba.route.validator', 'id': '92bdd2c5e65996edf3bf8acf0bc5976fbc67a8de', 'size': '10985', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'target13/site/clover/com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_15_testAbaNumberCheck_32880_bad_pab.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '18715254'}]}
GitHub
package com.thebluealliance.androidclient.database.writers; import androidx.annotation.WorkerThread; import com.google.common.collect.ImmutableList; import com.thebluealliance.androidclient.database.Database; import com.thebluealliance.androidclient.models.Event; import java.util.List; import javax.inject.Inject; public class EventListWriter extends BaseDbWriter<List<Event>> { @Inject public EventListWriter(Database db) { super(db); } @Override @WorkerThread public void write(List<Event> events, Long lastModified) { mDb.getEventsTable().add(ImmutableList.copyOf(events), lastModified); } }
{'content_hash': '8d7e4d0869b33e5647fdfd4eb84ba44d', 'timestamp': '', 'source': 'github', 'line_count': 24, 'max_line_length': 77, 'avg_line_length': 26.875, 'alnum_prop': 0.7643410852713178, 'repo_name': 'the-blue-alliance/the-blue-alliance-android', 'id': 'ac9f02586d51f9fe0a7b37d7990434b3a7f90df0', 'size': '645', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'android/src/main/java/com/thebluealliance/androidclient/database/writers/EventListWriter.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '2389864'}, {'name': 'Python', 'bytes': '25030'}, {'name': 'Shell', 'bytes': '12409'}]}
GitHub
/* @test * @bug 5097131 6299047 * @summary Test jvmti hprof * * @compile -g HelloWorld.java DefineClass.java ../DemoRun.java * @build CpuTimesDefineClassTest * @run main CpuTimesDefineClassTest DefineClass * * */ public class CpuTimesDefineClassTest { public static void main(String args[]) throws Exception { DemoRun hprof; /* Run JVMTI hprof agent with cpu=times */ hprof = new DemoRun("hprof", "cpu=times"); hprof.runit(args[0]); /* Make sure patterns in output look ok */ if (hprof.output_contains("ERROR")) { throw new RuntimeException("Test failed - ERROR seen in output"); } /* Must be a pass. */ System.out.println("Test passed - cleanly terminated"); } }
{'content_hash': 'f42b06eb3ae790e57edb0d6058f30db8', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 77, 'avg_line_length': 24.15625, 'alnum_prop': 0.6261319534282018, 'repo_name': 'rokn/Count_Words_2015', 'id': '97c50eb39984f77605d238b8ef88852c372bcf26', 'size': '1829', 'binary': False, 'copies': '51', 'ref': 'refs/heads/master', 'path': 'testing/openjdk2/jdk/test/demo/jvmti/hprof/CpuTimesDefineClassTest.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '61802'}, {'name': 'Ruby', 'bytes': '18888605'}]}
GitHub
title: "Aloha ReactJS, pakai Javascript Framework supaya bisa lebih kenal sama Vanilla JS :D" date: "2015-11-23" image: "./featured.jpg" --- Ada yang udah baca tulisannya om Paul Lewis tentang ‘The Cost of Framework’? Cukup banyak orang-orang yang sangat jago yang ngerespon artikel tersebut, silahkan gugling aja artikelnya :D. Om Paul membandingkan performa beberapa framework javascript dengan vanillajs. Ya, lagi-lagi tentang perbandingan framework. Dunia front end emang cukup banyak framework, release nya pun cukup cepat. Bagi gue, yang mau mulai belajar javascript jadi agak bingung mau memulai dengan framework yang mana. Sebetulnya sama aja kaya gue sekarang mengapa menghindari pakai Framework Twitter Bootstrap untuk pembuatan web, padahal banyak yang make. Tapi bagi gue, Bootstrap itu ukuran css nya cukup besar karena elemennya yang hampir komplit. Tapi gak semua elemen bakalan dipake juga. Ribet struktur htmlnya. Untuk grid nya gak fleksibel, coba buat 5 atau 7 kolom sama panjang pake Bootstrap. Bisa sih, tapi aneh. Slider? Duh, banyak yang lebih bagus. Pusing deh intinya pake bootstrap menurut gue. Bagi gue sekarang, gak perlu lagi elemen-elemen dari framework enakan buat sendiri, jadi tau mana elemen yang bakalan dibutuhin. Karena mungkin gue udah ngerti gimana cara buat elemen-elemen tersebut. Jadi bisa nentuin mana elemen yang dipake mana yang enggak. Ukuran file css pun jadi ramping. Seenggaknya mengurangi jatah ‘**Unused CSS**‘. Tapi, gue menghindari Bootsrap bukan berarti gue bilang Bootstrap itu jelek. Bootstrap bagus untuk mereka yang mau cepat proses pembuatan webnya, misalnya mau pake elemen button tinggal panggil aja elemennya, mau ubah bentuk tinggal edit sedikit aja. Bentuk dasarnya udah ada. Apalagi untuk programmer yang gak begitu dalemin css, Bootstrap ngebantu banget nyelesein proyek mereka. Dulu juga awalnya gue pakai bootstrap sebelum gue dalemin CSS, gue belajar dari framework gimana cara buat elemen. Gimana caranya menulis dengan rapih. Dan sebagainya sampai gue ngerasa gue lebih asik buat elemen sendiri daripada ubah sedikit elemen dari framework. Mungkin yang udah jago agak aneh ngeliat/pake framework. Tapi framework bagus untuk langkah awal belajar. Dan bisa jadi pakai framework malah buat lu jadi lebih produktif. Dari hal ini gue juga mempraktekan hal yang sama untuk proses belajar Vanilla Javascript. Gue memulai dengan menggunakan Framework ReactJS. Untuk pemula, ReactJS ini cukup sulit dimengerti. Mesti sabar. Seenggaknya sedikit-sedikit gue jadi mengerti apa itu ES6 dan udah mulai bisa baca syntaxnya. Walaupun tetep lebih ngerti ES5\. Sebelumnya, sama sekali gak tau apa itu ES5/ES6. Eniwei, ini rangkuman stuff (router, filtering and sorting table, infinite load) yang gue implementasi selama di Beritagar, yang mau liat rangkuman awal gue belajar ReactJS bisa liat [di github gue](https://github.com/preschian/aloha-react). Untuk proses development sekarang udah pindah haluan pakai Gulpjs yang sebelumnya pakai Gruntjs. Untuk code editor juga pindah haluan sekarang pakai Atom, klo sebelumnya pakai Sublime. Gara-gara ReactJS sih gue jadi pindah ke Atom, plugin untuk ngoding ReactJS lebih asik di Atom. Nah, tapi untuk development ReactJS ini gue belum nemu ‘*setup*‘ yang cocok pakai Gulp, compilenya masih lama klo pake Gulp. Jadi, sementara ini gue compile JSX-nya langsung dari ‘npm run’ tanpa pake Gulp dulu. Mungkin kalian ada yang mau nyobain ReactJS juga artikel ini cukup membantu untuk memahami alur ReactJS-nya [Execution sequence of a React component’s lifecycle methods](https://javascript.tutorialhorizon.com/2014/09/13/execution-sequence-of-a-react-components-lifecycle-methods/).
{'content_hash': 'fc934a58df4285574dd3f39ca4eb062b', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 173, 'avg_line_length': 85.69767441860465, 'alnum_prop': 0.8157394843962008, 'repo_name': 'preschian/preschian-com', 'id': '7cd9753ad9fbf7d6265b7eedc774846d2e211ae4', 'size': '3707', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'post/2015-11-23/aloha-reactjs-pakai-javascript-framework-supaya-bisa-lebih-kenal-sama-vanilla-js-d.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '12906'}]}
GitHub
<!DOCTYPE html> <!--[if lt IE 7 ]> <html class="ie6"> <![endif]--> <!--[if IE 7 ]> <html class="ie7"> <![endif]--> <!--[if IE 8 ]> <html class="ie8"> <![endif]--> <!--[if IE 9 ]> <html class="ie9"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html class="not-ie"> <!--<![endif]--> <head> <meta charset="utf-8"> <title>Switching basemaps | Esri Leaflet</title> <meta name="description" content="Switching between all available basemaps packaged with Esri Leaflet."> <meta name="description" content="Esri Leaflet"> <meta name="viewport" content="width=device-width"> <!--[if lt IE 9]> <script src="//cdn.jsdelivr.net/html5shiv/3.7.2/html5shiv-printshiv.js"></script> <![endif]--> <!-- google fonts --> <link href='//fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="//brick.a.ssl.fastly.net/Source+Code+Pro:300"> <link href='//fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <!-- stylesheet --> <link rel="stylesheet" href="../css/style.css"> <!-- leaflet --> <link rel="stylesheet" href="//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.css" /> <!-- require combined leaflet, esri leaflet and jsdelivr-rum --> <script src="//cdn.jsdelivr.net/leaflet/latest/leaflet.js"></script> <!--script src="//cdn.jsdelivr.net/leaflet.esri/1.0.3/esri-leaflet.js"></script--> <script src="../../js/esri-leaflet-src.js"></script> <script src="//cdn.jsdelivr.net/jsdelivr-rum/latest/jsdelivr-rum.min.js"></script> <!-- 'livereload' for development --> <script src="//localhost:35729/livereload.js"></script> <!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-44963317-3', 'auto'); ga('send', 'pageview'); </script> <!-- End Google Analytics --> </head> <body> <div class="page-content "> <div class="container"> <a class="site-nav" href="../" class="left logo">Esri Leaflet</a> <nav class="right"> <a class="site-nav" href="../examples/">Examples</a> <a class="site-nav" href="../api-reference/">API Reference</a> <a class="site-nav" href="../download/">Download</a> <a class="site-nav" href="https://github.com/Esri/esri-leaflet">View on GitHub</a> </nav> </div> <div id="background-map" class="background-map"></div> <div class="container white"> <aside class="sidebar"> <h5>Basemaps</h5> <nav> <a href="../examples/showing-a-basemap.html">Showing an ArcGIS basemap</a> <a href="../examples/basemap-with-labels.html">Basemap with labels</a> <a href="../examples/switching-basemaps.html">Switching basemaps</a> <a href="../examples/retina-basemap.html">Retina Basemap</a> </nav> <h5>Feature Layers</h5> <nav> <a href="../examples/simple-feature-layer.html">Simple FeatureLayer</a> <a href="../examples/styling-feature-layer-points.html">Styling points</a> <a href="../examples/styling-feature-layer-polylines.html">Styling lines</a> <a href="../examples/styling-feature-layer-polygons.html">Styling polygons</a> <a href="../examples/feature-layer-popups.html">Custom popups</a> <a href="../examples/querying-feature-layers-1.html">Querying features #1</a> <a href="../examples/querying-feature-layers-2.html">Querying features #2</a> <a href="../examples/spatial-queries.html">Spatial Queries</a> <a href="../examples/simplifying-complex-features.html">Simplifying complex features</a> <a href="../examples/zooming-to-all-features-1.html">Zoom to all features #1</a> <a href="../examples/zooming-to-all-features-2.html">Zoom to all features #2</a> <a href="../examples/labeling-features.html">Labeling Features</a> <a href="../examples/clustering-feature-layers.html">Clustering points</a> <a href="../examples/styling-clusters.html">Styling clusters</a> <a href="../examples/visualize-points-as-a-heatmap.html">Points as a heatmap</a> <a href="../examples/styling-heatmaps.html">Styling heatmaps</a> <a href="../examples/visualizing-time-with-feature-layer.html">Time enabled services</a> <a href="../examples/feature-layer-snapshot.html">Layer "snapshots"</a> <a href="../examples/editing.html">Editing</a> </nav> <h5>Tile Layers</h5> <nav> <a href="../examples/tile-layer-1.html">Tiles from a Map Service #1</a> <a href="../examples/tile-layer-2.html">Tiles from a Map Service #2</a> <a href="../examples/non-mercator-projection.html">Non-mercator tiles</a> </nav> <h5>Dynamic Map Layer</h5> <nav> <a href="../examples/simple-dynamic-map-layer.html">Simple DynamicMapLayer</a> <a href="../examples/identifying-features.html">Identifying Features</a> <a href="../examples/finding-features.html">Finding Features</a> <a href="../examples/customizing-popups.html">Custom popups</a> <a href="../examples/visualizing-time-on-dynamic-map-layer.html">Time Ranges</a> <a href="../examples/dynamic-map-layer-reprojected.html">Reprojecting on the fly</a> </nav> <h5>Image Map Layer</h5> <nav> <a href="../examples/simple-image-map-layer.html">Simple ImageMapLayer</a> <a href="../examples/infrared-imagery.html">Infrared Imagery using BandIDs</a> <a href="../examples/image-map-layer-rendering-rule.html">Rendering Rule</a> <a href="../examples/identifying-imagery.html">Identify Imagery</a> <a href="../examples/image-map-layer-mosaic-rule.html">Mosaic Rule</a> <a href="../examples/imagery-popups.html">Custom popups</a> </nav> <h5>Authentication</h5> <nav> <a href="../examples/arcgis-online-auth.html">ArcGIS Online OAuth</a> <a href="../examples/premium-content.html">Premium ArcGIS Online content</a> <a href="../examples/arcgis-server-auth.html">ArcGIS Server username/password</a> </nav> <h5>Geocoding</h5> <nav> <a href="../examples/geocoding-control.html">Geocoding control</a> <a href="../examples/search-map-service.html">Searching map service</a> <a href="../examples/search-feature-layer.html">Searching feature layers</a> <a href="../examples/center-map-on-address.html">Center the initial map state</a> <a href="../examples/reverse-geocoding.html">Reverse geocoding</a> </nav> <h5>Other Plugins</h5> <nav> <a href="../examples/gp-plugin.html">Geoprocessing plugin</a> <a href="../examples/renderers-plugin.html">Renderers plugin</a> </nav> <h5>Misc.</h5> <nav> <a href="../examples/getting-service-metadata.html">Getting service metadata</a> <a href="../examples/parse-feature-collection.html">Parsing Feature Collections</a> </nav> </aside> <div class="example-content"> <div class="wrap"> <h1>Switching basemaps</h1> <p>Switching between all available basemaps packaged with Esri Leaflet.</p> </div> <div id="map-wrapper"> <style> #basemaps-wrapper { position: absolute; top: 10px; right: 10px; z-index: 10; background: white; padding: 10px; } #basemaps { margin-bottom: 5px; } </style> <div id="map"></div> <div id="basemaps-wrapper" class="leaflet-bar"> <select name="basemaps" id="basemaps"> <option value="Topographic">Topographic<options> <option value="Streets">Streets</option> <option value="NationalGeographic">National Geographic<options> <option value="Oceans">Oceans<options> <option value="Gray">Gray<options> <option value="DarkGray">Dark Gray<options> <option value="Imagery">Imagery<options> <option value="ShadedRelief">Shaded Relief<options> </select> </div> <script> var map = L.map('map').setView([-33.87, 150.77], 10); var layer = L.esri.basemapLayer('Imagery').addTo(map); var layer2 = L.esri.basemapLayer('ImageryLabels').addTo(map); // var layerLabels; // function setBasemap(basemap) { // if (layer) { // map.removeLayer(layer); // } // layer = L.esri.basemapLayer(basemap); // map.addLayer(layer); // if (layerLabels) { // map.removeLayer(layerLabels); // } // // if (basemap === 'ShadedRelief' || basemap === 'Oceans' || basemap === 'Gray' || basemap === 'DarkGray' || basemap === 'Imagery' || basemap === 'Terrain') { // // layerLabels = L.esri.basemapLayer(basemap + 'Labels'); // map.addLayer(layerLabels); // } // } // // var basemaps = document.getElementById('basemaps'); // // basemaps.addEventListener('change', function(){ // setBasemap(basemaps.value); // }); </script> </div> <pre><code class="language-xml"><span class="tag">&lt;<span class="title">html</span>&gt;</span> <span class="tag">&lt;<span class="title">head</span>&gt;</span> <span class="tag">&lt;<span class="title">meta</span> <span class="attribute">charset</span>=<span class="value">utf-8</span> /&gt;</span> <span class="tag">&lt;<span class="title">title</span>&gt;</span>Switching basemaps<span class="tag">&lt;/<span class="title">title</span>&gt;</span> <span class="tag">&lt;<span class="title">meta</span> <span class="attribute">name</span>=<span class="value">'viewport'</span> <span class="attribute">content</span>=<span class="value">'initial-scale=1,maximum-scale=1,user-scalable=no'</span> /&gt;</span> <span class="comment">&lt;!-- Load Leaflet from CDN--&gt;</span> <span class="tag">&lt;<span class="title">link</span> <span class="attribute">rel</span>=<span class="value">"stylesheet"</span> <span class="attribute">href</span>=<span class="value">"//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.css"</span> /&gt;</span> <span class="tag">&lt;<span class="title">script</span> <span class="attribute">src</span>=<span class="value">"//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.js"</span>&gt;</span><span class="javascript"></span><span class="tag">&lt;/<span class="title">script</span>&gt;</span> <span class="comment">&lt;!-- Load Esri Leaflet from CDN --&gt;</span> <span class="tag">&lt;<span class="title">script</span> <span class="attribute">src</span>=<span class="value">"//cdn.jsdelivr.net/leaflet.esri/1.0.3/esri-leaflet.js"</span>&gt;</span><span class="javascript"></span><span class="tag">&lt;/<span class="title">script</span>&gt;</span> <span class="tag">&lt;<span class="title">style</span>&gt;</span><span class="css"> <span class="tag">body</span> <span class="rules">{ <span class="rule"><span class="attribute">margin</span>:<span class="value"><span class="number">0</span></span></span>; <span class="rule"><span class="attribute">padding</span>:<span class="value"><span class="number">0</span></span></span>; <span class="rule">}</span></span> <span class="id">#map</span> <span class="rules">{ <span class="rule"><span class="attribute">position</span>:<span class="value"> absolute</span></span>; <span class="rule"><span class="attribute">top</span>:<span class="value"><span class="number">0</span></span></span>; <span class="rule"><span class="attribute">bottom</span>:<span class="value"><span class="number">0</span></span></span>; <span class="rule"><span class="attribute">right</span>:<span class="value"><span class="number">0</span></span></span>; <span class="rule"><span class="attribute">left</span>:<span class="value"><span class="number">0</span></span></span>; <span class="rule">}</span></span> </span><span class="tag">&lt;/<span class="title">style</span>&gt;</span> <span class="tag">&lt;/<span class="title">head</span>&gt;</span> <span class="tag">&lt;<span class="title">body</span>&gt;</span> <span class="tag">&lt;<span class="title">style</span>&gt;</span><span class="css"> <span class="id">#basemaps-wrapper</span> <span class="rules">{ <span class="rule"><span class="attribute">position</span>:<span class="value"> absolute</span></span>; <span class="rule"><span class="attribute">top</span>:<span class="value"> <span class="number">10</span>px</span></span>; <span class="rule"><span class="attribute">right</span>:<span class="value"> <span class="number">10</span>px</span></span>; <span class="rule"><span class="attribute">z-index</span>:<span class="value"> <span class="number">10</span></span></span>; <span class="rule"><span class="attribute">background</span>:<span class="value"> white</span></span>; <span class="rule"><span class="attribute">padding</span>:<span class="value"> <span class="number">10</span>px</span></span>; <span class="rule">}</span></span> <span class="id">#basemaps</span> <span class="rules">{ <span class="rule"><span class="attribute">margin-bottom</span>:<span class="value"> <span class="number">5</span>px</span></span>; <span class="rule">}</span></span> </span><span class="tag">&lt;/<span class="title">style</span>&gt;</span> <span class="tag">&lt;<span class="title">div</span> <span class="attribute">id</span>=<span class="value">"map"</span>&gt;</span><span class="tag">&lt;/<span class="title">div</span>&gt;</span> <span class="tag">&lt;<span class="title">div</span> <span class="attribute">id</span>=<span class="value">"basemaps-wrapper"</span> <span class="attribute">class</span>=<span class="value">"leaflet-bar"</span>&gt;</span> <span class="tag">&lt;<span class="title">select</span> <span class="attribute">name</span>=<span class="value">"basemaps"</span> <span class="attribute">id</span>=<span class="value">"basemaps"</span>&gt;</span> <span class="tag">&lt;<span class="title">option</span> <span class="attribute">value</span>=<span class="value">"Topographic"</span>&gt;</span>Topographic<span class="tag">&lt;<span class="title">options</span>&gt;</span> <span class="tag">&lt;<span class="title">option</span> <span class="attribute">value</span>=<span class="value">"Streets"</span>&gt;</span>Streets<span class="tag">&lt;/<span class="title">option</span>&gt;</span> <span class="tag">&lt;<span class="title">option</span> <span class="attribute">value</span>=<span class="value">"NationalGeographic"</span>&gt;</span>National Geographic<span class="tag">&lt;<span class="title">options</span>&gt;</span> <span class="tag">&lt;<span class="title">option</span> <span class="attribute">value</span>=<span class="value">"Oceans"</span>&gt;</span>Oceans<span class="tag">&lt;<span class="title">options</span>&gt;</span> <span class="tag">&lt;<span class="title">option</span> <span class="attribute">value</span>=<span class="value">"Gray"</span>&gt;</span>Gray<span class="tag">&lt;<span class="title">options</span>&gt;</span> <span class="tag">&lt;<span class="title">option</span> <span class="attribute">value</span>=<span class="value">"DarkGray"</span>&gt;</span>Dark Gray<span class="tag">&lt;<span class="title">options</span>&gt;</span> <span class="tag">&lt;<span class="title">option</span> <span class="attribute">value</span>=<span class="value">"Imagery"</span>&gt;</span>Imagery<span class="tag">&lt;<span class="title">options</span>&gt;</span> <span class="tag">&lt;<span class="title">option</span> <span class="attribute">value</span>=<span class="value">"ShadedRelief"</span>&gt;</span>Shaded Relief<span class="tag">&lt;<span class="title">options</span>&gt;</span> <span class="tag">&lt;/<span class="title">select</span>&gt;</span> <span class="tag">&lt;/<span class="title">div</span>&gt;</span> <span class="tag">&lt;<span class="title">script</span>&gt;</span><span class="javascript"> <span class="keyword">var</span> map = L.map(<span class="string">'map'</span>).setView([-<span class="number">33.87</span>, <span class="number">150.77</span>], <span class="number">10</span>); <span class="keyword">var</span> layer = L.esri.basemapLayer(<span class="string">'Imagery'</span>).addTo(map); <span class="keyword">var</span> layer2 = L.esri.basemapLayer(<span class="string">'ImageryLabels'</span>).addTo(map); <span class="comment">// var layerLabels;</span> <span class="comment">// function setBasemap(basemap) {</span> <span class="comment">// if (layer) {</span> <span class="comment">// map.removeLayer(layer);</span> <span class="comment">// }</span> <span class="comment">// layer = L.esri.basemapLayer(basemap);</span> <span class="comment">// map.addLayer(layer);</span> <span class="comment">// if (layerLabels) {</span> <span class="comment">// map.removeLayer(layerLabels);</span> <span class="comment">// }</span> <span class="comment">//</span> <span class="comment">// if (basemap === 'ShadedRelief' || basemap === 'Oceans' || basemap === 'Gray' || basemap === 'DarkGray' || basemap === 'Imagery' || basemap === 'Terrain') {</span> <span class="comment">//</span> <span class="comment">// layerLabels = L.esri.basemapLayer(basemap + 'Labels');</span> <span class="comment">// map.addLayer(layerLabels);</span> <span class="comment">// }</span> <span class="comment">// }</span> <span class="comment">//</span> <span class="comment">// var basemaps = document.getElementById('basemaps');</span> <span class="comment">//</span> <span class="comment">// basemaps.addEventListener('change', function(){</span> <span class="comment">// setBasemap(basemaps.value);</span> <span class="comment">// });</span> </span><span class="tag">&lt;/<span class="title">script</span>&gt;</span> <span class="tag">&lt;/<span class="title">body</span>&gt;</span> <span class="tag">&lt;/<span class="title">html</span>&gt;</span></code></pre> <div class="wrap"> <p><a href="http://github.com/esri/esri-leaflet/edit/master/site/source/pages/examples/wtf.hbs">Edit this sample on GitHub</a></p> </div> </div> <div style='clear:both;'></div> </div> <div class="container centered-text"> <p class="copyright">Esri Leaflet is a project from the <a href="http://pdx.esri.com">Esri PDX R&amp;D Center</a> and the <a href="https://github.com/Esri/esri-leaflet/graphs/contributors">Esri Community</a></p> </div> </div> <script src="../js/script.js"></script> </body> </html>
{'content_hash': '1515793b744656979bcea9dc21358874', 'timestamp': '', 'source': 'github', 'line_count': 330, 'max_line_length': 675, 'avg_line_length': 55.50606060606061, 'alnum_prop': 0.6556204618660261, 'repo_name': 'dookda/udsafe', 'id': '1f0293e6ee60b4d5ea514b1ea4b7cbc515e2d136', 'size': '18317', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'node_modules/esri-leaflet/site/build/examples/wtf.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '270119'}, {'name': 'HTML', 'bytes': '550711'}, {'name': 'JavaScript', 'bytes': '36815'}, {'name': 'PHP', 'bytes': '1849'}]}
GitHub
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)"> <meta name="when" content="Wed, 14 Apr 2010 15:12:04 +0000"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css"> <link rel="start" href="../../../../overview-summary.html"> <title>Driver (Doctrine)</title> </head> <body id="definition" onload="parent.document.title=document.title;"> <div class="header"> <h1>Doctrine</h1> <ul> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="../../../../doctrine/dbal/driver/pdomssql/package-summary.html">Namespace</a></li> <li class="active">Class</li> <li><a href="../../../../doctrine/dbal/driver/pdomssql/package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> </ul> </div> <div class="small_links"> <a href="../../../../index.html" target="_top">Frames</a> <a href="../../../../doctrine/dbal/driver/pdomssql/driver.html" target="_top">No frames</a> </div> <div class="small_links"> Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a> Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a> </div> <hr> <div class="qualifiedName">Doctrine\DBAL\Driver\PDOMsSql\Driver</div> <div class="location">/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 29</div> <h1>Class Driver</h1> <pre class="tree"><strong>Driver</strong><br /></pre> <dl> <dt>All Implemented Interfaces:</dt> <dd>Driver </dt> </dl> <hr> <p class="signature">public class <strong>Driver</strong></p> <div class="comment" id="overview_description"><p>The PDO-based MsSql driver.</p></div> <dl> <dt>Since:</dt> <dd>2.0</dd> </dl> <hr> <table id="summary_method"> <tr><th colspan="2">Method Summary</th></tr> <tr> <td class="type"> void</td> <td class="description"><p class="name"><a href="#connect()">connect</a>(mixed params, mixed username, mixed password, mixed driverOptions)</p></td> </tr> <tr> <td class="type"> void</td> <td class="description"><p class="name"><a href="#getDatabase()">getDatabase</a>(mixed conn)</p></td> </tr> <tr> <td class="type"> void</td> <td class="description"><p class="name"><a href="#getDatabasePlatform()">getDatabasePlatform</a>()</p></td> </tr> <tr> <td class="type"> void</td> <td class="description"><p class="name"><a href="#getName()">getName</a>()</p></td> </tr> <tr> <td class="type"> void</td> <td class="description"><p class="name"><a href="#getSchemaManager()">getSchemaManager</a>(mixed conn)</p></td> </tr> </table> <h2 id="detail_method">Method Detail</h2> <div class="location">/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 31</div> <h3 id="connect()">connect</h3> <code class="signature">public void <strong>connect</strong>(mixed params, mixed username, mixed password, mixed driverOptions)</code> <div class="details"> </div> <hr> <div class="location">/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 79</div> <h3 id="getDatabase()">getDatabase</h3> <code class="signature">public void <strong>getDatabase</strong>(mixed conn)</code> <div class="details"> </div> <hr> <div class="location">/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 64</div> <h3 id="getDatabasePlatform()">getDatabasePlatform</h3> <code class="signature">public void <strong>getDatabasePlatform</strong>()</code> <div class="details"> </div> <hr> <div class="location">/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 74</div> <h3 id="getName()">getName</h3> <code class="signature">public void <strong>getName</strong>()</code> <div class="details"> </div> <hr> <div class="location">/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 69</div> <h3 id="getSchemaManager()">getSchemaManager</h3> <code class="signature">public void <strong>getSchemaManager</strong>(mixed conn)</code> <div class="details"> </div> <hr> <div class="header"> <h1>Doctrine</h1> <ul> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="../../../../doctrine/dbal/driver/pdomssql/package-summary.html">Namespace</a></li> <li class="active">Class</li> <li><a href="../../../../doctrine/dbal/driver/pdomssql/package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> </ul> </div> <div class="small_links"> <a href="../../../../index.html" target="_top">Frames</a> <a href="../../../../doctrine/dbal/driver/pdomssql/driver.html" target="_top">No frames</a> </div> <div class="small_links"> Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a> Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a> </div> <hr> <p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p> </body> </html>
{'content_hash': '5c6bb0636e747621097bfb5113b8023c', 'timestamp': '', 'source': 'github', 'line_count': 154, 'max_line_length': 148, 'avg_line_length': 33.45454545454545, 'alnum_prop': 0.6597437888198758, 'repo_name': 'j13k/doctrine1', 'id': '06dd468687a19c195e69a199d048f6a1ac2f3a4f', 'size': '5152', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/api/doctrine/dbal/driver/pdomssql/driver.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '6908'}, {'name': 'JavaScript', 'bytes': '3353'}, {'name': 'PHP', 'bytes': '3138805'}]}
GitHub
<html> <script src="../../resources/js-test.js"></script> <body style="min-height: 5000px"> <span id="elt">&nbsp;</span> <script> description('Checks that clicking on scrollbar works when tickmarks are added.'); onload = function() { if (window.testRunner) testRunner.dumpAsText(); var range = document.createRange(); var elt = document.getElementById('elt'); range.selectNodeContents(elt); if (window.internals) { window.internals.settings.setOverlayScrollbarsEnabled(true); window.internals.addTextMatchMarker(range, true); } if (window.eventSender) { eventSender.mouseMoveTo(window.innerWidth - 1, window.innerHeight - 1); eventSender.mouseDown(); eventSender.mouseUp(); } } onscroll = function() { testPassed('did scroll'); finishJSTest(); } var jsTestIsAsync = true; </script> </body> </html>
{'content_hash': '0811093dc713fd2a40b47b7ef42bf806', 'timestamp': '', 'source': 'github', 'line_count': 37, 'max_line_length': 81, 'avg_line_length': 24.10810810810811, 'alnum_prop': 0.6647982062780269, 'repo_name': 'primiano/blink-gitcs', 'id': '0974a65948cded7befc8e016693518cb6812afdf', 'size': '892', 'binary': False, 'copies': '39', 'ref': 'refs/heads/master', 'path': 'LayoutTests/fast/scrolling/scrollbar-tickmarks-hittest.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Assembly', 'bytes': '14584'}, {'name': 'Bison', 'bytes': '64736'}, {'name': 'C', 'bytes': '241029'}, {'name': 'C++', 'bytes': '42205756'}, {'name': 'CSS', 'bytes': '542759'}, {'name': 'CoffeeScript', 'bytes': '163'}, {'name': 'Java', 'bytes': '74992'}, {'name': 'JavaScript', 'bytes': '26765495'}, {'name': 'Objective-C', 'bytes': '79920'}, {'name': 'Objective-C++', 'bytes': '342572'}, {'name': 'PHP', 'bytes': '171194'}, {'name': 'Perl', 'bytes': '583379'}, {'name': 'Python', 'bytes': '3781501'}, {'name': 'Ruby', 'bytes': '141818'}, {'name': 'Shell', 'bytes': '8923'}, {'name': 'XSLT', 'bytes': '49926'}]}
GitHub
package com.iluwatar.hexagonal.domain; import com.iluwatar.hexagonal.database.LotteryTicketRepository; import java.util.Optional; /** * Lottery utilities */ public class LotteryUtils { private LotteryUtils() { } /** * Checks if lottery ticket has won */ public static LotteryTicketCheckResult checkTicketForPrize(LotteryTicketRepository repository, LotteryTicketId id, LotteryNumbers winningNumbers) { Optional<LotteryTicket> optional = repository.findById(id); if (optional.isPresent()) { if (optional.get().getNumbers().equals(winningNumbers)) { return new LotteryTicketCheckResult(LotteryTicketCheckResult.CheckResult.WIN_PRIZE, 1000); } else { return new LotteryTicketCheckResult(LotteryTicketCheckResult.CheckResult.NO_PRIZE); } } else { return new LotteryTicketCheckResult(LotteryTicketCheckResult.CheckResult.TICKET_NOT_SUBMITTED); } } }
{'content_hash': '2500204dabf9916676b16aa12c2456e3', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 116, 'avg_line_length': 30.59375, 'alnum_prop': 0.7048008171603677, 'repo_name': 'fluxw42/java-design-patterns', 'id': '2f3c3be222a03cbb7a669a0fee063fa722a79de6', 'size': '2123', 'binary': False, 'copies': '11', 'ref': 'refs/heads/master', 'path': 'hexagonal/src/main/java/com/iluwatar/hexagonal/domain/LotteryUtils.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '827'}, {'name': 'Gherkin', 'bytes': '1078'}, {'name': 'HTML', 'bytes': '7241'}, {'name': 'Java', 'bytes': '1605343'}, {'name': 'JavaScript', 'bytes': '1186'}, {'name': 'Shell', 'bytes': '1713'}]}
GitHub
<?php /** * This class defines attributes, valid values, and usage which is generated * from a given json schema. * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5 * */ class Google_Model implements ArrayAccess { /** * If you need to specify a NULL JSON value, use Google_Model::NULL_VALUE * instead - it will be replaced when converting to JSON with a real null. */ const NULL_VALUE = "{}gapi-php-null"; protected $internal_gapi_mappings = array(); protected $modelData = array(); protected $processed = array(); /** * Polymorphic - accepts a variable number of arguments dependent * on the type of the model subclass. */ final public function __construct() { if (func_num_args() == 1 && is_array(func_get_arg(0))) { // Initialize the model with the array's contents. $array = func_get_arg(0); $this->mapTypes($array); } $this->gapiInit(); } /** * Getter that handles passthrough access to the data array, and lazy object creation. * @param string $key Property name. * @return mixed The value if any, or null. */ public function __get($key) { $keyType = $this->keyType($key); $keyDataType = $this->dataType($key); if ($keyType && !isset($this->processed[$key])) { if (isset($this->modelData[$key])) { $val = $this->modelData[$key]; } elseif ($keyDataType == 'array' || $keyDataType == 'map') { $val = array(); } else { $val = null; } if ($this->isAssociativeArray($val)) { if ($keyDataType && 'map' == $keyDataType) { foreach ($val as $arrayKey => $arrayItem) { $this->modelData[$key][$arrayKey] = new $keyType($arrayItem); } } else { $this->modelData[$key] = new $keyType($val); } } else if (is_array($val)) { $arrayObject = array(); foreach ($val as $arrayIndex => $arrayItem) { $arrayObject[$arrayIndex] = new $keyType($arrayItem); } $this->modelData[$key] = $arrayObject; } $this->processed[$key] = true; } return isset($this->modelData[$key]) ? $this->modelData[$key] : null; } /** * Initialize this object's properties from an array. * * @param array $array Used to seed this object's properties. * @return void */ protected function mapTypes($array) { // Hard initialise simple types, lazy load more complex ones. foreach ($array as $key => $val) { if ($keyType = $this->keyType($key)) { $dataType = $this->dataType($key); if ($dataType == 'array' || $dataType == 'map') { $this->$key = array(); foreach ($val as $itemKey => $itemVal) { if ($itemVal instanceof $keyType) { $this->{$key}[$itemKey] = $itemVal; } else { $this->{$key}[$itemKey] = new $keyType($itemVal); } } } elseif ($val instanceof $keyType) { $this->$key = $val; } else { $this->$key = new $keyType($val); } unset($array[$key]); } elseif (property_exists($this, $key)) { $this->$key = $val; unset($array[$key]); } elseif (property_exists($this, $camelKey = $this->camelCase($key))) { // This checks if property exists as camelCase, leaving it in array as snake_case // in case of backwards compatibility issues. $this->$camelKey = $val; } } $this->modelData = $array; } /** * Blank initialiser to be used in subclasses to do post-construction initialisation - this * avoids the need for subclasses to have to implement the variadics handling in their * constructors. */ protected function gapiInit() { return; } /** * Create a simplified object suitable for straightforward * conversion to JSON. This is relatively expensive * due to the usage of reflection, but shouldn't be called * a whole lot, and is the most straightforward way to filter. */ public function toSimpleObject() { $object = new stdClass(); // Process all other data. foreach ($this->modelData as $key => $val) { $result = $this->getSimpleValue($val); if ($result !== null) { $object->$key = $this->nullPlaceholderCheck($result); } } // Process all public properties. $reflect = new ReflectionObject($this); $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); foreach ($props as $member) { $name = $member->getName(); $result = $this->getSimpleValue($this->$name); if ($result !== null) { $name = $this->getMappedName($name); $object->$name = $this->nullPlaceholderCheck($result); } } return $object; } /** * Handle different types of values, primarily * other objects and map and array data types. */ private function getSimpleValue($value) { if ($value instanceof Google_Model) { return $value->toSimpleObject(); } else if (is_array($value)) { $return = array(); foreach ($value as $key => $a_value) { $a_value = $this->getSimpleValue($a_value); if ($a_value !== null) { $key = $this->getMappedName($key); $return[$key] = $this->nullPlaceholderCheck($a_value); } } return $return; } return $value; } /** * Check whether the value is the null placeholder and return true null. */ private function nullPlaceholderCheck($value) { if ($value === self::NULL_VALUE) { return null; } return $value; } /** * If there is an internal name mapping, use that. */ private function getMappedName($key) { if (isset($this->internal_gapi_mappings, $this->internal_gapi_mappings[$key])) { $key = $this->internal_gapi_mappings[$key]; } return $key; } /** * Returns true only if the array is associative. * @param array $array * @return bool True if the array is associative. */ protected function isAssociativeArray($array) { if (!is_array($array)) { return false; } $keys = array_keys($array); foreach ($keys as $key) { if (is_string($key)) { return true; } } return false; } /** * Verify if $obj is an array. * @throws Google_Exception Thrown if $obj isn't an array. * @param array $obj Items that should be validated. * @param string $method Method expecting an array as an argument. */ public function assertIsArray($obj, $method) { if ($obj && !is_array($obj)) { throw new Google_Exception( "Incorrect parameter type passed to $method(). Expected an array." ); } } public function offsetExists($offset) { return isset($this->$offset) || isset($this->modelData[$offset]); } public function offsetGet($offset) { return isset($this->$offset) ? $this->$offset : $this->__get($offset); } public function offsetSet($offset, $value) { if (property_exists($this, $offset)) { $this->$offset = $value; } else { $this->modelData[$offset] = $value; $this->processed[$offset] = true; } } public function offsetUnset($offset) { unset($this->modelData[$offset]); } protected function keyType($key) { $keyType = $key . "Type"; // ensure keyType is a valid class if (property_exists($this, $keyType) && class_exists($this->$keyType)) { return $this->$keyType; } } protected function dataType($key) { $dataType = $key . "DataType"; if (property_exists($this, $dataType)) { return $this->$dataType; } } public function __isset($key) { return isset($this->modelData[$key]); } public function __unset($key) { unset($this->modelData[$key]); } /** * Convert a string to camelCase * @param string $value * @return string */ private function camelCase($value) { $value = ucwords(str_replace(array('-', '_'), ' ', $value)); $value = str_replace(' ', '', $value); $value[0] = strtolower($value[0]); return $value; } }
{'content_hash': '5c5b15102b02ab34a84fa910f6f790ee', 'timestamp': '', 'source': 'github', 'line_count': 303, 'max_line_length': 94, 'avg_line_length': 27.066006600660067, 'alnum_prop': 0.5776124862821607, 'repo_name': 'dilawar/ncbs-minion', 'id': '18262608b915f97652c100b1f60c8264c87ac1d4', 'size': '8795', 'binary': False, 'copies': '41', 'ref': 'refs/heads/master', 'path': 'vendor/google/apiclient/src/Google/Model.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '113'}, {'name': 'Batchfile', 'bytes': '1786'}, {'name': 'CSS', 'bytes': '455819'}, {'name': 'HTML', 'bytes': '326318'}, {'name': 'JavaScript', 'bytes': '3508573'}, {'name': 'Makefile', 'bytes': '4307'}, {'name': 'PHP', 'bytes': '244305'}, {'name': 'PowerShell', 'bytes': '3311'}, {'name': 'Python', 'bytes': '3406919'}, {'name': 'Shell', 'bytes': '798'}]}
GitHub
package org.movie.tools; /** * 常量类 * @author Administrator * */ public interface Constant { public static final int DEFAULTPAGENUM=1; public static final int DEFAULTPAGESIZE=10; public static final int ZERO=0; public static final int ONE=1; public static final int LOGGED_IN=1; //登陆 public static final int NOT_LOGGED_IN=0;//未登陆 public static final int PORTALTYPE_WWW=0; public static final int PORTALTYPE_WAP=1; public static final int PORTALTYPE_CLIENT=2; }
{'content_hash': 'a4330b769ecd62b2324f56f30d158127', 'timestamp': '', 'source': 'github', 'line_count': 17, 'max_line_length': 46, 'avg_line_length': 29.0, 'alnum_prop': 0.7241379310344828, 'repo_name': 'ppyang010/MovieNews', 'id': '13db9a1ac9a00c69c76df0e4cc3e68f383b87296', 'size': '509', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'movie-news-demo/movie-news-demo/src/main/java/org/movie/tools/Constant.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '251502'}, {'name': 'FreeMarker', 'bytes': '98444'}, {'name': 'Java', 'bytes': '243010'}, {'name': 'JavaScript', 'bytes': '221894'}]}
GitHub
TODO: write [great documentation](http://jacobian.org/writing/what-to-write/)
{'content_hash': '04e0be271a9113a0103c35e96f433306', 'timestamp': '', 'source': 'github', 'line_count': 2, 'max_line_length': 77, 'avg_line_length': 40.5, 'alnum_prop': 0.7407407407407407, 'repo_name': 'palesz/workflowy-agenda', 'id': '3faf5dfa91e609efee1be45d4d47e0e472340183', 'size': '117', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'doc/intro.md', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Clojure', 'bytes': '5568'}]}
GitHub
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:duration="500" android:fillAfter="true" android:fromYDelta="0%p" android:interpolator="@android:anim/linear_interpolator" android:toYDelta="100%p" /> </set>
{'content_hash': 'bc1b9a76a1ecee156b633695dcca51cc', 'timestamp': '', 'source': 'github', 'line_count': 10, 'max_line_length': 64, 'avg_line_length': 32.4, 'alnum_prop': 0.6450617283950617, 'repo_name': 'jjhesk/URVSugarOverlay', 'id': 'e4e4efc96b0af8ddfebc24a3784ad43c9d4ce395', 'size': '324', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'LayoutCollection/LayoutCollections/src/main/res/anim/bottom_down.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '114446'}]}
GitHub
using UnityEngine; using System.Collections; public class PlayFootsteps : MonoBehaviour { private float AudioTimer = 0.0f; public AudioClip[] footstep; // Use this for initialization void Start () { } // Update is called once per frame void Update () { // Create an Audio Timer, so that we aren't calling too many footsteps to the scene. if (AudioTimer > 0) { AudioTimer -= Time.deltaTime; } if (AudioTimer < 0) { AudioTimer = 0; } } void OnTriggerEnter (Collider col) { if (AudioTimer == 0) { int clip_num = Random.Range(0, footstep.Length); // Choose a random footstep sound. audio.clip = footstep[Random.Range(0, clip_num)]; // Load audio audio.Play(); // Play audio //Debug.Log("Footstep " + clip_num + " Played"); // Log for debug AudioSource.PlayClipAtPoint(footstep[clip_num], transform.position); AudioTimer = 0.1f; // Reset Audio timer } } }
{'content_hash': '3249243774e5b0334c1a540cb1d39ecb', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 86, 'avg_line_length': 24.289473684210527, 'alnum_prop': 0.6598049837486457, 'repo_name': 'ludimation/Winter', 'id': 'df9a67be0a182f94725dcc84acba2f5744e9e951', 'size': '925', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Winter/Assets/PlayFootsteps.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '47009'}, {'name': 'C#', 'bytes': '34482'}, {'name': 'JavaScript', 'bytes': '49681'}]}
GitHub
package org.flowcolab.account.service.client.clients; import org.flowcolab.account.service.client.dto.permission.PermissionResponse; import org.flowcolab.account.service.client.services.AccountPermissionWebService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestOperations; import java.util.Arrays; import java.util.List; @Service public class AccountPermissionClient implements AccountPermissionWebService { private static final String URL = "http://accountService/v1/account/{id}/permission"; private RestOperations restOperations; @Autowired public AccountPermissionClient(RestOperations restOperations) { this.restOperations = restOperations; } @Override public List<PermissionResponse> findByAccountId(long accountId) { ResponseEntity<PermissionResponse[]> response = restOperations.getForEntity(URL, PermissionResponse[].class, accountId); return Arrays.asList(response.getBody()); } }
{'content_hash': '1eaaeba8d77953d29e80e1432fb1297f', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 89, 'avg_line_length': 35.125, 'alnum_prop': 0.7882562277580071, 'repo_name': 'omacarena/novaburst.flowcolab', 'id': '379453cf45473607fcd5c0e0830dd351416c12c0', 'size': '1124', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/modules/account/account.service.client/src/main/org/flowcolab/account/service/client/clients/AccountPermissionClient.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '218866'}]}
GitHub
<?php namespace Lurker\StateChecker\Inotify; use Lurker\Resource\FileResource; use Lurker\Event\FilesystemEvent; /** * File state checker. * * @author Yaroslav Kiliba <om.dattaya@gmail.com> */ class FileStateChecker extends ResourceStateChecker { /** * Initializes checker. * * @param CheckerBag $bag * @param FileResource $resource * @param int $eventsMask */ public function __construct(CheckerBag $bag, FileResource $resource, $eventsMask = FilesystemEvent::ALL) { parent::__construct($bag, $resource, $eventsMask); } /** * {@inheritdoc} */ public function setEvent($mask, $name = '') { $this->event = $mask; } /** * {@inheritdoc} */ public function getChangeset() { $changeset = array(); $this->handleItself(); if ($this->fromInotifyMask($this->event)) { $changeset[] = array( 'resource' => $this->getResource(), 'event' => $this->fromInotifyMask($this->event) ); } $this->setEvent(false); return $changeset; } /** * Handles event related to itself. */ protected function handleItself() { if ($this->isMoved($this->event)) { if ($this->getResource()->exists() && ($id = $this->addWatch()) === $this->id) { return; } $this->unwatch($this->id); } if ($this->getResource()->exists()) { if ($this->isIgnored($this->event) || $this->isMoved($this->event) || !$this->id) { $this->setEvent($this->id ? IN_MODIFY : IN_CREATE); $this->watch(); } } elseif ($this->id) { $this->event = IN_DELETE; $this->getBag()->remove($this); $this->unwatch($this->id); $this->id = null; } } }
{'content_hash': '5619d800ef137d51f8de7550c6f3d6c7', 'timestamp': '', 'source': 'github', 'line_count': 80, 'max_line_length': 108, 'avg_line_length': 24.6125, 'alnum_prop': 0.4987303199593702, 'repo_name': 'shaynekasai/ft', 'id': '741045b014f7f7acd8ab27fc399be2ed5559406b', 'size': '1969', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'vendor/henrikbjorn/lurker/src/Lurker/StateChecker/Inotify/FileStateChecker.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'ApacheConf', 'bytes': '711'}, {'name': 'CSS', 'bytes': '665064'}, {'name': 'HTML', 'bytes': '6990'}, {'name': 'JavaScript', 'bytes': '580146'}, {'name': 'PHP', 'bytes': '23141'}]}
GitHub
package org.iff.infra.util; /** * common exceptions. * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public class Exceptions { public static void main(String[] args) { try { try { try { throw new Exception("null"); } catch (Exception e) { Exceptions.runtime("entity", e, "ENT-001"); } } catch (Exception e) { Exceptions.exception("dao", e, "DAO-001"); } } catch (Exception e) { Exceptions.runtime("service", e, "SVC-001"); } } public static interface FossThrow { String getErrorCode(); } @SuppressWarnings("serial") public static class FossException extends Exception implements FossThrow { /** * exception code. */ private String errorCode = "FOSS-000"; public FossException() { super(); } public FossException(String message, Throwable cause) { super(message, cause, true, false); } public FossException(String message, String errorCode) { super(message); setErrorCode(errorCode == null ? "FOSS-000" : errorCode); } public FossException(String message, Throwable cause, String errorCode) { super(message, cause, true, false); setErrorCode(errorCode == null ? "FOSS-000" : errorCode); } public FossException(String message) { super(message); } public String getMessage() { StringBuilder sb = new StringBuilder(); sb.append('[').append(getErrorCode()).append("] ").append(super.getMessage()); return sb.toString(); } public String getErrorCode() { return this.errorCode; } public void setErrorCode(String errorCode) { this.errorCode = errorCode; } public String toString() { String s = "FossThrow"; String message = getLocalizedMessage(); return (message != null) ? (s + ": " + message) : s; } } @SuppressWarnings("serial") public static class FossRuntimeException extends RuntimeException implements FossThrow { /** * exception code. */ private String errorCode = "FOSS-001"; public FossRuntimeException() { super(); } public FossRuntimeException(String message, Throwable cause) { super(message, cause, true, false); } public FossRuntimeException(String message, String errorCode) { super(message); setErrorCode(errorCode == null ? "FOSS-001" : errorCode); } public FossRuntimeException(String message, Throwable cause, String errorCode) { super(message, cause, true, false); setErrorCode(errorCode == null ? "FOSS-001" : errorCode); } public FossRuntimeException(String message) { super(message); } public String getMessage() { StringBuilder sb = new StringBuilder(); sb.append('[').append(getErrorCode()).append("] ").append(super.getMessage()); return sb.toString(); } public String getErrorCode() { return this.errorCode; } public void setErrorCode(String errorCode) { this.errorCode = errorCode; } public String toString() { String s = "FossThrow"; String message = getLocalizedMessage(); return (message != null) ? (s + ": " + message) : s; } } /** * throw Exception with Throwable error * @param message you can use com.foreveross.infra.util.FormatableCharSequence.get * @param e * @param errorCode * @throws Exception * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public static void exception(CharSequence message, Throwable e, String errorCode) throws Exception { String newMessage = message == null ? null : message.toString(); throw new FossException(newMessage, e, errorCode); } /** * throw Exception with Throwable error * @param message you can use com.foreveross.infra.util.FormatableCharSequence.get * @param errorCode * @throws Exception * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public static void exception(CharSequence message, String errorCode) throws Exception { String newMessage = message == null ? null : message.toString(); throw new FossException(newMessage, errorCode); } /** * throw Exception with Throwable error * @param message you can use com.foreveross.infra.util.FormatableCharSequence.get * @param e * @throws Exception * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public static void exception(CharSequence message, Throwable e) throws Exception { String newMessage = message == null ? null : message.toString(); throw new FossException(newMessage, e); } /** * throw Exception without Throwable error * @param message you can use com.foreveross.infra.util.FormatableCharSequence.get * @throws Exception * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public static void exception(CharSequence message) throws Exception { String newMessage = message == null ? null : message.toString(); throw new FossException(newMessage); } /** * throw RuntimeException with Throwable error * @param message you can use com.foreveross.infra.util.FormatableCharSequence.get * @param e * @param errorCode * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public static void runtime(CharSequence message, Throwable e, String errorCode) { String newMessage = message == null ? null : message.toString(); throw new FossRuntimeException(newMessage, e, errorCode); } /** * throw RuntimeException with Throwable error * @param message you can use com.foreveross.infra.util.FormatableCharSequence.get * @param errorCode * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public static void runtime(CharSequence message, String errorCode) { String newMessage = message == null ? null : message.toString(); throw new FossRuntimeException(newMessage, errorCode); } /** * throw RuntimeException with Throwable error * @param message you can use com.foreveross.infra.util.FormatableCharSequence.get * @param e * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public static void runtime(CharSequence message, Throwable e) { String newMessage = message == null ? null : message.toString(); throw new FossRuntimeException(newMessage, e); } /** * throw RuntimeException without Throwable error * @param message you can use com.foreveross.infra.util.FormatableCharSequence.get * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @since 2014-3-14 */ public static void runtime(CharSequence message) { String newMessage = message == null ? null : message.toString(); throw new FossRuntimeException(newMessage); } }
{'content_hash': '5f784e9a6f9c7fe080aa3f3c80952fd7', 'timestamp': '', 'source': 'github', 'line_count': 231, 'max_line_length': 101, 'avg_line_length': 28.774891774891774, 'alnum_prop': 0.6964043929592297, 'repo_name': 'tylerchen/tc-util-project', 'id': '30223c7eb4e02512651417da1f9153fa9a7f117f', 'size': '7028', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/org/iff/infra/util/Exceptions.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '214'}, {'name': 'CSS', 'bytes': '113461'}, {'name': 'FreeMarker', 'bytes': '788450'}, {'name': 'Groovy', 'bytes': '481526'}, {'name': 'HTML', 'bytes': '70260'}, {'name': 'Java', 'bytes': '1713344'}, {'name': 'JavaScript', 'bytes': '337310'}]}
GitHub
package org.opendatakit.database.data; import android.os.Parcel; import android.os.Parcelable; import org.opendatakit.aggregate.odktables.rest.ElementDataType; import org.opendatakit.aggregate.odktables.rest.ElementType; import org.opendatakit.database.queries.BindArgs; import org.opendatakit.database.queries.ResumableQuery; import org.opendatakit.database.queries.SimpleQuery; import org.opendatakit.database.utilities.MarshallUtil; import org.opendatakit.provider.DataTableColumns; import org.opendatakit.utilities.ODKFileUtils; import java.io.File; import java.util.List; import java.util.Map; /** * This class represents a table. This can be conceptualized as a list of rows. * Each row comprises the user-defined columns, or data, as well as the * ODKTables-specified metadata. * <p> * This should be considered an immutable class. * * @author unknown * @author sudar.sam@gmail.com */ public class UserTable implements Parcelable, WrapperTable { public static final Parcelable.Creator<UserTable> CREATOR = new Parcelable.Creator<UserTable>() { public UserTable createFromParcel(Parcel in) { return new UserTable(in); } public UserTable[] newArray(int size) { return new UserTable[size]; } }; /** * Used for logging */ @SuppressWarnings("unused") static final String TAG = UserTable.class.getSimpleName(); private static final String[] primaryKey = { "rowId", "savepoint_timestamp" }; private final BaseTable mBaseTable; private final OrderedColumns mColumnDefns; private final String[] mAdminColumnOrder; public UserTable(UserTable table, List<Integer> indexes) { this.mBaseTable = new BaseTable(table.mBaseTable, indexes); //noinspection ThisEscapedInObjectConstruction this.mBaseTable.registerWrapperTable(this); this.mColumnDefns = table.mColumnDefns; this.mAdminColumnOrder = table.mAdminColumnOrder; } public UserTable(BaseTable baseTable, OrderedColumns columnDefns, String[] adminColumnOrder) { this.mBaseTable = baseTable; //noinspection ThisEscapedInObjectConstruction baseTable.registerWrapperTable(this); this.mColumnDefns = columnDefns; this.mAdminColumnOrder = adminColumnOrder; } public UserTable(OrderedColumns columnDefns, String sqlWhereClause, Object[] sqlBindArgs, String[] sqlGroupByArgs, String sqlHavingClause, String[] sqlOrderByElementKeys, String[] sqlOrderByDirections, String[] adminColumnOrder, Map<String, Integer> elementKeyToIndex, String[] elementKeyForIndex, Integer rowCount) { ResumableQuery query = new SimpleQuery(columnDefns.getTableId(), new BindArgs(sqlBindArgs), sqlWhereClause, sqlGroupByArgs, sqlHavingClause, sqlOrderByElementKeys, sqlOrderByDirections, null); this.mBaseTable = new BaseTable(query, elementKeyForIndex, elementKeyToIndex, primaryKey, rowCount); //noinspection ThisEscapedInObjectConstruction this.mBaseTable.registerWrapperTable(this); this.mColumnDefns = columnDefns; this.mAdminColumnOrder = adminColumnOrder; } public UserTable(Parcel in) { this.mColumnDefns = new OrderedColumns(in); this.mAdminColumnOrder = MarshallUtil.unmarshallStringArray(in); this.mBaseTable = new BaseTable(in); this.mBaseTable.registerWrapperTable(this); } /*** * Methods that pass straight down to BaseTable ***/ public BaseTable getBaseTable() { return mBaseTable; } public void addRow(Row row) { mBaseTable.addRow(row); } @SuppressWarnings("unused") public Map<String, Integer> getElementKeyToIndex() { return mBaseTable.getElementKeyToIndex(); } @SuppressWarnings("unused") public boolean getEffectiveAccessCreateRow() { return mBaseTable.getEffectiveAccessCreateRow(); } public TypedRow getRowAtIndex(int index) { return new TypedRow(mBaseTable.getRowAtIndex(index), mColumnDefns); } public String getElementKey(int colNum) { return mBaseTable.getElementKey(colNum); } public Integer getColumnIndexOfElementKey(String elementKey) { return mBaseTable.getColumnIndexOfElementKey(elementKey); } /** * Completely unused * * @return the sql bindargs */ public BindArgs getSelectionArgs() { return mBaseTable.getSqlBindArgs(); } public int getWidth() { return mBaseTable.getWidth(); } public int getNumberOfRows() { return mBaseTable.getNumberOfRows(); } public ResumableQuery getQuery() { return mBaseTable.getQuery(); } /** * These two methods used in UserTable, BaseTable * @param limit how many rows to get * @return another resumeable query */ @SuppressWarnings("unused") public ResumableQuery resumeQueryForward(int limit) { return mBaseTable.resumeQueryForward(limit); } @SuppressWarnings("unused") public ResumableQuery resumeQueryBackward(int limit) { return mBaseTable.resumeQueryBackward(limit); } /*** Unique methods to UserTable ***/ public String getAppName() { return mColumnDefns.getAppName(); } public String getTableId() { return mColumnDefns.getTableId(); } public OrderedColumns getColumnDefinitions() { return mColumnDefns; } public String getRowId(int rowIndex) { return mBaseTable.getRowAtIndex(rowIndex).getRawStringByKey(DataTableColumns.ID); } public String getDisplayTextOfData(int rowIndex, ElementType type, String elementKey) { // TODO: share processing with CollectUtil.writeRowDataToBeEdited(...) Row row = mBaseTable.getRowAtIndex(rowIndex); String raw = row.getRawStringByKey(elementKey); String rowId = row.getRawStringByKey(DataTableColumns.ID); if (raw == null) { return null; } else if (raw.isEmpty()) { throw new IllegalArgumentException( "unexpected zero-length string in database! " + elementKey); } if (type == null) { return raw; } else if (type.getDataType() == ElementDataType.number && raw.indexOf('.') != -1) { // trim trailing zeros on numbers (leaving the last one) int lnz = raw.length() - 1; while (lnz > 0 && raw.charAt(lnz) == '0') { lnz--; } if (lnz >= raw.length() - 2) { // ended in non-zero or x0 return raw; } else { // ended in 0...0 return raw.substring(0, lnz + 2); } } else if (type.getDataType() == ElementDataType.rowpath) { File theFile = ODKFileUtils.getRowpathFile(getAppName(), getTableId(), rowId, raw); return theFile.getName(); } else if (type.getDataType() == ElementDataType.configpath) { return raw; } else { return raw; } } public boolean hasCheckpointRows() { List<Row> rows = mBaseTable.getRows(); for (Row row : rows) { String type = row.getRawStringByKey(DataTableColumns.SAVEPOINT_TYPE); if (type == null || type.isEmpty()) { return true; } } return false; } public boolean hasConflictRows() { List<Row> rows = mBaseTable.getRows(); for (Row row : rows) { String conflictType = row.getRawStringByKey(DataTableColumns.CONFLICT_TYPE); if (conflictType != null && !conflictType.isEmpty()) { return true; } } return false; } /** * Scan the rowIds to get the row number. As the rowIds are not sorted, this * is a potentially expensive operation, scanning the entire array, as well as * the cost of checking String equality. Should be used only when necessary. * <p> * Return -1 if the row Id is not found. * * @param rowId the row id to get the row number from * @return the index of the row into the table */ public int getRowNumFromId(String rowId) { for (int i = 0; i < mBaseTable.getNumberOfRows(); i++) { if (getRowId(i).equals(rowId)) { return i; } } return -1; } public WrapperTable getWrapperTable() { return this; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel out, int flags) { this.mColumnDefns.writeToParcel(out, flags); MarshallUtil.marshallStringArray(out, mAdminColumnOrder); this.mBaseTable.writeToParcel(out, flags); } }
{'content_hash': '4d905541e8eb29e18eabfcb728d55ad7', 'timestamp': '', 'source': 'github', 'line_count': 274, 'max_line_length': 99, 'avg_line_length': 29.98905109489051, 'alnum_prop': 0.7036631373980772, 'repo_name': 'opendatakit/androidlibrary', 'id': '9a14baa0f3e31321f59634be4a065a858d499332', 'size': '8824', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'androidlibrary_lib/src/main/java/org/opendatakit/database/data/UserTable.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '1050230'}]}
GitHub
using System.Collections.Generic; using System.Linq; using Orleans.Versions.Compatibility; using Orleans.Versions.Selector; namespace Orleans.Runtime.Versions.Selector { internal sealed class MinimumVersionSelector : IVersionSelector { public IReadOnlyList<ushort> GetSuitableVersion(ushort requestedVersion, IReadOnlyList<ushort> availableVersions, ICompatibilityDirector compatibilityDirector) { return new[] { availableVersions.Where(v => compatibilityDirector.IsCompatible(requestedVersion, v)).Min() }; } } }
{'content_hash': 'bbda6f11dc06dc56491b21a50ce4a32c', 'timestamp': '', 'source': 'github', 'line_count': 18, 'max_line_length': 167, 'avg_line_length': 33.44444444444444, 'alnum_prop': 0.7142857142857143, 'repo_name': 'ashkan-saeedi-mazdeh/orleans', 'id': 'c08f22766aa076603bc2a0c192ecd6fee1d84d93', 'size': '602', 'binary': False, 'copies': '9', 'ref': 'refs/heads/master', 'path': 'src/Orleans.Runtime/Versions/Selector/MinimumVersionSelector.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '9152'}, {'name': 'C#', 'bytes': '9045227'}, {'name': 'F#', 'bytes': '2313'}, {'name': 'Groovy', 'bytes': '2813'}, {'name': 'HTML', 'bytes': '152948'}, {'name': 'PLSQL', 'bytes': '23829'}, {'name': 'PLpgSQL', 'bytes': '43753'}, {'name': 'PowerShell', 'bytes': '105892'}, {'name': 'Shell', 'bytes': '3723'}, {'name': 'Smalltalk', 'bytes': '1436'}]}
GitHub
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true"> <shape> <solid android:color="#43d95d"/> <corners android:radius="99dp"/> </shape> </item> <item> <shape> <solid android:color="#FFFFFF"/> <corners android:radius="99dp"/> <stroke android:width="1.5dp" android:color="#E6E6E6"/> </shape> </item> </selector>
{'content_hash': '9d39c77fc180ebe411b9308f8fc5e766', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 69, 'avg_line_length': 23.0, 'alnum_prop': 0.6384439359267735, 'repo_name': 'JerryMissTom/sealtalk-android', 'id': '96bdc8ca727f9bb2afc13d382cfb5d94a45ed35d', 'size': '437', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'seal/src/main/res/drawable/ios_back_drawable.xml', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '1682187'}]}
GitHub
package com.baidu.bjf.remoting.protobuf.simplerepeat; import java.io.IOException; import java.util.HashSet; import org.junit.Assert; import org.junit.Test; import com.baidu.bjf.remoting.protobuf.Codec; import com.baidu.bjf.remoting.protobuf.ProtobufProxy; import com.baidu.bjf.remoting.protobuf.complex.PersonPOJO; /** * The Class StringSetTest. * * @author xiemalin * @since 3.4.0 */ public class StringSetTest { /** * Test string set POJO. */ @Test public void testStringSetPOJO() { Codec<StringSetDojoClass> codec = ProtobufProxy.create(StringSetDojoClass.class, false); StringSetDojoClass stringSet = new StringSetDojoClass(); stringSet.stringSet = new HashSet<String>(); stringSet.stringSet.add("hello"); stringSet.stringSet.add("world"); stringSet.stringSet.add("xiemalin"); try { byte[] bs = codec.encode(stringSet); StringSetDojoClass stringSetDojoClass = codec.decode(bs); Assert.assertEquals(3, stringSetDojoClass.stringSet.size()); } catch (IOException e) { Assert.fail(e.getMessage()); } } /** * Test string set POJO 2. */ @Test public void testStringSetPOJO2() { Codec<StringSetDojoClass> codec = ProtobufProxy.create(StringSetDojoClass.class, false); StringSetDojoClass stringSet = new StringSetDojoClass(); stringSet.personSet = new HashSet<PersonPOJO>(); stringSet.stringSet = new HashSet<String>(); PersonPOJO pojo = new PersonPOJO(); pojo.name = "hello"; pojo.id = 100; stringSet.personSet.add(pojo); stringSet.stringSet.add("hello"); stringSet.stringSet.add("world"); stringSet.stringSet.add("xiemalin"); try { byte[] bs = codec.encode(stringSet); StringSetDojoClass stringSetDojoClass = codec.decode(bs); Assert.assertEquals(3, stringSetDojoClass.stringSet.size()); Assert.assertEquals(1, stringSetDojoClass.personSet.size()); Assert.assertEquals("hello", stringSetDojoClass.personSet.iterator().next().name); } catch (IOException e) { Assert.fail(e.getMessage()); } } }
{'content_hash': '08dd5c7d584bc21f5feeac245c6f7da3', 'timestamp': '', 'source': 'github', 'line_count': 80, 'max_line_length': 96, 'avg_line_length': 30.65, 'alnum_prop': 0.5966557911908646, 'repo_name': 'jhunters/jprotobuf', 'id': '3fb581102cea6035edee28cbb820b264e8a13746', 'size': '3324', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/test/java/com/baidu/bjf/remoting/protobuf/simplerepeat/StringSetTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '2074579'}, {'name': 'Smarty', 'bytes': '3474'}]}
GitHub
// Combine all import actions here // Then import all actions from other modules as needed // /* * Some recommendations to use modules * Modules * ------- * import types from '../constants' * Router module * import { routeActions } from 'react-router-redux' */ /* * Synchronous actions * ------------------- * * const requestLogin = provider => { * return { * type: LOGIN_REQUEST, * isFetching: true, * isAuthenticated: false, * provider: provider * } *} * const receiveLogin = user => { * return { * type: LOGIN_SUCCESS, * isFetching: false, * isAuthenticated: true, * user: user * } *} */ /* *Reusable functions to deal with promises and responses *------------------------------------------------------ * It uses https://www.npmjs.com/package/isomorphic-fetch * *const status = response => { * // HTTP response codes 2xx indicate that the request was processed successfully * if (response.status >= 200 && response.status < 300) { * return Promise.resolve(response) * } * return Promise.reject(new Error(response.statusText)) *} * *const json = response => { * return response.json() *} */ /* *Async actions *------------- * *export const login = (cred,url) => { * return dispatch => { * let config = { * method: 'POST', * headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, * body: cred * } * dispatch(requestLogin(provider)) * dispatch(routeActions.push('/spinner')) * fetch(url, config) * .then(status) * .then(json) * .then(data => { * dispatch(receiveLogin()) * dispatch(routeActions.push('/home')) * }).catch(error => { * dispatch(loginError(error)) * dispatch(routeActions.push('/error')) * }) * } *} * *export const logoutUser = () => { * return dispatch => { * simpleStorage.deleteKey('token') * dispatch(receiveLogout()) * dispatch(routeActions.push('/')) * } *} */
{'content_hash': '92d8e74f5a7d8ca375caf79df48e4740', 'timestamp': '', 'source': 'github', 'line_count': 86, 'max_line_length': 83, 'avg_line_length': 25.627906976744185, 'alnum_prop': 0.5181488203266787, 'repo_name': 'dictyBase/dicty-redux', 'id': '03e4aef7121479a5053f6f2699e3cb2c86c82d11', 'size': '2204', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/actions/index.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '651'}, {'name': 'HTML', 'bytes': '232'}, {'name': 'JavaScript', 'bytes': '36025'}]}
GitHub
Indexing your music =================== The indexer receives the following command line arguments. * ``--lastfm`` * ``--hash`` * ``--nometadata`` * ``--reindex`` * ``--write-every=<num>`` If you set the ``--lastfm`` flag Shiva will retrieve artist and album images from Last.FM, but for this to work you need to get an API key (see `Prerequisites`_) and include it in your ``local.py`` config file. When ``--hash`` is present, Shiva will hash every file using the md5 algorithm, in order to find duplicates, which will be ignored. Note that this will decrease indexing speed notably. The ``--nometadata`` option saves dummy tracks with only path information, ignoring the file's metadata. This means that albums and artists will not be saved, but indexing will be as fast as it gets. If both the ``--nometadata`` and ``--lastfm`` flags are set, ``--nometadata`` will take precedence and ``--lastfm`` will be ignored. With ``--reindex`` the whole database will be dropped and recreated. Be careful, all existing information **will be deleted**. If you just want to update your music collection, run the indexer again **without** the ``--reindex`` option. The indexer is optimized for performance; hard drive hits, like file reading or DB queries, are done as few as possible. As a consequence, memory usage is quite heavy. Keep that in mind when indexing large collections. To keep memory usage down, you can use the ``--write-every`` parameter. It receives a number and will write down to disk and clear cache after that many tracks indexed. If you pass 1, it will completely ignore cache and just write every track to disk. This has the lowest possible memory usage, but as a downside, indexing will be much slower. It's up to you to find a good balance between the size of your music collection and the available RAM that you have. Restricting extensions ---------------------- If you want to limit the extensions of the files to index, just add the following config to your ``local.py`` file: .. code:: python ALLOWED_FILE_EXTENSIONS = ('mp3', 'ogg') That way only 'mp3' and 'ogg' files will be indexed. Scanning directories -------------------- To tell Shiva which directories to scan for music, you will have to configure your ``shiva/config/local.py`` file. There you will find a ``MEDIA_DIRS`` option where you need to supply ``MediaDir`` objects. This object allows for media configuration. By instantiating a ``MediaDir`` class you can tell Shiva where to look for the media files and how to serve those files. It's possible to configure the system to look for files on a directory and serve those files through a different server. .. code:: python MediaDir(root='/srv/http', dirs=('/music', '/songs'), url='http://localhost:8080/') Given that configuration Shiva will scan the directories ``/srv/http/music`` and ``/srv/http/songs`` for media files, but they will be served through ``http://localhost:8080/music/`` and ``http://localhost:8080/songs/``. If just a dir is provided you will also need to run the file server, as mentioned in the installation guide. This is a simple file server, for testing purposes only. Do **NOT** use in a live environment. .. code:: python MediaDir('/home/fatmike/music') For more information, check the source of `shiva/media.py`.
{'content_hash': 'fa81c2424629991eb49725747ce9d7c1', 'timestamp': '', 'source': 'github', 'line_count': 88, 'max_line_length': 79, 'avg_line_length': 37.81818181818182, 'alnum_prop': 0.7250600961538461, 'repo_name': 'maurodelazeri/shiva-server', 'id': '00caa23d318931af98fc1d9008f16117cfd6c3bd', 'size': '3328', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'docs/indexing.rst', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Makefile', 'bytes': '6758'}, {'name': 'Python', 'bytes': '183318'}, {'name': 'Shell', 'bytes': '47'}]}
GitHub
from __future__ import unicode_literals class MockRegion(object): def __init__(self, a, b): self.a = int(a) self.b = int(b) def begin(self): return self.a def empty(self): return self.a == self.b class MockRegionSet(object): def __init__(self): self.regions = [] def add(self, region): self.regions.append(region) def clear(self): self.regions = [] def __getitem__(self, key): return self.regions[key] class MockView(object): def __init__(self, buffer): self.buffer = buffer self.regions = MockRegionSet() def size(self): return len(self.buffer) def substr(self, region): return self.buffer[region.a:region.b] def replace(self, edit, region, string): self.buffer = string self.regions.clear() self.regions.add(MockRegion(len(self.buffer), len(self.buffer))) def sel(self): return self.regions class MockSublimePackage(object): Region = MockRegion
{'content_hash': '1792f0290d0922cee7bc7a19eb00255a', 'timestamp': '', 'source': 'github', 'line_count': 55, 'max_line_length': 68, 'avg_line_length': 17.418181818181818, 'alnum_prop': 0.6450939457202505, 'repo_name': 'waynemoore/sublime-gherkin-formatter', 'id': 'ffe1105e3d3fa4bf585899009f33653ccceb489c', 'size': '958', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/mocks.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '15276'}, {'name': 'Ruby', 'bytes': '1188'}]}
GitHub
function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [parameter(Mandatory = $true)] [System.String] $WebAppUrl, [parameter(Mandatory = $true)] [ValidateSet("Default","Intranet","Extranet","Custom","Internet")] [System.String] $Zone, [parameter(Mandatory = $false)] [System.String] $Url, [parameter(Mandatory = $false)] [ValidateSet("Present","Absent")] [System.String] $Ensure = "Present", [parameter(Mandatory = $false)] [System.Management.Automation.PSCredential] $InstallAccount ) Write-Verbose -Message "Getting Alternate URL for $Zone in $WebAppUrl" $result = Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments $PSBoundParameters ` -ScriptBlock { $params = $args[0] $aam = Get-SPAlternateURL -WebApplication $params.WebAppUrl ` -Zone $params.Zone ` -ErrorAction SilentlyContinue | Select-Object -First 1 $url = $null $Ensure = "Absent" if (($null -eq $aam) -and ($params.Zone -eq "Default")) { # The default zone URL will change the URL of the web app, so assuming it has been applied # correctly then the first call there will fail as the WebAppUrl parameter will no longer # be the URL of the web app. So the assumption is that if a matching default entry with # the new public URL is found then it can be returned and will pass a test. $aam = Get-SPAlternateURL -Zone $params.Zone | Where-Object -FilterScript { $_.PublicUrl -eq $params.Url } | Select-Object -First 1 } if ($null -ne $aam) { $url = $aam.PublicUrl $Ensure = "Present" } return @{ WebAppUrl = $params.WebAppUrl Zone = $params.Zone Url = $url Ensure = $Ensure InstallAccount = $params.InstallAccount } } return $result } function Set-TargetResource { [CmdletBinding()] param ( [parameter(Mandatory = $true)] [System.String] $WebAppUrl, [parameter(Mandatory = $true)] [ValidateSet("Default","Intranet","Extranet","Custom","Internet")] [System.String] $Zone, [parameter(Mandatory = $false)] [System.String] $Url, [parameter(Mandatory = $false)] [ValidateSet("Present","Absent")] [System.String] $Ensure = "Present", [parameter(Mandatory = $false)] [System.Management.Automation.PSCredential] $InstallAccount ) Write-Verbose -Message "Setting Alternate URL for $Zone in $WebAppUrl" $CurrentValues = Get-TargetResource @PSBoundParameters if ($Ensure -eq "Present") { if ([string]::IsNullOrEmpty($Url)) { throw "URL must be specified when ensure is set to present" } Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments ($PSBoundParameters, $CurrentValues) ` -ScriptBlock { $params = $args[0] $CurrentValues = $args[1] if ([string]::IsNullOrEmpty($CurrentValues.Url)) { New-SPAlternateURL -WebApplication $params.WebAppUrl ` -Url $params.Url ` -Zone $params.Zone } else { Get-SPAlternateURL -WebApplication $params.WebAppUrl ` -Zone $params.Zone | Set-SPAlternateURL -Url $params.Url } } } else { Invoke-SPDSCCommand -Credential $InstallAccount ` -Arguments $PSBoundParameters ` -ScriptBlock { $params = $args[0] Get-SPAlternateURL -WebApplication $params.WebAppUrl ` -Zone $params.Zone | Remove-SPAlternateURL -Confirm:$false } } } function Test-TargetResource { [CmdletBinding()] [OutputType([System.Boolean])] param ( [parameter(Mandatory = $true)] [System.String] $WebAppUrl, [parameter(Mandatory = $true)] [ValidateSet("Default","Intranet","Extranet","Custom","Internet")] [System.String] $Zone, [parameter(Mandatory = $false)] [System.String] $Url, [parameter(Mandatory = $false)] [ValidateSet("Present","Absent")] [System.String] $Ensure = "Present", [parameter(Mandatory = $false)] [System.Management.Automation.PSCredential] $InstallAccount ) Write-Verbose -Message "Testing Alternate URL for $Zone in $WebAppUrl" $PSBoundParameters.Ensure = $Ensure if ([string]::IsNullOrEmpty($Url) -and $Ensure -eq "Present") { throw "URL must be specified when ensure is set to present" } if ($Ensure -eq "Present") { return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` -DesiredValues $PSBoundParameters ` -ValuesToCheck @("Url", "Ensure") } else { return Test-SPDscParameterState -CurrentValues (Get-TargetResource @PSBoundParameters) ` -DesiredValues $PSBoundParameters ` -ValuesToCheck @("Ensure") } }
{'content_hash': 'a3f3d44527c7bc2fc77bd32a45522c97', 'timestamp': '', 'source': 'github', 'line_count': 192, 'max_line_length': 102, 'avg_line_length': 30.697916666666668, 'alnum_prop': 0.5259586019681032, 'repo_name': 'ferventcoder/puppetlabs-dsc', 'id': 'fb69fa0b0eb77b5da3e68c52624de6bed435e4ba', 'size': '5894', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'lib/puppet_x/dsc_resources/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '11740'}, {'name': 'HTML', 'bytes': '18507'}, {'name': 'NSIS', 'bytes': '1454'}, {'name': 'PowerShell', 'bytes': '4615819'}, {'name': 'Puppet', 'bytes': '431'}, {'name': 'Ruby', 'bytes': '2787644'}, {'name': 'Shell', 'bytes': '3568'}]}
GitHub