text:
#region License
//   Copyright 2015-2018 Kastellanos Nikolaos
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
#endregion

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using tainicom.Aether.Elementary.Visual;
using tainicom.Aether.Engine;
using System.ComponentModel;
using tainicom.Aether.Elementary;
using tainicom.Aether.Elementary.Serialization;
using tainicom.Aether.MonoGame;

namespace tainicom.Aether.Core.Materials
{
    abstract public class MaterialBase : IMaterial, IInitializable, IShaderMatrices, IAetherSerialization
    {
        #region Implement IShaderMatrices Properties
        #if(WINDOWS)
        [Browsable(false)]
        #endif
        public Matrix Projection { get; set; }
        #if(WINDOWS)
        [Browsable(false)]
        #endif
        public Matrix View { get; set; }
        #if(WINDOWS)
        [Browsable(false)]
        #endif
        public Matrix World { get; set; }
        #endregion

        protected GraphicsDevice GraphicsDevice { get; private set; }
        IDeviceContext DeviceContext;
        protected Effect _effect;

        #if(WINDOWS)
        [Category("States")]
        #endif
        public BlendState BlendState { get; set; }
        #if(WINDOWS)
        [Category("States")]
        #endif
        public DepthStencilState DepthStencilState { get; set; }
        #if(WINDOWS)
        [Category("States")]
        #endif
        public RasterizerState RasterizerState { get; set; }
        #if(WINDOWS)
        [Category("States")]
        #endif
        public SamplerState[] SamplerStates { get; set; }
        public PrimitiveType PrimitiveType { get; set; }

        protected const int NumberOfTextures = 4;

        public MaterialBase()
        {
            this.BlendState = BlendState.Opaque;
            this.DepthStencilState = DepthStencilState.Default;
            this.RasterizerState = RasterizerState.CullCounterClockwise;
            this.SamplerStates = new SamplerState[NumberOfTextures];
            this.SamplerStates[0] = SamplerState.LinearClamp;
            this.PrimitiveType = PrimitiveType.TriangleList;
        }

        public virtual void Initialize(AetherEngine engine)
        {
            this.GraphicsDevice = AetherContextMG.GetDevice(engine);
            this.DeviceContext = engine.Context.DeviceContext;
            CreateEffect();
        }

        protected virtual void CreateEffect() { }

        public virtual void Apply()
        {
            GraphicsDevice.BlendState = this.BlendState;
            GraphicsDevice.DepthStencilState = this.DepthStencilState;
            GraphicsDevice.RasterizerState = this.RasterizerState;
            for (int i = 0; i < NumberOfTextures; i++)
            {
                if (this.SamplerStates[i] != null) GraphicsDevice.SamplerStates[i] = this.SamplerStates[i];
            }

            IEffectMatrices effectMatrices = _effect as IEffectMatrices;
            if (effectMatrices != null)
            {
                effectMatrices.World = this.World;
                effectMatrices.View = this.View;
                effectMatrices.Projection = this.Projection;
            }

            _effect.CurrentTechnique.Passes[0].Apply();
        }

        public void ApplyTextures(ITexture[] textures)
        {
            for (int i = 0; i < NumberOfTextures; i++)
            {
                if (textures == null) GraphicsDevice.Textures[i] = null;
                else if (i >= textures.Length) GraphicsDevice.Textures[i] = null;
                else if (textures[i] == null) GraphicsDevice.Textures[i] = null;
                else GraphicsDevice.Textures[i] = textures[i].Texture;
            }
        }

        public void SetVertices<T>(IVisual visual, T[] data) where T : struct
        {
            ((DeviceContextMG)DeviceContext).PrimitiveType = this.PrimitiveType;
            DeviceContext.SetVertices(visual, data);
        }

        public void SetVertices<T>(IVisual visual, T[] vertexData, int vertexOffset, int primitiveCount, VertexDeclaration vertexDeclaration) where T : struct
        {
            DeviceContext.PrimitiveType = this.PrimitiveType;
            DeviceContext.SetVertices(visual, vertexData, vertexOffset, primitiveCount, vertexDeclaration);
        }

        public void SetVertices<T>(IVisual visual, int offsetInBytes, T[] data, int startIndex, int elementCount, int vertexStride) where T : struct
        {
            DeviceContext.PrimitiveType = this.PrimitiveType;
            DeviceContext.SetVertices(visual, offsetInBytes, data, startIndex, elementCount, vertexStride);
        }

        public void SetVertices<T>(IVisual visual, T[] vertexData, int vertexOffset, int numVertices, short[] indexData, int indexOffset, int primitiveCount, VertexDeclaration vertexDeclaration) where T : struct
        {
            DeviceContext.PrimitiveType = this.PrimitiveType;
            DeviceContext.SetVertices(visual, vertexData, vertexOffset, numVertices, indexData, indexOffset, primitiveCount, vertexDeclaration);
        }

        public void SetVertices(IVisual visual, VertexBuffer vertexBuffer, int baseVertex, int minVertexIndex, int numVertices, IndexBuffer indexBuffer, int startIndex, int primitiveCount)
        {
            DeviceContext.PrimitiveType = this.PrimitiveType;
            DeviceContext.SetVertices(visual, vertexBuffer, baseVertex, minVertexIndex, numVertices, indexBuffer, startIndex, primitiveCount);
        }

        public override string ToString()
        {
            return string.Format("Material {0}", this.GetType().Name);
        }

        #region Aether.Elementary.Serialization.IAetherSerialization Members

        public virtual void Save(IAetherWriter writer)
        {
            writer.WriteInt64("PrimitiveType", (int)PrimitiveType);
            SaveBlendState(writer, this.BlendState);
            SaveDepthStencilState(writer, this.DepthStencilState);
            SaveRasterizerState(writer, this.RasterizerState);
            SaveSamplerStates(writer, this.SamplerStates);
        }
        private void SaveBlendState(IAetherWriter writer, BlendState blendState)
        {
            writer.WriteString("Name", blendState.Name);
            writer.WriteString("BlendStateName", blendState.Name);
            writer.WriteInt64("AlphaBlendFunction", (int)blendState.AlphaBlendFunction);
            writer.WriteInt64("AlphaDestinationBlend", (int)blendState.AlphaDestinationBlend);
            writer.WriteInt64("AlphaSourceBlend", (int)blendState.AlphaSourceBlend);
            writer.WriteColor("BlendFactor", blendState.BlendFactor);
            writer.WriteInt64("ColorBlendFunction", (int)blendState.ColorBlendFunction);
            writer.WriteInt64("ColorDestinationBlend", (int)blendState.ColorDestinationBlend);
            writer.WriteInt64("ColorSourceBlend", (int)blendState.ColorSourceBlend);
            writer.WriteInt64("ColorWriteChannels", (int)blendState.ColorWriteChannels);
            writer.WriteInt64("ColorWriteChannels1", (int)blendState.ColorWriteChannels1);
            writer.WriteInt64("ColorWriteChannels2", (int)blendState.ColorWriteChannels2);
            writer.WriteInt64("ColorWriteChannels3", (int)blendState.ColorWriteChannels3);
            writer.WriteInt64("MultiSampleMask", (int)blendState.MultiSampleMask);
        }
        private void SaveDepthStencilState(IAetherWriter writer, DepthStencilState depthStencilState)
        {
            writer.WriteString("Name", depthStencilState.Name);
            writer.WriteInt64("CounterClockwiseStencilDepthBufferFail", (int)depthStencilState.CounterClockwiseStencilDepthBufferFail);
            writer.WriteInt64("CounterClockwiseStencilFail", (int)depthStencilState.CounterClockwiseStencilFail);
            writer.WriteInt64("CounterClockwiseStencilFunction", (int)depthStencilState.CounterClockwiseStencilFunction);
            writer.WriteInt64("CounterClockwiseStencilPass", (int)depthStencilState.CounterClockwiseStencilPass);
            writer.WriteBoolean("DepthBufferEnable", depthStencilState.DepthBufferEnable);
            writer.WriteInt64("DepthBufferFunction", (int)depthStencilState.DepthBufferFunction);
            writer.WriteBoolean("DepthBufferWriteEnable", depthStencilState.DepthBufferWriteEnable);
            writer.WriteInt64("ReferenceStencil", depthStencilState.ReferenceStencil);
            writer.WriteInt64("StencilDepthBufferFail", (int)depthStencilState.StencilDepthBufferFail);
            writer.WriteBoolean("StencilEnable", depthStencilState.StencilEnable);
            writer.WriteInt64("StencilFail", (int)depthStencilState.StencilFail);
            writer.WriteInt64("StencilFunction", (int)depthStencilState.StencilFunction);
            writer.WriteInt64("StencilMask", depthStencilState.StencilMask);
            writer.WriteInt64("StencilPass", (int)depthStencilState.StencilPass);
            writer.WriteInt64("StencilWriteMask", depthStencilState.StencilWriteMask);
            writer.WriteBoolean("TwoSidedStencilMode", depthStencilState.TwoSidedStencilMode);
        }
        private void SaveRasterizerState(IAetherWriter writer, RasterizerState rasterizerState)
        {
            writer.WriteString("Name", rasterizerState.Name);
            writer.WriteInt64("CullMode", (int)rasterizerState.CullMode);
            writer.WriteFloat("DepthBias", rasterizerState.DepthBias);
            writer.WriteInt64("FillMode", (int)rasterizerState.FillMode);
            writer.WriteBoolean("MultiSampleAntiAlias", rasterizerState.MultiSampleAntiAlias);
            writer.WriteBoolean("ScissorTestEnable", rasterizerState.ScissorTestEnable);
            writer.WriteFloat("SlopeScaleDepthBias", rasterizerState.SlopeScaleDepthBias);
        }
        private void SaveSamplerStates(IAetherWriter writer, SamplerState[] samplerStates)
        {
            int samplerStateCount = samplerStates.Length;
            for (int i = 0; i < samplerStateCount; i++)
            {
                if (samplerStates[i] == null)
                {
                    samplerStateCount = i;
                    break;
                }
            }
            writer.WriteInt32("SamplerStateCount", samplerStateCount);
            for (int i = 0; i < samplerStateCount; i++)
            {
                SamplerState samplerState = samplerStates[i];
                writer.WriteString("Name", samplerState.Name);
                writer.WriteInt64("AddressU", (int)samplerState.AddressU);
                writer.WriteInt64("AddressV", (int)samplerState.AddressV);
                writer.WriteInt64("AddressW", (int)samplerState.AddressW);
                writer.WriteInt64("Filter", (int)samplerState.Filter);
                writer.WriteInt64("MaxAnisotropy", samplerState.MaxAnisotropy);
                writer.WriteInt64("MaxMipLevel", samplerState.MaxMipLevel);
                writer.WriteFloat("MipMapLevelOfDetailBias", samplerState.MipMapLevelOfDetailBias);
            }
        }

        public virtual void Load(IAetherReader reader)
        {
            string str; Int64 i64;
            reader.ReadInt64("PrimitiveType", out i64); PrimitiveType = (PrimitiveType)i64;
            this.BlendState = LoadBlendState(reader);
            this.DepthStencilState = LoadDepthStencilState(reader);
            this.RasterizerState = LoadRasterizerState(reader);
            LoadSamplerStates(reader, this.SamplerStates);
        }
        private BlendState LoadBlendState(IAetherReader reader)
        {
            BlendState blendState = new BlendState();
            string str; Int64 i64; Color col;
            reader.ReadString("Name", out str); blendState.Name = str;
            reader.ReadString("BlendStateName", out str); blendState.Name = str;
            reader.ReadInt64("AlphaBlendFunction", out i64); blendState.AlphaBlendFunction = (BlendFunction)i64;
            reader.ReadInt64("AlphaDestinationBlend", out i64); blendState.AlphaDestinationBlend = (Blend)i64;
            reader.ReadInt64("AlphaSourceBlend", out i64); blendState.AlphaSourceBlend = (Blend)i64;
            reader.ReadColor("BlendFactor", out col); blendState.BlendFactor = col;
            reader.ReadInt64("ColorBlendFunction", out i64); blendState.ColorBlendFunction = (BlendFunction)i64;
            reader.ReadInt64("ColorDestinationBlend", out i64); blendState.ColorDestinationBlend = (Blend)i64;
            reader.ReadInt64("ColorSourceBlend", out i64); blendState.ColorSourceBlend = (Blend)i64;
            reader.ReadInt64("ColorWriteChannels", out i64); blendState.ColorWriteChannels = (ColorWriteChannels)i64;
            reader.ReadInt64("ColorWriteChannels1", out i64); blendState.ColorWriteChannels1 = (ColorWriteChannels)i64;
            reader.ReadInt64("ColorWriteChannels2", out i64); blendState.ColorWriteChannels2 = (ColorWriteChannels)i64;
            reader.ReadInt64("ColorWriteChannels3", out i64); blendState.ColorWriteChannels3 = (ColorWriteChannels)i64;
            reader.ReadInt64("MultiSampleMask", out i64); blendState.MultiSampleMask = (int)i64;
            return blendState;
        }
        private DepthStencilState LoadDepthStencilState(IAetherReader reader)
        {
            DepthStencilState depthStencilState = new DepthStencilState();
            string str; Int64 i64; bool bl;
            reader.ReadString("Name", out str); depthStencilState.Name = str;
            reader.ReadInt64("CounterClockwiseStencilDepthBufferFail", out i64); depthStencilState.CounterClockwiseStencilDepthBufferFail = (StencilOperation)i64;
            reader.ReadInt64("CounterClockwiseStencilFail", out i64); depthStencilState.CounterClockwiseStencilFail = (StencilOperation)i64;
            reader.ReadInt64("CounterClockwiseStencilFunction", out i64); depthStencilState.CounterClockwiseStencilFunction = (CompareFunction)i64;
            reader.ReadInt64("CounterClockwiseStencilPass", out i64); depthStencilState.CounterClockwiseStencilPass = (StencilOperation)i64;
            reader.ReadBoolean("DepthBufferEnable", out bl); depthStencilState.DepthBufferEnable = bl;
            reader.ReadInt64("DepthBufferFunction", out i64); depthStencilState.DepthBufferFunction = (CompareFunction)i64;
            reader.ReadBoolean("DepthBufferWriteEnable", out bl); depthStencilState.DepthBufferWriteEnable = bl;
            reader.ReadInt64("ReferenceStencil", out i64); depthStencilState.ReferenceStencil = (int)i64;
            reader.ReadInt64("StencilDepthBufferFail", out i64); depthStencilState.StencilDepthBufferFail = (StencilOperation)i64;
            reader.ReadBoolean("StencilEnable", out bl); depthStencilState.StencilEnable = bl;
            reader.ReadInt64("StencilFail", out i64); depthStencilState.StencilFail = (StencilOperation)i64;
            reader.ReadInt64("StencilFunction", out i64); depthStencilState.StencilFunction = (CompareFunction)i64;
            reader.ReadInt64("StencilMask", out i64); depthStencilState.StencilMask = (int)i64;
            reader.ReadInt64("StencilPass", out i64); depthStencilState.StencilPass = (StencilOperation)i64;
            reader.ReadInt64("StencilWriteMask", out i64); depthStencilState.StencilWriteMask = (int)i64;
            reader.ReadBoolean("TwoSidedStencilMode", out bl); depthStencilState.TwoSidedStencilMode = bl;
            return depthStencilState;
        }
        private RasterizerState LoadRasterizerState(IAetherReader reader)
        {
            RasterizerState rasterizerState = new RasterizerState();
            string str; Int64 i64; float flt; bool bl;
            reader.ReadString("Name", out str); rasterizerState.Name = str;
            reader.ReadInt64("CullMode", out i64); rasterizerState.CullMode = (CullMode)i64;
            reader.ReadFloat("DepthBias", out flt); rasterizerState.DepthBias = flt;
            reader.ReadInt64("FillMode", out i64); rasterizerState.FillMode = (FillMode)i64;
            reader.ReadBoolean("MultiSampleAntiAlias", out bl); rasterizerState.MultiSampleAntiAlias = bl;
            reader.ReadBoolean("ScissorTestEnable", out bl); rasterizerState.ScissorTestEnable = bl;
            reader.ReadFloat("SlopeScaleDepthBias", out flt); rasterizerState.SlopeScaleDepthBias = flt;
            return rasterizerState;
        }
        private void LoadSamplerStates(IAetherReader reader, SamplerState[] samplerStates)
        {
            int samplerStateCount;
            reader.ReadInt32("SamplerStateCount", out samplerStateCount);
            for (int i = 0; i < samplerStateCount; i++)
            {
                SamplerState samplerState = new SamplerState();
                string str; Int64 i64; float flt;
                reader.ReadString("Name", out str); samplerState.Name = str;
                reader.ReadInt64("AddressU", out i64); samplerState.AddressU = (TextureAddressMode)i64;
                reader.ReadInt64("AddressV", out i64); samplerState.AddressV = (TextureAddressMode)i64;
                reader.ReadInt64("AddressW", out i64); samplerState.AddressW = (TextureAddressMode)i64;
                reader.ReadInt64("Filter", out i64); samplerState.Filter = (TextureFilter)i64;
                reader.ReadInt64("MaxAnisotropy", out i64); samplerState.MaxAnisotropy = (int)i64;
                reader.ReadInt64("MaxMipLevel", out i64); samplerState.MaxMipLevel = (int)i64;
                reader.ReadFloat("MipMapLevelOfDetailBias", out flt); samplerState.MipMapLevelOfDetailBias = flt;
                samplerStates[i] = samplerState;
            }
        }

        #endregion

    }
}


text:
@interface Carousel : iCarousel <iCarouselDataSource, iCarouselDelegate>
  @property (nonatomic) NSMutableArray * items;
@end

redpajama_set_name: RedPajamaGithub


text:
html { padding:0 10px; }

body {
  margin:0;
  padding:10px 0;
  background:#000;
}

#epiceditor-preview h1,
#epiceditor-preview h2,
#epiceditor-preview h3,
#epiceditor-preview h4,
#epiceditor-preview h5,
#epiceditor-preview h6,
#epiceditor-preview p,
#epiceditor-preview blockquote {
    margin: 0;
    padding: 0;
}
#epiceditor-preview {
    background:#000;
    font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
    font-size: 13px;
    line-height: 18px;
    color: #ccc;
}
#epiceditor-preview a {
    color: #fff;
}
#epiceditor-preview a:hover {
    color: #00ff00;
    text-decoration: none;
}
#epiceditor-preview a img {
    border: none;
}
#epiceditor-preview p {
    margin-bottom: 9px;
}
#epiceditor-preview h1,
#epiceditor-preview h2,
#epiceditor-preview h3,
#epiceditor-preview h4,
#epiceditor-preview h5,
#epiceditor-preview h6 {
    color: #cdcdcd;
    line-height: 36px;
}
#epiceditor-preview h1 {
    margin-bottom: 18px;
    font-size: 30px;
}
#epiceditor-preview h2 {
    font-size: 24px;
}
#epiceditor-preview h3 {
    font-size: 18px;
}
#epiceditor-preview h4 {
    font-size: 16px;
}
#epiceditor-preview h5 {
    font-size: 14px;
}
#epiceditor-preview h6 {
    font-size: 13px;
}
#epiceditor-preview hr {
    margin: 0 0 19px;
    border: 0;
    border-bottom: 1px solid #ccc;
}
#epiceditor-preview blockquote {
    padding: 13px 13px 21px 15px;
    margin-bottom: 18px;
    font-family:georgia,serif;
    font-style: italic;
}
#epiceditor-preview blockquote:before {
    content:"\201C";
    font-size:40px;
    margin-left:-10px;
    font-family:georgia,serif;
    color:#eee;
}
#epiceditor-preview blockquote p {
    font-size: 14px;
    font-weight: 300;
    line-height: 18px;
    margin-bottom: 0;
    font-style: italic;
}
#epiceditor-preview code, #epiceditor-preview pre {
    font-family: Monaco, Andale Mono, Courier New, monospace;
}
#epiceditor-preview code {
    background-color: #000;
    color: #f92672;
    padding: 1px 3px;
    font-size: 12px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
}
#epiceditor-preview pre {
    display: block;
    padding: 14px;
    color:#66d9ef;
    margin: 0 0 18px;
    line-height: 16px;
    font-size: 11px;
    border: 1px solid #d9d9d9;
    white-space: pre-wrap;
    word-wrap: break-word;
}
#epiceditor-preview pre code {
    background-color: #000;
    color:#ccc;
    font-size: 11px;
    padding: 0;
}


text:
package main

import (
	"github.com/coreos/dex/connector"
	"github.com/coreos/go-oidc/oidc"
)

type driver interface {
	NewClient(oidc.ClientMetadata) (*oidc.ClientCredentials, error)

	ConnectorConfigs() ([]connector.ConnectorConfig, error)
	SetConnectorConfigs([]connector.ConnectorConfig) error
}


text:
import sys
import os
from os.path import dirname

# Scrapy settings for antspi project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
#     http://doc.scrapy.org/en/latest/topics/settings.html
#     http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
#     http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html

BOT_NAME = 'antspi'

SPIDER_MODULES = ['antspi.spiders']
NEWSPIDER_MODULE = 'antspi.spiders'

# Crawl responsibly by identifying yourself (and your website) on the user-agent
#USER_AGENT = 'antspi (+http://www.yourdomain.com)'

# Obey robots.txt rules
ROBOTSTXT_OBEY = True

# Configure maximum concurrent requests performed by Scrapy (default: 16)
#CONCURRENT_REQUESTS = 32

# Configure a delay for requests for the same website (default: 0)
# See http://scrapy.readthedocs.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
DOWNLOAD_DELAY = 1
# The download delay setting will honor only one of:
#CONCURRENT_REQUESTS_PER_DOMAIN = 16
#CONCURRENT_REQUESTS_PER_IP = 16

# Disable cookies (enabled by default)
#COOKIES_ENABLED = False

# Disable Telnet Console (enabled by default)
#TELNETCONSOLE_ENABLED = False

# Override the default request headers:
#DEFAULT_REQUEST_HEADERS = {
#   'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
#   'Accept-Language': 'en',
#}

# Enable or disable spider middlewares
# See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
#SPIDER_MIDDLEWARES = {
#    'antspi.middlewares.AntspiSpiderMiddleware': 543,
#}

# Enable or disable downloader middlewares
# See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
#DOWNLOADER_MIDDLEWARES = {
#    'antspi.middlewares.MyCustomDownloaderMiddleware': 543,
#}
DOWNLOADER_MIDDLEWARES = {
   # 'misc.middleware.CustomHttpProxyMiddleware': 400,
    'misc.middleware.CustomUserAgentMiddleware': 401,
}

# Enable or disable extensions
# See http://scrapy.readthedocs.org/en/latest/topics/extensions.html
#EXTENSIONS = {
#    'scrapy.extensions.telnet.TelnetConsole': None,
#}

# Configure item pipelines
# See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html
#ITEM_PIPELINES = {
#    'antspi.pipelines.SomePipeline': 300,
#}

# Enable and configure the AutoThrottle extension (disabled by default)
# See http://doc.scrapy.org/en/latest/topics/autothrottle.html
#AUTOTHROTTLE_ENABLED = True
# The initial download delay
#AUTOTHROTTLE_START_DELAY = 5
# The maximum download delay to be set in case of high latencies
#AUTOTHROTTLE_MAX_DELAY = 60
# The average number of requests Scrapy should be sending in parallel to
# each remote server
#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
#AUTOTHROTTLE_DEBUG = False

# Enable and configure HTTP caching (disabled by default)
# See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
#HTTPCACHE_ENABLED = True
#HTTPCACHE_EXPIRATION_SECS = 0
#HTTPCACHE_DIR = 'httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES = []
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'

# MongoDB
ITEM_PIPELINES = {'antspi.pipelines.MongoDBPipeline': 800,
                  'antspi.pipelines.JsonWithEncodingPipeline': 300,
                  'antspi.pipelines.RedisPipeline': 301,
                 }
MONGODB_SERVER = "localhost"
MONGODB_PORT = 27017
MONGODB_DB = "stackoverflow"
MONGODB_COLLECTION = "questions"

# zhihu
path = os.path.abspath(os.path.dirname(__file__))
sys.path.append(path)
LOG_LEVEL = 'INFO'
from misc.log import *


text:
package cs.ualberta.octoaskt12.ES;

public class ESResponse<T> {
    String _index;
    String _type;
    String _id;
    int _version;
    boolean exists;
    T _source;
    double max_score;
    public String getId() {
    	return _id;
    }
    public T getSource() {
        return _source;
    }
}


text:
/* packtest.c - test the basic packing routines */

#include "rodsClient.h"
struct myTest {
    char c1[17];
    char c2[18];
    int int1;
};

#define TEST_PI  "int gopID; int gfid; int gobjID[OBJID_DIM]; str *gfullpath; str *dummyParent; int nGroupMembers; struct *h5Group_PF[nGroupMembers]; int nDatasetMembers; struct *h5Dataset_PF[nDatasetMembers]; int nattributes; struct *h5Attribute_PF[nattributes]; struct h5error_PF;"

int
writePackedRes (bytesBuf_t *packedResult, char *outFile);

int
main(int argc, char **argv)
{
    int status;
    packItem_t *packItemHead = NULL;
    startupPack_t myStartupPack, *outStartupPack;
    rError_t myError, *outError;
    bytesBuf_t *packedResult;
    genQueryOut_t myQueryOut, *outQueryOut;
    char *tmpValue;
    int i;
    modDataObjMeta_t modDataObjMetaInp, *outModDataObjMeta;
    dataObjInfo_t dataObjInfo;
    keyValPair_t regParam;
    irodsProt_t irodsProt = XML_PROT;

    memset (&dataObjInfo, 0, sizeof (dataObjInfo_t));
    memset (&regParam, 0, sizeof (keyValPair_t));

    strcpy (dataObjInfo.objPath, "/tmp/thisIsATest/a&b/c<d/e>f/g`h");
    modDataObjMetaInp.dataObjInfo = &dataObjInfo;
    modDataObjMetaInp.regParam = &regParam;

    status = packStruct (&modDataObjMetaInp, &packedResult, "ModDataObjMeta_PI",
      NULL, 0, irodsProt);

    printf ("packStruct of ModDataObjMeta_PI, status = %d\n", status);
    if (irodsProt == XML_PROT)
        writePackedRes (packedResult, "modeData.out");

    status = unpackStruct (packedResult->buf, (void **) &outModDataObjMeta,
      "ModDataObjMeta_PI", NULL, irodsProt);

    printf ("unpackStruct of ModDataObjMeta_PI, status = %d\n", status);

    memset (&myQueryOut, 0, sizeof (myQueryOut));
    myQueryOut.rowCnt = 2;
    myQueryOut.attriCnt = 3;

    myQueryOut.sqlResult[0].attriInx = 10;
    myQueryOut.sqlResult[0].len = 20;
    myQueryOut.sqlResult[0].value = tmpValue = (char *) malloc (20*2);
    sprintf (tmpValue, "value 0,1");
    tmpValue += 20;
    sprintf (tmpValue, "value 0,2");

    myQueryOut.sqlResult[1].attriInx = 20;
    myQueryOut.sqlResult[1].len = 30;
    myQueryOut.sqlResult[1].value = tmpValue = (char *) malloc (30*2);
    sprintf (tmpValue, "value 1,1");
    tmpValue += 30;
    sprintf (tmpValue, "value 1,2");

    myQueryOut.sqlResult[2].attriInx = 30;
    myQueryOut.sqlResult[2].len = 40;
    myQueryOut.sqlResult[2].value = tmpValue = (char *) malloc (40*2);
    sprintf (tmpValue, "value 2,1");
    tmpValue += 40;
    sprintf (tmpValue, "value 2,2");

    status = packStruct (&myQueryOut, &packedResult, "GenQueryOut_PI",
      NULL, 0, irodsProt);
    printf ("packStruct status = %d\n", status);
    if (irodsProt == XML_PROT)
        writePackedRes (packedResult, "genq.out");

    status = unpackStruct (packedResult->buf, (void **) &outQueryOut,
      "GenQueryOut_PI", NULL, irodsProt);

    printf ("unpackStruct status = %d\n", status);

    status = parsePackInstruct (TEST_PI, &packItemHead);

    printf ("parsePackInstruct status = %d\n", status);

    myStartupPack.connectCnt = 11;
    myStartupPack.irodsProt = XML_PROT;
    strcpy (myStartupPack.proxyUser, "proxyUser");
    strcpy (myStartupPack.proxyRodsZone, "proxyRodsZone");
    strcpy (myStartupPack.clientUser, "myclientUser");
    strcpy (myStartupPack.clientRodsZone, "clientRodsZone");
    strcpy (myStartupPack.relVersion, "relVersion");
    strcpy (myStartupPack.apiVersion, "apiVersion");
    strcpy (myStartupPack.option, "option");
    status = packStruct (&myStartupPack, &packedResult, "StartupPack_PI",
      NULL, 0, XML_PROT);
    printf ("packStruct of StartupPack_PI status = %d\n", status);

    if (irodsProt == XML_PROT)
        writePackedRes (packedResult, "startup.out");
    status = unpackStruct (packedResult->buf, (void **) &outStartupPack,
      "StartupPack_PI", NULL, irodsProt);
    printf ("unpackStruct of StartupPack_PI status = %d\n", status);

    myError.len = 3;

    myError.errMsg = (rErrMsg_t **) malloc (sizeof (void *) * 3);
    for (i = 0; i < 3; i++) {
	myError.errMsg[i] = (rErrMsg_t *) malloc (sizeof (rErrMsg_t));
	sprintf (myError.errMsg[i]->msg, "error %d\n", i);
	myError.errMsg[i]->status = i;
    }

    status = packStruct (&myError, &packedResult, "RError_PI",
      NULL, 0, irodsProt);
    printf ("packStruct of RErrMsg_PI status = %d\n", status);
    if (irodsProt == XML_PROT)
        writePackedRes (packedResult, "error.out");

    status = unpackStruct (packedResult->buf, (void **) &outError, "RError_PI",
      NULL, irodsProt);
    printf ("unpackStruct of RErrMsg_PI status = %d\n", status);

}

int
writePackedRes (bytesBuf_t *packedResult, char *outFile)
{
    FILE *fptr;
    int len;

    fptr = fopen (outFile, "w");

    if (fptr == NULL) {
        rodsLog (LOG_ERROR,
          "Cannot open input file %s. ernro = %d\n",
          outFile, errno);
        return (-1);
    }

    len = fwrite (packedResult->buf, packedResult->len, 1, fptr);
    len = fwrite (packedResult->buf, packedResult->len, 1, stdout);
    printf ("\n\n");
    fclose (fptr);

    return (len);
}


text:
package example

import java.io.IOException

import zio.{DefaultRuntime, ZIO}
import zio.console._

import scala.concurrent.Future

object Main extends App with DefaultRuntime{
  val zioFromFuture = ZIO.fromFuture(_ => Future.successful("hoge")).mapError(_ => new IOException())

  val myAppLogic =
    for {
      futureHoge <- zioFromFuture
      _    <- putStrLn("Hello! What is your name?")
      name <- getStrLn
      _    <- putStrLn(s"Hello, ${name}/${futureHoge}, welcome to ZIO!")
      futureHoge2 <- zioFromFuture
    } yield ()

  unsafeRun(myAppLogic)

  private val customEnvironment = new Console {
    override val console: Console.Service[Any] = new Console.Service[Any] {
      override def putStr(line: String): ZIO[Any, Nothing, Unit] = ???

      override def putStrLn(line: String): ZIO[Any, Nothing, Unit] = {
        println(line)
        ZIO.succeed(line)
      }

      override val getStrLn: ZIO[Any, IOException, String] = ZIO.succeed("hoge")
    }
  }
  unsafeRun(myAppLogic.provide(customEnvironment))

  val zioFromFunction: ZIO[Int, Nothing, Int] = ZIO.fromFunction((i: Int) => {
    i * i
  })

  unsafeRun(zioFromFunction.provide(1))
  println("hoge")
}


text:
#pragma once
#include <aws/eks/EKS_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/eks/model/AddonStatus.h>
#include <aws/eks/model/AddonHealth.h>
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <utility>

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

  /**
   *
An Amazon EKS add-on.

See Also:
   AWS API
   * Reference

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

    /**
     *
The name of the add-on.

     */
    inline const Aws::String& GetAddonName() const{ return m_addonName; }

    /**
     *
The name of the add-on.

     */
    inline bool AddonNameHasBeenSet() const { return m_addonNameHasBeenSet; }

    /**
     *
The name of the add-on.

     */
    inline void SetAddonName(const Aws::String& value) { m_addonNameHasBeenSet = true; m_addonName = value; }

    /**
     *
The name of the add-on.

     */
    inline void SetAddonName(Aws::String&& value) { m_addonNameHasBeenSet = true; m_addonName = std::move(value); }

    /**
     *
The name of the add-on.

     */
    inline void SetAddonName(const char* value) { m_addonNameHasBeenSet = true; m_addonName.assign(value); }

    /**
     *
The name of the add-on.

     */
    inline Addon& WithAddonName(const Aws::String& value) { SetAddonName(value); return *this;}

    /**
     *
The name of the add-on.

     */
    inline Addon& WithAddonName(Aws::String&& value) { SetAddonName(std::move(value)); return *this;}

    /**
     *
The name of the add-on.

     */
    inline Addon& WithAddonName(const char* value) { SetAddonName(value); return *this;}

    /**
     *
The name of the cluster.

     */
    inline const Aws::String& GetClusterName() const{ return m_clusterName; }

    /**
     *
The name of the cluster.

     */
    inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; }

    /**
     *
The name of the cluster.

     */
    inline void SetClusterName(const Aws::String& value) { m_clusterNameHasBeenSet = true; m_clusterName = value; }

    /**
     *
The name of the cluster.

     */
    inline void SetClusterName(Aws::String&& value) { m_clusterNameHasBeenSet = true; m_clusterName = std::move(value); }

    /**
     *
The name of the cluster.

     */
    inline void SetClusterName(const char* value) { m_clusterNameHasBeenSet = true; m_clusterName.assign(value); }

    /**
     *
The name of the cluster.

     */
    inline Addon& WithClusterName(const Aws::String& value) { SetClusterName(value); return *this;}

    /**
     *
The name of the cluster.

     */
    inline Addon& WithClusterName(Aws::String&& value) { SetClusterName(std::move(value)); return *this;}

    /**
     *
The name of the cluster.

     */
    inline Addon& WithClusterName(const char* value) { SetClusterName(value); return *this;}

    /**
     *
The status of the add-on.

     */
    inline const AddonStatus& GetStatus() const{ return m_status; }

    /**
     *
The status of the add-on.

     */
    inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }

    /**
     *
The status of the add-on.

     */
    inline void SetStatus(const AddonStatus& value) { m_statusHasBeenSet = true; m_status = value; }

    /**
     *
The status of the add-on.

     */
    inline void SetStatus(AddonStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }

    /**
     *
The status of the add-on.

     */
    inline Addon& WithStatus(const AddonStatus& value) { SetStatus(value); return *this;}

    /**
     *
The status of the add-on.

     */
    inline Addon& WithStatus(AddonStatus&& value) { SetStatus(std::move(value)); return *this;}

    /**
     *
The version of the add-on.

     */
    inline const Aws::String& GetAddonVersion() const{ return m_addonVersion; }

    /**
     *
The version of the add-on.

     */
    inline bool AddonVersionHasBeenSet() const { return m_addonVersionHasBeenSet; }

    /**
     *
The version of the add-on.

     */
    inline void SetAddonVersion(const Aws::String& value) { m_addonVersionHasBeenSet = true; m_addonVersion = value; }

    /**
     *
The version of the add-on.

     */
    inline void SetAddonVersion(Aws::String&& value) { m_addonVersionHasBeenSet = true; m_addonVersion = std::move(value); }

    /**
     *
The version of the add-on.

     */
    inline void SetAddonVersion(const char* value) { m_addonVersionHasBeenSet = true; m_addonVersion.assign(value); }

    /**
     *
The version of the add-on.

     */
    inline Addon& WithAddonVersion(const Aws::String& value) { SetAddonVersion(value); return *this;}

    /**
     *
The version of the add-on.

     */
    inline Addon& WithAddonVersion(Aws::String&& value) { SetAddonVersion(std::move(value)); return *this;}

    /**
     *
The version of the add-on.

     */
    inline Addon& WithAddonVersion(const char* value) { SetAddonVersion(value); return *this;}

    /**
     *
An object that represents the health of the add-on.

     */
    inline const AddonHealth& GetHealth() const{ return m_health; }

    /**
     *
An object that represents the health of the add-on.

     */
    inline bool HealthHasBeenSet() const { return m_healthHasBeenSet; }

    /**
     *
An object that represents the health of the add-on.

     */
    inline void SetHealth(const AddonHealth& value) { m_healthHasBeenSet = true; m_health = value; }

    /**
     *
An object that represents the health of the add-on.

     */
    inline void SetHealth(AddonHealth&& value) { m_healthHasBeenSet = true; m_health = std::move(value); }

    /**
     *
An object that represents the health of the add-on.

     */
    inline Addon& WithHealth(const AddonHealth& value) { SetHealth(value); return *this;}

    /**
     *
An object that represents the health of the add-on.

     */
    inline Addon& WithHealth(AddonHealth&& value) { SetHealth(std::move(value)); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the add-on.

     */
    inline const Aws::String& GetAddonArn() const{ return m_addonArn; }

    /**
     *
The Amazon Resource Name (ARN) of the add-on.

     */
    inline bool AddonArnHasBeenSet() const { return m_addonArnHasBeenSet; }

    /**
     *
The Amazon Resource Name (ARN) of the add-on.

     */
    inline void SetAddonArn(const Aws::String& value) { m_addonArnHasBeenSet = true; m_addonArn = value; }

    /**
     *
The Amazon Resource Name (ARN) of the add-on.

     */
    inline void SetAddonArn(Aws::String&& value) { m_addonArnHasBeenSet = true; m_addonArn = std::move(value); }

    /**
     *
The Amazon Resource Name (ARN) of the add-on.

     */
    inline void SetAddonArn(const char* value) { m_addonArnHasBeenSet = true; m_addonArn.assign(value); }

    /**
     *
The Amazon Resource Name (ARN) of the add-on.

     */
    inline Addon& WithAddonArn(const Aws::String& value) { SetAddonArn(value); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the add-on.

     */
    inline Addon& WithAddonArn(Aws::String&& value) { SetAddonArn(std::move(value)); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the add-on.

     */
    inline Addon& WithAddonArn(const char* value) { SetAddonArn(value); return *this;}

    /**
     *
The date and time that the add-on was created.

     */
    inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; }

    /**
     *
The date and time that the add-on was created.

     */
    inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }

    /**
     *
The date and time that the add-on was created.

     */
    inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }

    /**
     *
The date and time that the add-on was created.

     */
    inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); }

    /**
     *
The date and time that the add-on was created.

     */
    inline Addon& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;}

    /**
     *
The date and time that the add-on was created.

     */
    inline Addon& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;}

    /**
     *
The date and time that the add-on was last modified.

     */
    inline const Aws::Utils::DateTime& GetModifiedAt() const{ return m_modifiedAt; }

    /**
     *
The date and time that the add-on was last modified.

     */
    inline bool ModifiedAtHasBeenSet() const { return m_modifiedAtHasBeenSet; }

    /**
     *
The date and time that the add-on was last modified.

     */
    inline void SetModifiedAt(const Aws::Utils::DateTime& value) { m_modifiedAtHasBeenSet = true; m_modifiedAt = value; }

    /**
     *
The date and time that the add-on was last modified.

     */
    inline void SetModifiedAt(Aws::Utils::DateTime&& value) { m_modifiedAtHasBeenSet = true; m_modifiedAt = std::move(value); }

    /**
     *
The date and time that the add-on was last modified.

     */
    inline Addon& WithModifiedAt(const Aws::Utils::DateTime& value) { SetModifiedAt(value); return *this;}

    /**
     *
The date and time that the add-on was last modified.

     */
    inline Addon& WithModifiedAt(Aws::Utils::DateTime&& value) { SetModifiedAt(std::move(value)); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the IAM role that is bound to the
     * Kubernetes service account used by the add-on.

     */
    inline const Aws::String& GetServiceAccountRoleArn() const{ return m_serviceAccountRoleArn; }

    /**
     *
The Amazon Resource Name (ARN) of the IAM role that is bound to the
     * Kubernetes service account used by the add-on.

     */
    inline bool ServiceAccountRoleArnHasBeenSet() const { return m_serviceAccountRoleArnHasBeenSet; }

    /**
     *
The Amazon Resource Name (ARN) of the IAM role that is bound to the
     * Kubernetes service account used by the add-on.

     */
    inline void SetServiceAccountRoleArn(const Aws::String& value) { m_serviceAccountRoleArnHasBeenSet = true; m_serviceAccountRoleArn = value; }

    /**
     *
The Amazon Resource Name (ARN) of the IAM role that is bound to the
     * Kubernetes service account used by the add-on.

     */
    inline void SetServiceAccountRoleArn(Aws::String&& value) { m_serviceAccountRoleArnHasBeenSet = true; m_serviceAccountRoleArn = std::move(value); }

    /**
     *
The Amazon Resource Name (ARN) of the IAM role that is bound to the
     * Kubernetes service account used by the add-on.

     */
    inline void SetServiceAccountRoleArn(const char* value) { m_serviceAccountRoleArnHasBeenSet = true; m_serviceAccountRoleArn.assign(value); }

    /**
     *
The Amazon Resource Name (ARN) of the IAM role that is bound to the
     * Kubernetes service account used by the add-on.

     */
    inline Addon& WithServiceAccountRoleArn(const Aws::String& value) { SetServiceAccountRoleArn(value); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the IAM role that is bound to the
     * Kubernetes service account used by the add-on.

     */
    inline Addon& WithServiceAccountRoleArn(Aws::String&& value) { SetServiceAccountRoleArn(std::move(value)); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the IAM role that is bound to the
     * Kubernetes service account used by the add-on.

     */
    inline Addon& WithServiceAccountRoleArn(const char* value) { SetServiceAccountRoleArn(value); return *this;}

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }

    /**
     *
The metadata that you apply to the add-on to assist with categorization and
     * organization. Each tag consists of a key and an optional value, both of which
     * you define. Add-on tags do not propagate to any other resources associated with
     * the cluster.

     */
    inline Addon& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }

  private:

    Aws::String m_addonName;
    bool m_addonNameHasBeenSet;

    Aws::String m_clusterName;
    bool m_clusterNameHasBeenSet;

    AddonStatus m_status;
    bool m_statusHasBeenSet;

    Aws::String m_addonVersion;
    bool m_addonVersionHasBeenSet;

    AddonHealth m_health;
    bool m_healthHasBeenSet;

    Aws::String m_addonArn;
    bool m_addonArnHasBeenSet;

    Aws::Utils::DateTime m_createdAt;
    bool m_createdAtHasBeenSet;

    Aws::Utils::DateTime m_modifiedAt;
    bool m_modifiedAtHasBeenSet;

    Aws::String m_serviceAccountRoleArn;
    bool m_serviceAccountRoleArnHasBeenSet;

    Aws::Map<Aws::String, Aws::String> m_tags;
    bool m_tagsHasBeenSet;
  };

} // namespace Model
} // namespace EKS
} // namespace Aws


text:
{% extends 'pages/base.html' %}

{% block maintitle %}I18N_ABOUT_PAGE_TITLE{% endblock maintitle %}

{% block header_js %}
  {{ super() }}
{% endblock %}

{% block navbar_breadcrumb %}

      About

{% endblock navbar_breadcrumb %}

{% block content %}

Oppia: education for all

  <background-banner></background-banner>

              About

              Foundation

              Credits

About Oppia

                Oppia "O-pee-yah" (Finnish) - "to learn"

                Oppia's mission is to help anyone learn anything
                they want in an effective and enjoyable way.

                By creating a set of free, high-quality, demonstrably effective
                lessons with the help of educators from around the world, Oppia
                aims to provide students with quality education — regardless
                of where they are or what traditional resources they have access to.

                So far, educators have created more than 8,000 of these lessons,
                which we call explorations. And they serve almost
                250,000 students worldwide.

                Explorations help students learn in a fun and creative way,
                using videos, images, and open-ended questions. And since students
                often have similar misconceptions, Oppia also provides educators
                the ability to address these misconceptions directly within
                explorations, empowering them to provide targeted feedback
                to multiple students at a time.

                If you're a student interested in learning with Oppia, you can
                begin your learning adventure by browsing
                our explorations.

                If you're a teacher interested in impacting the lives of
                students around the world, you can apply to join our
                Teach with Oppia program, aimed at
                providing lessons for topics that students typically find difficult.

                By teaching with Oppia, you can improve your skills in
                communication and empathy while helping to improve education for
                students around the world.  Or, if you're not ready to teach yet,
                you can still share feedback on lessons to help make them better
                for other students!

                Whether you're a K-12 educator, a graduate student, or an
                individual who's passionate about a specific subject and wants to
                share your knowledge, Oppia welcomes you. Join the community and
                start exploring with us.

                  <img ng-src="<[getStaticImageUrl('/general/creator-create-exp.png')]>" alt="">

Create an Exploration

                    about a topic you care about.

                  <img ng-src="<[getStaticImageUrl('/general/creator-pub-share.png')]>" alt="">

Publish & Share

                    your creations with the community.

                  <img ng-src="<[getStaticImageUrl('/general/creator-feedback.png')]>" alt="">

Earn feedback

                    to improve your exploration.

The Oppia Foundation

                The Oppia website and source code are supported by the Oppia Foundation,
                a tax-exempt 501(c)(3) non-profit organization registered in the State of California.

                The Foundation relies on the generous support of contributors
                and donors from around the world to work toward its mission of
                empowering anyone to learn anything they want in an enjoyable
                and effective way.

                If you wish to join the hundreds of other individuals supporting
                these efforts, please learn more about
                donating to the Oppia Foundation or
                getting involved in other ways.

Directors

                The directors of the Foundation are Amit Deutsch, Jacob Davis, and Sean Lip.
                The Foundation's
                bylaws and minutes
                are available to read. If you wish to contact the Foundation, please email:
                admin@oppia.org.

License

                All content in Oppia's explorations is licensed under
                CC-BY-SA 4.0
                with a waiver of the attribution requirement (specifically, Sections 3(a)(1) and
                3(a)(2)). If you reuse content from this site, we encourage you to include a link
                to the relevant exploration page, but do not require it.

                The software powering Oppia is open source, and its
                code is released under an
                Apache 2.0 license.

                  Donate

                  Get Involved

Credits

                Oppia's contributors come from all over the world — many of us are
                students, recent students and teachers. We'd like to thank the
                following contributors who've helped to build the platform. If
                you'd like to help,
                here's how you can get involved!

                A

Abhay Raizada

Abhijit Suresh

Abraham Mgowano

Aditya Jain

Alex Gower

Allan Zhou

Amit Deutsch

Ana Francisca Bernardo

Andrew Low

Andrey Mironyuk

Angela Park

Anggoro Dewanto

Anmol Shukla

Anthony Alridge

Anthony Zheng

Arpan Banerjee

Arun Kumar

Arunabh Ghosh

Aubrey Wells

Avijit Gupta

                B

Barnabas Makonda

Ben Henning

Ben Targan

Bill Morrisson

BJ Voth

Bolaji Fatade

Boyd Y. Ching

Brenton Briggs

                C

Charisse De Torres

Chase Albert

Chin Zhan Xiong

Cihan Bebek

Corey Hunter

                D

Debanshu Bhaumik

Deepank Agarwal

                E

Edward Allison

Elizabeth Kemp

Estelle Lee

                F

Frederik Creemers

                G

Grace Guo

                H

Hamza Chandad

Hitesh Sharma

Himanshu Aggarwal

Himanshu Dixit

Huong Le

                J

Jackson Wu

Jacob Davis

Jakub Osika

Jared Silver

Jasper Deng

Jasmine Hunter

Jaysinh Shukla

Jenna Mandel

Jeremy Emerson

Jérôme (zolk232)

Jerry Chen

John Glennon

Joshua Cano

Joshua Lusk

                K

Karen Rustad

Kathryn Patterson

Kenneth Ho

Kerry Wang

Kevin Lee

Kevin Thomas

Kiran Konduru

Koji Ashida

Kristin Anthony

Konstantinos Kagkelidis

Kumari Shalini

                M

Madiyar Aitbayev

Mamat Rahmat

Manas Tungare

Marcel Schmittfull

Mark Cabanero

Mark Halpin

Maurício Meneghini Fauth

Michael Anuzis

Michael Mossey

Michael Wagner

Milagro Teruel

Mohit Gupta

Mungo Dewar

                N

Nalin Chhibber

Naveen Kumar Shukla

Nikhil Prakash

Nikhil Sangwan

                O

Oskar Cieslik

Oswell Chan

Owen Parry

Ozan Filiz

                P

Phil Wagner

Philip Hayes

Phillip Moulton

Prasanna Patil

Pratik Katte

                R

Raine Hoover

Rajan Garg

Rajat Patwa

Rajendra Kadam

Reinaldo Aguiar

Reto Brunner

Richard Cho

Rohan Gulati

Ross Strader

                S

Samara Trilling

Sandeep Dubey

Santos Hernandez

Sanyam Khurana

Satmeet Ubhi

Satyam Yadav

Satwik Kansal

Scott Junner

Sean Lip

Sebastian Zangaro

Seth Beckman

Shafqat Dulal

Shantanu Bhowmik

Shivan Trivedi

Shivansh Bajaj

Shouvik Roy

Soumyo Dey

Sourav Badami

Sourav Singh

Sreenivasulu Giritheja

Stephanie Federwisch

Stephen Chiang

Sudhanva MG

                T

Tarashish Mishra

Timothy Cyrus

Tony Jiang

Tracy Homer

Travis Shafer

Truong Kim

Tuguldur Baigalmaa

                U

Umesh Singla

                V

Viraj Prabhu

Vishal Gupta

Vishal Joisar

Vojtěch Jelínek

                W

Wilson Hong

                X

Xinyu Wu

                Y

Yana Malysheva

Yang Lu

Yi Yan

Yogesh Sharma

Yousef Hamza

Yuan Gu

                Z

Zoe Madden-Wood

                The Oppia development team is also grateful for the feedback, ideas,
                help and suggestions by Alex Kauffmann, Allison Barros, Amy Latten,
                Brett Barros, Crystal Kwok, Daniel Hernandez, Divya Siddarth,
                Ilwon Yoon, Jennifer Chen, John Cox, John Orr, Katie Berlent,
                Michael Wawszczak, Mike Gainer, Neil Fraser, Noah Falstein,
                Nupur Jain, Peter Norvig, Philip Guo, Piotr Mitros, Rachel Chen,
                Rahim Nathwani, Robyn Choo, Tricia Ngoon, Vikrant Nanda,
                Vinamrata Singal and Yarin Feigenbaum.

                We would also like to thank translatewiki.net for providing crowdsourced translations.

            <img ng-src="<[aboutPageMascotImgUrl]>" class="oppia-about-otter" alt="Otter">

What would you like to do today?

              I want to learn
              I want to teach

{% endblock %}

{% block footer_js %}
  {{ super() }}

{% endblock footer_js %}

{% block footer%}
  {% include 'pages/footer.html' %}
{% endblock %}


text:
package modbus

import "sort"

type request struct {
	address uint16
	length  uint16
	fields  []field
}

func newRequestsFromFields(fields []field, slaveID byte, registerType string, maxBatchSize uint16) []request {
	if len(fields) == 0 {
		return nil
	}

	// Sort the fields by address (ascending) and length
	sort.Slice(fields, func(i, j int) bool {
		addrI := fields[i].address
		addrJ := fields[j].address
		return addrI < addrJ || (addrI == addrJ && fields[i].length > fields[j].length)
	})

	// Construct the consecutive register chunks for the addresses and construct Modbus requests.
	// For field addresses like [1, 2, 3, 5, 6, 10, 11, 12, 14] we should construct the following
	// requests (1, 3) , (5, 2) , (10, 3), (14 , 1). Furthermore, we should respect field boundaries
	// and the given maximum chunk sizes.
	var requests []request

	current := request{
		address: fields[0].address,
		length:  fields[0].length,
		fields:  []field{fields[0]},
	}

	for _, f := range fields[1:] {
		// Check if we need to interrupt the current chunk and require a new one
		needInterrupt := f.address != current.address+current.length            // not consecutive
		needInterrupt = needInterrupt || f.length+current.length > maxBatchSize // too large

		if !needInterrupt {
			// Still save to add the field to the current request
			current.length += f.length
			current.fields = append(current.fields, f) // TODO: omit the field with a future flag
			continue
		}

		// Finish the current request, add it to the list and construct a new one
		requests = append(requests, current)
		current = request{
			address: f.address,
			length:  f.length,
			fields:  []field{f},
		}
	}
	requests = append(requests, current)

	return requests
}


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

namespace EleicaoBrasil.Web.ModelView
{
    public class ErrorMV
    {
        public string Message { get; set; }
    }
}


text:
<title>gdb.types - Debugging with GDB</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Debugging with GDB">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Python-modules.html#Python-modules" title="Python modules">
<link rel="prev" href="gdb_002eprinting.html#gdb_002eprinting" title="gdb.printing">
<link rel="next" href="gdb_002eprompt.html#gdb_002eprompt" title="gdb.prompt">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">

<meta http-equiv="Content-Style-Type" content="text/css">

Next: gdb.prompt,
Previous: gdb.printing,
Up: Python modules

23.2.4.2 gdb.types

This module provides a collection of utilities for working with
gdb.Type objects.

get_basic_type (<var>type</var>)
Return <var>type</var> with const and volatile qualifiers stripped,
and with typedefs and C<tt>++</tt> references converted to the underlying type.

C<tt>++</tt> example:

          typedef const int const_int;
          const_int foo (3);
          const_int& foo_ref (foo);
          int main () { return 0; }

Then in gdb:

          (gdb) start
          (gdb) python import gdb.types
          (gdb) python foo_ref = gdb.parse_and_eval("foo_ref")
          (gdb) python print gdb.types.get_basic_type(foo_ref.type)
          int

has_field (<var>type</var>, <var>field</var>)
Return True if <var>type</var>, assumed to be a type with fields
(e.g., a structure or union), has field <var>field</var>.

make_enum_dict (<var>enum_type</var>)
Return a Python dictionary type produced from <var>enum_type</var>.

deep_items (<var>type</var>)
Returns a Python iterator similar to the standard
gdb.Type.iteritems method, except that the iterator returned
by deep_items will recursively traverse anonymous struct or
union fields.  For example:

          struct A
          {
              int a;
              union {
                  int b0;
                  int b1;
              };
          };

Then in gdb:

          (gdb) python import gdb.types
          (gdb) python struct_a = gdb.lookup_type("struct A")
          (gdb) python print struct_a.keys ()
          {['a', '']}
          (gdb) python print [k for k,v in gdb.types.deep_items(struct_a)]
          {['a', 'b0', 'b1']}

get_type_recognizers ()
Return a list of the enabled type recognizers for the current context.
This is called by gdb during the type-printing process
(see Type Printing API).

apply_type_recognizers (recognizers, type_obj)
Apply the type recognizers, <var>recognizers</var>, to the type object
<var>type_obj</var>.  If any recognizer returns a string, return that
string.  Otherwise, return None.  This is called by
gdb during the type-printing process (see Type Printing API).

register_type_printer (locus, printer)
This is a convenience function to register a type printer
<var>printer</var>.  The printer must implement the type printer protocol.
The <var>locus</var> argument is either a gdb.Objfile, in which case
the printer is registered with that objfile; a gdb.Progspace,
in which case the printer is registered with that progspace; or
None, in which case the printer is registered globally.

TypePrinter
This is a base class that implements the type printer protocol.  Type
printers are encouraged, but not required, to derive from this class.
It defines a constructor:

— Method on TypePrinter: __init__ (<var>self, name</var>)<var></var>

Initialize the type printer with the given name.  The new printer
starts in the enabled state.


text:
using namespace std;
using namespace cv;

int main(int argc, char** argv) {
#ifdef USE_MPI
  MPI_Init(&argc, &argv);
#endif
  const char *keys =
          "{ board          b || GPU board(s): 0 or 012, etc. }"
          "{ model          m || Model pbtxt file }"
          "{ feature-config f || Feature extraction pbtxt file }";
  CommandLineParser parser(argc, argv, keys);
  string board(parser.get<string>("board"));
  string model_file(parser.get<string>("model"));
  string fe_file(parser.get<string>("feature-config"));
  if (board.empty() || model_file.empty() || fe_file.empty()) {
    parser.printMessage();
    return 1;
  }

  vector<int> boards;
  ParseBoardIds(board, boards);
  bool multi_gpu = boards.size() > 1;

  // Setup GPU boards.
  if (multi_gpu) {
    Matrix::SetupCUDADevices(boards);
  } else {
    Matrix::SetupCUDADevice(boards[0]);
  }
  for (const int &b : boards) {
    cout << "Using board " << b << endl;
  }

  ConvNet *net = multi_gpu ? new MultiGPUConvNet(model_file) :
                             new ConvNet(model_file);
  net->ExtractFeatures(fe_file);
  delete net;
#ifdef USE_MPI
  MPI_Finalize();
#endif
  return 0;
}


text:
export const PageController = ['$scope', 'auth', '$state', '$location', '$window', '$rootScope', function($scope, auth, $state, $location, $window, $rootScope) {
	$rootScope.pageTitle = "Login";
	// Hide search on Login page
	$scope.globalFlags.noSearch = true;

	// Make sure the internal user object is up-to-date
	auth.updateUser().then(function(_user){
		// We will only do this bit if the user is already logged in.
		let target = $location.search().target;
		if (target) {
			$window.location.href = target;
		} else {
			$state.go('home');
		}
	});

	$scope.submitForm = function(provider) {
		let target = $location.search().target;
		auth.loginRedirect(provider, target);
	}
}];