text:
 #import <SystemConfiguration/CaptiveNetwork.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <ifaddrs.h>
#include <arpa/inet.h>
#import <sys/utsname.h>
@implementation UIDevice (RBExtension)

+ (NSString *)deviceName
{
    static NSString *deviceName = nil;

    if (deviceName == nil) {
        struct utsname systemInfo;
        uname(&systemInfo);
        //UI_USER_INTERFACE_IDIOM
        deviceName = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
    }
    return deviceName;
}

+ (NSString *)platformString{

    NSString *platform = [self deviceName];

    if ([platform hasPrefix:@"iPhone"]) {

        if ([platform isEqualToString:@"iPhone1,1"])    return @"iPhone 1G";
        if ([platform isEqualToString:@"iPhone1,2"])    return @"iPhone 3G";
        if ([platform isEqualToString:@"iPhone2,1"])    return @"iPhone 3GS";
        if ([platform isEqualToString:@"iPhone3,1"])    return @"iPhone 4 (GSM)";
        if ([platform isEqualToString:@"iPhone3,3"])    return @"iPhone 4 (CDMA)";
        if ([platform isEqualToString:@"iPhone4,1"])    return @"iPhone 4S";
        if ([platform isEqualToString:@"iPhone5,1"])    return @"iPhone 5 (GSM)";
        if ([platform isEqualToString:@"iPhone5,2"])    return @"iPhone 5 (CDMA)";
        if ([platform isEqualToString:@"iPhone5,3"])    return @"iPhone 5c";
        if ([platform isEqualToString:@"iPhone5,4"])    return @"iPhone 5c";
        if ([platform isEqualToString:@"iPhone6,1"])    return @"iPhone 5s";
        if ([platform isEqualToString:@"iPhone6,2"])    return @"iPhone 5s";
        if ([platform isEqualToString:@"iPhone7,1"])    return @"iPhone 6 Plus";
        if ([platform isEqualToString:@"iPhone7,2"])    return @"iPhone 6";
        if ([platform isEqualToString:@"iPhone8,1"])    return @"iPhone 6s";
        if ([platform isEqualToString:@"iPhone8,2"])    return @"iPhone 6s Plus";
        if ([platform isEqualToString:@"iPhone8,4"])    return @"iPhone SE";
        if ([platform isEqualToString:@"iPhone9,1"])    return @"iPhone 7";
        if ([platform isEqualToString:@"iPhone9,2"])    return @"iPhone 7 Plus";
        if ([platform isEqualToString:@"iPhone9,3"])    return @"iPhone 7";
        if ([platform isEqualToString:@"iPhone9,4"])    return @"iPhone 7 Plus";
        if ([platform isEqualToString:@"iPhone10,1"])   return @"iPhone 8";
        if ([platform isEqualToString:@"iPhone10,4"])   return @"iPhone 8";
        if ([platform isEqualToString:@"iPhone10,2"])   return @"iPhone 8 Plus";
        if ([platform isEqualToString:@"iPhone10,5"])   return @"iPhone 8 Plus";
        if ([platform isEqualToString:@"iPhone10,3"])   return @"iPhone X";
        if ([platform isEqualToString:@"iPhone10,6"])   return @"iPhone X";

        return @"iPhone";
    }

    if ([platform hasPrefix:@"iPod"]) {

        if ([platform isEqualToString:@"iPod1,1"])      return @"iPod Touch 1";
        if ([platform isEqualToString:@"iPod2,1"])      return @"iPod Touch 2";
        if ([platform isEqualToString:@"iPod3,1"])      return @"iPod Touch 3";
        if ([platform isEqualToString:@"iPod4,1"])      return @"iPod Touch 4";
        if ([platform isEqualToString:@"iPod5,1"])      return @"iPod Touch 5";
        if ([platform isEqualToString:@"iPod7,1"])      return @"iPod Touch 6";

        return @"iPod Touch";
    }

    if ([platform hasPrefix:@"iPad"]) {

        if ([platform isEqualToString:@"iPad1,1"])      return @"iPad";
        if ([platform isEqualToString:@"iPad2,1"])      return @"iPad 2 (WiFi)";
        if ([platform isEqualToString:@"iPad2,2"])      return @"iPad 2 (GSM)";
        if ([platform isEqualToString:@"iPad2,3"])      return @"iPad 2 (CDMA)";
        if ([platform isEqualToString:@"iPad2,4"])      return @"iPad 2 (WiFi)";
        if ([platform isEqualToString:@"iPad2,5"])      return @"iPad Mini (WiFi)";
        if ([platform isEqualToString:@"iPad2,6"])      return @"iPad Mini (GSM)";
        if ([platform isEqualToString:@"iPad2,7"])      return @"iPad Mini (CDMA)";
        if ([platform isEqualToString:@"iPad3,1"])      return @"iPad 3 (WiFi)";
        if ([platform isEqualToString:@"iPad3,2"])      return @"iPad 3 (CDMA)";
        if ([platform isEqualToString:@"iPad3,3"])      return @"iPad 3 (GSM)";
        if ([platform isEqualToString:@"iPad3,4"])      return @"iPad 4 (WiFi)";
        if ([platform isEqualToString:@"iPad3,5"])      return @"iPad 4 (GSM)";
        if ([platform isEqualToString:@"iPad3,6"])      return @"iPad 4 (CDMA)";
        if ([platform isEqualToString:@"iPad4,1"])      return @"iPad Air (WiFi)";
        if ([platform isEqualToString:@"iPad4,2"])      return @"iPad Air (GSM)";
        if ([platform isEqualToString:@"iPad4,3"])      return @"iPad Air (CDMA)";
        if ([platform isEqualToString:@"iPad4,4"])      return @"iPad Mini Retina (WiFi)";
        if ([platform isEqualToString:@"iPad4,5"])      return @"iPad Mini Retina (Cellular)";
        if ([platform isEqualToString:@"iPad4,7"])      return @"iPad Mini 3 (WiFi)";
        if ([platform isEqualToString:@"iPad4,8"])      return @"iPad Mini 3 (Cellular)";
        if ([platform isEqualToString:@"iPad4,9"])      return @"iPad Mini 3 (Cellular)";
        if ([platform isEqualToString:@"iPad5,1"])      return @"iPad Mini 4 (WiFi)";
        if ([platform isEqualToString:@"iPad5,2"])      return @"iPad Mini 4 (Cellular)";
        if ([platform isEqualToString:@"iPad5,3"])      return @"iPad Air 2 (WiFi)";
        if ([platform isEqualToString:@"iPad5,4"])      return @"iPad Air 2 (Cellular)";
        if ([platform isEqualToString:@"iPad6,3"])      return @"iPad Pro 9.7-inch (WiFi)";
        if ([platform isEqualToString:@"iPad6,4"])      return @"iPad Pro 9.7-inch (Cellular)";
        if ([platform isEqualToString:@"iPad6,7"])      return @"iPad Pro 12.9-inch (WiFi)";
        if ([platform isEqualToString:@"iPad6,8"])      return @"iPad Pro 12.9-inch (Cellular)";
        if ([platform isEqualToString:@"iPad6,11"])     return @"iPad 5 (WiFi)";
        if ([platform isEqualToString:@"iPad6,12"])     return @"iPad 5 (Cellular)";
        if ([platform isEqualToString:@"iPad7,1"])      return @"iPad Pro 12.9-inch (WiFi)";
        if ([platform isEqualToString:@"iPad7,2"])      return @"iPad Pro 12.9-inch (Cellular)";
        if ([platform isEqualToString:@"iPad7,3"])      return @"iPad Pro 10.5-inch (WiFi)";
        if ([platform isEqualToString:@"iPad7,4"])      return @"iPad Pro 10.5-inch (Cellular)";

        return @"iPad";
    }

    if ([platform hasPrefix:@"Watch"]) {

        if ([platform isEqualToString:@"Watch1,1"])      return @"Apple Watch 38mm";
        if ([platform isEqualToString:@"Watch1,2"])      return @"Apple Watch 42mm";
        if ([platform isEqualToString:@"Watch2,6"])      return @"Apple Watch Series 1 38mm";
        if ([platform isEqualToString:@"Watch2,7"])      return @"Apple Watch Series 1 42mm";
        if ([platform isEqualToString:@"Watch2,3"])      return @"Apple Watch Series 2 38mm";
        if ([platform isEqualToString:@"Watch2,4"])      return @"Apple Watch Series 2 42mm";

        return @"Apple Watch";

    }

    if ([platform hasPrefix:@"AppleTV"]) {

        return @"AppleTV";
    }

    if ([platform isEqualToString:@"i386"])              return @"Simulator";
    if ([platform isEqualToString:@"x86_64"])            return @"Simulator";
    if ([platform isEqualToString:@"Simulator"])         return @"Simulator";

    return @"未知设备";
}

+ (NSString *)ipAddressWithIfaName:(NSString *)name {
    if (name.length == 0) return nil;
    NSString *address = nil;
    struct ifaddrs *addrs = NULL;
    if (getifaddrs(&addrs) == 0) {
        struct ifaddrs *addr = addrs;
        while (addr) {
            if ([[NSString stringWithUTF8String:addr->ifa_name] isEqualToString:name]) {
                sa_family_t family = addr->ifa_addr->sa_family;
                switch (family) {
                    case AF_INET: { // IPv4
                        char str[INET_ADDRSTRLEN] = {0};
                        inet_ntop(family, &(((struct sockaddr_in *)addr->ifa_addr)->sin_addr), str, sizeof(str));
                        if (strlen(str) > 0) {
                            address = [NSString stringWithUTF8String:str];
                        }
                    } break;

                    case AF_INET6: { // IPv6
                        char str[INET6_ADDRSTRLEN] = {0};
                        inet_ntop(family, &(((struct sockaddr_in6 *)addr->ifa_addr)->sin6_addr), str, sizeof(str));
                        if (strlen(str) > 0) {
                            address = [NSString stringWithUTF8String:str];
                        }
                    }

                    default: break;
                }
                if (address) break;
            }
            addr = addr->ifa_next;
        }
    }
    freeifaddrs(addrs);
    return address;
}

+ (NSString *)wiFiIPAddress {
    return [UIDevice ipAddressWithIfaName:@"en0"];
}

+ (NSString *)cellIPAddress {
    return [UIDevice ipAddressWithIfaName:@"pdp_ip0"];
}

+(NSString *)wiFiSSID
{
#if TARGET_OS_SIMULATOR
    return @"(simulator)";
#else
    NSArray *ifs = (__bridge id)CNCopySupportedInterfaces();

    id info = nil;
    for (NSString *ifnam in ifs) {
        info = (__bridge id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
        if (info && [info count]) {
            break;
        }
    }
    NSDictionary *dctySSID = (NSDictionary *)info;
    NSString *ssid = [dctySSID objectForKey:@"SSID"] ;

    return ssid;
#endif
}
@end


text:
require_dependency 'vulgata/application_controller'

module Vulgata
  class TeamController < ApplicationController
    before_action :authorize_admin, only: %i[index update]
    before_action :authorize_viewer, only: [:show]

    def index
      @users = vulgata_users.page(params[:page]).per(20)

      @from_date = params['from_date'].present? ? params['from_date'].to_datetime.beginning_of_day : DateTime.current.beginning_of_month
      @to_date = params['to_date'].present? ? params['to_date'].to_datetime.end_of_day : DateTime.current.end_of_day

      ldvpu = Vulgata::TranslationStateVersion.where(status: Vulgata::TranslationState.statuses[:done])
      ldvpu = ldvpu.where('created_at >= ? AND created_at <= ?', @from_date, @to_date)
      ldvpu = ldvpu.group(:user_id, :vulgata_translation_state_id)
      ldvpu = ldvpu.select('MAX(id) AS id')
      @last_done_versions_per_user_and_t9n_state_sql = ldvpu.to_sql

      set_translated_items_per_user
      set_translated_words_per_user
    end

    def show
      @user = params[:user_type].constantize.find(params[:user_id])

      @total_translated = Vulgata::TranslationStateVersion.where(status: Vulgata::TranslationState.statuses[:done])
      @total_translated = @total_translated.where(user: @user)
      @total_translated = @total_translated.group(:vulgata_translation_state_id)
      @total_translated = @total_translated.select(:vulgata_translation_state_id)
      @total_translated = @total_translated.length || 0

      @translated_this_week = translated_in_time_period(DateTime.current.beginning_of_week)
      @translated_this_month = translated_in_time_period(DateTime.current.beginning_of_month)
      @translated_last_month = translated_in_time_period((DateTime.current - 1.month).beginning_of_month, DateTime.current.beginning_of_month)

      set_total_rejections @user
      set_overall_approval_rate

      versions_involving_user = Vulgata::TranslationStateVersion.where(user_id: params[:user_id])
      versions_involving_user = versions_involving_user.where.not(status: [Vulgata::TranslationState.statuses[:source], Vulgata::TranslationState.statuses[:pending], Vulgata::TranslationState.statuses[:in_progress]])
      versions_involving_user = versions_involving_user.select(:vulgata_translation_state_id)
      @translation_states = Vulgata::TranslationState.where(id: versions_involving_user).order(updated_at: :desc).page(params[:page]).per(10)

      locales = Vulgata::UserLocale.where(user: @user) || []
      @user_locales = locales.map(&:locale)
      @user_role = @user.vulgata_role
    end

    def update
      user = params[:user_type].constantize.find(params[:user_id])

      locales = params[:locales] || []
      transaction = ActiveRecord::Base.transaction do
        user.vulgata_locales = locales
        params[:role] == 'none' ? user.vulgata_role = nil : user.vulgata_role = params[:role]
        user.save
      end

      respond_to do |format|
        if transaction
          format.html { redirect_to vulgata_user_path(user: user), notice: 'Successfully updated locales.' }
        else
          format.html { redirect_to vulgata_user_path(user: user), notice: 'Error updating locales' }
        end
      end
    end

    private

    def translated_in_time_period(from, to = DateTime.now)
      translated = Vulgata::TranslationStateVersion.where(status: Vulgata::TranslationState.statuses[:done])
      translated = translated.where(user: @user)
      translated = translated.where('created_at >= ? AND created_at < ?', from, to)
      translated = translated.group(:vulgata_translation_state_id)
      translated = translated.select(:vulgata_translation_state_id)
      translated = translated.length || 0
    end

    def set_total_rejections(user)
      rejected = Vulgata::TranslationState.statuses[:rejected]

      previously_rejected_translation_state_versions_sql =
        Vulgata::TranslationStateVersion.where(status: rejected).to_sql

      prtswv = Vulgata::TranslationStateVersion.joins("INNER JOIN (#{previously_rejected_translation_state_versions_sql}) AS inn ON inn.vulgata_translation_state_id = vulgata_translation_state_versions.vulgata_translation_state_id")
      prtswv = prtswv.where('vulgata_translation_state_versions.id > inn.id')
      prtswv = prtswv.order('vulgata_translation_state_versions.id')
      prtswv = prtswv.select('vulgata_translation_state_versions.id, vulgata_translation_state_versions.vulgata_translation_state_id')
      previously_rejected_translation_states_with_versions = prtswv.to_sql

      after_rejection_versions = Vulgata::TranslationStateVersion.from("(#{previously_rejected_translation_states_with_versions}) as sub")
      after_rejection_versions = after_rejection_versions.group('sub.vulgata_translation_state_id')
      after_rejection_versions = after_rejection_versions.select('MIN(sub.id) AS pending_version_id_after_rejection')

      rejected_translations_per_user =
        Vulgata::TranslationStateVersion.where(id: after_rejection_versions).group(:user_type, :user_id).count

      @total_rejections = rejected_translations_per_user[[user.class.name, user.id]] || 0
    end

    def set_overall_approval_rate
      approval_rate = 0
      unless @total_translated == 0
        approval_rate = ((@total_translated - @total_rejections).to_f / @total_translated.to_f) * 100
      end

      @overall_approval_rate = approval_rate
    end

    def set_translated_items_per_user
      raw_translated_items_per_user =
        Vulgata::TranslationStateVersion
        .select('user_id, user_type, count(*) AS items_translated')
        .where("id IN (#{@last_done_versions_per_user_and_t9n_state_sql})")
        .group(:user_id, :user_type)
      @translated_items_per_user =
        raw_translated_items_per_user.each_with_object({}) { |r, h| h[r.user_type.to_s + r.user_id.to_s] = r.items_translated }
    end

    def set_translated_words_per_user
      raw_translated_words_per_user =
        Vulgata::TranslationStateVersion
        .select('user_id, user_type, sum(word_count) AS words_translated')
        .where("id IN (#{@last_done_versions_per_user_and_t9n_state_sql})").group(:user_id, :user_type)
      @translated_words_per_user =
        raw_translated_words_per_user.each_with_object({}) { |r, h| h[r.user_type.to_s + r.user_id.to_s] = r.words_translated }
    end

    def authorize_viewer
      redirect_to root_path unless params[:user_id].to_i == vulgata_current_user.id || vulgata_current_user.vulgata_admin?
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
<link rel="stylesheet" href="modules/bill/css/bill.css">

    <abcd isopen='isopen' config="config" sure="sure()"></abcd>

                管理自动还款

                    <input type="checkbox" style="display: none" ng-init="x.isChecked=false" ng-model="x.isChecked" ng-change="countPrice(x)">

                            距还款日还有 {{x.to_repayment_date}} 天

                            本期已还

                            (第{{x.repayment_staging}}/{{x.staging}}期) {{x.goodsName}}

                        ¥{{x.payAmount}}

                        全选

                        ¥{{selectedPrice | number:2 }}

            还款


text:
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Paramore.Darker;
using SampleApi.Ports;

namespace SampleApi.Controllers
{
    [Route("api/people")]
    public class PeopleController : Controller
    {
        private readonly IQueryProcessor _queryProcessor;

        public PeopleController(IQueryProcessor queryProcessor)
        {
            _queryProcessor = queryProcessor;
        }

        // GET api/people
        [HttpGet]
        public async Task<IReadOnlyDictionary<int, string>> Get()
        {
            return await _queryProcessor.ExecuteAsync(new GetPeopleQuery());
        }

        // GET api/people/5
        [HttpGet("{id}")]
        public async Task<string> Get(int id)
        {
            return await _queryProcessor.ExecuteAsync(new GetPersonNameQuery(id));
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace FTDevice
{
    /// <summary>
    /// The SPI Transfer Option
    /// Use "|" Operator to link them
    /// </summary>
    [Flags]
    public enum SPITransferOption : uint
    {
        SIZE_IN_BYTES = 0x00000000,
        SIZE_IN_BITS = 0x00000001,
        CHIPSELECT_ENABLE = 0x00000002,
        CHIPSELECT_DISABLE=0x00000004
    }

    /// <summary>
    ///  The SPI Configuration Option
    /// </summary>
    [Flags]
    public enum SPIConfigOption : uint
    {
        MODE_MASK = 0x00000003,
        MODE0 = 0x00000000,
        MODE1 = 0x00000001,
        MODE2 = 0x00000002,
        MODE3 = 0x00000003,
        CS_MASK = 0x0000001C,       /*111 00*/
        CS_DBUS3 = 0x00000000,      /*000 00*/
        CS_DBUS4 = 0x00000004,      /*001 00*/
        CS_DBUS5 = 0x00000008,      /*010 00*/
        CS_DBUS6 = 0x0000000C,      /*011 00*/
        CS_DBUS7 = 0x00000010,      /*100 00*/
        CS_ACTIVELOW = 0x00000020
    }

    /// <summary>
    /// SPI Channel Initialization Configuration
    /// </summary>
    [StructLayout(LayoutKind.Sequential,CharSet = CharSet.Ansi)]
    public struct ChannelConfig
    {
        /// <summary>
        /// The clock frequency of SPI in Hz
        /// </summary>
        /// <remarks>
        /// The clock rate support by driver range from 0 to 30MHz
        /// </remarks>
        public uint ClockRate;

        /// <summary>
        /// The latency time of spi communication in ms
        /// </summary>
        public byte LatencyTimer;

        /// <summary>
        /// Configuration of SPI<see cref="SPIConfigOption"/>
        /// </summary>
        public uint configOptions;   /*This member provides a way to enable/disable features
	specific to the protocol that are implemented in the chip
	BIT1-0=CPOL-CPHA:	00 - MODE0 - data captured on rising edge, propagated on falling
 						01 - MODE1 - data captured on falling edge, propagated on rising
 						10 - MODE2 - data captured on falling edge, propagated on rising
 						11 - MODE3 - data captured on rising edge, propagated on falling
	BIT4-BIT2: 000 - A/B/C/D_DBUS3=ChipSelect
			 : 001 - A/B/C/D_DBUS4=ChipSelect
 			 : 010 - A/B/C/D_DBUS5=ChipSelect
 			 : 011 - A/B/C/D_DBUS6=ChipSelect
 			 : 100 - A/B/C/D_DBUS7=ChipSelect
 	BIT5: ChipSelect is active high if this bit is 0
	BIT6 -BIT31		: Reserved
	*/
        /// <summary>
        /// Configuration for FTDI IO port
        /// </summary>
        public uint Pin;/*BIT7   -BIT0:   Initial direction of the pins	*/
                        /*BIT15 -BIT8:   Initial values of the pins		*/
                        /*BIT23 -BIT16: Final direction of the pins		*/
                        /*BIT31 -BIT24: Final values of the pins		*/
        public UInt16 reserved;
    }

    [StructLayout(LayoutKind.Sequential,CharSet =CharSet.Ansi)]
    public struct FTDeviceListInfoNode
    {
        public UInt32 Flags;
        public UInt32 Type;
        public UInt32 ID;
        public UInt32 LocId;
        [MarshalAs(UnmanagedType.ByValTStr,SizeConst = 16)]
        public string SerialNumber;
        [MarshalAs(UnmanagedType.ByValTStr,SizeConst = 64)]
        public string Description;
        public IntPtr ftHandle;
    }

    public enum SPIMode :byte
    {
        MODE0 = 0x31,
        MODE1 = 0x34
    }
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Impossible Mission</title>
		<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission</link>
		<description>Posts in the discussion thread "Impossible Mission" - Doubts about some requirements</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 05:31:47 +0000</lastBuildDate>

					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-430777</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-430777</link>
				<description></description>
				<pubDate>Fri, 27 Mar 2009 01:46:21 +0000</pubDate>
				<wikidot:authorName>Swan21</wikidot:authorName>				<wikidot:authorUserId>93166</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Yes, that is what being a leader of a village is -.-

It takes a while to get to the point to be able to complete the IM though.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-430459</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-430459</link>
				<description></description>
				<pubDate>Thu, 26 Mar 2009 20:16:58 +0000</pubDate>
				<wikidot:authorName>kaktus143</wikidot:authorName>								<content:encoded>
					<![CDATA[

yes

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-430399</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-430399</link>
				<description></description>
				<pubDate>Thu, 26 Mar 2009 19:38:05 +0000</pubDate>
				<wikidot:authorName>Siahposh</wikidot:authorName>				<wikidot:authorUserId>287203</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

yum,i must know,this IM said i must be a leader of village,do i really need to be kage?! TT

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-231397</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-231397</link>
				<description></description>
				<pubDate>Thu, 31 Jul 2008 14:59:11 +0000</pubDate>
				<wikidot:authorName>mynykr</wikidot:authorName>				<wikidot:authorUserId>167532</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

is celeste new? we just got him as a kaiju
 Edit: nevermind just read announcements, it's new :D

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-230573</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-230573</link>
				<description></description>
				<pubDate>Wed, 30 Jul 2008 16:18:46 +0000</pubDate>
				<wikidot:authorName>Wartooth</wikidot:authorName>				<wikidot:authorUserId>174414</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Speaking of which, I've added Celeste to the list of those who've completed IM.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-224683</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-224683</link>
				<description></description>
				<pubDate>Mon, 21 Jul 2008 17:09:47 +0000</pubDate>
				<wikidot:authorName>jediwaldo</wikidot:authorName>				<wikidot:authorUserId>104443</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

jkeezer is in fact in season 7

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-224606</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-224606</link>
				<description></description>
				<pubDate>Mon, 21 Jul 2008 15:18:30 +0000</pubDate>
				<wikidot:authorName>BvS-Uzuki</wikidot:authorName>				<wikidot:authorUserId>78144</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

I believe jkeezer is in Season 7.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-224601</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-224601</link>
				<description></description>
				<pubDate>Mon, 21 Jul 2008 15:10:05 +0000</pubDate>
				<wikidot:authorName>deelle</wikidot:authorName>				<wikidot:authorUserId>103382</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

I think there is already someone in Season 7.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-224588</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-224588</link>
				<description></description>
				<pubDate>Mon, 21 Jul 2008 14:43:21 +0000</pubDate>
				<wikidot:authorName>Lich</wikidot:authorName>				<wikidot:authorUserId>98769</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Wow! Season 5, 6 and 7?
 Only now that you told me I found someone on Season 5.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-223357</guid>
				<title>Re: Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-223357</link>
				<description></description>
				<pubDate>Sat, 19 Jul 2008 01:03:30 +0000</pubDate>
				<wikidot:authorName>BvS-Uzuki</wikidot:authorName>				<wikidot:authorUserId>78144</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

You can do the impossible mission in Season 5, 6, or 7 if you have to.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-75267#post-223348</guid>
				<title>Impossible Mission</title>
				<link>http://bvs.wikidot.com/forum/t-75267/impossible-mission#post-223348</link>
				<description></description>
				<pubDate>Sat, 19 Jul 2008 00:32:42 +0000</pubDate>
				<wikidot:authorName>Lich</wikidot:authorName>				<wikidot:authorUserId>98769</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

I read in the wiki page about the Impossible Mission that I must have the 3 Sannin Themes, so, it means that if I didn't run a Sannin Theme since season 1 (and with different bloodlines) I will never complete the Impossible mission?

				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>


text:
var fs = require('fs'),
    httpMocks = require('node-mocks-http'),
    nconf = require('nconf'),
    sinon = require('sinon');

nconf.file({ file: '../gebo.json' });

var _httpProxy, _proxy, _https;

/**
 * onload
 */
exports.onload = {
    setUp: function(callback) {
        _https = require('https');
        sinon.stub(_https, 'createServer', function(options, done) {
            return { listen: sinon.spy() };
          });

        _httpProxy = require('http-proxy');
        sinon.stub(_httpProxy, 'createProxyServer', function(options) {
            return { web: sinon.spy() };
          });

        _proxy = require('../proxy');
        callback();
    },

    tearDown: function(callback) {
        _https.createServer.restore();
        _httpProxy.createProxyServer.restore();
        callback();
    },

    'Should create a server with the correct configured options': function(test) {
        test.expect(3);

        test.equal(_https.createServer.callCount, 1);
        test.equal(JSON.stringify(_https.createServer.getCall(0).args[0]), JSON.stringify({
            key: fs.readFileSync(nconf.get('ssl').key, 'utf8'),
            cert: fs.readFileSync(nconf.get('ssl').cert, 'utf8'),
          }));
        test.equal(typeof _https.createServer.getCall(0).args[1], 'function');

        test.done();
    },

    'Server should listen on the port specified in gebo.json': function(test) {
        test.expect(2);

        test.equal(_proxy.server.listen.callCount, 1);
        test.ok(_proxy.server.listen.calledWith(nconf.get('port')));

        test.done();
    },
};

/**
 * requestHandler
 */
exports.requestHandler = {

    setUp: function(callback) {
        _https = require('https');
        sinon.stub(_https, 'createServer', function(options, done) {
            return { listen: sinon.spy() };
          });

        _httpProxy = require('http-proxy');
        sinon.stub(_httpProxy, 'createProxyServer', function(options) {
            return { web: sinon.spy() };
          });

        _proxy = require('../proxy');
        callback();
    },

    tearDown: function(callback) {
        _https.createServer.restore();
        _httpProxy.createProxyServer.restore();
        _proxy.proxy.web.reset();
        callback();
    },

    'Forward to the proxy address associated with the receiver key': function(test) {
        test.expect(5);
        var req = httpMocks.createRequest({
                method: 'POST',
                url: 'https://someweirddomain.com/perform',
                body: {
                    sender: 'someagent@somedomain.com',
                    receiver: 'somegebo@example.com',
                    action: 'ls',
                    content: {
                        resource: 'friendos',
                    },
                },
          });
        var res = httpMocks.createResponse();

        _proxy.requestHandler(req, res)
        test.equal(_proxy.proxy.web.callCount, 1);
        test.equal(_proxy.proxy.web.getCall(0).args[0], req);
        test.equal(_proxy.proxy.web.getCall(0).args[1], res);
        test.equal(_proxy.proxy.web.getCall(0).args[2].target, 'https://somecrazydomain.com/perform');
        test.equal(_proxy.proxy.web.getCall(0).args[2].secure, false);

        test.done();
    },

    'Don\'t barf if no receiver key set': function(test) {
        test.expect(3);
        var req = httpMocks.createRequest({
                method: 'POST',
                url: 'https://someweirddomain.com/perform',
                body: {
                    sender: 'someagent@somedomain.com',
                    action: 'ls',
                    content: {
                        resource: 'friendos',
                    },
                },
          });
        var res = httpMocks.createResponse();

        _proxy.requestHandler(req, res)

        test.equal(_proxy.proxy.web.callCount, 0);
        test.ok(res._isEndCalled());
        test.equal(res._getData(), 'A receiver needs to be specified in the message');

        test.done();
    },

    'Don\'t barf if no address associated with receiver key': function(test) {
        test.expect(3);
        var req = httpMocks.createRequest({
                method: 'POST',
                url: 'https://someweirddomain.com/perform',
                body: {
                    sender: 'someagent@somedomain.com',
                    receiver: 'nosuchgebo@example.com',
                    action: 'ls',
                    content: {
                        resource: 'friendos',
                    },
                },
          });
        var res = httpMocks.createResponse();

        _proxy.requestHandler(req, res)

        test.equal(_proxy.proxy.web.callCount, 0);
        test.ok(res._isEndCalled());
        test.equal(res._getData(), 'nosuchgebo@example.com is not registered with this proxy');

        test.done();
    },

    'Don\'t barf if no body or receiver query string parameter is set': function(test) {
        test.expect(3);
        var req = httpMocks.createRequest({
                method: 'POST',
                url: 'https://someweirddomain.com/login',
          });
        delete req.body;
        var res = httpMocks.createResponse();

        _proxy.requestHandler(req, res)

        test.equal(_proxy.proxy.web.callCount, 0);
        test.ok(res._isEndCalled());
        test.equal(res._getData(), 'I don\'t know where to forward that message');

        test.done();
    },

    'Forward to receiver indentified in the query string': function(test) {
        test.expect(5);
        var req = httpMocks.createRequest({
                method: 'POST',
                url: 'https://someweirddomain.com/login?receiver=anothergebo@capitolhill.ca',
          });
        delete req.body;
        var res = httpMocks.createResponse();

        _proxy.requestHandler(req, res)

        test.equal(_proxy.proxy.web.callCount, 1);
        test.equal(_proxy.proxy.web.getCall(0).args[0], req);
        test.equal(_proxy.proxy.web.getCall(0).args[1], res);
        test.equal(_proxy.proxy.web.getCall(0).args[2].target, 'https://localhost:4443/login?receiver=anothergebo@capitolhill.ca');
        test.equal(_proxy.proxy.web.getCall(0).args[2].secure, false);

        test.done();
    },

    'Don\'t barf if receiver indentified in the query string does not exist': function(test) {
        test.expect(3);
        var req = httpMocks.createRequest({
                method: 'POST',
                url: 'https://someweirddomain.com/login?receiver=nosuchagent@nosuchdomain.ca',
          });
        delete req.body;
        var res = httpMocks.createResponse();

        _proxy.requestHandler(req, res)

        test.equal(_proxy.proxy.web.callCount, 0);
        test.ok(res._isEndCalled());
        test.equal(res._getData(), 'nosuchagent@nosuchdomain.ca is not registered with this proxy');

        test.done();
    },

};


text:
class ChessKnight : public ChessPiece
{
public:
	ChessKnight(PieceColor color);

	virtual bool IsMoveLegal(Position currPos, Position newPos, GameBoard*) const;
	virtual char GetSymbol() const;
};

#endif


text:
import nose
from nose.tools import ok_, eq_, raises
from sample_action import *

def test_search_url():
    browser = open_browser("firefox", "https://www.google.com.au")
    do_search(browser, "flint")
    eq_(browser.current_url.split("=")[-1], "flint")

if __name__ == "__main__":
	nose.run()


text:
module DeploymentTarget::Metadata
  extend ActiveSupport::Concern

  included do
    has_one :metadata, class_name: "DeploymentTargetMetadata", dependent: :destroy
  end

  def refresh_metadata
    resource = new_agent_service(AgentMetadataService).find
    create_metadata!(
      agent_version: resource.agent["version"],
      adapter_version: resource.adapter["version"],
      adapter_type: resource.adapter["type"],
      adapter_is_healthy: resource.adapter["isHealthy"]
    )
  end
end


text:
What authentication providers does |wac| support?
=================================================

|wac| does not do any authentication, except as part of the :ref:`business user edit <Business editing>` flow. Hosts are
expected to handle authentication and authorization by providing WOPI :term:`access tokens <access token>`. All
user-related information is provided to |wac| by the host using properties in :ref:`CheckFileInfo`.


text:
package mediastoredata

import (
	"io"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/aws/signer/v4"
)

const opDeleteObject = "DeleteObject"

// DeleteObjectRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObject operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteObject for more information on using the DeleteObject
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
//    // Example sending a request using the DeleteObjectRequest method.
//    req, resp := client.DeleteObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObject
func (c *MediaStoreData) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
	op := &request.Operation{
		Name:       opDeleteObject,
		HTTPMethod: "DELETE",
		HTTPPath:   "/{Path+}",
	}

	if input == nil {
		input = &DeleteObjectInput{}
	}

	output = &DeleteObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DeleteObject API operation for AWS Elemental MediaStore Data Plane.
//
// Deletes an object at the specified path.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's
// API operation DeleteObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeContainerNotFoundException "ContainerNotFoundException"
//   The specified container was not found for the specified account.
//
//   * ErrCodeObjectNotFoundException "ObjectNotFoundException"
//   Could not perform an operation on an object that does not exist.
//
//   * ErrCodeInternalServerError "InternalServerError"
//   The service is temporarily unavailable.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObject
func (c *MediaStoreData) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
	req, out := c.DeleteObjectRequest(input)
	return out, req.Send()
}

// DeleteObjectWithContext is the same as DeleteObject with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteObject for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *MediaStoreData) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
	req, out := c.DeleteObjectRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opDescribeObject = "DescribeObject"

// DescribeObjectRequest generates a "aws/request.Request" representing the
// client's request for the DescribeObject operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeObject for more information on using the DescribeObject
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
//    // Example sending a request using the DescribeObjectRequest method.
//    req, resp := client.DescribeObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObject
func (c *MediaStoreData) DescribeObjectRequest(input *DescribeObjectInput) (req *request.Request, output *DescribeObjectOutput) {
	op := &request.Operation{
		Name:       opDescribeObject,
		HTTPMethod: "HEAD",
		HTTPPath:   "/{Path+}",
	}

	if input == nil {
		input = &DescribeObjectInput{}
	}

	output = &DescribeObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DescribeObject API operation for AWS Elemental MediaStore Data Plane.
//
// Gets the header for an object at the specified path.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's
// API operation DescribeObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeContainerNotFoundException "ContainerNotFoundException"
//   The specified container was not found for the specified account.
//
//   * ErrCodeObjectNotFoundException "ObjectNotFoundException"
//   Could not perform an operation on an object that does not exist.
//
//   * ErrCodeInternalServerError "InternalServerError"
//   The service is temporarily unavailable.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObject
func (c *MediaStoreData) DescribeObject(input *DescribeObjectInput) (*DescribeObjectOutput, error) {
	req, out := c.DescribeObjectRequest(input)
	return out, req.Send()
}

// DescribeObjectWithContext is the same as DescribeObject with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeObject for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *MediaStoreData) DescribeObjectWithContext(ctx aws.Context, input *DescribeObjectInput, opts ...request.Option) (*DescribeObjectOutput, error) {
	req, out := c.DescribeObjectRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetObject = "GetObject"

// GetObjectRequest generates a "aws/request.Request" representing the
// client's request for the GetObject operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetObject for more information on using the GetObject
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
//    // Example sending a request using the GetObjectRequest method.
//    req, resp := client.GetObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObject
func (c *MediaStoreData) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
	op := &request.Operation{
		Name:       opGetObject,
		HTTPMethod: "GET",
		HTTPPath:   "/{Path+}",
	}

	if input == nil {
		input = &GetObjectInput{}
	}

	output = &GetObjectOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetObject API operation for AWS Elemental MediaStore Data Plane.
//
// Downloads the object at the specified path.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's
// API operation GetObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeContainerNotFoundException "ContainerNotFoundException"
//   The specified container was not found for the specified account.
//
//   * ErrCodeObjectNotFoundException "ObjectNotFoundException"
//   Could not perform an operation on an object that does not exist.
//
//   * ErrCodeRequestedRangeNotSatisfiableException "RequestedRangeNotSatisfiableException"
//   The requested content range is not valid.
//
//   * ErrCodeInternalServerError "InternalServerError"
//   The service is temporarily unavailable.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObject
func (c *MediaStoreData) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
	req, out := c.GetObjectRequest(input)
	return out, req.Send()
}

// GetObjectWithContext is the same as GetObject with the addition of
// the ability to pass a context and additional request options.
//
// See GetObject for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *MediaStoreData) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
	req, out := c.GetObjectRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opListItems = "ListItems"

// ListItemsRequest generates a "aws/request.Request" representing the
// client's request for the ListItems operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListItems for more information on using the ListItems
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
//    // Example sending a request using the ListItemsRequest method.
//    req, resp := client.ListItemsRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItems
func (c *MediaStoreData) ListItemsRequest(input *ListItemsInput) (req *request.Request, output *ListItemsOutput) {
	op := &request.Operation{
		Name:       opListItems,
		HTTPMethod: "GET",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &ListItemsInput{}
	}

	output = &ListItemsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListItems API operation for AWS Elemental MediaStore Data Plane.
//
// Provides a list of metadata entries about folders and objects in the specified
// folder.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's
// API operation ListItems for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeContainerNotFoundException "ContainerNotFoundException"
//   The specified container was not found for the specified account.
//
//   * ErrCodeInternalServerError "InternalServerError"
//   The service is temporarily unavailable.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItems
func (c *MediaStoreData) ListItems(input *ListItemsInput) (*ListItemsOutput, error) {
	req, out := c.ListItemsRequest(input)
	return out, req.Send()
}

// ListItemsWithContext is the same as ListItems with the addition of
// the ability to pass a context and additional request options.
//
// See ListItems for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *MediaStoreData) ListItemsWithContext(ctx aws.Context, input *ListItemsInput, opts ...request.Option) (*ListItemsOutput, error) {
	req, out := c.ListItemsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opPutObject = "PutObject"

// PutObjectRequest generates a "aws/request.Request" representing the
// client's request for the PutObject operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PutObject for more information on using the PutObject
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
//    // Example sending a request using the PutObjectRequest method.
//    req, resp := client.PutObjectRequest(params)
//
//    err := req.Send()
//    if err == nil { // resp is now filled
//        fmt.Println(resp)
//    }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObject
func (c *MediaStoreData) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
	op := &request.Operation{
		Name:       opPutObject,
		HTTPMethod: "PUT",
		HTTPPath:   "/{Path+}",
	}

	if input == nil {
		input = &PutObjectInput{}
	}

	output = &PutObjectOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Sign.Remove(v4.SignRequestHandler)
	handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload)
	req.Handlers.Sign.PushFrontNamed(handler)
	return
}

// PutObject API operation for AWS Elemental MediaStore Data Plane.
//
// Uploads an object to the specified path. Object sizes are limited to 10 MB.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's
// API operation PutObject for usage and error information.
//
// Returned Error Codes:
//   * ErrCodeContainerNotFoundException "ContainerNotFoundException"
//   The specified container was not found for the specified account.
//
//   * ErrCodeInternalServerError "InternalServerError"
//   The service is temporarily unavailable.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObject
func (c *MediaStoreData) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
	req, out := c.PutObjectRequest(input)
	return out, req.Send()
}

// PutObjectWithContext is the same as PutObject with the addition of
// the ability to pass a context and additional request options.
//
// See PutObject for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *MediaStoreData) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
	req, out := c.PutObjectRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObjectRequest
type DeleteObjectInput struct {
	_ struct{} `type:"structure"`

	// The path (including the file name) where the object is stored in the container.
	// Format: <folder name>/<folder name>/<file name>
	//
	// Path is a required field
	Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"`
}

// String returns the string representation
func (s DeleteObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
	if s.Path == nil {
		invalidParams.Add(request.NewErrParamRequired("Path"))
	}
	if s.Path != nil && len(*s.Path) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Path", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetPath sets the Path field's value.
func (s *DeleteObjectInput) SetPath(v string) *DeleteObjectInput {
	s.Path = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObjectResponse
type DeleteObjectOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation
func (s DeleteObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DeleteObjectOutput) GoString() string {
	return s.String()
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObjectRequest
type DescribeObjectInput struct {
	_ struct{} `type:"structure"`

	// The path (including the file name) where the object is stored in the container.
	// Format: <folder name>/<folder name>/<file name>
	//
	// Path is a required field
	Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"`
}

// String returns the string representation
func (s DescribeObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DescribeObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DescribeObjectInput"}
	if s.Path == nil {
		invalidParams.Add(request.NewErrParamRequired("Path"))
	}
	if s.Path != nil && len(*s.Path) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Path", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetPath sets the Path field's value.
func (s *DescribeObjectInput) SetPath(v string) *DescribeObjectInput {
	s.Path = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObjectResponse
type DescribeObjectOutput struct {
	_ struct{} `type:"structure"`

	// An optional CacheControl header that allows the caller to control the object's
	// cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
	// (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9).
	//
	// Headers with a custom user-defined value are also accepted.
	CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`

	// The length of the object in bytes.
	ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`

	// The content type of the object.
	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`

	// The ETag that represents a unique instance of the object.
	ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"`

	// The date and time that the object was last modified.
	LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
}

// String returns the string representation
func (s DescribeObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s DescribeObjectOutput) GoString() string {
	return s.String()
}

// SetCacheControl sets the CacheControl field's value.
func (s *DescribeObjectOutput) SetCacheControl(v string) *DescribeObjectOutput {
	s.CacheControl = &v
	return s
}

// SetContentLength sets the ContentLength field's value.
func (s *DescribeObjectOutput) SetContentLength(v int64) *DescribeObjectOutput {
	s.ContentLength = &v
	return s
}

// SetContentType sets the ContentType field's value.
func (s *DescribeObjectOutput) SetContentType(v string) *DescribeObjectOutput {
	s.ContentType = &v
	return s
}

// SetETag sets the ETag field's value.
func (s *DescribeObjectOutput) SetETag(v string) *DescribeObjectOutput {
	s.ETag = &v
	return s
}

// SetLastModified sets the LastModified field's value.
func (s *DescribeObjectOutput) SetLastModified(v time.Time) *DescribeObjectOutput {
	s.LastModified = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObjectRequest
type GetObjectInput struct {
	_ struct{} `type:"structure"`

	// The path (including the file name) where the object is stored in the container.
	// Format: <folder name>/<folder name>/<file name>
	//
	// For example, to upload the file mlaw.avi to the folder path premium\canada
	// in the container movies, enter the path premium/canada/mlaw.avi.
	//
	// Do not include the container name in this path.
	//
	// If the path includes any folders that don't exist yet, the service creates
	// them. For example, suppose you have an existing premium/usa subfolder. If
	// you specify premium/canada, the service creates a canada subfolder in the
	// premium folder. You then have two subfolders, usa and canada, in the premium
	// folder.
	//
	// There is no correlation between the path to the source and the path (folders)
	// in the container in AWS Elemental MediaStore.
	//
	// For more information about folders and how they exist in a container, see
	// the AWS Elemental MediaStore User Guide (http://docs.aws.amazon.com/mediastore/latest/ug/).
	//
	// The file name is the name that is assigned to the file that you upload. The
	// file can have the same name inside and outside of AWS Elemental MediaStore,
	// or it can have the same name. The file name can include or omit an extension.
	//
	// Path is a required field
	Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"`

	// The range bytes of an object to retrieve. For more information about the
	// Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
	// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35).
	Range *string `location:"header" locationName:"Range" type:"string"`
}

// String returns the string representation
func (s GetObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
	if s.Path == nil {
		invalidParams.Add(request.NewErrParamRequired("Path"))
	}
	if s.Path != nil && len(*s.Path) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Path", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetPath sets the Path field's value.
func (s *GetObjectInput) SetPath(v string) *GetObjectInput {
	s.Path = &v
	return s
}

// SetRange sets the Range field's value.
func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
	s.Range = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObjectResponse
type GetObjectOutput struct {
	_ struct{} `type:"structure" payload:"Body"`

	// The path to the file outside of the container. The file name can include
	// or omit an extension.
	//
	// Example 1: If the file is stored on a remote server that has been mounted
	// to the workstation on which the REST API command is being run, the path could
	// be the absolute path  \mount\assets\mlaw.avi or the relative path ..\..\mount\assets\movies\premium\mlaw.avi.
	//
	// Example 2: If the file is stored on a remote server that is not mounted,
	// the path could be https:\\192.0.2.15\movies\premium\mlaw.avi.
	Body io.ReadCloser `type:"blob"`

	// An optional CacheControl header that allows the caller to control the object's
	// cache behavior. Headers can be passed in as specified in the HTTP spec at
	// https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9).
	//
	// Headers with a custom user-defined value are also accepted.
	CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`

	// The length of the object in bytes.
	ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`

	// The range of bytes to retrieve.
	ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`

	// The content type of the object.
	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`

	// The ETag that represents a unique instance of the object.
	ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"`

	// The date and time that the object was last modified.
	LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`

	// The HTML status code of the request. Status codes ranging from 200 to 299
	// indicate success. All other status codes indicate the type of error that
	// occurred.
	//
	// StatusCode is a required field
	StatusCode *int64 `location:"statusCode" type:"integer" required:"true"`
}

// String returns the string representation
func (s GetObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s GetObjectOutput) GoString() string {
	return s.String()
}

// SetBody sets the Body field's value.
func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
	s.Body = v
	return s
}

// SetCacheControl sets the CacheControl field's value.
func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
	s.CacheControl = &v
	return s
}

// SetContentLength sets the ContentLength field's value.
func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
	s.ContentLength = &v
	return s
}

// SetContentRange sets the ContentRange field's value.
func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
	s.ContentRange = &v
	return s
}

// SetContentType sets the ContentType field's value.
func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
	s.ContentType = &v
	return s
}

// SetETag sets the ETag field's value.
func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
	s.ETag = &v
	return s
}

// SetLastModified sets the LastModified field's value.
func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
	s.LastModified = &v
	return s
}

// SetStatusCode sets the StatusCode field's value.
func (s *GetObjectOutput) SetStatusCode(v int64) *GetObjectOutput {
	s.StatusCode = &v
	return s
}

// A metadata entry for a folder or object.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/Item
type Item struct {
	_ struct{} `type:"structure"`

	// The length of the item in bytes.
	ContentLength *int64 `type:"long"`

	// The content type of the item.
	ContentType *string `type:"string"`

	// The ETag that represents a unique instance of the item.
	ETag *string `min:"1" type:"string"`

	// The date and time that the item was last modified.
	LastModified *time.Time `type:"timestamp" timestampFormat:"unix"`

	// The name of the item.
	Name *string `type:"string"`

	// The item type (folder or object).
	Type *string `type:"string" enum:"ItemType"`
}

// String returns the string representation
func (s Item) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s Item) GoString() string {
	return s.String()
}

// SetContentLength sets the ContentLength field's value.
func (s *Item) SetContentLength(v int64) *Item {
	s.ContentLength = &v
	return s
}

// SetContentType sets the ContentType field's value.
func (s *Item) SetContentType(v string) *Item {
	s.ContentType = &v
	return s
}

// SetETag sets the ETag field's value.
func (s *Item) SetETag(v string) *Item {
	s.ETag = &v
	return s
}

// SetLastModified sets the LastModified field's value.
func (s *Item) SetLastModified(v time.Time) *Item {
	s.LastModified = &v
	return s
}

// SetName sets the Name field's value.
func (s *Item) SetName(v string) *Item {
	s.Name = &v
	return s
}

// SetType sets the Type field's value.
func (s *Item) SetType(v string) *Item {
	s.Type = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItemsRequest
type ListItemsInput struct {
	_ struct{} `type:"structure"`

	// The maximum results to return. The service might return fewer results.
	MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"`

	// The NextToken received in the ListItemsResponse for the same container and
	// path. Tokens expire after 15 minutes.
	NextToken *string `location:"querystring" locationName:"NextToken" type:"string"`

	// The path in the container from which to retrieve items. Format: <folder name>/<folder
	// name>/<file name>
	Path *string `location:"querystring" locationName:"Path" type:"string"`
}

// String returns the string representation
func (s ListItemsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListItemsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListItemsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListItemsInput"}
	if s.MaxResults != nil && *s.MaxResults < 1 {
		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListItemsInput) SetMaxResults(v int64) *ListItemsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListItemsInput) SetNextToken(v string) *ListItemsInput {
	s.NextToken = &v
	return s
}

// SetPath sets the Path field's value.
func (s *ListItemsInput) SetPath(v string) *ListItemsInput {
	s.Path = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItemsResponse
type ListItemsOutput struct {
	_ struct{} `type:"structure"`

	// Metadata entries for the folders and objects at the requested path.
	Items []*Item `type:"list"`

	// The NextToken used to request the next page of results using ListItems.
	NextToken *string `type:"string"`
}

// String returns the string representation
func (s ListItemsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s ListItemsOutput) GoString() string {
	return s.String()
}

// SetItems sets the Items field's value.
func (s *ListItemsOutput) SetItems(v []*Item) *ListItemsOutput {
	s.Items = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListItemsOutput) SetNextToken(v string) *ListItemsOutput {
	s.NextToken = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObjectRequest
type PutObjectInput struct {
	_ struct{} `type:"structure" payload:"Body"`

	// The path to the file outside of the container. The file name can include
	// or omit an extension.
	//
	// Example 1: If the file is stored on a remote server that has been mounted
	// to the workstation on which the REST API command is being run, the path could
	// be the absolute path  \mount\assets\mlaw.avi or the relative path ..\..\mount\assets\movies\premium\mlaw.avi.
	//
	// Example 2: If the file is stored on a remote server that is not mounted,
	// the path could be https:\\192.0.2.15\movies\premium\mlaw.avi.
	//
	// Body is a required field
	Body io.ReadSeeker `type:"blob" required:"true"`

	// An optional CacheControl header that allows the caller to control the object's
	// cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
	// (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9).
	//
	// Headers with a custom user-defined value are also accepted.
	CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`

	// The content type of the object.
	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`

	// The path (including the file name) where the object is stored in the container.
	// Format: <folder name>/<folder name>/<file name>
	//
	// For example, to upload the file mlaw.avi to the folder path premium\canada
	// in the container movies, enter the path premium/canada/mlaw.avi.
	//
	// Do not include the container name in this path.
	//
	// If the path includes any folders that don't exist yet, the service creates
	// them. For example, suppose you have an existing premium/usa subfolder. If
	// you specify premium/canada, the service creates a canada subfolder in the
	// premium folder. You then have two subfolders, usa and canada, in the premium
	// folder.
	//
	// There is no correlation between the path to the source and the path (folders)
	// in the container in AWS Elemental MediaStore.
	//
	// For more information about folders and how they exist in a container, see
	// the AWS Elemental MediaStore User Guide (http://docs.aws.amazon.com/mediastore/latest/ug/).
	//
	// The file name is the name that is assigned to the file that you upload. The
	// file can have the same name inside and outside of AWS Elemental MediaStore,
	// or it can have the same name. The file name can include or omit an extension.
	//
	// Path is a required field
	Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"`

	// Indicates the storage class of a Put request. Defaults to high-performance
	// temporal storage class, and objects are persisted into durable storage shortly
	// after being received.
	StorageClass *string `location:"header" locationName:"x-amz-storage-class" min:"1" type:"string" enum:"StorageClass"`
}

// String returns the string representation
func (s PutObjectInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s PutObjectInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *PutObjectInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
	if s.Body == nil {
		invalidParams.Add(request.NewErrParamRequired("Body"))
	}
	if s.Path == nil {
		invalidParams.Add(request.NewErrParamRequired("Path"))
	}
	if s.Path != nil && len(*s.Path) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Path", 1))
	}
	if s.StorageClass != nil && len(*s.StorageClass) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("StorageClass", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetBody sets the Body field's value.
func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
	s.Body = v
	return s
}

// SetCacheControl sets the CacheControl field's value.
func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
	s.CacheControl = &v
	return s
}

// SetContentType sets the ContentType field's value.
func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
	s.ContentType = &v
	return s
}

// SetPath sets the Path field's value.
func (s *PutObjectInput) SetPath(v string) *PutObjectInput {
	s.Path = &v
	return s
}

// SetStorageClass sets the StorageClass field's value.
func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
	s.StorageClass = &v
	return s
}

// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObjectResponse
type PutObjectOutput struct {
	_ struct{} `type:"structure"`

	// The SHA256 digest of the object that is persisted.
	ContentSHA256 *string `min:"64" type:"string"`

	// Unique identifier of the object in the container.
	ETag *string `min:"1" type:"string"`

	// The storage class where the object was persisted. Should be "Temporal".
	StorageClass *string `min:"1" type:"string" enum:"StorageClass"`
}

// String returns the string representation
func (s PutObjectOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation
func (s PutObjectOutput) GoString() string {
	return s.String()
}

// SetContentSHA256 sets the ContentSHA256 field's value.
func (s *PutObjectOutput) SetContentSHA256(v string) *PutObjectOutput {
	s.ContentSHA256 = &v
	return s
}

// SetETag sets the ETag field's value.
func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
	s.ETag = &v
	return s
}

// SetStorageClass sets the StorageClass field's value.
func (s *PutObjectOutput) SetStorageClass(v string) *PutObjectOutput {
	s.StorageClass = &v
	return s
}

const (
	// ItemTypeObject is a ItemType enum value
	ItemTypeObject = "OBJECT"

	// ItemTypeFolder is a ItemType enum value
	ItemTypeFolder = "FOLDER"
)

const (
	// StorageClassTemporal is a StorageClass enum value
	StorageClassTemporal = "TEMPORAL"
)


text:
var TimespanModel = function () {
    this.start = Infinity;
    this.stop = -Infinity;
    this.highlight_fraction = NaN;
    this.views = [];
};

TimespanModel.prototype = {
    is_valid: function () {
        return this.stop > this.start;
    },
    include_value: function (value) {
        var has_changed = false;
        if (value < this.start) {
            this.start = value;
            has_changed = true;
        }
        if (value > this.stop) {
            this.stop = value;
            has_changed = true;
        }
        if (has_changed)
            this.notify_views();
    },
    exclude_values_before: function (timestamp) {
        if (!this.is_valid())
            return;
        if (this.start < timestamp) {
            this.start = timestamp;
            if (this.stop < timestamp)
                this.stop = timestamp;
            this.notify_views();
        }
    },
    set_highlight_fraction: function (fraction) {
        this.highlight_fraction = fraction;
        this.notify_views();
    },
    clear_highlight: function () {
        this.highlight_fraction = NaN;
        this.notify_views();
    },
    reset: function () {
        this.start = Infinity;
        this.stop = -Infinity;
        this.highlight_fraction = NaN;
        this.notify_views();
    },
    notify_views: function () {
        this.views.forEach(function (view) {
            view.request_draw();
        });
    }
};


text:
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use app\assets\AppAssetAdm;

AppAssetAdm::register($this);
?>

<?= Html::a('Добавление данных', ['/control/index'], ['class' => 'btn btn-default buttonFlo']); ?>
<?= Html::a('Таблица news', ['/control/news'], ['class' => 'btn btn-default buttonFlo']); ?>
<?= Html::a('Таблица images', ['/control/images'], ['class' => 'btn btn-default buttonFlo']); ?>

<?php
echo "
" . $msg . "";
?>


text:
* [Installation](Installation.md)
* [Mappings](Mappings.md)
* [The Elastic Index Behavior](The-Elastic-Index-Behavior.md)
* [The Search Index Shell](The-Search-Index-Shell.md)

## License

Copyright 2015 - 2016 PSA Publishers

Licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.


text:
<?xml version="1.0" encoding="UTF-8"?>
<serializer>
    <class name="Application\Sonata\ProductBundle\Entity\Delivery" exclusion-policy="all" xml-root-name="delivery">

        <property xml-attribute-map="true" name="id" type="integer" expose="true" since-version="1.0" groups="sonata_api_read,sonata_api_write,sonata_search" />

    </class>
</serializer>


text:
// This test only works with the GPU backend.

#include "gm.h"

#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrDrawContext.h"
#include "SkColorPriv.h"
#include "effects/GrPorterDuffXferProcessor.h"
#include "effects/GrSimpleTextureEffect.h"

namespace skiagm {

static const int S = 200;

class TexDataGM : public GM {
public:
    TexDataGM() {
        this->setBGColor(0xff000000);
    }

protected:
    SkString onShortName() override {
        return SkString("texdata");
    }

    SkISize onISize() override {
        return SkISize::Make(2*S, 2*S);
    }

    void onDraw(SkCanvas* canvas) override {
        GrRenderTarget* target = canvas->internal_private_accessTopLayerRenderTarget();
        GrContext* ctx = canvas->getGrContext();
        GrDrawContext* drawContext = ctx ? ctx->drawContext() : NULL;
        if (drawContext && target) {
            SkAutoTArray<SkPMColor> gTextureData((2 * S) * (2 * S));
            static const int stride = 2 * S;
            static const SkPMColor gray  = SkPackARGB32(0x40, 0x40, 0x40, 0x40);
            static const SkPMColor white = SkPackARGB32(0xff, 0xff, 0xff, 0xff);
            static const SkPMColor red   = SkPackARGB32(0x80, 0x80, 0x00, 0x00);
            static const SkPMColor blue  = SkPackARGB32(0x80, 0x00, 0x00, 0x80);
            static const SkPMColor green = SkPackARGB32(0x80, 0x00, 0x80, 0x00);
            static const SkPMColor black = SkPackARGB32(0x00, 0x00, 0x00, 0x00);
            for (int i = 0; i < 2; ++i) {
                int offset = 0;
                // fill upper-left
                for (int y = 0; y < S; ++y) {
                    for (int x = 0; x < S; ++x) {
                        gTextureData[offset + y * stride + x] = gray;
                    }
                }
                // fill upper-right
                offset = S;
                for (int y = 0; y < S; ++y) {
                    for (int x = 0; x < S; ++x) {
                        gTextureData[offset + y * stride + x] = white;
                    }
                }
                // fill lower left
                offset = S * stride;
                for (int y = 0; y < S; ++y) {
                    for (int x = 0; x < S; ++x) {
                        gTextureData[offset + y * stride + x] = black;
                    }
                }
                // fill lower right
                offset = S * stride + S;
                for (int y = 0; y < S; ++y) {
                    for (int x = 0; x < S; ++x) {
                        gTextureData[offset + y * stride + x] = gray;
                    }
                }

                GrSurfaceDesc desc;
                // use RT flag bit because in GL it makes the texture be bottom-up
                desc.fFlags     = i ? kRenderTarget_GrSurfaceFlag :
                                      kNone_GrSurfaceFlags;
                desc.fConfig    = kSkia8888_GrPixelConfig;
                desc.fWidth     = 2 * S;
                desc.fHeight    = 2 * S;
                GrTexture* texture = ctx->textureProvider()->createTexture(
                    desc, false, gTextureData.get(), 0);

                if (!texture) {
                    return;
                }
                SkAutoTUnref<GrTexture> au(texture);

                // setup new clip
                GrClip clip(SkRect::MakeWH(2*S, 2*S));

                GrPaint paint;
                paint.setPorterDuffXPFactory(SkXfermode::kSrcOver_Mode);

                SkMatrix vm;
                if (i) {
                    vm.setRotate(90 * SK_Scalar1,
                                 S * SK_Scalar1,
                                 S * SK_Scalar1);
                } else {
                    vm.reset();
                }
                SkMatrix tm;
                tm = vm;
                tm.postIDiv(2*S, 2*S);
                paint.addColorTextureProcessor(texture, tm);

                drawContext->drawRect(target, clip, paint, vm, SkRect::MakeWH(2*S, 2*S));

                // now update the lower right of the texture in first pass
                // or upper right in second pass
                offset = 0;
                for (int y = 0; y < S; ++y) {
                    for (int x = 0; x < S; ++x) {
                        gTextureData[offset + y * stride + x] =
                            ((x + y) % 2) ? (i ? green : red) : blue;
                    }
                }
                texture->writePixels(S, (i ? 0 : S), S, S,
                                     texture->config(), gTextureData.get(),
                                     4 * stride);
                drawContext->drawRect(target, clip, paint, vm, SkRect::MakeWH(2*S, 2*S));
            }
        } else {
            this->drawGpuOnlyMessage(canvas);
        }
    }

private:
    typedef GM INHERITED;
};

//////////////////////////////////////////////////////////////////////////////

static GM* MyFactory(void*) { return new TexDataGM; }
static GMRegistry reg(MyFactory);

}

#endif


text:
<!DOCTYPE html>

<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />

<title></title>

<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/yeti.min.css" rel="stylesheet" />

<link href="site_libs/highlightjs-9.12.0/textmate.css" rel="stylesheet" />

<link rel="stylesheet" href="styles.css" type="text/css" />

      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">

      </button>
      STT 3851

  Resources

  For Students

  Alan T. Arnholt

STT 3851 Spring 2016

Web page for STT 3851 Spring 2016

Alan T. Arnholt

			Professor of Statistics

       arnholtat@appstate.edu

    Mailing Address

     Appalachian State University

		 Department of Mathematical Sciences

		Walker Hall 237

		121 Bodenheimer Dr

		Boone, NC 28608


text:
import {Component} from '@angular/core';
import {CdkSelectionExamplesModule} from '@angular/components-examples/cdk-experimental/selection';
import {MatSelectionExamplesModule} from '@angular/components-examples/material-experimental/selection';
import {FormsModule} from '@angular/forms';

@Component({
  template: `

CDK selection with a list

    <cdk-selection-list-example></cdk-selection-list-example>

CDK selection column and CDK row selection with CDK table

    <cdk-selection-column-example></cdk-selection-column-example>

Mat selection with a list

    <mat-selection-list-example></mat-selection-list-example>

Mat selection column and Mat row selection with Mat table

    <mat-selection-column-example></mat-selection-column-example>
  `,
  standalone: true,
  imports: [CdkSelectionExamplesModule, MatSelectionExamplesModule, FormsModule],
})
export class SelectionDemo {}


text:
using CorrelationId.Abstractions;
using Microsoft.AspNetCore.Http;

namespace CorrelationId.Providers
{
    /// <summary>
    /// Sets the correlation ID to match the TraceIdentifier set on the <see cref="HttpContext"/>.
    /// </summary>
    public class TraceIdCorrelationIdProvider : ICorrelationIdProvider
    {
        /// <inheritdoc />
        public string GenerateCorrelationId(HttpContext ctx) => ctx.TraceIdentifier;
    }
}


text:
layout: home
---
{% include header.html %}

  {% for post in site.categories[page.title] %}

    {% if post.img %}

    {% else %} {% endif %}

        {{post.title}}

{{ post.content | strip_html | truncatewords: 15 }}

      {% include data.html %}
        {% capture words %}{{ post.content | number_of_words }}{% endcapture %}{% unless words contains "-" %}{{ words |
          plus: 250 | divided_by: 250 | append: " minuto(s) de leitura" }}{% endunless %}

  {% endfor %}

{% include categories.html %}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Azure.Core;

namespace Azure.ResourceManager.MachineLearning.Models
{
    /// <summary> The estimated price info for using a VM. </summary>
    public partial class EstimatedVmPrices
    {
        /// <summary> Initializes a new instance of EstimatedVmPrices. </summary>
        /// <param name="billingCurrency"> Three lettered code specifying the currency of the VM price. Example: USD. </param>
        /// <param name="unitOfMeasure"> The unit of time measurement for the specified VM price. Example: OneHour. </param>
        /// <param name="values"> The list of estimated prices for using a VM of a particular OS type, tier, etc. </param>
        /// <exception cref="ArgumentNullException"> <paramref name="values"/> is null. </exception>
        internal EstimatedVmPrices(BillingCurrency billingCurrency, UnitOfMeasure unitOfMeasure, IEnumerable<EstimatedVmPrice> values)
        {
            Argument.AssertNotNull(values, nameof(values));

            BillingCurrency = billingCurrency;
            UnitOfMeasure = unitOfMeasure;
            Values = values.ToList();
        }

        /// <summary> Initializes a new instance of EstimatedVmPrices. </summary>
        /// <param name="billingCurrency"> Three lettered code specifying the currency of the VM price. Example: USD. </param>
        /// <param name="unitOfMeasure"> The unit of time measurement for the specified VM price. Example: OneHour. </param>
        /// <param name="values"> The list of estimated prices for using a VM of a particular OS type, tier, etc. </param>
        internal EstimatedVmPrices(BillingCurrency billingCurrency, UnitOfMeasure unitOfMeasure, IReadOnlyList<EstimatedVmPrice> values)
        {
            BillingCurrency = billingCurrency;
            UnitOfMeasure = unitOfMeasure;
            Values = values;
        }

        /// <summary> Three lettered code specifying the currency of the VM price. Example: USD. </summary>
        public BillingCurrency BillingCurrency { get; }
        /// <summary> The unit of time measurement for the specified VM price. Example: OneHour. </summary>
        public UnitOfMeasure UnitOfMeasure { get; }
        /// <summary> The list of estimated prices for using a VM of a particular OS type, tier, etc. </summary>
        public IReadOnlyList<EstimatedVmPrice> Values { get; }
    }
}


text:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.mozilla.javascript.annotations;

import java.lang.annotation.*;

/**
 * An annotation that marks a Java method as JavaScript setter. This can
 * be used as an alternative to the jsSet_ prefix desribed in
 * {@link org.mozilla.javascript.ScriptableObject#defineClass(org.mozilla.javascript.Scriptable, Class)}.
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface JSSetter {
    String value() default "";
}


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="20dp" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/custom_dialog_icon" />

    <TextView
        android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#ffffffff"
        android:text="@string/social_dialog"
        android:textAppearance="?android:attr/textAppearanceMedium" />

</LinearLayout>


text:
package com.porcupineprogrammer.sharedpreferencesgotcha;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;

public class MainActivity extends FragmentActivity {

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

    ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
    viewPager.setAdapter(new SectionsPagerAdapter(getSupportFragmentManager()));
  }

  public class SectionsPagerAdapter extends FragmentPagerAdapter {

    public SectionsPagerAdapter(FragmentManager fm) {
      super(fm);
    }

    @Override
    public Fragment getItem(int position) {
      switch (position) {
      case 0:
        return new WrongFragment();
      case 1:
        return new RightFragment();
      }
      throw new IllegalArgumentException();
    }

    @Override
    public int getCount() {
      return 2;
    }

    @Override
    public CharSequence getPageTitle(int position) {
      switch (position) {
      case 0:
        return getString(R.string.wrong_title).toUpperCase();
      case 1:
        return getString(R.string.right_title).toUpperCase();
      }
      throw new IllegalArgumentException();
    }
  }
}


text:
//(function () {
//    angular.module('component').directive('dropZone', function () {
//        return function (scope, element, attrs) {
//            element.dropzone({
//                //url: "/upload",
//                maxFilesize: 100,
//                paramName: "uploadfile",
//                maxThumbnailFilesize: 5
//            });
//        }
//    });
//})();

(function() {
    'use strict';
    angular.module('directives').directive('fileDropzone', function () {
        return {
            restrict: 'A',
            scope: {
                files: '=',
                fileAdded: '&',
            },
            link: function(scope, element, attrs) {
                var checkSize, isTypeValid, processDragOverOrEnter, validMimeTypes;
                processDragOverOrEnter = function(event) {
                    if (event != null) {
                        event.preventDefault();
                    }
                    event.originalEvent.dataTransfer.dropEffect = 'copy';
                    return false;
                };
                validMimeTypes = attrs.fileDropzone;
                checkSize = function(size) {
                    var _ref;
                    if (((_ref = attrs.maxFileSize) === (void 0) || _ref === '') || (size / 1024) / 1024 < attrs.maxFileSize) {
                        return true;
                    } else {
                        alert("File must be smaller than " + attrs.maxFileSize + " MB");
                        return false;
                    }
                };
                isTypeValid = function(type) {
                    if ((validMimeTypes === (void 0) || validMimeTypes === '') || validMimeTypes.indexOf(type) > -1) {
                        return true;
                    } else {
                        alert("Invalid file type.  File must be one of following types " + validMimeTypes);
                        return false;
                    }
                };
                $(element).attr('draggable', 'true');
                $(element).bind('dragover', processDragOverOrEnter);
                $(element).bind('dragenter', processDragOverOrEnter);
                return element.bind('drop', function(event) {

                    if (event != null) {
                        event.preventDefault();
                    }

                    for (var i = 0; i < event.originalEvent.dataTransfer.files.length; i++) {

                        (function(fileinput) {

                            var file, name, reader, size, type;
                            reader = new FileReader();
                            reader.onload = function(evt, reader) {
                                if (checkSize(size) && isTypeValid(type)) {
                                    return scope.$apply(function() {
                                        var currentfile = { file: evt.target.result, fileName: file.name, type: file.type, size: file.size }
                                        if (scope.fileAdded()) {
                                            var fileAddedHandler = scope.fileAdded(); fileAddedHandler(currentfile);
                                        };
                                        if (scope.files && scope.files.push) {
                                            scope.files.push(currentfile);
                                        }
                                    });
                                }
                            };

                            file = fileinput;
                            name = file.name;
                            type = file.type;
                            size = file.size;
                            reader.readAsDataURL(file);
                        })(event.originalEvent.dataTransfer.files[i]);

                    }
                    return false;
                });
            }
        };
    });

}).call(this);


text:
<?php

namespace spec\Inviqa\OohRota\User;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class EngineerSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith('bob');
    }

    function it_should_be_a_user()
    {
        $this->shouldImplement('Inviqa\OohRota\User\User');
    }

    function it_should_return_the_user_name()
    {
        $this->getName()->shouldReturn('bob');
    }
}


text:
<?php
$response = array();
include_once("config.php");
if (isset($_POST['catalog']))
{
		$cat_id =$_POST['catalog'];
		$sql_cat = "SELECT name FROM category WHERE catid='$cat_id' ";
		$res_cat = mysqli_query($conn, $sql_cat);
		$row = mysqli_fetch_assoc($res_cat);
		$cat_name =  $row['name'];
		$name =$_POST['name'];
		$address =$_POST['address'];
		$phone_no =$_POST['phone_no'];

		$url=$_POST['url'];
		$rating=$_POST['rating'];
		$lat=$_POST['lat'];
		$lng=$_POST['lng'];

		$ph=$_POST['ph'];
		$pl=$_POST['pl'];
		$cu=$_POST['cu'];

		//add value
		$sql_add = "INSERT INTO information (cat_id, name, address, phone_no, url, rating, lat, lng,ext_tb) VALUES ('$cat_id', '$name', '$address', '$phone_no', '$url', '$rating', '$lat', '$lng' ,'$cat_name')";
		$res_add = mysqli_query($conn, $sql_add) ;

		$info_id = mysqli_insert_id($conn);

		//add val to hotel
		$sql_hotel = "INSERT INTO hotel (info_id, price_high, price_low, cuisine ) VALUES ('$info_id', '$ph', '$pl', '$cu' )" ;
		$res_hotel = mysqli_query($conn, $sql_hotel);

}
else{
	$myfile = fopen("add2.log", "a") or die("Unable to open file!");
    fwrite($myfile, "fail to read input\n");
    //echo "success appending file";
    fclose($myfile);
}

// check for empty result
if ($res_hotel){
    // success
    $response["success"] = 1;
    // echoing JSON response
    echo json_encode($response);
} else {
    // no logins found
    $response["success"] = 0;
    $response["message"] = "No logins found";
    // echo no users JSON
    echo json_encode($response);
}

?>


text:
import requests

from django.shortcuts import render_to_response, HttpResponse
from django.template import RequestContext
from oauth2app.models import Client, AccessToken
from django.contrib.auth.decorators import login_required
from django import forms
from apps.account.models import Profile
import settings

class LocationForm(forms.Form):
    location = forms.CharField()

#@login_required
def homepage(request):

    template = { "LOGIN_URL": settings.LOGIN_URL }

    if request.user.is_authenticated():
        user_profile = None
        try:
            user_profile = request.user.get_profile()
        except:
            # On first login, a user will not have a profile...what to do?
            new_profile = Profile()
            new_profile.user = request.user

            new_client = Client(name=request.user.username+"_pds", user=request.user, description="user "+request.user.username+"'s Personal Data Store", redirect_uri="http://"+new_profile.pds_location+"/?username="+request.user.username)
            new_client.save()
            new_profile.pds_client = new_client
            new_profile.save()

        if request.GET.get('location'):
            new_profile = request.user.get_profile()
            new_location = request.GET['location']
            new_profile.pds_location = new_location
            new_profile.save()

        clients = Client.objects.filter(user=request.user)
        access_tokens = AccessToken.objects.filter(user=request.user).select_related()
    #        access_tokens = access_tokens.select_related()
        form = LocationForm()
        #print access_tokens[0].token
        template["access_token"] = access_tokens[0].token if len(access_tokens) > 0 else None
        template["clients"] = clients
        template["profile"] = user_profile
        template['form']=form
        template['isup']=is_pds_up(user_profile)

    return render_to_response(
        'base/homepage.html',
        template,
        RequestContext(request))

def _read_json_success(response):
    """Attempts to read the `success` value from a JSON response, if
    applicable. Returns True or False"""
    if response.status_code != 200:
        return False

    try:
        # requests > 1.0.0
        return response.json().get('success', False)
    except AttributeError:
        # requests < 1.0.0 had a json attribute instead of a method.
        return response.json.get('success', False)

def is_pds_up(profile, request_path="/discovery/ping", schema="http"):
    '''Verifies that a user's PDS is set up and responding'''
    path = "{schema}://{host}{path}".format(
        schema=schema,
        host=profile.pds_location,
        path=request_path
    )
    return _read_json_success(requests.get(path))

#TODO DELETE this section. testing mongoEngine
# handle static pages (such as the About pg, Terms pg, and Privacy policy pg)
from mongoengine import *
class Puser(Document):
    email = StringField(required=True)
    first_name = StringField(max_length=50)
    last_name = StringField(max_length=50)
def static(request):

  connect('project1')#, username='webapp', password='pwd123')
  john = Puser(email='jdoe@example.com', first_name='sfds', last_name='S')
  john.save()
  str = ''
  for p in Puser.objects:
    str += p.first_name + ' ' +p.last_name + '<br/>'
  return HttpResponse(str)

def returnToAndroidApp(request):
    response = HttpResponse(content="", status=302)
    response["Location"] = "my_android_application:///dcapsdev.media.mit.edu/returnToAndroidApp"
    return response#HttpResponseRedirect('mypds-android-app:///dcapsdev.media.mit.edu/returnToAndroidApp')