text:
/* @file   perf_test.c
   @author Dmitry S. Melnikov, dmitryme@gmail.com
   @date   Created on: 08/27/2012 05:35:55 PM
*/

#include "fix_parser.h"
#include "fix_msg.h"
#include "fix_error.h"

#include <stdlib.h>
#include <stdio.h>
#ifdef WIN32
#  include <windows.h>
#else
#  include <time.h>
#endif
#include <string.h>
#include <assert.h>

#ifdef WIN32
#  define TIMESTAMP LARGE_INTEGER
#  define TIMESTAMP_INIT \
   LARGE_INTEGER freq_1977_04_23; \
   QueryPerformanceFrequency(&freq_1977_04_23);
#  define GET_TIMESTAMP(ts) QueryPerformanceCounter(&ts);
#  define GET_TIMESTAMP_DIFF_USEC(ts1, ts2) \
   (ts1.QuadPart - ts2.QuadPart) * 1000000 / freq_1977_04_23.QuadPart
#else
#  define TIMESTAMP struct timespec
#  define TIMESTAMP_INIT
#  define GET_TIMESTAMP(ts) \
   clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
#define GET_TIMESTAMP_DIFF_USEC(ts1, ts2) \
   (ts1.tv_sec - ts2.tv_sec) * 1000000 + (ts1.tv_nsec - ts2.tv_nsec) / 1000;
#endif

void create_msg(FIXParser* parser)
{
   TIMESTAMP_INIT;
   TIMESTAMP start, stop;

   GET_TIMESTAMP(start);

   int32_t const count = 100000;

   for(int32_t i = 0; i < count; ++i)
   {
      FIXError* error = NULL;
      FIXMsg* msg = fix_msg_create(parser, "8", &error);
      if (!msg)
      {
         printf("ERROR: %s\n", fix_error_get_text(error));
         fix_error_free(error);
         return;
      }

      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_SenderCompID, "QWERTY_12345678", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_TargetCompID, "ABCQWE_XYZ", &error));
      assert(FIX_SUCCESS == fix_msg_set_int32(msg, NULL, FIXFieldTag_MsgSeqNum, 34, &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_TargetSubID, "srv-ivanov_ii1", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_SendingTime, "20120716-06:00:16.230", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_OrderID, "1", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_ClOrdID, "CL_ORD_ID_1234567", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_ExecID, "FE_1_9494_1", &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_ExecType, '0', &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_OrdStatus, '1', &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_Account, "ZUM", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_Symbol, "RTS-12.12", &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_Side, '1', &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_OrderQty, 25, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_Price, 135155.0, &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_TimeInForce, '0', &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_LastQty, 0, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_LastPx, 0.0, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_LeavesQty, 25.0, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_CumQty, 0, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_AvgPx, 0.0, &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_HandlInst, '1', &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_Text, "COMMENT12", &error));

      fix_msg_free(msg);
   }

   GET_TIMESTAMP(stop);
   int32_t const total = GET_TIMESTAMP_DIFF_USEC(stop, start);
   printf("%12s%12d%12d%10.2f\n", "create_msg", count, total, (float)total/count);
}

void msg_to_str(FIXParser* parser)
{
   TIMESTAMP_INIT;
   TIMESTAMP start, stop;

   GET_TIMESTAMP(start);

   int32_t const count = 100000;

   for(int32_t i = 0; i < count; ++i)
   {
      FIXError* error = NULL;
      FIXMsg* msg = fix_msg_create(parser, "8", &error);
      if (!msg)
      {
         printf("ERROR: %s\n", fix_error_get_text(error));
         fix_error_free(error);
         return;
      }

      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_SenderCompID, "QWERTY_12345678", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_TargetCompID, "ABCQWE_XYZ", &error));
      assert(FIX_SUCCESS == fix_msg_set_int32(msg, NULL, FIXFieldTag_MsgSeqNum, 34, &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_TargetSubID, "srv-ivanov_ii1", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_SendingTime, "20120716-06:00:16.230", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_OrderID, "1", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_ClOrdID, "CL_ORD_ID_1234567", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_ExecID, "FE_1_9494_1", &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_ExecType, '0', &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_OrdStatus, '1', &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_Account, "ZUM", &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_Symbol, "RTS-12.12", &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_Side, '1', &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_OrderQty, 25, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_Price, 135155.0, &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_TimeInForce, '0', &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_LastQty, 0, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_LastPx, 0.0, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_LeavesQty, 25.0, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_CumQty, 0, &error));
      assert(FIX_SUCCESS == fix_msg_set_double(msg, NULL, FIXFieldTag_AvgPx, 0.0, &error));
      assert(FIX_SUCCESS == fix_msg_set_char(msg, NULL, FIXFieldTag_HandlInst, '1', &error));
      assert(FIX_SUCCESS == fix_msg_set_string(msg, NULL, FIXFieldTag_Text, "COMMENT12", &error));

      char buff[1024];
      uint32_t reqBuffLen = 0;
      fix_msg_to_str(msg, '|', buff, sizeof(buff), &reqBuffLen, &error);

      fix_msg_free(msg);
   }

   GET_TIMESTAMP(stop);

   int32_t const total = GET_TIMESTAMP_DIFF_USEC(stop, start);
   printf("%12s%12d%12d%10.2f\n", "msg_to_str", count, total, (float)total/count);
}

void str_to_msg(FIXParser* parser)
{
   TIMESTAMP_INIT;
   TIMESTAMP start, stop;

   char buff[] = "8=FIX.4.4|9=228|35=8|49=QWERTY_12345678|56=ABCQWE_XYZ|34=34|57=srv-ivanov_ii1|52=20120716-06:00:16.230|37=1|11=CL_ORD_ID_1234567|17=FE_1_9494_1|150=0|39=1|1=ZUM|55=RTS-12.12|54=1|38=25|44=135155|59=0|32=0|31=0|151=25|14=0|6=0|21=1|58=COMMENT12|10=110|";
   size_t len = strlen(buff);

   GET_TIMESTAMP(start);

   FIXMsg* msg = NULL;

   int32_t const count = 100000;

   for(int32_t i = 0; i < count; ++i)
   {
      FIXError* error = NULL;
      char const* stop = NULL;
      msg = fix_parser_str_to_msg(parser, buff, len, '|', &stop, &error);
      assert(msg != NULL);
      fix_msg_free(msg);
   }

   GET_TIMESTAMP(stop);

   int32_t const total = GET_TIMESTAMP_DIFF_USEC(stop, start);
   printf("%12s%12d%12d%10.2f\n", "str_to_msg", count, total, (float)total/count);
}

int main(int argc, char *argv[])
{
   if (argc == 1)
   {
      printf("perf_test <prot_file.xml>\n");
      return 1;
   }

   FIXError* error = NULL;
   FIXParser* parser = fix_parser_create(argv[1], NULL, PARSER_FLAG_CHECK_ALL, &error);
   if (!parser)
   {
      printf("ERROR: %s\n", fix_error_get_text(error));
      free(error);
      return 1;
   }

   printf("%12s%12s%12s%12s", "test", "count", "total", "per msg\n");
   create_msg(parser);
   msg_to_str(parser);
   str_to_msg(parser);

   fix_parser_free(parser);

   return 0;
}


text:
"""Apptest runner specific to the particular gtest-based apptest framework in
/mojo/public/cpp/application/tests/, built on top of the general apptest
runner."""

import logging
import re

from devtoolslib.apptest import run_apptest

_logger = logging.getLogger()

def _gtest_apptest_output_test(output):
  # Fail on output with gtest's "[  FAILED  ]" or a lack of "[  PASSED  ]".
  # The latter condition ensures failure on broken command lines or output.
  # Check output instead of exit codes because mojo_shell always exits with 0.
  if (output is None or
      (output.find("[  FAILED  ]") != -1 or output.find("[  PASSED  ]") == -1)):
    return False
  return True

def run_gtest_apptest(shell, shell_args, apptest_url, apptest_args, isolate):
  """Runs a gtest apptest.

  Args:
    shell: Wrapper around concrete Mojo shell, implementing devtools Shell
        interface.
    shell_args: The arguments for mojo_shell.
    apptest_url: Url of the apptest app to run.
    apptest_args: Parameters to be passed to the apptest app.
    isolate: Iff True, each test in the app will be run in a separate shell run.

  Returns:
    True iff the test succeeded, False otherwise.
  """

  if not isolate:
    return run_apptest(shell, shell_args, apptest_url, apptest_args,
                       _gtest_apptest_output_test)

  # List the apptest fixtures so they can be run independently for isolation.
  fixtures = get_fixtures(shell, shell_args, apptest_url)
  if not fixtures:
    print "No tests to run found in %s." % apptest_url
    return False

  apptest_result = True
  for fixture in fixtures:
    isolated_apptest_args = apptest_args + ["--gtest_filter=%s" % fixture]
    success = run_apptest(shell, shell_args, apptest_url, isolated_apptest_args,
                          _gtest_apptest_output_test)

    if not success:
      apptest_result = False

  return apptest_result

def get_fixtures(shell, shell_args, apptest):
  """Returns the "Test.Fixture" list from an apptest using mojo_shell.

  Tests are listed by running the given apptest in mojo_shell and passing
  --gtest_list_tests. The output is parsed and reformatted into a list like
  [TestSuite.TestFixture, ... ]
  An empty list is returned on failure, with errors logged.

  Args:
    apptest: The URL of the test application to run.
  """
  arguments = []
  arguments.extend(shell_args)
  arguments.append("--args-for=%s %s" % (apptest, "--gtest_list_tests"))
  arguments.append(apptest)

  (exit_code, output) = shell.RunAndGetOutput(arguments)
  if exit_code:
    command_line = "mojo_shell " + " ".join(["%r" % x for x in arguments])
    print "Failed to get test fixtures: %r" % command_line
    print 72 * '-'
    print output
    print 72 * '-'
    return []

  _logger.debug("Tests listed:\n%s" % output)
  return _gtest_list_tests(output)

def _gtest_list_tests(gtest_list_tests_output):
  """Returns a list of strings formatted as TestSuite.TestFixture from the
  output of running --gtest_list_tests on a GTEST application."""

  # Remove log lines.
  gtest_list_tests_output = re.sub("^(\[|WARNING: linker:).*\n",
                                   "",
                                   gtest_list_tests_output,
                                   flags=re.MULTILINE)

  if not re.match("^(\w*\.\r?\n(  \w*\r?\n)+)+", gtest_list_tests_output):
    raise Exception("Unrecognized --gtest_list_tests output:\n%s" %
                    gtest_list_tests_output)

  output_lines = gtest_list_tests_output.split("\n")

  test_list = []
  for line in output_lines:
    if not line:
      continue
    if line[0] != " ":
      suite = line.strip()
      continue
    test_list.append(suite + line.strip())

  return test_list

redpajama_set_name: RedPajamaGithub


text:
package org.wildfly.security.auth.realm.ldap;

import org.wildfly.security.auth.server.RealmUnavailableException;
import org.wildfly.security.auth.server.SupportLevel;
import org.wildfly.security.evidence.Evidence;

/**
 *
 *
 * @author Darran Lofthouse
 */
interface IdentityEvidenceVerifier {

    /**
     * Determine whether a given credential is definitely supported, possibly supported, or definitely not supported.
     *
     * @param evidenceType the evidence type (must not be {@code null})
     * @param algorithmName the algorithm name, if any
     * @return the level of support for this credential type
     * @throws RealmUnavailableException if the realm is unavailable to verify credentials.
     */
    SupportLevel getEvidenceVerifySupport(Class<? extends Evidence> evidenceType, String algorithmName) throws RealmUnavailableException;

    /**
     * Verify the given evidence against the named credential.
     *
     * @param evidence the evidence to verify.
     * @return {@code true} if the evidence is successfully verified, {@code false} otherwise.
     * @throws RealmUnavailableException if the realm is unavailable to verify credentials.
     */
    boolean verifyEvidence(final Evidence evidence) throws RealmUnavailableException;

}


text:
namespace web {
struct ContextMenuParams;
}  // namespace web;

@protocol CRWNativeContentDelegate;

// Abstract methods needed for manipulating native content in the web content
// area.
@protocol CRWNativeContent<NSObject>

// The page title, meant for display to the user. Will return nil if not
// available.
- (NSString*)title;

// The URL represented by the content being displayed.
- (const GURL&)url;

// The view to insert into the content area displayed to the user.
- (UIView*)view;

// Called when memory is low. Release anything (such as views) that can be
// easily re-created to free up RAM.
- (void)handleLowMemory;

// Returns YES if there is currently a live view in the tab (e.g., the view
// hasn't been discarded due to low memory).
// NOTE: This should be used for metrics-gathering only; for any other purpose
// callers should not know or care whether the view is live.
- (BOOL)isViewAlive;

// Reload any displayed data to ensure the view is up to date.
- (void)reload;

@optional

// Optional method that allows to set CRWNativeContent delegate.
- (void)setDelegate:(id<CRWNativeContentDelegate>)delegate;

// Notifies the CRWNativeContent that it has been shown.
- (void)wasShown;

// Notifies the CRWNativeContent that it has been hidden.
- (void)wasHidden;

// Executes JavaScript on the native view. |handler| is called with the results
// of the evaluation. If the native view cannot evaluate JS at the moment,
// |handler| is called with an NSError.
- (void)executeJavaScript:(NSString*)script
        completionHandler:(web::JavaScriptResultBlock)handler;

// Returns |YES| if CRWNativeContent wants the keyboard shield when the keyboard
// is up.
- (BOOL)wantsKeyboardShield;

// Returns |YES| if CRWNativeContent wants the hint text displayed.
// TODO(crbug.com/374984): Remove this. This is chrome level concept and should
// not exist in the web/ layer.
- (BOOL)wantsLocationBarHintText;

// Dismisses on-screen keyboard if necessary.
- (void)dismissKeyboard;

// Dismisses any outstanding modal interaction elements (e.g. modal view
// controllers, context menus, etc).
- (void)dismissModals;

// A native content controller should do any clean up at this time when
// WebController closes.
- (void)close;

// Enables or disables usage of web views inside the native controller.
- (void)setWebUsageEnabled:(BOOL)webUsageEnabled;

// Enables or disables the scrolling in the native view (when available).
- (void)setScrollEnabled:(BOOL)enabled;

// Called when a snapshot of the content will be taken.
- (void)willUpdateSnapshot;

// Notifies the CRWNativeContent that it will be removed from superview.
- (void)willBeDismissed;

// The URL that will be displayed to the user when presenting this native
// content.
- (GURL)virtualURL;

@end

// CRWNativeContent delegate protocol.
@protocol CRWNativeContentDelegate<NSObject>

@optional
// Called when the content supplies a new title.
- (void)nativeContent:(id)content titleDidChange:(NSString*)title;

// Called when the content triggers a context menu.
// The client must return whether the context menu event was handled and the
// system menu must be suppressed.
- (BOOL)nativeContent:(id)content
    handleContextMenu:(const web::ContextMenuParams&)params;

@end

#endif  // IOS_WEB_PUBLIC_WEB_STATE_UI_CRW_NATIVE_CONTENT_H_


text:
<?php

namespace Doctrine\AnnotationsTests\Fixtures\Reader;

/**
 * @fixme public
 * @TODO
 */
class DCOM106
{

}


text:
.quick-open-widget {
	font-family: 'Segoe WPC', 'Segoe UI', "SFUIText-Light", HelveticaNeue-Light, sans-serif, "Droid Sans Fallback";
	font-size: 13px;
}

.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon,
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
	background-image: url('symbol-sprite.svg');
	background-repeat: no-repeat;
}

.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor		{ background-position: 0 -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable 			{ background-position: -22px -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class 				{ background-position: -43px -3px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface 			{ background-position: -63px -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module 			{ background-position: -82px -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property 			{ background-position: -102px -3px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum		 		{ background-position: -122px -3px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule		 		{ background-position: -242px -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file		 		{ background-position: -262px -4px; }

.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor 	{ background-position: 0 -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable 		{ background-position: -22px -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class 		{ background-position: -43px -23px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface 	{ background-position: -63px -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module 		{ background-position: -82px -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property 		{ background-position: -102px -23px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum		 	{ background-position: -122px -23px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule		 	{ background-position: -242px -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file		 	{ background-position: -262px -24px; }

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
	background: none;
	display: inline;
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon:before {
	height: 16px;
	width: 16px;
	display: inline-block;
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method:before,
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function:before,
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor:before {
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0IxODBENyIgZD0iTTUuNSAzbC00LjUgMi44NTd2NC4yODVsNC41IDIuODU4IDQuNS0yLjg1N3YtNC4yODZsLTQuNS0yLjg1N3ptLS41IDguNDk4bC0zLTEuOTA1di0yLjgxNmwzIDEuOTA1djIuODE2em0tMi4zNTgtNS40OThsMi44NTgtMS44MTUgMi44NTggMS44MTUtMi44NTggMS44MTUtMi44NTgtMS44MTV6bTYuMzU4IDMuNTkzbC0zIDEuOTA1di0yLjgxNWwzLTEuOTA1djIuODE1eiIvPjwvc3ZnPg==");
	margin-left: 2px;
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field:before,
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable:before {
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTEgNnY0bDQgMiA2LTN2LTRsLTQtMi02IDN6bTQgMWwtMi0xIDQtMiAyIDEtNCAyeiIvPjwvc3ZnPg==");
	margin-left: 2px;
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class:before {
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iI0U4QUI1MyIgcG9pbnRzPSIxMS45OTgsMTEuMDAyIDksMTEgOSw3IDExLDcgMTAsOCAxMiwxMCAxNSw3IDEzLDUgMTIsNiA3LDYgOSw0IDYsMSAxLDYgNCw5IDYsNyA4LDcgOCwxMiAxMSwxMiAxMCwxMyAxMiwxNSAxNSwxMiAxMywxMCIvPjwvc3ZnPg==");
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface:before {
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTExLjUgNGMtMS43NTkgMC0zLjIwNCAxLjMwOC0zLjQ0OSAzaC0zLjEyMmMtLjIyMy0uODYxLS45OTgtMS41LTEuOTI5LTEuNS0xLjEwNCAwLTIgLjg5NS0yIDIgMCAxLjEwNC44OTYgMiAyIDIgLjkzMSAwIDEuNzA2LS42MzkgMS45MjktMS41aDMuMTIyYy4yNDUgMS42OTEgMS42OSAzIDMuNDQ5IDMgMS45MyAwIDMuNS0xLjU3IDMuNS0zLjUgMC0xLjkzMS0xLjU3LTMuNS0zLjUtMy41em0wIDVjLS44MjcgMC0xLjUtLjY3NC0xLjUtMS41IDAtLjgyOC42NzMtMS41IDEuNS0xLjVzMS41LjY3MiAxLjUgMS41YzAgLjgyNi0uNjczIDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==");
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before {
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkgMTF2LTFjMC0uODM0LjQ5Ni0xLjczOCAxLTItLjUwNC0uMjctMS0xLjE2OC0xLTJ2LTFjMC0uODQtLjU4NC0xLTEtMXYtMWMyLjA4MyAwIDIgMS4xNjYgMiAydjFjMCAuOTY5LjcwMy45OCAxIDF2MmMtLjMyMi4wMi0xIC4wNTMtMSAxdjFjMCAuODM0LjA4MyAyLTIgMnYtMWMuODMzIDAgMS0xIDEtMXptLTYgMHYtMWMwLS44MzQtLjQ5Ni0xLjczOC0xLTIgLjUwNC0uMjcgMS0xLjE2OCAxLTJ2LTFjMC0uODQuNTg0LTEgMS0xdi0xYy0yLjA4MyAwLTIgMS4xNjYtMiAydjFjMCAuOTY5LS43MDMuOTgtMSAxdjJjLjMyMi4wMiAxIC4wNTMgMSAxdjFjMCAuODM0LS4wODMgMiAyIDJ2LTFjLS44MzMgMC0xLTEtMS0xeiIvPjwvc3ZnPg==");
	margin-left: 2px;
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property:before	{
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEyLjA5IDQuMzU5bC0yLjY0MSAyLjY0MS0yLTIgMi42NDEtMi42NDFjLS41MDItLjIyNi0xLjA1NS0uMzU5LTEuNjQxLS4zNTktMi4yMDkgMC00IDEuNzkxLTQgNCAwIC41ODYuMTMzIDEuMTM5LjM1OSAxLjY0bC0zLjM1OSAzLjM2cy0xIDEgMCAyaDJsMy4zNTktMy4zNmMuNTAzLjIyNiAxLjA1NS4zNiAxLjY0MS4zNiAyLjIwOSAwIDQtMS43OTEgNC00IDAtLjU4Ni0uMTMzLTEuMTM5LS4zNTktMS42NDF6Ii8+PC9zdmc+");
	margin-left: 1px;
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.value:before,
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum:before	{
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PGcgZmlsbD0iIzc1QkVGRiI+PHBhdGggZD0iTTEyIDNoLTRsLTEgMXYyaDV2MWgtMnYxaDJsMS0xdi0zbC0xLTF6bTAgMmgtNHYtMWg0djF6TTMgMTJoNnYtNWgtNnY1em0xLTNoNHYxaC00di0xeiIvPjwvZz48L3N2Zz4=");
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule:before {
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEwIDVoLTh2LTJoOHYyem0wIDFoLTZ2MWg2di0xem0wIDJoLTZ2MWg2di0xeiIvPjwvc3ZnPg==");
}

.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file:before {
	content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkuNjc2IDJoLTYuNjc2djEyaDEwdi05bC0zLjMyNC0zem0yLjMyNCAxMWgtOHYtMTBoNXYzaDN2N3oiLz48L3N2Zz4=");
}


text:
<!DOCTYPE html>

    <title>Test: HTMLImports</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />


text:
import isString from "lodash/isString";

export default function getCookie(name) {
  var cookieValue = null;
  if (document.cookie && document.cookie != "") {
    var cookies = document.cookie.split(";");
    for (var i = 0; i < cookies.length; i++) {
      var cookie = jQuery.trim(cookies[i]);
      // Does this cookie string begin with the name we want?
      if (cookie.substring(0, name.length + 1) == name + "=") {
        cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
        break;
      }
    }
  }
  return cookieValue;
}

export var csrftoken = getCookie("csrftoken");

function getHeaders() {
  return {
    Accept: "application/json",
    "Content-Type": "application/json",
    "X-CSRFToken": getCookie("csrftoken")
  };
}

export function jsonPost(url, data) {
  return fetch(url, {
    method: "post",
    credentials: "same-origin",
    headers: getHeaders(),
    body: isString(data) ? data : JSON.stringify(data)
  });
}

export function jsonGet(url) {
  return fetch(url, {
    method: "get",
    credentials: "same-origin",
    headers: getHeaders()
  });
}


text:
cask "clion" do
  version "2020.2.4,202.7660.37"
  sha256 "dd83c148f196a1504ec86d93e105fdf6d8ef72b0c856af5a91153dfe38667281"

  url "https://download.jetbrains.com/cpp/CLion-#{version.before_comma}.dmg"
  appcast "https://data.services.jetbrains.com/products/releases?code=CL&latest=true&type=release"
  name "CLion"
  homepage "https://www.jetbrains.com/clion/"

  auto_updates true

  app "CLion.app"

  uninstall_postflight do
    ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "clion") }.each do |path|
      if File.exist?(path) &&
         File.readlines(path).grep(/# see com.intellij.idea.SocketLock for the server side of this interface/).any?
        File.delete(path)
      end
    end
  end

  zap trash: [
    "~/Library/Application Support/CLion#{version.major_minor}",
    "~/Library/Caches/CLion#{version.major_minor}",
    "~/Library/Logs/CLion#{version.major_minor}",
    "~/Library/Preferences/CLion#{version.major_minor}",
  ]
end


text:
def activity01(num1):
	'''Determine if an input number is Even or Odd'''
    return

def activity02(iv_one, iv_two):
	'''Return the sum of two input values'''
	return

def activity03(num_list):
	'''Given a list of integers, count how many are even'''
	return

def activity04(input_string):
	'''Return the input string, backward'''
	return


text:
import gulp from 'gulp';
import watch  from 'gulp-watch';
import uglify from 'gulp-uglify';
import minifyCss from 'gulp-minify-css';
import livereload from 'gulp-livereload';

import options from '../options';
import config from '../config';

gulp.task('build', ['clean', 'stylus', 'static'], () => {
	if (options.watch) {
		livereload.listen();
		//Styles
		watch(config.watch.styles, function(){
			gulp.start('stylus');
		});
		//Images
		watch(config.watch.images, function(){
			gulp.start('images');
		});
		//Fonts
		watch(config.watch.fonts, function(){
			gulp.start('fonts');
		});
		//Index
		watch(config.watch.index, function(){
			gulp.start('html');
		});
	}

  	if (options.minify) {
    	gulp.src(config.output.styles + '/' + config.output.filename + '.css')
			.pipe(minifyCss())
			.pipe(gulp.dest(config.output.styles));
  	}

  	gulp.start('webpack');
});


text:
<?php

namespace Konekt\SerpaSyncBundle\Model;

/**
 * Parses files exported by sERPa and returns a data ready to be translated to remote model instances.
 *
 */
class Parser
{

    /** @var InputFiles */
    protected $inputFiles;

    private function __construct() {}

    /**
     * Creates a new instance of the class.
     *
     * @param   InputFiles   $inputFiles   File containing data to parse.
     *
     * @return  static
     */
    public static function create(InputFiles $inputFiles)
    {
        $instance = new static();
        $instance->inputFiles = $inputFiles;

        return $instance;
    }

    /**
     * Returns the list of files that are parsed.
     *
     * @return InputFiles
     */
    public function getInputFiles()
    {
        return $this->inputFiles;
    }

}


text:
package dkpro.similarity.algorithms.vsm.util;

import static java.lang.Math.round;

public class ProgressMeter
{
	private final long _start;
	private long _preLast;
	private long _last;
	private long _count;
	private final long _limit;

	public ProgressMeter(final long limit)
	{
		_start = System.currentTimeMillis();
		_last = System.currentTimeMillis();
		_preLast = System.currentTimeMillis();
		_count = 0;
		_limit = limit;
	}

	public void next()
	{
		_count++;
		_preLast = _last;
		_last = System.currentTimeMillis();
	}

	public long getCount()
	{
		return _count;
	}
	public void setDone(final long count)
	{
		_count = count;
		_preLast = _last;
		_last = System.currentTimeMillis();
	}

	public void setLeft(final long count)
	{
		_count = _limit - count;
		_preLast = _last;
		_last = System.currentTimeMillis();
	}

	@Override
	public String toString()
	{
		final StringBuilder sb = new StringBuilder();
		sb.append(_count);
		sb.append(" of ");
		sb.append(_limit);
		if (_count > 0 && _limit > 0) {
			final int perc = 100 - (int) (((_limit - _count) * 100) / _limit);
			sb.append(" (");
			sb.append(perc);
			sb.append("%  ETA ");
			final double timeSoFar = (_last - _start);
			final long estTotal = round((timeSoFar / _count) * _limit);
			final long timeLeft = round(estTotal - timeSoFar);
			sb.append(milliToStringShort(timeLeft));
			sb.append("  RUN ");
			sb.append(milliToStringShort(_last - _start));
			sb.append("  AVG ");
			sb.append(round(timeSoFar / _count));
			sb.append("  LAST ");
			sb.append(_last - _preLast);
			sb.append(")");
		}
		return sb.toString();
	}

	public static String milliToStringShort(final long milli)
	{
		final long fracs = milli % 1000;
		final long seconds = milli / 1000;
		final long minutes = seconds / 60;
		final long hours = minutes / 60;
		return String.format("%02d:%02d:%02d.%-3d", hours, (minutes % 60), (seconds % 60), fracs);
	}
}


text:
package com.linecorp.armeria.common;

import static java.util.Objects.requireNonNull;

import java.util.Set;

import javax.annotation.Nullable;

import com.google.common.base.Ascii;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;

import com.linecorp.armeria.common.util.UnstableApi;

/**
 * Registers the {@link SerializationFormat}s dynamically via Java SPI (Service Provider Interface).
 */
@UnstableApi
public abstract class SerializationFormatProvider {

    /**
     * Returns the {@link Entry}s to register as {@link SerializationFormat}s.
     */
    protected abstract Set<Entry> entries();

    /**
     * A registration entry of a {@link SerializationFormat}.
     */
    @UnstableApi
    protected static final class Entry implements Comparable<Entry> {
        final String uriText;
        final MediaType primaryMediaType;
        final MediaTypeSet mediaTypes;

        /**
         * Creates a new instance.
         */
        public Entry(String uriText, MediaType primaryMediaType, MediaType... alternativeMediaTypes) {
            this.uriText = Ascii.toLowerCase(requireNonNull(uriText, "uriText"));
            this.primaryMediaType = requireNonNull(primaryMediaType, "primaryMediaType");
            requireNonNull(alternativeMediaTypes, "alternativeMediaTypes");
            mediaTypes = MediaTypeSet.of(ImmutableList.<MediaType>builder()
                                                 .add(primaryMediaType)
                                                 .add(alternativeMediaTypes)
                                                 .build());
        }

        @Override
        public boolean equals(@Nullable Object obj) {
            if (this == obj) {
                return true;
            }

            if (obj == null || obj.getClass() != Entry.class) {
                return false;
            }

            return uriText.equals(((Entry) obj).uriText);
        }

        @Override
        public int compareTo(Entry o) {
            return uriText.compareTo(o.uriText);
        }

        @Override
        public String toString() {
            return MoreObjects.toStringHelper(this)
                              .add("uriText", uriText)
                              .add("mediaTypes", mediaTypes).toString();
        }

        @Override
        public int hashCode() {
            return uriText.hashCode();
        }
    }
}


text:
using System;

namespace CordSharpExtension
{
    static class Guids
    {
        public const string GuidCordShaprPkgString = "73498093-A752-4075-8CF7-E09BC44E878E";
    };
}


text:
@interface YALLabel ()

@property (nonatomic, weak) YALTextLayer *backgroundLayer;
@property (nonatomic, weak) YALTextLayer *fillLayer;
@property (nonatomic, weak) YALTextLayer *strokeLayer;
@property (nonatomic, strong) NSArray *bezierPaths;
@property (nonatomic, assign) CGFloat scaleFactor;

@end

@implementation YALLabel

#pragma mark - init

- (instancetype)init {
    if (self = [super init]) {
        [self commonInit];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self commonInit];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super initWithCoder:aDecoder]) {
        [self commonInit];
    }
    return self;
}

- (void)commonInit {
    self.strokeWidth = kDefaultStrokeWidth;

    if (!self.backgroundColor) {
        self.backgroundColor = [UIColor clearColor];
    }
}

#pragma mark - Drawing

- (void)drawRect:(CGRect)rect {
    [self redraw];
}

- (void)redraw {
    [self redrawBackground];
    [self redrawFill];
    [self redrawStroke];
}

- (void)redrawBackground {
    if (self.backgroundFillColor) {
        self.backgroundLayer = [YALTextLayer layerWithPaths:self.bezierPaths
                                                  fillColor:self.backgroundFillColor.CGColor
                                                strokeColor:NULL
                                                  lineWidth:0.f
                                                   andBlock:^(YALProgressAnimatingLayer *layer) {
                                                       [self.layer addSublayer:layer];
                                                       [self.backgroundLayer removeFromSuperlayer];
                                                   }];
        CGRect frame = CGPathGetPathBoundingBox(self.backgroundLayer.path);
        self.backgroundLayer.position = (CGPoint){
            (CGRectGetWidth(self.frame) - CGRectGetWidth(frame)) / 2.f,
            (CGRectGetHeight(self.frame) - CGRectGetHeight(frame)) / 2.f
        };
    }
}

- (void)redrawFill {
    if (self.fillColor) {
        self.fillLayer = [YALTextLayer layerWithPaths:self.bezierPaths
                                            fillColor:self.fillColor.CGColor
                                          strokeColor:NULL
                                            lineWidth:0.f
                                             andBlock:^(YALProgressAnimatingLayer *layer) {
                                                 [self.layer addSublayer:layer];
                                                 [self.fillLayer removeFromSuperlayer];
                                             }];
        CGRect frame = CGPathGetPathBoundingBox(self.fillLayer.path);
        self.fillLayer.position = (CGPoint){
            (CGRectGetWidth(self.frame) - CGRectGetWidth(frame)) / 2.f,
            (CGRectGetHeight(self.frame) - CGRectGetHeight(frame)) / 2.f
        };
    }
}

- (void)redrawStroke {
    if (self.strokeColor) {
        self.strokeLayer = [YALTextLayer layerWithPaths:self.bezierPaths
                                              fillColor:NULL
                                            strokeColor:self.strokeColor.CGColor
                                              lineWidth:self.strokeWidth
                                               andBlock:^(YALProgressAnimatingLayer *layer) {
                                                   [self.layer addSublayer:layer];
                                                   [self.strokeLayer removeFromSuperlayer];
                                               }];
        CGRect frame = CGPathGetPathBoundingBox(self.strokeLayer.path);
        frame = CGRectInset(frame, self.strokeWidth, self.strokeWidth);
        self.strokeLayer.position = (CGPoint){
            (CGRectGetWidth(self.frame) - CGRectGetWidth(frame)) / 2.f,
            (CGRectGetHeight(self.frame) - CGRectGetHeight(frame)) / 2.f
        };
    }
}

#pragma mark - Mutators

- (void)setText:(NSString *)text {
    _text = [text copy];
    [self updatePaths];
}

- (void)setFontName:(NSString *)fontName {
    _fontName = [fontName copy];
    [self updatePaths];
}

- (void)setFontSize:(CGFloat)fontSize {
    _fontSize = fontSize;
    [self updatePaths];
}

- (void)setBackgroundFillColor:(UIColor *)backgroundFillColor {
    _backgroundFillColor = [backgroundFillColor copy];
    [self redrawBackground];
}

- (void)setFillColor:(UIColor *)fillColor {
    _fillColor = [fillColor copy];
    [self redrawFill];
}

- (void)setStrokeColor:(UIColor *)strokeColor {
    _strokeColor = [strokeColor copy];
    [self redrawStroke];
}

- (void)setStrokeWidth:(CGFloat)strokeWidth {
    _strokeWidth = strokeWidth;
    self.strokeLayer.lineWidth = strokeWidth;
}

#pragma mark - Private

- (void)updatePaths {
    CGFloat fontSize = (self.fontSize) ?: 0.38f;
    UIFont *font = [UIFont fontWithName:self.fontName size:fontSize];
    NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:self.text attributes:@{NSFontAttributeName: font}];

    self.bezierPaths = [attributedString yal_bezierPaths];
}

#pragma mark - Interface builder setup

- (void)prepareForInterfaceBuilder {
    if (!self.backgroundColor) {
        self.backgroundColor = [UIColor clearColor];
    }
}

@end


text:
<?php

namespace Hoa\Praspel\AssertionChecker;

use Hoa\Praspel;

/**
 * Class \Hoa\Praspel\AssertionChecker\Runtime.
 *
 * Assertion checker: runtime (so-called RAC).
 *
 * @copyright  Copyright © 2007-2015 Hoa community
 * @license    New BSD License
 */
class Runtime extends AssertionChecker
{
    /**
     * Visitor Praspel.
     *
     * @var \Hoa\Praspel\Visitor\Praspel
     */
    protected $_visitorPraspel   = null;

    /**
     * Runtime assertion checker.
     *
     * @param   \Hoa\Praspel\Trace  $trace    Trace.
     * @return  bool
     * @throws  \Hoa\Praspel\Exception\AssertionChecker
     * @throws  \Hoa\Praspel\Exception\Group
     */
    public function evaluate(&$trace = false)
    {
        // Start.
        $registry      = Praspel::getRegistry();
        $verdict       = true;
        $callable      = $this->getCallable();
        $reflection    = $callable->getReflection();
        $specification = $this->getSpecification();
        $exceptions    = new Praspel\Exception\Group(
            'The Runtime Assertion Checker has detected failures for %s.',
            0,
            $callable
        );
        $classname     = null;
        $isConstructor = false;

        if ($reflection instanceof \ReflectionMethod) {
            $reflection->setAccessible(true);

            if ('__construct' === $reflection->getName()) {
                $isConstructor = true;
            }

            if (false === $reflection->isStatic()) {
                $_callback = $callable->getValidCallback();
                $_object   = $_callback[0];
                $specification->getImplicitVariable('this')->bindTo($_object);
            }

            $classname = $reflection->getDeclaringClass()->getName();
        }

        if (false !== $trace && !($trace instanceof Trace)) {
            $trace = new Praspel\Trace();
        }

        // Prepare data.
        if (null === $data = $this->getData()) {
            if (true === $this->canGenerateData()) {
                $data = static::generateData($specification);
                $this->setData($data);
            } else {
                throw new Praspel\Exception\AssertionChecker(
                    'No data were given. The System Under Test %s needs data ' .
                    'to be executed.',
                    1,
                    $callable
                );
            }
        }

        $arguments = $this->getArgumentData(
            $reflection,
            $data,
            $numberOfRequiredArguments
        );

        // Check invariant.
        $invariant  = $specification->getClause('invariant');
        $attributes = $this->getAttributeData($callable);

        foreach ($attributes as $name => $_) {
            $entryName = $classname . '::$' . $name;

            if (!isset($registry[$entryName])) {
                continue;
            }

            $entry = $registry[$entryName];

            if (true === $entry->clauseExists('invariant')) {
                foreach ($entry->getClause('invariant') as $variable) {
                    $invariant->addVariable($variable->getName(), $variable);
                }
            }
        }

        if (false === $isConstructor) {
            $verdict &= $this->checkClause(
                $invariant,
                $attributes,
                $exceptions,
                'Hoa\Praspel\Exception\Failure\Invariant',
                true,
                $trace
            );

            if (0 < count($exceptions)) {
                throw $exceptions;
            }
        }

        // Check requires and behaviors.
        $behavior  = $specification;
        $verdict  &= $this->checkBehavior(
            $behavior,
            $arguments,
            $exceptions,
            true,
            $trace
        );

        if (0 < count($exceptions)) {
            throw $exceptions;
        }

        $rootBehavior      = $behavior instanceof Praspel\Model\Specification;
        $numberOfArguments = count($arguments);

        if ($numberOfArguments < $numberOfRequiredArguments) {
            $exceptions[] = new Praspel\Exception\Failure\Precondition(
                'Callable %s needs %d arguments; %d given.',
                2,
                [$callable, $numberOfRequiredArguments, $numberOfArguments]
            );

            throw $exceptions;
        }

        $_exceptions =
            true === $rootBehavior
                ? $exceptions
                : new Praspel\Exception\Group(
                    'Behavior %s is broken.',
                    3,
                    $behavior->getIdentifier()
                );

        try {
            // Invoke.
            $return = $this->invoke(
                $callable,
                $reflection,
                $arguments,
                $isConstructor
            );
            $arguments['\result'] = $return;

            // Check normal postcondition.
            if (true === $behavior->clauseExists('ensures')) {
                $ensures  = $behavior->getClause('ensures');
                $verdict &= $this->checkClause(
                    $ensures,
                    $arguments,
                    $_exceptions,
                    'Hoa\Praspel\Exception\Failure\Postcondition',
                    false,
                    $trace
                );
            }
        } catch (Praspel\Exception $internalException) {
            $_exceptions[] = new Praspel\Exception\Failure\InternalPrecondition(
                'The System Under Test has broken an internal contract.',
                4,
                null,
                $internalException
            );
        } catch (\Exception $exception) {
            $arguments['\result'] = $exception;

            // Check exceptional postcondition.
            if (true === $behavior->clauseExists('throwable')) {
                $throwable  = $behavior->getClause('throwable');
                $verdict   &= $this->checkExceptionalClause(
                    $throwable,
                    $arguments
                );

                if (false == $verdict) {
                    $_exceptions[]  = new Praspel\Exception\Failure\Exceptional(
                        'The exception %s has been unexpectedly thrown.',
                        5,
                        get_class($arguments['\result']),
                        $exception
                    );
                }
            } else {
                $verdict       &= false;
                $_exceptions[]  = new Praspel\Exception\Failure\Exceptional(
                    'The System Under Test cannot terminate exceptionally ' .
                    'because no exceptional postcondition has been specified ' .
                    '(there is no @throwable clause).',
                    6,
                    [],
                    $exception
                );
            }
        }

        if (0      <  count($_exceptions) &&
            false === $rootBehavior) {
            $_behavior = $behavior;

            while (
                (null !== $_behavior = $_behavior->getParent()) &&
                !($_behavior instanceof Praspel\Model\Specification)
            ) {
                $handle = new Praspel\Exception\Group(
                    'Behavior %s is broken.',
                    7,
                    $_behavior->getIdentifier()
                );
                $handle[]    = $_exceptions;
                $_exceptions = $handle;
            }

            $exceptions[] = $_exceptions;
        }

        if (0 < count($exceptions)) {
            throw $exceptions;
        }

        // Check invariant.
        $attributes = $this->getAttributeData($callable);
        $verdict   &= $this->checkClause(
            $invariant,
            $attributes,
            $exceptions,
            'Hoa\Praspel\Exception\Failure\Invariant',
            true,
            $trace
        );

        if (0 < count($exceptions)) {
            throw $exceptions;
        }

        return (bool) $verdict;
    }

    /**
     * Get argument data.
     *
     * @param   \ReflectionFunctionAbstract   $reflection                   Reflection.
     * @param   array                        &$data                         Data.
     * @param   int                           $numberOfRequiredArguments    Number of
     *                                                                      required
     *                                                                      arguments.
     * @return  array
     */
    protected function getArgumentData(
        \ReflectionFunctionAbstract  $reflection,
        Array                       &$data,
        &$numberOfRequiredArguments
    ) {
        $arguments                 = [];
        $numberOfRequiredArguments = 0;

        foreach ($reflection->getParameters() as $parameter) {
            $name = $parameter->getName();

            if (true === array_key_exists($name, $data)) {
                $arguments[$name] = &$data[$name];

                if (false === $parameter->isOptional()) {
                    ++$numberOfRequiredArguments;
                }

                continue;
            }

            if (false === $parameter->isOptional()) {
                ++$numberOfRequiredArguments;

                // Let the error be caught by a @requires clause.
                continue;
            }

            $arguments[$name] = $parameter->getDefaultValue();
        }

        return $arguments;
    }

    /**
     * Get attribute data.
     *
     * @param   \Hoa\Core\Consistency\Xcallable  $callable    Callable.
     * @return  array
     */
    protected function getAttributeData(Core\Consistency\Xcallable $callable)
    {
        $callback = $callable->getValidCallback();

        if ($callback instanceof \Closure) {
            return [];
        }

        $object = $callback[0];

        if (!is_object($object)) {
            return [];
        }

        $reflectionObject = new \ReflectionObject($object);
        $attributes       = [];

        foreach ($reflectionObject->getProperties() as $property) {
            $property->setAccessible(true);
            $attributes[$property->getName()] = $property->getValue($object);
        }

        return $attributes;
    }

    /**
     * Invoke.
     *
     * @acccess  protected
     * @param    \Hoa\Core\Consistency\Xcallable    &$reflection       Callable.
     * @param    \ReflectionFunctionAbstract        &$reflection       Reflection.
     * @param    array                              &$arguments        Arguments.
     * @param    bool                                $isConstructor    Whether
     *                                                                 it is a
     *                                                                 constructor.
     * @return   mixed
     * @throws   \Exception
     */
    protected function invoke(
        Core\Consistency\Xcallable &$callable,
        \ReflectionFunctionAbstract &$reflection,
        Array &$arguments,
        $isConstructor
    ) {
        if ($reflection instanceof \ReflectionFunction) {
            return $reflection->invokeArgs($arguments);
        }

        if (false === $isConstructor) {
            $_callback = $callable->getValidCallback();
            $_object   = $_callback[0];

            return $reflection->invokeArgs($_object, $arguments);
        }

        $class      = $reflection->getDeclaringClass();
        $instance   = $class->newInstanceArgs($arguments);
        $callable   = xcallable($instance, '__construct');
        $reflection = $callable->getReflection();

        return void;
    }

    /**
     * Check behavior clauses.
     *
     * @param   \Hoa\Praspel\Model\Behavior    &$behavior      Behavior clause.
     * @param   array                          &$data          Data.
     * @param   \Hoa\Praspel\Exception\Group    $exceptions    Exceptions group.
     * @param   bool                            $assign        Assign data to
     *                                                         variable.
     * @param   \Hoa\Praspel\Trace              $trace         Trace.
     * @return  bool
     * @throws  \Hoa\Praspel\Exception
     */
    protected function checkBehavior(
        Praspel\Model\Behavior &$behavior,
        Array &$data,
        Praspel\Exception\Group $exceptions,
        $assign = false,
        $trace  = false
    ) {
        $verdict = true;

        // Check precondition.
        if (true === $behavior->clauseExists('requires')) {
            $requires = $behavior->getClause('requires');
            $verdict  = $this->checkClause(
                $requires,
                $data,
                $exceptions,
                'Hoa\Praspel\Exception\Failure\Precondition',
                $assign,
                $trace
            );

            if (false === $verdict) {
                return false;
            }
        }

        // Check behaviors.
        if (true === $behavior->clauseExists('behavior')) {
            $_verdict  = false;
            $behaviors = $behavior->getClause('behavior');
            $exceptions->beginTransaction();

            foreach ($behaviors as $_behavior) {
                $_exceptions = new Praspel\Exception\Group(
                    'Behavior %s is broken.',
                    8,
                    $_behavior->getIdentifier()
                );

                $_trace = null;

                if (!empty($trace)) {
                    $_trace = new Praspel\Model\Behavior($trace);
                    $_trace->setIdentifier($_behavior->getIdentifier());
                }

                $_verdict = $this->checkBehavior(
                    $_behavior,
                    $data,
                    $_exceptions,
                    $assign,
                    $_trace
                );

                if (true === $_verdict) {
                    if (!empty($trace)) {
                        $trace->addClause($_trace);
                    }

                    break;
                }

                $exceptions[] = $_exceptions;
                unset($_trace);
            }

            if (false === $_verdict) {
                if (true === $behavior->clauseExists('default')) {
                    $exceptions->rollbackTransaction();
                    $_verdict = true;
                    $behavior = $behavior->getClause('default');
                } else {
                    $exceptions->commitTransaction();
                }
            } else {
                $exceptions->rollbackTransaction();
                $behavior = $_behavior;
            }

            $verdict &= $_verdict;
        }

        return (bool) $verdict;
    }

    /**
     * Check a clause.
     *
     * @param   \Hoa\Praspel\Model\Declaration   $clause        Clause.
     * @param   array                           &$data          Data.
     * @param   \Hoa\Praspel\Exception\Group     $exceptions    Exceptions group.
     * @param   string                           $exception     Exception to
     *                                                          throw.
     * @param   bool                             $assign        Assign data to
     *                                                          variable.
     * @param   \Hoa\Praspel\Trace               $trace         Trace.
     * @return  bool
     * @throws  \Hoa\Praspel\Exception
     */
    protected function checkClause(
        Praspel\Model\Declaration $clause,
        Array &$data,
        \Hoa\Praspel\Exception\Group $exceptions,
        $exception,
        $assign = false,
        $trace  = false
    ) {
        $verdict     = true;
        $traceClause = null;

        if (!empty($trace)) {
            $traceClause = clone $clause;
        }

        foreach ($clause as $name => $variable) {
            if (false === array_key_exists($name, $data)) {
                $exceptions[] = new $exception(
                    'Variable %s in @%s is required and has no value.',
                    9,
                    [$name, $clause->getName()]
                );

                continue;
            }

            $datum         = &$data[$name];
            $_verdict      = false;
            $traceVariable = null;

            if (null !== $traceClause) {
                $traceVariable        = clone $variable;
                $traceVariableDomains = $traceVariable->getDomains();
            }

            $i = 0;

            foreach ($variable->getDomains() as $realdom) {
                if (false === $_verdict && true === $realdom->predicate($datum)) {
                    $_verdict = true;
                } elseif (null !== $traceClause) {
                    unset($traceVariableDomains[$i--]);
                }

                ++$i;
            }

            if (false === $_verdict) {
                if (null !== $traceClause) {
                    unset($traceClause[$name]);
                }

                $exceptions[] = new $exception(
                    'Variable %s does not verify the constraint @%s %s.',
                    10,
                    [
                        $name,
                        $clause->getName(),
                        $this->getVisitorPraspel()->visit($variable)
                    ]
                );
            } else {
                if (true === $assign) {
                    $variable->setValue($datum);
                }

                if (null !== $traceClause) {
                    unset($traceClause[$name]);
                    $traceClause->addVariable($name, $traceVariable);
                }
            }

            $verdict &= $_verdict;
        }

        $predicateEvaluator = function ($__hoa_arguments, $__hoa_code) {
            extract($__hoa_arguments);

            return true == eval('return ' . $__hoa_code . ';');
        };

        foreach ($clause->getPredicates() as $predicate) {
            $_predicate = $predicate;

            preg_match_all(
                '#(?<!\\\)\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)#',
                $_predicate,
                $matches
            );

            $predicateArguments = [];

            foreach ($matches[1] as $variable) {
                if (true === array_key_exists($variable, $data)) {
                    $predicateArguments[$variable] = $data[$variable];
                }
            }

            if (false !== strpos($_predicate, '\result')) {
                if (!($clause instanceof Praspel\Model\Ensures) &&
                    !($clause instanceof Praspel\Model\Throwable)) {
                    $verdict      &= false;
                    $exceptions[]  = new $exception(
                        'Illegal \result in the following predicate: %s.',
                        11,
                        $predicate
                    );

                    continue;
                }

                $placeholder = '__hoa_praspel_' . uniqid();
                $_predicate  = str_replace(
                    '\\result',
                    '$' . $placeholder,
                    $_predicate
                );
                $predicateArguments[$placeholder] = $data['\result'];
            }

            $_verdict = $predicateEvaluator($predicateArguments, $_predicate);

            if (false === $_verdict) {
                $exceptions[] = new $exception(
                    'Violation of the following predicate: %s.',
                    11,
                    $predicate
                );
            }

            $verdict &= $_verdict;
        }

        if (!empty($trace)) {
            $trace->addClause($traceClause);
        }

        return (bool) $verdict;
    }

    /**
     * Check an exceptional clause.
     *
     * @param   \Hoa\Praspel\Model\Throwable   $clause    Clause.
     * @param   array                         &$data      Data.
     * @return  bool
     * @throws  \Hoa\Praspel\Exception
     */
    protected function checkExceptionalClause(
        Praspel\Model\Throwable $clause,
        Array &$data
    ) {
        $verdict = false;

        foreach ($clause as $identifier) {
            $_exception   = $clause[$identifier];
            $instanceName = $_exception->getInstanceName();

            if ($data['\result'] instanceof $instanceName) {
                $verdict = true;

                break;
            }

            foreach ((array) $_exception->getDisjunction() as $_identifier) {
                $__exception   = $clause[$_identifier];
                $_instanceName = $__exception->getInstanceName();

                if ($exception instanceof $_instanceName) {
                    $verdict = true;

                    break;
                }
            }
        }

        return $verdict;
    }
}


text:
<!DOCTYPE HTML>

<meta charset="UTF-8">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<title>Test of all Helper</title>
<link rel="stylesheet" href="../../resources/css/bootstrap-ppi.css">
<link rel="stylesheet"
    href="../../resources/css/smoothness/jquery-ui-1.9.1.custom.css">
<link rel="stylesheet"
    href="../../resources/css/smoothness/datetimepicker.css">

    <form class="well form-horizontal">
        <fieldset>
            <input layout:fragment="bs_hidden" type="hidden" th:field="*{fId}" />

                Label4show:

                    <var th:id="${fId}" th:text="*{${fId}}">exampleVar</var>

                Label4Text1:

                    <input type="text" th:field="*{${fId}}"> An error Some
                        info

                Label4Text2:

                    <input type="text" />

                Label4Text3:

                    <input type="text" th:field="*{__${fId}__}"> An error Some info

                Label4Date:

                    <input type="text" id="dateId" name="date" value=""
                        class="datepicker"> First
                        error, Second error First info,
                        Second info

                Label4DateTime:

                    <input type="text" id="dateTimeId" name="dateTime" value=""
                        class="datetimepicker"> First
                        error, Second error First info,
                        Second info

                Label4Time:

                    <input type="text" id="timeId" name="time" value=""
                        class="timepicker"> First
                        error, Second error First info,
                        Second info

                Label4TextArea:

                    <textarea id="textAreaId" name="textArea" cols="100" rows="5">example for TextArea
                    </textarea>
                    First error, Second error First info, Second info

                Label4password:

                    <input type="password" id="passwordId" name="password"
                        value="example for password"> First
                        error, Second error First info,
                        Second info

                Label4radioGroupINline:

                     <input type="radio"
                        id="radioGroupInlineId_z" name="radioGroupInline" value="z">
                        Letzter Buchstabe
                      <input type="radio"
                        id="radioGroupInlineId_a" name="radioGroupInline" value="a">
                        Anfangsbuchstabe
                      <input type="radio"
                        id="radioGroupInlineId_b" name="radioGroupInline" value="b"
                        checked> Zweiter Buchstabe
                     First error, Second error First info, Second info

                Label4radioGroup:

                            <input type="radio" id="radioGroupId_z" name="radioGroup"
                            value="z"> Letzter Buchstabe
                      <input type="radio"
                            id="radioGroupId_a" name="radioGroup" value="a">
                            Anfangsbuchstabe
                      <input type="radio"
                            id="radioGroupId_b" name="radioGroup" value="b" checked>
                            Zweiter Buchstabe

                     First error, Second error First info, Second info

                Label4comboBox:

                    <select id="comboBoxId" name="comboBox" class="chzn-select"><option
                            value="z">Letzter Buchstabe</option>
                        <option value="a">Anfangsbuchstabe</option>
                        <option value="b" selected>Zweiter Buchstabe</option>
                    </select> First error, Second error First info, Second info

                Label4checkBox:

                     <input type="checkbox"
                        id="checkBoxId" name="checkBox" value="true" checked> <input
                        type="hidden" name="checkBox" value="false" /> Wahr
                     First error, Second error First info, Second info

                Label4file:

                    <input type="file" id="fileID" name="file"> First error, Second error First info, Second info

        </fieldset>
    </form>


text:
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.displayvideo.api.samples;

import com.beust.jcommander.Parameter;
import com.google.api.services.displayvideo.v1.DisplayVideo;
import com.google.api.services.displayvideo.v1.DisplayVideo.Advertisers.LineItems;
import com.google.api.services.displayvideo.v1.model.AssignedTargetingOption;
import com.google.api.services.displayvideo.v1.model.BrowserAssignedTargetingOptionDetails;
import com.google.api.services.displayvideo.v1.model.BulkEditLineItemAssignedTargetingOptionsRequest;
import com.google.api.services.displayvideo.v1.model.BulkEditLineItemAssignedTargetingOptionsResponse;
import com.google.api.services.displayvideo.v1.model.CreateAssignedTargetingOptionsRequest;
import com.google.api.services.displayvideo.v1.model.DeleteAssignedTargetingOptionsRequest;
import com.google.displayvideo.api.samples.utils.ApiConstants;
import com.google.displayvideo.api.samples.utils.ArgumentNames;
import com.google.displayvideo.api.samples.utils.CodeSampleParams;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * This example edits the targeting of a line item across multiple targeting types. It takes a list
 * of currently assigned browser targeting options and a list of currently assigned device type
 * targeting options to unassign, as well as a list of new browser targeting options to assign.
 */
public class BulkEditAssignedTargetingOptions {

  private static class BulkEditAssignedTargetingOptionsParams extends CodeSampleParams {

    @Parameter(
        names = ArgumentNames.ADVERTISER_ID,
        description =
            "The ID of the parent advertiser of the line item whose targeting is being edited.",
        required = true)
    public Long advertiserId;

    @Parameter(
        names = ArgumentNames.LINE_ITEM_ID,
        description = "The ID of the line item whose targeting is being edited.",
        required = true)
    public Long lineItemId;

    @Parameter(
        names = ArgumentNames.DELETE_BROWSER_OPTIONS,
        description =
            "Currently assigned targeting option IDs of the browser targeting type to unassign"
                + " from the line item.")
    public List<String> deleteBrowserOptions;

    @Parameter(
        names = ArgumentNames.DELETE_DEVICE_OPTIONS,
        description =
            "Currently assigned targeting option IDs of the device targeting type to unassign from"
                + " the line item.")
    public List<String> deleteDeviceOptions;

    @Parameter(
        names = ArgumentNames.CREATE_BROWSER_OPTIONS,
        description =
            "Targeting option IDs of the browser targeting type to assign to the line item.")
    public List<String> createBrowserOptions;
  }

  public static void main(String[] args) throws Exception {
    BulkEditAssignedTargetingOptionsParams params = new BulkEditAssignedTargetingOptionsParams();
    if (!params.parseArguments(args)) {

      // Either pass the required parameters for this example on the command line, or insert them
      // into the code here. See the parameter class definition above for descriptions.
      params.advertiserId = Long.valueOf("INSERT_ADVERTISER_ID_HERE");
      params.lineItemId = Long.valueOf("INSERT_LINE_ITEM_ID_HERE");
      params.deleteBrowserOptions = Arrays.asList("INSERT_DELETE_BROWSER_OPTIONS".split(","));
      params.deleteDeviceOptions = Arrays.asList("INSERT_DELETE_DEVICE_OPTIONS".split(","));
      params.createBrowserOptions = Arrays.asList("INSERT_CREATE_BROWSER_OPTIONS".split(","));
    }

    DisplayVideo service =
        DisplayVideoFactory.getInstance(
            params.clientSecretsFile,
            params.useServiceAccount,
            params.serviceAccountKeyFile,
            params.additionalScopes);

    runExample(
        service,
        params.advertiserId,
        params.lineItemId,
        params.deleteBrowserOptions,
        params.deleteDeviceOptions,
        params.createBrowserOptions);
  }

  public static void runExample(
      DisplayVideo service,
      long advertiserId,
      long lineItemId,
      List<String> deleteBrowserAssignedTargetingIds,
      List<String> deleteDeviceAssignedTargetingIds,
      List<String> createBrowserTargetingIds)
      throws Exception {

    // Create a bulk edit request.
    BulkEditLineItemAssignedTargetingOptionsRequest requestContent =
        new BulkEditLineItemAssignedTargetingOptionsRequest();

    // Build delete request list.
    ArrayList<DeleteAssignedTargetingOptionsRequest> deleteRequests =
        new ArrayList<DeleteAssignedTargetingOptionsRequest>();

    // Add browser assigned targeting option IDs to delete request list.
    deleteRequests.add(
        new DeleteAssignedTargetingOptionsRequest()
            .setTargetingType(ApiConstants.BROWSER_TARGETING_TYPE)
            .setAssignedTargetingOptionIds(deleteBrowserAssignedTargetingIds));

    // Add household income assigned targeting option IDs to delete request list.
    deleteRequests.add(
        new DeleteAssignedTargetingOptionsRequest()
            .setTargetingType(ApiConstants.DEVICE_TARGETING_TYPE)
            .setAssignedTargetingOptionIds(deleteDeviceAssignedTargetingIds));

    // Set delete requests in edit request.
    requestContent.setDeleteRequests(deleteRequests);

    // Build create request list.
    ArrayList<CreateAssignedTargetingOptionsRequest> createRequests =
        new ArrayList<CreateAssignedTargetingOptionsRequest>();

    // Create browser assigned targeting option create request.
    CreateAssignedTargetingOptionsRequest createBrowserTargetingRequest =
        new CreateAssignedTargetingOptionsRequest()
            .setTargetingType(ApiConstants.BROWSER_TARGETING_TYPE);

    // Create and set list of browser assigned targeting options.
    ArrayList<AssignedTargetingOption> createBrowserAssignedTargetingOptions =
        new ArrayList<AssignedTargetingOption>();
    for (String targetingOptionId : createBrowserTargetingIds) {
      createBrowserAssignedTargetingOptions.add(
          new AssignedTargetingOption()
              .setBrowserDetails(
                  new BrowserAssignedTargetingOptionDetails()
                      .setTargetingOptionId(targetingOptionId)));
    }
    createBrowserTargetingRequest.setAssignedTargetingOptions(
        createBrowserAssignedTargetingOptions);

    // Add browser assigned targeting options to create request list.
    createRequests.add(createBrowserTargetingRequest);

    // Set create requests in edit request.
    requestContent.setCreateRequests(createRequests);

    // Configure the bulk list request.
    LineItems.BulkEditLineItemAssignedTargetingOptions request =
        service
            .advertisers()
            .lineItems()
            .bulkEditLineItemAssignedTargetingOptions(advertiserId, lineItemId, requestContent);

    // Execute bulk edit request.
    BulkEditLineItemAssignedTargetingOptionsResponse response = request.execute();

    // Check if response is empty.
    // If not, iterate over created AssignedTargetingOptions.
    if (response.isEmpty()) {
      System.out.print("Bulk edit request created no new AssignedTargetingOptions");
    } else {
      for (AssignedTargetingOption assignedOption : response.getCreatedAssignedTargetingOptions()) {
        System.out.printf("AssignedTargetingOption %s was created%n", assignedOption.getName());
      }
    }
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/transparent_black_80"
    android:clickable="true"
    android:gravity="center"
    android:orientation="vertical"
    android:padding="10dp" >

    <TextView
        style="@style/text_network_error"
        android:text="@string/network_error_header"
        android:textSize="15sp" />

    <TextView
        style="@style/text_network_error"
        android:layout_marginTop="5dp"
        android:text="@string/network_error_message" />

</LinearLayout>


text:
.class Lcom/android/settings/RadioInfo$8;
.super Ljava/lang/Object;
.source "RadioInfo.java"

# interfaces
.implements Landroid/view/MenuItem$OnMenuItemClickListener;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/settings/RadioInfo;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Lcom/android/settings/RadioInfo;

# direct methods
.method constructor <init>(Lcom/android/settings/RadioInfo;)V
    .locals 0

    iput-object p1, p0, Lcom/android/settings/RadioInfo$8;->this$0:Lcom/android/settings/RadioInfo;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public onMenuItemClick(Landroid/view/MenuItem;)Z
    .locals 4

    const/4 v3, 0x1

    iget-object v1, p0, Lcom/android/settings/RadioInfo$8;->this$0:Lcom/android/settings/RadioInfo;

    invoke-static {v1}, Lcom/android/settings/RadioInfo;->-get14(Lcom/android/settings/RadioInfo;)Landroid/telephony/TelephonyManager;

    move-result-object v1

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getDataState()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    :pswitch_0
    return v3

    :pswitch_1
    iget-object v1, p0, Lcom/android/settings/RadioInfo$8;->this$0:Lcom/android/settings/RadioInfo;

    invoke-static {v1}, Lcom/android/settings/RadioInfo;->-get15(Lcom/android/settings/RadioInfo;)Lcom/android/internal/telephony/Phone;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/android/internal/telephony/Phone;->setDataEnabled(Z)V

    goto :goto_0

    :pswitch_2
    iget-object v1, p0, Lcom/android/settings/RadioInfo$8;->this$0:Lcom/android/settings/RadioInfo;

    invoke-static {v1}, Lcom/android/settings/RadioInfo;->-get15(Lcom/android/settings/RadioInfo;)Lcom/android/internal/telephony/Phone;

    move-result-object v1

    invoke-virtual {v1, v3}, Lcom/android/internal/telephony/Phone;->setDataEnabled(Z)V

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_2
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method


text:
"""Test I/O."""
import logging

from tensorpac.io import (set_log_level, is_pandas_installed,
                          is_statsmodels_installed, progress_bar)

logger = logging.getLogger('tensorpac')

levels = ['profiler', 'debug', 'info', 'warning', 'error', 'critical']

class TestIO(object):
    """Test statistical functions."""

    def test_log_level(self):
        """Test setting the log level."""
        for l in levels:
            set_log_level(l)
        set_log_level(False)
        set_log_level(True)
        set_log_level(match="ok")
        logger.info("show me ok")
        logger.info("show me")

    def test_logger(self):
        """Test logger levels."""
        set_log_level("profiler")
        logger.profiler("profiler")
        logger.debug("debug")
        logger.info("info")
        logger.warning("warning")
        logger.critical("critical")

    def test_progress_bar(self):
        """Test progress bar."""
        progress_bar(5, 10)

    def test_dependance(self):
        """Test dependancies."""
        is_statsmodels_installed()
        is_pandas_installed()


text:
use std::fmt::Debug;
// Rustfix should add this, or use `std::fmt::Debug` instead.

#[allow(dead_code)]
fn test_impl(t: impl Sized) {
    println!("{:?}", t);
    //~^ ERROR doesn't implement
}

#[allow(dead_code)]
fn test_no_bounds<T>(t: T) {
    println!("{:?}", t);
    //~^ ERROR doesn't implement
}

#[allow(dead_code)]
fn test_one_bound<T: Sized>(t: T) {
    println!("{:?}", t);
    //~^ ERROR doesn't implement
}

#[allow(dead_code)]
fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, {
    println!("{:?} {:?}", x, y);
    //~^ ERROR doesn't implement
}

#[allow(dead_code)]
fn test_one_bound_where<X>(x: X) where X: Sized {
    println!("{:?}", x);
    //~^ ERROR doesn't implement
}

#[allow(dead_code)]
fn test_many_bounds_where<X>(x: X) where X: Sized, X: Sized {
    println!("{:?}", x);
    //~^ ERROR doesn't implement
}

trait Foo<T> {
    const SIZE: usize = core::mem::size_of::<Self>();
    //~^ ERROR the size for values of type `Self` cannot be known at compilation time
}

trait Bar: std::fmt::Display {
    const SIZE: usize = core::mem::size_of::<Self>();
    //~^ ERROR the size for values of type `Self` cannot be known at compilation time
}

trait Baz where Self: std::fmt::Display {
    const SIZE: usize = core::mem::size_of::<Self>();
    //~^ ERROR the size for values of type `Self` cannot be known at compilation time
}

trait Qux<T> where Self: std::fmt::Display {
    const SIZE: usize = core::mem::size_of::<Self>();
    //~^ ERROR the size for values of type `Self` cannot be known at compilation time
}

trait Bat<T>: std::fmt::Display {
    const SIZE: usize = core::mem::size_of::<Self>();
    //~^ ERROR the size for values of type `Self` cannot be known at compilation time
}

fn main() { }


text:
layout: post
title: How to whitelist a device
excerpt: In somes cases as admin you might like to bypass some of the devices from login authentication and data limit. Follow the below steps to achieve that.
---

**1. Connect to Griggi network**

You need to be in the premise for this task. Connect to the network via WiFi or cable.

**2. SSH to the router**
1. If you are using Linux, use the terminal command: ssh root@192.168.7.1
2. If you are using Windows, use Putty. Select protocol as ssh or ensure port is 22.

**3. Add the mac address to be whitelisted**
1.  Open the config file using command: vi /etc/wifidog.conf
2.  Scroll down until you find a section TrustedMACList.
3.  Add the mac address following the example given under the section.
4.  If any mistake in editing the file, quit by pressing escape key and :q! and re-open the file.

**3. Restart the router**
1.  Your device is whitelisted now.


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<title>Play Spark React</title>

<meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta  name="generator" content="Org-mode" />
<meta  name="author" content="atWare, inc" />
<meta  name="description" content="A little love, from atWare"
 />

Play Spark React

About This Application

This application demonstrates how to integrate Play and Apache Spark together, using Spark SQL to perform a
non-trivial query. The application has a minimal user interface as well, mapping coordinates to
the Google Map API with React and a Bootstrap Toolbar from the React Bootstrap project.

This project uses data from the World Ocean Database (WOD), maintained by the (US) National Oceanic and Atmospheric Administration.
It reads a small subset of WOD data that has been downloaded and parsed separately (specifically,
Moored Buoys (MRB) data from around Japan) and determines possible locations for ゴジラ (Godzilla), a potentially fictious marine animal.

At a high level, when the application is started, for example, via Activator, a Spark instance is created in memory,
and a Play-based web application is started.

When you navigate your browser to http://localhost:9000, a request is made to the server, and a response is generated
using a Play template. This template returns HTML and loads React via requirejs.
A JS request to http://localhost:9000/locations/ (plus a number - for example, http://localhost:9000/locations/13)
is serviced by a Play controller function that makes a request to Spark to execute a job and return the results.
Assuming that a valid request is made and all goes well, a JSON response will be returned.

Results are retrieved from Spark as a Spark DataFrame, and are mapped to a list of Location classes before being converted to JSON as the response.

The User Interface

The Refinement toolbar buttons change the threshold of deviation from the average temperature required to
"get a hit". Low refinement results in more markers, high refinement only one. The default is medium.

Spark

Configuration is provided in the application.conf file. When the Akka system starts, Spark is booted
as well.

Data is provided in the data.json file. To spare you the trouble, it looks like this only bigger:

{"$type": "noaa.parser.Entry","castNumber": 10071185,"cruiseId": "JP-0","date": "2000-01-12","latitude": 34.5667,"longitude": 139.8667,"depth": 0.0,"temperature": 17.94}
{"$type": "noaa.parser.Entry","castNumber": 10071185,"cruiseId": "JP-0","date": "2000-01-12","latitude": 34.5667,"longitude": 139.8667,"depth": 50.0,"temperature": 17.83}
{"$type": "noaa.parser.Entry","castNumber": 10071185,"cruiseId": "JP-0","date": "2000-01-12","latitude": 34.5667,"longitude": 139.8667,"depth": 99.0,"temperature": 17.78}

The main prerogative of this application is to demonstrate a simple application using Play and Spark.
In this specific case we are starting Spark in the same JVM as the Play app server.
In a production setting, you will not want to run Spark in this manner.

The master-uri in the configuration file can be changed to reference a standalone Spark cluster.
However, you may or may not want to load the test data into it, so consider that before doing so.

The Client

Facebook React provides a framework for building nice a component-based user interface.
This application uses the JavaScript syntax extension, JSX. The code for the client is located in
the public directory.
Requirejs is used for dependency management, the requirejs configuration is located in main.js.

main.js loads and initializes app.jsx.

App.jsx is responsible for making the ajax call for location data (using JQuery),
and creating the two React components- the Toolbar and the Map.

Map.jsx creates the Google Map and places LatLng locations and Markers. It responds to changes in location data
automatically because it is owned by the App component.

Toolbar.jsx creates an extremely simple Bootstrap toolbar. The onclick events of the toolbar call the filter function
in app.jsx, passing hardcoded values used in the server-side service to refine the query for data.


text:
package com.kakao.hbase.common.util;

import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.RegionSplitter;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

public class DecimalStringSplitTest {
    @Test
    public void testSplit10_10() throws Exception {
        int numRegions = 10;
        int cardinality = 10;

        RegionSplitter.SplitAlgorithm splitAlgorithm = new DecimalStringSplit(cardinality);
        byte[][] splits = splitAlgorithm.split(numRegions);
        assertEquals(numRegions - 1, splits.length);

        int digits = 2;
        assertEquals(String.format("%0" + digits + "d", 1), Bytes.toString(splits[0]));
        assertEquals(String.format("%0" + digits + "d", 9), Bytes.toString(splits[numRegions - 2]));
    }

    @Test
    public void testSplit3_10() throws Exception {
        int numRegions = 3;
        int cardinality = 10;

        RegionSplitter.SplitAlgorithm splitAlgorithm = new DecimalStringSplit(cardinality);
        byte[][] splits = splitAlgorithm.split(numRegions);
        assertEquals(numRegions - 1, splits.length);

        int digits = 2;
        assertEquals(String.format("%0" + digits + "d", 3), Bytes.toString(splits[0]));
        assertEquals(String.format("%0" + digits + "d", 6), Bytes.toString(splits[numRegions - 2]));
    }

    @Test
    public void testSplit300_1000() throws Exception {
        int numRegions = 300;
        int cardinality = 1000;

        RegionSplitter.SplitAlgorithm splitAlgorithm = new DecimalStringSplit(cardinality);
        byte[][] splits = splitAlgorithm.split(numRegions);
        assertEquals(numRegions - 1, splits.length);

        int digits = 4;
        assertEquals(String.format("%0" + digits + "d", 3), Bytes.toString(splits[0]));
        assertEquals(String.format("%0" + digits + "d", 6), Bytes.toString(splits[1]));
        assertEquals(String.format("%0" + digits + "d", 10), Bytes.toString(splits[2]));
        assertEquals(String.format("%0" + digits + "d", 996), Bytes.toString(splits[numRegions - 2]));
    }

    @Test
    public void testDigits() throws Exception {
        assertEquals(1, DecimalStringSplit.digits(0));
        assertEquals(1, DecimalStringSplit.digits(1));
        assertEquals(1, DecimalStringSplit.digits(9));
        assertEquals(2, DecimalStringSplit.digits(10));
        assertEquals(2, DecimalStringSplit.digits(99));
        assertEquals(3, DecimalStringSplit.digits(100));
        assertEquals(6, DecimalStringSplit.digits(100000));
        assertEquals(1, DecimalStringSplit.digits(-1));
    }

    @Test
    public void testSplitPoint() throws Exception {
        assertEquals(1, DecimalStringSplit.splitPoint(10, 10, 0));
        assertEquals(9, DecimalStringSplit.splitPoint(10, 10, 8));
        try {
            assertEquals(1, DecimalStringSplit.splitPoint(10, 10, 9));
            fail();
        } catch (IndexOutOfBoundsException ignore) {
        }

        assertEquals(10, DecimalStringSplit.splitPoint(10, 100, 0));
        assertEquals(90, DecimalStringSplit.splitPoint(10, 100, 8));
        try {
            assertEquals(10, DecimalStringSplit.splitPoint(10, 100, 9));
            fail();
        } catch (IndexOutOfBoundsException ignore) {
        }

        assertEquals(3, DecimalStringSplit.splitPoint(30, 100, 0));
        assertEquals(6, DecimalStringSplit.splitPoint(30, 100, 1));
        assertEquals(10, DecimalStringSplit.splitPoint(30, 100, 2));
        assertEquals(13, DecimalStringSplit.splitPoint(30, 100, 3));

        assertEquals(3, DecimalStringSplit.splitPoint(333, 1000, 0));
        assertEquals(6, DecimalStringSplit.splitPoint(333, 1000, 1));
        assertEquals(9, DecimalStringSplit.splitPoint(333, 1000, 2));
        assertEquals(12, DecimalStringSplit.splitPoint(333, 1000, 3));
        assertEquals(996, DecimalStringSplit.splitPoint(333, 1000, 331));

        assertEquals(33, DecimalStringSplit.splitPoint(3, 100, 0));
        assertEquals(66, DecimalStringSplit.splitPoint(3, 100, 1));

        assertEquals(33, DecimalStringSplit.splitPoint(30, 1000, 0));
        assertEquals(66, DecimalStringSplit.splitPoint(30, 1000, 1));
        assertEquals(100, DecimalStringSplit.splitPoint(30, 1000, 2));
        assertEquals(133, DecimalStringSplit.splitPoint(30, 1000, 3));
        assertEquals(166, DecimalStringSplit.splitPoint(30, 1000, 4));
        assertEquals(200, DecimalStringSplit.splitPoint(30, 1000, 5));

        assertEquals(2, DecimalStringSplit.splitPoint(50, 100, 0));
        assertEquals(4, DecimalStringSplit.splitPoint(50, 100, 1));
    }
}


text:
package net.trolldad.dashclock.redditheadlines.preferences;

import net.trolldad.dashclock.redditheadlines.R;

import org.androidannotations.annotations.sharedpreferences.DefaultBoolean;
import org.androidannotations.annotations.sharedpreferences.DefaultRes;
import org.androidannotations.annotations.sharedpreferences.DefaultString;
import org.androidannotations.annotations.sharedpreferences.SharedPref;

/**
 * Created by jacob-tabak on 1/3/14.
 */
@SharedPref(value=SharedPref.Scope.APPLICATION_DEFAULT)
public interface MyPrefs {
    @DefaultString("pics")
    String subreddit();

    @DefaultString("hot")
    String sortOrder();

    String redditUser();

    String redditPassword();

    String modHash();

    String cookie();

    @DefaultRes(R.string.open_link)
    String actionOnClick();

    @DefaultBoolean(true)
    boolean usePreview();

    boolean hqImages();
}


text:
<?php

namespace Oro\Bundle\ImportExportBundle\Field;

use Doctrine\Common\Util\ClassUtils;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Mapping\ClassMetadata;
use Oro\Bundle\EntityBundle\Helper\FieldHelper;
use Oro\Bundle\EntityBundle\ORM\DoctrineHelper;
use Oro\Bundle\SecurityBundle\Authentication\TokenAccessorInterface;
use Oro\Bundle\SecurityBundle\Owner\Metadata\OwnershipMetadataProvider;
use Oro\Component\DependencyInjection\ServiceLink;

/**
 * Provides interface for encapsulated operations with persistent layer for import/export handlers.
 * Adds additional cache to avoid redundant repository operations.
 */
class DatabaseHelper
{
    /**
     * @var DoctrineHelper
     */
    protected $doctrineHelper;

    /**
     * @var ServiceLink
     */
    protected $fieldHelperLink;

    /**
     * @var array
     */
    protected $entities = [];

    /**
     * @var TokenAccessorInterface
     */
    protected $tokenAccessor;

    /**
     * @var ServiceLink
     */
    protected $ownershipMetadataProviderLink;

    /**
     * @var array
     */
    protected $organizationLimitsByEntity = [];

    /**
     * @param DoctrineHelper         $doctrineHelper
     * @param ServiceLink            $fieldHelperLink
     * @param TokenAccessorInterface $tokenAccessor
     * @param ServiceLink            $ownershipMetadataProviderLink
     */
    public function __construct(
        DoctrineHelper $doctrineHelper,
        ServiceLink $fieldHelperLink,
        TokenAccessorInterface $tokenAccessor,
        ServiceLink $ownershipMetadataProviderLink
    ) {
        $this->doctrineHelper = $doctrineHelper;
        $this->fieldHelperLink = $fieldHelperLink;
        $this->tokenAccessor = $tokenAccessor;
        $this->ownershipMetadataProviderLink = $ownershipMetadataProviderLink;
    }

    /**
     * @param string $entityName
     * @param array $criteria
     * @return object|null
     */
    public function findOneBy($entityName, array $criteria)
    {
        $serializationCriteria = [];
        $where = [];

        foreach ($criteria as $field => $value) {
            if (is_object($value)) {
                $serializationCriteria[$field] = $this->getIdentifier($value);
            } else {
                $serializationCriteria[$field] = $value;
            }
            if (null === $serializationCriteria[$field]) {
                $where[] = sprintf('e.%s IS NULL', $field);
                unset($criteria[$field]);
            } else {
                $where[] = sprintf('e.%s = :%s', $field, $field);
            }
        }

        $storageKey = $this->getStorageKey($serializationCriteria);

        if (empty($this->entities[$entityName]) || !array_key_exists($storageKey, $this->entities[$entityName])) {
            /** @var EntityRepository $entityRepository */
            $entityRepository = $this->doctrineHelper->getEntityRepository($entityName);
            $queryBuilder = $entityRepository->createQueryBuilder('e')
                ->andWhere(implode(' AND ', $where))
                ->setParameters($criteria)
                ->setMaxResults(1);

            if ($this->shouldBeAddedOrganizationLimits($entityName)) {
                /** @var OwnershipMetadataProvider $ownershipMetadataProvider */
                $ownershipMetadataProvider = $this->ownershipMetadataProviderLink->getService();
                $organizationField = $ownershipMetadataProvider->getMetadata($entityName)->getOrganizationFieldName();
                $queryBuilder->andWhere('e.' . $organizationField . ' = :organization')
                    ->setParameter('organization', $this->tokenAccessor->getOrganization());
            }

            $this->entities[$entityName][$storageKey] = $queryBuilder->getQuery()->getOneOrNullResult();
        }

        return $this->entities[$entityName][$storageKey];
    }

    /**
     * @param object $entity
     * @return null|object
     */
    public function findOneByIdentity($entity)
    {
        $entityName = ClassUtils::getClass($entity);
        $identifier = $this->getIdentifier($entity);
        $existingEntity = null;

        // find by identifier
        if ($identifier) {
            $existingEntity = $this->find($entityName, $identifier);
        }

        // find by identity fields
        if (!$existingEntity) {
            /** @var FieldHelper $fieldHelper */
            $fieldHelper = $this->fieldHelperLink->getService();
            $identityValues = $fieldHelper->getIdentityValues($entity);

            // search only by existing identities
            foreach ($identityValues as $value) {
                if (null !== $value && '' !== $value) {
                    $existingEntity = $this->findOneBy($entityName, $identityValues);
                    break;
                }
            }
        }

        return $existingEntity;
    }

    /**
     * @param object $entity
     * @return object
     */
    public function getEntityReference($entity)
    {
        $entityName = ClassUtils::getClass($entity);
        $identifier = $this->getIdentifier($entity);

        return $this->doctrineHelper->getEntityReference($entityName, $identifier);
    }

    /**
     * @param string $entityName
     * @param int|string $identifier
     * @return object|null
     */
    public function find($entityName, $identifier)
    {
        $storageKey = $this->getStorageKey(
            [$this->doctrineHelper->getSingleEntityIdentifierFieldName($entityName) => $identifier]
        );

        if (!empty($this->entities[$entityName][$storageKey])) {
            return $this->entities[$entityName][$storageKey];
        }

        $entity = $this->doctrineHelper->getEntity($entityName, $identifier);

        if ($entity && $this->shouldBeAddedOrganizationLimits($entityName)) {
            $ownershipMetadataProvider = $this->ownershipMetadataProviderLink->getService();
            $organizationField = $ownershipMetadataProvider->getMetadata($entityName)->getOrganizationFieldName();
            /** @var FieldHelper $fieldHelper */
            $fieldHelper = $this->fieldHelperLink->getService();
            $entityOrganization = $fieldHelper->getObjectValue($entity, $organizationField);
            if (!$entityOrganization
                || $entityOrganization->getId() !== $this->tokenAccessor->getOrganizationId()
            ) {
                return null;
            }
        }

        $this->entities[$entityName][$storageKey] = $entity;

        return $entity;
    }

    /**
     * @param array $criteria
     * @return string
     */
    protected function getStorageKey(array $criteria = [])
    {
        ksort($criteria);
        return serialize($criteria);
    }

    /**
     * @param object $entity
     * @return int|string|null
     */
    public function getIdentifier($entity)
    {
        return $this->doctrineHelper->getSingleEntityIdentifier($entity);
    }

    /**
     * @param string $entityName
     * @return string
     */
    public function getIdentifierFieldName($entityName)
    {
        return $this->doctrineHelper->getSingleEntityIdentifierFieldName($entityName);
    }

    /**
     * @param string $entityName
     * @param string $fieldName
     * @return bool
     */
    public function isCascadePersist($entityName, $fieldName)
    {
        /** @var EntityManager $entityManager */
        $entityManager = $this->doctrineHelper->getEntityManager($entityName);
        $association = $entityManager->getClassMetadata($entityName)->getAssociationMapping($fieldName);
        return !empty($association['cascade']) && in_array('persist', $association['cascade']);
    }

    /**
     * @param string $entityName
     * @param string $fieldName
     * @return string|null
     */
    public function getInversedRelationFieldName($entityName, $fieldName)
    {
        /** @var EntityManager $entityManager */
        $entityManager = $this->doctrineHelper->getEntityManager($entityName);
        $association = $entityManager->getClassMetadata($entityName)->getAssociationMapping($fieldName);

        if (!empty($association['mappedBy'])) {
            return $association['mappedBy'];
        }

        if (!empty($association['inversedBy'])) {
            return $association['inversedBy'];
        }

        return null;
    }

    /**
     * @param string $entityName
     * @param string $fieldName
     * @return bool
     */
    public function isSingleInversedRelation($entityName, $fieldName)
    {
        /** @var EntityManager $entityManager */
        $entityManager = $this->doctrineHelper->getEntityManager($entityName);
        $association = $entityManager->getClassMetadata($entityName)->getAssociationMapping($fieldName);

        return in_array($association['type'], [ClassMetadata::ONE_TO_ONE, ClassMetadata::ONE_TO_MANY]);
    }

    /**
     * @param object $entity
     */
    public function resetIdentifier($entity)
    {
        $entityName = ClassUtils::getClass($entity);
        /** @var EntityManager $entityManager */
        $entityManager = $this->doctrineHelper->getEntityManager($entityName);
        $identifierField = $this->getIdentifierFieldName($entityName);
        $entityManager->getClassMetadata($entityName)->setIdentifierValues($entity, [$identifierField => null]);
    }

    /**
     * Clear cache on doctrine entity manager clear
     */
    public function onClear()
    {
        $this->entities = [];
        $this->organizationLimitsByEntity = [];
    }

    /**
     * We should limit data with current organization
     *
     * @param string $entityName
     * @return bool
     */
    protected function shouldBeAddedOrganizationLimits($entityName)
    {
        if (!array_key_exists($entityName, $this->organizationLimitsByEntity)) {
            $this->organizationLimitsByEntity[$entityName] = $this->tokenAccessor->getOrganization()
                && $this->ownershipMetadataProviderLink
                    ->getService()
                    ->getMetadata($entityName)
                    ->getOrganizationFieldName();
        }

        return $this->organizationLimitsByEntity[$entityName];
    }
}


text:
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.sync;

import android.app.Application;
import android.content.Context;

/**
 * A sync adapter for Chrome.
 */
public class ChromeBrowserSyncAdapter extends ChromiumSyncAdapter {
    public ChromeBrowserSyncAdapter(Context context, Application application) {
        super(context, application);
    }

    @Override
    protected boolean useAsyncStartup() {
        return false;
    }
}