text:
package project2.jdbc.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import project2.jdbc.JDBCPool;
import project2.jdbc.bean.BrowserPageBean;
import project2.object.Movie;

public class BrowserDAO {

	public static List<Movie> browserContent(BrowserPageBean pagebean) {
		List<Movie> movies = new ArrayList<Movie>();
		int start = (pagebean.getCurPage() - 1) * pagebean.getRowsPerPage();
		Object[] para = new Object[] { "%" + pagebean.getGenre() + "%", pagebean.getYear() + "%", start,
				pagebean.getRowsPerPage() };
		try {
			Connection conn = JDBCPool.getInstance().getConnection();
			String sql_str = "select movies.id, title, year, dirctor, banner_url, name from movies, genres_in_movies, genres"
					+ " where movies.id=genres_in_movies.movie_id and genres_in_movies.genre_id = genres.id "
					+ "and name like ? and year like ? group by movies.id limit ?,?;";
			PreparedStatement sql = conn.prepareStatement(sql_str);
			sql.setObject(1, para[0]);
			sql.setObject(2, para[1]);
			sql.setObject(3, para[2]);
			sql.setObject(4, para[3]);
			// System.out.println(sql.toString());

			ResultSet rs = sql.executeQuery();

			while (rs.next()) {
				Movie mv = new Movie();
				mv.setId(rs.getInt(1));
				mv.setTitle(rs.getString(2));
				mv.setYear(rs.getInt(3));
				mv.setDirctor(rs.getString(4));
				mv.setBanner_url(rs.getString(5));
				mv.setGenre(rs.getString(6));
				movies.add(mv);
				// System.out.println(mv.toString());
			}
			rs.close();
			sql.close();
			JDBCPool.getInstance().release(conn);
		} catch (SQLException e) {
			System.out.println("JDBC Error:\t" + e.getMessage() + "\nError Code:\t" + e.getErrorCode());
		}
		return movies;
	}

	public static int browserPages(BrowserPageBean pagebean) {
		int total_pages = 0;
		Object[] para = new Object[] { "%" + pagebean.getGenre() + "%", pagebean.getYear() + "%" };
		try {
			Connection conn = JDBCPool.getInstance().getConnection();
			String sql_str = "select count(distinct movies.id) from movies, genres_in_movies, genres"
					+ " where movies.id=genres_in_movies.movie_id and genres_in_movies.genre_id = genres.id "
					+ "and name like ? and title like ?;";
			PreparedStatement sql = conn.prepareStatement(sql_str);
			sql.setObject(1, para[0]);
			sql.setObject(2, para[1]);
			// System.out.println(sql.toString());

			ResultSet rs = sql.executeQuery();
			if (rs.next()) {
				total_pages = rs.getInt(1);
			}
			rs.close();
			sql.close();
			JDBCPool.getInstance().release(conn);
		} catch (SQLException e) {
			System.out.println("JDBC Error:\t" + e.getMessage() + "\nError Code:\t" + e.getErrorCode());
		}
		if (total_pages % pagebean.getRowsPerPage() != 0)
			total_pages /= pagebean.getRowsPerPage() + 1;
		else
			total_pages /= pagebean.getRowsPerPage();

		if (total_pages == 0)
			total_pages = 1;
		// System.out.println(total_pages);
		return total_pages;
	}

}


text:
module TechieUser

  module Github

    def get_github_repositories(options)
      RestClient.get 'https://api.github.com/users/selvachezhian/repos'
      # 'curl https://api.github.com/users/selvachezhian/repos'
    end

  end

end

redpajama_set_name: RedPajamaGithub


text:
package org.apache.hadoop.hbase.errorhandling;

import java.util.Timer;
import java.util.TimerTask;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.classification.InterfaceStability;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;

/**
 * Time a given process/operation and report a failure if the elapsed time exceeds the max allowed
 * time.
 *

 * The timer won't start tracking time until calling {@link #start()}. If {@link #complete()} or
 * {@link #trigger()} is called before {@link #start()}, calls to {@link #start()} will fail.
 */
@InterfaceAudience.Private
public class TimeoutExceptionInjector {

  private static final Log LOG = LogFactory.getLog(TimeoutExceptionInjector.class);

  private final long maxTime;
  private volatile boolean complete;
  private final Timer timer;
  private final TimerTask timerTask;
  private long start = -1;

  /**
   * Create a generic timer for a task/process.
   * @param listener listener to notify if the process times out
   * @param maxTime max allowed running time for the process. Timer starts on calls to
   *          {@link #start()}
   */
  public TimeoutExceptionInjector(final ForeignExceptionListener listener, final long maxTime) {
    this.maxTime = maxTime;
    timer = new Timer();
    timerTask = new TimerTask() {
      @Override
      public void run() {
        // ensure we don't run this task multiple times
        synchronized (this) {
          // quick exit if we already marked the task complete
          if (TimeoutExceptionInjector.this.complete) return;
          // mark the task is run, to avoid repeats
          TimeoutExceptionInjector.this.complete = true;
        }
        long end = EnvironmentEdgeManager.currentTimeMillis();
        TimeoutException tee =  new TimeoutException(
            "Timeout caused Foreign Exception", start, end, maxTime);
        String source = "timer-" + timer;
        listener.receive(new ForeignException(source, tee));
      }
    };
  }

  public long getMaxTime() {
    return maxTime;
  }

  /**
   * For all time forward, do not throw an error because the process has completed.
   */
  public void complete() {
    // warn if the timer is already marked complete. This isn't going to be thread-safe, but should
    // be good enough and its not worth locking just for a warning.
    if (this.complete) {
      LOG.warn("Timer already marked completed, ignoring!");
      return;
    }
    LOG.debug("Marking timer as complete - no error notifications will be received for this timer.");
    synchronized (this.timerTask) {
      this.complete = true;
    }
    this.timer.cancel();
  }

  /**
   * Start a timer to fail a process if it takes longer than the expected time to complete.
   *

   * Non-blocking.
   * @throws IllegalStateException if the timer has already been marked done via {@link #complete()}
   *           or {@link #trigger()}
   */
  public synchronized void start() throws IllegalStateException {
    if (this.start >= 0) {
      LOG.warn("Timer already started, can't be started again. Ignoring second request.");
      return;
    }
    LOG.debug("Scheduling process timer to run in: " + maxTime + " ms");
    timer.schedule(timerTask, maxTime);
    this.start = EnvironmentEdgeManager.currentTimeMillis();
  }

  /**
   * Trigger the timer immediately.
   *

   * Exposed for testing.
   */
  public void trigger() {
    synchronized (timerTask) {
      if (this.complete) {
        LOG.warn("Timer already completed, not triggering.");
        return;
      }
      LOG.debug("Triggering timer immediately!");
      this.timer.cancel();
      this.timerTask.run();
    }
  }
}


text:
package com.jlmarting.todolistfragment.adapters;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.jlmarting.todolistfragment.R;
import com.jlmarting.todolistfragment.model.ToDo;

import java.text.SimpleDateFormat;
import java.util.List;

/**
 * Created by cursomovil on 23/03/15.
 * Estamos creando un adaptador "a medida", dado que queremos un ArrayAdapter de la
 * clase que hemos creado, ToDo.
 * El adaptador comunica estructuras de datos con elementos de la vista. En esta implementación
 * diremos cómo se hace.
 */
public class ToDoAdapter extends ArrayAdapter <ToDo>{

    private int resource;

    public ToDoAdapter(Context context, int resource, List<ToDo> objects) {
        super(context, resource, objects);
        this.resource = resource;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        LinearLayout layout;

        // Si no tenemos la vista, la tendremos que generar
        if( convertView == null) {
            layout= new LinearLayout(getContext());
            LayoutInflater li;
            String inflater = Context.LAYOUT_INFLATER_SERVICE;
            li=(LayoutInflater) getContext().getSystemService(inflater);
            li.inflate(resource, layout, true);
        }
        else {
            layout = (LinearLayout) convertView;
        }

        ToDo item = getItem(position);
        TextView lblTask = (TextView) layout.findViewById(R.id.lblTask);
        TextView lblDate = (TextView) layout.findViewById(R.id.lblDate);

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");

        //Asignamos valores a la vista
        lblTask.setText(item.getTask());
        lblDate.setText(sdf.format(item.getCreated()));

        return layout;
    }
}


text:
- [x] 01. run the callback function (array.length/interval) number of times rounded to the nearest integer.
- [x] 02. pass every ith item as the first argument to the callback.
- [x] 03. pass in position the ith as the second argument to the callback.
- [x] 04. pass in the original array as the third argument to the callback.
- [x] 05. accept an optional parameter that sets an interval.
- [x] 06. accept an optional this object.
- [x] 07. check if the interval parameter is greater than zero.
- [x] 08. return an array.
- [x] 09. return a new array with the same length as the original array divided by the interval rounded up.
- [x] 10. return a new mapped array and not change the original array.
- [x] 11. return a mapped array.
- [x] 12. skip items ( array[i] ) that are not set.


text:
import pytest

import libqtile.widget

@pytest.fixture
def widget():
    yield libqtile.widget.GenPollText

@pytest.mark.parametrize(
    "screenshot_manager",
    [
        {"func": lambda: "Function text."},
    ],
    indirect=True,
)
def ss_genpolltext(screenshot_manager):
    screenshot_manager.take_screenshot()


text:
So you want to contribute to Tidy? Fantastic! Here's a brief overview on how best to do so.

### Support request

If you are having trouble running console `Tidy`, or using the `Tidy Library` API in your own project, then maybe the best places to get help is either via a comment in [Tidy Issues](https://github.com/htacg/tidy-html5/issues), or on the [Tidy Mail Archive](https://lists.w3.org/Archives/Public/html-tidy/) list.

### What to change

Here's some examples of things you might want to make a pull request for:

 - New features
 - Bug fixes
 - Inefficient blocks of code
 - Memory problems

If you have a more deeply-rooted problem with how the program is built or some of the stylistic decisions made in the code, it is best to [create an issue](https://github.com/htacg/tidy-html5/issues/new) before putting the effort into a pull request. The same goes for new features - it might be best to check the project's direction, existing pull requests, and currently open and closed issues first.

Concerning the 'Tidy Code Style', checkout [CODESTYLE.md](CODESTYLE.md), but looking at existing code is the best way to get a good feel for the patterns we use.

### Using Git appropriately

 1. Fork the repository to your GitHub account.
 2. Optionally create a **topical branch** - a branch whose name is succint but explains what
you're doing, such as "feature/add-new-lines"...
 3. Make your changes, committing at logical breaks.
 4. Push your work to your personal account.
 5. [Create a pull request](https://help.github.com/articles/using-pull-requests).
 6. Watch for comments or acceptance.

Please note - if you want to change multiple things that don't depend on each
other, it is better to use `branches`, and make sure you check the master branch back out before making more changes - that way we can take in each change seperate. Else github has a tendancy to combine your requests into one.

### Help Tidy Get Better

It goes without saying **all help is appreciated**. We need to work together to make Tidy! better...

; eof


text:
package adapters

import (
	_ "github.com/segmentio/objconv/adapters/net"
	_ "github.com/segmentio/objconv/adapters/net/mail"
	_ "github.com/segmentio/objconv/adapters/net/url"
)


text:
	<title>Willie Walsh's panel show appearances</title>

	<link rel="stylesheet" media="all" href="../style.css" type="text/css"/>

Willie Walsh's panel show appearances

Willie Walsh has appeared in 2 episodes between 2009-2012. Note that these appearances may be for more than one person if multiple people have the same name.

2009

2010

2011

2012

2012-10-04 / Question Time

2009-01-15 / Question Time


text:
package shape;

import static util.Print.print;

/**
 * Created by miraclewong on 2016/1/15.
 */
public class Circle extends Shape {
    @Override
    public void draw() {
        print("Circle.draw()");
    }

    @Override
    public void erase() {
        print("Circle.erase()");
    }
}


text:
packRicochet.bat
packClientHelper.bat


text:
bluemix-where
==================
Overview
--------
The code here is for an [IBM Bluemix](https://www.bluemix.net)-powered demo called the [*Where?*](https://where.mybluemix.net/) app. It helps to answer the "where" questions of life like *where am I?*, *where can I go?*, and *where have others been?* It is composed of two parts:

* [Node.js](http://nodejs.org/) backend for deployment to Bluemix which:
	* Provides a REST API that:
		* allows client apps to register a user's geolocation with the server (stored in a [Cloudant NoSQL DB](https://cloudant.com/))
		* retrieves the postal address associated with the location (using [Pitney Bowes](http://www.pitneybowes.com) [Reverse Geocoding](https://ace.ng.bluemix.net/#/store/cloudOEPaneId=store&serviceOfferingGuid=76273f6f-6e7b-4028-b77d-53553771e208&fromCatalog=true))
		* allows a user to retrieve a "travel boundary" from that location (using Pitney Bowes [Travel Boundary](https://ace.ng.bluemix.net/#/store/cloudOEPaneId=store&serviceOfferingGuid=a38d0eb4-d4a8-4812-8be2-239680457777))
		* provides worldwide statistics for the most commonly "visited" cities (using the map-reduce capabilities of Cloudant).
	* Leverages third-party Node modules including:
		* [Express](http://expressjs.com/)
		* [Cloudant](https://github.com/cloudant/nodejs-cloudant)
		* [CFEnv](https://github.com/cloudfoundry-community/node-cfenv#readme)
		* [Restler](https://github.com/danwrong/restler)
	* Serves static resources (e.g., JavaScript, HTML, and CSS) in support of the web client
* Web front-end written as a since-page app and using the following third-party frameworks or components:
	* [Bootstrap](http://getbootstrap.com/)
	* [AngularJS](https://angularjs.org/)
	* [UI Bootstrap](http://angular-ui.github.io/bootstrap/)
	* [Leaflet.js](http://leafletjs.com/) and [Angular Directive for Leaflet.js](https://github.com/tombatossals/angular-leaflet-directive)
	* [Spin.js](http://fgnass.github.io/spin.js/) and [Angular Directive for Spin.js](https://github.com/urish/angular-spinner)

Client for Pebble Smartwatch
----------------------------

A client for the Pebble Smartwatch is available in the separate [bluemix-where-pebble](https://github.com/aerwin/bluemix-where-pebble) repository. That code was written in JavaScript leveraging [Pebble.js](http://pebble.github.io/pebblejs/) and using the [CloudPebble IDE](https://cloudpebble.net/).

Tutorial
===================
A tutorial for using the code in this repository is available on IBM developerWorks:

* [*Build a Where? app for web and Pebble users*](http://www.ibm.com/developerworks/library/mo-pebble-where-app/index.html)

License
===================
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


text:
window.jQuery = window.$ = require('jquery');
require('velocity-animate');
require('velocity-animate/velocity.ui');


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

<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template visitor_ptr_t</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../variant/reference.html#header.boost.variant.visitor_ptr_hpp" title="Header <boost/variant/visitor_ptr.hpp>">
<link rel="prev" href="static_visitor.html" title="Class template static_visitor">
<link rel="next" href="visitor_ptr.html" title="Function template visitor_ptr">

Home
Libraries
People
FAQ
More

Class template visitor_ptr_t

boost::visitor_ptr_t — Adapts a function pointer for use as a static visitor.

Synopsis

// In header: <boost/variant/visitor_ptr.hpp>

template<typename T, typename R>
class visitor_ptr_t : public static_visitor<R> {
public:
  // construct/copy/destruct
  explicit visitor_ptr_t(R (*)(T));

  // static visitor interfaces
  R operator()(unspecified-forwarding-type);
  template<typename U> void operator()(const U&);
};

Description

Adapts the function given at construction for use as a
        static visitor
        of type T with result type R.

visitor_ptr_t
        public
       construct/copy/destruct

explicit visitor_ptr_t(R (*)(T));

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Effects:

Constructs the visitor with the given function.

visitor_ptr_t static visitor interfaces

R operator()(unspecified-forwarding-type operand);
template<typename U> void operator()(const U&);

<colgroup>
<col align="left" valign="top">
<col>
</colgroup>

Effects:

If passed a value or reference of type
              T, it invokes the function given at
              construction, appropriately forwarding
              operand.

Returns:

Returns the result of the function invocation.

Throws:

The overload taking a value or reference of type
              T throws if the invoked function throws.
              The overload taking all other values always
              throws bad_visit.

Copyright © 2002, 2003 Eric Friedman, Itay Maman
Distributed under the Boost Software License, Version 1.0.
    (See accompanying file LICENSE_1_0.txt or copy at
    http://www.boost.org/LICENSE_1_0.txt)


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2005-2014 The Kuali Foundation

 Licensed under the Educational Community License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.osedu.org/licenses/ECL-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd">
    <bean id="AwardBudgetPersonnelDetailsExt" parent="AwardBudgetPersonnelDetailsExt-parentBean" />
    <bean id="AwardBudgetPersonnelDetailsExt-parentBean" abstract="true" parent="BusinessObjectEntry">
        <property name="businessObjectClass" value="org.kuali.kra.award.budget.AwardBudgetPersonnelDetailsExt" />
        <property name="objectLabel" value="Award Budget Extension" />
        <property name="inquiryDefinition" >
            <ref bean="AwardBudgetPersonnelDetailsExt-inquiryDefinition" />
        </property>
        <property name="lookupDefinition" >
            <ref bean="AwardBudgetPersonnelDetailsExt-lookupDefinition" />
        </property>
        <property name="titleAttribute" value="budgetPersonnelLineItemId" />
        <property name="attributes" >
            <list>
                <ref bean="AwardBudgetPersonnelDetailsExt-budgetPersonnelLineItemId" />
                <ref bean="AwardBudgetPersonnelDetailsExt-obligatedAmount" />
                <ref bean="AwardBudgetPersonnelDetailsExt-versionNumber" />
                <ref bean="AwardBudgetPersonnelDetailsExt-percentCharged" />
                <ref bean="AwardBudgetPersonnelDetailsExt-percentEffort" />
            </list>
        </property>
    </bean>

    <!-- Attribute Definitions -->
    <bean id="AwardBudgetPersonnelDetailsExt-budgetPersonnelLineItemId" parent="AwardBudgetPersonnelDetailsExt-budgetPersonnelLineItemId-parentBean" />
    <bean id="AwardBudgetPersonnelDetailsExt-budgetPersonnelLineItemId-parentBean" abstract="true" parent="AttributeDefinition" >
        <property name="name" value="budgetPersonnelLineItemId" />
        <property name="forceUppercase" value="false" />
        <property name="label" value="Budget Id" />
        <property name="shortLabel" value="Budget Id" />
        <property name="maxLength" value="22" />
        <property name="validationPattern" >
            <bean parent="NumericValidationPattern" />
        </property>
    <property name="validCharactersConstraint">
      <bean parent="NumericPatternConstraint"/>
    </property>
        <property name="control" >
      <bean parent="TextControlDefinition" p:size="10"/>
    </property>
    <property name="controlField">
      <bean p:size="10" parent="Uif-TextControl"/>
        </property>
        <property name="summary" value="Budget Id" />
        <property name="description" value="Budget Id" />
    </bean>

  <bean id="AwardBudgetPersonnelDetailsExt-obligatedAmount" parent="AwardBudgetPersonnelDetailsExt-obligatedAmount-parentBean"/>
  <bean id="AwardBudgetPersonnelDetailsExt-obligatedAmount-parentBean" abstract="true" parent="KraAttributeReferenceDummy-genericAmount">
    <property name="name" value="obligatedAmount"/>
    <property name="label" value="Obligated Amount"/>
    <property name="shortLabel" value="Obligated Amount"/>
    <property name="summary" value="Obligated amount from award amount info"/>
    <property name="description" value="Obligated amount from award amount info"/>
  </bean>

    <bean id="AwardBudgetPersonnelDetailsExt-versionNumber" parent="AwardBudgetPersonnelDetailsExt-versionNumber-parentBean" />
  <bean id="AwardBudgetPersonnelDetailsExt-versionNumber-parentBean" abstract="true" parent="AttributeReferenceDummy-versionNumber"/>
  <bean id="AwardBudgetPersonnelDetailsExt-percentCharged" parent="AwardBudgetPersonnelDetailsExt-percentCharged-parentBean"/>
  <bean id="AwardBudgetPersonnelDetailsExt-percentCharged-parentBean" abstract="true" parent="BudgetPersonnelDetails-percentCharged-parentBean">
  	<property name="maxLength" value="7" />
    <property name="validationPattern" >
      <bean parent="FixedPointValidationPattern" p:precision="6" p:scale="2" p:allowNegative="true"/>
    </property>
    <property name="validCharactersConstraint">
      <bean parent="FixedPointPatternConstraint">
        <property name="precision" value="6"/>
        <property name="scale" value="2"/>
        <property name="allowNegative" value="true"/>
      </bean>
    </property>
    <property name="control" >
      <bean parent="TextControlDefinition" p:size="7"/>
    </property>
    <property name="controlField">
      <bean p:size="7" parent="Uif-TextControl"/>
    </property>
  </bean>

  <bean id="AwardBudgetPersonnelDetailsExt-percentEffort" parent="AwardBudgetPersonnelDetailsExt-percentEffort-parentBean"/>
  <bean id="AwardBudgetPersonnelDetailsExt-percentEffort-parentBean" abstract="true" parent="BudgetPersonnelDetails-percentEffort-parentBean">
  	<property name="maxLength" value="7" />
    <property name="validationPattern" >
      <bean parent="FixedPointValidationPattern" p:precision="6" p:scale="2" p:allowNegative="true"/>
    </property>
    <property name="validCharactersConstraint">
      <bean parent="FixedPointPatternConstraint">
        <property name="precision" value="6"/>
        <property name="scale" value="2"/>
        <property name="allowNegative" value="true"/>
      </bean>
    </property>
    <property name="control" >
      <bean parent="TextControlDefinition" p:size="7"/>
    </property>
    <property name="controlField">
      <bean p:size="7" parent="Uif-TextControl"/>
    </property>
  </bean>

    <!-- Business Object Inquiry Definition -->
    <bean id="AwardBudgetPersonnelDetailsExt-inquiryDefinition" parent="AwardBudgetPersonnelDetailsExt-inquiryDefinition-parentBean" />
  <bean id="AwardBudgetPersonnelDetailsExt-InquiryView" parent="AwardBudgetPersonnelDetailsExt-InquiryView-parentBean"/>
    <bean id="AwardBudgetPersonnelDetailsExt-inquiryDefinition-parentBean" abstract="true" parent="InquiryDefinition">
        <property name="title" value="Budget Personnel Line Item Id" />
        <property name="inquirySections" >
            <list>
                <bean parent="InquirySectionDefinition">
                    <property name="title" value="Budget Personnel Line Item Id" />
                    <property name="numberOfColumns" value="1" />
                    <property name="inquiryFields" >
                        <list>
              <bean parent="FieldDefinition" p:attributeName="budgetPersonnelLineItemId" p:forceInquiry="true"/>
              <bean parent="FieldDefinition" p:attributeName="obligatedAmount"/>
            </list>
          </property>
        </bean>
      </list>
    </property>
  </bean>

  <bean id="AwardBudgetPersonnelDetailsExt-InquiryView-parentBean" abstract="true" parent="Uif-InquiryView">
    <property name="headerText" value="Budget Personnel Line Item Id"/>
    <property name="dataObjectClassName" value="org.kuali.kra.award.budget.AwardBudgetPersonnelDetailsExt"/>
    <property name="items">
      <list>
        <bean parent="Uif-Disclosure-GridSection">
          <property name="headerText" value="Budget Personnel Line Item Id"/>
          <property name="layoutManager.numberOfColumns" value="2"/>
          <property name="items">
            <list>
              <bean p:propertyName="budgetPersonnelLineItemId" parent="Uif-DataField"/>
              <bean p:propertyName="obligatedAmount" parent="Uif-DataField"/>
                        </list>
                    </property>
                </bean>
            </list>
        </property>
    </bean>

    <!-- Business Object Lookup Definition -->
    <bean id="AwardBudgetPersonnelDetailsExt-lookupDefinition" parent="AwardBudgetPersonnelDetailsExt-lookupDefinition-parentBean" />
  <bean id="AwardBudgetPersonnelDetailsExt-LookupView" parent="AwardBudgetPersonnelDetailsExt-LookupView-parentBean"/>
    <bean id="AwardBudgetPersonnelDetailsExt-lookupDefinition-parentBean" abstract="true" parent="LookupDefinition">
        <property name="title" value="Award Budget Personnel Line Item Ext Lookup" /><property name="defaultSort" >
      <bean parent="SortDefinition"/>
        </property>
        <property name="lookupFields" >
            <list>
        <bean parent="FieldDefinition" p:attributeName="budgetPersonnelLineItemId" p:forceInquiry="true"/>
        <bean parent="FieldDefinition" p:attributeName="obligatedAmount"/>
            </list>
        </property>
        <property name="resultFields" >
            <list>
        <bean parent="FieldDefinition" p:attributeName="budgetPersonnelLineItemId" p:forceInquiry="true"/>
        <bean parent="FieldDefinition" p:attributeName="obligatedAmount"/>
      </list>
    </property>
  </bean>

  <bean id="AwardBudgetPersonnelDetailsExt-LookupView-parentBean" abstract="true" parent="Uif-LookupView">
    <property name="dataObjectClassName" value="org.kuali.kra.award.budget.AwardBudgetPersonnelDetailsExt"/>
    <property name="headerText" value="Award Budget Personnel Line Item Ext Lookup"/>
    <property name="criteriaFields">
      <list>
        <bean p:propertyName="budgetPersonnelLineItemId" parent="Uif-LookupCriteriaInputField"/>
        <bean p:propertyName="obligatedAmount" parent="Uif-LookupCriteriaInputField"/>
      </list>
    </property>
    <property name="resultFields">
      <list>
        <bean p:propertyName="budgetPersonnelLineItemId" parent="Uif-DataField"/>
        <bean p:propertyName="obligatedAmount" parent="Uif-DataField"/>
      </list>
    </property>
  </bean>

</beans>


text:
import * as React from 'react';
import ButtonBase from '../ButtonBase/ButtonBase';
import { TabIndicatorProps } from './TabIndicator';
import { OverridableComponent, SimplifiedPropsOf } from '../OverridableComponent';

declare const Tabs: OverridableComponent<{
  props: {
    action?: (actions: TabsActions) => void;
    centered?: boolean;
    children?: React.ReactNode;
    indicatorColor?: 'secondary' | 'primary' | string;
    onChange?: (event: React.ChangeEvent<{}>, value: any) => void;
    ScrollButtonComponent?: React.ElementType;
    scrollButtons?: 'auto' | 'desktop' | 'on' | 'off';
    TabIndicatorProps?: Partial<TabIndicatorProps>;
    textColor?: 'secondary' | 'primary' | 'inherit' | string;
    value: any;
    variant?: 'standard' | 'scrollable' | 'fullWidth';
    width?: string;
  };
  defaultComponent: typeof ButtonBase;
  classKey: TabsClassKey;
}>;

export type TabsClassKey =
  | 'root'
  | 'flexContainer'
  | 'scroller'
  | 'fixed'
  | 'scrollable'
  | 'centered'
  | 'scrollButtons'
  | 'scrollButtonsDesktop'
  | 'indicator';

export interface TabsActions {
  updateIndicator(): void;
}

export type TabsProps = SimplifiedPropsOf<typeof Tabs>;

export default Tabs;


text:
package ErlSvc::Ctl::Command::mnesia::dir;
use base qw(ErlSvc::Ctl::Command::mnesia);

=head1 NAME

ErlSvc::Ctl::Command::mnesia::dir - Print the directory containing Mnesia data

=cut

use strict;
use warnings;
use utf8;

use ErlSvc::Ctl::Exceptions qw(:all);
use ErlSvc::Ctl::Mnesia;

sub desc () {
    return <<'EOF';
This command prints the directory used by Mnesia to store its data.

While using this command on a running and/or remote node is possible,
options modifying the release or the Mnesia directory have no effects.
EOF
}

sub run {
    my ($self, $opts, @args) = @_;

    my $mnesia = ErlSvc::Ctl::Mnesia->new($self);

    my %params = ();

    my $directory = $self->mnesia_dir;
    if ($directory) {
        $params{'directory'} = $directory;
    } else {
        $params{'release'} = $self->opts('release');
    }

    my $ret = $mnesia->directory(%params);
    unless (defined $ret) {
        command_run_failure();
    }

    return $ret ? "$ret\n" : "(unknown)\n";
}

1;


text:
In the first project, you'll learn to create and utilize your own blockchain identity.

You'll establish your own profile on the blockchain, and interact with a webservice using public and private keys with your own personal bitcoin wallet.

# Project 2: Blockchain Data
In Project 2, you'll create your own private blockchain. This will help you understand how the blockchain stores data, and what makes it a secure way to manage transactions across so many industries.

# Project 3: Web Services
Project 3 is all about connecting this blockchain to a web service that users can interact with. You'll build an API web service using NodeJS that allows you to post new blocks, then retrieve and validate existing blocks on your private blockchain.

At this point in the program, you'll have the skills you need to start crafting your own public service on the blockchain. The remaining projects in the 2nd half of this program are meant to help support you as you do exactly that.

# Project 4: Identity and Notary Service
In project 4, you'll create an identity and notary service. This service will use the blockchain to securely notarize digital documents without the need for any 3rd party intermediary. You'll learn to manage user profiles, service and store digital documents, and will begin exploring the different blockchain service layers.

# Project 5: Identity and Smart Contracts
In project 5, you'll start building smart contracts using ethereum. Ethereum is currently the world's largest platform for building decentralized applications. Here you'll jump right in and learn solidity - ethereum's programming language - and learn the relationship between ethereum, bitcoin, and the blockchain.

# Project 6: Architecture
In project 6, you'll dive deeper into the lower level components of your notarization web service. This will help you understand some of the lower level details of working with the blockchain - including when to use one, the value it adds to a service, and how to select the right platform for your future decentralized applications.

# Project 7: Supply Chain
In project 7, you'll continue adding functionality to your notarization service to solve the issue of supply chain management.

This allows your apps users to track product owners from the time it is originally made, up until it reaches the shelves for potential customers.

This was completely unheard of prior to the blockchain, and is at the core of what makes developing decentralized applications so special.

# Project 8: Capstone
The capstone project is the culmination of this Nanodegree program.

It gives you an opportunity to demonstrate everything you've learned. It uses aspects from each of the seven preceding projects and challenges you to build a brand new, unique service that uses blockchain technologies.

In this capstone project, you'll build a web service that solves the supply chain issue in the farming industry.

This decentralized application will allow users to track and manage ownership of resources from the time food is grown, until the time it ends up on the store shelf. This application has the potential to revolutionize the industry making food cheaper and more readily available to people around the world.


text:
var iframe = document.createElement('iframe');
    iframe.id = 'clear-code-frame';
    iframe.src = chrome.extension.getURL("features/iframe/content/index.html");
    iframe.scrolling = "no";
    iframe.style.display = 'none';

document.body.appendChild(iframe);

chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {

  if (request.frameDisplay) {

    iframe.style.display = request.frameDisplay;
    sendResponse({ response: "success" });
  }

  if (request.openSelection) {

    chrome.runtime.sendMessage({ tabMessage: { openCode: JSON.stringify(window.getSelection().toString()) }});
    iframe.style.display = 'block';
  }
});


text:
.. spelling::

  Terminal
  terminal

Terminal
--------

 - :ref:`pkg.ncursesw` - text UI library
 - :ref:`pkg.rang` - A Minimal, Header only Modern c++ library for terminal goodies
 - :ref:`pkg.readline` - command-line editor


text:
import ast
import json
import os, os.path
import sys
from modulefinder import ModuleFinder
from importvisitor import ImportVisitor

def invertBadmodules(finder):
	missing = {}
	for mod, where in finder.badmodules.iteritems():
		for name in where.iterkeys():
			if name not in missing:
				missing[name] = []
			missing[name].append(mod)
	return missing

def getMissingImports(allMissingImports, module, filename):
	with file(filename, 'r') as f:
		code = f.read()

#	print '---------', filename, '---------'
#	print code

	tree = ast.parse(code, filename)
	modules = allMissingImports.get(module, [])
	# Ignore missing submodules -- these get picked up by pylint
	modules = [m for m in modules if m.find('.') == -1]

#	print 'Missing imports:', modules
	iv = ImportVisitor(modules)
	iv.visit(tree)
	info = iv.getImportsInfo()

	return info

def getLocalPath(mod):
	modPath = mod.__file__
	if modPath is None or not modPath.startswith(basePath):
		return False
	path = modPath[len(basePath)+1:]
#	print name, '   \t', path
	return path

# Bodge the path setup for finding the imports in the file in question
# Pop the apparent path to this file off the front and append the cwd
first = sys.path.pop(0)
sys.path.insert(0, os.getcwd())

finder = ModuleFinder()
mainName = sys.argv[1]
absPath = os.path.abspath(mainName)
basePath = os.path.dirname(absPath)
missingIncludes = {}

try:
	finder.run_script(mainName)
except Exception as ex:
	"Probably an error in the user code"
	if not ex.filename.startswith(basePath):
		raise
	fileName = ex.filename[len(basePath) + 1:]
	missingIncludes['.error'] = { 'file': fileName,
	                              'line': ex.lineno,
	                              'msg': ex.msg
	                            }

includeOriginal = True
allMissingImports = invertBadmodules(finder)

#print 'All missing imports nice:\n', json.dumps(allMissingImports).replace(']', ']\n')

if includeOriginal:
	missingIncludes[mainName] = getMissingImports(allMissingImports, '__main__', mainName)

#print 'All imports:'
for name, mod in finder.modules.iteritems():
	filename = getLocalPath(mod)
	if filename is not False:
		missingIncludes[filename] = getMissingImports(allMissingImports, name, filename)

print json.dumps(missingIncludes).replace('}', '}\n')

#finder.report()


text:
CREATE TABLE assembly (
  id               INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
  craft_num        CHAR(50),
  material_num     CHAR(50),

  step_num         INT,
  name             CHAR(20),
  content          CHAR(50),
  self_check       CHAR(30),
  operate          CHAR(20),
  check_record     CHAR(30),
  check_conclusion CHAR(30),
  checker          CHAR(20),
  witness          CHAR(20),
  craft_machine    CHAR(25),
  version          INT,
  list             INT
)
  ENGINE = InnoDB;


text:
<?php

//DÉMARRE UNE NOUVELLE SESSION OU REPREND UNE SESSION EXISTANTE
session_start();
if(isset($_SESSION['Log']))
{
				//echo "
$_GET[class]
$_GET[password]";
				$nvisits = 1;
				if (isset($_COOKIE["nvisits"]))
				{

				$nvisits = (int)$_COOKIE["nvisits"];
				}
				//DÉFINITION D' UN COOKIE QUI SERA ENVOYÉ AVEC LE RESTE DES EN-TÊTES...
							//3600 est 60s*60heure mais moins d'une heure
				setcookie("nvisits", $nvisits + 1, time() -3600);
				echo "
UTILISATEUR: $_SESSION[Log]
";
				echo"
Parametres  Deconnexion
";
				//echo"
Deconnexion
";
				//echo "Nombre de visites sur cette page  $nvisits."; //JUSTE UN TEST

}
else
{
//SECURISATION DES SESSIONS ET COMPTES DONC REDIRECTION VERS 'login.php'
echo "
LES INFORMATIONS DE CONNEXION SONT REQUISES POUR SE CONNECTER A CETTE PAGE
";
header("Location: login.php");

}
?>


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Linq;
using AH.ModuleController.ATMSSR;
using AH.DUtility;

namespace AH.ModuleController.UI.ATMS.Forms
{
    public partial class frmWarehouseType : AH.Shared.UI.frmSmartFormStandard
    {
        ATMSSR.ATMSWSClient atms = new ATMSSR.ATMSWSClient();
        public frmWarehouseType()
        {
            InitializeComponent();
        }

        private Warehouse Populatewarehouse()
        {
            Warehouse objWh = new Warehouse();
            if (txtTypeID.Text != "")
            {
                objWh.TypeID = txtTypeID.Text;
            }
            else
            {
                objWh.TypeID = "";
            }
            objWh.TypeName  = txtTypeName.Text;
            objWh.Remarks = txtRemarks.Text;
            //objWh.Active = Convert.ToChar(cboStatus.Text.Substring(0,1));

            if (cboStatus.Text == "Active")
            {
                objWh.Active='1';
            }
            else
            {
                objWh.Active = '0';
            }
            EntryParameter ep = new EntryParameter();
            ep.EntryBy = Utility.UserId;
            ep.CompanyID = Utility.CompanyID;
            ep.LocationID = Utility.LocationID;
            ep.MachineID = Utility.MachineID;
            objWh.EntryParameter = ep;
            return objWh;
        }
        private bool validationfields()
        {
            if (txtTypeName.Text.ToString() == "")
            {
                MessageBox.Show("type Name cannot be Empty");
                txtTypeName.Focus();
                return true;
            }
            if (cboStatus.Text.ToString() == "")
            {
                MessageBox.Show("Status cannot be Empty");
                cboStatus.Focus();
                return true;
            }
            return false;
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (validationfields() != false)
            {
                return;
            }
            try
            {
                var strResponse = MessageBox.Show("Do You want to Save?", "Save Button", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (strResponse == DialogResult.Yes)
                {
                    Warehouse objWh = this.Populatewarehouse();
                    short i = atms.Savewarehousetype(objWh);
                    if (i == 1)
                    {
                        LoadListView();
                        txtTypeID.Text = "";
                        txtTypeName.Text = "";
                        txtTypeName.Focus();
                    }
                }
            }

            catch (System.ServiceModel.CommunicationException commp)
            {
                MessageBox.Show(Utility.CommunicationErrorMsg, Utility.MessageCaptionMsg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), Utility.MessageCaptionMsg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

        }
        private void FormatGrid()
        {
            lvwWarehouse.CheckBoxes = false;
            lvwWarehouse.Columns.Add("Type id", 200, HorizontalAlignment.Left);
            lvwWarehouse.Columns.Add("Type Name", 300, HorizontalAlignment.Left);
            lvwWarehouse.Columns.Add("Remarks", 300, HorizontalAlignment.Left);
            lvwWarehouse.Columns.Add("Status", 0, HorizontalAlignment.Left);

        }
        private void LoadListView()
        {
            lvwWarehouse.Items.Clear();
            List<Warehouse> objwh = atms.GetWarehousetype().ToList();
            if (objwh.Count > 0)
            {
                foreach (Warehouse wh in objwh)
                {
                    ListViewItem itm = new ListViewItem(wh.TypeID);
                    itm.SubItems.Add(wh.TypeName.ToString());
                    itm.SubItems.Add(wh.Remarks.ToString());
                    itm.SubItems.Add(wh.Active.ToString());
                    lvwWarehouse.Items.Add(itm);
                }
            }
        }
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            if (validationfields() != false)
            {
                return;
            }
            try
            {
                var strResponse = MessageBox.Show("Do You want to Update?", "Update Button", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (strResponse == DialogResult.Yes)
                {
                    Warehouse objWh = this.Populatewarehouse();
                    short i = atms.Updatewarehousetype(objWh);
                    if (i == 1)
                    {
                        LoadListView();
                        btnSave.Enabled = true;
                        btnEdit.Enabled = false;
                        txtTypeID.Text = "";
                        txtTypeName.Text = "";
                        txtTypeName.Focus();
                    }
                }
            }

            catch (System.ServiceModel.CommunicationException commp)
            {
                MessageBox.Show(Utility.CommunicationErrorMsg, Utility.MessageCaptionMsg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), Utility.MessageCaptionMsg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

        }

        private void frmWarehouse_Load(object sender, System.EventArgs e)
        {
            //txtTypeName.Focus();
            txtTypeName.Select();
            FormatGrid();
            LoadListView();
        }
        private void lvwWarehouse_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (lvwWarehouse.SelectedItems.Count > 0)
            {
                btnEdit.Enabled = true;
                btnSave.Enabled = false;
                ListViewItem itm = lvwWarehouse.SelectedItems[0];
                txtTypeID.Text = itm.SubItems[0].Text;
                txtTypeName.Text = itm.SubItems[1].Text;
                txtRemarks.Text = itm.SubItems[2].Text;
                if (itm.SubItems[3].Text == "1")
                {
                    cboStatus.Text = "Active";
                }
                else
                {
                    cboStatus.Text = "Inactive";
                }
                txtTypeName.Focus();
            }
        }

        private void txtTypeName_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar==(char)Keys.Return)
            {
                txtRemarks.Focus();
            }
        }

        private void txtRemarks_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
            {
                cboStatus.Focus();
            }
        }

        private void cboStatus_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
            {
                if (btnSave.Enabled)
                {
                    btnSave.Focus();
                }
                else
                {
                    btnEdit.Focus();
                }
            }
        }

        private void btnNew_Click(object sender, System.EventArgs e)
        {
            btnSave.Enabled = true;
            btnEdit.Enabled = false;
            txtTypeName.Focus();
        }
    }
}


text:
@interface ViewController : UIViewController

@property (weak, nonatomic) IBOutlet UILabel *coolLabel;
@property (weak, nonatomic) IBOutlet UILabel *noBgLabel;
@property (weak, nonatomic) IBOutlet UIButton *button;
@property (weak, nonatomic) IBOutlet UIButton *button2;
@property (weak, nonatomic) IBOutlet UITextField* field1;
@property (weak, nonatomic) IBOutlet UITextField* field2;
@property (weak, nonatomic) IBOutlet UITextField* field3;
@property (weak, nonatomic) IBOutlet UITextField* field4;
@property (weak, nonatomic) IBOutlet UITextField* field5;
@end


text:
@interface TGNewestVideoVC ()

@end

@implementation TGNewestVideoVC

-(NSString *) requesturl :(NSString *) nextpage{
    //http://s.budejie.com/topic/list/zuixin/41/bs0315-iphone-4.5.6/0-20.json
    return [NSString stringWithFormat:@"http://s.budejie.com/topic/list/zuixin/41/bs0315-iphone-4.5.6/%@-20.json",nextpage];
}

@end


text:
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;

namespace SJP.Schematic.Graphviz;

/// <summary>
/// A renderer that renders a DOT file into an SVG image.
/// </summary>
/// <seealso cref="IDotSvgRenderer" />
public class DotSvgRenderer : IDotSvgRenderer
{
    /// <summary>
    /// Initializes a new instance of the <see cref="DotSvgRenderer"/> class.
    /// </summary>
    /// <param name="dotExecutablePath">The dot executable path.</param>
    /// <exception cref="ArgumentNullException"><paramref name="dotExecutablePath"/> is <c>null</c>, empty or whitespace.</exception>
    public DotSvgRenderer(string dotExecutablePath)
    {
        if (string.IsNullOrWhiteSpace(dotExecutablePath))
            throw new ArgumentNullException(nameof(dotExecutablePath));

        _dotPath = dotExecutablePath;
    }

    /// <summary>
    /// Renders a DOT file as an SVG image synchronously.
    /// </summary>
    /// <param name="dot">A dot graph in string form.</param>
    /// <returns>A rendered SVG image as a string.</returns>
    /// <exception cref="ArgumentNullException"><paramref name="dot"/> is <c>null</c>, empty or whitespace.</exception>
    /// <exception cref="GraphvizException">Thrown when the Graphviz process exited unsuccessfully.</exception>
    public string RenderToSvg(string dot)
    {
        if (string.IsNullOrWhiteSpace(dot))
            throw new ArgumentNullException(nameof(dot));

        var tmpInputFilePath = Path.GetRandomFileName();
        var tmpOutputFilePath = Path.GetRandomFileName();

        File.Delete(tmpInputFilePath);
        File.Delete(tmpOutputFilePath);

        try
        {
            File.WriteAllText(tmpInputFilePath, dot);

            var startInfo = new ProcessStartInfo
            {
                FileName = _dotPath,
                Arguments = $"-Tsvg \"{tmpInputFilePath}\" -o \"{tmpOutputFilePath}\"",
                RedirectStandardError = true
            };
            using (var process = new Process { StartInfo = startInfo })
            {
                process.Start();
                process.WaitForExit();

                if (process.ExitCode != ExitSuccess)
                {
                    var stdErr = process.StandardError.ReadToEnd();
                    throw new GraphvizException(process.ExitCode, stdErr);
                }
            }

            return File.ReadAllText(tmpOutputFilePath);
        }
        finally
        {
            if (File.Exists(tmpInputFilePath))
                File.Delete(tmpInputFilePath);
            if (File.Exists(tmpOutputFilePath))
                File.Delete(tmpOutputFilePath);
        }
    }

    /// <summary>
    /// Renders a DOT file as an SVG image asynchronously.
    /// </summary>
    /// <param name="dot">A dot graph in string form.</param>
    /// <param name="cancellationToken">The cancellation token.</param>
    /// <returns>A rendered SVG image as a string.</returns>
    /// <exception cref="ArgumentNullException"><paramref name="dot"/> is <c>null</c>, empty or whitespace.</exception>
    /// <exception cref="GraphvizException">Thrown when the Graphviz process exited unsuccessfully.</exception>
    public Task<string> RenderToSvgAsync(string dot, CancellationToken cancellationToken = default)
    {
        if (string.IsNullOrWhiteSpace(dot))
            throw new ArgumentNullException(nameof(dot));

        return RenderToSvgAsyncCore(dot, cancellationToken);
    }

    private async Task<string> RenderToSvgAsyncCore(string dot, CancellationToken cancellationToken)
    {
        var tmpInputFilePath = Path.GetRandomFileName();
        var tmpOutputFilePath = Path.GetRandomFileName();

        File.Delete(tmpInputFilePath);
        File.Delete(tmpOutputFilePath);

        try
        {
            await File.WriteAllTextAsync(tmpInputFilePath, dot, cancellationToken).ConfigureAwait(false);

            var startInfo = new ProcessStartInfo
            {
                FileName = _dotPath,
                Arguments = $"-Tsvg \"{tmpInputFilePath}\" -o \"{tmpOutputFilePath}\"",
                RedirectStandardError = true
            };
            using (var process = new Process { StartInfo = startInfo })
            {
                process.Start();
                await process.WaitForExitAsync(cancellationToken).ConfigureAwait(false);

                if (process.ExitCode != ExitSuccess)
                {
                    var stdErr = await process.StandardError.ReadToEndAsync().ConfigureAwait(false);
                    throw new GraphvizException(process.ExitCode, stdErr);
                }
            }

            return await File.ReadAllTextAsync(tmpOutputFilePath, cancellationToken).ConfigureAwait(false);
        }
        finally
        {
            if (File.Exists(tmpInputFilePath))
                File.Delete(tmpInputFilePath);
            if (File.Exists(tmpOutputFilePath))
                File.Delete(tmpOutputFilePath);
        }
    }

    private readonly string _dotPath;

    private const int ExitSuccess = 0;
}


text: <input id="userGuess" type="text" placeholder="Guess!">


text:
package org.fastmongo.odm.benchmark.morphia.model;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Reference;

import java.util.Date;
import java.util.List;

/**
 * @author Alexander Gulko
 */
@Entity("Page")
public class Page {
    @Id
    private Long id;
    private String url;
    private String content;
    @Reference(lazy = true)
    private User author;
    private List<Comment> comments;
    private Date createdAt;

    public Page() {
    }

    public Page(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

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

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public User getAuthor() {
        return author;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
}


text:
import Vue from 'vue'
import ajax from 'vue-h-ajax';
import App from '@/App'
import store from '@/store'
import router from '@/router'

import '@/lib/material.min.js'

Vue.config.productionTip = false

Vue.use(ajax)
Vue.http.withCredentials = false;

Vue.directive('mdl', {
    bind (el) {
        componentHandler.upgradeElements(el)
    }
})

new Vue({
    el: '#app',
    store,
    router,
    template: '<App/>',
    components: { App }
})


text:
namespace Nancy.Validation.DataAnnotations
{
    using System.Collections.Generic;
    using System.Linq;
    using System.ComponentModel.DataAnnotations;

    /// <summary>
    /// An adapter for an <see cref="IValidatableObject"/>.
    /// </summary>
    public class DataAnnotationsValidatableObjectValidatorAdapter : IDataAnnotationsValidatorAdapter
    {
        /// <summary>
        /// Gets the rules.
        /// </summary>
        /// <returns></returns>
        public IEnumerable<ModelValidationRule> GetRules()
        {
            yield return new ModelValidationRule("Self", s => string.Format("{0} is invalid.", s));
        }

        /// <summary>
        /// Validates the specified instance.
        /// </summary>
        /// <param name="instance">The instance.</param>
        /// <returns></returns>
        public IEnumerable<ModelValidationError> Validate(object instance)
        {
            var context =
                new ValidationContext(instance, null, null);

            var result =
                ((IValidatableObject)instance).Validate(context);

            return result.Select(r => new ModelValidationError(r.MemberNames, s => r.ErrorMessage));
        }
    }
}


text:
module Network.AWS.AWSConnection (
   -- * Constants
   defaultAmazonS3Host, defaultAmazonS3Port,
   -- * Function Types
   amazonS3Connection, amazonS3ConnectionFromEnv,
   -- * Data Types
   AWSConnection(..)
   ) where

import System.Environment

-- | An Amazon Web Services connection.  Everything needed to connect
--   and authenticate requests.
data AWSConnection =
    AWSConnection { awsHost :: String, -- ^ Service provider hostname
                    awsPort :: Int,    -- ^ Service provider port number
                    awsAccessKey :: String, -- ^ Access Key ID
                    awsSecretKey :: String  -- ^ Secret Access Key
                  } deriving (Show)

-- | Hostname used for connecting to Amazon's production S3 service (@s3.amazonaws.com@).
defaultAmazonS3Host :: String
defaultAmazonS3Host = "s3.amazonaws.com"

-- | Port number used for connecting to Amazon's production S3 service (@80@).
defaultAmazonS3Port :: Int
defaultAmazonS3Port = 80

-- | Create an AWSConnection to Amazon from credentials.  Uses the
--   production service.
amazonS3Connection :: String -- ^ Access Key ID
                   -> String -- ^ Secret Access Key
                   -> AWSConnection -- ^ Connection to Amazon S3
amazonS3Connection = AWSConnection defaultAmazonS3Host defaultAmazonS3Port

-- | Retrieve Access and Secret keys from environment variables
--   AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, respectively.
--   Either variable being undefined or empty will result in
--   'Nothing'.
amazonS3ConnectionFromEnv :: IO (Maybe AWSConnection)
amazonS3ConnectionFromEnv =
    do ak <- getEnvKey "AWS_ACCESS_KEY_ID"
       sk0 <- getEnvKey "AWS_ACCESS_KEY_SECRET"
       sk1 <- getEnvKey "AWS_SECRET_ACCESS_KEY"
       return $ case (ak, sk0, sk1) of
                  ("",  _,  _) -> Nothing
                  ( _, "", "") -> Nothing
                  ( _, "",  _) -> Just (amazonS3Connection ak sk1)
                  ( _,  _,  _) -> Just (amazonS3Connection ak sk0)
    where getEnvKey s = catch (getEnv s) (const $ return "")


text:
PROG=	dbtest
OBJS=	dbtest.o strerror.o

# Uncomment the STAT line get hash and btree statistical use info.  This
# also forces ld to load the btree debug functions for use by gdb, which
# is useful.  The db library has to be compiled with -DSTATISTICS as well.
INC=	-I${PORTDIR}/include -I${PORTDIR}
OORG=	-g
#STAT=	-DSTATISTICS
CFLAGS+=-D__DBINTERFACE_PRIVATE -DDEBUG ${STAT} ${OORG} ${INC}

dbtest: ${OBJS} ${PORTDIR}/libdb.a
	${CC} -o ${.TARGET} ${OBJS} ${PORTDIR}/libdb.a

strerror.o: ${PORTDIR}/clib/strerror.c
	${CC} -c ${PORTDIR}/clib/strerror.c

clean:
	rm -f dbtest.core gmon.out ${OBJS} ${PROG} t1 t2 t3

${OBJS}: Makefile


text:
<?php
use yii\helpers\Html;
$program=\common\models\program\ProgramRecord::findOne($program_id)->name;
?>

<?=$program;?>

        <?php
        foreach($models as $model)
        {
            $topics=\common\models\topic\TopicRecord::find()->where(['course_id'=>$model->id]);
            ?>

                        <?php
                        $link_course='
'.$model->name.'
';
                        echo Html::a($link_course,['/topic/index','course_id'=>$model->id,'university'=>$university,'faculty'=>$faculty,'program'=>$program]);
                        ?>

 05/10/2015 |

Topics <?=$topics->count();?>

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores illum impedit dolor possimus architecto labore.

        <?php
        }
        ?>


text:
var currentEnv = new RegExp('[\?&]env=([^&#]*)').exec(window.location.href);
currentEnv = currentEnv ?currentEnv[1] :'PRD';
currentEnv = currentEnv.toLowerCase();

var apiBaseUrl = "https://leedonline-api.usgbc.org/v1";

if(currentEnv == 'dev' || currentEnv == 'stg' || currentEnv == 'qas')
	apiBaseUrl = "https://leedonline-api-"+currentEnv+".usgbc.org/v1";
else
    window.location.replace("https://leed-pricing.usgbc.org/");

function print_country(country_id) {
	$("#country-icon").replaceWith("");

	$.getJSON(apiBaseUrl+'/Common/getCountriesAndStates.json', function (data) {
		var option_str = document.getElementById(country_id);
		option_str.innerHTML = "";
		option_str.length = 0;
		option_str.options[0] = new Option('--Select Country--', '');
		option_str.selectedIndex = 0;
		var countries = data.countries;
		var printCountries = Object.keys(countries);
		printCountries.forEach(function (key) {
			option_str.options[option_str.length] = new Option(countries[key], key);
		});
		$("#country-icon-dynamic").replaceWith("");
	});
}

$(document).ready(function () {
    var BDCIDC =  {
		rate: "Registration",
		designRate: "Design Review",
		constRate: "Construction Review"
	};

	var OM = {rate: "Registration" }

	$("#ratingSystem").change(function() {
		var select = $("#ratingSystem option:selected").val();

		switch(select) {
			case "BD+C" :
				setTypeInDropDown(BDCIDC);
				break;

			case "ID+C" :
				setTypeInDropDown(BDCIDC);
				break;

			case "O+M" :
				setTypeInDropDown(OM);
				break;

			default:
				$("#type").empty();
				$("#type").append("<option value=\"\">--Select Rate Type--</option>");
				break;
		}
	});

	$("#leedprice").submit(function () {
		var country = $("#country").val();
		var ratingSystem = $("#ratingSystem").val();
		var type = $('#type').val();
		var givenArea = $('#givenArea').val();
		var unitType = $('#unitType').val();

		//For safari and other browsers which does not support HTML5 validation
		var checkBrowser=safariFormValidation(this);

		if(checkBrowser === false){
			console.log(checkBrowser);
			return false;
		}

		console.log(checkBrowser);

        $("#submit-calculate").replaceWith("<button id=\"submit-dynamic\" class=\"btn btn-danger\" disabled> Calculating</button>");

		setDescrpition(givenArea, unitType, type, ratingSystem);

		$.getJSON(apiBaseUrl+'/Common/getPriceRelatedInfo.json?countryOrCurrency=' + country, function (infodata) {
			if(infodata.data.currency != undefined){
				var currency = infodata.data.currency;
				var curSymbol;

				if (currency == 'INR') {
					curSymbol = "₹";
				}
				else if (currency == 'CAD') {
					curSymbol = "$"
					currency = 'USD'; //Taking by default USD
				}
				else {
					curSymbol = "$";
				}

				callTogetVersionPricesInfo(infodata, curSymbol, currency, givenArea, unitType, type, ratingSystem);
			}
			else {
				$("#modalerror").modal({backdrop: "static"});
				$("#submit-dynamic").replaceWith("<button id=\"submit-calculate\" class=\"btn btn-primary\" type=\"submit\" name=\"submit\"> Calculate</button>");
			}
		});
	});

	$(".modal-close").click(function () {
		$('#tablebody').empty();
		$('#pArea').empty();
		$('#pRating').empty();
		$('#pType').empty();
	});
});

function setTypeInDropDown(rateType){
	$("#type").empty();
    $("#type").append("<option value=\"\">--Select Rate Type--</option>");

	Object.keys(rateType).forEach(function(key) {
		$("#type").append("<option value=\"" + key + "\">" + rateType[key] + "</option>")
	});
}

function callTogetVersionPricesInfo(infodata, curSymbol, currency, givenArea, unitType, type, ratingSystem) {
	var data = {
		'versionOrCurrency': currency,
		'ratingSystem': ratingSystem,
		'area': givenArea,
		'unitType': unitType,
		'calculate': type
	};

	$.getJSON(apiBaseUrl+'/LEEDPricing/getVersionPricesInfo.json', data, function (pricedata) {
		if (pricedata.payableInfo != undefined) {
			createTotalPriceTable(infodata, pricedata, curSymbol);
			createTaxTable(infodata, pricedata, curSymbol);
			createGrandTotal(infodata, pricedata, curSymbol);
			$("#modalpopup").modal({backdrop: "static"});
		}
		else {
			$("#modalerror").modal({backdrop: "static"});
		}
		$("#submit-dynamic").replaceWith("<button id=\"submit-calculate\" class=\"btn btn-primary\" type=\"submit\" name=\"submit\"> Calculate</button>");
	});
}

function createTotalPriceTable(infodata, pricedata, curSymbol) {

     var member = pricedata.payableInfo.member;
     var nonMember = pricedata.payableInfo.nonMember;
     var trow = document.createElement("tr");
     var tdrow = document.createElement("th");
     var textnode = document.createTextNode("Total");
     tdrow.appendChild(textnode);
     trow.appendChild(tdrow);
     tdrow = document.createElement("td");
     tdrow.setAttribute("class", "text-right");
     textnode = document.createTextNode(curSymbol + ' ' + member.total);
     tdrow.appendChild(textnode);
     trow.appendChild(tdrow);
     tdrow = document.createElement("td");
     tdrow.setAttribute("class", "text-right");
     textnode = document.createTextNode(curSymbol + ' ' + nonMember.total);
     tdrow.appendChild(textnode);
     trow.appendChild(tdrow);
     document.getElementById("tablebody").appendChild(trow);
 }

 function createTaxTable(infodata, pricedata, curSymbol) {

     var taxCodes = infodata.data.taxCodes;
     var member = pricedata.payableInfo.member;
     var nonMember = pricedata.payableInfo.nonMember;
     var memTaxObjSize = Object.keys(member.taxes.all.taxes).length;
     if (memTaxObjSize > 0 && memTaxObjSize != "undefined") {
         var taxrow = document.createElement("tr");
         var tdrow = document.createElement("th");
         var td2 = document.createElement("td");
         var td3 = document.createElement("td");
         tdrow.setAttribute("class", "text-center");
         var textnode = document.createTextNode("Taxes");
         tdrow.appendChild(textnode);
         taxrow.appendChild(tdrow);
         taxrow.appendChild(td2);
         taxrow.appendChild(td3);
         document.getElementById("tablebody").appendChild(taxrow);
         var taxes = Object.keys(member.taxes.all.taxes);
         taxes.forEach(function (key) {
             var taxrow = document.createElement("tr");
             var tdrow = document.createElement("td");
             tdrow.setAttribute("class", "text-center");
             var textnode = document.createTextNode(taxCodes[key]);
             tdrow.appendChild(textnode);
             taxrow.appendChild(tdrow);
             tdrow = document.createElement("td");
             tdrow.setAttribute("class", "text-right");
             textnode = document.createTextNode(curSymbol + ' ' + member.taxes.all.taxes[key]);
             tdrow.appendChild(textnode);
             taxrow.appendChild(tdrow);
             tdrow = document.createElement("td");
             tdrow.setAttribute("class", "text-right");
             textnode = document.createTextNode(curSymbol + ' ' + nonMember.taxes.all.taxes[key]);
             tdrow.appendChild(textnode);
             taxrow.appendChild(tdrow);
             document.getElementById("tablebody").appendChild(taxrow);
         });
     }
 }

 function createGrandTotal(infodata, pricedata, curSymbol) {

     var member = pricedata.payableInfo.member;
     var nonMember = pricedata.payableInfo.nonMember;
     var grandTotalrow = document.createElement("tr");
     var tdrow = document.createElement("th");
     var textnode = document.createTextNode("Grand Total");
     tdrow.appendChild(textnode);
     grandTotalrow.appendChild(tdrow);
     tdrow = document.createElement("th");
     tdrow.setAttribute("class", "text-right");
     textnode = document.createTextNode(curSymbol + ' ' + member.taxes.all.grandTotal);
     tdrow.appendChild(textnode);
     grandTotalrow.appendChild(tdrow);
     tdrow = document.createElement("th");
     tdrow.setAttribute("class", "text-right");
     textnode = document.createTextNode(curSymbol + ' ' + nonMember.taxes.all.grandTotal);
     tdrow.appendChild(textnode);
     grandTotalrow.appendChild(tdrow);
     document.getElementById("tablebody").appendChild(grandTotalrow);
 }

 function setDescrpition(givenArea, unitType, type, ratingSystem) {

     var typeMap = {
         rate: "Registration",
         designRate: "Design Review",
         constRate: "Construction Review"
     };
     var rSystem = {
         "BD+C": "Building Design and Construction (BD+C)",
         "ID+C": "Interior Design and Construction (ID+C)",
         "O+M": "Building Operations and Maintenance (O+M)"
     };
     var textnode = document.createTextNode(givenArea + " "+((unitType == 'IP') ?'sq ft' :'sq m'));
     document.getElementById("pArea").appendChild(textnode);
     textnode = document.createTextNode(rSystem[ratingSystem]);
     document.getElementById("pRating").appendChild(textnode);
     textnode = document.createTextNode(typeMap[type]);
     document.getElementById("pType").appendChild(textnode);
 }

 // Custom message validation Function

 function checkValidationInput(obj, param) {
     var setMessage = {
         "country": "Please select country in the list.",
         "ratingSystem": "Please select Rating System in the list.",
         "type": "Select Project Type.",
         "unitType": "Please select unit type.",
         "givenArea": "Please enter area."
     };
     switch (param) {
         case "country":
             obj.setCustomValidity(setMessage[param]);
             break;
         case "ratingSystem":
             obj.setCustomValidity(setMessage[param]);
             break;
         case "type":
             obj.setCustomValidity(setMessage[param]);
             break;
         case "givenArea":
             obj.setCustomValidity(setMessage[param]);
             break;
         case "unitType":
             obj.setCustomValidity(setMessage[param]);
             break;
         default:
             return;
             break;
     }
 }

 function verifyValidInput(obj, param) {

     try {
         switch (param) {
             case "country":
                 obj.setCustomValidity('');
                 break;
             case "ratingSystem":
                 obj.setCustomValidity('');
                 break;
             case "type":
                 obj.setCustomValidity('');
                 break;
             case "givenArea":
                 obj.setCustomValidity('');
                 break;
             case "unitType":
                 obj.setCustomValidity('');
                 break;
             default:
                 return;
                 break;

         }
     } catch (e) {
         console.log(e);
        }
 }

 //Validation for safari and other Non HTML5 form validation
 function safariFormValidation(obj){

     if (!obj.checkValidity()) {  //checkValidity not available in NonHTNL5
        var valid = true;

         $('.required').each(function() {
            if (this.value == '') {
              alert("Error, Data field is required.");
               valid = false;
               this.focus();
               return false; }
          });

         if(valid === false){
            return false;}
         else{ return true; }
      }
    else { return true;   }
 }

 function printData() {

     var headToPrint = document.getElementById("head4");
     var p1ToPrint = document.getElementById("pDesc1");
     var p2ToPrint = document.getElementById("pDesc2");
     var p3ToPrint = document.getElementById("pDesc3");
     var divToPrint = document.getElementById("datatable");
     var htmlToPrint = '' +
         '';
     htmlToPrint += divToPrint.outerHTML;
     newWin = window.open("");
     newWin.document.write(headToPrint.outerHTML);
     newWin.document.write(p1ToPrint.outerHTML);
     newWin.document.write(p2ToPrint.outerHTML);
     newWin.document.write(p3ToPrint.outerHTML);
     newWin.document.write(htmlToPrint);
     newWin.print();
     newWin.close();
 }

 function resetFormData() {
     $("#leedprice").trigger("reset");
 }


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
using IpAddressViaMailCSharp.Network;

namespace IpAddressViaMailCSharp
{
    class Program
    {
        static void Main(string[] args)
        {
            //Initial logging
            Logging.Initial();
            //Load from config file
            Config.Inital();
            //Start Monitor
            IpMonitor monitor=new IpMonitor();
            while(true)
            {
                Thread.Sleep(1024);
            }
        }
    }
}


text:
package burstcoin.address.generator.gui;

import akka.actor.ActorSystem;
import akka.actor.Props;
import burstcoin.address.generator.core.GenerateActor;
import burstcoin.address.generator.core.GeneratorConfig;
import burstcoin.address.generator.gui.result.ResultController;
import burstcoin.address.generator.gui.tabs.GeneratorConfigPresenter;
import burstcoin.address.generator.gui.tabs.GeneratorConfigView;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Node;
import javafx.stage.Stage;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Properties;

/**
 * The type Generator app.
 */
public class GeneratorApp
  extends Application
{
  /**
   * The constant KEYS.
   */
  public static final String KEYS = "keys";
  /**
   * The constant THREADS.
   */
  public static final String THREADS = "threads";
  /**
   * The constant TRIES_PER_THREAD.
   */
  public static final String TRIES_PER_THREAD = "triesPerThread";
  /**
   * The constant PASSWORD_LENGTH.
   */
  public static final String PASSWORD_LENGTH = "passwordLength";
  /**
   * The constant PREFIX.
   */
  public static final String PREFIX = "prefix";
  /**
   * The constant POSTFIX.
   */
  public static final String POSTFIX = "postfix";
  /**
   * The constant DELIMITER.
   */
  public static final String DELIMITER = ",";

  private GeneratorAppView view;
  private GeneratorConfigPresenter generatorConfigPresenter;
  private ActorSystem actorSystem;

  @Override
  public void start(Stage primaryStage)
    throws Exception
  {
    actorSystem = ActorSystem.create();

    view = new GeneratorAppView(new GeneratorAppView.Action()
    {
      @Override
      public void onTabSelect(String name)
      {
         // todo
      }
    });

    generatorConfigPresenter = new GeneratorConfigPresenter(getConfig(), new GeneratorConfigView.Callback()
    {
      @Override
      public void onStart(GeneratorConfig generatorConfig)
      {
        try
        {
          addResult(generatorConfig);
        }
        catch(IOException e)
        {
          e.printStackTrace();
        }
      }
    });
    view.addContent("config", generatorConfigPresenter.getNode());

    view.addTo(primaryStage);
  }

  @Override
  public void stop()
    throws Exception
  {
    super.stop();
    System.exit(0);
  }

  private void addResult(GeneratorConfig generatorConfig)
    throws IOException
  {
    FXMLLoader loader = new FXMLLoader();
    // set fxml location
    loader.setLocation(getClass().getResource("result/Result.fxml"));
    // load and add
    Node node = loader.load();
    String uuid = view.addContent("result", node);
    // get controller from loader
    ResultController resultController = loader.getController();

    if(generatorConfig != null)
    {
      actorSystem.actorOf(Props.create(GenerateActor.class, generatorConfig, resultController));
    }

    view.showTab(uuid);
  }

  /**
   * Gets config.
   *
   * @return GeneratorConfig or null if something went wrong
   */
  public static GeneratorConfig getConfig()
  {
    Properties properties = new Properties();
    try
    {
      properties.load(new FileInputStream(System.getProperty("user.dir") + "/config.properties"));

      return new GeneratorConfig(
        Arrays.asList(properties.getProperty(KEYS).trim().split(DELIMITER)),
        Integer.valueOf(properties.getProperty(THREADS)),
        Long.valueOf(properties.getProperty(TRIES_PER_THREAD)),
        Integer.valueOf(properties.getProperty(PASSWORD_LENGTH)),
        properties.getProperty(PREFIX),
        properties.getProperty(POSTFIX)
      );
    }
    catch(IOException e)
    {
      e.printStackTrace();
    }
    return null;
  }
}


text:
layout: post
title:  Double standards
excerpt:
---

  During World War II, ex-Ku Klux Klansman, now U.S. senator,
Robert Byrd vowed never to fight "with a Negro by my side. Rather I should
die a thousand times, and see Old Glory trampled in the dirt never to rise
again, than to see this beloved land of ours become degraded by race
mongrels, a throwback to the blackest specimen from the wilds."

            Just a couple of years ago, Byrd lectured us on the floor of the
Senate that "there are white niggers. I've seen a lot of white niggers in my
time." I wonder whether he was talking about whites who act like blacks.

            San Francisco's esteemed mayor Willie Brown once described a
successful legislative battle this way: "We beat those old white boys fair
and square."

            Spike Lee said in disapproval of interracial marriages: "I give
interracial couples a look. Daggers. They get uncomfortable when they see me
on the street."

            The National Association of Black Social Workers drafted a
position paper calling white adoptions of black children "cultural
genocide." They warned against "transculturation ... when one dominant
culture overpowers and forces another culture to accept a foreign form of
existence."

            Donna Brazile, Al Gore's presidential campaign manager, called
Republicans "white boys" who seek to "exclude, denigrate and leave behind."

            At a celebration for retiring Sen. Strom Thurmond, R-S.C., Sen.
Trent Lott, R-Miss., said that Mississippians were proud to have voted for
Thurmond in his 1948 presidential campaign "and, if the rest of the country
had followed our lead, we wouldn't have had all these problems over all
these years."

            Which among the above statements are the most racist, which have
received the most media coverage and which caused the most angst? Clearly,
Lott's statement received the most media coverage and created the most
angst, but it doesn't begin to qualify as the most racist.

            You say: "Williams, that's different. High officials shouldn't
honor and praise racists or ex-racists." Then what about Bill Clinton's
acknowledged political mentors -- former Arkansas Sen. J. William Fulbright
and former Arkansas Gov. Orville Faubus -- who were both rabid
segregationists? Yet the former president highly praises Fulbright and
bestowed upon him the Presidential Medal of Freedom Award.

            By the way, Fulbright was one of 19 senators who issued a
statement titled, "The Southern Manifesto," condemning the 1954 Supreme
Court decision of Brown vs. Board of Education and defending segregation.
That's a bit more recent than Thurmond's run for the White House. Does
Clinton's praise of Fulbright mean that he supported "The Southern
Manifesto," just as the assertion that Lott's praise of Thurmond means he
supported Thurmond's segregationist stand in 1948? If so, why not also
condemn Clinton?

            I have several possible theories on the responses to Lott's
rather stupid remarks -- stupid in the context of our politically correct
world.

            My first theory is that conservatives are held to higher
standards of decency, conduct and decorum than liberals. In other words,
it's like behavior that's tolerated in the case of children but ostracized
when adults do the same thing. That theory might also explain why racist
statements made by blacks are excused.

            Another theory is that since 9-11 and President Bush's public
popularity, both appointed and unappointed black leaders have had no
platform and been paid no attention. Lott's gaffe gives them platform, voice
and mission.

            Finally, the Democrats, having lost all branches of national
government in the recent elections, are desperate to get something on Bush
and the Republicans, and Trent Lott's statement is the answer to their
prayers.


text:
del app.nw
7z a -tzip  app.nw  package.json index.html icon.png css bower_components\pixi.js\bin\pixi.js bower_components\angular\angular.js
pause


text:
<?php
# $Id$
# PHPlot test: multiple identical plots, pixel coord legend position
# See the script included at the bottom for details.
$legend_positioning = 'pixels';
require 'multiplot.php';


text:
"use strict";
var hoodie = new Hoodie('https://synctory.appback.com/');
var SCRIPT_TYPE  = "script";

function CheckUser() {
    if (hoodie.account.username){
        DisplayMyScripts();
    } else {
        ShowCredentials();
    }
}

function GetUsername() {
    return document.getElementById('credentials').getElements('input[name=username]')[0].value;
}

function GetPassword() {
    return document.getElementById('credentials').getElements('input[name=password]')[0].value;
}

function OnSignUp() {
    hoodie.account.signUp(GetUsername(), GetPassword())
        .done(function (user) {
            LoadInitialScripts();
            CheckUser();
        })
        .fail(function (user) {
            DisplayErrorMsg(["User already exists","Please choose a new name or Sign In"]);
        });
}

function OnSignIn() {
    hoodie.account.signIn(GetUsername(), GetPassword())
        .done(function (user) {
            CheckUser();
        })
        .fail(function (user) {
            DisplayErrorMsg(["Sign in error","Please check your username/password"]);
        });
}

function OnSignOut() {
    OnSaveScript();
    hoodie.account.signOut()
        .done(function (user) {
            ResetScript();
            CheckUser();
        }).fail(function (err) {
            console.log("Sign Out error: " + err);
    });
}

function GetUserScripts(callback) {
    hoodie.store.findAll(function(object){
        if(object.type === SCRIPT_TYPE){
            return true;
        }
    }).done(callback);
}

function NewScript(title, author) {
    var attributes = {title: title, author: author};
    hoodie.store.add(SCRIPT_TYPE, attributes)
        .done(function (newScript) {
            SetCurrentScript(newScript);
            OnNewScriptCreated();
        });
}

function LoadPresetScript(script) {
    hoodie.store.add(SCRIPT_TYPE, script)
        .done(function (newScript) {
            console.log('created ' + newScript);
        });
}

function CopyScript(copiedTitle) {
    var script = GetSaveObject();
    script.title = copiedTitle;
    hoodie.store.add(SCRIPT_TYPE, script)
        .done(function (copiedScript) {
            SetCurrentScript(copiedScript);
            LoadScript(script);
            HideAllOverlays();
        });
}

function SaveScript(script) {
    hoodie.store.update(SCRIPT_TYPE, CurrentScriptID, script)
        .done(function (savedScript) {
            OnScriptSaved();
        });
}

/*
hoodie.account.on('authenticated', function (user) {console.log("authenticated");});
hoodie.account.on('signup', function (user) {console.log("signup");});
hoodie.account.on('changeusername', function (user) {console.log("changeusername");});
hoodie.account.on('signin', function (user) {console.log("signin");});
hoodie.account.on('reauthenticated', function (user) {console.log("reauthenticated");});
hoodie.account.on('signout', function (user) {console.log("signout");});
hoodie.account.on('unauthenticated', function (user) {console.log("unauthenticated");});
*/


text:
using CAPNet.Models;
using System.Linq;
using Xunit;

namespace CAPNet
{
    public class AreaValidatorTests
    {
        [Fact]
        public void AreaWithDescriptionIsValid()
        {
            var info = new Info();
            var area = new Area();
            area.Description = "U.S. nationwide and interests worldwide";
            info.Areas.Add(area);

            var areaValidator = new AreaValidator(info);
            Assert.True(areaValidator.IsValid);
        }

        [Fact]
        public void AreaWithOneDescriptionEmptyIsInvalid()
        {
            var info = new Info();
            var firstArea = new Area();
            firstArea.Description = "U.S. nationwide and interests worldwide";
            var secondArea = new Area();
            secondArea.Description = "";
            info.Areas.Add(firstArea);
            info.Areas.Add(secondArea);

            var areaValidator = new AreaValidator(info);
            Assert.False(areaValidator.IsValid);

            var emptyDescriptionErrors = from error in areaValidator.Errors
                                         where error.GetType() == typeof(AreaDescriptionRequiredError)
                                         select error;
            Assert.NotEmpty(emptyDescriptionErrors);
        }

        [Fact]
        public void AreaWithDescriptionAndCeilingAndAltitudeNullIsInvalid()
        {
            var info = new Info();
            var area = new Area();
            area.Description = "U.S. nationwide and interests worldwide";
            area.Ceiling = 123;
            area.Altitude = null;
            info.Areas.Add(area);

            var areaValidator = new AreaValidator(info);
            Assert.False(areaValidator.IsValid);

            var ceilingExistanceErrors = from error in areaValidator.Errors
                                         where error.GetType() == typeof(CeilingExistenceError)
                                         select error;
            Assert.NotEmpty(ceilingExistanceErrors);
        }

        [Fact]
        public void AreaWithDescriptionAndCeilingNullAndAltitudeNullIsValid()
        {
            var info = new Info();
            var area = new Area();
            area.Description = "U.S. nationwide and interests worldwide";
            area.Ceiling = null;
            area.Altitude = null;
            info.Areas.Add(area);

            var areaValidator = new AreaValidator(info);
            Assert.True(areaValidator.IsValid);
        }

        [Fact]
        public void AreaWith4CoordinatePairsAndFirstAndLastPairEqualIsValid()
        {
            var info = new Info();
            var area = new Area();
            area.Description = "U.S. nationwide and interests worldwide";
            var polygon = new Polygon("68.47,-120.14 38.34,-119.95 38.52,-119.74 38.62,-119.89 38.47,-120.14");
            area.Polygons.Add(polygon);
            info.Areas.Add(area);

            var areaValidator = new AreaValidator(info);
            Assert.False(areaValidator.IsValid);
            var polygonsErrors = from error in areaValidator.Errors
                                 where error.GetType() == typeof(PolygonWithFirstCoordinatePairEqualToLastCoordinatePairError)
                                 select error;
            Assert.NotEmpty(polygonsErrors);
        }

        [Fact]
        public void AreaWith3CoordinatePairsAndFirstAndLastPairEqualIsInvalid()
        {
            var info = new Info();
            var area = new Area();
            area.Description = "U.S. nationwide and interests worldwide";
            var polygon = new Polygon("38.47,-120.14 38.62,-119.89 38.47,-120.14");
            area.Polygons.Add(polygon);
            info.Areas.Add(area);

            var areaValidator = new AreaValidator(info);
            Assert.False(areaValidator.IsValid);
            var polygonsErrors = from error in areaValidator.Errors
                                 where error.GetType() == typeof(PolygonMinCoordinatesError)
                                 select error;
            Assert.NotEmpty(polygonsErrors);
        }
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Mycogone cervina var. subincarnata Peck

### Remarks
null


text:
import sys
from selenium import webdriver

if sys.platform.startswith("linux"):
	from pyvirtualdisplay import Display
	display = Display(visible=0, size=(1024, 768))
else:
	display = None

if display != None:
	display.start()

# now Firefox will run in a virtual display.
# you will not see the browser.
browser = webdriver.Firefox()
browser.get('http://www.google.com')
print browser.title
browser.get_screenshot_as_file('screenshot.png')
browser.quit()

if display != None:
	display.stop()


text:
layout: default
title: Home
---

About Me

I am a native of Ann Arbor, Michigan and now live in Chicago, Illinois after a decade studying and working in Washington, DC and in Singapore. My main interests (personal and professional) lie at the intersection between globalization and transformative technology.

Latest Posts

  {% for post in site.posts limit:3 %}

        {{ post.title }}

    {{ post.date | date_to_string }}

  {% endfor %}


text:
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Numeric#step with [stop, step]" do
  before(:each) do
    @obj = NumericSub.new
  end

  it "raises an ArgumentError when step is 0" do
    lambda { @obj.step(5, 0) {} }.should raise_error(ArgumentError)
  end

  ruby_version_is "" ... "1.8.7" do
    it "raises no LocalJumpError when passed no block and self > stop" do
      @stop = mock("Stop value")
      @step = mock("Step value")
      @step.should_receive(:>).with(0).and_return(true)

      @obj.should_receive(:>).with(@stop).and_return(true)

      lambda { @obj.step(@stop, @step) }.should_not raise_error(LocalJumpError)
    end

    it "raises a LocalJumpError when passed no block and self < stop" do
      @stop = mock("Stop value")
      @step = mock("Step value")
      @step.should_receive(:>).with(0).and_return(true)

      @obj.should_receive(:>).with(@stop).and_return(false)

      lambda { @obj.step(@stop, @step) }.should raise_error(LocalJumpError)
    end
  end

  ruby_version_is "1.8.7" do
    it "returns an Enumerator when passed no block and self > stop" do
      @stop = mock("Stop value")
      @step = mock("Step value")

      @obj.step(@stop, @step).should be_an_instance_of(enumerator_class)
    end

    it "returns an Enumerator when passed no block and self < stop" do
      @stop = mock("Stop value")
      @step = mock("Step value")

      @obj.step(@stop, @step).should be_an_instance_of(enumerator_class)
    end
  end

  it "increments self (using #+) until self > stop when step > 0" do
    values = []

    @stop = mock("Stop value")
    @step = mock("Step value")
    @step.should_receive(:>).with(0).and_return(true)

    # Stepping 3 times
    @obj.should_receive(:>).with(@stop).and_return(false, false, false, true)
    @obj.should_receive(:+).with(@step).and_return(@obj, @obj, @obj)

    @obj.step(@stop, @step) { |i| values << i }

    values.should == [@obj, @obj, @obj]
  end

  it "decrements self (using #-) until self < stop when step < 0" do
    values = []

    @stop = mock("Stop value")
    @step = mock("Step value")
    @step.should_receive(:>).with(0).and_return(false)

    # Stepping 3 times
    @obj.should_receive(:<).with(@stop).and_return(false, false, false, true)
    # Calling #+ with negative step decrements self
    @obj.should_receive(:+).with(@step).and_return(@obj, @obj, @obj)

    @obj.step(@stop, @step) { |i| values << i }

    values.should == [@obj, @obj, @obj]
  end
end

describe "Numeric#step with [stop, step] when self, stop and step are Fixnums" do
  it "raises an ArgumentError when step is 0" do
    lambda { 1.step(5, 0) {} }.should raise_error(ArgumentError)
  end

  it "yields only Fixnums" do
    1.step(5, 1) { |x| x.should be_kind_of(Fixnum) }
  end

  it "defaults to step = 1" do
    result = []
    1.step(5) { |x| result << x }
    result.should == [1, 2, 3, 4, 5]
  end
end

describe "Numeric#step with [stop, +step] when self, stop and step are Fixnums" do
  it "yields while increasing self by step until stop is reached" do
    result = []
    1.step(5, 1) { |x| result << x }
    result.should == [1, 2, 3, 4, 5]
  end

  it "yields once when self equals stop" do
    result = []
    1.step(1, 1) { |x| result << x }
    result.should == [1]
  end

  it "does not yield when self is greater than stop" do
    result = []
    2.step(1, 1) { |x| result << x }
    result.should == []
  end
end

describe "Numeric#step with [stop, -step] when self, stop and step are Fixnums" do
  it "yields while decreasing self by step until stop is reached" do
    result = []
    5.step(1, -1) { |x| result << x }
    result.should == [5, 4, 3, 2, 1]
  end

  it "yields once when self equals stop" do
    result = []
    5.step(5, -1) { |x| result << x }
    result.should == [5]
  end

  it "does not yield when self is less than stop" do
    result = []
    1.step(5, -1) { |x| result << x }
    result.should == []
  end
end

describe "Numeric#step with [stop, step] when self, stop or step is a Float" do
  it "raises an ArgumentError when step is 0" do
    lambda { 1.1.step(2, 0.0) {} }.should raise_error(ArgumentError)
  end

  it "yields only Floats" do
    1.5.step(5, 1) { |x| x.should be_kind_of(Float) }
    1.step(5.0, 1) { |x| x.should be_kind_of(Float) }
    1.step(5, 1.0) { |x| x.should be_kind_of(Float) }
  end
end

describe "Numeric#step with [stop, +step] when self, stop or step is a Float" do
  it "yields while increasing self by step until stop is reached" do
    result = []
    1.5.step(5, 1) { |x| result << x }
    result.should == [1.5, 2.5, 3.5, 4.5]
  end

  it "yields once when self equals stop" do
    result = []
    1.5.step(1.5, 1) { |x| result << x }
    result.should == [1.5]
  end

  it "does not yield when self is greater than stop" do
    result = []
    2.5.step(1.5, 1) { |x| result << x }
    result.should == []
  end
end

describe "Numeric#step with [stop, -step] when self, stop or step is a Float" do
  it "yields while decreasing self by step until stop is reached" do
    result = []
    5.step(1.5, -1) { |x| result << x }
    result.should == [5.0, 4.0, 3.0, 2.0]
  end

  it "yields once when self equals stop" do
    result = []
    1.5.step(1.5, -1) { |x| result << x }
    result.should == [1.5]
  end

  it "does not yield when self is less than stop" do
    result = []
    1.step(5, -1.5) { |x| result << x }
    result.should == []
  end
end

describe "Numeric#step" do
  it "doesn't catch errors" do
    lambda{ 1.step(2) { raise ArgumentError, "oups" }}.should raise_error(ArgumentError, "oups")
    lambda{ 1.step(2) { raise TypeError, "oups" }    }.should raise_error(TypeError, "oups")
  end
end