text:
title:  Verdieping
date:   10/12/2021
---

### Deuteronomium in andere Bijbelboeken

Jeremia 7:1-7

#### IJsbrekervraag

`Wanneer leidt een reorganisatie tot een reformatie?`

#### Ik Verken

Koning Josia had in 622 v. Chr. de tempeldienst weer hersteld, na de vondst van 'het wetboek'. Het was een reorganisatie die helaas geen diepgaande reformatie onder het volk tot gevolg had. In dit gedeelte van het boek Jeremia worden de Judeeërs gewaarschuwd hun leven alsnog te beteren. Doen ze dat, dan mogen ze in het land Israël blijven wonen. De Heer draagt hen op elkaar weer rechtvaardig te behandelen, vreemdelingen, wezen en weduwen niet meer te onderdrukken, geen onschuldigen meer te doden en niet langer aan afgoderij te doen. De woorden van Jeremia 7:5-7 sluiten aan op reeds in Deuteronomium voorkomende bepalingen. Ook van ons verlangt de Heer dat we Hem boven alles liefhebben en liefdevol omgaan met onze naasten. Jeremia 7:1-7 stamt uit de periode van koning Jojakim (608-597 v.Chr.), kort voordat Jeruzalem in 586 v.Chr. door de Babyloniërs werd verwoest.

#### Ik Bestudeer

Jeremia 7:4 zegt dat de aanwezigheid van de tempel van de Heer geen garantie is voor een voorspoedig leven. In vers 5 wordt benadrukt dat de Israëlieten elkaar rechtvaardig moeten behandelen.

`Wat betekent dat, als je hierbij Deuteronomium 16:18-20; 25:16 en Jeremia 5:1,28 leest?`

`Wat heeft Matteüs 23:23 (HSV) met Jeremia 7:5 te maken?`

Vers 6 maakt duidelijk wie vaak niet rechtvaardig werden behandeld: vreemdelingen, wezen en weduwen.

`Welke aanwijzingen voor een goede behandeling van dergelijke mensen geeft Deuteronomium 24:17-21?`

`Hoe maakte Mozes aan het volk duidelijk hoezeer de Heer onrechtvaardige behandeling van die groep personen verafschuwt? Zie Deuteronomium 27:19.`

`Wat kan onrecht in de hand werken of in stand houden? Zie Jesaja 10:1-2.`

Vreemdelingen, wezen en weduwen waren kwetsbaar, omdat ze afhankelijk waren van sociale voorzieningen of de barmhartigheid van andere mensen. Vanwege hun maatschappelijke positie lag misbruik op de loer. In Jeremia 7:6 staat ook de oproep geen onschuldig bloed te vergieten.

`Op welke manier maakt Matteüs 23:35 duidelijk dat deze oproep absoluut nodig was? Vgl. Jeremia 2:34; 19:4; 22:3.`

`Hoe hielp de voorziening van de vrijsteden (Deuteronomium 19:1-10) voorkomen dat mensen onschuldig werden vermoord?`

Ook aan het in Jeremia 7:6 genoemde 'achter andere goden aanlopen' (afgoderij) wordt in Deuteronomium aandacht besteed (Deuteronomium 4:16; 5:7-8;11:28).

`Met welke woorden omschrijft de Heer het onheil dat Israël treft, wanneer ze aan afgoderij doen? Zie Deuteronomium 31:16-18.`

De landbelofte in Jeremia 7:3,7 komen we ook tegen in Deuteronomium 5:31-33; 30:20; 3 2 : 4 6 - 4 7.

`Welke voorwaarden voor wonen in het land staan in deze gedeelten?`

`Psalm 148 Waar roept deze Psalm ons toe op?`

#### Ik Pas Toe

Kerkgang is net zo min zaligmakend als tempelbezoek.

`Waarom is kerkgang wel nuttig?`

Een andere structuur leidt niet automatisch tot een andere cultuur.

`Hoe kan een politieke of godsdienstige structuur aandacht voor de zwakkeren bevorderen of belemmeren?`

In Deuteronomium 10:18 staat dat de Heer weduwen en wezen recht verschaft, vreemdelingen in bescherming neemt en hen van voedsel en kleding voorziet.

`Hoe doet Hij dat volgens jou? Zie ook Jakobus 1:27.`

Een uitdrukking luidt: 'Geld maakt blind.'

`Om wat voor soort blindheid gaat het dan en hoe kun je zoiets voorkomen?`

Machthebbers (koningen, presidenten, ministers, e.d.) hebben een grote verantwoordelijkheid als het gaat om de bescherming van de zwakkeren.

`Welke bijdrage kunnen wij als burgers leveren aan een goede behandeling van deze groep?`

Wanneer je andere goden dan God vereert, leidt dat vroeg of laat tot onheil.

`Waar denk jij aan bij het woord 'afgod'?`

In Matteüs 5:5 staat: 'Gelukkig de zachtmoedigen, want zij zullen het land bezitten.'

`Hoe verduidelijkt dit vers Jeremia 7:5-7?`

#### Ik bid …

Heer, doe mij voortdurend beseffen dat uw gaven aan mij verantwoordelijkheden met zich meebrengen. Help mij om U steeds op de eerste plaats in mijn leven te stellen en niet alleen voor mijn eigen belangen op te komen, maar ook voor die van anderen. Amen.


text:
package com.llmaps.dm.core.data.types;

import com.llmaps.dm.core.data.DataConstants;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.nio.ByteBuffer;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import org.junit.Test;
import static org.junit.Assert.*;
import org.junit.Before;

/**
 *
 * @author Vojtech Krizek
 */
public class DateTimeDataTypeTest {

	private DateTimeDataType dataType;

	@Before
	public void before() {
		dataType = new DateTimeDataType();
	}

	@Test
	public void testParseValue() throws Exception {
		OffsetDateTime result = dataType.parseValue(
				"2014-08-18T13:48:56.57-05:00");
		assertEquals(2014, result.getYear());
		assertEquals(8, result.getMonthValue());
		assertEquals(18, result.getDayOfMonth());
		assertEquals(13, result.getHour());
		assertEquals(48, result.getMinute());
		assertEquals(56, result.getSecond());
		assertEquals(570000000, result.getNano());
		assertEquals(-3600 * 5, result.getOffset().getTotalSeconds());

		result = dataType.parseValue("2014-08-18T13:48:56.57");
		assertEquals(2014, result.getYear());
		assertEquals(8, result.getMonthValue());
		assertEquals(18, result.getDayOfMonth());
		assertEquals(13, result.getHour());
		assertEquals(48, result.getMinute());
		assertEquals(56, result.getSecond());
		assertEquals(570000000, result.getNano());

		int offset = ZoneOffset.systemDefault().getRules().getOffset(
				LocalDateTime.of(2014, 8, 18, 13, 48, 56, 570000000)).
				getTotalSeconds();
		assertEquals(offset, result.getOffset().getTotalSeconds());
	}

	@Test
	public void testPrintValue() {
		String result = dataType.printValue(OffsetDateTime.of(2014, 8, 18, 14,
				57, 56,
				520000000, ZoneOffset.ofHours(4)));
		assertEquals("2014-08-18T14:57:56.52+04:00", result);
	}

	@Test
	public void testReadValue() throws Exception {
		ByteArrayOutputStream bos = new ByteArrayOutputStream();
		try (DataOutputStream dos = new DataOutputStream(bos)) {
			dos.writeInt(2014);
			dos.writeInt(8);
			dos.writeInt(18);
			dos.writeInt(13);
			dos.writeInt(48);
			dos.writeInt(56);
			dos.writeInt(570000000);
			dos.writeInt(7 * 3600);
		}

		OffsetDateTime result = dataType.readValue(new DataInputStream(
				new ByteArrayInputStream(bos.toByteArray())));
		assertEquals(2014, result.getYear());
		assertEquals(8, result.getMonthValue());
		assertEquals(18, result.getDayOfMonth());
		assertEquals(13, result.getHour());
		assertEquals(48, result.getMinute());
		assertEquals(56, result.getSecond());
		assertEquals(570000000, result.getNano());
		assertEquals(3600 * 7, result.getOffset().getTotalSeconds());
	}

	@Test
	public void testWriteValue() throws Exception {
		ByteArrayOutputStream bos = new ByteArrayOutputStream();
		try (DataOutputStream dos = new DataOutputStream(bos)) {
			dataType.writeValue(dos, OffsetDateTime.of(2014, 8, 18, 14, 57, 56,
					520000000, ZoneOffset.ofHours(4)));
		}
		assertEquals(4 * 8, bos.toByteArray().length);
		assertEquals(2014, ByteBuffer.wrap(bos.toByteArray(), 0, 4).getInt());
		assertEquals(8, ByteBuffer.wrap(bos.toByteArray(), 4, 4).getInt());
		assertEquals(18, ByteBuffer.wrap(bos.toByteArray(), 8, 4).getInt());
		assertEquals(14, ByteBuffer.wrap(bos.toByteArray(), 12, 4).getInt());
		assertEquals(57, ByteBuffer.wrap(bos.toByteArray(), 16, 4).getInt());
		assertEquals(56, ByteBuffer.wrap(bos.toByteArray(), 20, 4).getInt());
		assertEquals(520000000, ByteBuffer.wrap(bos.toByteArray(), 24, 4).getInt());
		assertEquals(4 * 3600, ByteBuffer.wrap(bos.toByteArray(), 28, 4).
				getInt());
	}

	@Test
	public void testGetId() {
		assertEquals(DataConstants.TYPE_DATE_TIME, dataType.getId());
	}

}

redpajama_set_name: RedPajamaGithub


text:
option(IVW_CFG_EMBED_SHADERS
    [[Embed shaders files as code in the executable. Makes distribution easier, but removes possibility of runtime modifications.]]
    OFF
)

function(ivw_handle_shader_resources path)
    # Handle external resources
    if(IVW_CFG_EMBED_SHADERS)
        ivw_generate_shader_resource(${path} ${ARGN})
    else()
        # Add shader directory to pack
        ivw_add_to_module_pack(${path})

        string(TOUPPER ${PROJECT_NAME} u_project_name)
        set(U_MODULE ${u_project_name})
        string(TOLOWER ${PROJECT_NAME} l_project_name)
        set(L_MODULE ${l_project_name})
        set(ADD_INCLUDES "")
        set(ADD_RESOURCES "")
        ivw_private_get_ivw_module_include_path(${CMAKE_CURRENT_LIST_DIR} includePrefix includePath orgName)
        configure_file(${IVW_CMAKE_TEMPLATES}/shader_resource_template.h
                       ${CMAKE_CURRENT_BINARY_DIR}/include/${includePrefix}/shader_resources.h)
    endif()
endfunction()

#--------------------------------------------------------------------
# Create CMAKE file for pre-process
function(ivw_generate_shader_resource parent_path)
    set(cmd "include(${IVW_ROOT_DIR}/cmake/utilities/txt2h.cmake)\n")
    set(includes "")
    set(resources "")

    string(TOUPPER ${PROJECT_NAME} u_project_name)
    string(TOLOWER ${PROJECT_NAME} l_project_name)

    ivw_private_get_ivw_module_include_path(${CMAKE_CURRENT_LIST_DIR} includePrefix includePath orgName)

    foreach(shader_path ${ARGN})
        file(RELATIVE_PATH shaderkey ${parent_path} ${shader_path})
        string(REPLACE "/" "_" tmp ${shaderkey})
        string(REPLACE "." "_" tmp ${tmp})
        string(REPLACE " " "_" varName ${tmp})

        set(headerpath "${includePrefix}/glsl/${varName}.h")

        set(outfile "${CMAKE_CURRENT_BINARY_DIR}/include/${headerpath}")
        set(cmd "${cmd}ivw_generate_shader_header(\"${varName}\" \"${shader_path}\" \"${outfile}\")\n")
        set(includes "${includes}#include <${headerpath}>\n")
        set(resources "${resources}    manager->addShaderResource(\"${shaderkey}\", ${varName});\n")
    endforeach()

    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/create_shader_resource.cmake ${cmd})

    add_definitions(-D${u_project_name}_INCLUDE_SHADER_RESOURCES)

    set(U_MODULE ${u_project_name})
    set(L_MODULE ${l_project_name})
    set(ADD_INCLUDES "${includes}")
    set(ADD_RESOURCES "${resources}")

    configure_file(${IVW_CMAKE_TEMPLATES}/shader_resource_template.h
                   ${CMAKE_CURRENT_BINARY_DIR}/include/${includePrefix}/shader_resources.h)

    add_custom_target("inviwo-shader-resources-${l_project_name}"
        COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/create_shader_resource.cmake
        DEPENDS ${ARGN}
        WORKING_DIRECTORY ${OUTPUT_DIR}
        COMMENT "Generating Shader resources for ${PROJECT_NAME}"
        VERBATIM
    )
    set_target_properties("inviwo-shader-resources-${l_project_name}" PROPERTIES FOLDER "shader-resources")
    add_dependencies(inviwo-module-${l_project_name} inviwo-shader-resources-${l_project_name})

endfunction()


text:
typedef struct {
  int N;
  int n_in;
  int n_out;
  double **W;
  double *b;
} LogisticRegression;

void LogisticRegression__construct(LogisticRegression*, int, int, int);
void LogisticRegression__destruct(LogisticRegression*);
void LogisticRegression_train(LogisticRegression*, int*, int*, double);
void LogisticRegression_softmax(LogisticRegression*, double*);
void LogisticRegression_predict(LogisticRegression*, int*, double*);

#endif


text:
package com.alibaba.csp.sentinel.slots.block.authority;

import com.alibaba.csp.sentinel.context.ContextTestUtil;
import com.alibaba.csp.sentinel.context.ContextUtil;
import com.alibaba.csp.sentinel.slots.block.RuleConstant;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Test cases for {@link AuthorityRuleChecker}.
 *
 * @author Eric Zhao
 */
public class AuthorityRuleCheckerTest {

    @Before
    public void setUp() {
        ContextTestUtil.cleanUpContext();
    }

    @Test
    public void testPassCheck() {
        String origin = "appA";
        ContextUtil.enter("entrance", origin);
        try {
            String resourceName = "testPassCheck";
            AuthorityRule ruleA = new AuthorityRule()
                .setResource(resourceName)
                .setLimitApp(origin + ",appB")
                .as(AuthorityRule.class)
                .setStrategy(RuleConstant.AUTHORITY_WHITE);
            AuthorityRule ruleB = new AuthorityRule()
                .setResource(resourceName)
                .setLimitApp("appB")
                .as(AuthorityRule.class)
                .setStrategy(RuleConstant.AUTHORITY_WHITE);
            AuthorityRule ruleC = new AuthorityRule()
                .setResource(resourceName)
                .setLimitApp(origin)
                .as(AuthorityRule.class)
                .setStrategy(RuleConstant.AUTHORITY_BLACK);
            AuthorityRule ruleD = new AuthorityRule()
                .setResource(resourceName)
                .setLimitApp("appC")
                .as(AuthorityRule.class)
                .setStrategy(RuleConstant.AUTHORITY_BLACK);

            assertTrue(AuthorityRuleChecker.passCheck(ruleA, ContextUtil.getContext()));
            assertFalse(AuthorityRuleChecker.passCheck(ruleB, ContextUtil.getContext()));
            assertFalse(AuthorityRuleChecker.passCheck(ruleC, ContextUtil.getContext()));
            assertTrue(AuthorityRuleChecker.passCheck(ruleD, ContextUtil.getContext()));
        } finally {
            ContextUtil.exit();
        }
    }
}


text:
require File.expand_path('../../../test_helper', __FILE__)

class RedmineLightbox::AttachmentTest < ActiveSupport::TestCase
  fixtures :users, :projects, :roles, :members, :member_roles,
           :enabled_modules, :issues, :trackers, :attachments

  def setup
    set_tmp_attachments_directory
  end

  def test_transformed_preview_should_not_generate_the_preview_for_jpg
    attachment = Attachment.find(16)

    # Ensure that no pdf preview exist before test
    refute attachment.has_pdf_preview?

    # Trying to generate preview
    attachment.generate_pdf_preview
    attachment.reload

    refute attachment.has_pdf_preview?
  end

  def test_manual_generate_pdf_preview
    attachment = create_document_attachment

    # Delete automatically generated preview
    attachment.pdf_preview.try(:destroy)
    attachment.reload

    # Ensure that no pdf preview exist before test
    refute attachment.has_pdf_preview?

    # Trying to generate preview
    attachment.generate_pdf_preview
    attachment.reload

    assert attachment.has_pdf_preview?
  end

  def test_pdf_preview_generates_automatically
    attachment = create_document_attachment
    assert attachment.has_pdf_preview?
  end

  def test_text_attachment_do_not_generate_pdf_preview
    attachment = create_text_attachment
    refute attachment.has_pdf_preview?
  end
end


text:
var browserify = require("browserify"),
    path = require("path"),
    _ = require("underscore");

var componentFolder = path.normalize(__dirname + "../../../../content/components/");

var loadParam = function (configuration, file, folder) {
    var comp = _.find(configuration, function (comp) {
        return comp.name === file;
    });

    if (comp && comp.hasJs) {
        return folder + file + "/" + file + ".js";
    }

    return null;
};

module.exports = {
    build: function (params, instanceFolder, configuration, instanceConfiguration, cb) {
        var b = browserify();

        _.each(params, function (file) {
            var path = loadParam(configuration, file, componentFolder);
            if (path) {
                b.add(path);
            }
        });

        _.each(params, function (file) {
            var path = loadParam(instanceConfiguration, file, instanceFolder);
            if (path) {
                b.add(path);
            }
        });

        b.bundle(function (err, res) {
            cb(res);
        });
    }
};


text:
if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
  echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
  echo "At least one of these environment variable is needed to run this program"
  exit 1
fi
if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
  echo "JAVA_HOME should point to a JDK in order to run in debug mode."
  exit 1
fi
if [ -z "$JRE_HOME" ]; then
  JRE_HOME="$JAVA_HOME"
fi

# If we're running under jdb, we need a full jdk.
if [ "$1" = "debug" ] ; then
  if [ "$os400" = "true" ]; then
    if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
      echo "The JAVA_HOME environment variable is not defined correctly"
      echo "This environment variable is needed to run this program"
      echo "NB: JAVA_HOME should point to a JDK not a JRE"
      exit 1
    fi
  else
    if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then
      echo "The JAVA_HOME environment variable is not defined correctly"
      echo "This environment variable is needed to run this program"
      echo "NB: JAVA_HOME should point to a JDK not a JRE"
      exit 1
    fi
  fi
fi
if [ -z "$BASEDIR" ]; then
  echo "The BASEDIR environment variable is not defined"
  echo "This environment variable is needed to run this program"
  exit 1
fi
if [ ! -x "$BASEDIR"/bin/setjavaenv.sh ]; then
  if $os400; then
    # -x will Only work on the os400 if the files are:
    # 1. owned by the user
    # 2. owned by the PRIMARY group of the user
    # this will not work if the user belongs in secondary groups
    eval
  else
    echo "The BASEDIR environment variable is not defined correctly"
    echo "This environment variable is needed to run this program"
    exit 1
  fi
fi

# Set standard commands for invoking Java.
  _RUNJAVA="$JRE_HOME"/bin/java
if [ "$os400" != "true" ]; then
  _RUNJDB="$JAVA_HOME"/bin/jdb
fi


text:
package com.urx.example.widgets;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class ResolveButtonActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_resolvebutton);
    }

}


text:
namespace {

// Recursively compute the hash code of the given string as in:
// "net/traffic_annotation/network_traffic_annotation.h"
uint32_t recursive_hash(const char* str, int N) {
  if (N == 1)
    return static_cast<uint32_t>(str[0]);
  else
    return (recursive_hash(str, N - 1) * 31 + str[N - 1]) % 138003713;
}

std::map<int, std::string> kReservedAnnotations = {
    {TRAFFIC_ANNOTATION_FOR_TESTS.unique_id_hash_code, "test"},
    {PARTIAL_TRAFFIC_ANNOTATION_FOR_TESTS.unique_id_hash_code, "test_partial"},
    {MISSING_TRAFFIC_ANNOTATION.unique_id_hash_code, "missing"}};

struct AnnotationID {
  // Two ids can be the same in the following cases:
  // 1- One is extra id of a partial annotation, and the other is either the
  //    unique id of a completing annotation, or extra id of a partial or
  //    branched completing annotation
  // 2- Both are extra ids of branched completing annotations.
  // The following Type value facilitate these checks.
  enum class Type { kPatrialExtra, kCompletingMain, kBranchedExtra, kOther };
  Type type;
  std::string text;
  int hash;
  AnnotationInstance* instance;
};

const std::string kBlockTypes[] = {"ASSIGNMENT", "ANNOTATION", "CALL"};

const base::FilePath kSafeListPath =
    base::FilePath(FILE_PATH_LITERAL("tools"))
        .Append(FILE_PATH_LITERAL("traffic_annotation"))
        .Append(FILE_PATH_LITERAL("auditor"))
        .Append(FILE_PATH_LITERAL("safe_list.txt"));

const base::FilePath kExtractorScript =
    base::FilePath(FILE_PATH_LITERAL("tools"))
        .Append(FILE_PATH_LITERAL("traffic_annotation"))
        .Append(FILE_PATH_LITERAL("scripts"))
        .Append(FILE_PATH_LITERAL("extractor.py"));

// Checks if the list of |path_filters| include the given |file_path|, or there
// are path filters which are a folder (don't have a '.' in their name), and
// match the file name.
// TODO(https://crbug.com/690323): Update to a more general policy.
bool PathFiltersMatch(const std::vector<std::string>& path_filters,
                      const std::string file_path) {
  if (base::Contains(path_filters, file_path))
    return true;
  for (const std::string& path_filter : path_filters) {
    if (path_filter.find(".") == std::string::npos &&
        file_path.substr(0, path_filter.length()) == path_filter) {
      return true;
    }
  }
  return false;
}

// If normalized |file_path| starts with |base_directory|, returns the
// relative path to |file_path|, otherwise the original |file_path| is returned.
std::string MakeRelativePath(const base::FilePath& base_directory,
                             const std::string& file_path) {
  DCHECK(base_directory.IsAbsolute());

#if defined(OS_WIN)
  base::FilePath converted_file_path = base::FilePath(
      base::FilePath::StringPieceType((base::UTF8ToWide(file_path))));
#else
  base::FilePath converted_file_path(file_path);
#endif
  converted_file_path = base::MakeAbsoluteFilePath(converted_file_path);
  base::FilePath normalized_path;
  if (base::NormalizeFilePath(converted_file_path, &normalized_path) &&
      normalized_path.IsAbsolute()) {
    normalized_path = normalized_path.NormalizePathSeparatorsTo('/');
    std::string file_str = normalized_path.MaybeAsASCII();
    std::string base_str = base_directory.MaybeAsASCII();
    if (file_str.find(base_str) == 0) {
      return file_str.substr(base_str.length() + 1,
                             file_str.length() - base_str.length() - 1);
    }
  }
  return file_path;
}

}  // namespace

TrafficAnnotationAuditor::TrafficAnnotationAuditor(
    const base::FilePath& source_path,
    const base::FilePath& build_path,
    const std::vector<std::string>& path_filters)
    : source_path_(source_path),
      build_path_(build_path),
      path_filters_(path_filters),
      exporter_(source_path),
      safe_list_loaded_(false) {
  DCHECK(!source_path.empty());
  DCHECK(!build_path.empty());

  // Get absolute source path.
  base::FilePath original_path;
  base::GetCurrentDirectory(&original_path);
  base::SetCurrentDirectory(source_path_);
  base::GetCurrentDirectory(&absolute_source_path_);
  base::SetCurrentDirectory(original_path);
  absolute_source_path_ = absolute_source_path_.NormalizePathSeparatorsTo('/');
  DCHECK(absolute_source_path_.IsAbsolute());

  // Load a live version traffic_annotation.proto from source files.
  google::protobuf::compiler::DiskSourceTree source_tree;
  base::FilePath absolute_build_path_ =
      build_path_.IsAbsolute() ? build_path_
                               : absolute_source_path_.Append(build_path_);
  source_tree.MapPath("",
                      absolute_source_path_.Append(FILE_PATH_LITERAL("tools"))
                          .Append(FILE_PATH_LITERAL("traffic_annotation"))
                          .MaybeAsASCII());
  source_tree.MapPath("", absolute_build_path_.Append(FILE_PATH_LITERAL("gen"))
                              .Append(FILE_PATH_LITERAL("components"))
                              .Append(FILE_PATH_LITERAL("policy"))
                              .Append(FILE_PATH_LITERAL("proto"))
                              .MaybeAsASCII());
  google::protobuf::compiler::SourceTreeDescriptorDatabase db(&source_tree);
  descriptor_pool_ = std::make_unique<google::protobuf::DescriptorPool>(&db);
  auto* fd = descriptor_pool_->FindFileByName("traffic_annotation.proto");
  if (fd != nullptr) {
    // If we manage to load the proto file, then we load the runtime message.
    auto* descriptor = fd->FindMessageTypeByName("NetworkTrafficAnnotation");
    annotation_prototype_ =
        base::WrapUnique(message_factory_.GetPrototype(descriptor)->New());
  } else {
    LOG(WARNING) << "traffic_annotation.proto failed to load at runtime, "
                 << "reverting to using static proto.";
  }
}

TrafficAnnotationAuditor::~TrafficAnnotationAuditor() = default;

// static
int TrafficAnnotationAuditor::ComputeHashValue(const std::string& unique_id) {
  return unique_id.length() ? static_cast<int>(recursive_hash(
                                  unique_id.c_str(), unique_id.length()))
                            : -1;
}

bool TrafficAnnotationAuditor::RunExtractor(
    bool filter_files_based_on_heuristics,
    bool use_compile_commands,
    const base::FilePath& errors_file,
    int* exit_code) {
  if (!safe_list_loaded_ && !LoadSafeList())
    return false;

  // Get list of files/folders to process.
  std::vector<std::string> file_paths;
  GenerateFilesListForExtractor(filter_files_based_on_heuristics,
                                use_compile_commands, &file_paths);
  if (file_paths.empty())
    return true;

  // Create a file to pass options to the extractor script.
  base::FilePath options_filepath;
  if (!base::CreateTemporaryFile(&options_filepath)) {
    LOG(ERROR) << "Could not create temporary options file.";
    return false;
  }
  FILE* options_file = base::OpenFile(options_filepath, "wt");
  if (!options_file) {
    LOG(ERROR) << "Could not open temporary options file.";
    return false;
  }

  // Write some options to the file for the python extractor.
  WritePythonScriptOptions(options_file);

  // Write the file paths.
  for (const std::string& file_path : file_paths)
    fprintf(options_file, "%s ", file_path.c_str());

  base::CloseFile(options_file);

  base::CommandLine cmdline(
      base::MakeAbsoluteFilePath(source_path_.Append(kExtractorScript)));
#if defined(OS_WIN)
  cmdline.PrependWrapper(L"python");
#endif
  cmdline.AppendArg(base::StringPrintf(
      "--options-file=%s", options_filepath.MaybeAsASCII().c_str()));

  // Change current folder to source before running the command as it expects to
  // be run from there.
  base::FilePath original_path;
  base::GetCurrentDirectory(&original_path);
  base::SetCurrentDirectory(source_path_);
  bool result = base::GetAppOutputWithExitCode(cmdline, &extractor_raw_output_,
                                               exit_code);

  // If the extractor had no output, it means that the script running it could
  // not perform the task.
  if (extractor_raw_output_.empty()) {
    result = false;
  }

  if (!result) {
    std::string tool_errors;
    std::string options_file_text;

    base::GetAppOutputAndError(cmdline, &tool_errors);

    if (!base::ReadFileToString(options_filepath, &options_file_text))
      options_file_text = "Could not read options file.";

    std::string error_message = base::StringPrintf(
        "Calling extractor returned false from %s\nCommandline: %s\n\n"
        "Returned output: %s\n\nPartial options file: %s\n",
        source_path_.MaybeAsASCII().c_str(),
#if defined(OS_WIN)
        base::UTF16ToASCII(cmdline.GetCommandLineString()).c_str(),
#else
        cmdline.GetCommandLineString().c_str(),
#endif
        tool_errors.c_str(), options_file_text.substr(0, 1024).c_str());

    if (errors_file.empty()) {
      LOG(ERROR) << error_message;
    } else {
      if (base::WriteFile(errors_file, error_message.c_str(),
                          error_message.length()) == -1) {
        LOG(ERROR) << "Writing error message to file failed:\n"
                   << error_message;
      }
    }
  }

  base::SetCurrentDirectory(original_path);
  base::DeleteFile(options_filepath, false);

  return result;
}

void TrafficAnnotationAuditor::WritePythonScriptOptions(FILE* options_file) {
  fprintf(options_file, "--generate-compdb --build-path=%s ",
          build_path_.MaybeAsASCII().c_str());
}

void TrafficAnnotationAuditor::GenerateFilesListForExtractor(
    bool filter_files_based_on_heuristics,
    bool use_compile_commands,
    std::vector<std::string>* file_paths) {
  TrafficAnnotationFileFilter filter;
  // If no path filter is provided, get all relevant files, except the safe
  // listed ones.
  if (path_filters_.empty()) {
    filter.GetRelevantFiles(
        source_path_,
        safe_list_[static_cast<int>(AuditorException::ExceptionType::ALL)], "",
        file_paths);
    return;
  }

  base::FilePath original_path;
  base::GetCurrentDirectory(&original_path);
  base::SetCurrentDirectory(source_path_);

  bool possibly_deleted_files = false;
  for (const auto& path_filter : path_filters_) {
#if defined(OS_WIN)
    base::FilePath path = base::FilePath(
        base::FilePath::StringPieceType((base::UTF8ToWide(path_filter))));
#else
    base::FilePath path = base::FilePath(path_filter);
#endif

    // If path filter is a directory, add its relevent, not safe-listed
    // contents.
    if (base::DirectoryExists(path)) {
      filter.GetRelevantFiles(
          source_path_,
          safe_list_[static_cast<int>(AuditorException::ExceptionType::ALL)],
          path_filter, file_paths);
    } else {
      // Add the file if it exists and is a relevant file which is not
      // safe-listed.
      if (base::PathExists(path)) {
        if (!TrafficAnnotationAuditor::IsSafeListed(
                path_filter, AuditorException::ExceptionType::ALL) &&
            filter.IsFileRelevant(path_filter)) {
          file_paths->push_back(path_filter);
        }
      } else {
        possibly_deleted_files = true;
      }
    }
  }

  base::SetCurrentDirectory(original_path);
}

bool TrafficAnnotationAuditor::IsSafeListed(
    const std::string& file_path,
    AuditorException::ExceptionType exception_type) {
  if (!safe_list_loaded_ && !LoadSafeList())
    return false;
  const std::vector<std::string>& safe_list =
      safe_list_[static_cast<int>(exception_type)];

  for (const std::string& ignore_pattern : safe_list) {
    if (re2::RE2::FullMatch(file_path, ignore_pattern))
      return true;
  }

  // If the given filepath did not match the rules with the specified type,
  // check it with rules of type 'ALL' as well.
  if (exception_type != AuditorException::ExceptionType::ALL)
    return IsSafeListed(file_path, AuditorException::ExceptionType::ALL);
  return false;
}

std::unique_ptr<google::protobuf::Message>
TrafficAnnotationAuditor::CreateAnnotationProto() {
  if (annotation_prototype_ != nullptr) {
    return base::WrapUnique(annotation_prototype_->New());
  }
  return nullptr;
}

bool TrafficAnnotationAuditor::ParseExtractorRawOutput() {
  if (!safe_list_loaded_ && !LoadSafeList())
    return false;
  // Remove possible carriage return characters before splitting lines.
  std::string temp_string;
  base::RemoveChars(extractor_raw_output_, "\r", &temp_string);
  std::vector<std::string> lines = base::SplitString(
      temp_string, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
  for (unsigned int current = 0; current < lines.size(); current++) {
    // All blocks reported by extractor start with '====', so we can ignore
    // all lines that do not start with a '='.
    if (lines[current].empty() || lines[current][0] != '=')
      continue;

    std::string block_type;
    std::string end_marker;
    for (const std::string& item : kBlockTypes) {
      if (lines[current] ==
          base::StringPrintf("==== NEW %s ====", item.c_str())) {
        end_marker = base::StringPrintf("==== %s ENDS ====", item.c_str());
        block_type = item;
        break;
      }
    }

    // If not starting a valid block, ignore the line.
    if (block_type.empty())
      continue;

    // Get the block.
    current++;
    unsigned int end_line = current;
    while (end_line < lines.size() && lines[end_line] != end_marker)
      end_line++;
    if (end_line == lines.size()) {
      LOG(ERROR) << "Block starting at line " << current
                 << " is not ended by the appropriate tag.";
      return false;
    }

    // Deserialize and handle errors.
    AuditorResult result(AuditorResult::Type::RESULT_OK);

    if (block_type == "ANNOTATION") {
      AnnotationInstance new_annotation;
      new_annotation.runtime_proto = CreateAnnotationProto();
      result = new_annotation.Deserialize(lines, current, end_line);
      std::string file_path = result.IsOK()
                                  ? new_annotation.proto.source().file()
                                  : result.file_path();
      file_path = MakeRelativePath(absolute_source_path_, file_path);
      if (IsSafeListed(file_path, AuditorException::ExceptionType::ALL))
        result = AuditorResult(AuditorResult::Type::RESULT_IGNORE);
      switch (result.type()) {
        case AuditorResult::Type::RESULT_OK:
          new_annotation.proto.mutable_source()->set_file(file_path);
          extracted_annotations_.push_back(new_annotation);
          break;
        case AuditorResult::Type::ERROR_MISSING_TAG_USED:
          if (IsSafeListed(file_path, AuditorException::ExceptionType::MISSING))
            result = AuditorResult(AuditorResult::Type::RESULT_IGNORE);
          break;
        case AuditorResult::Type::ERROR_TEST_ANNOTATION:
          if (IsSafeListed(file_path,
                           AuditorException::ExceptionType::TEST_ANNOTATION)) {
            result = AuditorResult(AuditorResult::Type::RESULT_IGNORE);
          }
          break;
        case AuditorResult::Type::ERROR_MUTABLE_TAG:
          if (IsSafeListed(file_path,
                           AuditorException::ExceptionType::MUTABLE_TAG)) {
            result = AuditorResult(AuditorResult::Type::RESULT_IGNORE);
          }
          break;
        default:
          break;
      }
    } else if (block_type == "CALL") {
      CallInstance new_call;
      result = new_call.Deserialize(lines, current, end_line);
      new_call.file_path =
          MakeRelativePath(absolute_source_path_, new_call.file_path);
      if (IsSafeListed(new_call.file_path,
                       AuditorException::ExceptionType::ALL)) {
        result = AuditorResult(AuditorResult::Type::RESULT_IGNORE);
      }
      if (result.IsOK())
        extracted_calls_.push_back(new_call);
    } else if (block_type == "ASSIGNMENT") {
      AssignmentInstance new_assignment;
      result = new_assignment.Deserialize(lines, current, end_line);
      new_assignment.file_path =
          MakeRelativePath(absolute_source_path_, new_assignment.file_path);
      if (IsSafeListed(new_assignment.file_path,
                       AuditorException::ExceptionType::DIRECT_ASSIGNMENT)) {
        result = AuditorResult(AuditorResult::Type::RESULT_IGNORE);
      } else if (result.IsOK()) {
        result = AuditorResult(AuditorResult::Type::ERROR_DIRECT_ASSIGNMENT,
                               std::string(), new_assignment.file_path,
                               new_assignment.line_number);
      }
    } else {
      NOTREACHED();
    }

    switch (result.type()) {
      case AuditorResult::Type::RESULT_OK:
      case AuditorResult::Type::RESULT_IGNORE:
        break;
      case AuditorResult::Type::ERROR_FATAL: {
        LOG(ERROR) << "Aborting after line " << current
                   << " because: " << result.ToText().c_str();
        return false;
      }
      default:
        if (!IsSafeListed(result.file_path(),
                          AuditorException::ExceptionType::ALL)) {
          errors_.push_back(result);
        }
    }

    current = end_line;
  }  // for

  return true;
}

bool TrafficAnnotationAuditor::LoadSafeList() {
  base::FilePath safe_list_file =
      base::MakeAbsoluteFilePath(source_path_.Append(kSafeListPath));

  std::string file_content;
  if (!base::ReadFileToString(safe_list_file, &file_content)) {
    LOG(ERROR) << "Could not read " << kSafeListPath.MaybeAsASCII();
    return false;
  }

  base::RemoveChars(file_content, "\r", &file_content);
  std::vector<std::string> lines = base::SplitString(
      file_content, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);

  for (const std::string& line : lines) {
    // Ignore comments and empty lines.
    if (!line.length() || line[0] == '#')
      continue;

    std::vector<std::string> tokens = base::SplitString(
        line, ",", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);

    // Expect a type and at least one value in each line.
    if (tokens.size() < 2) {
      LOG(ERROR) << "Unexpected syntax in safe_list.txt, line: " << line;
      return false;
    }

    AuditorException::ExceptionType exception_type;
    if (!AuditorException::TypeFromString(tokens[0], &exception_type)) {
      LOG(ERROR) << "Unexpected type in safe_list.txt line: " << line;
      return false;
    }
    for (unsigned i = 1; i < tokens.size(); i++) {
      // Convert the rest of the line into re2 patterns, making dots as fixed
      // characters and asterisks as wildcards.
      // Note that all file paths are converted to Linux style before checking.
      if (!base::ContainsOnlyChars(
              base::ToLowerASCII(tokens[i]),
              "0123456789_abcdefghijklmnopqrstuvwxyz.*/:@")) {
        LOG(ERROR) << "Unexpected character in safe_list.txt token: "
                   << tokens[i];
        return false;
      }
      std::string pattern;
      base::ReplaceChars(tokens[i], ".", "[.]", &pattern);
      base::ReplaceChars(pattern, "*", ".*", &pattern);
      safe_list_[static_cast<int>(exception_type)].push_back(pattern);
    }
  }

  safe_list_loaded_ = true;
  return true;
}

// static
const std::map<int, std::string>&
TrafficAnnotationAuditor::GetReservedIDsMap() {
  return kReservedAnnotations;
}

// static
std::set<int> TrafficAnnotationAuditor::GetReservedIDsSet() {
  std::set<int> reserved_ids;
  for (const auto& item : kReservedAnnotations)
    reserved_ids.insert(item.first);
  return reserved_ids;
}

void TrafficAnnotationAuditor::CheckAllRequiredFunctionsAreAnnotated() {
  for (const CallInstance& call : extracted_calls_) {
    if (!call.is_annotated && !CheckIfCallCanBeUnannotated(call)) {
      errors_.push_back(
          AuditorResult(AuditorResult::Type::ERROR_MISSING_ANNOTATION,
                        call.function_name, call.file_path, call.line_number));
    }
  }
}

bool TrafficAnnotationAuditor::CheckIfCallCanBeUnannotated(
    const CallInstance& call) {
  if (IsSafeListed(call.file_path, AuditorException::ExceptionType::MISSING))
    return true;

  // Unittests should be all annotated. Although this can be detected using gn,
  // doing that would be very slow. The alternative solution would be to bypass
  // every file including test or unittest, but in this case there might be some
  // ambiguity in what should be annotated and what not.
  if (call.file_path.find("unittest") != std::string::npos)
    return false;

  // Already checked?
  if (base::Contains(checked_dependencies_, call.file_path))
    return checked_dependencies_[call.file_path];

  std::string gn_output;
  if (gn_file_for_test_.empty()) {
    // Check if the file including this function is part of Chrome build.
    const base::CommandLine::CharType* args[] = {
#if defined(OS_WIN)
      FILE_PATH_LITERAL("buildtools/win/gn.exe"),
#elif defined(OS_MACOSX)
      FILE_PATH_LITERAL("buildtools/mac/gn"),
#elif defined(OS_LINUX)
      FILE_PATH_LITERAL("buildtools/linux64/gn"),
#else
      // Fallback to using PATH to find gn.
      FILE_PATH_LITERAL("gn"),
#endif
      FILE_PATH_LITERAL("refs"),
      FILE_PATH_LITERAL("--all")
    };

    base::CommandLine cmdline(3, args);
    cmdline.AppendArgPath(build_path_);
    cmdline.AppendArg(call.file_path);

    base::FilePath original_path;
    base::GetCurrentDirectory(&original_path);
    base::SetCurrentDirectory(source_path_);
    if (!base::GetAppOutput(cmdline, &gn_output)) {
      LOG(ERROR) << "Could not run gn to get dependencies.";
      gn_output.clear();
    }
    base::SetCurrentDirectory(original_path);
  } else {
    if (!base::ReadFileToString(gn_file_for_test_, &gn_output)) {
      LOG(ERROR) << "Could not load mock gn output file from "
                 << gn_file_for_test_.MaybeAsASCII().c_str();
      gn_output.clear();
    }
  }

  checked_dependencies_[call.file_path] =
      gn_output.length() &&
      gn_output.find("//chrome:chrome") == std::string::npos;

  return checked_dependencies_[call.file_path];
}

void TrafficAnnotationAuditor::CheckAnnotationsContents() {
  std::vector<AnnotationInstance*> partial_annotations;
  std::vector<AnnotationInstance*> completing_annotations;
  std::vector<AnnotationInstance> new_annotations;

  // Process complete annotations and separate the others.
  for (AnnotationInstance& instance : extracted_annotations_) {
    switch (instance.type) {
      case AnnotationInstance::Type::ANNOTATION_COMPLETE: {
        // Instances loaded from archive are already checked before archiving.
        if (instance.is_loaded_from_archive)
          continue;
        AuditorResult result = instance.IsComplete();
        if (result.IsOK())
          result = instance.IsConsistent();
        if (!result.IsOK())
          errors_.push_back(result);
        break;
      }
      case AnnotationInstance::Type::ANNOTATION_PARTIAL:
        partial_annotations.push_back(&instance);
        break;
      default:
        completing_annotations.push_back(&instance);
    }
  }

  std::set<AnnotationInstance*> used_completing_annotations;

  for (AnnotationInstance* partial : partial_annotations) {
    bool found_a_pair = false;
    for (AnnotationInstance* completing : completing_annotations) {
      if (partial->IsCompletableWith(*completing)) {
        found_a_pair = true;
        used_completing_annotations.insert(completing);

        // Instances loaded from archive are already checked before archiving.
        if (partial->is_loaded_from_archive &&
            completing->is_loaded_from_archive) {
          break;
        }

        AnnotationInstance completed;
        AuditorResult result =
            partial->CreateCompleteAnnotation(*completing, &completed);

        if (result.IsOK())
          result = completed.IsComplete();

        if (result.IsOK())
          result = completed.IsConsistent();

        if (result.IsOK()) {
          new_annotations.push_back(completed);
        } else {
          result = AuditorResult(AuditorResult::Type::ERROR_MERGE_FAILED,
                                 result.ToShortText());
          result.AddDetail(partial->proto.unique_id());
          result.AddDetail(completing->proto.unique_id());
          errors_.push_back(result);
        }
      }
    }

    if (!found_a_pair) {
      errors_.push_back(
          AuditorResult(AuditorResult::Type::ERROR_INCOMPLETED_ANNOTATION,
                        partial->proto.unique_id()));
    }
  }

  for (AnnotationInstance* instance : completing_annotations) {
    if (!base::Contains(used_completing_annotations, instance)) {
      errors_.push_back(
          AuditorResult(AuditorResult::Type::ERROR_INCOMPLETED_ANNOTATION,
                        instance->proto.unique_id()));
    }
  }

  if (new_annotations.size())
    extracted_annotations_.insert(extracted_annotations_.end(),
                                  new_annotations.begin(),
                                  new_annotations.end());
}

void TrafficAnnotationAuditor::AddMissingAnnotations() {
  for (const auto& item : exporter_.GetArchivedAnnotations()) {
    if (item.second.deprecation_date.empty() &&
        exporter_.MatchesCurrentPlatform(item.second) &&
        !item.second.file_path.empty() &&
        !PathFiltersMatch(path_filters_, item.second.file_path)) {
      extracted_annotations_.push_back(AnnotationInstance::LoadFromArchive(
          item.second.type, item.first, item.second.unique_id_hash_code,
          item.second.second_id_hash_code, item.second.content_hash_code,
          item.second.semantics_fields, item.second.policy_fields,
          item.second.file_path));
    }
  }
}

bool TrafficAnnotationAuditor::RunAllChecks(
    bool report_xml_updates) {
  if (exporter_.GetArchivedAnnotations().empty() &&
      !exporter_.LoadAnnotationsXML()) {
    return false;
  }

  std::set<int> deprecated_ids;
  exporter_.GetDeprecatedHashCodes(&deprecated_ids);

  if (!path_filters_.empty())
    AddMissingAnnotations();

  TrafficAnnotationIDChecker id_checker(GetReservedIDsSet(), deprecated_ids);
  id_checker.Load(extracted_annotations_);
  id_checker.CheckIDs(&errors_);

  // Only check annotation contents if IDs are all OK, because if there are
  // id errors, there might be some mismatching annotations and irrelevant
  // content errors.
  if (errors_.empty())
    CheckAnnotationsContents();

  CheckAllRequiredFunctionsAreAnnotated();

  if (errors_.empty()) {
    exporter_.UpdateAnnotations(extracted_annotations_, GetReservedIDsMap(),
                                &errors_);
  }

  // If |report_xml_updates| is true, check annotations.xml whether or not it is
  // modified, as there might be format differences with exporter outputs due to
  // manual updates.
  if (report_xml_updates) {
    std::string updates = exporter_.GetRequiredUpdates();
    if (!updates.empty()) {
      errors_.push_back(AuditorResult(
          AuditorResult::Type::ERROR_ANNOTATIONS_XML_UPDATE, updates));
    }
  }

  return true;
}


text:
<?php

/** This class sets the system configuration */

class SetUp {

    /** Set charset utf 8 */
    static function headers(){
        error_reporting(0);
        header("Content-Type: text/html; charset=utf-8", true);
    }

    /** Allow url fopen to crawl the code */
    static function init(){
        SetUp::headers();
        error_reporting(0);
        if (!ini_get('allow_url_fopen'))
            ini_set('allow_url_fopen', 1);
    }

    /** Close url fopen*/
    static function finish(){
        if (ini_get('allow_url_fopen'))
            ini_set('allow_url_fopen', 0);
    }

}


text:
<md-content role="navigation">

        <md-toolbar class="md-accent md-hue-3">

{{ user.name || user.preferredEmail || user.email }}

        </md-toolbar>

                <md-button class="md-primary text-left" flex layout-fill ui-sref="authenticated.master.admin.dashboard">
                     Admin
                </md-button>

                <md-button class="md-primary text-left" flex layout-fill ui-sref="authenticated.master.moderator.dashboard">
                     Moderator
                </md-button>

                <md-button class="md-primary text-left" flex ui-sref="authenticated.master.nav.dashboard">
                     Dashboard
                </md-button>

                <md-button class="md-primary text-left adjust-mdi" ng-href="#messages" qv-highlight="text-secondary0" selector="#messages .transition-color" style="display: none;">
                    Assignment Feedback

                </md-button>
                <md-button class="md-primary text-left adjust-mdi" ng-href="#subscriptions" qv-highlight="text-secondary0" selector="#subscriptions .transition-color" style="display: none;">
                    Subscriptions

                </md-button>
                <md-button class="md-primary text-left adjust-mdi" ng-href="#shipping" qv-highlight="text-secondary0" selector="#shipping .transition-color" style="display: none;">
                    Shipping

                </md-button>
                <md-button class="md-primary text-left adjust-mdi" ng-href="#gifts" qv-highlight="text-secondary0" selector="#gifts .transition-color" style="display: none;">
                    Gifts

                </md-button>
                <md-button class="md-primary text-left adjust-mdi" ng-href="#downloads" qv-highlight="text-secondary0" selector="#downloads .transition-color" style="display: none;">
                    Downloads

                </md-button>
                <md-button class="md-primary text-left adjust-mdi" ng-href="#transactions" qv-highlight="text-secondary0" selector="#transactions .transition-color" style="display: none;">
                    Transactions

                </md-button>
                <md-button class="md-primary text-left adjust-mdi" ng-href="#archived-galleries" qv-highlight="text-secondary0" selector="#archived-galleries .transition-color" style="display: none;">
                    Archived Galleries

                </md-button>

                <md-button class="md-primary text-left" flex layout-fill ui-sref="authenticated.master.nav.account">
                     Account
                </md-button>

                <md-button class="md-primary text-left" flex layout-fill ng-click="logOut()">
                     Log Out
                </md-button>

        <md-toolbar class="md-accent md-hue-3">

Subscriptions

        </md-toolbar>

                <md-button class="md-accent text-left ellipsis" flex layout-fill ui-sref="authenticated.master.subscription.page({subscriptionKey: subscription.$id, pageNumber: $storage['bookmark-' + subscription.$id] || 0})" aria-label="Subscription: {{ subscription.title }}" ng-class="{'md-raised': subscription.subscriptionType === 'interaction' && !isExpired(subscription) && !subscription.expiration}">
                    <md-tooltip>{{ subscription.title }}</md-tooltip>
                    {{ subscription.title }}
                </md-button>

        <md-toolbar class="md-accent md-hue-3" ng-if="settings.app1Title">

{{ settings.app1Title }}

        </md-toolbar>

                <md-button class="md-primary text-left" flex layout-fill ng-href="{{ link.href }}" qv-to-static>
                    {{ link.text }}
                </md-button>

        <md-toolbar class="md-accent md-hue-3" ng-if="settings.app2Title">

{{ settings.app2Title }}

        </md-toolbar>

                <md-button class="md-primary text-left" flex layout-fill ng-href="{{ link.href }}" qv-to-static>
                    {{ link.text }}
                </md-button>

        <md-toolbar class="md-accent md-hue-3" ng-if="settings.app3Title">

{{ settings.app3Title }}

        </md-toolbar>

                <md-button class="md-primary text-left" flex layout-fill ng-href="{{ link.href }}" qv-to-static>
                    {{ link.text }}
                </md-button>

</md-content>


text:
import Participant from './Participant'

export default Participant


text:
require 'rails_admin/i18n_support'

module RailsAdmin
  module ApplicationHelper

    include RailsAdmin::I18nSupport

    def get_url(action, model_name, opts = {})
      options = {:model_name => model_name}.merge(opts)
      options.merge!(current_scope_parameters)
      case action
      when :dashboard
        dashboard_path(options)
      when :edit
        edit_path(options)
      when :list
        list_path(options)
      when :new
        new_path(options)
      end
    end

    def head_javascript(path = nil, &block)
      if block
        (@head_javascript ||= []) << capture(&block)
      elsif path
        (@head_javascript_paths ||= []) << path
      else
        html = ""
        if paths = @head_javascript_paths
          paths.uniq.each do |path|
            html << javascript_include_tag(path)
          end
        end
        if script = @head_javascript
          html << javascript_tag(script.uniq.join("\n"))
        end
        return html.html_safe
      end
    end

    def head_style(path = nil, &block)
      if block
        (@head_style ||= []) << capture(&block)
      elsif path
        (@head_stylesheet_paths ||= []) << path
      else
        html = ""
        if paths = @head_stylesheet_paths
          paths.uniq.each do |path|
            html << stylesheet_link_tag(path)
          end
        end
        if style = @head_style
          html << content_tag(:style, style.uniq.join("\n"), :type => "text/css")
        end
        return html.html_safe
      end
    end

    def action_button link, text, icon=nil, options={}
      options.reverse_merge! :class => "button"
      link_to link, options do
        image = image_tag(image_path("rails_admin/theme/activo/images/icons/#{icon}.png")) if icon
        [image, text].compact.join("\n").html_safe
      end.html_safe
    end

    # the icon shown beside every entry in the list view
    def action_icon link, icon, text
      icon_path = "rails_admin/theme/activo/images/icons/24/%s.png"
      icon_change = "this.src='#{icon_path}'"
      link_to link do
        image_tag image_path(icon_path % icon),
          :alt => text, :title => text, :class => 'tipsy',
          :onmouseout  => "this.src='#{image_path(icon_path % icon)}'",
          :onmouseover => "this.src='#{image_path(icon_path % (icon.to_s + '-hover'))}'"
      end.html_safe
    end

    # Used for the icons in the admins very top right.
    def header_icon(image_name, title)
      image_tag image_path("rails_admin/theme/activo/images/session/#{image_name}.png"), :alt => title, :title => title
    end

    # Used for the history entries in the sidebar
    def history_link user, text
      content_tag :p, "#{user} #{text}".html_safe
    end

    def history_output(t)
      return unless t
      if not t.message.downcase.rindex("changed").nil?
        return t.message.downcase + " for #{t.table.capitalize} ##{t.item}"
      else
        return t.message.downcase
      end
    end

    # Given a page count and the current page, we generate a set of pagination
    # links.
    #
    # * We use an inner and outer window into a list of links. For a set of
    # 20 pages with the current page being 10:
    # outer_window:
    #   1 2 ..... 19 20
    # inner_window
    #   5 6 7 8 9 10 11 12 13 14
    #
    # This is totally adjustable, or can be turned off by giving the
    # :inner_window setting a value of nil.
    #
    # * Options
    # :left_cut_label => text_for_cut::
    #    Used when the page numbers need to be cut off to prevent the set of
    #    pagination links from being too long.
    #    Defaults to '…'
    # :right_cut_label => text_for_cut::
    #    Same as :left_cut_label but for the right side of numbers.
    #    Defaults to '…'
    # :outer_window => number_of_pages::
    #    Sets the number of pages to include in the outer 'window'
    #    Defaults to 2
    # :inner_window => number_of_pages::
    #    Sets the number of pags to include in the inner 'window'
    #    Defaults to 7
    # :page_param => name_of_page_paramiter
    #    Sets the name of the paramiter the paginator uses to return what
    #    page is being requested.
    #    Defaults to 'page'
    # :url => url_for_links
    #    Provides the base url to use in the page navigation links.
    #    Defaults to ''
    def paginate(current_page, page_count, options = {})
      options[:left_cut_label] ||= '…'
      options[:right_cut_label] ||= '…'
      options[:outer_window] ||= 2
      options[:inner_window] ||= 7
      options[:remote] = true unless options.has_key?(:remote)
      options[:page_param] ||= :page
      options[:url] ||= {}

      pages = {
        :all => (1..page_count).to_a,
        :left => [],
        :center => [],
        :right => []
      }

      infinity = (1/0.0)

      # Only worry about using our 'windows' if the page count is less then
      # our windows combined.
      if options[:inner_window].nil? || ((options[:outer_window] * 2) + options[:inner_window] + 2) >= page_count
        pages[:center] = pages[:all]
      else
        pages[:left] = pages[:all][0, options[:outer_window]]
        pages[:right] = pages[:all][page_count - options[:outer_window], options[:outer_window]]
        pages[:center] = case current_page
        # allow the inner 'window' to shift to right when close to the left edge
        # Ex: 1 2 [3] 4 5 6 7 8 9 ... 20
        when -infinity .. (options[:inner_window] / 2) + 3
          pages[:all][options[:outer_window], options[:inner_window]] +
            [options[:right_cut_label]]
        # allow the inner 'window' to shift left when close to the right edge
        # Ex: 1 2 ... 12 13 14 15 16 [17] 18 19 20
        when (page_count - (options[:inner_window] / 2.0).ceil) - 1 .. infinity
          [options[:left_cut_label]] +
            pages[:all][page_count - options[:inner_window] - options[:outer_window], options[:inner_window]]
        # Display the unshifed window
        # ex: 1 2 ... 5 6 7 [8] 9 10 11 ... 19 20
        else
          [options[:left_cut_label]] +
            pages[:all][current_page - (options[:inner_window] / 2) - 1, options[:inner_window]] +
            [options[:right_cut_label]]
        end
      end

      b = []

      [pages[:left], pages[:center], pages[:right]].each do |p|
        p.each do |page_number|

          case page_number
          when String
            b << page_number
          when current_page
            b << Builder::XmlMarkup.new.span(page_number, :class => "current")
          when page_count
            b << link_to(page_number, "?" + options[:url].merge(options[:page_param] => page_number).to_query, :class => "end", :remote => options[:remote])
          else
            b << link_to(page_number, "?" + options[:url].merge(options[:page_param] => page_number).to_query, :remote => options[:remote])
          end
        end
      end

      b.join(" ")
    end

    def authorized?(*args)
      @authorization_adapter.nil? || @authorization_adapter.authorized?(*args)
    end

    def authorization_adapter
      @authorization_adapter
    end

    def scope_adapter
      @scope_adapter
    end

    def current_scope_parameters
      @current_scope_parameters
    end

    def current_scope(model_name)
      @current_scope[model_name][:selected] rescue nil
    end

    def messages_and_help_for field
      tags = []
      if field.has_errors?
        tags << content_tag(:span, "#{field.label} #{field.errors.first}", :class => "errorMessage")
      end
      tags << content_tag(:p, field.help, :class => "help")
      tags.join("\n").html_safe
    end

    def field_wrapper_for form, field, opts={}
      opts = opts.reverse_merge(:label => true, :messages_and_help => true)

      content_tag(:div, :class => "field #{field.dom_id}", :id => field.dom_id + '_field') do
        concat form.label(field.method_name, field.label) if opts[:label]
        yield
        concat messages_and_help_for(field) if opts[:messages_and_help]
      end.html_safe
    end

    # Creative whitespace:
    ViewType   =          Struct.new(:parent,    :type,   :authorization, :path_method)
    VIEW_TYPES = {
      :delete        => ViewType.new(:show,      :object, :delete),
      :history       => ViewType.new(:show,      :object, nil,            :history_object),
      :edit          => ViewType.new(:show,      :object, :edit),
      :show          => ViewType.new(:list,      :object, nil),
      :export        => ViewType.new(:list,      :model,  :export),
      :bulk_destroy  => ViewType.new(:list,      :model,  :delete),
      :new           => ViewType.new(:list,      :model,  :new),
      :model_history => ViewType.new(:list,      :model,  nil,            :history_model),
      :list          => ViewType.new(:dashboard, :model,  :list),
      :dashboard     => ViewType.new
    }

    def breadcrumbs_for view, abstract_model_or_object
      # create an array of all the names of the views we want breadcrumb links to
      views = []
      parent = view
      begin
        views << parent
      end while parent = VIEW_TYPES[parent].parent

      # get a breadcrumb for each view name
      breadcrumbs = views.reverse.map do |v|
        breadcrumb_for v, abstract_model_or_object, (v==view)
      end

      # join the breadcrumbs together inside some other tags
      content_tag(:div, :class => "secondary-navigation") do
        content_tag(:ul, :class => "wat-cf") do
          breadcrumbs.join("\n").html_safe
        end
      end

    end

    private

    def abstract_model_and_object abstract_model_or_object
      if abstract_model_or_object.is_a?(AbstractModel)
        abstract_model = abstract_model_or_object
        object = nil
      elsif abstract_model_or_object.present?
        object = abstract_model_or_object
        abstract_model = AbstractModel.new(object.class)
      end
      [abstract_model, object]
    end

    def breadcrumb_for view, abstract_model_or_object, active
      abstract_model, object = abstract_model_and_object( abstract_model_or_object )

      vt = VIEW_TYPES[view]

      # TODO: write tests
      if authorized?(view, abstract_model, object)
        css_classes = []
        css_classes << "first" if view == :dashboard
        css_classes << "active" if active

        content_tag(:li, :class => css_classes) do
          path_method = vt.path_method || view
          link_to I18n.t("admin.breadcrumbs.#{view}").capitalize, self.send("#{path_method}_path")
        end
       end
    end
  end
end


text:
package org.apache.sysml.test.integration.applications.dml;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.apache.sysml.api.DMLScript;
import org.apache.sysml.test.integration.applications.L2SVMTest;

@RunWith(value = Parameterized.class)
public class L2SVMDMLTest extends L2SVMTest {

	public L2SVMDMLTest(int rows, int cols, double sp, boolean intercept) {
		super(rows, cols, sp, intercept);
		TEST_CLASS_DIR = TEST_DIR + L2SVMDMLTest.class.getSimpleName() + "/";
	}

	@Test
	public void testL2SVMDml() {
		testL2SVM(ScriptType.DML);
	}

	@Test
	public void testL2SVMDmlDisableSparseNCaching() {
		try {
			DMLScript.DISABLE_SPARSE = true;
			DMLScript.DISABLE_CACHING = true;
			testL2SVM(ScriptType.DML);
		}
		finally {
			DMLScript.DISABLE_SPARSE = false;
			DMLScript.DISABLE_CACHING = false;
		}
	}
}


text:
use crate::cdsl::camel_case;
use crate::cdsl::formats::{FormatRegistry, InstructionFormat, InstructionFormatIndex};
use crate::cdsl::operands::Operand;
use crate::cdsl::type_inference::Constraint;
use crate::cdsl::typevar::TypeVar;

use std::fmt;
use std::slice;

/// Every instruction must belong to exactly one instruction group. A given
/// target architecture can support instructions from multiple groups, and it
/// does not necessarily support all instructions in a group.
pub struct InstructionGroup {
    _name: &'static str,
    _doc: &'static str,
    instructions: Vec<Instruction>,
}

impl InstructionGroup {
    pub fn new(name: &'static str, doc: &'static str) -> Self {
        Self {
            _name: name,
            _doc: doc,
            instructions: Vec::new(),
        }
    }

    pub fn push(&mut self, inst: Instruction) {
        self.instructions.push(inst);
    }

    pub fn iter(&self) -> slice::Iter<Instruction> {
        self.instructions.iter()
    }
}

pub struct PolymorphicInfo {
    pub use_typevar_operand: bool,
    pub ctrl_typevar: TypeVar,
    pub other_typevars: Vec<TypeVar>,
}

pub struct Instruction {
    /// Instruction mnemonic, also becomes opcode name.
    pub name: &'static str,
    pub camel_name: String,

    /// Documentation string.
    doc: &'static str,

    /// Input operands. This can be a mix of SSA value operands and other operand kinds.
    pub operands_in: Vec<Operand>,
    /// Output operands. The output operands must be SSA values or `variable_args`.
    pub operands_out: Vec<Operand>,
    /// Instruction-specific TypeConstraints.
    _constraints: Vec<Constraint>,

    /// Instruction format, automatically derived from the input operands.
    pub format: InstructionFormatIndex,

    /// One of the input or output operands is a free type variable. None if the instruction is not
    /// polymorphic, set otherwise.
    pub polymorphic_info: Option<PolymorphicInfo>,

    pub value_opnums: Vec<usize>,
    pub value_results: Vec<usize>,
    pub imm_opnums: Vec<usize>,

    /// True for instructions that terminate the EBB.
    pub is_terminator: bool,
    /// True for all branch or jump instructions.
    pub is_branch: bool,
    /// True for all indirect branch or jump instructions.',
    pub is_indirect_branch: bool,
    /// Is this a call instruction?
    pub is_call: bool,
    /// Is this a return instruction?
    pub is_return: bool,
    /// Is this a ghost instruction?
    pub is_ghost: bool,
    /// Can this instruction read from memory?
    pub can_load: bool,
    /// Can this instruction write to memory?
    pub can_store: bool,
    /// Can this instruction cause a trap?
    pub can_trap: bool,
    /// Does this instruction have other side effects besides can_* flags?
    pub other_side_effects: bool,
    /// Does this instruction write to CPU flags?
    pub writes_cpu_flags: bool,
}

impl Instruction {
    pub fn snake_name(&self) -> &'static str {
        if self.name == "return" {
            "return_"
        } else {
            self.name
        }
    }

    pub fn doc_comment_first_line(&self) -> &'static str {
        for line in self.doc.split("\n") {
            let stripped = line.trim();
            if stripped.len() > 0 {
                return stripped;
            }
        }
        ""
    }
}

impl fmt::Display for Instruction {
    fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
        if self.operands_out.len() > 0 {
            let operands_out = self
                .operands_out
                .iter()
                .map(|op| op.name)
                .collect::<Vec<_>>()
                .join(", ");
            fmt.write_str(&operands_out)?;
            fmt.write_str(" = ")?;
        }

        fmt.write_str(self.name)?;

        if self.operands_in.len() > 0 {
            let operands_in = self
                .operands_in
                .iter()
                .map(|op| op.name)
                .collect::<Vec<_>>()
                .join(", ");
            fmt.write_str(" ")?;
            fmt.write_str(&operands_in)?;
        }

        Ok(())
    }
}

pub struct InstructionBuilder {
    name: &'static str,
    doc: &'static str,
    operands_in: Option<Vec<Operand>>,
    operands_out: Option<Vec<Operand>>,
    constraints: Option<Vec<Constraint>>,

    // See Instruction comments for the meaning of these fields.
    is_terminator: bool,
    is_branch: bool,
    is_indirect_branch: bool,
    is_call: bool,
    is_return: bool,
    is_ghost: bool,
    can_load: bool,
    can_store: bool,
    can_trap: bool,
    other_side_effects: bool,
}

impl InstructionBuilder {
    pub fn new(name: &'static str, doc: &'static str) -> Self {
        Self {
            name,
            doc,
            operands_in: None,
            operands_out: None,
            constraints: None,

            is_terminator: false,
            is_branch: false,
            is_indirect_branch: false,
            is_call: false,
            is_return: false,
            is_ghost: false,
            can_load: false,
            can_store: false,
            can_trap: false,
            other_side_effects: false,
        }
    }

    pub fn operands_in(mut self, operands: Vec<&Operand>) -> Self {
        assert!(self.operands_in.is_none());
        self.operands_in = Some(operands.iter().map(|x| (*x).clone()).collect());
        self
    }
    pub fn operands_out(mut self, operands: Vec<&Operand>) -> Self {
        assert!(self.operands_out.is_none());
        self.operands_out = Some(operands.iter().map(|x| (*x).clone()).collect());
        self
    }
    pub fn constraints(mut self, constraints: Vec<Constraint>) -> Self {
        assert!(self.constraints.is_none());
        self.constraints = Some(constraints);
        self
    }

    pub fn is_terminator(mut self, val: bool) -> Self {
        self.is_terminator = val;
        self
    }
    pub fn is_branch(mut self, val: bool) -> Self {
        self.is_branch = val;
        self
    }
    pub fn is_indirect_branch(mut self, val: bool) -> Self {
        self.is_indirect_branch = val;
        self
    }
    pub fn is_call(mut self, val: bool) -> Self {
        self.is_call = val;
        self
    }
    pub fn is_return(mut self, val: bool) -> Self {
        self.is_return = val;
        self
    }
    pub fn is_ghost(mut self, val: bool) -> Self {
        self.is_ghost = val;
        self
    }
    pub fn can_load(mut self, val: bool) -> Self {
        self.can_load = val;
        self
    }
    pub fn can_store(mut self, val: bool) -> Self {
        self.can_store = val;
        self
    }
    pub fn can_trap(mut self, val: bool) -> Self {
        self.can_trap = val;
        self
    }
    pub fn other_side_effects(mut self, val: bool) -> Self {
        self.other_side_effects = val;
        self
    }

    pub fn finish(self, format_registry: &FormatRegistry) -> Instruction {
        let operands_in = self.operands_in.unwrap_or_else(Vec::new);
        let operands_out = self.operands_out.unwrap_or_else(Vec::new);

        let format_index = format_registry.lookup(&operands_in);

        let mut value_opnums = Vec::new();
        let mut imm_opnums = Vec::new();
        for (i, op) in operands_in.iter().enumerate() {
            if op.is_value() {
                value_opnums.push(i);
            } else if op.is_immediate() {
                imm_opnums.push(i);
            } else {
                assert!(op.is_varargs());
            }
        }

        let mut value_results = Vec::new();
        for (i, op) in operands_out.iter().enumerate() {
            if op.is_value() {
                value_results.push(i);
            }
        }

        let format = format_registry.get(format_index);
        let polymorphic_info =
            verify_polymorphic(&operands_in, &operands_out, &format, &value_opnums);

        // Infer from output operands whether an instruciton clobbers CPU flags or not.
        let writes_cpu_flags = operands_out.iter().any(|op| op.is_cpu_flags());

        Instruction {
            name: self.name,
            camel_name: camel_case(self.name),
            doc: self.doc,
            operands_in,
            operands_out,
            _constraints: self.constraints.unwrap_or_else(Vec::new),
            format: format_index,
            polymorphic_info,
            value_opnums,
            value_results,
            imm_opnums,
            is_terminator: self.is_terminator,
            is_branch: self.is_branch,
            is_indirect_branch: self.is_indirect_branch,
            is_call: self.is_call,
            is_return: self.is_return,
            is_ghost: self.is_ghost,
            can_load: self.can_load,
            can_store: self.can_store,
            can_trap: self.can_trap,
            other_side_effects: self.other_side_effects,
            writes_cpu_flags,
        }
    }
}

/// Check if this instruction is polymorphic, and verify its use of type variables.
fn verify_polymorphic(
    operands_in: &Vec<Operand>,
    operands_out: &Vec<Operand>,
    format: &InstructionFormat,
    value_opnums: &Vec<usize>,
) -> Option<PolymorphicInfo> {
    // The instruction is polymorphic if it has one free input or output operand.
    let is_polymorphic = operands_in
        .iter()
        .any(|op| op.is_value() && op.type_var().unwrap().free_typevar().is_some())
        || operands_out
            .iter()
            .any(|op| op.is_value() && op.type_var().unwrap().free_typevar().is_some());

    if !is_polymorphic {
        return None;
    }

    // Verify the use of type variables.
    let mut use_typevar_operand = false;
    let mut ctrl_typevar = None;
    let mut other_typevars = None;
    let mut maybe_error_message = None;

    let tv_op = format.typevar_operand;
    if let Some(tv_op) = tv_op {
        if tv_op < value_opnums.len() {
            let op_num = value_opnums[tv_op];
            let tv = operands_in[op_num].type_var().unwrap();
            let free_typevar = tv.free_typevar();
            if (free_typevar.is_some() && tv == &free_typevar.unwrap())
                || !tv.singleton_type().is_none()
            {
                match verify_ctrl_typevar(tv, &value_opnums, &operands_in, &operands_out) {
                    Ok(typevars) => {
                        other_typevars = Some(typevars);
                        ctrl_typevar = Some(tv.clone());
                        use_typevar_operand = true;
                    }
                    Err(error_message) => {
                        maybe_error_message = Some(error_message);
                    }
                }
            }
        }
    };

    if !use_typevar_operand {
        if operands_out.len() == 0 {
            match maybe_error_message {
                Some(msg) => panic!(msg),
                None => panic!("typevar_operand must be a free type variable"),
            }
        }

        let tv = operands_out[0].type_var().unwrap();
        let free_typevar = tv.free_typevar();
        if free_typevar.is_some() && tv != &free_typevar.unwrap() {
            panic!("first result must be a free type variable");
        }

        other_typevars =
            Some(verify_ctrl_typevar(tv, &value_opnums, &operands_in, &operands_out).unwrap());
        ctrl_typevar = Some(tv.clone());
    }

    // rustc is not capable to determine this statically, so enforce it with options.
    assert!(ctrl_typevar.is_some());
    assert!(other_typevars.is_some());

    Some(PolymorphicInfo {
        use_typevar_operand,
        ctrl_typevar: ctrl_typevar.unwrap(),
        other_typevars: other_typevars.unwrap(),
    })
}

/// Verify that the use of TypeVars is consistent with `ctrl_typevar` as the controlling type
/// variable.
///
/// All polymorhic inputs must either be derived from `ctrl_typevar` or be independent free type
/// variables only used once.
///
/// All polymorphic results must be derived from `ctrl_typevar`.
///
/// Return a vector of other type variables used, or panics.
fn verify_ctrl_typevar(
    ctrl_typevar: &TypeVar,
    value_opnums: &Vec<usize>,
    operands_in: &Vec<Operand>,
    operands_out: &Vec<Operand>,
) -> Result<Vec<TypeVar>, String> {
    let mut other_typevars = Vec::new();

    // Check value inputs.
    for &op_num in value_opnums {
        let typ = operands_in[op_num].type_var();

        let tv = if let Some(typ) = typ {
            typ.free_typevar()
        } else {
            None
        };

        // Non-polymorphic or derived from ctrl_typevar is OK.
        let tv = match tv {
            Some(tv) => {
                if &tv == ctrl_typevar {
                    continue;
                }
                tv
            }
            None => continue,
        };

        // No other derived typevars allowed.
        if typ.is_some() && typ.unwrap() != &tv {
            return Err(format!(
                "{:?}: type variable {} must be derived from {:?}",
                operands_in[op_num],
                typ.unwrap().name,
                ctrl_typevar
            ));
        }

        // Other free type variables can only be used once each.
        for other_tv in &other_typevars {
            if &tv == other_tv {
                return Err(format!(
                    "type variable {} can't be used more than once",
                    tv.name
                ));
            }
        }

        other_typevars.push(tv);
    }

    // Check outputs.
    for result in operands_out {
        if !result.is_value() {
            continue;
        }

        let typ = result.type_var().unwrap();
        let tv = typ.free_typevar();

        // Non-polymorphic or derived form ctrl_typevar is OK.
        if tv.is_none() || &tv.unwrap() == ctrl_typevar {
            continue;
        }

        return Err("type variable in output not derived from ctrl_typevar".into());
    }

    Ok(other_typevars)
}


text:
layout: page
title: About
permalink: /about/
order: 1
share: false
---

I am ,**[Thirupathi Reddy Guduru]({{ site.icons.linkedin}})** , a passionate software engineer, Java & Scala lover.
I like to read books and follow technology websites like **[infoq](http://www.infoq.com/)** , **[DZone](https://dzone.com/)** and **[jaxenter](https://jaxenter.com/)**. Interested in distributed and micro-services based architectures.

I did my masters in computer science a decade ago.
I started writing code since 2002 but i started writing code for living since 2006.

And also I'm a husband and a father of a beautiful girl.


text:
class TmuxinatorCompletion < Formula
  desc "Shell completion for Tmuxinator"
  homepage "https://github.com/tmuxinator/tmuxinator"
  url "https://github.com/tmuxinator/tmuxinator/archive/v1.1.4.tar.gz"
  sha256 "db24b1e07aa7164bee2cf73cc936dc2fb75aa4d062b3b70dccd5f85e6d580e34"
  head "https://github.com/tmuxinator/tmuxinator.git"

  bottle :unneeded

  def install
    bash_completion.install "completion/tmuxinator.bash" => "tmuxinator"
    zsh_completion.install "completion/tmuxinator.zsh" => "_tmuxinator"
    fish_completion.install Dir["completion/*.fish"]
  end

  test do
    assert_match "-F _tmuxinator",
      shell_output("source #{bash_completion}/tmuxinator && complete -p tmuxinator")
  end
end


text:
namespace blink {

class NGBlockNode;

// This algorithm handles msub, msup and msubsup elements.
class CORE_EXPORT NGMathScriptsLayoutAlgorithm
    : public NGLayoutAlgorithm<NGBlockNode,
                               NGBoxFragmentBuilder,
                               NGBlockBreakToken> {
 public:
  explicit NGMathScriptsLayoutAlgorithm(const NGLayoutAlgorithmParams& params);

  struct ChildAndMetrics {
    DISALLOW_NEW();

   public:
    Member<const NGLayoutResult> result;
    LayoutUnit ascent;
    LayoutUnit descent;
    LayoutUnit inline_size;
    LayoutUnit base_italic_correction;
    NGBoxStrut margins;
    NGBlockNode node = nullptr;

    void Trace(Visitor* visitor) const {
      visitor->Trace(result);
      visitor->Trace(node);
    }
  };

  struct SubSupPair {
    DISALLOW_NEW();

   public:
    void Trace(Visitor* visitor) const {
      visitor->Trace(sub);
      visitor->Trace(sup);
    }

    NGBlockNode sub = nullptr;
    NGBlockNode sup = nullptr;
  };

 private:
  void GatherChildren(NGBlockNode* base,
                      HeapVector<SubSupPair>*,
                      NGBlockNode* prescripts,
                      unsigned* first_prescript_index,
                      NGBoxFragmentBuilder* = nullptr) const;

  MinMaxSizesResult ComputeMinMaxSizes(const MinMaxSizesFloatInput&) final;

  typedef HeapVector<ChildAndMetrics, 4> ChildrenAndMetrics;

  ChildAndMetrics LayoutAndGetMetrics(NGBlockNode child) const;

  struct VerticalMetrics {
    STACK_ALLOCATED();

   public:
    LayoutUnit sub_shift;
    LayoutUnit sup_shift;
    LayoutUnit ascent;
    LayoutUnit descent;
    NGBoxStrut margins;
  };
  VerticalMetrics GetVerticalMetrics(
      const ChildAndMetrics& base_metrics,
      const ChildrenAndMetrics& sub_metrics,
      const ChildrenAndMetrics& sup_metrics) const;

  const NGLayoutResult* Layout() final;
};

}  // namespace blink

WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(
    blink::NGMathScriptsLayoutAlgorithm::ChildAndMetrics)
WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(
    blink::NGMathScriptsLayoutAlgorithm::SubSupPair)

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_MATHML_NG_MATH_SCRIPTS_LAYOUT_ALGORITHM_H_


text:
require "test_helper"

# Test check methods.
class CheckTest < ActiveSupport::TestCase
  test "should run check" do
    checks(:one).run!
    assert true, checks(:one).last_run_at.present?
  end
end


text:
<?php

/**
* <auto-generated>
*     This code was generated by Codezu.
*
*     Changes to this file may cause incorrect behavior and will be lost if
*     the code is regenerated.
* </auto-generated>
*/

namespace Mozu\Api\Clients\Commerce\Orders;

use Mozu\Api\MozuClient;
use Mozu\Api\Urls\Commerce\Orders\PaymentUrl;

/**
* Use the Payments subresource to manage payment transactions for orders. Each transaction performed for an order represents an individual payment. For example, if an order totals $75.00 but the shopper has a $50.00 gift certificate, both the gift certificate transaction and the credit card transaction for the remaining $25.00 are recorded as payments for the order.
*/
class PaymentClient {

	/**
	* Retrieves information about all payment transactions submitted for the specified order.
	*
	* @param string $orderId Unique identifier of the order.
	* @param string $responseFields Use this field to include those fields which are not included by default.
	* @return MozuClient
	*/
	public static function getPaymentsClient($orderId, $responseFields =  null)
	{
		$url = PaymentUrl::getPaymentsUrl($orderId, $responseFields);
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url);
		return $mozuClient;

	}

	/**
	* Retrieves the list of all available payment actions dependent on the order payment status by specifying the order ID.
	*
	* @param string $orderId Unique identifier of the order.
	* @param string $paymentId Unique identifier of the payment for which to perform the action.
	* @return MozuClient
	*/
	public static function getAvailablePaymentActionsClient($orderId, $paymentId)
	{
		$url = PaymentUrl::getAvailablePaymentActionsUrl($orderId, $paymentId);
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url);
		return $mozuClient;

	}

	/**
	* Retrieves information about a specific payment transaction submitted for the specified order.
	*
	* @param string $orderId Unique identifier of the order.
	* @param string $paymentId Unique identifier of the payment for which to perform the action.
	* @param string $responseFields Use this field to include those fields which are not included by default.
	* @return MozuClient
	*/
	public static function getPaymentClient($orderId, $paymentId, $responseFields =  null)
	{
		$url = PaymentUrl::getPaymentUrl($orderId, $paymentId, $responseFields);
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url);
		return $mozuClient;

	}

	/**
	* Performs the specified action for an individual order payment transaction.
	*
	* @param string $orderId Unique identifier of the order.
	* @param string $paymentId Unique identifier of the payment for which to perform the action.
	* @param string $responseFields Use this field to include those fields which are not included by default.
	* @param PaymentAction $action Properties of the payment action performed for an order.
	* @return MozuClient
	*/
	public static function performPaymentActionClient($action, $orderId, $paymentId, $responseFields =  null)
	{
		$url = PaymentUrl::performPaymentActionUrl($orderId, $paymentId, $responseFields);
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url)->withBody($action);
		return $mozuClient;

	}

	/**
	* Creates a new payment transaction for the specified order and performs the specified action.
	*
	* @param string $orderId Unique identifier of the order.
	* @param string $responseFields Use this field to include those fields which are not included by default.
	* @param PaymentAction $action Properties of the payment action performed for an order.
	* @return MozuClient
	*/
	public static function createPaymentActionClient($action, $orderId, $responseFields =  null)
	{
		$url = PaymentUrl::createPaymentActionUrl($orderId, $responseFields);
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url)->withBody($action);
		return $mozuClient;

	}

}

?>