text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.ComponentModel.Composition;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.ErrorReporting;
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Utilities;

namespace Microsoft.CodeAnalysis.Editor.Implementation.Formatting
{
    [Export(typeof(IDocumentOptionsProviderFactory))]
    [Order(After = PredefinedDocumentOptionsProviderNames.EditorConfig)]
    internal sealed class InferredIndentationDocumentOptionsProviderFactory : IDocumentOptionsProviderFactory
    {
        private readonly IIndentationManagerService _indentationManagerService;

        [ImportingConstructor]
        [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
        public InferredIndentationDocumentOptionsProviderFactory(IIndentationManagerService indentationManagerService)
            => _indentationManagerService = indentationManagerService;

        public IDocumentOptionsProvider? TryCreate(Workspace workspace)
            => new DocumentOptionsProvider(_indentationManagerService);

        private class DocumentOptionsProvider : IDocumentOptionsProvider
        {
            private readonly IIndentationManagerService _indentationManagerService;

            public DocumentOptionsProvider(IIndentationManagerService indentationManagerService)
                => _indentationManagerService = indentationManagerService;

            public Task<IDocumentOptions?> GetOptionsForDocumentAsync(Document document, CancellationToken cancellationToken)
                => Task.FromResult<IDocumentOptions?>(new DocumentOptions(document.Project.Solution.Workspace, document.Id, _indentationManagerService));

            private sealed class DocumentOptions : IDocumentOptions
            {
                private readonly Workspace _workspace;
                private readonly DocumentId _documentId;
                private readonly IIndentationManagerService _indentationManagerService;

                public DocumentOptions(Workspace workspace, DocumentId id, IIndentationManagerService indentationManagerService)
                {
                    _workspace = workspace;
                    _documentId = id;
                    _indentationManagerService = indentationManagerService;
                }

                public bool TryGetDocumentOption(OptionKey option, out object? value)
                {
                    // We have to go back to the original workspace to see if this document is open, and if so, grab the text container. The API
                    // from the editor is defined on a text buffer, and once a Document is forked it's definitely not holding onto a buffer anymore.
                    if (_workspace.IsDocumentOpen(_documentId))
                    {
                        var currentDocument = _workspace.CurrentSolution.GetDocument(_documentId);
                        if (currentDocument != null && currentDocument.TryGetText(out var text))
                        {
                            var textBuffer = text.Container.TryGetTextBuffer();

                            if (textBuffer != null)
                            {
                                return TryGetOptionForBuffer(textBuffer, option, out value);
                            }
                            else
                            {
                                FatalError.ReportWithoutCrash(new System.Exception("We had an open document but it wasn't associated with a buffer. That meant we coudln't apply formatting settings."));
                            }
                        }
                    }

                    value = null;
                    return false;
                }

                private bool TryGetOptionForBuffer(ITextBuffer textBuffer, OptionKey option, out object? value)
                {
                    if (option.Option == FormattingOptions.UseTabs)
                    {
                        value = !_indentationManagerService.UseSpacesForWhitespace(textBuffer, explicitFormat: false);
                        return true;
                    }
                    else if (option.Option == FormattingOptions.TabSize)
                    {
                        value = _indentationManagerService.GetTabSize(textBuffer, explicitFormat: false);
                        return true;
                    }
                    else if (option.Option == FormattingOptions.IndentationSize)
                    {
                        value = _indentationManagerService.GetIndentSize(textBuffer, explicitFormat: false);
                        return true;
                    }
                    else
                    {
                        value = null;
                        return false;
                    }
                }
            }
        }
    }
}


text:
package mediajs.budgetbook.objects.entity;

import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import mediajs.budgetbook.objects.trans.StoreTO;

/**
 * Created by Juergen on 02.03.2015.
 */
public class StoreDAO extends AbstractExpenditureComponentDAO
{
	private static final String REAL_TYPE = " REAL";

	public static final String SQL_CREATE_ENTRIES =
			"CREATE TABLE " + StoreEntry.TABLE_NAME + " (" +
					StoreEntry._ID + " INTEGER PRIMARY KEY," +
					StoreEntry.COLUMN_VALUE + TEXT_TYPE + COMMA_SEP +
					StoreEntry.COLUMN_LATITUDE + REAL_TYPE + COMMA_SEP +
					StoreEntry.COLUMN_LONGITUDE + REAL_TYPE + COMMA_SEP +
					StoreEntry.COLUMN_SUGGESTED + INTEGER_TYPE + COMMA_SEP +
					StoreEntry.COLUMN_FAVORITE + INTEGER_TYPE +
					" );";

	public static final String   SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS " + StoreEntry.TABLE_NAME;
	private             String[] allColumns         =
			{StoreEntry._ID, StoreEntry.COLUMN_VALUE, StoreEntry.COLUMN_SUGGESTED, StoreEntry.COLUMN_FAVORITE, StoreEntry
					.COLUMN_LATITUDE, StoreEntry.COLUMN_LONGITUDE};

	public StoreDAO( SQLiteDatabase pDatabase )
	{
		database = pDatabase;
	}

	public StoreTO createStore( StoreTO StoreTO )
	{
		ContentValues values = getContentValues( StoreTO );

		long insertId = database.insert( StoreEntry.TABLE_NAME, null, values );
		StoreTO newStoreTO = getStoreTOByUid( insertId );
		return newStoreTO;
	}

	public StoreTO updateStore( StoreTO StoreTO )
	{
		ContentValues values = getContentValues( StoreTO );
		long updateId = database.update( StoreEntry.TABLE_NAME, values, StoreEntry._ID + "=" + StoreTO.getUid(), null );

		StoreTO newStoreTO = getStoreTOByUid( updateId );
		return newStoreTO;
	}

	public void deleteStore( StoreTO StoreTO )
	{
		deleteStore( StoreTO.getUid() );
	}

	public void deleteStore( long id )
	{
		database.delete( StoreEntry.TABLE_NAME, StoreEntry._ID + "=" + id, null );
	}

	public StoreTO getStoreTOByUid( long uid )
	{
		Cursor cursor = database.query( StoreEntry.TABLE_NAME,
		                                allColumns, StoreEntry._ID + " = " + uid, null,
		                                null, null, null );
		StoreTO result = null;

		if( cursor.moveToFirst() )
		{
			result = cursorToStoreTO( cursor );
		}
		cursor.close();
		return result;
	}

	public StoreTO getStoreTOByValue( String pValue )
	{
		Cursor cursor = database.query( StoreEntry.TABLE_NAME,
		                                allColumns, "TRIM(" + StoreEntry.COLUMN_VALUE + ") = '" + pValue.trim() + "'", null,
		                                null, null, null );
		StoreTO result = null;

		if( cursor.moveToFirst() )
		{
			result = cursorToStoreTO( cursor );
		}
		cursor.close();
		return result;
	}

	public Cursor getAllStoreTOsAsCursor()
	{
		return database.query( StoreEntry.TABLE_NAME, allColumns, null, null, null, null, null );
	}

	public List<StoreTO> getAllStoreTOs()
	{
		Cursor cursor;
		List<StoreTO> resultList = new LinkedList<StoreTO>();
		cursor = getAllStoreTOsAsCursor();
		if( cursor != null && cursor.getCount() > 0 && cursor.moveToFirst() )
		{
			do
			{
				resultList.add( cursorToStoreTO( cursor ) );
			}
			while( cursor.moveToNext() );
		}
		cursor.close();
		return resultList;
	}

	public Map<Long, StoreTO> getAllStoreTOsAsMap()
	{
		Cursor cursor;
		Map<Long, StoreTO> resultMap = new HashMap<Long, StoreTO>();
		cursor = getAllStoreTOsAsCursor();
		if( cursor != null && cursor.getCount() > 0 && cursor.moveToFirst() )
		{
			do
			{
				StoreTO storeTO = cursorToStoreTO( cursor );
				resultMap.put( storeTO.getUid(), storeTO );
			}
			while( cursor.moveToNext() );
		}
		cursor.close();
		return resultMap;
	}

	private ContentValues getContentValues( StoreTO StoreTO )
	{
		ContentValues values = new ContentValues();
		values.put( StoreEntry.COLUMN_VALUE, StoreTO.getValue() );
		values.put( StoreEntry.COLUMN_FAVORITE, StoreTO.isFavorite() ? 1 : 0 );
		values.put( StoreEntry.COLUMN_LATITUDE, StoreTO.getLatitude() );
		values.put( StoreEntry.COLUMN_LONGITUDE, StoreTO.getLongitude() );
		return values;
	}

	private StoreTO cursorToStoreTO( Cursor cursor )
	{
		StoreTO StoreTO = new StoreTO();
		StoreTO.setUid( cursor.getLong( 0 ) );
		StoreTO.setValue( cursor.getString( 1 ) );
		StoreTO.setSuggested( cursor.getInt( 2 ) > 0 );
		StoreTO.setFavorite( cursor.getInt( 3 ) > 0 );
		StoreTO.setLatitude( cursor.getDouble( 4 ) );
		StoreTO.setLongitude( cursor.getDouble( 5 ) );
		return StoreTO;
	}

	/* Inner class that defines the table contents */
	public static abstract class StoreEntry implements IExpenditureComponentEntry
	{
		public static final String TABLE_NAME = "t_store";

		/**
		 * The Latitude
		 *
Type: REAL

		 */
		public static final String COLUMN_LATITUDE = "c_latitude";

		/**
		 * The Longitude
		 *
Type: REAL

		 */
		public static final String COLUMN_LONGITUDE = "c_longitude";
	}
}

redpajama_set_name: RedPajamaGithub


text:
#import "LTStandardHeader.h"

#import "LTProjectsController.h"
#import "LTOpenSavePerformer.h"
#import "LTSingleDocumentPanel.h"
#import "LTBasicPerformer.h"
#import "LTInterfacePerformer.h"
#import "LTProject.h"
#import "LTTextView.h"
#import "LTProject+DocumentViewsController.h"

@implementation LTProjectsController

@synthesize currentProject;

- (id)currentDocument
{
	if ([self currentProject] != nil) {
		return [self currentProject];
	} else {
		return [super currentDocument];
	}
}

- (id)currentLTDocument
{
	if ([LTCurrentProject areThereAnyDocuments] == NO) {
		return nil;
	}

	NSWindow *mainWindow = [NSApp mainWindow];
	NSWindow *keyWindow = [NSApp keyWindow];
	id selectedDocument = [[[LTCurrentProject documentsArrayController] selectedObjects] objectAtIndex:0];

	if ([keyWindow isKindOfClass:[LTSingleDocumentPanel class]]) {
		if (keyWindow != nil) { // Loop through all single document windows to see if one of those is the key window
			NSArray *array = [LTBasic fetchAll:@"Document"];
			for (id item in array) {
				if (keyWindow == [item valueForKey:@"singleDocumentWindow"]) {
					return item;
				}
			}
		}
	} else if (mainWindow == LTCurrentWindow) {
		id firstResponder = [mainWindow firstResponder];
		if (firstResponder == [selectedDocument valueForKey:@"firstTextView"]) { // Guess that it is the firstTextView as it is usually correct
			return selectedDocument;
		}

		if ([firstResponder isKindOfClass:[LTTextView class]]) {
			NSArray *array = [LTBasic fetchAll:@"Document"];
			for (id item in array) {
				if (firstResponder == [item valueForKey:@"firstTextView"] || firstResponder == [item valueForKey:@"secondTextView"] || firstResponder == [item valueForKey:@"thirdTextView"]) {
					return item;
				}
			}
		}
	} else {

	}

	// Hasn't found the document so return the selected
	return selectedDocument;

}

- (LTTextView *)currentTextView
{
	id firstResponder = [[NSApp mainWindow] firstResponder];

	if ([firstResponder isKindOfClass:[LTTextView class]]) {
		return firstResponder;
	}

	// If the firstResponder isn't a LTTextView there isn't a current text view so return nil
	return nil;
}

- (NSString *)currentText
{
	NSString *returnString = [[self currentTextView] string];
	if (returnString == nil) {
		if ([LTCurrentProject areThereAnyDocuments] == NO) {
			return nil;
		}

		id selectedDocument = [[[LTCurrentProject documentsArrayController] selectedObjects] objectAtIndex:0];

		returnString = [[selectedDocument valueForKey:@"firstTextView"] string];
		if (returnString == nil) {
			returnString = @"";
		}
	}

	return returnString;
}

- (void)selectDocumentFromTheDock:(id)sender
{
	[NSApp activateIgnoringOtherApps:YES];
	[self selectDocument:[sender representedObject]];
}

- (void)putInRecentWithPath:(NSString *)path
{
	//Log([NSURL fileURLWithPath:path]);
	[self noteNewRecentDocumentURL:[NSURL fileURLWithPath:path]];
}

- (IBAction)openProjectAction:(id)sender
{
	NSOpenPanel *openPanel = [NSOpenPanel openPanel];
	[openPanel setResolvesAliases:YES];
	NSInteger result = [openPanel runModalForDirectory:[LTInterface whichDirectoryForOpen] file:nil types:[NSArray arrayWithObjects:@"smlp", @"smultronProject", nil]];
	if (result == NSOKButton) {
		[self performOpenProjectWithPath:[[openPanel filenames] objectAtIndex:0]];
	}
}

- (void)performOpenProjectWithPath:(NSString *)path
{
	[self putInRecentWithPath:path];

	id item;
	NSArray *array = [self documents];
	for (item in array) {
		if ([[[item valueForKey:@"project"] valueForKey:@"path"] isEqualToString:path]) {
			[[item window] makeKeyAndOrderFront:nil];
			return;
		}
	}

	id project = [self openUntitledDocumentAndDisplay:NO error:nil];
	[self setCurrentProject:project];
	[project makeWindowControllers];

	[project setFileURL:[NSURL fileURLWithPath:path]];
	[[project project] setValue:path forKey:@"path"];
	id projectToOpen = [NSUnarchiver unarchiveObjectWithData:[NSData dataWithContentsOfFile:path]];

	if ([projectToOpen isKindOfClass:[NSArray class]]) { // From version 2
		[self insertDocumentsFromProjectArray:projectToOpen];
	} else { // From version 3

		if ([projectToOpen valueForKey:@"windowFrame"] != nil) {
			[[project window] setFrame:NSRectFromString([projectToOpen valueForKey:@"windowFrame"]) display:NO animate:NO];
		}

		NSArray *documents = [projectToOpen valueForKey:@"documentsArray"];
		[self insertDocumentsFromProjectArray:documents];

		if ([projectToOpen valueForKey:@"selectedDocumentName"] != nil) {
			NSString *name = [projectToOpen valueForKey:@"selectedDocumentName"];
			NSArray *array = [project documents];
			for (id item in array) {
				if ([[item valueForKey:@"name"] isEqualToString:name]) {
					[project selectDocument:item];
					break;
				}
			}
		}

		if ([projectToOpen valueForKey:@"view"] != nil) {
			[[project project] setValue:[projectToOpen valueForKey:@"view"] forKey:@"view"];
		}
		if ([projectToOpen valueForKey:@"viewSize"] != nil) {
			[[project project] setValue:[projectToOpen valueForKey:@"viewSize"] forKey:@"viewSize"];
		}
		if ([projectToOpen valueForKey:@"dividerPosition"] != nil) {
			[[project project] setValue:[projectToOpen valueForKey:@"dividerPosition"] forKey:@"dividerPosition"];
			[project resizeMainSplitView];
		}

	}

	[project setDefaultViews];
	[project selectionDidChange];

	[[project documentsArrayController] rearrangeObjects];

	[project showWindows];
	[self setCurrentProject:nil];
}

- (void)insertDocumentsFromProjectArray:(NSArray *)array
{
	id item;
	for (item in array) {
		[LTOpenSave shouldOpen:[item valueForKey:@"path"] withEncoding:[[item valueForKey:@"encoding"] unsignedIntegerValue]];
		id document = LTCurrentDocument;
		if ([item valueForKey:@"selectedRange"] != nil && document != nil) {
			[[document valueForKey:@"firstTextView"] setSelectedRange:NSRangeFromString([item valueForKey:@"selectedRange"])];
			[[document valueForKey:@"firstTextView"] scrollRangeToVisible:NSRangeFromString([item valueForKey:@"selectedRange"])];
		}

		[LTCurrentDocument setValue:[item valueForKey:@"sortOrder"] forKey:@"sortOrder"];
	}
}

- (void)selectDocument:(id)document
{
	NSArray *projects = [self documents];
	for (id project in projects) {
		NSArray *documents = [[(LTProject *)project documents] allObjects];
		for (id item in documents) {
			if (item == document) {
				[[project window] makeKeyAndOrderFront:nil];
				[[project window] makeMainWindow];
				[[project window] makeFirstResponder:[document valueForKey:@"firstTextView"]];
				[project selectDocument:document];
				return;
			}
		}
	}
}
@end


text:
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

\section{Presentation of the game}

\subsection{The game in nearly an hundred words}
\subparagraph{}
\textnormal{ The name of the game will be Alien in town.\
The main idea of the game coming from two pre-existing games :}
\begin{itemize}
\item \texnormal{Mafia, a mod on the game Starcraft II.}
\item \texnormal{Loup-garoup de Thiercelieux.}
\end{itemize}

\subsection{The game in nearly a thousand words}
\subparagraph{}


text:
import PyV8

import os
import sys

from os.path import join, dirname, basename, abspath
from optparse import OptionParser

usage = """
  usage: %prog [options] <application module name or path>
"""

currentdir = abspath(dirname(__file__))
pyjspth = abspath(join(dirname(__file__), ".."))
sys.path = [(join(pyjspth, "pyjs", "src"))] + sys.path

import pyjs

pyjs.pyjspth = pyjspth
pyjs.path += [os.path.join(pyjspth, 'library'),
            os.path.join(pyjspth, 'addons'),
]

from pyjs import translator
from linker import PLATFORM, PyV8Linker, add_linker_options
from jsglobal import Global

class JSRuntimeError(Exception):
    def __init__(self, ctxt, exc):
        self.module = ctxt.locals['$pyjs']['track']['module']
        self.lineno = ctxt.locals['$pyjs']['track']['lineno']
        self.traceback = self.get_traceback(ctxt.locals['$pyjs']['trackstack'])
        if ':' in exc.message and not ' ' in exc.message.split(':', 1)[0]:
            errortype, errortext = exc.message.split(':', 1)
            self.jserrortype = errortype
            self.jserrortext = errortext
        else:
            self.jserrortype = exc.__class__.__name__
            self.jserrortext = exc.message

    def __str__(self):
        return "{0.jserrortype}: {0.module}.py:{0.lineno} {0.jserrortext}".\
               format(self)

    def full(self):
        return ("{0.jserrortype}: {0.module}.py:{0.lineno}\n"
                "Traceback:\n{trace}\n"
                "{0.jserrortext}".format(self, trace=self.get_traceback_text()))

    def get_traceback(self, jstb):
        tb = []
        for x in jstb:
            tb.append(dict(module=x['module'], lineno=x['lineno']))
        return tb

    def get_traceback_text(self):
        trace = []
        for x in self.traceback:
            trace.append("  {0}.py:{1}".format(x['module'], x['lineno']))
        return "\n".join(trace)

def main():
    usage = """
    usage: %prog [ options ] [ -c command | module_name | script | - ] [ -- arguments ]
    """
    parser = OptionParser(usage = usage)
    translator.add_compile_options(parser)

    parser.add_option(
        "-c",
        dest="command",
        help="Python command to run")

    args = sys.argv[1:]
    app_args = []
    if '--' in args:
        idx = args.index('--')
        app_args = args[idx+1:]
        args = args[0:idx]
    # override the default because we want print
    parser.set_defaults(print_statements=True)
    add_linker_options(parser)
    options, args = parser.parse_args(args)
    IS_REPL = False
    if len(args) == 0 or args[0] == '-':
        IS_REPL = True
        modules = ['main']
    else:
        modules = args

    app_args[0:0] = [modules[0]]

    _modules = []
    for mod in modules:
        if mod.startswith('.') or mod.startswith('/') or mod.endswith('.py'):
            pyjs.path[0:0] = [os.path.dirname(os.path.abspath(mod))]
            _modules.append(os.path.basename(mod).split('.')[0])
        else:
            _modules.append(mod)
    modules = _modules

    pyjs.path[0:0] = [join(pyjs.pyjspth, 'stdlib')]
    pyjs.path.append(join(pyjs.pyjspth, 'pyjs', 'src'))

    for d in options.library_dirs:
        pyjs.path.append(os.path.abspath(d))

    #print "paths:", pyjs.path
    translator_arguments = translator.get_compile_options(options)
    linker = PyV8Linker(modules, output=options.output,
                        platforms=[PLATFORM],
                        path=pyjs.path,
                        compiler=translator.compiler,
                        translator_arguments=translator_arguments)
    linker()

    fp = open(linker.out_file_mod, 'r')
    txt = fp.read()
    fp.close()

    #PyV8.debugger.enabled = True

    # create a context with an explicit global
    g = Global(app_args, pyjs.path)
    ctxt = PyV8.JSContext(g)
    g.__context__ = ctxt
    # enter the context
    ctxt.enter()
    try:
        x = ctxt.eval(txt)
    except Exception, e:
        print JSRuntimeError(ctxt, e).full()

    if IS_REPL:
        from repl import REPL
        REPL(translator.compiler, linker, translator_arguments, g, ctxt)()

if __name__ == '__main__':
    main()


text:
module Stupidedi
  module Versions
    module ThirtyFifty
      module SegmentDefs
        s = Schema
        e = ElementDefs
        r = ElementReqs

        W07 = s::SegmentDef.build(:W07, "Item Detail For Stock Receipt",
          "To indicate quantity and condition of product received",
          e::E380 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
          e::E355 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
          e::E438 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
          e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
          e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
          e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
          e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
          e::E451 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
          e::E893 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
          e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
          e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
          SyntaxNotes::R.build( 3,  4),
          SyntaxNotes::P.build( 4,  5),
          SyntaxNotes::P.build( 6,  7),
          SyntaxNotes::P.build(10, 11))
      end
    end
  end
end


text:
package com.matchandtrade.rest.v1.controller;

import com.matchandtrade.persistence.entity.ArticleEntity;
import com.matchandtrade.persistence.entity.AttachmentEntity;
import com.matchandtrade.rest.v1.json.AttachmentJson;
import com.matchandtrade.test.DefaultTestingConfiguration;
import com.matchandtrade.test.JsonTestUtil;
import com.matchandtrade.test.helper.ArticleHelper;
import com.matchandtrade.test.helper.AttachmentHelper;
import com.matchandtrade.util.JsonUtil;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;

import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@RunWith(SpringRunner.class)
@DefaultTestingConfiguration
public class ArticleAttachmentControllerIT extends BaseControllerIT {
	@Autowired
	private ArticleHelper articleHelper;
	@Autowired
	private AttachmentHelper attachmentHelper;

	@Before
	public void before() {
		super.before();
	}

	@Test
	public void put_When_NewArticle_Then_StatusIsOk() throws Exception {
		ArticleEntity existingArticle = articleHelper.createPersistedEntity();
		AttachmentEntity existingAttachment = attachmentHelper.createPersistedEntity();
		mockMvc
			.perform(
				put("/matchandtrade-api/v1/articles/{articleId}/attachments/{attachmentId}",
					existingArticle.getArticleId(), existingAttachment.getAttachmentId())
					.header(HttpHeaders.AUTHORIZATION, authorizationHeader)
			)
			.andExpect(status().isOk());
	}

	@Test
	public void get_When_AttachmentExists_Then_StatusIsOk() throws Exception {
		ArticleEntity existingArticle = articleHelper.createPersistedEntity();
		AttachmentEntity existingAttachment = attachmentHelper.createPersistedEntity(existingArticle);
		String response = mockMvc
			.perform(
				get("/matchandtrade-api/v1/articles/{articleId}/attachments/", existingArticle.getArticleId())
					.header(HttpHeaders.AUTHORIZATION, authorizationHeader)
			)
			.andExpect(status().isOk())
			.andReturn()
			.getResponse()
			.getContentAsString();
		List<AttachmentJson> attachments = JsonTestUtil.fromArrayString(response, AttachmentJson.class);
		AttachmentJson actual = attachments.get(0);
		assertEquals(existingAttachment.getAttachmentId(), actual.getAttachmentId());
	}
}


text:
from amusement.parks.disney.DisneyPark import DisneyPark
class CaliforniaAdventure(DisneyPark):

    def __init__(self):
        super(CaliforniaAdventure, self).__init__()

    def getId(self):
        return '336894'

    def getName(self):
        return "Disney California Adventure"


text:
import React, { Component } from "react";
import styles from "./styles.css";
import FlatButton from 'material-ui/FlatButton';

type Props = {
  children: React$Element<any>;
};

type State = {
};

export default class Button extends Component {
  props: Props;
  state: State;

  render() {
    return (
      <FlatButton
        {...this.props}
        className={styles.root}
      >
        {this.props.children}
      </FlatButton>
    );
  }
}


text:
layout: null
section-type: contact
title: Contact
---
## Contact

Drop me an email if you are interested in me coding for you or saving the galaxy!

<small>
*Can't guarantee the last one*
</small>


text:
namespace AntMe
{
    /// <summary>
    /// Basisklasse für alle Properties, die nachträglich an ein Interop Objekt angehängt werden.
    /// </summary>
    public abstract class InteropProperty : Property
    {
        /// <summary>
        /// Interner Update-Call
        /// </summary>
        internal void InternalUpdate(int round)
        {
            Update(round);
        }

        /// <summary>
        /// Virtueller Update-Call, der von der Implementierung genutzt werden kann.
        /// </summary>
        protected virtual void Update(int round) { }

        /// <summary>
        /// Basis-Delegat für diverse parameterlose Interop Events.
        /// </summary>
        public delegate void InteropEvent();

        /// <summary>
        /// Basis-Delegat für diverse parameterisierte Interop Events.
        /// </summary>
        /// <typeparam name="T">Typ des Parameters.</typeparam>
        /// <param name="parameter">Wert des Parameters.</param>
        public delegate void InteropEvent<in T>(T parameter);
    }
}


text:
package net.glowstone.entity;

import com.google.common.collect.ImmutableBiMap;
import org.bukkit.entity.EntityType;

import static org.bukkit.entity.EntityType.AREA_EFFECT_CLOUD;
import static org.bukkit.entity.EntityType.ARMOR_STAND;
import static org.bukkit.entity.EntityType.ARROW;
import static org.bukkit.entity.EntityType.BAT;
import static org.bukkit.entity.EntityType.BLAZE;
import static org.bukkit.entity.EntityType.BOAT;
import static org.bukkit.entity.EntityType.CAVE_SPIDER;
import static org.bukkit.entity.EntityType.CHICKEN;
import static org.bukkit.entity.EntityType.COD;
import static org.bukkit.entity.EntityType.COW;
import static org.bukkit.entity.EntityType.CREEPER;
import static org.bukkit.entity.EntityType.DOLPHIN;
import static org.bukkit.entity.EntityType.DONKEY;
import static org.bukkit.entity.EntityType.DRAGON_FIREBALL;
import static org.bukkit.entity.EntityType.DROPPED_ITEM;
import static org.bukkit.entity.EntityType.DROWNED;
import static org.bukkit.entity.EntityType.EGG;
import static org.bukkit.entity.EntityType.ELDER_GUARDIAN;
import static org.bukkit.entity.EntityType.ENDERMAN;
import static org.bukkit.entity.EntityType.ENDERMITE;
import static org.bukkit.entity.EntityType.ENDER_CRYSTAL;
import static org.bukkit.entity.EntityType.ENDER_DRAGON;
import static org.bukkit.entity.EntityType.ENDER_PEARL;
import static org.bukkit.entity.EntityType.ENDER_SIGNAL;
import static org.bukkit.entity.EntityType.EVOKER;
import static org.bukkit.entity.EntityType.EVOKER_FANGS;
import static org.bukkit.entity.EntityType.FALLING_BLOCK;
import static org.bukkit.entity.EntityType.FIREBALL;
import static org.bukkit.entity.EntityType.FIREWORK;
import static org.bukkit.entity.EntityType.FISHING_HOOK;
import static org.bukkit.entity.EntityType.GHAST;
import static org.bukkit.entity.EntityType.GIANT;
import static org.bukkit.entity.EntityType.GUARDIAN;
import static org.bukkit.entity.EntityType.HORSE;
import static org.bukkit.entity.EntityType.HUSK;
import static org.bukkit.entity.EntityType.ILLUSIONER;
import static org.bukkit.entity.EntityType.IRON_GOLEM;
import static org.bukkit.entity.EntityType.ITEM_FRAME;
import static org.bukkit.entity.EntityType.LEASH_HITCH;
import static org.bukkit.entity.EntityType.LLAMA;
import static org.bukkit.entity.EntityType.LLAMA_SPIT;
import static org.bukkit.entity.EntityType.MAGMA_CUBE;
import static org.bukkit.entity.EntityType.MINECART;
import static org.bukkit.entity.EntityType.MULE;
import static org.bukkit.entity.EntityType.MUSHROOM_COW;
import static org.bukkit.entity.EntityType.OCELOT;
import static org.bukkit.entity.EntityType.PARROT;
import static org.bukkit.entity.EntityType.PHANTOM;
import static org.bukkit.entity.EntityType.PIG;
import static org.bukkit.entity.EntityType.POLAR_BEAR;
import static org.bukkit.entity.EntityType.PRIMED_TNT;
import static org.bukkit.entity.EntityType.PUFFERFISH;
import static org.bukkit.entity.EntityType.RABBIT;
import static org.bukkit.entity.EntityType.SALMON;
import static org.bukkit.entity.EntityType.SHEEP;
import static org.bukkit.entity.EntityType.SHULKER;
import static org.bukkit.entity.EntityType.SHULKER_BULLET;
import static org.bukkit.entity.EntityType.SILVERFISH;
import static org.bukkit.entity.EntityType.SKELETON;
import static org.bukkit.entity.EntityType.SKELETON_HORSE;
import static org.bukkit.entity.EntityType.SLIME;
import static org.bukkit.entity.EntityType.SMALL_FIREBALL;
import static org.bukkit.entity.EntityType.SNOWBALL;
import static org.bukkit.entity.EntityType.SNOWMAN;
import static org.bukkit.entity.EntityType.SPECTRAL_ARROW;
import static org.bukkit.entity.EntityType.SPIDER;
import static org.bukkit.entity.EntityType.SPLASH_POTION;
import static org.bukkit.entity.EntityType.SQUID;
import static org.bukkit.entity.EntityType.STRAY;
import static org.bukkit.entity.EntityType.THROWN_EXP_BOTTLE;
import static org.bukkit.entity.EntityType.TRIDENT;
import static org.bukkit.entity.EntityType.TROPICAL_FISH;
import static org.bukkit.entity.EntityType.TURTLE;
import static org.bukkit.entity.EntityType.VEX;
import static org.bukkit.entity.EntityType.VILLAGER;
import static org.bukkit.entity.EntityType.VINDICATOR;
import static org.bukkit.entity.EntityType.WITCH;
import static org.bukkit.entity.EntityType.WITHER;
import static org.bukkit.entity.EntityType.WITHER_SKELETON;
import static org.bukkit.entity.EntityType.WITHER_SKULL;
import static org.bukkit.entity.EntityType.WOLF;
import static org.bukkit.entity.EntityType.ZOMBIE;
import static org.bukkit.entity.EntityType.ZOMBIE_HORSE;
import static org.bukkit.entity.EntityType.ZOMBIE_VILLAGER;
import static org.bukkit.entity.EntityType.ZOMBIFIED_PIGLIN;

public class EntityNetworkUtil {
    private static final ImmutableBiMap<EntityType, Integer> MOB_IDS
        = ImmutableBiMap.<EntityType, Integer>builder()
        .put(BAT, 3)
        .put(BLAZE, 4)
        .put(CAVE_SPIDER, 6)
        .put(CHICKEN, 7)
        .put(COD, 8)
        .put(COW, 9)
        .put(CREEPER, 10)
        .put(DONKEY, 11)
        .put(DOLPHIN, 12)
        .put(DROWNED, 14)
        .put(ELDER_GUARDIAN, 15)
        .put(ENDER_DRAGON, 17)
        .put(ENDERMAN, 18)
        .put(ENDERMITE, 19)
        .put(EVOKER, 21)
        .put(GHAST, 26)
        .put(GIANT, 27)
        .put(GUARDIAN, 28)
        .put(HORSE, 29)
        .put(HUSK, 30)
        .put(ILLUSIONER, 31)
        .put(LLAMA, 36)
        .put(MAGMA_CUBE, 38)
        .put(MULE, 46)
        .put(MUSHROOM_COW, 47)
        .put(OCELOT, 48)
        .put(PARROT, 50)
        .put(PIG, 51)
        .put(PUFFERFISH, 52)
        .put(ZOMBIFIED_PIGLIN, 53)
        .put(POLAR_BEAR, 54)
        .put(RABBIT, 56)
        .put(SALMON, 57)
        .put(SHEEP, 58)
        .put(SHULKER, 59)
        .put(SILVERFISH, 61)
        .put(SKELETON, 62)
        .put(SKELETON_HORSE, 63)
        .put(SLIME, 64)
        .put(SNOWMAN, 66)
        .put(SPIDER, 69)
        .put(SQUID, 70)
        .put(STRAY, 71)
        .put(TROPICAL_FISH, 72)
        .put(TURTLE, 73)
        .put(VEX, 78)
        .put(VILLAGER, 79)
        .put(IRON_GOLEM, 80)
        .put(VINDICATOR, 81)
        .put(WITCH, 82)
        .put(WITHER, 83)
        .put(WITHER_SKELETON, 84)
        .put(WOLF, 86)
        .put(ZOMBIE, 87)
        .put(ZOMBIE_HORSE, 88)
        .put(ZOMBIE_VILLAGER, 89)
        .put(PHANTOM, 90)
        .build();

    private static final ImmutableBiMap<EntityType, Integer> OBJECT_IDS
        = ImmutableBiMap.<EntityType, Integer>builder()
        .put(BOAT, 1)
        .put(DROPPED_ITEM, 2)
        .put(AREA_EFFECT_CLOUD, 3)
        .put(MINECART, 10)
        .put(PRIMED_TNT, 50)
        .put(ENDER_CRYSTAL, 51)
        .put(ARROW, 60)
        .put(SNOWBALL, 61)
        .put(EGG, 62)
        .put(FIREBALL, 63)
        .put(SMALL_FIREBALL, 64)
        .put(ENDER_PEARL, 65)
        .put(WITHER_SKULL, 66)
        .put(SHULKER_BULLET, 67)
        .put(LLAMA_SPIT, 68)
        .put(FALLING_BLOCK, 70)
        .put(ITEM_FRAME, 71)
        .put(ENDER_SIGNAL, 72)
        .put(SPLASH_POTION, 73)
        .put(THROWN_EXP_BOTTLE, 75)
        .put(FIREWORK, 76)
        .put(LEASH_HITCH, 77)
        .put(ARMOR_STAND, 78)
        .put(EVOKER_FANGS, 79)
        .put(FISHING_HOOK, 90)
        .put(SPECTRAL_ARROW, 91)
        .put(DRAGON_FIREBALL, 93)
        .put(TRIDENT, 94)
        .build();

    /**
     * Gets the network ID of a mob entity.
     *
     * @param type the mob entity type
     * @return the network ID of the mob entity, or -1 if it is not a mob.
     */
    public static int getMobId(EntityType type) {
        return MOB_IDS.getOrDefault(type, -1);
    }

    /**
     * Gets the network ID of an object entity.
     *
     * @param type the object entity type
     * @return the network ID of the object entity, or -1 if it is not an object.
     */
    public static int getObjectId(EntityType type) {
        return OBJECT_IDS.getOrDefault(type, -1);
    }
}


text:
const config = require('./webpack')

module.exports = config


text:
import styled from 'styled-components';

const SecondSection = styled.section`
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
width: 40%;
height: 100%;
background: #333;
transform: skewX(180deg);
transform-origin: top right;
`;

export default SecondSection;


text:
define("dojox/editor/plugins/nls/bs/TextColor",{setButtonText:"Postavi",cancelButtonText:"Odustani"});
//# sourceMappingURL=TextColor.js.map


text:
from optparse import OptionParser

usage = "usage: %prog [options] JOBNAME"
parser = OptionParser(usage=usage, version="1.0")
parser.add_option("-H", "--host", dest="host", help="host", metavar="HOST")
parser.add_option("-p", "--port", dest="port", help="port", metavar="PORT")
parser.add_option("-u", "--url", dest="url", help="url", metavar="URL")
parser.add_option("-a", "--authorization", dest="authorization", help="Username:password on sites with basic authentication", metavar="AUTH_PAIR")

(options, args) = parser.parse_args()
if len(args) < 1:
	parser.error("please supply the jobName")

import urllib2
from base64 import b64encode
import json
import sys
import socket

returnCode = None

if options.port:
	serverUrl = "http://%(host)s:%(port)s%(url)s" % vars(options)
else:
	serverUrl = "http://%(host)s%(url)s" % vars(options)

socket.setdefaulttimeout(5)
request = urllib2.Request(serverUrl)

if (not options.authorization is None):
	request.add_header('Authorization', 'Basic ' + b64encode(options.authorization))

try:
	response = urllib2.urlopen(request)
except urllib2.HTTPError as e:
	print "CRITICAL: HTTP Error: {0} : \n {1}".format(e.code, e.read())
	if returnCode is None:
		returnCode = 2
except urllib2.URLError as e:
	print "CRITICAL: URL Error: {0} ".format(e.reason)
	if returnCode is None:
		returnCode = 2

jobs = json.load(response)

for arg in args:
	jobName = arg
	job = next((j for j in jobs if jobName in j['taskClass']), None)

	if (job is None):
		print "CRITICAL: Job : %s not defined." % jobName
		if returnCode is None:
			returnCode = 2

	elif (not job['started']):
		print "CRITICAL: Job : %s has not started." % jobName
		if returnCode is None:
			returnCode = 2

	else:
		print "OK: Job : %s has been scheduled and started" % jobName

if returnCode is None:
	returnCode = 0

print jobs
print "RETURN CODE {0}".format(returnCode)
print "\n"
sys.exit(returnCode)


text:
if [ $# -eq 0 ]; then
  echo "Need to specify container to start. One or both of oracle, db2"
  exit 1
fi

SUCCESS_TOKEN=SUCCESS
RESULT=${SUCCESS_TOKEN}
while [ $# -ge 1 ]
do
  if [ "${1}" = "oracle" ]; then
    CONTAINER_NAMES="${CONTAINER_NAMES} oracleslick"
  elif [ "${1}" = "db2" ]; then
    CONTAINER_NAMES="${CONTAINER_NAMES} db2slick"
    DB2NAME=SLICKTST
  else
    echo "Unknown container type ${1}"
    exit 1
  fi
  shift
done

# This bit is properly weird and took me ages to find a workaround. Basically, without a connection
# to the db in a shell that is kept alive, aggregate functions with nulls behave incorrectly
# so the AggregateTest.testGroupBy test fails
db2HackConnection () {
  echo "Starting persitant db2 connection"
  docker exec -i ${CONTAINER_NAME} bash -c "su - db2inst1 -c 'while true; do db2 connect to $DB2NAME && while sleep 65535;do :; done; sleep 5; done'" &
}

# sometimes, startup on travis fails, so retry up to 5 times.
for try in 1 2 3 4 5
do
  for CONTAINER_NAME in ${CONTAINER_NAMES}
  do
    echo "Trying to start container ${CONTAINER_NAME} #$try"
    RUNNING=$(docker inspect  --format="{{ .State.Running}}" ${CONTAINER_NAME}  2> /dev/null)
    if [ $? -eq 1 ]; then
      if [ "${CONTAINER_NAME}" = "oracleslick" ]; then
	RESULT=$(docker run -d -p 49160:22 -p 49161:1521 --name ${CONTAINER_NAME} wnameless/oracle-xe-11g && echo -e "\n${SUCCESS_TOKEN}")
      elif [ "${CONTAINER_NAME}" = "db2slick" ]; then
	RESULT=$(docker run -d -p 50000:50000 --name ${CONTAINER_NAME} -e DB2INST1_PASSWORD=db2inst1-pwd -e LICENSE=accept  ibmcom/db2express-c:latest "db2start" &&
	# Extract non-free db2 jdbc driver jar
	docker cp ${CONTAINER_NAME}:/home/db2inst1/sqllib/java/db2jcc4.jar . &&
	docker exec -i -u db2inst1 -t ${CONTAINER_NAME} bash -l -c "db2 create database $DB2NAME" &&
	echo -e "\n${SUCCESS_TOKEN}")
      fi
    elif [ "$RUNNING" = "false" ]; then
      echo "Container ${CONTAINER_NAME} exists, but stopped. Starting ..."
      RESULT=$(docker start ${CONTAINER_NAME} && echo -e "\n${SUCCESS_TOKEN}")
    elif [ "$RUNNING" = "true" ]; then
      echo "Container ${CONTAINER_NAME} already running"
      RESULT=${SUCCESS_TOKEN}
    fi
    LAST_LINE=$(echo "${RESULT}" | tail -n 1)
    if [ "${LAST_LINE}" != "${SUCCESS_TOKEN}" ]; then
      echo "Container startup failed. Retry ..."
      break
    elif [ "${CONTAINER_NAME}" = "db2slick" ]; then
      db2HackConnection
    fi
  done
  if [ "${LAST_LINE}" = "${SUCCESS_TOKEN}" ]; then
    echo "Container startup succeeded"
    exit 0
  fi

# If in travis environment, restart docker service can help initalisation problems
  if [ "${TRAVIS}" = "true" ]; then
    echo "Removing container: ${CONTAINER_NAME}"
    docker stop ${CONTAINER_NAME} && docker rm ${CONTAINER_NAME}

    echo "Restart Docker:"
    sudo restart docker
    echo "Resetting iptables:"
    sudo iptables -F

    echo "Docker status:"
    sudo service docker status

    echo "Docker status:"
    sudo service docker status
  fi

  echo "Sleeping..."
  sleep 5
done
# if we got here, container startup has failed
exit 1


text:
#ifndef _MFnReflectShader
#define _MFnReflectShader
//
//-
// ==========================================================================
// Copyright (C) 1995 - 2006 Autodesk, Inc., and/or its licensors.  All
// rights reserved.
//
// The coded instructions, statements, computer programs, and/or related
// material (collectively the "Data") in these files contain unpublished
// information proprietary to Autodesk, Inc. ("Autodesk") and/or its
// licensors,  which is protected by U.S. and Canadian federal copyright law
// and by international treaties.
//
// The Data may not be disclosed or distributed to third parties or be
// copied or duplicated, in whole or in part, without the prior written
// consent of Autodesk.
//
// The copyright notices in the Software and this entire statement,
// including the above license grant, this restriction and the following
// disclaimer, must be included in all copies of the Software, in whole
// or in part, and all derivative works of the Software, unless such copies
// or derivative works are solely in the form of machine-executable object
// code generated by a source language processor.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
// AUTODESK DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED
// WARRANTIES INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF
// NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
// OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO
// EVENT WILL AUTODESK AND/OR ITS LICENSORS BE LIABLE FOR ANY LOST
// REVENUES, DATA, OR PROFITS, OR SPECIAL, DIRECT, INDIRECT, OR
// CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK AND/OR ITS LICENSORS HAS
// BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES.
// ==========================================================================
//+
//
// CLASS:    MFnReflectShader
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnReflectShader)
//
// MFnReflectShader allows manipulation of dependency graph nodes representing
// reflective surface shaders.  This includes Phong and Blinn shaders.
//
// *****************************************************************************

#if defined __cplusplus

// *****************************************************************************

// INCLUDED HEADER FILES

#include <maya/MObject.h>
#include <maya/MStatus.h>
#include <maya/MFnLambertShader.h>
// *****************************************************************************

// DECLARATIONS

class MFnLambertShader;

class MColor;

// *****************************************************************************

// CLASS DECLARATION (MFnReflectShader)

/// Manage Reflective Surface Shaders
/**
  Facilitate the creation and manipulation of reflective surface shaders.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32

class OPENMAYA_EXPORT MFnReflectShader : public MFnLambertShader
{

	declareMFn( MFnReflectShader, MFn::kReflect );

public:
	///
	short       reflectedRayDepthLimit( MStatus * ReturnStatus = NULL ) const;
	///
	MStatus     setReflectedRayDepthLimit( const short& new_limit );
	///
	MColor      specularColor( MStatus * ReturnStatus = NULL ) const;
	///
	MStatus     setSpecularColor( const MColor& specular_color );
	///
	float       reflectivity( MStatus * ReturnStatus = NULL ) const;
	///
	MStatus     setReflectivity( const float& reflectivity );
	///
	MColor      reflectedColor( MStatus * ReturnStatus = NULL ) const;
	///
	MStatus     setReflectedColor( const MColor& reflected_color );

protected:
// No protected members

private:
// No private members

};

#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32

// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnReflectShader */


text:
package com.adben.testdatabuilder.entity.datamodel;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 */
@Entity
@Table(name = "customer", indexes = {
    @Index(columnList = "store_id", name = "idx_fk_store_id"),
    @Index(columnList = "address_id", name = "idx_fk_address_id"),
    @Index(columnList = "last_name", name = "idx_last_name")
})
public class Customer implements Serializable {

  @Id
  @GeneratedValue
  @Column(name = "customer_id", nullable = false, columnDefinition = "SMALLINT UNSIGNED")
  private Short customerId;

  @Column(name = "store_id", nullable = false, columnDefinition = "TINYINT UNSIGNED")
  private Short storeId;

  @Column(name = "first_name", nullable = false, columnDefinition = "VARCHAR(45)", length = 45)
  private String firstName;

  @Column(name = "last_name", nullable = false, columnDefinition = "VARCHAR(45)", length = 45)
  private String lastName;

  @Column(name = "email", nullable = false, columnDefinition = "VARCHAR(50)", length = 50)
  private String email;

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "address_id", columnDefinition = "SMALLINT UNSIGNED", nullable = false)
  private Address address;

  @Column(name = "active", nullable = false, columnDefinition = "BOOLEAN")
  private Boolean active = Boolean.TRUE;

  @Column(name = "create_date", nullable = false, columnDefinition = "DATETIME")
  private Date createDate;

  @Column(name = "last_update", nullable = false, columnDefinition = "TIMESTAMP")
  private Timestamp lastUpdate;

  public Customer() {
    this.lastUpdate = new Timestamp(System.currentTimeMillis());
  }

  public Short getCustomerId() {
    return this.customerId;
  }

  public void setCustomerId(final Short customerId) {
    this.customerId = customerId;
  }

  public Short getStoreId() {
    return this.storeId;
  }

  public void setStoreId(final Short storeId) {
    this.storeId = storeId;
  }

  public String getFirstName() {
    return this.firstName;
  }

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

  public String getLastName() {
    return this.lastName;
  }

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

  public String getEmail() {
    return this.email;
  }

  public void setEmail(final String email) {
    this.email = email;
  }

  public Address getAddress() {
    return this.address;
  }

  public void setAddress(final Address address) {
    this.address = address;
  }

  public Boolean getActive() {
    return this.active;
  }

  public void setActive(final Boolean active) {
    this.active = active;
  }

  public Date getCreateDate() {
    return this.createDate;
  }

  public void setCreateDate(final Date createDate) {
    this.createDate = createDate;
  }

  public Timestamp getLastUpdate() {
    return this.lastUpdate;
  }

  public void setLastUpdate(final Timestamp lastUpdate) {
    this.lastUpdate = lastUpdate;
  }

}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.bigquerydatatransfer.v1.model;

/**
 * A request to determine whether the user has valid credentials. This method is used to limit the
 * number of OAuth popups in the user interface. The user id is inferred from the API call context.
 * If the data source has the Google+ authorization type, this method returns false, as it cannot be
 * determined whether the credentials are already valid merely based on the user id.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the BigQuery Data Transfer API. For a detailed
 * explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class CheckValidCredsRequest extends com.google.api.client.json.GenericJson {

  @Override
  public CheckValidCredsRequest set(String fieldName, Object value) {
    return (CheckValidCredsRequest) super.set(fieldName, value);
  }

  @Override
  public CheckValidCredsRequest clone() {
    return (CheckValidCredsRequest) super.clone();
  }

}


text:
/**
 * Demo for "34 Emulate extensible enums with interfaces".
 */
package com.effectivejava.enumannotations;

/**
 * @author Kaibo
 *
 */
public interface Operation {
	double apply(double x, double y);
}


text:
class BacktraceDecorator < Draper::Decorator
  def lines
    @lines ||= object.lines.map { |line| BacktraceLineDecorator.new line }
  end
end


text:
from fabric.api import local, settings, lcd
from django.contrib.auth.models import User

def hello():
    print("Hello world!")

def flushmigrations():
	with settings(warn_only=True):
		local("rm nba_stats/nba/migrations/*")

def createdb(name):
	local("createdb {name}".format(**locals()))

def dropdb(name):
	with settings(warn_only=True):
		local("dropdb {name}".format(**locals()))

def makemigrations(app_label):
	with lcd("nba_stats"):
		local("python manage.py makemigrations {app_label}".format(**locals()))

def migrate():
	with lcd("nba_stats"):
		local("python manage.py migrate")

def createsuperuser():
	User.objects.create_superuser('admin', 'admin@example.com', 'admin')

def hardflush(db_name, app_label):
	dropdb(db_name)
	flushmigrations()
	makemigrations(app_label)
	createdb(db_name)
	migrate()
	createsuperuser()


text:
<!DOCTYPE html>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Tests that the addTextTrack() only accepts known 'kind' values.

        <video>
        </video>


text:
<?php
require_once '../configuration.php';

$sql = "SELECT `water_supply_source_name`, `water_supply_source_code` FROM `org_source_of_water_supply_main`";
$result = mysql_query($sql) or die(mysql_error() . "

Code:checkPasswordIsCorrect:1

Query:
___
$sql
");

$data = array();
while ($row = mysql_fetch_array($result)) {
    $data[] = array(
        'text' => $row['water_supply_source_name'],
        'value' => $row['water_supply_source_code']
    );
}
$json_data = json_encode($data);

print_r($json_data);
?>


text:
class QuickbooksSync::Vendors::Vendor < Vendor

  def sync!
    return false unless valid?
    qb_service_vendor = Quickbooks::Service::Vendor.new
    qb_service_vendor.access_token = user.user_oauth_intuit
    qb_service_vendor.company_id = user.realm_id
    if qb_vendor = find_vendor
      update_attributes(qb_id: qb_vendor.id)
    end

    method_type = qb_id ? :update : :create
    response = qb_service_vendor.send(method_type, qb_vendor_model)
    update_from_qb_response(response)
  end

  private

  def find_vendor
    query_builder = Quickbooks::Util::QueryBuilder.new
    return unless name
    qb_vendor_service.query("SELECT * FROM Vendor WHERE #{query_builder.clause('DisplayName', '=', name)}").entries.first
  end

  def qb_vendor_model
    @qb_vendor_model ||= Quickbooks::Model::Vendor.new(qb_vendor_params)
  end

  def qb_vendor_service
    return @qb_vendor_service if @qb_vendor_service

    @qb_vendor_service ||= Quickbooks::Service::Vendor.new
    @qb_vendor_service.access_token = user.user_oauth_intuit
    @qb_vendor_service.realm_id = user.realm_id
    @qb_vendor_service
  end

  def qb_vendor_params
    params = {
      id: qb_id,
      sync_token: sync_token,
      given_name: contact_person,
      company_name: name,
      display_name: name,
      print_on_check_name: name,
      account_number: bank_account_number
    }

    params[:email_address] = email if email.present?
    params[:primary_phone] = qb_phone_builder_for(business_number) if business_number
    params[:mobile_phone] = qb_phone_builder_for(cell_number) if cell_number
    params[:fax_phone] = qb_phone_builder_for(fax_number) if fax_number
    params[:billing_address] = qb_billing_address if address1

    params
  end

  def qb_phone_builder_for(phone)
    qb_phone_builder = Quickbooks::Model::TelephoneNumber.new
    qb_phone_builder.free_form_number = phone
    qb_phone_builder
  end

  def qb_billing_address
    address = Quickbooks::Model::PhysicalAddress.new
    address.line1 = address1
    address.line2 = address2
    address.line3 = address3
    address.city = city
    address.country_sub_division_code = state
    address.postal_code = zip
    address.country = 'United States of America'
    address
  end

  def update_from_qb_response(response)
    return unless response && response.id
    update_column(:sync_token, response.sync_token)
    update_column(:qb_id, response.id)
    update_column(:qb_account_number, response.account_number)
  end
end


text:
using SmartCardApi.Infrastructure;
using SmartCardApi.Infrastructure.Interfaces;
using SmartCardApi.ISO7816.CommandAPDU.Header;
using SmartCardApi.SecureMessaging.DataObjects.Builded;

namespace SmartCardApi.SecureMessaging
{
    public class ProtectedCommandApdu : IBinary
    {
        private readonly IBinary _kSmac;
        private readonly IBinary _kSenc;
        private readonly IBinary _incrementedSsc;
        private readonly IBinary _rawCommandApdu;

        public ProtectedCommandApdu(
                IBinary rawCommandApdu,
                IBinary kSenc,
                IBinary kSmac,
                IBinary incrementedSsc
            )
        {
            _rawCommandApdu = rawCommandApdu;
            _kSmac = kSmac;
            _kSenc = kSenc;
            _incrementedSsc = incrementedSsc;
        }
        public byte[] Bytes()
        {
            var do87 = new BuildedDO87(
                            _rawCommandApdu,
                            _kSenc
                        );
            var do97 = new BuildedDO97(_rawCommandApdu);
            var do8e = new BuildedDO8E(
                            _rawCommandApdu,
                            _incrementedSsc,
                            _kSmac,
                            _kSenc
                       );
            return new ConstructedProtectedCommandApdu(
                    new MaskedCommandApduHeader(
                        new CommandApduHeader(_rawCommandApdu)
                    ),
                    do87,
                    do97,
                    do8e
                ).Bytes();
        }
    }
}


text:
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
<link rel="match" href="vrl-in-multicols-ref.html">
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />

There should be no red.

    XXX

XX

        XXXX XXXX XXXX XXXX XXXX

XX

    XXX

XX

        XXXX XXXX XXXX XXXX

XX

XXXX

    XXX

XX

       XXXX XXXX XXXX XXXX

XX

       XXXX

    XXX

XX

       XXXX XXXX XXXX XX

XX

XX

    XXX

XX

      XXXX XXXX XXXX XX

XX

      XXX

    XXX

XX

      XXXX XXXX XXXX XX

XX

XXX


text:
#include "http/request/fileinterface.h"
#include "kernel/main.h"

zend_class_entry *phalcon_http_request_fileinterface_ce;

static const zend_function_entry phalcon_http_request_fileinterface_method_entry[] = {
	PHP_ABSTRACT_ME(Phalcon_Http_Request_FileInterface, getSize, NULL)
	PHP_ABSTRACT_ME(Phalcon_Http_Request_FileInterface, getName, NULL)
	PHP_ABSTRACT_ME(Phalcon_Http_Request_FileInterface, getTempName, NULL)
	PHP_ABSTRACT_ME(Phalcon_Http_Request_FileInterface, getType, NULL)
	PHP_ABSTRACT_ME(Phalcon_Http_Request_FileInterface, getRealType, NULL)
	PHP_ABSTRACT_ME(Phalcon_Http_Request_FileInterface, moveTo, arginfo_phalcon_http_request_fileinterface_moveto)
	PHP_FE_END
};

/**
 * Phalcon\Http\Request\FileInterface initializer
 */
PHALCON_INIT_CLASS(Phalcon_Http_Request_FileInterface){

	PHALCON_REGISTER_INTERFACE(Phalcon\\Http\\Request, FileInterface, http_request_fileinterface, phalcon_http_request_fileinterface_method_entry);

	return SUCCESS;
}

/**
 * Returns the file size of the uploaded file
 *
 * @return int
 */
PHALCON_DOC_METHOD(Phalcon_Http_Request_FileInterface, getSize);

/**
 * Returns the real name of the uploaded file
 *
 * @return string
 */
PHALCON_DOC_METHOD(Phalcon_Http_Request_FileInterface, getName);

/**
 * Returns the temporal name of the uploaded file
 *
 * @return string
 */
PHALCON_DOC_METHOD(Phalcon_Http_Request_FileInterface, getTempName);

/**
 * Returns the mime type reported by the browser
 * This mime type is not completely secure, use getRealType() instead
 *
 * @return string
 */
PHALCON_DOC_METHOD(Phalcon_Http_Request_FileInterface, getType);

/**
 * Gets the real mime type of the upload file using finfo
 *
 * @return string
 */
PHALCON_DOC_METHOD(Phalcon_Http_Request_FileInterface, getRealType);

/**
 * Move the temporary file to a destination
 *
 * @param string $destination
 * @return boolean
 */
PHALCON_DOC_METHOD(Phalcon_Http_Request_FileInterface, moveTo);


text:
package ls.output.html.view;

import java.util.HashMap;

import ls.commands.result.UserUsernameResult;
import ls.db.Property;
import ls.db.User;
import ls.http.common.Writable;
import ls.output.html.HtmlElem;
import ls.output.html.HtmlPage;

public class UserUsernameView extends HtmlPage implements ITypeView{

	public UserUsernameView(UserUsernameResult result, HashMap<String, String> map) {
		super("Users",
				h1(text("Details of "+result.getUsers().get(0).username)),
				userItemList(result),
				h1(text("Properties of "+result.getUsers().get(0).username)),
				result.getProperties().size() > 0 ? userPropertiesTable(result):(ul(text("Nao existe propriedades"))),
				rentals(result),
				goBack("/users", "Users"),
				goInit()

			);
	}

	private static Writable rentals(UserUsernameResult result) {
		HtmlElem h3 = new HtmlElem("h3");
		h3.withContent(
				li(a(ofUserRental(result.getUsers().get(0)),"Rentals")));
		return h3;
	}

	private static Writable userPropertiesTable(UserUsernameResult result) {
		int nColunas = 5;
		int style = 150 * nColunas;
		HtmlElem table = new HtmlElem("table").withAttr("style","width:"+style+"px").withAttr("border", "1");
		table.withContent(tr(th(text("pid"),th(text("type"),th(text("price"),th(text("location"),th(text("description"))))))));
		for(Property property : result.getProperties())
		{
			table.withContent(tr(
					td(a(of(property),Integer.toString(property.pid)),td(text(property.type),td(text(Integer.toString(property.price)),td(text(property.location),td(text(property.description))))))));
		}
		return table;

	}

	private static Writable userItemList(UserUsernameResult result) {
		HtmlElem ul = new HtmlElem("ul");
		for(User user : result.getUsers())
		{
			ul.withContent(
					li(text("Username: "+user.username),li(text("Password: "+user.password),li(text("Email: "+user.email),li(text("Fullname: "+user.fullName))))));
		}
		return ul;
	}

	private static String of(Property property)
	{
		return String.format("/properties/details/%s", property.pid);
	}
	private static String ofUserRental(User user)
	{
		return String.format("/users/%s/rentals", user.username);
	}

}


text:
@interface BFLoginViewController ()

@property (weak, nonatomic) IBOutlet UITextField *usernameTextField;
@property (weak, nonatomic) IBOutlet UITextField *emailTextField;

@end

@implementation BFLoginViewController

- (IBAction)startButtonPressed:(id)sender {
    if (self.usernameTextField.text.length <= 0){
        UIAlertView *noUsernameAlert = [[UIAlertView alloc] initWithTitle:@"no username" message:@"please enter a username" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [noUsernameAlert show];
    }
    if (self.emailTextField.text.length <= 0) {
        UIAlertView *noEmailAlert = [[UIAlertView alloc] initWithTitle:@"no email" message:@"please enter an email" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [noEmailAlert show];
    }
    if (self.emailTextField.text.length > 0 && self.usernameTextField.text.length > 0) {
        UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
        spinner.center = CGPointMake(160, 240);
        spinner.tag = 12;
        [self.view addSubview:spinner];
        [spinner startAnimating];
        [((UIButton *)sender) setEnabled:NO];
        NSString *urlRequestString = [NSString stringWithFormat:@"http://gazetapshare.herokuapp.com/api/v1/users/new?user[username]=%@&&user[email]=%@", self.usernameTextField.text, self.emailTextField.text];
        urlRequestString = [urlRequestString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
        [NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlRequestString]] queue:[NSOperationQueue currentQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
            if (!connectionError) {
                NSError *JSONError = nil;
                NSDictionary* userResponse = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&JSONError];
                NSString *username = [userResponse objectForKey:@"username"];
                NSString *email = [userResponse objectForKey:@"email"];
                NSNumber *uniqueId = [userResponse objectForKey:@"id"];
                if (!JSONError && username.length > 0 && uniqueId) {
                    [self saveUser:userResponse];
                }
            }
        }];
    }
}

-(void)saveUser:(NSDictionary *)userResponse
{
    BFRestKitManager *manager = [BFRestKitManager sharedManager];
    NSManagedObjectContext *context = manager.managedObjectContext;
    //NSManagedObject *user = [NSEntityDescription insertNewObjectForEntityForName:@"User" inManagedObjectContext:context];
    BFUser *user = [BFUser fetchUser];
    [user setValue:[userResponse objectForKey:@"id"] forKey:@"uniqueId"];
    [user setValue:[userResponse objectForKey:@"username"] forKey:@"username"];
    [user setValue:[userResponse objectForKey:@"email"] forKey:@"email"];
    [user setValue:[userResponse objectForKey:@"food_notifications"] forKey:@"foodNotifications"];
    [user setValue:[userResponse objectForKey:@"verify_reports"] forKey:@"verifyReports"];
    [user setValue:[userResponse objectForKey:@"daily_reminders"] forKey:@"dailyReminders"];

    NSError *error = nil;
    // Save the object to persistent store
    if (![context save:&error]) {
        NSLog(@"Can't Save! %@ %@", error, [error localizedDescription]);
    } else {
        [self performSegueWithIdentifier:@"loggedIn" sender:self];
    }
}

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

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

@end


text:
/**
 * For testable.
 */
define(function (require) {

    var numberUtil = require('../util/number');

    var roundNumber = numberUtil.round;

    var helper = {};

    /**
     * @param {Array.<number>} extent Both extent[0] and extent[1] should be valid number.
     *                                Should be extent[0] < extent[1].
     * @param {number} splitNumber splitNumber should be >= 1.
     * @return {Object} {interval, intervalPrecision, niceTickExtent}
     */
    helper.intervalScaleNiceTicks = function (extent, splitNumber) {
        var result = {};
        var span = extent[1] - extent[0];

        var interval = result.interval = numberUtil.nice(span / splitNumber, true);
        // Tow more digital for tick.
        var precision = result.intervalPrecision = numberUtil.getPrecisionSafe(interval) + 2;
        // Niced extent inside original extent
        var niceTickExtent = result.niceTickExtent = [
            roundNumber(Math.ceil(extent[0] / interval) * interval, precision),
            roundNumber(Math.floor(extent[1] / interval) * interval, precision)
        ];

        helper.fixExtent(niceTickExtent, extent);

        return result;
    };

    function clamp(niceTickExtent, idx, extent) {
        niceTickExtent[idx] = Math.max(Math.min(niceTickExtent[idx], extent[1]), extent[0]);
    }

    // In some cases (e.g., splitNumber is 1), niceTickExtent may be out of extent.
    helper.fixExtent = function (niceTickExtent, extent) {
        !isFinite(niceTickExtent[0]) && (niceTickExtent[0] = extent[0]);
        !isFinite(niceTickExtent[1]) && (niceTickExtent[1] = extent[1]);
        clamp(niceTickExtent, 0, extent);
        clamp(niceTickExtent, 1, extent);
        if (niceTickExtent[0] > niceTickExtent[1]) {
            niceTickExtent[0] = niceTickExtent[1];
        }
    };

    helper.intervalScaleGetTicks = function (interval, extent, niceTickExtent, intervalPrecision) {
        var ticks = [];

        // If interval is 0, return [];
        if (!interval) {
            return ticks;
        }

        // Consider this case: using dataZoom toolbox, zoom and zoom.
        var safeLimit = 10000;

        if (extent[0] < niceTickExtent[0]) {
            ticks.push(extent[0]);
        }
        var tick = niceTickExtent[0];

        while (tick <= niceTickExtent[1]) {
            ticks.push(tick);
            // Avoid rounding error
            tick = roundNumber(tick + interval, intervalPrecision);
            if (tick === ticks[ticks.length - 1]) {
                // Consider out of safe float point, e.g.,
                // -3711126.9907707 + 2e-10 === -3711126.9907707
                break;
            }
            if (ticks.length > safeLimit) {
                return [];
            }
        }
        // Consider this case: the last item of ticks is smaller
        // than niceTickExtent[1] and niceTickExtent[1] === extent[1].
        if (extent[1] > (ticks.length ? ticks[ticks.length - 1] : niceTickExtent[1])) {
            ticks.push(extent[1]);
        }

        return ticks;
    };

    return helper;
});


text:
package org.finra.alphaNumeric;

import java.util.ArrayList;
import java.util.List;
import static org.hamcrest.core.IsEqual.equalTo;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.hamcrest.core.Is.is;
import org.hamcrest.core.IsCollectionContaining;
import static org.hamcrest.core.IsCollectionContaining.hasItem;
import static org.hamcrest.core.IsNot.not;

/**
 *
 * @author gax
 */
public class SymbolTest {

    private static final int[] DEFAULT_BASE = {3, 4, 6, 7, 2};
    private Symbol instance;

    public SymbolTest() {
    }

    @BeforeClass
    public static void setUpClass() {
    }

    @AfterClass
    public static void tearDownClass() {
    }

    @Before
    public void setUp() {
        instance = new Symbol(DEFAULT_BASE);
    }

    /**
     * Test of getSymbolPosition method, of class Symbol.
     */
    @Test
    public void testGetSymbolPosition() {
        int result = instance.getSymbolPosition();
        assertThat(result, is(equalTo(0)));
    }

    /**
     * Test of setSymbolPosition method, of class Symbol.
     */
    @Test
    public void testSetSymbolPosition() {
        assertThat(instance.getSymbolPosition(), is(not(equalTo(99))));
        instance.setSymbolPosition(99);
        assertThat(instance.getSymbolPosition(), is(equalTo(99)));
    }

    @Test(expected = IllegalArgumentException.class)
    public void testSetSymbolPositionOutOfRangeLow() {
        instance.setSymbolPosition(-1);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testSetSymbolPositionOutOfRangeHigh() {
        instance.setSymbolPosition(Integer.MAX_VALUE);
    }

    /**
     * Test of inc, getSymbolPosition, and setSymbolPosition methods,.
     */
    @Test
    public void testInc() {
        assertThat(instance.getSymbolPosition(), is(equalTo(0)));
        assertThat(instance.inc(), is(equalTo(1)));
        assertThat(instance.getSymbolPosition(), is(equalTo(1)));
        instance.setSymbolPosition(9);
        assertThat(instance.inc(), is(equalTo(10)));
        assertThat(instance.getSymbolPosition(), is(equalTo(10)));
    }

    /**
     * Test of toString method, of class Symbol.
     */
    @Test
    public void testToString() {
        assertThat(instance.toString(), is(equalTo("34672")));
        instance.inc();
        assertThat(instance.toString(), is(equalTo("3467A")));
    }

    /**
     * Test of toSymbolChars method, of class Symbol.
     */
    @Test
    public void testToSymbolChars() {
        char[] result = instance.toSymbolChars();
        assertArrayEquals("34672".toCharArray(), result);
    }

    @Test
    public void testIterator() {
        List<String> all = new ArrayList<>();
        for (String s : instance) {
            all.add(s);
        }

        assertThat(all.size(), is(equalTo(instance.getSize())));
        assertThat(all, hasItem("FINRA"));
    }

}


text:
#region License

#endregion

using System;

namespace Spring.Http.Client
{
    /// <summary>
    /// Represents a client-side HTTP request.
    /// </summary>
    /// <remarks>
    /// <para>
    /// Created via an implementation of the <see cref="IClientHttpRequestFactory"/>.
    /// </para>
    /// <para>
    /// A client HTTP request can be executed,
    /// getting an <see cref="IClientHttpResponse"/> which can be read from.
    /// </para>
    /// </remarks>
    /// <seealso cref="IClientHttpRequestFactory"/>
    /// <seealso cref="IClientHttpResponse"/>
    /// <author>Arjen Poutsma</author>
    /// <author>Bruno Baia (.NET)</author>
    public interface IClientHttpRequest : IHttpOutputMessage
    {
        /// <summary>
        /// Gets the HTTP method of the request.
        /// </summary>
        HttpMethod Method { get; }

        /// <summary>
        /// Gets the URI of the request.
        /// </summary>
        Uri Uri { get; }

#if !SILVERLIGHT
        /// <summary>
        /// Execute this request, resulting in a <see cref="IClientHttpResponse" /> that can be read.
        /// </summary>
        /// <returns>The response result of the execution</returns>
	    IClientHttpResponse Execute();
#endif

#if !CF_3_5
        /// <summary>
        /// Execute this request asynchronously.
        /// </summary>
        /// <param name="state">
        /// An optional user-defined object that is passed to the method invoked
        /// when the asynchronous operation completes.
        /// </param>
        /// <param name="executeCompleted">
        /// The <see cref="Action{ClientHttpRequestCompletedEventArgs}"/> to perform when the asynchronous execution completes.
        /// </param>
        void ExecuteAsync(object state, Action<ClientHttpRequestCompletedEventArgs> executeCompleted);

        /// <summary>
        /// Cancels a pending asynchronous operation.
        /// </summary>
        void CancelAsync();
#endif
    }
}


text:
package org.elasticsearch.action.admin.cluster.node.shutdown;

import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;

import java.io.IOException;

/**
 *
 */
public class NodesShutdownResponse extends ActionResponse {

    private ClusterName clusterName;
    private DiscoveryNode[] nodes;

    NodesShutdownResponse() {
    }

    public NodesShutdownResponse(ClusterName clusterName, DiscoveryNode[] nodes) {
        this.clusterName = clusterName;
        this.nodes = nodes;
    }

    public ClusterName clusterName() {
        return this.clusterName;
    }

    public ClusterName getClusterName() {
        return clusterName();
    }

    public DiscoveryNode[] nodes() {
        return this.nodes;
    }

    public DiscoveryNode[] getNodes() {
        return nodes();
    }

    @Override
    public void readFrom(StreamInput in) throws IOException {
        super.readFrom(in);
        clusterName = ClusterName.readClusterName(in);
        nodes = new DiscoveryNode[in.readVInt()];
        for (int i = 0; i < nodes.length; i++) {
            nodes[i] = DiscoveryNode.readNode(in);
        }
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {
        super.writeTo(out);
        clusterName.writeTo(out);
        out.writeVInt(nodes.length);
        for (DiscoveryNode node : nodes) {
            node.writeTo(out);
        }
    }
}


text:
//= INCLUDES ==========================
#include "Spartan.h"
#include "../RHI_Implementation.h"
#include "../RHI_DescriptorSetLayout.h"
//=====================================

//= NAMESPACES =====
using namespace std;
//==================

namespace Spartan
{
    RHI_DescriptorSetLayout::~RHI_DescriptorSetLayout()
    {

    }

    void* RHI_DescriptorSetLayout::CreateDescriptorSet(const size_t hash, const RHI_DescriptorCache* descriptor_cache)
    {
        return nullptr;
    }

    void RHI_DescriptorSetLayout::UpdateDescriptorSet(void* descriptor_set, const vector<RHI_Descriptor>& descriptors)
    {

    }

    void* RHI_DescriptorSetLayout::CreateDescriptorSetLayout(const vector<RHI_Descriptor>& descriptors)
    {
        return nullptr;
    }
}


text:
#ifndef _NOTIFY_H_
#define _NOTIFY_H_

#ifdef __cplusplus
extern "C" {
#endif
typedef enum _HARDERROR_RESPONSE_OPTION {
		OptionAbortRetryIgnore,
		OptionOk,
		OptionOkCancel,
		OptionRetryCancel,
		OptionYesNo,
		OptionYesNoCancel,
		OptionShutdownSystem,
		OptionExplorerTrayBaloon,
		OptionCancelTryAgainContinue
} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;

typedef enum _HARDERROR_RESPONSE {
		ResponseReturnToCaller,
		ResponseNotHandled,
		ResponseAbort,
		ResponseCancel,
		ResponseIgnore,
		ResponseNo,
		ResponseOk,
		ResponseRetry,
		ResponseYes,
		ResponseTryAgain,
		ResponseContinue
} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;

#define MB_ICONHAND                 0x00000010L
#define MB_ICONQUESTION             0x00000020L
#define MB_ICONEXCLAMATION          0x00000030L
#define MB_ICONASTERISK             0x00000040L

#if(WINVER >= 0x0400)
#define MB_USERICON                 0x00000080L
#define MB_ICONWARNING              MB_ICONEXCLAMATION
#define MB_ICONERROR                MB_ICONHAND
#endif /* WINVER >= 0x0400 */

#define MB_ICONINFORMATION          MB_ICONASTERISK
#define MB_ICONSTOP                 MB_ICONHAND
#define MB_SETFOREGROUND            0x00010000L

#define MB_DEFBUTTON1               0x00000000L
#define MB_DEFBUTTON2               0x00000100L
#define MB_DEFBUTTON3               0x00000200L

ULONG
kMessageBox (
	PUNICODE_STRING Message,
	PUNICODE_STRING Caption,
	ULONG ResponseOption,
	ULONG Type
	);

#ifdef __cplusplus
}
#endif

#endif


text:
layout: post
title:  "O Scrum tá na área (parte 3/3)"
date:   2017-06-01 19:31:00
tags: scrum, who to, using scrum
---
Na reta final para que você entenda de forma fácil como funciona o Scrum, é fundamental que o papél do Scrum Master esteja bem claro! Afinal, quem é o Scrum Master? Este papél é a ponte entre o cliente Produc Owner (PO) e Time Scrum, atua de forma a remover os impedimentos para que o Sprint seja concluído. Um dos eventos mais poderosos do Scrum Master é a *Daily Meeting* esse evento nada mais é do que uma reunião RÁPIDA com os membros do time para que três perguntas simples sejam respondidas, essas perguntas mágicas são:
* O que eu fiz ontem?
* O que farei hoje?
* Tem algo me impedindo?

A resposta destas perguntas são a base para o Scrum Master saber o status da Sprint atual e quais decisões ele precisa tomar. Ao verificar por exemplo que algum membro do time possui impedimentos para realizar seu trabalho, o Scrum Master precisa entrar em ação auxiliando no que for necessário para que o problema seja rapidamente resolvido, isso para garantir a entrega no fim da Sprint!
>Um dos eventos mais poderosos do Scrum Master é a Daily Meeting.

**Conclusão:**
Eu conheci o Scrum há muito tempo atrás e tive a oportunidade de ver como ele se molda à diferentes necessidades. Sua simplicidade e flexibilidade dá ao time uma ferramenta incrível para que o trabalho seja organizado e percebido pelo cliente, no fim das contas ele terá agregado valor ao projeto e isso com artefatos e eventos baratos. Entender o Scrum é fácil, fazer as pessoas se adaptarem e adoratem sua cultura é outra história, exige paciência.

  {% for post in site.posts %}

      {{ post.title }}

  {% endfor %}


text:
using Tibia.Constants;

namespace Tibia.Packets.Incoming
{
    public class PlayerWalkCancelPacket : IncomingPacket
    {
        public byte Direction { get; set; }

        public PlayerWalkCancelPacket(Objects.Client c)
            : base(c)
        {
            Type = IncomingPacketType.PlayerWalkCancel;
            Destination = PacketDestination.Client;
        }

        public override bool ParseMessage(NetworkMessage msg, PacketDestination destination)
        {
            int position = msg.Position;

            if (msg.GetByte() != (byte)IncomingPacketType.PlayerWalkCancel)
                return false;

            Destination = destination;
            Type = IncomingPacketType.PlayerWalkCancel;

            Direction = msg.GetByte();

            return true;
        }

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);
            msg.AddByte(Direction);
        }
    }
}


text:
import base
import base2
import main
import test


text:
package mediabrowser.apiinteraction.android.sync.data;

import android.content.Context;
import mediabrowser.apiinteraction.sync.data.*;
import mediabrowser.model.logging.ILogger;
import mediabrowser.model.serialization.IJsonSerializer;

/**
 * Created by Luke on 3/24/2015.
 */
public class AndroidAssetManager extends LocalAssetManager {

    public AndroidAssetManager(Context context, ILogger logger, IJsonSerializer jsonSerializer) {

        super(new UserActionRepository(context, jsonSerializer),
                new ItemRepository(context, jsonSerializer),
                new AndroidSyncFileRepository(context, logger),
                new UserRepository(context, jsonSerializer),
                new AndroidImageFileRepository(context, logger),
                logger);
    }
}