text:
// JavaScript Document

(function( $ ){
    var methods = {
        init : function( options ) {
            var settings = $.extend({
                buttonDivId:        'slideshow-buttons',
                cur:                0,
                delay:              7000,
                end:                $('img', this).length,
                fadeInInterval:     600,
                fadeOutInterval:    600,
                delayAfterClick:    0,
                start:              0,
                timer:              null
            }, options);

            return rval = this.each(function(){
                var paused = false;
                var $this = $(this), data = $this.data('state');
                if (!data) $(this).data('state', settings);

                // Hide non visible elements
                //$('a, #slideshow-captions p', $this).not('.slideshow-caption a').hide();

                // Add the buttons
                $('#slideshow').before('

');
                $('#slideshow').appendTo('#slideshow-wrap');
                $('#slideshow-wrap').append('

');
                var numSlides = $('#slideshow img').length;
                var slideshowButtonsWidth = 37+(14*numSlides);
                $('#slideshow-buttons').width(slideshowButtonsWidth);
		if (numSlides === 1) {
		  $('#slideshow-buttons').prepend('
Play Slideshow
');
		} else {
                  $('#slideshow-buttons').prepend('
Pause Slideshow
');
	        }

                var z = 1;
                $('#slideshow img').each(function() {
                    $(this).parent().parent().attr("id","slide"+z);
		    if (numSlides === 1) {
		      $('#slideshow-buttons ul').append('
Show slide #'+z+'
');
		    } else {
                      $('#slideshow-buttons ul').append('
Show slide #'+z+'
');
		    }
                    z = z+1;
                });

                // Add event handlers for buttons
                $('#slideshow-buttons li a').bind('click focus', function(event) {
                    event.preventDefault();
                    $(this).keydown(function(e){
                        if(e.which==13){
                            window.location = $(this).attr("href");
                        }
                    });
                    var i = $(event.target).parent().prevAll('li').length;
                    $this.data('state').cur = i;
                    paused = true;
                    $('#slideshow-buttons .pause').removeClass('pause').addClass('play').html('Play Slideshow');
                    methods.showbtn.apply($this);
                });

                $('#slideshow-buttons p a').live('click', function(event) {
                    event.preventDefault();
                    if($(this).parent().hasClass("pause")){
                        $(this).parent().removeClass('pause').addClass('play').html('Play Slideshow');
                        window.clearTimeout($this.data('state').timer);
                        paused = true;
                    }
                    if($(this).parent().hasClass("play")){
                        $(this).parent().removeClass('play').addClass('pause').html('Pause Slideshow');
                        window.clearTimeout($this.data('state').timer);
                        $this.data('state').timer = window.setTimeout(function () {
                            methods.show.apply($this);
                        }, 0);
                        paused = false;
                    }
                });

                if(paused=true) {
                    $('#slideshow-buttons li a').bind('click focus', function(event) {
                        window.clearTimeout($this.data('state').timer);
                    });
                }
                else {}

                if (numSlides !== 1) {methods.show.apply($this);}
            });
        },

        show : function () {
            var $this = $(this), state = $this.data('state');
            $($('img', $this).get(state.cur)).show().parent().fadeIn(state.fadeInInterval).parent().siblings().children().hide();

            // Set button state
            $('.buttonOn').removeClass('buttonOn');
            $($('#slideshow-buttons li a').get(state.cur)).addClass('buttonOn');

            // Show caption
            $('.slideshow-caption').hide();
            $($('.slideshow-caption').get(state.cur)).show();

            // Set timer to next state
            $this.data('state').timer = window.setTimeout(function () {
                methods.fadeOut.apply($this);
            }, state.delay - state.fadeOutInterval - state.fadeInInterval);
            return $this;
        },

        showbtn : function () {
            var $this = $(this), state = $this.data('state');
            $($('img', $this).get(state.cur)).show().parent().show().parent().siblings().children().hide();

            // Set button state
            $('.buttonOn').removeClass('buttonOn');
            $($('#slideshow-buttons li a').get(state.cur)).addClass('buttonOn');

            // Show caption
            $('.slideshow-caption').hide();
            $($('.slideshow-caption').get(state.cur)).show();

            return $this;
        },

        fadeOut : function () {
            // Fade out
            var $this = $(this), state = $this.data('state');
            //$($('img', $this).get(state.cur)).fadeOut(state.fadeOutInterval);

            // Set timer to next state
            $this.data('state').timer = window.setTimeout(function () {
                methods.fadeIn.apply($this);
            }, state.fadeOutInterval);
            return $this;
        },

        fadeIn : function () {
            var $this = $(this), state = $this.data('state');
            var cur = state.cur, next = (state.cur + 1) % state.end;

            state.cur = next;
            $this.data('state', state);
            $($('img', $this).get(cur)).show().parent().fadeOut(state.fadeOutInterval);
            $($('img', $this).get(next)).show().parent().fadeIn(state.fadeInInterval);

            // Set button state
            $('.buttonOn').removeClass('buttonOn');
            $($('#slideshow-buttons li a').get(state.cur)).addClass('buttonOn');

            // Show caption
            $('.slideshow-caption').hide();
            $($('.slideshow-caption').get(state.cur)).show();

            // Set timer to next state
            $this.data('state').timer = window.setTimeout(function () {
                methods.fadeOut.apply($this);
            }, state.delay - state.fadeOutInterval - state.fadeInInterval);
            return $this;
        }

    };

    $.fn.slideshow = function( method ) {
        if ( methods[method] ) return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
        else if ( typeof method === 'object' || ! method ) return methods.init.apply( this, arguments );
        else $.error( 'Method ' +  method + ' does not exist on jQuery.slideshow' );
    }

})( jQuery );


text:
ChildProcess* ChildProcess::child_process_;

ChildProcess::ChildProcess(ChildThread* child_thread)
    : child_thread_(child_thread),
      ref_count_(0),
      shutdown_event_(true, false) {
  DCHECK(!child_process_);
  child_process_ = this;
  if (child_thread_.get())  // null in unittests.
    child_thread_->Run();
}

ChildProcess::~ChildProcess() {
  DCHECK(child_process_ == this);

  // Signal this event before destroying the child process.  That way all
  // background threads can cleanup.
  // For example, in the renderer the RenderThread instances will be able to
  // notice shutdown before the render process begins waiting for them to exit.
  shutdown_event_.Signal();

  if (child_thread_.get())
    child_thread_->Stop();

  child_process_ = NULL;
}

void ChildProcess::AddRefProcess() {
  DCHECK(!child_thread_.get() ||  // null in unittests.
         MessageLoop::current() == child_thread_->message_loop());
  ref_count_++;
}

void ChildProcess::ReleaseProcess() {
  DCHECK(!child_thread_.get() ||  // null in unittests.
         MessageLoop::current() == child_thread_->message_loop());
  DCHECK(ref_count_);
  DCHECK(child_process_);
  if (--ref_count_)
    return;

  if (child_thread_.get())  // null in unittests.
    child_thread_->OnProcessFinalRelease();
}

base::WaitableEvent* ChildProcess::GetShutDownEvent() {
  DCHECK(child_process_);
  return &child_process_->shutdown_event_;
}

redpajama_set_name: RedPajamaGithub


text:
package com.github.shiraji.kenkenpa.compiler;

import com.google.common.base.Joiner;
import com.google.testing.compile.JavaFileObjects;
import junit.framework.TestCase;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

import javax.tools.JavaFileObject;

import static com.github.shiraji.kenkenpa.compiler.KenKenPaTestHelper.compareSourceCodesWithoutError;

@RunWith(JUnit4.class)
public class HopTests extends TestCase {

    @Test
    public void simpleSingleHopTest() {
        // @formatter:off
        JavaFileObject source = JavaFileObjects.forSourceString("test.SimpleFSM", Joiner.on('\n').join(
            "package test;",
            "import com.github.shiraji.kenkenpa.annotations.Hop;",
            "import com.github.shiraji.kenkenpa.annotations.Hops;",
            "import com.github.shiraji.kenkenpa.annotations.KenKenPa;",
            "@KenKenPa(\"CIRCLE1\")",
            "public abstract class SimpleFSM {",
            "    @Hop(from = \"CIRCLE1\", to = \"CIRCLE2\")",
            "    public void fire() {",
            "      System.out.println(\"fire!\");",
            "    }",
            "}"
        ));

        JavaFileObject expectedSource = JavaFileObjects.forSourceString("test.KenKenPa_SimpleFSM", Joiner.on('\n').join(
            "package test;",
            "import com.github.shiraji.kenkenpa.annotations.Hop;",
            "import java.lang.Override;",
            "import java.lang.String;",
            "public final class KenKenPa_SimpleFSM extends SimpleFSM {",
            "  private String $$mCurrentState$$;",
            "  KenKenPa_SimpleFSM() {",
            "    super();",
            "    this.$$mCurrentState$$ = \"CIRCLE1\";",
            "  }",
            "  @Override",
            "  @Hop(",
            "      from = \"CIRCLE1\",",
            "      to = \"CIRCLE2\"",
            "  )",
            "  public final void fire() {",
            "    String newState = takeOff$$fire();",
            "    super.fire();",
            "    land$$fire(newState);",
            "    $$mCurrentState$$ = newState;",
            "  }",
            "  private final String takeOff$$fire() {",
            "    switch($$mCurrentState$$) {",
            "      case \"CIRCLE1\":",
            "      return \"CIRCLE2\";",
            "    }",
            "    // No definition! Return the default state",
            "    return \"CIRCLE1\";",
            "  }",
            "  private final void land$$fire(String newState) {",
            "    switch(newState) {",
            "      case \"CIRCLE2\":",
            "      break;",
            "    }",
            "  }",
            "}"
        ));
        // @formatter:on

        compareSourceCodesWithoutError(source, expectedSource);
    }

    @Test
    public void hopWithSameFromAndToTest() {
        // @formatter:off
        JavaFileObject source = JavaFileObjects.forSourceString("test.SimpleFSM", Joiner.on('\n').join(
            "package test;",
            "import com.github.shiraji.kenkenpa.annotations.Hop;",
            "import com.github.shiraji.kenkenpa.annotations.Hops;",
            "import com.github.shiraji.kenkenpa.annotations.KenKenPa;",
            "import com.github.shiraji.kenkenpa.annotations.TakeOff;",
            "@KenKenPa(\"CIRCLE1\")",
            "public abstract class SimpleFSM {",
            "    @Hop(from = \"CIRCLE1\", to = \"CIRCLE1\")",
            "    public void fire() {",
            "      System.out.println(\"fire!\");",
            "    }",
            "}"
        ));

        JavaFileObject expectedSource = JavaFileObjects.forSourceString("test.KenKenPa_SimpleFSM", Joiner.on('\n').join(
            "package test;",
            "import com.github.shiraji.kenkenpa.annotations.Hop;",
            "import java.lang.Override;",
            "import java.lang.String;",
            "public final class KenKenPa_SimpleFSM extends SimpleFSM {",
            "  private String $$mCurrentState$$;",
            "  KenKenPa_SimpleFSM() {",
            "    super();",
            "    this.$$mCurrentState$$ = \"CIRCLE1\";",
            "  }",
            "  @Override",
            "  @Hop(",
            "      from = \"CIRCLE1\",",
            "      to = \"CIRCLE1\"",
            "  )",
            "  public final void fire() {",
            "    String newState = takeOff$$fire();",
            "    super.fire();",
            "    land$$fire(newState);",
            "    $$mCurrentState$$ = newState;",
            "  }",
            "  private final String takeOff$$fire() {",
            "    switch($$mCurrentState$$) {",
            "      case \"CIRCLE1\":",
            "      return \"CIRCLE1\";",
            "    }",
            "    // No definition! Return the default state",
            "    return \"CIRCLE1\";",
            "  }",
            "  private final void land$$fire(String newState) {",
            "    switch(newState) {",
            "      case \"CIRCLE1\":",
            "      break;",
            "    }",
            "  }",
            "}"
        ));
        // @formatter:on

        compareSourceCodesWithoutError(source, expectedSource);
    }

    @Test
    public void hopMethodWithParameter() {
        // @formatter:off
        JavaFileObject source = JavaFileObjects.forSourceString("test.SimpleFSM", Joiner.on('\n').join(
            "package test;",
            "import com.github.shiraji.kenkenpa.annotations.Hop;",
            "import com.github.shiraji.kenkenpa.annotations.Hops;",
            "import com.github.shiraji.kenkenpa.annotations.KenKenPa;",
            "import com.github.shiraji.kenkenpa.annotations.TakeOff;",
            "@KenKenPa(\"CIRCLE1\")",
            "public abstract class SimpleFSM {",
            "    @Hop(from = \"CIRCLE1\", to = \"CIRCLE2\")",
            "    public void fire(int i) {",
            "      System.out.println(\"fire!\");",
            "    }",
            "}"
        ));

        JavaFileObject expectedSource = JavaFileObjects.forSourceString("test.KenKenPa_SimpleFSM", Joiner.on('\n').join(
            "package test;",
            "import com.github.shiraji.kenkenpa.annotations.Hop;",
            "import java.lang.Override;",
            "import java.lang.String;",
            "public final class KenKenPa_SimpleFSM extends SimpleFSM {",
            "  private String $$mCurrentState$$;",
            "  KenKenPa_SimpleFSM() {",
            "    super();",
            "    this.$$mCurrentState$$ = \"CIRCLE1\";",
            "  }",
            "  @Override",
            "  @Hop(",
            "      from = \"CIRCLE1\",",
            "      to = \"CIRCLE2\"",
            "  )",
            "  public final void fire(int i) {",
            "    String newState = takeOff$$fire();",
            "    super.fire(i);",
            "    land$$fire(newState);",
            "    $$mCurrentState$$ = newState;",
            "  }",
            "  private final String takeOff$$fire() {",
            "    switch($$mCurrentState$$) {",
            "      case \"CIRCLE1\":",
            "      return \"CIRCLE2\";",
            "    }",
            "    // No definition! Return the default state",
            "    return \"CIRCLE1\";",
            "  }",
            "  private final void land$$fire(String newState) {",
            "    switch(newState) {",
            "      case \"CIRCLE2\":",
            "      break;",
            "    }",
            "  }",
            "}"
        ));
        // @formatter:on

        compareSourceCodesWithoutError(source, expectedSource);
    }

    @Test
    public void hopMethodWithReturnValue() {
        // @formatter:off
        JavaFileObject source = JavaFileObjects.forSourceString("test.SimpleFSM", Joiner.on('\n').join(
            "package test;",
            "import com.github.shiraji.kenkenpa.annotations.Hop;",
            "import com.github.shiraji.kenkenpa.annotations.Hops;",
            "import com.github.shiraji.kenkenpa.annotations.KenKenPa;",
            "import com.github.shiraji.kenkenpa.annotations.TakeOff;",
            "@KenKenPa(\"CIRCLE1\")",
            "public abstract class SimpleFSM {",
            "    @Hop(from = \"CIRCLE1\", to = \"CIRCLE2\")",
            "    public String fire(int i) {",
            "      System.out.println(\"fire!\");",
            "      return null;",
            "    }",
            "}"
        ));

        JavaFileObject expectedSource = JavaFileObjects.forSourceString("test.KenKenPa_SimpleFSM", Joiner.on('\n').join(
            "package test;",
            "import com.github.shiraji.kenkenpa.annotations.Hop;",
            "import java.lang.Override;",
            "import java.lang.String;",
            "public final class KenKenPa_SimpleFSM extends SimpleFSM {",
            "  private String $$mCurrentState$$;",
            "  KenKenPa_SimpleFSM() {",
            "    super();",
            "    this.$$mCurrentState$$ = \"CIRCLE1\";",
            "  }",
            "  @Override",
            "  @Hop(",
            "      from = \"CIRCLE1\",",
            "      to = \"CIRCLE2\"",
            "  )",
            "  public final String fire(int i) {",
            "    String newState = takeOff$$fire();",
            "    java.lang.String returnValue = super.fire(i);",
            "    land$$fire(newState);",
            "    $$mCurrentState$$ = newState;",
            "    return returnValue;",
            "  }",
            "  private final String takeOff$$fire() {",
            "    switch($$mCurrentState$$) {",
            "      case \"CIRCLE1\":",
            "      return \"CIRCLE2\";",
            "    }",
            "    // No definition! Return the default state",
            "    return \"CIRCLE1\";",
            "  }",
            "  private final void land$$fire(String newState) {",
            "    switch(newState) {",
            "      case \"CIRCLE2\":",
            "      break;",
            "    }",
            "  }",
            "}"
        ));
        // @formatter:on

        compareSourceCodesWithoutError(source, expectedSource);
    }
}


text:
'''A function returning a string and using a local variable'''

def lastFirst(firstName, lastName):
    separator = ', '
    result = lastName + separator + firstName
    return result

print(lastFirst('Benjamin', 'Franklin'))
print(lastFirst('Andrew', 'Harrington'))


text:
package org.zstack.header;

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

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface PackageAPIInfo {
    String APICategoryName() default "";
    boolean communityAvailable() default true;
}


text:
namespace PRGReaderLibrary
{
    public enum AutoManual
    {
        Automatic,
        Manual
    }
}


text:
<?php namespace Leeb\Jsonrpc\Interfaces;

interface MethodResolverInterface
{
	public function resolve($client_method_string);
}


text:
<?php

namespace AppBundle\Entity\Repository;

use Gedmo\Tree\Entity\Repository\NestedTreeRepository;

/**
 * Class ServiceRepository.
 *
 * @category Repository
 *
 * @author   Alexandre Tranchant <alexandre.tranchant@gmail.com>
 * @license  GNU General Public License, version 3
 *
 * @link     http://opensource.org/licenses/GPL-3.0
 */
class ServiceRepository extends NestedTreeRepository
{
}


text:
<?php
include('../rest.php');
$Token = "NDKBLIPYTLCQJYBENG7A";
$apiBase = "https://attendancetracker.mybluemix.net";

$resp;

$headers = array();
$params = array('Token' => $Token);

echo "<!DOCTYPE html>";
echo "";
echo "";
	echo "<title>Attendance Tracking User Interface</title>";
	echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
	//echo '<link rel="stylesheet" href="../style.css" />';
	//Bootstrap
	echo '<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">';
    echo '';
    echo '';
echo "";
echo "";
    echo '
';
    	echo "
Student Menu
";
        echo '<form class="form-horizontal" role="form">';
        	echo '
';
            	echo '
';
                	echo '<input class="btn btn-lg btn-primary btn-block" type="button" value="Course" onClick="parent.location='."'/ui/course'".'">';
                echo "
";
            echo "
";
            echo '
';
                echo '
';
                    echo '<input class="btn btn-lg btn-primary btn-block" type="button" value="Add Student" onClick="parent.location='."/ui/student/add'".'">';
                echo "
";
            echo "
";
    	echo "</form>";
    echo "

";
/*
	$resp = json_decode(get($urlBase . "/device/list",$headers,0,$params));

	echo "
Token: " . $Token . "
";
	echo "
URL: " . $urlBase . "
";
	echo "
Token: ";
	print_r($params);
	echo "
";
	echo "
Token: ";
	print_r($resp);
	echo "
";
*/
echo "";
echo "";
?>


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="8dp">

    <TextView
        android:id="@+id/tv_mapprompt_lon"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="TextView" />

    <TextView
        android:id="@+id/tv_mapprompt_lat"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="TextView" />
</LinearLayout>


text:
layout: post
title: "Fatih Sultan Mehmet Üniversitesi Etkinliği Aralık 2016"
date: 2016-12-18 08:00
author: engin.polat
comments: true
category: [Etkinlik]
tags: [etkinliklerim, seminer, javascript, jquery, angular, react]
---
*17 Aralık 2016* tarihinde *Fatih Sultan Mehmet Üniversitesi*'nde **Javascript Framework'leri** ve **Web Uygulama Geliştirme** konularını içeren bir etkinlik organize ettik.

Etkinliği gerçekleştirmemizi sağlayan sevgili öğrenci arkadaşım *Oğuzhan Oktay Büyük*'e ve etkinliğe katılan tüm öğrenci arkadaşlara çok *teşekkür ederim*.

<img class="lazy img-responsive" data-src="/assets/uploads/2016/12/fsmvu-javascript-frameworks.jpg" width="600" height="500" />


text:
package describe // @describe pkgdecl "describe"

// Tests of 'describe' query.
// See go.tools/guru/guru_test.go for explanation.
// See describe.golden for expected query results.

// TODO(adonovan): more coverage of the (extensive) logic.

import (
	"lib"
	"nosuchpkg"            // @describe badimport1 "nosuchpkg"
	nosuchpkg2 "nosuchpkg" // @describe badimport2 "nosuchpkg2"
	// The unsafe package changed in Go 1.17 with the addition of
	// unsafe.Add and unsafe.Slice. While we still support older versions
	// of Go, the test case below cannot be enabled.
	// _ "unsafe"             // @describe unsafe "unsafe"
)

var _ nosuchpkg.T
var _ nosuchpkg2.T

type cake float64 // @describe type-ref-builtin "float64"

const c = iota // @describe const-ref-iota "iota"

const pi = 3.141     // @describe const-def-pi "pi"
const pie = cake(pi) // @describe const-def-pie "pie"
const _ = pi         // @describe const-ref-pi "pi"

var global = new(string) // NB: ssa.Global is indirect, i.e. **string

func main() { // @describe func-def-main "main"
	// func objects
	_ = main      // @describe func-ref-main "main"
	_ = (*C).f    // @describe func-ref-*C.f "..C..f"
	_ = D.f       // @describe func-ref-D.f "D.f"
	_ = I.f       // @describe func-ref-I.f "I.f"
	var d D       // @describe type-D "D"
	var i I       // @describe type-I "I"
	_ = d.f       // @describe func-ref-d.f "d.f"
	_ = i.f       // @describe func-ref-i.f "i.f"
	var slice []D // @describe slice-of-D "slice"

	var dptr *D // @describe ptr-with-nonptr-methods "dptr"
	_ = dptr

	// var objects
	anon := func() {
		_ = d // @describe ref-lexical-d "d"
	}
	_ = anon   // @describe ref-anon "anon"
	_ = global // @describe ref-global "global"

	// SSA affords some local flow sensitivity.
	var a, b int
	var x = &a // @describe var-def-x-1 "x"
	_ = x      // @describe var-ref-x-1 "x"
	x = &b     // @describe var-def-x-2 "x"
	_ = x      // @describe var-ref-x-2 "x"

	i = new(C) // @describe var-ref-i-C "i"
	if i != nil {
		i = D{} // @describe var-ref-i-D "i"
	}
	print(i) // @describe var-ref-i "\\bi\\b"

	// const objects
	const localpi = 3.141     // @describe const-local-pi "localpi"
	const localpie = cake(pi) // @describe const-local-pie "localpie"
	const _ = localpi         // @describe const-ref-localpi "localpi"

	// type objects
	type T int      // @describe type-def-T "T"
	var three T = 3 // @describe type-ref-T "T"
	_ = three

	print(1 + 2*3)        // @describe const-expr " 2.3"
	print(real(1+2i) - 3) // @describe const-expr2 "real.*3"

	m := map[string]*int{"a": &a}
	mapval, _ := m["a"] // @describe map-lookup,ok "m..a.."
	_ = mapval          // @describe mapval "mapval"
	_ = m               // @describe m "m"

	defer main() // @describe defer-stmt "defer"
	go main()    // @describe go-stmt "go"

	panic(3) // @describe builtin-ref-panic "panic"

	var a2 int // @describe var-decl-stmt "var a2 int"
	_ = a2
	var _ int // @describe var-decl-stmt2 "var _ int"
	var _ int // @describe var-def-blank "_"

	var _ lib.Outer // @describe lib-outer "Outer"

	var mmm map[C]D // @describe var-map-of-C-D "mmm"

	d := newD().ThirdField // @describe field-access "ThirdField"

	astCopy := ast
	unknown() // @describe call-unknown "\\("
}

type I interface { // @describe def-iface-I "I"
	f() // @describe def-imethod-I.f "f"
}

type C int
type D struct {
	Field        int
	AnotherField string
	ThirdField   C
}

func (c *C) f() {}
func (d D) f()  {}

func newD() D { return D{} }


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

using System.Collections.Immutable;

namespace System.Reflection.Metadata.Tests
{
    public static class ByteArrayUtilities
    {
        public static byte[] Slice(this BlobBuilder bytes, int start, int end)
        {
            return Slice(bytes.ToArray(), start, end);
        }

        public static byte[] Slice(this byte[] bytes, int start)
        {
            return Slice(bytes, start, bytes.Length);
        }

        public static byte[] Slice(this byte[] bytes, int start, int end)
        {
            if (end < 0)
            {
                end = bytes.Length + end;
            }

            var result = new byte[end - start];
            Array.Copy(bytes, start, result, 0, result.Length);
            return result;
        }

        public static ImmutableArray<byte> Slice(this ImmutableArray<byte> bytes, int start)
        {
            return Slice(bytes, start, bytes.Length);
        }

        public static ImmutableArray<byte> Slice(this ImmutableArray<byte> bytes, int start, int end)
        {
            if (end < 0)
            {
                end = bytes.Length + end;
            }

            return ImmutableArray.Create(bytes, start, end - start);
        }
    }
}


text:
using System.Collections.ObjectModel;

namespace PlayFab.Json
{
  /// <summary>
  /// Represents a collection of <see cref="JsonConverter"/>.
  /// </summary>
  public class JsonConverterCollection : Collection<JsonConverter>
  {
  }
}

#endif


text:
/**
 * Module dependencies.
 */

var Node = require('./node');

/**
 * Initialize a new `Feature` with the given `segs`.
 *
 * @param {Array} segs
 * @api public
 */

var Feature = module.exports = function Feature(segs){
  Node.call(this);
  this.segments = segs;
  this.expr = null;
};

/**
 * Inherit from `Node.prototype`.
 */

Feature.prototype.__proto__ = Node.prototype;

/**
 * Return a clone of this node.
 *
 * @return {Node}
 * @api public
 */

Feature.prototype.clone = function(parent){
  var clone = new Feature;
  clone.segments = this.segments.map(function(node){ return node.clone(parent, clone); });
  if (this.expr) clone.expr = this.expr.clone(parent, clone);
  if (this.name) clone.name = this.name;
  clone.lineno = this.lineno;
  clone.column = this.column;
  clone.filename = this.filename;
  return clone;
};

/**
 * Return "<ident>" or "(<ident>: <expr>)"
 *
 * @return {String}
 * @api public
 */

Feature.prototype.toString = function(){
  if (this.expr) {
    return '(' + this.segments.join('') + ': ' + this.expr.toString() + ')';
  } else {
    return this.segments.join('');
  }
};

/**
 * Return a JSON representation of this node.
 *
 * @return {Object}
 * @api public
 */

Feature.prototype.toJSON = function(){
  var json = {
    __type: 'Feature',
    segments: this.segments,
    lineno: this.lineno,
    column: this.column,
    filename: this.filename
  };
  if (this.expr) json.expr = this.expr;
  if (this.name) json.name = this.name;
  return json;
};


text:
IO Processor Architecture
============================
For overlays to be useful, they must provide sufficient functionality, while also providing flexibility to suit a wide range of applications. Flexibility in the base overlay is demonstrated through the use of IO Processors (IOPs).

An IO Processor is implemented in the programmable logic and connects to and controls an external port on the board. There are two types of IOP: Pmod IOP and Arduino IOP.

Each IOP contains a MicroBlaze processor, a configurable switch, peripherals, and memory for the MicroBlaze instruction and data memory. The memory is dual-ported, with one port connected to the MicroBlaze, and the other connected to the ARM Cortex-A9 processor. This allows the ARM processor to access the MicroBlaze memory and dynamically write a new program to the MicroBlaze instruction area. The data area of the memory can be used for communication and data exchanges between the ARM processor and the IOP(s). e.g. a simple mailbox.

In the base overlay, two IOPs control each of the two Pmod interfaces, and another IOP controls the Arduino interface. Inside the IOP are dedicated peripherals; timers, UART, IIC, SPI, GPIO, and a configurable switch. (Not all peripherals are available in the Pmod IOP.) IIC and SPI are standard interfaces used by many of the available Pmod, Grove and other peripherals. GPIO can be used to connect to custom interfaces or used as simple inputs and outputs. When a Pmod, Arduino shield, or other peripheral is plugged in to a port, the configurable switch allows the signals to be routed dynamically to the required dedicated interface. This is how the IOP provides flexibility and allows peripherals with different pin connections and protocols to be used on the same port.

Pmod IOP
------------------

Two Pmod IOPs are included in the base overlay to control each of the two Pmod interfaces on the board.

.. image:: ./images/pmod_iop.jpg
   :align: center

As indicated in the diagram, the Pmod IOP has a MicroBlaze, a configurable switch, and the following peripherals:

* I2C
* SPI
* GPIO blocks
* Timer

Pmod IOP configurable switch
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The MicroBlaze, inside the IOP, can configure the switch by writing to the configuration registers of the switch. This would be done by the MicroBlaze application.

For the Pmod IOP switch, each individual pin can be configured by writing a 4-bit value to the corresponding place in the IO switch configuration registers.

The following function, part of the Pmod IO switch driver, can be used to configure the switch.

.. code-block:: c

   void config_pmod_switch();

Switch mappings used for IO switch configuration:

For example:

.. code-block:: c

   config_pmod_switch(SS,MOSI,GPIO_2,SPICLK,GPIO_4,GPIO_5,GPIO_6,GPIO_7);

This would connect a SPI interface:
* Pin 1: SS
* Pin 2: MOSI
* Pin 4: SPICLK

and the remaining pins to their corresponding GPIO (which could be left unused in the MicroBlaze application).

From Python all the constants and addresses for the IOP can be found in:

::

   <GitHub Repository>/python/pynq/iop/iop_const.py

``pmod.h`` and ``pmod.c`` are part of the Pmod IO switch driver, and contain an API, addresses, and constant definitions that can be used to write code for an IOP.

::

   <GitHub Repository>/Pynq-Z1/vivado/ip/pmod_io_switch_1.0/  \
   drivers/pmod_io_switch_v1_0/src/

This code is automatically compiled into the Board Support Package (BSP). Any application linking to the BSP can use this library by including the header file:

.. code-block:: c

   #include "pmod_io_switch.h"

Arduino IOP
---------------------------

Similar to the Pmod IOP, an Arduino IOP is available to control the Arduino interface. The Arduino IOP is similar to the PMOD IOP, but has some additional internal peripherals (extra timers, an extra I2c, and SPI, a UART, and an XADC). The configurable switch is also different to the Pmod switch.

.. image:: ./images/arduino_iop.jpg
   :align: center

As indicated in the diagram, the Arduino IOP has a MicroBlaze, a configurable switch, and the following peripherals:

* 2x I2C
* 2x SPI
* 1x UART
* 3x GPIO blocks
* 1x XADC
* 1 Interrupt controller (32 channels)

The interrupt controller can be connected to all the analog and digital pins, and each of the 6 timers, the I2Cs, the SPIs, the XADC, and UART. This means an external pin on the shield interface can trigger an interrupt. An internal peripheral can also trigger an interrupt.

Arduino shields have fixed possible configurations.  According to the Arduino specification, the analog pins can be used as analgo, or digital I/O.

Other peripherals can be connected as indicated in the table.

==========   =========================
Peripheral   Pins
==========   =========================
UART         D0, D1
I2C          A4, A5
SPI*         D10 - D13
PWM          D3, D5, D6, D9, D10, D11
Timer        D3 - D6 and D8 - D11
==========   =========================

\* There are also dedicated pins for a separate SPI.

For example, a shield with a UART and 5 Digital IO can connect the UART to pins D0, D1, and the Digital IO can be connected to pins D2 - D6.

While there is support for analog inputs via the internal XADC, this only allows inputs of 0-1V. The Arduino supports 0-5V analog inputs which are not supported on the PYNQ-Z1.

Arduino IOP configurable Switch
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The switch can be configured by writing to its configuration registers.

The dedicated SPI pins are always connected to one of the SPI controllers.

The analog and digital pins can be configured by writing a 4-bit value to the corresponding place in the IO switch configuration registers, similar to the Pmod switch.

The following function, part of the Arduino IO switch driver, can be used to configure the switch.

.. code-block:: c

   void config_arduino_switch();

Switch mappings used for IO switch configuration:

========  =======  =======   =========  ======  =======  ==================  ========  =======  ==============

Pin Name  A/D IO   A_INT     Interrupt  UART    PWM      Timer               SPI       IIC      Input Capture

========  =======  =======   =========  ======  =======  ==================  ========  =======  ==============
A0        A_GPIO   A_INT
A1        A_GPIO   A_INT
A2        A_GPIO   A_INT
A3        A_GPIO   A_INT
A4        A_GPIO   A_INT                                                               IIC
A5        A_GPIO   A_INT                                                               IIC
D0        D_GPIO             D_INT      D_UART
D1        D_GPIO             D_INT      D_UART
D2        D_GPIO             D_INT
D3        D_GPIO             D_INT              D_PWM0   D_TIMER (Timer0)                       IC (Timer0)
D4        D_GPIO             D_INT                       D_TIMER (Timer0_6)
D5        D_GPIO             D_INT              D_PWM1   D_TIMER (Timer1)                       IC (Timer1)
D6        D_GPIO             D_INT              D_PWM2   D_TIMER (Timer2)                       IC (Timer2)
D7        D_GPIO             D_INT
D8        D_GPIO             D_INT                       D_TIMER (Timer1_7)                     Input Capture
D9        D_GPIO             D_INT              D_PWM3   D_TIMER (Timer3)                       IC (Timer3)
D10       D_GPIO             D_INT              D_PWM4   D_TIMER (Timer4)    D_SS               IC (Timer4)
D11       D_GPIO             D_INT              D_PWM5   D_TIMER (Timer5)    D_MOSI             IC (Timer5)
D12       D_GPIO             D_INT                                           D_MISO
D13       D_GPIO             D_INT                                           D_SPICLK

========  =======  =======   =========  ======  =======  ==================  ========  =======  ==============

For example, to connect the UART to D0 and D1, write D_UART to the configuration register for D0 and D1.

.. code-block:: c

	config_arduino_switch(A_GPIO, A_GPIO, A_GPIO, A_GPIO, A_GPIO, A_GPIO,
			      D_UART, D_UART, D_GPIO, D_GPIO, D_GPIO,
			      D_GPIO, D_GPIO, D_GPIO, D_GPIO,
			      D_GPIO, D_GPIO, D_GPIO, D_GPIO);

From Python all the constants and addresses for the IOP can be found in:

::

   <Pynq GitHub Repository>/python/pynq/iop/iop_const.py

``arduino.h`` and ``arduino.c`` are part of the Arduino IO switch driver, and contain an API, addresses, and constant definitions that can be used to write code for an IOP.

::

   <GitHub Repository>/Pynq-Z1/vivado/ip/arduino_io_switch_1.0/  \
   drivers/arduino_io_switch_v1_0/src/

This code this automatically compiled into the Board Support Package (BSP). Any application linking to the BSP can use this library by including the header file:

.. code-block:: c

   #include "arduino_io_switch.h"


text:
Helplines

				Posted on

				by

    	No Helplines yet, why don't you create one?


text:
'use strict';
angular.module('api1')
.factory('ApiConnection1',['Restangular','APICONST1','TokenService','$rootScope',
	function(Restangular,APICONST1,TokenService,$rootScope) {

	var myRangular = Restangular.withConfig(function(RestangularConfigurer) {
    RestangularConfigurer.addFullRequestInterceptor(function(element, operation, what, url, headers, params) {
        headers[APICONST1.apiTokenHeader] = TokenService.getAPIToken();
        headers[APICONST1.apiKeyHeader] = APICONST1.apiKeyValue;
        return {
          headers: headers
        };
    });
    RestangularConfigurer.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
      return data;
    });
    RestangularConfigurer.setErrorInterceptor(function(response,deferred,responseHandler) {
      console.log('Error with status code', response.status);
      var loggedIn = response.headers(APICONST1.loggedInHeader);
      if(response.status === 401 && loggedIn === 'false'){
        console.log('Not logged in');
        $rootScope.$broadcast('unauthorized');
        return false;
      }
      if(response.status === 404){
        console.log('Resource not found');
        $rootScope.$broadcast('not-found');
        return false;
      }
      return true;
    });
  });
  return {
    myRangular: myRangular
  };

	}
]);


text:
layout: model
title: Google T5 for Closed Book Question Answering Small
author: John Snow Labs
name: google_t5_small_ssm_nq
date: 2021-01-08
task: Question Answering
language: en
edition: Spark NLP 2.7.1
spark_version: 2.4
tags: [open_source, t5, seq2seq, question_answering, en]
supported: true
annotator: T5Transformer
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

The model was pre-trained using T5's denoising objective on [C4](https://huggingface.co/datasets/c4), subsequently additionally pre-trained using REALM's salient span masking objective on Wikipedia, and finally fine-tuned on [Natural Questions (NQ)](https://huggingface.co/datasets/natural_questions).

Note: The model was fine-tuned on 100% of the train splits of Natural Questions (NQ) for 10k steps.

Other community Checkpoints: here

Paper: [How Much Knowledge Can You Pack Into the Parameters of a Language Model?](https://arxiv.org/abs/1910.10683.pdf)

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
[Open in Colab](https://github.com/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/streamlit_notebooks/T5TRANSFORMER.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/google_t5_small_ssm_nq_en_2.7.1_2.4_1610137175322.zip){:.button.button-orange.button-orange-trans.arr.button-icon}

## How to use

Either set the following tasks or have them inline with your input:

- nq question:
- trivia question:
- question:
- nq:

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
document_assembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("documents")

t5 = T5Transformer() \
.pretrained("google_t5_small_ssm_nq") \
.setTask("nq:")\
.setMaxOutputLength(200)\
.setInputCols(["documents"]) \
.setOutputCol("answer")

pipeline = Pipeline().setStages([document_assembler, t5])
results = pipeline.fit(data_df).transform(data_df)

results.select("answer.result").show(truncate=False)

```
```scala
val documentAssembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("documents")

val t5 = T5Transformer
.pretrained("google_t5_small_ssm_nq")
.setTask("nq:")
.setInputCols(Array("documents"))
.setOutputCol("answer")

val pipeline = new Pipeline().setStages(Array(documentAssembler, t5))

val model = pipeline.fit(dataDf)
val results = model.transform(dataDf)

results.select("answer.result").show(truncate = false)
```

{:.nlu-block}
```python
import nlu
nlu.load("en.t5").predict("""Put your text here.""")
```

</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|google_t5_small_ssm_nq|
|Compatibility:|Spark NLP 2.7.1+|
|Edition:|Official|
|Input Labels:|[sentence]|
|Output Labels:|[t5]|
|Language:|en|

## Data Source

The model was pre-trained using T5's denoising objective on C4, subsequently additionally pre-trained using REALM's salient span masking objective on Wikipedia, and finally fine-tuned on Natural Questions (NQ).


text:
namespace CaretFisheye
{
    using System.ComponentModel.Composition;
    using Microsoft.VisualStudio.Text.Editor;
    using Microsoft.VisualStudio.Text.Formatting;
    using Microsoft.VisualStudio.Utilities;

    /// <summary>
    /// This class implements a connector that produces the CaretFisheye LineTransformSourceProvider.
    /// </summary>
    [Export(typeof(ILineTransformSourceProvider))]
    [ContentType("text")]
    [TextViewRole(PredefinedTextViewRoles.Interactive)]
    internal sealed class CaretFisheyeLineTransformSourceProvider : ILineTransformSourceProvider
    {
        public ILineTransformSource Create(IWpfTextView textView)
        {
            return CaretFisheyeLineTransformSource.Create(textView);
        }
    }
}


text:
package zipkin2.server.internal.cassandra;

import brave.Tracing;
import brave.cassandra.driver.TracingSession;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import zipkin2.server.internal.ConditionalOnSelfTracing;
import zipkin2.storage.StorageComponent;
import zipkin2.storage.cassandra.v1.SessionFactory;

/**
 * This storage accepts Cassandra logs in a specified category. Each log entry is expected to
 * contain a single span, which is TBinaryProtocol big-endian, then base64 encoded. Decoded spans
 * are stored asynchronously.
 */
@Configuration
@EnableConfigurationProperties(ZipkinCassandraStorageProperties.class)
@ConditionalOnProperty(name = "zipkin.storage.type", havingValue = "cassandra")
@ConditionalOnMissingBean(StorageComponent.class)
public class ZipkinCassandraStorageConfiguration {

  @Bean SessionFactory sessionFactory() {
    return new SessionFactory.Default();
  }

  @Bean
  @ConditionalOnMissingBean
  StorageComponent storage(
      ZipkinCassandraStorageProperties properties,
      SessionFactory sessionFactory,
      @Value("${zipkin.storage.strict-trace-id:true}") boolean strictTraceId,
      @Value("${zipkin.storage.search-enabled:true}") boolean searchEnabled,
      @Value("${zipkin.storage.autocomplete-keys:}") List<String> autocompleteKeys,
      @Value("${zipkin.storage.autocomplete-ttl:3600000}") int autocompleteTtl,
      @Value("${zipkin.storage.autocomplete-cardinality:20000}") int autocompleteCardinality) {
   return properties.toBuilder()
      .strictTraceId(strictTraceId)
      .searchEnabled(searchEnabled)
      .autocompleteKeys(autocompleteKeys)
      .autocompleteTtl(autocompleteTtl)
      .autocompleteCardinality(autocompleteCardinality)
      .sessionFactory(sessionFactory).build();
  }

  @Configuration
  @ConditionalOnSelfTracing
  static class TracingSessionFactoryEnhancer implements BeanPostProcessor {

    @Autowired(required = false) Tracing tracing;

    @Override public Object postProcessBeforeInitialization(Object bean, String beanName) {
      return bean;
    }

    @Override public Object postProcessAfterInitialization(Object bean, String beanName) {
      if (tracing == null) return bean;
      if (bean instanceof SessionFactory) {
        SessionFactory delegate = (SessionFactory) bean;
        return (SessionFactory) storage -> TracingSession.create(tracing, delegate.create(storage));
      }
      return bean;
    }
  }
}


text:
- Fixed pragma warnings (issue #14)
- Updated documentation
- Added support for versioning the mat file

```
%Save as -v6 rather than the default, -v7.3
options = adi.mat_conversion_options;
options.version = '-v6';
adi.convert(file_path,'conversion_options',options);
```


text:
var request = require('request');

const BASE_URL = 'https://represent.opennorth.ca';

var Represent = {
    get: function(url, callback){
      request(BASE_URL + url , function (error, response, body) {
        if (error)
          return callback(error);
        if (response.statusCode !== 200)
          return callback(new Error("GET " + url + ": " + response.statusCode + " status"));
        try {
          callback(null, JSON.parse(body));
        } catch (error){
          callback(new Error("GET " + url + ": Error parsing response"));
        }
      });
    }

  , boundarySets: function(boundarySet, callback){
      Represent.get("/boundary-sets/" + boundarySet, callback);
    }

  , boundaries: function(boundary, callback){
      Represent.get("/boundaries/" + boundary, callback);
    }

  , boundariesLatLon: function(lat, lon, callback){
      Represent.get("/boundaries/?contains=" + lat + "," + lon, callback);
    }

  , postalCode: function(code, callback){
      Represent.get("/postcodes/" + code, callback);
    }

  , representativeSets: function(representativeSet, callback){
      Represent.get("/representative-sets/" + representativeSet, callback);
    }

  , representatives: function(representative, callback){
      Represent.get("/representatives/" + representative, callback);
    }

  , representativesLatLon: function(lat, lon, callback){
      Represent.get("/representatives/?point=" + lat + "," + lon, callback);
    }

  , elections: function(election, callback){
      Represent.get("/elections/" + election, callback);
    }

  , candidates: function(candidates, callback){
      Represent.get("/candidates/" + candidates, callback);
    }

  , candidatesLatLon: function(lat, lon, callback){
      Represent.get("/candidates/?point=" + lat + "," + lon, callback);
    }
};

module.exports = Represent;


text:
package com.alibaba.fastjson.support.spring;

import org.springframework.http.HttpInputMessage;
import org.springframework.http.HttpOutputMessage;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.HttpMessageNotWritableException;

import java.io.IOException;
import java.lang.reflect.Type;

/**
 * keep the class for compatibility
 * @see FastJsonHttpMessageConverter
 */
@Deprecated
public class FastJsonHttpMessageConverter4 extends FastJsonHttpMessageConverter {
    @Override
    protected boolean supports(Class<?> clazz) {
        return super.supports(clazz);
    }

    @Override
    public boolean canRead(Type type, Class<?> contextClass, MediaType mediaType) {
        return super.canRead(type, contextClass, mediaType);
    }

    @Override
    public boolean canWrite(Type type, Class<?> clazz, MediaType mediaType) {
        return super.canWrite(type, clazz, mediaType);
    }

    @Override
    public Object read(Type type, Class<?> contextClass, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException {
        return super.read(type, contextClass, inputMessage);
    }

    @Override
    public void write(Object o, Type type, MediaType contentType, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException {
        super.write(o, type, contentType, outputMessage);
    }

    @Override
    protected Object readInternal(Class<?> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException {
        return super.readInternal(clazz, inputMessage);
    }

    @Override
    protected void writeInternal(Object object, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException {
        super.writeInternal(object, outputMessage);
    }
}


text:
  <app-main-toolbar></app-main-toolbar>

  <md-sidenav-container>

    <md-sidenav mode="side" opened>

      <app-navigation-menu-left></app-navigation-menu-left>

    </md-sidenav>

    <app-prosfores-table></app-prosfores-table>

  </md-sidenav-container>


text:
<?php
namespace Bloom;

use Rediska;

/**
 * @package     Bloom
 * @category    Bloom
 *
 * echo (1000000/PHP_INT_MAX) * log(2);
 * >>> 0.00032277180854358
 */
class Filter
{
    /**
     * @var string
     */
    const KEY_BIT_COUNT = 'bf:ka';
    /**
     * @var string
     */
    const KEY_BIT_VECTOR = 'bf:bv';
    /**
     * @var \Bloom\Hash\HashInterface
     */
    protected $_hash;
    /**
     * @var array
     */
    protected $_options = array(
        'buckets'    => 4,
        'keyprefix' => 'bf',
        'hashclass' => '\Bloom\Hash\HashMix'
    );
    /**
     * @var Rediska
     */
    protected $rediska;

    /**
     * @param array $options
     */
    public function __construct($options = array())
    {
        $this->setOptions($options);
    }

    public function setOptions($options)
    {
        $reflect = new \ReflectionClass($this);
        foreach ($options as $option => $value) {
            $method = 'set' . ucfirst($option);
            if($reflect->hasMethod($method)){
                $reflect->getMethod($method)->invokeArgs($this, array($value));
            }
        }
    }

    /**
     * @return array
     */
    public function getOptions()
    {
        return $this->_options;
    }

    /**
     * @param integer $buckets
     * @return Filter
     */
    public function setBuckets($buckets)
    {
        $this->_options['buckets'] = $buckets;
        return $this;
    }

    /**
     * @param string $prefix
     * @return Filter
     */
    public function setKeyprefix($prefix)
    {
        $this->_options['keyprefix'] = $prefix;
        return $this;
    }

    /**
     * @param string $class
     * @return Filter
     */
    public function setHashclass($class)
    {
        $this->_options['hashclass'] = $class;
        return $this;
    }
    /**
     * @param $element
     */
    public function add($element)
    {
        try{
            $elements     = (array)$element;
//            $elements = array();
//            foreach ($element as $el) {
//                if(!$this->contains($el)){
//                    array_unshift($elements, $el);
//                }
//            }
            $transaction = $this
                ->getRediska()
                ->pipeline();
            if(!$elements){
                return false;
            }
            $i = 0;
            foreach ($elements as $el) {
//                $transaction->increment($this->_options['keyprefix'] . self::KEY_BIT_COUNT);
                foreach ($this->getHash($el) as $offset) {
                    $transaction->setBit(
                        $this->_options['keyprefix'] . self::KEY_BIT_VECTOR,
                        $offset, 1
                    );
                    if(++$i % 1000){
                        $transaction->execute();
                    }
                }
            }
            $result = $transaction->execute();
            return (bool) array_shift($result);
        } catch(\Rediska_Transaction_Exception $e) {
            echo $e->getMessage(), PHP_EOL;
            return false;
        }
    }

    /**
     * @param $element
     * @return bool
     */
    public function contains($element)
    {
        $element     = (array)$element;
        $transaction = $this
            ->getRediska()
            ->pipeline();
        foreach ($element as $el) {
            foreach ($this->getHash($el) as $offset) {
                $transaction->getBit(
                    $this->_options['keyprefix'] . self::KEY_BIT_VECTOR,
                    $offset
                );
            }
        }
        $result = $transaction->execute();
        return (bool)!in_array(0, $result);
    }

    /**
     * @return int
     */
    public function getNumberOfElements()
    {
        return (int)$this
            ->getRediska()
            ->get($this->_options['keyprefix'] . self::KEY_BIT_COUNT);
    }

    /**
     * @var string $element
     * @return array
     */
    public function getHash($element)
    {
        if(!$this->_hash){
            if($this->_options['hashclass'] instanceof \Bloom\Hash\HashInterface){
                $this->_hash = $this->_options['hashclass'];
            } else {
                $reflect = new \ReflectionClass($this->_options['hashclass']);
                if(!$reflect->implementsInterface('\Bloom\Hash\HashInterface')){
                    throw new \RuntimeException(
                        'hashclass must implement interface [\Bloom\Hash\HashInterface]'
                    );
                }
                $this->_hash = $reflect->newInstance();
            }
        }
        $hash = array();
        for ($i = 0; $i < $this->_options['buckets']; $i++) {
            array_unshift($hash, $this->_hash->hash($element, $i));
        }
        return (array)$hash;
    }

    /**
     * @param HashInterface $hash
     * @return Filter
     */
    public function setHash(\Bloom\Hash\HashInterface $hash)
    {
        $this->_hash = $hash;
        return $this;
    }

    /**
     * @param bool $numberOfElements
     * @return number
     */
    public function getFalsePositiveProbability()
    {
        // (1 - e^(-k * n / m)) ^ k
        return pow(
            (1 - exp(-$this->_options['buckets'] * $this->getCount() / PHP_INT_MAX)),
            $this->_options['buckets']
        );
    }

    /**
     * @return int
     */
    public function getCount()
    {
        return (int) $this->getRediska()
            ->get($this->_options['keyprefix'] . self::KEY_BIT_COUNT);
    }

    /**
     * @return \Rediska
     */
    public function getRediska()
    {
        if(!$this->rediska instanceof \Rediska){
            $this->rediska = new \Rediska();
        }
        return $this->rediska;
    }

    /**
     * @param \Rediska $rediska
     */
    public function setRediska(\Rediska $rediska)
    {
        $this->rediska = $rediska;
    }
}


text:
"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

Object.defineProperty(exports, "__esModule", {
  value: true
});
var _exportNames = {};
Object.defineProperty(exports, "default", {
  enumerable: true,
  get: function get() {
    return _withWidth.default;
  }
});

var _withWidth = _interopRequireWildcard(require("./withWidth"));

Object.keys(_withWidth).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function get() {
      return _withWidth[key];
    }
  });
});


text:
var authKey = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiR2FsIFNoZW5hciIsImVtYWlsIjoiZ3NoZW5hckB2aXN0YXByaW50LmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJzY29wZXMiOltdLCJhcHBfbWV0YWRhdGEiOnsidmNzX3BhcnRuZXJfaWQiOiIyMDE2aGFja2F0aG9uLTM5NTM1MzQ4LTM1YmUtNDM3Zi1hMzE5LTUwN2RiMzMyMTg0ZCJ9LCJpc3MiOiJodHRwczovL2NpbXByZXNzLmF1dGgwLmNvbS8iLCJzdWIiOiJhZGZzfGdzaGVuYXJAdmlzdGFwcmludC5jb20iLCJhdWQiOiI0R3RreEpoejBVMWJkZ2dITWRheVNBeTA1SVY0TUVEViIsImV4cCI6MTQ2NzQxMDkwNCwiaWF0IjoxNDY3Mzc0OTA0LCJhenAiOiJRa3hPdk56NGZXUkZUNnZjcTc5eWxjSXVvbEZ6MmN3TiJ9.MIwAUWXlAA2HTmtAxeKjtoY41HvDHu2HnEvZLZ4BQPM";

function createDocumentFromImages(Images, Sku) {
    return new Promise(function(resolve, reject) {
      fetch('https://api.cimpress.io/vcs/printapi/v1/documents/creators/url', {
        method: 'POST',
        headers : {
          'Accept': 'application/json',
          'Content-Type': 'application/json',
          'Authorization': authKey
        },
        body: JSON.stringify({
          Images: Images,
          Sku: Sku
        })
      })
        .then(function(response) {
          response.StatusCode !== 500 ? resolve(response) : reject(response.message);
        });
    });
  }

function createDocumentFromUploads(index, Sku) {
  return new Promise(function(resolve, reject) {
    var data = new FormData();
    //data = new FormData($(".file-uploader")[0]);
    data.append("Sku", Sku);
    data.append("MultipagePdf", false);
    data.append("Files", $(".file-uploader")[0].files[index]);
    $.ajax({
      url: 'https://api.cimpress.io/vcs/printapi/v1/documents/creators/file',
      data: data,
      cache: false,
      contentType: false,
      processData: false,
      headers : {
        'Authorization': authKey
      },
      type: 'POST',
      success: function(data){
          resolve(data);
      }
    });
  });
}

function createDocumentFromMultipleUploads(Images, Sku) {
  return new Promise(function(resolve, reject) {
    var data = new FormData();
    //data = new FormData($(".file-uploader")[0]);
    data.append("Sku", Sku);
    data.append("MultipagePdf", false);
    data.append("Files", $(".file-uploader")[0].files[0]);
    $.ajax({
      url: 'https://api.cimpress.io/vcs/printapi/v1/documents/creators/file',
      data: data,
      cache: false,
      contentType: false,
      processData: false,
      headers : {
        'Authorization': authKey
      },
      type: 'POST',
      success: function(data){
          resolve(data);
      }
    });
  });
}

function guid() {

function _p8(s) {
  var p = (Math.random().toString(16) + "000000000").substr(2, 8);
  return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p;
}

return _p8() + _p8(true) + _p8(true) + _p8();
}

function createDocumentFromJson(json) {
    return new Promise(function(resolve, reject) {
      $.ajax({
          type: 'POST',
          headers: {
              'Authorization': 'Basic aW50ZXJuYWwtdGVzdC1tZXJjaGFudDppYW1zdXBlcnRlc3Q=',
          },
          url: 'https://uds.documents.cimpress.io/merchants/internal-test-merchant/documents/demo-' + guid(),
          data: json,
          contentType: "application/json",
          dataType: "json",
          success: function(msg) {
              resolve(msg);
          },
          error: function(data) {
              alert("UDS posting error");
          },
      })
    });
};

function uploadImages(index) {
    return new Promise(function(resolve, reject) {
        var data = new FormData();
        data.append("file", $(".file-uploader")[0].files[index]);

        $.ajax({
            type: 'POST',
            url: 'https://uploads.documents.cimpress.io/v1/uploads?process=%7B%22type%22%3A%22image%22%7D',
            data: data,
            dataType: "json",
            contentType: false,
            processData: false,
            success: function(data) {
              window["upload" + index] = 'http://uploads.documents.cimpress.io:80/v1/uploads/' + data[0].uploadId + '/preview';
              resolve('http://uploads.documents.cimpress.io:80/v1/uploads/' + data[0].uploadId + '/preview');
            },
        });
    });
};

var getMugScene = function(index) {
    switch(index) {
      case 0:
          return "http://rendering.documents.cimpress.io/v1/vp/preview?width=200&imageuris=" + encodeURIComponent(window["upload" + index]) + "&scene=" + encodeURIComponent("http://www.vistaprint.com/documents/api/scene/1314");
    case 1:
          return "http://rendering.documents.cimpress.io/v1/vp/preview?width=200&imageuris=" + encodeURIComponent(window["upload" + index]) + "&scene=" + encodeURIComponent("http://www.vistaprint.com/documents/api/scene/1893");
    case 2:
          return "http://rendering.documents.cimpress.io/v1/vp/preview?width=200&imageuris=" + encodeURIComponent(window["upload" + index]) + "&scene=" + encodeURIComponent("http://www.vistaprint.com/documents/api/scene/1382");
    case 3:
          return "http://rendering.documents.cimpress.io/v1/vp/preview?width=200&imageuris=" + encodeURIComponent(window["upload" + index]) + "&scene=" + encodeURIComponent("http://www.vistaprint.com/documents/api/scene/1314");
    }
}

var getPosterScene = function(instructionSourceUrl) {
    return "http://rendering.documents.cimpress.io/v1/vp/preview?width=400&instructions_uri=" + encodeURIComponent(instructionSourceUrl) + "&scene=https%3A%2F%2Fscene.products.cimpress.io%2Fv1%2Fscenes%2F148e59fb-7a1a-42dd-88df-74302894a416&showerr=1"
}

function submitOrder(docInfo1, docInfo2, docInfo3, docInfo4) {
  // shippingInfo.Items[0].DocumentInstructionSourceUrl = docInfo.DocumentInstructionSourceUrl;
  // shippingInfo.Items[0].DocumentId = docInfo.DocumentId;
  // shippingInfo.Items[0].Sku = docInfo.Sku;

  var items = [];
  items.push(getOrderItem(docInfo1));
  items.push(getOrderItem(docInfo2));
  items.push(getOrderItem(docInfo3));
  items.push(getOrderItem(docInfo4));
  shippingInfo.Items = items;

  $.ajax({
    url: "https://api.cimpress.io/vcs/printapi/v1/orders",
    type: 'POST',
    headers : {
      'Accept': 'application/json',
      'Content-Type': 'application/json',
      'Authorization': authKey
    },
    data: JSON.stringify(shippingInfo),
    success: function(response) {
      console.log(response);
      $(".actual-order-details").append("
");
      $(".pre-block").append("" + JSON.stringify(response, null, 4) + "");
      $(".actual-order-details").show();
    }
  });
}

var shippingInfo =
{
  "ShippingLabelDetail": {
    "MerchantShippingReference": "MerchantShippingReference",
    "ReturnAddress": {
      "LastName": "Shenar",
      "FirstName": "Gal",
      "MiddleName": "J",
      "PhoneExtension": "15874",
      "PostalCode": "02492",
      "County": "USA",
      "AddressLine2": "",
      "City": "MA",
      "Phone": "123456789",
      "CountryCode": "US",
      "CompanyName": "Cimpress",
      "StateOrRegion": "MA",
      "AddressLine1": "275 Wyman St"
    },
    "MerchantDisplayName": "Test Merchant"
  },
  "DestinationAddress": {
      "LastName": "Shenar",
      "FirstName": "Gal",
      "MiddleName": "J",
      "PhoneExtension": "15874",
      "PostalCode": "02492",
      "County": "USA",
      "AddressLine2": "",
      "City": "MA",
      "Phone": "123456789",
      "CountryCode": "US",
      "CompanyName": "Cimpress",
      "StateOrRegion": "MA",
      "AddressLine1": "275 Wyman St"
  },
  "DeliveryOptionId": "2",
  "Items": [
    {
      "Sku": "VIP-2638",
      "DocumentInstructionSourceVersion": "2.0",
      "DocumentInstructionSourceUrl": "http://uds.documents.cimpress.io/v2/merchants/vcs/documents/2016hackathon-a3ba5e5e-21ea-4b5e-9018-d5a818ced105/instructions?token=0780f5402e17d236a65d8df3d72fe5a1",
      "DocumentId": "2016hackathon-a3ba5e5e-21ea-4b5e-9018-d5a818ced105",
      "Quantity": 1,
      "PartnerProductName": "Test Product",
      "PartnerItemId": "Test PartnerItemId"
    }
  ],
  "PartnerOrderId": "Test PartnerOrderId"
}

function getOrderItem(docInfo) {
    return {
      "Sku": docInfo.Sku,
      "DocumentInstructionSourceVersion": "2.0",
      "DocumentInstructionSourceUrl": docInfo.DocumentInstructionSourceUrl,
      "DocumentId": docInfo.DocumentId,
      "Quantity": 1,
      "PartnerProductName": "Test Product",
      "PartnerItemId": "Test PartnerItemId" + Math.random()
    }
}


text:
namespace mscorlib
{
	namespace System
	{

		class String;
		class Type;

	}
}
namespace mscorlib
{
	namespace System
	{
		namespace Reflection
		{

			class MemberInfo;
			class CustomAttributeData;

		}
	}
}
namespace mscorlib
{
	namespace System
	{
		namespace Reflection
		{

			class ParameterInfo
				: public mscorlib::System::Object
				, public virtual mscorlib::System::Reflection::ICustomAttributeProvider
				, public virtual mscorlib::System::Runtime::InteropServices::_ParameterInfo
			{
			public:
				ParameterInfo(mscorlib::NativeTypeInfo *nativeTypeInfo)
				: mscorlib::System::Object(nativeTypeInfo)
				, mscorlib::System::Reflection::ICustomAttributeProvider(NULL)
				, mscorlib::System::Runtime::InteropServices::_ParameterInfo(NULL)
				{
				};

				ParameterInfo(MonoObject *nativeObject)
				: mscorlib::System::Object(nativeObject)
				, mscorlib::System::Reflection::ICustomAttributeProvider(nativeObject)
				, mscorlib::System::Runtime::InteropServices::_ParameterInfo(nativeObject)
				{
				};

				~ParameterInfo()
				{
				};

				ParameterInfo & operator=(ParameterInfo &value) { __native_object__ = value.GetNativeObject(); return value; };
				bool operator==(ParameterInfo &value) { return mscorlib::System::Object::Equals(value); };
				operator MonoObject*() { return __native_object__; };
				MonoObject* operator=(MonoObject* value) { return __native_object__ = value; };

				virtual mscorlib::System::String  ToString() override;
				virtual std::vector<mscorlib::System::Object*>  GetCustomAttributes(mscorlib::System::Boolean inherit);
				virtual std::vector<mscorlib::System::Object*>  GetCustomAttributes(mscorlib::System::Type attributeType, mscorlib::System::Boolean inherit);
				virtual mscorlib::System::Boolean  IsDefined(mscorlib::System::Type attributeType, mscorlib::System::Boolean inherit);
				virtual std::vector<mscorlib::System::Type*>  GetRequiredCustomModifiers();
				virtual std::vector<mscorlib::System::Type*>  GetOptionalCustomModifiers();
				virtual mscorlib::System::Collections::Generic::IList<mscorlib::System::Reflection::CustomAttributeData>  GetCustomAttributesData();
				virtual MonoObject* GetNativeObject()  override  { return __native_object__; };

				//Public Properties
				__declspec(property(get=get_ParameterType)) mscorlib::System::Type  ParameterType;
				__declspec(property(get=get_Attributes)) mscorlib::System::Reflection::ParameterAttributes::__ENUM__  Attributes;
				__declspec(property(get=get_IsIn)) mscorlib::System::Boolean  IsIn;
				__declspec(property(get=get_IsLcid)) mscorlib::System::Boolean  IsLcid;
				__declspec(property(get=get_IsOptional)) mscorlib::System::Boolean  IsOptional;
				__declspec(property(get=get_IsOut)) mscorlib::System::Boolean  IsOut;
				__declspec(property(get=get_IsRetval)) mscorlib::System::Boolean  IsRetval;
				__declspec(property(get=get_Member)) mscorlib::System::Reflection::MemberInfo  Member;
				__declspec(property(get=get_Name)) mscorlib::System::String  Name;
				__declspec(property(get=get_Position)) mscorlib::System::Int32  Position;
				__declspec(property(get=get_CustomAttributes)) mscorlib::System::Collections::Generic::IEnumerable<mscorlib::System::Reflection::CustomAttributeData>  CustomAttributes;
				__declspec(property(get=get_HasDefaultValue)) mscorlib::System::Boolean  HasDefaultValue;
				__declspec(property(get=get_DefaultValue)) mscorlib::System::Object  DefaultValue;
				__declspec(property(get=get_RawDefaultValue)) mscorlib::System::Object  RawDefaultValue;
				__declspec(property(get=get_MetadataToken)) mscorlib::System::Int32  MetadataToken;

				//Get Set Properties Methods
				//	Get:ParameterType
				mscorlib::System::Type  get_ParameterType() const;

				//	Get:Attributes
				mscorlib::System::Reflection::ParameterAttributes::__ENUM__  get_Attributes() const;

				//	Get:IsIn
				mscorlib::System::Boolean  get_IsIn() const;

				//	Get:IsLcid
				mscorlib::System::Boolean  get_IsLcid() const;

				//	Get:IsOptional
				mscorlib::System::Boolean  get_IsOptional() const;

				//	Get:IsOut
				mscorlib::System::Boolean  get_IsOut() const;

				//	Get:IsRetval
				mscorlib::System::Boolean  get_IsRetval() const;

				//	Get:Member
				mscorlib::System::Reflection::MemberInfo  get_Member() const;

				//	Get:Name
				mscorlib::System::String  get_Name() const;

				//	Get:Position
				mscorlib::System::Int32  get_Position() const;

				//	Get:CustomAttributes
				mscorlib::System::Collections::Generic::IEnumerable<mscorlib::System::Reflection::CustomAttributeData>  get_CustomAttributes() const;

				//	Get:HasDefaultValue
				mscorlib::System::Boolean  get_HasDefaultValue() const;

				//	Get:DefaultValue
				mscorlib::System::Object  get_DefaultValue() const;

				//	Get:RawDefaultValue
				mscorlib::System::Object  get_RawDefaultValue() const;

				//	Get:MetadataToken
				mscorlib::System::Int32  get_MetadataToken() const;

			protected:

			private:

			};

		}
	}
}
#endif


text:
function varargout = movieDataGUI(varargin)
% MOVIEDATAGUI M-file for movieDataGUI.fig
%      MOVIEDATAGUI, by itself, creates a new MOVIEDATAGUI or raises the existing
%      singleton*.
%
%      H = MOVIEDATAGUI returns the handle to a new MOVIEDATAGUI or the handle to
%      the existing singleton*.
%
%      MOVIEDATAGUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in MOVIEDATAGUI.M with the given input arguments.
%
%      MOVIEDATAGUI('Property','Value',...) creates a new MOVIEDATAGUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before movieDataGUI_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to movieDataGUI_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
%
% Copyright (C) 2014 LCCB
%
% This file is part of u-track.
%
% u-track is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% u-track is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with u-track.  If not, see <http://www.gnu.org/licenses/>.
%
%

% Edit the above text to modify the response to help movieDataGUI

% Last Modified by GUIDE v2.5 20-Apr-2013 12:53:57

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @movieDataGUI_OpeningFcn, ...
                   'gui_OutputFcn',  @movieDataGUI_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before movieDataGUI is made visible.
function movieDataGUI_OpeningFcn(hObject, eventdata, handles, varargin)
%
% movieDataGUI('mainFig', handles.figure1) - call from movieSelector
% movieDataGUI(MD) - MovieData viewer
%
% Useful tools:
%
% User Data:
%
% userData.channels - array of Channel objects
% userData.mainFig - handle of movie selector GUI
% userData.handles_main - 'handles' of movie selector GUI
%
% userData.setChannelFig - handle of channel set-up figure
% userData.iconHelpFig - handle of help dialog
%
% NOTE: If movieDataGUI is under the "Overview" mode, additionally,
%
% userData.MD - the handle of selected MovieData object
%
%

% Input check
ip = inputParser;
ip.addRequired('hObject',@ishandle);
ip.addRequired('eventdata',@(x) isstruct(x) || isempty(x));
ip.addRequired('handles',@isstruct);
ip.addOptional('MD',[],@(x) isa(x,'MovieData'));
ip.addParamValue('mainFig',-1,@ishandle);
ip.parse(hObject,eventdata,handles,varargin{:})

% Store inpu
userData = get(handles.figure1, 'UserData');
userData.MD=ip.Results.MD;
userData.mainFig=ip.Results.mainFig;

set(handles.text_copyright, 'String', getLCCBCopyright());

% Set channel object array
userData.channels = Channel.empty(1,0);

% Load help icon from dialogicons.mat
userData = loadLCCBIcons(userData);
supermap(1,:) = get(hObject,'color');

userData.colormap = supermap;

set(handles.figure1,'CurrentAxes',handles.axes_help);
Img = image(userData.questIconData);
set(hObject,'colormap',supermap);
set(gca, 'XLim',get(Img,'XData'),'YLim',get(Img,'YData'),...
    'visible','off');
set(Img,'ButtonDownFcn',@icon_ButtonDownFcn,...
    'UserData', struct('class', mfilename));

if ~isempty(userData.MD),
    userData.channels = userData.MD.channels_;
    set(handles.listbox_channel, 'String', userData.MD.getChannelPaths)

    % GUI setting
    set(handles.pushbutton_delete, 'Enable', 'off')
    set(handles.pushbutton_add, 'Enable', 'off')
    set(handles.pushbutton_output, 'Enable', 'off')

    set(hObject, 'Name', 'Movie Detail')
    set(handles.edit_path,'String', userData.MD.getFullPath)
    set(handles.edit_output, 'String', userData.MD.outputDirectory_)
    set(handles.edit_notes, 'String', userData.MD.notes_)

    % GUI setting - parameters
    propNames={'pixelSize_','timeInterval_','numAperture_','camBitdepth_'};
    validProps = ~cellfun(@(x) isempty(userData.MD.(x)),propNames);

    propNames=propNames(validProps);
    cellfun(@(x) set(handles.(['edit_' x(1:end-1)]),'Enable','off',...
        'String',userData.MD.(x)),propNames)
end

% Choose default command line output for movieDataGUI
handles.output = hObject;

% Update handles structure
set(handles.figure1,'UserData',userData)
guidata(hObject, handles);

% UIWAIT makes movieDataGUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = movieDataGUI_OutputFcn(~, ~, handles)
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% --- Executes on button press in pushbutton_cancel.
function pushbutton_cancel_Callback(~, ~, handles)
% hObject    handle to pushbutton_cancel (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
delete(handles.figure1);

% --- Executes on button press in pushbutton_done.
function pushbutton_done_Callback(hObject, eventdata, handles)

userData = get(handles.figure1,'UserData');

% Verify channels are given
if ~isfield(userData, 'channels') || isempty(userData.channels)
    errordlg('Please provide at least one channel path.',...
        'Empty Channel','modal');
    return;
end

assert(isa(userData.channels(1), 'Channel'),'User-defined: userData.channels are not of class ''Channel''')

% Check output path
outputDir = get(handles.edit_output, 'String');
if isempty(outputDir) || ~exist(outputDir, 'dir')
    errordlg('Please provide a valid output path to save your results.', ...
               'Empty Output Path', 'modal');
    return;
end

% Concatenate numerical parameters as movie options
propNames={'pixelSize_','timeInterval_','numAperture_','camBitdepth_'};
propHandles = cellfun(@(x) handles.(['edit_' x(1:end-1)]),propNames);
propStrings =get(propHandles,'String');
validProps = ~cellfun(@isempty,propStrings);
if ~isempty(userData.MD),
    validProps=validProps & cellfun(@(x)isempty(userData.MD.(x)),propNames');
end
propNames=propNames(validProps);
propValues=num2cell(str2double(propStrings(validProps)))';

movieOptions = vertcat(propNames,propValues);
movieOptions = reshape(movieOptions,1,numel(propNames)*2);

% If movieDataGUI is under "Overview" mode
if ~isempty(get(handles.edit_notes, 'String'))
    movieOptions=horzcat(movieOptions,'notes_',get(handles.edit_notes, 'String'));
end

if ~isempty(userData.MD),
    % Overview mode - edit existing MovieDat
    if ~isempty(movieOptions)
        try
            set(userData.MD,movieOptions{:});
        catch ME
            errormsg = sprintf([ME.message '.\n\nMovie edition failed.']);
            errordlg(errormsg, 'User Input Error','modal');
            return;
        end
    end
else
    % Create Movie Data
    try
        userData.MD = MovieData(userData.channels, outputDir, movieOptions{:});
    catch ME
        errormsg = sprintf([ME.message '.\n\nMovie creation failed.']);
        errordlg(errormsg, 'User Input Error','modal');
        set(handles.figure1,'UserData',userData)
        return;
    end
end

try
    userData.MD.sanityCheck;
catch ME
    errormsg = sprintf('%s.\n\nPlease check your movie data. Movie data is not saved.',ME.message);
    errordlg(errormsg,'Channel Error','modal');
    set(handles.figure1,'UserData',userData)
    return;
end

% If new MovieData was created (from movieSelectorGUI)
if ishandle(userData.mainFig),
    % Retrieve main window userData
    userData_main = get(userData.mainFig, 'UserData');

    % Check if files in movie list are saved in the same file
    handles_main = guidata(userData.mainFig);
    contentlist = get(handles_main.listbox_movie, 'String');
    movieDataFullPath = userData.MD.getFullPath;
    if any(strcmp(movieDataFullPath, contentlist))
        errordlg('Cannot overwrite a movie data file which is already in the movie list. Please choose another file name or another path.','Error','modal');
        return
    end

    % Append  MovieData object to movie selector panel
    userData_main.MD = horzcat(userData_main.MD, userData.MD);
    set(userData.mainFig, 'UserData', userData_main)
    movieSelectorGUI('refreshDisplay',userData.mainFig,eventdata,guidata(userData.mainFig));
end
% Delete current window
delete(handles.figure1)

function edit_property_Callback(hObject, eventdata, handles)

set(hObject,'BackgroundColor',[1 1 1])
if isempty(get(hObject,'String')), return; end

propTag = get(hObject,'Tag');
propName = [propTag(length('edit_')+1:end) '_'];
propValue = str2double(get(hObject,'String'));
if ~MovieData.checkValue(propName,propValue)
    warndlg('Invalid property value','Setting Error','modal');
    set(hObject,'BackgroundColor',[1 .8 .8]);
    return
end

% --- Executes on button press in pushbutton_delete.
function pushbutton_delete_Callback(hObject, eventdata, handles)

userData = get(handles.figure1, 'Userdata');

contents = get(handles.listbox_channel,'String');
% Return if list is empty
if isempty(contents), return; end
iChan = get(handles.listbox_channel,'Value');

% Delete channel object
delete(userData.channels(iChan))
userData.channels(iChan) = [];
contents(iChan) = [ ];
set(handles.listbox_channel,'String',contents);

% Point 'Value' to the second last item in the list once the
% last item has been deleted
set(handles.listbox_channel,'Value',max(1,min(iChan,length(contents))));

set(handles.figure1, 'Userdata', userData)
guidata(hObject, handles);

% --- Executes on button press in pushbutton_add.
function pushbutton_add_Callback(hObject, eventdata, handles)

set(handles.listbox_channel, 'Value', 1)

userData = get(handles.figure1, 'UserData');
if ishandle(userData.mainFig),
    handles_main = guidata(userData.mainFig);
    userData_main = get(handles_main.figure1, 'UserData');
    userDir =userData_main.userDir;
else
    userDir=pwd;
end

path = uigetdir(userDir, 'Add Channels ...');
if path == 0, return; end

% Get current list
contents = get(handles.listbox_channel,'String');
if any(strcmp(contents,path))
   warndlg('This directory has been selected! Please select a differenct directory.',...
       'Warning','modal');
   return;
end

% Create path object and save it to userData
try
    hcstoggle = get(handles.checkbox4, 'Value');
    if hcstoggle == 1
        newChannel= Channel(path, 'hcsPlatestack_', 1);
        if max(size(newChannel))>1
            for icn = 1:max(size(newChannel))
                newChannel(icn).sanityCheck();
            end
        end

    else
        newChannel = Channel(path);
        newChannel.sanityCheck();
    end
catch ME
    errormsg = sprintf('%s.\n\nPlease check this is valid channel.',ME.message);
    errordlg(errormsg,'Channel Error','modal');
    return
end

% Refresh listbox_channel
userData.channels = horzcat(userData.channels, newChannel);

if hcstoggle == 1
    for in = 1:length(userData.channels)
        ch_name = strcat(userData.channels(in).channelPath_, '-', userData.channels(in).hcsFlags_.wN);
        contents{end+1} = ch_name{1};
    end
else
contents{end+1} = path;
end
set(handles.listbox_channel,'string',contents);

if ishandle(userData.mainFig),
    userData_main.userDir = fileparts(path);
    set(handles_main.figure1, 'UserData', userData_main)
end

set(handles.figure1, 'Userdata', userData)
guidata(hObject, handles);

% --- Executes during object deletion, before destroying properties.
function figure1_DeleteFcn(hObject, eventdata, handles)

userData = get(handles.figure1, 'UserData');

if isfield(userData, 'iconHelpFig') && ishandle(userData.iconHelpFig)
   delete(userData.iconHelpFig)
end

% --- Executes on button press in pushbutton_output.
function pushbutton_output_Callback(hObject, eventdata, handles)

pathname = uigetdir(pwd,'Select a directory to store the processes output');
if isnumeric(pathname), return; end

set(handles.edit_output, 'String', pathname);

% --- Executes on button press in pushbutton_setting_chan.
function pushbutton_setting_chan_Callback(hObject, eventdata, handles)

userData = get(handles.figure1, 'UserData');
if isempty(userData.channels), return; end
assert(isa(userData.channels(1), 'Channel'), 'User-defined: Not a valid ''Channel'' object');

userData.setChannelFig = channelGUI('mainFig', handles.figure1, 'modal');

set(handles.figure1,'UserData',userData);

% --- Executes on button press in pushbutton_bfImport.
function pushbutton_bfImport_Callback(hObject, eventdata, handles)

assert(bfCheckJavaPath(), 'Could not load the Bio-Formats library');

% Note: list of supported formats could be retrieved using
% loci.formats.tools.PrintFormatTable class
[file, path] = uigetfile(bfGetFileExtensions(),...
    'Select image file to import.');
if isequal(file,0) || isequal(path,0), return; end

% Import data into movie using bioformats
importMetadata = logical(get(handles.checkbox_importMetadata,'Value'));
MD = bfImport([path file], importMetadata);

% Update movie selector interface
userData=get(handles.figure1,'UserData');
if ishandle(userData.mainFig),
    % Append  MovieData object to movie selector panel
    userData_main = get(userData.mainFig, 'UserData');
    userData_main.MD = horzcat(userData_main.MD, MD);
    set(userData.mainFig, 'UserData', userData_main)
    movieSelectorGUI('refreshDisplay',userData.mainFig,eventdata,guidata(userData.mainFig))
end

% Relaunch this interface in preview mode
movieDataGUI(MD(end));

% --- Executes on button press in checkbox4.
function checkbox4_Callback(hObject, eventdata, handles)
% hObject    handle to checkbox4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%set(handles.checkbox4, 'Value', 1);
% Hint: get(hObject,'Value') returns toggle state of checkbox4


text:
<?php
	session_start();

	if (isset($_POST['agregarUsuario'])) {
		$nombre = htmlentities($_POST['nameR'], ENT_QUOTES, 'utf-8');
		$usuario = htmlentities($_POST['nickR'], ENT_QUOTES, 'utf-8');
		$email = htmlentities($_POST['emailR'], ENT_QUOTES, 'utf-8');
		$contra = password_hash($_POST['passR'], PASSWORD_BCRYPT);
		$imagen = htmlentities($_POST['imageR'], ENT_QUOTES, 'utf-8');

		$str_datos = file_get_contents("usuarios.json");
		$usuariosJSON = json_decode($str_datos, true);
		$_size = count($usuariosJSON["usuarios"]);
		$ID = $_size;
		$i=0;

	  foreach ($usuariosJSON["usuarios"] as $key => $value) {
	      if($value["id"] !== $ID) {
	          $i++;
	          if($_size === $i) {
	              $datosPesonales = array('email' => $email, 'imagen_perfil' => $imagen, 'nombre' => $nombre);
	              $usuario = array('id' => $ID, 'usuario' => $usuario, 'contrasena' => $contra, 'rango' => 'Munetin', 'datos_personales' => $datosPesonales);
	              array_push($usuariosJSON["usuarios"], $usuario);
	          }
	      }
	  }

	  if (empty($nombre) or $nombre == '') {
	  	$datos_correctos = '
×¡Error al Registrarse! El Usuario ya existe!
';
			echo $datos_correctos;
			return false;
		}

		if (empty($nombre) or $nombre == '') {
	  	$datos_correctos = '
×¡Error al Registrarse! El Nombre no puede estar vacio!
';
			echo $datos_correctos;
			return false;
		} else if (empty($usuario) or $usuario == '') {
	  	$datos_correctos = '
×¡Error al Registrarse! El Usuario no puede estar vacio!
';
			echo $datos_correctos;
			return false;
		} else if (empty($email) or $email == '') {
	  	$datos_correctos = '
×¡Error al Registrarse! El Correo Electronico no puede estar vacio!
';
			echo $datos_correctos;
			return false;
		} else if (empty($_POST['passR']) or $_POST['passR'] == '') {
	  	$datos_correctos = '
×¡Error al Registrarse! La Contraseña no puede estar vacia!
';
			echo $datos_correctos;
			return false;
		} else if (empty($imagen) or $imagen == '') {
	  	$datos_correctos = '
×¡Error al Registrarse! La Imagen no puede estar vacia!
';
			echo $datos_correctos;
			return false;
	  } else if ($usuariosJSON["usuarios"][$ID]["id"] == $ID) {
		  $datos_correctos = '
×Te has registrado correctamente!
';
			echo $datos_correctos;
			$_SESSION['usuario'] = '$usuariosJSON->usuarios['.$ID.']->usuario';
			$_SESSION['correo'] = '$usuariosJSON->usuarios['.$ID.']->datos_personales->email';
			$_SESSION['contrasena'] = '$usuariosJSON->usuarios['.$ID.']->contrasena';
			$_SESSION['rango'] = '$usuariosJSON->usuarios['.$ID.']->rango';
			$_SESSION['imagen'] = '$usuariosJSON->usuarios['.$ID.']->datos_personales->imagen_perfil';
			$_SESSION['nombre'] = '$usuariosJSON->usuarios['.$ID.']->datos_personales->nombre';
			$_SESSION['idAutor'] = '$usuariosJSON->usuarios['.$ID.']->id';
			$posts = fopen("usuarios.json", 'w') or die("Error al abrir fichero de salida");
		  fwrite($posts, json_encode($usuariosJSON, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
		  fclose($posts);
			return false;
		}
	}

	header("Location: ../index.php");
?>


text:
/* jshint latedef: false */
(function () {
  'use strict';

  angular
  .module('apigility.modal')
  .controller('EditDbOption', EditDbOption);

  EditDbOption.$inject = [ '$modalInstance', '$modal', '$stateParams', 'api', 'db', 'option' ];

  function EditDbOption($modalInstance, $modal, $stateParams, api, db, option) {
    /* jshint validthis:true */
    var vm = this;
    vm.db = db;
    vm.option = option;
    vm.value = db.driver_options[option];

    vm.cancel = $modalInstance.dismiss;

    vm.deleteDbOptionModal = function(db, option) {
      var modalInstance = $modal.open({
        templateUrl: 'apigility-ui/modal/delete-dboption.html',
        controller: 'DeleteDbOption',
        controllerAs: 'vm',
        resolve : {
          db : function() {
            return db;
          },
          option : function() {
            return option;
          }
        }
      });

      modalInstance.result.then(function (response) {
        $modalInstance.close(response);
      });
    }

    vm.ok = function() {
      if (!vm.value) {
        vm.alert = 'The option value cannot be empty';
        return;
      }
      vm.loading = true;
      var newDb = angular.copy(db);
      newDb.driver_options[vm.option] = vm.value;
      api.saveDatabase(newDb, function(err, response){
        vm.loading = false;
        if (err) {
          vm.alert = response;
          return;
        }
        $modalInstance.close(response);
      });
    }
  }
})();