text:
{% extends "indexNL.html" %}

{% comment %}

Main page of the Writigain.

{% endcomment %}

{% block title %}
    Listigain
{% endblock %}

{% block content %}

Welcome to Procrastigain. Please click here to enter the site.

{% endblock %}


text:
package org.apache.ws.security.processor;

import org.apache.ws.security.WSConstants;
import org.apache.ws.security.WSDocInfo;
import org.apache.ws.security.WSSConfig;
import org.apache.ws.security.WSSecurityEngine;
import org.apache.ws.security.WSSecurityEngineResult;
import org.apache.ws.security.WSSecurityException;
import org.apache.ws.security.handler.RequestData;
import org.apache.ws.security.message.token.Timestamp;
import org.apache.ws.security.validate.Credential;
import org.apache.ws.security.validate.Validator;
import org.w3c.dom.Element;

import java.util.List;

public class TimestampProcessor implements Processor {
    private static org.apache.commons.logging.Log log =
        org.apache.commons.logging.LogFactory.getLog(TimestampProcessor.class);

    public List<WSSecurityEngineResult> handleToken(
        Element elem,
        RequestData data,
        WSDocInfo wsDocInfo
    ) throws WSSecurityException {
        if (log.isDebugEnabled()) {
            log.debug("Found Timestamp list element");
        }
        //
        // Decode Timestamp, add the found time (created/expiry) to result
        //
        WSSConfig config = data.getWssConfig();
        Timestamp timestamp = new Timestamp(elem, config.isWsiBSPCompliant());
        Credential credential = new Credential();
        credential.setTimestamp(timestamp);

        WSSecurityEngineResult result =
            new WSSecurityEngineResult(WSConstants.TS, timestamp);
        result.put(WSSecurityEngineResult.TAG_ID, timestamp.getID());

        Validator validator = data.getValidator(WSSecurityEngine.TIMESTAMP);
        if (validator != null) {
            validator.validate(credential, data);

            result.put(WSSecurityEngineResult.TAG_VALIDATED_TOKEN, Boolean.TRUE);
        }

        wsDocInfo.addTokenElement(elem);
        wsDocInfo.addResult(result);
        return java.util.Collections.singletonList(result);
    }

}

redpajama_set_name: RedPajamaGithub


text:
from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^$', views.index, {}, 'home'),
    url(r'^announcements/$', views.announcements, {}, 'announcements'),
    url(r'^news/(?P<url>[^/]+)$', views.news, {}, 'news_acticle'),

    url(r'^about/$', views.static, {'content_url': 'about'}, 'about'),
    url(r'^club/$', views.static, {'content_url': 'club'}, 'club'),
    url(r'^comments/$', views.static, {'content_url': 'comments'}, 'comments'),
    url(r'^contact/$', views.static, {'content_url': 'contacts'}, 'contact'),
    url(r'^pickup/$', views.static, {'content_url': 'pickup'}, 'pickup'),
    url(r'^rules/$', views.static, {'content_url': 'rules'}, 'rules'),
    url(r'^weather/$', views.static, {'content_url': 'weather'}, 'weather'),
    url(r'^welcome/$', views.static, {'content_url': 'welcome'}, 'welcome'),
    url(r'^youth/$', views.static, {'content_url': 'youth'}, 'youth'),

    url(r'^pages/(?P<content_url>[^/]+)/$', views.static, {}, 'static_page'),
    ]


text:
/* ###
 * IP: GHIDRA
 * REVIEWED: YES
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
//A script that uses inner classes.
//@category Examples.Demo

import ghidra.app.script.GhidraScript;

public class InnerClassScript extends GhidraScript {

    @Override
    public void run() throws Exception {
        MyInnerClass mic = new MyInnerClass();
        println(mic.toString());

        MyExternalClass mec = new MyExternalClass();
        println(mec.toString());
    }

    private class MyInnerClass {
        @Override
        public String toString() {
            return "I am an inner class.";
        }
    }
}

class MyExternalClass {
    @Override
    public String toString() {
        return "I am an external class.";
    }
}


text:
package hudson.plugins.promoted_builds;

import hudson.model.FreeStyleProject;
import hudson.plugins.promoted_builds.conditions.DownstreamPassCondition;
import hudson.tasks.JavadocArchiver;
import org.jvnet.hudson.test.Bug;
import org.jvnet.hudson.test.HudsonTestCase;
import org.jvnet.hudson.test.recipes.LocalData;

/**
 * @author Kohsuke Kawaguchi
 */
public class ConfigurationRoundtripTest extends HudsonTestCase {
    /**
     * Configuration roundtrip test to detect data loss.
     */
    public void testRoundtrip() throws Exception {
        FreeStyleProject down = createFreeStyleProject();

        FreeStyleProject p = createFreeStyleProject();
        JobPropertyImpl pp = new JobPropertyImpl(p);
        p.addProperty(pp);

        PromotionProcess proc = pp.addProcess("test");
        assertEquals(1,pp.getItems().size());
        proc.conditions.add(new DownstreamPassCondition(down.getName()));
        proc.getBuildSteps().add(new JavadocArchiver("somedir",true));
        proc.icon = "star-blue";

        // round trip
        submit(new WebClient().getPage(p,"configure").getFormByName("config"));

        // assert that the configuration is still intact
        pp = p.getProperty(JobPropertyImpl.class);
        assertEquals(1,pp.getItems().size());
        proc = pp.getItem("test");
        assertEquals(1,proc.conditions.toList().size());
        DownstreamPassCondition dcp = proc.conditions.get(DownstreamPassCondition.class);
        assertEquals(dcp.getJobs(),down.getName());
        assertEquals(1,proc.getBuildSteps().size());
        JavadocArchiver ja = (JavadocArchiver)proc.getBuildSteps().get(0);
        assertEquals("somedir",ja.getJavadocDir());
        assertTrue(ja.isKeepAll());
        assertEquals("star-blue", proc.icon);
    }

    @LocalData
    @Bug(17341)
    public void testLoad() throws Exception {
        FreeStyleProject j = jenkins.getItemByFullName("j", FreeStyleProject.class);
        assertNotNull(j);
        Promotion p = j.getProperty(JobPropertyImpl.class).getItem("OK").getBuildByNumber(1);
        assertNotNull(p);
    }

}


text:
package com.komis_spring_hiber.service;

import java.util.List;

import com.komis_spring_hiber.model.Transakcja;

public interface TransakcjaService {
	public void add(Transakcja transakcja);
	public void edit(Transakcja transakcja);
	public void delete(int idTransakcja);
	public Transakcja getTransakcja(int idTransakcja);
	public List getAllTransakcja();
}


text:
package eas.com;

public class SomeClass implements SomeInterface {
    @Override
    public String someMethod(String param1, String param2, String param3, String param4) {
        return param1 + " " + param2 + " " + param3 + " " + param4;
    }
}


text:
namespace crypto {

ScopedTestNSSChromeOSUser::ScopedTestNSSChromeOSUser(
    const std::string& username_hash)
    : username_hash_(username_hash), constructed_successfully_(false) {
  if (!temp_dir_.CreateUniqueTempDir())
    return;
  // This opens a software DB in the given folder. In production code that is in
  // the home folder, but for testing the temp folder is used.
  constructed_successfully_ =
      InitializeNSSForChromeOSUser(username_hash, temp_dir_.GetPath());
}

ScopedTestNSSChromeOSUser::~ScopedTestNSSChromeOSUser() {
  if (constructed_successfully_)
    CloseChromeOSUserForTesting(username_hash_);
}

void ScopedTestNSSChromeOSUser::FinishInit() {
  DCHECK(constructed_successfully_);
  if (!ShouldInitializeTPMForChromeOSUser(username_hash_))
    return;
  WillInitializeTPMForChromeOSUser(username_hash_);
  InitializePrivateSoftwareSlotForChromeOSUser(username_hash_);
}

}  // namespace crypto


text:
<?php

namespace Symfony\Component\Security\Acl\Dbal;

use Doctrine\DBAL\Schema\Schema as BaseSchema;
use Doctrine\DBAL\Connection;

/**
 * The schema used for the ACL system.
 *
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
final class Schema extends BaseSchema
{
    protected $options;

    /**
     * Constructor
     *
     * @param array      $options    the names for tables
     * @param Connection $connection
     */
    public function __construct(array $options, Connection $connection = null)
    {
        $schemaConfig = null === $connection ? null : $connection->getSchemaManager()->createSchemaConfig();

        parent::__construct(array(), array(), $schemaConfig);

        $this->options = $options;

        $this->addClassTable();
        $this->addSecurityIdentitiesTable();
        $this->addObjectIdentitiesTable();
        $this->addObjectIdentityAncestorsTable();
        $this->addEntryTable();
    }

    /**
     * Merges ACL schema with the given schema.
     *
     * @param BaseSchema $schema
     */
    public function addToSchema(BaseSchema $schema)
    {
        foreach ($this->getTables() as $table) {
            $schema->_addTable($table);
        }

        foreach ($this->getSequences() as $sequence) {
            $schema->_addSequence($sequence);
        }
    }

    /**
     * Adds the class table to the schema
     */
    protected function addClassTable()
    {
        $table = $this->createTable($this->options['class_table_name']);
        $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto'));
        $table->addColumn('class_type', 'string', array('length' => 200));
        $table->setPrimaryKey(array('id'));
        $table->addUniqueIndex(array('class_type'));
    }

    /**
     * Adds the entry table to the schema
     */
    protected function addEntryTable()
    {
        $table = $this->createTable($this->options['entry_table_name']);

        $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto'));
        $table->addColumn('class_id', 'integer', array('unsigned' => true));
        $table->addColumn('object_identity_id', 'integer', array('unsigned' => true, 'notnull' => false));
        $table->addColumn('field_name', 'string', array('length' => 50, 'notnull' => false));
        $table->addColumn('ace_order', 'smallint', array('unsigned' => true));
        $table->addColumn('security_identity_id', 'integer', array('unsigned' => true));
        $table->addColumn('mask', 'integer');
        $table->addColumn('granting', 'boolean');
        $table->addColumn('granting_strategy', 'string', array('length' => 30));
        $table->addColumn('audit_success', 'boolean');
        $table->addColumn('audit_failure', 'boolean');

        $table->setPrimaryKey(array('id'));
        $table->addUniqueIndex(array('class_id', 'object_identity_id', 'field_name', 'ace_order'));
        $table->addIndex(array('class_id', 'object_identity_id', 'security_identity_id'));

        $table->addForeignKeyConstraint($this->getTable($this->options['class_table_name']), array('class_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE'));
        $table->addForeignKeyConstraint($this->getTable($this->options['oid_table_name']), array('object_identity_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE'));
        $table->addForeignKeyConstraint($this->getTable($this->options['sid_table_name']), array('security_identity_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE'));
    }

    /**
     * Adds the object identity table to the schema
     */
    protected function addObjectIdentitiesTable()
    {
        $table = $this->createTable($this->options['oid_table_name']);

        $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto'));
        $table->addColumn('class_id', 'integer', array('unsigned' => true));
        $table->addColumn('object_identifier', 'string', array('length' => 100));
        $table->addColumn('parent_object_identity_id', 'integer', array('unsigned' => true, 'notnull' => false));
        $table->addColumn('entries_inheriting', 'boolean');

        $table->setPrimaryKey(array('id'));
        $table->addUniqueIndex(array('object_identifier', 'class_id'));
        $table->addIndex(array('parent_object_identity_id'));

        $table->addForeignKeyConstraint($table, array('parent_object_identity_id'), array('id'));
    }

    /**
     * Adds the object identity relation table to the schema
     */
    protected function addObjectIdentityAncestorsTable()
    {
        $table = $this->createTable($this->options['oid_ancestors_table_name']);

        $table->addColumn('object_identity_id', 'integer', array('unsigned' => true));
        $table->addColumn('ancestor_id', 'integer', array('unsigned' => true));

        $table->setPrimaryKey(array('object_identity_id', 'ancestor_id'));

        $oidTable = $this->getTable($this->options['oid_table_name']);
        $table->addForeignKeyConstraint($oidTable, array('object_identity_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE'));
        $table->addForeignKeyConstraint($oidTable, array('ancestor_id'), array('id'), array('onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE'));
    }

    /**
     * Adds the security identity table to the schema
     */
    protected function addSecurityIdentitiesTable()
    {
        $table = $this->createTable($this->options['sid_table_name']);

        $table->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => 'auto'));
        $table->addColumn('identifier', 'string', array('length' => 200));
        $table->addColumn('username', 'boolean');

        $table->setPrimaryKey(array('id'));
        $table->addUniqueIndex(array('identifier', 'username'));
    }
}


text:
var forEach = require('lodash.foreach');
var assign = require('lodash.assign');
var omit = require('lodash.omit');
var isString = require('lodash.isstring');
var isArray = require('lodash.isarray');
var isUndefined = require('lodash.isundefined');
var result = require('lodash.result');

module.exports = function (target, mixins, options) {
  options = assign({
    invoke: []
  }, options);

  var mixinFunctions = {};

  forEach(options.invoke, function (fnName) {
    mixinFunctions[fnName] = [];
  });

  var omitFromAssign = [
    'dataTypes', 'props', 'session', 'derived', 'collections', 'children',
    'events'
  ].concat(options.invoke);

  target.prototype.events = target.prototype.events || {};
  target.prototype.bindings = target.prototype.bindings || {};

  forEach(mixins, function (mixin) {
    if (mixin.dataTypes) {
      forEach(mixin.dataTypes, function (def, name) {
        target.prototype._dataTypes[name] = def;
      });
    }
    if (mixin.props) {
      forEach(mixin.props, function (def, name) {
        createPropertyDefinition(target.prototype, name, def);
      });
    }
    if (mixin.session) {
      forEach(mixin.session, function (def, name) {
        createPropertyDefinition(target.prototype, name, def, true);
      });
    }
    if (mixin.derived) {
      forEach(mixin.derived, function (def, name) {
        createDerivedProperty(target.prototype, name, def);
      });
    }
    if (mixin.collections) {
      forEach(mixin.collections, function (constructor, name) {
        target.prototype._collections[name] = constructor;
      });
    }
    if (mixin.children) {
      forEach(mixin.children, function (constructor, name) {
        target.prototype._children[name] = constructor;
      });
    }
    if (mixin.events) {
      assign(target.prototype.events, mixin.events);
    }
    if (mixin.bindings) { // TODO: Make it work with arrays
      assign(target.prototype.bindings, mixin.bindings);
    }

    assign(target.prototype, omit(mixin, omitFromAssign));

    forEach(options.invoke, function (fnName) {
      var fn = mixin[fnName]
      if (fn) {
        mixinFunctions[fnName].push(fn);
      }
    });
  });

  forEach(options.invoke, function (fnName) {
    var functions = mixinFunctions[fnName];
    if (functions.length > 0) {
      var realFn = target.prototype[fnName];
      target.prototype[fnName] = function () {
        var args = [].slice.call(arguments)
          , self = this
          , result;

        if (realFn) {
          result = realFn.apply(this, args);
        }

        forEach(functions, function (fn) {
          fn.apply(self, args);
        });

        return result;
      }
    }
  });
};

/* This is copied from ampersand-state */

// helper for creating/storing property definitions and creating
// appropriate getters/setters
function createPropertyDefinition(object, name, desc, isSession) {
  var def = object._definition[name] = {};
  var type, descArray;

  if (isString(desc)) {
    // grab our type if all we've got is a string
    type = object._ensureValidType(desc);
    if (type) def.type = type;
  } else {

    //Transform array of ['type', required, default] to object form
    if (isArray(desc)) {
      descArray = desc;
      desc = {
        type: descArray[0],
        required: descArray[1],
        'default': descArray[2]
      };
    }

    type = object._ensureValidType(desc.type);
    if (type) def.type = type;

    if (desc.required) def.required = true;

    if (desc['default'] && typeof desc['default'] === 'object') {
      throw new TypeError('The default value for ' + name + ' cannot be an object/array, must be a value or a function which returns a value/object/array');
    }

    def['default'] = desc['default'];

    def.allowNull = desc.allowNull ? desc.allowNull : false;
    if (desc.setOnce) def.setOnce = true;
    if (def.required && isUndefined(def['default']) && !def.setOnce) def['default'] = object._getDefaultForType(type);
    def.test = desc.test;
    def.values = desc.values;
  }
  if (isSession) def.session = true;

  // define a getter/setter on the prototype
  // but they get/set on the instance
  Object.defineProperty(object, name, {
    set: function (val) {
      this.set(name, val);
    },
    get: function () {
      if (!this._values) {
        throw Error('You may be trying to `extend` a state object with "' + name + '" which has been defined in `props` on the object being extended');
      }
      var value = this._values[name];
      var typeDef = this._dataTypes[def.type];
      if (typeof value !== 'undefined') {
        if (typeDef && typeDef.get) {
          value = typeDef.get(value);
        }
        return value;
      }
      value = result(def, 'default');
      this._values[name] = value;
      return value;
    }
  });

  return def;
}

/* This is copied from ampersand-state */

// helper for creating derived property definitions
function createDerivedProperty(modelProto, name, definition) {
  var def = modelProto._derived[name] = {
    fn: isFunction(definition) ? definition : definition.fn,
    cache: (definition.cache !== false),
    depList: definition.deps || []
  };

  // add to our shared dependency list
  forEach(def.depList, function (dep) {
    modelProto._deps[dep] = union(modelProto._deps[dep] || [], [name]);
  });

  // defined a top-level getter for derived names
  Object.defineProperty(modelProto, name, {
    get: function () {
      return this._getDerivedProperty(name);
    },
    set: function () {
      throw new TypeError('"' + name + '" is a derived property, it can\'t be set directly.');
    }
  });
}


text:
import logging
import subprocess

from scalegrease import runner

class HadoopRunner(runner.RunnerBase):
    def run_job(self, jar_path, artifact, argv):
        hadoop_cmd = self._config["command"] + [jar_path] + argv
        logging.info("Executing: %s", " ".join(hadoop_cmd))
        subprocess.check_call(hadoop_cmd)


text:
A very simple 3-wheel robot that can be managed from an external application.

The goal of the experiment is trying to solve, in simplistic and home-made way, some of the challenges of having an autonomous rover.

![Scheme](https://github.com/albertoft/robot/blob/master/doc/robot-scheme.png)

# Robot
* Follows a given course using a compass and avoiding obstacles.
* Reports current status and position through Bluetooth to an external application in JSON format.
* Accepts commands sent from external application.
* Operates in auto and manual modes.

## Components
* 2 x FS90R Servo motors.
* 1 x HMC5883L Digital Compass.
* 1 x HC-SR04 Ultrasonic sensor.
* 1 x HC-06 Bluetooth module.
* 1 x Led RGB.

![Robot](https://github.com/albertoft/robot/blob/master/doc/img/robot-1.jpg)

# NodeJS application
* Runs on a RaspBerry Pi 2 + CSL Bluetooth USB Adapter micro V4.0.
* Receives monitor data from robot using Bluetooth (heading, course, obstacle, position, state, etc.)
 * Sends live monitor data using websocket to client AngularJS application.
 * Stores received data in database (so it can be retrieved later).
* REST api that can be used to retrive monitor data or to send commands to robot.

![NodeJS-app](https://github.com/albertoft/robot/blob/master/doc/img/nodeapp-1-auto.jpg)

# AngularJS application
* Display robot monitor data using HighCharts.
 * Charts are updated in real-time as live monitor data is received through websockets.
* Allows the user to send commands to the robot:
  * Set Auto / manual mode.
  * Go Forward / Left / Right.

![AngularJS-app-data](https://github.com/albertoft/robot/blob/master/doc/img/angularapp-monitor-data.jpg)
![AngularJS-app-position](https://github.com/albertoft/robot/blob/master/doc/img/angularapp-monitor-position.jpg)
![AngularJS-app-command](https://github.com/albertoft/robot/blob/master/doc/img/angularapp-command.PNG)


text:
package org.apache.logging.log4j.core.appender.rolling;

import static org.apache.logging.log4j.hamcrest.Descriptors.that;
import static org.apache.logging.log4j.hamcrest.FileMatchers.hasName;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.hasItemInArray;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;

import java.io.File;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.StandardWatchEventKinds;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey;
import java.nio.file.WatchService;

import org.apache.commons.lang3.SystemUtils;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.junit.LoggerContextRule;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.RuleChain;

/**
 * LOG4J2-1766.
 */
public class RollingAppenderDirectWriteTempCompressedFilePatternTest {

    private static final String CONFIG = "log4j-rolling-direct-tmp-compress-folder.xml";

    private static final String DIR = "target/rolling-direct";

    public static LoggerContextRule loggerContextRule = LoggerContextRule
            .createShutdownTimeoutLoggerContextRule(CONFIG);

    @Rule
    public RuleChain chain = loggerContextRule.withCleanFoldersRule(DIR);

    private Logger logger;

    @Before
    public void setUp() throws Exception {
        // Disable this test on MacOS. FileWatcher isn't fast enough to work properly.
        Assume.assumeTrue(!SystemUtils.IS_OS_MAC_OSX);
        this.logger = loggerContextRule.getLogger(RollingAppenderDirectWriteTest.class.getName());
    }

    @Test
    public void testAppender() throws Exception {
        final File dir = new File(DIR);
        dir.mkdirs();
        try (final WatchService watcher = FileSystems.getDefault().newWatchService()) {
            WatchKey key = dir.toPath().register(watcher, StandardWatchEventKinds.ENTRY_CREATE);

            for (int i = 0; i < 100; ++i) {
                logger.debug("This is test message number " + i);
            }
            Thread.sleep(50);
            assertTrue("Directory not created", dir.exists() && dir.listFiles().length > 0);
            final File[] files = dir.listFiles();
            assertNotNull(files);
            assertThat(files, hasItemInArray(that(hasName(that(endsWith(".gz"))))));

            int temporaryFilesCreated = 0;
            int compressedFiles = 0;
            key = watcher.take();

            for (final WatchEvent<?> event : key.pollEvents()) {
                final WatchEvent<Path> ev = (WatchEvent<Path>) event;
                final Path filename = ev.context();
                if (filename.toString().endsWith(".tmp")) {
                    temporaryFilesCreated++;
                }
                if (filename.toString().endsWith(".gz")) {
                    compressedFiles++;
                }
            }
            assertTrue("No temporary file created during compression", temporaryFilesCreated > 0);
            assertTrue("Temporarys file created not equals to compressed files",
                    compressedFiles == temporaryFilesCreated);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace RzDb.CodeGen
{
    public class XmlUtilities
    {
        public string ExtractConnectionString(string XmlConfigPath, string name)
        {
            var sConnStr = "";
            try
            {
                var xmldoc = new XmlDocument();
                xmldoc.Load(XmlConfigPath);
                var xnodes = xmldoc.SelectNodes("/configuration/connectionStrings/add[@name='" + name  + "']");
                var firstNode = xnodes[0];
                sConnStr = ((XmlElement)firstNode).Attributes["connectionString"].Value;
                return sConnStr;
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}


text:
/*
 * Contains declarations of classes defined for a variety of DWARF objects.
 */

#ifndef ELFF_DWARF_DIE_H_
#define ELFF_DWARF_DIE_H_

#include "dwarf_defs.h"
#include "elf_alloc.h"

class ElfFile;
class DwarfCU;

/* Encapsulates an object that wraps up a DIE, cached during
 * ELF file parsing.
 */
class DIEObject : public DwarfAllocBase {
 public:
  /* Constructs DIEObject intance.
   * Param:
   *  die - DIE represented with this instance.
   *  parent_cu - Compilation unit this DIE belongs to.
   *  parent_die - Parent DIE object for this DIE. This parameter can be NULL
   *    only for compilation unit DIEs.
   */
  DIEObject(const Dwarf_DIE* die, DwarfCU* parent_cu, DIEObject* parent_die)
      : die_(die),
        parent_cu_(parent_cu),
        parent_die_(parent_die),
        last_child_(NULL),
        prev_sibling_(NULL) {
  }

  /* Destructs DIEObject intance. */
  ~DIEObject();

  /* Gets ELF file this DIE belongs to. */
  ElfFile* elf_file() const;

  /* Gets DWARF tag (DW_TAG_Xxx) for the DIE represented with this instance. */
  Dwarf_Tag get_tag() const;

  /* Gets the best name for this DIE.
   * Some DIEs (such as inline routine DIEs) may have no DW_AT_name property,
   * but may reference to another DIE that may contain DIE name. This method
   * tries its best to get DIE name by iterating through different methods of
   * naming the DIE.
   * Return:
   *  Name for this DIE, or NULL if it was not possible to find a relevant DIE
   *  with DW_AT_name property.
   */
  const char* get_name() const;

  /* Gets DIE's attribute by its ID.
   * Param:
   *  at_id - ID (DW_AT_Xxx) of the attribute to get.
   *  attr - Upon successful return contains requested attribute information.
   * Return:
   *  true on success, or false if attribute for the given ID doesn't exist
   *  in the DIE's attribute list.
   */
  bool get_attrib(Dwarf_At at, DIEAttrib* attr) const;

  /* Gets the leaf DIE object containing given address.
   * See DwarfCU::get_leaf_die_for_address() for method details.
   * See DIEObject::contains_address() for implementation details.
   */
  DIEObject* get_leaf_for_address(Elf_Xword address);

  /* Finds a DIE object for the given die in the branch starting with
   * this DIE object.
   */
  DIEObject* find_die_object(const Dwarf_DIE* die_to_find);

  /* Dumps this object to stdout.
   * Param:
   *  only_this - If true, only this object will be dumped. If this parameter
   *    is false, all the childs and siblings of this object will be dumped
   *    along with this object.
   */
  void dump(bool only_this) const;

 protected:
  /* Checks if this DIE object containing given address.
   * Template param:
   *  AddrType - Type of compilation unin address (4, or 8 bytes), defined by
   *    address_size field of the CU header. Must be Elf_Xword for 8 bytes
   *    address, or Elf_Word for 4 bytes address.
   * Param:
   *  address - Address ti check.
   * Return:
   *  True, if this DIE address ranges (including low_pc, high_pc attributes)
   *  contain given address, or false otherwise.
   */
  template <typename AddrType>
  bool contains_address(Elf_Xword address);

  /* Advances to the DIE's property list.
   * Param:
   *  at_abbr - Upon successful return contains a pointer to the beginning of
   *    DIE attribute abbreviation list. This parameter can be NULL, if the
   *    caller is not interested in attribute abbreviation list for this DIE.
   *  tag - Upon successful return contains DIE's tag. This parameter can be
   *    NULL, if the caller is not interested in the tag value for this DIE.
   * Return:
   *  Pointer to the beginning of the DIE attribute list in mapped .debug_info
   *  section on success, or NULL on failure.
   */
  const Elf_Byte* advance(const Dwarf_Abbr_AT** at_abbr, Dwarf_Tag* tag) const;

 public:
  /* Gets DIE represented with this instance. */
  const Dwarf_DIE* die() const {
    return die_;
  }

  /* Gets compilation unit this DIE belongs to. */
  DwarfCU* parent_cu() const {
    return parent_cu_;
  }

  /* Gets parent DIE object for this die. */
  DIEObject* parent_die() const {
    return parent_die_;
  }

  /* Gets last child object in the list of this DIE's childs. NOTE: for better
   * performace the list is created in reverse order (relatively to the order,
   * in which children DIEs have been discovered).
   */
  DIEObject* last_child() const {
    return last_child_;
  }

  /* Links next child to the list of this DIE childs. */
  void link_child(DIEObject* child) {
    last_child_ = child;
  }

  /* Gets previous sibling of this DIE in the parent's DIE object list. */
  DIEObject* prev_sibling() const {
    return prev_sibling_;
  }

  /* Links next sibling to the list of this DIE siblings. */
  void link_sibling(DIEObject* sibl) {
    prev_sibling_ = sibl;
  }

  /* Checks if this DIE object represents a CU DIE.
   * We relay here on the fact that only CU DIE objects have no parent
   * DIE objects.
   */
  bool is_cu_die() const {
    return parent_die_ == NULL;
  }

  /* Gets this DIE level in the branch.
   * DIE level defines DIE's distance from the CU DIE in the branch this DIE
   * belongs to. In other words, DIE level defines how many parent DIEs exist
   * between this DIE, and the CU DIE. For instance, the CU DIE has level 0,
   * a subroutine a() in this compilation unit has level 1, a soubroutine b(),
   * that has been inlined into subroutine a() will have level 2, a try/catch
   * block in the inlined subroutine b() will have level 3, and so on.
   */
  Elf_Word get_level() const {
    return parent_die_ != NULL ? parent_die_->get_level() + 1 : 0;
  }

 protected:
  /* DIE that is represented with this instance. */
  const Dwarf_DIE*  die_;

  /* Compilation unit this DIE belongs to. */
  DwarfCU*          parent_cu_;

  /* Parent DIE object for this die. */
  DIEObject*        parent_die_;

  /* Last child object in the list of this DIE's childs. NOTE: for better
   * performace the list is created in reverse order (relatively to the order,
   * in which children DIEs have been discovered).
   */
  DIEObject*        last_child_;

  /* Previous sibling of this DIE in the parent's DIE object list. */
  DIEObject*        prev_sibling_;
};

#endif  // ELFF_DWARF_DIE_H_


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <link rel="icon"
    type="image/png"
    href="public/pictures/favicon.png"><link rel="stylesheet" type="text/css" href="public/style.css">
  <link rel="stylesheet" type="text/css" href="public/menu.css">
  <link rel="stylesheet" type="text/css" href="public/first.css">

  <title>4048</title>

      WIKI

      MULTIMEDIAFEED
      RESOURCES
      SPONSORS
      FIRST
      ABOUT

FIRST

    ABOUT

    Mission

    History

    Stats

WHAT FIRST IS

FIRST (For Inspiration and Recognition in Science and Technology), is an international nonprofit 501(c)(3) public charity founded by inventor and entrepreneur Dean Kamen, inventor of the Segway Human Transporter, and MIT professor Woodie Flowers.
      Ever since its founding, FIRST has been a youth competition that aims to encourage and inspire students in the fields of science, technology, engineering, and mathematics. In addition, FIRST provides an ideal base for the development of teamwork,
      strategy, commitment, and community outreach, all of which are vital in the future. Since its founding in 1989, FIRST has grown from 28 teams in a New Hampshire gym to an international competition with over 250,000 engaged people. Besides being
      a US-based organization, FIRST now includes 18 countries around the world, including Israel, Canada, Brazil, and China.

MISSION

"To transform our culture by creating a world where science and technology are celebrated and where young people dream of becoming science and technology heroes."

The mission of FIRST is to inspire young people to be science and technology leaders, by engaging them in exciting mentor-based programs that build science, engineering and technology skills, that inspire innovation, and that foster well-rounded life
      capabilities including self-confidence, communication, and leadership.

A BRIEF HISTORY OF FIRST

1989 - FIRST is founded

Dean Kamen, along with assistance from Woodie Flowers, founds FIRST. FIRST was built as a program which would inspire, in addition to teach, students in science and technology. To do this, FIRST aimed to integrate the enthusiasm of sports with
          the logic of technology and mathematics. Kamen states that FIRST is the invention he is most proud of.

1992 - FRC founded

Inaugural FIRST Robotics Competition (FRC) is held in 1992 in the Manchester Memorial High School gymnasium. The competition, named "Maize Craze", featured four robots trying to collect tennis balls into a predetermined starting base. As an impediment,
          the entire field was covered with 2 inches of corn, hence the name "Maize" Craze.

1998 - FLL founded

First LEGO League (FLL) is founded. Unlike FRC, which is aimed at high school students, FLL was geared towards 9 to 14-year old students and uses LEGO Mindstorms sets. FLL is much affordable to schools than FTC and FRC, as the standard LEGO Mindstorm
          set may be purchased for only 300 USD. In FRC, registration and the kit of parts alone cost around 6000 USD.

2005 - FTC founded

FIRST launches the FIRST Tech Challenge (FTC), formerly the FIRST Vex Challenge (FVC). FTC is designed to be more affordable and accessible than FRC, as the robots are approximately a third of the size of FRC robots. At its launch, FTC used the
          Vex Robotics Design System, which is standardized rather than FRC's relatively open rules for parts. In 2009, FIRST created their custom standard kit and control system known as Tetrix.

2005 - Three team alliance

FIRST announces that teams must cooperate in part the competition in "alliances". This reinforces the values of Coopertition by making teams which may or have already competed against each other work amongst themselves. With alliances, a team
          must be able to comply with the standards of others if they are to succeed in the end.

2014 - FIRST gains media attention

The movie Transformers: Age of Extinction features a FRC Robot built by 2468, Team Appreciate. Previously, five FRC teams had led the 2013 Macy's Thanksgiving Day Parade, with one robot cutting the ribbon while the other shot confetti.In 2015,
          the FRC kickoff was broadcast by NBC Comcast and availible OnDemand.

FIRST at a glance

From a small start in 1992 with 28 teams in a high-school gym, FIRST has grown to become an international organization with hundreds of thousands of students and volunteers. This year's FIRST Championship, held in the Edward Jones Dome in St. Louis,
      Missouri, will be the biggest yet.

0

STUDENTS

0

TEAMS

0

VOLUNTEERS

0

$$$ IN SCHOLARSHIPS

Aim high, land softly.

90 West Main Street

Westborough, MA 01581

702-907-4048

About Us

    About
    FIRST
    Sponsors
    Resources
    WikiOld site

Updates
Schedule
    FeedMultimedia

    Archive

Connect

    Facebook
    YouTube
    Email

2015 FRC 4048 | Redshift. All rights reserved.

Design/website by Kevin Hu