text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Lego.Ev3.Core;
using Lego.Ev3.Desktop;
using System.Diagnostics;

namespace LegoLogger
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        Brick _brick;

        public MainWindow()
        {
            InitializeComponent();
        }

        // Create a list to hold sensor data
        public List<string> LogList = new List<string>();

        // Stuff that happens when the program is loaded
        private async void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            //connect to brick via bluetooth
            _brick = new Brick(new BluetoothCommunication("COM3"));
            _brick.BrickChanged += _brick_BrickChanged;
            await _brick.ConnectAsync();
            await _brick.DirectCommand.PlayToneAsync(50, 1000, 300);
            // Add comma seperated titles to list
            LogList.Add("buttonpressed,xcoordinate,ycoordinate");
        }

        //stuff that happen every time the sensor values change
        private void _brick_BrickChanged(object sender, BrickChangedEventArgs e)
        {
            var buttonpressed = _brick.Ports[InputPort.One].SIValue;
            var xcoordinate = _brick.Ports[InputPort.A].SIValue;
            var ycoordinate = _brick.Ports[InputPort.B].SIValue;
            //create comma sperated list of data
            string LogValues = buttonpressed.ToString() + "," + xcoordinate.ToString() +","+ ycoordinate.ToString();
            //add to list
            LogList.Add(LogValues);

    }
        //action to take on button press
        private void ShowLogButton_Click(object sender, RoutedEventArgs e)
        {
            //method 1 to write log
            System.IO.File.WriteAllLines(@"C:\EV3\Log.csv", LogList);

            //method 2
            //add a carriage return after each string
            //var text = string.Empty;
            //foreach (String s in LogList)
            //{
            //    text += s.ToString() + "\r\n";
            //}
            //display the final list
            //MessageBox.Show(text);

            //System.IO.File.WriteAllText(@"C:\EV3\Log2.csv", text);

        }

    }

}


text:
import { expect } from 'chai';
import React from 'react';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import marked from 'marked';
import NotePage from '../../app/containers/note';
import configureStore from '../../app/store/configureStore';

function setup(initialState) {
  const store = configureStore(initialState);
  const app = mount(
    <Provider store={store}>
      <NotePage />
    </Provider>
  );
  return {
    app,
    edit: app.find('.editor__edit'),
    view: app.find('.note__view'),
    editViewButton: app.find('.note__header__btn'),
    title: app.find('.note__header__title')
  };
}

describe('Note containers', () => {
  it('should display', () => {
    const { app } = setup();
    expect(app.containsMatchingElement(<NotePage />)).to.equal(true);
  });

  it('should display edit panel when view in store is set to "edit"', () => {
    const { edit, view } = setup({
      note: {
        title: 'test title',
        view: 'edit',
        html: '',
        raw: ''
      }
    });
    expect(edit.hasClass('hide')).to.be.false;
    expect(view.hasClass('hide')).to.be.true;
  });

  it('should display view panel when view in store is set to "view"', () => {
    const { edit, view } = setup({
      note: {
        title: 'test title',
        view: 'view',
        html: '',
        raw: ''
      }
    });
    expect(edit.hasClass('hide')).to.be.true;
    expect(view.hasClass('hide')).to.be.false;
  });

  it('should display correct html in panel when switching from \'edit\' view', () => {
    const { edit, editViewButton, view } = setup({
      note: {
        title: 'test title',
        view: 'edit',
        html: '',
        raw: ''
      }
    });

    marked.setOptions({
      renderer: new marked.Renderer(),
      gfm: true,
      tables: true,
      breaks: false,
      pedantic: false,
      sanitize: true,
      smartLists: true,
      smartypants: false
    });

    const raw = '**test**';
    const html = marked(raw);
    edit.node.value = raw;
    editViewButton.simulate('click');

    expect(view.html()).to.contain(html);
  });

  it('should display correct note title from store', () => {
    const { title } = setup({
      note: {
        title: 'test title',
        view: 'edit',
        html: '',
        raw: ''
      }
    });

    expect(title.node.value).to.equal('test title');
  });
});

redpajama_set_name: RedPajamaGithub


text:
using namespace std;

class TrieNode {
public:
    // Initialize your data structure here.
    TrieNode() : is_key(false), children(26, NULL) { }
    vector<TrieNode *> children;
    bool is_key;
};

class Trie {
public:
    typedef string::size_type s_t;
    Trie() {
        root = new TrieNode();
    }

    // Inserts a word into the trie.
    void insert(string word) {
        TrieNode *pos = root;
        for (s_t i = 0, iend = word.size(); i < iend; ++i) {
            if (!pos->children[word[i]-'a'])
                pos->children[word[i]-'a'] = new TrieNode();
            pos = pos->children[word[i]-'a'];
        }
        pos->is_key = true;
    }

    // Returns if the word is in the trie.
    bool search(string word) {
        TrieNode *pos = root;
        for (s_t i = 0, iend = word.size(); i < iend; ++i) {
            if (!pos->children[word[i]-'a'])
                return false;
            pos = pos->children[word[i]-'a'];
        }
        return pos->is_key;
    }

    // Returns if there is any word in the trie
    // that starts with the given prefix.
    bool startsWith(string prefix) {
        TrieNode *pos = root;
        for (s_t i = 0, iend = prefix.size(); i < iend; ++i) {
            if (!pos->children[prefix[i]-'a'])
                return false;
            pos = pos->children[prefix[i]-'a'];
        }
        return true;
    }

private:
    TrieNode* root;
};

int main(void) {
    // Your Trie object will be instantiated and called as such:
    Trie trie;
    trie.insert("somestring");
    cout << trie.search("key") << endl;;
    trie.insert("key");
    cout << trie.search("key") << endl;;
    cout << trie.startsWith("key") << endl;;
    cout << trie.startsWith("some") << endl;;
    cout << trie.search("some") << endl;;
    trie.insert("ab");
    cout << trie.search("a") << endl;;
    return 0;
}


text:
<step>
    <name>Univariate Statistics 2</name>
    <type>UnivariateStats</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
         <partitioning>
           <method>none</method>
           <schema_name/>
           </partitioning>
       <univariate_stats><source_field_name>a</source_field_name>
<N>Y</N>
<mean>Y</mean>
<stdDev>Y</stdDev>
<min>Y</min>
<max>Y</max>
<median>Y</median>
<percentile>0.5</percentile>
<interpolate>Y</interpolate>
</univariate_stats>
       <univariate_stats><source_field_name>b</source_field_name>
<N>N</N>
<mean>N</mean>
<stdDev>N</stdDev>
<min>N</min>
<max>N</max>
<median>N</median>
<percentile>-1.0</percentile>
<interpolate>N</interpolate>
</univariate_stats>
     <cluster_schema/>
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
      <xloc>234</xloc>
      <yloc>124</yloc>
      <draw>Y</draw>
      </GUI>
    </step>


text:
package com.intel.analytics.bigdl.utils.tf.loaders

import java.nio.ByteOrder

import com.intel.analytics.bigdl.Module
import com.intel.analytics.bigdl.nn.ops.InTopK
import com.intel.analytics.bigdl.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.bigdl.utils.tf.Context
import org.tensorflow.framework.NodeDef

import scala.reflect.ClassTag

class InTopK extends TensorflowOpsLoader {

  import Utils._

  override def build[T: ClassTag](nodeDef: NodeDef, byteOrder: ByteOrder, context: Context[T])
    (implicit ev: TensorNumeric[T]): Module[T] = {
    val k = getInt(nodeDef.getAttrMap, "k")
    InTopK[T](k, true)
  }
}


text:
MyTransformFilter
=================


text:
package com.yp.memo.model;

import java.io.Serializable;

public class InfoResource implements Serializable {
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	int id;
	int memeId;
	int resourceId;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getMemeId() {
		return memeId;
	}

	public void setMemeId(int memeId) {
		this.memeId = memeId;
	}

	public int getResourceId() {
		return resourceId;
	}

	public void setResourceId(int resourceId) {
		this.resourceId = resourceId;
	}
}


text:
{nav}

ID: {event-id}

{event-name}

{event-season}

                    <form name="event-form" class="" method="post" action="/manage/home?type=update">
                        <input type="hidden" name="id" value="{event-id}">
                        <fieldset>

                                        season

                                    <input class="input-field" type="text" name="season" id="season" value="{event-season}" required="">

                                        name

                                    <input class="input-field" type="text" name="name" id="name" value="{event-name}" required="">

                                        tagline

                                    <input class="input-field" type="text" name="tagline" id="tagline" value="{event-tagline}" required="">

                                        date

                                    <input class="input-field" type="date" name="date" id="date" value="{event-date}" required="">

                                        release date

                                    <input class="input-field" type="date" name="release_date" id="release_date" value="{event-release-date}" required="">

                                    robots (JSON)
                                    <textarea class="input-field textarea" name="robots" id="robots">{event-robots}</textarea>

                                    description
                                    <textarea class="input-field textarea" name="description" id="description"  required="">{event-description}</textarea>

                                    content (HTML)
                                    <textarea class="input-field textarea" name="content" id="content"  required="">{event-content}</textarea>

                                <button class="btn btn-animated btn-contact ripple-alone btn-back" data-text="Back">Back</button>
                                <button type="submit" class="btn btn-animated btn-contact ripple-alone btn-update" data-text="Update">

                                </button>
                                <button class="btn btn-animated btn-contact ripple-alone btn-delete" data-text="Delete">

                                </button>

                        </fieldset>
                    </form>


text:
require 'date'

class User
  attr_accessor :username, :blogs

  def initialize(username)
    self.username = username
    self.blogs    = []
  end

  def add_blog(date, text)
    added_blog = Blog.new(date, self, text)
    blogs << added_blog
    self.blogs = blogs.sort_by { |blog| blog.date }.reverse
    added_blog
  end
end

class Blog
  attr_accessor :date, :user, :text

  def initialize(date, user, text)
    self.date = date
    self.user = user
    self.text = text
  end

  def summary
    text.split[0..9].join(' ')
  end

  def entry
    "#{user.username} #{date}\n#{text}"
  end

  def ==(other)
    date   == other.date &&
      user == other.user &&
      text == other.text
  end
end

#Jordan
class User
  attr_accessor :username, :blogs

  def initialize(username)
    @username = username
    @blogs = []

  end

  def add_blog(date, text)
    blog = Blog.new(date, self, text)
    @blogs << blog
    blog
  end

  def blogs
    @blogs.sort_by { |blog| blog.date }.reverse
  end

end

class Blog
  attr_accessor :date, :user, :text
  def initialize(date, user, text)
    @date, @user, @text = date, user, text
  end

  def summary
    text.split[0..9].join(' ')
  end

  def entry
    "#{user.username} #{date}\n#{text}"
  end

  def ==(second_blog)
    date == second_blog.date &&
    user == second_blog.user &&
    text == second_blog.text
  end
end

#Sebastien
class User
  attr_accessor :username, :blogs

  def initialize(username)
    self.username, self.blogs = username, Array.new
  end

  def add_blog(date, text)
    Blog.new date, self, text
  end

  def blogs
     @blogs.sort! { |blog1, blog2| blog2.date <=> blog1.date }
  end

end

class Blog
  attr_accessor :date, :user, :text

  def initialize(date, user, text)
    self.date, self.user, self.text = date, user, text
    user.blogs << self
  end

  def summary
    summary = ""
    get = @text.split(/ /)
    get.each_index do |word|
      summary << get[word] << " " if word < 10
    end
    summary.strip
  end

  def display_entry
    puts user.username + " " + date.to_s
    puts text
  end
  def ==(other)
    self.date == other.date &&
    self.user == other.user &&
    self.text == other.text
  end
end

# Gabe
class User

  def initialize(username)
    @username = username
    @blogs = []
  end

  attr_accessor :username
  attr_accessor :blogs

  def add_blog(date, text)
    blog = Blog.new(date, self, text)
    @blogs << blog
    blog
  end

  def blogs
    sorted_blogs = @blogs.sort_by { |element| element.date }
    sorted_blogs.reverse
  end

end

class Blog

  def initialize(date, user, text)
    @user = user
    @date = date
    @text = text
  end

  attr_accessor :date
  attr_accessor :user
  attr_accessor :text

  def summary
    text.split[0...10].join(' ')
  end

  def entry
    "#{@user.username} #{@date}\n#{@text}"
  end

  def == other
    date == other.date && user == other.user && text == other.text
  end

end

# Tom Coakes
require 'date'

class User
  attr_accessor :username, :blogs

  def initialize(username)
    @username = username
    @blogs = []
  end

  def add_blog(date, text)
    blog1 = Blog.new(date, @username, text)
    blogs << blog1
    @blogs = blogs.sort_by { |blog| blog.date }.reverse
    blog1
  end
end

class Blog
  attr_accessor :date, :user, :text

  def initialize(date, user, text)
    @date = date
    @user = user
    @text = text
  end

  def summary
    @text.split(' ')[0..9].join(' ')
  end

  def entry
    return "#{@user.username} #{@date}\n#{@text}"
  end

  def ==(other)
    return date == other.date && user == other.user && text == other.text
  end

end

# Yannick

class User

  attr_accessor :username, :blog

  def initialize(username)
    @username = username
    @blogs = []
  end

  def add_blog(date, text)
    new_blog = Blog.new(date, self, text)
    @blogs << new_blog
    new_blog

  end

  def blogs
    @blogs.sort_by {|blog| blog.date}.reverse
  end

end

class Blog

  attr_accessor :date, :user, :text

  def initialize(date, user, text)
    @date, @user, @text = date, user, text
  end

  def summary
    @text.split(' ')[0..9].join(' ')
  end

  def entry
    "#{@User.username} #{@date}\n#{@text}"
  end

  def ==(other)
    date == other.date &&
    user == other.user &&
    text == other.text
  end

end


text:
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using SolrNet.Utils;

namespace SolrNet.Cloud.CollectionsAdmin
{

    /// <summary>
    /// See for full API description
    /// https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1
    /// </summary>
    public interface ISolrCollectionsAdmin {
        /// <summary>
        /// Creates a collection
        /// https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1
        /// </summary>
        /// <param name="collection"></param>
        /// <param name="routerName"></param>
        /// <param name="numShards"></param>
        /// <param name="configName"></param>
        /// <returns></returns>
        ResponseHeader CreateCollection(string collection, string routerName = null, int? numShards = null, string configName = null, string shards=null, int? maxShardsPerNode=null);

        /// <summary>
        /// Deletes a collection by name
        /// https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api6
        /// </summary>
        /// <param name="collection"></param>
        /// <returns></returns>
        ResponseHeader DeleteCollection(string collection);

        /// <summary>
        /// Shards can only created with this API for collections that use the 'implicit' router.
        /// Use SPLITSHARD for collections using the 'compositeId' router.
        /// A new shard with a name can be created for an existing 'implicit' collection.
        /// https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api8
        /// </summary>
        /// <param name="collection"></param>
        /// <param name="shard"></param>
        /// <returns></returns>
        ResponseHeader CreateShard(string collection, string shard);

        /// <summary>
        /// Deleting a shard will unload all replicas of the shard and remove them from clusterstate.json.
        /// It will only remove shards that are inactive, or which have no range given for custom sharding.
        /// https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api7
        /// </summary>
        /// <param name="collection"></param>
        /// <param name="shard"></param>
        /// <returns></returns>
        ResponseHeader DeleteShard(string collection, string shard);

        /// <summary>
        /// The RELOAD action is used when you have changed a configuration in ZooKeeper.
        /// https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api2
        /// </summary>
        /// <param name="collection"></param>
        /// <returns></returns>
        ResponseHeader ReloadCollection(string collection);

        /// <summary>
        /// Fetch the cluster status including collections, shards, replicas as well as collection aliases and cluster properties.
        /// https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api18
        /// </summary>
        /// <param name="collection"></param>
        /// <param name="shard"></param>
        /// <returns></returns>
        SolrCloudState GetClusterStatus(string collection, string shard = null);

        /// <summary>
        /// Fetch the names of the collections in the cluster.
        /// https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-List
        /// </summary>
        /// <returns></returns>
        List<string> ListCollections();
    }
}


text:
<?xml version='1.0' encoding='utf-8' ?>
<tocdata>
<item name="Selecting a Patient" url="Selecting_a_Patient.htm" />
<item name="Closing a Patient Record" url="Closing_a_Patient_Record.htm" />
<item name="Setting a Default Patient List" url="Setting_a_Default_Patient_List.htm" />
<item name="Cover Sheet" url="Overview__What_is_the_Cover_Sheet_.htm" />
<item name="Refresh Patient Information" url="Refresh_Patient_Information.htm" />
<item name="Review / Sign Changes..." url="Review___Sign_Changes_Dialog.htm" />
<item name="CSV: Keeping Diagnostic and Procedure Codes Current" url="Keeping_Diagnostic_and_Procedure_Codes_Current.htm" />
<item name="CPRS Time Out" url="CPRS_Time_Out.htm" />
<item name="Printing from CPRS" url="Printing_from_CPRS.htm" />
<item name="Vitals" url="What_s_New_in_CPRS_v_26_OR_3_0_215_.htm#bc-1" />
<book name="Allergies/Adverse Reactions" >
  <item name="Entering Allergies" url="Entering_Allergies.htm" />
  <item name="Marking Allergies as Entered in Error" url="Marking_Allergies_as_Entered_in_Error.htm" />
  <item name="Entering Allergies from the Orders Tab" url="Entering_Allergies_from_the_Orders_Tab.htm" />
  <item name="Causative Agent Not On File" url="Causative_Agent_Not_On_File.htm" />
  <item name="Entering No Known Allergies" url="Entering_No_Known_Allergies.htm" />
  <item name="Entering Allergies from the Cover Sheet Tab" url="Entering_Allergies_from_the_Cover_Sheet_Tab.htm" />
  <item name="Viewing Allergies/Adverse Reactions" url="Viewing_Allergies_Adverse_Reactions.htm" />
</book>
<book name="Clinical Reminders" >
  <book name="Reminders overview topics" >
    <item name="Reminders Overview" url="Reminders_Overview.htm" />
    <item name="Reminder Evalutation for a Patient" url="Reminder_Evaluation_for_a_Patient.htm" />
    <item name="What happens when I process a reminder?" url="What_Happens_When_I_Process_a_Reminder_.htm" />
    <item name="How do I know a patient has reminders?" url="How_Do_I_Know_a_Patient_Has_Reminders.htm" />
  </book>
  <book name="Reminders Interface tour" >
    <item name="The Reminders Button Tree View" url="The_Reminders_Button_Tree_View.htm" />
    <item name="The Reminders Drawer" url="The_Reminders_Drawer.htm" />
    <item name="The Main Reminders Processing Dialog" url="The_Main_Reminders_Processing_Dialog.htm" />
  </book>
  <book name="Processing Reminders" >
    <item name="Manually Evaluating Reminders" url="Manually_Evaluating_Reminders.htm" />
    <item name="Moving to Another Reminder" url="Moving_to_Another_Reminder.htm" />
    <item name="Processing a Reminder" url="Processing_a_Reminder.htm" />
    <item name="Using Mental Health Assessments in CPRS" url="Using_Mental_Health_Assessments_in_CPRS.htm" />
    <item name="Finishing Reminder Processing" url="Finishing_Reminder_Processing.htm" />
    <item name="Clearing a Single Reminder" url="Clearing_a_Single_Reminder.htm" />
    <item name="Canceling Out of the Processing Dialog" url="Canceling_Out_of_the_Processing_Dialog.htm" />
  </book>
</book>
<book name="Consults" >
  <item name="Consults" url="Consults.htm" />
  <item name="Viewing Consults" url="Viewing_Consults.htm" />
  <item name="Complete a Consult or Clinical Procedure from the Consults Tab" url="Complete_a_Consult_from_the_Consults_Tab.htm" />
  <item name="Complete a Consult from the Notes Tab" url="Complete_a_Consult_from_the_Notes_Tab.htm" />
  <item name="Changing Views on the Consults tab" url="Changing_Views_on_the_Consults_tab.htm" />
  <item name="Tracking Consults Requests" url="Tracking_Consults_Requests.htm" />
  <book name="Ordering Consults" >
    <item name="Ordering Consults" url="Ordering_Consults.htm" />
    <item name="New Consult from the Constults Tab" url="New_Consult_from_the_Consults_Tab.htm" />
    <item name="New Consult from the Orders Tab" url="New_Consult_from_the_Orders_Tab.htm" />
    <item name="New Procedure from the Consults Tab" url="New_Procedure_from_the_Consults_Tab.htm" />
    <item name="New Procedure from the Orders Tab" url="New_Procedure_from_the_Orders_Tab.htm" />
  </book>
</book>
<book name="Context Management (CCOW)" >
  <item name="Context Management (CCOW) in CPRS" url="Context_Management_(CCOW)_in_CPRS.htm" />
  <item name="Joining Context" url="Joining_Context.htm" />
  <item name="Breaking Context" url="Breaking_Context.htm" />
</book>
<book name="Discharge Summaries" >
  <item name="Discharge Summaries (overview)" url="Discharge_Summaries.htm" />
  <item name="Viewing Discharge Summaries" url="Viewing_Discharge_Summaries.htm" />
  <item name="Writing Discharge Summaries" url="Writing_Discharge_Summaries.htm" />
  <item name="Sign Document Now" url="Sign_Document_Now.htm" />
  <item name="Review / Sign Changes Dialog" url="Review___Sign_Changes_Dialog.htm#bc-1" />
  <item name="Changing Views on the Discharge Summaries tab" url="Changing_Views_on_the_Discharge_Summaries_tab.htm" />
  <item name="Viewing Laboratory Test Results" url="Viewing_Laboratory_Test_Results.htm" />
</book>
<book name="Document Templates" >
  <item name="Document Templates (overview)" url="Document_Templates_(overview).htm" />
  <item name="Creating Personal Document Templates" url="Creating_Personal_Document_Templates.htm" />
  <item name="Creating Shared Document Templates" url="Creating_Shared_Document_Templates.htm" />
  <item name="Previewing a Template" url="Previewing_a_Template.htm" />
  <item name="Editing Document Templates" url="Editing_Document_Templates.htm" />
  <item name="View Template Notes" url="View_Template_Notes.htm" />
  <item name="Copying Template Text" url="Copying_Template_Text.htm" />
  <item name="Adding a Template to a Document" url="Adding_a_Template_to_a_Document.htm" />
  <item name="Marking a Template as the Default Template" url="Marking_a_Template_as_the_Default_Template.htm" />
  <item name="Copying Document Templates" url="Copying_Document_Templates.htm" />
  <item name="Hiding Child Templates" url="Hiding_Child_Templates.htm" />
  <item name="Searching for Document Templates" url="Searching_for_Document_Templates.htm" />
  <item name="Deleting Document Templates" url="Deleting_Document_Templates.htm" />
  <item name="Template Fields" url="Template_Fields.htm" />
  <item name="Reminder Dialog" url="Reminder_Dialog.htm" />
</book>
<book name="Encounter Information" >
  <item name="Encounter Information" url="Encounter_Information_(overview).htm" />
  <item name="Entering or Changing Encounter Information" url="Entering_Primary_and_Secondary_providers_popup.htm" />
  <item name="Entering Encounter Form Data" url="Entering_Encounter_Form_Data.htm" />
  <item name="Entering Encounter Form Data - Procedures" url="Entering_Encounter_Form_Data_-_Procedures.htm" />
  <item name="Entering Clinical Encounter Information" url="Entering_Encounter_Form_Data.htm#bc-1" />
  <item name="Other Health Factors" url="Other_Health_Factors.htm" />
  <book name="Entering GAF Scores" >
    <item name="GAF Score (overview)" url="GAF_Score_(overview).htm" />
    <item name="Entering a GAF Score" url="Entering_a_GAF_Score.htm" />
  </book>
</book>
<book name="Graphing" >
  <item name="Graphing: Overview" url="Graphing_Overview.htm" />
  <item name="Graphing: Staring CPRS Graphing" url="Graphing_Starting_CPRS_Graphing.htm" />
  <item name="Graphing: Configuring Settings" url="Graphing_Configuring_Settings.htm" />
  <item name="Graphing: Main Window Display Options" url="Graphing_Main_Window_Display_Options.htm" />
  <item name="Graphing: Setting Display Options with the Graph Settings Dialog" url="Graphing_Setting_Display_Options_with_the_Graph_Settings_Dialog.htm" />
  <item name="Graphing: Choosing Display Items on the Select Items and Define Views Dialog" url="Graphing_Choosing_Display_Items_on_the_Select_Items_and_Define_Views_Dialog.htm" />
  <item name="Graphing: Graphing Items from the Main Window" url="Graphing_Graphing_Items_from_the_Main_Window.htm" />
  <item name="Graphing: Graphing Items from the Select Items and Define Views Dialog Box" url="Graphing_Graphing_Items_from_the_Select_Items_and_Define_Views_Dialog_Box.htm" />
  <item name="Graphing: Adjusting the Display" url="Graphing_Adjusting_the_Display.htm" />
  <item name="Graphing: Displayed Details for Graphed Items" url="Graphing_Displayed_Details_for_Graphed_Items.htm" />
  <item name="Graphing: Using the Zoom Feature" url="Graphing_Using_the_Zoom_Feature.htm" />
  <item name="Graphing: Copy and Paste or Print Graphs" url="Graphing_Copy_and_Paste_or_Print_Graphs.htm" />
  <book name="Predefined Views" >
    <item name="Graphing: Predefined Views" url="Graphing_Predefined_Views.htm" />
    <item name="Graphing: Creating Views" url="Graphing_Creating_Views.htm" />
    <item name="Graphing: Edting Predefined Views" url="Graphing_Edting_Predefined_Views.htm" />
    <item name="Graphing: Renaming Predefined Views" url="Graphing_Renaming_Predefined_Views.htm" />
    <item name="Graphing: Deleting Predefined Views" url="Graphing_Deleting_Predefined_Views.htm" />
  </book>
</book>
<book name="Medications" >
<chunk name="Medications" ref="whtdata2.xml" />
</book>
<book name="Notes" >
<chunk name="Notes" ref="whtdata3.xml" />
</book>
<book name="Notifications" >
  <item name="Notifications and Alerts" url="Notifications__Notifications_and_Alerts.htm" />
  <item name="Sorting Notifications and Viewing Comments of Forwarded Alerts" url="Sorting_Notifications_and_Viewing_Comments_of_Forwarded_Alerts.htm" />
  <item name="Alerting a user when order results are avaialble" url="Alerting_a_user_when_order_results_are_avaialble.htm" />
  <item name="Removing Notifications" url="Removing_Notifications.htm" />
  <item name="Forwarding a Notification to Another User" url="Forwarding_a_Notification_to_Another_User.htm" />
  <item name="Processing Notifications" url="Processing_Notifications.htm" />
  <item name="Notifications Tab (Tools | Options)" url="Notifications_Tab_(Tools___Options).htm" />
</book>
<book name="Ordering" >
<chunk name="Ordering" ref="whtdata4.xml" />
</book>
<book name="Patient Information and My HealtheVet" >
  <item name="Patient Insurance and My HealtheVet Information" url="Patient_Insurance_and_My_HealtheVet_Information.htm" />
</book>
<book name="Patient Postings (CWAD)" >
  <item name="Postings" url="Postings.htm" />
  <item name="Creating New Postings" url="Postings_Creating_New_Postings.htm" />
  <item name="Viewing Postings" url="Viewing_Postings.htm" />
</book>
<book name="Patient Record Flags" >
  <item name="Patient Record Flags: Overview" url="Patient_Record_Flags__Overview.htm" />
  <item name="Viewing Patient Record Flags" url="Viewing_Patient_Record_Flags.htm" />
</book>
<book name="Problems" >
<chunk name="Problems" ref="whtdata5.xml" />
</book>
<book name="Remote Patient Data" >
<chunk name="Remote Patient Data" ref="whtdata6.xml" />
</book>
<book name="Reports and Health Summaries" >
<chunk name="Reports and Health Summaries" ref="whtdata7.xml" />
</book>
<book name="Signatures" >
<chunk name="Signatures" ref="whtdata8.xml" />
</book>
<book name="Surgery reports" >
<chunk name="Surgery reports" ref="whtdata9.xml" />
</book>

</tocdata>


text:
python-amigocloud
=================

Python client for the `AmigoCloud <https://app.amigocloud.com>`__ REST
API.

Installation
------------

Install via pip:

::

    pip install amigocloud

Dependencies
------------

-  |requests|_: Handles the HTTP requests to the AmigoCloud REST API.
-  |gevent|_: Handles the websocket connections.
-  |socketIO_client|_: Handles the AmigoCloud websocket connection.
-  |six|_: A library to assit with python2 to python3 compatibility.

This dependencies will be automatically installed.

Usage
-----

Authentication
~~~~~~~~~~~~~~

This library uses API token to authenticate you. To generate or access your API tokens, go to `API tokens <https://app.amigocloud.com/accounts/tokens>`__.

.. code:: python

    from amigocloud import AmigoCloud
    amigocloud = AmigoCloud(token='R:dlNDEiOWciP3y26kG2cHklYpr2HIPK40HD32r1')

You could also use a project token. Remember that project tokens can only be used to query endpoints relative to the project it belongs to.
If the project URL doesn't match its project, `AmigoCloudError` will be thrown.

.. code:: python

    from amigocloud import AmigoCloud
    amigocloud = AmigoCloud(token='C:Ndl3xGWeasYt9rqyuVsByf5HPMAGyte10y1Mub',
                            project_url='users/123/projects/1234')

You can use a READ token if you only want to do requests that won't alter data. Otherwise, you'll need to use more permissive tokens.

Requests
~~~~~~~~

Once you're logged in you can start making requests to the server. You
can use full urls or relative API urls:

.. code:: python

    # All three will do the same request:
    amigocloud.get('me')
    amigocloud.get('/me')
    amigocloud.get('https://app.amigocloud.com/api/v1/me')

For convenience, when using project tokens, urls are relative to the project's url (unless it starts with `/`):

.. code:: python

    # All three will do the same request:
    amigocloud.get('datasets')
    amigocloud.get('/users/123/projects/1234/datasets')
    amigocloud.get('https://app.amigocloud.com/api/v1/users/123/projects/1234/datasets')

Creating a new AmigoCloud project from Python is as simple as:

.. code:: python

    data = {'name': 'New Project', 'description': 'Created from Python'}
    amigocloud.post('me/projects', data)

All responses are parsed as JSON and return a Python object (usually a
``dict``). This data can be later used in another request:

.. code:: python

    me = amigocloud.get('me')
    visible_projects = amigocloud.get(me['visible_projects'])

    print 'My projects:'
    for project in visible_projects['results']:
        print '*', project['name']

You can get the raw response if you want by using the ``raw`` parameter:

.. code:: python

    me = amigocloud.get('me')
    images = amigocloud.get(me['images'])

    with open('thumbnail.png', 'wb') as thumbnail:
        image_data = amigocloud.get(images['thumbnail'], raw=True)
        thumbnail.write(image_data)

Cursor Requests
~~~~~~~~~~~~~~~

Many requests return a paginated list. For example: projects, datasets, base layers,
and sql queries. They can be identified when the request returns a dictionary with
four items.

.. code:: python

    from amigocloud import AmigoCloud
    amigocloud = AmigoCloud(token='yourapitoken')

    project_list = amigocloud.get('/me/projects')
    pprint ( project_list )

will return a dictionary like this (modified for brevity):

.. code:: javascript

    {
        u'count': 319,
        u'next': u'https://app.amigocloud.com/api/v1/me/projects?limit=20&offset=20&token=yourapitoken',
        u'previous': None,
        u'results': []
    }

From the results, you can see that this endpoint can be iterated through.
To make it easier to iterate through these lists, you can use the ``get_cursor``
function. The cursor iterates over the results and if it reaches the limit of
the response it will automatically make a request to get the next values. So
you can get all data and iterate over it, without worrying about the
pagination.

.. code:: python

    projects = amigocloud.get_cursor('/me/projects')
    for project in projects:
        print('Project:', project['name'])

If you want to iterate one request at a time it can be requested as:

.. code:: python

    # using a project token to authenticate

    datasets = amigocloud.get_cursor('datasets')

    dataset1 = datasets.next()
    print('Dataset1:', dataset1['name'])

    # Boolean to ask if there is a next value.
    # otherwise a StopIteration exception is raised.
    if datasets.has_next:
        dataset2 = datasets.next()
        print('Dataset2:', dataset2['name'])

Also, you can request some extra values, that are included in the response.

.. code:: python

    dataset_rows = amigocloud.get_cursor(
        'https://www.amigocloud.com/api/v1/projects/1234/sql',
        {'query': 'select * from dataset_1'})

    print('Response extra values:', dataset_rows.get('columns'))

    for row in dataset_rows:
        print('Row:', row)

Cursors can be used for Projects, Datasets, BaseLayers, SQL queries, etc.
It also supports non-iterable responses. For this cases it returns only one result.

.. code:: python

    cursor = amigocloud.get_cursor('me')

    for me in cursor:
        print('Me:', me)

Websocket connection
~~~~~~~~~~~~~~~~~~~~

The websocket connection is started when the AmigoCloud object is
instantiated, and it is closed when the object is destroyed. You always
need to use a user token for websockets.

Make sure to read `our help page about our websocket events <http://help.amigocloud.com/hc/en-us/articles/204246154>`__ before continue reading.

To start listening to websocket events related to your user (multicast
events), do (you must be logged in to start listening to your events):

.. code:: python

    amigocloud.listen_user_events()

Once you're listening to your events, you can start adding callbacks to
them. A callback is a function that will be called everytime the event
is received. These functions should have only one parameter, that would be a python dict.

.. code:: python

    def project_created(data):
        print 'User id=%(user_id)s created project id=%(project_id)s' % data
    amigocloud.add_callback('project:creation_succeeded', project_created)

Realtime events are broadcast events related to realtime dataset. To start listening to them, do:

.. code:: python

    amigocloud.listen_dataset_events(owner_id, project_id, dataset_id)

Then add a callback for them:

.. code:: python

    def realtime(data):
        print 'Realtime dataset id=%(dataset_id)s' % data
        for obj in data['data']:
            print "Object '%(object_id)s' is now at (%(latitude)s, %(longitude)s)" % obj
    amigocloud.add_callback('realtime', realtime)

Finally, start running the websocket client:

.. code:: python

    ac.start_listening()

This method receives an optional parameter ``seconds``. If ``seconds``
is ``None`` (default value), the client will listen forever. You might
want to run this method in a new thread.

Exceptions
~~~~~~~~~~

An ``AmigoCloudError`` exception will be raised if anything fails during
the request:

.. code:: python

    try:
        amigocloud.post('me/projects')
    except AmigoCloudError as err:
        print 'Something failed!'
        print 'Status code was', err.response.status_code
        print 'Message from server was', err.text

.. |requests| replace:: ``requests``
.. _requests: https://requests.readthedocs.io/en/master/
.. |gevent| replace:: ``gevent``
.. _gevent: https://github.com/gevent/gevent
.. |socketIO_client| replace:: ``socketIO_client``
.. _socketIO_client: https://github.com/invisibleroads/socketIO-client
.. |six| replace:: ``six``
.. _six: https://github.com/benjaminp/six


text:
+++
Talk_date = ""
Talk_start_time = ""
Talk_end_time = ""
Title = "Start Your Own DevOps Dojo in 8 Simple Steps"
Type = "talk"
Speakers = ["bjorn-edwin"]
Youtube = "JxV6BUmY-Wo"
Vimeo = ""
Speakerdeck = ""
Slideshare = "https://www.slideshare.net/DevOpsDaysDFW/bjorn-edwin-start-your-own-devops-dojo-in-8-simple-steps"
Slides = ""
Website = "https://www.liatrio.com/author/bjorn-edwin"
+++

##### TALK ABSTRACT

Target, Verizon, Capital One, Walmart and other giant enterprises have been creating Dojos (immersive learning environments) to facilitate their DevOps adoption. Today, DevOps Dojos may be the best way to help your organization in its journey towards doing DevOps the right way. The DevOps Dojos we have created for our enterprise clients have enabled them to accelerate their software delivery. Based on these experiences, we would like to share how you can start a successful Dojo in 8 simple steps. These steps are industry, domain and technology agnostic.

If you are a leader, manager or engineer who is passionate about bringing the Dojo concept to your organization, this talk will give you the 8 steps you need to follow to design, build and grow your own DevOps Dojo.

The 8 steps are as follows:

* Assess the current state of DevOps tools and pipelines.
* Identify and build the first and most common delivery pipeline and create a plan for the remaining pipelines.
* Determine types of masters, types of coaches and physical space needs.
* Adjust teams, players and technical practices as needed.
* Design schedules, timelines, curriculum topics, labs and activities.
* Make Dojo delivery and execution fun so learning becomes both rewarding and inevitable.
* Share ongoing support and updates.
* Grow in-house expertise, community and events. Bonus: Typical challenges you may face and how to avoid them


text:
	width:147px;
	position:absolute;
	display:none;
    z-index: 100;
}
#bubble_tooltip .bubble_top{
	background-image: url('../Styles/images/bubble_top.gif');
	background-repeat:no-repeat;
	height:16px;
    background-position: bottom;
}
#bubble_tooltip .bubble_middle{
	background-image: url('../Styles/images/bubble_middle.gif');
	background-repeat:repeat-y;
	background-position:bottom left;
     padding: 10px;

    font-size: 10px;
    padding-bottom: 0px;
    padding-right: 20px;
}
#bubble_tooltip .bubble_middle span{
	position:relative;
	top:-8px;
	font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
	font-size:11px;
}
#bubble_tooltip .bubble_bottom{
	background-image: url('../Styles/images/bubble_bottom.gif');
	background-repeat:no-repeat;
	background-repeat:no-repeat;
	height:44px;
	position:relative;
	top:-6px}
	.gridBorder
	{
		border-left-width:0px !important;
		border-right-width:0px !important;

	}


text:
#ifndef _ENERGYMON_JETSON_UTIL_H_
#define _ENERGYMON_JETSON_UTIL_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <dirent.h>
#include <limits.h>
#include <stddef.h>

#pragma GCC visibility push(hidden)

/* PATH_MAX should be defined in limits.h */
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

// The hardware supports up to 3 channels per instance
#define INA3221_CHANNELS_MAX 3

int is_dir(const char* path);

int read_string(const char* file, char* str, size_t len);

long read_long(const char* file);

int is_i2c_bus_addr_dir(const struct dirent* entry);

#pragma GCC visibility pop

#ifdef __cplusplus
}
#endif

#endif


text:
package org.apache.jena.query.text.assembler;

import static org.junit.Assert.assertTrue ;

import java.util.Iterator;

import org.apache.jena.assembler.Assembler ;
import org.apache.jena.assembler.exceptions.AssemblerException ;
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.NodeFactory ;
import org.apache.jena.query.Dataset ;
import org.apache.jena.query.ReadWrite ;
import org.apache.jena.query.text.* ;
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.sparql.core.DatasetGraph ;
import org.apache.jena.sparql.core.Quad ;
import org.apache.jena.sparql.core.QuadAction ;
import org.apache.jena.tdb.assembler.AssemblerTDB ;
import org.apache.jena.vocabulary.RDF ;
import org.junit.Test ;

/**
 * Test the text dataset assembler.
 */
public class TestTextDatasetAssembler extends AbstractTestTextAssembler {

    private static final String TESTBASE = "http://example.org/testDatasetAssembler/";

    private static final Resource spec1;
    private static final Resource noDatasetPropertySpec;
    private static final Resource noIndexPropertySpec;
    private static final Resource customTextDocProducerSpec;
    private static final Resource customDyadicTextDocProducerSpec;

    @Test
    public void testSimpleDatasetAssembler() {
        Dataset dataset = (Dataset) Assembler.general.open(spec1);
        assertTrue(dataset.getContext().get(TextQuery.textIndex) instanceof TextIndexLucene);
    }

    @Test(expected = AssemblerException.class)
    public void testErrorOnNoDataset() {
        Assembler.general.open(noDatasetPropertySpec);
    }

    @Test(expected = AssemblerException.class)
    public void testErrorOnNoIndex() {
        Assembler.general.open(noIndexPropertySpec);
    }

    @Test
    public void testCustomTextDocProducer() {
        Dataset dataset = (Dataset)Assembler.general.open(customTextDocProducerSpec) ;
        DatasetGraphText dsgText = (DatasetGraphText)dataset.asDatasetGraph() ;
        assertTrue(dsgText.getMonitor() instanceof CustomTextDocProducer) ;
        dataset.close();
    }

    @Test
    public void testCustomTextDocProducerDyadicConstructor() {
        Dataset dataset = (Dataset)Assembler.general.open(customDyadicTextDocProducerSpec) ;
        DatasetGraphText dsgText = (DatasetGraphText)dataset.asDatasetGraph() ;
        assertTrue(dsgText.getMonitor() instanceof CustomDyadicTextDocProducer) ;

        Node G= NodeFactory.createURI("http://example.com/G");
        Node S = NodeFactory.createURI("http://example.com/S");
        Node P = NodeFactory.createURI("http://example.com/P");
        Node O = NodeFactory.createLiteral("http://example.com/O");

        dsgText.begin(ReadWrite.WRITE);
        dsgText.add(G, S, P, O);
        dsgText.commit();
        dataset.close();
    }

    static {
        TextAssembler.init();
        AssemblerTDB.init();
        spec1 =
            model.createResource(TESTBASE + "spec1")
                 .addProperty(RDF.type, TextVocab.textDataset)
                 .addProperty(TextVocab.pDataset, SIMPLE_DATASET_SPEC)
                 .addProperty(TextVocab.pIndex, SIMPLE_INDEX_SPEC3);
        noDatasetPropertySpec =
            model.createResource(TESTBASE + "noDatasetPropertySpec")
                 .addProperty(RDF.type, TextVocab.textDataset)
                 .addProperty(TextVocab.pIndex, SIMPLE_INDEX_SPEC4);
        noIndexPropertySpec =
            model.createResource(TESTBASE + "noIndexPropertySpec")
                 .addProperty(RDF.type, TextVocab.textDataset)
                 .addProperty(TextVocab.pDataset, SIMPLE_DATASET_SPEC);
        customTextDocProducerSpec =
            model.createResource(TESTBASE + "customTextDocProducerSpec")
                 .addProperty(RDF.type, TextVocab.textDataset)
                 .addProperty(TextVocab.pDataset, SIMPLE_DATASET_SPEC)
                 .addProperty(TextVocab.pIndex, SIMPLE_INDEX_SPEC5)
                 .addProperty(TextVocab.pTextDocProducer, model.createResource("java:org.apache.jena.query.text.assembler.TestTextDatasetAssembler$CustomTextDocProducer"));

        customDyadicTextDocProducerSpec =
            model.createResource(TESTBASE + "customDyadicTextDocProducerSpec")
                 .addProperty(RDF.type, TextVocab.textDataset)
                 .addProperty(TextVocab.pDataset, SIMPLE_DATASET_SPEC)
                 .addProperty(TextVocab.pIndex, SIMPLE_INDEX_SPEC5)
                 .addProperty(TextVocab.pTextDocProducer, model.createResource("java:org.apache.jena.query.text.assembler.TestTextDatasetAssembler$CustomDyadicTextDocProducer"));
    }

    private static class CustomTextDocProducer implements TextDocProducer {

        public CustomTextDocProducer(TextIndex textIndex) { }

        @Override
        public void start() { }

        @Override
        public void finish() { }

        @Override
        public void change(QuadAction qaction, Node g, Node s, Node p, Node o) { }

        @Override
        public void reset() {}
    }

    private static class CustomDyadicTextDocProducer implements TextDocProducer {

        final DatasetGraph dg;
        Node lastSubject = null;

        public CustomDyadicTextDocProducer(DatasetGraph dg, TextIndex textIndex) {
            this.dg = dg;
        }

        @Override
        public void start() { }

        @Override
        public void finish() {
            Iterator<Quad> qi = dg.find(null, lastSubject, Node.ANY, Node.ANY);
            while (qi.hasNext()) qi.next();
        }

        @Override
        public void change(QuadAction qaction, Node g, Node s, Node p, Node o) {
            lastSubject = s;
        }

        @Override
        public void reset() {}
    }

}


text:
define(function (require, exports, module) {
	'use strict';

	var $ = require('jquery');
	var utils = require('base/js/utils');
	var keyboard = require('base/js/keyboard');
	var Cell = require('notebook/js/cell').Cell;
	var CodeCell = require('notebook/js/codecell').CodeCell;
	var Completer = require('notebook/js/completer').Completer;
	var ConfigSection = require('services/config').ConfigSection;

	var log_prefix = '[' + module.id + ']';

	// default config (updated on nbextension load)
	var config = {
		enable_at_start: true,
		exclude_regexp: ':',
		include_regexp: '',
		tooltip_regexp: '\\(',
		hint_delay: 20,
		hint_inside_comments: false,
	};
	// flag denoting whether hinting is enabled
	var do_hinting;

	// ignore most specially-named keys
	var specials = [
		keyboard.keycodes.enter,
		keyboard.keycodes.esc,
		keyboard.keycodes.backspace,
		keyboard.keycodes.tab,
		keyboard.keycodes.up,
		keyboard.keycodes.down,
		keyboard.keycodes.left,
		keyboard.keycodes.right,
		keyboard.keycodes.shift,
		keyboard.keycodes.ctrl,
		keyboard.keycodes.alt,
		keyboard.keycodes.meta,
		keyboard.keycodes.capslock,
		keyboard.keycodes.space,
		keyboard.keycodes.pageup,
		keyboard.keycodes.pagedown,
		keyboard.keycodes.end,
		keyboard.keycodes.home,
		keyboard.keycodes.insert,
		keyboard.keycodes.delete,
		keyboard.keycodes.numlock,
		keyboard.keycodes.f1,
		keyboard.keycodes.f2,
		keyboard.keycodes.f3,
		keyboard.keycodes.f4,
		keyboard.keycodes.f5,
		keyboard.keycodes.f6,
		keyboard.keycodes.f7,
		keyboard.keycodes.f8,
		keyboard.keycodes.f9,
		keyboard.keycodes.f10,
		keyboard.keycodes.f11,
		keyboard.keycodes.f12,
		keyboard.keycodes.f13,
		keyboard.keycodes.f14,
		keyboard.keycodes.f15
	];

	/**
	 * copied from base/js/keyboard, since it isn't exported
	 * Return `true` if the event only contains modifiers keys.
	 * false otherwise
	 **/
	function only_modifier_event (event) {
		var key = keyboard.inv_keycodes[event.which];
		return (
			(event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) &&
			(key === 'alt'|| key === 'ctrl'|| key === 'meta'|| key === 'shift')
		);
	}

	function patch_cell_keyevent () {
		console.log(log_prefix, 'patching Cell.prototype.handle_codemirror_keyevent');
		var orig_handle_codemirror_keyevent = Cell.prototype.handle_codemirror_keyevent;
		Cell.prototype.handle_codemirror_keyevent = function (editor, event) {
			if (do_hinting && (this instanceof CodeCell) && !only_modifier_event(event)) {
				// Tab completion.
				this.tooltip.remove_and_cancel_tooltip();
				// don't attempt completion when selecting, or when using multicursor
				if (    !editor.somethingSelected() &&
						editor.getSelections().length <= 1 &&
						!this.completer.visible &&
						specials.indexOf(event.keyCode) == -1) {
					var cell = this;
					// set a timeout to try to ensure that CodeMirror inserts
					// the new key *before* the completion request happens
					setTimeout(function () {
						var cur = editor.getCursor();
						var pre_cursor = editor.getRange({
							line: cur.line,
							ch: cur.ch - 1
						}, cur);
						if (	pre_cursor !== '' &&
								(config.hint_inside_comments || editor.getTokenAt(cur).type !== "comment") &&
								(config.include_regexp.test(pre_cursor) || config.tooltip_regexp.test(pre_cursor)) &&
								!config.exclude_regexp.test(pre_cursor) ) {
							if (config.tooltip_regexp.test(pre_cursor)) {
								cell.tooltip.request(cell);
							}
							else {
								cell.completer.startCompletion();
								cell.completer.autopick = false;
							}
						}
					}, config.hint_delay);
				}
			}
			return orig_handle_codemirror_keyevent.apply(this, arguments);
		};
	}

	function set_hinterland_state (new_state) {
		do_hinting = new_state;
		$('.hinterland-toggle > .fa')
			.toggleClass('fa-check', do_hinting);
		console.log(log_prefix, 'continuous hinting', do_hinting ? 'on' : 'off');
	}

	function toggle_hinterland () {
		set_hinterland_state(!do_hinting);
	}

	function add_menu_item () {
		if ($('#help_menu').find('.hinterland_toggle').length > 0) {
			return;
		}
		var menu_item = $('<li/>')
			.insertAfter('#keyboard_shortcuts');
		var menu_link = $('<a/>')
			.text('Continuous hints')
			.addClass('hinterland-toggle')
			.attr('title', 'Provide continuous code hints')
			.on('click', toggle_hinterland)
			.appendTo(menu_item);
		$('<i/>')
			.addClass('fa menu-icon pull-right')
			.prependTo(menu_link);
	}

	function load_notebook_extension () {
		var base_url = utils.get_body_data('baseUrl');
		var conf_sect = new ConfigSection('notebook', {base_url: base_url});
		conf_sect.load().then(function on_success (new_conf_data) {
			$.extend(true, config, new_conf_data.hinterland);
			// special defaults:
			// default include is taken from Completer, rather than the blank
			if (config.include_regexp === '') {
				config.include_regexp = Completer.reinvoke_re;
			}
			// now turn regexps loaded from config (which will be strings) into
			// actual RegExp objects.
			var regexp_names = ['exclude_regexp', 'include_regexp', 'tooltip_regexp'];
			for (var ii=0; ii < regexp_names.length; ii++) {
				if (config[regexp_names[ii]] === '') {
					continue;
				}
				try {
					config[regexp_names[ii]] = new RegExp(config[regexp_names[ii]]);
				}
				catch (err) {
					console.warn(log_prefix, 'error parsing', regexp_names[ii] + ':', err);
				}
			}
		}, function on_error (err) {
			console.warn(log_prefix, 'error loading config:', err);
		}).then(function on_success () {
			patch_cell_keyevent();
			add_menu_item();
			set_hinterland_state(config.enable_at_start);
		});
	}

	return {
		load_ipython_extension : load_notebook_extension
	};
});


text:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="NHibernatePlayPen.Domain" namespace="NHibernatePlayPen.Domain">
  <class name="Benefit">
    <id name="Id" generator="hilo" />
    <property name="Name" />
    <property name="Description" />
    <many-to-one name="Employee" class="Employee" column="Employee_Id"/>

    <union-subclass name="SkillsEnhancementAllowance">
      <property name="RemainingEntitlement" />
      <property name="Entitlement" />
    </union-subclass>

    <union-subclass name="SeasonTicketLoan">
      <property name="Amount" />
      <property name="MonthlyInstalment" />
      <property name="StartDate" />
      <property name="EndDate" />
    </union-subclass>

    <union-subclass name="Leave">
      <property name="Type" />
      <property name="AvailableEntitlement" />
      <property name="RemainingEntitlement" />
    </union-subclass>
  </class>
</hibernate-mapping>


text:
<?php
class PEAR2_HTTP_Request_Adapter_Http extends PEAR2_HTTP_Request_Adapter {

	/**
	 * Throws exception if allow_url_fopen is off
	 */
    public function __construct()
	{
        if (!extension_loaded('http')) {
	        throw new PEAR2_HTTP_Request_Exception(
		        'The http extension must be loaded in order to use the Peclhttp adapter'
			);
		}
	}

    /**
     * Send the request
     *
     * This function sends the actual request to the
     * remote/local webserver using pecl http
     *
     * @link http://us2.php.net/manual/en/http.request.options.php
     * @todo catch exceptions from HttpRequest and rethrow
     * @todo handle Puts
     */
    public function sendRequest()
    {
        $options = array(
            'connecttimeout'    => $this->requestTimeout,
            );

        // if we have any listeners register an onprogress callback
        if (count($this->_listeners) > 0) {
            $options['onprogress'] = array($this,'_onprogress');
        }

        $tmp = 'HTTP_METH_'.strtoupper($this->verb);
        if (defined($tmp)) {
            $method = constant($tmp);
        }
        else {
            $method = HTTP_METH_GET;
        }

        $request = new HttpRequest($this->uri->url,$method,$options);
        $request->setHeaders($this->headers);
        $request->setRawPostData($this->body);

        $request->send();
        $response = $request->getResponseMessage();
        $body = $response->getBody();

        $details = $this->uri->toArray();

        $details['code'] = $request->getResponseCode();
        $details['httpVersion'] = $response->getHttpVersion();

        $headers = new PEAR2_HTTP_Request_Headers($response->getHeaders());
        $cookies = $request->getResponseCookies();

        return new PEAR2_HTTP_Request_Response($details, $body, $headers, $cookies);
    }

    /**
     * Progress handler maps callback progress to listeners
     * @todo implement progress callback
     * @todo this doesn't want to be part of the public api but has to be public to be called as a callback
     */
    public function _onprogress($status) {
    }
}
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */


text:
package enigma

/**
 * Here the signal is connected to the 'T' input on the plugboard. Some of
 * the letters on the plugboard will be wired up to other letters (the plugs),
 * causing the signal to be diverted. If the 'T' input is not plugged to another
 * letter then our signal will pass straight to the 'T output. In our case, though
 * the 'T' is plugged to the 'K', so the signal is diverted to a new path, the
 * letter is now 'K'.
 */
case class Plugboard(shuffled: Seq[Char]){
  // take the shuffled input, split it in half, interleave the halves and then
  // make sure that A -> B and B -> A such that the operations on the plugboard
  // are deterministic back and forth.
  private val mapping: Map[Char,Char] =
    shuffled.splitAt(Alphabet.length / 2
      ).zipped.flatMap((a,b) => Seq(a -> b, b -> a)).toMap

  def transform(c: Char): Char = {
    // println("::::::::>> " + c)
    val out = mapping.get(c).getOrElse(c)
    // println("<<:::::::: " + out)
    out
  }
}


text:
import 'native-promise-only'
import test from 'tape'
import asPromised from '../'

function check (name, expected, args, expectedThis, givenThis) {
  test(name, function (t) {
    t.plan(2);
    asPromised(function (...actual) {
      t.deepEqual(actual, expected);
      t.deepEqual(this, expectedThis);
    }).apply(givenThis, args);
  });
}

check('no arguments', [], []);
check('promise argument', ['v'], [Promise.resolve('v')]);
check('multiple arguments', [1, 'v'], [1, Promise.resolve('v')]);
check('object containing a promise', [{k: 'v'}], [{k: Promise.resolve('v')}]);
check('Promised this', [], [], 'v', Promise.resolve('v'));


text:
/**
 * @file
 *
 * ODP IP header
 */

#ifndef ODP_IP_H_
#define ODP_IP_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <odp_api.h>

/** @addtogroup odp_header ODP HEADER
 *  @{
 */

#define _ODP_IPV4             4  /**< IP version 4 */
#define _ODP_IPV4HDR_LEN     20  /**< Min length of IP header (no options) */
#define _ODP_IPV4HDR_IHL_MIN  5  /**< Minimum IHL value*/
#define _ODP_IPV4ADDR_LEN     4  /**< IPv4 address length in bytes */

/** The one byte IPv4 tos or IPv6 tc field is composed of the following two
 * subfields - a six bit Differentiated Service Code Point (DSCP) and a two
 * bit Explicit Congestion Notification (ECN) subfield.  The following
 * constants can be used to extract or modify these fields.  Despite the
 * name prefix being _ODP_IP_TOS_* these constants apply equally well for
 * the IPv6 Traffic Class (tc) field.
 */
#define _ODP_IP_TOS_MAX_DSCP   63    /**< 6-bit DSCP field has max value 63  */
#define _ODP_IP_TOS_DSCP_MASK  0xFC  /**< DSCP field is in bits <7:2>  */
#define _ODP_IP_TOS_DSCP_SHIFT 2     /**< DSCP field is shifted letf by 2  */
#define _ODP_IP_TOS_MAX_ECN    3     /**< 2-bit ECN field has max value 3  */
#define _ODP_IP_TOS_ECN_MASK   0x03  /**< ECN field is in bits <1:0>  */
#define _ODP_IP_TOS_ECN_SHIFT  0     /**< ECN field is not shifted.  */

/** The following constants give names to the four possible ECN values,
 * as described in RFC 3168.
 */
#define _ODP_IP_ECN_NOT_ECT  0  /**< 0 indicates not participating in ECN */
#define _ODP_IP_ECN_ECT1     1  /**< Indicates no congestion seen yet */
#define _ODP_IP_ECN_ECT0     2  /**< Indicates no congestion seen yet */
#define _ODP_IP_ECN_CE       3  /**< Used to signal Congestion Experienced */

/** @internal Returns IPv4 version */
#define _ODP_IPV4HDR_VER(ver_ihl) (((ver_ihl) & 0xf0) >> 4)

/** @internal Returns IPv4 header length */
#define _ODP_IPV4HDR_IHL(ver_ihl) ((ver_ihl) & 0x0f)

/** @internal Returns IPv4 DSCP */
#define _ODP_IPV4HDR_DSCP(tos) (((tos) & 0xfc) >> 2)

/** @internal Returns IPv4 Don't fragment */
#define _ODP_IPV4HDR_FLAGS_DONT_FRAG(frag_offset)  ((frag_offset) & 0x4000)

/** @internal Returns IPv4 more fragments */
#define _ODP_IPV4HDR_FLAGS_MORE_FRAGS(frag_offset)  ((frag_offset) & 0x2000)

/** @internal Returns IPv4 fragment offset */
#define _ODP_IPV4HDR_FRAG_OFFSET(frag_offset) ((frag_offset) & 0x1fff)

/** @internal Returns true if IPv4 packet is a fragment */
#define _ODP_IPV4HDR_IS_FRAGMENT(frag_offset) ((frag_offset) & 0x3fff)

/** IPv4 header */
typedef struct ODP_PACKED {
	uint8_t    ver_ihl;     /**< Version / Header length */
	uint8_t    tos;         /**< Type of service */
	odp_u16be_t tot_len;    /**< Total length */
	odp_u16be_t id;         /**< ID */
	odp_u16be_t frag_offset;/**< Fragmentation offset */
	uint8_t    ttl;         /**< Time to live */
	uint8_t    proto;       /**< Protocol */
	odp_u16sum_t chksum;    /**< Checksum */
	odp_u32be_t src_addr;   /**< Source address */
	odp_u32be_t dst_addr;   /**< Destination address */
} _odp_ipv4hdr_t;

/** @internal Compile time assert */
ODP_STATIC_ASSERT(sizeof(_odp_ipv4hdr_t) == _ODP_IPV4HDR_LEN,
		  "_ODP_IPV4HDR_T__SIZE_ERROR");

/** IPv6 version */
#define _ODP_IPV6 6

/** IPv6 header length */
#define _ODP_IPV6HDR_LEN 40

/** IPv6 address length in bytes */
#define _ODP_IPV6ADDR_LEN 16

/** The following constants can be used to access the three subfields
 * of the 4 byte ver_tc_flow field - namely the four bit Version subfield,
 * the eight bit Traffic Class subfield (TC) and the twenty bit Flow Label
 * subfield.  Note that the IPv6 TC field is analogous to the IPv4 TOS
 * field and is composed of the DSCP and ECN subfields.  Use the _ODP_IP_TOS_*
 * constants above to access these subfields.
 */
#define _ODP_IPV6HDR_VERSION_MASK     0xF0000000 /**< Version field bit mask */
#define _ODP_IPV6HDR_VERSION_SHIFT    28         /**< Version field shift */
#define _ODP_IPV6HDR_TC_MASK          0x0FF00000 /**< TC field bit mask */
#define _ODP_IPV6HDR_TC_SHIFT         20         /**< TC field shift */
#define _ODP_IPV6HDR_FLOW_LABEL_MASK  0x000FFFFF /**< Flow Label bit mask */
#define _ODP_IPV6HDR_FLOW_LABEL_SHIFT 0          /**< Flow Label shift */

/** @internal Returns IPv6 DSCP */
#define _ODP_IPV6HDR_DSCP(ver_tc_flow) \
	(uint8_t)((((ver_tc_flow) & 0x0fc00000) >> 22) & 0xff)

/**
 * Ipv6 address
 */
typedef union ODP_PACKED {
	uint8_t		u8[16];
	odp_u16be_t	u16[8];
	odp_u32be_t	u32[4];
	odp_u64be_t	u64[2];
} _odp_ipv6_addr_t;

/**
 * IPv6 header
 */
typedef struct ODP_PACKED {
	odp_u32be_t ver_tc_flow; /**< Version / Traffic class / Flow label */
	odp_u16be_t payload_len; /**< Payload length */
	uint8_t    next_hdr;     /**< Next header */
	uint8_t    hop_limit;    /**< Hop limit */
	_odp_ipv6_addr_t src_addr; /**< Source address */
	_odp_ipv6_addr_t dst_addr; /**< Destination address */
} _odp_ipv6hdr_t;

/** @internal Compile time assert */
ODP_STATIC_ASSERT(sizeof(_odp_ipv6hdr_t) == _ODP_IPV6HDR_LEN,
		  "_ODP_IPV6HDR_T__SIZE_ERROR");

/**
 * IPv6 Header extensions
 */
typedef struct ODP_PACKED {
	uint8_t    next_hdr;     /**< Protocol of next header */
	uint8_t    ext_len;      /**< Length of this extension in 8 byte units,
				    not counting first 8 bytes, so 0 = 8 bytes
				    1 = 16 bytes, etc. */
	uint8_t    filler[6];    /**< Fill out first 8 byte segment */
} _odp_ipv6hdr_ext_t;

/** @name
 * IP protocol values (IPv4:'proto' or IPv6:'next_hdr')
 * @{*/
#define _ODP_IPPROTO_HOPOPTS 0x00 /**< IPv6 hop-by-hop options */
#define _ODP_IPPROTO_ICMP    0x01 /**< Internet Control Message Protocol (1) */
#define _ODP_IPPROTO_TCP     0x06 /**< Transmission Control Protocol (6) */
#define _ODP_IPPROTO_UDP     0x11 /**< User Datagram Protocol (17) */
#define _ODP_IPPROTO_ROUTE   0x2B /**< IPv6 Routing header (43) */
#define _ODP_IPPROTO_FRAG    0x2C /**< IPv6 Fragment (44) */
#define _ODP_IPPROTO_AH      0x33 /**< Authentication Header (51) */
#define _ODP_IPPROTO_ESP     0x32 /**< Encapsulating Security Payload (50) */
#define _ODP_IPPROTO_SCTP    0x84 /**< Stream Control Transmission protocol
				       (132) */
#define _ODP_IPPROTO_INVALID 0xFF /**< Reserved invalid by IANA */

/**@}*/

/**
 * @}
 */
#ifdef __cplusplus
}
#endif

#endif


text:
export interface HostEvent {
  id: string;
  name: string;
  functionName: string;
  diagnostics: monaco.editor.IMarkerData[];
}


text:
package enjuicer;

import javax.swing.*;
import java.math.BigDecimal;
import java.math.MathContext;

public class TimeCell extends BufferedCell<BigDecimal> {
    // Resolution with respect to milliseconds
    private BigDecimal resolution;
    private Timer timer;

    public TimeCell(BigDecimal resolution) {
        this.resolution = resolution;
    }

    @Override
    protected void addedConsumer(CellConsumer<BigDecimal> consumer) {
        if(getConsumerCount() == 1) {
            // Added first consumer
            int delay = resolution.intValue();
            timer = new Timer(delay, e -> {
                long timeInMillis = System.currentTimeMillis();
                BigDecimal value = new BigDecimal(timeInMillis);
                supplyToAll(value);
            });
            timer.setInitialDelay(0);
            timer.setRepeats(true);
            timer.start();
        }
    }

    @Override
    protected void removedConsumer(CellConsumer<BigDecimal> consumer) {
        if(getConsumerCount() == 0) {
            // Removed last consumer
            timer.stop();
            timer = null;
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE document [
  <!ENTITY project SYSTEM "project.xml">
]>
<document url="maven-jars.html">

    &project;

    <properties>
        <author email="fhanik@apache.org">Filip Hanik</author>
        <title>Apache Tomcat - Using Tomcat libraries with Maven</title>
    </properties>

<toc/>

    <subsection name="Tomcat Snapshots">
      Tomcat snapshots are located in the
      Apache Snapshot Repository.
      The official URL is <source>http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/</source>

        Snapshots are done periodically, not on a regular basis, but when changes happen and the Tomcat team deems a new snapshot might
        useful.

    </subsection>
    <subsection name="Tomcat Releases">

        Stable releases are published to the
        Central
        Maven Repositories. The URL for this is

      <source>http://repo2.maven.org/maven2/org/apache/tomcat/</source>
    </subsection>

</document>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MoonSharp.Interpreter.Execution.VM;

namespace MoonSharp.Interpreter
{
	/// <summary>
	/// Class used to support "tail" continuations - a way for C# / Lua interaction which supports
	/// coroutine yielding (at the expense of a LOT of added complexity in calling code).
	/// </summary>
	public class TailCallData
	{
		/// <summary>
		/// Gets or sets the function to call
		/// </summary>
		public DynValue Function { get; set; }
		/// <summary>
		/// Gets or sets the arguments to the function
		/// </summary>
		public DynValue[] Args { get; set; }
		/// <summary>
		/// Gets or sets the callback to be used as a continuation.
		/// </summary>
		public CallbackFunction Continuation { get; set; }
		/// <summary>
		/// Gets or sets the callback to be used in case of errors.
		/// </summary>
		public CallbackFunction ErrorHandler { get; set; }
		/// <summary>
		/// Gets or sets the error handler to be called before stack unwinding
		/// </summary>
		public DynValue ErrorHandlerBeforeUnwind { get; set; }
	}
}


text:
require_relative '../../spec_helper'
require_relative '../../shared/file/sticky'

describe "File.sticky?" do
  it_behaves_like :file_sticky, :sticky?, File
  it_behaves_like :file_sticky_missing, :sticky?, File
end

describe "File.sticky?" do
  platform_is_not :windows do
    it "returns false if file does not exist" do
      File.sticky?("I_am_a_bogus_file").should == false
    end

    it "returns false if the file has not sticky bit set" do
      filename = tmp("i_exist")
      touch(filename)

      File.sticky?(filename).should == false

      rm_r filename
    end
  end

  platform_is :linux, :darwin do
    it "returns true if the file has sticky bit set" do
      filename = tmp("i_exist")
      touch(filename)
      system "chmod +t #{filename}"

      File.sticky?(filename).should == true

      rm_r filename
    end
  end

  platform_is :bsd do
    # FreeBSD and NetBSD can't set sticky bit to a normal file
    it "cannot set sticky bit to a normal file" do
      filename = tmp("i_exist")
      touch(filename)
      stat = File.stat(filename)
      mode = stat.mode
      raise_error(Errno::EFTYPE){File.chmod(mode|01000, filename)}
      File.sticky?(filename).should == false

      rm_r filename
    end
  end
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
StrVectorX
</TITLE>

<META NAME="date" CONTENT="2011-11-08">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

      Package
    Class
      Tree
      Index

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

SimpleOpenNI

Class StrVectorX

java.lang.Object
  SimpleOpenNI.StrVectorX

public class StrVectorX
extends java.lang.Object

Constructor Summary

StrVectorX()

StrVectorX(long n)

StrVectorX(long cPtr,
           boolean cMemoryOwn)

Method Summary

 void
add(java.lang.String x)

 long
capacity()

 void
clear()

 void
delete()

 java.lang.String
get(int i)

static long
getCPtr(StrVectorX obj)

 boolean
isEmpty()

 void
reserve(long n)

 void
set(int i,
    java.lang.String val)

 long
size()

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StrVectorX

public StrVectorX()

StrVectorX

public StrVectorX(long n)

StrVectorX

public StrVectorX(long cPtr,
                  boolean cMemoryOwn)

Method Detail

add

public void add(java.lang.String x)

capacity

public long capacity()

clear

public void clear()

delete

public void delete()

get

public java.lang.String get(int i)

getCPtr

public static long getCPtr(StrVectorX obj)

isEmpty

public boolean isEmpty()

reserve

public void reserve(long n)

set

public void set(int i,
                java.lang.String val)

size

public long size()

      Package
    Class
      Tree
      Index

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
import logging
import rdflib
import sys
from pyramid.threadlocal import get_current_request
from pyramid.events import subscriber
from pyramid.events import BeforeRender

log = logging.getLogger(__name__)

class Cleanup:
    def __init__(self, request):
        self.request = request

    def __del__(self):
        pass

def isforstatic(request):
    return [f for f in request.registry.settings['staticfiles']
        if request.path_info.startswith('/' + f)]

def handle_setup(event):
    """
    Do basic request setup
    """
    request = event.request
    if request is None:
        request = get_current_request()

    if request and not isforstatic(request):
        if "picked" not in request.session:
            request.session["picked"] = set()
        request.types = request.registry.settings['detected_types']
        request.secret_key = 'veryverysecret'

def handle_teardown(event):
    request = event.request
    if request is None:
        request = get_current_request()
    if request is not None and not isforstatic(request):
        Cleanup(request)

@subscriber(BeforeRender)
def add_global(event):
    request = event['request']
    if request is None:
        request = get_current_request()
    event["pyramid_version"] = "1.5dev"
    event["rdflib_version"] = rdflib.__version__
    event["python_version"] = "{}".format(
            sys.version.split(' ')[0])


text:
namespace v8 {
namespace internal {

class ConstructorBuiltins {
 public:
  static int MaximumFunctionContextSlots() {
    return FLAG_test_small_max_function_context_stub_size ? kSmallMaximumSlots
                                                          : kMaximumSlots;
  }

  // Maximum number of elements in copied array (chosen so that even an array
  // backed by a double backing store will fit into new-space).
  static const int kMaximumClonedShallowArrayElements =
      JSArray::kInitialMaxFastElementArray;
  // Maximum number of properties in copied object so that the properties store
  // will fit into new-space. This constant is based on the assumption that
  // NameDictionaries are 50% over-allocated.
  static const int kMaximumClonedShallowObjectProperties =
      NameDictionary::kMaxRegularCapacity / 3 * 2;

 private:
  static const int kMaximumSlots = 0x8000;
  static const int kSmallMaximumSlots = 10;

  // FastNewFunctionContext can only allocate closures which fit in the
  // new space.
  STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize +
                 FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize);
};

}  // namespace internal
}  // namespace v8

#endif  // V8_BUILTINS_BUILTINS_CONSTRUCTOR_H_


text:
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="captcha">
	<name>plg_captcha_recaptcha</name>
	<version>3.0.0</version>
	<creationDate>December 2011</creationDate>
	<author>Joomla! Project</author>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<copyright>Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<description>PLG_CAPTCHA_RECAPTCHA_XML_DESCRIPTION</description>
	<files>
		<filename
			plugin="recaptcha">recaptcha.php</filename>
	</files>
	<config>
	<fields name="params">
		<fieldset name="basic">
		<field
			name="public_key"
			type="text"
			default=""
			label="PLG_RECAPTCHA_PUBLIC_KEY_LABEL"
			description="PLG_RECAPTCHA_PUBLIC_KEY_DESC"
			required="true"
			filter="string"
			size="50" />

		<field
			name="private_key"
			type="text"
			default=""
			label="PLG_RECAPTCHA_PRIVATE_KEY_LABEL"
			description="PLG_RECAPTCHA_PRIVATE_KEY_DESC"
			required="true"
			filter="string"
			size="50" />

		<field
			name="theme"
			type="list"
			default="clean"
			label="PLG_RECAPTCHA_THEME_LABEL"
			description="PLG_RECAPTCHA_THEME_DESC"
			required="true"
			filter="">
			<option
				value="clean">PLG_RECAPTCHA_THEME_CLEAN</option>
			<option
				value="white">PLG_RECAPTCHA_THEME_WHITE</option>
			<option
				value="blackglass">PLG_RECAPTCHA_THEME_BLACKGLASS</option>
			<option
				value="red">PLG_RECAPTCHA_THEME_RED</option>
			</field>
		</fieldset>
	</fields>
	</config>
</extension>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ComicBookGallery.Models
{
    public class Artist
    {
        public string Name { get; set; }
        public string Role { get; set; }
    }
}


text:
if [[ "$OSTYPE" == "darwin"* ]]; then

  FORMULAS=(
    dock
  )

  CASKS=(
    docker
  )

  echo 'Installing docker formulae'

  brew install ${FORMULAS[@]}

  echo 'Installing docker casks'

  brew install ${CASKS[@]}

  echo 'Cleaning up'

  brew cleanup

fi


text:
package com.koch.ambeth.event.kafka.config;

import com.koch.ambeth.util.annotation.ConfigurationConstantDescription;
import com.koch.ambeth.util.annotation.ConfigurationConstants;

@ConfigurationConstants
public final class EventKafkaConfigurationConstants {
	@ConfigurationConstantDescription("Kafka Topic to publish/subscribe for Ambeth Events")
	public static final String TOPIC_NAME = "ambeth.event.kafka.topic";
}


text:
package org.olat.core.gui.control.generic.portal;

import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component;
import org.olat.core.gui.components.link.Link;
import org.olat.core.gui.components.link.LinkFactory;
import org.olat.core.gui.components.velocity.VelocityContainer;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.controller.BasicController;

/**
 * Description:

 * The portlet container wrapps a portlet and adds the features to move portlets around in the portal
 *

 * Initial Date: 08.07.2005

 *
 * @author gnaegi
 */
public class PortletContainer extends BasicController implements PortletContainerPositioning {

	private static String MODE_EDIT = "editMode";

	private VelocityContainer portletContainerVC;
	private VelocityContainer toolboxContainer;
	private Portlet portlet;
	private Component runComponent;

	private Link moveLeftLink;
	private Link moveUpLink;
	private Link moveDownLink;
	private Link moveRightLink;
	private Link close;

	/**
	 * Constructor for a portlet container
	 *
	 * @param wControl
	 * @param ureq
	 * @param portlet
	 */
	public PortletContainer(WindowControl wControl, UserRequest ureq, Portlet portlet) {
		super(ureq, wControl);
		this.portlet = portlet;

		portletContainerVC = this.createVelocityContainer("portletContainer");
		this.portletContainerVC.contextPut("title", portlet.getTitle());
		this.portletContainerVC.contextPut("cssClass", portlet.getCssClass());
		this.portletContainerVC.contextPut(MODE_EDIT, Boolean.FALSE);
		putInitialPanel(portletContainerVC);

		toolboxContainer = createVelocityContainer("portletToolbox");

		moveLeftLink = LinkFactory.createCustomLink("move.left", "move.left", null, Link.NONTRANSLATED, toolboxContainer, this);
		moveLeftLink.setTooltip(translate("move.left"), false);
		moveLeftLink.setTextReasonForDisabling(translate("move.left.impossible"));
		moveLeftLink.setCustomEnabledLinkCSS("b_portlet_edit_left");
		moveLeftLink.setCustomDisabledLinkCSS("b_portlet_edit_left_disabled");

		moveUpLink = LinkFactory.createCustomLink("move.up", "move.up", null, Link.NONTRANSLATED, toolboxContainer, this);
		moveUpLink.setTooltip(translate("move.up"), false);
		moveUpLink.setTextReasonForDisabling(translate("move.up.impossible"));
		moveUpLink.setCustomEnabledLinkCSS("b_portlet_edit_up");
		moveUpLink.setCustomDisabledLinkCSS("b_portlet_edit_up_disabled");

		moveDownLink = LinkFactory.createCustomLink("move.down", "move.down", null, Link.NONTRANSLATED, toolboxContainer, this);
		moveDownLink.setTooltip(translate("move.down"), false);
		moveDownLink.setTextReasonForDisabling(translate("move.down.impossible"));
		moveDownLink.setCustomEnabledLinkCSS("b_portlet_edit_down");
		moveDownLink.setCustomDisabledLinkCSS("b_portlet_edit_down_disabled");

		moveRightLink = LinkFactory.createCustomLink("move.right", "move.right", null, Link.NONTRANSLATED, toolboxContainer, this);
		moveRightLink.setTooltip(translate("move.right"), false);
		moveRightLink.setTextReasonForDisabling(translate("move.right.impossible"));
		moveRightLink.setCustomEnabledLinkCSS("b_portlet_edit_right");
		moveRightLink.setCustomDisabledLinkCSS("b_portlet_edit_right_disabled");

		close = LinkFactory.createCustomLink("close", "close", null, Link.NONTRANSLATED, toolboxContainer, this);
		close.setTooltip(translate("close"), false);
		close.setCustomEnabledLinkCSS("b_portlet_edit_delete");

		portletContainerVC.put("toolbox", toolboxContainer);

	}

	/**
	 * Initializes the portlet runtime view
	 *
	 * @param ureq
	 */
	protected void initializeRunComponent(UserRequest ureq) {
		this.runComponent = this.portlet.getInitialRunComponent(getWindowControl(), ureq);
		this.portletContainerVC.put("portlet", runComponent);
	}

	/**
	 * Dispose the portlets run component without disposing the container and the portlet itself
	 *
	 * @param asynchronous
	 */
	protected void deactivateRunComponent() {
		portlet.disposeRunComponent();
		portletContainerVC.remove(runComponent);
		runComponent = null;
	}

	/**
	 * expose values to velocity
	 *
	 * @param name Name of value
	 * @param value Boolean value
	 */
	protected void contextPut(String name, Boolean value) {
		this.portletContainerVC.contextPut(name, value);
	}

	/**
	 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
	 */
	@Override
	public void event(UserRequest ureq, Component source, Event event) {
		// forward event to portal
		fireEvent(ureq, event);
	}

	/**
	 * @return AbstractPortlet The portlet from this container
	 */
	public Portlet getPortlet() {
		return this.portlet;
	}

	/**
	 * @see org.olat.core.gui.control.DefaultController#doDispose(boolean)
	 */
	@Override
	protected void doDispose() {
		if (portlet != null) {
			portlet.dispose();
			portlet = null;
		}
	}

	/**
	 * @param editModeEnabled true: portal is in edit mode, false in run mode
	 */
	protected void setIsEditMode(UserRequest ureq, Boolean editModeEnabled) {
		this.portletContainerVC.contextPut(MODE_EDIT, editModeEnabled);

		// only create sorting and moving stuff if switching to edit mode otherwise lots or memory is wasted!
		if (editModeEnabled) {
			Controller additionalPortletTools = portlet.getTools(ureq, getWindowControl());
			if (additionalPortletTools != null) {
				toolboxContainer.contextPut("hasAdditional", Boolean.TRUE);
				toolboxContainer.put("additionalTools", additionalPortletTools.getInitialComponent());
			}
		}

	}

	@Override
	public void setCanMoveDown(boolean canMoveDown) {
		toolboxContainer.contextPut("canDown", new Boolean(canMoveDown));
		moveDownLink.setEnabled(canMoveDown);
	}

	@Override
	public void setCanMoveLeft(boolean canMoveLeft) {
		toolboxContainer.contextPut("canLeft", new Boolean(canMoveLeft));
		moveLeftLink.setEnabled(canMoveLeft);
	}

	@Override
	public void setCanMoveRight(boolean canMoveRight) {
		toolboxContainer.contextPut("canRight", new Boolean(canMoveRight));
		moveRightLink.setEnabled(canMoveRight);
	}

	@Override
	public void setCanMoveUp(boolean canMoveUp) {
		toolboxContainer.contextPut("canUp", new Boolean(canMoveUp));
		moveUpLink.setEnabled(canMoveUp);
	}

}


text:
<?php

/**
 * sfPayzenPaymentForm Form to send the value to the Payzen platform
 *
 * @package    sfPayzenPaymentPlugin
 * @subpackage payzen
 * @author     Patrick Dos Santos <patrick.dos-santos [at] solution-interactive.com>
 */
class sfPayzenPaymentForm extends sfForm
{

    /**
     * Builds the form.
     *
     * @param sfPayzenPayment $payment The payment to get the form values from
     * @param array $defaults Defaults option for the form
     * @param array $options The form option
     * @param string $CSRFSecret The csrf secret key
     * @see sfForm
     */
    public function __construct(sfPayzenPayment $payment, $defaults = array(), $options = array(), $CSRFSecret = null)
    {
        parent::__construct($defaults, $options, $CSRFSecret);

        //We do not want the CSRF token to be sent to Payzen plateform
        unset($this['_csrf_token']);

        foreach ($payment->getVadsArray() as $name => $value)
        {
            $this->setWidget($name, new sfWidgetFormInputHidden(array('default' => $value)));
        }
        $this->setWidget('signature', new sfWidgetFormInputHidden(array('default' => $payment->getSignature())));
    }

}


text:
package sqlbase

import (
	"bytes"
	"fmt"

	"github.com/cockroachdb/cockroach/pkg/sql/parser"
	"github.com/cockroachdb/cockroach/pkg/util/encoding"
	"github.com/pkg/errors"
)

// EncDatum represents a datum that is "backed" by an encoding and/or by a
// parser.Datum. It allows "passing through" a Datum without decoding and
// reencoding. TODO(radu): It will also allow comparing encoded datums directly
// (for certain encodings).
type EncDatum struct {
	Type ColumnType

	// Encoding type. Valid only if encoded is not nil.
	encoding DatumEncoding

	// Encoded datum (according to the encoding field).
	encoded []byte

	// Decoded datum.
	Datum parser.Datum
}

func (ed *EncDatum) stringWithAlloc(a *DatumAlloc) string {
	if ed.Datum == nil {
		if a == nil {
			a = &DatumAlloc{}
		}
		err := ed.EnsureDecoded(a)
		if err != nil {
			return fmt.Sprintf("<error: %v>", err)
		}
	}
	return ed.Datum.String()
}

func (ed *EncDatum) String() string {
	return ed.stringWithAlloc(nil)
}

// EncDatumFromEncoded initializes an EncDatum with the given encoded
// value. The encoded value is stored as a shallow copy, so the caller must
// make sure the slice is not modified for the lifetime of the EncDatum.
// SetEncoded wipes the underlying Datum.
func EncDatumFromEncoded(typ ColumnType, enc DatumEncoding, encoded []byte) EncDatum {
	if len(encoded) == 0 {
		panic("empty encoded value")
	}
	return EncDatum{
		Type:     typ,
		encoding: enc,
		encoded:  encoded,
		Datum:    nil,
	}
}

// EncDatumFromBuffer initializes an EncDatum with an encoding that is
// possibly followed by other data. Similar to EncDatumFromEncoded,
// except that this function figures out where the encoding stops and returns a
// slice for the rest of the buffer.
func EncDatumFromBuffer(typ ColumnType, enc DatumEncoding, buf []byte) (EncDatum, []byte, error) {
	switch enc {
	case DatumEncoding_ASCENDING_KEY, DatumEncoding_DESCENDING_KEY:
		encLen, err := encoding.PeekLength(buf)
		if err != nil {
			return EncDatum{}, nil, err
		}
		ed := EncDatumFromEncoded(typ, enc, buf[:encLen])
		return ed, buf[encLen:], nil
	case DatumEncoding_VALUE:
		typeOffset, encLen, err := encoding.PeekValueLength(buf)
		if err != nil {
			return EncDatum{}, nil, err
		}
		ed := EncDatumFromEncoded(typ, enc, buf[typeOffset:encLen])
		return ed, buf[encLen:], nil
	default:
		panic(fmt.Sprintf("unknown encoding %s", enc))
	}
}

// DatumToEncDatum initializes an EncDatum with the given Datum.
func DatumToEncDatum(ctyp ColumnType, d parser.Datum) EncDatum {
	if d == nil {
		panic("Cannot convert nil datum to EncDatum")
	}
	if ptyp := ctyp.ToDatumType(); d != parser.DNull && !ptyp.Equal(d.ResolvedType()) {
		panic(fmt.Sprintf("invalid datum type given: %s, expected %s",
			d.ResolvedType(), ptyp))
	}
	return EncDatum{
		Type:  ctyp,
		Datum: d,
	}
}

// UnsetDatum ensures subsequent IsUnset() calls return false.
func (ed *EncDatum) UnsetDatum() {
	ed.encoded = nil
	ed.Datum = nil
	ed.encoding = 0
}

// IsUnset returns true if SetEncoded or SetDatum were not called.
func (ed *EncDatum) IsUnset() bool {
	return ed.encoded == nil && ed.Datum == nil
}

// IsNull returns true if the EncDatum value is NULL. Equivalent to checking if
// ed.Datum is DNull after calling EnsureDecoded.
func (ed *EncDatum) IsNull() bool {
	if ed.Datum != nil {
		return ed.Datum == parser.DNull
	}
	if ed.encoded == nil {
		panic("IsNull on unset EncDatum")
	}
	switch ed.encoding {
	case DatumEncoding_ASCENDING_KEY, DatumEncoding_DESCENDING_KEY:
		_, isNull := encoding.DecodeIfNull(ed.encoded)
		return isNull

	case DatumEncoding_VALUE:
		_, _, _, typ, err := encoding.DecodeValueTag(ed.encoded)
		if err != nil {
			panic(err)
		}
		return typ == encoding.Null

	default:
		panic(fmt.Sprintf("unknown encoding %s", ed.encoding))
	}
}

// EnsureDecoded ensures that the Datum field is set (decoding if it is not).
func (ed *EncDatum) EnsureDecoded(a *DatumAlloc) error {
	if ed.Datum != nil {
		return nil
	}
	if ed.encoded == nil {
		panic("decoding unset EncDatum")
	}
	datType := ed.Type.ToDatumType()
	var err error
	var rem []byte
	switch ed.encoding {
	case DatumEncoding_ASCENDING_KEY:
		ed.Datum, rem, err = DecodeTableKey(a, datType, ed.encoded, encoding.Ascending)
	case DatumEncoding_DESCENDING_KEY:
		ed.Datum, rem, err = DecodeTableKey(a, datType, ed.encoded, encoding.Descending)
	case DatumEncoding_VALUE:
		ed.Datum, rem, err = DecodeTableValue(a, datType, ed.encoded)
	default:
		panic(fmt.Sprintf("unknown encoding %s", ed.encoding))
	}
	if err != nil {
		return err
	}
	if len(rem) != 0 {
		ed.Datum = nil
		return errors.Errorf("%d trailing bytes in encoded value", len(rem))
	}
	return nil
}

// Encoding returns the encoding that is already available (the latter indicated
// by the bool return value).
func (ed *EncDatum) Encoding() (DatumEncoding, bool) {
	if ed.encoded == nil {
		return 0, false
	}
	return ed.encoding, true
}

// Encode appends the encoded datum to the given slice using the requested
// encoding.
// Note: DatumEncoding_VALUE encodings are not unique because they can contain
// a column ID so they should not be used to test for equality.
func (ed *EncDatum) Encode(a *DatumAlloc, enc DatumEncoding, appendTo []byte) ([]byte, error) {
	if ed.encoded != nil && enc == ed.encoding {
		// We already have an encoding that matches
		return append(appendTo, ed.encoded...), nil
	}
	if err := ed.EnsureDecoded(a); err != nil {
		return nil, err
	}
	switch enc {
	case DatumEncoding_ASCENDING_KEY:
		return EncodeTableKey(appendTo, ed.Datum, encoding.Ascending)
	case DatumEncoding_DESCENDING_KEY:
		return EncodeTableKey(appendTo, ed.Datum, encoding.Descending)
	case DatumEncoding_VALUE:
		return EncodeTableValue(appendTo, ColumnID(encoding.NoColumnID), ed.Datum)
	default:
		panic(fmt.Sprintf("unknown encoding requested %s", enc))
	}
}

// Compare returns:
//    -1 if the receiver is less than rhs,
//    0  if the receiver is equal to rhs,
//    +1 if the receiver is greater than rhs.
func (ed *EncDatum) Compare(a *DatumAlloc, rhs *EncDatum) (int, error) {
	// TODO(radu): if we have both the Datum and a key encoding available, which
	// one would be faster to use?
	if ed.encoding == rhs.encoding && ed.encoded != nil && rhs.encoded != nil {
		switch ed.encoding {
		case DatumEncoding_ASCENDING_KEY:
			return bytes.Compare(ed.encoded, rhs.encoded), nil
		case DatumEncoding_DESCENDING_KEY:
			return bytes.Compare(rhs.encoded, ed.encoded), nil
		}
	}
	if err := ed.EnsureDecoded(a); err != nil {
		return 0, err
	}
	if err := rhs.EnsureDecoded(a); err != nil {
		return 0, err
	}
	return ed.Datum.Compare(rhs.Datum), nil
}

// EncDatumRow is a row of EncDatums.
type EncDatumRow []EncDatum

func (r EncDatumRow) stringToBuf(a *DatumAlloc, b *bytes.Buffer) {
	b.WriteString("[")
	for i := range r {
		if i > 0 {
			b.WriteString(" ")
		}
		b.WriteString(r[i].stringWithAlloc(a))
	}
	b.WriteString("]")
}

func (r EncDatumRow) String() string {
	var b bytes.Buffer
	r.stringToBuf(&DatumAlloc{}, &b)
	return b.String()
}

// DTupleToEncDatumRow converts a parser.DTuple to an EncDatumRow.
func DTupleToEncDatumRow(row EncDatumRow, types []ColumnType, tuple parser.DTuple) {
	if len(row) != len(tuple) || len(tuple) != len(types) {
		panic(fmt.Sprintf("Length mismatch (%d, %d and %d) between row, types and tuple",
			len(row), len(types), len(tuple)))
	}
	for i, datum := range tuple {
		row[i] = DatumToEncDatum(types[i], datum)
	}
}

// EncDatumRowToDTuple converts a given EncDatumRow to a DTuple.
func EncDatumRowToDTuple(tuple parser.DTuple, row EncDatumRow, da *DatumAlloc) error {
	if len(row) != len(tuple) {
		return errors.Errorf(
			"Length mismatch (%d and %d) between tuple and row", len(tuple), len(row))
	}
	for i, encDatum := range row {
		if encDatum.IsUnset() {
			tuple[i] = parser.DNull
			continue
		}
		err := encDatum.EnsureDecoded(da)
		if err != nil {
			return err
		}
		tuple[i] = encDatum.Datum
	}
	return nil
}

// Compare returns the relative ordering of two EncDatumRows according to a
// ColumnOrdering:
//   -1 if the receiver comes before the rhs in the ordering,
//   +1 if the receiver comes after the rhs in the ordering,
//   0 if the relative order does not matter (i.e. the two rows have the same
//     values for the columns in the ordering).
//
// Note that a return value of 0 does not (in general) imply that the rows are
// equal; for example, rows [1 1 5] and [1 1 6] when compared against ordering
// {{0, asc}, {1, asc}} (i.e. ordered by first column and then by second
// column).
func (r EncDatumRow) Compare(a *DatumAlloc, ordering ColumnOrdering, rhs EncDatumRow) (int, error) {
	for _, c := range ordering {
		cmp, err := r[c.ColIdx].Compare(a, &rhs[c.ColIdx])
		if err != nil {
			return 0, err
		}
		if cmp != 0 {
			if c.Direction == encoding.Descending {
				cmp = -cmp
			}
			return cmp, nil
		}
	}
	return 0, nil
}

// EncDatumRows is a slice of EncDatumRows.
type EncDatumRows []EncDatumRow

func (r EncDatumRows) String() string {
	var a DatumAlloc
	var b bytes.Buffer
	b.WriteString("[")
	for i, r := range r {
		if i > 0 {
			b.WriteString(" ")
		}
		r.stringToBuf(&a, &b)
	}
	b.WriteString("]")
	return b.String()
}

// EncDatumRowAlloc is a helper that speeds up allocation of EncDatumRows
// (preferably of the same length).
type EncDatumRowAlloc struct {
	buf []EncDatum
	// Preallocate a small initial batch (helps cases where
	// we only allocate a few small rows).
	prealloc [16]EncDatum
}

// AllocRow allocates an EncDatumRow with the given number of columns.
func (a *EncDatumRowAlloc) AllocRow(cols int) EncDatumRow {
	if a.buf == nil {
		// First call.
		a.buf = a.prealloc[:]
	}
	if len(a.buf) < cols {
		// If the rows are small, allocate storage for a bunch of rows at once.
		bufLen := cols
		if cols <= 16 {
			bufLen *= 16
		} else if cols <= 64 {
			bufLen *= 4
		}
		a.buf = make([]EncDatum, bufLen)
	}
	// Chop off a row from buf, and limit its capacity to avoid corrupting the
	// following row in the unlikely case that the caller appends to the slice.
	result := EncDatumRow(a.buf[:cols:cols])
	a.buf = a.buf[cols:]
	return result
}

// CopyRow allocates an EncDatumRow and copies the given row to it.
func (a *EncDatumRowAlloc) CopyRow(row EncDatumRow) EncDatumRow {
	rowCopy := a.AllocRow(len(row))
	copy(rowCopy, row)
	return rowCopy
}


text:
#if !LEGACY_COMMANDS

namespace GitDiffMargin.Commands
{
    using Microsoft.VisualStudio.Text;
    using Microsoft.VisualStudio.Text.Editor;
    using Microsoft.VisualStudio.Text.Editor.Commanding;

    internal class RollbackChangeCommandArgs : EditorCommandArgs
    {
        public RollbackChangeCommandArgs(ITextView textView, ITextBuffer subjectBuffer)
            : base(textView, subjectBuffer)
        {
        }
    }
}

#endif


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>Class: Fusioncharts::DbExampleController</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />

          Class
          Fusioncharts::DbExampleController

            In:

                app/controllers/fusioncharts/db_example_controller.rb

            Parent:

                ApplicationController

There are two examples in this controller. *Pie-chart for total ouput
quantities of each factory by getting data from database and using dataXML
method *Pie-chart for total ouput quantities of each factory and a link to
another chart which gives detailed information for selected factory All the
views related to this controller will use the "common" layout. As
per Ruby On Rails conventions, we have the corresponding views with the
same name as the function name in the controller.

Methods

      basic_dbexample

Public Instance methods

          basic_dbexample()

This action retrieves the values from the database and constructs an array
to hold, factory name and corresponding total output quantity. The view for
this action basic_dbexample
will use the array values to construct the xml for this chart. To build the
xml, the view takes help from the builder file
(basic_factories_quantity.builder)

[Validate]


text:
package javax.xml.parsers;

/**
 * Thrown when a problem with configuration with the Parser Factories
 * exists. This error will typically be thrown when the class of a
 * parser factory specified in the system properties cannot be found
 * or instantiated.
 *
 * @author Jeff Suttor
 * @version $Revision: 1.7 $, $Date: 2010-11-01 04:36:09 $
 */

public class FactoryConfigurationError extends Error {
    private static final long serialVersionUID = -827108682472263355L;

    /**
     *Exception that represents the error.
     */
    private Exception exception;

    /**
     * Create a new FactoryConfigurationError with no
     * detail mesage.
     */

    public FactoryConfigurationError() {
        super();
        this.exception = null;
    }

    /**
     * Create a new FactoryConfigurationError with
     * the String  specified as an error message.
     *
     * @param msg The error message for the exception.
     */

    public FactoryConfigurationError(String msg) {
        super(msg);
        this.exception = null;
    }

    /**
     * Create a new FactoryConfigurationError with a
     * given Exception base cause of the error.
     *
     * @param e The exception to be encapsulated in a
     * FactoryConfigurationError.
     */

    public FactoryConfigurationError(Exception e) {
        super(e.toString());
        this.exception = e;
    }

    /**
     * Create a new FactoryConfigurationError with the
     * given Exception base cause and detail message.
     *
     * @param e The exception to be encapsulated in a
     * FactoryConfigurationError
     * @param msg The detail message.
     */

    public FactoryConfigurationError(Exception e, String msg) {
        super(msg);
        this.exception = e;
    }

    /**
     * Return the message (if any) for this error . If there is no
     * message for the exception and there is an encapsulated
     * exception then the message of that exception, if it exists will be
     * returned. Else the name of the encapsulated exception will be
     * returned.
     *
     * @return The error message.
     */

    public String getMessage () {
        String message = super.getMessage ();

        if (message == null && exception != null) {
            return exception.getMessage();
        }

        return message;
    }

    /**
     * Return the actual exception (if any) that caused this exception to
     * be raised.
     *
     * @return The encapsulated exception, or null if there is none.
     */

    public Exception getException () {
        return exception;
    }

    /**
     * use the exception chaining mechanism of JDK1.4
    */
    @Override
    public Throwable getCause() {
        return exception;
    }
}