text:
namespace worldlib
{

	//////////////////////////////////////////////////////////////////////////////
	/// \file Patch.hpp
	/// \brief Contains various functions for patching and assembling files
	///
	/// \addtogroup Patch
	///  @{
	//////////////////////////////////////////////////////////////////////////////

	////////////////////////////////////////////////////////////
	/// \brief Contains error data reported from Asar
	////////////////////////////////////////////////////////////
	template <typename stringType>
	struct PatchErrorData
	{

		////////////////////////////////////////////////////////////
		/// \brief Default constructor
		////////////////////////////////////////////////////////////
		PatchErrorData();

		////////////////////////////////////////////////////////////
		/// \brief Constructor taking in various information.  In retrospect I could've just taken in one of Asar's structs, couldn't've I?
		////////////////////////////////////////////////////////////
		PatchErrorData(const char *fed, const char *red, const char *b, const char *fn, int l, const char *cfn, int cl) : fullErrorData((std::string)fed), rawErrorData((std::string)red), block((std::string)b), fileName((std::string)fn), line(l), callerLine(cl)
		{
			if (cfn != nullptr) callerFilename = std::string(cfn);
		};

		////////////////////////////////////////////////////////////
		/// \brief Contains the full error data as reported by Asar
		////////////////////////////////////////////////////////////
		stringType fullErrorData;

		////////////////////////////////////////////////////////////
		/// \brief Contains just the "simple" error data as reported by Asar
		////////////////////////////////////////////////////////////
		stringType rawErrorData;

		////////////////////////////////////////////////////////////
		/// \brief Contains the "descriptive" error data as reported by Asar
		////////////////////////////////////////////////////////////
		stringType block;

		////////////////////////////////////////////////////////////
		/// \brief The file name of the offending file
		////////////////////////////////////////////////////////////
		stringType fileName;

		////////////////////////////////////////////////////////////
		/// \brief The line the error occurred at
		////////////////////////////////////////////////////////////
		int line;

		////////////////////////////////////////////////////////////
		/// \brief The calling file
		////////////////////////////////////////////////////////////
		stringType callerFilename;

		////////////////////////////////////////////////////////////
		/// \brief The line the file was called at in the calling file
		////////////////////////////////////////////////////////////
		int callerLine;
	};

	////////////////////////////////////////////////////////////
	/// \brief Contains warning data reported from Asar
	////////////////////////////////////////////////////////////
	template <typename stringType> using PatchWarningData = PatchErrorData<stringType>;

	////////////////////////////////////////////////////////////
	/// \brief Contains label data reported from Asar
	////////////////////////////////////////////////////////////
	template <typename stringType>
	struct PatchLabelData
	{
		////////////////////////////////////////////////////////////
		/// \brief Default constructor
		////////////////////////////////////////////////////////////
		PatchLabelData();

		////////////////////////////////////////////////////////////
		/// \brief Constructor taking in various information.  And what kind of a word is "couldn't've" anyway.
		////////////////////////////////////////////////////////////
		PatchLabelData(const char *n, int l) : name((std::string)n), location(l) {};

		////////////////////////////////////////////////////////////
		/// \brief The name of the label
		////////////////////////////////////////////////////////////
		stringType name;

		////////////////////////////////////////////////////////////
		/// \brief The location of the label
		////////////////////////////////////////////////////////////
		int location;
	};

	////////////////////////////////////////////////////////////
	/// \brief Contains define data reported from Asar
	////////////////////////////////////////////////////////////
	template <typename stringType>
	struct PatchDefineData
	{
		////////////////////////////////////////////////////////////
		/// \brief Default constructor
		////////////////////////////////////////////////////////////
		PatchDefineData();

		////////////////////////////////////////////////////////////
		/// \brief Constructor taking in various information.
		////////////////////////////////////////////////////////////
		PatchDefineData(const char *n, const char *c) : name((std::string)n), contents(c) {};

		////////////////////////////////////////////////////////////
		/// \brief The name of the define
		////////////////////////////////////////////////////////////
		stringType name;

		////////////////////////////////////////////////////////////
		/// \brief The literal string value of the define
		////////////////////////////////////////////////////////////
		stringType contents;
	};

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Compiles the given ASM file to a binary.
	/// \details The file must exist on disk.  If errorDataOutput has been added to once the function returns, there was an error.  Use the PatchErrorData et al structs for the parameters.
	///
	/// \param patchFilepath	The filename of the patch
	/// \param out			Where to send the resulting data
	/// \param errorDataOutput	Where to send the error data
	/// \param warningDataOutput	Where to send the warning data
	/// \param labelDataOutput	Where to send the label data
	/// \param defineDataOutput	Where to send the define data
	///
	/// \return Returns an iterator to the end of your compiled data.
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename stringType, typename outputIteratorType, typename errorDataOutputIteratorType, typename warningDataOutputIteratorType, typename labelDataOutputIteratorType, typename defineDataOutputIteratorType>
	outputIteratorType compileToBinary(const char *patchFilepath, outputIteratorType out, errorDataOutputIteratorType &errorDataOutput, warningDataOutputIteratorType &warningDataOutput, labelDataOutputIteratorType &labelDataOutput, defineDataOutputIteratorType &defineDataOutput);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Compiles the given ASM file to a binary.
	///
	/// \details The file must exist on disk.  If errorDataOutput has been added to once the function returns, there was an error.  Use the PatchErrorData et al structs for the parameters.
	///
	/// \param patchFilepath	The filename of the patch
	/// \param out			Where to send the resulting data
	/// \param errorDataOutput	Where to send the error data
	///
	/// \return Returns an iterator to the end of your compiled data.
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename stringType, typename outputIteratorType, typename errorDataOutputIteratorType>
	outputIteratorType compileToBinary(const char *patchFilepath, outputIteratorType out, errorDataOutputIteratorType &errorDataOutput);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Compiles the given ASM file to a binary.  The file must exist on disk.  If errorDataOutput has been added to once the function returns, there was an error.  Use the PatchErrorData et al structs for the parameters.
	///
	/// \param patchFilepath	The filename of the patch
	/// \param out			Where to send the resulting data
	///
	/// \return Returns true on success and false on failure
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename stringType, typename outputIteratorType>
	bool compileToBinary(const char *patchFilepath, outputIteratorType &out);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief "Quick compile".  Just gives you a vector from a string, basically.
	///
	/// \param patchFilepath	The filename of the patch
	/// \param errorDataOutput	Where to send the error data.  Be nice if this weren't necessary, but we need this for error reporting, obviously.
	///
	/// \return Returns a vector containing the compiled data
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename dataType>
	std::vector<dataType> compileToBinary(const char *patchFilepath, std::vector<PatchErrorData<std::string>> &errorDataOutput);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Compiles an ASM file onto a ROM.  The ROM must exist in memory as a pointer to chars or unsigned chars.  Or I guess you could use other integer types if you're feeling adventerous...
	///
	/// If errorDataOutput has been added to once the function returns, there was an error.  Use the PatchErrorData et al structs for the parameters.
	///
	/// \param patchFilepath	The filename of the patch
	/// \param romData		The ROM data to modify
	/// \param romSize		The size of the ROM to modify
	/// \param errorDataOutput	Where to send the error data
	/// \param warningDataOutput	Where to send the warning data
	/// \param labelDataOutput	Where to send the label data
	/// \param defineDataOutput	Where to send the define data
	///
	/// \return Returns true on success and false if there was an error
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename stringType, typename romDataType, typename errorDataOutputIteratorType, typename warningDataOutputIteratorType, typename labelDataOutputIteratorType, typename defineDataOutputIteratorType>
	bool patchToROM(const char *patchFilepath, const romDataType *romData, int romSize, errorDataOutputIteratorType &errorDataOutput, warningDataOutputIteratorType &warningDataOutput, labelDataOutputIteratorType &labelDataOutput, defineDataOutputIteratorType &defineDataOutput);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Compiles an ASM file onto a ROM.  The ROM must exist in memory as a pointer to chars or unsigned chars.  Or I guess you could use other integer types if you're feeling adventerous...
	///
	/// If errorDataOutput has been added to once the function returns, there was an error.  Use the PatchErrorData et al structs for the parameters.
	///
	/// \param patchFilepath	The filename of the patch
	/// \param romData		The ROM data to modify
	/// \param romSize		The size of the ROM to modify
	/// \param errorDataOutput	Where to send the error data
	///
	/// \return Returns true on success and false if there was an error
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename stringType, typename romDataType, typename errorDataOutputIteratorType>
	bool patchToROM(const char *patchFilepath, const romDataType *romData, int romSize, errorDataOutputIteratorType &errorDataOutput);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Compiles an ASM file onto a ROM.  The ROM must exist in memory as a pointer to chars or unsigned chars.  Or I guess you could use other integer types if you're feeling adventerous...
	///
	/// If errorDataOutput has been added to once the function returns, there was an error.  Use the PatchErrorData et al structs for the parameters.
	///
	/// \param patchFilepath	The filename of the patch
	/// \param romData		The ROM data to modify
	/// \param romSize		The size of the ROM to modify
	///
	/// \return Returns true on success and false if there was an error
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename stringType, typename romDataType>
	bool patchToROM(const char *patchFilepath, const romDataType *romData, int romSize);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Given a string to a patch, finds a definition (e.g. "!true = $00") and replaces it with a new string.
	/// \details It's highly recommended to look at the version that just takes normal strings instead of iterators so that this function doesn't take up like 5 lines of back_insert_iterator boilerplate.
	///
	/// \param patchStart		An iterator pointing to the patch's start
	/// \param patchEnd		An iterator pointing to the patch's end
	/// \param definitionStart	An iterator pointing to a string containing the name of the definition you want to replace, not including the "!"
	/// \param definitionEnd	An iterator pointing to the definition's end
	/// \param valueToChangeToStart	An iterator pointing to a string containing the name of the value you want to replace the original definition's value with
	/// \param valueToChangeToEnd	An iterator pointing to the value's end
	///
	/// \throws std::runtime_error	Thrown if:
	/// 1. The definition cannot be found
	/// 2. The definition is malformed
	/// 3. The definition's value's length (in characters) is not equal of the length of the string you want to replace it with.  E.G. trying to replace "!value = $0000" with "$50" instead of "$0050"
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename patchStringIteratorType, typename definitionStringIteratorType, typename replacementStringIteratorType>
	void replacePatchDefinition(patchStringIteratorType patchStart, patchStringIteratorType patchEnd, definitionStringIteratorType definitionStart, definitionStringIteratorType definitionEnd, replacementStringIteratorType valueToChangeToStart, replacementStringIteratorType valueToChangeToEnd);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Given a string to a patch, finds a definition (e.g. "!true = $00") and replaces it with a number, printed as a hex value (with a $ preceding it).
	/// \details It's highly recommended to look at the version that just takes normal strings instead of iterators so that this function doesn't take up like 5 lines of back_insert_iterator boilerplate.
	///
	/// \param patchStart		An iterator pointing to the patch's start
	/// \param patchEnd		An iterator pointing to the patch's end
	/// \param definitionStart	An iterator pointing to a string containing the name of the definition you want to replace, not including the "!"
	/// \param definitionEnd	An iterator pointing to the definition's end
	/// \param valueToChangeTo	The numeric value to use (will be converted to a hex value with a '$' preceding it)
	/// \param digits		How mny digits long the value should be (for example, use 4 to convert "$50" to "$0050")
	///
	/// \throws std::runtime_error	Thrown if:
	/// 1. The definition cannot be found
	/// 2. The definition is malformed
	/// 3. The definition's value's length (in characters) is not equal of the length of the string you want to replace it with.  E.G. trying to replace "!value = $0000" with "$50" instead of "$0050"
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename patchStringIteratorType, typename definitionStringIteratorType>
	void replacePatchDefinition(patchStringIteratorType patchStart, patchStringIteratorType patchEnd, definitionStringIteratorType definitionStart, definitionStringIteratorType definitionEnd, int valueToChangeTo, int digits);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Given a string to a patch, finds a definition (e.g. "!true = $00") and replaces it with a new string.
	/// \details The length of the new definition's value must be equal to the length of the old definition's value
	///
	/// \param patch		The patch that should have its definition changed
	/// \param definitionToChange	A string containing the name of the definition you want to replace, not including the "!"
	/// \param valueToChangeTo	A string containing the name of the value you want to replace the original definition's value with
	///
	/// \throws std::runtime_error	Thrown if:
	/// 1. The definition cannot be found
	/// 2. The definition is malformed
	/// 3. The definition's value's length (in characters) is not equal of the length of the string you want to replace it with.  E.G. trying to replace "!value = $0000" with "$50" instead of "$0050"
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename patchStringType, typename definitionStringType, typename replacementStringType>
	void replacePatchDefinition(patchStringType &patch, const definitionStringType &definitionToChange, const replacementStringType &valueToChangeTo);

	/////////////////////////////////////////////////////////////////////////////
	/// \brief Given a string to a patch, finds a definition (e.g. "!true = $00") and replaces it with a number
	/// \details The number is printed as a hex value (with a $ preceding it). It's highly recommended to look at the version that just takes normal strings instead of iterators so that this function doesn't take up like 5 lines of back_insert_iterator boilerplate.
	///
	/// \param patch		The patch that should have its definition changed
	/// \param definitionToChange	A string containing the name of the definition you want to replace, not including the "!"
	/// \param valueToChangeTo	The numeric value to use (will be converted to a hex value with a '$' preceding it)
	/// \param digits		How mny digits long the value should be (for example, use 4 to convert "$50" to "$0050")
	///
	/// \throws std::runtime_error	Thrown if:
	/// 1. The definition cannot be found
	/// 2. The definition is malformed
	/// 3. The definition's value's length (in characters) is not equal of the length of the string you want to replace it with.  E.G. trying to replace "!value = $0000" with "$50" instead of "$0050"
	///
	/////////////////////////////////////////////////////////////////////////////
	template <typename patchStringType, typename definitionStringType>
	void replacePatchDefinition(patchStringType &patch, const definitionStringType &definitionToChange, int valueToChangeTo, int digits);

//////////////////////////////////////////////////////////////////////////////
///  @}
//////////////////////////////////////////////////////////////////////////////
}

#include "Patch.inl"

#endif


text:
/*
 * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.service.globaldisplaydetails.event;

import java.util.*;

/**
 * The event that contains information about global display details change.
 *
 * @author Yana Stamcheva
 */
public class GlobalDisplayNameChangeEvent
    extends EventObject
{
    /**
     * A default serial version id.
     */
    private static final long serialVersionUID = 1L;

    /**
     * The display name this event is about.
     */
    private String displayName;

    /**
     * Creates an instance of <tt>GlobalDisplayDetailsEvent</tt>
     *
     * @param source the source of this event
     * @param newDisplayName the new display name
     */
    public GlobalDisplayNameChangeEvent(   Object source,
                                        String newDisplayName)
    {
        super(source);

        this.displayName = newDisplayName;
    }

    /**
     * Returns the new global display name.
     *
     * @return a string representing the new global display name
     */
    public String getNewDisplayName()
    {
        return displayName;
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*
  DO NOT EDIT THIS FILE - the content was created using a source code generator
*/

#ifndef QLINEEDITSLOTS_H
#define QLINEEDITSLOTS_H

#include <QtCore/QObject>
#include <QtCore/QCoreApplication>
#include <QtCore/QString>

#include <QtWidgets/QLineEdit>

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"
#include "qt5xhb_signals.h"

class QLineEditSlots: public QObject
{
  Q_OBJECT
  public:
  QLineEditSlots( QObject *parent = 0 );
  ~QLineEditSlots();
  public slots:
  void cursorPositionChanged( int iold, int inew );
  void editingFinished();
  void returnPressed();
  void selectionChanged();
  void textChanged( const QString & text );
  void textEdited( const QString & text );
};

#endif /* QLINEEDITSLOTS_H */


text:
module Feldspar.IO.Mutable where

import Feldspar
import Feldspar.Mutable
import Feldspar.IO.Frontend

liftMut :: Syntax a => M a -> Program a
liftMut = return . runMutable


text:
from setuptools import setup

setup(name='pynpact',
      version='0.5',
      description='Python N-Profile Analysis Computation Tool',
      author='Luciano Brocchieri and Nathan Bird',
      author_email='nathan@acceleration.net',
      url='http://genome.ufl.edu/npact/',
      packages=['pynpact'],
      package_data={
          'pynpact': ['data/*', 'bin/*']
      },
      scripts=['bin/pynpact'],
      install_requires=["biopython>=1.57"],
      tests_require=["pytest>=2.4", "mock>=1", "pytest-mock"]
)


text:
function init(virtual)
  --This tape will self-destruct in five seconds. Good luck, Jim.
  entity.smash()
end


text:
<?php
namespace Modules\Admin\Http\Controllers;

use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Redirect;
use App\Http\Requests;
use Illuminate\Http\Request;
use Modules\Admin\Http\Requests\CategoryRequest;
use Modules\Admin\Models\User;
use Modules\Admin\Models\Category;
use Input;
use Validator;
use Auth;
use Paginate;
use Grids;
use HTML;
use Form;
use Hash;
use View;
use URL;
use Lang;
use Session;
use DB;
use Route;
use Crypt;
use App\Http\Controllers\Controller;
use Illuminate\Http\Dispatcher;
use App\Helpers\Helper;

/**
 * Class AdminController
 */
class SubCategoryController extends Controller {
    /**
     * @var  Repository
     */

    /**
     * Displays all admin.
     *
     * @return \Illuminate\View\View
     */
    public function __construct() {
        $this->middleware('admin');
        View::share('viewPage', 'Sub-category');
        View::share('helper',new Helper);
        $this->record_per_page = Config::get('app.record_per_page');
    }

    protected $categories;

    /*
     * Dashboard
     * */

    public function index(Category $category, Request $request)
    {
        $page_title = 'Sub category';
        $page_action = 'View Sub Category';
        if ($request->ajax()) {
            $id = $request->get('id');
            $category = Category::find($id);
            $category->status = $s;
            $category->save();
            echo $s;
            exit();
        }
        // Search by name ,email and group
        $search = Input::get('search');
        $status = Input::get('status');
        if ((isset($search) && !empty($search))) {

            $search = isset($search) ? Input::get('search') : '';

            $categories = Category::where(function($query) use($search,$status) {
                        if (!empty($search)) {
                            $query->Where('category_name', 'LIKE', "%$search%")
                                    ->OrWhere('sub_category_name', 'LIKE', "%$search%");
                        }

                    })->Paginate($this->record_per_page);
        } else {
            $categories = Category::orderBy('id','desc')->Paginate($this->record_per_page);
        }

        return view('packages::category.index', compact('categories', 'page_title', 'page_action'));
    }

    /*
     * create Group method
     * */

    public function create(Category $category)
    {
        $page_title     = 'Category';
        $page_action    = 'Create Sub-category';
        $sub_category_name  = Category::groupBy('category_name')->lists('category_name','category_name');

        $category_list = $sub_category_name->toArray();

        if($sub_category_name->count()==0){
           return Redirect::to(route('category.create'));
        }

        return view('packages::sub_category.create', compact( 'category_list','category','sub_category_name', 'page_title', 'page_action'));
    }

    /*
     * Save Group method
     * */

    public function store(CategoryRequest $request, Category $category) {

        $category->fill(Input::all());
        $category->save();

        return Redirect::to(route('category'))
                            ->with('flash_alert_notice', 'New category was successfully created !');
        }

    /*
     * Edit Group method
     * @param
     * object : $category
     * */

    public function edit(Category $category) {

        $page_title = 'Category';
        $page_action = 'Edit Sub-category';
        $sub_category_name  = Category::groupBy('category_name')->lists('category_name','category_name');

        $category_list = $sub_category_name->toArray();

        return view('packages::sub_category.edit', compact('category_list', 'sub_category_name','category', 'page_title', 'page_action'));
    }

    public function update(Request $request, Category $category) {

        $category->fill(Input::all());
        $category->save();
        return Redirect::to(route('category'))
                        ->with('flash_alert_notice', 'Category was  successfully updated !');
    }
    /*
     *Delete User
     * @param ID
     *
     */
    public function destroy(Category $category) {

        Category::where('id',$category->id)->delete();

        return Redirect::to(route('category'))
                        ->with('flash_alert_notice', 'Category was successfully deleted!');
    }

    public function show(Category $category) {

    }

}


text:
package net.java.jinterval.p1788.bridj;

import org.bridj.BridJ;
import org.bridj.ann.Library;
import org.bridj.ann.Ptr;

/**
 * BridJ wrappers of libtestJIntervalGmp library
 */
@Library(value = "textToIntervalGmp", dependencies = {"gmp"})
public class LibTextToIntervalGmp {

    static {
        BridJ.register();
    }

    public static native int textToDecoratedInfsupB64_gmp_sloppy(
            /* const char* */@Ptr long text,
            /* DECORATED_INFSUP_B64* */ @Ptr long interval);

    public static native int textToDecoratedInfsupB64_gmp_strict(
            /* const char* */@Ptr long text,
            /* DECORATED_INFSUP_B64* */ @Ptr long interval);

    public static native int textToBareInfsupB64_gmp_sloppy(
            /* const char* */@Ptr long text,
            /* BARE_INFSUP_B64* */ @Ptr long interval);

    public static native int textToBareInfsupB64_gmp_strict(
            /* const char* */@Ptr long text,
            /* BARE_INFSUP_B64* */ @Ptr long interval);
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
Notul. Syst. (Paris) 15:53. 1954

#### Original name
null

### Remarks
null


text:
ace.define("ace/worker/mirror", ["require", "exports", "module", "ace/range", "ace/document", "ace/lib/lang"], function(require, exports, module) {
"use strict";

var Range = require("../range").Range;
var Document = require("../document").Document;
var lang = require("../lib/lang");

var Mirror = exports.Mirror = function(sender) {
    this.sender = sender;
    var doc = this.doc = new Document("");

    var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));

    var _self = this;
    sender.on("change", function(e) {
        var data = e.data;
        if (data[0].start) {
            doc.applyDeltas(data);
        } else {
            for (var i = 0; i < data.length; i += 2) {
                if (Array.isArray(data[i+1])) {
                    var d = {action: "insert", start: data[i], lines: data[i+1]};
                } else {
                    var d = {action: "remove", start: data[i], end: data[i+1]};
                }
                doc.applyDelta(d, true);
            }
        }
        if (_self.$timeout)
            return deferredUpdate.schedule(_self.$timeout);
        _self.onUpdate();
    });
};

(function() {

    this.$timeout = 500;

    this.setTimeout = function(timeout) {
        this.$timeout = timeout;
    };

    this.setValue = function(value) {
        this.doc.setValue(value);
        this.deferredUpdate.schedule(this.$timeout);
    };

    this.getValue = function(callbackId) {
        this.sender.callback(this.doc.getValue(), callbackId);
    };

    this.onUpdate = function() {
        // abstract method
    };

    this.isPending = function() {
        return this.deferredUpdate.isPending();
    };

}).call(Mirror.prototype);

});


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>loopback-getting-started-intermediate</title>

    <link href="css/style.css" rel="stylesheet">
    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600' rel='stylesheet' type='text/css'>

    <base href="/">

Micro Meetup

              Question one title
              <textarea class="form-control create__question__field" rows="2"></textarea>

              Question one title
              <textarea class="form-control create__question__field" rows="2"></textarea>

              Question one title
              <textarea class="form-control join__question__field" rows="2"></textarea>

              <button type="submit" class="btn btn-primary">Join Event</button>

          </form>


text:
!function ($) {
    (function (btn) {
        $(window).scroll(function(){
            if ($(window).scrollTop()>400){
                btn.fadeIn(400);
            } else {
                btn.fadeOut(600);
            }
        });//按钮消失和出现
        btn.click(function(){
            $('body,html').animate({scrollTop:0},1000);
        });
    })($('#gotop')); //回到顶部
  $(function () {
      orderTheLeftNavigations();
    function orderTheLeftNavigations(){
	    $('#navigation .sidenav').html($("#markdown-toc").html());
	    $('#navigation .sidenav ul').addClass("nav");
	    $("#markdown-toc").remove();
      // 添加Bootstrap表格样式 table-hover
      $(".docs-content table").addClass("table table-hover");
  	}
  	$(window).load(initilizeAfterLoad);
    function initilizeAfterLoad(){
      repairTheImagesWhichCrossTheMaxWidth();
      resetHeadersStyles();
    }
    // 重新计算图片显示大小。
  	function repairTheImagesWhichCrossTheMaxWidth(){
  		var images = $(".docs-content img"),
            Awidth = $("article.post-content").width();
  		if(images != undefined && images.length > 0){
  			for(var i=0; i< images.length;i++){
  				var imgWidth = images[i].width;
  				if( imgWidth >= Awidth ){
  					 images[i].width = Awidth;
  				}
  			}
  		}
  	}
    // 设置标题样式
    function resetHeadersStyles(){
      resetHeaderItemStyles($(".docs-content h1"));
      resetHeaderItemStyles($(".docs-content h2"));
    }
    function resetHeaderItemStyles(headers){
      if(headers != undefined && headers.length > 0){
        for(var i=0; i< headers.length;i++){
          var header = headers[i];
          $(header).html($(header).html() + '' +
            '');
          $(header).removeAttr('id');
        }
      }
    }
  })
    //文章内图片点击放大
    $('.post-content img').zoomify();
}(jQuery)


text:
package org.drools.workbench.services.verifier.webworker.client.testutil;

import java.util.ArrayList;
import java.util.Collection;

import org.drools.workbench.models.datamodel.rule.BaseSingleFieldConstraint;
import org.drools.workbench.models.datamodel.rule.IAction;
import org.drools.workbench.models.datamodel.rule.IPattern;
import org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52;
import org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52;
import org.drools.workbench.models.guided.dtable.shared.model.BRLActionColumn;
import org.drools.workbench.models.guided.dtable.shared.model.BRLActionVariableColumn;
import org.drools.workbench.models.guided.dtable.shared.model.BRLConditionColumn;
import org.drools.workbench.models.guided.dtable.shared.model.BRLConditionVariableColumn;
import org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52;
import org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52;
import org.drools.workbench.models.guided.dtable.shared.model.Pattern52;
import org.kie.soup.project.datamodel.imports.Import;
import org.kie.soup.project.datamodel.oracle.DataType;

import static org.mockito.Mockito.mock;

public class ExtendedGuidedDecisionTableBuilder
        extends AbstractDecisionTableBuilder {

    public ExtendedGuidedDecisionTableBuilder(final String packageName,
                                              final Collection<Import> imports,
                                              final String tableName) {
        table.setPackageName(packageName);
        table.setTableFormat(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY);
        table.getImports().getImports().addAll(imports);
        table.setTableName(tableName);
    }

    public static BRLConditionColumn createBRLConditionColumn() {
        final BRLConditionColumn brlConditionColumn = new BRLConditionColumn();
        final ArrayList<IPattern> definition = new ArrayList<>();
        definition.add(mock(IPattern.class));
        brlConditionColumn.setDefinition(definition);

        final ArrayList<BRLConditionVariableColumn> childColumns = new ArrayList<>();
        final BRLConditionVariableColumn brlConditionVariableColumn = new BRLConditionVariableColumn();
        brlConditionVariableColumn.getFactType();
        childColumns.add(brlConditionVariableColumn);
        brlConditionColumn.setChildColumns(childColumns);

        return brlConditionColumn;
    }

    public AbstractDecisionTableBuilder withActionBRLFragment() {

        final BRLActionColumn brlActionColumn = createBRLActionColumn();

        ArrayList<BRLActionVariableColumn> childColumns = new ArrayList<>();
        childColumns.add(new BRLActionVariableColumn());
        brlActionColumn.setChildColumns(childColumns);

        table.getActionCols().add(brlActionColumn);

        return this;
    }

    public ExtendedGuidedDecisionTableBuilder withNumericColumn(String boundName,
                                                                String factType,
                                                                String field,
                                                                String operator) {
        Pattern52 pattern = findPattern(boundName, factType);

        ConditionCol52 con1 = new ConditionCol52();
        con1.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        con1.setFieldType(DataType.TYPE_NUMERIC);
        con1.setFactField(field);
        con1.setHeader("Applicant age");
        con1.setOperator(operator);
        pattern.getChildColumns().add(con1);

        addPattern(pattern);

        return this;
    }

    public ExtendedGuidedDecisionTableBuilder withConditionBooleanColumn(String boundName,
                                                                         String factType,
                                                                         String field,
                                                                         String operator) {
        Pattern52 pattern = findPattern(boundName, factType);

        ConditionCol52 con1 = new ConditionCol52();
        con1.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        con1.setFieldType(DataType.TYPE_BOOLEAN);
        con1.setFactField(field);
        con1.setHeader("Application approved");
        con1.setOperator(operator);
        pattern.getChildColumns().add(con1);

        addPattern(pattern);

        return this;
    }

    public ExtendedGuidedDecisionTableBuilder withConditionDoubleColumn(String boundName,
                                                                        String factType,
                                                                        String field,
                                                                        String operator) {
        Pattern52 pattern = findPattern(boundName, factType);

        ConditionCol52 con1 = new ConditionCol52();
        con1.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        con1.setFieldType(DataType.TYPE_NUMERIC_DOUBLE);
        con1.setFactField(field);
        con1.setHeader("Applicant age");
        con1.setOperator(operator);
        pattern.getChildColumns().add(con1);

        addPattern(pattern);

        return this;
    }

    public ExtendedGuidedDecisionTableBuilder withConditionIntegerColumn(String boundName,
                                                                         String factType,
                                                                         String field,
                                                                         String operator) {
        Pattern52 pattern = findPattern(boundName, factType);

        ConditionCol52 con1 = new ConditionCol52();
        con1.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        con1.setFieldType(DataType.TYPE_NUMERIC_INTEGER);
        con1.setFactField(field);
        con1.setHeader("Applicant age");
        con1.setOperator(operator);
        pattern.getChildColumns().add(con1);

        addPattern(pattern);

        return this;
    }

    public ExtendedGuidedDecisionTableBuilder withStringColumn(String boundName,
                                                               String factType,
                                                               String field,
                                                               String operator) {
        Pattern52 pattern = findPattern(boundName, factType);

        ConditionCol52 con1 = new ConditionCol52();
        con1.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        con1.setFieldType(DataType.TYPE_STRING);
        con1.setFactField(field);
        con1.setHeader("Applicant age");
        con1.setOperator(operator);
        pattern.getChildColumns().add(con1);

        addPattern(pattern);

        return this;
    }

    public ExtendedGuidedDecisionTableBuilder withEnumColumn(String boundName,
                                                             String factType,
                                                             String field,
                                                             String operator,
                                                             String valueList) {
        Pattern52 pattern = findPattern(boundName, factType);

        ConditionCol52 con1 = new ConditionCol52();
        con1.setConstraintValueType(BaseSingleFieldConstraint.TYPE_ENUM);
        con1.setValueList(valueList);
        con1.setFieldType(DataType.TYPE_STRING);
        con1.setFactField(field);
        con1.setHeader("Applicant age");
        con1.setOperator(operator);
        pattern.getChildColumns().add(con1);

        addPattern(pattern);

        return this;
    }

    public ExtendedGuidedDecisionTableBuilder withActionSetField(String boundName,
                                                                 String factField,
                                                                 String typeNumericInteger) {

        table.getActionCols().add(createActionSetField(boundName,
                                                       factField,
                                                       typeNumericInteger));

        return this;
    }

    public ExtendedGuidedDecisionTableBuilder withActionInsertFact(String factType,
                                                                   String boundName,
                                                                   String factField,
                                                                   String typeNumericInteger) {

        table.getActionCols().add(createActionInsertFact(factType,
                                                         boundName,
                                                         factField,
                                                         typeNumericInteger));

        return this;
    }

    public static ActionSetFieldCol52 createActionSetField(String boundName,
                                                           String factField,
                                                           String typeNumericInteger) {
        ActionSetFieldCol52 column = new ActionSetFieldCol52();
        column.setBoundName(boundName);
        column.setFactField(factField);
        column.setType(typeNumericInteger);
        return column;
    }

    public ExtendedGuidedDecisionTableBuilder withConditionBRLColumn() {
        final BRLConditionColumn column = createBRLConditionColumn();

        table.getConditions().add(column);

        return this;
    }

    public static BRLActionColumn createBRLActionColumn() {
        final BRLActionColumn brlActionColumn = new BRLActionColumn();
        final ArrayList<IAction> definition = new ArrayList<IAction>();
        definition.add(mock(IAction.class));
        brlActionColumn.setDefinition(definition);
        return brlActionColumn;
    }

    public static ActionInsertFactCol52 createActionInsertFact(String factType,
                                                               String boundName,
                                                               String factField,
                                                               String type) {
        ActionInsertFactCol52 column = new ActionInsertFactCol52();
        column.setFactType(factType);
        column.setBoundName(boundName);
        column.setFactField(factField);
        column.setType(type);
        return column;
    }
}


text:
use super::{CharIter, Editable, LineIter, Modifiable, Movement, Named, Saveable, Undoable};
use delegate_attr::delegate;
use std::io::Result;

pub type Selection = (usize, usize);

pub trait Selectable {
    fn sel(&self) -> &Option<Selection>;
    fn set_sel(&mut self, selection: Selection);
    fn reset_sel(&mut self);
    fn in_sel(&self, pos: usize) -> bool {
        match *self.sel() {
            Some((beg, end)) => pos >= beg && pos <= end,
            None => false,
        }
    }
}

pub struct Select<T>
where
    T: Editable,
{
    content: T,
    sel: Option<Selection>,
}

impl<T> Select<T>
where
    T: Editable,
{
    pub fn new(content: T) -> Select<T> {
        Select { content, sel: None }
    }
}

impl<T> Selectable for Select<T>
where
    T: Editable,
{
    fn sel(&self) -> &Option<Selection> {
        &self.sel
    }

    fn set_sel(&mut self, selection: Selection) {
        self.sel = Some(selection);
    }

    fn reset_sel(&mut self) {
        self.sel = None;
    }
}

#[delegate(self.content)]
impl<T> Editable for Select<T>
where
    T: Editable,
{
    fn step(&mut self, mov: Movement) -> ();
    fn move_to(&mut self, pos: usize) -> ();
    fn move_at(&mut self, line: usize, col: usize) -> ();
    fn insert(&mut self, c: char) -> ();
    fn insert_forward(&mut self, c: char) -> ();
    fn delete(&mut self) -> Option<char>;
    fn delete_forward(&mut self) -> Option<char>;
    fn pos(&self) -> usize;
    fn line(&self) -> usize;
    fn col(&self) -> usize;
    fn line_count(&self) -> usize;
    fn len(&self) -> usize;
    fn iter(&self) -> CharIter;
    fn lines(&self) -> LineIter;
    fn iter_line(&self, line: usize) -> CharIter;
    fn line_index_to_char_index(&self, line: usize) -> usize;
}

#[delegate(self.content)]
impl<T> Saveable for Select<T>
where
    T: Editable + Saveable,
{
    fn save(&mut self) -> Result<()>;
}

#[delegate(self.content)]
impl<T> Named for Select<T>
where
    T: Editable + Named,
{
    fn name(&self) -> &String;
    fn set_name(&mut self, name: String) -> ();
}

#[delegate(self.content)]
impl<T> Undoable for Select<T>
where
    T: Editable + Undoable,
{
    fn undo(&mut self) -> ();
    fn redo(&mut self) -> ();
    fn history_len(&self) -> usize;
}

#[delegate(self.content)]
impl<T> Modifiable for Select<T>
where
    T: Editable + Modifiable,
{
    fn was_modified(&self) -> bool;
}


text:
<?php

namespace ChatApiSample\Domain\Chat\Service;

use ChatApiSample\Secondary\Persistence\DTO\User as DTOUser;
use ChatApiSample\Secondary\Persistence\Service\UserFactory;

class UserFactoryTest extends \PHPUnit_Framework_TestCase
{

    private $userFactory;

    public function setUp()
    {
        $this->userFactory = new UserFactory();
    }

    /**
     * @test
     */
    public function ユーザーオブジェクトを作成する ()
    {
        $DTOUser = $this->userFactory->create();
        $this->assertTrue($DTOUser instanceof DTOUser);
    }
}


text:
package com.seller.trade.services.dht;

import com.frostwire.jlibtorrent.*;
import com.frostwire.jlibtorrent.alerts.Alert;
import com.frostwire.jlibtorrent.alerts.DhtBootstrapAlert;
import com.frostwire.jlibtorrent.alerts.DhtGetPeersReplyAlert;
import com.frostwire.jlibtorrent.alerts.ExternalIpAlert;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

public class DHTServiceImpl implements DHTService {

    private final String HELLO_SELLER_TRADE_SHA1 = "de97662e7ba270abbf67485f41bdfb8995f7960b";
    private final Session s;
    private final DHT dht;
    private final boolean useLanMappings;
    private final Map<Integer,String> LAN_MAPPINGS;

    public DHTServiceImpl(boolean useLanMappings) {
        s = new Session();
        dht = new DHT(s);
        this.useLanMappings = useLanMappings;
        LAN_MAPPINGS = (useLanMappings) ? getLanMappings() : new HashMap<Integer,String>();

        s.addListener(new AlertListener() {

            @Override
            public int[] types() {
                return null;
            }

            @Override
            public void alert(Alert<?> alert) {
                //System.out.println(alert);

                if (alert instanceof DhtBootstrapAlert) {
                    System.out.println(alert);
                }

                if (alert instanceof DhtGetPeersReplyAlert) {
                    System.out.println(alert);
                }

                if (alert instanceof ExternalIpAlert) {
                    System.out.println(alert);
                }
            }
        });
        //dht.getPeers("86d0502ead28e495c9e67665340f72aa72fe304");
        //dht.waitNodes(1); method no longer here.
	System.out.println("Waiting for DHT Nodes 5 seconds");

	try {
	    Thread.sleep(5000);
	} catch (Throwable e) {
	}
    }

    @Override
    public List<DHTNode> getNodes() {
        return getNodesByHash(HELLO_SELLER_TRADE_SHA1);
    }

    @Override
    public List<DHTNode> getNodes(String keyword) {
        final String keywordSha1Str = sha1hex("sellertrade:product:keyword:" + keyword);
        return getNodesByHash(keywordSha1Str);
    }

    public List<DHTNode> getNodesByHash(String sha1string) {
        ArrayList<TcpEndpoint> peers = dht.getPeers(sha1string, 30, TimeUnit.SECONDS);
        ArrayList<DHTNode> nodes = new ArrayList<>(peers.size());

        for (TcpEndpoint p : peers) {
            if (useLanMappings) {
                //use for development purposes only when testing with local nodes and unfriendly routers.
                nodes.add(new DHTNode(LAN_MAPPINGS.get(p.getPort()),p.getPort()));
            } else {
                nodes.add(new DHTNode(p.getAddress(),p.getPort()));
            }
        }

        return nodes;
    }

    @Override
    public void announceNode(int httpPort) {
        System.out.println("Announcing sha1('hello.seller.trade') -> " + HELLO_SELLER_TRADE_SHA1);
        dht.announce(HELLO_SELLER_TRADE_SHA1, httpPort, 0);
    }

    @Override
    public void announceKeywords(List<String> keywords, int httpPort) {
        for (String keyword : keywords) {
            final String keywordSha1Str = sha1hex("sellertrade:product:keyword:" + keyword);
            dht.announce(keywordSha1Str,httpPort,0);
            System.out.println("announcing [sellertrade:product:keyword:" + keyword + "] -> " + keywordSha1Str);
        }
    }

    // copied from internet
    final protected static char[] hexArray = "0123456789abcdef".toCharArray();
    public static String toHex(byte[] bytes) {
	char[] hexChars = new char[bytes.length * 2];
	for ( int j = 0; j < bytes.length; j++ ) {
	    int v = bytes[j] & 0xFF;
	    hexChars[j * 2] = hexArray[v >>> 4];
	    hexChars[j * 2 + 1] = hexArray[v & 0x0F];
	}
	return new String(hexChars);
    }

    private static byte[] sha1(String str) {
        MessageDigest digest = null;
        try {
            digest = MessageDigest.getInstance("SHA1");
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        digest.update(str.getBytes());
        return digest.digest();
    }

    private static String sha1hex(String str) {
        return toHex(sha1(str));
    }

    private static Map<Integer,String> getLanMappings() {
        Map<Integer,String> LAN_MAPPINGS = new HashMap<Integer,String>();
        // 2 nodes on machine A.
        LAN_MAPPINGS.put(8920,"172.16.2.129");
        LAN_MAPPINGS.put(8921,"172.16.2.129");

        // 2 nodes on machine B.
        LAN_MAPPINGS.put(8990,"172.16.2.118");
        LAN_MAPPINGS.put(8991,"172.16.2.118");
        return LAN_MAPPINGS;
    }
}


text:
var commentArea = document.querySelector("#comment");
var nameInput = document.querySelector("#name");
var form = document.querySelector('form');
var commentValue, nameValue;

commentArea.addEventListener('invalid', function (e) {
	e.target.setCustomValidity("");
	if (!e.target.validity.valid) {
		e.target.setCustomValidity("Please enter a comment.");
	}
});

commentArea.addEventListener('input', function (e) {
	e.target.setCustomValidity("");
});

// send form data with JavaScript
if( window.FormData) {

	var appendComment = function (nameValue, commentValue) {
		var comment = document.createElement('li');
		var commentName = document.createElement('h4');
		var commentComment = document.createElement('p');
		var commentWrapper = document.querySelector('.comments');
		commentName.innerText = nameValue;
		commentComment.innerText = commentValue;
		nameValue ? comment.appendChild(commentName) : '';
		comment.appendChild(commentComment);
		commentWrapper.appendChild(comment);
	};

	form.addEventListener('submit', function (ev) {
		var formData = new FormData(form);
		commentValue = commentArea.value;
		nameValue = nameInput.value;

		var xhr = new XMLHttpRequest();
		// save the comment in the database
		xhr.open('POST', './save', true);
		xhr.onload = function () {
			appendComment(nameValue, commentValue);
		};
		xhr.send(formData);

		// always call preventDefault at the end, see: http://molily.de/javascript-failure/
		ev.preventDefault();
	});
}


text:
/*	$NetBSD: joy_timer.c,v 1.1 2002/02/02 18:37:38 jdolecek Exp $	*/

/*-
 * Copyright (c) 1995 Jean-Marc Zucconi
 * All rights reserved.
 *
 * Ported to NetBSD by Matthieu Herrb <matthieu@laas.fr>
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
#include <sys/errno.h>

#include <machine/cpu.h>
#include <machine/pio.h>
#include <machine/joystick.h>

#include <dev/isa/isavar.h>
#include <dev/isa/isareg.h>
#include <dev/ic/i8253reg.h>
#include <dev/ic/joyvar.h>

int
joy_get_tick()
{
	int low, high;

	isa_outb(TIMER_MODE, TIMER_SEL0);
	low = isa_inb(TIMER_CNTR0);
	high = isa_inb(TIMER_CNTR0);

	return (high << 8) | low;
}

int
joy_timer_freq()
{
	return (TIMER_FREQ);
}


text:
// flow-typed signature: ec3c409c9d80f7e286bba9ff234dd226
// flow-typed version: <<STUB>>/tcomb_v^3.2.18/flow_v0.39.0

/**
 * This is an autogenerated libdef stub for:
 *
 *   'tcomb'
 *
 * Fill this stub out by replacing all the `any` types.
 *
 * Once filled out, we encourage you to share your work with the
 * community by sending a pull request to:
 * https://github.com/flowtype/flow-typed
 */

declare module 'tcomb' {
  declare module.exports: any;
}

/**
 * We include stubs for each file inside this npm package in case you need to
 * require those files directly. Feel free to delete any files that aren't
 * needed.
 */
declare module 'tcomb/lib/Any' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Array' {
  declare module.exports: any;
}

declare module 'tcomb/lib/assert' {
  declare module.exports: any;
}

declare module 'tcomb/lib/assign' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Boolean' {
  declare module.exports: any;
}

declare module 'tcomb/lib/create' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Date' {
  declare module.exports: any;
}

declare module 'tcomb/lib/declare' {
  declare module.exports: any;
}

declare module 'tcomb/lib/decompose' {
  declare module.exports: any;
}

declare module 'tcomb/lib/dict' {
  declare module.exports: any;
}

declare module 'tcomb/lib/enums' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Error' {
  declare module.exports: any;
}

declare module 'tcomb/lib/extend' {
  declare module.exports: any;
}

declare module 'tcomb/lib/fail' {
  declare module.exports: any;
}

declare module 'tcomb/lib/forbidNewOperator' {
  declare module.exports: any;
}

declare module 'tcomb/lib/fromJSON' {
  declare module.exports: any;
}

declare module 'tcomb/lib/func' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Function' {
  declare module.exports: any;
}

declare module 'tcomb/lib/getDefaultInterfaceName' {
  declare module.exports: any;
}

declare module 'tcomb/lib/getFunctionName' {
  declare module.exports: any;
}

declare module 'tcomb/lib/getTypeName' {
  declare module.exports: any;
}

declare module 'tcomb/lib/installTypeFormatter' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Integer' {
  declare module.exports: any;
}

declare module 'tcomb/lib/interface' {
  declare module.exports: any;
}

declare module 'tcomb/lib/intersection' {
  declare module.exports: any;
}

declare module 'tcomb/lib/irreducible' {
  declare module.exports: any;
}

declare module 'tcomb/lib/is' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isArray' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isBoolean' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isFunction' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isIdentity' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isInterface' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isMaybe' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isNil' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isNumber' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isObject' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isString' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isStruct' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isSubsetOf' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isType' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isTypeName' {
  declare module.exports: any;
}

declare module 'tcomb/lib/isUnion' {
  declare module.exports: any;
}

declare module 'tcomb/lib/list' {
  declare module.exports: any;
}

declare module 'tcomb/lib/match' {
  declare module.exports: any;
}

declare module 'tcomb/lib/maybe' {
  declare module.exports: any;
}

declare module 'tcomb/lib/mixin' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Nil' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Number' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Object' {
  declare module.exports: any;
}

declare module 'tcomb/lib/refinement' {
  declare module.exports: any;
}

declare module 'tcomb/lib/RegExp' {
  declare module.exports: any;
}

declare module 'tcomb/lib/String' {
  declare module.exports: any;
}

declare module 'tcomb/lib/stringify' {
  declare module.exports: any;
}

declare module 'tcomb/lib/struct' {
  declare module.exports: any;
}

declare module 'tcomb/lib/tuple' {
  declare module.exports: any;
}

declare module 'tcomb/lib/Type' {
  declare module.exports: any;
}

declare module 'tcomb/lib/union' {
  declare module.exports: any;
}

declare module 'tcomb/lib/update' {
  declare module.exports: any;
}

// Filename aliases
declare module 'tcomb/index' {
  declare module.exports: $Exports<'tcomb'>;
}
declare module 'tcomb/index.js' {
  declare module.exports: $Exports<'tcomb'>;
}
declare module 'tcomb/lib/Any.js' {
  declare module.exports: $Exports<'tcomb/lib/Any'>;
}
declare module 'tcomb/lib/Array.js' {
  declare module.exports: $Exports<'tcomb/lib/Array'>;
}
declare module 'tcomb/lib/assert.js' {
  declare module.exports: $Exports<'tcomb/lib/assert'>;
}
declare module 'tcomb/lib/assign.js' {
  declare module.exports: $Exports<'tcomb/lib/assign'>;
}
declare module 'tcomb/lib/Boolean.js' {
  declare module.exports: $Exports<'tcomb/lib/Boolean'>;
}
declare module 'tcomb/lib/create.js' {
  declare module.exports: $Exports<'tcomb/lib/create'>;
}
declare module 'tcomb/lib/Date.js' {
  declare module.exports: $Exports<'tcomb/lib/Date'>;
}
declare module 'tcomb/lib/declare.js' {
  declare module.exports: $Exports<'tcomb/lib/declare'>;
}
declare module 'tcomb/lib/decompose.js' {
  declare module.exports: $Exports<'tcomb/lib/decompose'>;
}
declare module 'tcomb/lib/dict.js' {
  declare module.exports: $Exports<'tcomb/lib/dict'>;
}
declare module 'tcomb/lib/enums.js' {
  declare module.exports: $Exports<'tcomb/lib/enums'>;
}
declare module 'tcomb/lib/Error.js' {
  declare module.exports: $Exports<'tcomb/lib/Error'>;
}
declare module 'tcomb/lib/extend.js' {
  declare module.exports: $Exports<'tcomb/lib/extend'>;
}
declare module 'tcomb/lib/fail.js' {
  declare module.exports: $Exports<'tcomb/lib/fail'>;
}
declare module 'tcomb/lib/forbidNewOperator.js' {
  declare module.exports: $Exports<'tcomb/lib/forbidNewOperator'>;
}
declare module 'tcomb/lib/fromJSON.js' {
  declare module.exports: $Exports<'tcomb/lib/fromJSON'>;
}
declare module 'tcomb/lib/func.js' {
  declare module.exports: $Exports<'tcomb/lib/func'>;
}
declare module 'tcomb/lib/Function.js' {
  declare module.exports: $Exports<'tcomb/lib/Function'>;
}
declare module 'tcomb/lib/getDefaultInterfaceName.js' {
  declare module.exports: $Exports<'tcomb/lib/getDefaultInterfaceName'>;
}
declare module 'tcomb/lib/getFunctionName.js' {
  declare module.exports: $Exports<'tcomb/lib/getFunctionName'>;
}
declare module 'tcomb/lib/getTypeName.js' {
  declare module.exports: $Exports<'tcomb/lib/getTypeName'>;
}
declare module 'tcomb/lib/installTypeFormatter.js' {
  declare module.exports: $Exports<'tcomb/lib/installTypeFormatter'>;
}
declare module 'tcomb/lib/Integer.js' {
  declare module.exports: $Exports<'tcomb/lib/Integer'>;
}
declare module 'tcomb/lib/interface.js' {
  declare module.exports: $Exports<'tcomb/lib/interface'>;
}
declare module 'tcomb/lib/intersection.js' {
  declare module.exports: $Exports<'tcomb/lib/intersection'>;
}
declare module 'tcomb/lib/irreducible.js' {
  declare module.exports: $Exports<'tcomb/lib/irreducible'>;
}
declare module 'tcomb/lib/is.js' {
  declare module.exports: $Exports<'tcomb/lib/is'>;
}
declare module 'tcomb/lib/isArray.js' {
  declare module.exports: $Exports<'tcomb/lib/isArray'>;
}
declare module 'tcomb/lib/isBoolean.js' {
  declare module.exports: $Exports<'tcomb/lib/isBoolean'>;
}
declare module 'tcomb/lib/isFunction.js' {
  declare module.exports: $Exports<'tcomb/lib/isFunction'>;
}
declare module 'tcomb/lib/isIdentity.js' {
  declare module.exports: $Exports<'tcomb/lib/isIdentity'>;
}
declare module 'tcomb/lib/isInterface.js' {
  declare module.exports: $Exports<'tcomb/lib/isInterface'>;
}
declare module 'tcomb/lib/isMaybe.js' {
  declare module.exports: $Exports<'tcomb/lib/isMaybe'>;
}
declare module 'tcomb/lib/isNil.js' {
  declare module.exports: $Exports<'tcomb/lib/isNil'>;
}
declare module 'tcomb/lib/isNumber.js' {
  declare module.exports: $Exports<'tcomb/lib/isNumber'>;
}
declare module 'tcomb/lib/isObject.js' {
  declare module.exports: $Exports<'tcomb/lib/isObject'>;
}
declare module 'tcomb/lib/isString.js' {
  declare module.exports: $Exports<'tcomb/lib/isString'>;
}
declare module 'tcomb/lib/isStruct.js' {
  declare module.exports: $Exports<'tcomb/lib/isStruct'>;
}
declare module 'tcomb/lib/isSubsetOf.js' {
  declare module.exports: $Exports<'tcomb/lib/isSubsetOf'>;
}
declare module 'tcomb/lib/isType.js' {
  declare module.exports: $Exports<'tcomb/lib/isType'>;
}
declare module 'tcomb/lib/isTypeName.js' {
  declare module.exports: $Exports<'tcomb/lib/isTypeName'>;
}
declare module 'tcomb/lib/isUnion.js' {
  declare module.exports: $Exports<'tcomb/lib/isUnion'>;
}
declare module 'tcomb/lib/list.js' {
  declare module.exports: $Exports<'tcomb/lib/list'>;
}
declare module 'tcomb/lib/match.js' {
  declare module.exports: $Exports<'tcomb/lib/match'>;
}
declare module 'tcomb/lib/maybe.js' {
  declare module.exports: $Exports<'tcomb/lib/maybe'>;
}
declare module 'tcomb/lib/mixin.js' {
  declare module.exports: $Exports<'tcomb/lib/mixin'>;
}
declare module 'tcomb/lib/Nil.js' {
  declare module.exports: $Exports<'tcomb/lib/Nil'>;
}
declare module 'tcomb/lib/Number.js' {
  declare module.exports: $Exports<'tcomb/lib/Number'>;
}
declare module 'tcomb/lib/Object.js' {
  declare module.exports: $Exports<'tcomb/lib/Object'>;
}
declare module 'tcomb/lib/refinement.js' {
  declare module.exports: $Exports<'tcomb/lib/refinement'>;
}
declare module 'tcomb/lib/RegExp.js' {
  declare module.exports: $Exports<'tcomb/lib/RegExp'>;
}
declare module 'tcomb/lib/String.js' {
  declare module.exports: $Exports<'tcomb/lib/String'>;
}
declare module 'tcomb/lib/stringify.js' {
  declare module.exports: $Exports<'tcomb/lib/stringify'>;
}
declare module 'tcomb/lib/struct.js' {
  declare module.exports: $Exports<'tcomb/lib/struct'>;
}
declare module 'tcomb/lib/tuple.js' {
  declare module.exports: $Exports<'tcomb/lib/tuple'>;
}
declare module 'tcomb/lib/Type.js' {
  declare module.exports: $Exports<'tcomb/lib/Type'>;
}
declare module 'tcomb/lib/union.js' {
  declare module.exports: $Exports<'tcomb/lib/union'>;
}
declare module 'tcomb/lib/update.js' {
  declare module.exports: $Exports<'tcomb/lib/update'>;
}


text:
using System;
using System.Linq;
using Windows.UI.Xaml.Data;

// ReSharper disable once CheckNamespace - Issue with Multi-targetting
namespace BuildIt.UI.Converters
{
    /// <summary>
    /// Returns a wrapper for a data property that will gracefully
    /// handle changes without forcing massive UI redraw.
    /// </summary>
    public class ImmutableDataConverter : IValueConverter
    {
        /// <summary>
        /// Converts to wrapper.
        /// </summary>
        /// <param name="value">The data entity to convert.</param>
        /// <param name="targetType">The target type (not used).</param>
        /// <param name="parameter">converter parameter (not used).</param>
        /// <param name="language">language (not used).</param>
        /// <returns>The wrapped entity.</returns>
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            var type = value.GetType();
            var gtype = type.GetInterfaces().FirstOrDefault(x => x.IsConstructedGenericType && x.GetGenericTypeDefinition() == typeof(IHasImmutableData<>));
            if (gtype != null)
            {
                var appStateType = typeof(ImmutableDataWrapper<>).MakeGenericType(gtype.GetGenericArguments());
                return Activator.CreateInstance(appStateType, value, new PlatformUIContext());
            }

            return value;
        }

        /// <summary>
        /// Converts back - does nothing.
        /// </summary>
        /// <param name="value">The data entity to convert.</param>
        /// <param name="targetType">The target type (not used).</param>
        /// <param name="parameter">converter parameter (not used).</param>
        /// <param name="language">language (not used).</param>
        /// <returns>The original entity.</returns>
        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            return value;
        }
    }
}


text:
"""
EWA.loss_functions
A collection of common loss functions. They have to be convex
"""

import numpy as np

class Squared:
    def __init__(self, B=1):
        # Bound for the loss function, assumes for all y, y', |l(y,y')| < C
        self.C = 4 * (B ** 2)
        # Bound for the learning rate in order to guarantee exp-convexity of the loss function
        self.max_learning_rate = 1 / (8 * B ** 2)

    def loss(self, y1, Y):
        """y1 : array of dimension dimension of the prediction
        Y : array of dimension (dimension of support, dimension of the prediction) """
        return np.linalg.norm(y1 - Y, axis=-1) ** 2


text:
namespace Doh3d
{

class IPositioned2F
{
public:

  virtual ~IPositioned2F() { }

  virtual const Position2F& getPosition() const { return d_position; }
  virtual void setPosition(const Position2F& pPosition) { d_position = pPosition; }

protected:

  Position2F d_position;

};

} // ns Doh3d


text:
<?php
require_once('./libinc/main_include.php');

$sent = -1; // nothing set
if (!isset($_REQUEST['submit'])) {
	$_REQUEST = array('name'=>'', 'crazyField'=>'', 'type'=>' ', 'feedback'=>'', 'invalid'=>'');
} elseif (isset($_REQUEST['email']) && $_REQUEST['email'] != '') {
	// HACKER! (quietly do nothing)
} elseif (
	(!filter_var($_REQUEST['crazyField'], FILTER_VALIDATE_EMAIL) && $_REQUEST['crazyField'] != $_REQUEST['invalid']) ||
	($_REQUEST['crazyField'] == '')
) {
	$sent = 0; // invalid email
	$_REQUEST['invalid'] = $_REQUEST['crazyField'];
} else {
	$sent = 1; // sending error (2 = success)
	$html  = "
Name	{$_REQUEST['name']}
";
	$html .= "
Email	{$_REQUEST['crazyField']}
";
	$html .= "
Type	{$_REQUEST['type']}
";
	$html .= "
Time	" . date('r') . "
";
	session_start(); $sessionID = session_id();
	$html .= "
SessionID	{$sessionID}
";
	$html .= "
Feedback	{$_REQUEST['feedback']}
";
	$mail = new UAMail();
	$sent = ($mail->notify("Upstream Academy Feedback", '
' . $html . '
')) ? 2 : 1;
}

?>
<!doctype html>

	<meta charset="utf-8">
	<title>UA Payment — Feedback</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link type="text/plain" rel="author" href="/humans.txt" />
	<link href="/favicon.ico" rel="icon" type="image/x-icon" />
	<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="/css.css">

Home

Feedback

					<?php switch($sent): case 0: // Bad Email ?>

Invalid Email

						If you would like to send the form anyway, just click submit again.

						We will not be able to communicate with you without a valid email.

					<?php break; case 1: // Bad server ?>

Server Error

						Your response has been NOT been submitted to our team.  Please contact us directly at (406) 495-1850

					<?php break; case 2: // All Good ?>

Success

						Your response has been submitted to our team.  Thank you for you feedback.

					<?php break; endswitch; ?>

					<form class="form-horizontal" method="post">

							Name

								<input type="text" id="inputName" placeholder="Name" class="form-control" name="name" value="<?php echo $_REQUEST['name']; ?>">

							Email

								<input type="email" id="inputEmail" placeholder="Email" class="form-control" name="crazyField" value="<?php echo $_REQUEST['crazyField']; ?>">

							Type

								<select id="inputFeedbackType" class="form-control" name="type">
									<option <?php if ($_REQUEST['type'][0] == 'Q') echo 'selected="selected"'; ?>>Question</option>
									<option <?php if ($_REQUEST['type'][0] == 'C') echo 'selected="selected"'; ?>>Comment</option>
									<option <?php if ($_REQUEST['type'][0] == 'B') echo 'selected="selected"'; ?>>Bug / Issue</option>
									<option <?php if ($_REQUEST['type'][0] == 'O') echo 'selected="selected"'; ?>>Other (Please indicate below)</option>
								</select>

							Feedback

								<textarea rows="5" id="inputFeedback" class="form-control" name="feedback"><?php echo $_REQUEST['feedback']; ?></textarea>

							<input type="hidden" name="email" />
							<input type="hidden" name="invalid" value="<?php echo $_REQUEST['invalid']; ?>" />
							<button type="submit" class="btn btn-primary pull-right" name="submit" value="yep" <?php if ($sent == 2) echo "disabled='disabled'"; ?>>Send Feedback</button>
							Clear

					</form>

Copyright ©  Upstream Academy.


text:
#ifndef SHADERUTILS_H
#define SHADERUTILS_H

// Standard headers
#include <stdio.h>
#include <iostream>

#include <GL/glew.h>

namespace ShaderUtils
{

const char *importShaders(const char *filename)
{
	FILE *fp;
	char *text = NULL;

	fp = fopen(filename, "rt");

	if (fp != NULL)
	{
		fseek(fp, 0, SEEK_END);
		size_t count = ftell(fp);
		fseek(fp, 0, 0);

		if (count > 0)
		{
			text = new char[count+1];
			count = fread(text, sizeof(char), count, fp);
			text[count] = '\0';
		}

		fclose(fp);
	}

	return text;
}

// Compile shader and provide verbose output
void compileShader(GLuint shader)
{
	static char shlog[2048];
	GLint status;
	int length;

	glCompileShader(shader);
	glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
	if (status != GL_TRUE)
	{
		glGetShaderInfoLog(shader, 2048, &length, shlog);
		std::cout << std::endl;
		std::cout << shlog << std::endl;
	}
//	else
//		std::cout << " OK!" << std::endl;
}

// Link shader program and provide verbose output
void linkShaderProgram(GLuint program)
{
	static char proglog[2048];
	GLint status;
	int length;

	glLinkProgram(program);
	glGetProgramiv(program, GL_LINK_STATUS, &status);
	if (status != GL_TRUE)
	{
		glGetProgramInfoLog(program, 2048, &length, proglog);
		std::cout << std::endl;
		std::cout << proglog << std::endl;
	}
	//else
//		std::cout << " OK!" << std::endl;
}

} /* end namespace */

#endif /* SHADERUTILS_H */


text:
ACCEPTED

#### According to
IRMNG Homonym List

#### Published in
Zool. Jahresber. , 1879, fasc. 1, 160.

#### Original name
null

### Remarks
null


text:
@import UIKit;

@interface MMAppDelegate : UIResponder <UIApplicationDelegate>

@end


text:
#ifndef SHARE_VM_UTILITIES_GLOBALDEFINITIONS_SPARCWORKS_HPP
#define SHARE_VM_UTILITIES_GLOBALDEFINITIONS_SPARCWORKS_HPP

#include "prims/jni.h"

// This file holds compiler-dependent includes,
// globally used constants & types, class (forward)
// declarations and a few frequently used utility functions.

# include <ctype.h>
# include <dirent.h>
# include <string.h>
# include <strings.h>     // for bsd'isms
# include <stdarg.h>
# include <stddef.h>      // for offsetof
# include <stdio.h>
# include <stdlib.h>
# include <wchar.h>
# include <stdarg.h>
#ifdef SOLARIS
# include <ieeefp.h>
#endif
# include <math.h>
#ifdef LINUX
#ifndef FP_PZERO
  // Linux doesn't have positive/negative zero
  #define FP_PZERO FP_ZERO
#endif
#ifndef fpclass
  #define fpclass fpclassify
#endif
#endif
# include <time.h>
# include <fcntl.h>
# include <dlfcn.h>
# include <pthread.h>
#ifdef SOLARIS
# include <thread.h>
#endif
# include <limits.h>
# include <errno.h>
#ifdef SOLARIS
# include <sys/trap.h>
# include <sys/regset.h>
# include <sys/procset.h>
# include <ucontext.h>
# include <setjmp.h>
#endif
# ifdef SOLARIS_MUTATOR_LIBTHREAD
# include <sys/procfs.h>
# endif
#ifdef LINUX
# include <inttypes.h>
# include <signal.h>
# include <ucontext.h>
# include <sys/time.h>
#endif

// 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures
// When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in
// system header files.  On 32-bit architectures, there is no problem.
// On 64-bit architectures, defining NULL as a 32-bit constant can cause
// problems with varargs functions: C++ integral promotion rules say for
// varargs, we pass the argument 0 as an int.  So, if NULL was passed to a
// varargs function it will remain 32-bits.  Depending on the calling
// convention of the machine, if the argument is passed on the stack then
// only 32-bits of the "NULL" pointer may be initialized to zero.  The
// other 32-bits will be garbage.  If the varargs function is expecting a
// pointer when it extracts the argument, then we have a problem.
//
// Solution: For 64-bit architectures, redefine NULL as 64-bit constant 0.
//
// Note: this fix doesn't work well on Linux because NULL will be overwritten
// whenever a system header file is included. Linux handles NULL correctly
// through a special type '__null'.
#ifdef SOLARIS
#ifdef _LP64
#undef NULL
#define NULL 0L
#else
#ifndef NULL
#define NULL 0
#endif
#endif
#endif

// NULL vs NULL_WORD:
// On Linux NULL is defined as a special type '__null'. Assigning __null to
// integer variable will cause gcc warning. Use NULL_WORD in places where a
// pointer is stored as integer value. On some platforms, sizeof(intptr_t) >
// sizeof(void*), so here we want something which is integer type, but has the
// same size as a pointer.
#ifdef LINUX
  #ifdef _LP64
    #define NULL_WORD  0L
  #else
    // Cast 0 to intptr_t rather than int32_t since they are not the same type
    // on some platforms.
    #define NULL_WORD  ((intptr_t)0)
  #endif
#else
  #define NULL_WORD  NULL
#endif

#ifndef LINUX
// Compiler-specific primitive types
typedef unsigned short     uint16_t;
#ifndef _UINT32_T
#define _UINT32_T
typedef unsigned int       uint32_t;
#endif
#if !defined(_SYS_INT_TYPES_H)
#ifndef _UINT64_T
#define _UINT64_T
typedef unsigned long long uint64_t;
#endif
// %%%% how to access definition of intptr_t portably in 5.5 onward?
typedef int                     intptr_t;
typedef unsigned int            uintptr_t;
// If this gets an error, figure out a symbol XXX that implies the
// prior definition of intptr_t, and add "&& !defined(XXX)" above.
#endif
#endif

// On solaris 8, UINTPTR_MAX is defined as empty.
// Everywhere else it's an actual value.
#if UINTPTR_MAX - 1 == -1
#undef UINTPTR_MAX
#ifdef _LP64
#define UINTPTR_MAX UINT64_MAX
#else
#define UINTPTR_MAX UINT32_MAX
#endif /* ifdef _LP64 */
#endif

// Additional Java basic types

typedef unsigned char      jubyte;
typedef unsigned short     jushort;
typedef unsigned int       juint;
typedef unsigned long long julong;

//----------------------------------------------------------------------------------------------------
// Special (possibly not-portable) casts
// Cast floats into same-size integers and vice-versa w/o changing bit-pattern

inline jint    jint_cast   (jfloat  x)           { return *(jint*   )&x; }
inline jlong   jlong_cast  (jdouble x)           { return *(jlong*  )&x; }

inline jfloat  jfloat_cast (jint    x)           { return *(jfloat* )&x; }
inline jdouble jdouble_cast(jlong   x)           { return *(jdouble*)&x; }

//----------------------------------------------------------------------------------------------------
// Constant for jlong (specifying an long long constant is C++ compiler specific)

// Build a 64bit integer constant
#define CONST64(x)  (x ## LL)
#define UCONST64(x) (x ## ULL)

const jlong min_jlong = CONST64(0x8000000000000000);
const jlong max_jlong = CONST64(0x7fffffffffffffff);

#ifdef SOLARIS
//----------------------------------------------------------------------------------------------------
// ANSI C++ fixes
// NOTE:In the ANSI committee's continuing attempt to make each version
// of C++ incompatible with the previous version, you can no longer cast
// pointers to functions without specifying linkage unless you want to get
// warnings.
//
// This also means that pointers to functions can no longer be "hidden"
// in opaque types like void * because at the invokation point warnings
// will be generated. While this makes perfect sense from a type safety
// point of view it causes a lot of warnings on old code using C header
// files. Here are some typedefs to make the job of silencing warnings
// a bit easier.
//
// The final kick in the teeth is that you can only have extern "C" linkage
// specified at file scope. So these typedefs are here rather than in the
// .hpp for the class (os:Solaris usually) that needs them.

extern "C" {
   typedef int (*int_fnP_thread_t_iP_uP_stack_tP_gregset_t)(thread_t, int*, unsigned *, stack_t*, gregset_t);
   typedef int (*int_fnP_thread_t_i_gregset_t)(thread_t, int, gregset_t);
   typedef int (*int_fnP_thread_t_i)(thread_t, int);
   typedef int (*int_fnP_thread_t)(thread_t);

   typedef int (*int_fnP_cond_tP_mutex_tP_timestruc_tP)(cond_t *cv, mutex_t *mx, timestruc_t *abst);
   typedef int (*int_fnP_cond_tP_mutex_tP)(cond_t *cv, mutex_t *mx);

   // typedef for missing API in libc
   typedef int (*int_fnP_mutex_tP_i_vP)(mutex_t *, int, void *);
   typedef int (*int_fnP_mutex_tP)(mutex_t *);
   typedef int (*int_fnP_cond_tP_i_vP)(cond_t *cv, int scope, void *arg);
   typedef int (*int_fnP_cond_tP)(cond_t *cv);
};
#endif

//----------------------------------------------------------------------------------------------------
// Debugging

#define DEBUG_EXCEPTION ::abort();

extern "C" void breakpoint();
#define BREAKPOINT ::breakpoint()

// checking for nanness
#ifdef SOLARIS
#ifdef SPARC
inline int g_isnan(float  f) { return isnanf(f); }
#else
// isnanf() broken on Intel Solaris use isnand()
inline int g_isnan(float  f) { return isnand(f); }
#endif

inline int g_isnan(double f) { return isnand(f); }
#elif LINUX
inline int g_isnan(float  f) { return isnanf(f); }
inline int g_isnan(double f) { return isnan(f); }
#else
#error "missing platform-specific definition here"
#endif

// Checking for finiteness

inline int g_isfinite(jfloat  f)                 { return finite(f); }
inline int g_isfinite(jdouble f)                 { return finite(f); }

// Wide characters

inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }

// Misc
// NOTE: This one leads to an infinite recursion on Linux
#ifndef LINUX
int local_vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr);
#define vsnprintf local_vsnprintf
#endif

// Portability macros
#define PRAGMA_INTERFACE
#define PRAGMA_IMPLEMENTATION
#define PRAGMA_IMPLEMENTATION_(arg)
#define VALUE_OBJ_CLASS_SPEC    : public _ValueObj

// Formatting.
#ifdef _LP64
#define FORMAT64_MODIFIER "l"
#else // !_LP64
#define FORMAT64_MODIFIER "ll"
#endif // _LP64

#define offset_of(klass,field) offsetof(klass,field)

#endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_SPARCWORKS_HPP


text:
<!DOCTYPE html>

<title id="main_title">NAD11 utility</title>
<link href="assets/style.css" rel="stylesheet" type="text/css">

			N/A, batt=N/A, ant=0/0

				<input type="checkbox" name="cb_hs" id="cb_hs" disabled="disabled"> HS
					mode

				<input type="checkbox" name="cb_keep2" id="cb_keep2"> Keep WiMAX
					2+

			<button id="reconn" data-t="main.reconn">Re-connect WiMAX</button>

			<button id="standby" data-t="main.standby">Standby</button>


text:
require 'standard_tasks'
require 'rails'

module StandardTasks
  class Railtie < Rails::Railtie
    rake_tasks do
      load 'standard_tasks/tasks.rb'
    end
  end
end


text:
define([], function () {

  TimelineEvent = function (name, date, summary, imageURL, resourceURL) {
    this.name = name;
    this.date = date;
    this.summary = summary;
    this.imageURL = imageURL;
    this.resourceURL = resourceURL;
  };

  return TimelineEvent;

});


text:
package edu.rpi.cs.yacs.models;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

import io.realm.RealmList;
import io.realm.RealmObject;

/**
 * Created by mark on 3/31/17.
 */

public class Schedule extends RealmObject {
    @SerializedName("sections")
    @Expose
    private RealmList<Section> sections = new RealmList<>();

    /**
     * The sections
     */
    public RealmList<Section> getSections() {
        return sections;
    }

    /**
     *
     * @param sections
     * The sections
     */
    public void setSections(RealmList<Section> sections) {
        this.sections = sections;
    }
}


text:
from test_framework import BitcoinTestFramework
from util import *

class WalletTest (BitcoinTestFramework):

    def setup_chain(self):
        print("Initializing test directory "+self.options.tmpdir)
        initialize_chain_clean(self.options.tmpdir, 4)

    def setup_network(self, split=False):
        self.nodes = start_nodes(3, self.options.tmpdir)
        connect_nodes_bi(self.nodes,0,1)
        connect_nodes_bi(self.nodes,1,2)
        connect_nodes_bi(self.nodes,0,2)
        self.is_network_split=False
        self.sync_all()

    def run_test (self):
        print "Mining blocks..."

        self.nodes[0].generate(1)

        walletinfo = self.nodes[0].getwalletinfo()
        assert_equal(walletinfo['immature_balance'], 50)
        assert_equal(walletinfo['balance'], 0)

        self.sync_all()
        self.nodes[1].generate(101)
        self.sync_all()

        assert_equal(self.nodes[0].getbalance(), 50)
        assert_equal(self.nodes[1].getbalance(), 50)
        assert_equal(self.nodes[2].getbalance(), 0)

        # Send 21 BTC from 0 to 2 using sendtoaddress call.
        # Second transaction will be child of first, and will require a fee
        self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11)
        self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 10)

        walletinfo = self.nodes[0].getwalletinfo()
        assert_equal(walletinfo['immature_balance'], 0)

        # Have node0 mine a block, thus they will collect their own fee.
        self.nodes[0].generate(1)
        self.sync_all()

        # Have node1 generate 100 blocks (so node0 can recover the fee)
        self.nodes[1].generate(100)
        self.sync_all()

        # node0 should end up with 100 btc in block rewards plus fees, but
        # minus the 21 plus fees sent to node2
        assert_equal(self.nodes[0].getbalance(), 100-21)
        assert_equal(self.nodes[2].getbalance(), 21)

        # Node0 should have two unspent outputs.
        # Create a couple of transactions to send them to node2, submit them through
        # node1, and make sure both node0 and node2 pick them up properly:
        node0utxos = self.nodes[0].listunspent(1)
        assert_equal(len(node0utxos), 2)

        # create both transactions
        txns_to_send = []
        for utxo in node0utxos:
            inputs = []
            outputs = {}
            inputs.append({ "txid" : utxo["txid"], "vout" : utxo["vout"]})
            outputs[self.nodes[2].getnewaddress("from1")] = utxo["amount"]
            raw_tx = self.nodes[0].createrawtransaction(inputs, outputs)
            txns_to_send.append(self.nodes[0].signrawtransaction(raw_tx))

        # Have node 1 (miner) send the transactions
        self.nodes[1].sendrawtransaction(txns_to_send[0]["hex"], True)
        self.nodes[1].sendrawtransaction(txns_to_send[1]["hex"], True)

        # Have node1 mine a block to confirm transactions:
        self.nodes[1].generate(1)
        self.sync_all()

        assert_equal(self.nodes[0].getbalance(), 0)
        assert_equal(self.nodes[2].getbalance(), 100)
        assert_equal(self.nodes[2].getbalance("from1"), 100-21)

        # Send 10 BTC normal
        address = self.nodes[0].getnewaddress("test")
        self.nodes[2].settxfee(Decimal('0.001'))
        txid = self.nodes[2].sendtoaddress(address, 10, "", "", False)
        self.nodes[2].generate(1)
        self.sync_all()
        assert_equal(self.nodes[2].getbalance(), Decimal('89.99900000'))
        assert_equal(self.nodes[0].getbalance(), Decimal('10.00000000'))

        # Send 10 BTC with subtract fee from amount
        txid = self.nodes[2].sendtoaddress(address, 10, "", "", True)
        self.nodes[2].generate(1)
        self.sync_all()
        assert_equal(self.nodes[2].getbalance(), Decimal('79.99900000'))
        assert_equal(self.nodes[0].getbalance(), Decimal('19.99900000'))

        # Sendmany 10 BTC
        txid = self.nodes[2].sendmany('from1', {address: 10}, 0, "", [])
        self.nodes[2].generate(1)
        self.sync_all()
        assert_equal(self.nodes[2].getbalance(), Decimal('69.99800000'))
        assert_equal(self.nodes[0].getbalance(), Decimal('29.99900000'))

        # Sendmany 10 BTC with subtract fee from amount
        txid = self.nodes[2].sendmany('from1', {address: 10}, 0, "", [address])
        self.nodes[2].generate(1)
        self.sync_all()
        assert_equal(self.nodes[2].getbalance(), Decimal('59.99800000'))
        assert_equal(self.nodes[0].getbalance(), Decimal('39.99800000'))

        # Test ResendWalletTransactions:
        # Create a couple of transactions, then start up a fourth
        # node (nodes[3]) and ask nodes[0] to rebroadcast.
        # EXPECT: nodes[3] should have those transactions in its mempool.
        txid1 = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1)
        txid2 = self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 1)
        sync_mempools(self.nodes)

        self.nodes.append(start_node(3, self.options.tmpdir))
        connect_nodes_bi(self.nodes, 0, 3)
        sync_blocks(self.nodes)

        relayed = self.nodes[0].resendwallettransactions()
        assert_equal(set(relayed), set([txid1, txid2]))
        sync_mempools(self.nodes)

        assert(txid1 in self.nodes[3].getrawmempool())

        #do some -walletbroadcast tests
        stop_nodes(self.nodes)
        wait_bitcoinds()
        self.nodes = start_nodes(3, self.options.tmpdir, [["-walletbroadcast=0"],["-walletbroadcast=0"],["-walletbroadcast=0"]])
        connect_nodes_bi(self.nodes,0,1)
        connect_nodes_bi(self.nodes,1,2)
        connect_nodes_bi(self.nodes,0,2)
        self.sync_all()

        txIdNotBroadcasted  = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 2);
        txObjNotBroadcasted = self.nodes[0].gettransaction(txIdNotBroadcasted)
        self.nodes[1].generate(1) #mine a block, tx should not be in there
        self.sync_all()
        assert_equal(self.nodes[2].getbalance(), Decimal('59.99800000')); #should not be changed because tx was not broadcasted

        #now broadcast from another node, mine a block, sync, and check the balance
        self.nodes[1].sendrawtransaction(txObjNotBroadcasted['hex'])
        self.nodes[1].generate(1)
        self.sync_all()
        txObjNotBroadcasted = self.nodes[0].gettransaction(txIdNotBroadcasted)
        assert_equal(self.nodes[2].getbalance(), Decimal('61.99800000')); #should not be

        #create another tx
        txIdNotBroadcasted  = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 2);

        #restart the nodes with -walletbroadcast=1
        stop_nodes(self.nodes)
        wait_bitcoinds()
        self.nodes = start_nodes(3, self.options.tmpdir)
        connect_nodes_bi(self.nodes,0,1)
        connect_nodes_bi(self.nodes,1,2)
        connect_nodes_bi(self.nodes,0,2)
        sync_blocks(self.nodes)

        self.nodes[0].generate(1)
        sync_blocks(self.nodes)

        #tx should be added to balance because after restarting the nodes tx should be broadcastet
        assert_equal(self.nodes[2].getbalance(), Decimal('63.99800000')); #should not be

if __name__ == '__main__':
    WalletTest ().main ()


text:
namespace _11.Practice_Characters_and_Strings
{
    using System;

    public class PracticeCharactersAndStrings
    {
        public static void Main()
        {
            var softUni = "Software University";
            var charOne = 'B';
            var charTwo = 'y';
            var charThre = 'e';
            var someStrings = "I love programming";

            Console.WriteLine(softUni);
            Console.WriteLine(charOne);
            Console.WriteLine(charTwo);
            Console.WriteLine(charThre);
            Console.WriteLine(someStrings);

        }
    }
}


text:
<?php
/**
 * @package Coraline
 * @since Coraline 1.0
 */
?><!DOCTYPE html>

<html <?php language_attributes(); ?>>

<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php
	/*
	 * Print the <title> tag based on what is being viewed.
	 */
	global $page, $paged;

	wp_title( '|', true, 'right' );

	// Add the blog name.
	bloginfo( 'name' );

	// Add the blog description for the home/front page.
	$site_description = get_bloginfo( 'description', 'display' );
	if ( $site_description && ( is_home() || is_front_page() ) )
		echo " | $site_description";

	// Add a page number if necessary:
	if ( $paged >= 2 || $page >= 2 )
		echo ' | ' . sprintf( __( 'Page %s', 'coraline' ), max( $paged, $page ) );

	?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
	/* We add some JavaScript to pages with the comment form
	 * to support sites with threaded comments (when in use).
	 */
	if ( is_singular() && get_option( 'thread_comments' ) )
		wp_enqueue_script( 'comment-reply' );

	/* Always have wp_head() just before the closing
	 * tag of your theme, or you will break many plugins, which
	 * generally use this hook to add elements to  such
	 * as styles, scripts, and meta tags.
	 */
	wp_head();
?>

<body <?php body_class(); ?>>

<?php do_action( 'before' ); ?>

			<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
			<<?php echo $heading_tag; ?> id="site-title">

					<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?>

			</<?php echo $heading_tag; ?>>

<?php bloginfo( 'description' ); ?>

		  <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>

<a href="#content" title="<?php esc_attr_e( 'Skip to content', 'coraline' ); ?>"><?php _e( 'Skip to content', 'coraline' ); ?>

			<?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
			<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

			<?php
				// Check to see if the header image has been removed
				if ( get_header_image() != '' ) :
			?>
			<a href="<?php echo home_url( '/' ); ?>">
				<?php
					// The header image
					// Check if this is a post or page, if it has a thumbnail, and if it's a big one
					if ( is_singular() &&
							has_post_thumbnail( $post->ID ) &&
							( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
							$image[1] >= HEADER_IMAGE_WIDTH ) :
						// Houston, we have a new header image!
						echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
					else : ?>
					<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
				<?php endif; // end check for featured image or standard header ?>

			<?php endif; // end check for removed header image ?>


text:
<?php
/**
 * Mondido
 *
 * PHP version 5.6
 *
 * @category Mondido
 * @package  Mondido_Mondido
 * @author   Andreas Karlsson <andreas@kodbruket.se>
 * @license  MIT License https://opensource.org/licenses/MIT
 * @link     https://www.mondido.com
 */

namespace Mondido\Mondido\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;

/**
 * Install schema
 *
 * @category Mondido
 * @package  Mondido_Mondido
 * @author   Andreas Karlsson <andreas@kodbruket.se>
 * @license  MIT License https://opensource.org/licenses/MIT
 * @link     https://www.mondido.com
 */
class InstallSchema implements InstallSchemaInterface
{
    /**
     * Install
     *
     * @param Magento\Framework\Setup\SchemaSetupInterface   $setup   Schema setup interface
     * @param Magento\Framework\Setup\ModuleContextInterface $context Module context interface
     *
     * @return void
     */
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $installer = $setup;
        $installer->startSetup();

        $tables = [
            $installer->getTable('quote'),
            $installer->getTable('sales_order'),
            $installer->getTable('sales_order_grid')
        ];

        foreach ($tables as $table) {
            $installer->getConnection()->addColumn(
                $table,
                'mondido_transaction',
                [
                    'type'     => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    'length'   => '64k',
                    'unsigned' => true,
                    'nullable' => true,
                    'comment'  => 'Mondido Transaction'
                ]
            );
        }

        $installer->endSetup();
    }
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Echinocereus scheeri subsp. rischeri R.C.Römer

### Remarks
null


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.cordovanfcsample" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>cordova-nfc-sample</name>
  <description>
        Sample project demonstrating NFC usage in Cordova/Ionic project
    </description>
  <author email="bartosz.schiller@gmail.com" href="http://ionicpoland.github.io">
      Ionic Poland Team
    </author>
  <content src="index.html"/>
  <access origin="*"/>
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="android-minSdkVersion" value="16"/>
  <preference name="BackupWebStorage" value="none"/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="3000"/>
  <preference name="AndroidLaunchMode" value="singleTask"/>
  <feature name="StatusBar">
    <param name="ios-package" value="CDVStatusBar" onload="true"/>
  </feature>
  <platform name="android">
    <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
    <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
    <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
    <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
    <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
    <splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
    <splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
    <splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
    <splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
    <splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
    <splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
    <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
    <splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
    <splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
    <splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
    <splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
    <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
  </platform>
</widget>