text:
DotNetFreeSwitch
========================================

[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/Tochemey/DotNetFreeSwitch/build/trunk?style=flat-square)](https://github.com/Tochemey/ModFreeSwitch/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0)
[![Nuget](https://img.shields.io/nuget/v/DotNetFreeSwitch?style=flat-square)](https://www.nuget.org/packages/DotNetFreeSwitch/)

## **Introduction**

DotNetFreeSwitch is a socket library that helps interact with the FreeSwitch via its [mod_event_socket](https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket).
It has been written to run both on dotnet core 3.1 and 5.0 as well. The library is written using [DotNetty](https://github.com/Azure/DotNetty).

## **Features**

The library in its current state can be used to interact with FreeSwitch easily in:
* Inbound mode [Event Socket Inbound](https://freeswitch.org/confluence/display/FREESWITCH/mod_event_socket#mod_event_socket-Inbound)
* Outbound mode [Event Socket Outbound](https://wiki.freeswitch.org/wiki/Event_Socket_Outbound)
* One good thing it has is that you can implement your own FreeSwitch message encoder and decoder if you do not want to use the built-in ones

## **Installation**

```
 PM> Install-Package DotNetFreeSwitch
```

## **Example**

kindly check the Demo project in this repo.

## Contribution policy ##

Contributions via GitHub pull requests are gladly accepted from their original author. Along with
any pull requests, please state that the contribution is your original work and that you license
the work to the project under the project's open source license. Whether or not you state this
explicitly, by submitting any copyrighted material via pull request, email, or other means you
agree to license the material under the project's open source license and warrant that you have the
legal authority to do so.


text:
dojo.provide("dojo.widget.Parse");

dojo.require("dojo.widget.Manager");
dojo.require("dojo.dom");

dojo.widget.Parse = function(fragment) {
	this.propertySetsList = [];
	this.fragment = fragment;

	this.createComponents = function(frag, parentComp){
		var comps = [ ];
		var built = false;
		// if we have items to parse/create at this level, do it!
		try{
			if((frag)&&(frag["tagName"])&&(frag!=frag["nodeRef"])){
				var djTags = dojo.widget.tags;
				// we split so that you can declare multiple
				// non-destructive widgets from the same ctor node
				var tna = String(frag["tagName"]).split(";");
				for(var x=0; x<tna.length; x++){
					var ltn = (tna[x].replace(/^\s+|\s+$/g, "")).toLowerCase();
					if(djTags[ltn]){
						built = true;
						frag.tagName = ltn;
						var ret = djTags[ltn](frag, this, parentComp, frag["index"]);
						comps.push(ret);
					}else{
						if((dojo.lang.isString(ltn))&&(ltn.substr(0, 5)=="dojo:")){
							dojo.debug("no tag handler registed for type: ", ltn);
						}
					}
				}
			}
		}catch(e){
			dojo.debug("dojo.widget.Parse: error:", e);
			// throw(e);
			// IE is such a bitch sometimes
		}
		// if there's a sub-frag, build widgets from that too
		if(!built){
			comps = comps.concat(this.createSubComponents(frag, parentComp));
		}
		return comps;
	}

	/*	createSubComponents recurses over a raw JavaScript object structure,
			and calls the corresponding handler for its normalized tagName if it exists
	*/
	this.createSubComponents = function(fragment, parentComp){
		var frag, comps = [];
		for(var item in fragment){
			frag = fragment[item];
			if ((frag)&&(typeof frag == "object")&&(frag!=fragment.nodeRef)&&(frag!=fragment["tagName"])){
				comps = comps.concat(this.createComponents(frag, parentComp));
			}
		}
		return comps;
	}

	/*  parsePropertySets checks the top level of a raw JavaScript object
			structure for any propertySets.  It stores an array of references to
			propertySets that it finds.
	*/
	this.parsePropertySets = function(fragment) {
		return [];
		var propertySets = [];
		for(var item in fragment){
			if(	(fragment[item]["tagName"] == "dojo:propertyset") ) {
				propertySets.push(fragment[item]);
			}
		}
		// FIXME: should we store these propertySets somewhere for later retrieval
		this.propertySetsList.push(propertySets);
		return propertySets;
	}

	/*  parseProperties checks a raw JavaScript object structure for
			properties, and returns an array of properties that it finds.
	*/
	this.parseProperties = function(fragment) {
		var properties = {};
		for(var item in fragment){
			// FIXME: need to check for undefined?
			// case: its a tagName or nodeRef
			if((fragment[item] == fragment["tagName"])||
				(fragment[item] == fragment.nodeRef)){
				// do nothing
			}else{
				if((fragment[item]["tagName"])&&
					(dojo.widget.tags[fragment[item].tagName.toLowerCase()])){
					// TODO: it isn't a property or property set, it's a fragment,
					// so do something else
					// FIXME: needs to be a better/stricter check
					// TODO: handle xlink:href for external property sets
				}else if((fragment[item][0])&&(fragment[item][0].value!="")&&(fragment[item][0].value!=null)){
					try{
						// FIXME: need to allow more than one provider
						if(item.toLowerCase() == "dataprovider") {
							var _this = this;
							this.getDataProvider(_this, fragment[item][0].value);
							properties.dataProvider = this.dataProvider;
						}
						properties[item] = fragment[item][0].value;
						var nestedProperties = this.parseProperties(fragment[item]);
						// FIXME: this kind of copying is expensive and inefficient!
						for(var property in nestedProperties){
							properties[property] = nestedProperties[property];
						}
					}catch(e){ dojo.debug(e); }
				}
			}
		}
		return properties;
	}

	/* getPropertySetById returns the propertySet that matches the provided id
	*/

	this.getDataProvider = function(objRef, dataUrl) {
		// FIXME: this is currently sync.  To make this async, we made need to move
		//this step into the widget ctor, so that it is loaded when it is needed
		// to populate the widget
		dojo.io.bind({
			url: dataUrl,
			load: function(type, evaldObj){
				if(type=="load"){
					objRef.dataProvider = evaldObj;
				}
			},
			mimetype: "text/javascript",
			sync: true
		});
	}

	this.getPropertySetById = function(propertySetId){
		for(var x = 0; x < this.propertySetsList.length; x++){
			if(propertySetId == this.propertySetsList[x]["id"][0].value){
				return this.propertySetsList[x];
			}
		}
		return "";
	}

	/* getPropertySetsByType returns the propertySet(s) that match(es) the
	 * provided componentClass
	 */
	this.getPropertySetsByType = function(componentType){
		var propertySets = [];
		for(var x=0; x < this.propertySetsList.length; x++){
			var cpl = this.propertySetsList[x];
			var cpcc = cpl["componentClass"]||cpl["componentType"]||null;
			if((cpcc)&&(propertySetId == cpcc[0].value)){
				propertySets.push(cpl);
			}
		}
		return propertySets;
	}

	/* getPropertySets returns the propertySet for a given component fragment
	*/
	this.getPropertySets = function(fragment){
		var ppl = "dojo:propertyproviderlist";
		var propertySets = [];
		var tagname = fragment["tagName"];
		if(fragment[ppl]){
			var propertyProviderIds = fragment[ppl].value.split(" ");
			// FIXME: should the propertyProviderList attribute contain #
			// 		  syntax for reference to ids or not?
			// FIXME: need a better test to see if this is local or external
			// FIXME: doesn't handle nested propertySets, or propertySets that
			// 		  just contain information about css documents, etc.
			for(propertySetId in propertyProviderIds){
				if((propertySetId.indexOf("..")==-1)&&(propertySetId.indexOf("://")==-1)){
					// get a reference to a propertySet within the current parsed structure
					var propertySet = this.getPropertySetById(propertySetId);
					if(propertySet != ""){
						propertySets.push(propertySet);
					}
				}else{
					// FIXME: add code to parse and return a propertySet from
					// another document
					// alex: is this even necessaray? Do we care? If so, why?
				}
			}
		}
		// we put the typed ones first so that the parsed ones override when
		// iteration happens.
		return (this.getPropertySetsByType(tagname)).concat(propertySets);
	}

	/*
		nodeRef is the node to be replaced... in the future, we might want to add
		an alternative way to specify an insertion point

		componentName is the expected dojo widget name, i.e. Button of ContextMenu

		properties is an object of name value pairs
	*/
	this.createComponentFromScript = function(nodeRef, componentName, properties){
		var ltn = "dojo:" + componentName.toLowerCase();
		if(dojo.widget.tags[ltn]){
			properties.fastMixIn = true;
			return [dojo.widget.tags[ltn](properties, this, null, null, properties)];
		}else{
			if(ltn.substr(0, 5)=="dojo:"){
				dojo.debug("no tag handler registed for type: ", ltn);
			}
		}
	}
}

dojo.widget._parser_collection = {"dojo": new dojo.widget.Parse() };
dojo.widget.getParser = function(name){
	if(!name){ name = "dojo"; }
	if(!this._parser_collection[name]){
		this._parser_collection[name] = new dojo.widget.Parse();
	}
	return this._parser_collection[name];
}

/**
 * Creates widget.
 *
 * @param name     The name of the widget to create
 * @param props    Key-Value pairs of properties of the widget
 * @param refNode  If the last argument is specified this node is used as
 *                 a reference for inserting this node into a DOM tree else
 *                 it beomces the domNode
 * @param position The position to insert this widget's node relative to the
 *                 refNode argument
 * @return The new Widget object
 */

dojo.widget.createWidget = function(name, props, refNode, position){
	var lowerCaseName = name.toLowerCase();
	var namespacedName = "dojo:" + lowerCaseName;
	var isNode = ( dojo.byId(name) && (!dojo.widget.tags[namespacedName]) );

	// if we got a node or an unambiguious ID, build a widget out of it
	if(	(arguments.length==1) && ((typeof name != "string")||(isNode)) ){
		// we got a DOM node
		var xp = new dojo.xml.Parse();
		// FIXME: we should try to find the parent!
		var tn = (isNode) ? dojo.byId(name) : name;
		return dojo.widget.getParser().createComponents(xp.parseElement(tn, null, true))[0];
	}

	function fromScript (placeKeeperNode, name, props) {
		props[namespacedName] = {
			dojotype: [{value: lowerCaseName}],
			nodeRef: placeKeeperNode,
			fastMixIn: true
		};
		return dojo.widget.getParser().createComponentFromScript(
			placeKeeperNode, name, props, true);
	}

	if (typeof name != "string" && typeof props == "string") {
		dojo.deprecated("dojo.widget.createWidget",
			"argument order is now of the form " +
			"dojo.widget.createWidget(NAME, [PROPERTIES, [REFERENCENODE, [POSITION]]])");
		return fromScript(name, props, refNode);
	}

	props = props||{};
	var notRef = false;
	var tn = null;
	var h = dojo.render.html.capable;
	if(h){
		tn = document.createElement("span");
	}
	if(!refNode){
		notRef = true;
		refNode = tn;
		if(h){
			document.body.appendChild(refNode);
		}
	}else if(position){
		dojo.dom.insertAtPosition(tn, refNode, position);
	}else{ // otherwise don't replace, but build in-place
		tn = refNode;
	}
	var widgetArray = fromScript(tn, name, props);
	if (!widgetArray[0] || typeof widgetArray[0].widgetType == "undefined") {
		throw new Error("createWidget: Creation of \"" + name + "\" widget failed.");
	}
	if (notRef) {
		if (widgetArray[0].domNode.parentNode) {
			widgetArray[0].domNode.parentNode.removeChild(widgetArray[0].domNode);
		}
	}
	return widgetArray[0]; // just return the widget
}

dojo.widget.fromScript = function(name, props, refNode, position){
	dojo.deprecated("dojo.widget.fromScript", " use " +
		"dojo.widget.createWidget instead");
	return dojo.widget.createWidget(name, props, refNode, position);
}

redpajama_set_name: RedPajamaGithub


text:
cp -r $FEATHER_CPP/thirdparty .
./thirdparty/download_thirdparty.sh
source thirdparty/versions.sh

# this is created in Travis CI
export TP_DIR=$BUILD_DIR/thirdparty

if [ $TRAVIS_OS_NAME == "osx" ]; then
  ./thirdparty/build_thirdparty.sh
fi

if [ $TRAVIS_OS_NAME == "linux" ]; then
  ./thirdparty/build_thirdparty.sh
fi

export GTEST_HOME=$TP_DIR/$GTEST_BASEDIR
export FLATBUFFERS_HOME=$TP_DIR/installed

FEATHER_SRC=$FEATHER_CPP/src/feather


text:
This is my go at the hypothes.is code test described in `TASK.md`

## Usage

This solution is packaged as a ruby gem, and contains `.ruby-version` and `.ruby-gemset`
files to use with `rvm` (and possibly other ruby version managers).

In order to run this solution, the easiest way is to run `bundle install` followed
by `rake install`. This will build the gem and install it locally. It can then be
explored in a REPL by just requiring it:

```
irb> require 'hypothesis'
```

The file `run.rb` shows an example of how to use the interface for this solution.


text:
package com.baidu.palo.analysis;

import com.baidu.palo.catalog.Column;
import com.baidu.palo.catalog.ColumnType;
import com.baidu.palo.qe.ShowResultSetMetaData;

public class ShowWhiteListStmt extends ShowStmt {
    private static final ShowResultSetMetaData META_DATA =
            ShowResultSetMetaData.builder()
                    .addColumn(new Column("user_name", ColumnType.createVarchar(20)))
                    .addColumn(new Column("white_list", ColumnType.createVarchar(1000)))
                    .build();

    @Override
    public void analyze(Analyzer analyzer) {
    }

    @Override
    public ShowResultSetMetaData getMetaData() {
        return META_DATA;
    }
}


text:
#import <DevToolsCore/XCCompilerSpecification.h>

@class NSString;

@interface PBXCompilerSpecificationGcc : XCCompilerSpecification
{
    NSString *_rawGccVersionString;
}

+ (id)systemGccVersionStringForDomain:(id)arg1;
- (void)addIdentifierToListOfCompilersUsedInTargetBuildContext:(id)arg1;
- (id)builtinBracketSearchPathsInBuildContext:(id)arg1 forLanguageDialect:(id)arg2;
- (id)builtinFrameworkSearchPathsInBuildContext:(id)arg1 forLanguageDialect:(id)arg2;
- (id)builtinMacroDefinitionsInBuildContext:(id)arg1 forLanguageDialect:(id)arg2;
- (id)builtinQuoteSearchPathsInBuildContext:(id)arg1 forLanguageDialect:(id)arg2;
- (id)compileSourceCodeFileAtPath:(id)arg1 ofType:(id)arg2 toOutputDirectory:(id)arg3 inTargetBuildContext:(id)arg4;
- (id)compilerDriverRawVersionString;
- (id)compilerDriverVersionStringInBuildContext:(id)arg1;
- (id)computeDependenciesForInputFile:(id)arg1 ofType:(id)arg2 variant:(id)arg3 architecture:(id)arg4 outputDirectory:(id)arg5 inTargetBuildContext:(id)arg6;
- (void)dealloc;
- (id)discoveredCompilerDriverInfoInBuildContext:(id)arg1 forLanguageDialect:(id)arg2;
- (BOOL)dwarfSymbolRepositoryIsEnabledInTargetBuildContext:(id)arg1;
- (id)effectiveCompilerSpecificationForFileType:(id)arg1 inPropertyExpansionContext:(id)arg2 platformDomain:(id)arg3;
- (id)executablePathInTargetBuildContext:(id)arg1;
- (id)executablePathInTargetBuildContext:(id)arg1 forLanguageDialect:(id)arg2;
- (id)initWithPropertyListDictionary:(id)arg1 inDomain:(id)arg2;
- (id)name;
- (id)precompileHeaderFileAtPath:(id)arg1 forSourceFileOfType:(id)arg2 withExtraFlags:(id)arg3 toPrecompPath:(id)arg4 inTargetBuildContext:(id)arg5;
- (void)rememberCompilerDriverForLinkingInTargetBuildContext:(id)arg1;
- (BOOL)symbolSeparationIsEnabledInTargetBuildContext:(id)arg1;

@end


text:
package rice.post.messaging;

import java.io.*;
import java.security.*;

import rice.p2p.commonapi.Endpoint;
import rice.p2p.commonapi.rawserialization.*;
import rice.post.messaging.*;
import rice.post.*;

/**
 * This message is broadcast to the sender of a NotificationMessage in
 * order to inform the sender that the message has been received.
 */
public class DeliveryLookupResponseMessage extends PostMessage {
  public static final short TYPE = 3;

  private DeliveryRequestMessage message;

  /**
    * Constructs a DeliveryLookupResponseMessage
   *
   * @param sender The sender of this delivery request
   * @param message The requested message
   */
  public DeliveryLookupResponseMessage(PostEntityAddress sender,
                                       DeliveryRequestMessage message) {
    super(sender);
    this.message = message;
  }

  /**
    * Gets the random locaiton of this drm
   *
   * @return The locaiton
   */
  public DeliveryRequestMessage getEncryptedMessage() {
    return message;
  }

  public DeliveryLookupResponseMessage(InputBuffer buf, Endpoint endpoint) throws IOException {
    super(buf, endpoint);

    message = new DeliveryRequestMessage(buf, endpoint);
  }

  public void serialize(OutputBuffer buf) throws IOException {
    super.serialize(buf);

    message.serialize(buf);
  }

  public short getType() {
    return TYPE;
  }

}


text:
const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const SimpleProgressPlugin = require('webpack-simple-progress-plugin');
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
const WriteFilePlugin = require('write-file-webpack-plugin');
const RobotstxtPlugin = require('robotstxt-webpack-plugin').default;
const pkg = require('./package.json');

const PORT = process.env.PORT || 3000;
const HOST = process.env.HOST || 'localhost';
const NODE_ENV = process.env.NODE_ENV || 'production';
const isProduction = (NODE_ENV === 'production');
const isDevelopment = (NODE_ENV === 'development');

const webpackConfig = {
    entry: isDevelopment
        ? [
            'babel-polyfill',

            'react-hot-loader/patch', // activate HMR for React
            `webpack-hot-middleware/client?path=http://${HOST}:${PORT}/__webpack_hmr`, // bundle the client for webpack-hot-middleware and connect to the provided endpoint

            './src/client.jsx',
        ]
        : [
            'babel-polyfill',

            './src/client.jsx',
        ],

    resolve: {
        extensions: ['.js', '.jsx', '.json'],
    },

    output: {
        path: path.join(__dirname, 'dist/public/'),
        chunkFilename: 'assets/scripts/[name].[chunkhash].js',
        filename: isDevelopment
            ? 'main.js'
            : 'assets/scripts/[name].[chunkhash].js',
    },

    module: {
        rules: [
            {
                test: /\.s?css$/,
                use: ['css-hot-loader'].concat(
                    ExtractTextPlugin.extract({
                        fallback: 'style-loader',
                        use: [
                            {
                                loader: 'css-loader',
                                options: {
                                    minimize: isProduction,
                                    sourceMap: !isProduction
                                },
                            },
                            {
                                loader: 'sass-loader',
                                options: {
                                    sourceMap: !isProduction
                                }
                            },
                        ],
                    })
                ),
            },
            {
                test: /\.jsx?$/,
                use: ['babel-loader'],
                include: path.join(__dirname, 'src'),
            },
        ],
    },

    plugins: [
        new SimpleProgressPlugin(),

        new webpack.DefinePlugin({
            'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
        }),

        isDevelopment
            ? null
            : new webpack.optimize.ModuleConcatenationPlugin(),

        isDevelopment
            ? new webpack.HotModuleReplacementPlugin() // enable HMR globally
            : null,
        isDevelopment
            ? new webpack.NamedModulesPlugin() // prints more readable module names in the browser console on HMR updates
            : null,
        isDevelopment
            ? new webpack.NoEmitOnErrorsPlugin() // do not emit compiled assets that include errors
            : null,

        new ExtractTextPlugin({
            filename: isDevelopment
                ? 'assets/styles/main.css'
                : 'assets/styles/[name].[chunkhash].css',
        }),

        isDevelopment
            ? null
            : new webpack.optimize.CommonsChunkPlugin({
                name: 'vendor',
                minChunks: module => /node_modules/.test(module.resource),
            }),

        isDevelopment
            ? null
            : new webpack.optimize.CommonsChunkPlugin({name: 'manifest'}),

        isProduction
            ? new webpack.optimize.UglifyJsPlugin()
            : null,

        isDevelopment
            ? null
            : new webpack.BannerPlugin(`${pkg.version} ${new Date().toString()}`),

        new HtmlWebpackPlugin({
            template: path.resolve(__dirname, 'src/index.html'),
            minify: isProduction ? {collapseWhitespace: true, collapseInlineTagWhitespace: true} : false,
            alwaysWriteToDisk: true,
        }),
        new HtmlWebpackHarddiskPlugin(),

        new CopyWebpackPlugin([
            {
                context: 'src/assets',
                from: '**/*',
                to: 'assets',
                ignore: ['styles/**/*'],
            },
        ]),

        new RobotstxtPlugin({
            policy: [
                isProduction
                    ? {userAgent: '*', allow: '/'}
                    : {userAgent: '*', disallow: '/'},
            ],
        }),

        new WriteFilePlugin(), // Forces webpack-dev-server to write files.
    ].filter(Boolean),

    devtool: isProduction
        ? 'none'
        : 'source-map',

    performance: {
        maxAssetSize: 500000,
    },
};

module.exports = webpackConfig;


text:
class Die
  attr_accessor :numbers

  def initialize sides=6
    @numbers = [* 1..sides]
  end

  def combinations *dice
    dice.map! {|d| d.numbers}
    @numbers.product *dice
  end

  def sides
    @numbers.length
  end
end


text:
module Asciidoctor
  module DocTest
    VERSION = '2.0.0.beta.7'
  end
end


text:
<?php

/**
 * Classe implémentant le singleton pour PDO
 * @author Savageman
 */

class PDOConnector extends PDO {

    private static $_instance;

    public static $log = null;

    /* Constructeur : héritage public obligatoire par héritage de PDO */
    public function __construct( ) {

    }
    // End of PDOConnector::__construct() */

    /* Singleton */
    public static function getInstance() {

        if (!isset(self::$_instance)) {

            try {

                self::$_instance = new PDO(SQL_DSN, SQL_USERNAME, SQL_PASSWORD);

            } catch (PDOException $e) {

                self::sendLog($e);
                //echo $e;
                echo "Database error";
                die();
            }
        }
        return self::$_instance;
    }
    // End of PDOConnector::getInstance() */

    private static function sendLog($message) {
        if(self::$log != null) {
            $log = self::$log;
            $log('PDOConnector: ' . $message);
        }
    }
}


text:
require 'spec_helper'

module RubyChessBoard
  describe BoardFile::EmptySquare do
    subject(:square) { build(:empty_square) }

    describe "equality testing" do
      it "is equal to any other empty square" do
        square_2 = build(:empty_square)
        expect(square).to eq(square_2)
      end

      it "is not equal to things that are not empty squares" do
        pawn = build(:pawn)
        expect(square).to_not eq(pawn)
      end
    end
  end
end


text:
MathJax.Localization.addTranslation("sl","MathML",{
        version: "2.7.2",
        isLoaded: true,
        strings: {
          BadMglyph: "Neveljaven mglyph: %1",
          BadMglyphFont: "Neveljavna pisava: %1",
          MathPlayer: "MathJax ni mogel nastaviti programa MathPlayer.\n\n\u010Ce MathPlayer ni name\u0161\u010Den, ga morate najprej namestiti. Sicer morda njegov zahon prepre\u010Dujejo va\u0161e varnostne nastavitve. Uporabite element Internetne mo\u017Enosti [Internet Options] pod menijem Orodja [Tools] in izberite zavihek Varnost [Security], nato pritisnite gumb Prilagojena raven [Custom Level]. Preverite, alo so nastavitve za 'Za\u017Eeni krmilne elemente ActiveX' in 'Binarna in skriptna vedenja' omogo\u010Dene.\n\nTrenutno boste namesto matematike videli sporo\u010Dila o napakah.",
          CantCreateXMLParser: "MathJax ne more ustvariti raz\u010Dlenjevalnika XML za MathML. Preverite, ali je varnostna nastavitev 'Krmilni elementi Script ActiveX ozna\u010Deni kot varni za skriptiranje' omogo\u010Dena (da to preverite, v meniju Orodja [Tools] uporabite element Internetne mo\u017Enosti [Internet Options], nato izberite plo\u0161\u010Do Varnost [Security], nato pritisnite gumb Prilagojena raven [Custom Level]).",
          UnknownNodeType: "Neznana vrsta vozli\u0161\u010Da: %1",
          UnexpectedTextNode: "Nepri\u010Dakovano tekstovno vozli\u0161\u010De: %1",
          ErrorParsingMathML: "Napaka pri raz\u010Dlenjevanju MathML",
          ParsingError: "Napaka pri raz\u010Dlenjevanju MathML: %1",
          MathMLSingleElement: "MathML mora biti oblikovan z enim samim elementom",
          MathMLRootElement: "MathML mora biti oblikovan z elementom \u003Cmath\u003E, ne s korenom %1"
        }
});

MathJax.Ajax.loadComplete("[MathJax]/localization/sl/MathML.js");


text:
class Fenix : public Inimigo {

	protected:
		int lvl;
	public:
        Fenix(int lvl, Sprite* textura);

};

#endif


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

namespace Aspose.Pdf.Examples.CSharp.AsposePDF.Working_Document
{
    public class RemoveUnusedStreams
    {
        public static void Run()
        {
            // ExStart:RemoveUnusedStreams
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_AsposePdf_WorkingDocuments();
            // Open document
            Document pdfDocument = new Document(dataDir + "OptimizeDocument.pdf");
            // Set RemoveUsedStreams option
            var optimizeOptions = new Pdf.Optimization.OptimizationOptions
            {
                RemoveUnusedStreams = true
            };
            // Optimize PDF document using OptimizationOptions
            pdfDocument.OptimizeResources(optimizeOptions);
            dataDir = dataDir + "OptimizeDocument_out.pdf";
            // Save updated document
            pdfDocument.Save(dataDir);
            // ExEnd:RemoveUnusedStreams
            Console.WriteLine("\nUnused streams removed successfully.\nFile saved at " + dataDir);
        }
    }
}


text:
<?php
/*
 * XTemplate plugin
 * -------------------------------------------------------------
 * Type:	 function
 * Name:	 db_result_call
 * Purpose:  Interface with ADOdb Lite to return all result elements to assigned variable.
 *
 * db_object = Database object
 * db_function = Database result function to execute
 * db_result_object = Database result object
 * db_assign = variable name to assign result data
 * db_errornumber_assign = variable name to assign the database error number
 * db_error_assign = the variable name to assign the database error message
 * db_EOF_assign = the variable name to assign the database end of file flag
 * -------------------------------------------------------------
 */
function tpl_function_db_result_call($params, &$template_object)
{
	if (empty($params['db_object']))
	{
		$template_object->trigger_error("db_result_call: missing db_object parameter");
		return;
	}

	if (!is_object($params['db_object']))
	{
		$template_object->trigger_error("db_result_call: db_object isn't an object");
		return;
	}

	$db = $params['db_object'];

	if (empty($params['db_result_object']))
	{
		$template_object->trigger_error("db_result_call: missing db_result_object parameter");
		return;
	}

	if (!is_object($params['db_result_object']))
	{
		$template_object->trigger_error("db_result_call: db_result_object isn't an object");
		return;
	}

	$result_object = $params['db_result_object'];

	if (empty($params['db_assign']))
	{
		$template_object->trigger_error("db_result_call: missing db_assign parameter");
		return;
	}

	if (empty($params['db_function']))
	{
		$template_object->trigger_error("db_result_call: missing db_function parameter");
		return;
	}

	$db_function = $params['db_function'];

	$result = $result_object->$db_function();

	$template_object->assign($params['db_assign'], $result);

	if (!empty($params['db_errornumber_assign']))
	{
		$template_object->assign($params['db_errornumber_assign'], $db->ErrorNo());
	}

	if (!empty($params['db_error_assign']))
	{
		$template_object->assign($params['db_error_assign'], $db->ErrorMsg());
	}

	if (!empty($params['db_EOF_assign']))
	{
		$template_object->assign($params['db_EOF_assign'], $result_object->EOF);
	}
}
?>


text:
module DC
  module Embed
    class Page < Base
      class Config < Base::Config
        define_attributes do
          number  :maxheight
          number  :maxwidth
        end
      end

      def initialize(resource, embed_config={}, options={})
        # resource should be a wrapper object around a model
        # which plucks out relevant metadata
        # Consider ActiveModel::Serializers for this purpose.
        # N.B. we should be able to generate oembed codes for things that are
        # basically mocks of a document, not just for real documents
        [:id, :resource_url].each do |attribute|
          raise ArgumentError, "Embed resource must `respond_to?` an ':#{attribute}' attribute" unless resource.respond_to?(attribute)
        end
        @resource      = resource
        @embed_config  = Config.new(embed_config)
        @strategy      = options[:strategy]      || :literal # :oembed is the other option.
        @dom_mechanism = options[:dom_mechanism] || :direct

        @template_path = options[:template_path] || "#{Rails.root}/app/views/pages/_embed_code.html.erb"
        @template      = options[:template]
      end

      def template
        unless @template
          @template = ERB.new(File.read(@template_path))
          #@template.location = @template_path # uncomment this once deployed onto Ruby 2.2
        end
        @template
      end

      def render(data, options)
        template.result(binding)
      end

      # TODO: Consider how page embed works (HTML + enhancer), and customize
      # `content_markup` and `bootstrap_markup` accordingly. See
      # `DC::Embed::Base#code`

      # Page embed uses a noscript-style enhancer, which prefers content markup
      # before bootstrap markup
      def code
        content_markup
      end

      def content_markup
        template_options = {
          :resource_url => @resource.resource_url
        }

        render(@embed_config.dump, template_options)
      end

      def bootstrap_markup
        @strategy == :oembed ? inline_loader : static_loader
      end

      def inline_loader
        <<-SCRIPT
        <script>
          #{ERB.new(File.read("#{Rails.root}/app/views/embed/enhance.js.erb")).result(binding)}
        </script>
        SCRIPT
      end

      def static_loader
        %(<script type="text/javascript" src="#{DC.cdn_root(:agnostic => true)}/embed/loader/enhance.js"></script>)
      end

      # intended for use in the static deployment to s3.
      def self.static_loader(options={})
        template_path = "#{Rails.root}/app/views/embed/enhance.js.erb"
        ERB.new(File.read(template_path)).result(binding)
      end

      def as_json
        if @strategy == :oembed
          {
            :type             => "rich",
            :version          => "1.0",
            :provider_name    => "DocumentCloud",
            :provider_url     => DC.server_root(:force_ssl => true),
            :cache_age        => 300,
            :height           => @embed_config[:maxheight],
            :width            => @embed_config[:maxwidth],
            :html             => code,
          }
        else
          @resource.as_json.merge(:html => code)
        end
      end
    end
  end
end


text:
<?php

namespace Mimic\Test;

use PHPUnit_Framework_TestCase;
use Mimic\Functional as F;

/**
 * Unit Test for maximum Mimic library function.
 *
 * @since 0.1.0
 *
 * @todo Need to use QuickTest library.
 */
class MaximumFuncTest extends PHPUnit_Framework_TestCase {
	public function dataProvider() {
		return array(
			array(5, array(1, 2, 3, 4, 5)),
			array(200, array(-1, 0, 1, 200, 3, 4, 5)),
			array(2, array(0, '', 'something', 'what', 1, 2)),
			array(3.56, array(1.5, 2.5, 2.5, 2.5, 3.5, 3.56)),
			array(null, array('', 'Something5', 'okay', 'what')),
		);
	}

	/**
	 * @dataProvider dataProvider
	 * @covers ::Mimic\Functional\maximum
	 */
	public function testResults($result, $collection) {
		$this->assertEquals($result, F\maximum($collection));
	}
}


text:
layout: post
title: I Hate Myself But I Still Hate HTML Too
category: posts
---

In a stunning insight that I'm sure they teach you on the first day of HTML school, I realized why I was having so much trouble getting a "Related Posts" plugin working.

I couldn't figure out why pages remained the same even after I was pulling all of the code out of them.  Equally frustrating was when they started changing at random a few minutes later.  I forgot I had the wp-cache program running, which caused the delay between changes to the code being made and changes to the pages displaying.

Once I disabled that and cleared the cache, every change I made was instantly recognized.  Getting the formatting set took only a few short minutes after that.

Whew.

Unfortunately, I reinstalled most of my wordpress theme files in an attempt to troubleshoot this, which means I lost my personalized page banners.  Hopefully it shouldn't take too long to recrop them and reup them sometime tomorrow.

Lesson learned?  Backup everything.  And don't be an idiot.


text:
package org.hss.sny.sooryanamaskarayagnya;

import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.Menu;
import android.view.MenuItem;

import java.util.Locale;

public class MainActivity extends Activity implements ActionBar.TabListener, MembersFragment.OnFragmentInteractionListener {

    private static final int FRAGMENT_TYPE_MEMBERS = 0;
    private static final int FRAGMENT_TYPE_STATS = 1;
    private static final int FRAGMENT_TYPE_MEDIA = 2;
    //private static final int FRAGMENT_TYPE_MSGS = 2;
    private static final int FRAGMENT_TYPES= FRAGMENT_TYPE_MEDIA + 1;

    StatisticsFragment mStatsFragment;
    MembersFragment mMembersFragment;
    MediaFragment mMediaFragment;

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

        // Set up the action bar.
        final ActionBar actionBar = getActionBar();
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
        // For each of the sections in the app, add a tab to the action bar.
        for (int i = 0; i < FRAGMENT_TYPES; i++) {
            // Create a tab with text corresponding to the page title defined by
            // the adapter. Also specify this Activity object, which implements
            // the TabListener interface, as the callback (listener) for when
            // this tab is selected.
            actionBar.addTab(actionBar.newTab().setText(getPageTitle(i)).setTabListener(this).setTag(i));
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
        Long primaryId = sharedPreferences.getLong(Constants.SHARED_PREF_PRIMARY_MEMBER_ID, 0);
        if (primaryId <= 0) {
            startActivity(new Intent(this, RegistrationActivity.class));
            finish();
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_add_mem) {
            startActivity(new Intent(this, AddMemberActivity.class));
            return true;
        }

        return super.onOptionsItemSelected(item);
    }

    @Override
    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
        // When the given tab is selected, switch to the corresponding page in
        // the ViewPager.
        int id = (Integer)tab.getTag();
        switch (id) {
            case FRAGMENT_TYPE_STATS:
                if (mStatsFragment == null) {
                    mStatsFragment = StatisticsFragment.newInstance(null, null);
                    fragmentTransaction.add(android.R.id.content, mStatsFragment);
                } else {
                    fragmentTransaction.attach(mStatsFragment);
                }
                break;

            case FRAGMENT_TYPE_MEDIA:
                if (mMediaFragment == null) {
                    mMediaFragment = MediaFragment.newInstance(null, null);
                    fragmentTransaction.add(android.R.id.content, mMediaFragment);
                } else {
                    fragmentTransaction.attach(mMediaFragment);
                }
                break;
            default:
                if (mMembersFragment == null) {
                    mMembersFragment = MembersFragment.newInstance(null, null);
                    fragmentTransaction.add(android.R.id.content, mMembersFragment);
                } else {
                    fragmentTransaction.attach(mMembersFragment);
                }
                break;
        }

    }

    @Override
    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
        int id = (Integer)tab.getTag();
        Fragment fragment = null;
        switch (id) {
            case FRAGMENT_TYPE_STATS:
                fragment = mStatsFragment;
                break;
            case FRAGMENT_TYPE_MEDIA:
                fragment = mMediaFragment;
                break;
            case FRAGMENT_TYPE_MEMBERS:
                fragment = mMembersFragment;
                break;
        }
        if (fragment != null) {
            fragmentTransaction.detach(fragment);
        }
    }

    @Override
    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
    }

    @Override
    public void onFragmentInteraction(Member member) {
        startActivity(new Intent(this, MemberLogsActivity.class)
                .putExtra(MemberLogsActivity.EXTRA_MEMBER_UID, member.uid));
    }

    public CharSequence getPageTitle(int position) {
        Locale l = Locale.getDefault();
        switch (position) {
            case FRAGMENT_TYPE_MEMBERS:
                return getString(R.string.members).toUpperCase(l);
            case FRAGMENT_TYPE_STATS:
                return getString(R.string.stats).toUpperCase(l);
                /*
                case FRAGMENT_TYPE_MSGS:
                    return getString(R.string.messages).toUpperCase(l);
                    */
            case FRAGMENT_TYPE_MEDIA:
                return getString(R.string.media).toUpperCase(l);
        }
        return null;
    }
}


text:
<?php

if ( ! defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Manage user files.
 *
 * @package CarbonCopy
 * @subpackage cc
 * @author porquero
 */
class file extends MX_Controller {

    /**
     * Make downloable file from slug_context
     *
     * @param string $slug_context
     */
    public function download($slug_context)
    {
        if ( ! (is_connected() && belongs_to('topic', parent_context($slug_context), connected_user()))) {
            die(lang('not_belongs_to_topic'));
        }

        $this->load->helper('file');

        $file = urldecode(file_real_path($slug_context));

        if ($file === FALSE) {
            die('Error: File not found.');
        }

        // Set headers.
        header('Cache-Control: public');
        header('Content-Description: File Transfer');
        header('Content-Disposition: attachment; filename=' . urldecode(get_name_from_slug($slug_context)));
        header('Content-Type: ' . get_mime_by_extension($file));
        header('Content-Transfer-Encoding: binary');

        // Read the file from disk
        readfile($file);
    }

    /**
     * Upload file for especified path
     *
     * @param string $path_upload
     * @return array
     */
    public function upload($path_upload)
    {
        is_connected();

        $config['upload_path'] = $path_upload;
        $config['allowed_types'] = '*';
        $config['max_width'] = 4000;
        $config['max_height'] = 4000;
        $config['overwrite'] = FALSE;
        $config['remove_spaces'] = FALSE;
        $config['file_name'] = clean_uploaded_file_name($_FILES['userfile']['name']);
//        $config['max_filename'] = 64;

        $this->load->library('upload', $config);

        if ( ! $this->upload->do_upload()) {
            $error = array('error' => $this->upload->display_errors());

            return array(
                'result' => 'fail',
                'data' => $error
            );
        }
        else {
            $data = array('upload_data' => $this->upload->data());

            return array(
                'result' => 'ok',
                'data' => $data
            );
        }
    }

}


text:
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#import <Foundation/Foundation.h>

/**
  Describes the callback for fetchDeferredAppLink.
 @param url the url representing the deferred App Link
 @param error the error during the request, if any

 The url may also have a fb_click_time_utc query parameter that
 represents when the click occurred that caused the deferred App Link to be created.
 */
typedef void (^FBSDKDeferredAppLinkHandler)(NSURL *url, NSError *error);

/**
  Describes the callback for fetchOrganicDeferredAppLink.
 @param url the url representing the deferred App Link
 */
typedef void (^FBSDKDeferredAppInviteHandler)(NSURL *url);

/**
  Class containing App Links related utility methods.
 */
@interface FBSDKAppLinkUtility : NSObject

/**
  Call this method from the main thread to fetch deferred applink data if you use Mobile App
 Engagement Ads (https://developers.facebook.com/docs/ads-for-apps/mobile-app-ads-engagement).
 This may require a network round trip. If successful, the handler is invoked  with the link
 data (this will only return a valid URL once, and future calls will result in a nil URL
 value in the callback).

 @param handler the handler to be invoked if there is deferred App Link data

 The handler may contain an NSError instance to capture any errors. In the
 common case where there simply was no app link data, the NSError instance will be nil.

 This method should only be called from a location that occurs after any launching URL has
 been processed (e.g., you should call this method from your application delegate's
 applicationDidBecomeActive:).
 */
+ (void)fetchDeferredAppLink:(FBSDKDeferredAppLinkHandler)handler;

/**

@warning This method is no longer available and will always return NO.
 */
+ (BOOL)fetchDeferredAppInvite:(FBSDKDeferredAppInviteHandler)handler
DEPRECATED_MSG_ATTRIBUTE("This method is no longer available.");

/*
  Call this method to fetch promotion code from the url, if it's present. This function
 requires Bolts framework.

 Note: This throws an exception if Bolts.framework is not linked. Add '[BFURL class]' in intialize method
 of your AppDelegate.

 @param url App Link url that was passed to the app.

 @return Promotion code string.

 Call this method to fetch App Invite Promotion Code from applink if present.
 This can be used to fetch the promotion code that was associated with the invite when it
 was created. This method should be called with the url from the openURL method.
*/
+ (NSString*)appInvitePromotionCodeFromURL:(NSURL*)url;

@end


text:
<!doctype html>

    <meta charset="utf-8">
	<title> App-Store </title>
	<meta name="description" content="A powerful platform to find all apps you would never dream of!" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Annls mycol. 9(1): 32 (1911)

#### Original name
Phoma thalictrina Sacc. & Malbr.

### Remarks
null


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Vanilla ReadMe</title>
	<link rel="stylesheet" href="applications/dashboard/design/setup.css" type="text/css" />

Version 2

Welcome!

Vanilla was born out of the desire to create customizable, integratable, and downright entertaining community solutions. Vanilla has been used to power over 400,000 community forums around the world - We couldn't be happier that you've decided to use Vanilla to grow yours.

- Mark O'Sullivan

Requirements

PHP version 5.2.0 or newer.

The pdo_mysql module must be enabled (it is enabled by default, but some web hosts disable it).

MySQL 5 or newer.

Installation

Upload this entire file structure up to your web server.

Navigate to that folder in your web browser.

Follow the instructions on screen.

If you run into any issues during your install, it is most often related to file permissions on your server. Try granting PHP write access to the following files & folders:

/cache/*

/conf/config.php (if this file doesn't exist, don't worry about it)

/uploads/*

Upgrading from Vanilla 1 to Vanilla 2

Some of your customizations to your Vanilla 1 forum (plugins, themes, and translations) will not be easily portable to Vanilla 2. You will most likely need to create a new theme for your forum.

Important: Back up all of your existing files and your database.

Delete all of your Vanilla 1 files.

Upload this entire file structure to your web server.

         Vanilla 2 requires that PHP have read/write access to the following files/folders:

/conf

/cache/*

/uploads/*

Browse to your Vanilla 2 files in your favourite web browser and follow the installation instructions. Make sure to use the same database that your Vanilla 1 tables are in.

Browse to http://yourdomain.com/path/to/vanilla/import and follow the instructions.

Navigate to the role management screen and re-assign each role's permissions.

Additional Resources

If you are having difficulties, encountered errors, or just have some basic questions, here are some additional resources to help you out:

         Vanilla Documentation

The Vanilla Documentation is a community-managed set of documents that cover topics from getting Vanilla installed to creating plugins and themes.

         Vanilla Community Forums

The Vanilla Community Forums are a free resource where users, fans, and developers can help each other with all Vanilla-related questions.

Giving Back

Once you experience all the ways that Vanilla can help you grow your community, you'll be as excited about Vanilla as we are. All we ask in exchange for your use of this software is that you tell others about it. The more people you tell, the more people use it, the more time we can devote to making it even better.

Copyright

Vanilla is released under the GPL (see LICENSE.txt).


text:
<?php

$selected = json_decode($_POST["Dishes"], true);
$tablenum = $_POST["table"];
date_default_timezone_set("Europe/London");

include_once "DBConnect.php";

// need to check if the table is empty or not
$sql = "select max(OrderNum) from orderlist";
$result = $conn->query($sql);
$ordernum = array_shift($result->fetch_assoc());
if (strlen($ordernum) == 16) {
	$resid = substr($ordernum, 0, 4);
	$date = substr($ordernum, 4, 8);
	$ordered = (int)(substr($ordernum, 12));
} else {
	$resid = "0001";
	$date = date("Ymd");
	$ordered = 0;
}

// needs to decide which date to use, in php, or in mysql
if ($date == date("Ymd")) {
	$ordered = $ordered + 1;
} else {
	$ordered = 1;
}

$ordered = (string)$ordered;

if (strlen($ordered) != 4){
	$ordered = str_repeat('0', (4-strlen($ordered))) . $ordered;
}

$ordernum = $resid . date("Ymd") . $ordered;

//here maybe we can use prepare, since there are so many commands to execute in mysql
foreach ($selected as $key => $value) {
	$dishid = (string)$key;
	if (strlen($dishid) != 4){
		$dishid = str_repeat('0', (4-strlen($dishid))) . $dishid;
	}
	for ($i=0; $i<$value; $i++) {
		$dishorder = (string)$i;
		if (strlen($dishid) != 2){
			$dishorder = '0' . $dishorder;
		}
		$sql = "insert into orderlist values (curdate(), '".$ordernum."', ".$tablenum.", '".$dishid.$dishorder."', 0, 0)";
		$conn->query($sql);
	}
}

echo($ordernum);


text:
#include "atomicBlock/dataProcessingFunctional2D.h"
#include "atomicBlock/dataProcessingFunctional2D.hh"

namespace plb {

/* *************** Boxed Data Processor functionals ****************** */

template class BoxProcessingFunctional2D_N<PRECOMP_T>;
template class BoxProcessingFunctional2D_S<PRECOMP_T>;
template class MaskedBoxProcessingFunctional2D_N<PRECOMP_T>;
template class BoxProcessingFunctional2D_NN<PRECOMP_T,int>;
template class BoxProcessingFunctional2D_NN<PRECOMP_T,float>;
template class BoxProcessingFunctional2D_NN<PRECOMP_T,double>;
template class BoxProcessingFunctional2D_SS<PRECOMP_T,int>;
template class BoxProcessingFunctional2D_SS<PRECOMP_T,float>;
template class BoxProcessingFunctional2D_SS<PRECOMP_T,double>;
template class MaskedBoxProcessingFunctional2D_NN<PRECOMP_T,float>;
template class MaskedBoxProcessingFunctional2D_NN<PRECOMP_T,double>;
template class MaskedBoxProcessingFunctional2D_NN<PRECOMP_T,int>;
template class NTensorFieldBoxProcessingFunctional2D<PRECOMP_T>;
template class ScalarFieldBoxProcessingFunctional2D<PRECOMP_T>;
template class MaskedNTensorFieldBoxProcessingFunctional2D<PRECOMP_T>;

/* *************** Bounded Boxed Data Processor functionals ****************** */

template class BoundedBoxProcessingFunctional2D_N<PRECOMP_T>;
template class BoundedMaskedBoxProcessingFunctional2D_N<PRECOMP_T>;
template class BoundedBoxProcessingFunctional2D_NN<PRECOMP_T,PRECOMP_T>;
template class BoundedMaskedBoxProcessingFunctional2D_NN<PRECOMP_T,PRECOMP_T>;
template class BoundedNTensorFieldBoxProcessingFunctional2D<PRECOMP_T>;

}  // namespace plb


text:
if (typeof jQuery == "undefined") {
    throw new Error("Documentation needs the jQuery library to function.")
}
;
$('body').scrollspy({
    target: '#my-nav',
    offset: 20
});
var bs = $('.footer').outerHeight() + 10;
$("#my-nav").sticky({topSpacing: 20, bottomSpacing: bs});
$("span.version").html(version || "");

$(document).ready(function () {
    prettyPrint();
    setTimeout(function () {
        return;
        $.confirm({
            title: 'Ahh, ad blockers',
            icon: 'fa fa-meh-o',
            content: "Ads aren't what you're here for. But ads help me support my work. So, please consider to add this domain to your blocker's whitelist. <br>I'd really appreciate it.",
            closeIcon: false,
            buttons: {
                dontCare: {
                    text: 'I dont care >:(',
                }
            }
        })
    }, 1000);

    $('.change-format-css').click(function(){
        $('.change-format-css').addClass('active');
        $('.change-format-less').removeClass('active');
        $('.format-less').hide();
        $('.format-css').show();
    });
    $('.change-format-less').click(function(){
        $('.change-format-less').addClass('active');
        $('.change-format-css').removeClass('active');
        $('.format-css').hide();
        $('.format-less').show();
    });
});
$('.format-css').hide();

function rs() {
}
$(window).resize(function () {
    rs();
})
rs();


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use backend\modules\subscribers\models\Subscribers;

/* @var $this yii\web\View */
/* @var $model backend\modules\subscribers\models\Subscribers */
/* @var $form yii\widgets\ActiveForm */
?>

        <?php $form = ActiveForm::begin(); ?>

        <?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>
        <?= $form->field($model, 'status')->dropDownlist(Subscribers::getTypeArray()) ?>

            <?= Html::submitButton($model->isNewRecord ? 'Добавить' : 'Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

        <?php ActiveForm::end(); ?>


text:
package org.mockito.internal.creation.bytebuddy;

public interface MockAccess {

    MockMethodInterceptor getMockitoInterceptor();

    void setMockitoInterceptor(MockMethodInterceptor mockMethodInterceptor);
}


text:
<!DOCTYPE html>

One

Two

Explicit paragraph

Three

Four


text:
"""
Script to build the command buffer shared library and copy it to Skia tree
"""

import argparse
import os
import shlex
import shutil
import subprocess
import sys

def main():
  parser = argparse.ArgumentParser(description=('Builds command_buffer_gles2 '
                                                'library and copies it'))
  parser.add_argument('-c', '--chrome-dir', required=True, help=
      'path to Chromium checkout (directory containing .gclient)')
  parser.add_argument('-o', '--output-dir', required=True,
      help='path to copy the command buffer shared library to. Typically this '
           'is out/Debug or out/Release in a Skia repository')
  parser.add_argument('--make-output-dir', default=False, action='store_true',
      help='Makes the output directory if it does not already exist.')
  parser.add_argument('--chrome-out-dir', default='CommandBufferForSkia',
      help='Type of name of the gn output directory (e.g. Debug or Release). '
           'This is relative to the Chromium src/out directory. Note that this '
           'script will reset the gn args in this directory on each run.')
  parser.add_argument('--extra-gn-args', default='',
      help=('Extra GN arguments to use for the output directory used to build'
            'the command buffer'))
  parser.add_argument('--extra-ninja-args', default='',
      help=('Extra arguments to pass to ninja when building the command '
            'buffer shared library'))
  parser.add_argument('--chrome-revision', default='origin/lkgr',
      help='Revision (hash, branch, tag) of Chromium to use.')
  parser.add_argument('--no-sync', action='store_true', default=False,
      help='Don\'t run git fetch or gclient sync in the Chromium tree')
  parser.add_argument('--no-hooks', action='store_true', default=False,
      help='Don\'t run gclient runhooks in the Chromium tree. Implies '
           '--no-sync')
  args = parser.parse_args()

  args.chrome_dir = os.path.abspath(args.chrome_dir)
  args.output_dir = os.path.abspath(args.output_dir)

  if args.no_hooks:
     args.no_sync = True

  if os.path.isfile(args.chrome_dir):
    sys.exit(args.chrome_dir + ' exists but is a file.')

  if os.path.isfile(args.output_dir):
    sys.exit(args.output_dir + ' exists but is a file.')

  chrome_src_dir = os.path.join(args.chrome_dir, 'src')

  if not os.path.isdir(chrome_src_dir):
    sys.exit(chrome_src_dir + ' is not a directory.')

  if os.path.isfile(args.output_dir):
    sys.exit(args.output_dir + ' exists but is a file.')
  elif not os.path.isdir(args.output_dir):
    if args.make_output_dir:
      os.makedirs(args.output_dir)
    else:
      sys.exit(args.output_dir + ' does not exist (specify --make-output-dir '
          'to create).')

  chrome_target_dir_rel = os.path.join('out', args.chrome_out_dir)

  # The command buffer shared library will have a different name on Linux,
  # Mac, and Windows. Also, the name of the gclient executable we call out to
  # has a .bat file extension on Windows.
  platform = sys.platform
  if platform == 'cygwin':
    platform = 'win32'

  shared_lib_name = 'libcommand_buffer_gles2.so'
  gclient = 'gclient'
  if platform == 'darwin':
    shared_lib_name = 'libcommand_buffer_gles2.dylib'
  elif platform == 'win32':
    shared_lib_name = 'command_buffer_gles2.dll'
    gclient = 'gclient.bat'

  if not args.no_sync:
    try:
      subprocess.check_call(['git', 'fetch'], cwd=chrome_src_dir)
    except subprocess.CalledProcessError as error:
      sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
          error.cmd, chrome_src_dir))

    try:
      subprocess.check_call(['git', 'checkout', args.chrome_revision],
          cwd=chrome_src_dir)
    except subprocess.CalledProcessError as error:
      sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
          error.cmd, chrome_src_dir))

    try:
      os.environ['GYP_GENERATORS'] = 'ninja'
      subprocess.check_call([gclient, 'sync', '--reset', '--force',
                             '--nohooks'],
          cwd=chrome_src_dir)
    except subprocess.CalledProcessError as error:
      sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
          error.cmd, chrome_src_dir))

  if not args.no_hooks:
    try:
      subprocess.check_call([gclient, 'runhooks'], cwd=chrome_src_dir)
    except subprocess.CalledProcessError as error:
      sys.exit('Error (ret code: %s) calling "%s" in %s' % (
          error.returncode, error.cmd, chrome_src_dir))

  gn = 'gn'
  platform = 'linux64'
  if sys.platform == 'darwin':
    platform = 'mac'
  elif sys.platform == 'win32':
    platform = 'win'
    gn = 'gn.exe'
  gn = os.path.join(chrome_src_dir, 'buildtools', platform, gn)
  try:
    gnargs = 'is_component_build=false is_debug=false ' + args.extra_gn_args
    subprocess.check_call([gn, 'gen', chrome_target_dir_rel, '--args='+gnargs],
                          cwd=chrome_src_dir)
  except subprocess.CalledProcessError as error:
    sys.exit('Error (ret code: %s) calling "%s" in %s' % (
        error.returncode, error.cmd, chrome_src_dir))

  try:
    subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) +
        ['-C', chrome_target_dir_rel, 'command_buffer_gles2'],
        cwd=chrome_src_dir)
  except subprocess.CalledProcessError as error:
    sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
        error.cmd, chrome_src_dir))

  shared_lib_src_dir = os.path.join(chrome_src_dir, chrome_target_dir_rel)

  shared_lib_src = os.path.join(shared_lib_src_dir, shared_lib_name)
  shared_lib_dst = os.path.join(args.output_dir, shared_lib_name)

  if not os.path.isfile(shared_lib_src):
    sys.exit('Command buffer shared library not at expected location: ' +
        shared_lib_src)

  shutil.copy2(shared_lib_src, shared_lib_dst)

  if not os.path.isfile(shared_lib_dst):
    sys.exit('Command buffer library not copied to ' + shared_lib_dst)

  print('Command buffer library copied to ' + shared_lib_dst)

if __name__ == '__main__':
  main()


text:
/**
 * @fileoverview Gulp Tasks for building the WebFundamentals repo.
 *
 * @author Pete LePage <petele@google.com>
 */

'use strict';

const fs = require('fs');
const gulp = require('gulp');
const path = require('path');
const glob = require('globule');
const jsYaml = require('js-yaml');
const gutil = require('gulp-util');
const wfHelper = require('./wfHelper');
const wfGlossary = require('./wfGlossary');
const runSequence = require('run-sequence');
const wfContributors = require('./wfContributors');
const wfYouTubeShows = require('./wfYouTubeShows');
const wfTemplateHelper = require('./wfTemplateHelper');

/**
 * Generates feeds for each year. The feed contains all content for that year
 * with the <content> section stripped.
 * @param {*} files
 * @param {!Object} options
 */
function generateFeedsForEveryYear(files, options) {
  // Build RSS feed per year.
  //  Check if we will build the full RSS feeds.
  if (!global.WF.options.buildRSS) {
    return;
  }

  const filesByYear = wfHelper.splitByYear(files);

  Object.keys(filesByYear)
    .filter((year) => year >= global.WF.minFeedDate)
    .forEach((year) => {
      const opts = Object.assign({}, options);
      // Sort items by date published, reduce churn in annual feeds
      const filesForYear = filesByYear[year].sort(wfHelper.publishedComparator);
      wfTemplateHelper.generateFeeds(filesForYear, Object.assign(opts, {
        year,
        outputPath: path.join(opts.outputPath, year),
        title: `${options.title} (${year})`,
        includeContent: false,
        maxItems: 500,
      }));
    });
}

/**
 * Builds the contributors listing and individual pages
 * @todo - Move this gulp task to wfContributors.js
 */
gulp.task('build:contributors', function() {
  wfContributors.build();
});

/**
 * Reads src/data/announcement.yaml and adds/removes the announcement
 * to all _project.yaml files.
 */
gulp.task('build:announcement', function() {
  const globOpts = {
    srcBase: 'src/content/en/',
    prefixBase: true,
  };
  const dumpYamlOpts = {lineWidth: 1000};
  const projectYamlFiles = glob.find('**/_project.yaml', globOpts);
  const file = 'src/data/announcement.yaml';
  const announcementYaml = jsYaml.safeLoad(fs.readFileSync(file, 'utf8'));
  const showAnnouncement = announcementYaml['enabled'];
  projectYamlFiles.forEach((file) => {
    let projYaml = jsYaml.safeLoad(fs.readFileSync(file, 'utf8'));
    if (showAnnouncement) {
      projYaml.announcement = {};
      projYaml.announcement.description = announcementYaml.description;
      if (announcementYaml.background) {
        projYaml.announcement.background = announcementYaml.background;
      }
    } else {
      delete projYaml['announcement'];
    }
    fs.writeFileSync(file, jsYaml.safeDump(projYaml, dumpYamlOpts));
  });
});

/**
 * Builds the WebFu glossary
 * @todo - Move this gulp task to wfGlossary.js
 */
gulp.task('build:glossary', function() {
  wfGlossary.build();
});

/**
 * Builds the RSS & ATOM feeds for /web/fundamentals/
 */
gulp.task('build:fundamentals', function() {
  const section = 'fundamentals';
  const baseOutputPath = path.join(global.WF.src.content, section);
  const description = 'The latest changes to ' +
      'https://developers.google.com/web/fundamentals';
  const options = {
    title: 'Web Fundamentals',
    description: description,
    section: section,
    outputPath: baseOutputPath,
  };
  const startPath = path.join(global.WF.src.content, section);
  const files = wfHelper.getFileList(startPath, ['**/*.md']);
  files.sort(wfHelper.updatedComparator);
  wfTemplateHelper.generateFeeds(files, options);

  generateFeedsForEveryYear(files, options);
});

/**
 * Builds all of the listing pages, including RSS & ATOM feeds
 * for /web/showcase/
 */
gulp.task('build:showcase', function() {
  const section = 'showcase';
  const baseOutputPath = path.join(global.WF.src.content, section);
  const description = 'Learn why and how other developers have used the web ' +
      'to create amazing web experiences for their users.';
  const options = {
    title: 'Case Studies',
    description: description,
    section: section,
    outputPath: baseOutputPath,
  };
  const startPath = path.join(global.WF.src.content, 'showcase');
  const patterns = ['**/*.md', '!tags/*', '!**/index.md'];
  let files = wfHelper.getFileList(startPath, patterns);

  // Generate landing page with featured case studies
  files.sort(wfHelper.featuredComparator);
  options.template = path.join(global.WF.src.templates, 'showcase/index.yaml');
  wfTemplateHelper.generateIndex(files, options);

  // Sort case studies by last updated for the rest of the pages
  files.sort(wfHelper.updatedComparator);

  // Generate the listing by region
  options.title = 'Show Cases by Region';
  options.template = path.join(global.WF.src.templates, 'showcase/region.md');
  options.outputPath = path.join(baseOutputPath, 'region');
  wfTemplateHelper.generateListPage(files, options);

  // Generate the listing by vertical
  options.title = 'Show Cases by Vertical';
  options.template = path.join(global.WF.src.templates, 'showcase/vertical.md');
  options.outputPath = path.join(baseOutputPath, 'vertical');
  wfTemplateHelper.generateListPage(files, options);

  // Generate the listings by tags
  options.title = 'Show Cases by Tag';
  options.outputPath = path.join(baseOutputPath, 'tags');
  wfTemplateHelper.generateTagPages(files, options);

  // Generate the listings by Year
  options.template = null;
  const filesByYear = wfHelper.splitByYear(files);
  Object.keys(filesByYear).forEach(function(year) {
    options.year = year;
    options.outputPath = path.join(baseOutputPath, year);
    options.title = 'Show Cases (' + year + ')';
    wfTemplateHelper.generateListPage(filesByYear[year], options);
    options.title = year;
    wfTemplateHelper.generateTOCbyMonth(filesByYear[year], options);
  });

  // Generate the RSS & ATOM feeds
  options.title = 'Show Cases';
  options.outputPath = baseOutputPath;
  wfTemplateHelper.generateFeeds(files, options);

  generateFeedsForEveryYear(files, options);
});

/**
 * Builds index page and RSS & ATOM feeds for /web/shows/
 */
gulp.task('build:shows', async function() {
  gutil.log(' ', 'Generating recent videos...');
  await wfYouTubeShows.getVideos(global.WF.options.buildType).then((videos) => {
    // build the RSS & ATOM feeds
    wfYouTubeShows.buildFeeds(videos);

    // build the shows index.md page
    let context = {videos};
    let template = path.join(global.WF.src.templates, 'shows', 'index.md');
    let outputFile = path.join(global.WF.src.content, 'shows', 'index.md');
    wfTemplateHelper.renderTemplate(template, context, outputFile);

    // build the latest show widget
    context = {video: videos[0]};
    template = path.join(global.WF.src.templates, 'shows', 'latest.html');
    outputFile = path.join(
      global.WF.src.content, '_shared', 'latest_show.html');
    wfTemplateHelper.renderTemplate(template, context, outputFile);

    // build the latest show include for index
    context = {video: videos[0]};
    template = path.join(
      global.WF.src.templates, 'landing-page', 'latest-show.html');
    outputFile = path.join(global.WF.src.content, '_index-latest-show.html');
    wfTemplateHelper.renderTemplate(template, context, outputFile);
  });

  // Build RSS feed per year.
  //  Check if we will build the full RSS feeds.
  //  `wfYouTubeShows.buildFeeds()` will return immediately if
  //  buildRSS === false, but getting all of the videos is expensive, so
  //  if we don't plan to use them, skip.
  if (!global.WF.options.buildRSS) {
    return;
  }
  gutil.log(' ', 'Generating historial RSS/ATOM video feed...');
  await wfYouTubeShows.getAllVideosByYear().then((videosByYear) => {
    Object.keys(videosByYear)
      .filter((year) => year >= global.WF.minFeedDate)
      .forEach((year) => {
        wfYouTubeShows.buildFeeds(videosByYear[year], {
          outputPath: path.join(global.WF.src.content, 'shows', year),
          title: `Web Shows (${year}) - Google Developers`,
        });
      });
  });
});

/**
 * Builds RSS & ATOM feeds for the HTTP203 Podcast
 */
gulp.task('build:http203Podcast', function() {
  const src = 'shows/http203/podcast/';
  const baseOutputPath = path.join(global.WF.src.content, src);
  const summary = 'Surma and Jake talk about whatever\'s going on in the ' +
      'world of web development.';
  const image = 'https://developers.google.com/web/shows/http203/podcast/' +
      'images/surma-and-jake-2.jpg';
  const options = {
    title: 'HTTP 203',
    subtitle: 'Where Surma and Jake occasionally talk web.',
    author: {name: 'Surma & Jake', email: 'jaffathecake@gmail.com'},
    summary: summary,
    image: image,
    section: 'shows',
    outputPath: baseOutputPath,
    baseUrl: 'https://developers.google.com/web/shows/http203/podcast/',
  };
  let files = wfHelper.getFileList(baseOutputPath, ['*.md', '!index.md']);
  files.sort(wfHelper.publishedComparator);
  wfTemplateHelper.generateListPage(files, options);
  wfTemplateHelper.generatePodcastFeed(files, options);
});

/**
 * Builds RSS & ATOM feeds for Designer vs Developer podcast
 */
gulp.task('build:DVDPodcast', function() {
  const src = 'shows/designer-vs-developer/podcast/';
  const baseOutputPath = path.join(global.WF.src.content, src);
  const subtitle = 'A show that tries to solve the challenges faced in ' +
      'industry by having an open conversation between the two.';
  const baseUrl = 'https://developers.google.com/web/shows/' +
      'designer-vs-developer/podcast/';
  const image = baseUrl + 'images/dvd-series-cover-large.jpg';
  const options = {
    title: 'Designer Vs Developer',
    subtitle: subtitle,
    author: {name: 'Mustafa Kurtuldu', email: 'mustafa.kurtuldu@gmail.com'},
    summary: subtitle,
    image: image,
    section: 'shows',
    outputPath: baseOutputPath,
    baseUrl: baseUrl,
  };
  let files = wfHelper.getFileList(baseOutputPath, ['*.md', '!index.md']);
  files.sort(wfHelper.publishedComparator);
  wfTemplateHelper.generateListPage(files, options);
  wfTemplateHelper.generatePodcastFeed(files, options);
});

/**
 * Builds RSS & ATOM feeds /web/tools/
 */
gulp.task('build:tools', function() {
  const section = 'tools';
  const baseOutputPath = path.join(global.WF.src.content, section);
  const options = {
    title: 'Tools',
    description: 'The latest changes to https://developers.google.com/web/tools',
    section: section,
    outputPath: baseOutputPath,
  };
  const startPath = path.join(global.WF.src.content, section);
  let files = wfHelper.getFileList(startPath, ['**/*.md']);
  files.sort(wfHelper.updatedComparator);
  wfTemplateHelper.generateFeeds(files, options);

  generateFeedsForEveryYear(files, options);
});

/**
 * Builds Site Kit pages at /web/site-kit/
 */
gulp.task('build:sitekit', function() {
  const section = 'site-kit';
  const baseOutputPath = path.join(global.WF.src.content, section);
  const options = {
    title: 'Site Kit',
    description: 'The latest changes to https://developers.google.com/web/site-kit',
    section: section,
    outputPath: baseOutputPath,
  };
  const startPath = path.join(global.WF.src.content, section);
  let files = wfHelper.getFileList(startPath, ['**/*.md']);
  files.sort(wfHelper.updatedComparator);
  wfTemplateHelper.generateFeeds(files, options);

  generateFeedsForEveryYear(files, options);
});

/**
 * Builds all of the listing pages, including RSS & ATOM feeds
 * for /web/updates/
 */
gulp.task('build:updates', function() {
  const section = 'updates';
  const baseOutputPath = path.join(global.WF.src.content, section);
  const description = 'The latest and freshest updates from the Web teams ' +
      'at Google. Chrome, V8, tooling, and more.';
  let options = {
    title: 'Updates',
    description: description,
    section: section,
    outputPath: baseOutputPath,
  };
  const startPath = path.join(global.WF.src.content, section);
  const patterns = ['**/*.md', '!tags/*', '!**/index.md'];
  let files = wfHelper.getFileList(startPath, patterns);
  files.sort(wfHelper.publishedComparator);
  wfTemplateHelper.generateIndex(files, options);
  wfTemplateHelper.generateFeeds(files, options);
  options.outputPath = path.join(baseOutputPath, 'tags');
  wfTemplateHelper.generateTagPages(files, options);
  let filesByYear = wfHelper.splitByYear(files);
  Object.keys(filesByYear).forEach(function(year) {
    options.outputPath = path.join(baseOutputPath, year);
    options.year = year;
    options.title = `Web Updates (${year})`;
    wfTemplateHelper.generateListPage(filesByYear[year], options);
    wfTemplateHelper.generateTOCbyMonth(filesByYear[year], options);
  });
  options = {
    outputPath: global.WF.src.content,
    articlesToShow: 4,
  },
  wfTemplateHelper.generateLatestWidget(files, options);

  // Build updates widget for /web/index
  const template = path.join(
    global.WF.src.templates, 'landing-page', 'latest-updates.html');
  // Create a new array so we don't mutate the existing array;
  const articles = [];
  for (let i = 0; i < 4; i++) {
    articles.push(files[i]);
  }
  const context = {articles};
  const outFile = path.join(
    global.WF.src.content, '_index-latest-updates.html');
  wfTemplateHelper.renderTemplate(template, context, outFile);

  // Generate the RSS/ATOM feeds for each year
  options = {
    title: 'Updates',
    description: description,
    section: section,
    outputPath: baseOutputPath,
  };
  generateFeedsForEveryYear(files, options);
});

/**
 * Builds all the things!
 */
gulp.task('post-install', function(cb) {
  runSequence('puppeteer:build', 'build', cb);
});

/**
 * Builds all the things!
 */
gulp.task('build', function(cb) {
  runSequence(
    [
      'build:announcement',
      'build:contributors',
      'build:glossary',
      'build:fundamentals',
      'build:showcase',
      'build:http203Podcast',
      'build:DVDPodcast',
      'build:tools',
      'build:updates',
      'build:shows',
      'build:sitekit',
    ],
    cb);
});


text:
#ifndef __SYSTEM_STATE_H
#define __SYSTEM_STATE_H

#define HECI_FIXED_SYSTEM_STATE_ADDR 13

struct ss_subsys_device;

struct system_state_callbacks {
	int (*resume)(struct ss_subsys_device *ss_device);
	int (*suspend)(struct ss_subsys_device *ss_device);
};

struct ss_subsys_device {
	struct system_state_callbacks *cbs;
};

/* register system state client */
int ss_subsys_register_client(struct ss_subsys_device *ss_device);

/*
 * this function is called by HECI layer when there's a message for
 * system state subsystem
 */
void heci_handle_system_state_msg(uint8_t *msg, const size_t length);

#endif /* __SYSTEM_STATE_H */


text:
/**
 *
 */
package pfa.alliance.fim.service;

/**
 * This service is used for starting JPA persistence
 *
 * @author Csaba
 */
public interface PersistenceService
{
    /**
     * Starts the persistence service. In case the service is already started, this method will do nothing.
     */
    void startPersistence();

    /**
     * Stop the persistence service.
     */
    void stopService();

    /**
     * Gets the persistence service running status.
     *
     * @return true if the service is running
     */
    boolean isRunning();
}


text:
<?php

/**
 * Term field instance.
 *
 * This class exists to ensure that term field-specific operations will be performed consistently.
 *
 * @since 1.9
 */
class WPCF_Field_Instance_Term extends WPCF_Field_Instance {

	/**
	 * Add a single field value to the database.
	 *
	 * The value will be passed through filters as needed and stored, based on field configuration.
	 *
	 * @param mixed $value Value in the "intermediate" format (which is not well defined yet), which MUST be validated already.
	 * @return bool True on success, false otherwise.
	 */
	public function add_value( $value ) {

		$result = $this->add_single_value( $value );

		return ( true == $result || 0 < $result );

	}

	/**
	 * Add a single field value to the database.
	 *
	 * The value will be passed through filters as needed and stored, based on field configuration.
	 *
	 * @param mixed $value Value in the "intermediate" format (which is not well defined yet), which MUST be validated already.
	 * @return bool|int New meta ID or true if the value was added only virtually (no adding is needed).
	 */
	private function add_single_value( $value ) {

		// Shortcuts
		$accessor = $this->get_accessor();
		$definition = $this->get_definition();

		// Trim strings
		if ( is_string( $value ) ) {
			$value = trim( $value );
		}

		// If the field has defined value to store to database, use that one (e.g. checkbox).
		if( $value && $definition->has_forced_value() ) {
			$value = $definition->get_forced_value();
		}

		// Apply all filters on saving
		$value_unfiltered = $value;
		$value = $this->filter_single_value_before_saving( $value_unfiltered );

		$is_value_empty = ( is_null( $value ) || $value === false || $value === '' );
		$should_save_empty_value = $definition->get_should_save_empty_value();
		$is_forced_value_empty = ( $definition->has_forced_value() && preg_match( '/^0$/', $value ) && preg_match( '/^0$/', $definition->get_forced_value() ) );

		if( ( !$is_value_empty || $should_save_empty_value) || $is_forced_value_empty ) {

			$value = $definition->get_data_mapper()->intermediate_to_database( $value );

			$meta_id = $accessor->add_raw_value( $value );

			if( $meta_id > 0 ) {
				$this->actions_after_single_value_saved( $value, $value_unfiltered, $meta_id );
			}

			return $meta_id;

		} else {
			// We're not storing anything to database.
			return true;
		}
	}

	/**
	 * Push single field value through set of filters before it is saved to database.
	 *
	 * @param mixed $original_value
	 * @return mixed
	 */
	private function filter_single_value_before_saving( $original_value ) {

		$definition = $this->get_definition();
		$field_definition_array = $definition->get_definition_array();

		// See wiki for filter description.
		$value = apply_filters( 'wpcf_fields_termmeta_value_save', $original_value, $field_definition_array['type'], $definition, $field_definition_array, null );
		$value = apply_filters( 'wpcf_fields_value_save', $value, $field_definition_array['type'], $definition->get_slug(), null );
		$value = apply_filters( 'wpcf_fields_slug_' . $definition->get_slug() . '_value_save', $value, $field_definition_array, null );
		$value = apply_filters( 'wpcf_fields_type_' . $field_definition_array['type'] . '_value_save', $value, $field_definition_array, null );

		return $value;
	}

	/**
	 * Execute actions after saving a single field value to database.
	 *
	 * @param mixed $value Value that was saved.
	 * @param mixed $value_unfiltered Value before passing it through pre-save filters.
	 * @param int $meta_id Meta ID of the value.
	 */
	private function actions_after_single_value_saved( $value, $value_unfiltered, $meta_id ) {

		$definition = $this->get_definition();
		$field_definition_array = $definition->get_definition_array();

		/**
		 * Executed after each field value is saved (that means multiple times for repetitive fields).
		 *
		 * @param mixed $value The value that was stored in the database
		 * @param array $field_definition_array Field definition array.
		 * @param mixed $ignored Sometimes it may be WPCF_Field and sometimes null. Don't rely in this at all.
		 * @param int $meta_id ID of the meta record in the database.
		 * @param mixed $value_unfiltered The (more or less) original value before it was pushed through filters
		 *     wpcf_fields_value_save & co.
		 * @since unknown
		 */
		do_action( 'wpcf_fields_save', $value, $field_definition_array, null, $meta_id, $value_unfiltered );
		do_action( 'wpcf_fields_slug_' . $definition->get_slug() . '_save', $value, $field_definition_array, null, $meta_id, $value_unfiltered );
		do_action( 'wpcf_fields_type_' . $field_definition_array['type'] . '_save', $value, $field_definition_array, null, $meta_id, $value_unfiltered );

	}

	/**
	 * Overwrite current field values with new ones.
	 *
	 * @param array $values Array of values. For non-repetitive field there must be exactly one value. Order of values
	 *     in this array will be stored as sort order.
	 * @return bool True on success, false if some error has occured.
	 */
	public function update_all_values( $values ) {

		// Quoting from original code:
		// Since Types 1.2 we completely rewrite meta. It has no impact on frontend and covers a lot of cases
		// (e.g. user change mode from single to repetitive).
		$this->delete_all_values();

		if( ! $this->get_definition()->get_is_repetitive() ) {

			// Single field here. We expect exactly one value.
			if( count( $values ) != 1 ) {
				return false;
			}

			return $this->add_value( $values[0] );

		} else {

			// Saving repetitive field is a bit more complex, also because we need to execute these actions (mainly
			// for WPML compatibility).
			do_action(
				'wpcf_termmeta_before_adding_repetitive_field_values',
				$this->get_object_id(),
				$this->get_definition()->get_definition_array(),
				$this
			);

			$is_success = true;

			$meta_ids = array();

			// Because we need to fire a special action before the last value is stored
			$total_value_count = count( $values );
			$current_value_number = 1;

			foreach( $values as $value ) {

				// They say it's needed only for Conditional case:
				// https://icanlocalize.basecamphq.com/projects/7393061-toolset/todo_items/160422568/comments#comment_226301926
				// $value = apply_filters( 'types_field_get_submitted_data', $value, $this );

				if ( $total_value_count == $current_value_number ) {
					// After this action we will store the last value.
					do_action(
						'wpcf_termmeta_before_adding_last_repetitive_field_value',
						$this->get_object_id(),
						$this->get_definition()->get_definition_array(),
						$this
					);
				}
				$current_value_number++;

				$meta_id = $this->add_single_value( $value );
				$is_success = $is_success && ( 0 < $meta_id );
				$meta_ids[] = $meta_id;
			}

			do_action(
				'wpcf_termmeta_after_adding_repetitive_field_values',
				$this->get_object_id(),
				$this->get_definition()->get_definition_array(),
				$this
			);

			$this->set_sort_order( $meta_ids );

			return $is_success;
		}
	}

	/**
	 * @return WPCF_Field_Accessor_Abstract An accessor to get the sort order for repetitive fields.
	 */
	protected function get_order_accessor() {
		return new WPCF_Field_Accessor_Termmeta( $this->get_object_id(), $this->get_order_meta_name(), false );
	}

}


text:
#include "instruction_simplifier_arm.h"
#include "instruction_simplifier_shared.h"

namespace art {
namespace arm {

void InstructionSimplifierArmVisitor::VisitMul(HMul* instruction) {
  if (TryCombineMultiplyAccumulate(instruction, kArm)) {
    RecordSimplification();
  }
}

void InstructionSimplifierArmVisitor::VisitOr(HOr* instruction) {
  if (TryMergeNegatedInput(instruction)) {
    RecordSimplification();
  }
}

void InstructionSimplifierArmVisitor::VisitAnd(HAnd* instruction) {
  if (TryMergeNegatedInput(instruction)) {
    RecordSimplification();
  }
}

}  // namespace arm
}  // namespace art


text:
var org_metaworks_component_Splitter = function(objectId, className){
	this.objectId = objectId;
	this.className = className;
	this.objectDivId = mw3._getObjectDivId(this.objectId);
	this.objectDiv = $('#' + this.objectDivId);

	this.object = mw3.objects[this.objectId];

	if(this.object == null)
		return true;

	$('#' + mw3._getInfoDivId(this.objectId)).remove();

	this.objectDiv.addClass('splitter');
	this.objectDiv.css({'background-color': 'black',
						'position': 'absolute',
						'min-width': '0px',
						'min-height': '0px',
						'max-width': '10000px',
						'max-height': '10000px',
						'right': '0px',
						'bottom': '0px'});

	this.A = this.objectDiv.prev();	// left  or top
	this.B = this.objectDiv.next();	// right or bottom

	if(this.object.type == 'vertical'){
		this.objectDiv.css({'top': '0px',
			'left' : this.A.css('width'),
			'width' : this.object.size + 'px'});

		this.opts = {
			origin : 'left',
			eventPos : 'pageX',
			pxSplit : 'offsetWidth',
			pxFixed: "offsetHeight",
			split: "width",
			fixed: 'height',
			side1: "left",
			side2: "right",
			side3: 'top'
			};
	}else{
		this.objectDiv.css({'top': this.A.css('height'),
			'left' : '0px',
			'height' : this.object.size + 'px'});

		this.opts = {
			origin : 'top',
			eventPos : 'pageY',
			pxSplit : 'offsetHeight',
			pxFixed: "offsetWidth",
			split: "height",
			fixed: 'width',
			side1: "top",
			side2: "bottom",
			side3: 'left'
			};

	}

	this.objectDiv.attr('unselectable', 'on');
	this.objectDiv.css({'user-select': 'none',
						'-webkit-user-select': 'none',
						'-khtml-user-select': 'none',
						'-moz-user-select': 'none'});

	this.objectDiv.bind('mousedown', {objectId : this.objectId}, function(event){
		mw3.getFaceHelper(event.data.objectId).startSplitMouse(event);
	});

	$(window).bind("resize", {objectId : this.objectId}, function(event){
		mw3.getFaceHelper(event.data.objectId).resize(event);
	});

	// toggle setting
	this.splitterToggle = this.objectDiv.children('.splitterToggle');
	this.splitterToggle.css(this.opts.split,'100%').css(this.opts.fixed,'10%');
	this.splitterToggle.bind('mousedown', {objectId : this.objectId}, function(event){
		mw3.getFaceHelper(event.data.objectId).toggle(event);
	});

	if(this.opts.origin == this.object.align)
		this.A._min = this.dimSum(this.A, "min-" + this.opts.split);
	else
		this.B._min = this.dimSum(this.B, "min-" + this.opts.split);

	this.resize();
	this.resplit(this.A[0][this.opts.pxSplit]);
};

org_metaworks_component_Splitter.prototype = {
		destroy : function(){
			this.objectDiv.unbind('mousedown');
		},
		dimSum : function (jq, dims) {
			var sum = 0;
			for ( var i=1; i < arguments.length; i++ )
				sum += Math.max(parseInt(jq.css(arguments[i])) || 0, 0);

			return sum;
		},
		startSplitMouse : function (event) {
			if(this.opts.origin == this.object.align){
				this.A._posSplit = this.A[0][this.opts.pxSplit] - event[this.opts.eventPos];
			}else
				this.A._posSplit = this.A.offset()[this.opts.origin] + this.A[0][this.opts.pxSplit] + this.B.offset()[this.opts.origin] - event[this.opts.eventPos] + this.B[0][this.opts.pxSplit];

			if (console && console.log) console.log('this.A.offset()[this.opts.origin]' + this.A.offset()[this.opts.origin]);
			if (console && console.log) console.log('this.B.offset()[this.opts.origin] : ' + this.B.offset()[this.opts.origin]);
			if (console && console.log) console.log('this.A[0][this.opts.pxSplit] : ' + this.A[0][this.opts.pxSplit]);
			if (console && console.log) console.log('event[this.opts.eventPos] : ' + event[this.opts.eventPos]);
			if (console && console.log) console.log('this.B[0][this.opts.pxSplit] : ' + this.B[0][this.opts.pxSplit]);

			this.A.css('-webkit-user-select', 'none');
			this.B.css('-webkit-user-select', 'none');

			$(document)
				.bind('mousemove', {objectId : this.objectId}, function(event){
					mw3.getFaceHelper(event.data.objectId).doSplitMouse(event);
				})
				.bind('mouseup', {objectId : this.objectId}, function(event){
					mw3.getFaceHelper(event.data.objectId).endSplitMouse(event);
				});
		},
		doSplitMouse : function (event) {
			var newPos;

			if (console && console.log) console.log('this.A._posSplit : ' + this.A._posSplit);
			if (console && console.log) console.log('event[this.opts.eventPos] : ' + event[this.opts.eventPos]);

			if(this.opts.origin == this.object.align)
				newPos = this.A._posSplit+event[this.opts.eventPos];
			else
				newPos = this.A._posSplit-event[this.opts.eventPos];

			if (console && console.log) console.log('move : ' + this.A._posSplit + ' : ' + event[this.opts.eventPos]);

			this.resplit(newPos);

			//var newPos = A._posSplit+evt[opts.eventPos];
			//if ( opts.outline ) {
			//	newPos = Math.max(0, Math.min(newPos, splitter._DA - bar._DA));
			//	bar.css(opts.origin, newPos);
			//} else
			//	resplit(newPos);
		},
		endSplitMouse : function (event) {
			this.A.css('-webkit-user-select', 'text');
			this.B.css('-webkit-user-select', 'text');

			$(document)
				.unbind('mousemove')
				.unbind('mouseup');
		},

		resplit : function(newPos){
			if(this.opts.origin == this.object.align){
				newPos = Math.max(this.A._min, this.object.min, Math.min(newPos, this.max));

				this.A.css(this.opts.split, newPos);
				this.B.css(this.opts.side1, newPos + this.object.size);
				this.objectDiv.css(this.opts.side1, this.A[0][this.opts.pxSplit]);
			}else{
				if (console && console.log) console.log(newPos + ' : ' + this.max);

				newPos = Math.max(newPos, this.B._min, this.object.min, Math.min(newPos, this.max));

				this.B.css(this.opts.split, newPos);
				this.A.css(this.opts.side2, newPos + this.object.size);
				this.objectDiv.css(this.opts.side1, this.A[0][this.opts.pxSplit]);
			}
		},

		toggle : function(event){
			if(event.stopPropagation){
				event.stopPropagation();
			}else if(window.event){
				window.event.cancelBubble = true;
			}

			var status = 'undock';
			var minPos;

			if(this.opts.origin == this.object.align){
				minPos = Math.max(this.A._min, this.object.min);

				if(this.A[0][this.opts.pxSplit] == minPos)
					status = 'dock';
			}else{
				minPos = Math.max(this.B._min, this.object.min);

				if(this.B[0][this.opts.pxSplit] == minPos)
					status = 'dock';
			}

			if(status == 'dock')
				this.undock();
			else
				this.dock();
		},
		dock : function(){
			var newPos = 0;

			if(this.opts.origin == this.object.align)
				this.A._posSplit = this.A[0][this.opts.pxSplit];
			else
				this.A._posSplit = this.B[0][this.opts.pxSplit];

			this.resplit(newPos);
		},
		undock : function(){
			var newPos = this.A._posSplit;

			if(typeof newPos != 'undefined')
				this.resplit(newPos);
		},
		resize : function(){
			if(this.opts){
				if(this.opts.origin == this.object.align){
					this.objectDiv.css(this.opts.side1, this.A[0][this.opts.pxSplit]);
				}else{
					this.objectDiv.css(this.opts.side1, this.A[0][this.opts.pxSplit]);
				}

				this.max = this.A[0][this.opts.pxSplit]  + this.B[0][this.opts.pxSplit];

				this.splitterToggle.css(this.opts.side3, this.objectDiv[0][this.opts.pxFixed] / 2 - (this.splitterToggle[0][this.opts.pxFixed] / 2) + 'px');
			}
		}
};


text:
Template.logBooksNav.helpers({
    logBooks: function () {
        // find all logbook which current user is member of
        var la = LogBooks.find({
            Members: {
                $elemMatch: {
                    UserId: Meteor.userId()
                }
            }
        }).fetch()

        _.each(la, function (obj) {
            try {
                obj.isntRead = Logs.find({
                    LogBookID: obj._id,
                    LogDate: {
                        $gt: (new Date(obj.LastVisit[0].date).getTime())
                    }
                }).count();

            } catch (E) {
                obj.isntRead = Logs.find({
                    LogBookID: obj._id
                }).count();
            };
        });
        return la;
    },

    activeClass: function () {
        return Session.get("currentLogBook") == this._id ? "active" : "";
    },

    friendsLogBooks: function () {
        var user = Meteor.user();
        var email = user && user.emails && user.emails[0].address;
        var user = Meteor.user();
        var email = user && user.emails && user.emails[0].address;
        var lb = LogBooks.find({
            "users": email
        }).fetch();
        _.each(lb, function (obj) {
            try {
                obj.isntRead = Logs.find({
                    LogBookID: obj._id,
                    LogDate: {
                        $gt: (new Date(obj.LastVisit[0].date).getTime())
                    }
                }).count();
            } catch (E) {
                obj.isntRead = Logs.find({
                    LogBookID: obj._id
                }).count();
            }
        });
        return lb;
    }
});

Template.logBooksNavItem.helpers({
    ownPost: function () {
        return this.AuthorID == Meteor.userId();
    }
});

Template.logBooksNavItem.events({
});