text:
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
 * @type {Cypress.PluginConfig}
 */
module.exports = (on, config) => {
  // `on` is used to hook into various events Cypress emits
  // `config` is the resolved Cypress config

  return Object.assign({}, config, {
    baseUrl: 'http://localhost:3000',
    fixturesFolder: 'tests/e2e/fixtures',
    integrationFolder: 'tests/e2e/specs',
    screenshotsFolder: 'tests/e2e/screenshots',
    videosFolder: 'tests/e2e/videos',
    supportFile: 'tests/e2e/support/index.js',
    video: false,
  })
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed><tipo>Rua</tipo><logradouro>Cuiabá</logradouro><bairro>Ciro Nardi</bairro><cidade>Cascavel</cidade><uf>PR</uf><cep>85802030</cep></feed>

redpajama_set_name: RedPajamaGithub


text:
![Databackup Object Model](databackup-model.png)

The Databackup model is comprised by a Databackup object that contains a list of DataItem. Each DataItem is a data value handled by the Storage Manager.


text:
title: ''
layout: default
---

### ruby gems

[profile](https://rubygems.org/profiles/schneidmaster)

---

#### eqn

[eqn](https://rubygems.org/gems/eqn) is a Ruby gem to allow safe evaluation of mathematical equations, respecting order of operations and supporting limited functions. Written using the Treetop parser generator to ensure consistent adherence to the equation grammar. [Open source](https://github.com/schneidmaster/eqn).

---

#### calculated_attributes

[calculated_attributes](https://rubygems.org/gems/calculated_attributes) is a Ruby gem to allow for addition of custom attributes such as relation counts to ActiveRecord queries, which allows avoidance of n+1 queries and similar performance problems even on complex relations. [Open source](https://github.com/aha-app/calculated_attributes).

---


text: {{message}}


text:
class ChefServerSlice::Main < ChefServerSlice::Application

  def index
    render
  end

end


text:
import json
import os

from plumbum.cmd import exiftool

import ddict

def invoke_exiftool(filelist):
    return exiftool(
        '-n', '-j',
        '-GPSDateTime',
        '-GPSAltitude',
        '-GPSLatitude',
        '-GPSLongitude',
        '-GPSSpeed',
        '-GPSStatus',
        '-GPSTrack',
        '-GPSMeasureMode',
        '-DateTimeOriginal',
        '-ShotNumberSincePowerUp',
        *filelist)

def fetchdata(filelist):
    'return list of lists of images per directory specified in assumed-sorted filelist'
    imagelist = [ddict.ddict(x)
                 for x in json.loads(invoke_exiftool(filelist))]
    imagedata = []
    currentslice = []
    last = imagelist[0]
    for image in imagelist:
        thisDir = os.path.dirname(image.SourceFile)
        if not currentslice:
            currentslice.append(image)
        else:
            if lastDir == thisDir:
                currentslice.append(image)
            else:
                imagedata.append(currentslice)
                currentslice = [image]
        lastDir = thisDir
    imagedata.append(currentslice)
    return imagedata


text:
// Copyright 2020 Google LLC
//
// 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.

// This file is defined in the YetiCommon assembly as a workaround while it needs to be referenced
// by both YetiVSI and VSFake. It should be moved back to YetiVSI when possible (see (internal)).

using System.Threading.Tasks;

namespace YetiVSI.ProjectSystem.Abstractions
{
    /// <summary>
    /// Specifies under what conditions to deploy executable on launch.
    /// </summary>
    public enum DeployOnLaunchSetting
    {
        /// <summary>
        /// Deploy the executable delta.
        /// </summary>
        DELTA,
        /// <summary>
        /// Never deploy the executable.
        /// </summary>
        FALSE,
        /// <summary>
        /// Always deploy the executable.
        /// </summary>
        ALWAYS
    }

    /// <summary>
    /// Specifies endpoint to be used on launch.
    /// </summary>
    public enum StadiaEndpoint
    {
        /// <summary>
        /// Test Client.
        /// </summary>
        TestClient,
        /// <summary>
        /// Player endpoint.
        /// </summary>
        PlayerEndpoint,
        /// <summary>
        /// The launch can be picked up on any endpoint.
        /// </summary>
        AnyEndpoint
    }

    public enum GgpSurfaceEnforcementMode
    {
        /// <summary>
        /// Explicitly turn off the surface enforcement on this run of game.
        /// Use for development.
        /// </summary>
        Off,
        /// <summary>
        /// Explicitly allow, but warn against surface violation to partners.
        /// Use for development.
        /// </summary>
        Warn,
        /// <summary>
        /// Explicitly deny, and warn against surface violation to partners.
        /// Use as a dry run for certification.
        /// </summary>
        Block
    }

    /// <summary>
    /// Describes a Stadia Visual Studio project.
    /// </summary>
    public interface IAsyncProject
    {
        /// <summary>
        /// Get the full path to the project's directory.
        /// </summary>
        Task<string> GetAbsoluteRootPathAsync();

        /// <summary>
        /// Get user-specified project output directory.
        /// </summary>
        Task<string> GetOutputDirectoryAsync();

        /// <summary>
        /// Get full local path to the target executable's directory.
        /// </summary>
        Task<string> GetTargetDirectoryAsync();

        /// <summary>
        /// Get path to the Yeti SDK tools bin directory.
        /// </summary>
        Task<string> GetExecutablePathAsync();

        /// <summary>
        /// Get path used when launching the game binary.
        /// </summary>
        Task<string> GetGameletLaunchExecutableAsync();

        /// <summary>
        /// Get arguments to pass to the game binary.
        /// </summary>
        Task<string> GetGameletLaunchArgumentsAsync();

        /// <summary>
        /// Get environment variables to set when launching the game binary.
        /// </summary>
        Task<string> GetGameletEnvironmentVariablesAsync();

        /// <summary>
        /// Get full local path to the target executable.
        /// </summary>
        Task<string> GetTargetPathAsync();

        /// <summary>
        /// Get file name of the target executable.
        /// </summary>
        Task<string> GetTargetFileNameAsync();

        /// <summary>
        /// Get user-specified project ID or Name.
        /// </summary>
        Task<string> GetApplicationAsync();

        /// <summary>
        /// Get true when the exe should be deployed on launch.
        /// </summary>
        Task<DeployOnLaunchSetting> GetDeployOnLaunchAsync();

        /// <summary>
        /// Get instance surface enforcement mode (off/warn/block).
        /// </summary>
        Task<GgpSurfaceEnforcementMode> GetSurfaceEnforcementAsync();

        /// <summary>
        /// Get custom command to deploy on launch.
        /// </summary>
        Task<string> GetCustomDeployOnLaunchAsync();

        /// <summary>
        /// Get true when the game should be launched with RenderDoc.
        /// </summary>
        Task<bool> GetLaunchRenderDocAsync();

        /// <summary>
        /// Get true when the game should be launched with RGP.
        /// </summary>
        Task<bool> GetLaunchRgpAsync();

        /// <summary>
        /// Get true when the game should be launched with RGP.
        /// </summary>
        Task<bool> GetLaunchDiveAsync();

        /// <summary>
        /// Get true when the game should be launched with Orbit.
        /// </summary>
        Task<bool> GetLaunchOrbitAsync();

        /// <summary>
        /// Get Vulkan driver variant to load on launch.
        /// </summary>
        Task<string> GetVulkanDriverVariantAsync();

        /// <summary>
        /// Get test account ID to use when launching.
        /// </summary>
        Task<string> GetTestAccountAsync();

        /// <summary>
        /// Get test account ID to use when launching.
        /// </summary>
        Task<string> GetExternalIdAsync();

        /// <summary>
        /// Get endpoint to be used when launching.
        /// </summary>
        Task<StadiaEndpoint> GetEndpointAsync();

        /// <summary>
        /// Get the query parameters to be appended to the URL when launching the chrome client
        /// or test client.
        /// </summary>
        Task<string> GetQueryParamsAsync();

        /// <summary>
        /// Get raw 'Deploy executable on launch' property value.
        /// </summary>
        Task<string> GetDeployExecutableOnLaunchRawAsync();

        /// <summary>
        /// Returns whether Orbit's Vulkan layer should be deployed at launch.
        /// </summary>
        bool GetDeployOrbitVulkanLayerOnLaunch();

        /// <summary>
        /// Get raw 'Stadia instance surface enforcement' property value.
        /// </summary>
        Task<string> GetSurfaceEnforcementModeRawAsync();

        /// <summary>
        /// Get raw 'Launch with RenderDoc' property value.
        /// </summary>
        Task<string> GetLaunchWithRenderDocRawAsync();

        /// <summary>
        /// Get raw 'Launch with RGP' property value.
        /// </summary>
        Task<string> GetLaunchWithRgpRawAsync();

        /// <summary>
        /// Get raw 'Vulkan driver variant' property value.
        /// </summary>
        Task<string> GetVulkanDriverVariantRawAsync();

        /// <summary>
        /// Get raw 'Stadia Endpoint' property value.
        /// </summary>
        Task<string> GetStadiaEndpointRawAsync();
    }
}


text:
import React from 'react';
import SiteNav from '../components/SiteNav';
import SiteFooter from '../components/SiteFooter';

import '../css/main.css';

const FAQ = () => {
    return (

Wild Rydes

Frequently Asked Questions

          <SiteNav/>

Q: Why should I use this app?

A: Unicorns are faster, safer, and more reliable. In recent times, their numbers have grown significantly, reaching a scale that makes it finally possible to harness them for mass transportation at an affordable cost.

Q: How do you recruit the unicorns? How can I know that my unicorn is trustworthy?

A: Our unicorns are recruited from only the most humane and highest standard unicorn farms. Our unicorns are grass-fed, free range creatures raised on vegan, non-GMO diets. These unicorns are also completely safe because unicorns have infallible morality and judgment.

Q: How do I request a unicorn?

A: Simply download our app, then tap a button to begin. Your unicorn will arrive shortly.

Q: How much does it cost?

A: Since Wild Rydes is a marketplace for flight-based transportation, the price you pay is based on factors such as distance and availability of unicorns. You set the maximum price you're willing to pay for a given ryde and then Wild Rydes matches you with a unicorn that's willing to accept your price.

Q: How does it work?

A: Our product is powered by a complex algorithm which efficiently matches idle unicorns with ryders based on factors such as proximity and shortest time-to-destination. The system is built on a serverless architecture, which makes running and scaling our backend services simple and cost-effective, allowing us to reliably serve the needs of Wild Rydes' ever growing user base.

Q: What if I have a complaint about my unicorn?

A: Wild Rydes is a customer obsessed company. We value each customer and want to ensure a positive experience. Therefore, we've staffed our customer service team with serverless chatbots that are available 24/7 to assist you.

Q: How do I cancel my ride?

A: Tap the "Cancel Ryde" button in the Wild Rydes app.

Q: Can I use Wild Rydes internationally?

A: Yes, you can use Wild Rydes in most countries except for Antarctica, Cuba, Sudan, Iran, North Korea, Syria and any other country designated by the United States Treasury's Office of Foreign Assets Control.

Q: How do I pay for my ryde?

A: After creating a Wild Rydes account, fill in your payment method such as credit card, debit card, Bitcoin wallet, or Vespene gas repository. After you complete your Ryde, you will automatically be charged the fare.

Q: How many passengers can my unicorn take?

A: The number of passengers on a single ryde depends on the size of your unicorn. Most unicorns can take one passenger per ryde. You can also request a large size unicorn which can take up to two passengers. If you select Sleigh version, you can take up to 4 passengers.

Q: What if I lose an item during my ryde?

A: Unfortunately, it's unlikely we can retrieve your lost item if it has fallen off the unicorn during your ryde.

Q: How do I share my route information with someone else?

A: During your ryde, you can share your route and ETA with someone else using the Wild Rydes app. Simply tap the "Share Route" button and select a contact. Soon, they'll be able to watch the status of your ryde.

Q: How do I rate my unicorn?

A: After your ryde completes, you have the option to rate your unicorn on the app. Our unicorns are customer obsessed and strive for 5 star ratings. Your feedback helps us improve our service!

Q: What if my unicorn doesn't match the photo in the app?

A: The unicorn photo in your app should match the unicorn that arrives to pick you up. If they do not match, then Wild Rydes recommends that you do not board the unicorn. You should then immediately report the imposter unicorn to Wild Rydes.

Q: Can I use Concur with Wild Rydes?

A: Yes, you can connect your Concur profile to the Wild Rydes app so you can track business trips made on Wild Rydes.

Q: Can I request a specific unicorn?

A: While we do not allow requesting specific unicorns, you can choose the type and size of unicorn using the app.

Q: Why do you charge a service fee?

A: The service fee is a fixed charge added to every ryde. This helps us pay for our on-going maintenance and operating costs required to run the service and tend to our unicorn herd.

      <SiteFooter/>

    );
};

export default FAQ;


text:
<?xml encoding="utf-8" ?>
<Window Name="window" AllowsTransparency="True" Title="解压缩文件" ResizeMode="CanResize" WindowStyle="ThreeDBorderWindow"
        CaptionHeight="20" Width="835" Height="530" MinWidth="600" MinHeight="380" Foreground="White" Icon="{DynamicResource MainIcon}"
        Background="{DynamicResource WindowBackground}" BorderThickness="12" BorderBrush="#00FFFFFF" >

    <Window.Resources>

        <sys:RectF x:Key="comboBoxCornerRadius">0</sys:RectF>

        <ImageBrush x:Key="UpArrow" ImageSource="lpZip/Images/arrow.png" Viewbox="0,0,21,21" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="DownArrow" ImageSource="lpZip/Images/arrow.png" Viewbox="21,0,21,21" ViewboxUnits="Absolute" />

        <!--定义菜单图标-->
        <Bitmap x:Key="AboutIcon" Source="lpZip/Images/Menu/001.png" />
        <Bitmap x:Key="ExitIcon" Source="lpZip/Images/Menu/002.png" />

        <Bitmap x:Key="Icon003" Source="lpZip/Images/Menu/003.png" />
        <Bitmap x:Key="Icon004" Source="lpZip/Images/Menu/004.png" />
        <Bitmap x:Key="Icon005" Source="lpZip/Images/Menu/005.png" />

        <!--添加图标-->
        <ImageBrush x:Key="AddToBrushNormal" ImageSource="lpZip/Images/addto.png" Viewbox="0,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="AddToBrushHot" ImageSource="lpZip/Images/addto.png" Viewbox="79,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="AddToBrushPress" ImageSource="lpZip/Images/addto.png" Viewbox="158,0,79,79" ViewboxUnits="Absolute" />

        <!--解压到图标-->
        <ImageBrush x:Key="ZipToBrushNormal" ImageSource="lpZip/Images/zipto.png" Viewbox="0,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="ZipToBrushHot" ImageSource="lpZip/Images/zipto.png" Viewbox="79,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="ZipToBrushPress" ImageSource="lpZip/Images/zipto.png" Viewbox="158,0,79,79" ViewboxUnits="Absolute" />

        <!--一键解压到图标-->
        <ImageBrush x:Key="OneZipToBrushNormal" ImageSource="lpZip/Images/onekeyzip.png" Viewbox="0,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="OneZipToBrushHot" ImageSource="lpZip/Images/onekeyzip.png" Viewbox="79,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="OneZipToBrushPress" ImageSource="lpZip/Images/onekeyzip.png" Viewbox="158,0,79,79" ViewboxUnits="Absolute" />

        <!--删除图标-->
        <ImageBrush x:Key="DeleteBrushNormal" ImageSource="lpZip/Images/delete.png" Viewbox="0,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="DeleteBrushHot" ImageSource="lpZip/Images/delete.png" Viewbox="79,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="DeleteBrushPress" ImageSource="lpZip/Images/delete.png" Viewbox="158,0,79,79" ViewboxUnits="Absolute" />

        <!--密码图标-->
        <ImageBrush x:Key="PasswordBrushNormal" ImageSource="lpZip/Images/password.png" Viewbox="0,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="PasswordBrushHot" ImageSource="lpZip/Images/password.png" Viewbox="79,0,79,79" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="PasswordBrushPress" ImageSource="lpZip/Images/password.png" Viewbox="158,0,79,79" ViewboxUnits="Absolute" />

        <ImageBrush x:Key="OneBrushNormal" ImageSource="lpZip/Images/01.png" Viewbox="0,0,16,16" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="OneBrushHot" ImageSource="lpZip/Images/01.png" Viewbox="16,0,16,16" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="OneBrushPress" ImageSource="lpZip/Images/01.png" Viewbox="32,0,16,16" ViewboxUnits="Absolute" />

        <ImageBrush x:Key="TwoBrushNormal" ImageSource="lpZip/Images/02.png" Viewbox="0,0,16,16" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="TwoBrushHot" ImageSource="lpZip/Images/02.png" Viewbox="16,0,16,16" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="TwoBrushPress" ImageSource="lpZip/Images/02.png" Viewbox="32,0,16,16" ViewboxUnits="Absolute" />

        <ImageBrush x:Key="ThreeBrushNormal" ImageSource="lpZip/Images/03.png" Viewbox="0,0,16,16" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="ThreeBrushHot" ImageSource="lpZip/Images/03.png" Viewbox="16,0,16,16" ViewboxUnits="Absolute" />
        <ImageBrush x:Key="ThreeBrushPress" ImageSource="lpZip/Images/03.png" Viewbox="32,0,16,16" ViewboxUnits="Absolute" />

        <ControlTemplate x:Key="ListBoxItemTemplate" TargetType="ListBoxItem">
            <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" >
                <ContentPresenter />
            </Border>
        </ControlTemplate>

        <DataTemplate x:Key="lvColumnTemplate" TargetType="GridViewColumn">
            <Grid Cursor="Hand">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                    <Rectangle Name="imgIcon" Margin="0,0,0,0" Width="21" Height="21" Visibility="Collapsed" VerticalAlignment="Center" />
                    <TextBlock Text="{Binding}" VerticalAlignment="Center" />
                </StackPanel>
            </Grid>
        </DataTemplate>

        <Style TargetType="Button" x:Key="ButtonStyle" >
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Name="btnCnt" Background="{TemplateBinding Tag1}" >
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,4" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="Background" TargetName="btnCnt" Value="{TemplateBinding Tag3}" />
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Background" TargetName="btnCnt" Value="{TemplateBinding Tag2}" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>

    <Grid Name="RootGrid" Margin="0">
        <DockPanel Height="112" Background="{DynamicResource TitleBackground}" VerticalAlignment="Top" >
            <DockPanel Height="32" DockPanel.Dock="Top" Margin="4,0,0,0" VerticalAlignment="Bottom">
                <StackPanel Orientation="Horizontal" >
                    <Image Width="16" Height="16" Margin="0,0,4,0" Source="{DynamicResource TitleIcon}" />
                    <TextBlock Text="{Binding Title,RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}, AncestorLevel=1}}"
                           Foreground="White" VerticalAlignment="Center"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" FlowDirection="RightToLeft">
                    <CloseButton ToolTip="关闭" Width="29" Height="32" VerticalAlignment="Top" />
                    <MaximizeButton Focusable="False" Width="29" Height="32" VerticalAlignment="Top" />
                    <MinimizeButton ToolTip="最小化" Focusable="False" Width="29" Height="32" VerticalAlignment="Top" />

                    <Menu Name="mainMenu" Margin="0,3,2,0" Height="25" VerticalAlignment="Center" Focusable="False" >
                        <MenuItem Header="文件" MinWidth="60">
                            <MenuItem Name="miUnzip" Header="解压" Icon="{DynamicResource AboutIcon}"  />
                            <Separator />
                            <MenuItem Name="miExit" Header="退出" Icon="{DynamicResource ExitIcon}"  />
                        </MenuItem>
                        <MenuItem Header="操作" MinWidth="60" >
                            <MenuItem Header="解压到" Icon="{DynamicResource Icon004}" />
                            <MenuItem Header="一键解压缩" Icon="{DynamicResource Icon003}" />
                            <MenuItem Header="视图" >
                                <MenuItem Header="小图标" />
                                <MenuItem Header="大图标" />
                                <MenuItem Header="详细列表" />
                            </MenuItem>
                        </MenuItem>
                        <MenuItem Header="工具" MinWidth="60" >
                            <MenuItem Header="打开记事本" Icon="{DynamicResource Icon005}" />
                        </MenuItem>
                        <MenuItem Header="帮助" MinWidth="60" >
                            <MenuItem Header="关于" Icon="{DynamicResource AboutIcon}" />
                        </MenuItem>
                    </Menu>
                </StackPanel>
            </DockPanel>
            <StackPanel Orientation="Horizontal" Margin="22,0,0,0" VerticalAlignment="Center" >
                <Button Name="btnAddTo" Width="79" Height="79" Click="OnClickAddToButton"
                        ToolTip="添加"
                        Content="添加" Margin="0,0,8,0"
                        Tag1="{DynamicResource AddToBrushNormal}"
                        Tag2="{DynamicResource AddToBrushHot}"
                        Tag3="{DynamicResource AddToBrushPress}"
                        Style="{DynamicResource ButtonStyle}" />

                <Button Name="btnUnzipTo" Width="79" Height="79" Click="OnClickUnzipButton"
                        Content="解压到" Margin="0,0,8,0"
                        Tag1="{DynamicResource ZipToBrushNormal}"
                        Tag2="{DynamicResource ZipToBrushHot}"
                        Tag3="{DynamicResource ZipToBrushPress}"
                        Style="{DynamicResource ButtonStyle}" />

                <Button Name="btnOneUnzipTo" Width="79" Height="79" Click="OnClickOnOneUnzipButton"
                        Content="一键解压" Margin="0,0,8,0"
                        Tag1="{DynamicResource OneZipToBrushNormal}"
                        Tag2="{DynamicResource OneZipToBrushHot}"
                        Tag3="{DynamicResource OneZipToBrushPress}"
                        Style="{DynamicResource ButtonStyle}" />

                <Button Name="btnDelete" Width="79" Height="79" Click="OnClickDeleteButton"
                        Content="删除" Margin="0,0,8,0"
                        Tag1="{DynamicResource DeleteBrushNormal}"
                        Tag2="{DynamicResource DeleteBrushHot}"
                        Tag3="{DynamicResource DeleteBrushPress}"
                        Style="{DynamicResource ButtonStyle}" />

                <Button Name="btnPwd" Width="79" Height="79" Click="OnClickPwdButton"
                        Content="密码" Margin="0,0,8,0"
                        Tag1="{DynamicResource PasswordBrushNormal}"
                        Tag2="{DynamicResource PasswordBrushHot}"
                        Tag3="{DynamicResource PasswordBrushPress}"
                        Style="{DynamicResource ButtonStyle}" />

            </StackPanel>
        </DockPanel>
        <DockPanel Margin="0,112,0,0">
            <DockPanel DockPanel.Dock="Top" Height="32">
                <Button Name="btnUpLevel" Width="16" Height="16" Click="OnClickUpLevelButton"
                        VerticalAlignment="Center" Margin="6,0,6,0"
                        Tag1="{DynamicResource TwoBrushNormal}"
                        Tag2="{DynamicResource TwoBrushHot}"
                        Tag3="{DynamicResource TwoBrushPress}"
                        Style="{DynamicResource ButtonStyle}" />
                <Button Name="btnIconMode" Width="16" Height="16" Click="OnClickIconModeButton"
                        ToolTip="图标模式"
                        VerticalAlignment="Center" Margin="6,0,6,0"
                        Tag1="{DynamicResource OneBrushNormal}"
                        Tag2="{DynamicResource OneBrushHot}"
                        Tag3="{DynamicResource OneBrushPress}"
                        Style="{DynamicResource ButtonStyle}" />
                <Button Name="btnListMode" Width="16" Height="16" Click="OnClickListModeButton"
                        ToolTip="详细列表"
                        VerticalAlignment="Center" Margin="6,0,6,0"
                        Tag1="{DynamicResource ThreeBrushNormal}"
                        Tag2="{DynamicResource ThreeBrushHot}"
                        Tag3="{DynamicResource ThreeBrushPress}"
                        Style="{DynamicResource ButtonStyle}" />
                <ComboBox Name="cmbPath" Height="24" Margin="6,0,6,0" VerticalAlignment="Center" />
            </DockPanel>
            <Grid Background="#D5E3EF" DockPanel.Dock="Top" Height="1" />

            <DockPanel DockPanel.Dock="Bottom" Height="32" Background="{DynamicResource StatusBackground}">
                <Grid Background="#D5E3EF" Height="1" DockPanel.Dock="Top" />
                <StackPanel Orientation="Horizontal" Margin="8,0,0,0" VerticalAlignment="Center" >
                    <TextBlock  Foreground="#000000" Text="类型:" />
                    <TextBlock  Foreground="#000000" Text="{Binding Path=ZipType}" />
                    <TextBlock  Foreground="#000000" Text=",解压后大小:" />
                    <TextBlock  Foreground="#000000" Text="{Binding Path=ZipSize}" />
                    <TextBlock  Foreground="#000000" Text=",压缩比:" />
                    <TextBlock  Foreground="#000000" Text="{Binding Path=ZipRate}" />
                    <TextBlock  Foreground="#000000" Text="%" />
                </StackPanel>
                <Grid Margin="0,0,8,0" >
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
                        <TextBlock VerticalAlignment="Center" Foreground="#000000" Text="总计 " />
                        <TextBlock VerticalAlignment="Center" Foreground="#000000" Text="{Binding Path=FileCount}" />
                        <TextBlock VerticalAlignment="Center" Foreground="#000000" Text=" 个文件" />
                        <TextBlock VerticalAlignment="Center" Foreground="#000000" Text="{Binding Path=FileSize}" />
                    </StackPanel>
                </Grid>
            </DockPanel>

            <DockPanel>
                <DockPanel Name="layLeft" Width="180" Background="#EEEFEFEF" >
                    <TextBlock1 DockPanel.Dock="Top" Height="20" Margin="4,5,2,2" Foreground="Black" Text="文件信息" />
                    <TreeView Name="tvDrivers" Foreground="#333333" Margin="2" BorderThickness="0" ItemsSource="{Binding Path=DriverItems}" />
                </DockPanel>
                <Grid>
                    <ZipListView Name="lvZip" BorderThickness="0" Foreground="Black" Visibility="Collapsed" >
                        <ZipListView.View>
                            <GridView>
                                <GridViewColumn Width="220" HeaderTemplate="{DynamicResource lvColumnTemplate}" Header="名称" >
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <Image Name="imgIcon" />
                                                <TextBlock Text="{Binding Path=Name}" HorizontalAlignment="Center" Foreground="Red" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                                <GridViewColumn Width="80" Header="压缩前" >
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <TextBlock Text="{Binding Path=ZipBefore}" HorizontalAlignment="Center" Foreground="Black" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                                <GridViewColumn Width="80" Header="压缩后" >
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <TextBlock Text="{Binding Path=ZipAfter}" HorizontalAlignment="Center" Foreground="Black" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                                <GridViewColumn Width="160" HeaderTemplate="{DynamicResource lvColumnTemplate}" Header="类型" >
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                               <TextBlock Text="{Binding Path=ZipType}" HorizontalAlignment="Center" Foreground="Black" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                                <GridViewColumn Width="150" Header="修改日期" >
                                    <GridViewColumn.CellTemplate>
                                        <DataTemplate>
                                            <DockPanel>
                                                <TextBlock Text="{Binding Path=Date}" HorizontalAlignment="Center" Foreground="Black" />
                                            </DockPanel>
                                        </DataTemplate>
                                    </GridViewColumn.CellTemplate>
                                </GridViewColumn>
                            </GridView>
                        </ZipListView.View>
                    </ZipListView>
                    <ListBox Name="lbElem" Foreground="Black" BorderThickness="0,0,0,0" >
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate TargetType="ListView">
                                <VirtualizingWrapPanel />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <DockPanel Margin="2">
                                    <TextBlock Text="{Binding Path=Name}" Margin="2,6,2,2" HorizontalAlignment="Center" DockPanel.Dock="Bottom" />
                                    <Image Source="{Binding Path=Icon}" Margin="5,4,5,8" />
                                </DockPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </DockPanel>
        </DockPanel>
        <ResizeGrip Width="16" Height="16" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
    </Grid>
</Window>


text:
@class HKGetPhotoViewController;

@interface HKAppDelegate : UIResponder <UIApplicationDelegate> {
    HKGetPhotoViewController* controller;
}

@property (strong, nonatomic) UIWindow *window;

@end


text:
Imports System.Drawing
Imports System.ComponentModel

Public Class CoolLabel
    Private textco As Color = Color.FromArgb(45, 45, 45)
    Private hoverco As Color = Color.SteelBlue
    Private clickco As Color = Color.SkyBlue
    Private txt As String = "Cool Label"
    Private fnt As Font = New Font("segoe UI", 12)
    <Category("Colors")>
    Property TextColor As Color
        Get
            Return textco
        End Get
        Set(ByVal value As Color)
            textco = value
            Invalidate()
            Update()
        End Set
    End Property

    Property Caption As String
        Get
            Return txt
        End Get
        Set(ByVal value As String)
            txt = value
            Label1.Text = txt
            Invalidate()
            Update()
        End Set
    End Property

    Property FontFamily As Font
        Get
            Return fnt
        End Get
        Set(ByVal value As Font)
            fnt = value
            Label1.Font = fnt
            Invalidate()
            Update()
        End Set
    End Property

    Property Hover As Color
        Get
            Return hoverco
        End Get
        Set(ByVal value As Color)
            hoverco = value
            Invalidate()
            Update()
        End Set
    End Property

    Property ClickColor As Color
        Get
            Return clickco
        End Get
        Set(ByVal value As Color)
            clickco = value
            Invalidate()
            Update()
        End Set
    End Property

    Private Sub CoolLabel_Invalidated(ByVal sender As Object, ByVal e As System.Windows.Forms.InvalidateEventArgs) Handles Me.Invalidated
        Label1.Text = Caption
        Label1.Font = fnt
    End Sub

    Private Sub CoolLabel_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label1.Text = Caption
        Label1.Font = fnt
    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub

    Private Sub Label1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseClick
        Label1.ForeColor = clickco
        Label1.Cursor = Windows.Forms.Cursors.Hand
    End Sub

    Private Sub Label1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseHover
        Label1.ForeColor = hoverco
        Label1.Cursor = Windows.Forms.Cursors.Hand
    End Sub

    Private Sub Label1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseLeave
        Label1.ForeColor = textco
    End Sub
End Class


text:
/**
 * @author froog
 */

var $j = jQuery;
var Simplify = {};

$j(function() {

Simplify = {

	SimplifyHtmlReset : function() {
		$j('.simplifyHtmlDefaults').click(function() {
			$j('#Form_EditForm_HTMLEditorLine1')[0].value = $j(".default1")[0].innerHTML;
			$j('#Form_EditForm_HTMLEditorLine2')[0].value = $j(".default2")[0].innerHTML;
			$j('#Form_EditForm_HTMLEditorLine3')[0].value = $j(".default3")[0].innerHTML;
		});
	},

	//Bind select/deselect buttons on page creation tab
	PageCreationBind : function() {
		$j('.simplifyPageCreationAll').live("click", function(e) {
			$j(this).parent().find('.checkbox input').each(function(obj){
				//toggle server side perm if it was unset
				if (!$j(this).attr('checked')) {
					Simplify.PermissionToggle(this);
				}
				$j(this).attr('checked', true);
			});
			e.preventDefault();
		});

		$j('.simplifyPageCreationNone').live("click", function(e) {
			$j(this).parent().find('.checkbox input').each(function(obj){
				//toggle server side perm if it was set
				if ($j(this).attr('checked')) {
					Simplify.PermissionToggle(this);
				}
				$j(this).attr('checked', false);
			});
			e.preventDefault();
		});
	},

	TreeActivatorHook : function() {
		$j('#TreeActivator input').click(function() {
			Simplify.TreeActivator();
		});
	} ,

	TreeActivator : function() {
			$j('#TreeActivator').addClass('tree-loading');

			//load the tree via AJAX
			$j('#TreeActivator').load(
				"SimplifyAction/drawTree/" + $j('.simplifyGroupCode').val(),
				"",
				function() {
					$j('#TreeActivator').removeClass('tree-loading');
                    $j('#TreeActivator').addClass('cms-tree jstree jstree-focused jstree-apple');

                    $j('#TreeActivator').jstree();

					//specific ver of the jsparty/tree/tree.js treeCloseAll func
					/*var candidates = $j('perm-tree').getElementsByTagName('li');
	    			for (var i=0;i<candidates.length;i++) {
	        			var aSpan = candidates[i].childNodes[0];
	        			if(aSpan.childNodes[0] && aSpan.childNodes[0].className == "b") {
	           				if (!aSpan.className.match(/spanClosed/) && candidates[i].id != 'record-0' ) {
	               				aSpan.childNodes[0].onclick();
	           				}
	        			}
	    			}*/

					// add toggle perm handling code
					$j('#Root_Simplify_set #TreeActivator a').click(function(){
						//this.rel holds the Page|Name|Group code for each Field permission
						//Do a simple AJAX get call to toggle it..
						$j.get(
							"SimplifyAction/toggleFieldPermission/" + this.rel
						);
					});

				}
			);
			return false;
	},

	PermissionToggle : function(obj) {
		//Ensure std perm is toggled
		var stdPerm = $j("input[value='" + obj.name + "']");
		stdPerm.attr('checked', !stdPerm.attr('checked'));
	}
}

/*
 * TODO: Done this via simple old school onclick because bad mix of jQuery & Prototype makes
 * event handling a pain. Refactor when CMS JS is improved.
 *
	//Apply the hook to load the Simplify Field tree
	Simplify.TreeActivatorHook();

	//Reapply the hook if another group is picked in the main tree
	$j("#sitetree .Group").click(function() {
		Simplify.TreeActivatorHook();
	});
*/

Simplify.SimplifyHtmlReset();
Simplify.PageCreationBind();

})


text:
# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../dummy/config/environment.rb",  __FILE__)
require "rails/test_help"

# minitest setup
require 'active_support/testing/setup_and_teardown'
require 'action_controller/test_case'
require 'capybara/rails'
require 'capybara_minitest_spec'
require 'minitest/spec'
require 'minitest/autorun'
require 'minitest/reporters'
require 'factory_girl'
#adapt to the IDE environment if present
MiniTest::Unit.runner = MiniTest::SuiteRunner.new
if ENV["RM_INFO"] || ENV["TEAMCITY_VERSION"]
  MiniTest::Unit.runner.reporters << MiniTest::Reporters::RubyMineReporter.new
elsif ENV['TM_PID']
  MiniTest::Unit.runner.reporters << MiniTest::Reporters::RubyMateReporter.new
else
  MiniTest::Unit.runner.reporters << MiniTest::Reporters::ProgressReporter.new
end

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# Load fixtures from the engine
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
end

# TODO: Can't seem to get the following to work ....  ActionController::TestCase is impregnable
#
#  This is to get around having to specify engine with use_route => in controller methods
#
#module ControllerHacks
#        def get(action, parameters = nil, session = nil, flash = nil)
#          process_action(action, parameters, session, flash, "GET")
#        end
#
#        # Executes a request simulating POST HTTP method and set/volley the response
#        def post(action, parameters = nil, session = nil, flash = nil)
#          process_action(action, parameters, session, flash, "POST")
#        end
#
#        # Executes a request simulating PUT HTTP method and set/volley the response
#        def put(action, parameters = nil, session = nil, flash = nil)
#          process_action(action, parameters, session, flash, "PUT")
#        end
#
#        # Executes a request simulating DELETE HTTP method and set/volley the response
#        def delete(action, parameters = nil, session = nil, flash = nil)
#          process_action(action, parameters, session, flash, "DELETE")
#        end
#
#        private
#
#        def process_action(action, parameters = nil, session = nil, flash = nil, method = "GET")
#          parameters ||= {}
#          process(action, parameters.merge!(:use_route => :backfire_rails), session, flash, method)
#        end
#end

# suppress deprecation warnings coming from minispec by overriding method
module MiniTest::Assertions
  def assert_block msg = nil
    msg = message(msg) { "Expected block to return true value" }
    assert yield, msg
  end
end

class MiniTest::Spec
  include ActiveSupport::Testing::SetupAndTeardown
  include ActiveRecord::TestFixtures
  include ActiveSupport::Testing::Assertions

  alias :method_name :__name__ if defined? :__name__
  self.fixture_path = File.join( Rails.root, 'test', 'fixtures' )

# ActiveSupport wants this to be in there ...
  def build_message(*args)
    args[1].gsub(/\?/, '%s') % args[2..-1]
  end
end

class ControllerSpec < MiniTest::Spec
  include Rails.application.routes.url_helpers
  include ActionController::TestCase::Behavior

  class << self
    alias :context :describe
  end

  before do
    @routes = Rails.application.routes
  end

end

# Functional tests = describe ***Controller
MiniTest::Spec.register_spec_type( /Controller$/, ControllerSpec )

class IntegrationSpec < ControllerSpec
  include Capybara::DSL
end


text:
BOOST_AUTO_TEST_CASE(tcp_client_server)
{
    using namespace nx::tags;

    nx::timer deadline;
    nx::cond_var cv;

    deadline(5) = [&](nx::timer& t) {
        t.stop();
        cv.notify();
    };

    deadline.start();

    std::string msg("a message");

    std::atomic_bool got_new_connection{ false };
    std::atomic_bool got_msg{ false };

    auto endpoint = nx::serve<nx::tcp>(
        nx::make_endpoint_tcp("127.0.0.1", 0),
        [&](nx::tcp& t) {
            got_new_connection = true;
        },
        [&](nx::tcp& t) {
            std::string str;

            t >> str;

            got_msg = (str == msg);
            std::reverse(str.begin(), str.end());

            t << str;
            t.stop();
        }
    );

    std::atomic_bool connected{ false };
    std::atomic_bool got_reply{ false };
    std::atomic_bool got_correct_reply{ false };
    std::atomic_bool disconnected{ false };

    auto& c = nx::connect<nx::tcp>(
        endpoint,
        [&](nx::tcp& t) {
            connected = true;

            t[on_close] = [&](nx::tcp& t) {
                disconnected = true;
            };

            t << msg;
        }
    );

    c[on_read] = [&](nx::tcp& t) {
        got_reply = true;

        std::string str;
        t >> str;

        std::reverse(str.begin(), str.end());
        got_correct_reply = (str == msg);

        deadline.stop();
        cv.notify();
    };

    cv.wait();
    nx::stop();

    BOOST_CHECK_MESSAGE(got_new_connection, "server got a connection");
    BOOST_CHECK_MESSAGE(got_msg, "server got correct message");
    BOOST_CHECK_MESSAGE(connected, "client connected to server");
    BOOST_CHECK_MESSAGE(got_reply, "client got a reply");
    BOOST_CHECK_MESSAGE(got_correct_reply, "client got correct reply");
    BOOST_CHECK_MESSAGE(disconnected, "client was disconnected");
}


text:
package org.gdg.frisbee.android.about;

import android.content.res.Resources;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import org.gdg.frisbee.android.R;

class AboutPagerAdapter extends FragmentStatePagerAdapter {

    private final String[] pageTitles;

    AboutPagerAdapter(FragmentManager fm, Resources resources) {
        super(fm);
        pageTitles = resources.getStringArray(R.array.about_tabs);
    }

    @Override
    public int getItemPosition(Object object) {
        return POSITION_NONE;
    }

    @Override
    public int getCount() {
        return pageTitles.length;
    }

    @Override
    public Fragment getItem(int position) {
        switch (position) {
            case 0:
                return new AboutFragment();
            case 1:
                return new ContributorsFragment();
            case 2:
                return new TranslatorsFragment();
            case 3:
                return new ChangelogFragment();
            case 4:
                return new GetInvolvedFragment();
            case 5:
                return new ExtLibrariesFragment();
            default:
                throw new IllegalStateException("Unknown page in About Screen.");
        }
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return pageTitles[position];
    }
}


text:
.. rn:: 1.0.2-3

==================================
 |Percona Server| 1.0.2-3 Sapporo
==================================

Percona is glad to announce the release of |Percona Server| 1.0.2-3 on March 2nd, 2009.

  * Move to |MySQL| 5.1.31

  * Fixed :bug:`329290`: crash in insert/delete load.

  * Fixed :bug:`324734`: fails to build with |MySQL| using ``--with-debug``

  * More safe ``rw-lock``: fix :bug:`326445` - ``XtraDB hangs in 10 threads TPC-C bug``

  * Scalability fix -- replaced ``page_hash`` mutex to ``page_hash``, ``read-write`` lock

  * fixed :bug:`317074`: |InnoDB| compression hangs

  * Fix broken group commit]] in |InnoDB|, add new global variable to :ref:`innodb_io_page`: :variable:`enable_unsafe_group_commit`

  * Scalability fix -- ability to use :ref:`innodb_extra_rseg`

  * Fixed :bug:`316995`: crash when attempt to select from ``information_schema`` table

  * Fixed :bug:`316449` compilation warning

  * Fixed :bug:`317584`: failed assertion

  * Fixed :bug:`316982`: compilation failed with ``UNIV_DEBUG`` enabled

  * Changed parameter for control read ahead activity in :ref:`innodb_io_page` - now it accepts string values

  * Fixed compiler warnings on ``buf_blockt``

  * Changed parameter name from ``innodb_ibuf_positive_contract`` to :ref:`innodb_io_page`: ``innodb_ibuf_active_contract``.

  * Added parameter to control merging insert buffer to :ref:`innodb_io_page`: :variable:`innodb_ibuf_accel_rate`

  * Added parameter to control neighbor flushing to :ref:`innodb_io_page`: :variable:`innodb_flush_neighbor_pages`

  * Added parameters to restrict insert buffer size to :ref:`innodb_io_page`: :variable:`innodb_ibuf_max_size`, :variable:`innodb_ibuf_active_contract`

  * Stop ``adaptive_checkpoint`` flushing when exceeds ``LOG_POOL_PREFLUSH_RATIO_ASYNC``


text:
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>

<script>

test(function() {
  assert_equals(new PositionValue(new SimpleLength(50, 'px'),
    new CalcLength({px: -10, em: -3.2, pt: 0})).cssString, '50px calc((-3.2em - 10px) + 0pt)');
  assert_equals(new PositionValue(new SimpleLength(50, 'px'),
    new SimpleLength(2, 'em')).cssString, '50px 2em');
  assert_equals(new PositionValue(new CalcLength({px: -10, em: -3.2, pt: 0}),
    new CalcLength({px: -10, em: 3.2})).cssString, 'calc((-3.2em - 10px) + 0pt) calc(3.2em - 10px)');
  assert_equals(new PositionValue(new CalcLength({px: -10, em: -3.2, pt: 0}),
    new SimpleLength(10, 'percent')).cssString, 'calc((-3.2em - 10px) + 0pt) 10%');
}, "cssString returns a string with the x and y positions cssStrings separated by a space");

</script>

<body>
</body>


text:
(function (app) {
    app.service('ProjectItemResource', ['$resource', function ($resource) {
        return $resource('/api/project/:id/specificationItem',
                        {
                            'id': '@id'
                        });
    }]);

    app.service('CurrentProjectItemResource', ['$resource', function ($resource) {
        return $resource('/api/currentProject/specificationItem');
    }]);

})(angular.module(GSDRequirements.angularModuleName));


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Boost.Geometry (aka GGL, Generic Geometry Library)</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Examples

Class List

Class Index

Class Hierarchy

Class Members

boost

geometry

detail

turns

turn_printer

Public Member Functions |
Public Attributes |
List of all members

boost::geometry::detail::turns::turn_printer Struct Reference

Public Member Functions

template<typename Turn >

void 	operator() (Turn const &turn)

 	turn_printer (std::ostream &os)

Public Attributes

int 	index

std::ostream & 	out

Constructor & Destructor Documentation

          boost::geometry::detail::turns::turn_printer::turn_printer
          (
          std::ostream &
          os	)

Member Function Documentation

template<typename Turn >

          void boost::geometry::detail::turns::turn_printer::operator()
          (
          Turn const &
          turn	)

Member Data Documentation

          int boost::geometry::detail::turns::turn_printer::index

          std::ostream& boost::geometry::detail::turns::turn_printer::out

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands

Copyright © 2008-2011 Bruno Lalande, Paris, France

Copyright © 2009-2010 Mateusz Loskot, London, UK

<address style="text-align: right;">
Documentation is generated by Doxygen
</address>


text:
//
//  GTLDriveChildReference.m
//

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   Drive API (drive/v2)
// Description:
//   The API to interact with Drive.
// Documentation:
//   https://developers.google.com/drive/
// Classes:
//   GTLDriveChildReference (0 custom class methods, 4 custom properties)

#import "GTLDriveChildReference.h"

// ----------------------------------------------------------------------------
//
//   GTLDriveChildReference
//

@implementation GTLDriveChildReference
@dynamic childLink, identifier, kind, selfLink;

+ (NSDictionary *)propertyToJSONKeyMap {
  NSDictionary *map =
    [NSDictionary dictionaryWithObject:@"id"
                                forKey:@"identifier"];
  return map;
}

+ (void)load {
  [self registerObjectClassForKind:@"drive#childReference"];
}

@end


text:
package io.envoyproxy.envoymobile.engine;

import io.envoyproxy.envoymobile.engine.types.EnvoyNetworkType;

import android.Manifest;
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.ConnectivityManager.NetworkCallback;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.net.NetworkRequest;
import android.os.Build;
import androidx.annotation.VisibleForTesting;
import androidx.core.content.ContextCompat;

import java.util.Collections;

/**
 * This class makes use of some deprecated APIs, but it's only current purpose is to attempt to
 * distill some notion of a preferred network from the OS, upon which we can assume new sockets will
 * be opened.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public class AndroidNetworkMonitor extends BroadcastReceiver {
  private static final String PERMISSION_DENIED_STATS_ELEMENT =
      "android_permissions.network_state_denied";
  private static final int ENVOY_NET_GENERIC = 0;
  private static final int ENVOY_NET_WWAN = 1;
  private static final int ENVOY_NET_WLAN = 2;

  private static volatile AndroidNetworkMonitor instance = null;

  private int previousNetworkType = ConnectivityManager.TYPE_DUMMY;
  private EnvoyEngine envoyEngine;
  private ConnectivityManager connectivityManager;
  private NetworkCallback networkCallback;
  private NetworkRequest networkRequest;

  public static void load(Context context, EnvoyEngine envoyEngine) {
    if (instance != null) {
      return;
    }

    synchronized (AndroidNetworkMonitor.class) {
      if (instance != null) {
        return;
      }
      instance = new AndroidNetworkMonitor(context, envoyEngine);
    }
  }

  private AndroidNetworkMonitor(Context context, EnvoyEngine envoyEngine) {
    int permission =
        ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_NETWORK_STATE);
    if (permission == PackageManager.PERMISSION_DENIED) {
      try {
        envoyEngine.recordCounterInc(PERMISSION_DENIED_STATS_ELEMENT, Collections.emptyMap(), 1);
      } catch (Throwable t) {
        // no-op if this errors out and return
      }
      return;
    }

    this.envoyEngine = envoyEngine;

    connectivityManager =
        (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
    networkRequest = new NetworkRequest.Builder()
                         .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
                         .build();

    networkCallback = new NetworkCallback() {
      @Override
      public void onAvailable(Network network) {
        handleNetworkChange();
      }
      @Override
      public void onCapabilitiesChanged(Network network, NetworkCapabilities networkCapabilities) {
        handleNetworkChange();
      }
      @Override
      public void onLosing(Network network, int maxMsToLive) {
        handleNetworkChange();
      }
      @Override
      public void onLost(final Network network) {
        handleNetworkChange();
      }
    };

    try {
      connectivityManager.registerNetworkCallback(networkRequest, networkCallback);

      context.registerReceiver(this, new IntentFilter() {
        { addAction(ConnectivityManager.CONNECTIVITY_ACTION); }
      });
    } catch (Throwable t) {
      // no-op
    }
  }

  /** @returns The singleton instance of {@link AndroidNetworkMonitor}. */
  public static AndroidNetworkMonitor getInstance() {
    assert instance != null;
    return instance;
  }

  @Override
  public void onReceive(Context context, Intent intent) {
    handleNetworkChange();
  }

  /** @returns True if there is connectivity */
  public boolean isOnline() { return previousNetworkType != -1; }

  private void handleNetworkChange() {
    NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
    int networkType = networkInfo == null ? -1 : networkInfo.getType();
    if (networkType == previousNetworkType) {
      return;
    }
    previousNetworkType = networkType;

    switch (networkType) {
    case ConnectivityManager.TYPE_MOBILE:
      envoyEngine.setPreferredNetwork(EnvoyNetworkType.ENVOY_NETWORK_TYPE_WWAN);
      return;
    case ConnectivityManager.TYPE_WIFI:
      envoyEngine.setPreferredNetwork(EnvoyNetworkType.ENVOY_NETWORK_TYPE_WLAN);
      return;
    default:
      envoyEngine.setPreferredNetwork(EnvoyNetworkType.ENVOY_NETWORK_TYPE_GENERIC);
    }
  }

  /** Expose connectivityManager only for testing */
  @VisibleForTesting
  public ConnectivityManager getConnectivityManager() {
    return connectivityManager;
  }
}


text:
<?php

use Illuminate\Database\Seeder;
use ViKon\EveSDE\Models\Station\OperationService;
use ViKon\Utilities\ConsoleProgressbar;

class StaOperationServicesSeeder extends Seeder {
    use ConsoleProgressbar;

    protected $output;

    protected $structure = [
        0 => 'operation_id',
        1 => 'service_id',
    ];

    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run() {
        DB::table('sta_operation_services')->delete();

        $this->output = $this->command->getOutput();

        $this->initProgressbar();
        $this->startProgress('<info>Inserting data:</info> sta_operation_services');
        $this->setProgressMax(795);

        $data = include(__DIR__ . '/data/sta_operation_services_table_data.php');
        foreach ($data as $row) {
            $this->create($row);
        }
    }

    protected function create($values) {
        $data = [];
        foreach ($this->structure as $i => $key) {
            $data[$key] = $values[$i];
        }
        OperationService::create($data);
        $this->progress();
    }

}


text:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains
import time
import selenium
import win32api, win32con
from win32key import *
import sys
from utils import *

def click(x,y):
    win32api.SetCursorPos((x,y))
    win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0)
    win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0)
    # click(location['x'] + 25,1024-location['y'] + 45)
    # click(650,130)

def checkpostfacebook(email,password,profileID,siteID,title):
    driver = webdriver.Firefox()
    driver.implicitly_wait(10)

    # first login
    driver.get("https://www.facebook.com/login")
    click(200,200)

    press('tab')
    typer(email)
    press('tab')
    typer(password)
    press('enter')

    time.sleep(2)

    # then open profile
    driver.get("http://www.facebook.com/profile.php?id=" + profileID)
    pins = driver.find_elements(By.XPATH, '//a[text()="' + title + ' | ' + siteID + '"]')
    if len(pins) > 0:
        result =  "OK"
    else:
        result = ""
    puts("result",result)
    driver.close()
    return result

def facebook_post(email,password,profileID,siteID,title,url):

    log       = open("postfacebook_logs.txt", 'w')
    log.truncate()

    log.write("START: post " + title + " \n")
    driver = webdriver.Firefox()
    driver.maximize_window()
    driver.implicitly_wait(3)

    # open wordpress post url
    driver.get(url)

    # move the cursor to the share button, to display the sub sharing buttons
    sharedaddy = driver.find_element_by_class_name("sharing-anchor")
    actions1 = ActionChains(driver)
    actions1.move_to_element(sharedaddy).click().perform();
    time.sleep(2)
    elem = driver.find_element_by_class_name("share-facebook")
    actions2 = ActionChains(driver)
    actions2.move_to_element(elem).perform();
    time.sleep(2)

    # use tab to select the facebook button and trigger
    press('tab')
    press('tab')
    press('enter')

    # wait for the login window to open, then log
    time.sleep(5)
    press('tab')
    time.sleep(3)
    typer(email)
    press('tab')
    typer(password)
    press('enter')

    # wait for the post window to open the press post button
    time.sleep(5)
    for i in range(7):
        press('tab')
    press('enter')

    time.sleep(5)
    driver.close()

    log.write("STOP: post " + title + " \n")
    log.write("CHECK: post " + title + " \n")

    postid = checkpostfacebook(email,password,profileID,title)
    if  postid == "":
        log.write("ERROR: post " + title + " does not exist")
    else:
        log.write("SUCCESS: post " + title + " does exist with postid " + postid)

    log.close()


text:
package co.cask.cdap.api.dataset.table;

import co.cask.cdap.api.common.Bytes;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nullable;

/**
 * Base class for defining a row with set of columns.
 * @param <T> implementor type - to support handy builder-like methods.
 */
public abstract class RowColumns<T> {
  private final byte[] row;

  private List<byte[]> columns;

  // key & column as byte[]

  /**
   * Defines a row with all columns included. If any of the {@code add} method is called, only columns specified through
   * those {@code add} method calls are included.
   * @param row the row to define.
   */
  public RowColumns(byte[] row) {
    this.row = row;
  }

  /**
   * Defines a row, with the specified set of columns.
   * @param row the row to define
   * @param columns the set of columns of the row to included
   */
  public RowColumns(byte[] row, byte[]... columns) {
    this.row = row;
    this.columns = Arrays.asList(columns);
  }

  // key and column as String

  /**
   * Defines a row with all columns included. If any of the {@code add} method is called, only columns specified through
   * those {@code add} method calls are included.
   * @param row the row to define. Note: It will be converted to {@code byte[]} with UTF-8 encoding.
   */
  public RowColumns(String row) {
    this(Bytes.toBytes(row));
  }

  /**
   * Defines a row, including all columns, unless additional columns are specified.
   * Note that the provided strings will be converted to {@code byte[]} with UTF-8 encoding.
   *
   * @param row the row to define
   * @param columns the set of columns of the row to included
   */
  public RowColumns(String row, String... columns) {
    this(row);
    add(columns);
  }

  /**
   * Specifies column(s) to be included.
   * @param firstColumn the first column being included
   * @param moreColumns a collection of additional columns being included
   * @return the {@link RowColumns} object being defined
   */
  @SuppressWarnings("unchecked")
  public T add(byte[] firstColumn, byte[]... moreColumns) {
    initArray();
    this.columns.add(firstColumn);
    Collections.addAll(this.columns, moreColumns);
    return (T) this;
  }

  /**
   * Specifies column(s) to be included.
   * @param columns a collection of columns being included
   * @return the {@link RowColumns} object being defined
   */
  @SuppressWarnings("unchecked")
  public T add(byte[][] columns) {
    initArray();
    Collections.addAll(this.columns, columns);
    return (T) this;
  }

  /**
   * Specifies column(s) to be included.
   * Note that the provided strings will be converted to {@code byte[]} with UTF-8 encoding.
   * @param firstColumn the first column being included
   * @param moreColumns a collection of additional columns being included
   * @return the {@link RowColumns} object being defined
   */
  @SuppressWarnings("unchecked")
  public T add(String firstColumn, String... moreColumns) {
    initArray();
    this.columns.add(Bytes.toBytes(firstColumn));
    for (String col : moreColumns) {
      this.columns.add(Bytes.toBytes(col));
    }
    return (T) this;
  }

  /**
   * Specifies column(s) to be included.
   * @param columns a collection of columns being included
   * @return the {@link RowColumns} object being defined
   */
  @SuppressWarnings("unchecked")
  public T add(String[] columns) {
    initArray();
    for (String col : columns) {
      this.columns.add(Bytes.toBytes(col));
    }
    return (T) this;
  }

  /**
   * @return the row that was included
   */
  public byte[] getRow() {
    return row;
  }

  /**
   * @return a list of columns of this object. null indicates ALL columns.
   */
  @Nullable
  public List<byte[]> getColumns() {
    return columns;
  }

  private void initArray() {
    if (this.columns == null) {
      this.columns = new ArrayList<>();
    }
  }
}


text:
package com.zhangsl.task;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created by zhangsl on 2017/9/15.
 */
public class TaskMain {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TaskConfig.class);
        AsyncTaskService service = context.getBean(AsyncTaskService.class);
        for (int i = 0; i < 10; i++) {
            service.executeAsyncTask(i);
            service.executeAsyncTaskPlus(i);
        }
        context.close();
        System.out.println("the end");
    }

}


text:
import CreateAttributeAction from "@enhavo/shop/action/model/CreateAttributeAction";
import AbstractFactory from "@enhavo/app/action/factory/AbstractFactory";
import View from "@enhavo/app/view/View";
import ModalManager from "@enhavo/app/modal/ModalManager";
import Router from "@enhavo/core/Router";
import Translator from "@enhavo/core/Translator";

export default class CreateAttributeFactory extends AbstractFactory
{
    private readonly view: View;
    private readonly modalManager: ModalManager;
    private readonly router: Router;
    private readonly translator: Translator;

    constructor(view: View, router: Router, modalManager: ModalManager, translator: Translator) {
        super();
        this.view = view;
        this.router = router;
        this.modalManager = modalManager;
        this.translator = translator;
    }

    createNew(): CreateAttributeAction {
        return new CreateAttributeAction(this.view, this.router, this.modalManager, this.translator);
    }
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed><tipo>Rua</tipo><logradouro>São Gil</logradouro><bairro>Tatuapé</bairro><cidade>São Paulo</cidade><uf>SP</uf><cep>03401030</cep></feed>


text:
package com.voxelgameslib.voxelgameslib.api.feature.features;

import com.voxelgameslib.voxelgameslib.api.event.GameEvent;
import com.voxelgameslib.voxelgameslib.api.feature.AbstractFeature;
import com.voxelgameslib.voxelgameslib.api.feature.FeatureInfo;

import org.bukkit.Effect;
import org.bukkit.EntityEffect;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.event.entity.EntityDamageEvent;

@FeatureInfo(name = "BleedFeature", author = "MiniDigger", version = "1.0", description = "Displays a bleed effect around the player")
public class BleedFeature extends AbstractFeature {

    @GameEvent
    public void onEntityDamage(EntityDamageEvent e) {
        if (e.getEntityType() == EntityType.PLAYER) {
            e.getEntity().getWorld().playEffect(e.getEntity().getLocation(), Effect.STEP_SOUND, Material.REDSTONE_WIRE);
            e.getEntity().playEffect(EntityEffect.HURT);
        }
    }
}


text:
<?php
class PropuestasController extends AppController {

	var $name = 'Propuestas';
	var $helpers = array('Html','Feed','Js','Ajax');
	var $components = array('Email','Auth', 'Session', 'RequestHandler', 'Comparador');

	function beforeFilter() {
    parent::beforeFilter();
    $this->Auth->allowedActions = array('*');
    if ( $this->Auth->user() ){
			$this->set('user', current($this->Auth->user()) );
			//declarar los tipos de ideaas
			$this->loadModel('TipoIdea');
			$this->loadModel( 'Estudiante' );
			$this->set( 'estudiante', $this->Estudiante->findByRut( $this->Auth->user('rut') ));
			$this->set('tiposIdeas', $this->TipoIdea->find('all') );
			$propuestaCandidata = $this->Propuesta->find( 'first', array('conditions' => array('Propuesta.user_id' => $this->Auth->user('id'),
																																													'Propuesta.estado_propuesta_id' => 11)) );
			$this->set('propuestaCandidata', $propuestaCandidata);
			$this->layout = 'connected';
			$this->set('title_for_layout', 'Proyectos Ingeniería Civil Informática | Propuestas');

			$this->loadModel( 'Profesor' );

			if ( $this->Profesor->findByRut( $this->Auth->user( 'rut' ) ) ){

				$this->set('profesor', current($this->Profesor->findByRut( $this->Auth->user( 'rut' ) )) );
				$pendientes = $this->Estudiante->find('count', array('conditions' => array('Estudiante.estado' => 'pendiente')));
				$ideasNuevas = $this->Propuesta->find('count', array('conditions' => array('Propuesta.estado_propuesta_id' => '10')));
				$this->set('pendientes', $pendientes);
				$this->set('nuevasIdeas', $ideasNuevas);
			}
		}else{
			$this->Session->setFlash('Debes iniciar sesión para poder acceder', 'flash_success');
			$this->redirect(array( 'controller' => 'pages', 'action' => 'home' ));
		}
	}

	function addfilter(){
		if($this->RequestHandler->isAjax()){
			$uname = trim($this->data['Propuesta']['nombre']);
			$tipoidea = trim($this->data['Propuesta']['tipo_idea_id']);
			$nombrepropuesta = trim($this->data['Propuesta']['nombre_propuesta']);
			$tag = trim($this->data['Propuesta']['palabras_clave']);

			$query = "";
			if ( $uname != "" ){
				$query = "SELECT * FROM propuestas p INNER JOIN users u ON p.user_id=u.id AND u.nombre='$uname'";
			}
			if ( $tipoidea != "" ){
				//solo si se trata de la segunda o más consulta se usa el intersect
				if ( $query != "")
					$query .= " INTERSECT ";
				$query .= "SELECT * FROM propuestas p INNER JOIN users u ON p.user_id=u.id AND p.tipo_idea_id='$tipoidea'";
			}
			if ( $nombrepropuesta != "" ){
				if ( $query != "")
					$query .= " INTERSECT ";
				$query .= "SELECT * FROM propuestas p INNER JOIN users u ON p.user_id=u.id AND p.nombre_propuesta LIKE '%$nombrepropuesta%'";
			}
			if ( $tag != "" ){
				if ( $query != "")
					$query .= " INTERSECT ";
				$query .= "SELECT * FROM propuestas p INNER JOIN users u ON p.user_id=u.id AND p.palabras_clave LIKE '%$tag%'";
			}

			if ( $query != "" ){
				$query .= ";";
				$this->set('propuestas', $this->Propuesta->query( $query ));
			}else{
				$this->set('propuestas', $this->Propuesta->find( 'all' ));
			}
		}
	}

	function index() {

			//si existen propuestas las declaramos
			if ( $this->Propuesta->find('all') )
				$this->set('propuestas', $this->Propuesta->find('all'));
			$this->layout = 'connected';
			$this->set('title_for_layout', 'Proyectos Ingeniería Civil Informática | Propuestas');

	}

	function add(){

			//si se ha enviado la información
			if ( $this->data ){
				//sacar el user id del user con sesion iniciada
				$this->data['Propuesta']['user_id'] = $this->Auth->user('id');
				//definir el estado de idea como 10 (incompleto)
				$this->data['Propuesta']['estado_propuesta_id'] = "12";

				$this->Propuesta->create();
				//Debugger::dump($this->data['Propuesta']);
				if ( $this->Propuesta->save( $this->data )){
					$this->Session->setFlash('Correctamente guardado!', 'flash_success');
					$this->redirect(array( 'action' => 'addcanvas', $this->Propuesta->getLastInsertID() ));
				}else{
					$this->Session->setFlash('Hubo un error! Verifica nuevamente tus datos', 'flash_warning');
					$this->redirect(array( 'action' => 'add' ));
				}
			}

	}

	function addcanvas(){

			if (isset($this->params['propuestaid'])){
				$propuestaid = $this->params['propuestaid'];
			}else{
				$propuestaid = $this->data['Propuesta'][0]['propuesta_id'];
			}
			$propuesta = $this->Propuesta->findById($propuestaid);
			$this->set("propuesta", $propuesta);
			$this->Propuesta->id = $propuestaid;
			//Solo procedemos si la propuesta esta incompleta, sino redirigimos a la propuesta
			if( $propuesta['Propuesta']['estado_propuesta_id'] == "12" ){

				//si se trata de enviar el formulario
				if ($this->data){
					//guardo cada uno de los conceptos de comparacion
					foreach ($this->data['Propuesta'] as $conceptoComparacion){
						$data = array();
						$data['ConceptoComparacion'] = $conceptoComparacion;
						$data['ConceptoComparacion']['propuesta_id'] = $propuestaid;
						$data['ConceptoComparacion']['comparacion_proyecto_id'] = "0";

						$this->Propuesta->ConceptoComparacion->saveAll($data);
					}
					//actualizo el estado de la propuesta
					$this->Propuesta->saveField('estado_propuesta_id', '10');
					$this->redirect(array('action' => 'index'));
				}
			}else{
				$this->Session->setFlash("asad".$propuestaid, 'flash_warning');
				$this->redirect(array('action' => 'show', $propuestaid));
			}

	}

	function show(){
		$propuesta = $this->Propuesta->findById($this->params['pass'][0]);
		$this->set("propuesta", $propuesta);

	}

	function edit($id){

				$this->Propuesta->id = $id;
				$propuesta = $this->Propuesta->read();
				#solo puedo editar mis propias propuestas
				if ($this->Auth->user('id') == $propuesta['User']['id']){
					#si solo se esta leyendo la página
					if (empty($this->data)) {
	          $this->data = $this->Propuesta->read();
	          $this->set('propuesta', $this->Propuesta->read());
	          #si se POSTeo la información para editar
	        }else{

	        	#preparamos los datos de la propuesta
	        	$this->data['Propuesta']['id'] = $id;
	        	$this->data['Propuesta']['user_id'] = $this->Auth->user('id');
	        	if($this->Propuesta->save($this->data)){

	        		#ahora preparamos los datos de los conceptos de comparacion
	        		foreach ($this->data['ConceptoComparacion'] as $concepto) {
	        			$this->data['ConceptoComparacion'] = $concepto;
	        			$this->data['ConceptoComparacion']['descripcion_concepto_comparacio'] = trim($concepto['descripcion_concepto_comparacio']);

	        			$this->data['ConceptoComparacion']['propuesta_id'] = $id;
								$this->data['ConceptoComparacion']['comparacion_proyecto_id'] = "0";

								$this->Propuesta->ConceptoComparacion->saveAll( $this->data );
	        		}
		        	$this->redirect(array('action' => 'show', $id));
		        }else{
		        	$this->Session->setFlash("ups","flash_warning");
		        	$this->redirect(array('action' => 'index'));
		        }
	        }

	      }else{
	      	$this->set('propuestas', $this->Propuesta->findAllByUserId($this->Auth->user('id')));
	      }

		}

	#funcion para mostrar la pagina de comparacion
	function comparar($id1 = NULL){

		if ( $this->Profesor->findByRut( $this->Auth->user( 'rut' ) ) ){

			$propuestas = $this->Propuesta->find('all', array('conditions' => array('Propuesta.estado_propuesta_id' => '10')));

			$this->set('propuestas', $propuestas);
		}else{
			$this->Session->setFlash("Solo los profesores pueden comparar propuestas", "flash_warning");
			$this->redirect(array("action" => "index"));
		}
	}

	function compare($id){
		//si efectivamente se desea comparar una
		if( !is_null($id) && $this->RequestHandler->isAjax()){
			//Primero preparo los datos para comparar
			$this->Propuesta->id = $id;
			$propuesta = $this->Propuesta->read();
			$conceptos = $propuesta['ConceptoComparacion'];
			foreach ($conceptos as $concepto) {
				$propuestaObjetivo[trim(strtolower($concepto['titulo_concepto_comparacion']))] = explode(",", $concepto['tags']);
			}
			$propuestaObjetivo['descripcion'] = explode(",", $propuesta['Propuesta']['palabras_clave']);

			//por seguridad, borro las variables antes usadas
			//unset($propuesta);
			//unset($conceptos);

			//ahora preparo el resto de las propuestas
			$propuestas = $this->Propuesta->find('all');
			$propuestasFormateadas = array();
			foreach ($propuestas as $propuesta) {
				//evito compararme conmigo mismo
				if($propuesta['Propuesta']['id'] != $id && $propuesta['Propuesta']['estado_propuesta_id'] != 12){
					$conceptos = $propuesta['ConceptoComparacion'];
					foreach ($conceptos as $concepto) {
						$nuevaPropuesta[trim(strtolower($concepto['titulo_concepto_comparacion']))] = explode(",", $concepto['tags']);
					}
					$nuevaPropuesta['descripcion'] = explode(",", $propuesta['Propuesta']['palabras_clave']);
					//asigno el id solo para identificarla luego de compararla
					$nuevaPropuesta['id'] = $propuesta['Propuesta']['id'];
					array_push($propuestasFormateadas, $nuevaPropuesta);
				}
			}
			$this->set('propuesta', $propuestaObjetivo);
			$this->set('propuestasFormateadas', $propuestasFormateadas);

			//unset($propuestas);

			//ahora hago la comparacion
			if( $this->Propuesta->find('all', array('conditions' => array('Propuesta.estado_propuesta_id <>' => '12', 'Propuesta.id <>' => $id))) ){
				$best = 0;
				$propuestaSimilar = array();
				foreach ($propuestasFormateadas as $propuesta) {
					if ($this->Comparador->compare($propuestaObjetivo, $propuesta) > $best){
						$best = $this->Comparador->compare($propuestaObjetivo, $propuesta);
						$propuestaSimilar = $this->Propuesta->findById($propuesta['id']);
					}
				}
				$this->set('best', $best);
				$this->set('propuestaSimilar', $propuestaSimilar);
			}else{
				$this->set('warning', "Lamentablemente no existen más propuestas con las que comparar");
			}
		}
	}

	function aceptar($id){
		#evito que me pida una vista para esta accion
    $this->autoRender = false;
    $propuestaCandidata = $this->Propuesta->find( 'first', array('conditions' => array('Propuesta.user_id' => $this->Auth->user('id'),
																																												'Propuesta.estado_propuesta_id' => 11)) );
			$this->set('propuestaCandidata', $propuestaCandidata);
		$propuesta = $this->Propuesta->findById($id);
		if( $propuesta['Propuesta']['estado_propuesta_id'] == 10 ){
			$this->Propuesta->id = $id;
			$this->Propuesta->saveField('estado_propuesta_id', 11);
		}
		$this->redirect(array('action' => 'comparar'));
	}

	function avanzado($id){

	}
}
?>


text:
package org.schema.api.model.thing.intangible;

import org.schema.api.model.thing.Thing;

import java.util.Date;

public class DataFeedItem extends Intangible
{
	private Date dateCreated;//Notes - Allowed types- [Date, DateTime]
	private Date dateDeleted;
	private Date dateModified;//Notes - Allowed types- [Date, DateTime]
	private Thing item;

	public Date getDateCreated()
	{
		return dateCreated;
	}

	public void setDateCreated(Date dateCreated)
	{
		this.dateCreated = dateCreated;
	}

	public Date getDateDeleted()
	{
		return dateDeleted;
	}

	public void setDateDeleted(Date dateDeleted)
	{
		this.dateDeleted = dateDeleted;
	}

	public Date getDateModified()
	{
		return dateModified;
	}

	public void setDateModified(Date dateModified)
	{
		this.dateModified = dateModified;
	}

	public Thing getItem()
	{
		return item;
	}

	public void setItem(Thing item)
	{
		this.item = item;
	}
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<grid
	xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
	xmlns="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:ns2="http://isis.apache.org/applib/layout/component"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<row>
		<col span="12" unreferencedActions="true">
			<ns2:domainObject />
		</col>
	</row>
	<row>
		<col span="12">
			<tabGroup>
				<tab name="General">
					<row>
						<col span="6">
							<ns2:fieldSet name="General" id="general"
								unreferencedProperties="true">
								<ns2:property id="volunteer" hidden="PARENTED_TABLES">
									<ns2:describedAs>Chats Calls Volunteer making the calls</ns2:describedAs>
								</ns2:property>
								<ns2:property id="participant">
									<ns2:describedAs>Chats Participant receiving calls from the allocated Chats Calls Volunteer.</ns2:describedAs>
								</ns2:property>
								<ns2:property id="approximateCallTime">
									<ns2:describedAs>Approximate time of day at which calls will be made to the Participant by the Calls Volunteer</ns2:describedAs>
								</ns2:property>
							</ns2:fieldSet>
						</col>
					</row>
				</tab>
				<tab name="Other">
					<row>
						<col span="4">
							<ns2:fieldSet name="Admin" id="admin">
								<ns2:action id="clearHints" position="PANEL_DROPDOWN" />
								<ns2:action id="downloadLayoutXml" position="PANEL_DROPDOWN" />
								<ns2:action id="downloadJdoMetadata" position="PANEL_DROPDOWN" />
								<ns2:action id="rebuildMetamodel" position="PANEL_DROPDOWN" />
								<ns2:property id="datanucleusIdLong" hidden="ALL_TABLES" />
								<ns2:property id="datanucleusVersionTimestamp"
									hidden="ALL_TABLES" />
								<ns2:property id="datanucleusVersionLong" hidden="ALL_TABLES" />
								<ns2:property id="createdBy" hidden="ALL_TABLES" />
								<ns2:property id="createdOn" hidden="ALL_TABLES" />
								<ns2:property id="lastModifiedBy" hidden="ALL_TABLES" />
								<ns2:property id="lastModifiedOn" hidden="ALL_TABLES" />
								<ns2:property id="region" hidden="EVERYWHERE" />
								<ns2:property id="regionName" />
							</ns2:fieldSet>
						</col>
						<col span="8" unreferencedCollections="true">
						</col>
					</row>
				</tab>
			</tabGroup>
		</col>
	</row>
</grid>


text:
{% load cycle from future  %}
{% if result_hidden_fields %}

 {# DIV for HTML validation #}
        {% for item in result_hidden_fields %}{{ item }}{% endfor %}

{% endif %}
{% if results %}

            {% for header in result_headers %}

                {% if header.sortable %}{% endif %}
                {{ header.text|capfirst }}
                {% if header.sortable %}{% endif %}	{% endfor %}

        {% for node_id, parent_id, node_level, has_children, result in results %}

                {% for item in result %}
                    {% if forloop.counter == 1 %}
                        {% for spacer in item.depth %}
                            {% endfor %}
                    {% endif %}
                    {{ item }}
                {% endfor %}

        {% endfor %}

    <input type="hidden" id="has-filters" value="{{ filtered|yesno:"1,0" }}"/>

{% endif %}


text:
The Audio library allows you to load and play audio inside a Nori-based UI window (Nori windows can be created with either the Nori library or Game library).

## Basic Usage

To load a sound file, you first need an `Audio.SoundLoader` instance. The constructor for this takes in a reference to the Nori context, either a Nori.Frame instance or a Game.GameWindow instance:

`soundLoader = new Audio.SoundLoader(myWindow);`

A `SoundLoader` can be used to load audio from one of three sources:

* **Bytes** from a sound file (e.g. from a file). You would generally get these by using the `FileIO.fileReadBytes()` function.
* **Project resource files** that are included in your source code.
* Raw audio **sample information** to construct custom sounds and effects.

Each of these sources are represented by both a synchronous and asynchronous method:

### Load sound from bytes asynchronously
```js
bytes = FileIO.readFileBytes("myFile.ogg");
soundLoader.loadFromBytes(bytes, sound => {
  print("Sound loaded and ready to use!");
}, err => {
  print("Could not load sound: " + err);
});
```
The error handler callback is optional.

> TODO: what is the error callback's parameter?

> TODO: if no error callback is provided, what happens on error?

### Load sound from bytes synchronously
```js
bytes = FileIO.readFileBytes("myFile.ogg");
sound = soundLoader.awaitLoadFromBytes(bytes);
print("Sound loaded and ready to use!");
// throws Exception on error
```

> TODO: create a more specific exception

### Load sound from project resource asynchronously

```js
soundLoader.loadFromResource("myFile.ogg", sound => {
  print("Sound loaded and ready to use!");
}, err => {
  print("Could not load sound: " + err);
});
```
> TODO: same TODO's from above

The error handler callback is optional.

### Load sound from project resource synchronously

```js
sound = soundLoader.awaitLoadFromResource("myFile.ogg");
print("Sound loaded and ready to use!");
// throws Exception on error
```

> TODO: same TODO's from above

### Load sound from raw samples asynchronously

Samples are a `Audio.SoundBuffer` instance. You can read more about how to create these below.
```js
soundLoader.loadFromSamples(buffer, sound => {
  print("Sound loaded and ready to use!");
}, err => {
  print("Could not load sound: " + err);
});
```

> TODO: same TODO's from above

The error handler callback is optional.

### Load sound from raw samples synchronously

```js
sound = soundLoader.awaitLoadFromSamples(buffer);
print("Sound loaded and ready to use!");
// throws Exception on error
```

> TODO: same TODO's as above

## The Sound class

An `Audio.Sound` instance represents a single sound and can be created using a `Audio.SoundLoader` instance (see above). A sound instance allows you to play or stop a sound.

### Playing a sound

```js
// This will play the sound once
sound.play();

// This will play a sound multiple times
sound.playInLoop();

// This will fade a sound in over the course of the duration. The duration is a number of seconds.
sound.fadeIn(duration);
```

All methods are **non-blocking**.

### Stopping a sound

This will stop the sound immediately and not save its current position. If you pay it again, it will start from the beginning.
```js
sound.stop();
```

Optionally, stop can take in a fade duration parameter. The sound will fade out over the course of the given duration and then stop, without saving its current position.
`fadeDuration` is a number in seconds.
```js
sound.stop(fadeDuration);
```

This will stop the sound immediately but the current position will be saved. If you play it again, it will start from where it left off.
```js
sound.pause();
```

Optionally, pause can also take in a fade duration parameter. The sound will fade out over the course of the given duration and then pause. If you play the sound again, it will start from the position that it reached 0 volume.
`fadeDuration` is a number in seconds
```js
sound.pause(fadeDuration);
```

> TODO: what happens when you try to stop a sound that's already stopped?

## The SoundBuffer class

An `Audio.SoundBuffer` instance can be used to create an arbitrary custom sound using raw sample information.

To create a SoundBuffer, the constructor can be called directly:

```js
channels = 2;
sampleRate = 44100;
buffer = new Audio.SoundBuffer(channels, sampleRate);
```
Use 1 as the value for `channels` if you want a mono sound. Use 2 for stereo.

The sample rate is the number of samples to be played per second, i.e. the number of hertz. This number must be from the standard set of options.

Valid sample rate values are the following: `8000`, `11025`, `44100`, `48000`, `96000`, `192000`

8000 is considered high compression, and 192000 is considered "studio quality". 44.1 kHz is considered standard.

Both of these arguments are optional, and if unspecified, the default values are a 1-channel 44.1 kHz sound buffer.

### Setting Duration

The channel buffers are initialized to be empty. To ensure the sample buffers have a given length, you can set the SoundBuffer's duration with the `setDuration` method.

```js
buffer.setDuration(4.5); // 4.5 seconds
```
This will add or remove samples to all channels such that the sound will be the given duration at the buffer's current sample rate.

The given number is the number of seconds. This is multiplied by the sample rate to get an integer number of samples and rounded, if necessary.

Samples that are added to the channel have a default value of 0. If the new duration is shorter than the previous duration, samples are removed from the end of the buffer.

### Channel buffers

Channel buffers are represented as a list of integers. To access each channel, you can call the function `getChannelBuffer(n)` which will return a mutable integer list. You can add or modify numbers in this list to edit the sample data. The value `n` is the buffer index which is 0-indexed. For a mono sound with one channel, the only valid value for `n` is 0. For stereo sounds, `0` and `1` are valid.

The integer values in the buffer should range between -32768 and 32767 (e.g. a 16-bit sound).

### Channel buffer end-to-end example
In this example, an A-440 (an A above middle C) that lasts for 2 seconds is created using the sound buffer.

```js
// mono, 44.1 kHz
buffer = new Audio.SoundBuffer(1, 44100);

// lasts for 2 seconds, e.g. there are 88.2k samples
buffer.setDuration(2);

channel = buffer.getChannelBuffer(0);

for (i = 0; i < channel.length; i++) {
  time = i / 44100.0; // current time offset

  // create a sine wave with amplitude of 32k and frequency 440
  value = Math.sin(time * (2 * Math.PI * 440)) * 32000;
  channel[i] = value;
}

// Create a loader from the current UI context
loader = new SoundLoader(frameOrWindow);

// convert the buffer into a sound instance
sound = loader.awaitLoadFromSamples(buffer);

// play the sound
sound.play();
```


text:
from django.conf.urls import url, include
from .views import Index, PeopleDetailView

urlpatterns = [
    url(r"^$", Index.as_view(), name="index"),
    url(r"^people/(?P<pk>\d+)/$", PeopleDetailView.as_view(), name="people")
]


text:
DEBUG=${DEBUG:=false}

if [ "$DEBUG" = true ]
then
  set -x
  zmodload zsh/zprof
else
  unset DEBUG
fi


text:
`SDCAlertView` started out as an alert that looked identical to `UIAlertView`, but had support for a custom content view. With the introduction of `UIAlertController` in iOS 8, the project was updated to the more modern API that `UIAlertController` brought.

## Features

- [x] Most `UIAlertController` functionality
- [x] Custom content views
- [x] Preventing controllers from dismissing when the user taps a button
- [x] Easy presentation/dismissal
- [x] Attributed title label, message label, and buttons
- [x] Appearance customization
- [x] Usable from Swift and Objective-C
- [x] Understandable button placement
- [x] UI tests
- [x] Custom alert behavior
- [x] CocoaPods/Carthage/Swift Package Manager support
- [ ] Easy queueing of alerts

# Requirements

 - Swift 5.0
 - iOS 9 or higher

# Installation

## CocoaPods
To install SDCAlertView using CocoaPods, integrate it in your existing Podfile, or create a new Podfile:

```ruby
platform :ios, '9.0'
use_frameworks!

target 'MyApp' do
  pod 'SDCAlertView'
end
```

Then run `pod install`.

## Carthage
To install with Carthage, add the following line to your `Cartfile`:

```ruby
github "sberrevoets/SDCAlertView"
```

Run `carthage update` and drag `SDCAlertView.framework` in the `Build` folder into your project.

## Swift Package Manager

To install with Swift Package Manager, add this package to your project's 'Swift Packages' section. Or add the following line to your `Package.swift`:

```swift
 .package(url: "https://github.com/sberrevoets/SDCAlertView.git", from: "12.0.1")
```

# Alerts vs. Action Sheets

`SDCAlertController` supports the presentation of action sheets, but there are some limitations and things to keep in mind when using action sheets:

- It does not properly adapt on iPad. This is because iOS doesn't support `UIModalPresentationStyle.Custom` for adaptive presentations (such as when presenting an action sheet from a bar button item).
- The new `AlertBehaviors` is, due to limitations in the Swift/Objective-C interop, not available when using `SDCAlertController` from Swift. This affects `AlertControllerStyle.Alert` as well.
- When adding subviews to the custom content view, that view will replace the title and message labels.

# Usage
`SDCAlertView` is written in Swift, but can be used in both Swift and Objective-C. Corresponding types in Objective-C have the same name they do in Swift, but with an `SDC` prefix.

## Basic

```swift
let alert = AlertController(title: "Title", message: "This is a message", preferredStyle: .alert)
alert.addAction(AlertAction(title: "Cancel", style: .normal))
alert.addAction(AlertAction(title: "OK", style: .preferred))
alert.present()

// or use the convenience methods:

AlertController.alert(withTitle: "Title", message: "This is a message", actionTitle: "OK")
AlertController.sheet(withTitle: "Action sheet title", "Action sheet message", actions: ["OK", "Cancel"])
```

## Custom Content Views

```swift
let spinner = UIActivityIndicatorView(activityIndicatorStyle: .gray)
spinner.translatesAutoresizingMaskIntoConstraints = false
spinner.startAnimating()

let alert = AlertController(title: "Title", message: "Please wait...")
alert.contentView.addSubview(spinner)

spinner.centerXAnchor.constraint(equalTo: alert.contentView.centerXAnchor).isActive = true
spinner.topAnchor.constraint(equalTo: alert.contentView.topAnchor).isActive = true
spinner.bottomAnchor.constraint(equalTo: alert.contentView.bottomAnchor).isActive = true

alert.present()
```

## Dismissal Prevention

```swift
let alert = AlertController(title: "Title", message: "This is a message")
alert.addAction(AlertAction(title: "Dismiss", style: .preferred))
alert.addAction(AlertAction(title: "Don't dismiss", style: .normal))
alert.shouldDismissHandler = { $0.title == "Dismiss" }
alert.present()
```

## Styling and Appearance

`SDCAlertController` is a normal view controller, so applying a `tintColor` to its `view` will color the buttons and any subviews you add to the `contentView`.

If you are looking for more customizations, create a subclass of `AlertVisualStyle` and use `visualStyle` on the `AlertController` instance. You can also create an instance of `AlertVisualStyle` and overwrite the attributes you need (this is mainly intended to be used from Objective-C). Note that after an alert has been presented, changing any of these settings is ignored.

# License

SDCAlertView is distributed under the MIT license.


text:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace GodaddyWrapper.Responses
{
    public class CartGroupPricingResponse
    {
        public int Subtotal { get; set; }
        public int List { get; set; }
        public int Savings { get; set; }
        public int Sale { get; set; }
        public int Discount { get; set; }
        public CartFeeResponse Fees { get; set; }

    }
}


text:
void Solve(int N);

int Query(int u, int v, int w);
void Bridge(int u, int v);


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Revue mycol. , Toulouse 8: 142 (1886)

#### Original name
Camarosporium phragmitis Brunaud

### Remarks
null