text:
<?php

namespace Trello\Api\Card;

use Trello\Api\AbstractApi;
use Trello\Exception\InvalidArgumentException;

/**
 * Trello Card Labels API
 * @link https://trello.com/docs/api/card
 *
 * Fully implemented.
 */
class Labels extends AbstractApi
{
    protected $path = 'cards/#id#/labels';

    /**
     * Set a given card's labels
     * @link https://trello.com/docs/api/card/#put-1-cards-card-id-or-shortlink-labels
     *
     * @param string $id the card's id or short link
     * @param array $labels the labels
     *
     * @return array card info
     *
     * @throws InvalidArgumentException If a label does not exist
     */
    public function set($id, array $labels)
    {
        foreach ($labels as $label) {
            if (!in_array($label, ['all', 'green', 'yellow', 'orange', 'red', 'purple', 'blue'])) {
                throw new InvalidArgumentException(sprintf('Label "%s" does not exist.', $label));
            }
        }

        $labels = implode(',', $labels);

        return $this->put($this->getPath($id), ['value' => $labels]);
    }

    /**
     * Remove a given label from a given card
     * @link https://trello.com/docs/api/card/#delete-1-cards-card-id-or-shortlink-labels-color
     *
     * @param string $id the card's id or short link
     * @param string $label the label to remove
     *
     * @return array card info
     *
     * @throws InvalidArgumentException If a label does not exist
     */
    public function remove($id, $label)
    {
        if (!in_array($label, ['green', 'yellow', 'orange', 'red', 'purple', 'blue'])) {
            throw new InvalidArgumentException(sprintf('Label "%s" does not exist.', $label));
        }

        return $this->delete($this->getPath($id) . '/' . rawurlencode($label));
    }
}


text:
function settingsClicked() {
	if(OS_IOS) {
		nappDrawerWin.toggleRightWindow();
	} else if(OS_ANDROID) {
		// Getting the settings window and Adding a back button to android's action bar
		var settingsWin = Alloy.createController("settingsWin").getView();
		settingsWin.addEventListener('open', function() {
			settingsWin.activity.actionBar.onHomeIconItemSelected = function() { settingsWin.close(); };;
			settingsWin.activity.actionBar.displayHomeAsUp = true;
		});
		settingsWin.open();
	}
}

// Handle iOS settings slide menu and adding event listeners to the settings navButton in all windows
if(OS_IOS){
	// Requiring the NappDrawerModule to create a nappDrawerWindow and set its parameters
	var NappDrawerModule = require('dk.napp.drawer');

	var nappDrawerWin = NappDrawerModule.createDrawer({
		centerWindow: $.tabGroup,
		rightWindow: $.settingsWin.win,
		fading: 0.2, // 0-1
		parallaxAmount: 0.2, //0-1
		shadowWidth:"40dp",
		rightDrawerWidth: "230",
		animationMode: NappDrawerModule.ANIMATION_NONE,
		closeDrawerGestureMode: NappDrawerModule.CLOSE_MODE_ALL,
		openDrawerGestureMode: NappDrawerModule.OPEN_MODE_ALL,
		orientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT]
	});
	nappDrawerWin.open();

	// Adding the settingsClicked function for settings button in the three tabs' windows
	$.qrCodeWin.btn_settings.addEventListener('click', settingsClicked);
	$.contactsWin.btn_settings.addEventListener('click', settingsClicked);
	$.notificationCenterWin.btn_settings.addEventListener('click', settingsClicked);

	// Overriding closing the settings window with toggling it to the right
	$.settingsWin.win.addEventListener('close', function() {
		nappDrawerWin.toggleRightWindow();
	});
}
else if(OS_ANDROID) {
	$.tabGroup.open();
}

// Defining and adding a function to globals that sets the active tab to notification center.
// Used in push notification callback function defined in (pushNotificationAPIs.js)
Alloy.Globals.OpenNotificationCenter = function SetActiveTabToNotifications() {
	// TODO: Test it on android and iOS while receiving notifications
	//if($.tabGroup.activeTab.window.title == "Notifications") Alloy.Globals.LoadNotifications();
	//else $.tabGroup.setActiveTab(2);
	Alloy.Globals.LoadNotifications();
	$.tabGroup.setActiveTab(1);
};

redpajama_set_name: RedPajamaGithub


text:
/*globals define*/
/*jshint node:true*/
/**
 * @module Executor:NodeWorker
 * @author lattmann / https://github.com/lattmann
 * @author ksmyth / https://github.com/ksmyth
 */

var nodeRequire = require,
    log = function () {
        'use strict';
        var args = Array.prototype.slice.call(arguments);
        args.splice(0, 0, new Date().toISOString());
        console.log.apply(console, args);
    },
    err = function () {
        'use strict';
        var args = Array.prototype.slice.call(arguments);
        args.splice(0, 0, new Date().toISOString());
        console.error.apply(console, args);
    },
    logger = {
        debug: log,
        log: log,
        info: log,
        warn: log,
        error: err
    };

if (typeof define !== 'undefined') {

    define('node_worker', [
        'blob/BlobClient',
        'executor-worker/ExecutorWorker',
        'executor/JobInfo',
        'executor-worker/ExecutorWorkerController',
        'url'
    ], function (BlobClient, ExecutorWorker, JobInfo, ExecutorWorkerController, url) {
        'use strict';

        return function (webGMEUrl, tempPath, parameters, availableProcessesContainer) {
            var worker,
                webGMEPort = url.parse(webGMEUrl).port || (url.parse(webGMEUrl).protocol === 'https:' ? 443 : 80);

            worker = new ExecutorWorker({
                server: url.parse(webGMEUrl).hostname,
                serverPort: webGMEPort,
                httpsecure: url.parse(webGMEUrl).protocol === 'https:',
                webgmeToken: undefined,
                availableProcessesContainer: availableProcessesContainer,
                workingDirectory: tempPath,
                executorNonce: parameters.executorNonce,
                logger: logger,
                apiToken: parameters.apiToken
            });

            log('Connecting to ' + webGMEUrl);

            var callback;
            worker.queryWorkerAPI(function (err, response) {
                if (!err) {
                    log('Connected to ' + webGMEUrl);
                }
                var refreshPeriod = 60 * 1000,
                    disconnected = false;
                callback = callback || function (err, response) {
                    if (err) {
                        log('Error connecting to ' + webGMEUrl + ' ' + err);
                        disconnected = true;
                    } else if (disconnected) {
                        log('Reconnected to ' + webGMEUrl);
                        disconnected = false;
                    }

                    if (response && response.refreshPeriod) {
                        refreshPeriod = response.refreshPeriod;
                    }
                    /*var timeoutID = */
                    setTimeout(function () {
                        worker.queryWorkerAPI(callback);
                    }, refreshPeriod);
                };
                callback(err, response);
            });
            var cancel = function () {
                callback = function () {
                };
            };
            return cancel;
        };
    });
}

function main() {
    var fs = nodeRequire('fs'),
        path = nodeRequire('path'),
        superagent = nodeRequire('superagent'),
        configFileName = 'config.json',
        workingDirectory = 'executor-temp',
        cas;
    //https = nodeRequire('https'); FIXME take into use or remove it

    if (process.env.LATEST_CERTS) {
        cas = nodeRequire('ssl-root-cas/latest');
    } else {
        cas = nodeRequire('ssl-root-cas');
    }

    // This is used for tests
    if (process.argv.length > 2) {
        configFileName = process.argv[2];
        if (process.argv.length > 3) {
            workingDirectory = process.argv[3];
        }
    }

    cas.inject();
    fs.readdirSync(__dirname).forEach(function (file) {
        'use strict';
        var filename = path.resolve(__dirname, file);
        if ((filename.indexOf('.pem') === filename.length - 4) || (filename.indexOf('.crt') === filename.length - 4)) {
            log('Adding ' + file + ' to trusted CAs');
            cas.addFile(filename);
        }
    });

    superagent.Request.prototype._ca = (require('https').globalAgent.options.ca);
    var requirejs = require('./node_worker.classes.build.js').requirejs;

    [
        'superagent',
        'fs',
        'util',
        'events',
        'path',
        'child_process',
        'minimatch',
        'rimraf',
        'url',
        'q'
    ].forEach(function (name) {
        'use strict';
        requirejs.s.contexts._.defined[name] = nodeRequire(name);
    });

    global.WebGMEGlobal = {
        getConfig: function () {
            'use strict';
            return {};
        }
    }; // server: config.server, serverPort: config.port, httpsecure: config.protocol==='https' }; } };

    var webGMEUrls = Object.create(null),
        maxConcurrentJobs = 1,
        availableProcessesContainer = { //FIXME check why the definition cannot be moved to global namespace
            availableProcesses: maxConcurrentJobs
        }; // shared among all ExecutorWorkers

    requirejs(['node_worker'], function (addWebGMEConnection) {
        'use strict';
        var fs = nodeRequire('fs'),
            path = nodeRequire('path');

        function readConfig() {
            var config = {
                'http://127.0.0.1:8888': {}
            };
            try {
                var configJSON = fs.readFileSync(configFileName, {
                    encoding: 'utf8'
                });
                config = JSON.parse(configJSON);
                if (Array.isArray(config)) {
                    var oldConfig = config;
                    config = {};
                    oldConfig.forEach(function (webGMEUrl) {
                        config[webGMEUrl] = {};
                    });
                } else if (typeof (config) === 'string') {
                    config = {
                        config: {}
                    };
                } else {
                }
            } catch (e) {
                if (e.code !== 'ENOENT') {
                    throw e;
                }
            }
            Object.getOwnPropertyNames(config).forEach(function (key) {
                var webGMEUrl;
                if (key.indexOf('http') === 0) {
                    webGMEUrl = key;
                    if (Object.prototype.hasOwnProperty.call(webGMEUrls, webGMEUrl)) {
                    } else {
                        webGMEUrls[webGMEUrl] = addWebGMEConnection(webGMEUrl,
                            path.join(workingDirectory, '' + workingDirectoryCount++),
                            config[webGMEUrl], availableProcessesContainer);
                    }
                } else if (key === 'maxConcurrentJobs') {
                    availableProcessesContainer.availableProcesses += config.maxConcurrentJobs - maxConcurrentJobs;
                    maxConcurrentJobs = config.maxConcurrentJobs;
                } else {
                    log('Unknown configuration key ' + key);
                }
            });
            // remove webGMEUrls no longer in config
            Object.getOwnPropertyNames(webGMEUrls).forEach(function (webGMEUrl) {
                if (Object.prototype.hasOwnProperty.call(config, webGMEUrl) === false) {
                    log('Removing ' + webGMEUrl);
                    webGMEUrls[webGMEUrl]();
                    delete webGMEUrls[webGMEUrl];
                }
            });
        }

        var workingDirectoryCount = 0;
        var rimraf = nodeRequire('rimraf');
        rimraf(workingDirectory, function (err) {
            if (err) {
                log('Could not delete working directory (' + workingDirectory + '), err: ' + err);
                process.exit(2);
            }
            if (!fs.existsSync(workingDirectory)) {
                fs.mkdirSync(workingDirectory);
            }

            readConfig();
            fs.watch(configFileName, function () {
                setTimeout(readConfig, 200);
            }); // setTimeout: likely handle O_TRUNC of config.json
            // (though `move config.json.tmp config.json` is preferred)
        });
    });
}

if (nodeRequire.main === module) {
    main();
}

module.exports = main;


text:
OrderTracker
============

Project to highlight the differences between javascript frameworks Angular and Backbone.

Here's the plan:

1. We need to define a little more what the requirements are. Let's do that below.
1. I create an MVC project and some WebAPI controllers for REST interaction
1. I may also create static pages so we can highlight the difference between that and client-side code
1. .....
1. Profit!

## Ok, so, requirements?

- Display a list of orders, or line items, or something.
- Each line will have an item name, quantity, price each and line total
- Maybe there is a details view with more things? Not sure what was meant by this
  - We want the details view so we can show how Backbone and Angular handle a Master/Detail layout
- Then we will total up the lines at the bottom, apply tax and/or discounts
- Did we also want a list of orders / invoices? Is that what the master / detail thing was about?


text:
from __future__ import unicode_literals
from __future__ import absolute_import

from django.conf.urls import patterns, url

from .views import AboutContribView, AboutWydView

urlpatterns = patterns('',
                       url(r'^about-contribuitions/$',
                           AboutContribView.as_view(),
                           name='about-contribuitions'),
                       url(r'^about-wyd/$',
                           AboutWydView.as_view(),
                           name='about-wyd'),
                       )


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FFF"
    android:orientation="vertical" >
      <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#0E88D5"
        android:padding="10dp"
        android:gravity="center_vertical"
        >

        <TextView
            android:id="@+id/activity_main_new"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="新建任务"
            android:layout_centerHorizontal="true"
            android:gravity="center_vertical"
            android:textColor="#FFF"
            android:textSize="20sp" />
        <ImageView
            android:id="@+id/activity_main_help"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/help"
            android:layout_alignParentRight="true"
            />
    </RelativeLayout>
     <RadioGroup
        android:id="@+id/newbuild_task_rgroup"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="10dp"
        android:gravity="center"
        android:orientation="horizontal"
        android:background="#FFF"
        >
        <RadioButton
            android:id="@+id/newbuild_task_rbtn_new"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@drawable/query_task_rbtn_text_selector"
            android:button="@null"
            android:background="@null"
            android:text="新建模板"
            android:gravity="center_horizontal"
            android:layout_weight="1"
            android:checked="true"
            />
        <RadioButton
            android:id="@+id/newbuild_task_rbtn_genenal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@drawable/query_task_rbtn_text_selector"
            android:button="@null"
            android:gravity="center_horizontal"
            android:background="@null"
            android:layout_weight="1"
            android:text="通用模板"
            />
        <RadioButton
            android:id="@+id/newbuild_task_rbtn_industry"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@drawable/query_task_rbtn_text_selector"
            android:button="@null"
            android:gravity="center_horizontal"
            android:background="@null"
            android:layout_weight="1"
            android:text="行业模板"
            />
    </RadioGroup>

     <TextView
         style="@style/my_divide_line"
         />

    <FrameLayout
        android:id="@+id/newbuild_task_framelayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="10dp"
        ></FrameLayout>

</LinearLayout>


text:
<!DOCTYPE html>

    <title>Desktop geolocation example</title>
    <meta charset="utf-8">
    <meta name="viewport"
          content="initial-scale=1.0, user-scalable=no, width=device-width">
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="stylesheet" href="../node_modules/openlayers/css/ol.css" type="text/css">
    <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" type="text/css">

      <button ngeo-desktop-geolocation=""
        ngeo-desktop-geolocation-map="::ctrl.map"
        ngeo-desktop-geolocation-options="::ctrl.desktopGeolocationOptions">
      </button>

        This example shows how to use the ngeo-desktop-geolocation
        directive.


text:
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved.                        */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

#include "cscore_c.h"

#include <cstddef>
#include <cstdlib>

#include <llvm/SmallString.h>
#include <opencv2/core/core.hpp>

#include "c_util.h"
#include "cscore_cpp.h"

extern "C" {

CS_PropertyKind CS_GetPropertyKind(CS_Property property, CS_Status* status) {
  return cs::GetPropertyKind(property, status);
}

char* CS_GetPropertyName(CS_Property property, CS_Status* status) {
  llvm::SmallString<128> buf;
  auto str = cs::GetPropertyName(property, buf, status);
  if (*status != 0) return nullptr;
  return cs::ConvertToC(str);
}

int CS_GetProperty(CS_Property property, CS_Status* status) {
  return cs::GetProperty(property, status);
}

void CS_SetProperty(CS_Property property, int value, CS_Status* status) {
  return cs::SetProperty(property, value, status);
}

int CS_GetPropertyMin(CS_Property property, CS_Status* status) {
  return cs::GetPropertyMin(property, status);
}

int CS_GetPropertyMax(CS_Property property, CS_Status* status) {
  return cs::GetPropertyMax(property, status);
}

int CS_GetPropertyStep(CS_Property property, CS_Status* status) {
  return cs::GetPropertyStep(property, status);
}

int CS_GetPropertyDefault(CS_Property property, CS_Status* status) {
  return cs::GetPropertyDefault(property, status);
}

char* CS_GetStringProperty(CS_Property property, CS_Status* status) {
  llvm::SmallString<128> buf;
  auto str = cs::GetStringProperty(property, buf, status);
  if (*status != 0) return nullptr;
  return cs::ConvertToC(str);
}

void CS_SetStringProperty(CS_Property property, const char* value,
                          CS_Status* status) {
  return cs::SetStringProperty(property, value, status);
}

char** CS_GetEnumPropertyChoices(CS_Property property, int* count,
                                 CS_Status* status) {
  auto choices = cs::GetEnumPropertyChoices(property, status);
  char** out = static_cast<char**>(std::malloc(choices.size() * sizeof(char*)));
  *count = choices.size();
  for (size_t i = 0; i < choices.size(); ++i)
    out[i] = cs::ConvertToC(choices[i]);
  return out;
}

CS_SourceKind CS_GetSourceKind(CS_Source source, CS_Status* status) {
  return cs::GetSourceKind(source, status);
}

char* CS_GetSourceName(CS_Source source, CS_Status* status) {
  llvm::SmallString<128> buf;
  auto str = cs::GetSourceName(source, buf, status);
  if (*status != 0) return nullptr;
  return cs::ConvertToC(str);
}

char* CS_GetSourceDescription(CS_Source source, CS_Status* status) {
  llvm::SmallString<128> buf;
  auto str = cs::GetSourceDescription(source, buf, status);
  if (*status != 0) return nullptr;
  return cs::ConvertToC(str);
}

uint64_t CS_GetSourceLastFrameTime(CS_Source source, CS_Status* status) {
  return cs::GetSourceLastFrameTime(source, status);
}

CS_Bool CS_IsSourceConnected(CS_Source source, CS_Status* status) {
  return cs::IsSourceConnected(source, status);
}

CS_Property CS_GetSourceProperty(CS_Source source, const char* name,
                                 CS_Status* status) {
  return cs::GetSourceProperty(source, name, status);
}

CS_Property* CS_EnumerateSourceProperties(CS_Source source, int* count,
                                          CS_Status* status) {
  llvm::SmallVector<CS_Property, 32> buf;
  auto vec = cs::EnumerateSourceProperties(source, buf, status);
  CS_Property* out =
      static_cast<CS_Property*>(std::malloc(vec.size() * sizeof(CS_Property)));
  *count = vec.size();
  std::copy(vec.begin(), vec.end(), out);
  return out;
}

void CS_GetSourceVideoMode(CS_Source source, CS_VideoMode* mode,
                           CS_Status* status) {
  *mode = cs::GetSourceVideoMode(source, status);
}

CS_Bool CS_SetSourceVideoMode(CS_Source source, const CS_VideoMode* mode,
                              CS_Status* status) {
  return cs::SetSourceVideoMode(
      source, static_cast<const cs::VideoMode&>(*mode), status);
}

CS_Bool CS_SetSourceVideoModeDiscrete(CS_Source source,
                                      enum CS_PixelFormat pixelFormat,
                                      int width, int height, int fps,
                                      CS_Status* status) {
  return cs::SetSourceVideoMode(
      source,
      cs::VideoMode{static_cast<cs::VideoMode::PixelFormat>(
                        static_cast<int>(pixelFormat)),
                    width, height, fps},
      status);
}

CS_Bool CS_SetSourcePixelFormat(CS_Source source,
                                enum CS_PixelFormat pixelFormat,
                                CS_Status* status) {
  return cs::SetSourcePixelFormat(
      source,
      static_cast<cs::VideoMode::PixelFormat>(static_cast<int>(pixelFormat)),
      status);
}

CS_Bool CS_SetSourceResolution(CS_Source source, int width, int height,
                               CS_Status* status) {
  return cs::SetSourceResolution(source, width, height, status);
}

CS_Bool CS_SetSourceFPS(CS_Source source, int fps, CS_Status* status) {
  return cs::SetSourceFPS(source, fps, status);
}

CS_VideoMode* CS_EnumerateSourceVideoModes(CS_Source source, int* count,
                                           CS_Status* status) {
  auto vec = cs::EnumerateSourceVideoModes(source, status);
  CS_VideoMode* out = static_cast<CS_VideoMode*>(
      std::malloc(vec.size() * sizeof(CS_VideoMode)));
  *count = vec.size();
  std::copy(vec.begin(), vec.end(), out);
  return out;
}

CS_Sink* CS_EnumerateSourceSinks(CS_Source source, int* count,
                                 CS_Status* status) {
  llvm::SmallVector<CS_Sink, 32> buf;
  auto handles = cs::EnumerateSourceSinks(source, buf, status);
  CS_Sink* sinks =
      static_cast<CS_Sink*>(std::malloc(handles.size() * sizeof(CS_Sink)));
  *count = handles.size();
  std::copy(handles.begin(), handles.end(), sinks);
  return sinks;
}

CS_Source CS_CopySource(CS_Source source, CS_Status* status) {
  return cs::CopySource(source, status);
}

void CS_ReleaseSource(CS_Source source, CS_Status* status) {
  return cs::ReleaseSource(source, status);
}

void CS_SetCameraBrightness(CS_Source source, int brightness,
                            CS_Status* status) {
  return cs::SetCameraBrightness(source, brightness, status);
}

int CS_GetCameraBrightness(CS_Source source, CS_Status* status) {
  return cs::GetCameraBrightness(source, status);
}

void CS_SetCameraWhiteBalanceAuto(CS_Source source, CS_Status* status) {
  return cs::SetCameraWhiteBalanceAuto(source, status);
}

void CS_SetCameraWhiteBalanceHoldCurrent(CS_Source source, CS_Status* status) {
  return cs::SetCameraWhiteBalanceHoldCurrent(source, status);
}

void CS_SetCameraWhiteBalanceManual(CS_Source source, int value,
                                    CS_Status* status) {
  return cs::SetCameraWhiteBalanceManual(source, value, status);
}

void CS_SetCameraExposureAuto(CS_Source source, CS_Status* status) {
  return cs::SetCameraExposureAuto(source, status);
}

void CS_SetCameraExposureHoldCurrent(CS_Source source, CS_Status* status) {
  return cs::SetCameraExposureHoldCurrent(source, status);
}

void CS_SetCameraExposureManual(CS_Source source, int value,
                                CS_Status* status) {
  return cs::SetCameraExposureManual(source, value, status);
}

CS_SinkKind CS_GetSinkKind(CS_Sink sink, CS_Status* status) {
  return cs::GetSinkKind(sink, status);
}

char* CS_GetSinkName(CS_Sink sink, CS_Status* status) {
  llvm::SmallString<128> buf;
  auto str = cs::GetSinkName(sink, buf, status);
  if (*status != 0) return nullptr;
  return cs::ConvertToC(str);
}

char* CS_GetSinkDescription(CS_Sink sink, CS_Status* status) {
  llvm::SmallString<128> buf;
  auto str = cs::GetSinkDescription(sink, buf, status);
  if (*status != 0) return nullptr;
  return cs::ConvertToC(str);
}

void CS_SetSinkSource(CS_Sink sink, CS_Source source, CS_Status* status) {
  return cs::SetSinkSource(sink, source, status);
}

CS_Source CS_GetSinkSource(CS_Sink sink, CS_Status* status) {
  return cs::GetSinkSource(sink, status);
}

CS_Property CS_GetSinkSourceProperty(CS_Sink sink, const char* name,
                                     CS_Status* status) {
  return cs::GetSinkSourceProperty(sink, name, status);
}

CS_Sink CS_CopySink(CS_Sink sink, CS_Status* status) {
  return cs::CopySink(sink, status);
}

void CS_ReleaseSink(CS_Sink sink, CS_Status* status) {
  return cs::ReleaseSink(sink, status);
}

void CS_SetListenerOnStart(void (*onStart)(void* data), void* data) {
  cs::SetListenerOnStart([=]() { onStart(data); });
}

void CS_SetListenerOnExit(void (*onExit)(void* data), void* data) {
  cs::SetListenerOnExit([=]() { onExit(data); });
}

CS_Listener CS_AddListener(void* data,
                           void (*callback)(void* data, const CS_Event* event),
                           int eventMask, int immediateNotify,
                           CS_Status* status) {
  return cs::AddListener(
      [=](const cs::RawEvent& rawEvent) {
        CS_Event event;
        event.kind = static_cast<CS_EventKind>(static_cast<int>(rawEvent.kind));
        event.source = rawEvent.sourceHandle;
        event.sink = rawEvent.sinkHandle;
        event.name = rawEvent.name.c_str();
        event.mode = rawEvent.mode;
        event.property = rawEvent.propertyHandle;
        event.propertyKind = rawEvent.propertyKind;
        event.value = rawEvent.value;
        event.valueStr = rawEvent.valueStr.c_str();
        callback(data, &event);
      },
      eventMask, immediateNotify, status);
}

void CS_RemoveListener(CS_Listener handle, CS_Status* status) {
  return cs::RemoveListener(handle, status);
}

int CS_NotifierDestroyed(void) { return cs::NotifierDestroyed(); }

void CS_SetTelemetryPeriod(double seconds) { cs::SetTelemetryPeriod(seconds); }

double CS_GetTelemetryElapsedTime(void) {
  return cs::GetTelemetryElapsedTime();
}

int64_t CS_GetTelemetryValue(CS_Handle handle, CS_TelemetryKind kind,
                             CS_Status* status) {
  return cs::GetTelemetryValue(handle, kind, status);
}

double CS_GetTelemetryAverageValue(CS_Handle handle, CS_TelemetryKind kind,
                                   CS_Status* status) {
  return cs::GetTelemetryAverageValue(handle, kind, status);
}

void CS_SetLogger(CS_LogFunc func, unsigned int min_level) {
  cs::SetLogger(func, min_level);
}

void CS_SetDefaultLogger(unsigned int min_level) {
  cs::SetDefaultLogger(min_level);
}

CS_Source* CS_EnumerateSources(int* count, CS_Status* status) {
  llvm::SmallVector<CS_Source, 32> buf;
  auto handles = cs::EnumerateSourceHandles(buf, status);
  CS_Source* sources =
      static_cast<CS_Source*>(std::malloc(handles.size() * sizeof(CS_Source)));
  *count = handles.size();
  std::copy(handles.begin(), handles.end(), sources);
  return sources;
}

void CS_ReleaseEnumeratedSources(CS_Source* sources, int count) {
  if (!sources) return;
  for (int i = 0; i < count; ++i) {
    CS_Status status = 0;
    if (sources[i] != 0) cs::ReleaseSource(sources[i], &status);
  }
  std::free(sources);
}

CS_Sink* CS_EnumerateSinks(int* count, CS_Status* status) {
  llvm::SmallVector<CS_Sink, 32> buf;
  auto handles = cs::EnumerateSinkHandles(buf, status);
  CS_Sink* sinks =
      static_cast<CS_Sink*>(std::malloc(handles.size() * sizeof(CS_Sink)));
  *count = handles.size();
  std::copy(handles.begin(), handles.end(), sinks);
  return sinks;
}

void CS_ReleaseEnumeratedSinks(CS_Sink* sinks, int count) {
  if (!sinks) return;
  for (int i = 0; i < count; ++i) {
    CS_Status status = 0;
    if (sinks[i] != 0) cs::ReleaseSink(sinks[i], &status);
  }
  std::free(sinks);
}

void CS_FreeString(char* str) { std::free(str); }

void CS_FreeEnumPropertyChoices(char** choices, int count) {
  if (!choices) return;
  for (int i = 0; i < count; ++i) std::free(choices[i]);
  std::free(choices);
}

void CS_FreeEnumeratedProperties(CS_Property* properties, int count) {
  std::free(properties);
}

void CS_FreeEnumeratedVideoModes(CS_VideoMode* modes, int count) {
  std::free(modes);
}

char* CS_GetHostname() { return cs::ConvertToC(cs::GetHostname()); }

char** CS_GetNetworkInterfaces(int* count) {
  auto interfaces = cs::GetNetworkInterfaces();
  char** out =
      static_cast<char**>(std::malloc(interfaces.size() * sizeof(char*)));
  *count = interfaces.size();
  for (size_t i = 0; i < interfaces.size(); ++i)
    out[i] = cs::ConvertToC(interfaces[i]);
  return out;
}

void CS_FreeNetworkInterfaces(char** interfaces, int count) {
  if (!interfaces) return;
  for (int i = 0; i < count; ++i) std::free(interfaces[i]);
  std::free(interfaces);
}

}  // extern "C"


text:
package com.foc.gui;

import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.foc.desc.FocObject;

@SuppressWarnings("serial")
public class RevisionPanel extends FPanel {

  private FocObject focObj = null;
  private FGButton revisionButton = null;

  public RevisionPanel(String frameTitle, int fill){
    super(frameTitle,fill);
  }

  public void dispose(){
    if(focObj != null && revisionButton != null){
      focObj.removeRelatedGuiComponent(revisionButton);
    }
    super.dispose();
  }

  public RevisionPanel getParentRevisionPanel(FocObject focObj, int fieldId){
    this.focObj = focObj;
    RevisionPanel panel = new RevisionPanel("",FPanel.FILL_NONE);
    Component comp = panel.addField(this.focObj, fieldId, 0, 0);
    comp.setEnabled(false);
    revisionButton = new FGButton("+");
    revisionButton.addActionListener(new RevisionIncrementButtonListener(this.focObj));
    panel.addField(revisionButton, 1, 0, FPanel.FILL_NONE);
    this.focObj.addRelatedGuiComponent(revisionButton);
    return panel;
  }

  private class RevisionIncrementButtonListener implements ActionListener {
    private FocObject focObj = null;
    public RevisionIncrementButtonListener(FocObject focObj) {
      this.focObj = focObj;
    }
    public void actionPerformed(ActionEvent a) {
      focObj.incrementRevision();
    }
  }
}


text: export const unused1 = 1;


text:
<?

/**
* Database Connection / Manipulation Class
*
* @package CorpusPHP
* @subpackage Data
* @author Jesse G. Donat
* @author Jon Henderson
* @version 1.2
*/
abstract class Database {

	public static $link;

	/**
	* Constants for use with ::fetch
	*/
	const KEYVALUE = 'keyvalue', KEYROW = 'keyrow', ROW = 'row', SCALAR = 'scalar', FLAT = 'flat';

	/**
	* Creates connection to the database, checks the database character set, and sets the database to work in UTF-8
	*/
	public static function make_connection() {
		global $_ms;
		self::$link = @mysql_connect(static::$_host, static::$_user, static::$_password);
		if(!self::$link) trigger_error('Error Connecting to Database', E_USER_ERROR);
		if(!mysql_select_db(DB_DATABASE)) trigger_error('Cannot Locate Database: ' . DB_DATABASE, E_USER_ERROR);

		//Check if the database is UTF-8 because we're responsible like that.
		if( mysql_fetch_object( self::query( "Show Variables Like 'character_set_database'" ) )->Value != 'utf8' ) {
			die( 'Fatal Error: The database\'s default encoding is not UTF-8. Please correctly configure your database and reimport to prevent corruption.' );
		}

		mysql_query( "SET NAMES "         . static::$_charset );
		mysql_query( "SET CHARACTER SET " . static::$_charset );
	}

	/**
	* Wrapper Class for mysql_real_escape_string which also trims unless instructed not to
	*
	* @param string $str string to escape/trim
	* @param bool $trim whether or not to trim
	* @return string escaped/trimmed string
	*/
	static function input($str, $trim = true) {
		if(!self::$link) { self::make_connection(); }

		if($trim) $str = trim($str);
		return mysql_real_escape_string($str);
	}

	/**
	* Wrapper for mysql_query with error-ing
	* Will return passed resource if passed a resource
	*
	* @param string|resource $query query string or query.
	* @param mixed $fatal whether a query error is fatal to the application
	* @return resource the returned query resource
	*/
	static function query($query, $fatal = true, $display = false) {
		if(!self::$link) { self::make_connection(); }

		if( is_resource($query) ) { return $query; }
		$qry = mysql_query($query);
		if(!$qry) self::error($query, mysql_error(), $fatal, $display);
		return $qry;
	}

	/**
	* Wrapper for mysql_insert_id
	*
	* @todo Determine implications of casting to int
	* @return int
	*/
	static function id() { return (int)mysql_insert_id(); }

	private static function error($qry, $error, $fatal, $display = true) {
		global $_ms;
		//needs logic look into
		$trace_str = _errorTracer('query');
		if($fatal) {
			die('
'. $error . '

' . $qry . '	' . $trace_str . '
');
		}else{
			if(is_object($_ms) && $display) { $_ms->add($error . ' : ' . $qry . $trace_str, true); }
			return false;
		}
	}

	/**
	* A function for building an Insert / Update query string based on an array
	*
	* @author Jesse G. Donat
	* @author Jon Henderson
	* @param string $table The database table
	* @param array $data The data to be inserted / updated in the format of array(fieldname => value, fieldname2 => value) with special, extrasafe code injection via array( fieldname => array( true, 'raw unescaped, unquoted sql') )
	* @param string|bool $parameters
	* @param bool $escape whether or not to escape all data from the array
	* @return string the built query string
	*/
	static function build($table, $data, $parameters = false, $escape = true) {

		foreach($data as $column => $value){

			if ( is_array($value) && $value[0] === true ) {
				$values .= "`{$column}` = {$value[1]}, ";
			}else{
				$values .= "`{$column}` = '" . ( $escape ? self::input( $value ) : $value ) . "', ";
			}

		}

		$action = is_string($parameters) ? " Update {$table} Set " : ( $parameters === true ? " Replace Into {$table} Set " : " Insert Into {$table} Set ");
		$values = rtrim($values, ', ');
		$condition = is_string($parameters) ? " where {$parameters} " : " ";

		return $action . $values . $condition;
	}

	/**
	* Builds and Executes a query based on an array
	*
	* @see self::build
	* @param string $table
	* @param array $data
	* @param string|bool $parameters
	* @param bool $fatal whether to die on the query returning an error
	* @param mixed $escape
	* @return resource
	*/
	static function perform($table, $data, $parameters = false, $fatal = true, $escape = true) {
		return self::query( self::build( $table, $data, $parameters, $escape ) , $fatal);
	}

	/**
	* Return from a query.  Note, this is *not* simply mysql_fetch_array wrapper
	*
	* @todo rename to prevent mysql_fetch_array name confusion
	* @todo universal/updated trim support
	* @todo ::KEYROW - Maybe some way to chose a key?
	* @param string|resource $qry
	* @param bool|string $type ex: ::KEYVALUE, ::KEYROW, ::ROW, ::SCALAR, ::FLAT
	* @param bool $trim
	* @return array|scalar the result of the query in the format chosen by type
	*/
	static function fetch($qry, $type = false, $trim = true) {
		$qry = self::query( $qry );
		$data = array();

		switch( $type ) {
			case self::KEYVALUE:
				while($row = mysql_fetch_array($qry)) {
					if($trim) $row[1] = trim( $row[1] );
					$data[$row[0]] = $row[1];
				}
				break;
			case self::KEYROW:
				while($row = mysql_fetch_array($qry)) {
					$data[$row[0]] = $row;
				}
				break;
			case self::ROW:
				$data = mysql_fetch_assoc($qry);
				break;
			case self::SCALAR:
				$row = mysql_fetch_array($qry);
				$data = $row[0];
				break;
			case self::FLAT:
				while($row = mysql_fetch_array($qry)) {
					if($trim) $row[0] = trim( $row[0] );
					$data[] = $row[0];
				}
				break;
			default:
				while($row = mysql_fetch_assoc($qry)) { $data[] = $row; }
		}
		return $data;
	}

	/**
	* Backs up the database using MySQL Dump and Gzip
	* @todo This is not well implimented
	*/
	static function backup() {
		$db_file = DFS_DB_BACKUP . 'db_' . DB_DATABASE . '-' . date('YmdHis') . '.sql.gz';
		$command = "mysqldump --opt --host=".DB_HOST." --user=".DB_USER." --password=".DB_PASSWORD." ".DB_DATABASE." | gzip > ".$db_file;
		exec($command);
		if( is_file($db_file) ) { return true; }
		return false;
	}

	/**
	* Returns the members of a MySQL enumeration as an array
	*
	* @todo Will fail if enumeration member contains ', or ')
	* @param string $table the table containing the enumeration
	* @param string $field the enumeration field
	* @return array the members of the enumeration
	*/
	static function enumMembers($table, $field) {
		$row = self::fetch("show columns from " . $table . " where field = '" . self::input($field) . "'", db::ROW);
		preg_match_all( '/\'(.*?)\'(?=[,)])/' , $row['Type'], $enum_array );
		return $enum_array[1];
	}

}


text:
package info.liberitas.wss.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created by IntelliJ IDEA.
 * User: Alexander <estliberitas> Makarenko
 * Date: 28.04.12
 * Time: 20:18
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
public @interface Handler {
}


text:
class Mp3File
  attr_reader :contents, :validation_errors, :info, :file
  attr_accessor :id

  include Mp3FileValidations

  STORE_DIR = 'public/mp3_files'
  V2_TAGNAME_MAPPING = {
    'TIT2' => 'title',
    'TPE1' => 'artist',
    'TALB' => 'album',
    'TYER' => 'year',
    'TCON' => 'genre',
    'TPUB' => 'publisher',
    'COMM' => 'comments'
  }

  # == Initialize Mp3 File object
  def initialize(*args)
    if !args || args.empty?
      raise ArgumentError, "Incorrect arguments specified to build Mp3File.
        Examples: Mp3File.new(file: #<File:...>)"
    else
      @file = args.first[:file]
    end

    validate!
  end

  # == Validate
  def validate!
    @validation_errors = {}

    validate_mime_type('File type', @file, @validation_errors)
  end

  def save
    if valid?
      unless persistent?
        # store new file in project with the link redis link
        prefix = Digest::MD5.hexdigest(Time.now.to_f.to_s).last(4)
        mp3_file_path = File.join(STORE_DIR, prefix + File.basename(@file.path))
        FileUtils.cp(@file.path, File.expand_path('.', mp3_file_path))

        UAWCFinal.application_redis.set(self.assign_new_id, mp3_file_path)

        File.join(STORE_DIR, prefix + File.basename(@file.path))
      end

      true
    else
      false
    end
  end

  def update_tags(tag_hash)
    Mp3Info.open(@file.path) do |mp3|
      mp3.tag1 = tag_hash['v1']

      # next line raises error in library, doing manually
      # mp3.tag2 = tag_hash['v2']
      mp3.tag2.TIT2 = tag_hash['v2']['TIT2']
      mp3.tag2.TPE1 = tag_hash['v2']['TPE1']
      mp3.tag2.TALB = tag_hash['v2']['TALB']
      mp3.tag2.TYER = tag_hash['v2']['TYER']
      mp3.tag2.TCON = tag_hash['v2']['TCON']
      mp3.tag2.TPUB = tag_hash['v2']['TPUB']
      mp3.tag2.COMM = tag_hash['v2']['COMM']
    end
  end

  def persistent?
    return false unless @id

    UAWCFinal.application_redis.keys.include?(@id)
  end

  def assign_new_id
    @id = Digest::MD5.hexdigest(Time.now.to_f.to_s).last(8)
  end

  def generate_waveform_image
    WaveformGenerator.new(@file.path).generate_waveform
  end

  def email_file(recipient) #:nodoc:
    smtp_settings = {
      :address              => "smtp.gmail.com",
      :port                 => 587,
      :user_name            => "teachme.notifier@gmail.com",
      :password             => "teachme.notifier",
      :authentication       => "plain",
      :enable_starttls_auto => true
    }

    Mail.defaults do
      delivery_method :smtp, smtp_settings
    end

    path = @file.path

    begin
      Mail.deliver do
        to recipient
        from 'uawc-mp3-editor-tool@uawc-mp3-editor.com'
        subject 'Your mp3 file has successfully been generated'
        body 'Your mp3 file has successfully been generated'
        attachments[File.basename(path)] = File.read(path)
      end
    rescue => exception
    end
  end

  def valid?
    @validation_errors && @validation_errors.empty?
  end

  def info
    @info ||= Mp3Info.open(@file.path) if valid?
  end

  def reload_info!
    @info = Mp3Info.open(@file.path) if valid?
  end

  def error_full_messages #:nodoc:
    @validation_errors.map do |attribute, validation_error|
      "#{attribute.to_s.capitalize} #{validation_error}"
    end
  end

  def self.find(id)
    filepath = UAWCFinal.application_redis.get(id)

    raise Errno::ENOENT.new unless filepath

    mp3_file = self.new(file: File.open(filepath, 'r'))
    mp3_file.id = id
    mp3_file
  end

end


text:
cask "chef-workstation" do
  version "21.9.613"
  sha256 "609bb278c84ad5b887145272da89b2c5ea9221ed51af5021f1ce477bf34b5d17"

  url "https://packages.chef.io/files/stable/chef-workstation/#{version}/mac_os_x/10.15/chef-workstation-#{version}-1.x86_64.dmg"
  name "Chef Workstation"
  desc "All-in-one installer for the tools you need to manage your Chef infrastructure"
  homepage "https://docs.chef.io/workstation/"

  livecheck do
    url "https://omnitruck.chef.io/stable/chef-workstation/metadata?p=mac_os_x&pv=10.15&m=x86_64&v=latest"
    regex(/version\s*(\d+(?:\.\d+)+)/i)
  end

  depends_on macos: ">= :mojave"

  pkg "chef-workstation-#{version}-1.x86_64.pkg"

  uninstall quit:      "sh.chef.chef-workstation",
            pkgutil:   "com.getchef.pkg.chef-workstation",
            launchctl: "io.chef.chef-workstation.app",
            script:    {
              executable: "/opt/chef-workstation/bin/uninstall_chef_workstation",
              sudo:       true,
            }

  zap trash: "~/.chef-workstation/"
end


text:
#ifndef ZOLTAN_HSFC_H
#define ZOLTAN_HSFC_H

#include <stdio.h>
#include <math.h>
#include <memory.h>
#include <limits.h>
#include <string.h>
#include <float.h>

#include "zz_const.h"
#include "all_allo_const.h"
#include "params_const.h"
#include "zoltan_util.h"
#include "hsfc_hilbert_const.h"
#include "hsfc_const.h"

#ifdef __cplusplus
/* if C++, define the rest of this header file as extern C */
extern "C" {
#endif

/* Andy's value * 1.6, points on face of bounding box must become interior */
static const double HSFC_EPSILON = 1.6e-7;

/* limit at which bin can't be divided */
static const double  REFINEMENT_LIMIT = 10.0 * DBL_EPSILON;

/* when dots have no weight, use this */
static const double  DEFAULT_WEIGHT = 1.0;

/* number of "bins per processor", small positive integer */
static const int N = 8;

/* refinement now hitting limit of double precision */
static const int MAX_LOOPS = 16;

/* The following are used in determining the max/min hsfc coordinates in
   a bin, if bin empty */
static const double  DEFAULT_BIN_MAX = -2.0;
static const double  DEFAULT_BIN_MIN =  2.0;

#define ZOLTAN_HSFC_ERROR(error,str) {err = error; \
 ZOLTAN_PRINT_ERROR(zz->Proc, yo, str); goto End;}

typedef struct Partition {
   double r;            /* rightmost boundary of partition interval */
   double l;            /* leftmost boundary of partition interval  */
   int index;           /* number of "owner" of data in interval */
   } Partition;         /* interval is half open, [l,r) */

typedef struct HSFC_Data {
   Partition *final_partition;
   double     bbox_hi[3];        /* smallest bounding box, high point */
   double     bbox_lo[3];        /* smallest bounding box, low point */
   double     bbox_extent[3];    /* length of each side of bounding box */
   int        ndimension;        /* number of dimensions in problem (2 or 3) */
   double    (*fhsfc)(ZZ*, double*);  /* space filling curve function */
   ZZ_Transform tran;            /* transformation for degenerate geometry */
   } HSFC_Data;                  /* data preserved for point & box drop later */

typedef struct Dots {
   double fsfc;         /* computed normalized SFC coordinate     */
   double x[3];         /* dots coordinates in problem domain     */
   float weight;        /* scalar computed from weight vector     */
   int   part;          /* partition to which dot is assigned     */
   } Dots;              /* represents objects being load-balanced */

extern int  Zoltan_HSFC_compare (const void *key, const void *arg);

#ifdef __cplusplus
} /* closing bracket for extern "C" */
#endif

#endif


text:
	{{#programmes}}

{{name}}

	{{/programmes}}


text:
using Swinesweeper.Utilities.Interfaces;
using System;

namespace Swinesweeper.Utilities
{
    public class RandomNumberGenerator : IRangedNumberGenerator
    {
        private readonly Random _random;

        public RandomNumberGenerator()
        {
            _random = new Random();
        }

        public int GetNumber(int min, int max)
        {
            return _random.Next(min, max);
        }
    }
}


text:
Various test projects for the HODEA library

## Use of Third Party Libraries
This project makes use of the [Catch](https://github.com/philsquared/catch)
testing library. Please see the
[ThirdPartyNotices.md](./ThirdPartyNotices.md) file for details
regarding the licensing of Catch.


text:
package com.yoreay.design.patterns.proxy;

/**
 * Created by sanze on 2016/7/19.
 */
public class WinnerState implements State {
    transient GumballMachine gumballMachine;

    public WinnerState(GumballMachine gumballMachine) {
        this.gumballMachine = gumballMachine;
    }

    @Override
    public void insertQuarter() {
        System.out.println("xxx.");
    }

    @Override
    public void ejectQuarter() {
        System.out.println("xxx.");
    }

    @Override
    public void turnCrank() {
        System.out.println("xxx.");
    }

    @Override
    public void dispense() {
        System.out.println("YOU'RE A WINNER! You get two gumballs for your quarter");
        gumballMachine.releaseBall();
        if (gumballMachine.getCount() == 0) {
            gumballMachine.setState(gumballMachine.getSoldOutState());
        } else {
            gumballMachine.releaseBall();
            if (gumballMachine.getCount() > 0) {
                gumballMachine.setState(gumballMachine.getNoQuarterState());
            } else {
                System.out.println("Oops, out of gumballs");
                gumballMachine.setState(gumballMachine.getSoldOutState());
            }
        }
    }
}


text:
require 'terraframe/provider'
require 'terraframe/resource'

module Terraframe
  class Context
    def provider_type
      raise "provider_type be implemented in subclassed contexts."
    end
  end
end


text:
/**
 * Autoinsert script tags (or other filebased tags) in an html file.
 *
 * ---------------------------------------------------------------
 *
 * Automatically inject <script> tags for javascript files and <link> tags
 * for css files.  Also automatically links an output file containing precompiled
 * templates using a <script> tag.
 *
 * For usage docs see:
 * 		https://github.com/Zolmeister/grunt-sails-linker
 *
 */

module.exports = function(grunt) {

	grunt.config.set('sails-linker', {
		devJs: {
			options: {
				startTag: '<!--SCRIPTS FRONT-->',
				endTag: '<!--SCRIPTS FRONT END-->',
				fileTmpl: '<script src="%s"></script>',
				appRoot: '.tmp/public'
			},
			files: {
				'.tmp/public/frontend/**/*.html': require('../pipeline').jsFilesToInject,
				'views/frontend/**/*.html': require('../pipeline').jsFilesToInject,
				'views/frontend/**/*.ejs': require('../pipeline').jsFilesToInject
			}
		},
		devBackJs: {
			options: {
				startTag: '<!--SCRIPTS BACK-->',
				endTag: '<!--SCRIPTS BACK END-->',
				fileTmpl: '<script src="%s"></script>',
				appRoot: '.tmp/public'
			},
			files: {
				'.tmp/public/backend/**/*.html': require('../pipeline').jsBackFilesToInject,
				'views/backend/**/*.html': require('../pipeline').jsBackFilesToInject,
				'views/backend/**/*.ejs': require('../pipeline').jsBackFilesToInject
			}
		},

		prodJs: {
			options: {
				startTag: '<!--SCRIPTS FRONT-->',
				endTag: '<!--SCRIPTS FRONT END-->',
				fileTmpl: '<script src="%s"></script>',
				appRoot: '.tmp/public'
			},
			files: {
				'.tmp/public/frontend/**/*.html': ['.tmp/public/frontend/min/front-production.js'],
				'views/frontend/**/*.html': ['.tmp/public/frontend/min/front-production.js'],
				'views/frontend/**/*.ejs': ['.tmp/public/frontend/min/front-production.js']
			}
		},
		prodBackJs: {
			options: {
				startTag: '<!--SCRIPTS BACK-->',
				endTag: '<!--SCRIPTS BACK END-->',
				fileTmpl: '<script src="%s"></script>',
				appRoot: '.tmp/public'
			},
			files: {
				'.tmp/public/backend/**/*.html': ['.tmp/public/backend/min/back-production.js'],
				'views/backend/**/*.html': ['.tmp/public/backend/min/back-production.js'],
				'views/backend/**/*.ejs': ['.tmp/public/backend/min/back-production.js']
			}
		},

		devStyles: {
			options: {
				startTag: '<!--STYLES FRONT-->',
				endTag: '<!--STYLES FRONT END-->',
				fileTmpl: '<link rel="stylesheet" href="%s">',
				appRoot: '.tmp/public'
			},

			files: {
				'.tmp/public/**/*.html': require('../pipeline').cssFilesToInject,
				'views/**/*.html': require('../pipeline').cssFilesToInject,
				'views/**/*.ejs': require('../pipeline').cssFilesToInject
			}
		},
		devBackStyles: {
			options: {
				startTag: '<!--STYLES BACK-->',
				endTag: '<!--STYLES BACK END-->',
				fileTmpl: '<link rel="stylesheet" href="%s">',
				appRoot: '.tmp/public'
			},

			files: {
				'.tmp/public/backend/**/*.html': require('../pipeline').cssBackFilesToInject,
				'views/backend/**/*.html': require('../pipeline').cssBackFilesToInject,
				'views/backend/**/*.ejs': require('../pipeline').cssBackFilesToInject
			}
		},

		prodStyles: {
			options: {
				startTag: '<!--STYLES FRONT-->',
				endTag: '<!--STYLES FRONT END-->',
				fileTmpl: '<link rel="stylesheet" href="%s">',
				appRoot: '.tmp/public'
			},
			files: {
				'.tmp/public/frontend/index.html': ['.tmp/public/frontend/min/front-production.css'],
				'views/frontend/**/*.html': ['.tmp/public/frontend/min/front-production.css'],
				'views/frontend/**/*.ejs': ['.tmp/public/frontend/min/front-production.css']
			}
		},
		prodBackStyles: {
			options: {
				startTag: '<!--STYLES BACK-->',
				endTag: '<!--STYLES BACK END-->',
				fileTmpl: '<link rel="stylesheet" href="%s">',
				appRoot: '.tmp/public'
			},
			files: {
				'.tmp/public/backend/index.html': ['.tmp/public/backend/min/back-production.css'],
				'views/backend/**/*.html': ['.tmp/public/backend/min/back-production.css'],
				'views/backend/**/*.ejs': ['.tmp/public/backend/min/back-production.css']
			}
		},

		// Bring in JST template object
		devTpl: {
			options: {
				startTag: '<!--TEMPLATES FRONT-->',
				endTag: '<!--TEMPLATES FRONT END-->',
				fileTmpl: '<script type="text/javascript" src="%s"></script>',
				appRoot: '.tmp/public'
			},
			files: {
				'.tmp/public/index.html': ['.tmp/public/frontend/jst.js'],
				'views/**/*.html': ['.tmp/public/frontend/jst.js'],
				'views/**/*.ejs': ['.tmp/public/frontend/jst.js']
			}
		},
		devBackTpl: {
			options: {
				startTag: '<!--TEMPLATES BACK-->',
				endTag: '<!--TEMPLATES BACK END-->',
				fileTmpl: '<script type="text/javascript" src="%s"></script>',
				appRoot: '.tmp/public'
			},
			files: {
				'.tmp/public/index.html': ['.tmp/public/backend/jst.js'],
				'views/**/*.html': ['.tmp/public/backend/jst.js'],
				'views/**/*.ejs': ['.tmp/public/backend/jst.js']
			}
		}
	});

	grunt.loadNpmTasks('grunt-sails-linker');
};


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Ann. Bot. , Lond. 15: 330 (1901)

#### Original name
Pleuroascus Massee & E.S. Salmon

### Remarks
null


text:
#pragma once
#include <aws/codebuild/CodeBuild_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/codebuild/model/EnvironmentVariableType.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace CodeBuild
{
namespace Model
{

  /**
   *
Information about an environment variable for a build project or a
   * build.

See Also:
   AWS
   * API Reference

   */
  class AWS_CODEBUILD_API EnvironmentVariable
  {
  public:
    EnvironmentVariable();
    EnvironmentVariable(Aws::Utils::Json::JsonView jsonValue);
    EnvironmentVariable& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The name or key of the environment variable.

     */
    inline const Aws::String& GetName() const{ return m_name; }

    /**
     *
The name or key of the environment variable.

     */
    inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }

    /**
     *
The name or key of the environment variable.

     */
    inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }

    /**
     *
The name or key of the environment variable.

     */
    inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }

    /**
     *
The name or key of the environment variable.

     */
    inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }

    /**
     *
The name or key of the environment variable.

     */
    inline EnvironmentVariable& WithName(const Aws::String& value) { SetName(value); return *this;}

    /**
     *
The name or key of the environment variable.

     */
    inline EnvironmentVariable& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}

    /**
     *
The name or key of the environment variable.

     */
    inline EnvironmentVariable& WithName(const char* value) { SetName(value); return *this;}

    /**
     *
The value of the environment variable.

We strongly
     * discourage the use of PLAINTEXT environment variables to store
     * sensitive values, especially Amazon Web Services secret key IDs and secret
     * access keys. PLAINTEXT environment variables can be displayed in
     * plain text using the CodeBuild console and the CLI. For sensitive values, we
     * recommend you use an environment variable of type PARAMETER_STORE
     * or SECRETS_MANAGER.

     */
    inline const Aws::String& GetValue() const{ return m_value; }

    /**
     *
The value of the environment variable.

We strongly
     * discourage the use of PLAINTEXT environment variables to store
     * sensitive values, especially Amazon Web Services secret key IDs and secret
     * access keys. PLAINTEXT environment variables can be displayed in
     * plain text using the CodeBuild console and the CLI. For sensitive values, we
     * recommend you use an environment variable of type PARAMETER_STORE
     * or SECRETS_MANAGER.

     */
    inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }

    /**
     *
The value of the environment variable.

We strongly
     * discourage the use of PLAINTEXT environment variables to store
     * sensitive values, especially Amazon Web Services secret key IDs and secret
     * access keys. PLAINTEXT environment variables can be displayed in
     * plain text using the CodeBuild console and the CLI. For sensitive values, we
     * recommend you use an environment variable of type PARAMETER_STORE
     * or SECRETS_MANAGER.

     */
    inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }

    /**
     *
The value of the environment variable.

We strongly
     * discourage the use of PLAINTEXT environment variables to store
     * sensitive values, especially Amazon Web Services secret key IDs and secret
     * access keys. PLAINTEXT environment variables can be displayed in
     * plain text using the CodeBuild console and the CLI. For sensitive values, we
     * recommend you use an environment variable of type PARAMETER_STORE
     * or SECRETS_MANAGER.

     */
    inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }

    /**
     *
The value of the environment variable.

We strongly
     * discourage the use of PLAINTEXT environment variables to store
     * sensitive values, especially Amazon Web Services secret key IDs and secret
     * access keys. PLAINTEXT environment variables can be displayed in
     * plain text using the CodeBuild console and the CLI. For sensitive values, we
     * recommend you use an environment variable of type PARAMETER_STORE
     * or SECRETS_MANAGER.

     */
    inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }

    /**
     *
The value of the environment variable.

We strongly
     * discourage the use of PLAINTEXT environment variables to store
     * sensitive values, especially Amazon Web Services secret key IDs and secret
     * access keys. PLAINTEXT environment variables can be displayed in
     * plain text using the CodeBuild console and the CLI. For sensitive values, we
     * recommend you use an environment variable of type PARAMETER_STORE
     * or SECRETS_MANAGER.

     */
    inline EnvironmentVariable& WithValue(const Aws::String& value) { SetValue(value); return *this;}

    /**
     *
The value of the environment variable.

We strongly
     * discourage the use of PLAINTEXT environment variables to store
     * sensitive values, especially Amazon Web Services secret key IDs and secret
     * access keys. PLAINTEXT environment variables can be displayed in
     * plain text using the CodeBuild console and the CLI. For sensitive values, we
     * recommend you use an environment variable of type PARAMETER_STORE
     * or SECRETS_MANAGER.

     */
    inline EnvironmentVariable& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}

    /**
     *
The value of the environment variable.

We strongly
     * discourage the use of PLAINTEXT environment variables to store
     * sensitive values, especially Amazon Web Services secret key IDs and secret
     * access keys. PLAINTEXT environment variables can be displayed in
     * plain text using the CodeBuild console and the CLI. For sensitive values, we
     * recommend you use an environment variable of type PARAMETER_STORE
     * or SECRETS_MANAGER.

     */
    inline EnvironmentVariable& WithValue(const char* value) { SetValue(value); return *this;}

    /**
     *
The type of environment variable. Valid values include:

     * PARAMETER_STORE: An environment variable stored in Systems Manager
     * Parameter Store. To learn how to specify a parameter store environment variable,
     * see env/parameter-store
     * in the CodeBuild User Guide.

 PLAINTEXT:
     * An environment variable in plain text format. This is the default value.

     *

 SECRETS_MANAGER: An environment variable stored in
     * Secrets Manager. To learn how to specify a secrets manager environment variable,
     * see env/secrets-manager
     * in the CodeBuild User Guide.

     */
    inline const EnvironmentVariableType& GetType() const{ return m_type; }

    /**
     *
The type of environment variable. Valid values include:

     * PARAMETER_STORE: An environment variable stored in Systems Manager
     * Parameter Store. To learn how to specify a parameter store environment variable,
     * see env/parameter-store
     * in the CodeBuild User Guide.

 PLAINTEXT:
     * An environment variable in plain text format. This is the default value.

     *

 SECRETS_MANAGER: An environment variable stored in
     * Secrets Manager. To learn how to specify a secrets manager environment variable,
     * see env/secrets-manager
     * in the CodeBuild User Guide.

     */
    inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }

    /**
     *
The type of environment variable. Valid values include:

     * PARAMETER_STORE: An environment variable stored in Systems Manager
     * Parameter Store. To learn how to specify a parameter store environment variable,
     * see env/parameter-store
     * in the CodeBuild User Guide.

 PLAINTEXT:
     * An environment variable in plain text format. This is the default value.

     *

 SECRETS_MANAGER: An environment variable stored in
     * Secrets Manager. To learn how to specify a secrets manager environment variable,
     * see env/secrets-manager
     * in the CodeBuild User Guide.

     */
    inline void SetType(const EnvironmentVariableType& value) { m_typeHasBeenSet = true; m_type = value; }

    /**
     *
The type of environment variable. Valid values include:

     * PARAMETER_STORE: An environment variable stored in Systems Manager
     * Parameter Store. To learn how to specify a parameter store environment variable,
     * see env/parameter-store
     * in the CodeBuild User Guide.

 PLAINTEXT:
     * An environment variable in plain text format. This is the default value.

     *

 SECRETS_MANAGER: An environment variable stored in
     * Secrets Manager. To learn how to specify a secrets manager environment variable,
     * see env/secrets-manager
     * in the CodeBuild User Guide.

     */
    inline void SetType(EnvironmentVariableType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }

    /**
     *
The type of environment variable. Valid values include:

     * PARAMETER_STORE: An environment variable stored in Systems Manager
     * Parameter Store. To learn how to specify a parameter store environment variable,
     * see env/parameter-store
     * in the CodeBuild User Guide.

 PLAINTEXT:
     * An environment variable in plain text format. This is the default value.

     *

 SECRETS_MANAGER: An environment variable stored in
     * Secrets Manager. To learn how to specify a secrets manager environment variable,
     * see env/secrets-manager
     * in the CodeBuild User Guide.

     */
    inline EnvironmentVariable& WithType(const EnvironmentVariableType& value) { SetType(value); return *this;}

    /**
     *
The type of environment variable. Valid values include:

     * PARAMETER_STORE: An environment variable stored in Systems Manager
     * Parameter Store. To learn how to specify a parameter store environment variable,
     * see env/parameter-store
     * in the CodeBuild User Guide.

 PLAINTEXT:
     * An environment variable in plain text format. This is the default value.

     *

 SECRETS_MANAGER: An environment variable stored in
     * Secrets Manager. To learn how to specify a secrets manager environment variable,
     * see env/secrets-manager
     * in the CodeBuild User Guide.

     */
    inline EnvironmentVariable& WithType(EnvironmentVariableType&& value) { SetType(std::move(value)); return *this;}

  private:

    Aws::String m_name;
    bool m_nameHasBeenSet = false;

    Aws::String m_value;
    bool m_valueHasBeenSet = false;

    EnvironmentVariableType m_type;
    bool m_typeHasBeenSet = false;
  };

} // namespace Model
} // namespace CodeBuild
} // namespace Aws


text:
#pragma once

#include "detail/func_geometric.hpp"


text:
import isEvent from "./isEvent.js";
import isReactNative from "./isReactNative.js";

const getSelectedValues = options => {
  const result = [];
  if (options) {
    for (let index = 0; index < options.length; index++) {
      const option = options[index];
      if (option.selected) {
        result.push(option.value);
      }
    }
  }
  return result;
};

const getValue = (event, isReactNative) => {
  if (isEvent(event)) {
    if (
      !isReactNative &&
      event.nativeEvent &&
      event.nativeEvent.text !== undefined
    ) {
      return event.nativeEvent.text;
    }
    if (isReactNative && event.nativeEvent !== undefined) {
      return event.nativeEvent.text;
    }
    const { target: { type, value, checked, files }, dataTransfer } = event;
    if (type === "checkbox") {
      return checked;
    }
    if (type === "file") {
      return files || (dataTransfer && dataTransfer.files);
    }
    if (type === "select-multiple") {
      return getSelectedValues(event.target.options);
    }
    return value;
  }
  return event;
};

const onChangeValue = (event, { name, parse, normalize }) => {
  // read value from input
  let value = getValue(event, isReactNative);

  // parse value if we have a parser
  if (parse) {
    value = parse(value, name);
  }

  // normalize value
  if (normalize) {
    value = normalize(name, value);
  }

  return value;
};

export default onChangeValue;


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

/*============================================================
**
**
**
** Purpose: An exception for OS 'access denied' types of
**          errors, including IO and limited security types
**          of errors.
**
**
===========================================================*/

namespace System
{
    // The UnauthorizedAccessException is thrown when access errors
    // occur from IO or other OS methods.
    [System.Runtime.InteropServices.ComVisible(true)]
    public class UnauthorizedAccessException : Exception
    {
        public UnauthorizedAccessException()
            : base(SR.Arg_UnauthorizedAccessException)
        {
            SetErrorCode(__HResults.COR_E_UNAUTHORIZEDACCESS);
        }

        public UnauthorizedAccessException(String message)
            : base(message)
        {
            SetErrorCode(__HResults.COR_E_UNAUTHORIZEDACCESS);
        }

        public UnauthorizedAccessException(String message, Exception inner)
            : base(message, inner)
        {
            SetErrorCode(__HResults.COR_E_UNAUTHORIZEDACCESS);
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="ExDoc v0.13.2">
    <title>Hangman.Letter.Retrieval.Strategy – Hangman v0.9.6</title>
    <link rel="stylesheet" href="dist/app-bbdf358507.css" />

<button class="sidebar-toggle">

</button>

        Hangman

        v0.9.6

    <input type="text" class="sidebar-searchInput" placeholder="search" autocomplete="off" />

Pages

Modules

Exceptions

Protocols

        Hangman v0.9.6
        Hangman.Letter.Retrieval.Strategy

          behaviour

            Summary

      Functions

    select(strategy)

      Callbacks

    optimal(arg0)

            Functions

    select(strategy)

            Callbacks

    optimal(arg0)

Specs

optimal(Hangman.Letter.Strategy.t) ::
  String.t |
  no_return

            Built using
            ExDoc (v0.13.2),

            designed by
            Friedel Ziegelmayer.

        <button class="night-mode-toggle" />


text:
import { CommonModule } from "@angular/common"
import { NgModule } from "@angular/core"
import { MaterialModule } from "../../../../material/material.module"
import { ArtificialIntelligenceComponent } from "./artificialIntelligence.component"
import { HighRiskProfileComponent } from "./highRiskProfile/highRiskProfile.component"
import { RiskProfileBarDirective } from "./highRiskProfile/riskProfileBar.directive"
import { SuspiciousMetricComponent } from "./suspiciousMetrics/suspiciousMetrics.component"

@NgModule({
	imports: [CommonModule, MaterialModule],
	declarations: [ArtificialIntelligenceComponent, HighRiskProfileComponent, SuspiciousMetricComponent, RiskProfileBarDirective],
	exports: [ArtificialIntelligenceComponent]
})
export class ArtificialIntelligenceModule {}


text:
package jpower.core;

public class WorkerFactory implements Factory<Worker> {
   private final int size;

   public WorkerFactory(int size) {
      this.size = size;
   }

   public WorkerFactory(Worker worker) {
      this(worker.queue.size());
   }

   @Override
   public Worker create() {
      return new Worker(size);
   }
}


text:
<?php

namespace PharmaIntelligence\GstandaardBundle\Model\map;

use \RelationMap;
use \TableMap;

/**
 * This class defines the structure of the 'gs_historisch_bestand_add_on' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    propel.generator.src.PharmaIntelligence.GstandaardBundle.Model.map
 */
class GsHistorischBestandAddOnTableMap extends TableMap
{

    /**
     * The (dot-path) name of this class
     */
    const CLASS_NAME = 'src.PharmaIntelligence.GstandaardBundle.Model.map.GsHistorischBestandAddOnTableMap';

    /**
     * Initialize the table attributes, columns and validators
     * Relations are not initialized by this method since they are lazy loaded
     *
     * @return void
     * @throws PropelException
     */
    public function initialize()
    {
        // attributes
        $this->setName('gs_historisch_bestand_add_on');
        $this->setPhpName('GsHistorischBestandAddOn');
        $this->setClassname('PharmaIntelligence\\GstandaardBundle\\Model\\GsHistorischBestandAddOn');
        $this->setPackage('src.PharmaIntelligence.GstandaardBundle.Model');
        $this->setUseIdGenerator(false);
        // columns
        $this->addForeignPrimaryKey('zindex_nummer', 'ZindexNummer', 'INTEGER' , 'gs_artikelen', 'zinummer', true, null, null);
        $this->addForeignPrimaryKey('zindex_nummer', 'ZindexNummer', 'INTEGER' , 'gs_artikel_eigenschappen', 'zindex_nummer', true, null, null);
        $this->addColumn('artikel_omschrijving', 'ArtikelOmschrijving', 'VARCHAR', false, 255, null);
        $this->addColumn('inkoop_hoeveelheid', 'InkoopHoeveelheid', 'DECIMAL', false, 8, null);
        $this->addColumn('inkoop_eenheid', 'InkoopEenheid', 'CHAR', false, 2, null);
        $this->addColumn('maximum_prijs', 'MaximumPrijs', 'DECIMAL', false, 14, null);
        $this->addColumn('soort_product', 'SoortProduct', 'INTEGER', false, null, null);
        $this->addPrimaryKey('indicatie_id', 'IndicatieId', 'INTEGER', true, null, null);
        $this->addColumn('soort_indicatie', 'SoortIndicatie', 'INTEGER', false, null, null);
        $this->addColumn('duiding_id', 'DuidingId', 'INTEGER', false, null, null);
        $this->addColumn('aanspraak_status', 'AanspraakStatus', 'CHAR', false, 1, null);
        $this->addPrimaryKey('start_datum', 'StartDatum', 'DATE', true, null, null);
        $this->addColumn('eind_datum', 'EindDatum', 'DATE', false, null, null);
        // validators
    } // initialize()

    /**
     * Build the RelationMap objects for this table relationships
     */
    public function buildRelations()
    {
        $this->addRelation('GsArtikelen', 'PharmaIntelligence\\GstandaardBundle\\Model\\GsArtikelen', RelationMap::MANY_TO_ONE, array('zindex_nummer' => 'zinummer', ), null, null);
        $this->addRelation('GsArtikelEigenschappen', 'PharmaIntelligence\\GstandaardBundle\\Model\\GsArtikelEigenschappen', RelationMap::MANY_TO_ONE, array('zindex_nummer' => 'zindex_nummer', ), null, null);
    } // buildRelations()

} // GsHistorischBestandAddOnTableMap


text:
<?php
class Genre extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		$this->load->model('home_model');
        $this->output->cache(240);
	}

	function Index()
	{
		$genre_name=$this->uri->segment(2);
		if(!preg_match('/[a-z]/',$genre_name)){
			redirect(base_url());
			exit(0);
		}
		$this->load->library('sorted');
		if($this->uri->segment(3)=='sort')
		{
			$offset=(int)$this->uri->segment(6);
			$page['base_url'] = base_url().'genre/'.$genre_name.'/sort/'.$this->uri->segment(4).'/page/';
		}
		else
		{
			$offset=(int)$this->uri->segment(4);
			$page['base_url'] = base_url().'genre/'.$genre_name.'/page/';
		}
		if($offset<1)
		{
			$offset=1;
		}
		$genre_id=$this->home_model->genre_id($genre_name);
		if($offset==1)
		{
			$data['site_title']=ucfirst($genre_name).' Movies - Watch Onlline Movies Free';
		}
		else
		{
			$data['site_title']=ucfirst($genre_name).' Movies - Watch Onlline Movies Free - Page-'.$offset;
		}
		$this->load->view('header',$data);
		$this->home_model->Set_free_where();
		$this->home_model->Set_sql("SUBSTRING(film_name,1,20) AS f_name,film_name,YEAR(film_release_date) as year,film_post_link,website_poster_url from gf_film");
		$this->home_model->Set_orderby("film_post_date desc");
		$this->home_model->Set_where("film_feature='Y'");
		$this->home_model->Set_limit("0,6");
		$feature['featured']=$this->home_model->latest_post();
		$this->load->view('home/featured',$feature);
		$this->load->view('home/welcome');
		$this->load->view('home_before_login/below_welcome');
		$this->load->view('home_before_login/search_box');
		$index_data['stage_nav']='
'.ucfirst($genre_name).' Movies
 >
'.$this->sorted->sort_by_title().'
';
		$this->load->library('pagination');
		$page['per_page'] = '24';
		$page['full_tag_open'] = '
';
		$page['full_tag_close'] = '
';
		$page['cur_tag_open'] = '';
		$page['cur_tag_close'] = '';
		$page['rel_tag'] = 'next';
		//load the model and get results
		$offset=(($offset-1)*$page['per_page']);
		$this->home_model->Set_free_where();
		$this->home_model->Set_sql("gf_film.film_id,film_name,DATE_FORMAT(film_release_date,'%d') AS DATE,DATE_FORMAT(film_release_date,'%m') AS month_ori,DATE_FORMAT(film_release_date,'%M') AS MONTH,DATE_FORMAT(film_release_date,'%Y') AS YEAR,film_release_date,film_feature,film_modify,film_post_link,website_poster_url,film_genre_value AS genres FROM gf_film LEFT JOIN gf_film_genre ON gf_film_genre.film_id=gf_film.film_id LEFT JOIN gf_genre ON gf_film_genre.genre_id=gf_genre.genre_id");
		$this->home_model->Set_where("gf_film_genre.genre_id='".$genre_id."'");
		$this->home_model->Set_groupby();
		$this->home_model->Set_orderby($this->sorted->order_by());
		$this->home_model->Set_limit($offset.",".$page['per_page']);
		$index_data['latest_post']=$this->home_model->latest_post();
		$page['cur_page'] = $offset;
		$page['total_rows']=$this->home_model->count_posts();
		$this->pagination->initialize($page);
		$index_data['sort_url']=$this->sorted->sorted_link();
		$this->load->view('home/home_index',$index_data);
		$this->home_model->Set_free_where();
		$this->home_model->Set_sql("genre_id,genre_name from gf_genre");
		$this->home_model->Set_where();
		$this->home_model->Set_groupby();
		$this->home_model->Set_orderby('genre_name');
		$this->home_model->Set_limit();
		$sidebar['watch_category']=$this->home_model->latest_post();
		$this->load->view('sidebar',$sidebar);
		$this->load->view('footer');
	}
}


text:
def is_number(other)
  other.is_a?(Numeric) || other.is_a?(Integer) || other.is_a?(Float)
end

module Epuber
  class Version
    include Comparable

    VERSION_RE ||= /\A[0-9]+(\.[0-9a-zA-Z]+)*\z/

    # True if the +version+ string matches RubyGems' requirements.
    #
    def self.correct?(version)
      version.to_s =~ VERSION_RE
    end

    attr_reader :version, :segments

    # @param [String, Numeric] version input primitive value for version
    #
    def initialize(version)
      unless self.class.correct?(version)
        raise StandardError, "Malformed version number string #{version}"
      end

      @version = version.to_s.strip
    end

    # @return [Array<Numeric>]
    #
    def segments
      @segments ||= @version.scan(/[0-9]+|[a-z]+/i).map do |s|
        /^\d+$/ =~ s ? s.to_i : s
      end
    end

    # @return [String]
    #
    def to_s
      "#{segments.join('.')}"
    end

    # Compares this version with +other+ returning -1, 0, or 1 if the
    # other version is larger, the same, or smaller than this
    # one.
    #
    # @return [Numeric]
    #
    def <=>(other)
      return unless other.is_a?(Version) || other.is_a?(String) || other.is_a?(Float) || other.is_a?(Integer)
      other = other.is_a?(Version) ? other : Version.new(other)

      return 0 if @version == other.version

      lhsegments = segments
      rhsegments = other.segments

      lhsize = lhsegments.size
      rhsize = rhsegments.size
      limit  = (lhsize > rhsize ? lhsize : rhsize) - 1

      i = 0

      while i <= limit
        lhs, rhs = lhsegments[i] || 0, rhsegments[i] || 0
        i += 1

        next      if lhs == rhs
        return -1 if lhs.is_a?(String) && is_number(rhs)
        return  1 if is_number(lhs) && rhs.is_a?(String)

        return lhs <=> rhs
      end

      0
    end
  end
end


text:
<!DOCTYPE html>
  <html>
      <head>
          <title>Demo</title>
          <meta charset="utf-8">
          <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
          <meta name="description" content="Demo project">
          <meta name="viewport" content="width=device-width, initial-scale=1">
          <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
          <style type="text/css"></style>
      </head>
      <body>
          <p>Let the game begin!
      </body>
      <script type="text/javascript"></script>
  </html>


text:
> state: **closed** opened by: **adrianharabula** on: **5/25/2017**

{% raw %}

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/adrianharabula/condr/132)
<!-- Reviewable:end -->

{% endraw %}


text:
/** @file ffutils.h
  * @brief some utilities for working with flat files.
  * @author jeremy hinds
  */

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#ifndef FFUTILS_H
#define FFUTILS_H

/** @brief string comparison - equals */
#define str_eq(a, b) \
	( strcmp(a, b) == 0 )

/** @brief string comparison - less than */
#define str_lt(a, b) \
	( strcmp(a, b) < 0 )

/** @brief string comparison - greater than */
#define str_gt(a, b) \
	( strcmp(a, b) > 0 )

/** @brief MM-DD-YYYY string date comparison - equals */
#define date_eq(a, b) \
	( mdyhms_datecmp(a, b) == 0 )

/** @brief MM-DD-YYYY string date comparison - less than */
#define date_lt(a, b) \
	( mdyhms_datecmp(a, b) < 0 )

/** @brief MM-DD-YYYY string date comparison - greater than */
#define date_gt(a, b) \
	( mdyhms_datecmp(a, b) > 0 )

/** @brief a duff device for unrolling loops by a factor of 8.
  * @param n the number of times to execute the code.
  * @param c the code to be executed.
  */
#define DUFF_DEV_8( n, c ) \
        do {                                    \
                int dd8_i = (n)/8;              \
                if ( ! (n) )                    \
                        break;                  \
                switch((n)%8) {                 \
                        case 0: do {    (c);    \
                        case 7:         (c);    \
                        case 6:         (c);    \
                        case 5:         (c);    \
                        case 4:         (c);    \
                        case 3:         (c);    \
                        case 2:         (c);    \
                        case 1:         (c);    \
                                } while ( dd8_i-- > 0 ); \
                }                               \
        } while (0)

/** @brief the amount by which expand_nums() will increment the size of
  * the target array when reallocating memory.
  */
#define FFUTILS_RESIZE_AMT 16

/** @brief finds the number of fields in a delimited string.
  *
  * @param l a delimited string
  * @param d delimiter
  *
  * @return the number of fields in the string
  */
size_t fields_in_line(const char *l, const char *d);

/** @brief extract a field from a delimited string.
  *
  * copies at most n characters from field i of
  * delim-delimited string ct into cs.
  *
  * @param dest destination buffer
  * @param line delimited string
  * @param n max chars to copy into buffer
  * @param i field to be copied (0-based)
  * @param delim delimiter of ct
  *
  * @return number of chars copied into the dest buffer, or -1 if i is greater
  * than the number of fields in line.
  */
int get_line_field(char *cs, const char *ct, size_t n, int i,
                   const char *delim);

/** @brief returns a pointer into a delimited string where a particular
  * field begins.
  *
  * @param line a delimited string
  * @param fn the desired field number (1-based)
  * @param delim the delimiting string
  *
  * @return a pointer into cs where the fn-th field begins, or NULL if
  *  the field does not exist.
  */
char *field_start(const char * const line, size_t fn, const char *delim);

/** @brief compares two date strings in the format MM-DD-YYYY_HH24:MI:SS
  *
  * @param a first date
  * @param b second date
  *
  * @return -1 if a  b.
  */
int mdyhms_datecmp(const char *a, const char *b);

/** @brief compares two date strings in the format DD-MM-YYYY_HH24:MI:SS
  *
  * @param a first date
  * @param b second date
  *
  * @return -1 if a  b.
  */
int dmyhms_datecmp(const char *a, const char *b);

/** @brief removes linebreak characters from the end of a string.
  * @param s a null-terminated array of characters
  */
void chomp(char *s);

/** @brief replaces trailing white space in a string with null characters.
  *
  * @param str the string to be trimmed.
  */
void trim(char *str);

/** @brief goes through a list of file names, attempting to open them.
  * it loops through trying to open each file until one is successfully
  * opened or there are no more file names in the list.
  *
  * If the filename "-" is in the list, either stdin or stdout will be
  * returned.
  *
  * @param argc the number of arguments from the commandline
  * @param argv the array of arguments from the commandline
  * @param optind the index if the next argument to be processed
  * @param mode the mode for opening the file
  *
  * @return the next successfully opened file or NULL
  */
FILE *nextfile(int argc, char *argv[], int *optind, const char *mode);

/** @brief expands escaped special characters within a string, modifying
  * the original string.
  *
  * the following are valid escape sequences and the ascii character
  * to which they expand:
  *
  *  - \\a - 0x07
  *  - \\b - 0x08
  *  - \\f - 0x0c
  *  - \\n - 0x0a
  *  - \\r - 0x0d
  *  - \\t - 0x09
  *  - \\v - 0x0b
  *  - \\\\ - 0x5c
  *
  * @param s string potentially containing escaped characters
  */
void expand_chars(char *s);

/** @brief splits a string of number lists/ranges into an array.
  *
  * The "arg" string should be dynamically allocated, since strtok()
  * doesn't like const char[];
  *
  * "array" should also be dynamically allocated, as it may be realloc()'d
  * to accomodate more elements.  If memory hasn't been allocated for array,
  * set the pointer to NULL and pass 0 as array_size.  Memory will be
  * allocated for you, but remember to call free() on array when finished
  * with it.
  *
  * All of the parameters may be modified during execution.
  *
  * @param arg string representation of numbers
  * @param array pointer to array of ints
  * @param array_size number of elements array can currently hold
  *
  * @return on success, the number of items in populated array,
  *     -1 on memory allocation error,
  * 	-2 if arg has invalid syntax
  */
ssize_t expand_nums(char *arg, int **array, size_t * array_size);

/** @brief populates an array with 1-based indexes of the location of each of
  * a list of labels.
  *
  * @param labels comma-separated list of labels
  * @param line the header line
  * @param delim field separator used in the line
  * @param array the array in which to store the indexes
  * @param array_sz the current size of the array
  *
  * @returns the number of indexes found on success,
  *          -1 if one or more labels were not found in the line, or
  *          -2 on error.
  */
ssize_t expand_label_list(const char *labels,
                          const char *line,
                          const char *delim,
                          int **array, size_t *array_sz);

/** @brief determines the position of the first and the last character
  * of the given field.
  *
  * @param line the line buffer
  * @param i the field index (0-based)
  * @param d the field delimiter
  * @param start the position of the start character, or -1 if the
  *              field does not exist.
  * @param end the position of the end character, or -1 if the field
  *              does not exist.
  *
  * @return the length of the field, or -1 if the field does not exist.
  */
int get_line_pos(const char * const line, int i, const char *d, int *start,
                 int *end);

/** @brief locates the index of the first field in a delimited string
  * having a specific value.
  *
  * @param value the string to be located
  * @param line  delimited string
  * @param delim line's field separator
  *
  * @return 0-based index of the first field having the specified value,
  * -1 if not found, or -2 on error.
  */
ssize_t field_str(const char *value, const char *line, const char *delim);

#if defined(HAVE_CONFIG_H) && \
    defined(HAVE_FGETLN) && \
  ! defined(HAVE_GETLINE)
ssize_t getline(char **outbuf, size_t * outsize, FILE * fp);
#endif

#ifndef __GNUC__
/* no __VA_ARGS__ in vc++, and the use of '##' is a GNU cpp extension.
   So these versions take a format string plus a single required argument. */

/** @brief emit an error message.
  *
  * the message will include the file and line number.
  *
  * @param s format string
  * @param a value to pass into format string
  */
#define WARN(s, a) \
	fprintf(stderr, "%s:%d: " s, __FILE__, __LINE__, a)

/** @brief emit an error message and exit.
  *
  * the message will include the file and line number.  the
  * exit code is -1.
  *
  * @param s format string
  * @param a value to pass into format string
  */
#define DIE(s, a) \
	do { \
		WARN((s), (a)); \
		exit(-1); \
	} while ( 0 )

#else

/** @brief emit an error message.
  *
  * the message will include the file and line number.
  *
  * @param s format string
  * @param ... optional values to pass into format string
  */
#define WARN(s, ...) \
	fprintf(stderr, "%s: (%s:%d): " s, \
			getenv("_"), __FILE__,__LINE__, ##__VA_ARGS__)

/** @brief emit an error message and exit.
  *
  * the message will include the file and line number.  the exit
  * code is -1.
  *
  * @param s format string
  * @param ... optional values to pass into format string
  */
#define DIE(s, ...) \
	do { \
		fprintf(stderr, "%s: (%s:%d): " s, \
			getenv("_"), __FILE__,__LINE__, ##__VA_ARGS__); \
		exit(-1); \
	} while ( 0 )

#endif /* ifdef WIN32 */

#endif /* FFUTILS_H */


text:
import Archiver = require('archiver');
import * as fs from 'fs';
import { Readable, Writable } from 'stream';

const options: Archiver.ArchiverOptions = {
    statConcurrency: 1,
    allowHalfOpen: true,
    readableObjectMode: true,
    writeableObjectMode: true,
    decodeStrings: true,
    encoding: 'test',
    highWaterMark: 1,
    objectmode: true,
    comment: 'test',
    forceLocalTime: true,
    forceZip64: true,
    namePrependSlash: true,
    store: true,
    zlib: {},
    gzip: true,
    gzipOptions: {},
};

Archiver('zip', options);

const archiver = Archiver.create('zip');

const archiverAsReadable: Readable = archiver;
const archiverAsWritable: Writable = archiver;

const writeStream = fs.createWriteStream('./archiver.d.ts');
const readStream = fs.createReadStream('./archiver.d.ts');

archiver.abort();

archiver.pipe(writeStream);
archiver.append(readStream, { name: 'archiver.d.ts' });
archiver.append(readStream, { name: 'buffer.txt', date: '05/05/1991' });
archiver.append(readStream, { name: 'buffer.txt', date: new Date() });
archiver.append(readStream, { name: 'buffer.txt', mode: 1 });
archiver.append(readStream, { name: 'buffer.txt', mode: 1, stats: new fs.Stats() });
archiver.append('Some content', { name: 'filename', store: true });
archiver.append(readStream, { name: 'archiver.d.ts' }).append(readStream, { name: 'archiver.d.ts' });

archiver.directory('./path', './someOtherPath');
archiver.directory('./', '', {});
archiver.directory('./', false, { name: 'test' });
archiver.directory('./', false, (entry: Archiver.EntryData) => {
    entry.name = 'foobar';
    return entry;
});
archiver.directory('./', false, (entry: Archiver.EntryData) => false);

archiver.append(readStream, {
    name: 'sub/folder.xml',
});

archiver.glob('**', {
    cwd: 'path/to/files',
});
archiver.glob('./path', {}, {});

archiver.file('./path', { name: 'test' });

archiver.setFormat('zip');
archiver.setModule(() => {});

archiver.pointer();
archiver.use(() => {});

archiver.finalize();

archiver.symlink('./path', './target');

function fakeHandler(err: Archiver.ArchiverError) {
    console.log(err.code);
    console.log(err.message);
    console.log(err.stack);
    console.log(err.data);
}

const fakeError = new Archiver.ArchiverError('code', 'foo');

archiver.on('error', fakeHandler);
archiver.on('warning', fakeHandler);

archiver.on('data', (chunk: Buffer) => console.log(chunk));

Archiver.isRegisteredFormat('zip'); // $ExpectType boolean
archiver.symlink("directory/directory", "../../directory", 493); // $ExpectType Archiver