text:
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Editor.Host;
using Microsoft.CodeAnalysis.ErrorReporting;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Operations;
using Microsoft.VisualStudio.Text.Tagging;
using Microsoft.VisualStudio.Utilities;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking
{
    /// <summary>
    /// Also known as "rename smart tag," this watches text changes in open buffers, determines
    /// whether they can be interpreted as an identifier rename, and if so displays a smart tag
    /// that can perform a rename on that symbol. Each text buffer is tracked independently.
    /// </summary>
    [Export(typeof(ITaggerProvider))]
    [TagType(typeof(RenameTrackingTag))]
    [TagType(typeof(IErrorTag))]
    [ContentType(ContentTypeNames.RoslynContentType)]
    [TextViewRole(PredefinedTextViewRoles.Editable)]
    internal sealed partial class RenameTrackingTaggerProvider : ITaggerProvider
    {
        private readonly ITextUndoHistoryRegistry _undoHistoryRegistry;
        private readonly IAsynchronousOperationListener _asyncListener;
        private readonly IWaitIndicator _waitIndicator;
        private readonly IInlineRenameService _inlineRenameService;
        private readonly IEnumerable<IRefactorNotifyService> _refactorNotifyServices;
        private readonly IDiagnosticAnalyzerService _diagnosticAnalyzerService;

        [ImportingConstructor]
        public RenameTrackingTaggerProvider(
            ITextUndoHistoryRegistry undoHistoryRegistry,
            IWaitIndicator waitIndicator,
            IInlineRenameService inlineRenameService,
            IDiagnosticAnalyzerService diagnosticAnalyzerService,
            [ImportMany] IEnumerable<IRefactorNotifyService> refactorNotifyServices,
            [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners)
        {
            _undoHistoryRegistry = undoHistoryRegistry;
            _waitIndicator = waitIndicator;
            _inlineRenameService = inlineRenameService;
            _refactorNotifyServices = refactorNotifyServices;
            _diagnosticAnalyzerService = diagnosticAnalyzerService;
            _asyncListener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.RenameTracking);
        }

        public ITagger<T> CreateTagger<T>(ITextBuffer buffer) where T : ITag
        {
            var stateMachine = buffer.Properties.GetOrCreateSingletonProperty(() => new StateMachine(buffer, _inlineRenameService, _asyncListener, _diagnosticAnalyzerService));
            return new Tagger(stateMachine, _undoHistoryRegistry, _waitIndicator, _refactorNotifyServices) as ITagger<T>;
        }

        internal static void ResetRenameTrackingState(Workspace workspace, DocumentId documentId)
        {
            ResetRenameTrackingStateWorker(workspace, documentId, visible: false);
        }

        internal static bool ResetVisibleRenameTrackingState(Workspace workspace, DocumentId documentId)
        {
            return ResetRenameTrackingStateWorker(workspace, documentId, visible: true);
        }

        internal static bool ResetRenameTrackingStateWorker(Workspace workspace, DocumentId documentId, bool visible)
        {
            if (workspace.IsDocumentOpen(documentId))
            {
                var document = workspace.CurrentSolution.GetDocument(documentId);

                SourceText text;
                StateMachine stateMachine;
                ITextBuffer textBuffer;
                if (document != null &&
                    document.TryGetText(out text))
                {
                    textBuffer = text.Container.TryGetTextBuffer();
                    if (textBuffer == null)
                    {
                        Environment.FailFast(string.Format("document with name {0} is open but textBuffer is null. Textcontainer is of type {1}. SourceText is: {2}",
                                                            document.Name, text.Container.GetType().FullName, text.ToString()));
                    }

                    if (textBuffer.Properties.TryGetProperty(typeof(StateMachine), out stateMachine))
                    {
                        if (visible)
                        {
                            return stateMachine.ClearVisibleTrackingSession();
                        }
                        else
                        {
                            return stateMachine.ClearTrackingSession();
                        }
                    }
                }
            }

            return false;
        }

        internal static async Task<IEnumerable<Diagnostic>> GetDiagnosticsAsync(SyntaxTree tree, DiagnosticDescriptor diagnosticDescriptor, CancellationToken cancellationToken)
        {
            try
            {
                // This can run on a background thread.
                SourceText text;
                StateMachine stateMachine;
                if (tree != null &&
                    tree.TryGetText(out text))
                {
                    var textBuffer = text.Container.TryGetTextBuffer();
                    if (textBuffer != null && textBuffer.Properties.TryGetProperty(typeof(StateMachine), out stateMachine))
                    {
                        return await stateMachine.GetDiagnostic(tree, diagnosticDescriptor, cancellationToken).ConfigureAwait(false);
                    }
                }

                return SpecializedCollections.EmptyEnumerable<Diagnostic>();
            }
            catch (Exception e) when (FatalError.ReportUnlessCanceled(e))
            {
                throw ExceptionUtilities.Unreachable;
            }
        }

        internal static CodeAction CreateCodeAction(
            Document document,
            Diagnostic diagnostic,
            IWaitIndicator waitIndicator,
            IEnumerable<IRefactorNotifyService> refactorNotifyServices,
            ITextUndoHistoryRegistry undoHistoryRegistry)
        {
            // This can run on a background thread.

            var message = string.Format(
                EditorFeaturesResources.RenameTo,
                diagnostic.Properties[RenameTrackingDiagnosticAnalyzer.RenameFromPropertyKey],
                diagnostic.Properties[RenameTrackingDiagnosticAnalyzer.RenameToPropertyKey]);

            return new RenameTrackingCodeAction(document, message, refactorNotifyServices, undoHistoryRegistry);
        }

        internal static bool IsRenamableIdentifier(Task<TriggerIdentifierKind> isRenamableIdentifierTask, bool waitForResult, CancellationToken cancellationToken)
        {
            if (isRenamableIdentifierTask.Status == TaskStatus.RanToCompletion && isRenamableIdentifierTask.Result != TriggerIdentifierKind.NotRenamable)
            {
                return true;
            }
            else if (isRenamableIdentifierTask.Status == TaskStatus.Canceled)
            {
                return false;
            }
            else if (waitForResult)
            {
                return WaitForIsRenamableIdentifier(isRenamableIdentifierTask, cancellationToken);
            }
            else
            {
                return false;
            }
        }

        internal static bool WaitForIsRenamableIdentifier(Task<TriggerIdentifierKind> isRenamableIdentifierTask, CancellationToken cancellationToken)
        {
            try
            {
                return isRenamableIdentifierTask.WaitAndGetResult(cancellationToken) != TriggerIdentifierKind.NotRenamable;
            }
            catch (AggregateException e) when (e.InnerException is OperationCanceledException)
            {
                // We passed in a different cancellationToken, so if there's a race and
                // isRenamableIdentifierTask was cancelled, we'll get an AggregateException
                return false;
            }
        }

        internal static bool CanInvokeRename(Document document)
        {
            SourceText text;
            StateMachine stateMachine;
            ITextBuffer textBuffer;
            TrackingSession unused;

            if (document == null || !document.TryGetText(out text))
            {
                return false;
            }

            textBuffer = text.Container.TryGetTextBuffer();
            return textBuffer != null &&
                textBuffer.Properties.TryGetProperty(typeof(StateMachine), out stateMachine) &&
                stateMachine.CanInvokeRename(out unused);
        }
    }
}


text:
import unittest

import numpy as np

from chainer.backends import cuda

from chainer import testing
from chainer.testing import attr

from chainercv.utils import generate_random_bbox
from chainercv.utils import non_maximum_suppression

@testing.parameterize(
    {'threshold': 1, 'expect': np.array([0, 1, 2, 3])},
    {'threshold': 0.5, 'expect': np.array([0, 1, 3])},
    {'threshold': 0.3, 'expect': np.array([0, 2, 3])},
    {'threshold': 0.2, 'expect': np.array([0, 3])},
    {'threshold': 0, 'expect': np.array([0])},
)
class TestNonMaximumSuppression(unittest.TestCase):

    def setUp(self):
        self.bbox = np.array((
            (0, 0, 4, 4),
            (1, 1, 5, 5),  # 9/23
            (2, 1, 6, 5),  # 6/26, 12/20
            (4, 0, 8, 4),  # 0/32, 3/29, 6/26
        ))

    def check_non_maximum_suppression(self, bbox, threshold, expect):
        selec = non_maximum_suppression(bbox, threshold)
        self.assertIsInstance(selec, type(bbox))
        self.assertEqual(selec.dtype, np.int32)
        np.testing.assert_equal(
            cuda.to_cpu(selec),
            cuda.to_cpu(expect))

    def test_non_maximum_suppression_cpu(self):
        self.check_non_maximum_suppression(
            self.bbox, self.threshold, self.expect)

    @attr.gpu
    def test_non_maximum_suppression_gpu(self):
        self.check_non_maximum_suppression(
            cuda.to_gpu(self.bbox),
            self.threshold,
            cuda.to_gpu(self.expect)
        )

class TestNonMaximumSuppressionConsistency(unittest.TestCase):

    @attr.gpu
    def test_non_maximum_suppression_consistency(self):
        bbox = generate_random_bbox(6000, (600, 800), 32, 512)

        cpu_selec = non_maximum_suppression(bbox, 0.5)
        gpu_selec = non_maximum_suppression(cuda.to_gpu(bbox), 0.5)

        np.testing.assert_equal(cpu_selec, cuda.to_cpu(gpu_selec))

class TestNonMaximumSuppressionOptions(unittest.TestCase):

    def setUp(self):
        self.bbox = generate_random_bbox(6000, (600, 800), 32, 512)
        self.score = np.random.uniform(0, 100, size=(len(self.bbox),))
        self.limit = 100
        self.threshold = 0.5

    def check_non_maximum_suppression_options(
            self, bbox, threshold, score, limit):
        # Pass all options to the tested function
        scored_selec = non_maximum_suppression(bbox, threshold, score, limit)
        self.assertIsInstance(scored_selec, type(bbox))

        # Reorder inputs befor passing it to the function.
        # Reorder the outputs according to scores.
        order = score.argsort()[::-1]
        reordered_selec = non_maximum_suppression(
            bbox[order], threshold, score=None, limit=None)
        reordered_selec = reordered_selec[:limit]
        reordered_selec = order[reordered_selec]

        np.testing.assert_equal(
            cuda.to_cpu(scored_selec), cuda.to_cpu(reordered_selec))

    def test_non_maximum_suppression_options_cpu(self):
        self.check_non_maximum_suppression_options(
            self.bbox, self.threshold, self.score, self.limit)

    @attr.gpu
    def test_non_maximum_suppression_options_gpu(self):
        self.check_non_maximum_suppression_options(
            cuda.to_gpu(self.bbox),
            self.threshold, cuda.to_gpu(self.score), self.limit)

class TestNonMaximumSuppressionZeroLengthBbox(unittest.TestCase):

    def setUp(self):
        self.bbox = np.zeros((0, 4))

    def check_non_maximum_suppression_zero_legnth_bbox(
            self, bbox, threshold):
        selec = non_maximum_suppression(bbox, threshold)
        self.assertIsInstance(selec, type(bbox))
        self.assertEqual(selec.shape, (0,))

    def test_non_maximum_suppression_zero_length_bbox_cpu(self):
        self.check_non_maximum_suppression_zero_legnth_bbox(
            self.bbox, 0.5)

    @attr.gpu
    def test_non_maximum_suppression_zero_length_bbox_gpu(self):
        self.check_non_maximum_suppression_zero_legnth_bbox(
            cuda.to_gpu(self.bbox), 0.5)

testing.run_module(__name__, __file__)

redpajama_set_name: RedPajamaGithub


text:
<component name="ArtifactManager">
  <artifact build-on-make="true" name="dist">
    <output-path>$PROJECT_DIR$/out/artifacts/dist</output-path>
    <root id="root">
      <element id="directory" name="napile">
        <element id="directory" name="lib">
          <element id="zip-archive" name="napile.jar">
            <element id="module-output" name="consulo-napile" />
            <element id="module-output" name="injection.api" />
            <element id="module-production-resource-output" name="consulo-napile" />
          </element>
          <element id="zip-archive" name="injection.protobuf.jar">
            <element id="module-output" name="injection.protobuf" />
          </element>
          <element id="zip-archive" name="injection.regexp.jar">
            <element id="module-output" name="injection.regexp" />
          </element>
          <element id="zip-archive" name="injection.text.jar">
            <element id="module-output" name="injection.text" />
          </element>
          <element id="dir-copy" path="$PROJECT_DIR$/lib" />
        </element>
      </element>
    </root>
  </artifact>
</component>


text:
package errors;

import com.kboyarshinov.activityscreens.annotation.ActivityScreen;

@ActivityScreen
public interface Interface {
}


text:
using System;
using System.Data;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
using Xunit;
using Dapper;

namespace SideBySide.New
{
	[Collection("BulkLoaderCollection")]
	public class BulkLoaderSync : IClassFixture<DatabaseFixture>
	{
		public BulkLoaderSync(DatabaseFixture database)
		{
			m_database = database;
			//xUnit runs tests in different classes in parallel, so use different table names for the different test classes
			string testClient;
#if BASELINE
			testClient = "Baseline";
#else
			testClient = "New";
#endif
			m_testTable = "test.BulkLoaderSyncTest" + testClient;

			m_initializeTable = @"
				create schema if not exists test;
				drop table if exists " + m_testTable + @";
				CREATE TABLE " + m_testTable + @"
				(
					one int primary key
					, ignore_one int
					, two varchar(200)
					, ignore_two varchar(200)
					, three varchar(200)
					, four datetime
					, five blob
				) CHARACTER SET = UTF8;";
			m_removeTable = "drop table if exists " + m_testTable + @";";
			m_memoryStreamBytes = System.Text.Encoding.UTF8.GetBytes(@"1,'two-1','three-1'
2,'two-2','three-2'
3,'two-3','three-3'
4,'two-4','three-4'
5,'two-5','three-5'
");
		}

		[Fact]
		public void BulkLoadTsvFile()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.FileName = AppConfig.MySqlBulkLoaderTsvFile;
				bl.TableName = m_testTable;
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.Local = false;
				int rowCount = bl.Load();
				Assert.Equal(20, rowCount);
			}
			finally
			{
				FinalizeTest();
			}
		}
		[Fact]
		public void BulkLoadLocalTsvFile()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.FileName = AppConfig.MySqlBulkLoaderTsvFile;
				bl.TableName = m_testTable;
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.Local = true;
				int rowCount = bl.Load();
				Assert.Equal(20, rowCount);
			}
			finally
			{
				FinalizeTest();
			}
		}
		[Fact]
		public void BulkLoadLocalTsvFileDoubleEscapedTerminators()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.FileName = AppConfig.MySqlBulkLoaderTsvFile;
				bl.TableName = m_testTable;
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.LineTerminator = "\\n";
				bl.FieldTerminator = "\\t";
				bl.Local = true;
				int rowCount = bl.Load();
				Assert.Equal(20, rowCount);
			}
			finally
			{
				FinalizeTest();
			}
		}
		[Fact]
		public void BulkLoadCsvFile()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.FileName = AppConfig.MySqlBulkLoaderCsvFile;
				bl.TableName = m_testTable;
				bl.CharacterSet = "UTF8";
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.FieldTerminator = ",";
				bl.FieldQuotationCharacter = '"';
				bl.FieldQuotationOptional = true;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.Local = false;
				int rowCount = bl.Load();
				Assert.Equal(20, rowCount);
			}
			finally
			{
				FinalizeTest();
			}
		}
		[Fact]
		public void BulkLoadLocalCsvFile()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.FileName = AppConfig.MySqlBulkLoaderLocalCsvFile;
				bl.TableName = m_testTable;
				bl.CharacterSet = "UTF8";
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.FieldTerminator = ",";
				bl.FieldQuotationCharacter = '"';
				bl.FieldQuotationOptional = true;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.Local = true;
				int rowCount = bl.Load();
				Assert.Equal(20, rowCount);
			}
			finally
			{
				FinalizeTest();
			}
		}
		[Fact]
		public void BulkLoadCsvFileNotFound()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.FileName = AppConfig.MySqlBulkLoaderCsvFile + "-junk";
				bl.TableName = m_testTable;
				bl.CharacterSet = "UTF8";
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.FieldTerminator = ",";
				bl.FieldQuotationCharacter = '"';
				bl.FieldQuotationOptional = true;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.Local = false;
				try
				{
					int rowCount = bl.Load();
				}
				catch (MySqlException mySqlException)
				{
					if (mySqlException.InnerException != null)
					{
						Assert.IsType(typeof(System.IO.FileNotFoundException), mySqlException.InnerException);
					}
					else
					{
						Assert.Contains("Errcode: 2 - No such file or directory", mySqlException.Message);
					}
				}
				catch (Exception exception)
				{
					//We know that the exception is not a MySqlException, just the assertion to fail the test
					Assert.IsType(typeof(MySqlException), exception);
				};
			}
			finally
			{
				FinalizeTest();
			}
		}
		[Fact]
		public void BulkLoadLocalCsvFileNotFound()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.Timeout = 3; //Set a short timeout for this test because the file not found exception takes a long time otherwise, the timeout does not change the result
				bl.FileName = AppConfig.MySqlBulkLoaderLocalCsvFile + "-junk";
				bl.TableName = m_testTable;
				bl.CharacterSet = "UTF8";
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.FieldTerminator = ",";
				bl.FieldQuotationCharacter = '"';
				bl.FieldQuotationOptional = true;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.Local = true;
				try
				{
					int rowCount = bl.Load();
				}
				catch (MySqlException mySqlException)
				{
					while (mySqlException.InnerException != null)
					{
						if (mySqlException.InnerException.GetType() == typeof(MySqlException))
						{
							mySqlException = (MySqlException)mySqlException.InnerException;
						}
						else
						{
							Assert.IsType(typeof(System.IO.FileNotFoundException), mySqlException.InnerException);
							break;
						}
					}
					if (mySqlException.InnerException == null)
					{
						Assert.IsType(typeof(System.IO.FileNotFoundException), mySqlException);
					}
				}
				catch (Exception exception)
				{
					//We know that the exception is not a MySqlException, just use the assertion to fail the test
					Assert.IsType(typeof(MySqlException), exception);
				};
			}
			finally
			{
				FinalizeTest();
			}
		}
		[Fact]
		public void BulkLoadMissingFileName()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.TableName = m_testTable;
				bl.CharacterSet = "UTF8";
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.FieldTerminator = ",";
				bl.FieldQuotationCharacter = '"';
				bl.FieldQuotationOptional = true;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.Local = false;
#if BASELINE
				Assert.Throws<System.NullReferenceException>(() =>
				{
					int rowCount = bl.Load();
				});
#else
				Assert.Throws<System.InvalidOperationException>(() =>
				{
					int rowCount = bl.Load();
				});
#endif
			}
			finally
			{
				FinalizeTest();
			}
		}
		[Fact]
		public void BulkLoadMissingTableName()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				bl.FileName = AppConfig.MySqlBulkLoaderLocalCsvFile;
				bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
				bl.NumberOfLinesToSkip = 1;
				bl.FieldTerminator = ",";
				bl.FieldQuotationCharacter = '"';
				bl.FieldQuotationOptional = true;
				bl.Expressions.Add("five = UNHEX(five)");
				bl.Local = false;
#if BASELINE
			Assert.Throws<MySqlException>(() =>
			{
				int rowCount = bl.Load();
			});
#else
				Assert.Throws<System.InvalidOperationException>(() =>
				{
					int rowCount = bl.Load();
				});
#endif
			}
			finally
			{
				FinalizeTest();
			}
		}

#if BASELINE
		[Fact(Skip = "InfileStream not implemented")]
		public void BulkLoadFileStreamInvalidOperation() {}
#else
		[Fact]
		public void BulkLoadFileStreamInvalidOperation()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				using (var fileStream = new FileStream(AppConfig.MySqlBulkLoaderLocalCsvFile, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, true))
				{
					bl.InfileStream = fileStream;
					bl.TableName = m_testTable;
					bl.CharacterSet = "UTF8";
					bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
					bl.NumberOfLinesToSkip = 1;
					bl.FieldTerminator = ",";
					bl.FieldQuotationCharacter = '"';
					bl.FieldQuotationOptional = true;
					bl.Expressions.Add("five = UNHEX(five)");
					bl.Local = false;
					Assert.Throws<System.InvalidOperationException>(() =>
					{
						int rowCount = bl.Load();
					});
				}
			}
			finally
			{
				FinalizeTest();
			}
		}
#endif
#if BASELINE
		[Fact(Skip = "InfileStream not implemented")]
		public void BulkLoadLocalFileStream() {}
#else
		[Fact]
		public void BulkLoadLocalFileStream()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				using (var fileStream = new FileStream(AppConfig.MySqlBulkLoaderLocalCsvFile, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, true))
				{
					bl.InfileStream = fileStream;
					bl.TableName = m_testTable;
					bl.CharacterSet = "UTF8";
					bl.Columns.AddRange(new string[] { "one", "two", "three", "four", "five" });
					bl.NumberOfLinesToSkip = 1;
					bl.FieldTerminator = ",";
					bl.FieldQuotationCharacter = '"';
					bl.FieldQuotationOptional = true;
					bl.Expressions.Add("five = UNHEX(five)");
					bl.Local = true;
					int rowCount = bl.Load();
					Assert.Equal(20, rowCount);
				}
			}
			finally
			{
				FinalizeTest();
			}
		}
#endif
#if BASELINE
		[Fact(Skip = "InfileStream not implemented")]
		public void BulkLoadMemoryStreamInvalidOperation() {}
#else
		[Fact]
		public void BulkLoadMemoryStreamInvalidOperation()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				using (var memoryStream = new MemoryStream(m_memoryStreamBytes, false))
				{
					bl.InfileStream = memoryStream;
					bl.TableName = m_testTable;
					bl.CharacterSet = "UTF8";
					bl.Columns.AddRange(new string[] { "one", "two", "three" });
					bl.NumberOfLinesToSkip = 0;
					bl.FieldTerminator = ",";
					bl.FieldQuotationCharacter = '"';
					bl.FieldQuotationOptional = true;
					bl.Local = false;
					Assert.Throws<System.InvalidOperationException>(() =>
					{
						int rowCount = bl.Load();
					});
				}
			}
			finally
			{
				FinalizeTest();
			}
		}
#endif
#if BASELINE
		[Fact(Skip = "InfileStream not implemented")]
		public void BulkLoadLocalMemoryStream() {}
#else
		[Fact]
		public void BulkLoadLocalMemoryStream()
		{
			try
			{
				InitializeTest();

				MySqlBulkLoader bl = new MySqlBulkLoader(m_database.Connection);
				using (var memoryStream = new MemoryStream(m_memoryStreamBytes, false))
				{
					bl.InfileStream = memoryStream;
					bl.TableName = m_testTable;
					bl.CharacterSet = "UTF8";
					bl.Columns.AddRange(new string[] { "one", "two", "three" });
					bl.NumberOfLinesToSkip = 0;
					bl.FieldTerminator = ",";
					bl.FieldQuotationCharacter = '"';
					bl.FieldQuotationOptional = true;
					bl.Local = true;
					int rowCount = bl.Load();
					Assert.Equal(5, rowCount);
				}
			}
			finally
			{
				FinalizeTest();
			}
		}
#endif

		private void InitializeTest()
		{
			MySqlConnection.ClearAllPools();
			using (MySqlConnection connection = new MySqlConnection(AppConfig.ConnectionString))
			{
				connection.Execute(m_initializeTable);
			}
		}
		private void FinalizeTest()
		{
			if (AppConfig.MySqlBulkLoaderRemoveTables)
			{
				using (MySqlConnection connection = new MySqlConnection(AppConfig.ConnectionString))
				{
					connection.Execute(m_removeTable);
				}
			}
		}

		readonly DatabaseFixture m_database;
		readonly string m_testTable;
		readonly string m_initializeTable;
		readonly string m_removeTable;
		readonly byte[] m_memoryStreamBytes;
	}
}


text:
"""
Django settings for sandbox project.

For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys

# sys.path.append()
BASE_DIR = os.path.dirname(os.path.dirname(__file__))

sys.path.append(os.path.dirname(BASE_DIR))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "53(upox#u=f-0#5ue!)owq&-h#u)7z(z-nel&#(*tqhr@e3-u9"

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = (
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.sites",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "testapp",
    "django_pesapal",
)

MIDDLEWARE = (
    "django.contrib.sessions.middleware.SessionMiddleware",
    "django.middleware.common.CommonMiddleware",
    "django.middleware.csrf.CsrfViewMiddleware",
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "django.contrib.messages.middleware.MessageMiddleware",
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
)

ROOT_URLCONF = "sandbox.urls"

WSGI_APPLICATION = "sandbox.wsgi.application"

# Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": os.path.join(BASE_DIR, "db.sqlite3"),
    }
}

# Internationalization
# https://docs.djangoproject.com/en/dev/topics/i18n/

LANGUAGE_CODE = "en-us"

TIME_ZONE = "UTC"

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/dev/howto/static-files/

STATIC_URL = "/static/"

# Pesapal API configuration
# Obtain test keys by creating a merchant account here http://demo.pesapal.com/

TEMPLATES = [
    {
        # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
        "DIRS": [os.path.join(BASE_DIR, "templates")],
        "OPTIONS": {
            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
            "debug": DEBUG,
            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
            # https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
            "loaders": [
                "django.template.loaders.filesystem.Loader",
                "django.template.loaders.app_directories.Loader",
            ],
            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
            "context_processors": [
                "django.template.context_processors.debug",
                "django.template.context_processors.request",
                "django.contrib.auth.context_processors.auth",
                "django.template.context_processors.i18n",
                "django.template.context_processors.media",
                "django.template.context_processors.static",
                "django.template.context_processors.tz",
                "django.contrib.messages.context_processors.messages",
            ],
        },
    }
]

LOGGING = {
    "version": 1,
    "disable_existing_loggers": False,
    "handlers": {"console": {"level": "DEBUG", "class": "logging.StreamHandler"}},
    "loggers": {
        "django_pesapal": {"handlers": ["console"], "level": "DEBUG", "propagate": True}
    },
}

PESAPAL_DEMO = True
PESAPAL_OAUTH_CALLBACK_URL = "transaction_completed"
PESAPAL_OAUTH_SIGNATURE_METHOD = "SignatureMethod_HMAC_SHA1"
PESAPAL_TRANSACTION_DEFAULT_REDIRECT_URL = "payment"
PESAPAL_DEMO = True
PESAPAL_OAUTH_CALLBACK_URL = "transaction_completed"
PESAPAL_OAUTH_SIGNATURE_METHOD = "SignatureMethod_HMAC_SHA1"
PESAPAL_TRANSACTION_FAILED_REDIRECT_URL = ""
PESAPAL_ITEM_DESCRIPTION = False
PESAPAL_TRANSACTION_MODEL = "django_pesapal.Transaction"
PESAPAL_CONSUMER_KEY = "INSERT_YOUR_KEY"
PESAPAL_CONSUMER_SECRET = "INSERT_YOUR_SECRET"
# Override pesapal keys

try:
    from local_config import *
except ImportError:
    pass

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'


text:
using System;

namespace EPII.Code
{
    /// <summary>
    /// local unique code
    /// </summary>
    public class LUC
    {
        public const int MinLength = 7;
        public const int MaxLength = 9;
        public const string MinValue = "06m0a80";
        public const string MaxValue = "AqSu2Zzzz";

        private object sync_mutex_ = new object();
        private STC stc_ = new STC();
        private int spin_ = 0;

        public LUC()
        {
        }

        public string Next()
        {
            DateTime time;
            lock (sync_mutex_) {
                time = DateTime.Now;
                spin_ = (spin_ == 238327 ? 0 : spin_ + 1);
            }
            return Combine(time, spin_);
        }

        private string Combine(DateTime time, int spin)
        {
            var time_text = stc_.ToText(time);
            var spin_text = spin.ToString();
            string result =
                RCC.DecToSafe62(time_text).PadLeft(6, '0') +
                RCC.DecToSafe62(spin_text);
            return result;
        }

        public static string Safe62ToDec(string sluc)
        {
            var time_text = sluc.Substring(0, 6);
            var spin_text = sluc.Substring(6);
            var result =
                RCC.Safe62ToDec(time_text).PadLeft(10, '0') +
                RCC.Safe62ToDec(spin_text);
            return result;
        }

        public static string DecToSafe62(string sluc)
        {
            var time_text = sluc.Substring(0, 10);
            var spin_text = sluc.Substring(10);
            var result =
                RCC.DecToSafe62(time_text).PadLeft(6, '0') +
                RCC.DecToSafe62(spin_text);
            return result;
        }
    }
}


text:
#include "config.h"

#include "modules/webgl/WebGLContextGroup.h"

#include "modules/webgl/WebGLSharedObject.h"

namespace blink {

PassRefPtr<WebGLContextGroup> WebGLContextGroup::create()
{
    RefPtr<WebGLContextGroup> contextGroup = adoptRef(new WebGLContextGroup());
    return contextGroup.release();
}

WebGLContextGroup::WebGLContextGroup()
{
}

WebGLContextGroup::~WebGLContextGroup()
{
    detachAndRemoveAllObjects();
}

WebGraphicsContext3D* WebGLContextGroup::getAWebGraphicsContext3D()
{
    ASSERT(!m_contexts.isEmpty());
    return (*m_contexts.begin())->webContext();
}

void WebGLContextGroup::addContext(WebGLRenderingContextBase* context)
{
    m_contexts.add(context);
}

void WebGLContextGroup::removeContext(WebGLRenderingContextBase* context)
{
    // We must call detachAndRemoveAllObjects before removing the last context.
    if (m_contexts.size() == 1 && m_contexts.contains(context))
        detachAndRemoveAllObjects();

    m_contexts.remove(context);
}

void WebGLContextGroup::removeObject(WebGLSharedObject* object)
{
    m_groupObjects.remove(object);
}

void WebGLContextGroup::addObject(WebGLSharedObject* object)
{
    m_groupObjects.add(object);
}

void WebGLContextGroup::detachAndRemoveAllObjects()
{
    while (!m_groupObjects.isEmpty()) {
        (*m_groupObjects.begin())->detachContextGroup();
    }
}

void WebGLContextGroup::loseContextGroup(WebGLRenderingContextBase::LostContextMode mode, WebGLRenderingContextBase::AutoRecoveryMethod autoRecoveryMethod)
{
    // Detach must happen before loseContextImpl, which destroys the GraphicsContext3D
    // and prevents groupObjects from being properly deleted.
    detachAndRemoveAllObjects();

    for (WebGLRenderingContextBase* const context : m_contexts)
        context->loseContextImpl(mode, autoRecoveryMethod);
}

} // namespace blink


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>IPO-SHOP</title>

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

    <link href="css/shop-homepage.css" rel="stylesheet">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                IPO-SHOP

                        ¿Quiénes somos?

                        Servicios

                        Contacto

    					Login

IPO-SHOP

Somos una empresa especializada en la venta de productos relacionados con la Interacción Persona-Ordenador.

                Actualmente no tenemos tienda física, pero nuestros comerciales te atienden 24 horas vía Studium

¿Qué dicen nuestros clientes sobre nosotros?

        					"

       						La mejor tienda de internet relacionada con la IPO, ¡tienen de todo!

          					Donald Norman

          						896  ❤

        					"

       						Si no tuviera mi propia empresa de consultoría y productos, les contrataría a ellos

          					Steven Krug

          						147  ❤

        					"

       						Ojalá hubiera encontrado esta tienda antes, ¡qué pasada!

          					Bruce Tognazzini

          						491  ❤

Copyright © Start Bootstrap & IPO USAL 2017


text:
@protocol ViewDataSourceDelegate <NSObject>
- (void)selectedInTableView:(UITableView *)tableView atIndex:(NSIndexPath *)indexPath;
@end

@interface ViewDataSource : NSObject <UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong) NSMutableArray *dataSourceArray;
@property (nonatomic,weak) id<ViewDataSourceDelegate> delegate;

@property (nonatomic, strong) NSArray *keyArray;
@end


text:
**INFINITY ∞ for the infinitely lazy.**

[![Gem Version](https://badge.fury.io/rb/infinities.svg)](http://badge.fury.io/rb/infinities)
[![Build Status](https://travis-ci.org/fny/infinities.svg?branch=master)](https://travis-ci.org/fny/infinities)

Annoyed by typing `Float::INFINITY`? Wish you could just use the word or symbol instead?

    require 'infinities/symbols'
    ∞ # => Infinity

    require 'infinities/words'
    INFINITY # => Infinity

If you require `BigDecimal` before loading any infinities, you get more goodies:

    require 'bigdecimal'

    require 'infinities/symbols'
    BIG∞ # => #<BigDecimal:2428b80,'Infinity',9(9)>

    require 'infinities/words'
    BIG_INFINITY # => #<BigDecimal:2428b80,'Infinity',9(9)>

*Note `BIG∞` is not available on Rubinius until a [certain issue is resolved](https://github.com/rubinius/rubinius/issues/3382).*

Require the whole shebang with `require 'infinites/all'`


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css"/>

Main Page

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Members

Buffer Member List

This is the complete list of members for Buffer, including all inherited members.

Buffer(uint8_t *buffer, uint32_t size)	Buffer

buffer_	Buffer	 [private]

getChar()	Buffer

getChar(uint32_t index)	Buffer

getDouble()	Buffer

getDouble(uint32_t index)	Buffer

getFloat()	Buffer

getFloat(uint32_t index)	Buffer

getInt()	Buffer

getInt(uint32_t index)	Buffer

getLong()	Buffer

getLong(uint32_t index)	Buffer

getLongLong()	Buffer

getLongLong(uint32_t index)	Buffer

getShort()	Buffer

getShort(uint32_t index)	Buffer

getUChar()	Buffer

getUChar(uint32_t index)	Buffer

getUInt()	Buffer

getUInt(uint32_t index)	Buffer

getULong()	Buffer

getULong(uint32_t index)	Buffer

getULongLong()	Buffer

getULongLong(uint32_t index)	Buffer

getUShort()	Buffer

getUShort(uint32_t index)	Buffer

position_	Buffer	 [private]

read() (defined in Buffer)	Buffer	 [inline, private]

read(uint32_t pos) (defined in Buffer)	Buffer	 [inline, private]

size()	Buffer

size_	Buffer	 [private]

~Buffer()	Buffer	 [virtual]

 All Classes Files Functions Variables

<address class="footer">Generated on Tue Dec 2 2014 12:17:05 by

 1.7.3 </address>


text:
package com.sequenceiq.cloudbreak.converter;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.inject.Inject;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.converter.ConverterRegistry;

public abstract class AbstractConversionServiceAwareConverter<S, T> implements Converter<S, T> {
    @Inject
    @Qualifier("conversionService")
    private ConversionService conversionService;

    public ConversionService getConversionService() {
        return conversionService;
    }

    @PostConstruct
    private void register() {
        if (conversionService instanceof ConverterRegistry) {
            ((ConverterRegistry) conversionService).addConverter(this);
        } else {
            throw new IllegalStateException("Can't register Converter to ConverterRegistry");
        }
    }

    public abstract T convert(S source);

    public List<T> convert(Collection<S> sources) {
        List<T> targets = new ArrayList<>();
        if (sources != null) {
            for (S source : sources) {
                targets.add(convert(source));
            }
        }
        return targets;
    }
}


text:
#include "tensorflow/compiler/xla/tests/client_library_test_base.h"

#include <string>

#include "tensorflow/compiler/xla/client/client_library.h"
#include "tensorflow/compiler/xla/client/computation.h"
#include "tensorflow/compiler/xla/client/local_client.h"
#include "tensorflow/compiler/xla/legacy_flags/debug_options_flags.h"
#include "tensorflow/compiler/xla/literal_util.h"
#include "tensorflow/compiler/xla/ptr_util.h"
#include "tensorflow/compiler/xla/shape_util.h"
#include "tensorflow/compiler/xla/status_macros.h"
#include "tensorflow/compiler/xla/statusor.h"
#include "tensorflow/compiler/xla/test_helpers.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/types.h"

namespace se = ::perftools::gputools;

namespace xla {
namespace {
// Wrapper function that creates a nicer error message (than a bare
// ValueOrDie()) if the platform we intend to test is not available.
Client* GetOrCreateLocalClientOrDie(se::Platform* platform) {
  StatusOr<Client*> result = ClientLibrary::GetOrCreateLocalClient(platform);
  TF_CHECK_OK(result.status()) << "could not create local client for testing";
  return result.ValueOrDie();
}
}  // namespace

ClientLibraryTestBase::ClientLibraryTestBase(se::Platform* platform)
    : client_(GetOrCreateLocalClientOrDie(platform)) {
  *(execution_options_.mutable_debug_options()) =
      legacy_flags::GetDebugOptionsFromFlags();

  // Disabling constant_folding so that tests (usually written using Constants)
  // will exercise the intended code paths, instead of being constant folded.
  //
  // TODO(b/38354253): Constant folding is currently disabled. Change tests to
  // use Parameters instead of Constants, and re-enable constant folding by
  // default.
  execution_options_.mutable_debug_options()->add_xla_disable_hlo_passes(
      "constant_folding");
}

string ClientLibraryTestBase::TestName() const {
  return ::testing::UnitTest::GetInstance()->current_test_info()->name();
}

StatusOr<std::unique_ptr<GlobalData>> ClientLibraryTestBase::Execute(
    ComputationBuilder* builder,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments) {
  // Build the computation, as a convenience.
  TF_ASSIGN_OR_RETURN(auto computation, builder->Build());
  return client_->Execute(computation, arguments, &execution_options_);
}

StatusOr<std::unique_ptr<Literal>> ClientLibraryTestBase::ExecuteAndTransfer(
    ComputationBuilder* builder,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments,
    const Shape* shape_with_output_layout) {
  // Build the computation, as a convenience.
  TF_ASSIGN_OR_RETURN(auto computation, builder->Build());

  ExecutionOptions execution_options = execution_options_;
  if (shape_with_output_layout != nullptr) {
    *execution_options.mutable_shape_with_output_layout() =
        *shape_with_output_layout;
  }
  return client_->ExecuteAndTransfer(computation, arguments,
                                     &execution_options);
}

std::unique_ptr<GlobalData> ClientLibraryTestBase::ExecuteOrDie(
    ComputationBuilder* builder,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments) {
  return Execute(builder, arguments).ConsumeValueOrDie();
}

std::unique_ptr<Literal> ClientLibraryTestBase::ExecuteAndTransferOrDie(
    ComputationBuilder* builder,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments) {
  return ExecuteAndTransfer(builder, arguments).ConsumeValueOrDie();
}

string ClientLibraryTestBase::ExecuteToString(
    ComputationBuilder* builder,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments) {
  StatusOr<Computation> computation_status = builder->Build();
  if (!computation_status.ok()) {
    return computation_status.status().ToString();
  }
  Computation computation = computation_status.ConsumeValueOrDie();

  auto result =
      client_->ExecuteAndTransfer(computation, arguments, &execution_options_);
  if (!result.ok()) {
    return result.status().ToString();
  } else {
    return LiteralUtil::ToString(*result.ValueOrDie());
  }
}

void ClientLibraryTestBase::ComputeAndCompareR1(
    ComputationBuilder* builder, const tensorflow::core::Bitmap& expected,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments) {
  std::unique_ptr<Literal> expected_literal = LiteralUtil::CreateR1(expected);
  ClientLibraryTestBase::ComputeAndCompareLiteral(builder, *expected_literal,
                                                  arguments);
}

void ClientLibraryTestBase::ComputeAndCompareLiteral(
    ComputationBuilder* builder, const Literal& expected,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments,
    const Shape* shape_with_layout) {
  EXPECT_IS_OK(ComputeAndCompareLiteralWithStatus(builder, expected, arguments,
                                                  shape_with_layout));
}

void ClientLibraryTestBase::ComputeAndCompareLiteral(
    ComputationBuilder* builder, const Literal& expected,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments, ErrorSpec error,
    const Shape* shape_with_layout) {
  EXPECT_IS_OK(ComputeAndCompareLiteralWithStatus(builder, expected, arguments,
                                                  error, shape_with_layout));
}

tensorflow::Status ClientLibraryTestBase::ComputeAndCompareLiteralWithStatus(
    ComputationBuilder* builder, const Literal& expected,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments,
    const Shape* shape_with_layout) {
  TF_ASSIGN_OR_RETURN(
      auto actual, ExecuteAndTransfer(builder, arguments, shape_with_layout));
  if (ShapeUtil::ElementIsFloating(expected.shape())) {
    LOG(WARNING) << "performing exact comparison of floating point numbers";
  } else {
    TF_RET_CHECK(ShapeUtil::ElementIsIntegral(expected.shape()) ||
                 expected.shape().element_type() == PRED);
  }
  LiteralTestUtil::ExpectEqual(expected, *actual);
  return tensorflow::Status::OK();
}

tensorflow::Status ClientLibraryTestBase::ComputeAndCompareLiteralWithStatus(
    ComputationBuilder* builder, const Literal& expected,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments, ErrorSpec error,
    const Shape* shape_with_layout) {
  TF_ASSIGN_OR_RETURN(
      auto actual, ExecuteAndTransfer(builder, arguments, shape_with_layout));
  TF_RET_CHECK(ShapeUtil::ElementIsFloating(expected.shape()));
  LiteralTestUtil::ExpectNear(expected, *actual, error);
  return tensorflow::Status::OK();
}

void ClientLibraryTestBase::ComputeAndCompareR1U8(
    ComputationBuilder* builder, tensorflow::StringPiece expected,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments) {
  auto actual_status = ExecuteAndTransfer(builder, arguments);
  EXPECT_IS_OK(actual_status.status());
  if (!actual_status.ok()) {
    return;
  }
  auto actual = actual_status.ConsumeValueOrDie();

  // Turn the expected value into a literal.
  std::unique_ptr<Literal> expected_literal = LiteralUtil::CreateR1U8(expected);

  VLOG(1) << "expected: " << LiteralUtil::ToString(*expected_literal);
  VLOG(1) << "actual:   " << LiteralUtil::ToString(*actual);

  EXPECT_EQ(expected, actual->u8s_string());
}

void ClientLibraryTestBase::ComputeAndCompareTuple(
    ComputationBuilder* builder, const Literal& expected,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments) {
  auto actual_status = ExecuteAndTransfer(builder, arguments);
  EXPECT_IS_OK(actual_status.status());
  if (!actual_status.ok()) {
    return;
  }
  auto actual = actual_status.ConsumeValueOrDie();
  LiteralTestUtil::ExpectEqualTuple(expected, *actual);
}

void ClientLibraryTestBase::ComputeAndCompareTuple(
    ComputationBuilder* builder, const Literal& expected,
    tensorflow::gtl::ArraySlice<GlobalData*> arguments, ErrorSpec error) {
  auto actual_status = ExecuteAndTransfer(builder, arguments);
  EXPECT_IS_OK(actual_status.status());
  if (!actual_status.ok()) {
    return;
  }
  auto actual = actual_status.ConsumeValueOrDie();
  LiteralTestUtil::ExpectNearTuple(expected, *actual, error);
}

Computation ClientLibraryTestBase::CreateScalarRelu() {
  ComputationBuilder builder(client_, "relu");
  auto z_value = builder.Parameter(0, ShapeUtil::MakeShape(F32, {}), "z_value");
  auto zero = builder.ConstantR0<float>(0.0);
  builder.Max(z_value, zero);
  auto computation_status = builder.Build();
  TF_CHECK_OK(computation_status.status());
  return computation_status.ConsumeValueOrDie();
}

Computation ClientLibraryTestBase::CreateScalarMax() {
  ComputationBuilder builder(client_, "max");
  auto x = builder.Parameter(0, ShapeUtil::MakeShape(F32, {}), "x");
  auto y = builder.Parameter(1, ShapeUtil::MakeShape(F32, {}), "y");
  builder.Max(x, y);
  auto computation_status = builder.Build();
  TF_CHECK_OK(computation_status.status());
  return computation_status.ConsumeValueOrDie();
}

Computation ClientLibraryTestBase::CreateScalarReluSensitivity() {
  ComputationBuilder builder(client_, "relu_sensitivity");
  auto activation =
      builder.Parameter(0, ShapeUtil::MakeShape(F32, {}), "activation");
  auto backprop =
      builder.Parameter(1, ShapeUtil::MakeShape(F32, {}), "backprop");
  auto zero = builder.ConstantR0<float>(0.0);
  auto activation_gtz = builder.Gt(activation, zero);
  builder.Select(activation_gtz, /*on_true=*/backprop, /*on_false=*/zero);

  auto computation_status = builder.Build();
  TF_CHECK_OK(computation_status.status());
  return computation_status.ConsumeValueOrDie();
}

std::unique_ptr<Array2D<float>> ClientLibraryTestBase::CreatePatternedMatrix(
    int rows, int cols, float offset) {
  auto array = MakeUnique<Array2D<float>>(rows, cols);
  for (int64 row = 0; row < rows; ++row) {
    for (int64 col = 0; col < cols; ++col) {
      (*array)(row, col) = col + (row * 1000.0f) + offset;
    }
  }
  return array;
}

std::unique_ptr<Array2D<float>>
ClientLibraryTestBase::CreatePatternedMatrixWithZeroPadding(int rows, int cols,
                                                            int rows_padded,
                                                            int cols_padded) {
  CHECK_GE(rows_padded, rows);
  CHECK_GE(cols_padded, cols);
  auto array = MakeUnique<Array2D<float>>(rows_padded, cols_padded, 0.0);
  for (int64 row = 0; row < rows; ++row) {
    for (int64 col = 0; col < cols; ++col) {
      (*array)(row, col) = col + (row * 1000.0f);
    }
  }
  return array;
}

}  // namespace xla


text:
package com.weygo.weygophone.pages.order.list.model.request;

import com.weygo.weygophone.base.WGGuestPageRequest;
import com.weygo.weygophone.base.WGGuestRequest;

/**
 * Created by muma on 2017/5/21.
 */

public class WGOrderListRequest extends WGGuestPageRequest {

    public int type;

    public String api() {
        return "orders/index?";
    }

}


text:
require 'spec_helper'
require_relative './shared_examples'

RSpec.describe CurveHandler::Processors::Profile do
  include_examples 'a CurveHandler processor'

  context 'with a curve containing 8760 floats' do
    let(:curve) { [1.0, 0.0] * 4380 }

    describe '#curve_for_storage' do
      it 'normalizes the curve to 1 / 3600' do
        expect(handler.curve_for_storage.sum).to eq(1.0 / 3600)
      end

      it 'normalizes each individual value' do
        expect(handler.curve_for_storage.take(4)).to eq([1.0 / 4380 / 3600, 0.0] * 2)
      end
    end
  end

  context 'with a curve containing only 0.0 floats' do
    let(:curve) { [0.0] * 8760 }

    describe '#curve_for_storage' do
      it 'sets all curve values to zero' do
        expect(handler.curve_for_storage.sum).to eq(0)
      end

      it 'sets each value to zero' do
        expect(handler.curve_for_storage.take(4)).to eq([0.0, 0.0, 0.0, 0.0])
      end
    end
  end
end


text:
"""footballpicks URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.urls import include, path
from django.views.generic.base import RedirectView
from django.contrib import admin
from django.contrib.auth import views as auth_views

urlpatterns = [
    path(r'footballseason/login/', auth_views.LoginView.as_view(template_name='footballseason/login.html'), name="login"),
    path(r'footballseason/logout/', auth_views.LogoutView, {'next_page': '/footballseason/'}, name="logout"),
    path(r'footballseason/', include('footballseason.urls')),
    path(r'old/', RedirectView.as_view(url='/footballseason/', permanent=False), name='footballseason'),
    path(r'admin/', admin.site.urls),
    path(r'api/v1/', include('api.v1_urls')),
]


text:
namespace litesql {

  class CppGenerator : public CodeGenerator {
  public:
    static const char* NAME;
    CppGenerator(): CodeGenerator(NAME) { };
    bool generateCode(const ObjectModel* model);

    void setOutputSourcesDirectory(const std::string& directory);
    void setOutputIncludesDirectory(const std::string& directory);

    const std::string& getOutputSourcesDirectory() const;
    const std::string& getOutputIncludesDirectory() const;

    std::string getOutputSourcesFilename(const std::string& name) const;
    std::string getOutputIncludesFilename(const std::string& name) const;

  private:
    std::string m_sources_directory;
    std::string m_includes_directory;

    void writeCPPClasses(const ObjectModel* model);
    FILE *hpp, *cpp;
  };

}
#endif


text:
#include <assert.h>
#include "jni.h"
#include "testframe.h"
#include "thread_unit_test_utils.h"
#include "jthread.h"
#include "open/hythread.h"
#include "open/hythread_ext.h"
#include "ti_thread.h"
#include "thread_manager.h"

/*
 * Utilities for thread manager unit tests
 */

tested_thread_sturct_t dummy_tts_struct;
tested_thread_sturct_t * dummy_tts = &dummy_tts_struct;
tested_thread_sturct_t tested_threads[MAX_TESTED_THREAD_NUMBER];
JavaVM * GLOBAL_VM = NULL;

void sleep_a_click(void){
    hythread_sleep(CLICK_TIME_MSEC);
}

jthread new_jobject_thread(JNIEnv * jni_env) {
    const char * name = "<init>";
    const char * sig = "()V";
    jmethodID constructor = NULL;
    jclass thread_class;

    thread_class = (*jni_env)->FindClass(jni_env, "java/lang/Thread");
    constructor = (*jni_env)->GetMethodID(jni_env, thread_class, name, sig);
    return (*jni_env)->NewObject(jni_env, thread_class, constructor);
}

jobject new_jobject_thread_death(JNIEnv * jni_env) {
    const char * name = "<init>";
    const char * sig = "()V";
    jmethodID constructor = NULL;
    jclass thread_death_class;

    thread_death_class = (*jni_env)->FindClass(jni_env, "java/lang/ThreadDeath");
    constructor = (*jni_env)->GetMethodID(jni_env, thread_death_class, name, sig);
    return (*jni_env)->NewObject(jni_env, thread_death_class, constructor);
}

jthread new_jobject()
{
    _jobject *jobj;
    _jjobject *jjobj;

    jobj = (_jobject *)calloc(1, sizeof(_jobject));
    jjobj = (_jjobject *)calloc(1, sizeof(_jjobject));
    assert(jobj);
    assert(jjobj);
    jobj->object = jjobj;
    jobj->object->data = NULL;
    jobj->object->daemon = 0;
    jobj->object->name = NULL;
    return jobj;
}

void delete_jobject(jobject obj){
}

void test_java_thread_setup(int argc, char *argv[]) {
    create_java_vm_func CreateJavaVM;
    JavaVMInitArgs args;
    JNIEnv * jni_env;
    int i;

    CreateJavaVM = test_get_java_vm_ptr();
    assert(CreateJavaVM);

    args.version = JNI_VERSION_1_2;
    args.nOptions = argc;
    args.options = (JavaVMOption *) malloc(args.nOptions * sizeof(JavaVMOption));
    args.options[0].optionString = "-Djava.class.path=.";
    for (i = 1; i < argc; i++) {
        args.options[i].optionString = argv[i];
        args.options[i].extraInfo = NULL;
    }

    log_debug("test_java_thread_init()");

    hythread_sleep(1000);
    CreateJavaVM(&GLOBAL_VM, &jni_env, &args);
}

void test_java_thread_teardown(void) {

    IDATA status;

    log_debug("test_java_thread_shutdown()");
    //hythread_detach(NULL);

    // status = tm_shutdown(); ??????????????? fix me:
    // second testcase don't work after tm_shutdown() call
    status = TM_ERROR_NONE;

    /*
     * not required, if there are running threads tm will exit with
     * error TM_ERROR_RUNNING_THREADS
     */
    if(!(status == TM_ERROR_NONE || status == TM_ERROR_RUNNING_THREADS)){
        log_error("test_java_thread_shutdown() FAILED: %d", status);
    }
}

void tested_threads_init(int mode){

    tested_thread_sturct_t *tts;
    jobject monitor;
    jrawMonitorID raw_monitor;
    JNIEnv * jni_env;
    IDATA status;
    int i;

    jni_env = jthread_get_JNI_env(jthread_self());

    if (mode != TTS_INIT_DIFFERENT_MONITORS){
        monitor = new_jobject();
        status = jthread_monitor_init(monitor);
        tf_assert_same_v(status, TM_ERROR_NONE);
    }
    status = jthread_raw_monitor_create(&raw_monitor);
    tf_assert_same_v(status, TM_ERROR_NONE);

    reset_tested_thread_iterator(&tts);
    for (i = 0; i < MAX_TESTED_THREAD_NUMBER; i++){
        tts = &tested_threads[i];
        tts->my_index = i;
        tts->java_thread = new_jobject_thread(jni_env);
        tts->native_thread = NULL;
        tts->jvmti_start_proc_arg = &tts->jvmti_start_proc_arg;
        hysem_create(&tts->started, 0, 1);
        hysem_create(&tts->running, 0, 1);
        hysem_create(&tts->stop_request, 0, 1);
        hysem_create(&tts->ended, 0, 1);
        tts->phase = TT_PHASE_NONE;
        if (mode == TTS_INIT_DIFFERENT_MONITORS){
            monitor = new_jobject();
            status = jthread_monitor_init(monitor);
            tf_assert_same_v(status, TM_ERROR_NONE);
        }
        tts->monitor = monitor;
        tts->raw_monitor = raw_monitor;
        tts->excn = NULL;
    }
}

//void tested_threads_shutdown(void){
//
//      tested_thread_sturct_t *tts;
//      int i;
//
//      reset_tested_thread_iterator(&tts);
//      for (i = 0; i < MAX_TESTED_THREAD_NUMBER; i++){
//              tts = &tested_threads[i];
//        delete_jobject(tts->java_thread);
//        delete_JNIEnv(tts->jni_env);
//      }
//}

tested_thread_sturct_t *get_tts(int tts_index){

    if (tts_index >= 0 && tts_index < MAX_TESTED_THREAD_NUMBER){
        return &tested_threads[tts_index];
    }
    return (void *)NULL;
}

int next_tested_thread(tested_thread_sturct_t **tts_ptr){

    tested_thread_sturct_t *tts = *tts_ptr;
    int tts_index;

    if (! tts){
        tts = &tested_threads[0];
    } else {
        tts_index = tts->my_index;
        if (tts_index >= 0 && tts_index < MAX_TESTED_THREAD_NUMBER - 1){
            tts = &tested_threads[tts_index + 1];
        } else {
            tts = NULL;
        }
    }
    *tts_ptr = tts;
    return tts != NULL;
}

int prev_tested_thread(tested_thread_sturct_t **tts_ptr){

    tested_thread_sturct_t *tts = *tts_ptr;
    int tts_index;

    if (! tts){
        tts = &tested_threads[MAX_TESTED_THREAD_NUMBER - 1];
    } else {
        tts_index = tts->my_index;
        if (tts_index > 0 && tts_index < MAX_TESTED_THREAD_NUMBER){
            tts = &tested_threads[tts_index - 1];
        } else {
            tts = NULL;
        }
    }
    *tts_ptr = tts;
    return tts != NULL;
}

void reset_tested_thread_iterator(tested_thread_sturct_t **tts){
    *tts = (void *)NULL;
}

void tested_threads_run_common(jvmtiStartFunction run_method_param){
    tested_thread_sturct_t *tts;
    JNIEnv * jni_env = jthread_get_JNI_env(jthread_self());

    reset_tested_thread_iterator(&tts);
    while(next_tested_thread(&tts)){
        tts->attrs.proc = run_method_param;
        tts->attrs.arg = tts;
        tf_assert_same_v(jthread_create_with_function(jni_env, tts->java_thread, &tts->attrs), TM_ERROR_NONE);
        tested_thread_wait_started(tts);
        tts->native_thread = jthread_get_native_thread(tts->java_thread);
    }
}

void tested_threads_run(jvmtiStartFunction run_method_param){

    tested_threads_init(TTS_INIT_COMMON_MONITOR);
    tested_threads_run_common(run_method_param);
}

void tested_threads_run_with_different_monitors(jvmtiStartFunction run_method_param){

    tested_threads_init(TTS_INIT_DIFFERENT_MONITORS);
    tested_threads_run_common(run_method_param);
}

void tested_os_threads_run(hythread_entrypoint_t run_method_param){

    tested_thread_sturct_t *tts;
    IDATA status;

    tested_threads_init(TTS_INIT_COMMON_MONITOR);
    reset_tested_thread_iterator(&tts);
    while(next_tested_thread(&tts)){
        // Create thread
        tts->native_thread = (hythread_t)calloc(1, sizeof(struct VM_thread));
        tf_assert_v(tts->native_thread != NULL);
        tts->native_thread->java_status = TM_STATUS_ALLOCATED;
        status = hythread_create_ex(tts->native_thread,
            NULL, 0, 0, NULL, run_method_param, tts);
        tf_assert_v(status == TM_ERROR_NONE);
        tested_thread_wait_started(tts);
    }
}

void tested_thread_started(tested_thread_sturct_t * tts) {
    hysem_set(tts->started, 1);
}

void tested_thread_ended(tested_thread_sturct_t * tts) {
    hysem_set(tts->ended, 1);
}

void tested_thread_send_stop_request(tested_thread_sturct_t * tts) {
    hysem_set(tts->stop_request, 1);
}

void tested_thread_wait_for_stop_request(tested_thread_sturct_t * tts) {
    IDATA status;
    do {
        hysem_set(tts->running, 1);
        status = hysem_wait_timed(tts->stop_request, SLEEP_TIME, 0);
    } while (status == TM_ERROR_TIMEOUT);
}

IDATA tested_thread_wait_for_stop_request_timed(tested_thread_sturct_t * tts, I_64 sleep_time) {
    hysem_set(tts->running, 1);
    return hysem_wait_timed(tts->stop_request, sleep_time, 0);
}

int tested_threads_stop() {

    tested_thread_sturct_t *tts;

    reset_tested_thread_iterator(&tts);
    while (next_tested_thread(&tts)) {
        tested_thread_send_stop_request(tts);
    }
    while (next_tested_thread(&tts)) {
        tested_thread_wait_ended(tts);
    }
    return TEST_PASSED;
}

int tested_threads_destroy() {

    tested_thread_sturct_t *tts;

    reset_tested_thread_iterator(&tts);
    while (next_tested_thread(&tts)) {
        tested_thread_send_stop_request(tts);
    }
    reset_tested_thread_iterator(&tts);
    while (next_tested_thread(&tts)) {
        tested_thread_wait_dead(tts);
    }

    return TEST_PASSED;
}

int check_structure(tested_thread_sturct_t *tts){

    jthread java_thread = tts->java_thread;
    vm_thread_t vm_thread;
    jvmti_thread_t jvmti_thread;
    hythread_t hythread;

    vm_thread = jthread_get_vm_thread_from_java(java_thread);
    tf_assert(vm_thread);
    hythread = (hythread_t)vm_thread;
    tf_assert_same(hythread, tts->native_thread);
    jvmti_thread = &(vm_thread->jvmti_thread);
    tf_assert(jvmti_thread);
    return TEST_PASSED;
}

int check_phase(tested_thread_sturct_t *tts, int phase) {

    tf_assert(tts->phase != TT_PHASE_ERROR);
    if (phase == TT_PHASE_ANY) {
        tf_assert(tts->phase != TT_PHASE_NONE);
    } else if (tts->phase != phase) {
        log_info("Expected phase %d, but got %d", phase, tts->phase);
        tf_assert_same(tts->phase, phase);
    }
    return TEST_PASSED;
}

void tested_thread_wait_started(tested_thread_sturct_t *tts) {
    int i;

    i = 0;
    while (hysem_wait_timed(tts->started, MAX_TIME_TO_WAIT, 0) == TM_ERROR_TIMEOUT) {
        i++;
        printf("Thread %i hasn't started for %i milliseconds",
            tts->my_index, (i * MAX_TIME_TO_WAIT));
    }

    hysem_post(tts->started);
}

void tested_thread_wait_running(tested_thread_sturct_t *tts) {
    int i;

    i = 0;
    while (hysem_wait_timed(tts->running, MAX_TIME_TO_WAIT, 0) == TM_ERROR_TIMEOUT) {
        i++;
        printf("Thread %i isn't running after %i milliseconds",
            tts->my_index, (i * MAX_TIME_TO_WAIT));
    }
}

void tested_thread_wait_ended(tested_thread_sturct_t *tts) {
    int i;

    i = 0;
    while (hysem_wait_timed(tts->ended, MAX_TIME_TO_WAIT, 0) == TM_ERROR_TIMEOUT) {
        i++;
        log_info("Thread %i hasn't ended for %i milliseconds",
            tts->my_index, (i * MAX_TIME_TO_WAIT));
    }
    hysem_post(tts->ended);
}

void tested_thread_wait_dead(tested_thread_sturct_t *tts) {
    test_thread_join(tts->native_thread, tts->my_index);
}

void test_thread_join(hythread_t native_thread, int index) {
    int i = 0;
    do {
        hythread_sleep(SLEEP_TIME);
        if(!hythread_is_alive(native_thread)) {
            break;
        }
        if (!i && (i % (MAX_TIME_TO_WAIT / SLEEP_TIME)) == 0) {
            printf("Thread %i isn't dead after %i milliseconds",
                index, (++i * SLEEP_TIME));
        }
    } while(1);
}

int compare_threads(jthread *threads, int thread_nmb, int compare_from_end) {

    int i;
    int j;
    int found;
    int tested_thread_start;
    jthread java_thread;

    // Check that all thread_nmb threads are different

    //printf("----------------------------------------------- %i %i\n", thread_nmb, compare_from_end);
    //for (j = 0; j < MAX_TESTED_THREAD_NUMBER; j++){
    //      printf("[%i] %p\n",j,tested_threads[j].java_thread->object);
    //}
    //printf("\n");
    //for (i = 0; i < thread_nmb; i++){
    //      printf("!!! %p\n", (*(threads + i))->object);
    //}
    for (i = 0; i < thread_nmb - 1; i++){
        java_thread = *(threads + i);
        for (j = i + 1; j < thread_nmb; j++){
            if (*(threads + j) == java_thread){
                return TM_ERROR_INTERNAL;
            }
        }
    }

    // Check that the set of threads are equal to the set of the first
    // or the last thread_nmb tested threads

    tested_thread_start = compare_from_end ? MAX_TESTED_THREAD_NUMBER - thread_nmb : 0;
    for (i = 0; i < thread_nmb; i++){
        java_thread = *(threads + i);
        found = 0;
        for (j = tested_thread_start; j < thread_nmb + tested_thread_start; j++){
            if (tested_threads[j].java_thread->object == java_thread->object){
                found = 1;
                break;
            }
        }
        tf_assert(found);
    }
    return TM_ERROR_NONE;
}

int compare_pointer_sets(void ** set_a, void ** set_b, int nmb){
    return TEST_FAILED;
}

int check_exception(jobject excn){

    return TM_ERROR_INTERNAL;
    //return TM_ERROR_NONE;
}

void JNICALL default_run_for_test(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *arg) {

    tested_thread_sturct_t * tts = (tested_thread_sturct_t *)arg;

    tts->phase = TT_PHASE_RUNNING;
    tested_thread_started(tts);
    tested_thread_wait_for_stop_request(tts);
    tts->phase = TT_PHASE_DEAD;
    tested_thread_ended(tts);
}


text:
require 'rails_helper'

describe 'cases/closable/respond.html.slim', type: :view do

  let(:foi_case)         { build_stubbed(:case_with_response).decorate }
  let(:ico_case)         { build_stubbed(:approved_ico_foi_case).decorate }

  it 'displays the new response page for FOI' do

    assign(:case, foi_case)

    render

    cases_respond_page.load(rendered)

    page = cases_respond_page

    expect(page.page_heading.heading.text).to eq "Mark as sent#{foi_case.subject}"
    expect(page.page_heading.sub_heading.text).to eq "You are viewing case number #{foi_case.number} - FOI "

    expect(page).to have_foi_task_reminder

    expect(page).to have_submit_button

    expect(page).to have_back_link
  end

  it 'displays the new response page for ICO' do

    assign(:case, ico_case)

    render

    cases_respond_page.load(rendered)

    page = cases_respond_page

    expect(page.page_heading.heading.text).to eq "Mark as sent#{ico_case.subject}"
    expect(page.page_heading.sub_heading.text).to eq "You are viewing case number #{ico_case.number} - ICO appeal (FOI) "

    expect(page).to have_no_foi_task_reminder

    expect(page).to have_submit_button

    expect(page).to have_back_link
  end
end


text:
<?php

/* PCVDemoBundle:Plantillas:page.html.twig */
class __TwigTemplate_ca8132fed41bb9af927242c4d3d6dc3986f3a76306c322681c09454addd0924b extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        try {
            $this->parent = $this->env->loadTemplate("::base.html.twig");
        } catch (Twig_Error_Loader $e) {
            $e->setTemplateFile($this->getTemplateName());
            $e->setTemplateLine(1);

            throw $e;
        }

        $this->blocks = array(
            'title' => array($this, 'block_title'),
            'javascripts' => array($this, 'block_javascripts'),
            'body' => array($this, 'block_body'),
            'navbar' => array($this, 'block_navbar'),
            'contenido' => array($this, 'block_contenido'),
            'footer_page' => array($this, 'block_footer_page'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "::base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_title($context, array $blocks = array())
    {
        echo "tuCV";
    }

    // line 5
    public function block_javascripts($context, array $blocks = array())
    {
        // line 6
        echo "\t";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script src=\"";
        // line 7
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/pcvdemo/js/validate_controller.js"), "html", null, true);
        echo "\"></script>
";
    }

    // line 10
    public function block_body($context, array $blocks = array())
    {
        // line 11
        echo "    ";
        $this->displayBlock('navbar', $context, $blocks);
        // line 12
        echo "    ";
        $this->displayBlock('contenido', $context, $blocks);
        // line 13
        echo "    ";
        $this->displayBlock('footer_page', $context, $blocks);
    }

    // line 11
    public function block_navbar($context, array $blocks = array())
    {
    }

    // line 12
    public function block_contenido($context, array $blocks = array())
    {
    }

    // line 13
    public function block_footer_page($context, array $blocks = array())
    {
    }

    public function getTemplateName()
    {
        return "PCVDemoBundle:Plantillas:page.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  85 => 13,  80 => 12,  75 => 11,  70 => 13,  67 => 12,  64 => 11,  61 => 10,  55 => 7,  50 => 6,  47 => 5,  41 => 3,  11 => 1,);
    }
}