text:
namespace CFwZA
{
    partial class FrmMain
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
            this.txtFormat = new System.Windows.Forms.TextBox();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.button1 = new System.Windows.Forms.Button();
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.configurationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripContainer1.ContentPanel.SuspendLayout();
            this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
            this.toolStripContainer1.SuspendLayout();
            this.menuStrip1.SuspendLayout();
            this.SuspendLayout();
            //
            // toolStripContainer1
            //
            //
            // toolStripContainer1.ContentPanel
            //
            this.toolStripContainer1.ContentPanel.Controls.Add(this.txtFormat);
            this.toolStripContainer1.ContentPanel.Controls.Add(this.textBox1);
            this.toolStripContainer1.ContentPanel.Controls.Add(this.button1);
            this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(574, 337);
            this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.toolStripContainer1.Location = new System.Drawing.Point(0, 0);
            this.toolStripContainer1.Name = "toolStripContainer1";
            this.toolStripContainer1.Size = new System.Drawing.Size(574, 361);
            this.toolStripContainer1.TabIndex = 0;
            this.toolStripContainer1.Text = "toolStripContainer1";
            //
            // toolStripContainer1.TopToolStripPanel
            //
            this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1);
            //
            // txtFormat
            //
            this.txtFormat.Location = new System.Drawing.Point(3, 5);
            this.txtFormat.Name = "txtFormat";
            this.txtFormat.Size = new System.Drawing.Size(75, 20);
            this.txtFormat.TabIndex = 1;
            //
            // textBox1
            //
            this.textBox1.Location = new System.Drawing.Point(84, 5);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(487, 329);
            this.textBox1.TabIndex = 1;
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(3, 31);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 0;
            this.button1.Text = "Teste";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // menuStrip1
            //
            this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None;
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fileToolStripMenuItem});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(574, 24);
            this.menuStrip1.TabIndex = 0;
            this.menuStrip1.Text = "menuStrip1";
            //
            // fileToolStripMenuItem
            //
            this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.configurationToolStripMenuItem,
            this.toolStripSeparator1,
            this.exitToolStripMenuItem});
            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
            this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
            this.fileToolStripMenuItem.Text = "&File";
            //
            // configurationToolStripMenuItem
            //
            this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
            this.configurationToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
            this.configurationToolStripMenuItem.Text = "&Configuration";
            this.configurationToolStripMenuItem.Click += new System.EventHandler(this.configurationToolStripMenuItem_Click);
            //
            // toolStripSeparator1
            //
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new System.Drawing.Size(145, 6);
            //
            // exitToolStripMenuItem
            //
            this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
            this.exitToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
            this.exitToolStripMenuItem.Text = "&Exit";
            this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
            //
            // FrmMain
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(574, 361);
            this.Controls.Add(this.toolStripContainer1);
            this.MainMenuStrip = this.menuStrip1;
            this.Name = "FrmMain";
            this.Text = "frmMain";
            this.Load += new System.EventHandler(this.FrmMain_Load);
            this.toolStripContainer1.ContentPanel.ResumeLayout(false);
            this.toolStripContainer1.ContentPanel.PerformLayout();
            this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
            this.toolStripContainer1.TopToolStripPanel.PerformLayout();
            this.toolStripContainer1.ResumeLayout(false);
            this.toolStripContainer1.PerformLayout();
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.ToolStripContainer toolStripContainer1;
        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem configurationToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
        private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.TextBox txtFormat;
    }
}


text:
<?php
    session_start();/*
    var_dump($_SESSION);*/
    require "connect.php";
    if (!isset($_SESSION['id_user']) || empty($_SESSION['id_user'])) {
        //header('location:login.php');
    }
?>
<!doctype html>

<<<<<<< HEAD

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">

        <meta name="mobile-web-app-capable" content="yes">
        <link rel="icon" sizes="192x192" href="images/android-desktop.png">

        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-title" content="Material Design Lite">

        <link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">

        <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
        <meta name="msapplication-TileColor" content="#3372DF">
        <link rel="shortcut icon" href="images/favicon.png">

        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en">
        <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
        <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.cyan-light_blue.min.css">
        <link rel="stylesheet" href="mdl/material.css">
        <link rel="stylesheet" href="css/_panels.scss">

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
        <link rel="stylesheet" href="css/styles.css">
        <link rel="stylesheet" href="mdl/material.css">
        <link rel="stylesheet" href="css/schoolin.css">

        <title>SchoolGroup</title>

            <?php
                include ('header.php');
                include ('nav.php');
            ?>

                                        <?php
                                            $sql = "SELECT * FROM si_messages ORDER BY date DESC LIMIT 1";
                                            $req = mysqli_query($link, $sql) or die(mysql_error());
                                            $d = array();
                                            while ($data = $req->fetch_assoc()) {
                                                $d[] = $data;
                                            }
                                            for($i = count($d)-1; $i>=0; $i--) {
                                        ?>

                                                        <?php
                                                            $sql = "SELECT * FROM si_users WHERE id ='" . $d[$i]['id_user'] . "' ";
                                                            $req = mysqli_query($link, $sql) or die(mysql_error());
                                                            $data= $req->fetch_assoc();
                                                            if ( ($data['firstname'] == '') && ($data['lastname'] == '') ) { //1
                                                                echo $data['email'];
                                                            } elseif ($data['firstname'] == '') { // 2
                                                                echo $data['lastname'];
                                                            } elseif ($data['lastname'] == '') { // 3
                                                                echo $data['firstname'];
                                                            } else { // 4
                                                                echo $data['firstname'] . ' ' . $data['lastname'];;
                                                            }
                                                            //echo $d[$i]['pseudo']; ?>
                                                     (
                                                    <?php
                                                        echo date("d/m/Y H:i:s", $d[$i]['date']); ?>) : <?php echo htmlentities($d[$i]['message']);
                                                    ?>

                                        <?php
                                            }
                                        ?>

                                    <form class="form-inline" id="tchatForm">

                                            <textarea name="" class="form-control" id="message" placeholder="Tapez votre message ici." style="width:200%;"></textarea>

                                        <button type="submit" class="btn btn-default" style="margin-left:200px;margin-bottom:-30px">Envoyer</button>
                                    </form>

Panel Heading 1

Panel Content 1

Panel Heading 2

Panel Content 2

=======

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
    <title>SchoolProfil</title>

    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="images/android-desktop.png">

    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Material Design Lite">

    <link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">

    <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
    <meta name="msapplication-TileColor" content="#3372DF">

    <link rel="shortcut icon" href="images/favicon.png">

    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.cyan-light_blue.min.css">
    <link rel="stylesheet" href="mdl/material.css">

    <link rel="stylesheet" href="css/_panels.scss">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="mdl/material.css">
    <link rel="stylesheet" href="css/schoolin.css">
    <link rel="stylesheet" href="css/search/component.css">

    <?php
    include ('header.php');
    include ('nav.php');
    ?>

                <form class="morphsearch-form">
                    <input class="morphsearch-input" type="search" placeholder="Search..."/>
                    <button class="morphsearch-submit" type="submit">Search</button>
                </form>

People

Sara Soueidan

Rachel Smith

Peter Finlan

Patrick Cox

Tim Holman

Shaun Dona

Popular

Page Preloading Effect

Arrow Navigation Styles

Ideas for Subtle Hover Effects

Halcyon Days Template

Inspiration for Article Intro Effects

Draggable Dual-View Slideshow

Recent

Tooltip Styles Inspiration

Animated Background Headers

Off-Canvas Menu Effects

Tab Styles Inspiration

Make SVGs Responsive with CSS

Notification Styles Inspiration

>>>>>>> 5b83573e66bae60c750a35e6943b75412f4d7454

        <?php /*
        */
        ?>
            <?php
                $sql = "SELECT id FROM si_messages ORDER BY id DESC LIMIT 1";
                $req = mysqli_query($link,$sql) or die(mysql_error());
                $data= mysqli_fetch_assoc($req);
                $lastid=$data['id'];
                echo "<input type=\"hidden\" id=\"lastid\" value=\"" . $lastid . "\" >";
            ?>

redpajama_set_name: RedPajamaGithub


text:
import {getCarousel, getScrollingElement, getSlide} from './helpers';
import {useStyles} from '../base-carousel.jss';

const pageWidth = 800;
const pageHeight = 600;

describes.endtoend(
  'Non-looping AMP carousel',
  {
    testUrl:
      'http://localhost:8000/test/manual/amp-base-carousel/1.0/' +
      'non-looping.amp.html',
    experiments: ['bento-carousel'],
    environments: ['single', 'viewer-demo'],
    initialRect: {width: pageWidth, height: pageHeight},
  },
  async (env) => {
    /** The total number of slides in the carousel */
    const SLIDE_COUNT = 4;
    const styles = useStyles();
    let controller;

    function prop(el, name) {
      return controller.getElementProperty(el, name);
    }

    beforeEach(async () => {
      controller = env.controller;
      const carousel = await getCarousel(controller);
      await controller.switchToShadowRoot(carousel);
    });

    it('should render correctly', async () => {
      const el = await getScrollingElement(styles, controller);

      await expect(prop(el, 'scrollWidth')).to.equal(pageWidth * SLIDE_COUNT);
    });

    it('should snap when scrolling', async () => {
      const el = await getScrollingElement(styles, controller);
      const firstSlide = await getSlide(styles, controller, 0);

      const slideWidth = await prop(firstSlide, 'offsetWidth');
      const scrollLeft = await prop(el, 'scrollLeft');
      const snappedScrollLeft = scrollLeft + slideWidth;
      const requestedScrollLeft = snappedScrollLeft + 1;

      await controller.scrollTo(el, {left: requestedScrollLeft});
      // We should have snapped to the edge of the slide rather than the
      // requested scroll position.
      await expect(prop(el, 'scrollLeft')).to.equal(snappedScrollLeft);
    });

    it('should have the correct scroll position when resizing', async () => {
      // Note: 513 seems to be the smallest settable width.
      await controller.setWindowRect({
        width: 800,
        height: 600,
      });

      const firstSlide = await getSlide(styles, controller, 0);

      await expect(controller.getElementRect(firstSlide)).to.include({
        'x': 0,
        'width': 800,
      });

      await controller.setWindowRect({
        width: 900,
        height: 600,
      });

      // Normally, resizing would cause the position to change. We're testing
      // that the carousel moves this to the correct position again.
      await expect(controller.getElementRect(firstSlide)).to.include({
        'x': 0,
        'width': 900,
      });
    });
  }
);


text:
namespace Egs
{
    using System;
    using Egs.Win32;

    partial class EgsDevicesWindowMessageReceivingForm
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();

                if (deviceNotification != null) { deviceNotification.Dispose(); deviceNotification = null; }
#if USE_OLD_HID
                if (touchRawInputDevices != null) { touchRawInputDevices.Dispose(); touchRawInputDevices = null; }
                if (HidReportsUpdateByWin32RawInput != null) { HidReportsUpdateByWin32RawInput.Dispose(); HidReportsUpdateByWin32RawInput = null; }
#endif

                if (IsToUseActiveWindowHWnd)
                {
                    NativeMethods.SetWindowLong(hMainWindow, -4, oldWndProcPtr);
                    hMainWindow = IntPtr.Zero;
                    oldWndProcPtr = IntPtr.Zero;
                    newWndProcPtr = IntPtr.Zero;
                    newWndProc = null;
                }
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.SuspendLayout();
            //
            // WindowMessageReceivingForm
            //
            this.ClientSize = new System.Drawing.Size(284, 261);
            this.Name = "WindowMessageReceivingForm";
            this.ResumeLayout(false);

        }

        #endregion

    }
}


text: This application analyzes stocks for patterns.


text:
package org.cyclops.integrateddynamics.core.evaluate.variable;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import org.cyclops.integrateddynamics.Reference;
import org.cyclops.integrateddynamics.api.evaluate.EvaluationException;
import org.cyclops.integrateddynamics.api.evaluate.operator.IOperator;
import org.cyclops.integrateddynamics.api.evaluate.variable.IValue;
import org.cyclops.integrateddynamics.api.evaluate.variable.IValueType;
import org.cyclops.integrateddynamics.api.evaluate.variable.IValueTypeListProxyFactoryTypeRegistry;
import org.cyclops.integrateddynamics.api.evaluate.variable.IVariable;
import org.cyclops.integrateddynamics.core.evaluate.operator.Operators;

import java.util.concurrent.TimeUnit;

/**
 * A list that is built lazily from a start value and an operator.
 * @param <T> The value type type.
 * @param <V> The value type.
 */
public class ValueTypeListProxyLazyBuilt<T extends IValueType<V>, V extends IValue> extends ValueTypeListProxyBase<T, V> {

    private Cache<Integer, V> cache_values = CacheBuilder.newBuilder().expireAfterAccess(10, TimeUnit.SECONDS).maximumSize(100).build();

    private final V value;
    private final IOperator operator;

    public ValueTypeListProxyLazyBuilt(V value, IOperator operator) {
        super(ValueTypeListProxyFactories.LAZY_BUILT.getName(), (T) value.getType());
        this.value = value;
        this.operator = operator;
    }

    @Override
    public int getLength() throws EvaluationException {
        return Integer.MAX_VALUE;
    }

    @Override
    public V get(int index) throws EvaluationException {
        if (index == 0) {
            return value;
        }
        V current = cache_values.getIfPresent(index);
        if (current != null) {
            return current;
        }
        V previous = get(index - 1);
        current = (V) operator.evaluate(new IVariable[]{new Variable(previous.getType(), previous)});
        cache_values.put(index, current);
        return current;
    }

    @Override
    public boolean isInfinite() {
        return true;
    }

    public static class Factory extends ValueTypeListProxyNBTFactorySimple<IValueType<IValue>, IValue, ValueTypeListProxyLazyBuilt<IValueType<IValue>, IValue>> {

        @Override
        public ResourceLocation getName() {
            return new ResourceLocation(Reference.MOD_ID, "lazybuilt");
        }

        @Override
        protected void serializeNbt(ValueTypeListProxyLazyBuilt<IValueType<IValue>, IValue> value, CompoundTag tag) throws IValueTypeListProxyFactoryTypeRegistry.SerializationException {
            tag.putString("valueType", value.value.getType().getUniqueName().toString());
            tag.put("value", ValueHelpers.serializeRaw(value.value));
            tag.put("operator", Operators.REGISTRY.serialize(value.operator));
        }

        @Override
        protected ValueTypeListProxyLazyBuilt<IValueType<IValue>, IValue> deserializeNbt(CompoundTag tag) throws IValueTypeListProxyFactoryTypeRegistry.SerializationException, EvaluationException {
            IValueType valueType = ValueTypes.REGISTRY.getValueType(new ResourceLocation(tag.getString("valueType")));
            IValue value = ValueHelpers.deserializeRaw(valueType, tag.get("value"));
            IOperator operator = Operators.REGISTRY.deserialize(tag.get("operator"));
            return new ValueTypeListProxyLazyBuilt<>(value, operator);
        }
    }
}


text:
USE [Koski_SA]
GO
IF  EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'sa', N'VIEW',N'v_eperusteet_tutkintojen_laajuudet', NULL,NULL))
EXEC sys.sp_dropextendedproperty @name=N'MS_DiagramPaneCount' , @level0type=N'SCHEMA',@level0name=N'sa', @level1type=N'VIEW',@level1name=N'v_eperusteet_tutkintojen_laajuudet'

GO
IF  EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'sa', N'VIEW',N'v_eperusteet_tutkintojen_laajuudet', NULL,NULL))
EXEC sys.sp_dropextendedproperty @name=N'MS_DiagramPane1' , @level0type=N'SCHEMA',@level0name=N'sa', @level1type=N'VIEW',@level1name=N'v_eperusteet_tutkintojen_laajuudet'

GO
IF  EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'sa', N'VIEW',N'v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat', NULL,NULL))
EXEC sys.sp_dropextendedproperty @name=N'MS_DiagramPaneCount' , @level0type=N'SCHEMA',@level0name=N'sa', @level1type=N'VIEW',@level1name=N'v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat'

GO
IF  EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'sa', N'VIEW',N'v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat', NULL,NULL))
EXEC sys.sp_dropextendedproperty @name=N'MS_DiagramPane1' , @level0type=N'SCHEMA',@level0name=N'sa', @level1type=N'VIEW',@level1name=N'v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat'

GO
/****** Object:  View [sa].[v_eperusteet_tutkinnot_osaamisalat]    Script Date: 9.8.2019 16:56:22 ******/
DROP VIEW IF EXISTS [sa].[v_eperusteet_tutkinnot_osaamisalat]
GO
/****** Object:  View [sa].[v_eperusteet_liputa_usean_tutkinnon_tutkinnonosat]    Script Date: 9.8.2019 16:56:22 ******/
DROP VIEW IF EXISTS [sa].[v_eperusteet_liputa_usean_tutkinnon_tutkinnonosat]
GO
/****** Object:  View [sa].[v_eperusteet_osaamisalat_tutkinnonosat_laajuudet]    Script Date: 9.8.2019 16:56:22 ******/
DROP VIEW IF EXISTS [sa].[v_eperusteet_osaamisalat_tutkinnonosat_laajuudet]
GO
/****** Object:  View [sa].[v_eperusteet_tutkintojen_laajuudet]    Script Date: 9.8.2019 16:56:22 ******/
DROP VIEW IF EXISTS [sa].[v_eperusteet_tutkintojen_laajuudet]
GO
/****** Object:  View [sa].[v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat]    Script Date: 9.8.2019 16:56:22 ******/
DROP VIEW IF EXISTS [sa].[v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat]
GO
/****** Object:  View [sa].[v_sa_eperusteet_suoritustavat_unpivot]    Script Date: 9.8.2019 16:56:22 ******/
DROP VIEW IF EXISTS [sa].[v_sa_eperusteet_suoritustavat_unpivot]
GO
/****** Object:  View [sa].[v_sa_eperusteet_suoritustavat_unpivot]    Script Date: 9.8.2019 16:56:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[sa].[v_sa_eperusteet_suoritustavat_unpivot]'))
EXEC dbo.sp_executesql @statement = N'

CREATE VIEW [sa].[v_sa_eperusteet_suoritustavat_unpivot]
AS
SELECT        taso, eperusteid, kuvaus, laajuusyksikko, suoritustapakoodi, tunniste, tutkinto, osaamisalakoodi, maksimikoko, maksimilaajuus, minimikoko, minimilaajuus, osan_tunniste, COALESCE (pakollinen, 0)
                         AS pakollinen, tutkinnonosa, tutkinnonosa_viite
FROM

(
	SELECT
		taso
		,eperusteid
		,kuvaus
		,laajuusyksikko
		,suoritustapakoodi
		,tunniste
		,tutkinto_fi AS tutkinto
		,maksimikoko_t1 AS maksimikoko
		,maksimilaajuus_t1 AS maksimilaajuus
		,minimikoko_t1 AS minimikoko
		,minimilaajuus_t1 AS minimilaajuus
		,osaamisalakoodi_t1 AS osaamisalakoodi
		,osan_tunniste_t1 AS osan_tunniste
		,pakollinen_t1 AS pakollinen
		,tutkinnonosa_fi_t1 AS tutkinnonosa
		,NULL AS tutkinnonosa_viite
	FROM sa.sa_eperusteet_suoritustavat
	WHERE (taso = 1)

	UNION

	SELECT        taso, eperusteid, kuvaus, laajuusyksikko, suoritustapakoodi, tunniste, tutkinto_fi, maksimikoko_t2 AS maksimikoko, maksimilaajuus_t2 AS maksimilaajuus, minimikoko_t2 AS minimikoko,
							minimilaajuus_t2 AS minimilaajuus, osaamisalakoodi_t2 AS osaamisalakoodi, osan_tunniste_t2 AS osan_tunniste, pakollinen_t2 AS pakollinen, tutkinnonosa_fi_t2 AS tutkinnonosa,
							tutkinnonosa_viite_t2 AS tutkinnonosa_viite
	FROM            sa.sa_eperusteet_suoritustavat AS sa_eperusteet_suoritustavat_3
	WHERE (taso = 2)
	--AND (tutkinnonosa_viite_t2 IS NOT NULL)

	UNION

	SELECT        taso, eperusteid, kuvaus, laajuusyksikko, suoritustapakoodi, tunniste, tutkinto_fi AS tutkinto, maksimikoko_t3 AS maksimikoko, maksimilaajuus_t3 AS maksimilaajuus, minimikoko_t3 AS minimikoko,
							minimilaajuus_t3 AS minimilaajuus, osaamisalakoodi_t3 AS osaamisalakoodi, osan_tunniste_t3 AS osan, pakollinen_t3 AS pakollinen, tutkinnonosa_fi_t3 AS tutkinnonosa,
							tutkinnonosa_viite_t3 AS tutkinnonosa_viite
	FROM            sa.sa_eperusteet_suoritustavat AS sa_eperusteet_suoritustavat_2
	WHERE (taso = 3)
	--AND (tutkinnonosa_viite_t3 IS NOT NULL)

	UNION

	SELECT        taso, eperusteid, kuvaus, laajuusyksikko, suoritustapakoodi, tunniste, tutkinto_fi AS tutkinto, maksimikoko_t4 AS maksimikoko, maksimilaajuus_t4 AS maksimilaajuus, minimikoko_t4 AS minimikoko,
							minimilaajuus_t4 AS minimilaajuus, osaamisalakoodi_t4 AS osaamisalakoodi, osan_tunniste_t4 AS osan_tunniste, pakollinen_t4 AS pakollinen, tutkinnonosa_fi_t4 AS tutkinnonosa,
							tutkinnonosa_viite_t4 AS tutkinnonosa_viite
	FROM            sa.sa_eperusteet_suoritustavat AS sa_eperusteet_suoritustavat_1
	WHERE (taso = 4)
	--AND (tutkinnonosa_viite_t4 IS NOT NULL)

) AS t

'
GO
/****** Object:  View [sa].[v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat]    Script Date: 9.8.2019 16:56:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[sa].[v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat]'))
EXEC dbo.sp_executesql @statement = N'

CREATE VIEW [sa].[v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat] AS

SELECT distinct
	 eto.tutkinnonosaid AS eto_tutkinnonosaid
	,tov.tutkinnonosaid AS tov_tutkinnonosaid
	,tov.tutkinnonosaviiteid
	,epsu.tutkinnonosa_viite
	,tov.eperusteid AS tov_eperusteid
	,epsu.suoritustapakoodi
	,tov.laajuus AS tutkinnonosa_laajuus
	,epsu.pakollinen
FROM sa.v_sa_eperusteet_suoritustavat_unpivot AS epsu
RIGHT JOIN sa.sa_eperusteet_tutkinnonosaviitteet AS tov ON epsu.tutkinnonosa_viite = tov.tutkinnonosaviiteid
INNER JOIN sa.sa_eperusteet_tutkinnonosat AS eto ON tov.tutkinnonosaid = eto.tutkinnonosaid

'
GO
/****** Object:  View [sa].[v_eperusteet_tutkintojen_laajuudet]    Script Date: 9.8.2019 16:56:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[sa].[v_eperusteet_tutkintojen_laajuudet]'))
EXEC dbo.sp_executesql @statement = N'

/*order by eperusteid*/
CREATE VIEW [sa].[v_eperusteet_tutkintojen_laajuudet] AS

SELECT DISTINCT
	eperusteid
	,minimilaajuus
	,maksimilaajuus
	,minimilaajuus - maksimilaajuus AS min_maks_ero
FROM sa.sa_eperusteet_suoritustavat
WHERE (minimilaajuus IS NOT NULL)

'
GO
/****** Object:  View [sa].[v_eperusteet_osaamisalat_tutkinnonosat_laajuudet]    Script Date: 9.8.2019 16:56:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[sa].[v_eperusteet_osaamisalat_tutkinnonosat_laajuudet]'))
EXEC dbo.sp_executesql @statement = N'

CREATE VIEW [sa].[v_eperusteet_osaamisalat_tutkinnonosat_laajuudet] AS
/*
jhe 23.4.2019, 14.5.2019, 23.5.2019,4.6.2019
AP 23.6.2019 lisätty rank

drop table [sa].[f_eperusteet_osaamisalat_tutkinnonosat_laajuudet]
select *
into [sa].[f_eperusteet_osaamisalat_tutkinnonosat_laajuudet]
from [sa].[v_eperusteet_osaamisalat_tutkinnonosat_laajuudet]

select tutkinnonosa_koodi, count(distinct tutkinnonosa_laajuus) as laajuuksia_kpl
from [sa].[f_eperusteet_osaamisalat_tutkinnonosat_laajuudet]
group by tutkinnonosa_koodi
order by count(distinct tutkinnonosa_laajuus) desc

*/

SELECT DISTINCT
-- jhe 23.5 2019 raskas distinct siksi, että eper virheen takia erään tutkinnonosakoodin takaa..
--.. löytyy useampaa kuin yhtä laajuutta ja tämä tuottaisi ylimääräisiä rivejä sp-laskennassa
--.. oikeat arvot tuodaa sp-laskennassa mukaan vastaavasti kovakoodattuna

-- jhe 4.6.2019, id komm pois
  t.eperusteid,
  t.diaarinumero,
  t.diaarivuosi,
  --jhe 13.5.2019 yhdistelmäavaimet
  -- osaamisalan yhdistelmäavain, jos ei osaamisaloja, käytetään tutkinnon yhdistelmäavainta

  case when t.osaamisala_koodi is null then t.diaarinumero + ''_'' + cast(
    t.tutkinto_koodi as varchar(100))
   else diaarinumero + ''_'' + cast(
    t.tutkinto_koodi as varchar(100)
  )+ ''_'' + cast(
    t.osaamisala_koodi as varchar(100)
	  )+ ''_'' + cast(
    t.tutkinnonosa_koodi as varchar(100)
  ) end as diaarinumero_tutkinto_osaamisala_tutkinnonosa_koodi,

  case when t.osaamisala_koodi is null then t.diaarinumero + ''_'' + cast(
    t.tutkinto_koodi as varchar(100))
   else diaarinumero + ''_'' + cast(
    t.tutkinto_koodi as varchar(100)
  )+ ''_'' + cast(
    t.osaamisala_koodi as varchar(100)
  ) end as diaarinumero_tutkinto_osaamisala_koodi,

  --diaarinumeron ja tutkinnonosan yhdistelmäavain
  t.diaarinumero + ''_'' + cast(
    t.tutkinnonosa_koodi as varchar(100)
  ) as diaarinumero_tutkinnonosa_koodi,

  --tutkinnon ja tutkinnonosan yhdistelmäavain
  t.diaarinumero + ''_'' + cast(
    t.tutkinto_koodi as varchar(100)
  )+ ''_'' + cast(
    t.tutkinnonosa_koodi as varchar(100)
  ) as diaarinumero_tutkinto_tutkinnonosa_koodi,

  --tutkinnon yhdistelmäavain
  t.diaarinumero + ''_'' + cast(
    t.tutkinto_koodi as varchar(100)
  ) as diaarinumero_tutkinto_koodi,

  CASE WHEN t.tutkinnonosa_koodi IS NULL THEN t.tutkinto_koodi ELSE CAST(
    t.tutkinto_koodi AS varchar(20)
  ) + ''_'' + CAST(
    t.tutkinnonosa_koodi AS varchar(20)
  ) END AS tutkinto_ja_tutkinnonosa_koodi,

  kl.tutkintotyyppinimi AS tutkintotyyppi,
  t.tutkinto_koodi,
  t.tutkinto,
  t.tutkinnon_laajuus,
  t.osaamisala_koodi,
  t.osaamisala,
  t.tutkinnonosa,
  t.tutkinnonosa_koodi,

      	-- jhe 23.5. päättely, jolla ratkaistaan muutaman tutkintokoodin
	--.. kohdalle sattunut virhe, kaksi laajuutta samalla koodilla
	--.. tässä kovakoodataan niille tilapäisesti arvoksi 0, tämä oikaistaan myöhemmin
	case
		when t.diaarinumero=''OPH-1224-2018'' and t.tutkinnonosa_koodi=300400 then 0
		when t.diaarinumero=''OPH-1224-2018'' and t.tutkinnonosa_koodi=300403 then 0
		when t.diaarinumero=''OPH-1396-2018'' and t.tutkinnonosa_koodi=300400 then 0
		when t.diaarinumero=''OPH-1396-2018'' and t.tutkinnonosa_koodi=300403 then 0
		else t.tutkinnonosa_laajuus
	end as tutkinnonosa_laajuus,

--  t.tutkinnonosa_laajuus,
  t.tutkinnonosa_pakollinen,
  t.eperuste_tila,
  t.eperuste_voimassaoloalkaa,
  t.eperuste_voimassaololoppuu,
  t.eperuste_paatospvm,
  t.eperuste_siirtymapaattyy,

  rank() over (partition by tutkinnonosa_koodi order by osaamisala) as rnk,
  rank() over (partition by tutkinnonosa_koodi order by osaamisala, eperuste_voimassaoloalkaa desc, eperusteid desc,tutkinnonosa_pakollinen, coalesce(tutkinnonosa_laajuus,0) desc) as rnk2

/*--ks. 23.5 kommentit
  ,t.vanhan_tutkinnon_koodi,
  t.vanha_tutkinto*/
FROM (

    SELECT DISTINCT

		ep.diaarinumero,
		Cast(
		RIGHT(ep.diaarinumero, 4) AS INT
		) AS diaarivuosi,
		ep.eperusteid AS eperusteid,
		ep.tutkintokoodi AS tutkinto_koodi,
		ep.nimi_fi AS tutkinto,
		--jhe 14.5.2019 jos vanha tutkinto, laajuus vtl-taulusta, korjaus 23.5, ei otetakaan
		/*isnull(vtl.tutkinnon_laajuus,eptl.minimilaajuus) AS tutkinnon_laajuus, */
		eptl.minimilaajuus AS tutkinnon_laajuus,
		epo.osaamisala_koodi,
		epo.nimi_fi AS osaamisala,
		epto.nimi_fi AS tutkinnonosa,
		epto.koodiarvo AS tutkinnonosa_koodi,
		--jhe 14.5.2019 jos vanha tutkinto, laajuus vtl-taulusta, korjaus 23.5, ei otetakaan
		/*isnull(vtl.tutkinnonosa_laajuus,spst.tutkinnonosa_laajuus) as tutkinnonosa_laajuus, */

		spst.tutkinnonosa_laajuus as tutkinnonosa_laajuus,
		spst.pakollinen AS tutkinnonosa_pakollinen,
		ep.tila AS eperuste_tila,
		ep.voimassaoloalkaa AS eperuste_voimassaoloalkaa,
		ep.voimassaololoppuu AS eperuste_voimassaololoppuu,
		ep.paatospvm AS eperuste_paatospvm,
		ep.siirtymapaattyy AS eperuste_siirtymapaattyy
		-- ks. muut 235. kommentit
		/*,vtl.tutkinto_koodi as vanhan_tutkinnon_koodi,
		case when vtl.tutkinto_koodi is null then 0 else 1 end as vanha_tutkinto*/

    FROM [sa].[v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat] AS spst
	INNER JOIN sa.sa_eperusteet_tutkinnonosat AS epto ON epto.tutkinnonosaid = spst.eto_tutkinnonosaid and epto.eperusteid=spst.tov_eperusteid
	LEFT JOIN sa.sa_eperusteet_osaamisalat AS epo ON epo.eperusteid = epto.eperusteid
	RIGHT OUTER JOIN sa.sa_eperusteet AS ep ON ep.eperusteid = epto.eperusteid
	LEFT OUTER JOIN sa.v_eperusteet_tutkintojen_laajuudet AS eptl ON eptl.eperusteid = ep.eperusteid
	--INNER JOIN sa.v_eperusteet_tutkintojen_laajuudet AS eptl

	--jhe 23.5 Sepon uuden speksin mukaan vanhojen tutkintojen laajuus tuodaan diaarinumerolla
	--.. taulusta [sa].[f_spl_vanhat_tutkinnot_laajuus_diaarinumerokohdistus]
	--.. tätä ei voi tehdä osasuoritustasolla, koska diaarinro on pääsuoritustasolla..
	--.. joten vanhojen laajuutta ei ketjutetakaan eperuste-kyselyyn kuten aiemmin speksattu:
	/*left JOIN sa.f_spl_vanhat_tutkinnot_laajuus vtl ON vtl.tutkinto_koodi=ep.tutkintokoodi*/

) AS t

INNER JOIN antero.sa.sa_koulutusluokitus AS kl ON t.tutkinto_koodi = kl.koodi

'
GO
/****** Object:  View [sa].[v_eperusteet_liputa_usean_tutkinnon_tutkinnonosat]    Script Date: 9.8.2019 16:56:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[sa].[v_eperusteet_liputa_usean_tutkinnon_tutkinnonosat]'))
EXEC dbo.sp_executesql @statement = N'

CREATE view [sa].[v_eperusteet_liputa_usean_tutkinnon_tutkinnonosat]
as
select
	cast(koodiarvo as varchar(25)) as tutkinnonosa_koodi_char
	,koodiarvo as tutkinnonosa_koodi
	,count(koodiarvo) as lkm
	,case
		when count(koodiarvo) > 1 then 1
		else 0
	 end as usean_tutkinnon_tutkinnonosa
from (

	SELECT distinct [eperusteid],
		[koodiarvo]
	FROM [Koski_SA].[sa].[sa_eperusteet_tutkinnonosat]

) t
group by koodiarvo

'
GO
/****** Object:  View [sa].[v_eperusteet_tutkinnot_osaamisalat]    Script Date: 9.8.2019 16:56:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[sa].[v_eperusteet_tutkinnot_osaamisalat]'))
EXEC dbo.sp_executesql @statement = N'

CREATE VIEW [sa].[v_eperusteet_tutkinnot_osaamisalat]

/*
jhe 8.5.2019, 12.5
-- tässä luodaan yhdistelmäavain, joka tarvitaan kustannusryhmien määrittelyssä sp-laskennassa
-- ks Anteron näkymä [dw].[v_amos_spl_koski_paatason_suoritukset_ja_kustannusryhmat]

select count(*) as lkm
from [sa].[v_eperusteet_tutkinnot_osaamisalat]

select top 10 *
from [sa].[v_eperusteet_tutkinnot_osaamisalat]
where tutkinnonosa_laajuus is not null

select *
from [sa].[v_eperusteet_tutkinnot_osaamisalat]

*/

AS

select
-- 12.5.2019 lisätään diaarinumero yhdistelmäavaimeen, Sepon speksi
t.diaarinumero+''_''+CASE WHEN t.osaamisala_koodi IS NULL THEN t.tutkinto_koodi ELSE CAST(t.tutkinto_koodi AS varchar(20)) + ''_'' + CAST(t.osaamisala_koodi AS varchar(20)) END as diaarinumero_tutkinto_ja_osaamisala_koodi,
CASE
	WHEN t.osaamisala_koodi IS NULL THEN t.tutkinto_koodi
	ELSE CAST(t.tutkinto_koodi AS varchar(20)) + ''_'' + CAST(t.osaamisala_koodi AS varchar(20))
END AS tutkinto_ja_osaamisala_koodi,tutkinto_koodi
,osaamisala_koodi
from (
	SELECT DISTINCT
		ep.diaarinumero,ep.tutkintokoodi as tutkinto_koodi
		,epo.osaamisala_koodi
	FROM sa.sa_eperusteet ep
	left outer JOIN sa.sa_eperusteet_osaamisalat epo ON ep.eperusteid = epo.eperusteid
) t
where tutkinto_koodi is not null

'
GO
IF NOT EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'sa', N'VIEW',N'v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties =
   Begin PaneConfigurations =
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[44] 4[9] 2[16] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane =
      Begin Origin =
         Top = 0
         Left = 0
      End
      Begin Tables =
         Begin Table = "epsu"
            Begin Extent =
               Top = 6
               Left = 38
               Bottom = 136
               Right = 224
            End
            DisplayFlags = 280
            TopColumn = 12
         End
         Begin Table = "tov"
            Begin Extent =
               Top = 6
               Left = 262
               Bottom = 177
               Right = 525
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "eto"
            Begin Extent =
               Top = 138
               Left = 38
               Bottom = 268
               Right = 222
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane =
   End
   Begin DataPane =
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 9
         Width = 284
         Width = 1500
         Width = 3420
         Width = 3135
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane =
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'sa', @level1type=N'VIEW',@level1name=N'v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat'
GO
IF NOT EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'sa', N'VIEW',N'v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'sa', @level1type=N'VIEW',@level1name=N'v_eperusteet_tutkinnonosat_tutkinnonosaviitteet_suoritustavat'
GO
IF NOT EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'sa', N'VIEW',N'v_eperusteet_tutkintojen_laajuudet', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties =
   Begin PaneConfigurations =
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane =
      Begin Origin =
         Top = 0
         Left = 0
      End
      Begin Tables =
         Begin Table = "sa_eperusteet_suoritustavat (sa)"
            Begin Extent =
               Top = 6
               Left = 38
               Bottom = 136
               Right = 239
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane =
   End
   Begin DataPane =
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 9
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane =
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'sa', @level1type=N'VIEW',@level1name=N'v_eperusteet_tutkintojen_laajuudet'
GO
IF NOT EXISTS (SELECT * FROM sys.fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'sa', N'VIEW',N'v_eperusteet_tutkintojen_laajuudet', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'sa', @level1type=N'VIEW',@level1name=N'v_eperusteet_tutkintojen_laajuudet'
GO
USE [ANTERO]


text:
namespace IECoreSceneModule
{
void bindStateRenderable();
}

#endif // IECORESCENEMODULE_STATERENDERABLEBINDING_H


text:
package distribution;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import distribution.services.jcloud.VMManager;
import distribution.services.jcloud.VmBuilder;
import distribution.services.model.RunningVM;
import utilsconf.UtilsConf;

public class VMManagerProxy extends ClientProxy implements VMManager, IVMManagerCallback {

	private VMManagerCallback callback;

	public VMManagerProxy() throws UnknownHostException {
		this.host = InetAddress.getLocalHost().getHostName();
		this.port = UtilsConf.nextPortAvailable();
	}

	public VMManagerProxy(String h, int p) {
		this.host = h;
		this.port = p;
	}

	@Override
	public int countRunningVms(String cluster, String type) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean add(VmBuilder vmBuilder, VMManagerCallback callback) throws Exception, Throwable {
		this.callback.setFineshed(false);
		this.callback = callback;
		Invocation inv = new Invocation();
		Termination ter = new Termination();
		ArrayList<Object> parameters = new ArrayList<Object>();
		class Local {
		}
		;
		String methodName;
		Requestor requestor = new Requestor();

		// information received from Client
		methodName = Local.class.getEnclosingMethod().getName();
		parameters.add(vmBuilder);

		// information sent to Requestor
		inv.setClientProxy(this);
		inv.setOperationName(methodName);
		inv.setParameters(parameters);
		this.callback.setId(requestor.hashCode());
		// invoke Requestor
		requestor.invoke(inv, this, null);

		// Coloquei true direto só pra não alterar o método, o tratamento do add vai ser feito no callback.
		return true;
	}

	@Override
	public List<RunningVM> getRunningVms(String cluster) throws Exception, Throwable {
		Invocation inv = new Invocation();
		Termination ter = new Termination();
		ArrayList<Object> parameters = new ArrayList<Object>();
		class Local {
		}
		;
		String methodName;
		Requestor requestor = new Requestor();

		// information received from Client
		methodName = Local.class.getEnclosingMethod().getName();
		parameters.add(cluster);

		// information sent to Requestor
		inv.setClientProxy(this);
		inv.setOperationName(methodName);
		inv.setParameters(parameters);

		// invoke Requestor
		ter = requestor.invoke(inv, this, null);

		return (List<RunningVM>)ter.getResult();
	}

	@Override
	public boolean remove(String cluster) throws Exception, Throwable {

		Invocation inv = new Invocation();
		Termination ter = new Termination();
		ArrayList<Object> parameters = new ArrayList<Object>();
		class Local {
		}
		;
		String methodName;
		Requestor requestor = new Requestor();

		// information received from Client
		methodName = Local.class.getEnclosingMethod().getName();
		parameters.add(cluster);

		// information sent to Requestor
		inv.setClientProxy(this);
		inv.setOperationName(methodName);
		inv.setParameters(parameters);

		// invoke Requestor
		ter = requestor.invoke(inv, this, null);

		return (Boolean) ter.getResult();
	}

	@Override
	public Set<String> getRunningTypes(String cluster) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<RunningVM> getRunningVms(String cluster, String type) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Termination receiveMessage(byte[] msg) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public float sendVmSettings(Termination termination) {
		this.callback.sendVmSettings(termination);
		return 0;
	}

}


text:
package com.blogspot.nagabhushan;

public final class ParseConstants {
	// Class name
	public static final String CLASS_MESSAGES = "Messages";

	// Field names
	// The names are mainly related to the Parse Object keys
	public static final String KEY_USER_ID = "userId";
	public static final String KEY_USERNAME = "username";
	public static final String KEY_FRIENDS_RELATION = "friendsRelation";
	public static final String KEY_RECIPIENT_IDS = "recipientIds";
	public static final String KEY_SENDER_ID = "senderId";
	public static final String KEY_SENDER_NAME = "senderName";
	public static final String KEY_FILE = "file";
	public static final String KEY_FILE_TYPE = "fileType";
	public static final String KEY_CREATED_AT = "createdAt";

	public static final String TYPE_IMAGE = "image";
	public static final String TYPE_VIDEO = "video";
}


text:
.class Landroid/speech/tts/TextToSpeech$1;
.super Ljava/lang/Object;
.source "TextToSpeech.java"

# interfaces
.implements Landroid/speech/tts/TextToSpeech$Action;

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Landroid/speech/tts/TextToSpeech;->shutdown()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/speech/tts/TextToSpeech$Action",
        "<",
        "Ljava/lang/Void;",
        ">;"
    }
.end annotation

# instance fields
.field final synthetic this$0:Landroid/speech/tts/TextToSpeech;

# direct methods
.method constructor <init>(Landroid/speech/tts/TextToSpeech;)V
    .locals 0
    .param p1, "this$0"    # Landroid/speech/tts/TextToSpeech;

    .prologue
    .line 840
    iput-object p1, p0, Landroid/speech/tts/TextToSpeech$1;->this$0:Landroid/speech/tts/TextToSpeech;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public bridge synthetic run(Landroid/speech/tts/ITextToSpeechService;)Ljava/lang/Object;
    .locals 1
    .param p1, "service"    # Landroid/speech/tts/ITextToSpeechService;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 842
    invoke-virtual {p0, p1}, Landroid/speech/tts/TextToSpeech$1;->run(Landroid/speech/tts/ITextToSpeechService;)Ljava/lang/Void;

    move-result-object v0

    return-object v0
.end method

.method public run(Landroid/speech/tts/ITextToSpeechService;)Ljava/lang/Void;
    .locals 2
    .param p1, "service"    # Landroid/speech/tts/ITextToSpeechService;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v1, 0x0

    .line 843
    iget-object v0, p0, Landroid/speech/tts/TextToSpeech$1;->this$0:Landroid/speech/tts/TextToSpeech;

    invoke-static {v0}, Landroid/speech/tts/TextToSpeech;->-wrap1(Landroid/speech/tts/TextToSpeech;)Landroid/os/IBinder;

    move-result-object v0

    invoke-interface {p1, v0, v1}, Landroid/speech/tts/ITextToSpeechService;->setCallback(Landroid/os/IBinder;Landroid/speech/tts/ITextToSpeechCallback;)V

    .line 844
    iget-object v0, p0, Landroid/speech/tts/TextToSpeech$1;->this$0:Landroid/speech/tts/TextToSpeech;

    invoke-static {v0}, Landroid/speech/tts/TextToSpeech;->-wrap1(Landroid/speech/tts/TextToSpeech;)Landroid/os/IBinder;

    move-result-object v0

    invoke-interface {p1, v0}, Landroid/speech/tts/ITextToSpeechService;->stop(Landroid/os/IBinder;)I

    .line 845
    iget-object v0, p0, Landroid/speech/tts/TextToSpeech$1;->this$0:Landroid/speech/tts/TextToSpeech;

    invoke-static {v0}, Landroid/speech/tts/TextToSpeech;->-get3(Landroid/speech/tts/TextToSpeech;)Landroid/speech/tts/TextToSpeech$Connection;

    move-result-object v0

    invoke-virtual {v0}, Landroid/speech/tts/TextToSpeech$Connection;->disconnect()V

    .line 853
    iget-object v0, p0, Landroid/speech/tts/TextToSpeech$1;->this$0:Landroid/speech/tts/TextToSpeech;

    invoke-static {v0, v1}, Landroid/speech/tts/TextToSpeech;->-set2(Landroid/speech/tts/TextToSpeech;Landroid/speech/tts/TextToSpeech$Connection;)Landroid/speech/tts/TextToSpeech$Connection;

    .line 854
    iget-object v0, p0, Landroid/speech/tts/TextToSpeech$1;->this$0:Landroid/speech/tts/TextToSpeech;

    invoke-static {v0, v1}, Landroid/speech/tts/TextToSpeech;->-set1(Landroid/speech/tts/TextToSpeech;Ljava/lang/String;)Ljava/lang/String;

    .line 855
    return-object v1
.end method


text:
/**
 * This class is generated by jOOQ
 */
package de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.pojos;

/**
 * This class is generated by jOOQ.
 */
@javax.annotation.Generated(value    = { "http://www.jooq.org", "3.4.4" },
                            comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class AreaMemberCount implements de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.interfaces.IAreaMemberCount {

	private static final long serialVersionUID = -335383611;

	private final java.lang.Integer areaId;
	private final java.lang.Long    directMemberCount;
	private final java.lang.Long    memberWeight;

	public AreaMemberCount(
		java.lang.Integer areaId,
		java.lang.Long    directMemberCount,
		java.lang.Long    memberWeight
	) {
		this.areaId = areaId;
		this.directMemberCount = directMemberCount;
		this.memberWeight = memberWeight;
	}

	@Override
	public java.lang.Integer getAreaId() {
		return this.areaId;
	}

	@Override
	public java.lang.Long getDirectMemberCount() {
		return this.directMemberCount;
	}

	@Override
	public java.lang.Long getMemberWeight() {
		return this.memberWeight;
	}
}


text:
from await import app as application

application = app


text:
from . import DEFAULT_BASE_URL, format_date, format_datetime
from .models import Event, Post, Person, Membership, Officership, Database
from .requester import Requester

class AcmLib:

    def __init__(self, username=None, password=None,
            base_url=DEFAULT_BASE_URL):
        """
        :param: username: str
        :param: password: str
        :param: base_url: str
        """

        self.__requester = Requester(username, password, base_url)

    def get_person(self, id_or_username):
        """
        :calls: `GET /person/`
        :param id_or_username: str or int
        :rtype: :class: `Person`
        """
        response = self.__requester.get(["/people/", id_or_username])
        return self.__process_response(response, Person)

    def get_people(self):
        """
        :calls: `GET /person/`
        :rtype: :class: [`Person`]
        """
        response = self.__requester.get("/people/")
        return self.__process_list_response(response, Person)

    def add_person(self, username, password, name=None, email=None,
            website=None):
        """
        :calls: `POST /person/`
        :param: username: str
        :param: password: str
        :param: name: str
        :param: email: str
        :param: website: str
        :rtype: :class: [`Person`]
        """

        data = dict(
            username = username,
            password = password,
            name = name,
            email = email,
            website = website,
            )

        response = self.__requester.post("/people/", data)

        return self.__process_response(response, Person)

    def update_person(self, id_or_username, password=None, name=None,
            email=None, website=None):
        """
        :calls: `PUT /person/`
        :param: id_or_username: int or str
        :param: password: str
        :param: name: str
        :param: email: str
        :rtype: :class: [`Person`]
        """

        data = dict(
            password = password,
            name = name,
            email = email,
            website = website,
            )

        response = self.__requester.put(
                ["/people/", id_or_username], data)

        return self.__process_response(response, Person)

    def delete_person(self, id_or_username):
        """
        :calls: `DELETE /person/`
        :param: id_or_username: int or str
        """

        response = self.__requester.delete(["/people/", id_or_username])

    def get_event(self, event_id):
        """
        :calls: `GET /events/`
        :param code: int
        :rtype: :class: `Event`
        """
        response = self.__requester.get(["/events/", event_id])

        return map(lambda entry:
            Event.from_json(
                self.__requester, response.headers, entry),
            response.json())

    def get_events(self):
        """
        :calls: `GET /events/`
        :rtype: :class: [`Event`]
        """
        response = self.__requester.get("/events/")
        return self.__process_list_response(response, Event)

    def add_event(self, start, end, title=None, description=None,
            location=None, speaker=None):
        """
        :calls: `POST /event/`
        :param: start: datetime
        :param: end: datetime
        :param: title: str
        :param: description: str
        :param: location: str
        :param: speaker: str
        :rtype: :class: [`Event`]
        """

        data = dict(
            start = format_datetime(start),
            end = format_datetime(end),
            title = title,
            description = description,
            location = location,
            speaker = speaker,
            )

        response = self.__requester.post("/events/", data)

        return self.__process_response(response, Event)

    def update_event(self, event_id, start=None, end=None, title=None,
            description=None, location=None, speaker=None):
        """
        :calls: `PUT /event/`
        :param: event_id: int
        :param: start: datetime
        :param: end: datetime
        :param: title: str
        :param: description: str
        :param: location: str
        :param: speaker: str
        :rtype: :class: [`Event`]
        """

        data = dict(
            start = format_datetime(start) if start else None,
            end = end,
            title = title,
            description = description,
            location = location,
            speaker = speaker,
            )

        response = self.__requester.put(["/events/", event_id], data)

        return self.__process_response(response, Event)

    def get_post(self, post_id):
        """
        :calls: `GET /posts/`
        :param code: int
        :rtype: :class: `Post`
        """
        response = self.__requester.get(["/posts/", post_id])
        return self.__process_list_response(response, Post)

    def get_posts(self):
        """
        :calls: `GET /posts/`
        :rtype: :class: [`Post`]
        """
        response = self.__requester.get("/posts/")
        return self.__process_list_response(response, Post)

    def add_post(self, title=None, description=None, content=None):
        """
        :calls: `POST /posts/`
        :param: title: str
        :param: description: str
        :param: content: str
        :rtype: :class: [`Post`]
        """

        data = dict(
            title = title,
            description = description,
            content = content,
            )

        response = self.__requester.post("/posts/", data)

        return self.__process_response(response, Post)

    def update_post(self, post_id, title=None, description=None,
            content=None):
        """
        :calls: `PUT /posts/`
        :param: post_id: int
        :param: title: str
        :param: description: str
        :param: content: str
        :rtype: :class: [`Post`]
        """

        data = dict(
            title = title,
            description = description,
            content = content,
            )

        response = self.__requester.put(["/posts/", post_id], data)

        return self.__process_response(response, Post)

    def get_membership(self, membership_id):
        """
        :calls: `GET /memberships/`
        :param code: int
        :rtype: :class: `Membership`
        """
        response = self.__requester.get(["/memberships/", membership_id])
        return self.__process_response(response, Membership)

    def get_memberships(self):
        """
        :calls: `GET /memberships/`
        :rtype: :class: [`Membership`]
        """
        response = self.__requester.get("/memberships/")
        return self.__process_list_response(response, Membership)

    def add_membership(self, person_id, start_date, end_date=None):
        """
        :calls: `POST /membership/`
        :param: person_id: int
        :param: start: datetime
        :param: end: datetime
        :rtype: :class: [`Membership`]
        """

        data = dict(
            person_id = person_id,
            start_date = format_date(start_date),
            end_date = format_date(end_date) if end_date else None,
            )

        response = self.__requester.post("/memberships/", data)

        return self.__process_response(response, Membership)

    def update_membership(self, membership_id, start_date=None, end_date=None):
        """
        :calls: `PUT /membership/`
        :param: id_or_username: int
        :rtype: :class: [`Membership`]
        """

        data = dict(
            start_date = format_date(start_date) if start_date else None,
            end_date = format_date(end_date) if end_date else None,
            )
        response = self.__requester.put(
                ["/memberships/", membership_id], data)

        return self.__process_response(response, Membership)

    def delete_membership(self, membership_id):
        """
        :calls: `DELETE /membership/`
        :param: id_or_username: int
        """

        response = self.__requester.delete(["/memberships/", membership_id])

    def get_officership(self, officership_id):
        """
        :calls: `GET /officerships/`
        :param code: int
        :rtype: :class: `Officership`
        """
        response = self.__requester.get(["/officerships/", officership_id])
        return self.__process_response(response, Officership)

    def get_officerships(self):
        """
        :calls: `GET /officerships/`
        :rtype: :class: [`Officership`]
        """
        response = self.__requester.get("/officerships/")
        return self.__process_list_response(response, Officership)

    def add_officership(self, person_id, title, start_date, end_date=None):
        """
        :calls: `POST /officership/`
        :param: person_id: int
        :param: title: str
        :param: start: datetime
        :param: end: datetime
        :rtype: :class: [`Officership`]
        """

        data = dict(
            person_id = person_id,
            title = title,
            start_date = start_date,
            end_date = end_date,
            )

        response = self.__requester.post("/officerships/", data)

        return self.__process_response(response, Officership)

    def update_officership(self, officership_id, title=None, start_date=None,
            end_date=None):
        """
        :calls: `PUT /officership/`
        :param: officership_id: int
        :param: title: str
        :param: start: date
        :param: end: date
        :rtype: :class: [`Officership`]
        """

        data = dict(
            title = title,
            start_date = start_date,
            end_date = end_date,
            )

        response = self.__requester.put(
                ["/officerships/", officership_id], data)

        return self.__process_response(response, Officership)

    def delete_officership(self, officership_id):
        """
        :calls: `DELETE /officership/`
        :param: id_or_username: int
        """

        response = self.__requester.delete(["/officerships/", officership_id])

    def get_database(self):
        """
        :calls: `GET /database/`
        :rtype: :class: `Database`
        """
        response = self.__requester.get("/database/")
        return self.__process_response(response, Database)

    def __process_list_response(self, response, model):
        return map(lambda entry:
            model.from_json(
                self.__requester, response.headers, entry),
            response.json())

    def __process_response(self, response, model):
        return model.from_json(self.__requester, response.headers,
                response.json())


text:
package edu.usu.sdl.openstorefront.core.view;

import edu.usu.sdl.openstorefront.core.entity.UserMessage;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author dshurtleff
 */
public class UserMessageWrapper
{

	private long totalNumber;
	private List<UserMessage> data = new ArrayList<>();

	public UserMessageWrapper()
	{
	}

	public long getTotalNumber()
	{
		return totalNumber;
	}

	public void setTotalNumber(long totalNumber)
	{
		this.totalNumber = totalNumber;
	}

	public List<UserMessage> getData()
	{
		return data;
	}

	public void setData(List<UserMessage> data)
	{
		this.data = data;
	}

}


text:
<?php
/**
 * [PHPFOX_HEADER]
 */

defined('PHPFOX') or exit('NO DICE!');

/**
 *
 *
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Raymond Benc
 * @package 		Phpfox_Component
 * @version 		$Id: news.class.php 4031 2012-03-20 15:08:25Z Raymond_Benc $
 */
class Core_Component_Block_News extends Phpfox_Component
{
	/**
	 * Class process method wnich is used to execute this component.
	 */
	public function process()
	{
		$aNews = Phpfox::getService('core.admincp')->getNews();

		if ($aNews === false)
		{
			return false;
		}

		if (!Phpfox::getUserParam('core.can_view_news_updates'))
		{
			return false;
		}

		if ((is_array($aNews) && !count($aNews)) || is_bool($aNews))
		{
			return false;
		}

		$this->template()->assign(array(
				'sHeader' => Phpfox::getPhrase('admincp.phpfox_news_and_updates'),
				'aPhpfoxNews' => $aNews
			)
		);

		return 'block';
	}

	/**
	 * Garbage collector. Is executed after this class has completed
	 * its job and the template has also been displayed.
	 */
	public function clean()
	{
		(($sPlugin = Phpfox_Plugin::get('core.component_block_news_clean')) ? eval($sPlugin) : false);
	}
}

?>


text:
"""
Created on Thu Dec 17 11:50:47 2015

@author: teichman
"""

import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.framework import dtypes
from tensorflow.python.training import queue_runner
import os
import numpy as np

# Global constants describing out car data set.
IMAGE_SIZE = 32
NUM_CLASSES = 2

def input_pipeline(filename, batch_size, num_labels,
                   processing_image=lambda x:x,
                   processing_label=lambda y:y,
                   num_epochs=None):

    """The input pipeline for reading images classification data.

    The data should be stored in a single text file of using the format:

     /path/to/image_0 label_0
     /path/to/image_1 label_1
     /path/to/image_2 label_2
     ...

     Args:
       filename: the path to the txt file
       batch_size: size of batches produced
       num_epochs: optionally limited the amount of epochs

    Returns:
       List with all filenames in file image_list_file
    """

    # Reads pfathes of images together with there labels
    image_list, label_list = read_labeled_image_list(filename)

    images = ops.convert_to_tensor(image_list, dtype=dtypes.string)
    labels = ops.convert_to_tensor(label_list, dtype=dtypes.int32)

    # Makes an input queue
    input_queue = tf.train.slice_input_producer([images, labels],
                                                num_epochs=num_epochs,
                                                shuffle=True)

    # Reads the actual images from
    image, label = read_images_from_disk(input_queue,num_labels=num_labels)
    pr_image = processing_image(image)
    pr_label = processing_label(label)

    image_batch, label_batch = tf.train.batch([pr_image, pr_label],
                                              batch_size=batch_size)

    tf.image_summary('images', image_batch)
    return image_batch, label_batch

def inputs(filename, batch_size, num_labels,num_epochs=None):

  def pr_image(image):
    return tf.image.per_image_whitening(image)

  return input_pipeline(filename, batch_size,num_labels, processing_image=pr_image
                        ,num_epochs=None)

def distorted_inputs(filename, batch_size, num_labels,num_epochs=None):

  def pr_image(image):
    distorted_image = image
    # Randomly flip the image horizontally.
    distorted_image = tf.image.random_flip_left_right(distorted_image)

    # Because these operations are not commutative, consider randomizing
    # randomize the order their operation.
    distorted_image = tf.image.random_brightness(distorted_image,
                                                 max_delta=63)
    distorted_image = tf.image.random_contrast(distorted_image,
                                             lower=0.2, upper=1.8)

    return tf.image.per_image_whitening(distorted_image)

  return input_pipeline(filename, batch_size,num_labels, processing_image=pr_image
                        ,num_epochs=None)

def read_images_from_disk(input_queue, num_labels):
  """Consumes a single filename and label as a ' '-delimited string.

  Args:
    filename_and_label_tensor: A scalar string tensor.

  Returns:
    Two tensors: the decoded image, and the string label.
  """
  label = input_queue[1]
  file_contents = tf.read_file(input_queue[0])
  example = tf.image.decode_png(file_contents, channels=3)
  processed_example = preprocessing(example)
  # processed_labels = create_one_hot(label,num_labels)
  processed_label = label
  return processed_example, processed_label

def preprocessing(image):
    resized_image = tf.image.resize_images(image, IMAGE_SIZE,
                                           IMAGE_SIZE, method=0)
    resized_image.set_shape([IMAGE_SIZE,IMAGE_SIZE,3])
    return resized_image

def create_one_hot(label, num_labels = 10):
    """Produces one_hot vectors out of numerical labels

    Args:
       label_batch: a batch of labels
       num_labels: maximal number of labels

    Returns:
       Label Coded as one-hot vector
    """

    labels = tf.sparse_to_dense(label, [num_labels], 1.0, 0.0)

    return labels

def read_labeled_image_list(image_list_file):
    """Reads a .txt file containing pathes and labeles

    Args:
       image_list_file: a .txt file with one /path/to/image per line
       label: optionally, if set label will be pasted after each line

    Returns:
       List with all filenames in file image_list_file
    """
    f = open(image_list_file, 'r')
    filenames = []
    labels = []
    for line in f:
        filename, label = line[:-1].split(' ')
        filenames.append(filename)
        labels.append(int(label))
    return filenames, labels

def create_input_queues(image, label, capacity=100):
    """Creates Queues a FIFO Queue out of Input tensor objects.

     This function is no longer used in the input pipeline.
     However it took me a while to understand queuing and it might be useful
     fot someone at some point.

    Args:
       image: an image tensor object, generated by queues.
       label: an label tensor object, generated by queues.

    Returns: Two FiFO Queues
    """

    #create input queues

    im_queue = tf.FIFOQueue(capacity, dtypes.uint8)
    enqueue_op = im_queue.enqueue(image)

    queue_runner.add_queue_runner(queue_runner.QueueRunner(im_queue,
                                                           [enqueue_op]))

    label_queue = tf.FIFOQueue(capacity, dtypes.uint8)
    enqueue_op = label_queue.enqueue(label)

    queue_runner.add_queue_runner(queue_runner.QueueRunner(label_queue,
                                                           [enqueue_op]))

    return im_queue, label_queue

def test_one_hot():
    data_folder = "/fzi/ids/teichman/no_backup/DATA/"
    data_file = "Vehicle_Data/train.txt"

    filename = os.path.join(data_folder, data_file)

        # Reads pfathes of images together with there labels
    image_list, label_list = read_labeled_image_list(filename)

    images = ops.convert_to_tensor(image_list, dtype=dtypes.string)
    labels = ops.convert_to_tensor(label_list, dtype=dtypes.int32)

        # Makes an input queue
    input_queue = tf.train.slice_input_producer([images, labels],
                                                num_epochs=None,
                                                shuffle=True)

    # Reads the actual images from
    image, label = read_images_from_disk(input_queue, NUM_CLASSES)

    label_one_hot = create_one_hot(label,2)

    init_op = tf.initialize_all_variables()
    sess = tf.Session()
    with sess.as_default():
        sess.run(init_op)
        coord = tf.train.Coordinator()
        threads = tf.train.start_queue_runners(sess=sess, coord=coord)

        print(sess.run([label,label_one_hot]))
        print(sess.run([label,label_one_hot]))
        print(sess.run([label,label_one_hot]))
        print(sess.run([label,label_one_hot]))
        print(sess.run([label,label_one_hot]))
        print(sess.run([label,label_one_hot]))

        sess.close()

def test_pipeline():
    data_folder = "/fzi/ids/teichman/no_backup/DATA/"
    data_file = "Vehicle_Data/test.txt"

    filename = os.path.join(data_folder, data_file)

    image_batch, label_batch = inputs(filename, 75,2)

    # Create the graph, etc.
    init_op = tf.initialize_all_variables()
    sess = tf.Session()
    with sess.as_default():
        sess.run(init_op)
        coord = tf.train.Coordinator()
        threads = tf.train.start_queue_runners(sess=sess, coord=coord)

        print(label_batch.eval())

        coord.request_stop()
        coord.join(threads)

        print("Finish Test")

        sess.close()

if __name__ == '__main__':
  #test_one_hot()
  test_pipeline()
  test_pipeline()


text:
<!DOCTYPE html>

<meta charset="UTF-8">

<title>class Pregunta - RDoc Documentation</title>

<link href="./fonts.css" rel="stylesheet">
<link href="./rdoc.css" rel="stylesheet">

    Home

    Pages
    Classes
    Methods

  <form action="#" method="get" accept-charset="utf-8">

      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">

  </form>

Parent

Object

Included Modules

Comparable

Methods

::new

#<=>

#==

#to_s

    class Pregunta

Clase gestora de una Pregunta de multiples
opciones.

Attributes

          difficulty[RW]

          distractors[RW]

          right[RW]

          text[RW]

Public Class Methods

          new(args)

          click to toggle source

Instancia una nueva Pregunta, a partir de un
texto, una respuesta correcta, un conjunto de respuestas falsas y
opcionalmente la dificultad.

# File lib/examen/pregunta.rb, line 7
def initialize(args)
  raise ArgumentError, "Esperada pregunta (:text)" unless args[:text]
  raise ArgumentError, "Esperada respuesta correcta (:right)" unless args[:right]
  raise ArgumentError, "Esperadas respuestas incorrectas (:distractors)" unless args[:distractors]
  @text = args[:text]
  @right = args[:right]
  @distractors = args[:distractors]
  @difficulty = (args.key?:difficulty)?args[:difficulty]:1
end

Public Instance Methods

          <=>(p)

          click to toggle source

Sobrecarga el operador <=> para comparar por dificultad.

# File lib/examen/pregunta.rb, line 30
def <=>(p)
  @difficulty <=> p.difficulty
end

          ==(p)

          click to toggle source

Sobrecarga el operador == para comparar por el texto.

# File lib/examen/pregunta.rb, line 34
def ==(p)
  @text.eql?p.text
end

          to_s()

          click to toggle source

Definición del Metodo #to_s para
mostrar una pregunta.

# File lib/examen/pregunta.rb, line 17
def to_s
  opciones = @distractors + [@right]
  opciones = opciones.shuffle
  s = "#{@text}\n"
  letras = ('a'..'z').to_a[0..(opciones.size - 1)]
  i = 0
  opciones.each do |o|
   s += "#{letras[i]}) #{o}\n"
   i += 1
  end
  s
end

Validate

Generated by RDoc 4.1.0.

Based on Darkfish by Michael Granger.


text:
import { Component } from '@angular/core';

import { LoggerService }  from './logger.service';
import { Spy } from './spy.directive';

@Component({
  selector: 'spy-parent',
  template: `

Spy Directive

      <input [(ngModel)]="newName"
            (keyup.enter)="addHero()"
            placeholder="Hero name">
      <button (click)="addHero()">Add Hero</button>
      <button (click)="reset()">Reset Heroes</button>

` +
// #docregion template
    `

       {{hero}}

`
// #enddocregion template
+ `
-- Spy Lifecycle Hook Log --

{{msg}}

  `,
  styles: [
     '.parent {background: khaki;}',
     '.heroes {background: LightYellow; padding: 0 8px}'
  ],
  directives: [Spy],
  providers:  [LoggerService]
})
export class SpyParentComponent {
  newName = 'Herbie';
  heroes: string[] = ['Windstorm', 'Magneta'];
  spyLog: string[];

  constructor(private logger: LoggerService) {
    this.spyLog = logger.logs;
  }

  addHero() {
    if (this.newName.trim()) {
      this.heroes.push(this.newName.trim());
      this.newName = '';
      this.logger.tick();
    }
  }
  removeHero(hero: string) {
    this.heroes.splice(this.heroes.indexOf(hero), 1);
    this.logger.tick();
  }
  reset() {
    this.logger.log('-- reset --');
    this.heroes.length = 0;
    this.logger.tick();
  }
}


text:
Generate user avatar using name initials letter.

![letter-avatar](https://cloud.githubusercontent.com/assets/618412/12192012/835c7488-b60d-11e5-9276-d06f42d11a86.png)

## Features
* Data URI image ready (also save as PNG/JPG).
* Consistent color.
* Customize size, shape: square, circle.
* Small, fast.

## Install

Via Composer

``` bash
$ composer require yohang88/letter-avatar
```

### Implementation

``` php
<?php

use YoHang88\LetterAvatar\LetterAvatar;

$avatar = new LetterAvatar('Steven Spielberg');

// Square Shape, Size 64px
$avatar = new LetterAvatar('Steven Spielberg', 'square', 64);

```

``` html
<img src="<?php echo $avatar ?>" />
```


text:
import { Injectable } from '@angular/core';
import { environment } from '../../environments/environment';
import { Headers, Http, Response, URLSearchParams } from '@angular/http';
import { Observable } from 'rxjs/Rx';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';

@Injectable()
export class ApiService {

  constructor(private http: Http) { }

  private setHeaders(): Headers {
    const headersConfig = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    };
    return new Headers(headersConfig);
  }
  post(path: string, body: Object = {}): Observable<any> {
    return this.http.post(
      `${environment.api_url}${path}`,
      JSON.stringify(body),
      {headers: this.setHeaders()}
    )
    .catch(this.formatErrors)
    .map((res: Response) => res.json());
  }

  get(path: string, params: URLSearchParams = new URLSearchParams()): Observable<any> {
    return this.http.get(
      `${environment.api_url}${path}`,
      { headers: this.setHeaders(), search: params}
    ).catch(this.formatErrors)
    .map((res: Response) => res.json());
  }

  private formatErrors(error: any) {
    return Observable.throw(error.json());
  }
}


text:
// * **************************************************************************
// * Copyright (c) Clinton Sheppard <sheppard@cs.unm.edu>
// *
// * This source code is subject to terms and conditions of the MIT License.
// * A copy of the license can be found in the License.txt file
// * at the root of this distribution.
// * By using this source code in any fashion, you are agreeing to be bound by
// * the terms of the MIT License.
// * You must not remove this notice from this software.
// *
// * source repository: https://github.com/handcraftsman/Afluistic
// * **************************************************************************

using System;

using Afluistic.Commands.ArgumentChecks.Logic;
using Afluistic.Commands.Prerequisites;
using Afluistic.MvbaCore;

namespace Afluistic.Commands.ArgumentChecks
{
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public class VerifyThatArgument : Attribute, IPrerequisite
    {
        public const string ErrorMessageText = "Argument {0} is invalid.";
        private readonly int _oneBasedArgumentIndex;
        private readonly Type _validationLogicModificationType;
        private readonly Type[] _validators;

        public VerifyThatArgument(int oneBasedArgumentIndex, Type typeOfValidator)
            : this(oneBasedArgumentIndex, typeof(MatchesAllOf), typeOfValidator)
        {
        }

        public VerifyThatArgument(int oneBasedArgumentIndex, Type validationLogicModificationType, params Type[] validators)
        {
            _oneBasedArgumentIndex = oneBasedArgumentIndex;
            _validationLogicModificationType = validationLogicModificationType;
            _validators = validators;
        }

        public Notification Check(ExecutionArguments executionArguments)
        {
            var result = new RequireAtLeastNArgs(_oneBasedArgumentIndex).Check(executionArguments);
            if (result.HasErrors)
            {
                return result;
            }

            var logicModifier = IoC.Get<IArgumentLogicModifier>(_validationLogicModificationType);
            result = logicModifier.ApplyTo(executionArguments, _oneBasedArgumentIndex - 1, _validators);
            if (result.HasErrors)
            {
                var notification = Notification.ErrorFor(ErrorMessageText, _oneBasedArgumentIndex);
                notification.Add(result);
                return notification;
            }
            return Notification.Empty;
        }

        public int Order
        {
            get { return 10000 + _oneBasedArgumentIndex; }
        }
    }
}


text:
package org.compass.core.util.concurrent;

import java.util.concurrent.ThreadFactory;

/**
 * @author kimchy
 */
public class SingleThreadThreadFactory implements ThreadFactory {

    private String name;

    private boolean daemon;

    public SingleThreadThreadFactory(String name, boolean daemon) {
        this.name = name;
        this.daemon = daemon;
    }

    public Thread newThread(Runnable r) {
        Thread t = new Thread(null, r, name);
        t.setDaemon(daemon);
        return t;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/connect_button_sel" android:state_selected="true" />
    <item android:drawable="@drawable/connect_button_sel" android:state_pressed="true" />
    <item android:drawable="@drawable/connect_button_unsel" />

</selector>