text:
using StructureMapDecorator.Sample.Domain;

namespace StructureMapDecorator.Sample.Repositories
{
	public interface IProductRepository
	{
		Product Find(int id);
	}
}

redpajama_set_name: RedPajamaGithub


text:
<?php

class Mysql
{
    public $connection;

    public function connect($host, $username, $password, $db_name, $debug_level)
    {
        $this->connection = new mysqli($host, $username, $password, $db_name);
        if (mysqli_connect_errno()) {
            if ($debug_level == 1)
                printf("Подключение к серверу MySQL невозможно. Код ошибки: %s\n", mysqli_connect_error());
            exit;
        }
        if (!$this->connection->set_charset("utf8"))
            printf("error while loading utf8 %s", $this->connection->error);
        return $this->connection;
    }

}


text:
package org.jb2011.lnf.beautyeye.ch13_radio$cb_btn;

import javax.swing.ImageIcon;

import org.jb2011.lnf.beautyeye.utils.RawCache;

// TODO: Auto-generated Javadoc
/**
 * 普通图片工厂类.
 *
 * @author Jack Jiang
 * @version 1.0
 */
public class __IconFactory__ extends RawCache<ImageIcon>
{

	/** 相对路径根(默认是相对于本类的相对物理路径). */
	public final static String IMGS_ROOT="imgs";

	/** The instance. */
	private static __IconFactory__ instance = null;

	/**
	 * Gets the single instance of __IconFactory__.
	 *
	 * @return single instance of __IconFactory__
	 */
	public static __IconFactory__ getInstance()
	{
		if(instance==null)
			instance = new __IconFactory__();
		return instance;
	}

	/* (non-Javadoc)
	 * @see org.jb2011.lnf.beautyeye.utils.RawCache#getResource(java.lang.String, java.lang.Class)
	 */
	@Override
	protected ImageIcon getResource(String relativePath, Class baseClass)
	{
		return new ImageIcon(baseClass.getResource(relativePath));
	}

	/**
	 * Gets the image.
	 *
	 * @param relativePath the relative path
	 * @return the image
	 */
	public ImageIcon getImage(String relativePath)
	{
		return  getRaw(relativePath,this.getClass());
	}

	/**
	 * Gets the radio button icon_disable.
	 *
	 * @return the radio button icon_disable
	 */
	public ImageIcon getRadioButtonIcon_disable()
	{
		return getImage(IMGS_ROOT+"/rb_disable.png");
	}

	/**
	 * Gets the radio button icon_normal.
	 *
	 * @return the radio button icon_normal
	 */
	public ImageIcon getRadioButtonIcon_normal()
	{
		return getImage(IMGS_ROOT+"/rb_normal.png");
	}

	/**
	 * Gets the radio button icon_pressed.
	 *
	 * @return the radio button icon_pressed
	 */
	public ImageIcon getRadioButtonIcon_pressed()
	{
		return getImage(IMGS_ROOT+"/rb_pressed.png");
	}

	/**
	 * Gets the radio button icon_unchecked_disable.
	 *
	 * @return the radio button icon_unchecked_disable
	 */
	public ImageIcon getRadioButtonIcon_unchecked_disable()
	{
		return getImage(IMGS_ROOT+"/rb_un_disable.png");
	}

	/**
	 * Gets the radio button icon_unchecked_normal.
	 *
	 * @return the radio button icon_unchecked_normal
	 */
	public ImageIcon getRadioButtonIcon_unchecked_normal()
	{
		return getImage(IMGS_ROOT+"/rb_un_normal.png");
	}

	/**
	 * Gets the radio button icon_unchecked_pressed.
	 *
	 * @return the radio button icon_unchecked_pressed
	 */
	public ImageIcon getRadioButtonIcon_unchecked_pressed()
	{
		return getImage(IMGS_ROOT+"/rb_un_pressed.png");
	}

	/**
	 * Gets the check box button icon_disable.
	 *
	 * @return the check box button icon_disable
	 */
	public ImageIcon getCheckBoxButtonIcon_disable()
	{
		return getImage(IMGS_ROOT+"/cb_disable.png");
	}

	/**
	 * Gets the check box button icon_normal.
	 *
	 * @return the check box button icon_normal
	 */
	public ImageIcon getCheckBoxButtonIcon_normal()
	{
		return getImage(IMGS_ROOT+"/cb_normal.png");
	}

	/**
	 * Gets the check box button icon_pressed.
	 *
	 * @return the check box button icon_pressed
	 */
	public ImageIcon getCheckBoxButtonIcon_pressed()
	{
		return getImage(IMGS_ROOT+"/cb_pressed.png");
	}

	/**
	 * Gets the check box button icon_unchecked_disable.
	 *
	 * @return the check box button icon_unchecked_disable
	 */
	public ImageIcon getCheckBoxButtonIcon_unchecked_disable()
	{
		return getImage(IMGS_ROOT+"/cb_un_disable.png");
	}

	/**
	 * Gets the check box button icon_unchecked_normal.
	 *
	 * @return the check box button icon_unchecked_normal
	 */
	public ImageIcon getCheckBoxButtonIcon_unchecked_normal()
	{
		return getImage(IMGS_ROOT+"/cb_un_normal.png");
	}

	/**
	 * Gets the check box button icon_unchecked_pressed.
	 *
	 * @return the check box button icon_unchecked_pressed
	 */
	public ImageIcon getCheckBoxButtonIcon_unchecked_pressed()
	{
		return getImage(IMGS_ROOT+"/cb_un_pressed.png");
	}
}


text:
function val = WB_PARAMS(param_name)

%% DIRECTORIES
dir_master = '/Users/tcmoran/Desktop/Catchment Analysis 2011/AA_CA_Catchments_Master/GAGESII_CATCHMENTS_CA/GAGESII_CATCHMENTS_219';

dir_ghcn_data = '/Users/tcmoran/Desktop/IMWW/IMWW_DATA/CLIMATE_GHCND/IMWW_DATA/ghcnd_matlab';
dir_ghcn_save = 'GAGE_PRECIP_TEMP_GHCN';

%% WATERSHED LIST NAMES (relative paths)
wslist_ca219 = 'FILTERED_CATCHMENTS_219.txt';	% list of 219 CA watersheds that meet minimum criteria
wsinfo_ca219 = 'CA_site_info_filtered_219.txt'; % info list for 219 CA watersheds

%% DATA CRITERIA
MinDaysRwb = 355;									% min days of R for WB checks
MinDaysPwb = 355;
MinDaysGeneral = 355;

%% FLUX TYPES
flux_types = {'P','R','PET'};

%% FLUX SOURCES
sources_P = {'PRISM','VIC'};
sources_R = {'USGS'};
sources_PET = {'CIMIS','PRISM_Harg','PRISM_HargM'};

%% OUTPUT
eval(['val = ',param_name,';']);
xx = 1;								% debug line


text:
require 'spec_helper'

describe Api::V1::JobsController do
  describe "GET #index" do
    it "returns all the jobs" do
      jobs = FactoryGirl.build_stubbed_list(:job, 3)
      Job.stub(:chronological) { jobs }

      get :index

      expect(json).to be_json_eq ActiveModel::ArraySerializer.new(jobs, root: :jobs)
    end
  end

  describe "GET #show" do
    it "returns a job" do
      job = FactoryGirl.build_stubbed(:job)
      Job.stub(:find).with(job.id.to_s) { job }

      get :show, id: job.id

      expect(json).to be_json_eq JobSerializer.new(job)
    end
  end

  describe "POST #create" do
    context "with valid access token" do
      let!(:user) { FactoryGirl.create(:user) }

      before do
        mock_access_token_for(user)
      end

      context "with valid attributes" do
        it "creates a new job" do
          expect(Job.count).to eq 0

          post :create, job: {
            title: 'Senior Developer',
            description: 'Build awesome ember apps',
            company: 'Embros Inc.',
            location: 'Portland, OR',
            category: 'full-time'
          }

          expect(Job.count).to eq 1
          expect(response.status).to eq 201
          expect(json).to be_json_eq JobSerializer.new(Job.first, scope: user)
        end
      end

      context "with invalid attributes" do
        it "is not successful" do
          post :create, job: { invalid: '' }

          expect(response.status).to eq 422
        end
      end
    end

    context "without valid access token" do
      it "is unauthorized" do
        post :create

        expect(response.status).to eq 401
      end
    end
  end

  describe "PUT #update" do
    context "with valid access token" do
      let!(:user) { FactoryGirl.create(:user) }

      before do
        mock_access_token_for(user)
      end

      context "when job belongs to current user" do
        context "with valid attributes" do
          it "updates the job" do
            job = FactoryGirl.create(:job, user: user, company: "Fast Company")
            expect(Job.count).to eq 1

            put :update, id: job.id, job: { company: 'Trollcat' }

            job.reload
            expect(Job.count).to eq 1
            expect(response.status).to eq 200
            expect(json).to be_json_eq JobSerializer.new(job, scope: user)
            expect(job.company).to eq 'Trollcat'
          end
        end

        context "with invalid attributes" do
          it "is not successful" do
            job = FactoryGirl.create(:job, user: user, company: "Fast Company")

            put :update, id: job.id, job: { title: '' }

            expect(response.status).to eq 422
          end
        end
      end

      context "when job belongs to another user" do
        it "doesn't update the job" do
          job = FactoryGirl.create(:job)

          expect {
            put :update, id: job.id, job: { company: 'Trollcat' }
          }.to raise_error ActiveRecord::RecordNotFound
        end
      end
    end

    context "without valid access token" do
      it "is unauthorized" do
        put :update, id: 'anything'

        expect(response.status).to eq 401
      end
    end
  end

  describe "DELETE #destroy" do
    context "with valid access token" do
      let!(:user) { FactoryGirl.create(:user) }

      before do
        mock_access_token_for(user)
      end

      context "when job belongs to current user" do
        it "destroys the job" do
          job = FactoryGirl.create(:job, user: user, company: "Fast Company")
          expect(Job.count).to eq 1

          delete :destroy, id: job.id

          expect(Job.count).to eq 0
          expect(response.status).to eq 204
        end
      end

      context "when job belongs to another user" do
        it "doesn't destroy the job" do
          job = FactoryGirl.create(:job)

          expect {
            delete :destroy, id: job.id
          }.to raise_error ActiveRecord::RecordNotFound
        end
      end
    end

    context "without valid access token" do
      it "is unauthorized" do
        delete :destroy, id: 'anything'

        expect(response.status).to eq 401
      end
    end
  end
end


text:
Ruby-wrapper for communicating with the Luminati.io-network.

## How to use the wrapper
Add it to your Gemfile:
```ruby
gem 'luminati'
```

Basic example:
```ruby
luminati        =   Luminati::Client.new('username', 'password', zone: 'gen', port: 22225)
connection      =   luminati.get_connection(country: nil, dns_resolution: nil, session: nil)

session_id      =   connection[:session_id]
proxy_user      =   connection[:username]
proxy_password  =   connection[:password]
proxy_ip        =   connection[:ip_address]
proxy_port      =   connection[:port]
```

Use a custom zone, only use american ips and resolve dns remotely (on the client nodes):
```ruby
luminati        =   Luminati::Client.new('username', 'password', zone: 'customzone', port: 22225)
connection      =   luminati.get_connection(country: 'us', dns_resolution: :remote, session: nil)
```

Specify a session to re-use a previously used ip-address:
```ruby
luminati        =   Luminati::Client.new('username', 'password', zone: 'gen', port: 22225)
connection      =   luminati.get_connection(country: 'us', dns_resolution: :remote, session: '4b21543118c63c5a98397c240bee05ae18d0509d')
```

## Test coverage
Initial test coverage has since 2015-03-20 been added.

More tests will be added continously.


text:
@interface ImportDocUploadViewController ()
@property (nonatomic, strong) UIBarButtonItem *dashboardButton;
@property (nonatomic, strong) NPFolder *destinationFolder;
@end

@implementation ImportDocUploadViewController

- (void)addFileURLWithDestination:(NSURL*)fileUrl toFolder:(NPFolder*)toFolder {
    NPUploadHelper *uploader = [NPUploadHelper instance];
    uploader.uploadHelperDelegate = self;

    [uploader addAsset:fileUrl thumbnailImage:nil destination:toFolder];
    self.destinationFolder = toFolder;

    [self findIncompleteItems];
}

- (IBAction)startUploading:(id)sender {
    [[NPUploadHelper instance] startUploading];
}

#pragma mark - Table view data source

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"DocCell";
    UITableViewCell *theCell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    UploadItem *item = [self.incompleteItems objectAtIndex:indexPath.row];
    NSURL *fileUrl = item.itemUrl;

    UILabel *fileNameLabel = (UILabel*)[theCell viewWithTag:5];
    fileNameLabel.text = [[fileUrl pathComponents] lastObject];
    fileNameLabel.textAlignment = NSTextAlignmentCenter;

    UIProgressView *progressBar = (UIProgressView*)[theCell.contentView viewWithTag:10];

    UIButton *uploadButn = (UIButton*)[theCell.contentView viewWithTag:50];

    if (item.status == WAITING) {
        progressBar.progress = 0.0;

    } else if (item.status == UPLOADING) {
        uploadButn.hidden = YES;
        progressBar.progress = item.percentage;

    } else if (item.status == CANCELED) {
        uploadButn.hidden = NO;
        progressBar.progress = 0.0;

    } else if (item.status == ERROR) {
        uploadButn.hidden = NO;
        progressBar.progress = 0.0;

    } else if (item.status == COMPLETED) {
        uploadButn.hidden = YES;
        progressBar.progress = 100.0;
    }

    return theCell;
}

- (void)openDashboard:(id)sender
{
    UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"iPhone_main" bundle:nil];
    DashboardController *dashboardController = [mainStoryBoard instantiateViewControllerWithIdentifier:@"DashboardView"];

    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:YES];

    [self.navigationController setViewControllers:[NSArray arrayWithObject:dashboardController] animated:NO];

    [UIView commitAnimations];
}

// Open the folder picker
- (IBAction)openFolderPicker:(id)sender {
    UIStoryboard *folderStoryBoard = [UIStoryboard storyboardWithName:@"iPhone_folder" bundle:nil];
    FolderViewController* folderViewController = [folderStoryBoard instantiateViewControllerWithIdentifier:@"FolderView"];

    if (folderViewController) {
        folderViewController.purpose = ForEntrySaving;
        [folderViewController showFolderTree:self.destinationFolder];
        folderViewController.folderViewDelegate = self;
        folderViewController.navigationItem.leftBarButtonItem = nil;
        [ViewDisplayHelper pushViewControllerBottomUp:self.navigationController viewController:folderViewController];
    }
}

#pragma mark - FolderPickerControllerDelegate

- (void)didSelectFolder:(NPFolder*)selectedFolder forAction:(FolderViewingPurpose)forAction {
    DLog(@"In didSelectedFolder selected folder id %i", selectedFolder.folderId);
    self.destinationFolder = [selectedFolder copy];
    self.navigationItem.title = [NSString stringWithFormat:@"%@ %@", NSLocalizedString(@"Upload to",), [self.destinationFolder displayName]];
    [ViewDisplayHelper popViewControllerBottomDown:self.navigationController];

    NSMutableArray *uploadItems = [[NPUploadHelper instance] uploadItems];
    for (UploadItem *item in uploadItems) {
        item.toFolder = self.destinationFolder;
    }
}

#pragma mark - Table view delegate

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    self.navigationItem.title = [NSString stringWithFormat:@"%@ %@", NSLocalizedString(@"Upload to",), [self.destinationFolder displayName]];

    if (self.dashboardButton == nil) {
        self.dashboardButton = [UIBarButtonItem dashboardButtonPlain:self action:@selector(openDashboard:)];
    }

    self.navigationController.toolbarHidden = NO;
    self.navigationItem.leftBarButtonItem = self.dashboardButton;
}

- (void)viewDidUnload {
    [self setUploadButton:nil];
    [super viewDidUnload];
}

@end


text:
/**
 * This code was generated by
 * \ / _    _  _|   _  _
 *  | (_)\/(_)(_|\/| |(/_  v1.0.0
 *       /       /
 */

import Page = require('../../../base/Page');
import Response = require('../../../http/response');
import V2 = require('../V2');
import { AccessTokenList } from './service/accessToken';
import { AccessTokenListInstance } from './service/accessToken';
import { EntityList } from './service/entity';
import { EntityListInstance } from './service/entity';
import { MessagingConfigurationList } from './service/messagingConfiguration';
import { MessagingConfigurationListInstance } from './service/messagingConfiguration';
import { RateLimitList } from './service/rateLimit';
import { RateLimitListInstance } from './service/rateLimit';
import { SerializableClass } from '../../../interfaces';
import { VerificationCheckList } from './service/verificationCheck';
import { VerificationCheckListInstance } from './service/verificationCheck';
import { VerificationList } from './service/verification';
import { VerificationListInstance } from './service/verification';
import { WebhookList } from './service/webhook';
import { WebhookListInstance } from './service/webhook';

/**
 * Initialize the ServiceList
 *
 * @param version - Version of the resource
 */
declare function ServiceList(version: V2): ServiceListInstance;

/**
 * Options to pass to update
 *
 * @property codeLength - The length of the verification code to generate
 * @property customCodeEnabled - Whether to allow sending verifications with a custom code.
 * @property defaultTemplateSid - The verification template SMS messages.
 * @property doNotShareWarningEnabled - Whether to add a privacy warning at the end of an SMS.
 * @property dtmfInputRequired - Whether to ask the user to press a number before delivering the verify code in a phone call
 * @property friendlyName - A string to describe the verification service
 * @property lookupEnabled - Whether to perform a lookup with each verification
 * @property psd2Enabled - Whether to pass PSD2 transaction parameters when starting a verification
 * @property push.apnCredentialSid - Optional. Set APN Credential for this service.
 * @property push.fcmCredentialSid - Optional. Set FCM Credential for this service.
 * @property push.includeDate - Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
 * @property skipSmsToLandlines - Whether to skip sending SMS verifications to landlines
 * @property totp.codeLength - Optional. Number of digits for generated TOTP codes
 * @property totp.issuer - Optional. Set TOTP Issuer for this service.
 * @property totp.skew - Optional. The number of past and future time-steps valid at a given time
 * @property totp.timeStep - Optional. How often, in seconds, are TOTP codes generated
 * @property ttsName - The name of an alternative text-to-speech service to use in phone calls
 */
interface ServiceInstanceUpdateOptions {
  codeLength?: number;
  customCodeEnabled?: boolean;
  defaultTemplateSid?: string;
  doNotShareWarningEnabled?: boolean;
  dtmfInputRequired?: boolean;
  friendlyName?: string;
  lookupEnabled?: boolean;
  psd2Enabled?: boolean;
  push?: {
    includeDate?: boolean;
    apnCredentialSid?: string;
    fcmCredentialSid?: string;
  };
  skipSmsToLandlines?: boolean;
  totp?: {
    issuer?: string;
    timeStep?: number;
    codeLength?: number;
    skew?: number;
  };
  ttsName?: string;
}

interface ServiceListInstance {
  /**
   * @param sid - sid of instance
   */
  (sid: string): ServiceContext;
  /**
   * create a ServiceInstance
   *
   * @param opts - Options for request
   * @param callback - Callback to handle processed record
   */
  create(opts: ServiceListInstanceCreateOptions, callback?: (error: Error | null, item: ServiceInstance) => any): Promise<ServiceInstance>;
  /**
   * Streams ServiceInstance records from the API.
   *
   * This operation lazily loads records as efficiently as possible until the limit
   * is reached.
   *
   * The results are passed into the callback function, so this operation is memory
   * efficient.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @param callback - Function to process each record
   */
  each(callback?: (item: ServiceInstance, done: (err?: Error) => void) => void): void;
  /**
   * Streams ServiceInstance records from the API.
   *
   * This operation lazily loads records as efficiently as possible until the limit
   * is reached.
   *
   * The results are passed into the callback function, so this operation is memory
   * efficient.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @param opts - Options for request
   * @param callback - Function to process each record
   */
  each(opts?: ServiceListInstanceEachOptions, callback?: (item: ServiceInstance, done: (err?: Error) => void) => void): void;
  /**
   * Constructs a service
   *
   * @param sid - The unique string that identifies the resource
   */
  get(sid: string): ServiceContext;
  /**
   * Retrieve a single target page of ServiceInstance records from the API.
   *
   * The request is executed immediately.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @param callback - Callback to handle list of records
   */
  getPage(callback?: (error: Error | null, items: ServicePage) => any): Promise<ServicePage>;
  /**
   * Retrieve a single target page of ServiceInstance records from the API.
   *
   * The request is executed immediately.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @param targetUrl - API-generated URL for the requested results page
   * @param callback - Callback to handle list of records
   */
  getPage(targetUrl?: string, callback?: (error: Error | null, items: ServicePage) => any): Promise<ServicePage>;
  /**
   * Lists ServiceInstance records from the API as a list.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @param callback - Callback to handle list of records
   */
  list(callback?: (error: Error | null, items: ServiceInstance[]) => any): Promise<ServiceInstance[]>;
  /**
   * Lists ServiceInstance records from the API as a list.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @param opts - Options for request
   * @param callback - Callback to handle list of records
   */
  list(opts?: ServiceListInstanceOptions, callback?: (error: Error | null, items: ServiceInstance[]) => any): Promise<ServiceInstance[]>;
  /**
   * Retrieve a single page of ServiceInstance records from the API.
   *
   * The request is executed immediately.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @param callback - Callback to handle list of records
   */
  page(callback?: (error: Error | null, items: ServicePage) => any): Promise<ServicePage>;
  /**
   * Retrieve a single page of ServiceInstance records from the API.
   *
   * The request is executed immediately.
   *
   * If a function is passed as the first argument, it will be used as the callback
   * function.
   *
   * @param opts - Options for request
   * @param callback - Callback to handle list of records
   */
  page(opts?: ServiceListInstancePageOptions, callback?: (error: Error | null, items: ServicePage) => any): Promise<ServicePage>;
  /**
   * Provide a user-friendly representation
   */
  toJSON(): any;
}

/**
 * Options to pass to create
 *
 * @property codeLength - The length of the verification code to generate
 * @property customCodeEnabled - Whether to allow sending verifications with a custom code.
 * @property defaultTemplateSid - The verification template SMS messages.
 * @property doNotShareWarningEnabled - Whether to add a security warning at the end of an SMS.
 * @property dtmfInputRequired - Whether to ask the user to press a number before delivering the verify code in a phone call
 * @property friendlyName - A string to describe the verification service
 * @property lookupEnabled - Whether to perform a lookup with each verification
 * @property psd2Enabled - Whether to pass PSD2 transaction parameters when starting a verification
 * @property push.apnCredentialSid - Optional. Set APN Credential for this service.
 * @property push.fcmCredentialSid - Optional. Set FCM Credential for this service.
 * @property push.includeDate - Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
 * @property skipSmsToLandlines - Whether to skip sending SMS verifications to landlines
 * @property totp.codeLength - Optional. Number of digits for generated TOTP codes
 * @property totp.issuer - Optional. Set TOTP Issuer for this service.
 * @property totp.skew - Optional. The number of past and future time-steps valid at a given time
 * @property totp.timeStep - Optional. How often, in seconds, are TOTP codes generated
 * @property ttsName - The name of an alternative text-to-speech service to use in phone calls
 */
interface ServiceListInstanceCreateOptions {
  codeLength?: number;
  customCodeEnabled?: boolean;
  defaultTemplateSid?: string;
  doNotShareWarningEnabled?: boolean;
  dtmfInputRequired?: boolean;
  friendlyName: string;
  lookupEnabled?: boolean;
  psd2Enabled?: boolean;
  push?: {
    includeDate?: boolean;
    apnCredentialSid?: string;
    fcmCredentialSid?: string;
  };
  skipSmsToLandlines?: boolean;
  totp?: {
    issuer?: string;
    timeStep?: number;
    codeLength?: number;
    skew?: number;
  };
  ttsName?: string;
}

/**
 * Options to pass to each
 *
 * @property callback -
 *                         Function to process each record. If this and a positional
 *                         callback are passed, this one will be used
 * @property done - Function to be called upon completion of streaming
 * @property limit -
 *                         Upper limit for the number of records to return.
 *                         each() guarantees never to return more than limit.
 *                         Default is no limit
 * @property pageSize -
 *                         Number of records to fetch per request,
 *                         when not set will use the default value of 50 records.
 *                         If no pageSize is defined but a limit is defined,
 *                         each() will attempt to read the limit with the most efficient
 *                         page size, i.e. min(limit, 1000)
 */
interface ServiceListInstanceEachOptions {
  callback?: (item: ServiceInstance, done: (err?: Error) => void) => void;
  done?: Function;
  limit?: number;
  pageSize?: number;
}

/**
 * Options to pass to list
 *
 * @property limit -
 *                         Upper limit for the number of records to return.
 *                         list() guarantees never to return more than limit.
 *                         Default is no limit
 * @property pageSize -
 *                         Number of records to fetch per request,
 *                         when not set will use the default value of 50 records.
 *                         If no page_size is defined but a limit is defined,
 *                         list() will attempt to read the limit with the most
 *                         efficient page size, i.e. min(limit, 1000)
 */
interface ServiceListInstanceOptions {
  limit?: number;
  pageSize?: number;
}

/**
 * Options to pass to page
 *
 * @property pageNumber - Page Number, this value is simply for client state
 * @property pageSize - Number of records to return, defaults to 50
 * @property pageToken - PageToken provided by the API
 */
interface ServiceListInstancePageOptions {
  pageNumber?: number;
  pageSize?: number;
  pageToken?: string;
}

interface ServicePayload extends ServiceResource, Page.TwilioResponsePayload {
}

interface ServiceResource {
  account_sid: string;
  code_length: number;
  custom_code_enabled: boolean;
  date_created: Date;
  date_updated: Date;
  default_template_sid: string;
  do_not_share_warning_enabled: boolean;
  dtmf_input_required: boolean;
  friendly_name: string;
  links: string;
  lookup_enabled: boolean;
  psd2_enabled: boolean;
  push: object;
  sid: string;
  skip_sms_to_landlines: boolean;
  totp: object;
  tts_name: string;
  url: string;
}

interface ServiceSolution {
}

declare class ServiceContext {
  /**
   * Initialize the ServiceContext
   *
   * @param version - Version of the resource
   * @param sid - The unique string that identifies the resource
   */
  constructor(version: V2, sid: string);

  accessTokens: AccessTokenListInstance;
  entities: EntityListInstance;
  /**
   * fetch a ServiceInstance
   *
   * @param callback - Callback to handle processed record
   */
  fetch(callback?: (error: Error | null, items: ServiceInstance) => any): Promise<ServiceInstance>;
  messagingConfigurations: MessagingConfigurationListInstance;
  rateLimits: RateLimitListInstance;
  /**
   * remove a ServiceInstance
   *
   * @param callback - Callback to handle processed record
   */
  remove(callback?: (error: Error | null, items: ServiceInstance) => any): Promise<boolean>;
  /**
   * Provide a user-friendly representation
   */
  toJSON(): any;
  /**
   * update a ServiceInstance
   *
   * @param callback - Callback to handle processed record
   */
  update(callback?: (error: Error | null, items: ServiceInstance) => any): Promise<ServiceInstance>;
  /**
   * update a ServiceInstance
   *
   * @param opts - Options for request
   * @param callback - Callback to handle processed record
   */
  update(opts?: ServiceInstanceUpdateOptions, callback?: (error: Error | null, items: ServiceInstance) => any): Promise<ServiceInstance>;
  verificationChecks: VerificationCheckListInstance;
  verifications: VerificationListInstance;
  webhooks: WebhookListInstance;
}

declare class ServiceInstance extends SerializableClass {
  /**
   * Initialize the ServiceContext
   *
   * @param version - Version of the resource
   * @param payload - The instance payload
   * @param sid - The unique string that identifies the resource
   */
  constructor(version: V2, payload: ServicePayload, sid: string);

  private _proxy: ServiceContext;
  /**
   * Access the accessTokens
   */
  accessTokens(): AccessTokenListInstance;
  accountSid: string;
  codeLength: number;
  customCodeEnabled: boolean;
  dateCreated: Date;
  dateUpdated: Date;
  defaultTemplateSid: string;
  doNotShareWarningEnabled: boolean;
  dtmfInputRequired: boolean;
  /**
   * Access the entities
   */
  entities(): EntityListInstance;
  /**
   * fetch a ServiceInstance
   *
   * @param callback - Callback to handle processed record
   */
  fetch(callback?: (error: Error | null, items: ServiceInstance) => any): Promise<ServiceInstance>;
  friendlyName: string;
  links: string;
  lookupEnabled: boolean;
  /**
   * Access the messagingConfigurations
   */
  messagingConfigurations(): MessagingConfigurationListInstance;
  psd2Enabled: boolean;
  push: any;
  /**
   * Access the rateLimits
   */
  rateLimits(): RateLimitListInstance;
  /**
   * remove a ServiceInstance
   *
   * @param callback - Callback to handle processed record
   */
  remove(callback?: (error: Error | null, items: ServiceInstance) => any): Promise<boolean>;
  sid: string;
  skipSmsToLandlines: boolean;
  /**
   * Provide a user-friendly representation
   */
  toJSON(): any;
  totp: any;
  ttsName: string;
  /**
   * update a ServiceInstance
   *
   * @param callback - Callback to handle processed record
   */
  update(callback?: (error: Error | null, items: ServiceInstance) => any): Promise<ServiceInstance>;
  /**
   * update a ServiceInstance
   *
   * @param opts - Options for request
   * @param callback - Callback to handle processed record
   */
  update(opts?: ServiceInstanceUpdateOptions, callback?: (error: Error | null, items: ServiceInstance) => any): Promise<ServiceInstance>;
  url: string;
  /**
   * Access the verificationChecks
   */
  verificationChecks(): VerificationCheckListInstance;
  /**
   * Access the verifications
   */
  verifications(): VerificationListInstance;
  /**
   * Access the webhooks
   */
  webhooks(): WebhookListInstance;
}

declare class ServicePage extends Page<V2, ServicePayload, ServiceResource, ServiceInstance> {
  /**
   * Initialize the ServicePage
   *
   * @param version - Version of the resource
   * @param response - Response from the API
   * @param solution - Path solution
   */
  constructor(version: V2, response: Response<string>, solution: ServiceSolution);

  /**
   * Build an instance of ServiceInstance
   *
   * @param payload - Payload response from the API
   */
  getInstance(payload: ServicePayload): ServiceInstance;
  /**
   * Provide a user-friendly representation
   */
  toJSON(): any;
}

export { ServiceContext, ServiceInstance, ServiceInstanceUpdateOptions, ServiceList, ServiceListInstance, ServiceListInstanceCreateOptions, ServiceListInstanceEachOptions, ServiceListInstanceOptions, ServiceListInstancePageOptions, ServicePage, ServicePayload, ServiceResource, ServiceSolution }


text:
package hudson.plugins.analysis.util;

import java.io.IOException;
import java.io.InputStream;

import org.apache.commons.io.IOUtils;
import org.apache.commons.io.LineIterator;
import org.apache.commons.lang.StringUtils;

/**
 * Detects the namespace of a C# workspace file.
 *
 * @author Ulli Hafner
 */
// CHECKSTYLE:CONSTANTS-OFF
public class CsharpNamespaceDetector extends AbstractPackageDetector {
    /** {@inheritDoc} */
    public boolean accepts(final String fileName) {
        return fileName.endsWith(".cs");
    }

    /** {@inheritDoc}*/
    public String detectPackageName(final InputStream stream) {
        try {
            LineIterator iterator = IOUtils.lineIterator(stream, "UTF-8");
            while (iterator.hasNext()) {
                String line = iterator.nextLine();
                if (line.matches("^namespace .*$")) {
                    if (line.contains("{")) {
                        return StringUtils.substringBetween(line, " ", "{").trim();
                    }
                    else {
                        return StringUtils.substringAfter(line, " ").trim();
                    }
                }
            }
        }
        catch (IOException exception) {
            // ignore
        }
        finally {
            IOUtils.closeQuietly(stream);
        }
        return UNKNOWN_PACKAGE;
    }
}


text:
var LeaderboardView = Backbone.View.extend({
	el: '#leaderboard-view',
	initialize: function(options) {
		// _.bindAll(
		// 	this,
		// 	'onProjectAdded'
		// );
		// console.log(options);
		// this.projects = options.projects;
		// this.projects.on('add', this.onProjectAdded);
	},

	// onProjectAdded: function(project) {
	// 	var view = new IndividualProjectView({model: project});
	// 	console.log(view.$el);
	// 	this.$el.append(view.$el);
	// }
});


text:
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
             xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             targetNamespace="Examples">
  <process id="compensationStepEndRecordedProcess" isExecutable="true" processType="None">
    <scriptTask id="normalScriptTask" name="Script Task" scriptFormat="groovy">
      <script>System.out.println('Normal Task');</script>
    </scriptTask>
    <sequenceFlow sourceRef="startEvent" targetRef="normalScriptTask"/>
    <startEvent id="startEvent" isInterrupting="true" name="Start Event" parallelMultiple="false"/>
    <intermediateThrowEvent id="compensationEvent" name="Intermediate Throw Event">
      <compensateEventDefinition id="_5_ED_1" waitForCompletion="true"/>
    </intermediateThrowEvent>
    <sequenceFlow sourceRef="normalScriptTask" targetRef="compensationEvent"/>
    <endEvent id="endEvent" name="End Event"/>
    <sequenceFlow sourceRef="compensationEvent" targetRef="endEvent"/>
    <boundaryEvent attachedToRef="normalScriptTask" cancelActivity="true" id="_9" parallelMultiple="false">
      <compensateEventDefinition id="_9_ED_1" waitForCompletion="true"/>
    </boundaryEvent>
    <scriptTask id="compensationScriptTask" isForCompensation="true" name="Script Task" scriptFormat="groovy">
      <script>System.out.println('Compensation Task');</script>
    </scriptTask>
    <association associationDirection="One" id="_11" sourceRef="_9" targetRef="compensationScriptTask"/>
  </process>
</definitions>


text:
#if !defined(_OFSYS_H_INCLUDED_)
#error "Please do not include this file directly.  Include <ofsys.h>"
#endif

#if !defined(_OF_SOCKET_H_)
#define _OF_SOCKET_H_

#if defined(OFOPSYS_WIN32)
typedef ofuint32 (__stdcall *OF_CLIENT_FUNC)(void *);
#else
typedef void * (*OF_CLIENT_FUNC)(void *);
#endif // #if defined(OFOPSYS_WIN32)

#include <ofaddress.h>

/**
   \class OFSocket ofsocket.h
   Implementation of a cross platform socket. This class
   wraps the differences between standard socket (bsd) and
   Winsock sockets.
*/
class OFSYS_API OFSocket
{
 public:
    /** Empty constructor.
     */
    OFSocket( );

    /** Constructs and initialises the address.
     */
    OFSocket( const OFAddress &remote );

    /** Constructs and initialises the socket handle
     */
    OFSocket( OFOS::of_socket_t socketHandle );

    /** Destructor.
     */
    virtual ~OFSocket( );

    /** Connect to the specified address.
     */
    virtual ofint32 connect( const OFAddress &remote );

    /** Connect to the address the socket was constructed with.
     */
    virtual ofint32 connect( );

    /** Listen on the supplied port and address.
     */
    virtual ofint32 listen( );

    /** Close the connection.
     */
    virtual void closeSocket( );

    /** Is the socket open
     */
    bool isConnected() const;

    /** Is the socket valid.
        Checks the created socket against OFOS::INVALID_SOCKET.
    */
    bool isValid( ) const;

    /** Send the supplied buffer.
    */
    virtual ofint32 send( void *buffer, ofuint32 bufferLength,
			  bool *terminate = NULL,
			  ofuint32 chunkSize = 2048,
			  ofuint32 timeOut = 30 );

    /** Receive from remote address.
     */
    virtual ofint32 recv( void *buffer, ofuint32 bufferLength,
			  ofuint32 &bytesReceived,
			  bool *terminate = NULL,
			  ofuint32 chunkSize = 2048,
			  ofuint32 timeOut = 30 );
    /** Retrieve the peer's name

        Retrieves, if possible, the ip address of the remote peer.
     */
    virtual ofuint32 getpeername(char* peerName,
                                 ofuint32 peerNameLen,
                                 char useDNS = 0);

    /** Bind, listen and accept incoming requests.
        This method will create a new OFThread for each accepted
        incoming request, using the supplied function as the thread's
        starting point.

        Returns -1 if any part of the process fails.
    */
    ofint32 actAsServer( OF_CLIENT_FUNC clientFunc, ofuint32 timeOut );

    static void startup( );

    static void closedown();

    /** Access the underlying handle.
     */
    OFOS::of_socket_t handle( ) const;

    /** Retrieve the ip address of the local machine.
        This is returned in network byte order.
     */
    static ofuint32 getLocalIP( );

    /** Retrieve the local hostname
     */
    static void getHostName( char *host, ofuint32 length );

    /** Retrieve a name based on an address
     */
    static ofuint32 getnamefromaddr(char* peerName,
                                    ofuint32 peerNameLen,
                                    struct in_addr* addr,
                                    ofuint32 addrLen,
                                    char useDNS =0);

 protected:
    /** \name Internal helper methods
     */
    //@{

    /** Set the socket options
     */
    void set_options_();

    //@}

    OFAddress m_addr;
    bool m_open;
    OFOS::of_socket_t m_socket;
};

#include <ofsocket.i>

#endif // #if !defined(_OF_SOCKET_H_)


text:
from .test_apis import *
from .test_approve_requisition import *
from .test_confirm_delivery import *
from .test_facility_sync import *
from .test_program_product_sync import *
from .test_requisition_sync import *
from .test_signals import *


text:
// +build windows

package cm

import (
	"github.com/golang/glog"

	"k8s.io/client-go/tools/record"
	"k8s.io/kubernetes/pkg/api/v1"
	"k8s.io/kubernetes/pkg/kubelet/cadvisor"
	"k8s.io/kubernetes/pkg/util/mount"
)

type containerManagerImpl struct {
	containerManagerStub
}

var _ ContainerManager = &containerManagerImpl{}

func (cm *containerManagerImpl) Start(_ *v1.Node) error {
	glog.V(2).Infof("Starting Windows stub container manager")
	return nil
}

func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.Interface, nodeConfig NodeConfig, failSwapOn bool, recorder record.EventRecorder) (ContainerManager, error) {
	return &containerManagerImpl{}, nil
}


text:
	local suite = test.declare("config_links")
	local config = premake.config

--
-- Setup and teardown
--

	local sln, prj

	function suite.setup()
		_ACTION = "test"
		_OS = "windows"
		sln, prj = test.createsolution()
	end

	local function prepare(kind, part, linkage)
		cfg = test.getconfig(prj, "Debug")
		return config.getlinks(cfg, kind, part, linkage)
	end

--
-- If no links are present, should return an empty table.
--

	function suite.emptyResult_onNoLinks()
		local r = prepare("all", "object")
		test.isequal(0, #r)
	end

--
-- System libraries which include path information are made project relative.
--

	function suite.pathMadeRelative_onSystemLibWithPath()
		location "build"
		links { "../libs/z" }
		local r = prepare("all", "fullpath")
		test.isequal({ "../../libs/z" }, r)
	end

--
-- Handle the case where the library extension has been explicitly
-- included in the link statement.
--

	function suite.skipsExtension_onExplicitExtension()
		system "windows"
		links { "user32.lib" }
		local r = prepare("all", "fullpath")
		test.isequal({ "user32.lib" }, r)
	end

--
-- Check handling of shell variables in library paths.
--

	function suite.variableMaintained_onLeadingVariable()
		system "windows"
		location "build"
		links { "$(LOCAL_DEV_PATH)/sdk/lib/DEVMAPI" }
		local r = prepare("all", "fullpath")
		test.isequal({ "$(LOCAL_DEV_PATH)/sdk/lib/DEVMAPI" }, r)
	end

	function suite.variableMaintained_onQuotedVariable()
		system "windows"
		location "build"
		links { '"$(LOCAL_DEV_PATH)/sdk/lib/DEVMAPI.lib"' }
		local r = prepare("all", "fullpath")
		test.isequal({ '"$(LOCAL_DEV_PATH)/sdk/lib/DEVMAPI.lib"' }, r)
	end

--
-- If fetching directories, the libdirs should be included in the result.
--

	function suite.includesLibDirs_onDirectories()
		libdirs { "../libs" }
		local r = prepare("all", "directory")
		test.isequal({ "../libs" }, r)
	end

--
-- Managed C++ projects should ignore links to managed assemblies, which
-- are designated with an explicit ".dll" extension.
--

	function suite.skipsAssemblies_onManagedCpp()
		system "windows"
		clr "On"
		links { "user32", "System.dll" }
		local r = prepare("all", "fullpath")
		test.isequal({ "user32" }, r)
	end

--
-- When explicitly requesting managed links, any unmanaged items in the
-- list should be ignored.
--

	function suite.skipsUnmanagedLibs_onManagedLinkage()
		system "windows"
		clr "On"
		links { "user32", "System.dll" }
		local r = prepare("all", "fullpath", "managed")
		test.isequal({ "System.dll" }, r)
	end

--
-- Managed projects can link to other managed projects, and unmanaged
-- projects can link to unmanaged projects.
--

	function suite.canLink_CppAndCpp()
		links { "MyProject2" }

		project "MyProject2"
		kind "StaticLib"
		language "C++"

		local r = prepare("all", "fullpath")
		test.isequal({ "bin/Debug/MyProject2.lib" }, r)
	end

	function suite.canLink_CsAndCs()
		language "C#"
		links { "MyProject2" }

		project "MyProject2"
		kind "SharedLib"
		language "C#"

		local r = prepare("all", "fullpath")
		test.isequal({ "bin/Debug/MyProject2.dll" }, r)
	end

	function suite.canLink_ManagedCppAndManagedCpp()
		clr "On"
		links { "MyProject2" }

		project "MyProject2"
		kind "StaticLib"
		language "C++"
		clr "On"

		local r = prepare("all", "fullpath")
		test.isequal({ "bin/Debug/MyProject2.lib" }, r)
	end

	function suite.canLink_ManagedCppAndCs()
		clr "On"
		links { "MyProject2" }

		project "MyProject2"
		kind "SharedLib"
		language "C#"

		local r = prepare("all", "fullpath")
		test.isequal({ "bin/Debug/MyProject2.dll" }, r)
	end

--
-- Managed and unmanaged projects can not link to each other.
--

	function suite.ignoreLink_CppAndCs()
		links { "MyProject2" }

		project "MyProject2"
		kind "SharedLib"
		language "C#"

		local r = prepare("all", "fullpath")
		test.isequal({}, r)
	end


text:
package org.apache.activemq.transport.wss;

import org.apache.activemq.transport.SecureSocketConnectorFactory;
import org.apache.activemq.transport.ws.WSTransportTest;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.junit.Test;

public class WSSTransportTest extends WSTransportTest {
    @Override
    protected Connector createJettyConnector(Server server) throws Exception {
        SecureSocketConnectorFactory sscf = new SecureSocketConnectorFactory();
        sscf.setKeyStore("src/test/resources/server.keystore");
        sscf.setKeyStorePassword("password");
        sscf.setTrustStore("src/test/resources/client.keystore");
        sscf.setTrustStorePassword("password");

        ServerConnector c = (ServerConnector) sscf.createConnector(server);
        c.setPort(getProxyPort());
        return c;
    }

    @Override
    protected String getWSConnectorURI() {
        return "wss://localhost:" + port;
    }

    @Override
    @Test(timeout=10000)
    public void testGet() throws Exception {
        SslContextFactory factory = new SslContextFactory();
        factory.setSslContext(broker.getSslContext().getSSLContext());

        testGet("https://127.0.0.1:" + port, factory);
    }

    @Override
    protected String getTestURI() {
        int proxyPort = getProxyPort();
        return "https://localhost:" + proxyPort + "/websocket.html#wss://localhost:" + port;
    }
}


text:
#ifndef _MIMETIC_OS_UTILS_H_
#define _MIMETIC_OS_UTILS_H_
#include <string>

namespace mimetic
{
/// Returns host name
std::string gethostname();

/// Returns the ID of the calling process
int getpid();

}

#endif


text:
package org.sonatype.flexmojos.tests.concept;

import java.io.File;

import org.sonatype.flexmojos.test.FMVerifier;
import org.testng.annotations.Test;

public class ConfiguratorTest
    extends AbstractConceptTest
{

    @Test
    public void configurator()
        throws Exception
    {
        File testDir = getProject( "/concept/configurator" );
        FMVerifier v = test( testDir, "flexmojos:configurator" );
        v.verifyTextInLog( "Running configurator for a SWF project" );
        v.verifyTextInLog( "configurator-1.0-SNAPSHOT.swf" );
    }

}


text:
layout: page
title: Aykut Kimdir?
image:
  credit: aykut
  feature: about.jpg
  creditlink: http://www.aykutyilmaz.net
comments: false

---

11 Mart 1993 İstanbul doğumluyum.

İlkokulu Üsküdar  liseyi Ümraniye ilçesinde bitirdim. Üniversitede Gazi Üniversitesi Bilgisayar Programcılığına yerleştikten sonra 2014 yılında mezun oldum.

Web e olan ilgim 2006 yıllarında başladı ve o günden bu noktaya gelebildim.

09.2010 - 06.2011 arası İ.B.B'de junior olarak çalıştım. 05.2013 - 02.2014 arası TY Bilişim'de Web Tasarım ve Arayüz Geliştiricisi olarak çalıştım. 03.2015'den beri RND E-commerce şirketinde web arayüz geliştiricisi olarak çalışıyorum.

Bu blog'u açmamdaki amaç herkes gibi bende kendime bir not defteri oluşturup paylaşmak bir nebzede boş vaktimde kahve yudumlayıp yazı yazmak istedim.


text:
import fs from 'fs';
import rimraf from 'rimraf';

import * as util from '../src/util';

describe('util', () => {
	describe('removeExtension', () => {
		it('should remove extension from file path', () => {
			const result = util.removeExtension('ru/markdown.md');
			expect(result).toEqual('ru/markdown');
		});
	});

	describe('getExtension', () => {
		it('should return file extension', () => {
			const result = util.getExtension('ru/markdown.md');
			expect(result).toEqual('md');
		});
	});

	describe('readFile', () => {
		it('should return a file content', () => {
			const result = util.readFile('test/samples/file.txt');
			expect(result).toEqual('Hello.');
		});
	});

	describe('writeFile', () => {
		beforeEach(done => rimraf('test/tmp', done));
		it('should saves a string to a file on a disk', () => {
			const filepath = 'test/tmp/file.txt';
			util.writeFile(filepath, 'Hello.');
			expect(fs.existsSync(filepath)).toBe(true);
			expect(fs.readFileSync(filepath, { encoding: 'utf8' })).toEqual('Hello.');
		});
	});

	describe('readYamlFile', () => {
		it('should read and parse YAML file', () => {
			const result = util.readYamlFile('test/samples/file.yml');
			expect(result).toEqual({ hello: 'world' });
		});
	});

	describe('formatFieldsForSortByOrder', () => {
		it('should prepare fields list in short format to _.orderBy()', () => {
			const result = util.formatFieldsForSortByOrder(['foo', '-bar']);
			expect(result).toEqual([['foo', 'bar'], ['asc', 'desc']]);
		});
	});

	describe('meta', () => {
		it('should return HTML meta tag', () => {
			const result = util.meta('description', 'My blog');
			expect(result.toString()).toEqual(
				'<meta name="description" content="My blog">'
			);
		});
		it('should strip HTML and escape special characters', () => {
			const result = util.meta('description', 'My "blog"');
			expect(result.toString()).toEqual(
				'<meta name="description" content="My "blog"">'
			);
		});
		it('should work with numbers', () => {
			const result = util.meta('description', 42);
			expect(result.toString()).toEqual(
				'<meta name="description" content="42">'
			);
		});
	});

	describe('og', () => {
		it('should return HTML meta tag for Open Graph', () => {
			const result = util.og('description', 'My blog');
			expect(result.toString()).toEqual(
				'<meta property="description" content="My blog">'
			);
		});
		it('should strip HTML and escape special characters', () => {
			const result = util.og('description', 'My "blog"');
			expect(result.toString()).toEqual(
				'<meta property="description" content="My "blog"">'
			);
		});
		it('should work with numbers', () => {
			const result = util.og('description', 42);
			expect(result.toString()).toEqual(
				'<meta property="description" content="42">'
			);
		});
	});

	describe('getFirstParagraph', () => {
		it('should return the content of the first paragraph in a given HTML', () => {
			const result = util.getFirstParagraph(`

And so it was indeed: she was now only ten inches high, and her face brightened up at the thought that she was now the right size for going though the little door into that lovely garden.

First, however, she waited for a few minutes to see if she was going to shrink any further: she felt a little nervous about this; 'for it might end, you know,' said Alice to herself, 'in my going out altogether, like a candle. I wonder what I should be like then?'

And she tried to fancy what the flame of a candle is like after the candle is blown out, for she could not remember ever having seen such a thing.

			`);
			expect(result).toEqual(
				'And so it was indeed: she was now only ten inches high, and her face brightened up at the thought that she was now the right size for going though the little door into that lovely garden.'
			);
		});
	});

	describe('getFirstImage', () => {
		it('should return the URL of the first image in a given HTML', () => {
			const result = util.getFirstImage(`

And so it was indeed: "she" was now only ten inches < high.

And she tried to fancy what the flame of a candle is like after the candle is blown out.

			`);
			expect(result).toEqual('/images/facepalm.jpg');
		});
	});

	describe('absolutizeUrl', () => {
		it('should return absolute URL', () => {
			const result = util.absolutizeUrl('/all/post', 'http://example.com');
			expect(result).toEqual('http://example.com/all/post');
		});
		it('should trim extra slashes', () => {
			const result = util.absolutizeUrl('/all/post', 'http://example.com/');
			expect(result).toEqual('http://example.com/all/post');
		});
		it('should return absolute URLs as is', () => {
			const result = util.absolutizeUrl(
				'http://example.com/all/post',
				'http://example.com/'
			);
			expect(result).toEqual('http://example.com/all/post');
		});
	});

	describe('absolutizeLinks', () => {
		it('should make all links and image URLs absolute', () => {
			const result = util.absolutizeLinks(
				`

Or you can just download dlg-error and dlg-prompt and put them somewhere in $PATH:

			`,
				'http://example.com'
			);
			expect(result).toEqual(`

Or you can just download dlg-error and dlg-prompt and put them somewhere in $PATH:

			`);
		});
	});

	describe('cleanHtml', () => {
		it('should remove HTML and escape special characters in a given HTML', () => {
			const result = util.cleanHtml(`

And so it was indeed: "she" was now only ten inches < high.

			`);
			expect(result).toEqual(
				'And so it was indeed: "she" was now only ten inches < high.'
			);
		});
	});

	describe('markdownBlock', () => {
		it('should return rendered to HTML Markdown', () => {
			const result = util.markdownBlock('Hello *world*!');
			expect(result).toEqual('
Hello world!
\n');
		});
	});

	describe('markdown', () => {
		it('should return rendered to HTML Markdown not wrapped in a paragraph', () => {
			const result = util.markdown('Hello *world*!');
			expect(result).toEqual('Hello world!');
		});
	});

	describe('formatErrorHtml', () => {
		it('should escape HTML and replace new line character with
', () => {
			const result = util.formatErrorHtml('Error in <tag>:\nOut of cheese');
			expect(result).toEqual('Error in <tag>:
Out of cheese');
		});
	});

	describe('errorHtml', () => {
		it('should return an HTML document', () => {
			const result = util.errorHtml('Error in <tag>');
			expect(result.trim().startsWith('<title>Error</title>')).toBe(true);
			expect(result.includes('Error in <tag>')).toBe(true);
		});
	});

	describe('errorInlineHtml', () => {
		it('should return an HTML', () => {
			const result = util.errorInlineHtml('Error in <tag>');
			expect(result.toString()).toEqual(
				'Error in <tag>'
			);
		});
		it('should wrap HTML in a
 tag', () => {
			const result = util.errorInlineHtml('Error in <tag>', { block: true });
			expect(result.toString()).toEqual(
				'
Error in <tag>
'
			);
		});
	});

	describe('codeFragment', () => {
		it('should return a code fragment with line numbers', () => {
			const code = util.readFile('test/samples/code.ect');
			const result = util.codeFragment(code, 8);
			expect(result).toEqual(util.readFile('test/expected/code-snippet.txt'));
		});
	});

	describe('getComponentStack', () => {
		it('should return formatter stack trace', () => {
			const result = util.getComponentStack(`RangeError: Invalid valid date passed to format
at CreateDateTimeParts (/Users/tema/_/fledermaus/node_modules/intl/lib/core.js:3885:29)
at FormatDateTime (/Users/tema/_/fledermaus/node_modules/intl/lib/core.js:4079:17)
at DateTimeFormatConstructor.F (/Users/tema/_/fledermaus/node_modules/intl/lib/core.js:3848:20)
at Object.dateToString (/Users/tema/_/fledermaus/lib/helpers.js:197:17)
at _default (/Users/tema/_/morning.photos/templates/components/PostMeta.jsx:22:6)
at vdo (/Users/tema/_/fledermaus/node_modules/vdo/lib/index.js:37:14)
at _default (/Users/tema/_/morning.photos/templates/components/PostExcerpt.jsx:67:21)
at vdo (/Users/tema/_/fledermaus/node_modules/vdo/lib/index.js:37:14)
at /Users/tema/_/morning.photos/templates/Posts.jsx:32:12
at Array.map (<anonymous>)`);
			expect(result).toEqual(
				'components/PostMeta.jsx <- components/PostExcerpt.jsx <- templates/Posts.jsx'
			);
		});
	});
});


text:
namespace e2 { namespace memory {

struct memory_block_info {
    size_t _offset;
    size_t _len;
    void ** _lookup_ptr;
};

} }

#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
   <extension point="com.ibm.domino.das.service">
        <serviceResources
            class="com.ibm.domino.services.sample.service.SampleService"
            name="OpenNtfSample"
            path="sample"
            version="9.0.1">
        </serviceResources>
   </extension>
</plugin>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>TEST CORE</title>

    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

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

    <link rel="stylesheet" href="vendor/font-awesome-4.5.0/css/font-awesome.min.css">

    <link rel="stylesheet" href="vendor/ionicons-2.0.1/css/ionicons.min.css">

    <link rel="stylesheet" href="vendor/adminlte-2.3.0/css/AdminLTE.min.css">

    <link rel="stylesheet" href="vendor/adminlte-2.3.0/css/skins/skin-purple.min.css">

    <link rel="stylesheet" href="vendor/iCheck/flat/blue.css">

    <link rel="stylesheet" href="vendor/morris/morris.css">

    <link rel="stylesheet" href="vendor/jvectormap/jquery-jvectormap-1.2.2.css">

    <link rel="stylesheet" href="vendor/datepicker/datepicker3.css">

    <link rel="stylesheet" href="vendor/daterangepicker/daterangepicker-bs3.css">

    <link rel="stylesheet" href="vendor/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">

          CORE

          TEST CORE

            Toggle navigation

Нет новых сообщений

Все сообщения

Нет новых новостей

                    Все новости

                  Алиса Дисс

                      Алиса Дисс

Менеджер

                      Профиль

                      Выход

Алиса Дисс

               Онлайн

                 Оперативная панель

                 Финансы

                 Заказы

                 Отчеты

                 Тест

                 Система

 Новости

 Сообщения

 Профиль

 О системе


text:
package net.sf.jasperreports.charts.xml;

import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.design.JRDesignChart;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRBaseFactory;

import org.xml.sax.Attributes;

/**
 * @author Flavius Sana (flavius_sana@users.sourceforge.net)
 * @version $Id: JRAreaChartFactory.java 7199 2014-08-27 13:58:10Z teodord $
 */
public class JRAreaChartFactory extends JRBaseFactory {

	/**
	 * Creates an Area chart which is a combination of a Pie dataset and a Pie plot.
	 * @return an instance of {@link net.sf.jasperreports.engine.design.JRDesignChart JRDesignChart}
	 * representing the Area chart
	 */
	public Object createObject( Attributes atts ){
		JasperDesign jasperDesign = (JasperDesign)digester.peek(digester.getCount() - 2);

		JRDesignChart areaChart = new JRDesignChart(jasperDesign, JRChart.CHART_TYPE_AREA);

		return areaChart;
	}
}


text:
package info.toyonos.subtitles4j.helper;

import info.toyonos.subtitles4j.SubtitlesFileHandler;
import info.toyonos.subtitles4j.SubtitlesFileHandler.SubtitlesFile;
import info.toyonos.subtitles4j.factory.Subtitles4jException;
import info.toyonos.subtitles4j.factory.SubtitlesType;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

public class Subtitles4jUtilsTest
{
	@Rule
	public SubtitlesFileHandler subtitlesFileHandler = new SubtitlesFileHandler();

	@Rule
	public TemporaryFolder folder = new TemporaryFolder();

	@Test
	@SubtitlesFile(type=SubtitlesType.SRT, name={"test1", "shifted1"})
	public void testShiftPositive() throws Subtitles4jException, IOException
	{
		File inputFile = folder.newFile("tmp.srt");
		FileUtils.copyFile(subtitlesFileHandler.getFile("test1"), inputFile);
		Assert.assertEquals(
			FileUtils.readLines(subtitlesFileHandler.getFile("shifted1")),
			FileUtils.readLines(Subtitles4jUtils.shift(inputFile, 2500))
		);
	}

	@Test
	@SubtitlesFile(type=SubtitlesType.SRT, name={"test1", "shifted2"})
	public void testShiftNegative() throws Subtitles4jException, IOException
	{
		File inputFile = folder.newFile("tmp.srt");
		FileUtils.copyFile(subtitlesFileHandler.getFile("test1"), inputFile);
		Assert.assertEquals(
			FileUtils.readLines(subtitlesFileHandler.getFile("shifted2")),
			FileUtils.readLines(Subtitles4jUtils.shift(inputFile, -1000))
		);
	}

	@Test
	@SubtitlesFile(type=SubtitlesType.SRT, name={"test1", "shifted3"})
	public void testShiftNegativeZeroValue() throws Subtitles4jException, IOException
	{
		File inputFile = folder.newFile("tmp.srt");
		FileUtils.copyFile(subtitlesFileHandler.getFile("test1"), inputFile);
		Assert.assertEquals(
			FileUtils.readLines(subtitlesFileHandler.getFile("shifted3")),
			FileUtils.readLines(Subtitles4jUtils.shift(inputFile, -2500))
		);
	}

	@Test
	@SubtitlesFile(type=SubtitlesType.SRT, name={"test5", "removed1"})
	public void testRemoveCaptionsSimplePatternCaseSensitive() throws Subtitles4jException, IOException
	{
		File inputFile = folder.newFile("tmp.srt");
		FileUtils.copyFile(subtitlesFileHandler.getFile("test5"), inputFile);
		Assert.assertEquals(
			FileUtils.readLines(subtitlesFileHandler.getFile("removed1")),
			FileUtils.readLines(Subtitles4jUtils.removeCaptions(inputFile, "test"))
		);
	}

	@Test
	@SubtitlesFile(type=SubtitlesType.SRT, name={"test5", "removed2"})
	public void testRemoveCaptionsRegularPatternCaseSensitive() throws Subtitles4jException, IOException
	{
		File inputFile = folder.newFile("tmp.srt");
		FileUtils.copyFile(subtitlesFileHandler.getFile("test5"), inputFile);
		Assert.assertEquals(
			FileUtils.readLines(subtitlesFileHandler.getFile("removed2")),
			FileUtils.readLines(Subtitles4jUtils.removeCaptions(inputFile, "thi[a-z]+"))
		);
	}

	@Test
	@SubtitlesFile(type=SubtitlesType.SRT, name={"test5", "removed3"})
	public void testRemoveCaptionsSimplePatternCaseInsensitive() throws Subtitles4jException, IOException
	{
		File inputFile = folder.newFile("tmp.srt");
		FileUtils.copyFile(subtitlesFileHandler.getFile("test5"), inputFile);
		Assert.assertEquals(
			FileUtils.readLines(subtitlesFileHandler.getFile("removed3")),
			FileUtils.readLines(Subtitles4jUtils.removeCaptionsIgnoreCase(inputFile, "test"))
		);
	}

	@Test
	@SubtitlesFile(type=SubtitlesType.SRT, name={"test5", "removed4"})
	public void testRemoveCaptionsRegularPatternCaseInsensitive() throws Subtitles4jException, IOException
	{
		File inputFile = folder.newFile("tmp.srt");
		FileUtils.copyFile(subtitlesFileHandler.getFile("test5"), inputFile);
		Assert.assertEquals(
			FileUtils.readLines(subtitlesFileHandler.getFile("removed4")),
			FileUtils.readLines(Subtitles4jUtils.removeCaptionsIgnoreCase(inputFile, "thi[a-z]+"))
		);
	}
}


text:
<?php

namespace Api\Model\Scriptureforge\Typesetting;

class SettingModelLayout
{
    public function __construct()
    {
        // margins
        $this->insideMargin = 10;
        $this->outsideMargin = 10;
        $this->topMargin = 15;
        $this->bottomMargin = 10;

        // columns
        $this->bodyColumnsTwo = true;
        $this->titleColumnsTwo = false;
        $this->introColumnsTwo = false;
        $this->columnGutterRule = false;
        $this->columnShift = 5;
        $this->columnGutterRuleSkip = 0;
        $this->columnGutterFactor = 15;

        // header
        $this->headerPosition = 5;
        $this->useRunningHeader = true;
        $this->useRunningHeaderRule = false;
        $this->runningHeaderRulePosition = 4;

        $this->runningHeaderTitleLeft = "empty";
        $this->runningHeaderTitleCenter = "empty";
        $this->runningHeaderTitleRight = "empty";

        $this->runningHeaderEvenLeft = "firstref";
        $this->runningHeaderEvenCenter = "pagenumber";
        $this->runningHeaderEvenRight = "empty";

        $this->runningHeaderOddLeft = "empty";
        $this->runningHeaderOddCenter = "pagenumber";
        $this->runningHeaderOddRight = "lastref";

        $this->omitChapterNumberRH = false;
        $this->showVerseReferences = true;
        $this->omitBookReference = false;

        // footer
        $this->footerPosition = 5;
        $this->useRunningFooter = false;

        $this->runningFooterEvenLeft = "empty";
        $this->runningFooterEvenCenter = "empty";
        $this->runningFooterEvenRight = "empty";

        $this->runningFooterOddLeft = "empty";
        $this->runningFooterOddCenter = "empty";
        $this->runningFooterOddRight = "empty";

        $this->runningFooterTitleLeft = "empty";
        $this->runningFooterTitleCenter = "empty";
        $this->runningFooterTitleRight = "empty";

        // footnotes
        $this->useFootnoteRule = true;
        $this->pageResetCallersFootnotes = false;

        $this->omitCallerInFootnotes = false;
        // omitCallerInFootnotes (string 'f')

        $this->useSpecialCallerFootnotes = false;
        $this->paragraphedFootnotes = true;
        $this->useNumericCallersFootnotes = false;
        $this->specialCallerFootnotes = "\\krn0.2em *\\kern0.4em";

        // cross references
        $this->useSpecialCallerCrossrefs = false;
        $this->specialCallerCrossrefs = "\\kern0.2em *\\kern0.4em";
        $this->useAutoCallerCrossrefs = true;
        $this->omitCallerInCrossrefs = false;
        $this->paragraphedCrossrefs = true;
        $this->useNumericCallersCrossrefs = false;

        //'editing' features
        $this->useBackground = false;
        $this->backgroundComponents = "watermark";
        $this->watermarkText = "DRAFT";
        $this->useDiagnostic = false;
        $this->diagnosticComponents = "leading";

        // print options
        $this->pageSizeCode = "custom"; // this shouldn't be visible
        $this->pageHeight = 210;
        $this->pageWidth = 148;
        $this->printerPageSizeCode = "A4";

        $this->useDocInfo = false;
        $this->docInfoText = "";

        // body text
        $this->bodyTextLeading = 12;
        $this->bodyFontSize = 10;
        $this->rightToLeft = false;
        $this->justifyParagraphs = true;

        //Misc

        //advanced
        $this->extraRightMargin = 0;
        $this->chapterVerseSeperator = ":";
    }

    /**
     * @var integer
     */
    public $insideMargin;

    /**
     * @var integer
     */
    public $outsideMargin;

    /**
     * @var integer
     */
    public $topMargin;

    /**
     * @var integer
     */
    public $bottomMargin;

    /**
     * @var boolean
     */
    public $bodyColumnsTwo;

    /**
     * @var boolean
     */
    public $titleColumnsTwo;

    /**
     * @var boolean
     */
    public $introColumnsTwo;

    /**
     * @var boolean
     */
    public $columnGutterRule;

    /**
     * @var integer
     */
    public $columnShift;

    /**
     * @var integer
     */
    public $columnGutterRuleSkip;

    /**
     * @var integer
     */
    public $columnGutterFactor;

    /**
     * @var integer
     */
    public $headerPosition;

    /**
     * @var boolean
     */
    public $useRunningHeader;

    /**
     * @var boolean
     */
    public $useRunningHeaderRule;

    /**
     * @var integer
     */
    public $runningHeaderRulePosition;

    /**
     * @var string
     */
    public $runningHeaderTitleLeft;

    /**
     * @var string
     */
    public $runningHeaderTitleCenter;

    /**
     * @var string
     */
    public $runningHeaderTitleRight;

    /**
     * @var string
     */
    public $runningHeaderEvenLeft;

    /**
     * @var string
     */
    public $runningHeaderEvenCenter;

    /**
     * @var string
     */
    public $runningHeaderEvenRight;

    /**
     * @var string
     */
    public $runningHeaderOddLeft;

    /**
     * @var string
     */
    public $runningHeaderOddCenter;

    /**
     * @var string
     */
    public $runningHeaderOddRight;

    /**
     * @var boolean
     */
    public $omitChapterNumberRH;

    /**
     * @var boolean
     */
    public $showVerseReferences;

    /**
     * @var boolean
     */
    public $omitBookReference;

    /**
     * @var integer
     */
    public $footerPosition;

    /**
     * @var boolean
     */
    public $useRunningFooter;

    /**
     * @var string
     */
    public $runningFooterEvenLeft;

    /**
     * @var string
     */
    public $runningFooterEvenCenter;

    /**
     * @var string
     */
    public $runningFooterEvenRight;

    /**
     * @var string
     */
    public $runningFooterOddLeft;

    /**
     * @var string
     */
    public $runningFooterOddCenter;

    /**
     * @var string
     */
    public $runningFooterOddRight;

    /**
     * @var string
     */
    public $runningFooterTitleLeft;

    /**
     * @var string
     */
    public $runningFooterTitleCenter;

    /**
     * @var string
     */
    public $runningFooterTitleRight;

    /**
     * @var boolean
     */
    public $useFootnoteRule;

    /**
     * @var boolean
     */
    public $pageResetCallersFootnotes;

    /**
     * @var boolean
     */
    public $omitCallerInFootnotes;

    /**
     * @var boolean
     */
    public $useSpecialCallerFootnotes;

    /**
     * @var boolean
     */
    public $paragraphedFootnotes;

    /**
     * @var boolean
     */
    public $useNumericCallersFootnotes;

    /**
     * @var boolean
     */
    public $useSpecialCallerCrossrefs;

    /**
     * @var string
     */
    public $specialCallerCrossrefs;

    /**
     * @var boolean
     */
    public $useAutoCallerCrossrefs;

    /**
     * @var boolean
     */
    public $omitCallerInCrossrefs;

    /**
     * @var boolean
     */
    public $paragraphedCrossrefs;

    /**
     * @var boolean
     */
    public $useNumericCallersCrossrefs;

    /**
     * @var boolean
     */
    public $useBackground;

    /**
     * @var string
     */
    public $backgroundComponents;

    /**
     * @var string
     */
    public $watermarkText;

    /**
     * @var boolean
     */
    public $useDiagnostic;

    /**
     * @var string
     */
    public $diagnosticComponents;

    /**
     * @var string
     */
    public $pageSizeCode;

    /**
     * @var integer
     */
    public $pageWidth;

    /**
     * @var integer
     */
    public $pageHeight;

    /**
     * @var string
     */
    public $printerPageSizeCode;

    /**
     * @var boolean
     */
    public $useDocInfo;

    /**
     * @var string
     */
    public $docInfoText;

    /**
     * @var integer
     */
    public $bodyTextLeading;

    /**
     * @var integer
     */
    public $bodyFontSize;

    /**
     * @var boolean
     */
    public $rightToLeft;

    /**
     * @var boolean
     */
    public $justifyParagraphs;

    /**
     * @var integer
     */
    public $extraRightMargin;

    /**
     * @var string
     */
    public $chapterVerseSeperator;
}


text:
@extends('layouts.panel')

@section('title', "Edit {$character->name}")

@section('breadcrumb')

Characters

Edit

@stop

@section('content')
@if(isset($character))
{!! Form::model($character, ['class' => 'form-horizontal']) !!}
@else
{!! Form::open(['class' => 'form-horizontal']) !!}
@endif

 Character Informations

 Questions + Answers

			<button type="submit" class="btn btn-primary"> Save</button>

@include('characters.tab_info')

@include('characters.tab_questions', ['answers' => $character->answers])

{!! Form::close() !!}
@stop


text:
"""Executes task in a Kubernetes POD"""
import re
import warnings

from airflow.exceptions import AirflowException
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults
from airflow.contrib.kubernetes import kube_client, pod_generator, pod_launcher
from airflow.contrib.kubernetes.pod import Resources
from airflow.utils.helpers import validate_key
from airflow.utils.state import State
from airflow.version import version as airflow_version

class KubernetesPodOperator(BaseOperator):  # pylint: disable=too-many-instance-attributes
    """
    Execute a task in a Kubernetes Pod

    :param image: Docker image you wish to launch. Defaults to hub.docker.com,
        but fully qualified URLS will point to custom repositories.
    :type image: str
    :param namespace: the namespace to run within kubernetes.
    :type namespace: str
    :param cmds: entrypoint of the container. (templated)
        The docker images's entrypoint is used if this is not provided.
    :type cmds: list[str]
    :param arguments: arguments of the entrypoint. (templated)
        The docker image's CMD is used if this is not provided.
    :type arguments: list[str]
    :param image_pull_policy: Specify a policy to cache or always pull an image.
    :type image_pull_policy: str
    :param image_pull_secrets: Any image pull secrets to be given to the pod.
                               If more than one secret is required, provide a
                               comma separated list: secret_a,secret_b
    :type image_pull_secrets: str
    :param ports: ports for launched pod.
    :type ports: list[airflow.contrib.kubernetes.pod.Port]
    :param volume_mounts: volumeMounts for launched pod.
    :type volume_mounts: list[airflow.contrib.kubernetes.volume_mount.VolumeMount]
    :param volumes: volumes for launched pod. Includes ConfigMaps and PersistentVolumes.
    :type volumes: list[airflow.contrib.kubernetes.volume.Volume]
    :param labels: labels to apply to the Pod.
    :type labels: dict
    :param startup_timeout_seconds: timeout in seconds to startup the pod.
    :type startup_timeout_seconds: int
    :param name: name of the pod in which the task will run, will be used to
        generate a pod id (DNS-1123 subdomain, containing only [a-z0-9.-]).
    :type name: str
    :param env_vars: Environment variables initialized in the container. (templated)
    :type env_vars: dict
    :param secrets: Kubernetes secrets to inject in the container.
        They can be exposed as environment vars or files in a volume
    :type secrets: list[airflow.contrib.kubernetes.secret.Secret]
    :param in_cluster: run kubernetes client with in_cluster configuration.
    :type in_cluster: bool
    :param cluster_context: context that points to kubernetes cluster.
        Ignored when in_cluster is True. If None, current-context is used.
    :type cluster_context: str
    :param get_logs: get the stdout of the container as logs of the tasks.
    :type get_logs: bool
    :param annotations: non-identifying metadata you can attach to the Pod.
                        Can be a large range of data, and can include characters
                        that are not permitted by labels.
    :type annotations: dict
    :param resources: A dict containing resources requests and limits.
        Possible keys are request_memory, request_cpu, limit_memory, limit_cpu,
        and limit_gpu, which will be used to generate airflow.kubernetes.pod.Resources.
        See also kubernetes.io/docs/concepts/configuration/manage-compute-resources-container
    :type resources: dict
    :param affinity: A dict containing a group of affinity scheduling rules.
    :type affinity: dict
    :param node_selectors: A dict containing a group of scheduling rules.
    :type node_selectors: dict
    :param config_file: The path to the Kubernetes config file. (templated)
    :type config_file: str
    :param do_xcom_push: If do_xcom_push is True, the content of the file
        /airflow/xcom/return.json in the container will also be pushed to an
        XCom when the container completes.
    :type do_xcom_push: bool
    :param is_delete_operator_pod: What to do when the pod reaches its final
        state, or the execution is interrupted.
        If False (default): do nothing, If True: delete the pod
    :type is_delete_operator_pod: bool
    :param hostnetwork: If True enable host networking on the pod.
    :type hostnetwork: bool
    :param tolerations: A list of kubernetes tolerations.
    :type tolerations: list tolerations
    :param configmaps: A list of configmap names objects that we
        want mount as env variables.
    :type configmaps: list[str]
    :param pod_runtime_info_envs: environment variables about
                                  pod runtime information (ip, namespace, nodeName, podName).
    :type pod_runtime_info_envs: list[PodRuntimeEnv]
    :param security_context: security options the pod should run with (PodSecurityContext).
    :type security_context: dict
    :param dnspolicy: dnspolicy for the pod.
    :type dnspolicy: str
    """
    template_fields = ('cmds', 'arguments', 'env_vars', 'config_file')

    @apply_defaults
    def __init__(self,  # pylint: disable=too-many-arguments,too-many-locals
                 namespace,
                 image,
                 name,
                 cmds=None,
                 arguments=None,
                 ports=None,
                 volume_mounts=None,
                 volumes=None,
                 env_vars=None,
                 secrets=None,
                 in_cluster=None,
                 cluster_context=None,
                 labels=None,
                 startup_timeout_seconds=120,
                 get_logs=True,
                 image_pull_policy='IfNotPresent',
                 annotations=None,
                 resources=None,
                 affinity=None,
                 config_file=None,
                 node_selectors=None,
                 image_pull_secrets=None,
                 service_account_name='default',
                 is_delete_operator_pod=False,
                 hostnetwork=False,
                 tolerations=None,
                 configmaps=None,
                 security_context=None,
                 pod_runtime_info_envs=None,
                 dnspolicy=None,
                 do_xcom_push=False,
                 *args,
                 **kwargs):
        # https://github.com/apache/airflow/blob/2d0eff4ee4fafcf8c7978ac287a8fb968e56605f/UPDATING.md#unification-of-do_xcom_push-flag
        if kwargs.get('xcom_push') is not None:
            kwargs['do_xcom_push'] = kwargs.pop('xcom_push')
            warnings.warn(
                "`xcom_push` will be deprecated. Use `do_xcom_push` instead.",
                DeprecationWarning, stacklevel=2
            )
        super(KubernetesPodOperator, self).__init__(*args, resources=None, **kwargs)
        self.do_xcom_push = do_xcom_push
        self.image = image
        self.namespace = namespace
        self.cmds = cmds or []
        self.arguments = arguments or []
        self.labels = labels or {}
        self.startup_timeout_seconds = startup_timeout_seconds
        self.name = self._set_name(name)
        self.env_vars = env_vars or {}
        self.ports = ports or []
        self.volume_mounts = volume_mounts or []
        self.volumes = volumes or []
        self.secrets = secrets or []
        self.in_cluster = in_cluster
        self.cluster_context = cluster_context
        self.get_logs = get_logs
        self.image_pull_policy = image_pull_policy
        self.node_selectors = node_selectors or {}
        self.annotations = annotations or {}
        self.affinity = affinity or {}
        self.resources = self._set_resources(resources)
        self.config_file = config_file
        self.image_pull_secrets = image_pull_secrets
        self.service_account_name = service_account_name
        self.is_delete_operator_pod = is_delete_operator_pod
        self.hostnetwork = hostnetwork
        self.tolerations = tolerations or []
        self.configmaps = configmaps or []
        self.security_context = security_context or {}
        self.pod_runtime_info_envs = pod_runtime_info_envs or []
        self.dnspolicy = dnspolicy

    def execute(self, context):
        try:
            if self.in_cluster is not None:
                client = kube_client.get_kube_client(in_cluster=self.in_cluster,
                                                     cluster_context=self.cluster_context,
                                                     config_file=self.config_file)
            else:
                client = kube_client.get_kube_client(cluster_context=self.cluster_context,
                                                     config_file=self.config_file)

            # Add Airflow Version to the label
            # And a label to identify that pod is launched by KubernetesPodOperator
            self.labels.update(
                {
                    'airflow_version': airflow_version.replace('+', '-'),
                    'kubernetes_pod_operator': 'True',
                }
            )

            gen = pod_generator.PodGenerator()

            for port in self.ports:
                gen.add_port(port)
            for mount in self.volume_mounts:
                gen.add_mount(mount)
            for volume in self.volumes:
                gen.add_volume(volume)

            pod = gen.make_pod(
                namespace=self.namespace,
                image=self.image,
                pod_id=self.name,
                cmds=self.cmds,
                arguments=self.arguments,
                labels=self.labels,
            )

            pod.service_account_name = self.service_account_name
            pod.secrets = self.secrets
            pod.envs = self.env_vars
            pod.image_pull_policy = self.image_pull_policy
            pod.image_pull_secrets = self.image_pull_secrets
            pod.annotations = self.annotations
            pod.resources = self.resources
            pod.affinity = self.affinity
            pod.node_selectors = self.node_selectors
            pod.hostnetwork = self.hostnetwork
            pod.tolerations = self.tolerations
            pod.configmaps = self.configmaps
            pod.security_context = self.security_context
            pod.pod_runtime_info_envs = self.pod_runtime_info_envs
            pod.dnspolicy = self.dnspolicy

            launcher = pod_launcher.PodLauncher(kube_client=client,
                                                extract_xcom=self.do_xcom_push)
            try:
                (final_state, result) = launcher.run_pod(
                    pod,
                    startup_timeout=self.startup_timeout_seconds,
                    get_logs=self.get_logs)
            finally:
                if self.is_delete_operator_pod:
                    launcher.delete_pod(pod)

            if final_state != State.SUCCESS:
                raise AirflowException(
                    'Pod returned a failure: {state}'.format(state=final_state)
                )
            if self.do_xcom_push:
                return result
        except AirflowException as ex:
            raise AirflowException('Pod Launching failed: {error}'.format(error=ex))

    def _set_resources(self, resources):
        return Resources(**resources) if resources else Resources()

    def _set_name(self, name):
        validate_key(name, max_length=63)
        return re.sub(r'[^a-z0-9.-]+', '-', name.lower())


text:
package at.fhjoanneum.ippr.persistence.objects.engine.businessobject;

import at.fhjoanneum.ippr.persistence.objects.model.businessobject.field.BusinessObjectFieldModel;

public interface BusinessObjectFieldInstance {

  Long getBofiId();

  String getValue();

  void setValue(String value);

  BusinessObjectInstance getBusinessObjectInstance();

  BusinessObjectFieldModel getBusinessObjectFieldModel();
}