text:
"""Sequence-to-Sequence RNNs and Beyond.

Paper: https://arxiv.org/abs/1602.06023
"""

import numpy as np
import tensorflow as tf
import library

class Model(object):
  """Wrapper for Tensorflow model graph for text sum vectors."""

  def __init__(self, config, mode, num_gpus=0):
    self._config = config
    self._mode = mode
    self._input_vocab = config.input_vocab
    self._output_vocab = config.output_vocab
    self._num_gpus = num_gpus
    self._cur_gpu = 0

  def run_train_step(self, sess, encoder_inputs, decoder_inputs, targets,
                     encoder_len, decoder_len, loss_weights):
    to_return = [self._train_op, self._summaries, self._loss, self.global_step]
    return sess.run(
        to_return,
        feed_dict={
            self._encoder_inputs: encoder_inputs,
            self._decoder_inputs: decoder_inputs,
            self._targets: targets,
            self._encoder_len: encoder_len,
            self._decoder_len: decoder_len,
            self._loss_weights: loss_weights
        })

  def run_eval_step(self, sess, encoder_inputs, decoder_inputs, targets,
                    encoder_len, decoder_len, loss_weights):
    to_return = [self._summaries, self._loss, self.global_step]
    return sess.run(
        to_return,
        feed_dict={
            self._encoder_inputs: encoder_inputs,
            self._decoder_inputs: decoder_inputs,
            self._targets: targets,
            self._encoder_len: encoder_len,
            self._decoder_len: decoder_len,
            self._loss_weights: loss_weights
        })

  def _next_device(self):
    """Round robin the gpu device. (Reserve last gpu for expensive op)."""
    if self._num_gpus == 0:
      return ''
    dev = '/gpu:%d' % self._cur_gpu
    self._cur_gpu = (self._cur_gpu + 1) % (self._num_gpus - 1)
    return dev

  def _get_gpu(self, gpu_id):
    if self._num_gpus <= 0 or gpu_id >= self._num_gpus:
      return ''
    return '/gpu:%d' % gpu_id

  def _add_placeholders(self):
    """Inputs to be fed to the graph."""
    config = self._config

    # Only need to restore the 1st step and reuse it since
    # we keep and feed in state for each step's output.
    if self._mode == 'decode':
      max_output_len = 1
    else:
      max_output_len = config.max_output_len

    self._encoder_inputs = tf.placeholder(
        tf.int32, [config.batch_size, config.max_input_len],
        name='encoder_inputs')
    self._decoder_inputs = tf.placeholder(
        tf.int32, [config.batch_size, max_output_len], name='decoder_inputs')
    self._targets = tf.placeholder(
        tf.int32, [config.batch_size, max_output_len], name='targets')
    self._encoder_len = tf.placeholder(
        tf.int32, [config.batch_size], name='encoder_len')
    self._decoder_len = tf.placeholder(
        tf.int32, [config.batch_size], name='decoder_len')
    self._loss_weights = tf.placeholder(
        tf.float32, [config.batch_size, max_output_len], name='loss_weights')

  def _add_seq2seq(self):
    """Graph for the model."""
    config = self._config

    with tf.variable_scope('text2text'):
      encoder_inputs = tf.unstack(self._encoder_inputs, axis=1)
      decoder_inputs = tf.unstack(self._decoder_inputs, axis=1)
      targets = tf.unstack(self._targets, axis=1)
      loss_weights = tf.unstack(self._loss_weights, axis=1)
      encoder_len = self._encoder_len

      with tf.variable_scope('embedding'), tf.device('/cpu:0'):
        input_vsize = self._input_vocab.NumIds()
        input_embedding = tf.get_variable(
            'embedding', [input_vsize, config.emb_dim],
            dtype=tf.float32,
            initializer=tf.truncated_normal_initializer(stddev=1e-4))
        # Embedding shared by the input and outputs.
        if self._output_vocab == self._input_vocab:
          output_embedding = input_embedding
          output_vsize = input_vsize
          tf.logging.info('Using same matrix for input and output. Size: %d',
                          output_vsize)
        # Different embedding matrix for input and output
        # Use same vocab file twice if you want this but have only one vocab
        else:
          output_vsize = self._output_vocab.NumIds()
          output_embedding = tf.get_variable(
              'output_embedding', [output_vsize, config.emb_dim],
              dtype=tf.float32,
              initializer=tf.truncated_normal_initializer(stddev=1e-4))
          tf.logging.info(
              'Using different matrices for input and output. Sizes: %d and %d',
              input_vsize, output_vsize)
        emb_encoder_inputs = [
            tf.nn.embedding_lookup(input_embedding, x) for x in encoder_inputs
        ]
        emb_decoder_inputs = [
            tf.nn.embedding_lookup(output_embedding, x) for x in decoder_inputs
        ]

      for layer_i in range(config.enc_layers):
        with tf.variable_scope('encoder%d' %
                               layer_i), tf.device(self._next_device()):
          cell_fw = tf.contrib.rnn.LSTMCell(
              config.num_hidden,
              initializer=tf.random_uniform_initializer(
                  -0.1, 0.1, seed=config.random_seed + 2),
              state_is_tuple=False)
          cell_bw = tf.contrib.rnn.LSTMCell(
              config.num_hidden,
              initializer=tf.random_uniform_initializer(
                  -0.1, 0.1, seed=config.random_seed + 3),
              state_is_tuple=False)
          (emb_encoder_inputs, fw_state, _) = library.bidirectional_rnn(
              cell_fw,
              cell_bw,
              emb_encoder_inputs,
              dtype=tf.float32,
              sequence_length=encoder_len)
      encoder_outputs = emb_encoder_inputs

      with tf.variable_scope('output_projection'):
        output_bias = tf.get_variable(
            'output_bias', [output_vsize],
            dtype=tf.float32,
            initializer=tf.truncated_normal_initializer(stddev=1e-4))

      with tf.variable_scope('decoder'), tf.device(self._next_device()):
        cell = tf.contrib.rnn.LSTMCell(
            config.num_hidden,
            initializer=tf.random_uniform_initializer(
                -0.1, 0.1, seed=config.random_seed + 5),
            state_is_tuple=False)

        encoder_outputs = [
            tf.reshape(x, [config.batch_size, 1, 2 * config.num_hidden])
            for x in encoder_outputs
        ]
        self._enc_top_states = tf.concat(encoder_outputs, 1)
        self._dec_in_state = fw_state

        # Always use initial state attention because we need it for beam search
        initial_state_attention = True
        decoder_outputs, self._dec_out_state = (
            tf.contrib.legacy_seq2seq.attention_decoder(
                emb_decoder_inputs,
                self._dec_in_state,
                self._enc_top_states,
                cell,
                output_size=config.emb_dim,
                num_heads=config.num_heads,
                loop_function=None,
                initial_state_attention=initial_state_attention))

      with tf.variable_scope('output'), tf.device(self._next_device()):
        model_outputs = []
        for i in range(len(decoder_outputs)):
          if i > 0:
            tf.get_variable_scope().reuse_variables()
          model_outputs.append(
              tf.nn.xw_plus_b(decoder_outputs[i],
                              tf.transpose(output_embedding), output_bias))

      if self._mode == 'decode':
        with tf.variable_scope('decode_output'), tf.device('/cpu:0'):
          best_outputs = [tf.argmax(x, 1) for x in model_outputs]
          self._outputs = tf.concat(
              [tf.reshape(x, [config.batch_size, 1]) for x in best_outputs], 1)
          self._topk_log_probs, self._topk_ids = tf.nn.top_k(
              tf.log(tf.nn.softmax(model_outputs[-1])), config.batch_size * 2)

      with tf.variable_scope('loss'), tf.device(self._next_device()):

        def sampled_loss_func(labels, inputs):
          with tf.device('/cpu:0'):  # Try gpu.
            labels = tf.reshape(labels, [-1, 1])
            return tf.nn.sampled_softmax_loss(
                weights=output_embedding,
                biases=output_bias,
                labels=labels,
                inputs=inputs,
                num_sampled=config.num_softmax_samples,
                num_classes=output_vsize)

        if config.num_softmax_samples != 0 and self._mode == 'train':
          self._loss = library.sampled_sequence_loss(
              decoder_outputs, targets, loss_weights, sampled_loss_func)
        else:
          self._loss = tf.contrib.legacy_seq2seq.sequence_loss(
              model_outputs, targets, loss_weights)

    tf.summary.scalar('loss/min12', tf.minimum(12.0, self._loss))
    tf.summary.scalar('loss/unclamped', self._loss)

  def _add_train_op(self):
    """Sets self._train_op, op to run for training."""
    config = self._config

    tvars = tf.trainable_variables()
    with tf.device(self._get_gpu(self._num_gpus - 1)):
      grads, global_norm = tf.clip_by_global_norm(
          tf.gradients(self._loss, tvars), config.max_grad_norm)
    tf.summary.scalar('global_norm', global_norm)

    lr_rate = tf.maximum(
        config.min_lr,  # min_lr_rate.
        tf.train.exponential_decay(config.lr, self.global_step, 30000, 0.98))

    if config.optimizer == 'adam':
      optimizer = tf.train.AdamOptimizer(lr_rate, epsilon=config.adam_epsilon)
    else:
      assert config.optimizer == 'gradient_descent', config.optimizer
      optimizer = tf.train.GradientDescentOptimizer(lr_rate)

    tf.summary.scalar('learning_rate', lr_rate)
    self._train_op = optimizer.apply_gradients(
        zip(grads, tvars), global_step=self.global_step, name='train_step')

  def encode_top_state(self, sess, enc_inputs, enc_len):
    """Return the top states from encoder for decoder.

    Args:
      sess: tensorflow session.
      enc_inputs: encoder inputs of shape [batch_size, max_input_len].
      enc_len: encoder input length of shape [batch_size]
    Returns:
      enc_top_states: The top level encoder states.
      dec_in_state: The decoder layer initial state.
    """
    results = sess.run(
        [self._enc_top_states, self._dec_in_state],
        feed_dict={
            self._encoder_inputs: enc_inputs,
            self._encoder_len: enc_len
        })
    return results[0], results[1][0]

  def decode_topk(self, sess, latest_tokens, enc_top_states, dec_init_states,
                  _):
    """Return the topK results and new decoder states."""
    feed = {
        self._enc_top_states: enc_top_states,
        self._dec_in_state: np.squeeze(np.array(dec_init_states)),
        self._decoder_inputs: np.transpose(np.array([latest_tokens])),
        self._decoder_len: np.ones([len(dec_init_states)], np.int32)
    }

    results = sess.run(
        [self._topk_ids, self._topk_log_probs, self._dec_out_state],
        feed_dict=feed)

    ids, probs, states = results[0], results[1], results[2]
    new_states = [s for s in states]
    return ids, probs, new_states

  def build_graph(self):
    self._add_placeholders()
    self._add_seq2seq()
    self.global_step = tf.Variable(0, name='global_step', trainable=False)
    if self._mode == 'train':
      self._add_train_op()
    self._summaries = tf.summary.merge_all()


text:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Framework.WpfInterop;
using System.IO;
using System.Linq;

namespace WpfTest.Scenes
{
    /// <summary>
    /// A demo scene that renders a sprite at scale
    /// </summary>
    public class SpriteScene : WpfGame
    {
        private SpriteBatch _spriteBatch;
        private Texture2D _atlas;
        private int _index;
        private int _frames, _targetFrames = 10;
        private const int _textureSize = 48;

        protected override void Initialize()
        {
            new WpfGraphicsDeviceService(this);
            base.Initialize();
            _spriteBatch = new SpriteBatch(GraphicsDevice);
        }

        protected override void LoadContent()
        {
            base.LoadContent();
            using (var file = File.OpenRead("Content/mech.png"))
                _atlas = Texture2D.FromStream(GraphicsDevice, file);
        }

        protected override void Update(GameTime gameTime)
        {
            if (++_frames >= _targetFrames)
            {
                _frames -= _targetFrames;
                _index = (_index + 1) % 3;
            }
            base.Update(gameTime);
        }

        protected override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
            GraphicsDevice.Clear(Color.CornflowerBlue);
            for (int i = 0; i < 6; i++)
            {
                var scale = i + 1;
                var offsetX = _textureSize * Enumerable.Range(1, i).Sum();
                Draw(offsetX, 0, SamplerState.PointClamp, scale);
                Draw(offsetX, 36 * scale, SamplerState.LinearClamp, scale);
                Draw(offsetX, 36 * 2 * scale, SamplerState.AnisotropicClamp, scale);
            }
        }

        private void Draw(int x, int y, SamplerState sampler, float scale)
        {
            _spriteBatch.Begin(samplerState: sampler);
            _spriteBatch.Draw(_atlas, new Rectangle(x, y, (int)(_textureSize * scale), (int)(_textureSize * scale)), new Rectangle(_index * _textureSize, 0, _textureSize, _textureSize), Color.White);
            _spriteBatch.End();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.openmhealth.shimmer.common.service;

import org.openmhealth.shimmer.common.domain.DataPointSearchCriteria;
import org.openmhealth.shimmer.common.domain.DataPointSearchResult;

/**
 * A service used to search for data points.
 *
 * @author Emerson Farrugia
 */
public interface DataPointSearchService {

    /**
     * @param criteria the criteria to use to filter the search
     * @return the result of the search
     */
    DataPointSearchResult findDataPoints(DataPointSearchCriteria criteria);
}


text:
FOUNDATION_EXPORT double Pods_ChocolateTestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_ChocolateTestsVersionString[];


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Web.Models;
using Web.Models.HomeViewModels;
using Web.Models.Links;
using Web.Services;

namespace Web.Controllers
{
    public class HomeController : Controller
    {
        private readonly ILinkService _links;
        private readonly ICommentService _comments;

        public HomeController(ILinkService links, ICommentService comments)
        {
            _links = links;
            _comments = comments;
        }

        public async Task<IActionResult> Index(CancellationToken ct)
        {
            List<Link> links;
            try
            {
                links = await _links.Get(ct).ConfigureAwait(false);
            }
            catch
            {
                links = new List<Link>();
            }
            var viewModel = new HomeViewModel
            {
                Links = links
            };
            return View(viewModel);
        }

        public IActionResult About()
        {
            ViewData["Message"] = "Your application description page.";

            return View();
        }

        public IActionResult Contact()
        {
            ViewData["Message"] = "Your contact page.";

            return View();
        }

        public IActionResult Error()
        {
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
        }
    }
}


text:
var gulp = require('gulp');
var to5 = require('gulp-6to5');
var concat = require('gulp-concat');
var plumber = require('gulp-plumber');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('js', function () {
  return gulp.src('src/**/*.js')
    .pipe(plumber())
    .pipe(sourcemaps.init())
    .pipe(to5())
    .pipe(concat('all.js'))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('dist'));
});

gulp.task('watch', ['js'], function () {
  gulp.watch('src/**/*.js', ['js']);
});

gulp.task('default', ['js']);


text:
title: "Doodle Willy"
layout: post
date: 2012-06-01
tag:
- game
- unity
- C#
image: https://raw.githubusercontent.com/SirGandal/DoodleWilly/master/Assets/Graphics/AppIcon.PNG
headerImage: true
projects: true
hidden: true
description: ""
# jemoji: ":arrow_right: :neutral_face: :apple:"
author: sirgandal
externalLink: false
---

_Work in progress..._

Github project page: - [DoodleWilly](https://github.com/SirGandal/DoodleWilly).


text:
package io.cattle.platform.allocator.constraint;

import io.cattle.platform.allocator.dao.AllocatorDao;
import io.cattle.platform.allocator.service.AllocationAttempt;
import io.cattle.platform.allocator.service.AllocationLog;

import java.util.List;

import javax.inject.Inject;

public class ImageKindConstraintsProvider implements AllocationConstraintsProvider {

    String kind;
    AllocatorDao allocatorDao;
    boolean exclusive = true;

    @Override
    public void appendConstraints(AllocationAttempt attempt, AllocationLog log, List<Constraint> constraints) {
        Long instanceId = attempt.getInstanceId();
        boolean add = false;

        if (instanceId == null) {
            for (long volumeId : attempt.getVolumeIds()) {
                add = allocatorDao.isVolumeInstanceImageKind(volumeId, kind);
                if (add) {
                    break;
                }
            }

            if (add) {
                constraints.add(new StoragePoolKindConstraint(kind));
            } else if (exclusive) {
                constraints.add(new NegativeStoragePoolKindConstraint(kind));
            }
        } else {
            if (allocatorDao.isInstanceImageKind(instanceId, kind)) {
                constraints.add(new HostKindConstraint(kind));
            } else if (exclusive) {
                constraints.add(new NegativeHostKindConstraint(kind));
            }
        }
    }

    public String getKind() {
        return kind;
    }

    @Inject
    public void setKind(String kind) {
        this.kind = kind;
    }

    public AllocatorDao getAllocatorDao() {
        return allocatorDao;
    }

    @Inject
    public void setAllocatorDao(AllocatorDao allocatorDao) {
        this.allocatorDao = allocatorDao;
    }

    public boolean isExclusive() {
        return exclusive;
    }

    public void setExclusive(boolean exclusive) {
        this.exclusive = exclusive;
    }

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


text:
module Katello
  module SystemsHelper
  end
end


text:
package com.lcw.one.codegen.bean;

import com.lcw.one.codegen.util.NameUtils;
import com.lcw.one.util.utils.CollectionUtils;

import java.util.List;

public class TableMetaInfo {
    private String tableName;
    private String tableNameCn;
    private String className;
    private String packageName;
    private List<TableFieldMetaInfo> tableFieldMetaInfoList;
    private String restPath;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTableNameCn() {
        return tableNameCn;
    }

    public void setTableNameCn(String tableNameCn) {
        this.tableNameCn = tableNameCn;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public List<TableFieldMetaInfo> getTableFieldMetaInfoList() {
        return tableFieldMetaInfoList;
    }

    public void setTableFieldMetaInfoList(List<TableFieldMetaInfo> tableFieldMetaInfoList) {
        this.tableFieldMetaInfoList = tableFieldMetaInfoList;
    }

    public String getRestPath() {
        return restPath;
    }

    public void setRestPath(String restPath) {
        this.restPath = restPath;
    }

    /**
     * 是否是联合主键
     */
    public Boolean getIsJointKey() {
        if (CollectionUtils.isEmpty(tableFieldMetaInfoList)) {
            return false;
        }

        int primaryKeyCount = 0;
        for (TableFieldMetaInfo tableFieldMetaInfo : tableFieldMetaInfoList) {
            if (tableFieldMetaInfo.getIsPrimaryKey()) {
                primaryKeyCount++;
            }
        }

        return primaryKeyCount > 1;
    }

}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Polygonum subauriculatum Petrov ex Komarov

### Remarks
null


text:
.moviesList {
  padding-top: 10px;
  padding-bottom: 10px;
  margin-top: 10px; }
  .moviesList .headerTable {
    padding-bottom: 5px;
    border-bottom: solid 1px black;
    font-weight: bold; }
  .moviesList .movieRow {
    padding-top: 5px;
    padding-bottom: 5px;
    border-bottom: solid 1px rgba(0, 0, 0, 0.3); }
  .moviesList .movieRow:last-child {
    border: none; }

/*# sourceMappingURL=moviesList.component.css.map */


text:
Web VMStat
==========

Display live Linux system stats (memory, CPU, IO, etc) in a pretty web-page, with charts and everything.

![Screenshot](https://github.com/joewalnes/web-vmstats/raw/master/screenshot.png)

Overview
--------

Linux (and many other UNIXy operating systems) have a command line tool called
[vmstat](http://en.wikipedia.org/wiki/Vmstat) for monitoring system stats.

It looks like this (a new line is output every second showing the latest values):

    $ vmstat 1
    procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
    r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
    3  0  43652 2742600 453820 2829164    0    0     1    10    0    0  6  1 93  0
    1  0  43652 2742784 453820 2829164    0    0     0     0 3106 5701 11  1 87  0
    0  0  43652 2742908 453820 2829164    0    0     0     0 3898 6703 11  2 87  0
    1  0  43652 2743672 453820 2829164    0    0     0    32 3844 6708 11  2 87  0
    2  0  43652 2743980 453820 2829164    0    0     0    80 4130 7164 11  2 87  0

Useful, but fugly.

This is a tiny application that streams these stats over a WebSocket using
[websocketd](https://github.com/joewalnes/websocketd) and charts them
using [SmoothieCharts](http://smoothiecharts.org).

Why?
----

Why not? A handy little process to install on machines you care about.
After building this for my own needs, I thought it would make a great
little demo.

And if you want to use it or hack on it yourself, here it is.

Running
-------

See `./run` script for instructions.


text:
'use strict';

const fs = require('fs');
const assert = require('chai').assert;
const expect = require('chai').expect;
const Command = require('../../src/lib/Command.js');
const defaults = require('../../src/config/defaults.json');

describe('Command', function() {
  describe('#constructor', function () {
    it('should set default values', function () {
      let command = new Command();

      assert.equal(command._program.output, '');
      assert.equal(command._program.format, 'png');
      assert.equal(command._program.tileWidth, defaults.tileWidth);
      assert.equal(command._program.tileHeight, defaults.tileHeight);
      assert.equal(command._program.startX, defaults.startX);
      assert.equal(command._program.startY, defaults.startY);
      assert.equal(command._program.paddingX, defaults.paddingX);
      assert.equal(command._program.paddingY, defaults.paddingY);
    });
  });

  describe('#outputDir', function () {
    it('return correct output directory', function () {
      let command = new Command(['', '', '-o', 'output'], '/test');
      assert.equal(command.outputDir(), '/test/output');
    });
  });

  describe('#tilePath', function () {
    it('return correct tilepath', function () {
      let command = new Command(['', '', '-o', 'output'], '/test');
      assert.equal(command.tilePath(1), '/test/output/tile-1.png');
    });
  });

  describe('#run', function () {
    it('should fail without image', function () {
      let command = new Command();
      assert.equal(command.run(), false);
    });

    it('should create correct number of images', function (done) {
      let command = new Command([
        '',
        '',
        '-o',
        'test/output',
        'test/assets/tileset.png'
      ], process.cwd());

      command.run();

      setTimeout(() => {
        expect(fs.accessSync.bind(null, command.tilePath(63), fs.F_OK))
          .to.not.throw(Error);

        done();
      }, 250);
    });
  });
});


text:
define([
  'underscore',
  'backbone',
  'models/tutor/TutorModel'

], function(_, Backbone, TutorModel){

       TutorCollection = Backbone.Collection.extend({
        model: TutorModel,

        url: "http://localhost:8080/Logica/webresources/edu.poli.prap.cv.data.tutor/",
        sync: function (method, model, options) {
            options || (options = {});
            var errorHandler = {
                error: function (jqXHR, textStatus, errorThrown) {
                    // TODO: put your error handling code here
                    // If you use the JS client from the different domain
                    // (f.e. locally) then Cross-origin resource sharing
                    // headers has to be set on the REST server side.
                    // Otherwise the JS client has to be copied into the
                    // some (f.e. the same) Web project on the same domain
                    alert('Unable to fulfil the request');
                }}

            var result = Backbone.sync(method, model, _.extend(options, errorHandler));
            return result;
        }
    });

  return TutorCollection;

});


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=struct.ServerSideEncryptionWriter.html">

Redirecting to struct.ServerSideEncryptionWriter.html...


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Flat UI Pro</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link href="../../dist/css/vendor/bootstrap.min.css" rel="stylesheet">

    <link href="../../dist/css/flat-ui.css" rel="stylesheet">

    <link rel="shortcut icon" href="../../dist/favicon.ico">

Tiles

Web Oriented

100% convertable to HTML/CSS layout.

                Get Pro

Easy to Customize

Vector-based shapes and minimum of layer styles.

                Get Pro

Color Swatches

Easy to add or change elements.

                Get Pro

Free for Share

Your likes, shares and comments helps us.

                Get Pro


text: Hosted at www.lindsayrgilbert.com


text:
// <copyright file="IDBObject.cs" company="Adam Nachman">
// Copyright (c) 2009 All Right Reserved Adam Nachman
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// <author>Adam Nachman</author>
namespace AdamNachman.Build.SqlExtract
{
    /// <summary>
    /// The interface implemented by all DBObject classes
    /// </summary>
    public interface IDBObject
    {
        #region Properties

        /// <summary>
        /// Gets a value indicating whether or not the processing of the object is complete
        /// </summary>
        bool Complete
        {
            get;
        }

        /// <summary>
        /// Gets the name of the schema
        /// </summary>
        string Schema
        {
            get;
        }

        /// <summary>
        /// Gets the name of the parent object
        /// </summary>
        string ParentName
        {
            get;
        }

        /// <summary>
        /// Gets the name of the object
        /// </summary>
        string Name
        {
            get;
        }

        /// <summary>
        /// Gets the raw ddl of the object
        /// </summary>
        string Ddl
        {
            get;
        }

        /// <summary>
        /// Gets the complete ddl of the object, including prefixes and suffixes
        /// </summary>
        string CompleteDdl
        {
            get;
        }

        /// <summary>
        /// Gets or sets the object on which this object depends
        /// </summary>
        string DependsOn
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether or not the object exists in the target schema
        /// </summary>
        bool PreExists
        {
            get;
            set;
        }

        #endregion Properties

        #region Methods

        /// <summary>
        /// Marks the processing of the object complete
        /// </summary>
        void MarkComplete();

        #endregion Methods
    }
}


text:
<?php
class Kwf_Util_Model_Welcome extends Kwf_Model_Db
    implements Kwf_Media_Output_Interface
{
    protected $_table = 'kwf_welcome';
    protected $_rowClass = 'Kwf_Util_Model_Row_Welcome';
    protected $_referenceMap    = array(
        'WelcomeImage' => array(
            'column'           => 'kwf_upload_id',
            'refModelClass'    => 'Kwf_Uploads_Model',
        ),
        'LoginImage' => array(
            'column'           => 'login_kwf_upload_id',
            'refModelClass'    => 'Kwf_Uploads_Model',
        )
    );

    public static function getImageDimensions($type)
    {
        if ($type == 'LoginImageLarge') {
            return array(350, 150, 'cover' => false);
        } else if ($type == 'LoginImage') {
            return array(300, 80, 'cover' => false);
        } else if ($type == 'WelcomeImage') {
            return array(300, 100, 'cover' => false);
        }
    }
    public static function getMediaOutput($id, $type, $className)
    {
        $row = Kwf_Model_Abstract::getInstance($className)->getRow($id);
        $dim = self::getImageDimensions($type);
        if ($type == 'LoginImageLarge') {
            $type = 'LoginImage';
        }
        $uploadRow = $row->getParentRow($type);
        return array(
            'contents'=>Kwf_Media_Image::scale($uploadRow, $dim),
            'mimeType' => $row->getParentRow($type)->mime_type
        );
    }
}


text:
Test for bug 8131:
Some properties and methods of window and document objects cannot be converted to a string.

Should say SUCCESS:


text:
using System;
using System.Security.Cryptography;

class CryptoState :
    IDisposable
{
    public CryptoState(Func<ICryptoTransform> encryptProvider)
    {
        Provider = () =>
        {
            if (transform == null)
            {
                return transform = encryptProvider();
            }
            return transform;
        };
        Cleanup = transform =>
        {
            if (!transform.CanReuseTransform)
            {
                this.transform?.Dispose();
                this.transform = null;
            }
        };
    }

    ICryptoTransform? transform;
    public readonly Func<ICryptoTransform> Provider;
    public readonly Action<ICryptoTransform> Cleanup;

    public void Dispose()
    {
        transform?.Dispose();
    }
}


text:
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Catatan extends Model
{
    protected $fillable = ['description','owner_id','is_done'];

    public function owner()
    {
        return $this->belongsTo('App\User','owner_id');
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycotaxon 53: 180 (1995)

#### Original name
Weddellomyces pachyosporicola Nav.-Ros. & Cl. Roux

### Remarks
null


text:
module Jarvis
  ROOTDIR = File.expand_path(File.dirname(__FILE__) + '/..')
end

require 'rubygems'
require 'eventmachine'
require 'optparse'
require 'colored'
require 'logger'
require 'shellwords'
require 'ruby_cowsay'

if RUBY_VERSION =~ /1.9/
  require 'unimidi'
else
  require 'midiator'
end

# Add library directory to load path
libdir = File.dirname(__FILE__)
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)

require 'jarvis/options'
require 'jarvis/command'
require 'jarvis/notes'
require 'jarvis/note'
require 'jarvis/scales'
require 'jarvis/log'
require 'jarvis/midi'
require 'jarvis/midi/midiator'
require 'jarvis/midi/unimidi'
require 'jarvis/server'
require 'jarvis/generators/abstract'
require 'jarvis/generators/cellular'
require 'jarvis/generators/markhov'
require 'jarvis/generators/otomata'
require 'jarvis/generators/random'
require 'jarvis/generators/scale'

# Load user external generators.
Dir[File.expand_path("~/.jarvis/generators/*.rb")].each do |file|
  require file
end


text:
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false">
				Toggle navigation

			</button>

        {{ .Site.Params.HeaderUsername }}@{{ .Site.Params.HeaderHostname }} ~ $

					/home/{{ .Site.Params.HeaderUsername }}

        {{ if .IsTranslated }}

              LANG={{ .Language.Lang }}

              {{ range .Translations }}

                    export LANG={{ .Language.Lang }}

              {{ end }}

        {{ end }}
				{{ range .Site.Menus.header }}
				{{ $name := lower .Name }}

                    {{ if .HasChildren }}
                        {{ .Name }}

                        {{ range .Children }}

                    		~/{{ lower .Name }}

                		{{ end }}

            		{{ else }}
            		~/{{ lower .Name }}
            		{{ end  }}

        		{{ end }}


text:
-- Table: users

-- DROP TABLE users;

CREATE TABLE users
(
  username character varying(50) NOT NULL,
  password text NOT NULL,
  enabled boolean NOT NULL,
  CONSTRAINT pk_username PRIMARY KEY (username)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE users
  OWNER TO postgres;

-- Index: pk_idx

-- DROP INDEX pk_idx;

CREATE UNIQUE INDEX pk_idx
  ON users
  USING btree
  (username COLLATE pg_catalog."default" NULLS FIRST);


text:
package com.jayantkrish.jklol.evaluation;

/**
 * Implementations of common {@code Predictor} methods.
 *
 * @author jayantk
 * @param <I>
 * @param <O>
 */
public abstract class AbstractPredictor<I, O> implements Predictor<I, O> {

  @Override
  public O apply(I input) {
    return getBestPrediction(input).getBestPrediction();
  }

  @Override
  public Prediction<I, O> getBestPredictions(Example<? extends I, ? extends O> example,
      int numPredictions) {
    return getBestPredictions(example.getInput(), example.getOutput(), numPredictions);
  }

  @Override
  public Prediction<I, O> getBestPrediction(I input, O output) {
    return getBestPredictions(input, output, 1);
  }

  @Override
  public Prediction<I, O> getBestPrediction(Example<? extends I, ? extends O> example) {
    return getBestPredictions(example.getInput(), example.getOutput(), 1);
  }

  @Override
  public Prediction<I, O> getBestPrediction(I input) {
    return getBestPredictions(input, null, 1);
  }

  @Override
  public double getScore(I input, O output) {
    Prediction<I, O> prediction = getBestPredictions(input, output, 1);
    return prediction.getOutputScore();
  }
}


text:
FROM nimmis/alpine-java:oracle-8-jdk

MAINTAINER helyho <helyho@gmail.com>

RUN mkdir /dockerfly

COPY ./ /dockerfly/

RUN echo "http://mirrors.aliyun.com/alpine/v3.5/main" > /etc/apk/repositories
RUN apk --no-cache add socat
RUN echo "#!/bin/sh"

EXPOSE 28083

WORKDIR /dockerfly

RUN chmod +x /dockerfly/start.sh

ENTRYPOINT  ["/bin/sh" , "/dockerfly/start.sh"]


text:
<stix:STIX_Package
	xmlns:cyboxCommon="http://cybox.mitre.org/common-2"
	xmlns:cybox="http://cybox.mitre.org/cybox-2"
	xmlns:cyboxVocabs="http://cybox.mitre.org/default_vocabularies-2"
	xmlns:example="http://example.com"
	xmlns:incident="http://stix.mitre.org/Incident-1"
	xmlns:ta="http://stix.mitre.org/ThreatActor-1"
	xmlns:stixCommon="http://stix.mitre.org/common-1"
	xmlns:stixVocabs="http://stix.mitre.org/default_vocabularies-1"
	xmlns:stix-ciqidentity="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1"
	xmlns:stix="http://stix.mitre.org/stix-1"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xal="urn:oasis:names:tc:ciq:xal:3"
	xmlns:xnl="urn:oasis:names:tc:ciq:xnl:3"
	xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3"
	xsi:schemaLocation="
	http://cybox.mitre.org/common-2 http://cybox.mitre.org/XMLSchema/common/2.1/cybox_common.xsd
	http://cybox.mitre.org/cybox-2 http://cybox.mitre.org/XMLSchema/core/2.1/cybox_core.xsd
	http://cybox.mitre.org/default_vocabularies-2 http://cybox.mitre.org/XMLSchema/default_vocabularies/2.1/cybox_default_vocabularies.xsd
	http://stix.mitre.org/Incident-1 http://stix.mitre.org/XMLSchema/incident/1.1.1/incident.xsd
	http://stix.mitre.org/ThreatActor-1 http://stix.mitre.org/XMLSchema/threat_actor/1.1.1/threat_actor.xsd
	http://stix.mitre.org/common-1 http://stix.mitre.org/XMLSchema/common/1.1.1/stix_common.xsd
	http://stix.mitre.org/default_vocabularies-1 http://stix.mitre.org/XMLSchema/default_vocabularies/1.1.1/stix_default_vocabularies.xsd
	http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1 http://stix.mitre.org/XMLSchema/extensions/identity/ciq_3.0/1.1.1/ciq_3.0_identity.xsd
	http://stix.mitre.org/stix-1 http://stix.mitre.org/XMLSchema/core/1.1.1/stix_core.xsd
	urn:oasis:names:tc:ciq:xal:3 http://stix.mitre.org/XMLSchema/external/oasis_ciq_3.0/xAL.xsd
	urn:oasis:names:tc:ciq:xnl:3 http://stix.mitre.org/XMLSchema/external/oasis_ciq_3.0/xNL.xsd
	urn:oasis:names:tc:ciq:xpil:3 http://stix.mitre.org/XMLSchema/external/oasis_ciq_3.0/xPIL.xsd" id="example:Package-4ed2eea5-021a-44d8-9645-a09846c2b070" version="1.1.1" timestamp="2014-06-11T16:41:00+00:00">
    <stix:Incidents>
        <stix:Incident id="example:incident-96450814-5270-4aea-bf57-5e051b06d3b5" timestamp="2014-06-11T16:41:00+00:00" xsi:type='incident:IncidentType'>
            <incident:Title>Actor broke into victim office and stole 8 laptops which contained unencrypted medical data that the victim was processing for several partner organizations</incident:Title>
            <incident:External_ID source="VERIS">080E98BA-AABC-4B35-9788-BCF665C4271D</incident:External_ID>
            <incident:Time>
                <incident:Initial_Compromise precision="day">2014-02-05T00:00:00</incident:Initial_Compromise>
            </incident:Time>
            <incident:Reporter>
                <stixCommon:Identity xsi:type='stix-ciqidentity:CIQIdentity3.0InstanceType'>
                    <ExtSch:Specification xmlns:ExtSch="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1">
  <xpil:PartyName xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3">
    <xnl:NameLine xmlns:xnl="urn:oasis:names:tc:ciq:xnl:3">blackfist</xnl:NameLine>
  </xpil:PartyName>
</ExtSch:Specification>
                </stixCommon:Identity>
            </incident:Reporter>
            <incident:Victim xsi:type='stix-ciqidentity:CIQIdentity3.0InstanceType'>
                <ExtSch:Specification xmlns:ExtSch="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1">
  <xpil:PartyName xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3">
    <xnl:NameLine xmlns:xnl="urn:oasis:names:tc:ciq:xnl:3">Sutherland Global Services</xnl:NameLine>
  </xpil:PartyName>
  <xpil:Addresses xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3">
    <xpil:Address>
      <xal:Country xmlns:xal="urn:oasis:names:tc:ciq:xal:3">
        <xal:NameElement>US</xal:NameElement>
      </xal:Country>
      <xal:AdministrativeArea xmlns:xal="urn:oasis:names:tc:ciq:xal:3">
        <xal:NameElement>CA</xal:NameElement>
      </xal:AdministrativeArea>
    </xpil:Address>
  </xpil:Addresses>
</ExtSch:Specification>
            </incident:Victim>
            <incident:Affected_Assets>
                <incident:Affected_Asset>
                    <incident:Type>Desktop</incident:Type>
                    <incident:Nature_Of_Security_Effect>
                        <incident:Property_Affected>
                            <incident:Property xsi:type="stixVocabs:LossPropertyVocab-1.0">Confidentiality</incident:Property>
                            <incident:Description_Of_Effect>Medical: 400000; Notes:I had to go to the HHS breach tool and search for Sutherland to find three breaches which were reported and added up the total records for each.</incident:Description_Of_Effect>
                        </incident:Property_Affected>
                        <incident:Property_Affected>
                            <incident:Property xsi:type="stixVocabs:LossPropertyVocab-1.0">Availability</incident:Property>
                            <incident:Type_Of_Availability_Loss xsi:type="stixVocabs:AvailabilityLossTypeVocab-1.1.1">Loss</incident:Type_Of_Availability_Loss>
                        </incident:Property_Affected>
                    </incident:Nature_Of_Security_Effect>
                </incident:Affected_Asset>
            </incident:Affected_Assets>
            <incident:Impact_Assessment>
                <incident:Impact_Qualification xsi:type="stixVocabs:ImpactQualificationVocab-1.0">Unknown</incident:Impact_Qualification>
            </incident:Impact_Assessment>
            <incident:Attributed_Threat_Actors>
                <incident:Threat_Actor>
                    <stixCommon:Threat_Actor idref="example:threatactor-1a18e533-b61d-40e4-a976-11064615050d" xsi:type='ta:ThreatActorType'/>
                </incident:Threat_Actor>
            </incident:Attributed_Threat_Actors>
            <incident:Security_Compromise xsi:type="stixVocabs:SecurityCompromiseVocab-1.0">Yes</incident:Security_Compromise>
            <incident:Discovery_Method xsi:type="stixVocabs:DiscoveryMethodVocab-1.0">Unknown</incident:Discovery_Method>
            <incident:Information_Source>
                <stixCommon:Identity>
                    <stixCommon:Name>vcdb</stixCommon:Name>
                </stixCommon:Identity>
                <stixCommon:Tools>
                    <cyboxCommon:Tool>
                        <cyboxCommon:Name>veris2stix</cyboxCommon:Name>
                        <cyboxCommon:Vendor>MITRE</cyboxCommon:Vendor>
                        <cyboxCommon:Version>0.1</cyboxCommon:Version>
                    </cyboxCommon:Tool>
                    <cyboxCommon:Tool>
                        <cyboxCommon:Name>VERIS schema</cyboxCommon:Name>
                        <cyboxCommon:Vendor>Verizon</cyboxCommon:Vendor>
                        <cyboxCommon:Version>1.3</cyboxCommon:Version>
                    </cyboxCommon:Tool>
                </stixCommon:Tools>
                <stixCommon:References>
                    <stixCommon:Reference>http://www.4medapproved.com/hitsecurity/l-business-associate-causes-hipaa-breach-165000-health-records/ (20140611)</stixCommon:Reference>
                    <stixCommon:Reference>http://www.phiprivacy.net/update-sutherland-healthcare-solutions-breach-affected-over-220000-patients-and-counting/ (20140611)</stixCommon:Reference>
                    <stixCommon:Reference>http://www.phiprivacy.net/sutherland-healthcare-identifies-additional-patients-to-notify-of-breach/ (20140611)</stixCommon:Reference>
                    <stixCommon:Reference>http://articles.latimes.com/2014/mar/06/local/la-me-patient-data-stolen-20140307 (20140611)</stixCommon:Reference>
                </stixCommon:References>
            </incident:Information_Source>
        </stix:Incident>
    </stix:Incidents>
    <stix:Threat_Actors>
        <stix:Threat_Actor id="example:threatactor-1a18e533-b61d-40e4-a976-11064615050d" timestamp="2014-12-22T16:22:09.361000+00:00" xsi:type='ta:ThreatActorType'>
            <ta:Identity xsi:type='stix-ciqidentity:CIQIdentity3.0InstanceType'>
                <ExtSch:Specification xmlns:ExtSch="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1">
  <xpil:Addresses xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3">
    <xpil:Address>
      <xal:Country xmlns:xal="urn:oasis:names:tc:ciq:xal:3">
        <xal:NameElement>Unknown</xal:NameElement>
      </xal:Country>
    </xpil:Address>
  </xpil:Addresses>
</ExtSch:Specification>
            </ta:Identity>
            <ta:Type timestamp="2014-12-22T16:22:09.361000+00:00">
                <stixCommon:Value>Unknown</stixCommon:Value>
            </ta:Type>
            <ta:Motivation timestamp="2014-12-22T16:22:09.361000+00:00">
                <stixCommon:Value xsi:type="stixVocabs:MotivationVocab-1.1">Financial or Economic</stixCommon:Value>
            </ta:Motivation>
        </stix:Threat_Actor>
    </stix:Threat_Actors>
</stix:STIX_Package>


text:
.button10 {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 4px 2px;
    -webkit-transition-duration: 0.4s;
    transition-duration: 0.4s;
    cursor: pointer;
}

.button11 {
    background-color: #C2C2B6;
    color: black;
    border: 2px solid #e7e7e7;
}

.button11:hover {background-color: #555; color: #fff}

#search {
    width: 140px;
    box-sizing: border-box;
    border: 2px solid #555;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    padding: 5px 10px 5px 10px;

}

select {

    padding:3px;
    box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset;
    background: #555;
    color:white;
    border:none;
    display: inline-block;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    padding:4px 0; width:185px;
    background-color: #C2C2B6;
}

li a {
    display: block;
    color: #000;
    padding: 8px 0 8px 16px;
    text-decoration: none;
}

li a:hover {
    background-color: #555;
    color: white;
}

			#logo { padding:0; width:auto; float:left;}
			#logo h1 a, h1 a:hover { color:darkgreen; text-decoration:none;}
			#logo h1 span { color:#BCCE98;}

			#header { background:#fff; }
			#header-inner { margin:0 auto; padding:0; width:100%;}

			.feature { background:#555;padding:18px;}
			.feature-inner { margin:auto;width:100%; }
			.feature-inner h1 {color:#DAE9BC;font-size:32px;}

			.clr { clear:both; padding:0; margin:0; width:100%; font-size:0px; line-height:0px;}

.dropbtn {
    background-color: #4CAF50;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #888888;
    min-width: 185px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {background-color: #555}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: #3e8e41;
}

.multiselect {
  width: 200px;
}

.selectBox {
  position: relative;
}

.selectBox select {
  width: 100%;
  font-weight: bold;
}

.overSelect {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

#checkboxes {
  display: none;
  border: 1px #dadada solid;
}

#checkboxes label {
  display: block;
}

#checkboxes label:hover {
  background-color: #1e90ff;
}

.nav {
    list-style: none;
    font-weight: bold;
    margin-bottom: 10px;
    float: left; /* Clear floats */
    width: 100%;
    background-color:#6666FF;
    /* Bring the nav above everything else--uncomment if needed.
    position: relative;
    z-index: 5;
    */
}
.nav li {
    float: left;
    margin-right: 10px;
    position: relative;
}
.nav a {
    display: block;
    padding: 5px;
    color: #fff;
    background-color: #333;
    text-decoration: none;
}
.nav a:hover {
    color: #fff;
    background-color: #6b0c36;
    text-decoration: underline;
}

/*--- DROPDOWN ---*/
.nav ul {
    background-color: #fff; /* Adding a background makes the dropdown work properly in IE7+. Make this as close to your page's background as possible (i.e. white page == white background). */
    background: rgba(255,255,255,0); /* But! Let's make the background fully transparent where we can, we don't actually want to see it if we can help it... */
    list-style: none;
    position: absolute;
    left: -9999px; /* Hide off-screen when not needed (this is more accessible than display: none;) */
}
.nav ul li {
    padding-top: 1px; /* Introducing a padding between the li and the a give the illusion spaced items */
    float: none;
}
.nav ul a {
    white-space: nowrap; /* Stop text wrapping and creating multi-line dropdown items */
}
.nav li:hover ul { /* Display the dropdown on hover */
    left: 0; /* Bring back on-screen when needed */
}
.nav li:hover a { /* These create persistent hover states, meaning the top-most link stays 'hovered' even when your cursor has moved down the list. */
    background-color: #6b0c36;
    text-decoration: underline;
}
.nav li:hover ul a { /* The persistent hover state does however create a global style for links even before they're hovered. Here we undo these effects. */
    text-decoration: none;
}
.nav li:hover ul li a:hover { /* Here we define the most explicit hover states--what happens when you hover each individual link. */
    background-color: #333;
}


text:
<!doctype html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
    <meta name="description" content="Read - Responsive HTML5 Template">
    <meta name="keywords" content="read, blog, html5, portfolio">
    <meta name="author" content="Pixelwars">

    <title>Read - Responsive HTML5 Template</title>

    <link rel="shortcut icon" href="images/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/logo-144.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/logo-114.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/logo-72.png">
    <link rel="apple-touch-icon-precomposed" href="images/ico/logo-57.png">

    <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=UnifrakturMaguntia' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Coustard' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" type="text/css" media="print" href="css/print.css">
    <link rel="stylesheet" type="text/css" href="css/grid.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/normalize.css">
    <link rel="stylesheet" type="text/css" href="css/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="js/google-code-prettify/prettify.css">
    <link rel="stylesheet" type="text/css" href="css/uniform.default.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <link rel="stylesheet" type="text/css" href="css/flexslider.css">

    <link rel="stylesheet" type="text/css" href="css/gamma-gallery.css">

          <hgroup>

 Read

. . . a minimalistic template focused on readability.

          </hgroup>

Home

Home alternate

Blog with sidebar

Blog masonry

About

Typography

Shortcodes

Archives

Archives Alternate

Grid

404

Search Results

Form Elements

Grid

Form Elements

Portfolio

Portfolio no ajax

Portfolio single

Gallery

Gallery no ajax

Gallery single ajax

Gallery single no ajax

Contact

                <form role="search" method="get" id="search-form" action="#">
                  Search
                  <input type="text" value="" name="s" id="search" title="Enter keyword">
                  <input type="submit" id="search-submit" title="Search it" value="→">
                </form>

Gallery Single

by Pixelwars


text:
package status

import (
	"fmt"
	"os"
	"strings"

	"github.com/bcrusu/kcm/util"
)

func PrintNodes(stats []NodeStatus) {
	Sort(stats)

	writer := util.NewTabWriter(os.Stdout)

	writer.Print("NODE\tSTATUS\tDNS NAME\tDNS LOOKUP\tIP")
	writer.Nl()

	for _, stat := range stats {
		writer.Print(stat.Node.Name)
		writer.Tab()

		if stat.Missing {
			writer.Print("Missing")
		} else if stat.Active {
			writer.Print("Active")
		} else {
			writer.Print("Inactive")
		}
		writer.Tab()

		writer.Print(stat.Node.DNSName)
		writer.Tab()

		if stat.DNSLookupErr {
			writer.Print("FAILED")
		} else {
			if stat.Active {
				writer.Print("OK")
			} else {
				writer.Print("-")
			}
		}
		writer.Tab()

		if len(stat.Addresses) > 0 {
			writer.Print(strings.Join(stat.Addresses, ", "))
		} else {
			if stat.Active {
				writer.Print("waiting DHCP lease")
			} else {
				writer.Print("-")
			}
		}

		writer.Nl()
	}

	writer.Flush()
}

func PrintNetwork(stat NetworkStatus) {
	writer := util.NewTabWriter(os.Stdout)

	writer.Print("NETWORK\tSTATUS\tCIDR\tDNS SERVER")
	writer.Nl()

	writer.Print(stat.Network.Name)
	writer.Tab()

	if stat.Missing {
		writer.Print("Missing")
	} else if stat.Active {
		writer.Print("Active")
	} else {
		writer.Print("Inactive")
	}
	writer.Tab()

	writer.Print(stat.Network.IPv4CIDR)
	writer.Tab()

	{
		networkInfo, err := util.ParseNetworkCIDR(stat.Network.IPv4CIDR)
		if err != nil {
			panic("failed to parse network CIDR")
		}

		writer.Print(networkInfo.BridgeIP.String())
	}
	writer.Nl()

	writer.Flush()
}

func PrintCluster(stat ClusterStatus) {
	writer := util.NewTabWriter(os.Stdout)

	writer.Print("CLUSTER\tSTATUS\tDNS DOMAIN\tKUBE VERSION\tCOREOS VERSION")
	writer.Nl()

	writer.Print(stat.Cluster.Name)
	writer.Tab()

	if stat.Active {
		writer.Print("Active")
	} else {
		writer.Print("Inactive")
	}
	writer.Tab()

	writer.Print(stat.Cluster.DNSDomain)
	writer.Tab()

	writer.Print(stat.Cluster.KubernetesVersion)
	writer.Tab()

	writer.Print(fmt.Sprintf("%s/%s", stat.Cluster.CoreOSChannel, stat.Cluster.CoreOSVersion))
	writer.Nl()

	writer.Flush()
}


text:
<?php

use yii\db\Schema;
use yii\db\Migration;

class m151211_150014_orderlist extends Migration
{
    public function up()
    {

        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
           $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }

        $this->createTable('{{%orderlist}}', [
            'orderlist_id' => $this->primaryKey(),
            'order_id' => $this->integer(11)->notNull(),
            'product_id' => $this->integer(11)->notNull(),
            'quantity' => $this->integer(11)->notNull(),
        ], $tableOptions);

    }

    public function down()
    {
        echo "m151211_150014_orderlist cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}


text:
/**
Core script to handle the entire theme and core functions
**/
var Layout = function() {

    var layoutImgPath = 'layouts/layout5/img/';

    var layoutCssPath = 'layouts/layout5/css/';

    var resBreakpointMd = App.getResponsiveBreakpoint('md');

    // Set proper height for sidebar and content. The content and sidebar height must be synced always.
    var handleContentHeight = function () {
        var content = $('.page-content');
        var copyright = $('.copyright');
        var body = $('body');
        var height;

        var available_height = App.getViewPort().height - $('.copyright').outerHeight() - $('.page-header').outerHeight() - 50;
        content.css('min-height', available_height);
    };

    // handle on page scroll
    var handleHeaderOnScroll = function() {
        if ($(window).scrollTop() > 60) {
            $("body").addClass("page-on-scroll");
        } else {
            $("body").removeClass("page-on-scroll");
        }
    }

    // Handles active menu to avoid closing click to content

    // handle go to top button
    var handleGo2Top = function () {
        var Go2TopOperation = function(){
            var CurrentWindowPosition = $(window).scrollTop();// current vertical position
            if (CurrentWindowPosition > 100) {
                $(".go2top").show();
            } else {
                $(".go2top").hide();
            }
        };

        Go2TopOperation();// call headerFix() when the page was loaded
        if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
            $(window).bind("touchend touchcancel touchleave", function(e){
                Go2TopOperation();
            });
        } else {
            $(window).scroll(function() {
                Go2TopOperation();
            });
        }

        $(".go2top").click(function(e) {
            e.preventDefault();
             $("html, body").animate({ scrollTop: 0 }, 600);
        });
    };

    var handleHeaderMenu = function() {
        $('.page-header .navbar-nav > .dropdown-fw, .page-header .navbar-nav > .more-dropdown, .page-header .navbar-nav > .dropdown > .dropdown-menu  > .dropdown').click(function(e) {

            if (App.getViewPort().width > resBreakpointMd) {
                if ($(this).hasClass('more-dropdown') || $(this).hasClass('more-dropdown-sub')) {
                    return;
                } else {
                     e.stopPropagation();
                }
            } else {
                e.stopPropagation();
            }

            var links = $(this).parent().find('> .dropdown');

            if (App.getViewPort().width < resBreakpointMd) {
                if ($(this).hasClass('open')) {
                    links.removeClass('open');
                } else {
                    links.removeClass('open');
                    $(this).addClass('open');
                    App.scrollTo($(this));
                }
            } else {
                if ($(this).hasClass('more-dropdown'))  {
                    return;
                }
                links.removeClass('open');
                $(this).addClass('open');
                App.scrollTo($(this));
            }
        });

        $('.page-header .navbar-nav .more-dropdown-sub .dropdown-menu, .page-header .navbar-nav .dropdown-sub .dropdown-menu').click(function(){

        });
    };

    // Handles main menu on window resize
    var handleMainMenuOnResize = function() {
        // handle hover dropdown menu for desktop devices only
        var width = App.getViewPort().width;
        var menu = $(".page-header .navbar-nav");
        if (width >= resBreakpointMd && menu.data('breakpoint') !== 'desktop') {
            menu.data('breakpoint', 'desktop');
            $('[data-hover="extended-dropdown"]', menu).not('.hover-initialized').each(function() {
                $(this).dropdownHover();
                $(this).addClass('hover-initialized');
            });
        } else if (width < resBreakpointMd && menu.data('breakpoint') !== 'mobile') {
            menu.data('breakpoint', 'mobile');
            // disable hover bootstrap dropdowns plugin
            $('[data-hover="extended-dropdown"].hover-initialized', menu).each(function() {
                $(this).unbind('hover');
                $(this).parent().unbind('hover').find('.dropdown-submenu').each(function() {
                    $(this).unbind('hover');
                });
                $(this).removeClass('hover-initialized');
            });
        }
    };

    return {
        // Main init methods to initialize the layout
        // IMPORTANT!!!: Do not modify the core handlers call order.

        init: function () {
            handleContentHeight();
            handleGo2Top();
            handleHeaderOnScroll();
            handleHeaderMenu();
            handleMainMenuOnResize();
            App.addResizeHandler(handleMainMenuOnResize); // handle main menu on window resize

            // handle minimized header on page scroll
            $(window).scroll(function() {
                handleHeaderOnScroll();
            });
        },

        getLayoutImgPath: function() {
            return App.getAssetsPath() + layoutImgPath;
        },

        getLayoutCssPath: function() {
            return App.getAssetsPath() + layoutCssPath;
        }
    };

}();

jQuery(document).ready(function() {
   Layout.init(); // init metronic core componets
});


text:
from plugin_system import Plugin
from settings import ACCEPT_FRIENDS, IS_GROUP
from utils import schedule_coroutine

if ACCEPT_FRIENDS:
    plugin = Plugin("Автоматическое добавление друзей(каждые 10 секунд)")

    @plugin.on_init()
    async def get_vk(vk):
        if not IS_GROUP:
            schedule_coroutine(add_friends(vk))

    # Функция, если её запустить(см. get_vk для примера с выполнением в фоне),
    # будет выполняться каждые 10 секунд, до тех пор, пока stopper.stop == False
    #
    # Функция обязана принимать 1 обязательны параметр - stopper, но может
    # принимать и больше
    @plugin.schedule(10)
    async def add_friends(stopper, vk):
        result = await vk.method("friends.getRequests")

        if not result or not result["count"]:
            return

        users = result["items"]

        for user in users:
            await vk.method("friends.add", {"user_id": user})


text:
package tictactoe.game.player;

import tictactoe.game.board.PointValue;

public interface Player {
    void setTeam(PointValue value);
    void setName(String name);
    void updateScore(int score);
    void setStrategy(Strategy strategy);
    String getName();
    int getScore();
    PointValue getPointValue();
    Strategy getStrategy();
}


text:
package org.elasticsearch.xpack.transform.rest.action.compat;

import org.apache.logging.log4j.LogManager;
import org.elasticsearch.client.node.NodeClient;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.rest.BaseRestHandler;
import org.elasticsearch.rest.RestController;
import org.elasticsearch.rest.RestRequest;
import org.elasticsearch.rest.action.RestToXContentListener;
import org.elasticsearch.xpack.core.transform.TransformField;
import org.elasticsearch.xpack.core.transform.TransformMessages;
import org.elasticsearch.xpack.core.transform.action.DeleteTransformAction;
import org.elasticsearch.xpack.core.transform.action.compat.DeleteTransformActionDeprecated;

public class RestDeleteTransformActionDeprecated extends BaseRestHandler {

    private static final DeprecationLogger deprecationLogger = new DeprecationLogger(
            LogManager.getLogger(RestDeleteTransformActionDeprecated.class));

    public RestDeleteTransformActionDeprecated(RestController controller) {
        controller.registerAsDeprecatedHandler(RestRequest.Method.DELETE, TransformField.REST_BASE_PATH_TRANSFORMS_BY_ID_DEPRECATED, this,
                TransformMessages.REST_DEPRECATED_ENDPOINT, deprecationLogger);
    }

    @Override
    protected RestChannelConsumer prepareRequest(RestRequest restRequest, NodeClient client) {
        if (restRequest.hasContent()) {
            throw new IllegalArgumentException("delete transform requests can not have a request body");
        }

        String id = restRequest.param(TransformField.ID.getPreferredName());
        boolean force = restRequest.paramAsBoolean(TransformField.FORCE.getPreferredName(), false);
        DeleteTransformAction.Request request = new DeleteTransformAction.Request(id, force);

        return channel -> client.execute(DeleteTransformActionDeprecated.INSTANCE, request,
                new RestToXContentListener<>(channel));
    }

    @Override
    public String getName() {
        return "data_frame_delete_transform_action";
    }
}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.metadata;

import com.facebook.presto.spi.ColumnMetadata;
import com.facebook.presto.spi.ConnectorTableMetadata;
import com.facebook.presto.spi.SchemaTableName;
import com.google.common.base.Preconditions;

import java.util.List;

public class TableMetadata
{
    private final String connectorId;
    private final ConnectorTableMetadata metadata;

    public TableMetadata(String connectorId, ConnectorTableMetadata metadata)
    {
        Preconditions.checkNotNull(connectorId, "catalog is null");
        Preconditions.checkNotNull(metadata, "metadata is null");

        this.connectorId = connectorId;
        this.metadata = metadata;
    }

    public String getConnectorId()
    {
        return connectorId;
    }

    public ConnectorTableMetadata getMetadata()
    {
        return metadata;
    }

    public SchemaTableName getTable()
    {
        return metadata.getTable();
    }

    public List<ColumnMetadata> getColumns()
    {
        return metadata.getColumns();
    }
}


text:
package controller;

import Modelos.ClienteValidate;
import Modelos.Comuna;
import Modelos.Conexion;
import Modelos.Provincia;
import com.google.gson.Gson;
import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * @author Sir Lekxas
 */
@Controller
public class Administrador2Controller
{
    private final ClienteValidate clienteValidate;

    private final JdbcTemplate jdbcTemplate;

    public Administrador2Controller (){
        this.clienteValidate = new ClienteValidate(); //Implementar Validator
        Conexion con = new Conexion();
        this.jdbcTemplate = new JdbcTemplate(con.conectar());
    }

    @RequestMapping(value = "AdministracionCliente/buscarProvincia.do", method = RequestMethod.GET)
    @ResponseBody
    public void buscarProvincia(@RequestParam(value = "regionID") String region, HttpServletRequest request,
            HttpServletResponse response) {
        String sql = "SELECT PROVINCIA_ID,PROVINCIA_NOMBRE FROM provincia where PROVINCIA_REGION_ID=" + region + " ";
        List<Provincia> provincias = jdbcTemplate.query(
                sql, new RowMapper<Provincia>() {
            @Override
            public Provincia mapRow(ResultSet rs, int rowNum) throws SQLException {
                Provincia c = new Provincia();
                c.setProvinciaId(Integer.parseInt(rs.getString("PROVINCIA_ID")));
                c.setProvinciaName(rs.getString("PROVINCIA_NOMBRE"));
                return c;
            }
        });

        //List<Provincia> provincia= this.jdbcTemplate.queryForObject("SELECT PROVINCIA_ID,PROVINCIA_NOMBRE FROM provincia where PROVINCIA_REGION_ID="+region+" ",Provincia);
        String json = null;
        json = new Gson().toJson(provincias);
        response.setContentType("Administracion/AñadirCliente");
        try {
            response.getWriter().write(json);
        } catch (IOException ex) {
            Logger.getLogger(AdministracionController.class.getName()).log(Level.SEVERE, null, ex);
        }

    }

    @RequestMapping(value = "AdministracionCliente/buscarComuna.do", method = RequestMethod.GET)
    public void buscarComuna(@RequestParam(value = "provinciaID") String provincia, HttpServletRequest request,
            HttpServletResponse response) {

        String sql = "select COMUNA_ID, COMUNA_NOMBRE from comuna where COMUNA_PROVINCIA_ID=" + provincia + " ";
        List<Comuna> comunas = jdbcTemplate.query(
                sql, new RowMapper<Comuna>() {
            @Override
            public Comuna mapRow(ResultSet rs, int rowNum) throws SQLException {
                Comuna c = new Comuna();
                c.setComunaId(Integer.parseInt(rs.getString("COMUNA_ID")));
                c.setComunaName(rs.getString("COMUNA_NOMBRE"));
                return c;
            }
        });

        String json = null;
        json = new Gson().toJson(comunas);
        response.setContentType("Administracion/AñadirCliente");
        try {
            response.getWriter().write(json);
        } catch (IOException ex) {
            Logger.getLogger(AdministracionController.class.getName()).log(Level.SEVERE, null, ex);
        }

    }

}


text:
package org.filteredpush.qc.georeference;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({ DwCGeoRefDQTestDefinitions.class })
public class AllTests {

	private static final Log logger = LogFactory.getLog(AllTests.class);

}


text:
package org.javers.core.examples.typeNames;

/**
 * @author bartosz.walacik
 */
public class NewValueObject extends AbstractValueObject {
    private int newField;

    public NewValueObject(int someValue, int newField) {
        super(someValue);
        this.newField = newField;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DotNetBay.Core;
using DotNetBay.Model;

namespace DotNetBay.WPF
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {

        private readonly ObservableCollection<Auction> auctions = new ObservableCollection<Auction>();

        public ObservableCollection<Auction> Auctions
        {
            get { return this.auctions; }
        }

        public void Reload()
        {

        }

        public MainWindow()
        {
            if ((Application.Current as App) != null)
            {
                var service = new AuctionService(((App)Application.Current).MainRepository, new SimpleMemberService(((App)Application.Current).MainRepository));
                foreach (var auction in service.GetAll())
                {
                    this.Auctions.Add(auction);
                }
            }
            this.DataContext = this;
            this.InitializeComponent();
        }

        public void OpenSellView(object sender, RoutedEventArgs e)
        {
            var sellView = new SellView(this.Auctions);
            sellView.ShowDialog();
        }

        public void PlaceBid(object sender, RoutedEventArgs e)
        {
            var auction = this.mainWindowGrid.SelectedItem as Auction;
            var bidView = new BidView(auction);
            bidView.ShowDialog();
        }

    }

    public class BooleanToStatusConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (bool)value ? "Valid" : "Closed";
        }
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}


text:
/*
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
 */

#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif

#ifndef __GTK_IMAGE_H__
#define __GTK_IMAGE_H__

#include <gio/gio.h>
#include <gtk/gtkmisc.h>

G_BEGIN_DECLS

#define GTK_TYPE_IMAGE                  (gtk_image_get_type ())
#define GTK_IMAGE(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IMAGE, GtkImage))
#define GTK_IMAGE_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMAGE, GtkImageClass))
#define GTK_IS_IMAGE(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IMAGE))
#define GTK_IS_IMAGE_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMAGE))
#define GTK_IMAGE_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_IMAGE, GtkImageClass))

typedef struct _GtkImage       GtkImage;
typedef struct _GtkImageClass  GtkImageClass;

typedef struct _GtkImagePixmapData  GtkImagePixmapData;
typedef struct _GtkImageImageData   GtkImageImageData;
typedef struct _GtkImagePixbufData  GtkImagePixbufData;
typedef struct _GtkImageStockData   GtkImageStockData;
typedef struct _GtkImageIconSetData GtkImageIconSetData;
typedef struct _GtkImageAnimationData GtkImageAnimationData;
typedef struct _GtkImageIconNameData  GtkImageIconNameData;
typedef struct _GtkImageGIconData     GtkImageGIconData;

struct _GtkImagePixmapData
{
  GdkPixmap *pixmap;
};

struct _GtkImageImageData
{
  GdkImage *image;
};

struct _GtkImagePixbufData
{
  GdkPixbuf *pixbuf;
};

struct _GtkImageStockData
{
  gchar *stock_id;
};

struct _GtkImageIconSetData
{
  GtkIconSet *icon_set;
};

struct _GtkImageAnimationData
{
  GdkPixbufAnimation *anim;
  GdkPixbufAnimationIter *iter;
  guint frame_timeout;
};

struct _GtkImageIconNameData
{
  gchar *icon_name;
  GdkPixbuf *pixbuf;
  guint theme_change_id;
};

struct _GtkImageGIconData
{
  GIcon *icon;
  GdkPixbuf *pixbuf;
  guint theme_change_id;
};

/**
 * GtkImageType:
 * @GTK_IMAGE_EMPTY: there is no image displayed by the widget
 * @GTK_IMAGE_PIXMAP: the widget contains a #GdkPixmap
 * @GTK_IMAGE_IMAGE: the widget contains a #GdkImage
 * @GTK_IMAGE_PIXBUF: the widget contains a #GdkPixbuf
 * @GTK_IMAGE_STOCK: the widget contains a stock icon name (see <xref linkend="gtk-Stock-Items"/>)
 * @GTK_IMAGE_ICON_SET: the widget contains a #GtkIconSet
 * @GTK_IMAGE_ANIMATION: the widget contains a #GdkPixbufAnimation
 * @GTK_IMAGE_ICON_NAME: the widget contains a named icon.
 *  This image type was added in GTK+ 2.6
 * @GTK_IMAGE_GICON: the widget contains a #GIcon.
 *  This image type was added in GTK+ 2.14
 *
 * Describes the image data representation used by a #GtkImage. If you
 * want to get the image from the widget, you can only get the
 * currently-stored representation. e.g.  if the
 * gtk_image_get_storage_type() returns #GTK_IMAGE_PIXBUF, then you can
 * call gtk_image_get_pixbuf() but not gtk_image_get_stock().  For empty
 * images, you can request any storage type (call any of the "get"
 * functions), but they will all return %NULL values.
 */
typedef enum
{
  GTK_IMAGE_EMPTY,
  GTK_IMAGE_PIXMAP,
  GTK_IMAGE_IMAGE,
  GTK_IMAGE_PIXBUF,
  GTK_IMAGE_STOCK,
  GTK_IMAGE_ICON_SET,
  GTK_IMAGE_ANIMATION,
  GTK_IMAGE_ICON_NAME,
  GTK_IMAGE_GICON
} GtkImageType;

/**
 * GtkImage:
 *
 * This struct contain private data only and should be accessed by the functions
 * below.
 */
struct _GtkImage
{
  GtkMisc misc;

  GtkImageType GSEAL (storage_type);

  union
  {
    GtkImagePixmapData pixmap;
    GtkImageImageData image;
    GtkImagePixbufData pixbuf;
    GtkImageStockData stock;
    GtkImageIconSetData icon_set;
    GtkImageAnimationData anim;
    GtkImageIconNameData name;
    GtkImageGIconData gicon;
  } GSEAL (data);

  /* Only used with GTK_IMAGE_PIXMAP, GTK_IMAGE_IMAGE */
  GdkBitmap *GSEAL (mask);

  /* Only used with GTK_IMAGE_STOCK, GTK_IMAGE_ICON_SET, GTK_IMAGE_ICON_NAME */
  GtkIconSize GSEAL (icon_size);
};

struct _GtkImageClass
{
  GtkMiscClass parent_class;

  /* Padding for future expansion */
  void (*_gtk_reserved1) (void);
  void (*_gtk_reserved2) (void);
  void (*_gtk_reserved3) (void);
  void (*_gtk_reserved4) (void);
};

#ifdef G_OS_WIN32
/* Reserve old names for DLL ABI backward compatibility */
#define gtk_image_new_from_file gtk_image_new_from_file_utf8
#define gtk_image_set_from_file gtk_image_set_from_file_utf8
#endif

GType      gtk_image_get_type (void) G_GNUC_CONST;

GtkWidget* gtk_image_new                (void);
GtkWidget* gtk_image_new_from_pixmap    (GdkPixmap       *pixmap,
                                         GdkBitmap       *mask);
GtkWidget* gtk_image_new_from_image     (GdkImage        *image,
                                         GdkBitmap       *mask);
GtkWidget* gtk_image_new_from_file      (const gchar     *filename);
GtkWidget* gtk_image_new_from_pixbuf    (GdkPixbuf       *pixbuf);
GtkWidget* gtk_image_new_from_stock     (const gchar     *stock_id,
                                         GtkIconSize      size);
GtkWidget* gtk_image_new_from_icon_set  (GtkIconSet      *icon_set,
                                         GtkIconSize      size);
GtkWidget* gtk_image_new_from_animation (GdkPixbufAnimation *animation);
GtkWidget* gtk_image_new_from_icon_name (const gchar     *icon_name,
					 GtkIconSize      size);
GtkWidget* gtk_image_new_from_gicon     (GIcon           *icon,
					 GtkIconSize      size);

void gtk_image_clear              (GtkImage        *image);
void gtk_image_set_from_pixmap    (GtkImage        *image,
                                   GdkPixmap       *pixmap,
                                   GdkBitmap       *mask);
void gtk_image_set_from_image     (GtkImage        *image,
                                   GdkImage        *gdk_image,
                                   GdkBitmap       *mask);
void gtk_image_set_from_file      (GtkImage        *image,
                                   const gchar     *filename);
void gtk_image_set_from_pixbuf    (GtkImage        *image,
                                   GdkPixbuf       *pixbuf);
void gtk_image_set_from_stock     (GtkImage        *image,
                                   const gchar     *stock_id,
                                   GtkIconSize      size);
void gtk_image_set_from_icon_set  (GtkImage        *image,
                                   GtkIconSet      *icon_set,
                                   GtkIconSize      size);
void gtk_image_set_from_animation (GtkImage           *image,
                                   GdkPixbufAnimation *animation);
void gtk_image_set_from_icon_name (GtkImage        *image,
				   const gchar     *icon_name,
				   GtkIconSize      size);
void gtk_image_set_from_gicon     (GtkImage        *image,
				   GIcon           *icon,
				   GtkIconSize      size);
void gtk_image_set_pixel_size     (GtkImage        *image,
				   gint             pixel_size);

GtkImageType gtk_image_get_storage_type (GtkImage   *image);

void       gtk_image_get_pixmap   (GtkImage         *image,
                                   GdkPixmap       **pixmap,
                                   GdkBitmap       **mask);
void       gtk_image_get_image    (GtkImage         *image,
                                   GdkImage        **gdk_image,
                                   GdkBitmap       **mask);
GdkPixbuf* gtk_image_get_pixbuf   (GtkImage         *image);
void       gtk_image_get_stock    (GtkImage         *image,
                                   gchar           **stock_id,
                                   GtkIconSize      *size);
void       gtk_image_get_icon_set (GtkImage         *image,
                                   GtkIconSet      **icon_set,
                                   GtkIconSize      *size);
GdkPixbufAnimation* gtk_image_get_animation (GtkImage *image);
void       gtk_image_get_icon_name (GtkImage              *image,
				    G_CONST_RETURN gchar **icon_name,
				    GtkIconSize           *size);
void       gtk_image_get_gicon     (GtkImage              *image,
				    GIcon                **gicon,
				    GtkIconSize           *size);
gint       gtk_image_get_pixel_size (GtkImage             *image);

#ifndef GTK_DISABLE_DEPRECATED
/* These three are deprecated */

void       gtk_image_set      (GtkImage   *image,
			       GdkImage   *val,
			       GdkBitmap  *mask);
void       gtk_image_get      (GtkImage   *image,
			       GdkImage  **val,
			       GdkBitmap **mask);
#endif /* GTK_DISABLE_DEPRECATED */

G_END_DECLS

#endif /* __GTK_IMAGE_H__ */


text:
int main(int argc, char *argv[])
{
  QCoreApplication a(argc, argv);

  MainManager manager("/Users/alena/omim/omim/data/metainfo/");
  manager.ProcessCountryList("/Users/alena/omim/omim/data/polygons.lst");

  return a.exec();
}