text:
/* ----------------------------------------------------------------------------------
 * Hint: This is a derived (generated) file. Changes should be done in the underlying
 * source files only (*.control, *.js) or they will be lost after the next generation.
 * ---------------------------------------------------------------------------------- */

// Provides control sap.ui.commons.Tab.
jQuery.sap.declare("sap.ui.commons.Tab");
jQuery.sap.require("sap.ui.commons.library");
jQuery.sap.require("sap.ui.commons.Panel");

/**
 * Constructor for a new Tab.
 *
 * Accepts an object literal mSettings that defines initial
 * property values, aggregated and associated objects as well as event handlers.
 *
 * If the name of a setting is ambiguous (e.g. a property has the same name as an event),
 * then the framework assumes property, aggregation, association, event in that order.
 * To override this automatic resolution, one of the prefixes "aggregation:", "association:"
 * or "event:" can be added to the name of the setting (such a prefixed name must be
 * enclosed in single or double quotes).
 *
 * The supported settings are:
 *

 *
Properties
 *

 *
{@link #getVerticalScrolling verticalScrolling} : sap.ui.core.Scrolling (default: sap.ui.core.Scrolling.None)

 *
{@link #getHorizontalScrolling horizontalScrolling} : sap.ui.core.Scrolling (default: sap.ui.core.Scrolling.None)

 *
{@link #getClosable closable} : boolean (default: false)

 *
{@link #getSelected selected} : boolean (default: false)

 *

 *
Aggregations
 *

 *

 *
Associations
 *

 *

 *
Events
 *

 *

 *

 *
 *
 * In addition, all settings applicable to the base type {@link sap.ui.commons.Panel#constructor sap.ui.commons.Panel}
 * can be used as well.
 *
 * @param {string} [sId] id for the new control, generated automatically if no id is given
 * @param {object} [mSettings] initial settings for the new control
 *
 * @class
 * A single page in a TabStrip control.
 * @extends sap.ui.commons.Panel
 *
 * @author SAP AG
 * @version 1.22.10
 *
 * @constructor
 * @public
 * @name sap.ui.commons.Tab
 */
sap.ui.commons.Panel.extend("sap.ui.commons.Tab", { metadata : {

	// ---- object ----

	// ---- control specific ----
	library : "sap.ui.commons",
	properties : {
		"verticalScrolling" : {type : "sap.ui.core.Scrolling", group : "Behavior", defaultValue : sap.ui.core.Scrolling.None},
		"horizontalScrolling" : {type : "sap.ui.core.Scrolling", group : "Behavior", defaultValue : sap.ui.core.Scrolling.None},
		"closable" : {type : "boolean", group : "Misc", defaultValue : false},
		"selected" : {type : "boolean", group : "Behavior", defaultValue : false, deprecated: true}
	}
}});

/**
 * Creates a new subclass of class sap.ui.commons.Tab with name sClassName
 * and enriches it with the information contained in oClassInfo.
 *
 * oClassInfo might contain the same kind of informations as described in {@link sap.ui.core.Element.extend Element.extend}.
 *
 * @param {string} sClassName name of the class to be created
 * @param {object} [oClassInfo] object literal with informations about the class
 * @param {function} [FNMetaImpl] constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata.
 * @return {function} the created class / constructor function
 * @public
 * @static
 * @name sap.ui.commons.Tab.extend
 * @function
 */

/**
 * Getter for property verticalScrolling.
 * Set the height property.
 *
 * Default value is None
 *
 * @return {sap.ui.core.Scrolling} the value of property verticalScrolling
 * @public
 * @name sap.ui.commons.Tab#getVerticalScrolling
 * @function
 */

/**
 * Setter for property verticalScrolling.
 *
 * Default value is None
 *
 * @param {sap.ui.core.Scrolling} oVerticalScrolling  new value for property verticalScrolling
 * @return {sap.ui.commons.Tab} this to allow method chaining
 * @public
 * @name sap.ui.commons.Tab#setVerticalScrolling
 * @function
 */

/**
 * Getter for property horizontalScrolling.
 * Set the width property.
 *
 * Default value is None
 *
 * @return {sap.ui.core.Scrolling} the value of property horizontalScrolling
 * @public
 * @name sap.ui.commons.Tab#getHorizontalScrolling
 * @function
 */

/**
 * Setter for property horizontalScrolling.
 *
 * Default value is None
 *
 * @param {sap.ui.core.Scrolling} oHorizontalScrolling  new value for property horizontalScrolling
 * @return {sap.ui.commons.Tab} this to allow method chaining
 * @public
 * @name sap.ui.commons.Tab#setHorizontalScrolling
 * @function
 */

/**
 * Getter for property closable.
 * Defines whether the tab contains a close button.
 *
 * Default value is false
 *
 * @return {boolean} the value of property closable
 * @public
 * @name sap.ui.commons.Tab#getClosable
 * @function
 */

/**
 * Setter for property closable.
 *
 * Default value is false
 *
 * @param {boolean} bClosable  new value for property closable
 * @return {sap.ui.commons.Tab} this to allow method chaining
 * @public
 * @name sap.ui.commons.Tab#setClosable
 * @function
 */

/**
 * Getter for property selected.
 * Defines whether the tab is the active one.
 *
 * Default value is false
 *
 * @return {boolean} the value of property selected
 * @public
 * @deprecated Since version 0.17.0.
 * This property is not used. To indentify the selected tab in a TabStrip selectedIndex is used.
 * @name sap.ui.commons.Tab#getSelected
 * @function
 */

/**
 * Setter for property selected.
 *
 * Default value is false
 *
 * @param {boolean} bSelected  new value for property selected
 * @return {sap.ui.commons.Tab} this to allow method chaining
 * @public
 * @deprecated Since version 0.17.0.
 * This property is not used. To indentify the selected tab in a TabStrip selectedIndex is used.
 * @name sap.ui.commons.Tab#setSelected
 * @function
 */

// Start of sap\ui\commons\Tab.js
/*
 * Initialize the Tab
 * @private
 */
sap.ui.commons.Tab.prototype.init = function() {
	// Setting this to role Tabpanel instead of its container basically worked.
	// However, the role is set one level higher to get better output in screen reader.

	this.oScrollDomRef = null;      // Points to the content area
};

sap.ui.commons.Tab.prototype.rerender = function() {

	// as Tab has no own renderer call renderer of TabStrip
	var oParent = this.getParent();
	if (oParent) {
		oParent.rerender();
	}

};

/*
 * Called after rendering from the TabStrip control
 */
sap.ui.commons.Tab.prototype.onAfterRendering = function () {
	this.oScrollDomRef = this.getDomRef("panel");

	// Restore scroll positions
	if (this.oScrollDomRef) {
		var scrollTop = this.getProperty("scrollTop");
		if (scrollTop > 0) {
			this.oScrollDomRef.scrollTop = scrollTop;
		}
		var scrollLeft = this.getProperty("scrollLeft");
		if (scrollLeft > 0) {
			this.oScrollDomRef.scrollLeft = scrollLeft;
		}
	}

	// TODO: this must also be done for tabs where the contents are not rendered initially
};

/*
 * Returns the scroll position of the tab in pixel from the left. Returns "0" if not rendered yet.
 * Also updates the control property internally.
 *
 * @return The scroll position
 * @public
 */
sap.ui.commons.Tab.prototype.getScrollLeft = function () {
	var scrollLeft = 0;
	if (this.oScrollDomRef) {
		scrollLeft = this.oScrollDomRef.scrollLeft;
		this.setProperty("scrollLeft", scrollLeft, true);
	}

	return scrollLeft;
};

/*
 * Sets the scroll position of the tab in pixel from the left.
 * @param {int} iPosition The position to scroll to
 * @return {sap.ui.commons.Tab} this to allow method chaining
 * @public
 */
sap.ui.commons.Tab.prototype.setScrollLeft = function (iPosition) {
	this.setProperty("scrollLeft", iPosition, true);
	if (this.oScrollDomRef) {                        // TODO: what if called before rendering?
		this.bIgnoreScrollEvent = true;
		this.oScrollDomRef.scrollLeft = iPosition;
	}
	return this;
};

/*
 * Returns the scroll position of the tab in pixel from the top. Returns "0" if not rendered yet.
 * Also updates the control property internally.
 *
 * @return The scroll position
 * @public
 */
sap.ui.commons.Tab.prototype.getScrollTop = function () {
	var scrollTop = 0;
	if (this.oScrollDomRef) {
		scrollTop = this.oScrollDomRef.scrollTop;
		this.setProperty("scrollTop", scrollTop, true);
	}

	return scrollTop;
};

/*
 * Sets the scroll position of the tab in pixel from the top.
 * @param {int} iPosition The position to scroll to
 * @return {sap.ui.commons.Tab} this to allow method chaining
 * @public
 */
sap.ui.commons.Tab.prototype.setScrollTop = function (iPosition) {
	this.setProperty("scrollTop", iPosition, true);
	if (this.oScrollDomRef) {                       // TODO: what if called before rendering?
		this.bIgnoreScrollEvent = true;
		this.oScrollDomRef.scrollTop = iPosition;
	}
	return this;
};

/*
 * Property setter for the "enabled" state (overwrite method from panel)
 * Normally only classes are exchanged and no rerendering is needed.
 * But if selected tab should be disabled this needs a rerendering because
 * the selected tab can not be disabled
 * If no tab is selected (because all tabs are disabled before) also a
 * rerendering is needed.
 *
 * @param bEnabled whether the tab should be enabled or not
 * @return {sap.ui.commons.Tab} this to allow method chaining
 * @public
 */
sap.ui.commons.Tab.prototype.setEnabled = function(bEnabled) {

	if (bEnabled == this.getEnabled()) {
		return this;
	}

	var oDomRef = this.getDomRef();
	var oParent = this.getParent();

	if (!oDomRef || (!bEnabled && jQuery(this.getDomRef()).hasClass("sapUiTabSel")) ||
		(bEnabled && oParent && oParent.getSelectedIndex && oParent.getSelectedIndex() < 0)) {
		this.setProperty("enabled", bEnabled, false); // rendering needed
	} else {
		this.setProperty("enabled", bEnabled, true); // no re-rendering!
		// if already rendered, adapt rendered control without complete re-rendering
		jQuery(this.getDomRef()).toggleClass("sapUiTab", bEnabled).toggleClass("sapUiTabDsbl", !bEnabled).attr("aria-disabled",!bEnabled);
	}
	return this;

};

/*
 * Setter of the width property. As it has no effect on a tab and is
 * only inherited from panel, noting to do. Just overwrite panel implementation
 *
 * @param {string} sWidth the width of the panel as CSS size
 * @return {sap.ui.commons.Tab} this to allow method chaining
 * @public
 */
sap.ui.commons.Tab.prototype.setWidth = function (sWidth) {
	this.setProperty("width", sWidth, true); // don't rerender
	// do nothing
	return this;
};

/*
 * Property setter for the padding.As it has no effect on a tab and is
 * only inherited from panel, noting to do. Just overwrite panel implementation
 *
 * @param bPadding whether the Panel should have padding
 * @returns {sap.ui.commons.Tab} this to allow method chaining
 * @public
 */
sap.ui.commons.Tab.prototype.setApplyContentPadding = function(bPadding) {
	this.setProperty("applyContentPadding", bPadding, true); // no re-rendering!
	// do nothing
	return this;
};

sap.ui.commons.Tab.prototype._handleTrigger = function(oEvent) {
	//see sap.ui.commons.Panel.prototype._handleTrigger -> Nothing to do here
};


text:
require 'spec_helper'

describe 'Purchasing a gift certificate', js: true do
  let(:user) { create(:user) }

  before do
    Spree::GiftCertificate.any_instance.stub(stripe_publishable_key: 'bogus',
                                             stripe_secret_key: 'a key! a key!')

    payment_response = OpenStruct.new(params: { 'id' => 'this_is_an_id' })
    ActiveMerchant::Billing::StripeGateway.any_instance.stub(purchase: payment_response)

    # So emails will be stored in the deliveries array
    ActionMailer::Base.delivery_method = :test
    ActionMailer::Base.deliveries = []
  end

  context 'as a guest' do
    before do
      visit '/gift_certificates'
    end
    it 'should give user helpful errors when not enough information is supplied' do
      click_on 'Buy Gift Certificate'
      wait_for_ajax
      expect(find('#wrapper').find('.flash')).to have_content('Sender email can\'t be blank')
      expect(find('#wrapper').find('.flash')).to have_content('Amount can\'t be blank')
    end

    it 'should allow purchase and retain all info inputted into form' do
      sender_email = 'never@gonna.work'
      amount = 5
      gift_from = 'mom'
      gift_to = 'son'
      message = 'hope you like your leggings!'
      fill_in 'gift_certificate_sender_email', with: sender_email
      fill_in 'gift_certificate_amount', with: amount
      fill_in 'gift_certificate_gift_from', with: gift_from
      fill_in 'gift_certificate_gift_to', with: gift_to
      fill_in 'gift_certificate_message', with: message
      click_on 'Buy Gift Certificate'
      wait_for_ajax
      expect(find('#wrapper')).to_not have_content('Sender email can\'t be blank')
      expect(find('#wrapper')).to_not have_content('Amount can\'t be blank')

      certificate = Spree::GiftCertificate.find_by_sender_email(sender_email)
      certificate_id = certificate.id
      expect(certificate.state).to eq('pending')
      expect(certificate.sender_email).to eq(sender_email)
      expect(certificate.code.nil?).to eq(false)
      expect(certificate.amount).to eq(amount)
      expect(certificate.gift_from).to eq(gift_from)
      expect(certificate.gift_to).to eq(gift_to)
      expect(certificate.message).to eq(message)

      page.evaluate_script("jQuery.post('/buy_gift_certificate', {id: #{certificate_id},
                                                                  stripeToken: {id: 'also_bogus'}},
                                                                  function () { console.log('success'); })")
      wait_for_ajax

      certificate.reload
      expect(certificate.state).to eq('purchased')
      expect(certificate.expiry).to eq(1.year.from_now.to_date)

      deliveries = ActionMailer::Base.deliveries
      expect(deliveries.count).to eq(1)

      email = deliveries.first
      bodies = [email.text_part.body.decoded, email.html_part.body.decoded]

      expect(email.to.first).to eq(sender_email)
      bodies.each do |body|
        expect(body).to have_content(amount)
        expect(body).to have_content(gift_from)
        expect(body).to have_content(gift_to)
        expect(body).to have_content(message)
        expect(body).to have_content(certificate.code)
      end
    end
  end

  context 'as a logged-in user' do
    before do
      Spree::BaseController.any_instance.stub(:spree_current_user).and_return(user)
      visit '/gift_certificates'
    end

    it 'should auto-fill email address in the form' do
      expect(find('#gift_certificate_sender_email').value).to eq(user.email)
    end

    it 'should allow filling of only necessary elements' do
      amount = 5
      fill_in 'gift_certificate_amount', with: amount
      click_on 'Buy Gift Certificate'
      wait_for_ajax

      certificate = Spree::GiftCertificate.find_by_sender_email(user.email)
      expect(certificate.state).to eq('pending')
      expect(certificate.amount).to eq(amount)
      expect(certificate.sender_email).to eq(user.email)
    end
  end

  context 'with preferred values' do
    before do
      Spree::AppConfiguration.class_eval do
        preference :gift_certificate_value_2, :number, default: 30
        preference :gift_certificate_value_3, :number, default: 40
      end
      visit '/gift_certificates'
    end

    it 'should show <select>' do
      expect(page).to have_selector('select#gift_certificate_amount')
    end

    it 'should reveal input upon clicking custom value button' do
      click_on 'Custom value'
      expect(page).to have_selector('input#gift_certificate_amount', visible: true)
    end

    it 'should auto-fill form' do
      default_value = Spree::Config.preferred(:gift_certificate_value_2).to_s
      expect(find('input#gift_certificate_amount', visible: false).value).to eq(default_value)

      other_value = Spree::Config.preferred(:gift_certificate_value_3).to_s
      select(other_value, from: 'gift_certificate_amount')
      expect(find('input#gift_certificate_amount', visible: false).value).to eq(other_value)
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
package net.bytebuddy.implementation.bytecode;

import net.bytebuddy.implementation.Implementation;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

/**
 * A stack manipulation that subtracts two numbers on the operand stack.
 */
public enum Subtraction implements StackManipulation {

    /**
     * Subtracts two integers or integer-compatible values.
     */
    INTEGER(Opcodes.ISUB, StackSize.SINGLE),

    /**
     * Subtracts two longs.
     */
    LONG(Opcodes.LSUB, StackSize.DOUBLE),

    /**
     * Subtracts two floats.
     */
    FLOAT(Opcodes.FSUB, StackSize.SINGLE),

    /**
     * Subtracts two doubles.
     */
    DOUBLE(Opcodes.DSUB, StackSize.DOUBLE);

    /**
     * The opcode to apply.
     */
    private final int opcode;

    /**
     * The stack size of the subtracted primitive.
     */
    private final StackSize stackSize;

    /**
     * Creates a new subtraction.
     *
     * @param opcode    The opcode to apply.
     * @param stackSize The stack size of the subtracted primitive.
     */
    Subtraction(int opcode, StackSize stackSize) {
        this.opcode = opcode;
        this.stackSize = stackSize;
    }

    /**
     * {@inheritDoc}
     */
    public boolean isValid() {
        return true;
    }

    /**
     * {@inheritDoc}
     */
    public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {
        methodVisitor.visitInsn(opcode);
        return stackSize.toDecreasingSize();
    }
}


text:
package android.view;

import com.koushikdutta.monojavabridge.MonoBridge;
import com.koushikdutta.monojavabridge.MonoProxy;

public class View_OnClickListenerDelegateWrapper extends com.koushikdutta.monojavabridge.MonoProxyBase implements MonoProxy, android.view.View.OnClickListener
{
	static
	{
		MonoBridge.link(View_OnClickListenerDelegateWrapper.class, "onClick", "(Landroid/view/View;)V", "android.view.View");

	}

	public native void onClick(android.view.View arg0);

}


text:
#ifndef __MYSTERY_CACHE_H
#define __MYSTERY_CACHE_H

typedef unsigned long long addr_t;
typedef unsigned char bool_t;
#define TRUE 1
#define FALSE 0

/** Initializes the cache. This function must be called so that the
    cache can initialize its data structures, though the mystery
    caches will ignore the provided arguments (as their parameters are
    hard-coded). */
void cache_init(int size, int block_size);

/** Lookup an address in the cache. Returns TRUE if the access hits,
    FALSE if it misses. */
bool_t access_cache(addr_t address);

/** Clears all words in the cache (and the victim buffer, if
    present). Useful for helping you reason about the cache
    transitions, by starting from a known state. */
void flush_cache(void);

#endif


text:
package ar.edu.ungs.business.mappers;

import javax.inject.Inject;
import javax.inject.Named;

import ar.edu.ungs.business.dto.InternacionDTO;
import ar.edu.ungs.business.dto.InternacionPracticaDTO;
import ar.edu.ungs.commons.exception.DaoException;
import ar.edu.ungs.persistence.dao.impl.internacion.InternacionDao;
import ar.edu.ungs.persistence.dao.impl.practica.PracticaDao;
import ar.edu.ungs.persistence.dao.impl.profesionales.ProfesionalDao;
import ar.edu.ungs.persistence.entities.internacion.InternacionPractica;

@Named
public class InternacionPracticaMapper implements BaseMapper<InternacionPracticaDTO, InternacionPractica>{

	@Inject
	private ProfesionalDao profesionalDao;

	@Inject
	private InternacionDao internacionDao;

	@Inject
	private PracticaDao practicaDao;

	@Inject
	private PracticaMapper practicaMapper;

	@Inject
	private ProfesionalMapper profesionalMapper;

	@Override
	public InternacionPracticaDTO toDTO(InternacionPractica entity) {
		InternacionPracticaDTO dto = new InternacionPracticaDTO();
		dto.setFecha(entity.getFecha());
		dto.setPractica(practicaMapper.toDTO(entity.getPractica()));
		dto.setProfesional(profesionalMapper.toDTO(entity.getProfesional()));
		dto.setFaltaAutorizacion(entity.getFaltaAutorizacion());
		InternacionDTO internacionDto = new InternacionDTO();
		internacionDto.setId(entity.getInternacion().getId());
		dto.setInternacion(internacionDto);
		dto.setId(entity.getId());
		return dto;
	}

	@Override
	public InternacionPractica toEntity(InternacionPracticaDTO dto) {
		InternacionPractica entity = new InternacionPractica();
		//no seteo el id para que siempre sea un insert nuevo
		//es decir, siempre prevalece lo que se agrega por pantalla
		//entity.setId(dto.getId());
		entity.setFecha(dto.getFecha());
		try {
			entity.setInternacion(internacionDao.findById(dto.getInternacion().getId()));
			entity.setPractica(practicaDao.findById(dto.getPractica().getId()));
			entity.setProfesional(profesionalDao.findById(dto.getProfesional().getId()));
			entity.setFaltaAutorizacion(dto.getFaltaAutorizacion());
		} catch (DaoException e) {
			e.printStackTrace();
		}
		return entity;
	}

}


text:
package stateMachinesList;

import model.StateMachinesDiagram;

import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Path;
import org.eclipse.ui.PlatformUI;
import org.jdom.Element;

import stateMachines.StateMachinesEditor;
import dom.DOMGetInstance;
import dom.ReadDOMTree;

public class DeleteStateMachine {

	private String machine;
	private IContainer container;
	private IFile file;
	private StateMachinesDiagram diagram;
	private Element machineElement;

	/**
	 * constructor for delete action
	 * @param machine statemachine which should be deleted
	 * @param container container in which the statemachine is located
	 */
	public DeleteStateMachine(String machine, IContainer container) {
		this.machine = machine;
		this.container = container;
	}

	/**
	 * executes the delete command
	 * @return successful
	 */
	public boolean execute(){
		ReadDOMTree tree = DOMGetInstance.getInstance();
		diagram = tree.getStateMachinesDiagram(machine);
		// close the editor
		if (!(diagram == null)) {
			StateMachinesEditor editor1 = diagram.getEditor();
			PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeEditor(editor1, true);
		}
		machineElement = tree.removeStateMachine1(machine);
		StateMachinesList.viewer.remove(machine);
		for (int i = 0; i < StateMachinesList.stateMachinesList.size(); i++) {
			file = (IFile) StateMachinesList.stateMachinesList.get(i);
			if (file.getName().equals(machine + ".states")) {
				StateMachinesList.stateMachinesList.remove(i);
				return true;
			}
		}
		return false;
	}

	/**
	 * recreates the statemachine
	 */
	public void undo(){
		ReadDOMTree tree = DOMGetInstance.getInstance();
		tree.addStateMachine1(machineElement);
		StateMachinesList.viewer.add(machine);
		file = container.getFile(new Path(machine + ".states"));
		StateMachinesList.stateMachinesList.add(file);
	}

	/**
	 * undo functionallity when the listview is closed without saving
	 */
	public void undoForDispose(){
		ReadDOMTree tree = DOMGetInstance.getInstance();
		tree.addStateMachine1(machineElement);
	}

	/**
	 * redeletes the statemachine
	 */
	public void redo(){
		execute();
	}
}


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

-->
<permissions>

    <library
        name="com.qti.snapdragon.sdk.display"
        file="/system/framework/com.qti.snapdragon.sdk.display.jar" />

</permissions>


text:
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Claims;
using Microsoft.AspNetCore.Http;

namespace VaraniumSharp.Initiator.Tests.Fixtures
{
    public class UserSigninHandler
    {
        #region Constructor

        public UserSigninHandler(string callbackUrl, string accessToken, string refreshToken, TokenGenerator generator)
        {
            _callbackUrl = callbackUrl;
            _accessToken = accessToken;
            _refreshToken = refreshToken;
            _generator = generator;
        }

        #endregion

        #region Properties

        public string AuthPath => "/protocol/openid-connect/auth";

        #endregion

        #region Public Methods

        public void Handle(HttpContext context)
        {
            if (context.Request.Method == "GET")
            {
                var state = context.Request.Query["State"];
                _nonce = context.Request.Query["Nonce"];

                _idToken = _generator.GenerateToken(new ClaimsIdentity(new List<Claim>
                {
                    new Claim("sub", "blah"),
                    new Claim("nonce", _nonce)
                }));

                var code = Guid.NewGuid().ToString();
                NonceStorage.Add(code, _nonce);

                using (var client = new HttpClient())
                {
                    client.PostAsync(_callbackUrl, new FormUrlEncodedContent(new List<KeyValuePair<string, string>>
                    {
                        new KeyValuePair<string, string>("access_token", _accessToken),
                        new KeyValuePair<string, string>("refresh_token", _refreshToken),
                        new KeyValuePair<string, string>("code", code),
                        new KeyValuePair<string, string>("state", state),
                        new KeyValuePair<string, string>("id_token", _idToken),
                        new KeyValuePair<string, string>("nonce", _nonce)
                    })).Wait();
                }

                return;
            }

            if (context.Request.Method == "POST")
            {
                var responseData = JsonConvert.SerializeObject(new TokenResponseWrapper(_accessToken, _refreshToken)
                {
                    IdentityToken = _idToken
                });

                var memStream = new MemoryStream();
                var streamWrite = new StreamWriter(memStream);
                streamWrite.Write(responseData);
                streamWrite.Flush();
                memStream.Position = 0;
                memStream.CopyTo(context.Response.Body);

                context.Response.ContentType = "application/json";
                context.Response.StatusCode = (int) HttpStatusCode.OK;
            }
        }

        public void HandleTokenExchange(HttpContext context)
        {
            var streamReader = new StreamReader(context.Request.Body);
            var data = streamReader.ReadToEnd();
            var dataArray = data.Split("&");
            var codeArray = dataArray.First(x => x.StartsWith("code")).Split("=");
            var (code, nonce) = NonceStorage.First(x => x.Key == codeArray[1]);

            _idToken = _generator.GenerateToken(new ClaimsIdentity(new List<Claim>
            {
                new Claim("sub", "blah"),
                new Claim("nonce", nonce)
            }));

            var response = new
            {
                access_token = _accessToken,
                refresh_token = _refreshToken,
                code,
                id_token = _idToken,
                nonce
            };

            var jsonResponse = JsonConvert.SerializeObject(response);
            context.Response.ContentType = "application/json";
            context.Response.StatusCode = (int) HttpStatusCode.OK;
            var memStream = new MemoryStream();
            var streamWrite = new StreamWriter(memStream);
            streamWrite.Write(jsonResponse);
            streamWrite.Flush();
            memStream.Position = 0;
            memStream.CopyTo(context.Response.Body);
        }

        #endregion

        #region Variables

        /// <summary>
        /// Dictionary used to store Code and Nonce values
        /// </summary>
        private static readonly Dictionary<string, string> NonceStorage = new Dictionary<string, string>();

        private readonly string _accessToken;

        private readonly string _callbackUrl;

        private readonly TokenGenerator _generator;

        private readonly string _refreshToken;

        private string _idToken;

        private string _nonce;

        #endregion
    }
}


text: default_app_config = 'recipes.apps.RecipesConfig'


text:
var socket = io();

var nebulaeAdminApp = angular.module('nebulaeAdmin', []);

nebulaeAdminApp.config(function($interpolateProvider) {
  $interpolateProvider.startSymbol('((');
  $interpolateProvider.endSymbol('))');
});

nebulaeAdminApp.controller('overviewController', function($scope, $http) {
  $http.get('/api/username').success(function(data, status, headers, config) {
    if (data.hasOwnProperty('username')) {
      $scope.username = data.username;
      socket.emit('admin connected', data.username);
    }
  }).error(function(data, status, headers, config) {
    console.log('could not get team name');
  });

  socket.on('updatetime', function(msg) {
    $scope.timeleft = msg.timeleft;
    $scope.$apply();
  });

  socket.on('updatemembers', function(msg) {
    $scope.members = msg.members;
    $scope.$apply();
  });

  $scope.startContest = function() {
    socket.emit('start contest');
  };

  $scope.stopContest = function() {
    socket.emit('stop contest');
  };

  $scope.durationModal = function() {
    // JQuery jank
    $('#changeDurationModal').modal();
  };

  $scope.changeDuration = function(contest) {
    socket.emit('change duration', {
      duration: contest.duration,
    });
  };
});

nebulaeAdminApp.controller('tabController', function($scope) {
  $scope.activetab = 'runsandclars';

  $scope.switchToRunsAndClars = function() {
    $scope.activetab = 'runsandclars';
  };
  $scope.switchToAppeals = function() {
    $scope.activetab = 'appeals';
  };
  $scope.switchToTeams = function() {
    $scope.activetab = 'teams';
  };
  $scope.switchToScoreboard = function() {
    $scope.activetab = 'scoreboard';
  };
  $scope.switchToWritten = function() {
    $scope.activetab = 'written';
  };
  $scope.switchToAccounts = function() {
    $scope.activetab = 'accounts';
  };
  $scope.switchToProblems = function() {
    $scope.activetab = 'problems';
  };
});

nebulaeAdminApp.controller('runsAndClarsController', function($scope, $http) {
  $scope.sendResponse = function(resp) {
    var respGlobal = resp.global;
    if (respGlobal === undefined) {
      respGlobal = false;
    }
    socket.emit('clar response', {
      id: resp.id,
      response: resp.content,
      global: respGlobal,
    });
  };

  $scope.respondToClar = function(clarid) {
    // JQuery jank
    $('#responsemodal').modal();
    $scope.resp = {
      id: clarid,
    };
  };

  socket.on('updateclars', function(msg) {
    $scope.clars = msg;
    $scope.$apply();
  });

  socket.on('updateruns', function(msg) {
    $scope.runs = msg;
    $scope.$apply();
  });
});

nebulaeAdminApp.controller('appealsController', function($scope, $http) {
  var hasRun = false;
  $scope.searchRun = function(query) {
    socket.emit('search run', query);
  };

  $scope.changeRuling = function(run, ruling) {
    socket.emit('change ruling', {
      id: run._id,
      ruling: ruling,
    });
  };

  socket.on('runfound', function(msg) {
    $scope.run = msg;
    hasRun = true;
    $scope.$apply();
  });

  socket.on('norunfound', function() {
    setTimeout(function() {
      alert('No run found for the query');
    }, 1);
  });
});

nebulaeAdminApp.controller('teamsController', function($scope, $http) {
  socket.on('updateteams', function(teams) {
    teams = teams.sort(function(a, b) {
      var numA = parseInt(a.username.substring(4));
      var numB = parseInt(b.username.substring(4));
      return numA - numB;
    });
    $scope.teams = teams;
    $scope.$apply();
  });
});

nebulaeAdminApp.controller('scoreboardController', function($scope, $http) {
  $http.get('/api/username').success(function(data, status, headers, config) {
    if (data.hasOwnProperty('username')) {
      $scope.username = data.username;
    }
  }).error(function(data, status, headers, config) {
    console.log('could not get team name');
  });

  socket.on('updatescores', function(msg) {
    msg.novice = msg.novice.sort(function(a, b) {
      return b.score - a.score;
    });
    msg.advanced = msg.advanced.sort(function(a, b) {
      return b.score - a.score;
    });
    $scope.scores = msg;
    $scope.$apply();
  });
});

nebulaeAdminApp.controller('writtenController', function($scope, $http) {
  socket.on('updatewritten', function(msg) {
    msg = msg.sort(function(a, b) {
      var numA = parseInt(a.username.substring(4));
      var numB = parseInt(b.username.substring(4));
      return numA - numB;
    });
    $scope.teams = msg;
    $scope.$apply();
  });

  socket.on('updatewrittenscores', function(msg) {
    msg.novice = msg.novice.sort(function(a, b) {
      return b.score - a.score;
    });
    msg.advanced = msg.advanced.sort(function(a, b) {
      return b.score - a.score;
    });
    $scope.scores = msg;
    $scope.$apply();
  });

  $scope.changeScore = function(team, name, score) {
    if (parseInt(score) !== null && score <= 240 && score >= -80) {
      socket.emit('change score', {team: team, name: name, score: score});
    }
  }
});

nebulaeAdminApp.controller('accountController', function($scope, $http) {
  $scope.batchCreate = function(csv) {
    socket.emit('batch create accounts', csv);
  }
});

nebulaeAdminApp.controller('problemController', function($scope, $http) {
  $scope.sendProblem = function(problem) {
    socket.emit('create problem', problem);
  }
});


text:
"""
Django settings for interview_voting project.

Generated by 'django-admin startproject' using Django 1.9.4.

For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

import os
import string
import random

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY =  os.environ.get("SECRET_KEY", "".join(random.choice(string.printable) for i in range(40)))

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get('DEBUG', 'development') == 'development'

ALLOWED_HOSTS = ['*']

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'rest_framework',

    # Created Apps
    'accounts',
    'interview',
    'website',
]

MIDDLEWARE_CLASSES = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'interview_voting.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
            'debug': DEBUG,
        },
    },
]

WSGI_APPLICATION = 'interview_voting.wsgi.application'

# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]

# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR + '/static'

LOGIN_URL = '/'
LOGIN_REDIRECT_URL = '/accounts/staff_login/'

SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_COOKIE_AGE = 604800 # One Week

REST_FRAMEWORK = {
    # Use Django's standard `django.contrib.auth` permissions,
    # or allow read-only access for unauthenticated users.
    'DEFAULT_PERMISSION_CLASSES': [
        'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
    ]
}

# Heroku
# Update database configuration with $DATABASE_URL.
import dj_database_url
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)

# Honor the 'X-Forwarded-Proto' header for request.is_secure()
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

# Simplified static file serving.
# https://warehouse.python.org/project/whitenoise/
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'


text:
#import "NSObject.h"

@interface CUIThemeSchema : NSObject
{
}

+ (id)schemaForPlatform:(long long)arg1;
+ (id)defaultSchema;
- (id)schemaEffectRenditionsForPartDefinition:(const CDStruct_26b2aa83 *)arg1;
- (unsigned long long)partDefinitionCountForEffectDefinition:(const CDStruct_e3362728 *)arg1;
- (unsigned long long)effectDefinitionCount;
- (const CDStruct_e3362728 *)effectDefinitionWithName:(id)arg1;
- (const CDStruct_e3362728 *)sortedEffectDefinitionAtIndex:(unsigned long long)arg1;
- (const CDStruct_e3362728 *)effectDefinitionAtIndex:(unsigned long long)arg1;
- (const CDStruct_c77fb927 *)categoryForElementDefinition:(const CDStruct_e3362728 *)arg1;
- (id)schemaRenditionsForPartDefinition:(const CDStruct_26b2aa83 *)arg1;
- (const CDStruct_26b2aa83 *)partDefinitionForWidgetName:(id)arg1;
- (id)widgetNameForPartDefinition:(const CDStruct_26b2aa83 *)arg1;
- (const CDStruct_26b2aa83 *)partDefinitionWithName:(id)arg1 forElementDefinition:(const CDStruct_e3362728 *)arg2;
- (const CDStruct_e3362728 *)elementDefinitionWithName:(id)arg1;
- (unsigned long long)dimensionDefinitionCountForPartDefinition:(const CDStruct_26b2aa83 *)arg1;
- (unsigned long long)partDefinitionCountForElementDefinition:(const CDStruct_e3362728 *)arg1;
- (const CDStruct_e3362728 *)sortedElementDefinitionAtIndex:(unsigned long long)arg1;
- (unsigned long long)elementDefinitionCount;
- (const CDStruct_e3362728 *)elementDefinitionAtIndex:(unsigned long long)arg1;
- (unsigned long long)elementCategoryCount;
- (const CDStruct_c77fb927 *)elementCategoryAtIndex:(unsigned long long)arg1;
- (long long)schemaVersion;

@end


text:
<?php

namespace View\Helper;
use ReflectionFunction as Func;
use Mustache_LambdaHelper as LambdaHelper;
use Log;

/**
 * Helper: PHP Function wrapper
 *
 *     {{title | ucwords}}
 */
class PhpFunction
{
	private static $whitelist = [
		'ucfirst',
		'ucwords',
		'strtolower',
		'urlencode',
		];

	private $function;
	public function __construct($function)
	{
		$this->function = new Func($function);

		// Check required parameter count
		if(1 != $this->function->getNumberOfRequiredParameters())
			throw new \Exception("'$function' not usable via ".__CLASS__.". Has $rp required parameters, needs exactly 1.");
	}

	public function __invoke($text, LambdaHelper $render = null)
	{
		Log::trace($this->function->getShortName().'(', $text, ')');
		$text = $this->function->invokeArgs([$text]);
		return $render ? $render($text) : $text;
	}

	/**
	 * Only use for certain whitelisted functions.
	 */
	public static function exists($name)
	{
		return function_exists($name)
		   and in_array($name, self::$whitelist);
	}
}


text:
module OpenRTB.Types.BidRequest.DistributionChannel.Content where

import Prelude hiding (id)

import Data.Aeson
import Data.Text
import Data.Word

import OpenRTB.Types.BidRequest.DistributionChannel.Content.Producer
import OpenRTB.Types.Enum.ContentContext
import OpenRTB.Types.Enum.QAGMediaRating
import OpenRTB.Types.Enum.VideoQuality

-- | This object describes the content in which the impression will appear,
--   which may be syndicated or non-syndicated content. This object may be
--   useful when syndicated content contains impressions and does not
--   necessarily match the publisher's general content. The exchange might or
--   might not have knowledge of the page where the content is running, as a
--   result of syndication method. For example might be a video impression
--   embedded in an iframe on an unknown web property or device.
data Content = Content
  {
    -- | ID uniquely identifying the content.
    id :: Maybe Text

    -- | Episode number (typically applied to video content).
  , episode :: Maybe Word16

    -- | Content title.
    --
    --   *Video Examples:* "Search Committee" (television), "A New Hope"
    --   (movie), or "Endgame" (made for web).
    --
    --   *Non-Video Example* "Why an Antarctic Glacier Is Melting So Quickly"
    --   (Time magazine article).
  , series :: Maybe Text

    -- | Content season; typically for video content (e.g., "Season 3").
  , season :: Maybe Text

    -- | Details about the content `Producer` (Section 3.2.10).
  , producer :: Maybe Producer

    -- | URL of the content, for buy-side contextualization or review.
  , url :: Maybe Text

    -- | Array of IAB content categories that describe the content producer.
    --   Refer to List 5.1.
  , cat :: Maybe [()]

    -- | video quality per IAB's classification. Refer to List 5.1.
  , videoQuality :: Maybe VideoQuality

    -- | Type of content (game, video, text, etc.). Refer to List 5.14
  , context :: Maybe ContentContext

    -- | Content rating (e.g., MPAA).
  , contentRating :: Maybe Text

    -- | User rating of the content (e.g., number of stars, likes, etc.).
  , userRating :: Maybe Text

    -- | Media rating per QAG guidelines. Refer to List 5.15.
  , qagMediaRating :: Maybe QAGMediaRating

    -- | Comma separated list of keywords describing the content.
  , keywords :: Maybe Text

    -- | 0 = not live, 1 - content is live (e.g., stream, live blog).
  , liveStream :: Maybe Bool

    -- | 0 = indirect, 1 = direct.
  , sourceRelationship :: Maybe Bool

    -- | Length of content in seconds; appropriate for video or audio.
  , len :: Maybe Word16

    -- | Content language using ISO-639-1-alpha-2.
  , language :: Maybe Text

    -- | Indicator of whether or not the content is embeddable (e.g., an
    --   embeddable video player), where 0 = no, 1 = yes
  , embeddable :: Maybe Bool

    -- | Placeholder for exchange-specific extensions to OpenRTB.
  , ext :: Maybe Value
  }


text:
package com.hurence.logisland.config;

import java.util.ArrayList;
import java.util.List;

/**
 * A stream is a component + a set of  processorConfigurations
 */
public class StreamConfiguration extends AbstractComponentConfiguration {

    private String stream = "";

    private List<ProcessorConfiguration> processorConfigurations = new ArrayList<>();

    public String getStream() {
        return stream;
    }

    public void setStream(String stream) {
        this.stream = stream;
    }

    public List<ProcessorConfiguration> getProcessorConfigurations() {
        return processorConfigurations;
    }

    public void addProcessorConfiguration(ProcessorConfiguration processorConfiguration) {
        this.processorConfigurations.add(processorConfiguration);
    }

    @Override
    public String toString() {
        return "StreamConfiguration{" +
                "stream='" + stream + '\'' +
                ", processorConfigurations=" + processorConfigurations +
                '}';
    }
}


text:
Codes for sharing to external websites.

Index:

1. **the_law_of_large_numbers.html** - d3 line chart for the law of large numbers

2. **normal_distribution.html** - d3 line chart for the normal distribution

3. **St_Petersburg_Paradox.html** - St.Petersburg Paradox game emulation to find the expectations

4. **HTML5AudioAPI.html** - Simple audio visualization demo with HTML5 audio API and canvas

Excluding the following files from the LICENSE of project.

***

My music source comes from:

1. Epic, Bensound.com, http://www.bensound.com/royalty-free-music/track/epic
2. Sad Day, Bensound.com,  http://www.bensound.com/royalty-free-music/track/sad-day

***

Image Reference:

![Data Visualization](file421255110386.jpg)
http://www.morguefile.com/archive/display/627017


text:
<!DOCTYPE html>

	<meta charset="utf-8">

	<title>Class hQuery</title>

	<link rel="stylesheet" href="resources/bootstrap.min.css?973e37a8502921d56bc02bb55321f45b072b6f71">
	<link rel="stylesheet" href="resources/style.css?49f43d3208c5d7e33fa16d36107a345bf11cc00d">

				Overview

                <form id="search" class="navbar-form navbar-left" role="search">
                    <input type="hidden" name="cx" value="">
                    <input type="hidden" name="ie" value="UTF-8">

                        <input type="text" name="q" class="search-query form-control" placeholder="Search">

				</form>

Class

Classes

hQuery

hQuery_Element

hQuery_HTML_Parser

hQuery_Node

Class hQuery

Main Class, represents an HTML document.

			hQuery_Node

			 implements
Iterator,

Countable

			hQuery_HTML_Parser

hQuery

				License:
				MIT

				Author:
				Dumitru Uzun (DUzun.ME)

			Located at

Methods summary

				 public static
				hQuery

			#
			fromHTML( string <var>$html</var>, string <var>$url</var> = NULL )

Parse and HTML string.

Parse and HTML string.

Parameters

<var>$html</var>

source of some HTML document

<var>$url</var>

OPTIONAL location of the document. Used for relative URLs inside the document.

Returns

						hQuery
$doc

				 public static
				hQuery

			#
			fromFile( string <var>$filename</var>, boolean <var>$use_include_path</var> = false, resource <var>$context</var> = NULL )

Read the HTML document from a file.

Read the HTML document from a file.

Parameters

<var>$filename</var>

a valid filename

<var>$use_include_path</var>

OPTIONAL passed to file_get_contents()

<var>$context</var>

OPTIONAL A valid context resource created with stream_context_create().

Returns

						hQuery
$doc

				 public static
				hQuery

			#
			fromURL( string <var>$url</var>, array <var>$headers</var> = NULL, array|string <var>$body</var> = NULL, array <var>$options</var> = NULL )

Fetch the HTML document from remote $url.

Fetch the HTML document from remote $url.

Parameters

<var>$url</var>

the URL of the document

<var>$headers</var>

OPTIONAL request headers

<var>$body</var>

OPTIONAL body of the request (for POST or PUT)

<var>$options</var>

OPTIONAL request options (see self::http_wr() for more details)

Returns

						hQuery
$doc

				 public
				hQuery_Element

			#
			find( string <var>$sel</var>, array|string <var>$attr</var> = NULL, hQuery_Node <var>$ctx</var> = NULL )

Finds a collection of nodes inside current document/context (similar to jQuery.fn.find()).

Finds a collection of nodes inside current document/context (similar to jQuery.fn.find()).

Parameters

<var>$sel</var>

A valid CSS selector.

<var>$attr</var>

OPTIONAL attributes as string or key-value pairs.

<var>$ctx</var>

OPTIONAL the context where to search. If omitted, $this is used.

Returns

						hQuery_Element
collection of matched elements

Overrides

hQuery_Node::find

				 public
				array

			#
			find_html( string <var>$sel</var>, array|string <var>$attr</var> = NULL, hQuery_Node <var>$ctx</var> = NULL )

Combination of ->find() + ->html()

Combination of ->find() + ->html()

Parameters

<var>$sel</var>

A valid CSS selector.

<var>$attr</var>

OPTIONAL attributes as string or key-value pairs.

<var>$ctx</var>

OPTIONAL the context where to search. If omitted, $this is used.

Returns

						array
list of HTML contents of all matched elements

				 public
				array

			#
			find_text( string <var>$sel</var>, array|string <var>$attr</var> = NULL, hQuery_Node <var>$ctx</var> = NULL )

Combination of ->find() + ->text()

Combination of ->find() + ->text()

Parameters

<var>$sel</var>

A valid CSS selector.

<var>$attr</var>

OPTIONAL attributes as string or key-value pairs.

<var>$ctx</var>

OPTIONAL the context where to search. If omitted, $this is used.

Returns

						array
list of Text contents of all matched elements

				 public

			#
			index( )

Index elements of the source HTML. (Called automatically)

Index elements of the source HTML. (Called automatically)

				 public static
				string

			#
			jsonize( mixed <var>$data</var>, &string <var>& $type</var> = NULL,  <var>$ops</var> = 0 )

Serialize $data as JSON, fallback to serialize.

Serialize $data as JSON, fallback to serialize.

Parameters

<var>$data</var>

the data to be serialized

<var>$type</var>

returns the serialization method used ('json' | 'ser')

<var>$ops</var>

Returns

						string
the serialized data

				 public static
				mixed

			#
			unjsonize( string <var>$str</var>, &string <var>& $type</var> = NULL )

Unserialize $data from either JSON or serialize.

Unserialize $data from either JSON or serialize.

Parameters

<var>$str</var>

the data to be unserialized

<var>$type</var>

if not set, returns the serialization method detected ('json' | 'ser');
                     if set, forces unjsonize() to use this method for unserialization.

Returns

						mixed
the unserialized data

				 protected static
				string

			#
			serjstype( string <var>$str</var> )

Tries to detect format of $str (json or ser).

Tries to detect format of $str (json or ser).

Parameters

<var>$str</var>

JSON encoded or PHP serialized data.

Returns

						string
'json' | 'ser', or FALSE on failure to detect format.

				 protected static
				array

			#
			get_cache( string <var>$fn</var>, integer <var>$expire</var> = false, boolean <var>$meta_only</var> = false )

Read data from a cache file.

Read data from a cache file.

Parameters

<var>$fn</var>

cache filename

<var>$expire</var>

OPTIONAL contents returned only if it is newer then $expire seconds

<var>$meta_only</var>

OPTIONAL if TRUE, read only meta-info (faster)

Returns

						array
[mixed <contents>, array <meta_info>]

				 protected static
				integer|boolean

			#
			set_cache( string <var>$fn</var>, mixed <var>$cnt</var>, array <var>$meta</var> = NULL, boolean <var>$gzip</var> = true )

Save data to a cache file.

Save data to a cache file.

Parameters

<var>$fn</var>

cache filename

<var>$cnt</var>

contents to be cached

<var>$meta</var>

OPTIONAL meta information related to contents.

<var>$gzip</var>

OPTIONAL if TRUE and gzip supported, store contents gzipped

Returns

						integer|boolean
On success, number of written bytes, FALSE on fail.

				 public static
				true

			#
			do_flock( resource <var>$fp</var>, integer <var>$lock</var>, integer <var>$timeout_ms</var> = 384 )

Lock with retries

Lock with retries

Parameters

<var>$fp</var>

Open file pointer

<var>$lock</var>

Lock type

<var>$timeout_ms</var>

OPTIONAL Timeout to wait for unlock in miliseconds

Returns

						true
on success, false on fail

Author

							Dumitru Uzun

				 public static

			#
			flock_put_contents(  <var>$fn</var>,  <var>$cnt</var>,  <var>$block</var> = false )

				 public static

			#
			flock_get_contents(  <var>$fn</var>,  <var>$block</var> = false )

				 public static
				boolean

			#
			is_url_path( string <var>$path</var> )

Check whether $path is a valid url.

Check whether $path is a valid url.

Parameters

<var>$path</var>

a path to check

Returns

						boolean
TRUE if $path is a valid URL, FALSE otherwise

				 public static
				boolean

			#
			is_abs_path( string <var>$path</var> )

Check whether $path is an absolute path.

Check whether $path is an absolute path.

Parameters

<var>$path</var>

a path to check

Returns

						boolean
TRUE if $path is an absolute path, FALSE otherwise

				 public static
				string

			#
			abs_url( string <var>$url</var>, string <var>$base</var> )

Given a $url (relative or absolute) and a $base url, returns absolute url for $url.

Given a $url (relative or absolute) and a $base url, returns absolute url for $url.

Parameters

<var>$url</var>

relative or absolute URL

<var>$base</var>

Base URL for $url

Returns

						string
absolute URL for $url

				 public static
				array

			#
			http_wr( string <var>$host</var>, array <var>$head</var> = NULL, mixed <var>$body</var> = NULL, array <var>$options</var> = NULL )

Executes a HTTP write-read session.

Executes a HTTP write-read session.

Parameters

<var>$host</var>

IP/HOST address or URL

<var>$head</var>

list off HTTP headers to be sent along with the request to $host

<var>$body</var>

data to be sent as the contents of the request. If is array or object, a http query is built.

<var>$options</var>

list of option as key-value:
                         timeout - connection timeout in seconds
                         host    - goes in headers, overrides $host (ex. $host == '127.0.0.1', $options['host'] == 'www.example.com')
                         scheme  - http, ssl, tls, udp, ...
                         close   - whether to close connection o not

Returns

						array
[contents, headers, http-status-code, http-status-message]

Author

							Dumitru Uzun

Methods inherited from hQuery_HTML_Parser

				__construct(),
				__get(),
				__set(),
				__toString(),
				_find(),
				_get_ctx(),
				_index_all(),
				_index_comments_html(),
				_info(),
				baseURI(),
				detect_charset(),
				filter(),
				get_aids_byAttr(),
				get_aids_byClass(),
				get_aids_byClassAttr(),
				get_attr_byAid(),
				get_attr_byId(),
				get_ids_byAid(),
				get_ids_byAttr(),
				get_ids_byClass(),
				get_ids_byClassAttr(),
				get_url_base(),
				get_url_path(),
				hasClass(),
				location(),
				strlen(),
				substr(),
				url2abs()

Methods inherited from hQuery_Node

				CSSArr2Str(),
				__destruct(),
				__isset(),
				__unset(),
				_all(),
				_children(),
				_ctx_ids(),
				_doc_ids(),
				_filter(),
				_has(),
				_my_ids(),
				_next(),
				_parent(),
				_prev(),
				_sub_ids(),
				array_select(),
				attr(),
				convert_encoding(),
				count(),
				current(),
				doc(),
				exclude(),
				html(),
				html_attr2str(),
				html_findTagClose(),
				html_parseAttrStr(),
				isDoc(),
				isEmpty(),
				is_empty(),
				key(),
				next(),
				nodeName(),
				outerHtml(),
				parseCSStr(),
				pos(),
				prev(),
				rewind(),
				str_range(),
				text(),
				valid()

Constants summary

Constants inherited from hQuery_Node

				VERSION

Properties summary

				public

					<var>$headers</var>

					#

				public static

					<var>$cache_path</var>

					#

				public static
				integer

					<var>$cache_expires</var>

					#
					3600

				public static

					<var>$_mockup_class</var>

					#

Properties inherited from hQuery_HTML_Parser

				<var>$_emptyTags</var>,
				<var>$_icharset</var>,
				<var>$_index_attribs</var>,
				<var>$_specialTags</var>,
				<var>$_tagID_first_letter</var>,
				<var>$_tagID_letters</var>,
				<var>$_unparsedTags</var>,
				<var>$_url_attribs</var>,
				<var>$attr_idx</var>,
				<var>$attribs</var>,
				<var>$attrs</var>,
				<var>$autoclose_tags</var>,
				<var>$case_folding</var>,
				<var>$class_idx</var>,
				<var>$del_spaces</var>,
				<var>$html</var>,
				<var>$idx_attr</var>,
				<var>$indexed</var>,
				<var>$o</var>,
				<var>$tag_idx</var>,
				<var>$tags</var>

Properties inherited from hQuery_Node

				<var>$_ar_</var>,
				<var>$_fl_</var>,
				<var>$_mi_</var>,
				<var>$_nl_</var>,
				<var>$_prop</var>,
				<var>$_tr_</var>,
				<var>$doc</var>,
				<var>$exc</var>,
				<var>$ids</var>,
				<var>$last_http_result</var>,
				<var>$selected_doc</var>,
				<var>$tag_map</var>

		 API documentation generated by ApiGen


text:
requirejs.config({
    //script base
    baseUrl: 'Scripts/',
    paths: {
        'bootstrap': 'vendor/bootstrap.min',
        'knockout': 'vendor/knockout-3.2.0',
        'underscore': 'vendor/underscore-min',
        'underscore.string': 'vendor/underscore.string.min',
        'k': 'vendor/kendo',
        'base64': 'vendor/helpers/base64v1_0',
        'md5': 'vendor/cryptojs/rollups/md5',
        'sha1': 'vendor/cryptojs/rollups/sha1',
        'sha256': 'vendor/cryptojs/rollups/sha256',
        'sha512': 'vendor/cryptojs/rollups/sha512',
        'sha3': 'vendor/cryptojs/rollups/sha3',
        'ripemd160': 'vendor/cryptojs/rollups/ripemd160',
        'advarics.app': 'advarics',
        'advarics.controls': 'advarics/controls/advarics.controls',
        'advarics.grid': 'advarics/controls/advarics.grid',
        'advarics.editor': 'advarics/controls/advarics.editor',
        'advarics.models': 'advarics/models/advarics.models',
        'advarics.config': 'advarics/config/advarics.config',
        'advarix': 'advarics/lib/advarix'
    },

    'shim': {
        underscore: {
            'exports': '_'
        },
        knockout: {
            'exports': 'ko'
        },
        base64: {
            'exports': 'B64'
        }
    }
});


text:
import React, { Component } from 'react';

class UserInfo extends Component {
  constructor(props) {
    super(props);
  }

  handleChangeID (e) {
    this.props.actions.createUserID();
  }

  handleChangeOddID (e) {
    this.props.actions.createNewUserIDIfOdd();
  }

  handleChangeAsyncID (e) {
    this.props.actions.createNewUserIDAsync();
  }

  render () {
    return (

        User: {this.props.user.username}
        ID: {this.props.user.id}
        <button onClick={this.handleChangeID.bind(this)}>Change ID</button>
        <button onClick={this.handleChangeOddID.bind(this)}>Change ID If Odd</button>
        <button onClick={this.handleChangeAsyncID.bind(this)}>Change ID Async</button>

    );
  }
}

export default UserInfo;


text:
using System;
using DotNetNuke.Services.Exceptions;
using ATC;
using ATC.WebControls;
using System.Data;
using DotNetNuke.Common;
using DotNetNuke.Services.Localization;

namespace DotNetNuke.Modules.uDebate
{

    /// -----------------------------------------------------------------------------
    ///
    /// The EdituDebate class is used to manage content
    ///
    /// -----------------------------------------------------------------------------
    public partial class Edit : uDebateModuleBase
    {
        private bool IsNew = false;
        public string TopicID;
        public string ThreadID;
        protected string CurrentUserID = "";
        string CurrentLanguageCode = "EN";

        #region Event Handlers

        override protected void OnInit(EventArgs e)
        {
            InitializeComponent();
            base.OnInit(e);
        }

        private void InitializeComponent()
        {
            this.Load += new System.EventHandler(this.Page_Load);
        }

        /// -----------------------------------------------------------------------------
        ///
        /// Page_Load runs when the control is loaded
        ///
        /// -----------------------------------------------------------------------------
        private void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                CurrentUserID = Entities.Users.UserController.GetCurrentUserInfo().UserID.ToString();

                //Áí õðÜñ÷åé ç ðáñÜìåôñïò ID óôï URL êÜíå edit ôçí åããñáöÞ ...
                int thID = Convert.ToInt32(ATC.Tools.URLParam("ThreadID"));

                if ( thID > 0)
                {
                    IsNew = false;
                    ThreadID = ATC.Tools.URLParam("ThreadID");
                    TopicID = Request.Url.ToString();
                    TopicID = ATC.Database.sqlGetFirst("SELECT TopicID FROM uDebate_Forum_Threads WHERE ID = " + ThreadID);

                    //ãéá íá ìðïñåßò íá ôñïðïðïéÞóåéò Ýíá óõãêåêñéìÝíï Thread áñêåß íá åßóáé ï Moderator ôïõ Thread
                    //Þ íá åßóáé Administrator
                    //ÍÅÏ Þ íá åßóáé ï Coordinator ôïõ Topic óôï ïðïßï áíÞêåé ôï Thread :)

                    string ThreadModerator = ATC.Database.sqlGetFirst("SELECT userID FROM uDebate_Forum_Threads WHERE ID = " + ThreadID);
                    string TopicModerator = ATC.Database.sqlGetFirst("SELECT userID FROM uDebate_Forum_Topics WHERE ID = (SELECT TopicID FROM uDebate_Forum_Threads WHERE ID = " + ThreadID + ")");
                    if (
                            !(Request.IsAuthenticated && DotNetNuke.Security.PortalSecurity.IsInRoles("Pilot Leaders")
                        //Portal.Security.HasChangeContentPermission()
                        //||
                        //(Session["uDebate_User"] != null && ((DataRow)HttpContext.Current.Session["uDebate_User"])["ID"].ToString() == ThreadModerator)
                        //||
                        //(Session["uDebate_User"] != null && ((DataRow)HttpContext.Current.Session["uDebate_User"])["ID"].ToString() == TopicModerator)
                             )
                        )
                    {
                        Response.Redirect(ATC.Tools.GetParam("RootURL") + "AccessDenied.aspx");
                        return;
                    }

                    btnDelete.Visible = true;// (Portal.Security.IsAdministrator() || (Session["uDebate_User"] != null && ((DataRow)HttpContext.Current.Session["uDebate_User"])["ID"].ToString() == ThreadModerator) || (Session["uDebate_User"] != null && ((DataRow)HttpContext.Current.Session["uDebate_User"])["ID"].ToString() == TopicModerator));

                    btnDelete.Attributes.Remove("href");
                    //btnDelete.Attributes["href"] = "javascript:ConfirmDelete('btnDelete')";

                    if (!IsPostBack) LoadData();
                }
                else
                {
                    TopicID = Request.Url.ToString();
                    TopicID = ATC.Tools.URLParam("Topic");
                    if (TopicID == String.Empty)
                    {
                        Response.Write("

" + ATC.Translate.String("Äåí Ý÷åé åðéëåãåß ÈÝìá.", "", CurrentLanguageCode) + "

");
                        Response.End();
                    }

                    //ãéá íá ìðïñåßò íá äçìéïõñãÞóåéò Ýíá íÝï Thread áñêåß íá åßóáé ï Moderator ôïõ Topic
                    //ãéá ôï ïðïßï èÝëåéò íá äçìéïõñãÞóåéò áõôü ôï Thread Þ íá åßóáé Administrator
                    string TopicModerator = ATC.Database.sqlGetFirst("SELECT userID FROM uDebate_Forum_Topics WHERE ID = " + TopicID);
                    if (!Request.IsAuthenticated /*&& DotNetNuke.Security.PortalSecurity.IsInRoles("Pilot Leaders")*/) //!(Portal.Security.HasChangeContentPermission() || (Session["uDebate_User"] != null && ((DataRow)HttpContext.Current.Session["uDebate_User"])["ID"].ToString() == TopicModerator)))
                    {
                        Response.Redirect(ATC.Tools.GetParam("RootURL") + "AccessDenied.aspx");
                        return;
                    }

                    IsNew = true;

                    if (!IsPostBack)
                    {
                        ATC.Database.FillLookUp(ddUser, false, "SELECT userID, username" + ATC.Database.sqlConcatenate() +
                            "' ('" + ATC.Database.sqlConcatenate() + ATC.Database.FNUpper() + "(Lastname)" + ATC.Database.sqlConcatenate() +
                            "' '" + ATC.Database.sqlConcatenate() + ATC.Database.FNUpper() + "(Firstname)" + ATC.Database.sqlConcatenate() +
                            "')'" + " AS NameOfUser FROM USERS WHERE (IsDeleted =0) ORDER BY username", "", "", "", true);
                        //WHERE (GroupID<>1 OR (GroupID=2 AND PublishPersonalInfo=1)) ORDER BY username", "", "", "", true);
                        //ATC.Database.FillLookUp(ddStatusID, false, "SELECT [ID],[Title] FROM [uDebate_Forum_ThreadStatus]", "", "", "", true);
                        try
                        {
                            ddUser.SelectedValue = CurrentUserID;
                        }
                        catch { }
                        //txtThreadID.Text = "";
                    }
                }

                // Registered users can only create new thread in inactive mode
                if (!DotNetNuke.Security.PortalSecurity.IsInRoles("Pilot Leaders"))
                {
                    btnDelete.Visible = false;
                    btnNew.Visible = false;
                    chkActive.SelectedIndex = 0;
                    chkActive.Enabled = false;
                }
                LocalResourceFile = Localization.GetResourceFile(this, "Edit.ascx." + System.Threading.Thread.CurrentThread.CurrentCulture.Name + ".resx");
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }

        #endregion

        private void LoadData()
        {

            DataSet ds = Database.sqlExecuteDataSet("SELECT * FROM uDebate_Forum_Threads WHERE ID = " + ThreadID);
            //txtThreadID.Text = ds.Tables[0].Rows[0]["ID"].ToString();

            txtDescription.Text = ds.Tables[0].Rows[0]["Description"].ToString();
            //txtSummary.Text = ds.Tables[0].Rows[0]["Summary"].ToString();
            txtThread.Text = ds.Tables[0].Rows[0]["Text"].ToString();
            //txtContact.Text = ds.Tables[0].Rows[0]["Contact_email"].ToString();
            //txtComplaint.Text = ds.Tables[0].Rows[0]["Complain_email"].ToString();
            //chkStatus.SelectedValue = ds.Tables[0].Rows[0]["Status"].ToString();
            chkActive.SelectedValue = ds.Tables[0].Rows[0]["Active"].ToString();
            chkEuropean.SelectedValue = ds.Tables[0].Rows[0]["EuRelated"].ToString() == "True" ? "1" : "0";

            ATC.Database.FillLookUp(ddUser, false, "SELECT userID, username" + ATC.Database.sqlConcatenate() +
                "' ('" + ATC.Database.sqlConcatenate() + ATC.Database.FNUpper() + "(Lastname)" + ATC.Database.sqlConcatenate() +
                "' '" + ATC.Database.sqlConcatenate() + ATC.Database.FNUpper() + "(Firstname)" + ATC.Database.sqlConcatenate() +
                "')'" + " AS NameOfUser FROM USERS WHERE (IsDeleted = 0) ORDER BY username", "", "", "", true);
            //WHERE (GroupID<>1 OR (GroupID=2 AND PublishPersonalInfo=1)) ORDER BY username", "", "", "", true);
            ddUser.SelectedValue = ds.Tables[0].Rows[0]["UserID"].ToString();
           // ATC.Database.FillLookUp(ddStatusID, false, "SELECT [ID],[Title] FROM [uDebate_Forum_ThreadStatus]", "", "", "", true);
            //ddStatusID.SelectedValue = ds.Tables[0].Rows[0]["StatusID"].ToString();
            //ddGroupID.SelectedValue = ds.Tables[0].Rows[0]["GroupID"].ToString();
        }

        protected void btnNew_Click(object sender, System.EventArgs e)
        {
            //ATC.Tools.RefreshPage("Topic=" + TopicID + ";ThreadID=");
            Response.Redirect(EditUrl(PortalSettings.ActiveTab.TabID, "Edit", true, "mid=" + ModuleId + "&Topic=" + TopicID + "&ThreadID=-1"));
            //Response.Redirect("/tabid/" + PortalSettings.ActiveTab.TabID + "/ctl/Edit/mid/" + ModuleId + "/Topic/" +
              //  TopicID+ "/ThreadID/-1/Udebate.aspx");
        }

        protected void btnSave_Click(object sender, System.EventArgs e)
        {
            if (!IsNew)
                SaveEdit();
            else
                SaveNew();
        }

        protected void btnDelete_Click(object sender, System.EventArgs e)
        {
            if (ThreadID == String.Empty) return;

            try
            {
                ATC.Database.sqlExecuteCommand("DELETE FROM uDebate_Forum_Threads WHERE ID = " + ThreadID);

               // Response.Redirect(Globals.NavigateURL(), true);

                ATC.Tools.CloseWindow();
            }
            catch (Exception ex)
            {
                int ErrNumber;
                ATC.MessageBox.Show(ATC.Translate.String("Áäõíáìßá äéáãñáöÞò ôçò åããñáöÞò.", "", CurrentLanguageCode) + "\r\n" + ATC.Translate.String("ÓöÜëìá: ", "", CurrentLanguageCode) + Database.ErrorDescription(ex, out ErrNumber));
            }
        }

        protected void btnCancel_Click(object sender, System.EventArgs e)
        {
            ATC.Tools.CloseWindow();
        }

        private void SaveNew()
        {
            try
            {
                if (txtDescription.Text.Trim() == "" /*|| txtSummary.Text == ""*/ || txtThread.Text.Trim() == string.Empty /*|| txtContact.Text.Trim() == string.Empty || txtComplaint.Text.Trim() == string.Empty*/)
                    throw new Exception(ATC.Translate.String("All fields are mandatory!", "", CurrentLanguageCode));

                string SQL = "";

                string UserID = "";
                //if (HttpContext.Current.Session["uDebate_User"] != null)
                //    UserID = ((DataRow)HttpContext.Current.Session["uDebate_User"])["ID"].ToString();
                //else
                //    UserID = ((DataRow)HttpContext.Current.Session["CurrentUserInfo"])["ID"].ToString();

                UserID = Entities.Users.UserController.GetCurrentUserInfo().UserID.ToString();
                txtThread.Text = txtThread.Text.Replace("'", "\"");

                SQL = String.Format(
                        @"INSERT INTO uDebate_Forum_Threads
                           (TopicID
                           ,Language
                           ,EuRelated
                           ,Description
                           ,Summary
                           ,Text
                           ,UserID
                           ,Complain_email
                           ,Contact_email
                           ,CREATED
                           ,LAST_UPDATED
                           ,CREATED_BY
                           ,UPDATED_BY
                           ,Closed_Date
                           ,Opened_Date
                           ,STATUS
                           ,Active
                           ,GroupID
                           ,ModuleID
                           ,Position)
                        VALUES
                            (" + TopicID + @"
                            ,'" + System.Threading.Thread.CurrentThread.CurrentCulture.Name + @"'
                            ," + chkEuropean.SelectedValue.ToString() + @"
                            , {0}Description
                            , {0}Summary
                            , {0}Text
                            ," + UserID + @"
                            ,{0}Complain_Email
                            ,{0}Contact_Email
                            , getDate()
                            , getDate()
                            ," + UserID + @"
                            ," + UserID + @"
                            , NULL
                            , getDate()
                            ," + /*chkStatus.SelectedValue.ToString()*/ "1" + @"
                            ," + chkActive.SelectedValue.ToString() + @"
                            ,1" /*+ ddGroupID.SelectedValue.ToString()*/ + @"
                            ," + ModuleId + "," + dropDownPosition.SelectedValue + ")", Database.Sql_VariableIdent.ToString());

                ATC.Database.sqlExecuteCommandParams(SQL,
                    new string[] { ATC.Database.Sql_VariableIdent + "Description", ATC.Database.Sql_VariableIdent + "Summary", ATC.Database.Sql_VariableIdent + "Text", ATC.Database.Sql_VariableIdent + "Complain_Email", ATC.Database.Sql_VariableIdent + "Contact_Email" },
                    new object[] { txtDescription.Text.Trim(), /*txtSummary.Text.Trim()*/"", txtThread.Text.Trim(), ""/*txtComplaint.Text.Trim()*/, /*txtContact.Text.Trim()*/"" });

                string NewID = ATC.Database.sqlGetFirst("SELECT MAX(ID) FROM uDebate_Forum_Threads");

                Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "TreeView",
                                 "mid=" + ModuleId + "&Thread=" + NewID), true);

            }
            catch (Exception ex)
            {
                ATC.MessageBox.Show(ex.Message);
            }
        }

        private void SaveEdit()
        {
            try
            {
                if (txtDescription.Text.Trim() == "" ||/* txtSummary.Text == "" ||*/ txtThread.Text.Trim() == string.Empty)
                    throw new Exception(ATC.Translate.String("All fields are mandatory!", "", CurrentLanguageCode));

                string SQL = "";

                string UserID = "";
                //if (HttpContext.Current.Session["uDebate_User"] != null)
                //    UserID = ((DataRow)HttpContext.Current.Session["uDebate_User"])["ID"].ToString();
                //else
                //    UserID = ((DataRow)HttpContext.Current.Session["CurrentUserInfo"])["ID"].ToString();

                UserID = Entities.Users.UserController.GetCurrentUserInfo().UserID.ToString();

                string closedDate = "NULL";
                /*if (chkStatus.SelectedValue == "0")
                    closedDate = "getDate()";
                else
                    closedDate = "NULL";*/

                txtThread.Text = txtThread.Text.Replace("'", "\"");

                SQL = String.Format(@" UPDATE uDebate_Forum_Threads
                           SET Description = {0}Description
                              ,Summary = {0}Summary
                              ,Text = {0}Text
                              ,LAST_UPDATED = getDate()
                              ,UPDATED_BY = " + UserID + @"
                              ,Complain_email = {0}Complain_Email
                              ,Contact_email = {0}Contact_Email
                              ,EuRelated = " + chkEuropean.SelectedValue.ToString() + @"
                              ,Active = " + chkActive.SelectedValue.ToString() /*+ @"
                              ,Status = " + chkStatus.SelectedValue.ToString()*/ + @"
                              ,Closed_Date = " + closedDate + @"
                              ,UserID = " + ddUser.SelectedValue /*+ @"
                              ,StatusID = " + ddStatusID.SelectedValue */+ @"
                              ,GroupID = 1, Position = " + dropDownPosition.SelectedValue /*+ ddGroupID.SelectedValue */+ @"
                         WHERE ID = " + ThreadID, Database.Sql_VariableIdent.ToString());
                ATC.Database.sqlExecuteCommandParams(SQL,
                    new string[] { ATC.Database.Sql_VariableIdent + "Description", ATC.Database.Sql_VariableIdent + "Summary", ATC.Database.Sql_VariableIdent + "Text", ATC.Database.Sql_VariableIdent + "Complain_Email", ATC.Database.Sql_VariableIdent + "Contact_Email" },
                    new object[] { txtDescription.Text, ""/*txtSummary.Text*/, txtThread.Text.Trim(),"","" /*txtComplaint.Text.Trim(), txtContact.Text.Trim()*/ });

                lblMessage.Visible = true;
                lblMessage.Text = "
" +
                        "Thread succesfully updated!" +
                        "
";
                //Response.Redirect("Threads_Edit.aspx?topicID=" + TopicID + "&threadID=" + ThreadID);
            }
            catch (Exception ex)
            {
                ATC.MessageBox.Show(ATC.Translate.String("Áäõíáìßá áðïèÞêåõóçò ôùí óôïé÷åßùí ôçò åããñáöÞò.", "", CurrentLanguageCode) + "\r\n" + ATC.Translate.String("ÓöÜëìá: ", "", CurrentLanguageCode) + ex.Message);
            }
        }
    }

}


text:
<?php

namespace Wechat\Web\Service;

use Wechat\Api\Base\BaseService;
use Zend\Mvc\Controller\AbstractController;

abstract class BaseWebService extends BaseService {
	public function __construct($serviceLocator) {
		parent::__construct ( $serviceLocator );
		$this->getService ( 'Wechat\Api\Event\ModuleManagerListenerService' );
	}
	abstract public function run(AbstractController $controller);
	public function isError($result) {
		$array = json_decode ( $result, true );
		$errcode = $array ['errcode'];
		$errmsg = $array ['errmsg'];
		if ($errcode && $errcode != 0 || $errmsg && $errmsg != 'ok') {
			$this->doError ( $array );
			return true;
		}
		return false;
	}
	public function doError($json) {
		var_dump ( $json );
		return;
	}
}


text:
import Service from '../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import Poll from '~/lib/utils/poll';
import { __, sprintf } from '~/locale';

let eTagPoll;

export function startPolling({ commit, dispatch }, endpoint) {
  eTagPoll = new Poll({
    resource: Service,
    method: 'getErrorList',
    data: { endpoint },
    successCallback: ({ data }) => {
      if (!data) {
        return;
      }
      commit(types.SET_ERRORS, data.errors);
      commit(types.SET_EXTERNAL_URL, data.external_url);
      commit(types.SET_LOADING, false);
      dispatch('stopPolling');
    },
    errorCallback: ({ response }) => {
      let errorMessage = '';
      if (response && response.data && response.data.message) {
        errorMessage = response.data.message;
      }
      commit(types.SET_LOADING, false);
      createFlash(
        sprintf(__(`Failed to load errors from Sentry. Error message: %{errorMessage}`), {
          errorMessage,
        }),
      );
    },
  });

  eTagPoll.makeRequest();
}

export const stopPolling = () => {
  if (eTagPoll) eTagPoll.stop();
};

export function restartPolling({ commit }) {
  commit(types.SET_ERRORS, []);
  commit(types.SET_EXTERNAL_URL, '');
  commit(types.SET_LOADING, true);

  if (eTagPoll) eTagPoll.restart();
}

export default () => {};


text:
{% extends "layout.html" %}

{% block current_city_class -%}
    {% if city_slug == slug -%}
        class="current-page"
    {%- endif -%}
{%- endblock -%}

{% macro meetup_info(meetup, with_registration_link=True) %}
  {% macro item(icon, url=None, is_button=False, highlight=False) %}

        {% if url %}
            <a href="{{ url }}"
        {% else %}

            {{ caller() }}
        {% if url %}

        {% else %}

        {% endif %}

  {% endmacro %}

{{ meetup.name | markdown(inline=True) }}

      {% if meetup.topic %}
        {% call item(icon="tag") %}

{{ meetup.topic }}

        {% endcall %}
      {% endif %}
      {% if meetup.start and meetup.end %}
        {% call item(icon="calendar") %}
          {{ (meetup.start, meetup.end)| date_range }}
        {% endcall %}
      {% elif meetup.date_text %}
        {% call item(icon="calendar") %}
          {{ meetup.date_text }}
        {% endcall %}
      {% endif %}
      {% if meetup.time %}
        {% call item(icon="hourglass") %}
          {{ ('\n' ~ meetup.time) | markdown(inline=True) }}
        {% endcall %}
      {% endif %}
      {% if meetup.place %}
        {% call item(icon="map-marker", url=meetup.place.url) %}
            {{ meetup.place.name }}
            {%- if meetup.place.address -%}
                ,
                {{ meetup.place.address }}
            {% endif %}
        {% endcall %}
      {% endif %}
      {% set have_button=False %}
      {% if meetup.registration_status and with_registration_link %}
        {% if meetup.registration_status == 'running' %}
          {% call item(icon="edit", url=meetup.registration.url, is_button=True, highlight=True) %}
            {{ meetup.registration.get('text', 'Registrace právě probíhá!') }}
          {% endcall %}
          {% set have_button=True %}
        {% elif meetup.registration_status == 'closed' %}
          {% call item(icon="edit") %}
            Registrace už je uzavřena :(
          {% endcall %}
        {% elif meetup.registration_status == 'meetup_started' %}
          {% call item(icon="edit") %}
            Kurz probíhá
          {% endcall %}
        {% endif %}
      {% endif %}
      {% if meetup.materials %}
        {% call item(icon="book", url=meetup.materials,
                     is_button=not have_button and meetup.current) %}
          Materiály
        {% endcall %}
      {% endif %}

{% endmacro %}

{% macro other_courses_link(n) %}
    {% if n %}

            {% if n == 0 %}
                Kurz se připravuje.
            {% elif n == 1 %}
                Jedna další akce už je za námi!
            {% elif n < 5 %}
                A další {{n}} akce už jsou za námi!
            {% else %}
                A dalších {{n}} kurzů a srazů už je za námi!
            {% endif %}

    {% endif %}
{% endmacro %}

{% block content %}

{{ city_title | upper }}

  {% if current_meetups %}

Aktuální kurzy a srazy

      {% for meetup in current_meetups | reverse %}
         {{ meetup_info(meetup) }}
      {% endfor %}

    {{ other_courses_link(past_meetups|length) }}

  {% elif not current_meetups and city_slug != 'ostatni' %}

Nedávné kurzy a srazy

      {% for meetup in past_meetups[:3] %}
        {{ meetup_info(meetup,  with_registration_link=False) }}
      {% endfor %}

    {% if past_meetups|length > 3 %}
      {{ other_courses_link(past_meetups|length - 3) }}
    {% endif %}
  {% endif %}

  {% macro registration_link_block() %}

Registrace

            {# Sem se vloží větička podle kontextu, viz níže #}
            {{ caller() }}
            Jestli chceš, můžeš nám
            nechat kontakt.
            Až otevřeme registrace na další kurzy, pošleme ti zprávu.

  {% endmacro %}
  {% if registration_meetups %}
    {% call registration_link_block() %}
        Nehodí se ti kurzy, které mají otevřenou registraci?
    {% endcall %}
  {% elif current_meetups %}
    {% call registration_link_block() %}
        Registrace na kurzy už skončila.
    {% endcall %}
  {% elif city_slug != "ostatni" %}
    {% call registration_link_block() %}
        {% if past_meetups and current_meetups %}

            Už máme za sebou

                {% if past_meetups|length == 1 %}
                    jednu akci.
                {% elif past_meetups|length < 5 %}
                    {{past_meetups|length}} akce.
                {% else %}
                    {{past_meetups|length}} kurzů a srazů.
                {% endif %}

        {% endif %}

        Čekáš na otevření přihlášek na další?
    {% endcall %}
  {% endif %}

    {% if contacts %}

Kontakty

            {% for text, contact in contacts.items() %}

{{ text }}

            {% endfor %}

    {% endif %}

  {% if newsletter %}

Newsletter

{{ newsletter['text']}}

      <form action="{{ newsletter['url'] }}"
        method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate"
        target="_blank" novalidate>

            <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="e-mail">

              <input type="text" name="{{ newsletter['input-name'] }}" tabindex="-1" value="">

              <input type="submit" value="Přihlaš mě" name="subscribe" id="mc-embedded-subscribe" class="button">

Odeslaním svého e-mailu dáváš souhlas se zpracováním osobních údajů

      </form>

  {% endif %}

        {% if city_slug == 'brno' %}

Jak to v Brně vzniklo?

Bylo nebylo, přijela jednou do Brna na návštěvu Lynn Root, která vede PyLadies v San Franciscu. Zrovna probíhala konference RuPy 2012, a v rámci ní Lynn uspořádala půldenní workshop pod hlavičkou PyLadies. Ale potom odjela, než našla dostatečně akční Pythonistku, která by to po ní převzala.

Až po více než roce se na Facebooku ozvaly tři studentky, které se Python učily na škole a potřebovaly doučování. Vzpomněli jsme si na balíček samolepek PyLadies, co tu nechala Lynn, a rozhodli se to doučování udělat pod touto značkou. A odtud byl už jen krůček k začátečnickým kurzům i jiným srazům.

        {% elif city_slug == 'ostrava' %}

Jak to vzniklo v Ostravě?

Chtěly jsme umět něco, co nás ve škole nenaučí. A tak jednoho dne nás na cestu Pythonu přivedl bratr jedné z nás. Začaly jsme hledat možnost, jak nejlépe se ho naučit. Po dlouhém rozmýšlení a hledání jsme se rozhodly pro Pyladies. Dojíždění do Prahy či Brna nepřicházelo v úvahu a tak jsme se prostě rozhodly založit kurz v Ostravě.

Věříme, že i vy se chcete naučit něco víc, a že to víc najdete právě u nás. Doufáme, že vám naše lekce nebudou přinášet jen ponaučení a vědomosti, ale i zábavu a nové přátele. Můžete se také těšit na jiné akce, které pro vás chystáme v průběhu roku.

        {% elif city_slug == 'praha' %}

Jak to vzniklo v Praze?

PyLadies v Praze vznikly v roce 2015 díky iniciativě pražské Python komunity a organizačním schopnostem pár akčních holek, které měly zájem se kurzu samy účastnit.  Spouštěcím impulsem byl i úspěch jednodenního workshopu Django Girls Prague, rovněž zaměřeného na programování v Pythonu. Vytvořili jsme pražskou pilotní skupinu PyLadies a během prvního kurzu společně vylaďovali organizaci i náplň pražských srazů do současné podoby. Nyní kurz PyLadies představuje zhruba 13 dvouhodinových lekcí, které jsou doplněny i samostatnou prací na domácích projektech.

Na kurz pro začátečnice jsme v roce 2016 navázaly pravidelnými pondělními srazy (PyWorking sessions) pro pokročilejší začátečnice, kde mohou absolventky našeho kurzu pracovat na svých vlastních projektech pod vedením zkušených mentorů.

Společné setkávání v rámci PyLadies má velkou výhodu v tom, že se můžou holky navzájem průběžně motivovat a podporovat. Začátky bývají těžké, ale komunita kolem PyLadies vždy ochotně pomůže počáteční překážky překonávat. Díky týmu nadšenců fungují PyLadies čistě na dobrovolné a nezištné bázi.

        {% elif city_slug == 'ostatni' %}

Jak založit Pyladies ve tvém městě?

                    Nenašla jsi žádný plánovaný workshop nebo kurz ve svém městě? Zorganizuj si vlastní! :-)

                    Nejsnažší cesta je obrátit se na některou z organizátorek PyLadies kurzů. Kontakt najdeš zde pod jednotlivými městy, nebo napiš do FB skupiny
                    Pyladies Praha,
                    Pyladies Brno, nebo
                    Pyladies Ostrava.
                    Určitě ti poradí s organizací.

                    Nebo prostě zajdi na Pyvo.
                    Ve větších městech pravidelně probíhají setkání příznivců programovacího jazyka Python.
                    Najdeš zde spoustu nadšenců a třeba i nějaké ochotné budoucí kouče.

                    Pokud neznáš nikoho, kdo Python učí, zkus najít kouče ve skupině
                    Učíme Python, která je určena pro kouče/učitele Pythonu a pro ty, co je shánějí.

                    Praktické rady k organizaci jsou sepsané i
                    v Příručce pro pořadatele kurzů pro začátečníky.

                    Podporu jistě najdeš i na Facebookové skupině Python komunity
                    a na stránkách Python.cz.

        {% endif %}

    {% if team %}

{{ team_name }}

        {% for member in team %}

{{ member.name }}

            {{ member.role }}

              {%- for link in member.links -%}{%- for type, url in link.items() -%}

              {%- endfor -%}{%- endfor -%}

        {% endfor %}

    {% endif %}

  {% if past_meetups %}

Proběhlé kurzy a srazy

      {% for meetup in past_meetups %}
          {{ meetup_info(meetup,  with_registration_link=False) }}
          {% if not loop.last and loop.index0 % 2 %}

          {% endif %}
      {% endfor %}

  {% endif %}

{% endblock content %}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>com.cyc.baseclient.inference.metrics (Core Client Implementation 1.1.1 API)</title>
<meta name="date" content="2018-01-24">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

com.cyc.baseclient.inference.metrics

Classes

InferenceMetricsHashSet

InferenceMetricsValuesImpl


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="assingment.intentfiltertest">

    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />

    <!-- To auto-complete the email text field in the login form with the user's emails -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_PROFILE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Act2" />
        <activity
            android:name=".Act1"
            android:label="@string/title_activity_act1"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".Act3"
            android:label="@string/title_activity_act3" />
        <activity android:name=".IMC"></activity>
    </application>

</manifest>