text:
package com.bt.pi.api.service;

import java.util.Arrays;

import javax.annotation.Resource;

import org.apache.commons.collections.Closure;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;

import com.bt.pi.app.common.entities.User;

@Component
public class DeleteUserHelper {
    private static final Log LOG = LogFactory.getLog(DeleteUserHelper.class);
    @Resource
    private InstancesService instancesService;
    @Resource
    private ManagementImageService imageService;
    @Resource
    private UserPisssHelper userPisssHelper;
    @Resource
    private SecurityGroupService securityGroupService;
    @Resource
    private ElasticBlockStorageService elasticBlockStorageService;

    public DeleteUserHelper() {
        instancesService = null;
        userPisssHelper = null;
        imageService = null;
        securityGroupService = null;
    }

    public void cleanupUserResources(User user) {

        tryCatch(user, new Closure() {

            @Override
            public void execute(Object input) {
                User user = (User) input;
                instancesService.terminateInstances(user.getUsername(), Arrays.asList(user.getInstanceIds()));
            }
        }, "There was an issue with terminate user instances");

        tryCatch(user, new Closure() {
            @Override
            public void execute(Object arg) {
                User user = (User) arg;
                for (String imageId : user.getImageIds()) {
                    imageService.deregisterImageWithoutMachineTypeCheck(user.getUsername(), imageId);
                }
            }
        }, "There was an issue with deregistering user images");

        tryCatch(user, new Closure() {
            @Override
            public void execute(Object input) {
                User user = (User) input;
                userPisssHelper.deleteBucketsFromUser(user.getUsername(), user.getBucketNames());
            }
        }, "There was an issue with deleting buckets");

        tryCatch(user, new Closure() {

            @Override
            public void execute(Object input) {
                User user = (User) input;

                for (String groupName : user.getSecurityGroupIds()) {
                    securityGroupService.deleteSecurityGroup(user.getUsername(), groupName);
                }

            }
        }, "There was an issue with deleting security groups");

        tryCatch(user, new Closure() {

            @Override
            public void execute(Object input) {
                User user = (User) input;
                for (String snapshotId : user.getSnapshotIds()) {
                    elasticBlockStorageService.deleteSnapshot(user.getUsername(), snapshotId);
                }
            }
        }, "There was an issue with deleting snapshots");

        tryCatch(user, new Closure() {

            @Override
            public void execute(Object input) {
                User user = (User) input;

                for (String volumeId : user.getVolumeIds()) {
                    elasticBlockStorageService.deleteVolume(user.getUsername(), volumeId);
                }

            }
        }, "There was an issue with deleting volumes");
    }

    private void tryCatch(User user, Closure closure, String exceptionMessage) {
        try {
            closure.execute(user);
        } catch (Throwable t) {
            LOG.warn(String.format("User: %s, Error message: %s", user.getUsername(), exceptionMessage), t);
        }
    }
}


text:
<?php

namespace Dms\Web\Laravel\Tests\Unit\Auth\Password;

use Dms\Web\Laravel\Auth\Password\BcryptPasswordHasher;
use Dms\Web\Laravel\Tests\Unit\UnitTest;

/**
 * @author Elliot Levin <elliotlevin@hotmail.com>
 */
class BcryptPasswordHasherTest extends UnitTest
{
    /**
     * @var BcryptPasswordHasher
     */
    protected $hasher;

    public function setUp(): void
    {
        parent::setUp();

        $this->hasher = new BcryptPasswordHasher(10);
    }

    public function testGetters()
    {
        $this->assertSame('bcrypt', $this->hasher->getAlgorithm());
        $this->assertSame(10, $this->hasher->getCostFactor());
    }

    public function testHashing()
    {
        $hash = $this->hasher->hash('password');

        $this->assertNotEquals('password', $hash);
        $this->assertSame(false, $this->hasher->verify('abc', $hash));
        $this->assertSame(false, $this->hasher->verify('password1', $hash));

        $this->assertSame(true, $this->hasher->verify('password', $hash));
    }
}

redpajama_set_name: RedPajamaGithub


text:
<img src="http://www.unidata.ucar.edu/images/logos/rosetta-150x150.png">

[![Build Status](https://travis-ci.org/Unidata/rosetta.svg?branch=master)](https://travis-ci.org/Unidata/rosetta)

[![license](https://img.shields.io/github/license/unidata/rosetta.svg)](https://opensource.org/licenses/BSD-3-Clause)

Overview
--------

Field data obtained from dataloggers often take the form of comma separated value (CSV) ASCII text files. While ASCII
based data formats have some positive aspects, such as the ability to open them with a text editor or spreadsheet
software and "see" the data effortlessly, there are some drawbacks, especially when viewing the situation through the
lens of data interoperability and stewardship.

Issues regarding ASCII data and their integration, interoperability, and stewardship have become especially urgent for
the NSF-funded next-generation Advanced Cooperative Arctic Data and Information Service (ACADIS) project. The goal of
ACADIS is to allow scientists to more easily access, share, integrate and work with Arctic data spanning multiple
disciplines. These goals become quite challenging when one considers the large number of ASCII datasets that are either
currently part of ACADIS or are being routinely submitted to the project, as those ASCII data are stored in a multitude
of layouts, and nearly all metadata reside in non-standard README files, completely disjointed from the actual data they
describe.

The Unidata Data Transformation Tool, Rosetta, is a web-based service that provides an easy, wizard-based interface for
data collectors to transform their datalogger generated ASCII output into Climate and Forecast (CF) compliant netCDF
files, complete with metadata describing what data are contained in the file, the instruments used to collect the data,
and other critical information that otherwise may be lost in one of many dreaded README files. However, with the
understanding that the observational community appreciates the ease of use of ASCII files, methods for transforming the
netCDF back into a user defined CSV or spreadsheet formats are also built-in. We anticipate that Rosetta and the
associated services will be of value to a broader community users who have similar needs for transforming the data they
have collected or stored in non-standard formats.

Basic Architecture
------------------

Front-end user interface:

* jQuery and jQuery UI Javascript Library
* SlickGrid (jQuery Plugin)
* HTML5

Back-end:

* Spring MVC Framework
* The Common Data Model (CDM) (netCDF-Java)
* CF-1.6 Standard

## More Information ##
Rosetta: A white paper on the challenges of sharing observational datasets ([pdf](http://www.unidata.ucar.edu/software/pzhta/files/rosetta_whitepaper.pdf))

AMS 2014 Presentation on Rosetta:

Arms, S. C., J. O. Ganter, J. Weber, and M. K. Ramamurthy, 2014: Rosetta - Unidata's
Web-based Data Translation Tool: Progress and Future Plans 30th Conference on
Environmental Information Processing Technologies, 94rd AMS Annual Meeting, Atlanta, GA,
8A.4. [Available online at https://ams.confex.com/ams/94Annual/webprogram/Paper240011.html]

AMS 2013 Presentation on Rosetta:

Arms, S. C., J. O. Ganter, J. Weber, and M. K. Ramamurthy, 2013: A Web-based Tool for Translating
Unstructured Data from Dataloggers into Standard Formats. 29th Conference on Environmental Information
Processing Technologies, 93rd AMS Annual Meeting, Austin, TX, J12.3. [Available online at
https://ams.confex.com/ams/93Annual/webprogram/Paper222186.html]


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jme3.skulls.screens;

import com.bruynhuis.galago.screen.AbstractScreen;
import com.bruynhuis.galago.ui.Label;
import com.bruynhuis.galago.ui.listener.TouchButtonAdapter;
import com.bruynhuis.galago.ui.panel.GridPanel;
import com.jme3.font.BitmapFont;
import com.jme3.skulls.ui.LargeButton;
import com.jme3.skulls.ui.OnOffButton;

/**
 * This will be the settings screen. The player can switch music on or off here.
 * This screen will have a Heading It will have 2 toggle button options (Music
 * :on/off, Sound : on/off) It will also have a back/menu button It might also
 * have some background image.
 *
 * @author nidebruyn
 */
public class SettingsScreen extends AbstractScreen {

    private Label heading;
    private Label soundLabel;
    private Label musicLabel;
    private Label fxLabel;
    private OnOffButton soundButton;
    private OnOffButton musicButton;
//    private OnOffButton fxButton;
    private GridPanel gridPanel;
    private LargeButton exitButton;

    @Override
    protected void init() {

        heading = new Label(hudPanel, "Settings", 62, 800, 100);
        heading.centerTop(0, 20);

        gridPanel = new GridPanel(hudPanel, 600, 200);
        hudPanel.add(gridPanel);

        soundLabel = new Label(gridPanel, "Sound", 28, 250, 60);
        soundLabel.setAlignment(BitmapFont.Align.Right);
        soundButton = new OnOffButton(gridPanel, "sound settings panel");
        soundButton.addTouchButtonListener(new TouchButtonAdapter() {
            @Override
            public void doTouchUp(float touchX, float touchY, float tpf, String uid) {
                if (isActive()) {
                    baseApplication.getSoundManager().playSound("button");

                    if (baseApplication.getGameSaves().getGameData().isSoundOn()) {
                        baseApplication.getGameSaves().getGameData().setSoundOn(false);
                    } else {
                        baseApplication.getGameSaves().getGameData().setSoundOn(true);
                    }
                    baseApplication.getGameSaves().save();

                    baseApplication.getSoundManager().muteSound(!baseApplication.getGameSaves().getGameData().isSoundOn());
                }
            }
        });

        musicLabel = new Label(gridPanel, "Music", 28, 250, 60);
        musicLabel.setAlignment(BitmapFont.Align.Right);
        musicButton = new OnOffButton(gridPanel, "music settings panel");
        musicButton.addTouchButtonListener(new TouchButtonAdapter() {
            @Override
            public void doTouchUp(float touchX, float touchY, float tpf, String uid) {
                if (isActive()) {
                    baseApplication.getSoundManager().playSound("button");

                    if (baseApplication.getGameSaves().getGameData().isMusicOn()) {
                        baseApplication.getGameSaves().getGameData().setMusicOn(false);
                    } else {
                        baseApplication.getGameSaves().getGameData().setMusicOn(true);
                    }
                    baseApplication.getGameSaves().save();
                    baseApplication.getSoundManager().muteMusic(!baseApplication.getGameSaves().getGameData().isMusicOn());

                    if (baseApplication.getGameSaves().getGameData().isMusicOn()) {
                        baseApplication.getSoundManager().playMusic("menu");
                    }
                }
            }
        });

//        fxLabel = new Label(gridPanel, "Special FX", 28, 250, 60);
//        fxLabel.setAlignment(BitmapFont.Align.Right);
//        fxButton = new OnOffButton(gridPanel, "fx settings panel");
//        fxButton.addTouchButtonListener(new TouchButtonAdapter() {
//            @Override
//            public void doTouchUp(float touchX, float touchY, float tpf, String uid) {
//                if (isActive()) {
//                    baseApplication.getSoundManager().playSound("button");
//
//                    if (baseApplication.getGameSaves().getGameData().isFxOn()) {
//                        baseApplication.getGameSaves().getGameData().setFxOn(false);
//                    } else {
//                        baseApplication.getGameSaves().getGameData().setFxOn(true);
//                    }
//
//                    baseApplication.getGameSaves().save();
//
//                }
//            }
//        });

        gridPanel.layout(2, 2);

        exitButton = new LargeButton(hudPanel, "exit_settings_button", "Menu");
        exitButton.leftBottom(10, 10);
        exitButton.addTouchButtonListener(new TouchButtonAdapter() {
            @Override
            public void doTouchUp(float touchX, float touchY, float tpf, String uid) {
                //Check if the screen is finished loading and is showing
                if (isActive()) {
                    baseApplication.getSoundManager().playSound("button");
                    showScreen("menu");

                }
            }
        });

    }

    @Override
    protected void load() {

        if (baseApplication.getGameSaves().getGameData().isSoundOn()) {
            soundButton.setSelected(true);
        } else {
            soundButton.setSelected(false);
        }

        if (baseApplication.getGameSaves().getGameData().isMusicOn()) {
            musicButton.setSelected(true);
        } else {
            musicButton.setSelected(false);
        }

//        if (baseApplication.getGameSaves().getGameData().isFxOn()) {
//            fxButton.setSelected(true);
//        } else {
//            fxButton.setSelected(false);
//        }

    }

    @Override
    protected void show() {
    }

    @Override
    protected void exit() {
    }

    @Override
    protected void pause() {

    }

}


text:
/*
 * Do not modify this file. This file is generated from the ec2-2015-04-15.normal.json service model.
 */
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;

using Amazon.Runtime;
using Amazon.Runtime.Internal;

namespace Amazon.EC2.Model
{
    /// <summary>
    ///
    /// </summary>
    public partial class DescribeVpcEndpointServicesResponse : AmazonWebServiceResponse
    {
        private string _nextToken;
        private List<string> _serviceNames = new List<string>();

        /// <summary>
        /// Gets and sets the property NextToken.
        /// <para>
        /// The token to use when requesting the next set of items. If there are no additional
        /// items to return, the string is empty.
        /// </para>
        /// </summary>
        public string NextToken
        {
            get { return this._nextToken; }
            set { this._nextToken = value; }
        }

        // Check to see if NextToken property is set
        internal bool IsSetNextToken()
        {
            return this._nextToken != null;
        }

        /// <summary>
        /// Gets and sets the property ServiceNames.
        /// <para>
        /// A list of supported AWS services.
        /// </para>
        /// </summary>
        public List<string> ServiceNames
        {
            get { return this._serviceNames; }
            set { this._serviceNames = value; }
        }

        // Check to see if ServiceNames property is set
        internal bool IsSetServiceNames()
        {
            return this._serviceNames != null && this._serviceNames.Count > 0;
        }

    }
}


text:
package io.sample.bean.para;

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

public class SampleAppPara {

    @NotNull(message = "familyName")
    @Size(min = 1, max = 100 ,message = "familyName")
	private String family;

	private String startdate;

	private String enddate;

	private Date startDate;

	private Date endDate;

	public String getFamily() {
		return family;
	}

	public void setFamily(String family) {
		this.family = family;
	}

	public String getStartdate() {
		return startdate;
	}

	public void setStartdate(String startdate) {
		this.startdate = startdate;
	}

	public String getEnddate() {
		return enddate;
	}

	public void setEnddate(String enddate) {
		this.enddate = enddate;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

}


text:
#include "test.h"

#include "rdkafka.h"

#include "../src/rdkafka_proto.h"
#include "../src/rdunittest.h"

#include <stdarg.h>

/**
 * @name Connecting to two different clusters should emit warning.
 *
 */

static void
log_cb(const rd_kafka_t *rk, int level, const char *fac, const char *buf) {
        rd_atomic32_t *log_cntp = rd_kafka_opaque(rk);
        rd_bool_t matched       = !strcmp(fac, "CLUSTERID") &&
                            strstr(buf, "reports different ClusterId");

        TEST_SAY("%sLog: %s level %d fac %s: %s\n", matched ? _C_GRN : "",
                 rd_kafka_name(rk), level, fac, buf);

        if (matched)
                rd_atomic32_add(log_cntp, 1);
}

int main_0121_clusterid(int argc, char **argv) {
        rd_kafka_mock_cluster_t *cluster_a, *cluster_b;
        const char *bootstraps_a, *bootstraps_b;
        size_t bs_size;
        char *bootstraps;
        rd_kafka_t *rk;
        rd_kafka_conf_t *conf;
        rd_atomic32_t log_cnt;
        int cnt = 0;

        if (test_needs_auth()) {
                TEST_SKIP("Mock cluster does not support SSL/SASL\n");
                return 0;
        }

        /* Create two clusters */
        cluster_a = test_mock_cluster_new(1, &bootstraps_a);
        cluster_b = test_mock_cluster_new(1, &bootstraps_b);
        rd_kafka_mock_broker_set_down(cluster_b, 1);

        test_conf_init(&conf, NULL, 10);

        /* Combine bootstraps from both clusters */
        bs_size    = strlen(bootstraps_a) + strlen(bootstraps_b) + 2;
        bootstraps = malloc(bs_size);
        rd_snprintf(bootstraps, bs_size, "%s,%s", bootstraps_a, bootstraps_b);
        test_conf_set(conf, "bootstrap.servers", bootstraps);
        free(bootstraps);

        rd_atomic32_init(&log_cnt, 0);
        rd_kafka_conf_set_log_cb(conf, log_cb);
        rd_kafka_conf_set_opaque(conf, &log_cnt);

        rk = test_create_handle(RD_KAFKA_PRODUCER, conf);

        while (rd_atomic32_get(&log_cnt) == 0) {
                const rd_kafka_metadata_t *md;

                /* After 3 seconds bring down cluster a and bring up
                 * cluster b, this is to force the client to connect to
                 * the other cluster. */
                if (cnt == 3) {
                        rd_kafka_mock_broker_set_down(cluster_a, 1);
                        rd_kafka_mock_broker_set_up(cluster_b, 1);
                }

                if (!rd_kafka_metadata(rk, 1, NULL, &md, 1000))
                        rd_kafka_metadata_destroy(md);
                rd_sleep(1);

                cnt++;
        }

        rd_kafka_destroy(rk);
        test_mock_cluster_destroy(cluster_a);
        test_mock_cluster_destroy(cluster_b);

        return 0;
}


text:
Alfred [![Build Status](https://travis-ci.org/InspireNXE/Alfred.svg?branch=master)](https://travis-ci.org/InspireNXE/Alfred)
=========

[Gradle]: http://www.gradle.org
[Issues]: https://github.com/InspireNXE/Alfred/issues
[Java]: http://www.java.com
[MIT License]: http://www.tldrlegal.com/license/mit-license
[Source]: https://github.com/InspireNXE/Alfred/


text:
declare namespace org {
  namespace w3c {
    namespace dom {
      namespace html {

        interface HTMLFontElement extends org.w3c.dom.html.HTMLElement {
          getColor(): java.lang.String
          setColor(arg0: java.lang.String | string): void
          getFace(): java.lang.String
          setFace(arg0: java.lang.String | string): void
          getSize(): java.lang.String
          setSize(arg0: java.lang.String | string): void
        }

      }
    }
  }
}


text:
module Spree
  class OrdersController < Spree::StoreController
    ssl_required :show

    rescue_from ActiveRecord::RecordNotFound, :with => :render_404
    helper 'spree/products'

    respond_to :html

    def show
      @order = Order.find_by_number!(params[:id])
      respond_with(@order)
    end

    def update
      @order = current_order
      if @order.update_attributes(params[:order])
        @order.line_items = @order.line_items.select {|li| li.quantity > 0 }
        fire_event('spree.order.contents_changed')
        respond_with(@order) do |format|
          format.html do
            if params.has_key?(:checkout)
              @order.next_transition.run_callbacks
              redirect_to checkout_state_path(@order.checkout_steps.first)
            else
              redirect_to cart_path
            end
          end
        end
      else
        respond_with(@order)
      end
    end

    # Shows the current incomplete order from the session
    def edit
      @order = current_order(true)
      associate_user
    end

    # Adds a new item to the order (creating a new order if none already exists)
    def populate
      populator = Spree::OrderPopulator.new(current_order(true), current_currency)
      if populator.populate(params.slice(:products, :variants, :quantity))
        fire_event('spree.cart.add')
        fire_event('spree.order.contents_changed')
        respond_with(@order) do |format|
          format.html { redirect_to cart_path }
        end
      else
        flash[:error] = populator.errors.full_messages.join(" ")
        redirect_to :back
      end
    end

    def empty
      if @order = current_order
        @order.empty!
      end

      redirect_to spree.cart_path
    end

    def accurate_title
      @order && @order.completed? ? "#{Order.model_name.human} #{@order.number}" : t(:shopping_cart)
    end
  end
end


text:
layout: post
sympy_post: true
title: Coding Period Week 5
week: 19 June 2016 - 25 June 2016
posted_on: 21 June 2016
type: post
categories: gsoc2016_post
permalink: /blog/GSoC-2016/:title
tags:
  - Open Source
  - GSoC
  - SymPy
---

**Continue- nonlinsolve :**

PR [#11111](https://github.com/sympy/sympy/pull/11111)

* I found the case where complex solution is missed. When `solve_poly_system` is solving polynomial equation and that result is used
in solving non polynomial-equation to get other soln. May be `solve_poly_system` return only real solution( so complex solution is not being used for further steps) thats why further step is with this real solution.

* It seems `solve_poly_system` is doing it's job since it is not designed for all solution. But we have `substitution` method using
`solveset_real` and `solveset_complex` and retuning all solutionn. In new commits I improved the code and now `substitution` method can solve all kind of system independently.

* I come across these kind of situation many times :

```
In [68]: x, y, z, r, t = symbols('x, y, z, r, t', real = True)

In [69]: soln = solveset(sqrt(r)*Abs(tan(t))/sqrt(tan(t)**2 + 1) + x*tan(t),x,S.Reals)

In [70]: soln
Out[70]:
          ⎧      √r⋅│tan(t)│      ⎫
(-∞, ∞) ∩ ⎪───────────────────────⎪
          ⎨   _____________       ⎬
          ⎪  ╱    2               ⎪
          ⎩╲╱  tan (t) + 1 ⋅tan(t)⎭

In [71]: soln = solveset(sqrt(r)*Abs(tan(t))/sqrt(tan(t)**2 + 1) + x*tan(t),x)

In [72]: soln
Out[72]:
⎧     -√r⋅│tan(t)│      ⎫
⎪───────────────────────⎪
⎨   _____________       ⎬
⎪  ╱    2               ⎪
⎩╲╱  tan (t) + 1 ⋅tan(t)⎭

```
In other words :

```
In [1]: Intersection(FiniteSet(-x), S.Reals)
Out[1]: (-∞, ∞) ∩ {x}

In [2]: Intersection(FiniteSet(x), S.Reals)
Out[2]: ℝ ∩ {x}

```

So I am not able to extract the `-x` here. Because of this `nonlinsolve` returning some extra soln.
One case is in test file : `test_issue_5132`.

I opened a PR for this [#11280](https://github.com/sympy/sympy/pull/11280)

* If someone wants to see the changes I did in `nonlinsolve` then check these gist [nonlinsolve_till_24june_2016](https://gist.github.com/Shekharrajak/5e77fe344c996c17c177985853884985),
[nonlinsolve_till_21jun2016.py](https://gist.github.com/Shekharrajak/5d285ce0cf113cfc217c3e33c3ca04c0).

**previous PRs update :**

* [#11188](https://github.com/sympy/sympy/pull/11188) - Simplified Solution for Trigonometric equation :
 I did some minor changes.Now I hope it is good to go.

* [#11234](https://github.com/sympy/sympy/pull/11234) - Connecting Diophantine and solveset to get Integer solution:
added some testcases. I have defined `solveset_integers` for this, it take take list of symbols(to get soln in that order).t
But Currently solveset takes one symbol. I hope this PR is good to go.

* [11257](https://github.com/sympy/sympy/pull/11257) - solveset univariate trig inequality solvers : Actually to simplify the
soln I need to use PR [#11188](https://github.com/sympy/sympy/pull/11188), so if it got merged that code will help me in this PR.

--------------------------------------------------------------------------------

**Meanwhile :**

* I worked on these previous PRs regarding issues I reported [#11239](https://github.com/sympy/sympy/pull/11239), [11280](https://github.com/sympy/sympy/pull/11280).

--------------------------------------------------------------------------------
**continue..**


text:
//
//  DAGroupsIDViewController.m
//  AMSlideMenu
//
//  Created by Егор on 8/22/14.
//  Copyright (c) 2014 Artur Mkrtchyan. All rights reserved.
//

#import "DAGroupsIDViewController.h"
#import "UIImageView+AFNetworking.h"
#import "DAUserVK.h"
#import "SVProgressHUD.h"

@interface DAGroupsIDViewController ()
@property(weak, nonatomic) DAServerManager *networkingVK;
@property(nonatomic, weak) DAUserVK *userVK;
@property (nonatomic, readwrite, strong) MNMPullToRefreshManager *pullToRefreshManager;
@property (strong, nonatomic) UIColor *myColorBlack;
@property (strong, nonatomic) UIColor *myColorBlue;
@property (strong, nonatomic) UIColor *myColorRed;
@property (strong, nonatomic) UIColor *myColorWhite;
@property (strong, nonatomic) UIColor *myColorBrown;

@end

@implementation DAGroupsIDViewController
@synthesize pullToRefreshManager = pullToRefreshManager_;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}
- (void) loadView {

    [super loadView];

    self.myColorBlack = [UIColor colorWithRed:15.f / 255.f green:14.f / 255.f blue:15.f / 255.f alpha:1.0];
    self.myColorBlue = [UIColor colorWithRed:31.f / 255.f green:51.f / 255.f blue:82.f / 255.f alpha:1.0];
    self.myColorRed = [UIColor colorWithRed:220.f / 255.f green:54.f / 255.f blue:16.f / 255.f alpha:1.0];
    self.myColorBrown = [UIColor colorWithRed:217.f / 255.f green:203.f / 255.f blue:158.f / 255.f alpha:1.0];
    self.myColorWhite = [UIColor whiteColor];

}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.networkingVK = [DAServerManager sharedManager];

    pullToRefreshManager_ = [[MNMPullToRefreshManager alloc] initWithPullToRefreshViewHeight:60.0f
                                                                                tableView:self.tableView
                                                                                withClient:self];

    [SVProgressHUD show];
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        [self.networkingVK udloadAllInfoFriendsOnSuccess:^(DAUserVK *user) {
            [self.tableView reloadData];
            self.userVK = user;
            // NSLog(@"%@", [self.userVK arrayName]);
        [SVProgressHUD dismiss];

        } onFailure:^(NSError *error) {

        }];

    });

}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

  //  NSLog(@"%lu",(unsigned long)[self.networkingVK.arrayName count]);
    return  [self.networkingVK.arrayName count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                      reuseIdentifier:CellIdentifier];
    }

    NSString *stringName = [self.networkingVK.arrayName objectAtIndex:indexPath.row];
    NSString *stringFamily = [self.networkingVK.arrayFamily objectAtIndex:indexPath.row];
    NSString *stringPhoto = [self.networkingVK.arrayPhoto objectAtIndex:indexPath.row];
    NSString *string = [stringName stringByAppendingString:@" "];
    NSString*stringTwo = [string stringByAppendingString:stringFamily];

    cell.textLabel.text = [NSString stringWithFormat:@"%@",stringTwo];
//    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:stringPhoto]];
//
//    UIImageView *imageView = [[UIImageView alloc] init];
//
//    [imageView setImageWithURL:[NSURL URLWithString:stringPhoto]];
//    UIImage *image = [UIImage alloc]
//    cell.imageView.image = ;

    NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:stringPhoto]];

    __weak UITableViewCell* weakCell = cell;

    cell.imageView.image = nil;

    [cell.imageView
     setImageWithURLRequest:request
     placeholderImage:nil
     success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {

         weakCell.imageView.image = image;
         [weakCell layoutSubviews];
     }
     failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) {

     }];

    return cell;
}

#pragma mark - TableView Delegate

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {

    cell.frame = CGRectMake(0 - CGRectGetWidth(cell.frame), CGRectGetMinY(cell.frame),
                            CGRectGetWidth(cell.frame), CGRectGetHeight(cell.frame));

    [UIView animateWithDuration:0.3
                          delay:0.1
                        options:UIViewAnimationOptionCurveEaseOut
                     animations:^{

                         cell.frame = CGRectMake(0, CGRectGetMinY(cell.frame),
                                                 CGRectGetWidth(cell.frame),
                                                 CGRectGetHeight(cell.frame));

                         cell.backgroundColor = self.myColorBrown;

                     } completion:^(BOOL finished) {

                         [UIView animateWithDuration:0.2
                                          animations:^{

                                              cell.backgroundColor = [UIColor darkGrayColor];
                                          }];
                     }];
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {

    UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,
                                                                  CGRectGetWidth([tableView rectForHeaderInSection:section]),
                                                                  CGRectGetHeight([tableView rectForHeaderInSection:section]))];
    headerView.backgroundColor = self.myColorRed;

    UILabel *headerTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0,
                                                                         CGRectGetWidth([tableView rectForHeaderInSection:section]),
                                                                         CGRectGetHeight([tableView rectForHeaderInSection:section]))];
    headerTextLabel.textColor = self.myColorWhite;

    headerTextLabel.text = @"online";
    [headerView addSubview:headerTextLabel];

    return headerView;
}

#pragma mark -
#pragma mark Aux view methods

/*
 * Loads the table and restores the PTR view to its initial state
 */
- (void)loadTable {
    [self viewDidLoad];
    [self.tableView reloadData];

    [pullToRefreshManager_ tableViewReloadFinishedAnimated:YES];
}

#pragma mark -
#pragma mark MNMBottomPullToRefreshManagerClient

/**
 * This is the same delegate method as UIScrollView but required in MNMBottomPullToRefreshManagerClient protocol
 * to warn about its implementation. Here you have to call [MNMBottomPullToRefreshManager tableViewScrolled]
 *
 * Tells the delegate when the user scrolls the content view within the receiver.
 *
 * @param scrollView: The scroll-view object in which the scrolling occurred.
 */
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {

    [pullToRefreshManager_ tableViewScrolled];
}

/**
 * This is the same delegate method as UIScrollView but required in MNMBottomPullToRefreshClient protocol
 * to warn about its implementation. Here you have to call [MNMBottomPullToRefreshManager tableViewReleased]
 *
 * Tells the delegate when dragging ended in the scroll view.
 *
 * @param scrollView: The scroll-view object that finished scrolling the content view.
 * @param decelerate: YES if the scrolling movement will continue, but decelerate, after a touch-up gesture during a dragging operation.
 */
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {

    [pullToRefreshManager_ tableViewReleased];
}

/**
 * Tells client that refresh has been triggered
 * After reloading is completed must call [MNMPullToRefreshManager tableViewReloadFinishedAnimated:]
 *
 * @param manager PTR manager
 */
- (void)pullToRefreshTriggered:(MNMPullToRefreshManager *)manager {

    [self performSelector:@selector(loadTable) withObject:nil afterDelay:1.0f];
}

@end


text:
package com.vmware.reviewboard.domain;

public class RepositoryResponse extends BaseResponseEntity {

    public Repository repository;

}


text:
package org.sfm.reflect.primitive;

public interface CharacterGetter<T> {
	char getCharacter(T target)  throws Exception;
}


text:
package me.majiajie.db.entity;

import javax.persistence.*;

/**
 * Created by MJJ on 2016/4/18.
 */
@Entity
@Table(name = "commodity", schema = "htest", catalog = "")
public class CommodityEntity {
    private int id;
    private String name;
    private Double price;
    private Integer userid;

    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "id")
    public int getId() {
        return id;
    }

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

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

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

    @Basic
    @Column(name = "price")
    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CommodityEntity that = (CommodityEntity) o;

        if (id != that.id) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (price != null ? !price.equals(that.price) : that.price != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "userid")
    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }
}


text:
package org.apache.causeway.testing.fixtures.applib.queryresultscache;

import javax.annotation.Priority;
import javax.inject.Named;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

import org.apache.causeway.applib.annotation.PriorityPrecedence;
import org.apache.causeway.applib.services.queryresultscache.QueryResultsCache;
import org.apache.causeway.applib.services.queryresultscache.QueryResultsCacheControl;
import org.apache.causeway.testing.fixtures.applib.events.FixturesInstalledEvent;
import org.apache.causeway.testing.fixtures.applib.events.FixturesInstallingEvent;

/**
 * In separate class because {@link QueryResultsCache} itself is request-scoped
 */
@Service
@Named("causeway.testing.fixtures.QueryResultsCacheControlForFixtures")
@Priority(PriorityPrecedence.MIDPOINT)
@Qualifier("ForFixtures")
public class QueryResultsCacheControlForFixtures implements QueryResultsCacheControl {

    @EventListener(FixturesInstallingEvent.class)
    public void onFixturesInstallingEvent(FixturesInstallingEvent ev) {
        fixturesInstalling = true;
    }

    @EventListener(FixturesInstalledEvent.class)
    public void onFixturesInstallingEvent(FixturesInstalledEvent ev) {
        fixturesInstalling = false;
    }

    private boolean fixturesInstalling;

    @Override
    public boolean isIgnoreCache() {
        return fixturesInstalling;
    }
}


text:
#pragma once
#include <aws/discovery/ApplicationDiscoveryService_EXPORTS.h>
#include <aws/discovery/ApplicationDiscoveryServiceRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace ApplicationDiscoveryService
{
namespace Model
{

  /**
   */
  class AWS_APPLICATIONDISCOVERYSERVICE_API CreateApplicationRequest : public ApplicationDiscoveryServiceRequest
  {
  public:
    CreateApplicationRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "CreateApplication"; }

    Aws::String SerializePayload() const override;

    Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

    /**
     *
Name of the application to be created.

     */
    inline const Aws::String& GetName() const{ return m_name; }

    /**
     *
Name of the application to be created.

     */
    inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }

    /**
     *
Name of the application to be created.

     */
    inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }

    /**
     *
Name of the application to be created.

     */
    inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }

    /**
     *
Name of the application to be created.

     */
    inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }

    /**
     *
Name of the application to be created.

     */
    inline CreateApplicationRequest& WithName(const Aws::String& value) { SetName(value); return *this;}

    /**
     *
Name of the application to be created.

     */
    inline CreateApplicationRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}

    /**
     *
Name of the application to be created.

     */
    inline CreateApplicationRequest& WithName(const char* value) { SetName(value); return *this;}

    /**
     *
Description of the application to be created.

     */
    inline const Aws::String& GetDescription() const{ return m_description; }

    /**
     *
Description of the application to be created.

     */
    inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }

    /**
     *
Description of the application to be created.

     */
    inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }

    /**
     *
Description of the application to be created.

     */
    inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }

    /**
     *
Description of the application to be created.

     */
    inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }

    /**
     *
Description of the application to be created.

     */
    inline CreateApplicationRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}

    /**
     *
Description of the application to be created.

     */
    inline CreateApplicationRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}

    /**
     *
Description of the application to be created.

     */
    inline CreateApplicationRequest& WithDescription(const char* value) { SetDescription(value); return *this;}

  private:

    Aws::String m_name;
    bool m_nameHasBeenSet = false;

    Aws::String m_description;
    bool m_descriptionHasBeenSet = false;
  };

} // namespace Model
} // namespace ApplicationDiscoveryService
} // namespace Aws


text:
- Added `follow user`
- Added settings
- Added `static page` publish
- Added `customize the default home path`
- Added new footer
- Added adspaces and advertisements
- Added new `validations` & `exceptions`
- Integrated laravel-auto-presenter
- Integrated Pjax
- Integrated CAPTCHA for register and login

### Changed
- Moved `partilas errors` from dashboard to parent
- Followable threads(users)
- Removed `Flash`
- Improved threads filters

### Fixed
- Fixed `Follow`
- Fixed `Install` bug


text:
import React, { useEffect, useState, useRef } from 'react';

import { debounce } from '../../utils/debounce';
import { gettext } from '../../utils/gettext';
import Icon from '../Icon/Icon';

import CollapseAll from './CollapseAll';
import MinimapItem, { MinimapMenuItem } from './MinimapItem';

export interface MinimapProps {
  container: HTMLElement;
  anchorsContainer: HTMLElement;
  links: readonly MinimapMenuItem[];
  onUpdate: (container: HTMLElement) => void;
  toggleAllPanels: (expanded: boolean) => void;
}

const observerOptions = {
  root: null,
  // Count an element as "in", accounting for the 50px slim header and 70px actions footer.
  rootMargin: '-50px 0px -70px 0px',
  // 10% visibility within the boxed viewport is enough.
  threshold: 0.1,
};

type LinkIntersections = {
  [href: string]: boolean;
};

const mapIntersections = (
  acc: LinkIntersections,
  { target, isIntersecting }: IntersectionObserverEntry,
) => {
  const href = `#${target.closest('[data-panel]')?.id}` || '';
  acc[href] = isIntersecting;
  return acc;
};

/**
 * For cases where the minimap has more item than can fit in the viewport,
 * we need to keep its scroll position updated to follow page scrolling.
 */
const updateScrollPosition = (list: HTMLOListElement) => {
  const activeLinks = list.querySelectorAll<HTMLElement>(
    'a[aria-current="true"]',
  );

  if (activeLinks.length === 0) {
    return;
  }

  const firstActive = activeLinks[0];
  const lastActive = activeLinks[activeLinks.length - 1];
  let newScroll = list.scrollTop;
  if (firstActive) {
    if (firstActive.offsetTop < list.scrollTop) {
      newScroll = firstActive.offsetTop;
    }
  }
  if (lastActive) {
    if (lastActive.offsetTop > list.scrollTop + list.offsetHeight) {
      newScroll =
        lastActive.offsetTop - list.offsetHeight + lastActive.offsetHeight;
    }
  }

  // Scroll changes require mutating this property.
  // eslint-disable-next-line no-param-reassign
  list.scrollTop = newScroll;
};

/**
 * Minimap sidebar menu, with one internal link per section of the page.
 * The minimap has a lot of advanced behavior:
 * - It opens and closes based on hover, except if interacted with.
 * - It also opens and closes when clicking its toggle.
 * - It closes when clicking outside.
 * - It uses IntersectionObserver to display which menu items are currently "visible" on the page.
 */
const Minimap: React.FunctionComponent<MinimapProps> = ({
  container,
  anchorsContainer,
  links,
  onUpdate,
  toggleAllPanels,
}) => {
  const [expanded, setExpanded] = useState<boolean>(false);
  // Keep track of whether we should keep the minimap expanded (should auto-close on mouseout if not interacted with).
  const [keepExpanded, setKeepExpanded] = useState<boolean>(false);
  // Collapse all yes/no state.
  const [panelsExpanded, setPanelsExpanded] = useState<boolean>(true);
  const [intersections, setIntersections] = useState<LinkIntersections>({});
  const observer = useRef<IntersectionObserver | null>(null);
  const lastIntersections = useRef({});
  const updateLinks = useRef<CallableFunction | null>(null);
  const listRef = useRef<HTMLOListElement>(null);

  // Keep track of all the different ways the minimap can be opened and closed.
  const onMouseOver = () => {
    if (window.matchMedia('(hover: hover)').matches) {
      // Opening with hover should not keep the menu expanded.
      setExpanded(true);
    }
  };
  const onMouseOut = () => {
    if (window.matchMedia('(hover: hover)').matches) {
      if (!keepExpanded) {
        setExpanded(false);
        setKeepExpanded(false);
      }
    }
  };
  const onClickToggle = () => {
    setExpanded(!expanded);
    setKeepExpanded(!expanded);
  };
  const onClickLink = (e: React.MouseEvent) => {
    // Prevent navigating if the link is only partially shown.
    if (!expanded) {
      e.preventDefault();
    }
    setExpanded(true);
    setKeepExpanded(true);
  };

  useEffect(() => {
    const onClickOutside = (e: MouseEvent) => {
      if (container.contains(e.target as HTMLElement)) {
        return;
      }
      setExpanded(false);
      setKeepExpanded(false);
    };
    document.addEventListener('click', onClickOutside, true);
  }, []);

  /**
   * Performance-sensitive intersections calculations with a double debounce:
   * - With the IntersectionObserver API, the browser decides how often to update us, compared to constant `scroll`.
   * - We keep track of intersecting elements on every IntersectionObserver update,
   * - but only update the links after updates have stopped for 100ms.
   */
  useEffect(() => {
    const obsCallback = (newEntries) => {
      lastIntersections.current = newEntries.reduce(mapIntersections, {
        ...lastIntersections.current,
      });

      if (!updateLinks.current) {
        updateLinks.current = debounce((newIntersections) => {
          setIntersections(newIntersections);
          updateScrollPosition(listRef.current as HTMLOListElement);
        }, 100);
      }

      updateLinks.current(lastIntersections.current);

      // Support for InlinePanel removals: when they stop intersecting, re-render the whole minimap.
      newEntries.forEach(({ target }) => {
        const deletedInlinePanel = target.closest('.deleted');
        if (deletedInlinePanel) {
          onUpdate(container);
        }
      });
    };

    if (!observer.current) {
      observer.current = new IntersectionObserver(obsCallback, observerOptions);
    }

    const obs = observer.current as IntersectionObserver;

    obs.disconnect();

    links.forEach(({ panel, toggle }) => {
      // Special-case for top-level InlinePanel and StreamField, where the
      // link only shows as active if the anchor is in view.
      const isTopLevelNested =
        panel.matches('.w-panel--nested') &&
        panel.closest('[data-field]') === null;
      obs.observe(isTopLevelNested ? toggle : panel);
    });

    return () => {
      obs.disconnect();
    };
  }, [links, container]);

  useEffect(() => {
    // Reset the "collapse all" when switching tabs.
    setPanelsExpanded(true);
  }, [anchorsContainer, setPanelsExpanded]);

  return (
    // Keyboard support is implemented with the toggle button.
    // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events

      <CollapseAll
        expanded={panelsExpanded}
        onClick={() => {
          setPanelsExpanded(!panelsExpanded);
          toggleAllPanels(!panelsExpanded);
        }}
        floating
        insideMinimap={expanded}
      />
      <div className={`w-minimap ${expanded ? 'w-minimap--expanded' : ''}`}>

          <button
            type="button"
            aria-expanded={expanded}
            onClick={onClickToggle}
            className="w-minimap__toggle"
            // Not the most correct label, but matches side panels with similar toggles.
            aria-label={gettext('Toggle side panel')}
          >
            <Icon name="expand-right" />
          </button>

          {links.map((link) => (

              <MinimapItem
                item={link}
                intersects={intersections[link.href]}
                expanded={expanded}
                onClick={onClickLink}
              />

          ))}

  );
};

export default Minimap;


text:
(function (){
    'use strict';
    function <%= ctrlname %> (){
        var vm = this;
    }

    angular.module('<%= appname %>').controller('<%= ctrlname %>', <%= ctrlname %>);

})();


text:
package flight

import (
	"github.com/go-kit/kit/log"
	"k8s.io/client-go/tools/record"

	"github.com/sapcc/kubernikus/pkg/api/models"
	v1 "github.com/sapcc/kubernikus/pkg/apis/kubernikus/v1"
	"github.com/sapcc/kubernikus/pkg/controller/base"
	"github.com/sapcc/kubernikus/pkg/controller/config"
)

// =================================================================================
// FlightControl
// =================================================================================
//
// This controller takes care about Kluster health. It looks for obvious
// problems and tries to repair them.
//
// Currently implemented are the following helpers. See docs/controllers.md for
// more in depth explanation why these are required.
//
//
// Delete Incompletely Spawned Instances:
//
// It deletes Nodes that didn't manage to register within 10m after initial
// creation. This is a workaround for DHCP/DVS (latency) issues.  In effect it
// will delete the incompletely spawned node and launch control will ramp it
// back up.
//
//
// Delete Errored Instances:
//
// It deletes Nodes that are in state "error". This can have various causes. It
// frequently happens when instances are interrupted with another instance
// action while being spawned. Most interesstingly a Node also goes into
// "error" if the creation takes longer than the validity of the Keystone token
// used to create the VM. Instance create is a sequence of actions that happen
// sequentially in the same Nova request. If those take too long the next
// action in line will fail with an authentication error. This sets the VM into
// "error" state.
// FlightControl will pick these up and delete them.  GroundControl on the
// other hand ignores errored instances and just creates additional nodes. This
// leads to quota exhaustion and left-over instances. This could be the ultimate
// battle.
//
//
// Ensure Pod-to-Pod Communication via Security Group Rules:
//
// It ensures tcp/udp/icmp rules exist in the security group defined during
// kluster creation. The rules explicitly allow all pod-to-pod communication.
// This is a workaround for Neutron missing the side-channel security group
// events.
//
//
// Ensure Nodes belong to the security group:
//
// It ensures each Nodes is member of the security group defined in the kluster
// spec. This ensures missing security groups due to whatever reason are again
// added to the node.

type FlightController struct {
	Factory FlightReconcilerFactory
	Logger  log.Logger
}

func NewController(threadiness int, factories config.Factories, clients config.Clients, recorder record.EventRecorder, logger log.Logger) base.Controller {

	logger = log.With(logger, "controller", "flight")
	factory := NewFlightReconcilerFactory(factories.Openstack, clients.Kubernetes, factories.NodesObservatory.NodeInformer(), recorder, logger)

	var controller base.Reconciler
	controller = &FlightController{factory, logger}

	return base.NewController(threadiness, factories, controller, logger, nil, "flight")
}

func (d *FlightController) Reconcile(kluster *v1.Kluster) (bool, error) {
	//Skip klusters not in state running
	if kluster.Status.Phase != models.KlusterPhaseRunning {
		return false, nil
	}
	//Skip flight controller for klusters without cloudprovider
	if kluster.Spec.NoCloud {
		return false, nil
	}

	reconciler, err := d.Factory.FlightReconciler(kluster)
	if err != nil {
		return false, err
	}

	reconciler.EnsureKubernikusRuleInSecurityGroup()
	reconciler.EnsureInstanceSecurityGroupAssignment()
	reconciler.DeleteIncompletelySpawnedInstances()
	reconciler.DeleteErroredInstances()
	reconciler.EnsureServiceUserRoles()
	reconciler.EnsureNodeMetadataAndTags()

	return false, nil
}


text:
#include "CryptDocTemplate.h"
#include "FileTools.h"
#include "ChrTools.h"

CCryptDocTemplate::CCryptDocTemplate(UINT nIDResource, CRuntimeClass* pDocClass,
		CRuntimeClass* pFrameClass, CRuntimeClass* pViewClass)
		: CMultiDocTemplate(nIDResource, pDocClass, pFrameClass, pViewClass)
{
}

CDocTemplate::Confidence CCryptDocTemplate::MatchDocType(LPCTSTR lpszPathName,
	CDocument*& rpDocMatch)
{
	/* ok = 0 noAttempt
	        1 maybeAttemptForeign,
			2 maybeAttemptNative,
			3 yesAttemptForeign,
			4 yesAttemptNative,
			5 yesAlreadyOpen
	*/
	Confidence conf = noAttempt;

	ASSERT(lpszPathName != NULL);

	// see what the original routine finds ...

	conf = CDocTemplate::MatchDocType(lpszPathName, rpDocMatch);

	if((conf==yesAlreadyOpen)||(conf==yesAttemptNative)) return conf;

	// otherwise we will try to identify the content

	CString strType;
	// get the file type and return if none available
	if (!GetDocString(strType, CDocTemplate::regFileTypeName) || strType.IsEmpty())
		return maybeAttemptForeign;
	if(strType=="HEX File Type")
		return maybeAttemptForeign;

	if(strType=="Plot File Type")
		return noAttempt;

	// read file

	FILE *fi;
	unsigned char buffer[4096];
	signed char c;
	int l,i;
	int ok;

	fi = fopen(lpszPathName, "rb");
	if(!fi) return maybeAttemptForeign;
	int curlinelen=0;

	if(strType=="TEXT File Type") {
		ok=2;
		do {
	      l = fread(buffer, 1, sizeof(buffer), fi);
		    for(i=0;i<l;i++) {
				if(curlinelen++ > 256) {
					ok=min(ok,1);
				}
				c=buffer[i];
				if(c=='\n')	curlinelen=0;
				if((c==9) || (c==13) || (c==10) || (c<0)) continue;
				if(IsText(c)) continue;
				ok=0;
				break;
			}
			if(!ok) break;
		} while (l>0);
	}

	if(strType=="ASCII File Type") {
		ok = 3;
		do {
	      l = fread(buffer, 1, sizeof(buffer), fi);
		    for(i=0;i<l;i++) {
				if(MyIsLower(buffer[i])) ok=min(ok,2);
				if(MyIsAlpha((unsigned char)buffer[i])) continue;
				ok=0;
				break;
			}
			if(!ok) break;
		} while (l>0);
	}

	if(strType=="OpenGL File Type") {
		ok = 4;
		l = fread(buffer, 1, 6, fi);
		if (strncmp((char*)buffer, "OPENGL",5)) ok = 0;
	}

	fclose(fi);
	switch(ok) {
	case(1): return maybeAttemptForeign;
	case(2): return maybeAttemptNative;
	case(3): return yesAttemptForeign;
	case(4): return yesAttemptNative;
	}

	return noAttempt;
}

CCryptDocTemplate::~CCryptDocTemplate()
{
}

#ifdef AFX_INIT_SEG
#pragma code_seg(AFX_INIT_SEG)
#endif

IMPLEMENT_DYNAMIC(CCryptDocTemplate, CMultiDocTemplate)


text:
package util

import java.io._
import java.net.URI
import java.security.PrivilegedAction

import models.Tables
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.hadoop.security.SaslRpcServer.AuthMethod
import org.apache.hadoop.security.UserGroupInformation
import org.apache.hadoop.util.Progressable

import scala.concurrent.{Future, Promise}
import collection.JavaConverters._

/** manages the connection to the HDFS */
object HDFS {

  /** writes a file to HDFS */
  def writeFile(globalSetting: Tables.GlobalSetting, fileName: String, uploadedFile: File) = {
    val fis = new FileInputStream(uploadedFile)
    writeStream(globalSetting, fileName, fis)
  }

  /** writes a stream to HDFS */
  def writeStream(globalSetting: Tables.GlobalSetting, fileName: String, inputStream: InputStream) = {
    val hdfsUrl = globalSetting.fsDefaultName
    //"hdfs://localhost:9001"
    val qryGraphFolder = globalSetting.qrygraphFolder //"/user/qrygraph/"

    UserGroupInformation.createRemoteUser(globalSetting.hadoopUser, AuthMethod.SIMPLE).doAs(new PrivilegedAction[Unit] {
      override def run(): Unit = {
        val configuration = new Configuration()
        configuration.set("dfs.client.use.datanode.hostname", "true")
        val hdfs = FileSystem.get(new URI(hdfsUrl), configuration)

        //check if our folder exists and create it if needed
        val qryfolder = new Path(hdfsUrl + qryGraphFolder)
        if (!hdfs.exists(qryfolder)) {
          hdfs.mkdirs(qryfolder)
        }

        val file = new Path(hdfsUrl + "/" + qryGraphFolder + "/" + fileName)
        if (hdfs.exists(file)) {
          hdfs.delete(file, true)
        }

        val os = hdfs.create(file,
          new Progressable() {
            def progress() {
              println("...working...")
            }
          })

        // in
        val in = new BufferedReader(new InputStreamReader(inputStream))
        // out
        val out = new BufferedWriter(new OutputStreamWriter(os))

        var aLine = in.readLine()
        while (aLine != null) {
          //Process each line and add output to Dest.txt file
          out.write(aLine)
          out.newLine()
          aLine = in.readLine()
        }
        // do not forget to close the buffer reader
        in.close()
        // close buffer writer
        out.close()
        hdfs.close()
      }
    })
  }

  /** reads results of a query execution */
  def readResults(globalSetting: Tables.GlobalSetting, queryId: String, dataLimit: Option[Int] = None): Future[List[String]] = {
    val hdfsUrl = globalSetting.fsDefaultName
    val qryGraphFolder = globalSetting.qrygraphFolder

    val promise = Promise[List[String]]()

    UserGroupInformation.createRemoteUser(globalSetting.hadoopUser, AuthMethod.SIMPLE).doAs(new PrivilegedAction[Unit] {
      override def run(): Unit = {
        val configuration = new Configuration()
        configuration.set("dfs.client.use.datanode.hostname", "true")
        val hdfs = FileSystem.get(new URI(hdfsUrl), configuration)

        val file = new Path(hdfsUrl + "/" + qryGraphFolder + "/results/" + queryId + "/part-r-00000")
        if (!hdfs.exists(file)) {
          promise.success(List("NO DATA AVAILABLE YET - PLEASE DEPLOY & EXECUTE"))
        } else {
          // results available -> read them
          val br = new BufferedReader(new InputStreamReader(hdfs.open(file)))
          // apply the datalimit if set
          dataLimit match {
            case Some(n) => promise.success(br.lines().iterator().asScala.take(n).toList)
            case None    => promise.success(br.lines().iterator().asScala.toList)
          }
        }
        hdfs.close()
      }
    })
    promise.future
  }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Allescheria laricis R. Hartig, 1899

### Remarks
null


text:
namespace {
const char kCapability[] = "securityKey";
}

namespace remoting {

SecurityKeyExtension::SecurityKeyExtension(
    scoped_refptr<base::SingleThreadTaskRunner> file_task_runner)
    : file_task_runner_(file_task_runner) {}

SecurityKeyExtension::~SecurityKeyExtension() = default;

std::string SecurityKeyExtension::capability() const {
  return kCapability;
}

std::unique_ptr<HostExtensionSession>
SecurityKeyExtension::CreateExtensionSession(
    ClientSessionDetails* details,
    protocol::ClientStub* client_stub) {
  // TODO(joedow): Update this mechanism to allow for multiple sessions.  The
  //               extension will only send messages through the initial
  //               |client_stub| and |details| with the current design.
  return base::WrapUnique(
      new SecurityKeyExtensionSession(details, client_stub, file_task_runner_));
}

}  // namespace remoting


text:
package cc.factorie.app.nlp.segment

import cc.factorie.app.nlp._
import scala.collection.mutable.ArrayBuffer

/**
 * concatenates words split by hyphens in the original text based on user-provided dictionary
 * or other words in the same document. It works on the output of the tokenizer.
 * Caution: It modifies the output of the tokenizer by removing some tokens so run this before any other downstream tasks.
 * @param tokenizer tokenizer to use to tokenize the doc. Default is DeterministicTokenizer
 * @param dictionary dictionary to lookup to check for merge eligibility
 * @param useTokens if true, other tokens in document are used to check for merge eligibility
 * @author harshal
 */
class DehyphenatingTokenizer[T <: DocumentAnnotator](tokenizer: T = new DeterministicTokenizer(), dictionary: Set[String] = Set.empty[String], useTokens: Boolean) extends DocumentAnnotator {

  def tokenize(document: Document) = tokenizer.process(document)

  def process(document: Document) = {
    val tokenizedDoc = tokenize(document)

    lazy val dictionaryFromDocWords = buildDictionaryFromDocWords(tokenizedDoc.tokens)

    def eligibleForMerge(first: String, last:String) = dictionary((first+last).toLowerCase) || (useTokens && dictionaryFromDocWords((first+last).toLowerCase))

    var _skipCounter = 0

    for(section <- tokenizedDoc.sections){
      if(section.tokens.size>2){ //if the section has less than 3 tokens, nothing to do
      var lastWindow: IndexedSeq[Token] = null
        for(tokens <- section.tokens.sliding(3).toList){
          lastWindow = tokens
          if(_skipCounter==0 && tokens(1).string=="-" && tokens(2).hasFollowingWhitespace
            && eligibleForMerge(tokens(0).string, tokens(2).string)) {
            val first = tokens.head
            val last  = tokens.last
            //create a new token and set it's string offset to the first to the last token
            val t = new Token(first.stringStart, last.stringEnd)
            //add a TokenString attr to output the concatenated string
            t.attr += new TokenString(first, first.string+last.string)
            section.remove(first.positionInSection)
            section.insert(first.positionInSection, t)
            //next two windows must be skipped
            _skipCounter = 2
          }
          else{
            //removes the next two tokens after a merge
            if(_skipCounter != 0) {
              section.remove(tokens(0).positionInSection)
              _skipCounter-=1
            }
          }
        }
        //if the last window was merged then
        if(_skipCounter>0){
          section.remove(lastWindow(1).positionInSection)
          section.remove(lastWindow(2).positionInSection)
        }
      }
    }
    tokenizedDoc
  }

  def buildDictionaryFromDocWords(tokens: Iterable[Token]) = tokens.filterNot(_.isPunctuation).map(_.string).toSet

  def prereqAttrs: Iterable[Class[_]] = Nil
  def postAttrs:   Iterable[Class[_]] = List(classOf[Token])

  /** How the annotation of this DocumentAnnotator should be printed in one-word-per-line (OWPL) format.
      If there is no per-token annotation, return null.  Used in Document.owplString. */
  def tokenAnnotationString(token: Token) = token.stringStart.toString+'\t'+token.stringEnd.toString
}


text:
// Copyright 2022 Google LLC
//
// 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.google.api.ads.admanager.jaxws.v202208;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for TranscodeStatus.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="TranscodeStatus">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="UNKNOWN"/>
 *     <enumeration value="NOT_READY"/>
 *     <enumeration value="COMPLETED"/>
 *     <enumeration value="FAILED"/>
 *     <enumeration value="NEEDS_TRANSCODE"/>
 *     <enumeration value="IN_PROGRESS"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "TranscodeStatus")
@XmlEnum
public enum TranscodeStatus {

    UNKNOWN,
    NOT_READY,
    COMPLETED,
    FAILED,
    NEEDS_TRANSCODE,
    IN_PROGRESS;

    public String value() {
        return name();
    }

    public static TranscodeStatus fromValue(String v) {
        return valueOf(v);
    }

}


text:
#ifndef DALI_TOOLKIT_NPATCH_LOADER_H
#define DALI_TOOLKIT_NPATCH_LOADER_H

// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
#include <dali/public-api/rendering/texture-set.h>
#include <memory> // for std::unique_ptr
#include <string>

// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/utility/npatch-utilities.h>
#include <dali-toolkit/internal/texture-manager/texture-manager-impl.h>
#include <dali-toolkit/internal/visuals/npatch-data.h>
#include <dali-toolkit/internal/visuals/visual-url.h>

namespace Dali
{
namespace Toolkit
{
namespace Internal
{
/**
 * The manager for loading Npatch textures.
 * It caches them internally for better performance; i.e. to avoid loading and
 * parsing the files over and over.
 *
 * Cache is not cleaned during app lifecycle as N patches take considerably
 * small space and there's not usually a lot of them. Usually N patches are specified in
 * toolkit default style and there is 1-2 per control that are shared across the whole application.
 */
class NPatchLoader
{
public:
  /**
   * Constructor
   */
  NPatchLoader();

  /**
   * Destructor, non-virtual as not a base class
   */
  ~NPatchLoader();

  /**
   * @brief Retrieve a texture matching the n-patch url.
   *
   * @param [in] textureManager that will be used to loading image
   * @param [in] textureObserver The NPatchVisual that requested loading.
   * @param [in] url to retrieve
   * @param [in] border The border size of the image
   * @param [in,out] preMultiplyOnLoad True if the image color should be multiplied by it's alpha. Set to false if the
   *                                   image has no alpha channel
   * @param [in] synchronousLoading True if the image will be loaded in synchronous time.
   * @return id of the texture.
   */
  std::size_t Load(TextureManager& textureManager, TextureUploadObserver* textureObserver, const VisualUrl& url, const Rect<int>& border, bool& preMultiplyOnLoad, bool synchronousLoading);

  /**
   * @brief Set loaded PixelBuffer and its information
   *
   * @param [in] id cache data id
   * @param [in] pixelBuffer of loaded image
   * @param [in] preMultiplied True if the image had pre-multiplied alpha applied
   */
  void SetNPatchData(std::size_t id, Devel::PixelBuffer& pixelBuffer, bool preMultiplied);

  /**
   * @brief Retrieve N patch data matching to an id
   * @param [in] id of data
   * @param [out] data const pointer to the NPatchData
   * @return true if data matching to id was really found
   */
  bool GetNPatchData(const NPatchData::NPatchDataId id, const NPatchData*& data);

  /**
   * @brief Remove a texture matching id.
   * Erase the observer from the observer list of cache if we need.
   * This API decrease cached NPatchInfo reference.
   * If the NPatchInfo reference become 0, the textureSet will be reset.
   *
   * @param [in] id cache data id
   * @param [in] textureObserver The NPatchVisual that requested loading.
   */
  void Remove(std::size_t id, TextureUploadObserver* textureObserver);

private:
  NPatchData::NPatchDataId GenerateUniqueNPatchDataId();

  int32_t GetCacheIndexFromId(const NPatchData::NPatchDataId id);

private:
  /**
   * @brief Information of NPatchData
   * It also hold ownership of NPatchData memory.
   */
  struct NPatchInfo
  {
    NPatchInfo(NPatchData* data)
    : mData(data),
      mReferenceCount(1u)
    {
    }
    ~NPatchInfo()
    {
    }
    NPatchInfo(NPatchInfo&& info) noexcept // move constructor
    {
      mData                = std::move(info.mData);
      mReferenceCount      = info.mReferenceCount;
      info.mReferenceCount = 0u;
    }
    NPatchInfo& operator=(NPatchInfo&& info) noexcept // move operator
    {
      mData                = std::move(info.mData);
      mReferenceCount      = info.mReferenceCount;
      info.mReferenceCount = 0u;
      return *this;
    }

    NPatchInfo()                       = delete;            // Do not use default constructor
    NPatchInfo(const NPatchInfo& info) = delete;            // Do not use copy constructor
    NPatchInfo& operator=(const NPatchInfo& info) = delete; // Do not use copy assign

    std::unique_ptr<NPatchData> mData;
    std::int16_t                mReferenceCount; ///< The number of N-patch visuals that use this data.
  };

  /**
   * @brief Get cached NPatchData by inputed url and border. If there is no cached data, create new one.
   * @note This API increase cached NPatchInfo reference.
   *
   * @param [in] url to retrieve
   * @param [in] border The border size of the image
   * @param [in,out] preMultiplyOnLoad True if the image color should be multiplied by it's alpha. Set to false if the
   *                                   image has no alpha channel
   * @return NPatchData pointer that Load function will used.
   */
  NPatchData* GetNPatchData(const VisualUrl& url, const Rect<int>& border, bool& preMultiplyOnLoad);

protected:
  /**
   * Undefined copy constructor.
   */
  NPatchLoader(const NPatchLoader&);

  /**
   * Undefined assignment operator.
   */
  NPatchLoader& operator=(const NPatchLoader& rhs);

private:
  NPatchData::NPatchDataId mCurrentNPatchDataId;
  std::vector<NPatchInfo>  mCache;
};

} // namespace Internal

} // namespace Toolkit

} // namespace Dali

#endif // DALI_TOOLKIT_NPATCH_LOADER_H


text:
<?php
namespace ufsit;
class Response{
	public $headers;
	protected $content = null;
	protected $errors;
	protected $statusCode = 200;
	protected $statusCodeMes = "It Is A Mystery"; //If OutputHandler does not have a message associated with the returned $statusCode, it will read this.

	public $rawContent = false; //Set to true to disable json_encode-ing of $content
	public $responseType;

	public function __construct(){
		$this->headers = new ResponseHeaders();
	}

	/*
	 * This is basically a copy constructor.
	 * Copies the data from $apiResponse into this.
	 * Note: will overwrite headers, but will not delete
	 *   existing headers that don't exist in the given $apiResponse.
     * This also does NOT copy the $responseType value.
	 */
	public function apply(Response $apiResponse,$forceOverwrite = false){
		$this->headers->apply($apiResponse->headers);
		$this->setStatusCode($apiResponse->getStatusCode(), $this->statusCodeMes);

		if($forceOverwrite || $apiResponse->hasContent()){
			$this->setContent($apiResponse->getContent());
		}
		if($forceOverwrite || $apiResponse->hasErrors()){
			$this->addErrors($apiResponse->getErrors());
		}
	}

	public function setStatusCode($code, $mes = null){
		if($code >= 100 && $code < 600){
			$this->statusCode = $code;
			if($mes != null){
				$this->statusCodeMes = $mes;
			}
		}
	}

	public function getStatusCode(){
		return $this->statusCode;
	}

	public function getStatusCodeMessage(){
		return $this->statusCodeMes;
	}

	public function setContent($content){
		$this->content = $content;
	}

	public function getContent(){
		return $this->content;
	}

	public function hasContent(){
		return isset($this->content) && $this->content != null;
	}

	/*
	 * Add a single error, $message.
	 */
	public function addError($message){
		if(!isset($this->errors)){
			$this->errors = array();
		}
		if(is_array($message)){
			return false;
		}

		$this->errors[] = $message;
		return true;
	}

	/*
	 * Add an array of errors, given by $messages
	 */
	public function addErrors($messages){
		if(!is_array($messages)){
			return $this->addErrors(array($messages));
		}
		foreach($messages as $message){
			$this->addError($message);
		}
		return true;
	}

	public function getErrors(){
		return $this->errors;
	}

	public function hasErrors(){
		return isset($this->errors) && count($this->errors) > 0;
	}

    /*
     * Forward to a different page, using a 302 redirect.
     * $url is the url to which to forward.
     * $data (optional, default null) should be an array
     *   containing url query parameters in key=>value format.
     *   May also be passed simply as the string to append to $url.
     */
    public function forwardTo($url, $data = null){
        if($data != null){
            $hasPreexistingQuery = (strpos($url,'?') !== false); //If the $url already has a query string (indicated by the existence of a '?' character).
            if(is_string($data)){ //If the data variable is a string
                if($hasPreexistingQuery){
                    if(substr($data,0,1) === '?'){ //If the string does start with a query question mark
                        $url = $url . '&' . substr($data,1); //Remote the question mark and append
                    }
                    elseif(substr($data,0,1) === '&'){ //If the string does not start with a query question mark
                        $url = $url . $data;
                    }
                    else{
                        $url = $url . '&' . $data;
                    }
                }
                else{
                    if(substr($data,0,1) === '?'){ //If the string does start with a query question mark
                        $url = $url . $data;
                    }
                    elseif(substr($data,0,1) === '&'){ //If the string does not start with a query question mark
                        $url = $url . '?' . substr($data,1);
                    }
                    else{
                        $url = $url . '?' . $data;
                    }
                }
            }
            elseif(is_array($data)){
                $queryArray = array();
                foreach($data as $key=>$value){
                    $queryArray[] = $key . '=' . $value;
                }
                $queryString = implode('&',$queryArray);
                $url = $url . ((!$hasPreexistingQuery)?'?':'&') . $queryString;
            }
        }
        $this->responseType = ResponseType::PAGE;
        $this->setStatusCode(302);
        $this->setContent($url);
    }
}
?>


text:
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="15dp"
    android:background="#8000">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="15dp">

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1">

            <LinearLayout
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true">

                <TextView
                    android:id="@+id/tv_girl"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="GIRL  n(*≧▽≦*)n"
                    android:textColor="#fff"/>

            </LinearLayout>

        </RelativeLayout>

    </LinearLayout>

</LinearLayout>


text:
package io.advantageous.boon.json;

import java.io.InputStream;
import java.io.Reader;
import java.nio.charset.Charset;

public interface JsonParser {
    Object parse(  String jsonString );
    Object parse(  byte[] bytes );
    Object parse(  byte[] bytes, Charset charset );
    Object parse(  CharSequence charSequence );
    Object parse(  char[] chars );
    Object parse(  Reader reader );
    Object parse(  InputStream input );
    Object parse(  InputStream input, Charset charset );
}


text:
		<meta charset="utf-8">
		<title>Vative's lean six sigma team members</title>
		<meta name="keywords" content="Vative, team, members, management, Leans Six Sigma, Business">
		<meta name="description" content="Our team are a dynamic team of Lean / Six Sigma experts with proven and  term experience across all industry sectors">
		<meta name="author" content="Vative ">

		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">

		<link rel="stylesheet" href="css/bootstrap.css">
		<link rel="stylesheet" href="css/fonts/font-awesome/css/font-awesome.css">
		<link rel="stylesheet" href="vendor/flexslider/flexslider.css" media="screen" />
		<link rel="stylesheet" href="fvendor/fancybox/jquery.fancybox.css" media="screen" />

		<link rel="stylesheet" href="css/theme.css">
		<link rel="stylesheet" href="css/theme-elements.css">

		<link rel="stylesheet" href="fcss/custom.css">

		<link rel="stylesheet" href="css/skins/blue.css">

		<link rel="stylesheet" href="css/bootstrap-responsive.css" />
		<link rel="stylesheet" href="css/theme-responsive.css" />

Clint Leask

 Position: Business Advisor

 Contact Name: Clint Leask

 Address: Office 260A Blackburn Road, Glen Waverley, VIC 3150

 Phone: 1300 VATIVE (1300 828483) or +61 3 9886 3852

 Fax: +61 3 9803 1315

 Email: info@vative.com.au

Clint is a Degree Qualified Electro-Mechanical Engineer built on a practical Fitter and Machinist Trade background with an experience base developed over 20 years through a robust application of Lean and Six-Sigma methodology in various industries including Automotive, Water Portability, Machine Building. Coupling his Lean/Six-Sigma expertise with an extensive background in Quality Management Systems (ISO9000, TS16949) and Senior/Executive Management positions within Lean/Six-Sigma organisations.

Clint has a proven record of assisting to bringing about fundamental and long term Business Improvements across a client base ranging from SME's to large and complex multinationals.


text:
class DotMatrixStandard : public CalibrationStandard
{
private:

    /// The size of the matrix.
    cv::Size size;

    /// The horizontal distance between dot centers, in millimeters.
    double scaleX;

    /// The vertical distance between rows of dots, in millimeters.
    double scaleY;

    /// The offset of every other row.
    double offset;

public:
    /// Create a new dot matrix standard.
    DotMatrixStandard(cv::Size size, double scaleX, double scaleY, double offset);
    /// Create a new, regular, standard.
    DotMatrixStandard(cv::Size size, double scale);

    /// Find standard points in an image.
    std::vector<cv::Point2f> getImagePoints(const cv::Mat image, bool *success);

    /// Get a list of the points in this standard.
    std::vector<cv::Point3f> getObjectPoints();

    /// Find the index of the first corner.
    int getPointA();
    /// Find the index of the second corner.
    int getPointB();
    /// Find the index of the third corner.
    int getPointC();
    /// Find the index of the fourth corner.
    int getPointD();
};

#endif // DOTMATRIXSTANDARD_H


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace HmLib.Binary
{
    using Abstractions;

    public class HmBinaryMessageReader : IMessageReader
    {
        private readonly HmBinaryStreamReader _stream;

        public HmBinaryMessageReader(Stream input)
        {
            _reader = InitialReader;
            _stream = new HmBinaryStreamReader(input);
        }

        public ReadState ReadState { get; private set; }
        public MessageType MessageType { get; private set; }

        private bool _containsHeaders;

        private int _expectedHeaderLength;
        private int _headersRead = 0;
        private int _headerOffset;

        private int _expectedBodyEnd;

        public int ItemCount { get; private set; }

        public string PropertyName { get; private set; }
        public string StringValue { get; private set; }

        public int IntValue { get; private set; }
        public double DoubleValue { get; private set; }
        public bool BooleanValue { get; private set; }

        public ContentType? ValueType { get; private set; }

        private Func<bool> _reader;

        public bool Read()
        {
            return _reader();
        }

        private bool InitialReader()
        {
            if (ReadPacketType())
            {
                ReadState = ReadState.Message;
                _reader = ReadInteractive;
                return true;
            }

            _reader = ErrorReader;
            return false;
        }

        private bool EndOfFileReader()
        {
            return false;
        }
        private bool ErrorReader()
        {
            return false;
        }

        private Stack<Tuple<bool, int>> _collectionDepth = new Stack<Tuple<bool, int>>();
        private bool _readKeyValuePairs;
        private int _itemsToReadInCurrentCollection;
        private void BeginCollection()
        {
            //store current state
            _collectionDepth.Push(Tuple.Create(_readKeyValuePairs, _itemsToReadInCurrentCollection));

            _itemsToReadInCurrentCollection = ItemCount;
            _readKeyValuePairs = ValueType == ContentType.Struct;
        }
        private void EndItem()
        {
            _itemsToReadInCurrentCollection--;
            if (_itemsToReadInCurrentCollection == 0)
            {
                var tmp = _collectionDepth.Pop();
                _readKeyValuePairs = tmp.Item1;
                _itemsToReadInCurrentCollection = tmp.Item2;
                EndItem();
            }
        }

        private bool ReadInteractive()
        {
            switch (ReadState)
            {
                case ReadState.Body:
                    if (_stream.BytesRead < _expectedBodyEnd)
                    {
                        ReadBody();
                    }
                    else
                    {
                        MoveToEof();
                    }

                    return true;

                case ReadState.Message:
                    if (_containsHeaders)
                    {
                        MoveToHeaders();
                    }
                    else
                    {
                        MoveToContent();
                    }
                    return true;

                case ReadState.Headers:
                    if (_headersRead < ItemCount)
                    {
                        ReadHeader();

                        if (_headersRead < ItemCount)
                        {
                            return true;
                        }
                    }

                    var actualBytesRead = _stream.BytesRead - _headerOffset;
                    if (_expectedHeaderLength != actualBytesRead)
                    {
                        _reader = ErrorReader;
                        throw new ProtocolException(string.Format("Expected a header of length {0} bytes, instead read {1} bytes.", _expectedHeaderLength, actualBytesRead));
                    }

                    MoveToContent();

                    return true;
            }
            return false;
        }

        private void ReadHeader()
        {
            _headersRead++;
            PropertyName = _stream.ReadString();
            ValueType = ContentType.String;
            StringValue = _stream.ReadString();
        }

        private IEnumerable<ContentType> ReadValueType()
        {
            if (MessageType == MessageType.Request)
            {
                //request method
                yield return ContentType.String;

                //request params
                yield return ContentType.Array;
            }

            while (_expectedBodyEnd > _stream.BytesRead)
            {
                var contentType = _stream.ReadContentType();
                yield return contentType;
            }
        }

        private void ReadBody()
        {
            if (_readKeyValuePairs)
            {
                PropertyName = _stream.ReadString();
            }

            if (!_typeReader.MoveNext())
            {
                MoveToEof();
                return;
            }

            ValueType = _typeReader.Current;

            if (ValueType == ContentType.Array || ValueType == ContentType.Struct)
            {
                ItemCount = _stream.ReadInt32();
                BeginCollection();
                return;
            }

            if (ValueType == ContentType.String || ValueType == ContentType.Base64)
            {
                StringValue = _stream.ReadString();
            }
            else if (ValueType == ContentType.Int)
            {
                IntValue = _stream.ReadInt32();
            }
            else if (ValueType == ContentType.Float)
            {
                DoubleValue = _stream.ReadDouble();
            }
            else if (ValueType == ContentType.Boolean)
            {
                BooleanValue = _stream.ReadBoolean();
            }
            else
            {
                throw new NotImplementedException();
            }

            EndItem();
        }

        private bool ReadPacketType()
        {
            var header = _stream.ReadBytes(3);
            if (!Packet.PacketHeader.SequenceEqual(header))
            {
                return false;
            }

            var packetType = _stream.ReadByte();
            switch (packetType)
            {
                case Packet.ErrorMessage:
                    MessageType = MessageType.Error;
                    return true;
                case Packet.ResponseMessage:
                    MessageType = MessageType.Response;
                    return true;
                case Packet.RequestMessage:
                    MessageType = MessageType.Request;
                    return true;
                case Packet.RequestMessageWithHeaders:
                    MessageType = MessageType.Request;
                    _containsHeaders = true;
                    return true;
                case Packet.ResponseMessageWithHeaders:
                    MessageType = MessageType.Response;
                    _containsHeaders = true;
                    return true;
                default:
                    return false;
            }
        }

        private void MoveToEof()
        {
            _reader = EndOfFileReader;
            ReadState = ReadState.EndOfFile;

            if (_stream.BytesRead != _expectedBodyEnd)
            {
                throw new ProtocolException(string.Format("The response is incomplete or corrupted. Expected {0} bytes, read {1} bytes.", _expectedBodyEnd, _stream.BytesRead));
            }
        }

        private void MoveToHeaders()
        {
            ReadState = ReadState.Headers;

            _expectedHeaderLength = _stream.ReadInt32();
            _headerOffset = (int)_stream.BytesRead;
            ItemCount = _stream.ReadInt32();
        }

        private IEnumerator<ContentType> _typeReader;

        private void MoveToContent()
        {
            var expectedBodyLength = _stream.ReadInt32();
            var bodyOffset = (int)_stream.BytesRead;

            _expectedBodyEnd = bodyOffset + expectedBodyLength;

            if (expectedBodyLength == 0)
            {
                MoveToEof();
                return;
            }

            _typeReader = ReadValueType().GetEnumerator();

            ReadState = ReadState.Body;
        }

    }
}


text:
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion

class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('kompomaatti', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('admin_upload', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='uploadedfile',
            name='event',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kompomaatti.Event', verbose_name='Tapahtuma'),
        ),
        migrations.AddField(
            model_name='uploadedfile',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Käyttäjä'),
        ),
    ]


text:
@interface WGOverHeightGoodItem : WGShopCartGoodItem

@property (nonatomic, assign) float rise;

@end


text:
package dockercli

const (
	docker        = "docker "
	dockerVol     = docker + "volume "
	dockerNode    = docker + "node "
	dockerService = docker + "service "

	// ListVolumes to list down docker volumes
	ListVolumes = dockerVol + "ls "

	// InspectVolume to grab volume properties
	InspectVolume = dockerVol + "inspect "

	// CreateVolume create a volume with vsphere driver
	CreateVolume = dockerVol + " create --driver=vsphere "

	// RemoveVolume constant refers delete volume command
	RemoveVolume = dockerVol + "rm "

	// KillDocker kill docker
	KillDocker = "pkill -9 dockerd "

	// StartDocker - manually start docker
	StartDocker = "systemctl start docker"

	// VDVSPluginName name of vDVS plugin
	VDVSPluginName = "vsphere "

	// VDVSName name of the vDVS service
	VDVSName = "docker-volume-vsphere"

	// GetVDVSPlugin gets vDVS plugin info
	GetVDVSPlugin = docker + "plugin list --no-trunc | grep " + VDVSPluginName

	// GetVDVSPID get the process id of vDVS plugin
	GetVDVSPID = "pidof " + VDVSName

	// GetDockerPID get docker pid
	GetDockerPID = "pidof dockerd"

	// KillVDVSPlugin kills vDVS plugin
	KillVDVSPlugin = "docker-runc kill "

	// StartVDVSPlugin starts the vDVS plugin
	StartVDVSPlugin = docker + " plugin enable " + VDVSPluginName

	// RunContainer create and run a container
	RunContainer = docker + "run "

	// StartContainer starts a container
	StartContainer = docker + "start "

	// StopContainer stops a container
	StopContainer = docker + "stop "

	// RemoveContainer remove the container
	RemoveContainer = docker + "rm -f "

	// ContainerImage busybox container image
	ContainerImage = " busybox "

	// TestContainer test busybox container that keeps running
	TestContainer = ContainerImage + " tail -f /dev/null "

	// QueryContainer checks whether container exists or not
	QueryContainer = docker + "ps -aq --filter name="

	// ListContainers list all running docker containers
	ListContainers = docker + "ps "

	// ListNodes list all docker swarm nodes
	ListNodes = dockerNode + "ls "

	// CreateService create a docker service
	CreateService = dockerService + "create "

	// ScaleService scale a docker service
	ScaleService = dockerService + "scale "

	// ListService list running docker services
	ListService = dockerService + "ps "

	// RemoveService remove docker services
	RemoveService = dockerService + "rm "
)


text:
namespace VulkanCookbook {

  bool RetrieveDataFromPipelineCache( VkDevice                     logical_device,
                                      VkPipelineCache              pipeline_cache,
                                      std::vector<unsigned char> & pipeline_cache_data );

} // namespace VulkanCookbook

#endif // RETRIEVING_DATA_FROM_A_PIPELINE_CACHE


text:
package de.torqdev.jegl.filters.matrix;

import de.torqdev.jegl.filters.ImageFilter;
import org.kohsuke.MetaInfServices;

/**
 * @author Christopher Guckes
 * @version 1.0
 */
@MetaInfServices(value = ImageFilter.class)
public class BoxBlurFilter extends AbstractMatrixFilter {
    private static final float[] MATRIX = new float[]{
            // @formatter:off
            1, 1, 1,
            1, 1, 1,
            1, 1, 1
            // @formatter:on
    };

    private static final float FACTOR = 1 / 9F;

    public BoxBlurFilter() {
        super(MATRIX, FACTOR);
    }
}