text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <title>pymatgen.analysis.nmr module — pymatgen 2019.5.1 documentation</title>
    <link rel="stylesheet" href="_static/proBlue.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />

Navigation

          index

          modules |

pymatgen 2019.5.1 documentation »

pymatgen.analysis.nmr module¶

class ChemicalShielding[source]¶

Bases: pymatgen.core.tensors.SquareTensor

This class extends the SquareTensor to perform extra analysis unique to
NMR Chemical shielding tensors

Three notations to describe chemical shielding tensor (RK Harris; Magn. Reson.
Chem. 2008, 46, 582–598; DOI: 10.1002/mrc.2225) are supported.

Authors: Shyam Dwaraknath, Xiaohui Qu

Create a Chemical Shielding tensor.
Note that the constructor uses __new__
rather than __init__ according to the standard method of
subclassing numpy ndarrays.

Parameters

cs_matrix (1x3 or 3x3 array-like) – the 3x3 array-like
representing the chemical shielding tensor
or a 1x3 array of the primary sigma values corresponding
to the principal axis system

vscale (6x1 array-like) – 6x1 array-like scaling the
voigt-notation vector with the tensor entries

HaeberlenNotation¶

alias of HaeberlenNotion

class MarylandNotation(sigma_iso, omega, kappa)¶

Bases: tuple

Create new instance of MarylandNotation(sigma_iso, omega, kappa)

kappa¶

Alias for field number 2

omega¶

Alias for field number 1

sigma_iso¶

Alias for field number 0

class MehringNotation(sigma_iso, sigma_11, sigma_22, sigma_33)¶

Bases: tuple

Create new instance of MehringNotation(sigma_iso, sigma_11, sigma_22, sigma_33)

sigma_11¶

Alias for field number 1

sigma_22¶

Alias for field number 2

sigma_33¶

Alias for field number 3

sigma_iso¶

Alias for field number 0

classmethod from_maryland_notation(sigma_iso, omega, kappa)[source]¶

haeberlen_values¶

the Chemical shielding tensor in Haeberlen Notation

Type

Returns

maryland_values¶

the Chemical shielding tensor in Maryland Notation

Type

Returns

mehring_values¶

the Chemical shielding tensor in Mehring Notation

Type

Returns

principal_axis_system¶

Returns a chemical shielding tensor aligned to the principle axis system
so that only the 3 diagnol components are non-zero

class ElectricFieldGradient[source]¶

Bases: pymatgen.core.tensors.SquareTensor

This class extends the SquareTensor to perform extra analysis unique to
NMR Electric Field Gradient tensors in units of V/Angstrom^2

Authors: Shyam Dwaraknath, Xiaohui Qu

Create a Chemical Shielding tensor.
Note that the constructor uses __new__
rather than __init__ according to the standard method of
subclassing numpy ndarrays.

Parameters

efg_matrix (1x3 or 3x3 array-like) – the 3x3 array-like
representing the electric field tensor
or a 1x3 array of the primary values corresponding
to the principal axis system

vscale (6x1 array-like) – 6x1 array-like scaling the
voigt-notation vector with the tensor entries

V_xx¶

V_yy¶

V_zz¶

asymmetry¶

Asymmetry of the electric field tensor defined as:
(V_yy - V_xx)/V_zz

coupling_constant(specie)[source]¶

Computes the couplling constant C_q as defined in:

Wasylishen R E, Ashbrook S E, Wimperis S. NMR of quadrupolar nuclei
in solid materials[M]. John Wiley & Sons, 2012. (Chapter 3.2)

C_q for a specific atom type for this electric field tensor:

C_q=e*Q*V_zz/h

h: planck's constant
Q: nuclear electric quadrupole moment in mb (millibarn
e: elementary proton charge

Parameters

specie – flexible input to specify the species at this site.
Can take a isotope or element string, Specie object,
or Site object

Returns

the coupling constant as a FloatWithUnit in MHz

principal_axis_system¶

Returns a electric field gradient tensor aligned to the principle axis system so that only the 3 diagnol components are non-zero

This Page

Show Source

Quick search

    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          modules |

pymatgen 2019.5.1 documentation »

        © Copyright 2011, Pymatgen Development Team.
      Created using Sphinx 2.0.1.

This page uses
Google Analytics to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.


text:
package org.devocative.ares.entity.oservice;

import org.devocative.demeter.entity.*;
import org.hibernate.envers.Audited;
import org.hibernate.envers.NotAudited;

import javax.persistence.*;
import java.util.Date;

@Audited
@Entity
@Table(name = "t_ars_service_prop", uniqueConstraints = {
	@UniqueConstraint(name = "uk_ars_serviceProp", columnNames = {"c_name", "f_service"})
})
public class OServiceProperty implements ICreationDate, ICreatorUser, IModificationDate, IModifierUser {
	private static final long serialVersionUID = -7345944329689292247L;

	@Id
	@GeneratedValue(generator = "ars_service_prop")
	@org.hibernate.annotations.GenericGenerator(name = "ars_service_prop", strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator",
		parameters = {
			//@org.hibernate.annotations.Parameter(name = "optimizer", value = "pooled"),
			@org.hibernate.annotations.Parameter(name = "initial_value", value = "1"),
			@org.hibernate.annotations.Parameter(name = "increment_size", value = "1"),
			@org.hibernate.annotations.Parameter(name = "sequence_name", value = "ars_service_prop")
		})
	private Long id;

	@Column(name = "c_name", nullable = false)
	private String name;

	@Column(name = "b_required", nullable = false)
	private Boolean required;

	@Column(name = "c_value")
	private String value;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "f_service", nullable = false, foreignKey = @ForeignKey(name = "srvcprop2service"))
	private OService service;

	// --------------- CREATE / MODIFY

	@NotAudited
	@Column(name = "d_creation", nullable = false, columnDefinition = "date")
	private Date creationDate;

	@NotAudited
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "f_creator_user", nullable = false, insertable = false, updatable = false,
		foreignKey = @ForeignKey(name = "srvcprop_crtrusr2user"))
	private User creatorUser;

	@NotAudited
	@Column(name = "f_creator_user", nullable = false)
	private Long creatorUserId;

	@Column(name = "d_modification", columnDefinition = "date")
	private Date modificationDate;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "f_modifier_user", insertable = false, updatable = false,
		foreignKey = @ForeignKey(name = "srvcprop_mdfrusr2user"))
	private User modifierUser;

	@Column(name = "f_modifier_user")
	private Long modifierUserId;

	@Version
	@Column(name = "n_version", nullable = false)
	private Integer version = 0;

	// ------------------------------

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getRequired() {
		return required;
	}

	public void setRequired(Boolean required) {
		this.required = required;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public OService getService() {
		return service;
	}

	public void setService(OService service) {
		this.service = service;
	}

	// --------------- CREATE / MODIFY

	@Override
	public Date getCreationDate() {
		return creationDate;
	}

	@Override
	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public User getCreatorUser() {
		return creatorUser;
	}

	@Override
	public Long getCreatorUserId() {
		return creatorUserId;
	}

	@Override
	public void setCreatorUserId(Long creatorUserId) {
		this.creatorUserId = creatorUserId;
	}

	@Override
	public Date getModificationDate() {
		return modificationDate;
	}

	@Override
	public void setModificationDate(Date modificationDate) {
		this.modificationDate = modificationDate;
	}

	public User getModifierUser() {
		return modifierUser;
	}

	@Override
	public Long getModifierUserId() {
		return modifierUserId;
	}

	@Override
	public void setModifierUserId(Long modifierUserId) {
		this.modifierUserId = modifierUserId;
	}

	@Override
	public Integer getVersion() {
		return version;
	}

	@Override
	public void setVersion(Integer version) {
		this.version = version;
	}

	// ------------------------------

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof OServiceProperty)) return false;

		OServiceProperty that = (OServiceProperty) o;

		return !(getId() != null ? !getId().equals(that.getId()) : that.getId() != null);

	}

	@Override
	public int hashCode() {
		return getId() != null ? getId().hashCode() : 0;
	}

	@Override
	public String toString() {
		return getName();
	}
}

redpajama_set_name: RedPajamaGithub


text:
	<title>Infographic · Rémi Pelhate</title>
	<meta charset="UTF-8">

	<link href="http://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" href="css/all.css">

Played  times

Used  of the time

Thursday 28 · played  times

Friday 29 · played  times

Saturday 30 · played  times

Sunday 1 · played  times

Monday 2 · played  times

Tuesday 3 · played  times

Wednesday 4 · played  times

Hover over the fretboard
and click to get detailed info.

Hold down the ctrl key
to view all available notes.

				<?php require_once('fretboard_visualizer.php'); ?>

Data mesured between November 28th and December 5th of 2013.

TOTAL NOTES PLAYED

			<canvas id="chart" width="250" height="250" class="clear"></canvas>

MOST PLAYED NOTE

LEAST PLAYED NOTE


text:
'use strict';

var async = require("async");
var gm = require("gm");
var mkdirp = require("mkdirp");
var path = require("path");
var os = require("os");

module.exports = function(grunt) {

  grunt.registerMultiTask('unretina', 'Resizes @2x images to standard resolution', function() {
    var done = this.async();
    var options = this.options({
      overwrite: true,
      quality: 1,
      concurrency: os.cpus().length,
      suffixes: [
        "@2x",
        "-hd"
      ]
    });

    var series = [];

    this.files.forEach(function (f) {
      // Fail for more than one source file per file group.
      if (f.src.length !== 1)
      {
        return grunt.fail.fatal("Can not resize more than one image per destination.\nYou need to use a different 'files' format in your Gruntfile.");
      }

      var dirname = path.dirname(f.dest);
      var filepath = f.src[0];
      var name = path.basename(f.dest);

      options.suffixes.forEach(function (suffix) {
        name = name.split(suffix).join("");
      });

      var dest = path.join(dirname, name);

      // Prevent failing if destination directory does not exist.
      if (!grunt.file.isDir(dirname))
      {
        grunt.file.mkdir(dirname);
      }

      if (options.overwrite === false && grunt.file.isFile(dest))
      {
        return grunt.log.writeln("Skipping " + filepath + " because destination already exists.\nSet options 'overwrite' to true to enable overwriting of files.");
      }

      series.push(function(callback) {
        gm(filepath)
        .size(function(err, size) {
          if (err) {
            grunt.fatal("Failed to query image dimensions of '" + filepath + "'.\n" + err);
            callback(err);

          } else {
            if (!!((size.width|size.height)&1))
            {
              grunt.log.warn("Image " + filepath + " has dimensions not divisible by 2");
              return callback();
            }

            gm(filepath)
            .quality(options.quality * 100)
            .resize("50%", "50%", "!")
            .write(dest, function (err) {
              if (err)
              {
                grunt.fail.warn(err.message);
              }
              else
              {
                grunt.log.ok("Image " + filepath + " resized to " + dest);
              }

              return callback();
            });
          }
        });
      });
    });

    async.parallelLimit(series, options.concurrency, done);
  });
};


text:
using TankManufacturer.Units;

namespace FactoryMethod
{
    class GermanFactory:ITankFactory
    {
        public Tank CreateTank()
        {
            var tank = new Tank("Tiger", 4.5, 120);
            return tank;
        }
    }
}


text:
FROM bigtop/puppet:trunk-debian-9
MAINTAINER dev@bigtop.apache.org

COPY bigtop_toolchain /usr/share/puppet/modules/bigtop_toolchain

RUN  apt-get clean && apt-get update && puppet apply -e "include bigtop_toolchain::installer"

COPY . /tmp/bigtop
RUN cd /tmp/bigtop && ./gradlew && cd && rm -rf /tmp/bigtop


text:
@interface ColorSwitchViewController ()

@property (weak, nonatomic) IBOutlet UIView *uiview;
@property (weak, nonatomic) IBOutlet UIView *colorView;
@property (weak, nonatomic) IBOutlet UIView *passcodeView;

@end

@implementation ColorSwitchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (IBAction)segmentValueChanged:(UISegmentedControl *)sender
{
    UISegmentedControl *segmentedControl = (UISegmentedControl*)sender;
    NSInteger selectedSegment = segmentedControl.selectedSegmentIndex;
    if(selectedSegment == 0)
    {
        [UIView transitionWithView:self.uiview
                          duration:0.65
                           options:UIViewAnimationOptionTransitionFlipFromRight
                        animations:^{
                            self.passcodeView.hidden = true;
                            self.colorView.hidden = false;
                        }
                        completion:nil];
        NSLog(@"0");
    }
    else
    {
        [UIView transitionWithView:self.uiview
                          duration:0.65
                           options:UIViewAnimationOptionTransitionFlipFromLeft
                        animations:^{
                            self.colorView.hidden = true;
                            self.passcodeView.hidden = false;
                        } completion:nil];
        NSLog(@"1");
    }
}

@end


text:
require "rspec"

RSpec.describe "Google::Apis::SqladminV1" do
  # Minimal test just to ensure no syntax errors in generated code
  it "should load" do
    expect do
      require "google/apis/sqladmin_v1"
    end.not_to raise_error
    expect do
      Google::Apis::SqladminV1::SQLAdminService.new
    end.not_to raise_error
  end
end


text:
@interface OpenFileInWebView : NSObject
// @return viewcontroller to load file.
// support file type depended on webview.(pdf,doc etc..)
+ (UIViewController *)viewControllerToOpenFile:(NSString *) filePath;
@end


text:
package org.apache.camel.dataformat.bindy.fixed.ignoretrailing;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.camel.EndpointInject;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.dataformat.bindy.annotation.DataField;
import org.apache.camel.dataformat.bindy.annotation.FixedLengthRecord;
import org.apache.camel.model.dataformat.BindyDataFormat;
import org.apache.camel.model.dataformat.BindyType;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;

/**
 * This test validates that bindy will ignore trailing characters in a record when the
 * ignoreTrailingCharacters property is set to 'true' on the @FixedLengthRecord annotation
 */
public class BindySimpleIgnoreTrailingCharsTest extends CamelTestSupport {

    public static final String URI_DIRECT_MARSHALL         = "direct:marshall";
    public static final String URI_DIRECT_UNMARSHALL       = "direct:unmarshall";
    public static final String URI_MOCK_MARSHALL_RESULT    = "mock:marshall-result";
    public static final String URI_MOCK_UNMARSHALL_RESULT  = "mock:unmarshall-result";

    private static final String TEST_RECORD = "10A9  PaulineM    ISINXD12345678BUYShare000002500.45USD01-08-2009Hello     xxx\r\n";

    @EndpointInject(URI_MOCK_MARSHALL_RESULT)
    private MockEndpoint marshallResult;

    @EndpointInject(URI_MOCK_UNMARSHALL_RESULT)
    private MockEndpoint unmarshallResult;

    // *************************************************************************
    // TESTS
    // *************************************************************************

    @Test
    public void testUnmarshallMessage() throws Exception {

        unmarshallResult.expectedMessageCount(1);
        template.sendBody(URI_DIRECT_UNMARSHALL, TEST_RECORD);

        unmarshallResult.assertIsSatisfied();

        // check the model
        BindySimpleIgnoreTrailingCharsTest.Order order =
            (BindySimpleIgnoreTrailingCharsTest.Order) unmarshallResult.getReceivedExchanges().get(0).getIn().getBody();
        assertEquals(10, order.getOrderNr());
        // the field is not trimmed
        assertEquals(null, order.getFirstName());
        assertEquals("M    ", order.getLastName());
        assertEquals("Hello     ", order.getComment());
    }

    // *************************************************************************
    // ROUTES
    // *************************************************************************

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        RouteBuilder routeBuilder = new RouteBuilder() {

            @Override
            public void configure() throws Exception {
                BindyDataFormat bindy = new BindyDataFormat();
                bindy.setClassType(BindySimpleIgnoreTrailingCharsTest.Order.class);
                bindy.setLocale("en");
                bindy.setType(BindyType.Fixed);

                from(URI_DIRECT_MARSHALL)
                    .marshal(bindy)
                    .to(URI_MOCK_MARSHALL_RESULT);

                from(URI_DIRECT_UNMARSHALL)
                    .unmarshal().bindy(BindyType.Fixed, BindySimpleIgnoreTrailingCharsTest.Order.class)
                    .to(URI_MOCK_UNMARSHALL_RESULT);
            }
        };

        return routeBuilder;
    }

    // *************************************************************************
    // DATA MODEL
    // *************************************************************************
    @FixedLengthRecord(ignoreTrailingChars = true)
    public static class Order {

        @DataField(pos = 1, length = 2)
        private int orderNr;

        @DataField(pos = 3, length = 2)
        private String clientNr;

        // not annotated for this test
        private String firstName;

        @DataField(pos = 14, length = 5, align = "L")
        private String lastName;

        @DataField(pos = 19, length = 4)
        private String instrumentCode;

        @DataField(pos = 23, length = 10)
        private String instrumentNumber;

        @DataField(pos = 33, length = 3)
        private String orderType;

        @DataField(pos = 36, length = 5)
        private String instrumentType;

        @DataField(pos = 41, precision = 2, length = 12, paddingChar = '0')
        private BigDecimal amount;

        @DataField(pos = 53, length = 3)
        private String currency;

        @DataField(pos = 56, length = 10, pattern = "dd-MM-yyyy")
        private Date orderDate;

        @DataField(pos = 66, length = 10, align = "L", paddingChar = ' ')
        private String comment;

        public int getOrderNr() {
            return orderNr;
        }

        public void setOrderNr(int orderNr) {
            this.orderNr = orderNr;
        }

        public String getClientNr() {
            return clientNr;
        }

        public void setClientNr(String clientNr) {
            this.clientNr = clientNr;
        }

        public String getFirstName() {
            return firstName;
        }

        public void setFirstName(String firstName) {
            this.firstName = firstName;
        }

        public String getLastName() {
            return lastName;
        }

        public void setLastName(String lastName) {
            this.lastName = lastName;
        }

        public String getInstrumentCode() {
            return instrumentCode;
        }

        public void setInstrumentCode(String instrumentCode) {
            this.instrumentCode = instrumentCode;
        }

        public String getInstrumentNumber() {
            return instrumentNumber;
        }

        public void setInstrumentNumber(String instrumentNumber) {
            this.instrumentNumber = instrumentNumber;
        }

        public String getOrderType() {
            return orderType;
        }

        public void setOrderType(String orderType) {
            this.orderType = orderType;
        }

        public String getInstrumentType() {
            return instrumentType;
        }

        public void setInstrumentType(String instrumentType) {
            this.instrumentType = instrumentType;
        }

        public BigDecimal getAmount() {
            return amount;
        }

        public void setAmount(BigDecimal amount) {
            this.amount = amount;
        }

        public String getCurrency() {
            return currency;
        }

        public void setCurrency(String currency) {
            this.currency = currency;
        }

        public Date getOrderDate() {
            return orderDate;
        }

        public void setOrderDate(Date orderDate) {
            this.orderDate = orderDate;
        }

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        @Override
        public String toString() {
            return "Model : " + Order.class.getName() + " : " + this.orderNr + ", " + this.orderType + ", " + String.valueOf(this.amount) + ", " + this.instrumentCode + ", "
                   + this.instrumentNumber + ", " + this.instrumentType + ", " + this.currency + ", " + this.clientNr + ", " + this.firstName + ", " + this.lastName + ", "
                   + String.valueOf(this.orderDate);
        }
    }

}


text:
#ifndef __SGE_POSITION_NODE_HPP
#define __SGE_POSITION_NODE_HPP

#include <sge/node.hpp>
#include <sge/utils/matrix.hpp>
#include <sge/utils/vector.hpp>

namespace sge
{
    class PositionNode : public Node
    {
        using Node::Node;

        public:
            virtual std::vector<std::string> mro() const;

            Vector get_pos() const;
            void set_pos(const Vector &pos);
            void set_pos(int x, int y);

            float get_rotation() const;
            void set_rotation(float angle);

            float get_zoom() const;
            void set_zoom(float zoom);

            Vector get_absolute_pos();
            float get_absolute_rotation() const;
            float get_absolute_zoom() const;

            Matrix<3,3> get_pm_transform() const;

        private:
            void premultiply_pos();

        private:
            Vector _pos;
            float _angle = 0;
            float _zoom = 0;

            Matrix<3,3> translation;
            Matrix<3,3> rotation;
            Matrix<3,3> local_pm_transform;
            Matrix<3,3> parent_pm_transform;
            Vector pm_pos;
    };
}

#endif /* __SGE_POSITION_NODE_HPP */


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns1="urn:oasis:names:tc:xliff:document:1.2">
    <!-- From: file:/tmp/tmp-deduplicated497083572378058564/blaze-out/gcc-4.X.Y-crosstool-v18-hybrid-grtev4-k8-opt/genfiles/java/com/google/android/gmscore/integ/client/common/res/values-ru/strings.xml -->
    <eat-comment/>
    <string msgid="9089562800660647919" name="common_google_play_services_unknown_issue">"Приложению \"<ns1:g id="APP_NAME">%1$s</ns1:g>\" не удается подключиться к сервисам Google Play. Если проблема не исчезнет, обратитесь к разработчику."</string>
</resources>


text:
package org.kohsuke.stapler;

import org.apache.commons.discovery.ResourceNameIterator;
import org.apache.commons.discovery.resource.ClassLoaders;
import org.apache.commons.discovery.resource.names.DiscoverServiceNames;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Aspect of stapler that brings in an optional language binding.
 *
 * Put {@link MetaInfServices} on subtypes so that Stapler can discover them.
 *
 * @author Kohsuke Kawaguchi
 */
public abstract class Facet {
    /**
     * Adds {@link Dispatcher}s that look at one token and binds that
     * to the views associated with the 'it' object.
     */
    public abstract void buildViewDispatchers(MetaClass owner, List<Dispatcher> dispatchers);

    /**
     * Discovers all the facets in the classloader.
     */
    public static List<Facet> discover(ClassLoader cl) {
        return discoverExtensions(Facet.class, cl);
    }

    public static <T> List<T> discoverExtensions(Class<T> type, ClassLoader cl) {
        List<T> r = new ArrayList<T>();

        ClassLoaders classLoaders = new ClassLoaders();
        classLoaders.put(cl);
        DiscoverServiceNames dc = new DiscoverServiceNames(classLoaders);
        ResourceNameIterator itr = dc.findResourceNames(type.getName());
        while(itr.hasNext()) {
            String name = itr.nextResourceName();
            Class<?> c;
            try {
                c = cl.loadClass(name);
            } catch (ClassNotFoundException e) {
                LOGGER.log(Level.WARNING, "Failed to load "+name,e);
                continue;
            }
            try {
                r.add((T)c.newInstance());
            } catch (InstantiationException e) {
                LOGGER.log(Level.WARNING, "Failed to instanticate "+c,e);
            } catch (IllegalAccessException e) {
                LOGGER.log(Level.WARNING, "Failed to instanticate "+c,e);
            }
        }
        return r;
    }

    public static final Logger LOGGER = Logger.getLogger(Facet.class.getName());

    /**
     * Creates a {@link RequestDispatcher} that handles the given view, or
     * return null if no such view was found.
     *
     * @param type
     *      If "it" is non-null, {@code it.getClass()}. Otherwise the class
     *      from which the view is searched.
     */
    public abstract RequestDispatcher createRequestDispatcher(RequestImpl request, Class type, Object it, String viewName) throws IOException;

    /**
     * Attempts to route the HTTP request to the 'index' page of the 'it' object.
     *
     * @return
     *      true if the processing succeeds. Otherwise false.
     */
    public abstract boolean handleIndexRequest(RequestImpl req, ResponseImpl rsp, Object node, MetaClass nodeMetaClass) throws IOException, ServletException;
}


text:
namespace Console_Game
{
    using System;
    using Console_Game.Creatures;

    class Program
    {
        static void Main()
        {
            Game game = new Game();

            game.Run();
        }
    }
}


text:
1. Modifica el código fuente para que el sol sea azul.

2. Haz un commit describiendo los cambios cuyo mensaje comience por `0982.a`.

3. Añade un segundo sol verde. Para ello:
  * Fíjate en la zona donde se definen atributos arriba del todo:
    ```
    private Square wall;
    private Square window;
    private Triangle roof;
    private Circle sun;
    ```

  * Añade ahí:
    ```
    private Circle sun2;
    ```
4. Luego añade el código fuente necesario en `draw()`.

5. Haz un commit describiendo los cambios cuyo mensaje comience por `0982.b`.

6. Crea un repositorio en GitHub, enlaza tu repositorio local con el repositorio remoto recién creado y sube los cambios.

7. Modifica el código fuente de la clase `Picture` para que cuando se invoque el método `draw`:
  * Solo haya, de nuevo, un sol amarillo.
  * Haya un campo verde debajo de la casa ocupando toda la parte inferior
  * El sol se mueva de arriba a abajo simulando el movimiento del sol cuando se pinte la escena (haz que el sol no llegue a ponerse del todo).

  Haz tantos commit como consideres describiendo los cambios (cuyos mensajes comiencen por `0982.c`) y actualiza tu repositorio de Github.

8. Cambia el código fuente para que:
  * Cuando se muestre la escena, el sol permanezca alto sin moverse.
  * Siga mostrándose el campo verde debajo de la casa.
  * Podamos invocar un método `moveSun()` de la clase `Picture` para conseguir el efecto de que el sol se mueva.

  Haz tantos commit como consideres (cuyos mensajes comiencen por `0982.d`) y actualiza tu repositorio de Github.

10. Entrega la URL del último commit del repositorio de GitHub (pregunta al profesor cómo obtener dicha URL) y como dato adicional una captura de pantalla en la que se vea el sol al final de su movimiento tras invocar al método `moveSun`.


text:
package com.krazy.kcfw.modules.cms.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.krazy.kcfw.common.service.CrudService;
import com.krazy.kcfw.modules.cms.dao.ArticleDataDao;
import com.krazy.kcfw.modules.cms.entity.ArticleData;

/**
 * 站点Service
 * @author krazy
 * @version 2013-01-15
 */
@Service
@Transactional(readOnly = true)
public class ArticleDataService extends CrudService<ArticleDataDao, ArticleData> {

}


text:
<?php
header('Access-Control-Allow-Origin: *');
defined('BASEPATH') OR exit('No direct script access allowed');

class User_model extends CI_Model
{
    public function __construct()
    {
        parent::__construct();
    }

   public function UserLogin($argPost)
    {
    $msg='';
        $query = $this->db->select('a.*, a.username AS username, a.id AS id, a.status AS status, a.login_status as login_status, b.complete_status, c.date_on' )
            ->from('gsp_user As a')
            ->join('gsp_school AS b', 'b.userid=a.id', 'left')
      ->join('gsp_aduit_submitted AS c', 'b.id=c.school_id', 'left')
            ->where(array('a.email' => $argPost['email'], 'a.password' => $argPost['password']))
    ->order_by('c.date_on', 'desc')
            ->get();
//             echo $this->db->last_query();
        if ($query->num_rows() > 0) {
            $row = $query->row();
//    if($row->complete_status==1 || $row->date_on >='2019-11-12 00:00:00')
      if($row->login_status==1)
      {
      $userData = array(
      'USERNAME' => $row->username,
      'USER_ID' => $row->id,
      'status' => $row->status,
      'lastid' => $row->lastQuestionId
      );
              $this->session->set_userdata($userData);
              $msg='success';
    }

//   elseif($row->complete_status==1) {
//         $msg = 'complitesurveyschool';
//          }

  else
  {
  $msg='warning';
  }
        } else
    {
       $msg='error';
    }
        return $msg;
    }

  public function UserLoginDownload($argPost)
    {
    $msg='';
    $db2 = $this->load->database('db2', TRUE);
        $query = $db2->select('a.*, a.username AS username, a.id AS id, a.status AS status, b.complete_status AS complete_status, b.progress AS progress')
            ->from('gsp_user As a')
            ->join('gsp_school AS b', 'b.coemail=a.email', 'left')
            ->where(array('a.email' => $argPost['email'], 'a.password' => $argPost['password'], 'b.complete_status'=>'1'))
            ->get();
        if ($query->num_rows() > 0) {
            $row = $query->row();
      if($row->login_status==0)
      {
        $userData = array(
          'USERNAME' => $row->username,
          'USER_ID' => $row->id,
          'status' => $row->status,
          'lastid' => $row->lastQuestionId,
                    'email' => $row->email
        );
              $this->session->set_userdata($userData);
              $msg='success';
      }
      else
      {
        $msg='warning';
      }
        }
     elseif($row->complete_status==0 || $row->progress<100)
      {
        $msg='incomplete';
      }
         else
    {
       $msg='error';
    }

        return $msg;
    }

    public function UserLoginDownload2($argPost)
    {
    $msg='';
    $db2 = $this->load->database('db2', TRUE);
        $query = $db2->select('a.*, a.username AS username, a.id AS id, a.status AS status, b.status AS status' )
            ->from('gsp_user As a')
            ->join('gsp_aduit_submitted AS b', 'b.userid=a.id', 'left')
            ->where(array('a.email' => $argPost['email'], 'a.password' => $argPost['password'], 'b.status'=>'1'))
            ->get();
        if ($query->num_rows() > 0) {
            $row = $query->row();
      if($row->login_status==0)
      {
        $userData = array(
          'USERNAME' => $row->username,
          'USER_ID' => $row->id,
          'status' => $row->status,
          'lastid' => $row->lastQuestionId,
                    'email' => $row->email
        );
              $this->session->set_userdata($userData);
              $msg='success';
      }
      else
      {
        $msg='warning';
      }
        }
     elseif($row->complete_status==0 || $row->progress<100)
      {
        $msg='incomplete';
      }
         else
    {
       $msg='error';
    }

        return $msg;
    }

   public function UserLoginDownload1($argPost)
    {
       $query = $this->db->select('*')
                ->from('tbl_admin')
                ->where(array('email' => $argPost['email'], 'password' => $argPost['password'], 'status' => '0'))
                ->get();
        if ($query->num_rows() > 0) {
            return true;
        }
        return false;
    }

    public function CreateUser($argPost)
    {
        $query = $this->db->select('COUNT(*) count')
            ->from('gsp_user')
            ->get();

        $row = $query->row();

        $update = array(
            'email' => $argPost['email'],
            'password' => $argPost['Password'],
            'username' => $argPost['username']
        );
     $query1 = $this->db->select('COUNT(*) as count')
                ->from('gsp_user')
                ->where('email', $argPost['email'])
                ->get()->result();

        if($query1[0]->count==0){
        $this->db->insert('gsp_user', $update);//insert if does not exist
        }
        $query = $this->db
            ->select('id')
            ->from('gsp_user')
            ->where('email', $argPost['email'])
            ->get();
        $row = $query->row();
        return $row->id;
    }

    public function Login($argPost)
    {
        $query = $this->db->select('*')
            ->from('gsp_user')
            ->where(array('email' => $argPost['email'], 'password' => $argPost['password'], 'status' => '0'))
            ->get();
        if ($query->num_rows() > 0) {
            $row = $query->row();
            return (int)$row->id;
        }
        return null;
    }

    /*
     * Get States
     */
    public function getStates()
    {
        $states = array('' => 'Select State');
        $data = $this->db->select('id,name')->from('states')->order_by('name')->get()->result();
        foreach ($data as $d) {
            $states[$d->id] = $d->name;
        }
        return $states;
    }

    /*
     * Get Cities
     */
    public function getCIties($argID)
    {
        $cities = array();
  $this->db->order_by("name");
        $data = $this->db->get_where('cities', array('state_id =' => $argID))->result();
        return $data;
    }

    /*
     * Get Cities All New Added Code By Siddhant
     */
    public function getCitiesAll($argID)
    {
        $cities = array();
        $data = $this->db->get_where('cities', array('state_id =' => $argID))->result();
        //echo $this->db->last_query(); exit;
        foreach ($data as $d) {
            $cities[$d->id] = $d->name;
        }
        return $cities;
    }

    public function ChangePassword($pass)
    {
        $this->db->set('password', $pass['pass'])
            ->where(array('id' => $this->session->userdata('USER_ID')))//which row want to upgrade
            ->update('gsp_user');
        print_r("Update");
        $this->session->sess_destroy();
        return true;
    }

    function CheckPassword($pass)
    {
        $current = $this->db->select('*')->where('id', $this->session->userdata('USER_ID'))->from('gsp_user')->get()->row()->password;
        if ($current == $pass['oldPassword'])
            return true;
        else
            return false;
    }

  /* public function forgetPassword()
    {

        $this->load->helper('string');
    $oneTimeCounter =$this->db->get_where('gsp_school',array("coemail"=>$this->input->post('val')))->num_rows();
        $email_count = $this->db->get_where('gsp_user', array('email' => $this->input->post('val')))->num_rows();
        if ($email_count > 0) {
            $varNewPass = strtolower(random_string('alnum', 5));
            $arr = array(
                'password' => $varNewPass
            );
            $this->db->where('email', $this->input->post('val'));
            if ($this->db->update('gsp_user', $arr)) {
                $query = $this->db->select('*')
                    ->from('gsp_user')
                    ->where('email', $this->input->post('val'))
                    ->get()->row();
            $this->db->where('coemail',$this->input->post('val'));
            $this->db->update('gsp_school',array("forgetpassword_email_date"=>date("Y-m-d")));
            $this->load->library('email');
                $config['mailtype'] = 'html';
                $this->email->initialize($config);
                $from = "support@greenschoolsprogramme.org";
                $to =array($query->email,"siddhartha2488@gmail.com","Studiotesseractst@gmail.com","ranjita@cseindia.org");
                $subject = "GSP Forget Password";
                $msg = "Dear  ";
                $msg .= $query->username . "," . "

";
                $msg .= "Your new password for GSP Login.

";
                $msg .= $varNewPass . "

";
                $msg .= "Regards,
GSP Team.

";
                $this->email->to($to);
                $this->email->from($from, "Green Schools Programme");
                $this->email->subject($subject);
                $this->email->message($msg);
                $this->email->send();
            return $varNewPass;
                } else {
                   return false;
                }
                } else {
                 return false;
        }
    }*/

public function forgetPassword($tt)
    {
      if(!empty($tt)){
      date_default_timezone_set('Asia/Kolkata');
      $this->load->helper('string');

      $email_count =$this->db->select("id")->from('gsp_user')->get()->result();
      if (count($email_count)>0) {
        $this->db->like('coemail',$tt);
//           $this->db->like('forgetpassword_email_time',date("Y-m-d"));
              $dataResult = $this->db->select("counter")->from('gsp_school')->get()->result();
          if(!empty($dataResult)){
          $update_counter=$dataResult[0]->counter+1;
          $this->db->where('coemail',$tt);
          $this->db->update('gsp_school',array("forgetpassword_email_time"=>date("Y-m-d"),"counter"=>$update_counter));
        }
         if($dataResult[0]->counter>=1){
            return  "You Can Send Request For Forgetpassword Only Once in A Day. Please Send Next Query After Half An Hour & If You Have Any Doubts, Mail support@greenschoolsprogramme.org OR CALL 011-4061600";
         }
         else{

         $query = $this->db->select('*')->from('gsp_user')->like('email', $this->input->post('val'))->get()->row();       $varNewPass = strtolower(random_string('alnum', 5));
                  $arr = array('password' => $varNewPass);
                  $this->db->like('email',$tt);
                  $this->db->update('gsp_user', $arr);
                  $this->load->library('email');

                  $config['protocol']    = 'smtp';
                  $config['smtp_host']    = 'ssl://smtp.gmail.com';
                  $config['smtp_port']    = '465';
                  $config['smtp_timeout'] = '60';

                  $config['smtp_user']    = 'support@greenschoolsprogramme.org';    //Important
                  $config['smtp_pass']    = 'GSP@2000';  //Important

                  $config['charset']    = 'utf-8';
                  $config['newline']    = "\r\n";
                  $config['mailtype'] = 'html'; // or html
                  $config['validation'] = TRUE; // bool whether to validate email or not

                 $this->email->initialize($config);
                 $from = "support@greenschoolsprogramme.org";
                 $to =array($query->email,"support@greenschoolsprogramme.org","Studiotesseractst@gmail.com","ranjita@cseindia.org");
                 $subject = "GSP Forget Password";
                 $msg = "Dear  ";
                 $msg .= $query->username . "," . "

";
                 $msg .= "Your new password for GSP Login.

";
                 $msg .= $varNewPass . "

";
                 $msg .= "Regards,
GSP Team.

";
                 $this->email->to($to);
                 $this->email->from($from, "Green Schools Programme");
                 $this->email->subject($subject);
                 $this->email->message($msg);
                 $this->email->send();
                 return "Your password request has been accepted and the new password will be sent to the registered email address of the GSP co-ordinator in the next five - ten minutes. If the password is not received in the next 10 minutes, then please check the spam folder. If not in the spam folder, then please send an email saying that you haven't received the new password to: support@greenschoolsprogramme.org, Please note that passwords can be changed only once in a day.";
              }
          }
        else {
              return false;
            }
    }    }
}

?>


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/content_main"
    android:gravity="center_horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.diragi.leveldesigner.MainActivity"
    tools:showIn="@layout/activity_main">
    <EditText
        android:layout_marginTop="10dp"
        android:id="@+id/title"
        android:hint="level_"
        android:layout_width="300dp"
        android:layout_height="wrap_content" />
    <LinearLayout
        android:layout_marginTop="25dp"
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/one"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/two"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/three"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/four"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/five"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/six"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/seven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/nine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/twoone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/twotwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/twothree"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/twofour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/twofive"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/twosix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/twoseven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/twoeight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/twonine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/thone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/thtwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/ththree"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/thfour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/thfive"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/thsix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/thseven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/theight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/thnine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/fourone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fourtwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fourthree"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fourfour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fourfive"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/foursix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fourseven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/foureight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fournine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/fiveone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fivetwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fivethree"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fivefour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fivefive"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fivesix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fiveseven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fiveeight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/fivenine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/sixone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sixtwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sixthree"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sixfour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sixfive"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sixsix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sixseven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sixeight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sixnine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/sevone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sevtwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sevthree"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sevfour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sevfive"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sevsix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sevseven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/seveight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/sevnine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/eightone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eighttwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eightthree"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eightfour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eightfive"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eightsix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eightseven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eighteight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/eightnine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout
        android:orientation="horizontal"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <CheckBox
            android:id="@+id/nineone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/ninetwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/ninethree"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/ninefour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/ninefive"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/ninesix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/nineseven"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/nineeight"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <CheckBox
            android:id="@+id/ninenine"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
    <EditText
        android:layout_marginTop="25dp"
        android:id="@+id/turns"
        android:hint="Turns"
        android:inputType="number"
        android:paddingTop="10dp"
        android:layout_width="300dp"
        android:layout_height="wrap_content" />
    <EditText
        android:id="@+id/score"
        android:hint="Score"
        android:inputType="number"
        android:layout_width="300dp"
        android:layout_height="wrap_content" />
</LinearLayout>


text:
package server

import (
	"encoding/xml"

	"github.com/NavigatingCancer/mirth-api/mirthagent/errors"
	"github.com/NavigatingCancer/mirth-api/mirthagent/model"
	"github.com/parnurzeal/gorequest"
)

func (Ω *Server) ConfigurationMapSave(config model.ConfigurationMap) (chan bool, chan error) {
	c := make(chan bool, 1)
	ec := make(chan error, 1)
	url := Ω.Session.Paths.Server.ConfigurationMap()

	req := Ω.Session.NewRequest().Put(url)
	req.Type("xml")
	res, _ := xml.Marshal(config)
	req.RawString = string(res)
	req.BounceToRawString = true

	go configurationMapSave(req, c, ec)
	return c, ec
}

func configurationMapSave(req *gorequest.SuperAgent, c chan bool, ec chan error) {
	defer close(c)
	defer close(ec)
	r, _, e := req.EndBytes()
	if errors.ResponseOrStatusErrors(ec, r, e, "Error uploading configuration map") {
		return
	}
	c <- true
}


text:
package gocron

import (
	"github.com/robfig/cron"
	"io"
	"log"
	"os"
	"os/exec"
	"strconv"
	"strings"
	"sync"
	"syscall"
	"time"
)

type LastRun struct {
	Exit_status  int
	Stdout       string
	Stderr       string
	ExitTime     string
	Pid          int
	StartingTime string
}

type CurrentState struct {
	Running  map[string]*LastRun
	Last     *LastRun
	Schedule string
}

var Current_state CurrentState

func copyOutput(out *string, src io.ReadCloser, pid int) {
	buf := make([]byte, 1024)
	for {
		n, err := src.Read(buf)
		if n != 0 {
			s := string(buf[:n])
			*out = *out + s
			log.Printf("%d: %v", pid, s)
		}
		if err != nil {
			break
		}
	}
}

func execute(command string, args []string) {

	cmd := exec.Command(command, args...)

	run := new(LastRun)
	run.StartingTime = time.Now().Format(time.RFC3339)

	stdout, err := cmd.StdoutPipe()
	if err != nil {
		log.Fatal(err)
	}
	stderr, err := cmd.StderrPipe()
	if err != nil {
		log.Fatal(err)
	}
	if err := cmd.Start(); err != nil {
		log.Fatalf("cmd.Start: %v", err)
	}

	run.Pid = cmd.Process.Pid
	Current_state.Running[strconv.Itoa(run.Pid)] = run

	go copyOutput(&run.Stdout, stdout, run.Pid)
	go copyOutput(&run.Stderr, stderr, run.Pid)

	log.Println(run.Pid, "cmd:", command, strings.Join(args, " "))

	if err := cmd.Wait(); err != nil {
		if exiterr, ok := err.(*exec.ExitError); ok {
			// The program has exited with an exit code != 0
			// so set the error code to tremporary value
			run.Exit_status = 127
			if status, ok := exiterr.Sys().(syscall.WaitStatus); ok {
				run.Exit_status = status.ExitStatus()
				log.Printf("%d Exit Status: %d", run.Pid, run.Exit_status)
			}
		} else {
			log.Fatalf("cmd.Wait: %v", err)
		}
	}

	run.ExitTime = time.Now().Format(time.RFC3339)

	delete(Current_state.Running, strconv.Itoa(run.Pid))
	//run.Pid = 0
	Current_state.Last = run
}

func Create(schedule string, command string, args []string) (cr *cron.Cron, wgr *sync.WaitGroup) {

	wg := &sync.WaitGroup{}

	c := cron.New()
	Current_state = CurrentState{map[string]*LastRun{}, &LastRun{}, schedule}
	log.Println("new cron:", schedule)

	c.AddFunc(schedule, func() {
		wg.Add(1)
		execute(command, args)
		wg.Done()
	})

	return c, wg
}

func Start(c *cron.Cron) {
	c.Start()
}

func Stop(c *cron.Cron, wg *sync.WaitGroup) {
	log.Println("Stopping")
	c.Stop()
	log.Println("Waiting")
	wg.Wait()
	log.Println("Exiting")
	os.Exit(0)
}


text:
package iip.serializers;

import java.io.IOException;
import de.iip_ecosphere.platform.transport.serialization.*;
import de.iip_ecosphere.platform.support.iip_aas.json.JsonUtils;
import iip.datatypes.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.JsonProcessingException;

/**
 * JSON transport serializer for RtsaTestInput.
 * Generated by: EASy-Producer.
 */
public class RtsaTestInputSerializer implements Serializer<RtsaTestInput> {

    @Override
    public RtsaTestInput from(byte[] data) throws IOException {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.readValue(data, RtsaTestInputImpl.class);
        } catch (JsonProcessingException e) {
            throw new IOException(e);
        }
    }

    @Override
    public byte[] to(RtsaTestInput source) throws IOException {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.writeValueAsBytes(source);
        } catch (JsonProcessingException e) {
            throw new IOException(e);
        }
    }

    @Override
    public RtsaTestInput clone(RtsaTestInput origin) throws IOException {
        return new RtsaTestInputImpl(origin);
    }

    @Override
    public Class<RtsaTestInput> getType() {
        return RtsaTestInput.class;
    }

}


text:
package uk.ac.ebi.atlas.experimentimport.coexpression;

import au.com.bytecode.opencsv.CSVReader;
import org.apache.solr.util.BoundedTreeSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uk.ac.ebi.atlas.commons.streams.ObjectInputStream;

import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.LinkedList;
import java.util.Queue;
import java.util.TreeSet;

import static com.google.common.base.Preconditions.checkArgument;

public class BaselineCoexpressionProfileInputStream implements ObjectInputStream<BaselineCoexpressionProfile> {
    private static final Logger LOGGER = LoggerFactory.getLogger(BaselineCoexpressionProfileInputStream.class);
    private static final int GENE_ID_COLUMN_INDEX = 0;

    private final CSVReader csvReader;
    private final int maxCoexpressionProfileSize;
    private final String[] geneIDsHeader;
    private final Queue<BaselineCoexpressionProfile> queue = new LinkedList<>();
    private int lineNumber = 0;

    public BaselineCoexpressionProfileInputStream(CSVReader csvReader) {
        this(csvReader, 100);
    }

    BaselineCoexpressionProfileInputStream(CSVReader csvReader, int maxCoexpressionProfileSize) {
        this.maxCoexpressionProfileSize = maxCoexpressionProfileSize;
        this.csvReader = csvReader;
        this.geneIDsHeader = readCsvLine();
        checkArgument(geneIDsHeader != null && geneIDsHeader.length > 1,
                "Could not read in the first line- possibly a malformed or empty file");
        checkArgument(geneIDsHeader[0].length() < 3,
                "The top left corner value should be empty so that the file can have gene names in rows and headers " +
                        "and a matrix shape. Instead found: " + geneIDsHeader[0]);
    }

    @Override
    public void close() throws IOException {
        csvReader.close();
    }

    private String[] readCsvLine() {
        lineNumber++;
        try {
            return csvReader.readNext();
        } catch (IOException e) {
            LOGGER.error("Error while reading line {}", lineNumber);
            throw new UncheckedIOException(e);
        }
    }

    @Override
    public BaselineCoexpressionProfile readNext() {
        if (queue.isEmpty()) {
            BaselineCoexpressionProfile baselineCoexpressionProfile = readNextNonZeroLine();

            if (baselineCoexpressionProfile == null) {
                //EOF
                return null;
            }

            queue.add(baselineCoexpressionProfile);
        }

        return queue.remove();
    }

    private BaselineCoexpressionProfile readNextNonZeroLine() {
        String[] line = readCsvLine();
        if (line == null) {
            // EOF
            return null;
        }

        return new BaselineCoexpressionProfile(
                line[GENE_ID_COLUMN_INDEX], readCoexpressionProfileValues(line, lineNumber - 1));
    }

    private Iterable<BaselineCoexpression> readCoexpressionProfileValues(String[] line, int diagonalElementPosition) {
        checkArgument(line.length == geneIDsHeader.length,
                "Line length differs from the header length, but the file is supposed to be a matrix!");

        TreeSet<BaselineCoexpression> coexpressionProfile = new BoundedTreeSet<>(maxCoexpressionProfileSize);
        for (int i = 0; i < line.length; i++) {
            if (i != GENE_ID_COLUMN_INDEX && i != diagonalElementPosition) {
                String ceGeneID = geneIDsHeader[i];
                coexpressionProfile.add(
                        BaselineCoexpression.create(Double.parseDouble(line[i]), ceGeneID));
            }
        }
        return coexpressionProfile;
    }
}


text:
typedef struct PK11SymKeyStr PK11SymKey;
typedef SECStatus (*PK11_DecryptFunction)(
      PK11SymKey* symKey, CK_MECHANISM_TYPE mechanism, SECItem* param,
      unsigned char* out, unsigned int* outLen, unsigned int maxLen,
      const unsigned char* enc, unsigned encLen);
#endif

namespace net {

// AeadBaseDecrypter is the base class of AEAD QuicDecrypter subclasses.
class NET_EXPORT_PRIVATE AeadBaseDecrypter : public QuicDecrypter {
 public:
#if defined(USE_OPENSSL)
  AeadBaseDecrypter(const EVP_AEAD* aead_alg,
                    size_t key_size,
                    size_t auth_tag_size,
                    size_t nonce_prefix_size);
#else
  AeadBaseDecrypter(CK_MECHANISM_TYPE aead_mechanism,
                    PK11_DecryptFunction pk11_decrypt,
                    size_t key_size,
                    size_t auth_tag_size,
                    size_t nonce_prefix_size);
#endif
  ~AeadBaseDecrypter() override;

  // QuicDecrypter implementation
  bool SetKey(base::StringPiece key) override;
  bool SetNoncePrefix(base::StringPiece nonce_prefix) override;
  bool DecryptPacket(QuicPacketSequenceNumber sequence_number,
                     const base::StringPiece& associated_data,
                     const base::StringPiece& ciphertext,
                     char* output,
                     size_t* output_length,
                     size_t max_output_length) override;
  base::StringPiece GetKey() const override;
  base::StringPiece GetNoncePrefix() const override;

 protected:
  // Make these constants available to the subclasses so that the subclasses
  // can assert at compile time their key_size_ and nonce_prefix_size_ do not
  // exceed the maximum.
  static const size_t kMaxKeySize = 32;
  static const size_t kMaxNoncePrefixSize = 4;

#if !defined(USE_OPENSSL)
  struct AeadParams {
    unsigned int len;
    union {
      CK_GCM_PARAMS gcm_params;
#if !defined(USE_NSS_CERTS)
      // USE_NSS_CERTS implies we are using system NSS rather than our copy of
      // NSS. The system NSS <pkcs11n.h> header doesn't define this type yet.
      CK_NSS_AEAD_PARAMS nss_aead_params;
#endif
    } data;
  };

  virtual void FillAeadParams(base::StringPiece nonce,
                              const base::StringPiece& associated_data,
                              size_t auth_tag_size,
                              AeadParams* aead_params) const = 0;
#endif  // !defined(USE_OPENSSL)

 private:
  bool Decrypt(base::StringPiece nonce,
               const base::StringPiece& associated_data,
               const base::StringPiece& ciphertext,
               uint8* output,
               size_t* output_length,
               size_t max_output_length);

#if defined(USE_OPENSSL)
  const EVP_AEAD* const aead_alg_;
#else
  const CK_MECHANISM_TYPE aead_mechanism_;
  const PK11_DecryptFunction pk11_decrypt_;
#endif
  const size_t key_size_;
  const size_t auth_tag_size_;
  const size_t nonce_prefix_size_;

  // The key.
  unsigned char key_[kMaxKeySize];
  // The nonce prefix.
  unsigned char nonce_prefix_[kMaxNoncePrefixSize];

#if defined(USE_OPENSSL)
  ScopedEVPAEADCtx ctx_;
#endif

  DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter);
};

}  // namespace net

#endif  // NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_


text:
package com.google.android.exoplayer2.demo;

import android.net.Uri;
import android.view.View;

import com.google.android.exoplayer2.SimpleExoPlayer;
import com.google.android.exoplayer2.drm.DrmSessionManager;
import com.google.android.exoplayer2.drm.UnsupportedDrmException;
import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.trackselection.MappingTrackSelector;

import java.util.UUID;

/**
 * Created by ymr on 16/8/12.
 */

public interface IPlayer {
    void setSpeed(float speed);

    void initPlayer(Uri uri);

    boolean hasPlayer();

    void realReleasePlayer();

    void onCreate();

    boolean isMediaNeddSource();

    long getCurrentPosition();

    SimpleExoPlayer getExoPlayer();

    void onError();

    void resetPosition();
}


text:
#import "ViewController.h"
#import <TrustKit/TrustKit.h>
#import <TrustKit/TSKPinningValidator.h>

static NSString *const baseURLYahoo = @"https://www.yahoo.com/";
static NSString *const baseURLDT = @"https://www.datatheorem.com/";

@interface ViewController ()

@property (nonatomic) NSURLSession *session;

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.invalidPinBtn.layer.cornerRadius = 4;
    self.validPinBtn.layer.cornerRadius = 4;

    self.session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration ephemeralSessionConfiguration]
                                                 delegate:self
                                            delegateQueue:NSOperationQueue.mainQueue];
}

#pragma mark TrustKit Pinning Reference

- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler
{
    // Call into TrustKit here to do pinning validation
    if (![TrustKit.sharedInstance.pinningValidator handleChallenge:challenge completionHandler:completionHandler])
    {
        // TrustKit did not handle this challenge: perhaps it was not for server trust
        // or the domain was not pinned. Fall back to the default behavior
        completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);
    }
}

#pragma mark Test Control

- (void)loadUrl:(NSURL *)url
{
    // Show loading view
    [self showActivityIndicatorInCurrentViewController];

    // Load a URL with a good pinning configuration
    NSURLSessionDataTask *task = [self.session dataTaskWithURL:url completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {

        if (error) {
            // Display Error Alert
            [self displayAlertWithTitle:@"Test Result" messageFormat:@"Pinning validation failed for %@\n\n%@", url.absoluteString, error.description];
        }
        else {
            // Display Success Alert
            [self displayAlertWithTitle:@"Test Result" messageFormat:@"Pinning validation succeeded for %@", url.absoluteString];
        }
    }];
    [task resume];
}

- (IBAction)testInvalidPinning:(UIButton *)sender
{
    [self loadUrl:[NSURL URLWithString:baseURLYahoo]];
}

- (IBAction)testValidPinning:(UIButton *)sender
{
    [self loadUrl:[NSURL URLWithString:baseURLDT]];
}

- (void)displayAlertWithTitle:(NSString *)title messageFormat:(NSString *)format, ...
{
    // Hide Activity Indicator
    [self hideActivityIndicator];

    va_list args;
    va_start(args, format);
    NSString *message = [[NSString alloc] initWithFormat:format arguments:args];
    va_end(args);

    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title
                                                                             message:message
                                                                      preferredStyle:UIAlertControllerStyleAlert];
    [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
    [self presentViewController:alertController animated:YES completion:nil];
}

- (void)showActivityIndicatorInCurrentViewController
{
    self.view.userInteractionEnabled = NO;
    [self.activityIndicator startAnimating];
}

- (void)hideActivityIndicator
{
    self.view.userInteractionEnabled = YES;
    [self.activityIndicator stopAnimating];
}

@end


text:
Voľby zo zahraničia — [volby.digital](https://volby.digital/)
============================

Webová aplikácia, ktorá vygeneruje žiadosť pre voľby do Národnej rady SR
alebo o volebný preukaz. Vygenerovanú žiadosť si volič môže stiahnuť a poslať poštou,
alebo ju poslať rovno emailom na príslušný úrad.

Formálne: Z hľadiska zákona o ochrane osobných údajov 122/2013 Z.z. keďže nie sú údaje prenášané na servery prevádzkovateľa aplikácie, nedochádza u neho k "spracúvaniu osobných údajov" v zmysle §4.3.a, nie sú teda naplnené požiadavky §2, a preto sa na neho tento zákon nevzťahuje. Špeciálne odoslanie žiadosti je úkon ktorý vykonáva používateľ aplikácie sám (z vlastnej vôle) a prostriedkami plne pod vlastnou kontrolou (svoj email či pošta), preto prevádzkovateľ aplikácie ani nevykonáva "odovzdávanie osobných údajov tretej strane", t.j. poskytovanie údajov v zmysle §4.3.a.1. Aplikácia je určená pre pomoc zabezpečovania osobnej činnosti fyzickej osoby a v takomto prípade sa v zmysle §3.2.a tento zákon nevťahuje ani na používateľa aplikácie (t.j. používateľ nemusí nič riešiť).

Informácie poskytované prostredníctvom tejto aplikácie týkajúce sa volieb (termíny, možnosti voliča, text žiadosti) sú zísakné z verejne dostupných zdrojov a overené. Správnosť informácií týkajúcich sa adries obcí tiež podľa možností overujeme, ale najmä pri e-mailových adresách malých obcí nevieme garantovať ich funkčnosť. Ak niekto zistí že sú tu nesprávne údaje, vytvorte prosím issue na githube. Napriek snahe autorov aplikácie aby všetko fungovalo ako má, za výsledok neručíme a odporúčame používateľom neodkladať zaslanie žiadosti na poslednú chvíľu, aby aj v prípade nefunkčnosti aplikácie, napr. v dôsledku nekompatibilnej konfigurácie zariadenia používateľa, alebo probléme v komunikácii (napr. zlá emailová adresa úradu) nedošlo k zmeškaniu kritických lehôt.

Žiadosti musia byť DORUČENÉ do 15.1/15.2. Ďalšie informácie sú dostupné napríklad na stránke http://volby.scholtz.sk/, https://platforma.slovensko.digital/t/registracia-na-volby-postou-zo-zahranicia-alebo-volicsky-preukaz/893/34

Oficiálne informácie o hlasovacom preukaze: http://www.minv.sk/?nr16-preukaz

Oficiálne informácie o hlasovaní poštou pre osobu s trvalým pobytom na Slovensku: http://www.minv.sk/?nr16-posta2

Oficiálne informácie o hlasovaní poštou pre osobu bez trvalého pobytu na Slovensku: http://www.minv.sk/?nr16-posta1

---
**Ako si nechať doručiť hlasovacie lístky na adresu v cudzine, ktorú ešte nepoznáte?**

(Kamionisti, ktorý sú mesiac na cestách po EU, alebo ľudia, ktorí adresu v cudzine po 30.1. keď im hlasovacie lístky majú prísť v čase keď majú o ne požiadať, teda do 15.1. ešte nepoznajú)
V tomto prípade môžete požiadať o poslatie zásielky na adresu pošty v meste, kde budete v danú dobu. To znamená, že si zistíte iba adresu pošty v meste, v ktorom budete v čase doručenia hlasovacích lístkov. Ako adresu miesta pobytu v cudzine vo formulári zadáte namiesto Ulice a čísla slová "Poste Restante" - http://i.imgur.com/REVhJsM.jpg Obec Vám to pošle na adresu:
```
Meno Priezvisko
Poste Restante
PSC MESTO
KRAJINA
```
Zásielka sa Vám vydá na základe dokladu totožnosti, kde sa overuje Vaše meno.
**Zásielka sa drží na pošte doručenia 2 týždne.** Preto ak nebudete v danom meste celú dobu v rámci ktorej Vám môžu prísť hlasovacie lístky, bude dobré sa informovať úradníkov kam ste zasielali žiadosť o lístky kedy Vám to pošlú. Nedá sa na to spoliehať, pretože majú iba povinnosť Vám to poslať v termíne do 35 dní pred voľbami a nie Vás o dátume poslania informovať. Prípadne predom dohodnúť dlhšiu dobu dodania. V možnostiach pošty je "Predĺženie odbernej lehoty, Časové doposielanie, Splnomocnenie, Doručenie na inú adresu na žiadosť adresáta" ( http://www.posta.sk/sluzby/doporucena-zasielka-svet a Infolinke pošty 0800 122 413 )
Zásielky sa budú posielať doporučene. Do niektorych krajín to nie je možné, preto ak by bol problém, treba sa dohodnúť s obcou na nedoporučenej zásielke.

*Toto platí iba pre tých, ktorí nepoznajú adresu svojho pobytu v cudzine v mesiaci február, keď prídu hlasovacie lístky*

---
**Testovacia stránka:**
https://volby.digital/test/

**Nápad vznikol na:**
[platforma.slovensko.digital](https://platforma.slovensko.digital/)

**Ohlasy v médiách**

21.12. [Info.sk: Aké majú možnosti Slováci v zahraničí?](http://www.info.sk/sprava/81039/volby-2016-ake-maju-moznosti-slovaci-v-zahranici/)

20.12. [TV Markiza](http://videoarchiv.markiza.sk/video/televizne-noviny/televizne-noviny/39681_televizne-noviny) (9. reportáž "Zo zahraničia sa volí skôr")

19.12. [TV RTVS](http://www.rtvs.sk/televizia/archiv/7600/82947) (Čas 26:20-29:05)

18.12. [BB Online: Voľby do NRSR: Desiatky Bystričanov kandidujú do národného parlamentu](http://bbonline.sk/volby-do-nrsr-desiatky-bystricanov-kandiduju-do-narodneho-parlamentu/)

17.12. [StartitUp: Slovensko.digital zvládla za niekoľko dní to, čo štát nedokázal roky!](http://www.startitup.sk/slovakia-digital-zvladla-za-niekolko-dni-to-co-stat-nedokazal-roky/)

13.12. [DennikN:V cudzine sú desaťtisíce hlasov, politici na ne nemyslia, mobilizujú aktivisti](https://dennikn.sk/319788/slovakov-zo-zahranicia-urnam-nemobilizuje-stat-aktivisti/)

**Zoznam podporovaných/otestovaných zariadení:**

* Windows 10, Firefox 42.0 - Plná funkcionalita
* Windows 10, Chrome 47.0.2526.80 - Plná funkcionalita
* Windows 10, Internet explorer 11.0.26 - Funguje, ale náhľad PDF nefunguje, ale ponúka PDF na stiahnutie
* Windows 10, Edge 20.10260.16384.0 - Funguje, ale náhľad PDF nefunguje, ale ponúka PDF na stiahnutie
* Windows 7, Chrome 46.0.2490.86m - Plná funkcionalita
* Windows 7, Internet explorer 11.0.9600 - Funguje, ale náhľad PDF nefunguje, ale ponúka PDF na stiahnutie
* Windows 7, Firefox 42.0 - Plná funkcionalita
* Android 5.1.1, Chrome 47.0.2526.83 - Funguje, ale preview a finálnu verziu priamo sťahuje
* Android 4.1, Opera - Nefunguje
* Android 4.1, Sony Xperia E 4.1 (Vstavaý prehliadač) - Nefunguje
* Android 4.1, Chrome - Náhľad nefunguje, súbory náhľadu a finálnej žiadosti sú automaticky stiahnuté
* Mac OS X El Capitan v10.11.1, Chrome 47.0.2526.106 (64-bit) - Plná funkcionalita
* Mac OS X El Capitan v10.11.1, Safari Version 9.0.1 - Plná funkcionalita
* Mac OS X El Capitan v10.11.1, Firefox 43.0 - Plná funkcionalita
* iOS 9.2 (iPad),Mobile Safari 9.0 - Plná funkcionalita
* Ubuntu 14.10, Chrome 46.0.2490.86 - Podpisovanie je nefunkčné
* Ubuntu 14.10, Firefox 42.0 - Plná funkcionalita
* FreeBSD 10.2-RELEASE-p4, Firefox 41.0.2 - Plná funkcionalita

---

**Changelog:**
  1.0-stable 23.12.2015
	Aktualizácia údajov potvrdených obcami
	Výber kraja okresu a obce podľa PSČ
	Umiestnenie najpočetnejšieho kraja, okresu a obce na vrch výberu a ostatné zoradené podľa abecedy
	Podpora rôznych emailov pre odosielanie žiadostí o hlasovanie poštou a žiadostí o hlasovací preukaz

  1.0-beta 11.12.2015
	Formulár žiadosti o hlasovací preukaz poštou bol skontrolovaný
	Formulár žiadosti o hlasovací preukaz pre splnomocnenca bol skontrolovaný
	Formulár žiadosti o hlasovanie poštou s trvalým pobytom na Slovensku bol skontrolovaný
	Formulár žiadosti o hlasovanie poštou bez trvalého pobytu na Slovensku bol skontrolovaný
	Zmena štýlu
	Odstránená funkcionalita vkladania foto - cez mailto nie je možné odoslať prílohy, iba vytvoriť email a prílohy manuálne pripnúť

  0.4 - Všetky možnosti pokryte
  0.3 - Podpis a fotografia je vkladaná do PDF
  0.2 - Proof of concept - signaturePad
  0.1 - Proof of concept - Generovanie žiadosť


text:
package de.jgholland.directorymesh.operationhandlers;

import de.jgholland.directorymesh.operations.FileOperation;

import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;

/**
 * Created by john on 2015-10-26.
 */
public class DirectoryMesh {
    final ComparisonRunner comparisonRunner;
    final OperationRunner operationRunner;
    Path masterPath;
    Path dataPath;

    public DirectoryMesh(String masterPath, String dataPath, boolean quiet, boolean dryRun) {
        this.comparisonRunner = new ComparisonRunner(masterPath, dataPath);
        this.operationRunner = new OperationRunner(quiet, dryRun);
        this.masterPath = Paths.get(masterPath);
        this.dataPath = Paths.get(dataPath);
    }

    public void linkDataFilesIntoMaster() {
        fileTreeWalkerErrorWrapper(dataPath);
    }

    public void pruneMasterDirectoryBackLinks() {
        fileTreeWalkerErrorWrapper(masterPath);
    }

    private void fileTreeWalkerErrorWrapper(Path path) {
        try {
            walkTheFileTreeCarryingOutOperationsAtEachRelevantFile(path);
        } catch (IOException e) {
            System.err.printf("Directory walk failed: %s%n", e);
        }
    }

    void walkTheFileTreeCarryingOutOperationsAtEachRelevantFile(Path pathToWalk) throws IOException {

        Files.walkFileTree(
                pathToWalk,
                new SimpleFileVisitor<Path>() {

                    @Override
                    public FileVisitResult preVisitDirectory(Path filePath, BasicFileAttributes attrs) {
                        return getFileVisitResult(filePath);
                    }

                    @Override
                    public FileVisitResult visitFile(Path filePath, BasicFileAttributes attrs) {
                        return getFileVisitResult(filePath);

                    }

                    private FileVisitResult getFileVisitResult(Path filePath) {
                        Path relativeDataPath = pathToWalk.relativize(filePath);
                        FileOperation individualOperation = comparisonRunner.pickOperation(relativeDataPath);
                        operationRunner.processFileOperation(individualOperation);
                        FileVisitResult fileVisitResult = individualOperation.getFileVisitResult();
                        return fileVisitResult;
                    }
                });
    }
}


text:
##Code

----

<ClassDocStr>

----

```python
# -*- coding: utf-8 -*-
"""

<DefineSource>
@Date : Fri Nov 14 13:20:38 2014 \n
@Author : Erwan Ledoux \n\n
</DefineSource>

A Coupler

"""

#<DefineAugmentation>
import ShareYourSystem as SYS
BaseModuleStr="ShareYourSystem.Standards.Noders.Attentioner"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer"
SYS.setSubModule(globals())
#</DefineAugmentation>

#<ImportSpecificModules>

from ShareYourSystem.Standards.Itemizers import Pather
from ShareYourSystem.Standards.Noders import Noder
#</ImportSpecificModules>

#<DefineClass>
@DecorationClass()
class CouplerClass(BaseClass):

	#Definition
	RepresentingKeyStrsList=[
								'CouplingNodeStr',
								'CouplingGetStr',
								'CoupledGetStr'
							]

	def default_init(self,
						_CouplingNodeStr="",
						_CouplingGetStr="",
						_CoupledGetStr="",
						**_KwargVariablesDict
					):

		#Call the parent __init__ method
		BaseClass.__init__(self,**_KwargVariablesDict)

	def do_couple(self):

		#debug
		'''
		self.debug(('self.',self,[
									'CouplingNodeStr',
									'CouplingGetStr',
									'PointingBackBool'
								]))
		'''

		#set
		self.CoupledGetStr=Noder.NodingPrefixGetStr+self.CouplingNodeStr+Noder.NodingSuffixGetStr
		self.PointingSetPathStr=self.CoupledGetStr+self.CouplingGetStr.split(
						Noder.NodingSuffixGetStr
					)[-1]

		#debug
		'''
		self.debug(('self.',self,['CoupledGetStr','PointingSetPathStr']))
		'''

		#point
		self.point(
					self.CouplingGetStr,
					self.PointingSetPathStr
				)

		#Return self
		#return self

#</DefineClass>

```

View the Coupler sources on Github


text:
from typing import TYPE_CHECKING, Any, Callable, Optional, Tuple, Union

import rich.prompt

if TYPE_CHECKING:
    from rich.console import Console as RichConsole

    from . import RichText

TextType = Union["RichText", str]

class InvalidResponse(rich.prompt.InvalidResponse):
    pass

class RichInputMixin:
    """Prevents exc message from printing in the same line on Ctrl + D/C."""

    @classmethod
    def get_input(cls, console: "RichConsole", *args, **kwargs) -> str:
        try:
            return super().get_input(  # type: ignore[misc]
                console, *args, **kwargs
            )
        except (KeyboardInterrupt, EOFError):
            console.print()
            raise

class Prompt(RichInputMixin, rich.prompt.Prompt):
    """Extended version supports custom validations and omission of values."""

    omit_value: str = "n"

    def __init__(
        self,
        *args: Any,
        allow_omission: bool = False,
        **kwargs: Any,
    ) -> None:
        super().__init__(*args, **kwargs)
        self.allow_omission: bool = allow_omission

    @classmethod
    def ask(  # pylint: disable=arguments-differ
        cls,
        *args: Any,
        allow_omission: bool = False,
        validator: Optional[
            Callable[[str], Union[str, Tuple[str, str]]]
        ] = None,
        **kwargs: Any,
    ) -> str:
        """Extended to pass validator argument.

        Args:
            allow_omission: Allows omitting prompts
            validator: Validates entered value through prompts
              validator can raise an InvalidResponseError, after which
              it'll reprompt user. It can also return:
              - processed/modified value that will be return to the user.
              - tuple of processed value and a message to show to the user.
              Note that the validator is always required to return a value,
              even if it does not process/modify it.
        """
        default = kwargs.pop("default", None)
        stream = kwargs.pop("stream", None)

        return cls(*args, allow_omission=allow_omission, **kwargs)(
            default=default if default is not None else ...,
            stream=stream,
            validator=validator,
        )

    @classmethod
    def prompt_(
        cls,
        *args: Any,
        allow_omission: bool = False,
        validator: Optional[
            Callable[[str], Union[str, Tuple[str, str]]]
        ] = None,
        **kwargs: Any,
    ) -> Optional[str]:
        """Extends `.ask()` to allow skipping/returning None type."""
        value = cls.ask(
            *args, allow_omission=allow_omission, validator=validator, **kwargs
        )
        if allow_omission and value == cls.omit_value:
            return None
        return value

    def __call__(
        self,
        *args: Any,
        validator: Optional[
            Callable[[str], Union[str, Tuple[str, str]]]
        ] = None,
        **kwargs: Any,
    ) -> str:
        """Supports validating response and show warning message."""

        # We cannot put this in `process_response` as it does not validate
        # `default` values.
        while True:
            value = super().__call__(*args, **kwargs)
            if validator is None or (
                self.allow_omission and value == self.omit_value
            ):
                return value

            try:
                validated = validator(value)
            except InvalidResponse as exc:
                self.on_validate_error(value, exc)
                continue
            else:
                if isinstance(validated, tuple):
                    value, message = validated
                else:
                    value, message = validated, ""
                if message:
                    self.console.print(message)
            return value

    def process_response(self, value: str) -> str:
        """Disallow empty values."""
        ret = super().process_response(value)
        if not ret:
            raise InvalidResponse(
                "[prompt.invalid]Response required. Please try again."
            )
        return ret

    def render_default(self, default):
        from rich.text import Text

        return Text(f"{default!s}", "green")

    def make_prompt(self, default):
        prompt = self.prompt.copy()
        prompt.end = ""

        parts = []
        if (
            default is not ...
            and self.show_default
            and isinstance(default, (str, self.response_type))
        ):
            _default = self.render_default(default)
            parts.append(_default)

        if self.allow_omission:
            from rich.text import Text

            if parts:
                parts.append(", ")
            parts.append(Text(f"{self.omit_value} to omit", style="italic"))

        if parts:
            parts = [" [", *parts, "]"]

        for part in parts:
            prompt.append(part)
        prompt.append(self.prompt_suffix)
        return prompt

class Confirm(RichInputMixin, rich.prompt.Confirm):
    def make_prompt(self, default):
        prompt = self.prompt.copy()
        prompt.end = ""

        prompt.append(" [")
        yes, no = self.choices
        for idx, (val, choice) in enumerate(((True, yes), (False, no))):
            if idx:
                prompt.append("/")
            if val == default:
                prompt.append(choice.upper(), "green")
            else:
                prompt.append(choice)
        prompt.append("]")
        prompt.append(self.prompt_suffix)
        return prompt


text:
package marc.henrard.book.algorithmicdifferentiation.tape;

import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
import marc.henrard.book.algorithmicdifferentiation.mathad.MathAad;
import marc.henrard.book.algorithmicdifferentiation.tape.TapeAad;
import marc.henrard.book.algorithmicdifferentiation.tape.TapeEntryAad;
import marc.henrard.book.algorithmicdifferentiation.tape.TapeUtils;
import marc.henrard.book.algorithmicdifferentiation.type.DoubleAad;
import marc.henrard.book.algorithmicdifferentiation.type.OperationTypeAad;

import org.testng.annotations.Test;

/**
 * Tests related to {@link TapeUtils} and {@link DoubleAad}.
 */
public class TapeUtilsTest {

  /* The tolerance for the comparison of operations on doubles. */
  static private final double TOLERANCE_DOUBLE = 1.0E-10;

  @Test
  public void interpretInput() {
    TapeAad tape = new TapeAad();
    double value = 123.4d;
    TapeEntryAad inEntry = new TapeEntryAad(OperationTypeAad.INPUT, value);
    tape.addEntry(inEntry);
    TapeUtils.interpret(tape);
    assertTrue("TapeUtils: interpret - INPUT", tape.size()==1);
    assertTrue("TapeUtils: interpret - INPUT", tape.getEntry(0).getOperationType() == OperationTypeAad.INPUT);
    assertEquals("TapeUtils: interpret - INPUT", tape.getEntry(0).getValue(), value, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - INPUT", tape.getEntry(0).getValueBar(), 1.0d, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - INPUT", tape.getEntry(0).getIndexArg1(), -1);
    assertEquals("TapeUtils: interpret - INPUT", tape.getEntry(0).getIndexArg2(), -1);
  }

  @Test
  public void interpretAddition1() {
    TapeAad tape = new TapeAad();
    double value = 123.4d;
    TapeEntryAad inEntry = new TapeEntryAad(OperationTypeAad.INPUT, value);
    int indexIn = tape.addEntry(inEntry);
    DoubleAad in = new DoubleAad(value, indexIn);
    DoubleAad add1 = MathAad.plus(in, 1.0d, tape);
    TapeUtils.interpret(tape);
    assertTrue("TapeUtils: interpret - ADDITION1", tape.size()==2);
    assertTrue("TapeUtils: interpret - ADDITION1", tape.getEntry(0).getOperationType() == OperationTypeAad.INPUT);
    assertTrue("TapeUtils: interpret - ADDITION1", tape.getEntry(1).getOperationType() == OperationTypeAad.ADDITION1);
    assertEquals("TapeUtils: interpret - ADDITION1", tape.getEntry(0).getValue(), value, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION1", tape.getEntry(1).getValue(), value+1.0d, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION1", tape.getEntry(1).getValue(), add1.value(), TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION1", tape.getEntry(0).getValueBar(), 1.0d, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION1", tape.getEntry(1).getValueBar(), 1.0d, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION1", tape.getEntry(1).getIndexArg1(), indexIn);
    assertEquals("TapeUtils: interpret - ADDITION1", tape.getEntry(1).getIndexArg2(), -1);
  }

  @Test
  public void interpretAddition() {
    TapeAad tape = new TapeAad();
    double value1 = 123.4d;
    double value2 = 567.8d;
    TapeEntryAad in1Entry = new TapeEntryAad(OperationTypeAad.INPUT, value1);
    int index1In = tape.addEntry(in1Entry);
    TapeEntryAad in2Entry = new TapeEntryAad(OperationTypeAad.INPUT, value2);
    int index2In = tape.addEntry(in2Entry);
    DoubleAad in1 = new DoubleAad(value1, index1In);
    DoubleAad in2 = new DoubleAad(value2, index2In);
    DoubleAad add = MathAad.plus(in1, in2, tape);
    TapeUtils.interpret(tape);
    assertTrue("TapeUtils: interpret - ADDITION", tape.size()==3);
    assertTrue("TapeUtils: interpret - ADDITION", tape.getEntry(0).getOperationType() == OperationTypeAad.INPUT);
    assertTrue("TapeUtils: interpret - ADDITION", tape.getEntry(1).getOperationType() == OperationTypeAad.INPUT);
    assertTrue("TapeUtils: interpret - ADDITION", tape.getEntry(2).getOperationType() == OperationTypeAad.ADDITION);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(0).getValue(), value1, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(1).getValue(), value2, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(2).getValue(), value1+value2, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(2).getValue(), add.value(), TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(0).getValueBar(), 1.0d, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(1).getValueBar(), 1.0d, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(2).getValueBar(), 1.0d, TOLERANCE_DOUBLE);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(2).getIndexArg1(), index1In);
    assertEquals("TapeUtils: interpret - ADDITION", tape.getEntry(2).getIndexArg2(), index2In);
  }

  //TODO: add tests for other operations

}


text:
package com.wujay.fund.common;

public class Constants {

	//*/ 手势密码点的状态
	public static final int POINT_STATE_NORMAL = 0; // 正常状态

	public static final int POINT_STATE_SELECTED = 1; // 按下状态

	public static final int POINT_STATE_WRONG = 2; // 错误状态
	//*/
}


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

<title>BlockList (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV CLASS

NEXT CLASS

FRAMES

NO FRAMES

All Classes

SUMMARY:

NESTED |

FIELD |

CONSTR |

METHOD

DETAIL:

FIELD |

CONSTR |

METHOD

org.apache.poi.poifs.storage

Interface BlockList

All Known Implementing Classes:

RawDataBlockList, SmallDocumentBlockList

public interface BlockList

Interface for lists of blocks that are mapped by block allocation
 tables

Author:

Marc Johnson (mjohnson at apache dot org

Method Summary

Methods

Modifier and Type
Method and Description

int
blockCount()

ListManagedBlock[]
fetchBlocks(int startBlock,
           int headerPropertiesStartBlock)

get the blocks making up a particular stream in the list.

ListManagedBlock
remove(int index)

remove and return the specified block from the list

void
setBAT(BlockAllocationTableReader bat)

set the associated BlockAllocationTable

void
zap(int index)

remove the specified block from the list

Method Detail

zap

void zap(int index)

remove the specified block from the list

Parameters:

index - the index of the specified block; if the index is
              out of range, that's ok

remove

ListManagedBlock remove(int index)
                        throws java.io.IOException

remove and return the specified block from the list

Parameters:

index - the index of the specified block

Returns:

the specified block

Throws:

java.io.IOException - if the index is out of range or has
            already been removed

fetchBlocks

ListManagedBlock[] fetchBlocks(int startBlock,
                             int headerPropertiesStartBlock)
                               throws java.io.IOException

get the blocks making up a particular stream in the list. The
 blocks are removed from the list.

Parameters:

startBlock - the index of the first block in the stream

headerPropertiesStartBlock - the index of the first header block in the stream

Returns:

the stream as an array of correctly ordered blocks

Throws:

java.io.IOException - if blocks are missing

setBAT

void setBAT(BlockAllocationTableReader bat)
            throws java.io.IOException

set the associated BlockAllocationTable

Parameters:

bat - the associated BlockAllocationTable

Throws:

java.io.IOException

blockCount

int blockCount()

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV CLASS

NEXT CLASS

FRAMES

NO FRAMES

All Classes

SUMMARY:

NESTED |

FIELD |

CONSTR |

METHOD

DETAIL:

FIELD |

CONSTR |

METHOD

                Copyright 2014 The Apache Software Foundation or
        its licensors, as applicable.