answer
stringlengths
15
1.25M
namespace Konves.ChordPro.Directives { public sealed class CommentBoxDirective : Directive { public CommentBoxDirective(string text) { Text = text; } public string Text { get; set; } } }
from django.contrib.auth.models import AnonymousUser from core.models import Identity from api.v2.serializers.post import AccountSerializer from api.v2.views.base import AdminAuthViewSet class AccountViewSet(AdminAuthViewSet): """ API endpoint that allows providers to be viewed or edited. """ lookup_fields = ("id", "uuid") queryset = Identity.objects.all() serializer_class = AccountSerializer http_method_names = ['post', 'head', 'options', 'trace'] def get_queryset(self): """ Filter providers by current user """ user = self.request.user if (type(user) == AnonymousUser): return Identity.objects.none() identities = user.current_identities() return identities
title: raft(2) categories: tags: Raft 1. Term ![term](../images/raft/raft_term.png) rafttermleader electionterm1 electionleaderfollowerterm3leader electionleader electionterm4term3term4term 2. HeartBeat raftleaderfollowerfollowerheartBeat 3. election timeout leaderfollowerleader followerelection timeoutelection timeoutheart beatelection timeout 4. Role ![raft_role](../images/raft/raft_role.png) follower 1. 2. election timeout AppendEntries RPC |Arguments:|| |: |term|leaderterm| |leaderId|leaderid| |prevLogIndex|| |prevLogTerm|| |entries[]|| |leaderCommit|leadercommitlog index| |**Results:**|| |term|| |success|| RequestVote RPC | Arguments: | | | : | term | candidateterm number | | candidateId | candidateid | | lastLogIndex | candidate | | lastLogTerm | candidateterm | | **Results:** | | | term | | | voteGranted | |
<?php $test = array('2004', '2005', '2006'); $test2 = array('1000', '1170', '660'); $end = array_pop($test); $end2 = array_pop($test2); ?> <html> <head> <script type="text/javascript" src="https: 'modules':[{ 'name':'visualization', 'version':'1', 'packages':['corechart'] }] }"></script> <script type="text/javascript"> google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Year', 'Sales'], <?php foreach (array_combine($test, $test2) as $nb => $nb2) { echo '["'.$nb.'", '.$nb2."],"; echo "\n"; } echo '["'.$end.'", '.$end2."]"; ?> ]); var options = { title: 'Company Performance', curveType: 'function', legend: { position: 'bottom' } }; var chart = new google.visualization.LineChart(document.getElementById('curve_chart')); chart.draw(data, options); } </script> </head> <body> <div id="curve_chart" style="width: 900px; height: 500px"></div> </body> </html>
title: Over the Moon for June! date: 2016-06-01 00:00:00 -06:00 categories: - whats-blooming layout: post blog-banner: <API key>.jpg post-date: June 01, 2016 post-time: 4:33 PM blog-image: wbn-default.jpg <div class="text-center"> Here at the Garden, we are over the moon excited for the warm weather that brings an abundance of flowers. Now that it is June and many of you are out of school and the official start of summer is right around the corner, there is no excuse to not be at Red Butte enjoying nature's splendor.</div> <div class="text-center"> <img src="/images/blogs/Opuntia%20polyacantha%20Flower%20HMS16.jpg" width="560" height="420" alt="" title="" /> <p>Plains Pricklypear &nbsp;&nbsp;<i> Opuntia polyacantha</i></p> <p>This plant may be prickly but it sure is pretty! Can be seen near Hobb's Bench.</p> </div> <div class="text-center"> <img src="/images/blogs/Natural%20Area%20HMS16.jpg" width="560" height="420" alt="" title="" /> <p>Natural Area</p> <p>Be sure to hike through the Natural Area while you are here, the scene is breathtaking.</p> </div> <div class="text-center"> <img src="/images/blogs/Baptisia%20australis%20%27Bluemound%27%20Flower%20HMS16.jpg" width="560" height="1103" alt="" title="" /> <p>Bluemound False Indigo &nbsp;&nbsp;<i> Baptisia australis </i> 'Bluemound'</p> <p>Along the Floral Walk, these exciting flowers are sure to lift your spirits.</p> </div> <div class="text-center"> <img src="/images/blogs/Yucca%20angustissima%20Habit%20and%20Flower%20HMS16.jpg" width="560" height="1088" alt="" title="" /> <p>Narrow-leaf Yucca &nbsp;&nbsp;<i> Yucca angustissima</i></p> <p>These unique flowers are thick and waxy and can only be pollinated by the Pronuba moth. You will find this native beauty at Hobb's Bench.</p> </div> <div class="text-center"> <img src="/images/blogs/Picea%20orientalis%20%27Aureospicata%27%20Habit%20and%20New%20Growth%20HMS16.jpg" width="560" height="810" alt="" title="" /> <p>Golden Candle Oriental Spruce &nbsp;&nbsp;<i> Picea orientalis</i> 'Aureospicata'</p> <p>On the way to Hobb's Bench, check out the wonderful contrast of yellow new growth against the dark green old growth. Amazing right?!</p> </div> <div class="text-center"> The sun is shining, so put on your sunblock and come see the Garden blooming with magnificent color.</div> <h5 class="text-center green">Photos by Heidi Simper</h5>
#nullable enable using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Test.Utilities; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces; using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.PooledObjects; using Microsoft.CodeAnalysis.Shared.Extensions; using Microsoft.CodeAnalysis.Test.Utilities; using Microsoft.CodeAnalysis.Text; using Microsoft.CodeAnalysis.UnitTests.Diagnostics; using Roslyn.Test.Utilities; using Roslyn.Utilities; using Xunit; using static Roslyn.Test.Utilities.TestBase; namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics.<API key> { [UseExportProvider] public class <API key> { [Fact] public async Task <API key>() { var source = TestResource.AllInOneCSharpCode; // AllInOneCSharpCode has no properties with initializers or named types with primary constructors. var <API key> = new HashSet<SymbolKind>(); <API key>.Add(SymbolKind.Property); <API key>.Add(SymbolKind.NamedType); var missingSyntaxNodes = new HashSet<SyntaxKind>(); missingSyntaxNodes.Add(SyntaxKind.WithExpression); missingSyntaxNodes.Add(SyntaxKind.RecordDeclaration); missingSyntaxNodes.Add(SyntaxKind.FunctionPointerType); var analyzer = new <API key>(); using var workspace = TestWorkspace.CreateCSharp(source, TestOptions.Regular); var analyzerReference = new <API key>(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); workspace.TryApplyChanges(workspace.CurrentSolution.<API key>(new[] { analyzerReference })); var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); <API key>(analyzer); await <API key>.<API key>(document, new TextSpan(0, document.GetTextAsync().Result.Length)); analyzer.<API key>(); analyzer.<API key>(); analyzer.<API key>(missingSyntaxNodes); analyzer.<API key>(<API key>, true); } [Fact, WorkItem(908658, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/908658")] public async Task <API key>() { var methodNames = new string[] { "Initialize", "AnalyzeCodeBlock" }; var source = @" [System.Obsolete] class C { int P { get; set; } delegate void A(); delegate string F(); } "; var ideEngineAnalyzer = new <API key>(); using (var ideEngineWorkspace = TestWorkspace.CreateCSharp(source)) { var analyzerReference = new <API key>(ImmutableArray.Create<DiagnosticAnalyzer>(ideEngineAnalyzer)); ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.CurrentSolution.<API key>(new[] { analyzerReference })); var ideEngineDocument = ideEngineWorkspace.CurrentSolution.Projects.Single().Documents.Single(); await <API key>.<API key>(ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); foreach (var method in methodNames) { Assert.False(ideEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.MethodKind == MethodKind.DelegateInvoke && e.ReturnsVoid)); Assert.False(ideEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.MethodKind == MethodKind.DelegateInvoke && !e.ReturnsVoid)); Assert.True(ideEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.SymbolKind == SymbolKind.NamedType)); Assert.False(ideEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.SymbolKind == SymbolKind.Property)); } } var <API key> = new <API key>(); using var <API key> = TestWorkspace.CreateCSharp(source); var <API key> = (CSharpCompilation)<API key>.CurrentSolution.Projects.Single().<API key>(CancellationToken.None).Result; <API key>.<API key>(new[] { <API key> }); foreach (var method in methodNames) { Assert.False(<API key>.CallLog.Any(e => e.CallerName == method && e.MethodKind == MethodKind.DelegateInvoke && e.ReturnsVoid)); Assert.False(<API key>.CallLog.Any(e => e.CallerName == method && e.MethodKind == MethodKind.DelegateInvoke && !e.ReturnsVoid)); Assert.True(<API key>.CallLog.Any(e => e.CallerName == method && e.SymbolKind == SymbolKind.NamedType)); Assert.False(<API key>.CallLog.Any(e => e.CallerName == method && e.SymbolKind == SymbolKind.Property)); } } [Fact] [WorkItem(759, "https://github.com/dotnet/roslyn/issues/759")] public async Task <API key>() { var source = TestResource.AllInOneCSharpCode; using var workspace = TestWorkspace.CreateCSharp(source, TestOptions.Regular); await <API key><SyntaxKind>.<API key>(async analyzer => { var analyzerReference = new <API key>(ImmutableArray.Create(analyzer)); workspace.TryApplyChanges(workspace.CurrentSolution.<API key>(new[] { analyzerReference })); var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); return await <API key>.<API key>(document, new TextSpan(0, document.GetTextAsync().Result.Length)); }); } [WorkItem(908621, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/908621")] [Fact] public void <API key>() { var analyzer = new <API key><SyntaxKind>(); analyzer.ThrowOn(typeof(DiagnosticAnalyzer).GetProperties().Single().Name); <API key>(analyzer); } [WorkItem(908621, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/908621")] [Fact] public void <API key>() { var analyzer = new <API key><SyntaxKind>(); analyzer.ThrowOn(typeof(DiagnosticAnalyzer).GetProperties().Single().Name); var exceptions = new List<Exception>(); try { <API key>(analyzer); } catch (Exception e) { exceptions.Add(e); } Assert.True(exceptions.Count == 0); } [Fact] public async Task <API key>() { using var workspace = TestWorkspace.CreateCSharp(TestResource.AllInOneCSharpCode, TestOptions.Regular); var additionalDocId = DocumentId.CreateNewId(workspace.CurrentSolution.Projects.Single().Id); var additionalText = new TestAdditionalText("add.config", SourceText.From("random text")); var options = new AnalyzerOptions(ImmutableArray.Create<AdditionalText>(additionalText)); var analyzer = new <API key><SyntaxKind>(expectedOptions: options); var analyzerReference = new <API key>(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); workspace.TryApplyChanges(workspace.CurrentSolution .<API key>(new[] { analyzerReference }) .<API key>(additionalDocId, "add.config", additionalText.GetText())); var sourceDocument = workspace.CurrentSolution.Projects.Single().Documents.Single(); await <API key>.<API key>(sourceDocument, new TextSpan(0, sourceDocument.GetTextAsync().Result.Length)); analyzer.<API key>(); } private void <API key>(DiagnosticAnalyzer analyzer) { var diagnosticService = new <API key>(new[] { new <API key>(ImmutableArray.Create(analyzer)) }); diagnosticService.<API key>(new <API key>()); } private class <API key><TLanguageKindEnum> : <API key><TLanguageKindEnum>, IBuiltInAnalyzer where TLanguageKindEnum : struct { public bool OpenFileOnly(OptionSet options) => false; public <API key> GetAnalyzerCategory() => <API key>.<API key> | <API key>.<API key> | <API key>.ProjectAnalysis; } [Fact] public async Task <API key>() { var source = @"x"; using var workspace = TestWorkspace.CreateCSharp(source); var analyzer = new <API key>(); var analyzerReference = new <API key>(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); workspace.TryApplyChanges(workspace.CurrentSolution.<API key>(new[] { analyzerReference })); var ideEngineDocument = workspace.CurrentSolution.Projects.Single().Documents.Single(); var diagnostics = await <API key>.<API key>(ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); var <API key> = diagnostics.Where(d => d.Id == "SyntaxDiagnostic"); Assert.Equal(1, <API key>.Count()); } private class <API key> : DiagnosticAnalyzer { private const string ID = "SyntaxDiagnostic"; private static readonly <API key> <API key> = new <API key>(ID, title: "Syntax", messageFormat: "Syntax", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); public override ImmutableArray<<API key>> <API key> { get { return ImmutableArray.Create(<API key>); } } public override void Initialize(AnalysisContext context) => context.<API key>(<API key>); public void <API key>(<API key> context) => context.<API key>(new SyntaxTreeAnalyzer().AnalyzeSyntaxTree); private class SyntaxTreeAnalyzer { public void AnalyzeSyntaxTree(<API key> context) => context.ReportDiagnostic(Diagnostic.Create(<API key>, context.Tree.GetRoot().GetFirstToken().GetLocation())); } } [Fact] public async Task <API key>() { var source = @" using System; class C { void F(int x = 0) { Console.WriteLine(0); } } "; var analyzer = new <API key>(); using (var ideEngineWorkspace = TestWorkspace.CreateCSharp(source)) { var analyzerReference = new <API key>(ImmutableArray.Create<DiagnosticAnalyzer>(analyzer)); ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.CurrentSolution.<API key>(new[] { analyzerReference })); var ideEngineDocument = ideEngineWorkspace.CurrentSolution.Projects.Single().Documents.Single(); var diagnostics = await <API key>.<API key>(ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); var <API key> = diagnostics.Where(d => d.Id == <API key>.Descriptor.Id); Assert.Equal(2, <API key>.Count()); } source = @" using System; class C { void F(int x = 0, int y = 1, int z = 2) { Console.WriteLine(0); } } "; using (var <API key> = TestWorkspace.CreateCSharp(source)) { var <API key> = (CSharpCompilation)<API key>.CurrentSolution.Projects.Single().<API key>(CancellationToken.None).Result; var diagnostics = <API key>.<API key>(new[] { analyzer }); var <API key> = diagnostics.Where(d => d.Id == <API key>.Descriptor.Id); Assert.Equal(4, <API key>.Count()); } } private class <API key> : DiagnosticAnalyzer { public static <API key> Descriptor = DescriptorFactory.<API key>("DummyDiagnostic"); public override ImmutableArray<<API key>> <API key> { get { return ImmutableArray.Create(Descriptor); } } public override void Initialize(AnalysisContext context) => context.<API key><SyntaxKind>(<API key>); public void <API key>(<API key><SyntaxKind> context) { var blockAnalyzer = new CodeBlockAnalyzer(); context.<API key>(blockAnalyzer.AnalyzeCodeBlock); context.<API key>(blockAnalyzer.AnalyzeNode, blockAnalyzer.<API key>.ToArray()); } private class CodeBlockAnalyzer { public ImmutableArray<SyntaxKind> <API key> { get { return ImmutableArray.Create(SyntaxKind.MethodDeclaration, SyntaxKind.ExpressionStatement, SyntaxKind.EqualsValueClause); } } public void AnalyzeCodeBlock(<API key> context) { } public void AnalyzeNode(<API key> context) { // Ensure only executable nodes are analyzed. Assert.NotEqual(SyntaxKind.MethodDeclaration, context.Node.Kind()); context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.GetLocation())); } } } [Fact] public async Task TestDiagnosticSpan() { var source = @"// empty code"; var analyzer = new InvalidSpanAnalyzer(); using var <API key> = TestWorkspace.CreateCSharp(source); var <API key> = (CSharpCompilation)(await <API key>.CurrentSolution.Projects.Single().<API key>(CancellationToken.None)); var diagnostics = <API key>.<API key>(new[] { analyzer }); AssertEx.Any(diagnostics, d => d.Id == AnalyzerHelper.<API key>); } private class InvalidSpanAnalyzer : DiagnosticAnalyzer { public static <API key> Descriptor = DescriptorFactory.<API key>("DummyDiagnostic"); public override ImmutableArray<<API key>> <API key> => ImmutableArray.Create(Descriptor); public override void Initialize(AnalysisContext context) => context.<API key>(Analyze); private void Analyze(<API key> context) => context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.Create(context.Tree, TextSpan.FromBounds(1000, 2000)))); } [Fact, WorkItem(18818, "https://github.com/dotnet/roslyn/issues/18818")] public async Task <API key>() { // NuGet and VSIX analyzer reporting same diagnostic IDs. var <API key> = new[] { "A", "B", "C" }; var nugetAnalyzer = new NuGetAnalyzer(<API key>); var vsixAnalyzer = new VsixAnalyzer(<API key>); Assert.Equal(<API key>, nugetAnalyzer.<API key>.Select(d => d.Id).Order()); Assert.Equal(<API key>, vsixAnalyzer.<API key>.Select(d => d.Id).Order()); // No NuGet or VSIX analyzer - no diagnostics. await <API key>( nugetAnalyzer: null, <API key>: false, vsixAnalyzer: null, <API key>: false); // Only NuGet analyzer - verify diagnostics. await <API key>( nugetAnalyzer, <API key>: true, vsixAnalyzer: null, <API key>: false, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), }); // Only VSIX analyzer - verify diagnostics. await <API key>( nugetAnalyzer: null, <API key>: false, vsixAnalyzer, <API key>: true, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), }); // Both NuGet and VSIX analyzer, verify the following: // 1) No duplicate diagnostics // 2) Only NuGet analyzer executes await <API key>( nugetAnalyzer, <API key>: true, vsixAnalyzer, <API key>: false, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), }); } [Fact, WorkItem(18818, "https://github.com/dotnet/roslyn/issues/18818")] public async Task <API key>() { // NuGet analyzer reports subset of diagnostic IDs reported by VSIX analyzer. var <API key> = new[] { "B" }; var <API key> = new[] { "A", "B", "C" }; var nugetAnalyzer = new NuGetAnalyzer(<API key>); var vsixAnalyzer = new VsixAnalyzer(<API key>); Assert.Equal(<API key>, nugetAnalyzer.<API key>.Select(d => d.Id).Order()); Assert.Equal(<API key>, vsixAnalyzer.<API key>.Select(d => d.Id).Order()); // Only NuGet analyzer - verify diagnostics. await <API key>( nugetAnalyzer, <API key>: true, vsixAnalyzer: null, <API key>: false, new[] { (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)) }); // Only VSIX analyzer - verify diagnostics. await <API key>( nugetAnalyzer: null, <API key>: false, vsixAnalyzer, <API key>: true, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), }); // Both NuGet and VSIX analyzer, verify the following: // 1) No duplicate diagnostics // 2) Both NuGet and Vsix analyzers execute // 3) Appropriate diagnostic filtering is done - NuGet analyzer reported diagnostic IDs are filtered from Vsix analyzer execution. await <API key>( nugetAnalyzer, <API key>: true, vsixAnalyzer, <API key>: true, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), }); } [Fact, WorkItem(18818, "https://github.com/dotnet/roslyn/issues/18818")] public async Task <API key>() { // VSIX analyzer reports subset of diagnostic IDs reported by NuGet analyzer. var <API key> = new[] { "A", "B", "C" }; var <API key> = new[] { "B" }; var nugetAnalyzer = new NuGetAnalyzer(<API key>); var vsixAnalyzer = new VsixAnalyzer(<API key>); Assert.Equal(<API key>, nugetAnalyzer.<API key>.Select(d => d.Id).Order()); Assert.Equal(<API key>, vsixAnalyzer.<API key>.Select(d => d.Id).Order()); // Only NuGet analyzer - verify diagnostics. await <API key>( nugetAnalyzer, <API key>: true, vsixAnalyzer: null, <API key>: false, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)) }); // Only VSIX analyzer - verify diagnostics. await <API key>( nugetAnalyzer: null, <API key>: false, vsixAnalyzer, <API key>: true, new[] { (Diagnostic("B", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)) }); // Both NuGet and VSIX analyzer, verify the following: // 1) No duplicate diagnostics // 2) Only NuGet analyzer executes await <API key>( nugetAnalyzer, <API key>: true, vsixAnalyzer, <API key>: false, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), }); } [Fact, WorkItem(18818, "https://github.com/dotnet/roslyn/issues/18818")] public async Task <API key>() { // Multiple NuGet analyzers collectively report same diagnostic IDs reported by Vsix analyzer. var <API key> = new[] { "B" }; var <API key> = new[] { "A", "C" }; var <API key> = new[] { "A", "B", "C" }; var firstNugetAnalyzer = new NuGetAnalyzer(<API key>); var secondNugetAnalyzer = new NuGetAnalyzer(<API key>); var vsixAnalyzer = new VsixAnalyzer(<API key>); Assert.Equal(<API key>, firstNugetAnalyzer.<API key>.Select(d => d.Id).Order()); Assert.Equal(<API key>, secondNugetAnalyzer.<API key>.Select(d => d.Id).Order()); Assert.Equal(<API key>, vsixAnalyzer.<API key>.Select(d => d.Id).Order()); // All NuGet analyzers and no Vsix analyzer, verify the following: // 1) No duplicate diagnostics // 2) Only NuGet analyzers execute await <API key>( nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer, secondNugetAnalyzer), <API key>: true, vsixAnalyzers: ImmutableArray<VsixAnalyzer>.Empty, <API key>: false, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)) }); // All NuGet analyzers and Vsix analyzer, verify the following: // 1) No duplicate diagnostics // 2) Only NuGet analyzers execute await <API key>( nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer, secondNugetAnalyzer), <API key>: true, vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), <API key>: false, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)) }); // Subset of NuGet analyzers and Vsix analyzer, verify the following: // 1) No duplicate diagnostics // 2) Both NuGet and Vsix analyzers execute // 3) Appropriate diagnostic filtering is done - NuGet analyzer reported diagnostic IDs are filtered from Vsix analyzer execution. await <API key>( nugetAnalyzers: ImmutableArray.Create(firstNugetAnalyzer), <API key>: true, vsixAnalyzers: ImmutableArray.Create(vsixAnalyzer), <API key>: true, new[] { (Diagnostic("A", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)), (Diagnostic("B", "Class").WithLocation(1, 7), nameof(NuGetAnalyzer)), (Diagnostic("C", "Class").WithLocation(1, 7), nameof(VsixAnalyzer)) }); } private static Task <API key>( NuGetAnalyzer? nugetAnalyzer, bool <API key>, VsixAnalyzer? vsixAnalyzer, bool <API key>, params (<API key> diagnostic, string message)[] expectedDiagnostics) => <API key>( nugetAnalyzer != null ? ImmutableArray.Create(nugetAnalyzer) : ImmutableArray<NuGetAnalyzer>.Empty, <API key>, vsixAnalyzer != null ? ImmutableArray.Create(vsixAnalyzer) : ImmutableArray<VsixAnalyzer>.Empty, <API key>, expectedDiagnostics); private static async Task <API key>( ImmutableArray<NuGetAnalyzer> nugetAnalyzers, bool <API key>, ImmutableArray<VsixAnalyzer> vsixAnalyzers, bool <API key>, params (<API key> diagnostic, string message)[] expectedDiagnostics) { // First clear out the analyzer state for all analyzers. foreach (var nugetAnalyzer in nugetAnalyzers) { nugetAnalyzer.SymbolActionInvoked = false; } foreach (var vsixAnalyzer in vsixAnalyzers) { vsixAnalyzer.SymbolActionInvoked = false; } using var workspace = TestWorkspace.CreateCSharp("class Class { }", TestOptions.Regular); Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.<API key>(new[] { new <API key>(vsixAnalyzers.CastArray<DiagnosticAnalyzer>()) }))); var project = workspace.CurrentSolution.Projects.Single(); if (!nugetAnalyzers.IsEmpty) { project = project.<API key>(new[] { new <API key>(nugetAnalyzers.As<DiagnosticAnalyzer>()) }); } var document = project.Documents.Single(); var root = await document.<API key>(CancellationToken.None); var diagnostics = (await <API key>.<API key>(document, root.FullSpan)) .OrderBy(d => d.Id).ToImmutableArray(); diagnostics.Verify(expectedDiagnostics.Select(d => d.diagnostic).ToArray()); int index = 0; foreach (var (_, expectedMessage) in expectedDiagnostics) { Assert.Equal(expectedMessage, diagnostics[index].GetMessage()); index++; } foreach (var nugetAnalyzer in nugetAnalyzers) { Assert.Equal(<API key>, nugetAnalyzer.SymbolActionInvoked); } foreach (var vsixAnalyzer in vsixAnalyzers) { Assert.Equal(<API key>, vsixAnalyzer.SymbolActionInvoked); } } [DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)] private sealed class NuGetAnalyzer : <API key> { public NuGetAnalyzer(string[] reportedIds) : base(nameof(NuGetAnalyzer), reportedIds) { } } [DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)] private sealed class VsixAnalyzer : <API key> { public VsixAnalyzer(string[] reportedIds) : base(nameof(VsixAnalyzer), reportedIds) { } } private abstract class <API key> : DiagnosticAnalyzer { protected <API key>(string analyzerName, params string[] reportedIds) => <API key> = <API key>(analyzerName, reportedIds); private static ImmutableArray<<API key>> <API key>(string analyzerName, string[] reportedIds) { var builder = ArrayBuilder<<API key>>.GetInstance(reportedIds.Length); foreach (var id in reportedIds) { var descriptor = new <API key>(id, "Title", messageFormat: analyzerName, "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); builder.Add(descriptor); } return builder.ToImmutableAndFree(); } public bool SymbolActionInvoked { get; set; } public sealed override ImmutableArray<<API key>> <API key> { get; } public sealed override void Initialize(AnalysisContext context) => context.<API key>(OnSymbol, SymbolKind.NamedType); private void OnSymbol(<API key> context) { SymbolActionInvoked = true; foreach (var descriptor in <API key>) { var diagnostic = Diagnostic.Create(descriptor, context.Symbol.Locations[0]); context.ReportDiagnostic(diagnostic); } } } } }
/** * Test for LOOMIA TILE Token * * @author Pactum IO <dev@pactum.io> */ import {getEvents, BigNumber} from './helpers/tools'; import expectThrow from './helpers/expectThrow'; const loomiaToken = artifacts.require('./TileToken'); const should = require('chai') // eslint-disable-line .use(require('chai-as-promised')) .use(require('chai-bignumber')(BigNumber)) .should(); /** * Tile Token Contract */ contract('TileToken', (accounts) => { const owner = accounts[0]; const tokenHolder1 = accounts[1]; const spendingAddress = accounts[2]; const recipient = accounts[3]; const anotherAccount = accounts[4]; const tokenHolder5 = accounts[5]; const zeroTokenHolder = accounts[6]; const zeroAddress = '<API key>'; const zero = new BigNumber(0); const tokenSupply = new BigNumber(<API key>); // Provide Tile Token instance for every test case let tileTokenInstance; beforeEach(async () => { tileTokenInstance = await loomiaToken.deployed(); }); it('should instantiate the token correctly', async () => { const name = await tileTokenInstance.NAME(); const symbol = await tileTokenInstance.SYMBOL(); const decimals = await tileTokenInstance.DECIMALS(); const totalSupply = await tileTokenInstance.totalSupply(); assert.equal(name, 'LOOMIA TILE', 'Name does not match'); assert.equal(symbol, 'TILE', 'Symbol does not match'); assert.equal(decimals, 18, 'Decimals does not match'); totalSupply.should.be.bignumber.equal(tokenSupply); }); describe('balanceOf', function () { describe('when the requested account has no tokens', function () { it('returns zero', async function () { const balance = await tileTokenInstance.balanceOf(zeroTokenHolder); balance.should.be.bignumber.equal(zero); }); }); describe('when the requested account has some tokens', function () { it('returns the total amount of tokens', async function () { const balance = await tileTokenInstance.balanceOf(owner); balance.should.be.bignumber.equal(tokenSupply); }); }); }); describe('transfer', function () { describe('when the recipient is not the zero address', function () { const to = tokenHolder1; describe('when the sender does not have enough balance', function () { const transferAmount = tokenSupply.add(1); it('reverts', async function () { await expectThrow(tileTokenInstance.transfer(to, transferAmount, { from: owner })); }); }); describe('when the sender has enough balance', function () { const transferAmount = new BigNumber(500 * 1e18); it('transfers the requested amount', async function () { await tileTokenInstance.transfer(to, transferAmount, { from: owner }); const senderBalance = await tileTokenInstance.balanceOf(owner); senderBalance.should.be.bignumber.equal(tokenSupply.sub(transferAmount)); const recipientBalance = await tileTokenInstance.balanceOf(to); recipientBalance.should.be.bignumber.equal(transferAmount); }); it('emits a transfer event', async function () { const tx = await tileTokenInstance.transfer(to, transferAmount, { from: owner }); // Test the event const events = getEvents(tx, 'Transfer'); assert.equal(events[0].from, owner, 'From address does not match'); assert.equal(events[0].to, to, 'To address does not match'); (events[0].value).should.be.bignumber.equal(transferAmount); }); }); }); describe('when the recipient is the zero address', function () { const to = zeroAddress; it('reverts', async function () { await expectThrow(tileTokenInstance.transfer(to, 100, { from: owner })); }); }); }); describe('approve', function () { describe('when the spender is not the zero address', function () { const spender = spendingAddress; describe('when the sender has enough balance', function () { const amount = new BigNumber(100 * 1e18); it('emits an approval event', async function () { const tx = await tileTokenInstance.approve(spender, amount, { from: owner }); // Test the event const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, owner, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(amount); }); describe('when there was no approved amount before', function () { it('approves the requested amount', async function () { await tileTokenInstance.approve(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(amount); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { await tileTokenInstance.approve(spender, 1, { from: owner }); }); it('approves the requested amount and replaces the previous one', async function () { await tileTokenInstance.approve(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(amount); }); }); }); describe('when the sender does not have enough balance', function () { const amount = new BigNumber(101 * 1e18); it('emits an approval event', async function () { const tx = await tileTokenInstance.approve(spender, amount, { from: owner }); const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, owner, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(amount); }); describe('when there was no approved amount before', function () { it('approves the requested amount', async function () { await tileTokenInstance.approve(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(amount); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { await tileTokenInstance.approve(spender, 1, { from: owner }); }); it('approves the requested amount and replaces the previous one', async function () { await tileTokenInstance.approve(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(amount); }); }); }); }); describe('when the spender is the zero address', function () { const amount = new BigNumber(100 * 1e18); const spender = zeroAddress; it('approves the requested amount', async function () { await tileTokenInstance.approve(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(amount); }); it('emits an approval event', async function () { const tx = await tileTokenInstance.approve(spender, amount, { from: owner }); const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, owner, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(amount); }); }); }); describe('transfer from', function () { const spender = recipient; describe('when the recipient is not the zero address', function () { const to = anotherAccount; describe('when the spender has enough approved balance', function () { beforeEach(async function () { const approvalAmount = new BigNumber(30000 * 1e18); await tileTokenInstance.approve(spender, approvalAmount, { from: owner }); await tileTokenInstance.approve(spender, approvalAmount, { from: zeroTokenHolder }); }); describe('when the owner has enough balance', function () { const amount = new BigNumber(30000 * 1e18); it('transfers the requested amount', async function () { const balanceBefore = await tileTokenInstance.balanceOf(owner); await tileTokenInstance.transferFrom(owner, to, amount, { from: spender }); const senderBalance = await tileTokenInstance.balanceOf(owner); senderBalance.should.be.bignumber.equal(balanceBefore.sub(amount)); const recipientBalance = await tileTokenInstance.balanceOf(to); recipientBalance.should.be.bignumber.equal(amount); }); it('decreases the spender allowance', async function () { await tileTokenInstance.transferFrom(owner, to, amount, { from: spender }); const allowance = await tileTokenInstance.allowance(owner, spender); assert(allowance.eq(0)); }); it('emits a transfer event', async function () { const tx = await tileTokenInstance.transferFrom(owner, to, amount, { from: spender }); // Test the event const events = getEvents(tx, 'Transfer'); assert.equal(events[0].from, owner, 'address does not match'); assert.equal(events[0].to, to, 'To address does not match'); (events[0].value).should.be.bignumber.equal(amount); }); }); describe('when the owner does not have enough balance', function () { const amount = new BigNumber(1 * 1e18); it('reverts', async function () { await expectThrow(tileTokenInstance.transferFrom(zeroTokenHolder, to, amount, { from: spender })); }); }); }); describe('when the spender does not have enough approved balance', function () { beforeEach(async function () { const approvalAmount = new BigNumber(99 * 1e18); const bigApprovalAmount = new BigNumber(999 * 1e18); await tileTokenInstance.approve(spender, approvalAmount, { from: owner }); await tileTokenInstance.approve(spender, bigApprovalAmount, { from: tokenHolder1 }); }); describe('when the owner has enough balance', function () { const amount = new BigNumber(100 * 1e18); it('reverts', async function () { await expectThrow(tileTokenInstance.transferFrom(owner, to, amount, { from: spender })); }); }); describe('when the owner does not have enough balance', function () { const amount = new BigNumber(1001 * 1e18); it('reverts', async function () { await expectThrow(tileTokenInstance.transferFrom(tokenHolder1, to, amount, { from: spender })); }); }); }); }); describe('when the recipient is the zero address', function () { const amount = new BigNumber(100 * 1e18); const to = zeroAddress; beforeEach(async function () { await tileTokenInstance.approve(spender, amount, { from: owner }); }); it('reverts', async function () { await expectThrow(tileTokenInstance.transferFrom(owner, to, amount, { from: spender })); }); }); }); describe('decrease approval', function () { describe('when the spender is not the zero address', function () { const spender = recipient; describe('when the sender has enough balance', function () { const amount = new BigNumber(100 * 1e18); it('emits an approval event', async function () { const tx = await tileTokenInstance.decreaseApproval(spender, amount, { from: owner }); // Test the event const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, owner, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(0); }); describe('when there was no approved amount before', function () { it('keeps the allowance to zero', async function () { await tileTokenInstance.decreaseApproval(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(0); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { const approvalAmount = new BigNumber(1000 * 1e18); await tileTokenInstance.approve(spender, approvalAmount, { from: owner }); }); it('decreases the spender allowance subtracting the requested amount', async function () { await tileTokenInstance.decreaseApproval(spender, amount, { from: owner }); const approvalAmount = new BigNumber(1000 * 1e18); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(approvalAmount.sub(amount)); }); }); }); describe('when the sender does not have enough balance', function () { const amount = new BigNumber(1000 * 1e18); it('emits an approval event', async function () { const tx = await tileTokenInstance.decreaseApproval(spender, amount, { from: owner }); // Test the event const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, owner, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(0); }); describe('when there was no approved amount before', function () { it('keeps the allowance to zero', async function () { await tileTokenInstance.decreaseApproval(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(0); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { const approvalAmount = new BigNumber(1001 * 1e18); await tileTokenInstance.approve(spender, approvalAmount, { from: owner }); }); it('decreases the spender allowance subtracting the requested amount', async function () { await tileTokenInstance.decreaseApproval(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(1 * 1e18); }); }); }); }); describe('when the spender is the zero address', function () { const amount = new BigNumber(100 * 1e18); const spender = zeroAddress; it('decreases the requested amount', async function () { await tileTokenInstance.decreaseApproval(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(0); }); it('emits an approval event', async function () { const tx = await tileTokenInstance.decreaseApproval(spender, amount, { from: owner }); // Test the event const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, owner, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(0); }); }); }); describe('increase approval', function () { const amount = new BigNumber(100 * 1e18); describe('when the spender is not the zero address', function () { const spender = recipient; describe('when the sender has enough balance', function () { it('emits an approval event', async function () { const oldAllowance = await tileTokenInstance.allowance(owner, spender); const tx = await tileTokenInstance.increaseApproval(spender, amount, { from: owner }); // Test the event const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, owner, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(amount.add(oldAllowance)); }); describe('when there was no approved amount before', function () { it('approves the requested amount', async function () { const oldAllowance = await tileTokenInstance.allowance(owner, spender); await tileTokenInstance.increaseApproval(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(amount.add(oldAllowance)); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { const approvalAmount = new BigNumber(1 * 1e18); await tileTokenInstance.approve(spender, approvalAmount, { from: owner }); }); it('increases the spender allowance adding the requested amount', async function () { const oldAllowance = await tileTokenInstance.allowance(owner, spender); await tileTokenInstance.increaseApproval(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(oldAllowance.add(amount)); }); }); }); describe('when the sender does not have enough balance', function () { const amount = new BigNumber(2 * 1e18); it('emits an approval event', async function () { const oldAllowance = await tileTokenInstance.allowance(tokenHolder1, spender); const tx = await tileTokenInstance.increaseApproval(spender, amount, { from: tokenHolder1 }); // Test the event const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, tokenHolder1, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(oldAllowance.add(amount)); }); describe('when there was no approved amount before', function () { it('approves the requested amount', async function () { await tileTokenInstance.increaseApproval(spender, amount, { from: tokenHolder5 }); const allowance = await tileTokenInstance.allowance(tokenHolder5, spender); allowance.should.be.bignumber.equal(amount); }); }); describe('when the spender had an approved amount', function () { beforeEach(async function () { const approvalAmount = new BigNumber(1 * 1e18); await tileTokenInstance.approve(spender, approvalAmount, { from: tokenHolder5 }); }); it('increases the spender allowance adding the requested amount', async function () { const oldAllowance = await tileTokenInstance.allowance(tokenHolder5, spender); await tileTokenInstance.increaseApproval(spender, amount, { from: tokenHolder5 }); const allowance = await tileTokenInstance.allowance(tokenHolder5, spender); allowance.should.be.bignumber.equal(oldAllowance.add(amount)); }); }); }); }); describe('when the spender is the zero address', function () { const spender = zeroAddress; it('approves the requested amount', async function () { await tileTokenInstance.increaseApproval(spender, amount, { from: owner }); const allowance = await tileTokenInstance.allowance(owner, spender); allowance.should.be.bignumber.equal(amount); }); it('emits an approval event', async function () { const oldAllowance = await tileTokenInstance.allowance(owner, spender); const tx = await tileTokenInstance.increaseApproval(spender, amount, { from: owner }); // Test the event const events = getEvents(tx, 'Approval'); assert.equal(events[0].owner, owner, 'address does not match'); assert.equal(events[0].spender, spender, 'Spender address does not match'); (events[0].value).should.be.bignumber.equal(oldAllowance.add(amount)); }); }); }); });
package org.tud.inf.st.mbt.ocm.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; import org.tud.inf.st.mbt.ocm.*; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class OcmFactoryImpl extends EFactoryImpl implements OcmFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static OcmFactory init() { try { OcmFactory theOcmFactory = (OcmFactory)EPackage.Registry.INSTANCE.getEFactory(OcmPackage.eNS_URI); if (theOcmFactory != null) { return theOcmFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new OcmFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public OcmFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case OcmPackage.<API key>: return <API key>(); case OcmPackage.<API key>: return <API key>(); case OcmPackage.<API key>: return <API key>(); case OcmPackage.TIMED_EDGE: return createTimedEdge(); case OcmPackage.EVENT_GUARDED_EDGE: return <API key>(); default: throw new <API key>("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public <API key> <API key>() { <API key> <API key> = new <API key>(); return <API key>; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public <API key> <API key>() { <API key> <API key> = new <API key>(); return <API key>; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public <API key> <API key>() { <API key> <API key> = new <API key>(); return <API key>; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public TimedEdge createTimedEdge() { TimedEdgeImpl timedEdge = new TimedEdgeImpl(); return timedEdge; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EventGuardedEdge <API key>() { <API key> eventGuardedEdge = new <API key>(); return eventGuardedEdge; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public OcmPackage getOcmPackage() { return (OcmPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static OcmPackage getPackage() { return OcmPackage.eINSTANCE; } } //OcmFactoryImpl
package org.locationtech.geowave.core.store.util; import java.util.Iterator; import java.util.Map; import org.locationtech.geowave.core.store.adapter.<API key>; import org.locationtech.geowave.core.store.adapter.<API key>; import org.locationtech.geowave.core.store.adapter.<API key>.RowTransform; import org.locationtech.geowave.core.store.api.Index; import org.locationtech.geowave.core.store.entities.GeoWaveRow; import org.locationtech.geowave.core.store.operations.RowDeleter; import org.locationtech.geowave.core.store.operations.RowWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class <API key><T> extends <API key><T> { private static final Logger LOGGER = LoggerFactory.getLogger(<API key>.class); private final RowWriter writer; private final RowDeleter deleter; public <API key>( final <API key> adapterStore, final Index index, final Iterator<GeoWaveRow> scannerIt, final Map<Short, <API key>> mergingAdapters, final RowWriter writer, final RowDeleter deleter) { super(adapterStore, index, scannerIt, null, null, mergingAdapters, null, null); this.writer = writer; this.deleter = deleter; } @Override protected GeoWaveRow <API key>( final GeoWaveRow singleRow, final RowTransform rowTransform) { if (singleRow.getFieldValues().length < 2) { return singleRow; } deleter.delete(singleRow); deleter.flush(); final GeoWaveRow merged = super.<API key>(singleRow, rowTransform); writer.write(merged); return merged; } }
package plugin /* usage: !day */ import ( "strings" "time" "github.com/microamp/gerri/cmd" "github.com/microamp/gerri/data" ) func ReplyDay(pm data.Privmsg, config *data.Config) (string, error) { return cmd.Privmsg(pm.Target, strings.ToLower(time.Now().Weekday().String())), nil }
package main import ( "net/url" "time" "github.com/codegangsta/cli" "github.com/michaeltrobinson/<API key>/scraper" "github.com/signalfx/metricproxy/protocol/signalfx" log "github.com/Sirupsen/logrus" ) var ( sfxAPIToken string sfxIngestURL string clusterName string sendInterval time.Duration cadvisorPort int discoveryInterval time.Duration maxDatapoints int kubeUser string kubePass string ) func init() { app.Commands = append(app.Commands, cli.Command{ Name: "run", Usage: "start the service (the default)", Action: run, Before: setupRun, Flags: []cli.Flag{ cli.StringFlag{ Name: "sfx-ingest-url", EnvVar: "SFX_ENDPOINT", Value: "https://ingest.signalfx.com", Usage: "SignalFx ingest URL", }, cli.StringFlag{ Name: "sfx-api-token", EnvVar: "SFX_API_TOKEN", Usage: "SignalFx API token", }, cli.StringFlag{ Name: "cluster-name", EnvVar: "CLUSTER_NAME", Usage: "Cluster name will appear as dimension", }, cli.DurationFlag{ Name: "send-interval", EnvVar: "SEND_INTERVAL", Value: time.Second * 30, Usage: "Rate at which data is queried from cAdvisor and send to SignalFx", }, cli.IntFlag{ Name: "cadvisor-port", EnvVar: "CADVISOR_PORT", Value: 4194, Usage: "Port on which cAdvisor listens", }, cli.DurationFlag{ Name: "discovery-interval", EnvVar: "<API key>", Value: time.Minute * 5, Usage: "Rate at which nodes and services will be rediscovered", }, cli.StringFlag{ Name: "kube-user", EnvVar: "KUBE_USER", Usage: "Username to authenticate to kubernetes api", }, cli.StringFlag{ Name: "kube-pass", EnvVar: "KUBE_PASS", Usage: "Password to authenticate to kubernetes api", }, cli.IntFlag{ Name: "max-datapoints", EnvVar: "MAX_DATAPOINTS", Value: 50, Usage: "How many datapoints to batch before forwarding to SignalFX", }, }, }) } func setupRun(c *cli.Context) error { sfxAPIToken = c.String("sfx-api-token") if sfxAPIToken == "" { cli.ShowAppHelp(c) log.Fatal("API token is required") } clusterName = c.String("cluster-name") if clusterName == "" { cli.ShowAppHelp(c) log.Fatal("cluster name is required") } sfxIngestURL = c.String("sfx-ingest-url") sendInterval = c.Duration("send-interval") cadvisorPort = c.Int("cadvisor-port") discoveryInterval = c.Duration("discovery-interval") kubeUser = c.String("kube-user") kubePass = c.String("kube-pass") if kubeUser == "" || kubePass == "" { cli.ShowAppHelp(c) log.Fatal("kubernetes credentials are required") } maxDatapoints = c.Int("max-datapoints") return nil } func run(c *cli.Context) { s := scraper.New( newSfxClient(sfxIngestURL, sfxAPIToken), scraper.Config{ ClusterName: clusterName, CadvisorPort: cadvisorPort, KubeUser: kubeUser, KubePass: kubePass, MaxDatapoints: maxDatapoints, }) if err := s.Run(sendInterval, discoveryInterval); err != nil { log.WithError(err).Fatal("failure") } } func newSfxClient(ingestURL, authToken string) *signalfx.Forwarder { sfxEndpoint, err := url.Parse(ingestURL) if err != nil { panic("failed to parse SFX ingest URL") } return signalfx.<API key>(sfxEndpoint.String(), time.Second*10, authToken, 10, "", "", "") }
#pragma once #include <aws/mwaa/MWAA_EXPORTS.h> #include <aws/mwaa/MWAARequest.h> #include <aws/core/utils/memory/stl/AWSMap.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/mwaa/model/<API key>.h> #include <aws/mwaa/model/<API key>.h> #include <aws/mwaa/model/WebserverAccessMode.h> #include <utility> namespace Aws { namespace MWAA { namespace Model { class AWS_MWAA_API <API key> : public MWAARequest { public: <API key>(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* <API key>() const override { return "CreateEnvironment"; } Aws::String SerializePayload() const override; inline const Aws::Map<Aws::String, Aws::String>& <API key>() const{ return <API key>; } inline bool <API key>() const { return <API key>; } inline void <API key>(const Aws::Map<Aws::String, Aws::String>& value) { <API key> = true; <API key> = value; } inline void <API key>(Aws::Map<Aws::String, Aws::String>&& value) { <API key> = true; <API key> = std::move(value); } inline <API key>& <API key>(const Aws::Map<Aws::String, Aws::String>& value) { <API key>(value); return *this;} inline <API key>& <API key>(Aws::Map<Aws::String, Aws::String>&& value) { <API key>(std::move(value)); return *this;} inline <API key>& <API key>(const Aws::String& key, const Aws::String& value) { <API key> = true; <API key>.emplace(key, value); return *this; } inline <API key>& <API key>(Aws::String&& key, const Aws::String& value) { <API key> = true; <API key>.emplace(std::move(key), value); return *this; } inline <API key>& <API key>(const Aws::String& key, Aws::String&& value) { <API key> = true; <API key>.emplace(key, std::move(value)); return *this; } inline <API key>& <API key>(Aws::String&& key, Aws::String&& value) { <API key> = true; <API key>.emplace(std::move(key), std::move(value)); return *this; } inline <API key>& <API key>(const char* key, Aws::String&& value) { <API key> = true; <API key>.emplace(key, std::move(value)); return *this; } inline <API key>& <API key>(Aws::String&& key, const char* value) { <API key> = true; <API key>.emplace(std::move(key), value); return *this; } inline <API key>& <API key>(const char* key, const char* value) { <API key> = true; <API key>.emplace(key, value); return *this; } /** * <p>The Apache Airflow version you want to use for your environment.</p> */ inline const Aws::String& GetAirflowVersion() const{ return m_airflowVersion; } /** * <p>The Apache Airflow version you want to use for your environment.</p> */ inline bool <API key>() const { return <API key>; } /** * <p>The Apache Airflow version you want to use for your environment.</p> */ inline void SetAirflowVersion(const Aws::String& value) { <API key> = true; m_airflowVersion = value; } /** * <p>The Apache Airflow version you want to use for your environment.</p> */ inline void SetAirflowVersion(Aws::String&& value) { <API key> = true; m_airflowVersion = std::move(value); } /** * <p>The Apache Airflow version you want to use for your environment.</p> */ inline void SetAirflowVersion(const char* value) { <API key> = true; m_airflowVersion.assign(value); } /** * <p>The Apache Airflow version you want to use for your environment.</p> */ inline <API key>& WithAirflowVersion(const Aws::String& value) { SetAirflowVersion(value); return *this;} /** * <p>The Apache Airflow version you want to use for your environment.</p> */ inline <API key>& WithAirflowVersion(Aws::String&& value) { SetAirflowVersion(std::move(value)); return *this;} /** * <p>The Apache Airflow version you want to use for your environment.</p> */ inline <API key>& WithAirflowVersion(const char* value) { SetAirflowVersion(value); return *this;} inline const Aws::String& GetDagS3Path() const{ return m_dagS3Path; } inline bool DagS3PathHasBeenSet() const { return <API key>; } inline void SetDagS3Path(const Aws::String& value) { <API key> = true; m_dagS3Path = value; } inline void SetDagS3Path(Aws::String&& value) { <API key> = true; m_dagS3Path = std::move(value); } inline void SetDagS3Path(const char* value) { <API key> = true; m_dagS3Path.assign(value); } inline <API key>& WithDagS3Path(const Aws::String& value) { SetDagS3Path(value); return *this;} inline <API key>& WithDagS3Path(Aws::String&& value) { SetDagS3Path(std::move(value)); return *this;} inline <API key>& WithDagS3Path(const char* value) { SetDagS3Path(value); return *this;} /** * <p>The environment class you want to use for your environment. The environment * class determines the size of the containers and database used for your Apache * Airflow services.</p> */ inline const Aws::String& GetEnvironmentClass() const{ return m_environmentClass; } /** * <p>The environment class you want to use for your environment. The environment * class determines the size of the containers and database used for your Apache * Airflow services.</p> */ inline bool <API key>() const { return <API key>; } /** * <p>The environment class you want to use for your environment. The environment * class determines the size of the containers and database used for your Apache * Airflow services.</p> */ inline void SetEnvironmentClass(const Aws::String& value) { <API key> = true; m_environmentClass = value; } /** * <p>The environment class you want to use for your environment. The environment * class determines the size of the containers and database used for your Apache * Airflow services.</p> */ inline void SetEnvironmentClass(Aws::String&& value) { <API key> = true; m_environmentClass = std::move(value); } /** * <p>The environment class you want to use for your environment. The environment * class determines the size of the containers and database used for your Apache * Airflow services.</p> */ inline void SetEnvironmentClass(const char* value) { <API key> = true; m_environmentClass.assign(value); } /** * <p>The environment class you want to use for your environment. The environment * class determines the size of the containers and database used for your Apache * Airflow services.</p> */ inline <API key>& <API key>(const Aws::String& value) { SetEnvironmentClass(value); return *this;} /** * <p>The environment class you want to use for your environment. The environment * class determines the size of the containers and database used for your Apache * Airflow services.</p> */ inline <API key>& <API key>(Aws::String&& value) { SetEnvironmentClass(std::move(value)); return *this;} /** * <p>The environment class you want to use for your environment. The environment * class determines the size of the containers and database used for your Apache * Airflow services.</p> */ inline <API key>& <API key>(const char* value) { SetEnvironmentClass(value); return *this;} inline const Aws::String& GetExecutionRoleArn() const{ return m_executionRoleArn; } inline bool <API key>() const { return <API key>; } inline void SetExecutionRoleArn(const Aws::String& value) { <API key> = true; m_executionRoleArn = value; } inline void SetExecutionRoleArn(Aws::String&& value) { <API key> = true; m_executionRoleArn = std::move(value); } inline void SetExecutionRoleArn(const char* value) { <API key> = true; m_executionRoleArn.assign(value); } inline <API key>& <API key>(const Aws::String& value) { SetExecutionRoleArn(value); return *this;} inline <API key>& <API key>(Aws::String&& value) { SetExecutionRoleArn(std::move(value)); return *this;} inline <API key>& <API key>(const char* value) { SetExecutionRoleArn(value); return *this;} inline const Aws::String& GetKmsKey() const{ return m_kmsKey; } inline bool KmsKeyHasBeenSet() const { return m_kmsKeyHasBeenSet; } inline void SetKmsKey(const Aws::String& value) { m_kmsKeyHasBeenSet = true; m_kmsKey = value; } inline void SetKmsKey(Aws::String&& value) { m_kmsKeyHasBeenSet = true; m_kmsKey = std::move(value); } inline void SetKmsKey(const char* value) { m_kmsKeyHasBeenSet = true; m_kmsKey.assign(value); } inline <API key>& WithKmsKey(const Aws::String& value) { SetKmsKey(value); return *this;} inline <API key>& WithKmsKey(Aws::String&& value) { SetKmsKey(std::move(value)); return *this;} inline <API key>& WithKmsKey(const char* value) { SetKmsKey(value); return *this;} /** * <p>The Apache Airflow logs you want to send to Amazon CloudWatch Logs.</p> */ inline const <API key>& <API key>() const{ return <API key>; } /** * <p>The Apache Airflow logs you want to send to Amazon CloudWatch Logs.</p> */ inline bool <API key>() const { return <API key>; } /** * <p>The Apache Airflow logs you want to send to Amazon CloudWatch Logs.</p> */ inline void <API key>(const <API key>& value) { <API key> = true; <API key> = value; } /** * <p>The Apache Airflow logs you want to send to Amazon CloudWatch Logs.</p> */ inline void <API key>(<API key>&& value) { <API key> = true; <API key> = std::move(value); } /** * <p>The Apache Airflow logs you want to send to Amazon CloudWatch Logs.</p> */ inline <API key>& <API key>(const <API key>& value) { <API key>(value); return *this;} /** * <p>The Apache Airflow logs you want to send to Amazon CloudWatch Logs.</p> */ inline <API key>& <API key>(<API key>&& value) { <API key>(std::move(value)); return *this;} /** * <p>The maximum number of workers that you want to run in your environment. MWAA * scales the number of Apache Airflow workers and the Fargate containers that run * your tasks up to the number you specify in this field. When there are no more * tasks running, and no more in the queue, MWAA disposes of the extra containers * leaving the one worker that is included with your environment.</p> */ inline int GetMaxWorkers() const{ return m_maxWorkers; } /** * <p>The maximum number of workers that you want to run in your environment. MWAA * scales the number of Apache Airflow workers and the Fargate containers that run * your tasks up to the number you specify in this field. When there are no more * tasks running, and no more in the queue, MWAA disposes of the extra containers * leaving the one worker that is included with your environment.</p> */ inline bool <API key>() const { return <API key>; } /** * <p>The maximum number of workers that you want to run in your environment. MWAA * scales the number of Apache Airflow workers and the Fargate containers that run * your tasks up to the number you specify in this field. When there are no more * tasks running, and no more in the queue, MWAA disposes of the extra containers * leaving the one worker that is included with your environment.</p> */ inline void SetMaxWorkers(int value) { <API key> = true; m_maxWorkers = value; } /** * <p>The maximum number of workers that you want to run in your environment. MWAA * scales the number of Apache Airflow workers and the Fargate containers that run * your tasks up to the number you specify in this field. When there are no more * tasks running, and no more in the queue, MWAA disposes of the extra containers * leaving the one worker that is included with your environment.</p> */ inline <API key>& WithMaxWorkers(int value) { SetMaxWorkers(value); return *this;} /** * <p>The name of your MWAA environment.</p> */ inline const Aws::String& GetName() const{ return m_name; } /** * <p>The name of your MWAA environment.</p> */ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** * <p>The name of your MWAA environment.</p> */ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** * <p>The name of your MWAA environment.</p> */ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** * <p>The name of your MWAA environment.</p> */ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** * <p>The name of your MWAA environment.</p> */ inline <API key>& WithName(const Aws::String& value) { SetName(value); return *this;} /** * <p>The name of your MWAA environment.</p> */ inline <API key>& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** * <p>The name of your MWAA environment.</p> */ inline <API key>& WithName(const char* value) { SetName(value); return *this;} inline const <API key>& <API key>() const{ return <API key>; } inline bool <API key>() const { return <API key>; } inline void <API key>(const <API key>& value) { <API key> = true; <API key> = value; } inline void <API key>(<API key>&& value) { <API key> = true; <API key> = std::move(value); } inline <API key>& <API key>(const <API key>& value) { <API key>(value); return *this;} inline <API key>& <API key>(<API key>&& value) { <API key>(std::move(value)); return *this;} /** * <p>The <code>plugins.zip</code> file version you want to use.</p> */ inline const Aws::String& <API key>() const{ return <API key>; } /** * <p>The <code>plugins.zip</code> file version you want to use.</p> */ inline bool <API key>() const { return <API key>; } /** * <p>The <code>plugins.zip</code> file version you want to use.</p> */ inline void <API key>(const Aws::String& value) { <API key> = true; <API key> = value; } /** * <p>The <code>plugins.zip</code> file version you want to use.</p> */ inline void <API key>(Aws::String&& value) { <API key> = true; <API key> = std::move(value); } /** * <p>The <code>plugins.zip</code> file version you want to use.</p> */ inline void <API key>(const char* value) { <API key> = true; <API key>.assign(value); } /** * <p>The <code>plugins.zip</code> file version you want to use.</p> */ inline <API key>& <API key>(const Aws::String& value) { <API key>(value); return *this;} /** * <p>The <code>plugins.zip</code> file version you want to use.</p> */ inline <API key>& <API key>(Aws::String&& value) { <API key>(std::move(value)); return *this;} /** * <p>The <code>plugins.zip</code> file version you want to use.</p> */ inline <API key>& <API key>(const char* value) { <API key>(value); return *this;} inline const Aws::String& GetPluginsS3Path() const{ return m_pluginsS3Path; } inline bool <API key>() const { return <API key>; } inline void SetPluginsS3Path(const Aws::String& value) { <API key> = true; m_pluginsS3Path = value; } inline void SetPluginsS3Path(Aws::String&& value) { <API key> = true; m_pluginsS3Path = std::move(value); } inline void SetPluginsS3Path(const char* value) { <API key> = true; m_pluginsS3Path.assign(value); } inline <API key>& WithPluginsS3Path(const Aws::String& value) { SetPluginsS3Path(value); return *this;} inline <API key>& WithPluginsS3Path(Aws::String&& value) { SetPluginsS3Path(std::move(value)); return *this;} inline <API key>& WithPluginsS3Path(const char* value) { SetPluginsS3Path(value); return *this;} /** * <p>The <code>requirements.txt</code> file version you want to use.</p> */ inline const Aws::String& <API key>() const{ return <API key>; } /** * <p>The <code>requirements.txt</code> file version you want to use.</p> */ inline bool <API key>() const { return <API key>; } /** * <p>The <code>requirements.txt</code> file version you want to use.</p> */ inline void <API key>(const Aws::String& value) { <API key> = true; <API key> = value; } /** * <p>The <code>requirements.txt</code> file version you want to use.</p> */ inline void <API key>(Aws::String&& value) { <API key> = true; <API key> = std::move(value); } /** * <p>The <code>requirements.txt</code> file version you want to use.</p> */ inline void <API key>(const char* value) { <API key> = true; <API key>.assign(value); } /** * <p>The <code>requirements.txt</code> file version you want to use.</p> */ inline <API key>& <API key>(const Aws::String& value) { <API key>(value); return *this;} /** * <p>The <code>requirements.txt</code> file version you want to use.</p> */ inline <API key>& <API key>(Aws::String&& value) { <API key>(std::move(value)); return *this;} /** * <p>The <code>requirements.txt</code> file version you want to use.</p> */ inline <API key>& <API key>(const char* value) { <API key>(value); return *this;} inline const Aws::String& <API key>() const{ return <API key>; } inline bool <API key>() const { return <API key>; } inline void <API key>(const Aws::String& value) { <API key> = true; <API key> = value; } inline void <API key>(Aws::String&& value) { <API key> = true; <API key> = std::move(value); } inline void <API key>(const char* value) { <API key> = true; <API key>.assign(value); } inline <API key>& <API key>(const Aws::String& value) { <API key>(value); return *this;} inline <API key>& <API key>(Aws::String&& value) { <API key>(std::move(value)); return *this;} inline <API key>& <API key>(const char* value) { <API key>(value); return *this;} /** * <p>The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, * <code>arn:aws:s3:::<API key></code>.</p> */ inline const Aws::String& GetSourceBucketArn() const{ return m_sourceBucketArn; } /** * <p>The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, * <code>arn:aws:s3:::<API key></code>.</p> */ inline bool <API key>() const { return <API key>; } /** * <p>The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, * <code>arn:aws:s3:::<API key></code>.</p> */ inline void SetSourceBucketArn(const Aws::String& value) { <API key> = true; m_sourceBucketArn = value; } /** * <p>The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, * <code>arn:aws:s3:::<API key></code>.</p> */ inline void SetSourceBucketArn(Aws::String&& value) { <API key> = true; m_sourceBucketArn = std::move(value); } /** * <p>The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, * <code>arn:aws:s3:::<API key></code>.</p> */ inline void SetSourceBucketArn(const char* value) { <API key> = true; m_sourceBucketArn.assign(value); } /** * <p>The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, * <code>arn:aws:s3:::<API key></code>.</p> */ inline <API key>& WithSourceBucketArn(const Aws::String& value) { SetSourceBucketArn(value); return *this;} /** * <p>The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, * <code>arn:aws:s3:::<API key></code>.</p> */ inline <API key>& WithSourceBucketArn(Aws::String&& value) { SetSourceBucketArn(std::move(value)); return *this;} /** * <p>The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, * <code>arn:aws:s3:::<API key></code>.</p> */ inline <API key>& WithSourceBucketArn(const char* value) { SetSourceBucketArn(value); return *this;} inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; } inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; } inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } inline <API key>& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;} inline <API key>& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;} inline <API key>& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } inline <API key>& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } inline <API key>& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } inline <API key>& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } inline <API key>& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } inline <API key>& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } inline <API key>& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } inline const WebserverAccessMode& <API key>() const{ return <API key>; } inline bool <API key>() const { return <API key>; } inline void <API key>(const WebserverAccessMode& value) { <API key> = true; <API key> = value; } inline void <API key>(WebserverAccessMode&& value) { <API key> = true; <API key> = std::move(value); } inline <API key>& <API key>(const WebserverAccessMode& value) { <API key>(value); return *this;} inline <API key>& <API key>(WebserverAccessMode&& value) { <API key>(std::move(value)); return *this;} /** * <p>The day and time you want MWAA to start weekly maintenance updates on your * environment.</p> */ inline const Aws::String& <API key>() const{ return <API key>; } /** * <p>The day and time you want MWAA to start weekly maintenance updates on your * environment.</p> */ inline bool <API key>() const { return <API key>; } /** * <p>The day and time you want MWAA to start weekly maintenance updates on your * environment.</p> */ inline void <API key>(const Aws::String& value) { <API key> = true; <API key> = value; } /** * <p>The day and time you want MWAA to start weekly maintenance updates on your * environment.</p> */ inline void <API key>(Aws::String&& value) { <API key> = true; <API key> = std::move(value); } /** * <p>The day and time you want MWAA to start weekly maintenance updates on your * environment.</p> */ inline void <API key>(const char* value) { <API key> = true; <API key>.assign(value); } /** * <p>The day and time you want MWAA to start weekly maintenance updates on your * environment.</p> */ inline <API key>& <API key>(const Aws::String& value) { <API key>(value); return *this;} /** * <p>The day and time you want MWAA to start weekly maintenance updates on your * environment.</p> */ inline <API key>& <API key>(Aws::String&& value) { <API key>(std::move(value)); return *this;} /** * <p>The day and time you want MWAA to start weekly maintenance updates on your * environment.</p> */ inline <API key>& <API key>(const char* value) { <API key>(value); return *this;} private: Aws::Map<Aws::String, Aws::String> <API key>; bool <API key>; Aws::String m_airflowVersion; bool <API key>; Aws::String m_dagS3Path; bool <API key>; Aws::String m_environmentClass; bool <API key>; Aws::String m_executionRoleArn; bool <API key>; Aws::String m_kmsKey; bool m_kmsKeyHasBeenSet; <API key> <API key>; bool <API key>; int m_maxWorkers; bool <API key>; Aws::String m_name; bool m_nameHasBeenSet; <API key> <API key>; bool <API key>; Aws::String <API key>; bool <API key>; Aws::String m_pluginsS3Path; bool <API key>; Aws::String <API key>; bool <API key>; Aws::String <API key>; bool <API key>; Aws::String m_sourceBucketArn; bool <API key>; Aws::Map<Aws::String, Aws::String> m_tags; bool m_tagsHasBeenSet; WebserverAccessMode <API key>; bool <API key>; Aws::String <API key>; bool <API key>; }; } // namespace Model } // namespace MWAA } // namespace Aws
// <auto-generated> // This code was generated from a template. // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated. // </auto-generated> namespace Powerfront.Backend.EntityFramework { using System; using System.Collections.Generic; public partial class Type { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:<API key>")] public Type() { this.CustomerRecords = new HashSet<CustomerRecord>(); } public string TypeId { get; set; } public string Name { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:<API key>")] public virtual ICollection<CustomerRecord> CustomerRecords { get; set; } } }
package org.lionsoul.jcseg.util; import java.io.Serializable; /** * string buffer class * * @author chenxin<chenxin619315@gmail.com> */ public class IStringBuffer implements Serializable { private static final long serialVersionUID = 1L; /** * buffer char array. */ private char buff[]; private int count; /** * create a buffer with a default length 16 */ public IStringBuffer() { this(16); } /** * create a buffer with a specified length * * @param length */ public IStringBuffer( int length ) { if ( length <= 0 ) { throw new <API key>("length <= 0"); } buff = new char[length]; count = 0; } /** * create a buffer with a specified string * * @param str */ public IStringBuffer( String str ) { this(str.length()+16); append(str); } /** * resize the buffer * this will have to copy the old chars from the old buffer to the new buffer * * @param length */ private void resizeTo( int length ) { if ( length <= 0 ) throw new <API key>("length <= 0"); if ( length != buff.length ) { int len = ( length > buff.length ) ? buff.length : length; //System.out.println("resize:"+length); char[] obuff = buff; buff = new char[length]; /*for ( int j = 0; j < len; j++ ) { buff[j] = obuff[j]; }*/ System.arraycopy(obuff, 0, buff, 0, len); } } /** * append a string to the buffer * * @param str string to append to */ public IStringBuffer append( String str ) { if ( str == null ) throw new <API key>(); //check the necessary to resize the buffer. if ( count + str.length() > buff.length ) { resizeTo( (count + str.length()) * 2 + 1 ); } for ( int j = 0; j < str.length(); j++ ) { buff[count++] = str.charAt(j); } return this; } /** * append parts of the chars to the buffer * * @param chars * @param start the start index * @param length length of chars to append to */ public IStringBuffer append( char[] chars, int start, int length ) { if ( chars == null ) throw new <API key>(); if ( start < 0 ) throw new <API key>(); if ( length <= 0 ) throw new <API key>(); if ( start + length > chars.length ) throw new <API key>(); //check the necessary to resize the buffer. if ( count + length > buff.length ) { resizeTo( (count + length) * 2 + 1 ); } for ( int j = 0; j < length; j++ ) { buff[count++] = chars[start+j]; } return this; } /** * append the rest of the chars to the buffer * * @param chars * @param start the start index * @return IStringBuffer * */ public IStringBuffer append( char[] chars, int start ) { append(chars, start, chars.length - start); return this; } /** * append some chars to the buffer * * @param chars */ public IStringBuffer append( char[] chars ) { return append(chars, 0, chars.length); } /** * append a char to the buffer * * @param c the char to append to */ public IStringBuffer append( char c ) { if ( count == buff.length ) { resizeTo( buff.length * 2 + 1 ); } buff[count++] = c; return this; } /** * append a boolean value * * @param bool */ public IStringBuffer append(boolean bool) { String str = bool ? "true" : "false"; return append(str); } /** * append a short value * * @param shortv */ public IStringBuffer append(short shortv) { return append(String.valueOf(shortv)); } /** * append a int value * * @param intv */ public IStringBuffer append(int intv) { return append(String.valueOf(intv)); } /** * append a long value * * @param longv */ public IStringBuffer append(long longv) { return append(String.valueOf(longv)); } /** * append a float value * * @param floatv */ public IStringBuffer append(float floatv) { return append(String.valueOf(floatv)); } /** * append a double value * * @param doublev */ public IStringBuffer append(double doublev) { return append(String.valueOf(doublev)); } /** * return the length of the buffer * * @return int the length of the buffer */ public int length() { return count; } /** * set the length of the buffer * actually it just override the count and the actual buffer * has nothing changed * * @param length */ public int setLength(int length) { int oldCount = count; count = length; return oldCount; } /** * get the char at a specified position in the buffer */ public char charAt( int idx ) { if ( idx < 0 ) throw new <API key>("idx{"+idx+"} < 0"); if ( idx >= count ) throw new <API key>("idx{"+idx+"} >= buffer.length"); return buff[idx]; } /** * always return the last char * * @return char */ public char last() { if ( count == 0 ) { throw new <API key>("Empty buffer"); } return buff[count-1]; } /** * always return the first char * * @return char */ public char first() { if ( count == 0 ) { throw new <API key>("Empty buffer"); } return buff[0]; } /** * delete the char at the specified position */ public IStringBuffer deleteCharAt( int idx ) { if ( idx < 0 ) throw new <API key>("idx < 0"); if ( idx >= count ) throw new <API key>("idx >= buffer.length"); //here we got a bug for j < count //change over it to count - 1 //thanks for the feedback of xuyijun@gmail.com //@date 2013-08-22 for ( int j = idx; j < count - 1; j++ ) { buff[j] = buff[j+1]; } count return this; } /** * set the char at the specified index * * @param idx * @param chr */ public void set(int idx, char chr) { if ( idx < 0 ) throw new <API key>("idx < 0"); if ( idx >= count ) throw new <API key>("idx >= buffer.length"); buff[idx] = chr; } /** * return the chars of the buffer * * @return char[] */ public char[] buffer() { return buff; } /** * clear the buffer by reset the count to 0 */ public IStringBuffer clear() { count = 0; return this; } /** * return the string of the current buffer * * @return String * @see Object#toString() */ public String toString() { return new String(buff, 0, count); } }
#ifndef <API key> #define <API key> #include <map> #include <memory> #include <vector> #include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/video_encoder.h" #include "api/video_codecs/<API key>.h" #include "modules/video_coding/include/<API key>.h" namespace webrtc { enum AlphaCodecStream { kYUVStream = 0, kAXXStream = 1, kAlphaCodecStreams = 2, }; class <API key> : public VideoEncoder { public: // |factory| is not owned and expected to outlive this class' lifetime. explicit <API key>(VideoEncoderFactory* factory, const SdpVideoFormat& associated_format); virtual ~<API key>(); // Implements VideoEncoder int InitEncode(const VideoCodec* inst, int number_of_cores, size_t max_payload_size) override; int Encode(const VideoFrame& input_image, const CodecSpecificInfo* codec_specific_info, const std::vector<FrameType>* frame_types) override; int <API key>(<API key>* callback) override; int <API key>(uint32_t packet_loss, int64_t rtt) override; int SetRateAllocation(const BitrateAllocation& bitrate, uint32_t new_framerate) override; int Release() override; const char* ImplementationName() const override; <API key>::Result OnEncodedImage( AlphaCodecStream stream_idx, const EncodedImage& encodedImage, const CodecSpecificInfo* codecSpecificInfo, const <API key>* fragmentation); private: // Wrapper class that redirects OnEncodedImage() calls. class <API key>; VideoEncoderFactory* const factory_; const SdpVideoFormat associated_format_; std::vector<std::unique_ptr<VideoEncoder>> encoders_; std::vector<std::unique_ptr<<API key>>> adapter_callbacks_; <API key>* <API key>; // Holds the encoded image info. struct ImageStereoInfo; std::map<uint32_t /* timestamp */, ImageStereoInfo> image_stereo_info_; uint16_t picture_index_ = 0; std::vector<uint8_t> <API key>; }; } // namespace webrtc #endif // <API key>
package net.happybrackets.core.control; import com.google.gson.Gson; import de.sciss.net.OSCMessage; import net.happybrackets.core.Device; import net.happybrackets.core.OSCVocabulary; import net.happybrackets.core.scheduling.HBScheduler; import net.happybrackets.core.scheduling.<API key>; import net.happybrackets.core.scheduling.ScheduledObject; import net.happybrackets.device.HB; import java.net.InetAddress; import java.net.<API key>; import java.util.*; /** * This class facilitates sending message values between sketches, * devices, and a graphical environment. * The values can be represented as sliders, text boxes, check boxes, and buttons * * A message can either be an integer, a double, a string, a boolean, a trigger or a complete class. * * Although similar to the send and receive objects in Max in that the name and type * parameter of the {@link DynamicControl} determines message interconnection, * DynamicControls also have an attribute called {@link ControlScope}, which dictates how far (in * a topological sense) the object can reach in order to communicate with other * DynamicControls. DynamicControls can be bound to different objects, the default being the class that instantiated it. * * <br>The classes are best accessed through {@link <API key>} abstractions * */ public class DynamicControl implements <API key> { static Gson gson = new Gson(); // flag for testing static boolean ignoreName = false; private boolean isPersistentControl = false; /** * Set ignore name for testing * @param ignore true to ignore */ static void setIgnoreName(boolean ignore){ ignoreName = true; } static int deviceSendId = 0; // we will use this to number all messages we send. They can be filtered at receiver by testing last message mapped /** * Define a list of target devices. Can be either device name or IP address * If it is a device name, there will be a lookup of stored device names */ Set<String> targetDevices = new HashSet<>(); // we will map Message ID to device name. If the last ID is in this map, we will ignore message static Map<String, Integer> messageIdMap = new Hashtable<>(); /** * See if we will process a control message based on device name and message_id * If the message_id is mapped against the device_name, ignore message, otherwise store mapping and return true; * @param device_name the device name * @param message_id the message_id * @return true if we are going to process this message */ public static boolean <API key>(String device_name, int message_id){ boolean ret = true; if (messageIdMap.containsKey(device_name)) { if (messageIdMap.get(device_name) == message_id) { ret = false; } } if (ret){ messageIdMap.put(device_name, message_id); } return ret; } // The device name that set last message to this control // A Null value will indicate that it was this device String sendingDevice = null; /** * Get the name of the device that sent the message. If the message was local, will return this device name * @return name of device that sent message */ public String getSendingDevice(){ String ret = sendingDevice; if (ret == null) { ret = deviceName; } return ret; } /** * Define how we want the object displayed in the plugin */ public enum DISPLAY_TYPE { DISPLAY_DEFAULT, DISPLAY_HIDDEN, DISPLAY_DISABLED, <API key>, <API key> } /** * Return all mapped device addresses for this control * @return returns the set of mapped targeted devices */ public Set<String> <API key>(){ return targetDevices; } @Override public void doScheduledEvent(double scheduledTime, Object param) { <API key> message = (<API key>) param; this.objVal = message.controlValue; this.executionTime = 0; this.sendingDevice = message.sourceDevice; <API key>(); if (!message.localOnly) { <API key>(); } synchronized (<API key>) { futureMessageList.remove(message); } } /** * Add one or more device names or addresses as strings to use in {@link ControlScope#TARGET} Message * @param deviceNames device name or IP Address */ public synchronized void addTargetDevice(String... deviceNames){ for (String name: deviceNames) { targetDevices.add(name); } } /** * Remove all set target devices and replace with the those provided as arguments * Adds device address as a string or device name to {@link ControlScope#TARGET} Message * @param deviceNames device name or IP Address */ public synchronized void setTargetDevice(String... deviceNames){ targetDevices.clear(); addTargetDevice(deviceNames); } /** * Remove all set target devices and replace with the those provided as arguments * Adds device addresses to {@link ControlScope#TARGET} Message * @param inetAddresses device name or IP Address */ public synchronized void setTargetDevice(InetAddress... inetAddresses){ targetDevices.clear(); addTargetDevice(inetAddresses); } /** * Add one or more device {@link InetAddress} for use in {@link ControlScope#TARGET} Message * @param inetAddresses the target addresses to add */ public void addTargetDevice(InetAddress... inetAddresses){ for (InetAddress address: inetAddresses) { targetDevices.add(address.getHostAddress()); } } /** * Clear all devices as Targets */ public synchronized void clearTargetDevices(){ targetDevices.clear(); } /** * Remove one or more device names or addresses as a string. * For use in {@link ControlScope#TARGET} Messages * @param deviceNames device names or IP Addresses to remove */ public synchronized void removeTargetDevice(String... deviceNames){ for (String name: deviceNames) { targetDevices.remove(name); } } /** * Remove one or more {@link InetAddress} for use in {@link ControlScope#TARGET} Message * @param inetAddresses the target addresses to remove */ public void removeTargetDevice(InetAddress... inetAddresses){ for (InetAddress address: inetAddresses) { targetDevices.remove(address.getHostAddress()); } } /** * Create an Interface to listen to */ public interface <API key> { void update(DynamicControl control); } public interface <API key> { void controlScopeChanged(ControlScope new_scope); } /** * The way Create Messages are sent */ private enum CREATE_MESSAGE_ARGS { DEVICE_NAME, MAP_KEY, CONTROL_NAME, PARENT_SKETCH_NAME, PARENT_SKETCH_ID, CONTROL_TYPE, OBJ_VAL, MIN_VAL, MAX_VAL, CONTROL_SCOPE, DISPLAY_TYPE_VAL } // Define the Arguments used in an Update message private enum UPDATE_MESSAGE_ARGS { DEVICE_NAME, CONTROL_NAME, CONTROL_TYPE, MAP_KEY, OBJ_VAL, CONTROL_SCOPE, DISPLAY_TYPE_VAL, MIN_VALUE, MAX_VALUE } // Define Global Message arguments public enum <API key> { DEVICE_NAME, CONTROL_NAME, CONTROL_TYPE, OBJ_VAL, <API key>, // Most Significant Int of Milliseconds - stored as int <API key>, // Least Significant Bit of Milliseconds - stored as int EXECUTE_TIME_NANO, // Number on Nano Seconds - stored as int MESSAGE_ID // we will increment an integer and send the message multiple times. We will ignore message if last message was this one } // Define Device Name Message arguments private enum DEVICE_NAME_ARGS { DEVICE_NAME } // Define where our first Array type global dynamic control message is in OSC final static int <API key> = <API key>.MESSAGE_ID.ordinal() + 1; // When an event is scheduled in the future, we will create one of these and schedule it class <API key>{ /** * Create a Future Control message * @param source_device the source device name * @param value the value to be executed * @param execution_time the time the value needs to be executed */ public <API key>(String source_device, Object value, double execution_time){ sourceDevice = source_device; controlValue = value; executionTime = execution_time; } Object controlValue; double executionTime; boolean localOnly = false; // if we are local only, we will not sendValue changed listeners String sourceDevice; have a copy of our pending scheduled object in case we want to cancel it ScheduledObject pendingSchedule = null; } static ControlMap controlMap = ControlMap.getInstance(); private static final Object controlMapLock = new Object(); private static int instanceCounter = 0; // we will use this to order the creation of our objects and give them a unique number on device private final Object instanceCounterLock = new Object(); private final Object valueChangedLock = new Object(); private final String controlMapKey; private List<<API key>> controlListenerList = new ArrayList<>(); private List<<API key>> <API key> = new ArrayList<>(); private List<<API key>> <API key> = new ArrayList<>(); private List<<API key>> futureMessageList = new ArrayList<>(); // This listener is only called when value on control set private List<<API key>> <API key> = new ArrayList<>(); // Create Object to lock shared resources private final Object <API key> = new Object(); private final Object controlListenerLock = new Object(); private final Object globalListenerLock = new Object(); private final Object <API key> = new Object(); private final Object <API key> = new Object(); static boolean disableScheduler = false; // set flag if we are going to disable scheduler - eg, in GUI /** * Create the text we will display at the beginning of tooltip * @param tooltipPrefix The starting text of the tooltip * @return this object */ public DynamicControl setTooltipPrefix(String tooltipPrefix) { this.tooltipPrefix = tooltipPrefix; return this; } private String tooltipPrefix = ""; // The Object sketch that this control was created in private Object parentSketch = null; final int parentId; private final String deviceName; private String parentSketchName; private ControlType controlType; final String controlName; private ControlScope controlScope = ControlScope.SKETCH; private Object objVal = 0; private Object maximumDisplayValue = 0; private Object minimumDisplayValue = 0; // This is the time we want to execute the control value private double executionTime = 0; DISPLAY_TYPE displayType = DISPLAY_TYPE.DISPLAY_DEFAULT; // Whether the control is displayType on control Screen /** * Set whether we disable setting all values in context of scheduler * @param disabled set true to disable */ public static void setDisableScheduler(boolean disabled){ disableScheduler = disabled; } /** * Whether we disable the control on the screen * @return How we will disable control on screen */ public DISPLAY_TYPE getDisplayType(){ return displayType; } /** * Set how we will display control object on the screen * @param display_type how we will display control * @return this */ public DynamicControl setDisplayType(DISPLAY_TYPE display_type){ displayType = display_type; <API key>(); //<API key>(); return this; } /** * Returns the JVM execution time we last used when we set the value * @return lastExecution time set */ public double getExecutionTime(){ return executionTime; } /** * Convert a float or int into required number type based on control. If not a FLOAT or INT, will just return value * @param control_type the control type * @param source_value the value we want * @return the converted value */ static private Object convertValue (ControlType control_type, Object source_value) { Object ret = source_value; // Convert if we are a float control if (control_type == ControlType.FLOAT) { if (source_value == null){ ret = 0.0; }else if (source_value instanceof Integer) { Integer i = (Integer) source_value; double f = i.doubleValue(); ret = f; }else if (source_value instanceof Double) { Double d = (Double) source_value; ret = d; }else if (source_value instanceof Long) { Long l = (Long) source_value; double f = l.doubleValue(); ret = f; } else if (source_value instanceof Float) { double f = (Float) source_value; ret = f; } else if (source_value instanceof String) { double f = Double.parseDouble((String)source_value); ret = f; } // Convert if we are an int control } else if (control_type == ControlType.INT) { if (source_value == null){ ret = 0; }else if (source_value instanceof Float) { Float f = (Float) source_value; Integer i = f.intValue(); ret = i; }else if (source_value instanceof Double) { Double d = (Double) source_value; Integer i = d.intValue(); ret = i; }else if (source_value instanceof Long) { Long l = (Long) source_value; Integer i = l.intValue(); ret = i; } // Convert if we are a BOOLEAN control } else if (control_type == ControlType.BOOLEAN) { if (source_value == null){ ret = 0; }if (source_value instanceof Integer) { Integer i = (Integer) source_value; Boolean b = i != 0; ret = b; }else if (source_value instanceof Long) { Long l = (Long) source_value; Integer i = l.intValue(); Boolean b = i != 0; ret = b; } // Convert if we are a TRIGGER control }else if (control_type == ControlType.TRIGGER) { if (source_value == null) { ret = System.currentTimeMillis(); } // Convert if we are a TEXT control }else if (control_type == ControlType.TEXT) { if (source_value == null) { ret = ""; } } return ret; } /** * Get the Sketch or class object linked to this control * @return the parentSketch or Object */ public Object getParentSketch() { return parentSketch; } /** * This is a private constructor used to initialise constant attributes of this object * * @param parent_sketch the object calling - typically this * @param control_type The type of control you want to create * @param name The name we will give to differentiate between different controls in this class * @param initial_value The initial value of the control * @param display_type how we want to display the object * */ private DynamicControl(Object parent_sketch, ControlType control_type, String name, Object initial_value, DISPLAY_TYPE display_type) { if (parent_sketch == null){ parent_sketch = new Object(); } displayType = display_type; parentSketch = parent_sketch; parentSketchName = parent_sketch.getClass().getName(); controlType = control_type; controlName = name; objVal = convertValue (control_type, initial_value); parentId = parent_sketch.hashCode(); deviceName = Device.getDeviceName(); synchronized (instanceCounterLock) { controlMapKey = Device.getDeviceName() + instanceCounter; instanceCounter++; } } /** * Ascertain the Control Type based on the Value * @param value the value we are obtaing a control value from * @return a control type */ public static ControlType getControlType(Object value){ ControlType ret = ControlType.OBJECT; if (value == null){ ret = ControlType.TRIGGER; } else if (value instanceof Float || value instanceof Double){ ret = ControlType.FLOAT; } else if (value instanceof Boolean){ ret = ControlType.BOOLEAN; } else if (value instanceof String){ ret = ControlType.TEXT; } else if (value instanceof Integer || value instanceof Long){ ret = ControlType.INT; } return ret; } /** * A dynamic control that can be accessed from outside this sketch * it is created with the sketch object that contains it along with the type * * @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type. * @param initial_value The initial value of the control */ public DynamicControl(String name, Object initial_value) { this(new Object(), getControlType(initial_value), name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT); synchronized (controlMapLock) { controlMap.addControl(this); } } /** * A dynamic control that can be accessed from outside this sketch * it is created with the sketch object that contains it along with the type * * @param control_type The type of control message you want to send * @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type. * @param initial_value The initial value of the control */ public DynamicControl(ControlType control_type, String name, Object initial_value) { this(new Object(), control_type, name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT); synchronized (controlMapLock) { controlMap.addControl(this); } } /** * A dynamic control that can be accessed from outside this sketch * it is created with the sketch object that contains it along with the type * @param parent_sketch the object calling - typically this, however, you can use any class object * @param control_type The type of control message you want to send * @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type. */ public DynamicControl(Object parent_sketch, ControlType control_type, String name) { this(parent_sketch, control_type, name, null, DISPLAY_TYPE.DISPLAY_DEFAULT); synchronized (controlMapLock) { controlMap.addControl(this); } } /** * A dynamic control that can be accessed from outside this sketch * it is created with the sketch object that contains it along with the type * * @param control_type The type of control message you want to send * @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type. */ public DynamicControl(ControlType control_type, String name) { this(new Object(), control_type, name, convertValue(control_type, null), DISPLAY_TYPE.DISPLAY_DEFAULT); synchronized (controlMapLock) { controlMap.addControl(this); } } /** * A dynamic control that can be accessed from outside this sketch * it is created with the sketch object that contains it along with the type * * @param parent_sketch the object calling - typically this, however, you can use any class object * @param control_type The type of control message you want to send * @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type. * @param initial_value The initial value of the control */ public DynamicControl(Object parent_sketch, ControlType control_type, String name, Object initial_value) { this(parent_sketch, control_type, name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT); synchronized (controlMapLock) { controlMap.addControl(this); } } /** * Set this control as a <API key> control so it does not get removed on reset * @return this */ public DynamicControl <API key>(){ controlMap.<API key>(this); isPersistentControl = true; return this; } /** * See if control is a persistent control * @return true if a simulator control */ public boolean isPersistentControl() { return isPersistentControl; } /** * A dynamic control that can be accessed from outside * it is created with the sketch object that contains it along with the type * * @param parent_sketch the object calling - typically this, however, you can use any class object * @param control_type The type of control message you want to send * @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type. * @param initial_value The initial value of the control * @param min_value The minimum display value of the control. Only used for display purposes * @param max_value The maximum display value of the control. Only used for display purposes */ public DynamicControl(Object parent_sketch, ControlType control_type, String name, Object initial_value, Object min_value, Object max_value) { this(parent_sketch, control_type, name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT); minimumDisplayValue = convertValue (control_type, min_value); maximumDisplayValue = convertValue (control_type, max_value); synchronized (controlMapLock) { controlMap.addControl(this); } } /** * A dynamic control that can be accessed from outside * it is created with the sketch object that contains it along with the type * * @param parent_sketch the object calling - typically this, however, you can use any class object * @param control_type The type of control message you want to send * @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type. * @param initial_value The initial value of the control * @param min_value The minimum display value of the control. Only used for display purposes * @param max_value The maximum display value of the control. Only used for display purposes * @param display_type The way we want the control displayed */ public DynamicControl(Object parent_sketch, ControlType control_type, String name, Object initial_value, Object min_value, Object max_value, DISPLAY_TYPE display_type) { this(parent_sketch, control_type, name, initial_value, display_type); minimumDisplayValue = convertValue (control_type, min_value); maximumDisplayValue = convertValue (control_type, max_value); synchronized (controlMapLock) { controlMap.addControl(this); } } /** * A dynamic control that can be accessed from outside * it is created with the sketch object that contains it along with the type * * @param control_type The type of control message you want to send * @param name The name we will give to associate it with other DynamicControls with identical ControlScope and type. * @param initial_value The initial value of the control * @param min_value The minimum display value of the control. Only used for display purposes * @param max_value The maximum display value of the control. Only used for display purposes */ public DynamicControl(ControlType control_type, String name, Object initial_value, Object min_value, Object max_value) { this(new Object(), control_type, name, initial_value, DISPLAY_TYPE.DISPLAY_DEFAULT); minimumDisplayValue = convertValue (control_type, min_value); maximumDisplayValue = convertValue (control_type, max_value); synchronized (controlMapLock) { controlMap.addControl(this); } } /** * Get the type of control we want * @return The type of value this control is */ public ControlType getControlType(){ return controlType; } /** * Get the scope of this control. Can be Sketch, Class, Device, or global * @return The Scope */ public ControlScope getControlScope(){ return controlScope; } /** * Changed the scope that the control has. It will update control map so the correct events will be generated based on its scope * @param new_scope The new Control Scope * @return this object */ public synchronized DynamicControl setControlScope(ControlScope new_scope) { ControlScope old_scope = controlScope; if (old_scope != new_scope) { controlScope = new_scope; <API key>(); // prevent control scope from changing the value //<API key>(); <API key>(); } return this; } /** * Get the Dynamic control based on Map key * * @param map_key the string that we are using as the key * @return the Object associated with this control */ public static DynamicControl getControl(String map_key) { DynamicControl ret = null; synchronized (controlMapLock) { ret = controlMap.getControl(map_key); } return ret; } /** * Update the parameters of this control with another. This would have been caused by an object having other than SKETCH control scope * If the parameters are changed, this object will notify it's listeners that a change has occurred * @param mirror_control The control that we are copying from * @return this object */ public DynamicControl updateControl(DynamicControl mirror_control){ if (mirror_control != null) { // first check our scope and type are the same boolean scope_matches = getControlScope() == mirror_control.getControlScope() && getControlType() == mirror_control.getControlType(); if (scope_matches) { // Now we need to check whether the scope matches us if (getControlScope() == ControlScope.SKETCH) { scope_matches = this.parentSketch == mirror_control.parentSketch && this.parentSketch != null; } // Now we need to check whether the scope matches us else if (getControlScope() == ControlScope.CLASS) { scope_matches = this.parentSketchName.equals(mirror_control.parentSketchName); } else if (getControlScope() == ControlScope.DEVICE){ scope_matches = this.deviceName.equals(mirror_control.deviceName); } else if (getControlScope() == ControlScope.TARGET){ // check if our mirror has this address scope_matches = mirror_control.targetsThisDevice(); } // Otherwise it must be global. We have a match } if (scope_matches) { // do not use setters as we only want to generate one <API key> boolean changed = false; if (mirror_control.executionTime <= 0.0) { // his needs to be done now if (!objVal.equals(mirror_control.objVal)) { //objVal = mirror_control.objVal; // let this get done inside the scheduleValue return changed = true; } if (changed) { scheduleValue(null, mirror_control.objVal, 0); } } else { scheduleValue(null, mirror_control.objVal, mirror_control.executionTime); } } } return this; } /** * Check whether this device is targeted by checking the loopback, localhost and devicenames * @return */ private boolean targetsThisDevice() { boolean ret = false; String device_name = Device.getDeviceName(); String loopback = InetAddress.getLoopbackAddress().getHostAddress(); for (String device: targetDevices) { if (device_name.equalsIgnoreCase(device)){ return true; } if (device_name.equalsIgnoreCase(loopback)){ return true; } try { if (InetAddress.getLocalHost().getHostAddress().equalsIgnoreCase(device)){ return true; } } catch (<API key> e) { //e.printStackTrace(); } } return ret; } /** * Schedule this control to change its value in context of scheduler * @param source_device the device name that was the source of this message - can be null * @param value the value to send * @param execution_time the time it needs to be executed * @param local_only if true, will not send value changed to <API key> */ void scheduleValue(String source_device, Object value, double execution_time, boolean local_only){ // We need to convert the Object value into the exact type. EG, integer must be cast to boolean if that is thr control type Object converted_value = convertValue(controlType, value); if (disableScheduler || execution_time == 0){ this.objVal = converted_value; this.executionTime = 0; this.sendingDevice = source_device; <API key>(); if (!local_only) { <API key>(); } } else { <API key> message = new <API key>(source_device, converted_value, execution_time); message.localOnly = local_only; message.pendingSchedule = HBScheduler.getGlobalScheduler().addScheduledObject(execution_time, message, this); synchronized (<API key>) { futureMessageList.add(message); } } } /** * Schedule this control to send a value to it's locallisteners at a scheduled time. Will also notify valueListeners (eg GUI controls) * @param source_device the device name that was the source of this message - can be null * @param value the value to send * @param execution_time the time it needs to be executed */ void scheduleValue(String source_device, Object value, double execution_time) { scheduleValue(source_device, value, execution_time, false); } /** * Process the DynamicControl deviceName message and map device name to IPAddress * We ignore our own device * @param src_address The address of the device * @param msg The OSC Message that has device name */ public static void <API key>(InetAddress src_address, OSCMessage msg) { // do some error checking here if (src_address != null) { String device_name = (String) msg.getArg(DEVICE_NAME_ARGS.DEVICE_NAME.ordinal()); try { if (!Device.getDeviceName().equalsIgnoreCase(device_name)) { HB.HBInstance.addDeviceAddress(device_name, src_address); } } catch(Exception ex){} } } /** * Process the DynamicControl deviceRequest message * Send a deviceName back to src. Test that their name is mapped correctly * If name is not mapped we will request from all devices globally * @param src_address The address of the device * @param msg The OSC Message that has device name */ public static void <API key>(InetAddress src_address, OSCMessage msg) { String device_name = (String) msg.getArg(DEVICE_NAME_ARGS.DEVICE_NAME.ordinal()); // ignore ourself if (!Device.getDeviceName().equalsIgnoreCase(device_name)) { // send them our message OSCMessage nameMessage = <API key>(); ControlMap.getInstance().<API key>(nameMessage, null); // See if we have them mapped the same boolean address_changed = HB.HBInstance.addDeviceAddress(device_name, src_address); if (address_changed){ // request all <API key>(); } } } /** * Post a request device name message to other devices so we can target them specifically and update our map */ public static void <API key>(){ OSCMessage requestMessage = <API key>(); ControlMap.getInstance().<API key>(requestMessage, null); } /** * Build OSC Message that gives our device name * @return OSC Message that has name */ public static OSCMessage <API key>(){ return new OSCMessage(OSCVocabulary.<API key>.DEVICE_NAME, new Object[]{ Device.getDeviceName(), }); } /** * Build OSC Message that requests devices send us their name * @return OSC Message to request name */ public static OSCMessage <API key>(){ return new OSCMessage(OSCVocabulary.<API key>.REQUEST_NAME, new Object[]{ Device.getDeviceName(), }); } /** * Convert two halves of a long stored integer values into a long value * @param msi most significant integer * @param lsi least significant integer * @return a long value consisting of the concatenation of both int values */ public static long integersToLong(int msi, int lsi){ return (long) msi << 32 | lsi & 0xFFFFFFFFL; } /** * Convert a long into two integers in an array of two integers * @param l_value the Long values that needs to be encoded * @return an array of two integers. ret[0] will be most significant integer while int [1] will be lease significant */ public static int [] longToIntegers (long l_value){ int msi = (int) (l_value >> 32); // this is most significant integer int lsi = (int) l_value; // This is LSB that has been trimmed down; return new int[]{msi, lsi}; } // We will create a single array that we can cache the size of an array of ints for scheduled time // This is used in <API key> private static int [] intArrayCache = null; /** * Return the array size of Integers that would be required to encode a scheduled time * @return the Array */ public static int <API key>(){ if (intArrayCache == null) { intArrayCache = <API key>(0); } return intArrayCache.length; } /** * Convert a SchedulerTime into integers in an array of three integers * @param d_val the double values that needs to be encoded * @return an array of three integers. ret[0] will be most significant integer while int [1] will be lease significant. int [2] is the number of nano seconds */ public static int [] <API key> (double d_val){ long lval = (long)d_val; int msi = (int) (lval >> 32); // this is most significant integer int lsi = (int) lval; // This is LSB that has been trimmed down; double nano = d_val - lval; nano *= 1000000; int n = (int) nano; return new int[]{msi, lsi, n}; } /** * Convert three integers to a double representing scheduler time * @param msi the most significant value of millisecond value * @param lsi the least significant value of millisecond value * @param nano the number of nanoseconds * @return a double representing the scheduler time */ public static double <API key>(int msi, int lsi, int nano){ long milliseconds = integersToLong(msi, lsi); double ret = milliseconds; double nanoseconds = nano; return ret + nanoseconds / 1000000d; } /** * Process the {@link ControlScope#GLOBAL} or {@link ControlScope#TARGET} Message from an OSC Message. Examine buildUpdateMessage for parameters inside Message * We will not process messages that have come from this device because they will be actioned through local listeners * @param msg OSC message with new value * @param controlScope the type of {@link ControlScope}; */ public static void <API key>(OSCMessage msg, ControlScope controlScope) { String device_name = (String) msg.getArg(<API key>.DEVICE_NAME.ordinal()); int message_id = (int)msg.getArg(<API key>.MESSAGE_ID.ordinal()); // Make sure we ignore messages from this device if (ignoreName || !device_name.equals(Device.getDeviceName())) { if (<API key>(device_name, message_id)) { String control_name = (String) msg.getArg(<API key>.CONTROL_NAME.ordinal()); ControlType control_type = ControlType.values()[(int) msg.getArg(<API key>.CONTROL_TYPE.ordinal())]; Object obj_val = msg.getArg(<API key>.OBJ_VAL.ordinal()); Object ms_max = msg.getArg(<API key>.<API key>.ordinal()); Object ms_min = msg.getArg(<API key>.<API key>.ordinal()); Object nano = msg.getArg(<API key>.EXECUTE_TIME_NANO.ordinal()); double execution_time = <API key>((int) ms_max, (int) ms_min, (int) nano); boolean data_converted = false; // we only want to do data conversion once synchronized (controlMapLock) { List<DynamicControl> named_controls = controlMap.getControlsByName(control_name); for (DynamicControl named_control : named_controls) { if (named_control.controlScope == controlScope && control_type.equals(named_control.controlType)) { // we must NOT call setVal as this will generate a global series again. // Just notifyListeners specific to this control but not globally if (!data_converted) { // we need to see if this is a boolean Object as OSC does not support that if (control_type == ControlType.BOOLEAN) { int osc_val = (int) obj_val; Boolean bool_val = osc_val != 0; obj_val = bool_val; data_converted = true; } else if (control_type == ControlType.OBJECT) { if (!(obj_val instanceof String)) { // This is not a Json Message // We will need to get all the remaining OSC arguments after the schedule time and store that as ObjVal int num_args = msg.getArgCount() - <API key>; Object[] restore_args = new Object[num_args]; for (int i = 0; i < num_args; i++) { restore_args[i] = msg.getArg(<API key> + i); } obj_val = restore_args; data_converted = true; } } } // We need to schedule this value named_control.scheduleValue(device_name, obj_val, execution_time); } } } } } } /** * Process the Update Message from an OSC Message. Examine buildUpdateMessage for parameters inside Message * The message is directed as a specific control defined by the MAP_KEY parameter in the OSC Message * @param msg OSC message with new value */ public static void <API key>(OSCMessage msg){ String map_key = (String) msg.getArg(UPDATE_MESSAGE_ARGS.MAP_KEY.ordinal()); String control_name = (String) msg.getArg(UPDATE_MESSAGE_ARGS.CONTROL_NAME.ordinal()); Object obj_val = msg.getArg(UPDATE_MESSAGE_ARGS.OBJ_VAL.ordinal()); ControlScope control_scope = ControlScope.values ()[(int) msg.getArg(UPDATE_MESSAGE_ARGS.CONTROL_SCOPE.ordinal())]; DISPLAY_TYPE display_type = DISPLAY_TYPE.DISPLAY_DEFAULT; DynamicControl control = getControl(map_key); if (control != null) { Object display_min = control.<API key>(); Object display_max = control.<API key>(); if (msg.getArgCount() > UPDATE_MESSAGE_ARGS.DISPLAY_TYPE_VAL.ordinal()) { int osc_val = (int) msg.getArg(UPDATE_MESSAGE_ARGS.DISPLAY_TYPE_VAL.ordinal()); display_type = DISPLAY_TYPE.values ()[osc_val]; } if (msg.getArgCount() > UPDATE_MESSAGE_ARGS.MAX_VALUE.ordinal()){ display_max = msg.getArg(UPDATE_MESSAGE_ARGS.MAX_VALUE.ordinal()); } if (msg.getArgCount() > UPDATE_MESSAGE_ARGS.MIN_VALUE.ordinal()){ display_min = msg.getArg(UPDATE_MESSAGE_ARGS.MIN_VALUE.ordinal()); } // do not use setters as we only want to generate one <API key> boolean changed = false; boolean <API key> = false; if (control.displayType != display_type) { changed = true; } control.displayType = display_type; obj_val = convertValue(control.controlType, obj_val); display_max = convertValue(control.controlType, display_max); display_min = convertValue(control.controlType, display_min); if (!obj_val.equals(control.objVal) || !display_max.equals(control.maximumDisplayValue) || !display_min.equals(control.minimumDisplayValue) ) { changed = true; } if (!control_scope.equals(control.controlScope)) { control.controlScope = control_scope; //control.executionTime = execution_time; changed = true; <API key> = true; } if (changed) { control.maximumDisplayValue = display_max; control.minimumDisplayValue = display_min; control.scheduleValue(null, obj_val, 0, true); if (control.getControlScope() != ControlScope.UNIQUE){ control.objVal = obj_val; control.<API key>(); } } if (<API key>) { control.<API key>(); } } } /** * Build OSC Message that specifies a removal of a control * @return OSC Message to notify removal */ public OSCMessage buildRemoveMessage(){ return new OSCMessage(OSCVocabulary.<API key>.DESTROY, new Object[]{ deviceName, controlMapKey }); } /** * Return an object that can be sent by OSC based on control TYpe * @param obj_val The object value we want to send * @return the type we will actually send */ private Object OSCArgumentObject (Object obj_val){ Object ret = obj_val; if (obj_val instanceof Boolean) { boolean b = (Boolean) obj_val; return b? 1:0; } else if (obj_val instanceof Double){ String s = ((Double)obj_val).toString(); ret = s; } return ret; } /** * Build OSC Message that specifies an update * @return OSC Message To send to specific control */ public OSCMessage buildUpdateMessage(){ Object sendObjType = objVal; if (controlType == ControlType.OBJECT){ sendObjType = objVal.toString(); } return new OSCMessage(OSCVocabulary.<API key>.UPDATE, new Object[]{ deviceName, controlName, controlType.ordinal(), controlMapKey, OSCArgumentObject(sendObjType), controlScope.ordinal(), displayType.ordinal(), OSCArgumentObject(minimumDisplayValue), OSCArgumentObject(maximumDisplayValue), }); } /** * Build OSC Message that specifies a Network update * @return OSC Message directed to controls with same name, scope, but on different devices */ public OSCMessage <API key>(){ deviceSendId++; String OSC_MessageName = OSCVocabulary.<API key>.GLOBAL; // define the arguments for send time int [] execution_args = <API key>(executionTime); if (controlScope == ControlScope.TARGET){ OSC_MessageName = OSCVocabulary.<API key>.TARGET; } if (controlType == ControlType.OBJECT){ /* DEVICE_NAME, CONTROL_NAME, CONTROL_TYPE, OBJ_VAL, <API key>, // Most Significant Int of Milliseconds - stored as int <API key>, // Least Significant Bit of Milliseconds - stored as int EXECUTE_TIME_NANO // Number on Nano Seconds - stored as int */ // we need to see if we have a custom encode function if (objVal instanceof CustomGlobalEncoder){ Object [] encode_data = ((CustomGlobalEncoder)objVal).encodeGlobalMessage(); int num_args = <API key> + encode_data.length; Object [] osc_args = new Object[num_args]; osc_args[0] = deviceName; osc_args[1] = controlName; osc_args[2] = controlType.ordinal(); osc_args[3] = 0; // by defining zero we are going to say this is NOT json osc_args[4] = execution_args [0]; osc_args[5] = execution_args [1]; osc_args[6] = execution_args [2]; osc_args[7] = deviceSendId; // now encode the object parameters for (int i = 0; i < encode_data.length; i++){ osc_args[<API key> + i] = encode_data[i]; } return new OSCMessage(OSC_MessageName, osc_args); } else { String jsonString = gson.toJson(objVal); return new OSCMessage(OSC_MessageName, new Object[]{ deviceName, controlName, controlType.ordinal(), jsonString, execution_args[0], execution_args[1], execution_args[2], deviceSendId }); } } else { return new OSCMessage(OSC_MessageName, new Object[]{ deviceName, controlName, controlType.ordinal(), OSCArgumentObject(objVal), execution_args[0], execution_args[1], execution_args[2], deviceSendId }); } } /** * Build the OSC Message for a create message * @return OSC Message required to create the object */ public OSCMessage buildCreateMessage() { Object sendObjType = objVal; if (controlType == ControlType.OBJECT){ sendObjType = objVal.toString(); } return new OSCMessage(OSCVocabulary.<API key>.CREATE, new Object[]{ deviceName, controlMapKey, controlName, parentSketchName, parentId, controlType.ordinal(), OSCArgumentObject(sendObjType), OSCArgumentObject(minimumDisplayValue), OSCArgumentObject(maximumDisplayValue), controlScope.ordinal(), displayType.ordinal() }); } /** * Create a DynamicControl based on OSC Message. This will keep OSC implementation inside this class * The buildUpdateMessage shows how messages are constructed * @param msg the OSC Message with the parameters to make Control */ public DynamicControl (OSCMessage msg) { deviceName = (String) msg.getArg(CREATE_MESSAGE_ARGS.DEVICE_NAME.ordinal()); controlMapKey = (String) msg.getArg(CREATE_MESSAGE_ARGS.MAP_KEY.ordinal()); controlName = (String) msg.getArg(CREATE_MESSAGE_ARGS.CONTROL_NAME.ordinal()); parentSketchName = (String) msg.getArg(CREATE_MESSAGE_ARGS.PARENT_SKETCH_NAME.ordinal()); parentId = (int) msg.getArg(CREATE_MESSAGE_ARGS.PARENT_SKETCH_ID.ordinal()); controlType = ControlType.values ()[(int) msg.getArg(CREATE_MESSAGE_ARGS.CONTROL_TYPE.ordinal())]; objVal = convertValue (controlType, msg.getArg(CREATE_MESSAGE_ARGS.OBJ_VAL.ordinal())); minimumDisplayValue = convertValue (controlType, msg.getArg(CREATE_MESSAGE_ARGS.MIN_VAL.ordinal())); maximumDisplayValue = convertValue (controlType, msg.getArg(CREATE_MESSAGE_ARGS.MAX_VAL.ordinal())); controlScope = ControlScope.values ()[(int) msg.getArg(CREATE_MESSAGE_ARGS.CONTROL_SCOPE.ordinal())]; if (msg.getArgCount() > CREATE_MESSAGE_ARGS.DISPLAY_TYPE_VAL.ordinal()) { int osc_val = (int) msg.getArg(CREATE_MESSAGE_ARGS.DISPLAY_TYPE_VAL.ordinal()); displayType = DISPLAY_TYPE.values ()[osc_val]; } synchronized (controlMapLock) { controlMap.addControl(this); } } /** * Get the map key created in the device as a method for mapping back * @return The unique key to identify this object */ public String getControlMapKey(){ return controlMapKey; } /** * Set the value of the object and notify any listeners * Additionally, the value will propagate to any controls that match the control scope * If we are using a trigger, send a random number or a unique value * @param val the value to set * @return this object */ public DynamicControl setValue(Object val) { return setValue(val, 0); } /** * Set the value of the object and notify any listeners * Additionally, the value will propagate to any controls that match the control scope * If we are using a trigger, send a random number or a unique value * @param val the value to set * @param execution_time the Scheduler time we want this to occur * @return this object */ public DynamicControl setValue(Object val, double execution_time) { executionTime = execution_time; val = convertValue (controlType, val); if (!objVal.equals(val)) { if (controlType == ControlType.FLOAT) { objVal = (Double) val; } else { objVal = val; } <API key>(); scheduleValue(null, val, execution_time); } return this; } /** * Gets the value of the control. The type needs to be cast to the required type in the listener * @return Control Value */ public Object getValue(){ return objVal; } /** * The maximum value that we want as a display, for example, in a slider control. Does not limit values in the messages * @return The maximum value we want a graphical display to be set to */ public Object <API key>(){ return maximumDisplayValue; } /** * Set the minimum display range for display * @param min minimum display value * * @return this */ public DynamicControl setMinimumValue(Object min) {minimumDisplayValue = min; return this;} /** * Set the maximum display range for display * @param max maximum display value * @return this */ public DynamicControl <API key>(Object max) {maximumDisplayValue = max; return this;} /** * The minimum value that we want as a display, for example, in a slider control. Does not limit values in the messages * @return The minimum value we want a graphical display to be set to */ public Object <API key>(){ return minimumDisplayValue; } /** * Get the name of the control used for ControlScope matching. Also displayed in GUI * @return The name of the control for scope matching */ public String getControlName(){ return controlName; } /** * Register Listener to receive changed values in the control * @param listener Listener to register for events * @return this */ public DynamicControl addControlListener(<API key> listener) { if (listener != null) { synchronized (controlListenerLock) { controlListenerList.add(listener); } } return this; } /** * Register Listener to receive changed values in the control that need to be global type messages * @param listener Listener to register for events * @return this listener that has been created */ public DynamicControl <API key>(<API key> listener) { if (listener != null) { synchronized (globalListenerLock) { <API key>.add(listener); } } return this; } /** * Register Listener to receive changed values in the control that need to be received when value is specifically set from * Within sketch * @param listener Listener to register for events * @return this */ public DynamicControl addValueSetListener(<API key> listener) { if (listener != null) { synchronized (<API key>) { <API key>.add(listener); } } return this; } /** * Deregister listener so it no longer receives messages from this control * @param listener The lsitener we are removing * @return this object */ public DynamicControl <API key>(<API key> listener) { if (listener != null) { synchronized (controlListenerLock) { controlListenerList.remove(listener); } } return this; } /** * Deregister listener so it no longer receives messages from this control * @param listener the listener we are remmoving * @return this object */ public DynamicControl <API key>(<API key> listener) { if (listener != null) { synchronized (globalListenerLock) { <API key>.remove(listener); } } return this; } /** * Register Listener to receive changed values in the control scope * @param listener Listener to register for events * @return this object */ public DynamicControl <API key>(<API key> listener){ if (listener != null) { synchronized (<API key>) { <API key>.add(listener); } } return this; } /** * Deregister listener so it no longer receives messages from this control * @param listener the listener * @return this object */ public DynamicControl <API key>(<API key> listener) { if (listener != null) { synchronized (<API key>) { <API key>.remove(listener); } } return this; } /** * Erase all listeners from this control * @return this object */ public DynamicControl eraseListeners() { // We need to synchronized (<API key>){ for (<API key> message: futureMessageList) { message.pendingSchedule.setCancelled(true); } futureMessageList.clear(); } synchronized (controlListenerLock) {controlListenerList.clear();} synchronized (<API key>) {<API key>.clear();} return this; } /** * Notify all registered listeners of object value on this device * @return this object */ public DynamicControl <API key>() { synchronized (controlListenerLock) { controlListenerList.forEach(listener -> { try { listener.update(this); } catch (Exception ex) { ex.printStackTrace(); } }); } return this; } /** * Send Update Message when value set */ public void <API key>(){ synchronized (<API key>) { <API key>.forEach(listener -> { try { listener.update(this); } catch (Exception ex) { ex.printStackTrace(); } }); } } /** * Send Global Update Message */ public void <API key>(){ synchronized (globalListenerLock) { <API key>.forEach(listener -> { try { listener.update(this); } catch (Exception ex) { ex.printStackTrace(); } }); } } /** * Notify all registered listeners of object value * @return this object */ public DynamicControl <API key>() { synchronized (<API key>) { <API key>.forEach(listener -> { try { listener.controlScopeChanged(this.getControlScope()); } catch (Exception ex) { ex.printStackTrace(); } }); } return this; } /** * Get the tooltip to display * @return the tooltip to display */ public String getTooltipText(){ String control_scope_text = ""; if (getControlScope() == ControlScope.UNIQUE) { control_scope_text = "UNIQUE scope"; } else if (getControlScope() == ControlScope.SKETCH) { control_scope_text = "SKETCH scope"; } else if (getControlScope() == ControlScope.CLASS) { control_scope_text = "CLASS scope - " + parentSketchName; } else if (getControlScope() == ControlScope.DEVICE) { control_scope_text = "DEVICE scope - " + deviceName; } else if (getControlScope() == ControlScope.GLOBAL) { control_scope_text = "GLOBAL scope"; } return tooltipPrefix + "\n" + control_scope_text; } }
// <API key>: Apache-2.0 WITH LLVM-exception #ifndef <API key> #define <API key> #include "iree/compiler/Dialect/HAL/Target/LLVM/LLVMTargetOptions.h" namespace mlir { namespace iree_compiler { namespace IREE { namespace HAL { // Registers the LLVM Ahead-Of-Time (AOT) target backends. void <API key>( std::function<LLVMTargetOptions()> queryOptions); } // namespace HAL } // namespace IREE } // namespace iree_compiler } // namespace mlir #endif // <API key>
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_27) on Wed Nov 06 17:51:16 PST 2013 --> <TITLE> QuantileUtil (DataFu 1.1.0) </TITLE> <META NAME="date" CONTENT="2013-11-06"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="QuantileUtil (DataFu 1.1.0)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <A NAME="navbar_top"></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/QuantileUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../datafu/pig/stats/Quantile.html" title="class in datafu.pig.stats"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../datafu/pig/stats/StreamingMedian.html" title="class in datafu.pig.stats"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?datafu/pig/stats/QuantileUtil.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="QuantileUtil.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <HR> <H2> <FONT SIZE="-1"> datafu.pig.stats</FONT> <BR> Class QuantileUtil</H2> <PRE> java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>datafu.pig.stats.QuantileUtil</B> </PRE> <HR> <DL> <DT><PRE>public class <B>QuantileUtil</B><DT>extends java.lang.Object</DL> </PRE> <P> Methods used by <A HREF="../../../datafu/pig/stats/Quantile.html" title="class in datafu.pig.stats"><CODE>Quantile</CODE></A>. <P> <P> <DL> <DT><B>Author:</B></DT> <DD>"Matthew Hayes <mhayes@linkedin.com>"</DD> </DL> <HR> <P> <A NAME="constructor_summary"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../datafu/pig/stats/QuantileUtil.html#QuantileUtil()">QuantileUtil</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <A NAME="method_summary"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.util.ArrayList&lt;java.lang.Double&gt;</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../datafu/pig/stats/QuantileUtil.html#getNQuantiles(int)">getNQuantiles</A></B>(int&nbsp;numQuantiles)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.util.ArrayList&lt;java.lang.Double&gt;</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../datafu/pig/stats/QuantileUtil.html#<API key>(java.lang.String...)"><API key></A></B>(java.lang.String...&nbsp;k)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp;<A NAME="<API key>.lang.Object"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="<API key>"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <A NAME="constructor_detail"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="QuantileUtil()"></A><H3> QuantileUtil</H3> <PRE> public <B>QuantileUtil</B>()</PRE> <DL> </DL> <A NAME="method_detail"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getNQuantiles(int)"></A><H3> getNQuantiles</H3> <PRE> public static java.util.ArrayList&lt;java.lang.Double&gt; <B>getNQuantiles</B>(int&nbsp;numQuantiles)</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="<API key>(java.lang.String...)"></A><H3> <API key></H3> <PRE> public static java.util.ArrayList&lt;java.lang.Double&gt; <B><API key></B>(java.lang.String...&nbsp;k)</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="navbar_bottom"></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="<API key>"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/QuantileUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../datafu/pig/stats/Quantile.html" title="class in datafu.pig.stats"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../datafu/pig/stats/StreamingMedian.html" title="class in datafu.pig.stats"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?datafu/pig/stats/QuantileUtil.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="QuantileUtil.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <HR> Matthew Hayes, Sam Shah </BODY> </HTML>
# AUTOGENERATED FILE FROM balenalib/artik520-fedora:34-run ENV NODE_VERSION 16.14.0 ENV YARN_VERSION 1.22.4 RUN for key in \ <API key> \ ; do \ gpg --keyserver pgp.mit.edu --recv-keys "$key" || \ gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \ gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \ done \ && curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$<API key>.tar.gz" \ && echo "<SHA256-like> node-v$<API key>.tar.gz" | sha256sum -c - \ && tar -xzf "node-v$<API key>.tar.gz" -C /usr/local --strip-components=1 \ && rm "node-v$<API key>.tar.gz" \ && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && mkdir -p /opt/yarn \ && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && npm config set unsafe-perm true -g --unsafe-perm \
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="de"> <head> <!-- Generated by javadoc (version 1.7.0_17) on Tue May 14 03:45:01 CEST 2013 --> <title>AtlasTmxMapLoader (libgdx API)</title> <meta name="date" content="2013-05-14"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="AtlasTmxMapLoader (libgdx API)"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/AtlasTmxMapLoader.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><em> libgdx API <style> body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt } pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif } h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold } .TableHeadingColor { background:#EEEEFF; } a { text-decoration:none } a:hover { text-decoration:underline } a:link, a:visited { color:blue } table { border:0px } .TableRowColor td:first-child { border-left:1px solid black } .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black } hr { border:0px; border-bottom:1px solid #333366; } </style> </em></div> </div> <div class="subNav"> <ul class="navList"> <li>Prev Class</li> <li><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html" target="_top">Frames</a></li> <li><a href="AtlasTmxMapLoader.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li><a href="#<API key>">Nested</a>&nbsp;|&nbsp;</li> <li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> </a></div> <div class="header"> <div class="subTitle">com.badlogic.gdx.maps.tiled</div> <h2 title="Class AtlasTmxMapLoader" class="title">Class AtlasTmxMapLoader</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">com.badlogic.gdx.assets.loaders.AssetLoader</a>&lt;T,P&gt;</li> <li> <ul class="inheritance"> <li><a href="../../../../../com/badlogic/gdx/assets/loaders/<API key>.html" title="class in com.badlogic.gdx.assets.loaders">com.badlogic.gdx.assets.loaders.<API key></a>&lt;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>,<a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&gt;</li> <li> <ul class="inheritance"> <li>com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader</li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="strong">AtlasTmxMapLoader</span> extends <a href="../../../../../com/badlogic/gdx/assets/loaders/<API key>.html" title="class in com.badlogic.gdx.assets.loaders"><API key></a>&lt;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>,<a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&gt;</pre> <div class="block">A TiledMap Loader which loads tiles from a TextureAtlas instead of separate images. It requires a map-level property called 'atlas' with its value being the relative path to the TextureAtlas. The atlas must have in it indexed regions named after the tilesets used in the map. The indexes shall be local to the tileset (not the global id). Strip whitespace and rotation should not be used when creating the atlas.</div> <dl><dt><span class="strong">Author:</span></dt> <dd>Justin Shapcott, Manuel Bua</dd></dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="<API key>"> </a> <h3>Nested Class Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> <caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a></strong></code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="field_summary"> </a> <h3>Field Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>protected static int</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#<API key>"><API key></a></strong></code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected static int</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#<API key>"><API key></a></strong></code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected static int</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#<API key>"><API key></a></strong></code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected <a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#map">map</a></strong></code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected int</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#mapHeightInPixels">mapHeightInPixels</a></strong></code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected int</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#mapWidthInPixels">mapWidthInPixels</a></strong></code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected static int</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#MASK_CLEAR">MASK_CLEAR</a></strong></code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#root">root</a></strong></code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array</a>&lt;<a href="../../../../../com/badlogic/gdx/graphics/Texture.html" title="class in com.badlogic.gdx.graphics">Texture</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#trackedTextures">trackedTextures</a></strong></code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected <a href="../../../../../com/badlogic/gdx/utils/XmlReader.html" title="class in com.badlogic.gdx.utils">XmlReader</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#xml">xml</a></strong></code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected boolean</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#yUp">yUp</a></strong></code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#AtlasTmxMapLoader()">AtlasTmxMapLoader</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colOne"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#AtlasTmxMapLoader(com.badlogic.gdx.assets.loaders.FileHandleResolver)">AtlasTmxMapLoader</a></strong>(<a href="../../../../../com/badlogic/gdx/assets/loaders/FileHandleResolver.html" title="interface in com.badlogic.gdx.assets.loaders">FileHandleResolver</a>&nbsp;resolver)</code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method_summary"> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMapTileLayer.Cell.html" title="class in com.badlogic.gdx.maps.tiled">TiledMapTileLayer.Cell</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#createTileLayerCell(boolean, boolean, boolean)">createTileLayerCell</a></strong>(boolean&nbsp;flipHorizontally, boolean&nbsp;flipVertically, boolean&nbsp;flipDiagonally)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array</a>&lt;<a href="../../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets">AssetDescriptor</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#getDependencies(java.lang.String, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)">getDependencies</a></strong>(java.lang.String&nbsp;fileName, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#<API key>(com.badlogic.gdx.files.FileHandle, java.lang.String)"><API key></a></strong>(<a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;file, java.lang.String&nbsp;path)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#load(java.lang.String)">load</a></strong>(java.lang.String&nbsp;fileName)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#load(java.lang.String, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)">load</a></strong>(java.lang.String&nbsp;fileName, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadAsync(com.badlogic.gdx.assets.AssetManager, java.lang.String, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)">loadAsync</a></strong>(<a href="../../../../../com/badlogic/gdx/assets/AssetManager.html" title="class in com.badlogic.gdx.assets">AssetManager</a>&nbsp;manager, java.lang.String&nbsp;fileName, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</code> <div class="block">Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadAtlas(com.badlogic.gdx.utils.XmlReader.Element, com.badlogic.gdx.files.FileHandle)">loadAtlas</a></strong>(<a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;root, <a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;tmxFile)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected <a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadMap(com.badlogic.gdx.utils.XmlReader.Element, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.AtlasResolver, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)">loadMap</a></strong>(<a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;root, <a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;tmxFile, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.AtlasResolver&nbsp;resolver, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadObject(com.badlogic.gdx.maps.MapLayer, com.badlogic.gdx.utils.XmlReader.Element)">loadObject</a></strong>(<a href="../../../../../com/badlogic/gdx/maps/MapLayer.html" title="class in com.badlogic.gdx.maps">MapLayer</a>&nbsp;layer, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadObjectGroup(com.badlogic.gdx.maps.tiled.TiledMap, com.badlogic.gdx.utils.XmlReader.Element)">loadObjectGroup</a></strong>(<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;map, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadProperties(com.badlogic.gdx.maps.MapProperties, com.badlogic.gdx.utils.XmlReader.Element)">loadProperties</a></strong>(<a href="../../../../../com/badlogic/gdx/maps/MapProperties.html" title="class in com.badlogic.gdx.maps">MapProperties</a>&nbsp;properties, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadSync(com.badlogic.gdx.assets.AssetManager, java.lang.String, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)">loadSync</a></strong>(<a href="../../../../../com/badlogic/gdx/assets/AssetManager.html" title="class in com.badlogic.gdx.assets">AssetManager</a>&nbsp;manager, java.lang.String&nbsp;fileName, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</code> <div class="block">Loads th</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadTileLayer(com.badlogic.gdx.maps.tiled.TiledMap, com.badlogic.gdx.utils.XmlReader.Element)">loadTileLayer</a></strong>(<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;map, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#loadTileset(com.badlogic.gdx.maps.tiled.TiledMap, com.badlogic.gdx.utils.XmlReader.Element, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.AtlasResolver, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)">loadTileset</a></strong>(<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;map, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element, <a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;tmxFile, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.AtlasResolver&nbsp;resolver, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected static int</code></td> <td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html#unsignedByteToInt(byte)">unsignedByteToInt</a></strong>(byte&nbsp;b)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="<API key>.badlogic.gdx.assets.loaders.AssetLoader"> </a> <h3>Methods inherited from class&nbsp;com.badlogic.gdx.assets.loaders.<a href="../../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader</a></h3> <code><a href="../../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html#resolve(java.lang.String)">resolve</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="<API key>.lang.Object"> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="field_detail"> </a> <h3>Field Detail</h3> <a name="<API key>"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>protected static final&nbsp;int <API key></pre> <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>">Constant Field Values</a></dd></dl> </li> </ul> <a name="<API key>"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>protected static final&nbsp;int <API key></pre> <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>">Constant Field Values</a></dd></dl> </li> </ul> <a name="<API key>"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>protected static final&nbsp;int <API key></pre> <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>">Constant Field Values</a></dd></dl> </li> </ul> <a name="MASK_CLEAR"> </a> <ul class="blockList"> <li class="blockList"> <h4>MASK_CLEAR</h4> <pre>protected static final&nbsp;int MASK_CLEAR</pre> <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.MASK_CLEAR">Constant Field Values</a></dd></dl> </li> </ul> <a name="xml"> </a> <ul class="blockList"> <li class="blockList"> <h4>xml</h4> <pre>protected&nbsp;<a href="../../../../../com/badlogic/gdx/utils/XmlReader.html" title="class in com.badlogic.gdx.utils">XmlReader</a> xml</pre> </li> </ul> <a name="root"> </a> <ul class="blockList"> <li class="blockList"> <h4>root</h4> <pre>protected&nbsp;<a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a> root</pre> </li> </ul> <a name="yUp"> </a> <ul class="blockList"> <li class="blockList"> <h4>yUp</h4> <pre>protected&nbsp;boolean yUp</pre> </li> </ul> <a name="mapWidthInPixels"> </a> <ul class="blockList"> <li class="blockList"> <h4>mapWidthInPixels</h4> <pre>protected&nbsp;int mapWidthInPixels</pre> </li> </ul> <a name="mapHeightInPixels"> </a> <ul class="blockList"> <li class="blockList"> <h4>mapHeightInPixels</h4> <pre>protected&nbsp;int mapHeightInPixels</pre> </li> </ul> <a name="map"> </a> <ul class="blockList"> <li class="blockList"> <h4>map</h4> <pre>protected&nbsp;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a> map</pre> </li> </ul> <a name="trackedTextures"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>trackedTextures</h4> <pre>protected&nbsp;<a href="../../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array</a>&lt;<a href="../../../../../com/badlogic/gdx/graphics/Texture.html" title="class in com.badlogic.gdx.graphics">Texture</a>&gt; trackedTextures</pre> </li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> </a> <h3>Constructor Detail</h3> <a name="AtlasTmxMapLoader()"> </a> <ul class="blockList"> <li class="blockList"> <h4>AtlasTmxMapLoader</h4> <pre>public&nbsp;AtlasTmxMapLoader()</pre> </li> </ul> <a name="AtlasTmxMapLoader(com.badlogic.gdx.assets.loaders.FileHandleResolver)"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>AtlasTmxMapLoader</h4> <pre>public&nbsp;AtlasTmxMapLoader(<a href="../../../../../com/badlogic/gdx/assets/loaders/FileHandleResolver.html" title="interface in com.badlogic.gdx.assets.loaders">FileHandleResolver</a>&nbsp;resolver)</pre> </li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method_detail"> </a> <h3>Method Detail</h3> <a name="load(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>load</h4> <pre>public&nbsp;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;load(java.lang.String&nbsp;fileName)</pre> </li> </ul> <a name="getDependencies(java.lang.String, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)"> </a> <ul class="blockList"> <li class="blockList"> <h4>getDependencies</h4> <pre>public&nbsp;<a href="../../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array</a>&lt;<a href="../../../../../com/badlogic/gdx/assets/AssetDescriptor.html" title="class in com.badlogic.gdx.assets">AssetDescriptor</a>&gt;&nbsp;getDependencies(java.lang.String&nbsp;fileName, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html#getDependencies(java.lang.String, P)">getDependencies</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../com/badlogic/gdx/assets/loaders/AssetLoader.html" title="class in com.badlogic.gdx.assets.loaders">AssetLoader</a>&lt;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>,<a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&gt;</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>fileName</code> - name of the asset to load</dd><dd><code>parameter</code> - parameters for loading the asset</dd> <dt><span class="strong">Returns:</span></dt><dd>other assets that the asset depends on and need to be loaded first or null if there are no dependencies.</dd></dl> </li> </ul> <a name="load(java.lang.String, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)"> </a> <ul class="blockList"> <li class="blockList"> <h4>load</h4> <pre>public&nbsp;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;load(java.lang.String&nbsp;fileName, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</pre> </li> </ul> <a name="loadAtlas(com.badlogic.gdx.utils.XmlReader.Element, com.badlogic.gdx.files.FileHandle)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadAtlas</h4> <pre>protected&nbsp;<a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;loadAtlas(<a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;root, <a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;tmxFile) throws java.io.IOException</pre> <dl><dt><span class="strong">Throws:</span></dt> <dd><code>java.io.IOException</code></dd></dl> </li> </ul> <a name="loadAsync(com.badlogic.gdx.assets.AssetManager, java.lang.String, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadAsync</h4> <pre>public&nbsp;void&nbsp;loadAsync(<a href="../../../../../com/badlogic/gdx/assets/AssetManager.html" title="class in com.badlogic.gdx.assets">AssetManager</a>&nbsp;manager, java.lang.String&nbsp;fileName, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</pre> <div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../com/badlogic/gdx/assets/loaders/<API key>.html#loadAsync(com.badlogic.gdx.assets.AssetManager, java.lang.String, P)"><API key></a></code></strong></div> <div class="block">Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../../com/badlogic/gdx/assets/loaders/<API key>.html#loadAsync(com.badlogic.gdx.assets.AssetManager, java.lang.String, P)">loadAsync</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../com/badlogic/gdx/assets/loaders/<API key>.html" title="class in com.badlogic.gdx.assets.loaders"><API key></a>&lt;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>,<a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&gt;</code></dd> <dd><code>fileName</code> - the name of the asset to load</dd><dd><code>parameter</code> - the parameters to use for loading the asset</dd></dl> </li> </ul> <a name="loadSync(com.badlogic.gdx.assets.AssetManager, java.lang.String, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadSync</h4> <pre>public&nbsp;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;loadSync(<a href="../../../../../com/badlogic/gdx/assets/AssetManager.html" title="class in com.badlogic.gdx.assets">AssetManager</a>&nbsp;manager, java.lang.String&nbsp;fileName, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</pre> <div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../com/badlogic/gdx/assets/loaders/<API key>.html#loadSync(com.badlogic.gdx.assets.AssetManager, java.lang.String, P)"><API key></a></code></strong></div> <div class="block">Loads th</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../../com/badlogic/gdx/assets/loaders/<API key>.html#loadSync(com.badlogic.gdx.assets.AssetManager, java.lang.String, P)">loadSync</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../com/badlogic/gdx/assets/loaders/<API key>.html" title="class in com.badlogic.gdx.assets.loaders"><API key></a>&lt;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>,<a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&gt;</code></dd> </dl> </li> </ul> <a name="loadMap(com.badlogic.gdx.utils.XmlReader.Element, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.AtlasResolver, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadMap</h4> <pre>protected&nbsp;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;loadMap(<a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;root, <a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;tmxFile, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.AtlasResolver&nbsp;resolver, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</pre> </li> </ul> <a name="loadTileset(com.badlogic.gdx.maps.tiled.TiledMap, com.badlogic.gdx.utils.XmlReader.Element, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.AtlasResolver, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.<API key>)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadTileset</h4> <pre>protected&nbsp;void&nbsp;loadTileset(<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;map, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element, <a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;tmxFile, com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader.AtlasResolver&nbsp;resolver, <a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled">AtlasTmxMapLoader.<API key></a>&nbsp;parameter)</pre> </li> </ul> <a name="loadTileLayer(com.badlogic.gdx.maps.tiled.TiledMap, com.badlogic.gdx.utils.XmlReader.Element)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadTileLayer</h4> <pre>protected&nbsp;void&nbsp;loadTileLayer(<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;map, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element)</pre> </li> </ul> <a name="loadObjectGroup(com.badlogic.gdx.maps.tiled.TiledMap, com.badlogic.gdx.utils.XmlReader.Element)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadObjectGroup</h4> <pre>protected&nbsp;void&nbsp;loadObjectGroup(<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMap.html" title="class in com.badlogic.gdx.maps.tiled">TiledMap</a>&nbsp;map, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element)</pre> </li> </ul> <a name="loadObject(com.badlogic.gdx.maps.MapLayer, com.badlogic.gdx.utils.XmlReader.Element)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadObject</h4> <pre>protected&nbsp;void&nbsp;loadObject(<a href="../../../../../com/badlogic/gdx/maps/MapLayer.html" title="class in com.badlogic.gdx.maps">MapLayer</a>&nbsp;layer, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element)</pre> </li> </ul> <a name="loadProperties(com.badlogic.gdx.maps.MapProperties, com.badlogic.gdx.utils.XmlReader.Element)"> </a> <ul class="blockList"> <li class="blockList"> <h4>loadProperties</h4> <pre>protected&nbsp;void&nbsp;loadProperties(<a href="../../../../../com/badlogic/gdx/maps/MapProperties.html" title="class in com.badlogic.gdx.maps">MapProperties</a>&nbsp;properties, <a href="../../../../../com/badlogic/gdx/utils/XmlReader.Element.html" title="class in com.badlogic.gdx.utils">XmlReader.Element</a>&nbsp;element)</pre> </li> </ul> <a name="createTileLayerCell(boolean, boolean, boolean)"> </a> <ul class="blockList"> <li class="blockList"> <h4>createTileLayerCell</h4> <pre>protected&nbsp;<a href="../../../../../com/badlogic/gdx/maps/tiled/TiledMapTileLayer.Cell.html" title="class in com.badlogic.gdx.maps.tiled">TiledMapTileLayer.Cell</a>&nbsp;createTileLayerCell(boolean&nbsp;flipHorizontally, boolean&nbsp;flipVertically, boolean&nbsp;flipDiagonally)</pre> </li> </ul> <a name="<API key>(com.badlogic.gdx.files.FileHandle, java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;<a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;<API key>(<a href="../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle</a>&nbsp;file, java.lang.String&nbsp;path)</pre> </li> </ul> <a name="unsignedByteToInt(byte)"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>unsignedByteToInt</h4> <pre>protected static&nbsp;int&nbsp;unsignedByteToInt(byte&nbsp;b)</pre> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/AtlasTmxMapLoader.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><em>libgdx API</em></div> </div> <div class="subNav"> <ul class="navList"> <li>Prev Class</li> <li><a href="../../../../../com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.<API key>.html" title="class in com.badlogic.gdx.maps.tiled"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?com/badlogic/gdx/maps/tiled/AtlasTmxMapLoader.html" target="_top">Frames</a></li> <li><a href="AtlasTmxMapLoader.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li><a href="#<API key>">Nested</a>&nbsp;|&nbsp;</li> <li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> </a></div> <p class="legalCopy"><small> <div style="font-size:9pt"><i> Copyright &copy; 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com) </i></div> </small></p> </body> </html>
<?php declare(strict_types=1); namespace OpenTelemetry\Tests\Unit\Contrib; use AssertWell\PHPUnitGlobalState\<API key>; use Grpc\UnaryCall; use Mockery; use Mockery\MockInterface; use OpenTelemetry\Contrib\OtlpGrpc\Exporter; use Opentelemetry\Proto\Collector\Trace\V1\TraceServiceClient; use OpenTelemetry\SDK\Trace\<API key>; use OpenTelemetry\Tests\Unit\SDK\Trace\SpanExporter\<API key>; use OpenTelemetry\Tests\Unit\SDK\Util\SpanData; use org\bovigo\vfs\vfsStream; /** * @covers OpenTelemetry\Contrib\OtlpGrpc\Exporter */ class <API key> extends <API key> { use <API key>; public function createExporter(): <API key> { return new Exporter(); } public function tearDown(): void { $this-><API key>(); } /** * @psalm-suppress UndefinedConstant */ public function <API key>(): void { $exporter = new Exporter( //These first parameters were copied from the constructor's default values 'localhost:4317', true, '', '', false, 10, $this-><API key>([ 'expectations' => [ 'num_spans' => 1, ], 'return_values' => [ 'status_code' => \Grpc\STATUS_OK, ], ]) ); $exporterStatusCode = $exporter->export([new SpanData()]); $this->assertSame(<API key>::STATUS_SUCCESS, $exporterStatusCode); } public function <API key>(): void { $exporter = new Exporter( //These first parameters were copied from the constructor's default values 'localhost:4317', true, '', '', false, 10, $this-><API key>([ 'expectations' => [ 'num_spans' => 1, ], 'return_values' => [ 'status_code' => 'An unexpected status', ], ]) ); $exporterStatusCode = $exporter->export([new SpanData()]); $this->assertSame(<API key>::<API key>, $exporterStatusCode); } public function <API key>(): void { $this->assertEquals(<API key>::<API key>, (new Exporter())->export([new SpanData()])); } public function <API key>(): void { $this-><API key>('<API key>', 'x-aaa=foo,x-bbb=barf'); $exporter = new Exporter(); $this->assertEquals(['x-aaa' => 'foo', 'x-bbb' => 'barf'], $exporter->getHeaders()); } public function test_set_header(): void { $exporter = new Exporter(); $exporter->setHeader('foo', 'bar'); $headers = $exporter->getHeaders(); $this->assertArrayHasKey('foo', $headers); $this->assertEquals('bar', $headers['foo']); } public function <API key>(): void { $exporter = new Exporter('localhost:4317', true, '', 'x-aaa=foo,x-bbb=bar'); $this->assertEquals(['x-aaa' => 'foo', 'x-bbb' => 'bar'], $exporter->getHeaders()); $exporter->setHeader('key', 'value'); $this->assertEquals(['x-aaa' => 'foo', 'x-bbb' => 'bar', 'key' => 'value'], $exporter->getHeaders()); } public function <API key>(): void { $this->assertEquals( <API key>::STATUS_SUCCESS, (new Exporter('test.otlp'))->export([]) ); } private function isInsecure(Exporter $exporter) : bool { $reflection = new \ReflectionClass($exporter); $property = $reflection->getProperty('insecure'); $property->setAccessible(true); return $property->getValue($exporter); } public function test_client_options(): void { // default options $exporter = new Exporter('localhost:4317'); $opts = $exporter->getClientOptions(); $this->assertEquals(10, $opts['timeout']); $this->assertTrue($this->isInsecure($exporter)); $this-><API key>('grpc.<API key>', $opts); // method args $exporter = new Exporter('localhost:4317', false, '', '', true, 5); $opts = $exporter->getClientOptions(); $this->assertEquals(5, $opts['timeout']); $this->assertFalse($this->isInsecure($exporter)); $this->assertEquals(2, $opts['grpc.<API key>']); // env vars $this-><API key>('<API key>', '1'); $this-><API key>('<API key>', 'gzip'); $this-><API key>('<API key>', 'false'); $exporter = new Exporter('localhost:4317'); $opts = $exporter->getClientOptions(); $this->assertEquals(1, $opts['timeout']); $this->assertFalse($this->isInsecure($exporter)); $this->assertEquals(2, $opts['grpc.<API key>']); } /** * @psalm-suppress <API key> * @psalm-suppress <API key> */ private function <API key>(array $options = []) { [ 'expectations' => [ 'num_spans' => $expectedNumSpans, ], 'return_values' => [ 'status_code' => $statusCode, ] ] = $options; /** @var MockInterface&TraceServiceClient */ $mockClient = Mockery::mock(TraceServiceClient::class) ->allows('Export') ->withArgs(function ($request) use ($expectedNumSpans) { return (count($request->getResourceSpans()) === $expectedNumSpans); }) ->andReturns( Mockery::mock(UnaryCall::class) ->allows('wait') ->andReturns( [ 'unused response data', new class($statusCode) { public $code; public function __construct($code) { $this->code = $code; } }, ] ) ->getMock() ) ->getMock(); return $mockClient; } public function <API key>(): void { // @<API key> $this->assertNotSame( Exporter::<API key>(), Exporter::<API key>() ); } public function <API key>(): void { $certDir = 'var'; $certFile = 'file.cert'; vfsStream::setup($certDir); $certPath = vfsStream::url(sprintf('%s/%s', $certDir, $certFile)); file_put_contents($certPath, 'foo'); $this-><API key>('<API key>', 'false'); $this-><API key>('<API key>', $certPath); $this->assertSame( $certPath, (new Exporter())->getCertificateFile() ); } }
#include "libavutil/x86_cpu.h" #include "libavcodec/dsputil.h" #include "libavcodec/h264dsp.h" #include "libavcodec/mpegvideo.h" #include "libavcodec/simple_idct.h" #include "dsputil_mmx.h" #include "vp3dsp_mmx.h" #include "vp3dsp_sse2.h" #include "vp6dsp_mmx.h" #include "vp6dsp_sse2.h" #include "idct_xvid.h" //#undef NDEBUG //#include <assert.h> int mm_flags; /* multimedia extension flags */ /* pixel operations */ DECLARE_ALIGNED(8, const uint64_t, ff_bone) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_wtwo) = <API key>; DECLARE_ALIGNED(16, const uint64_t, ff_pdw_80000000)[2] = {<API key>, <API key>}; DECLARE_ALIGNED(8, const uint64_t, ff_pw_3 ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pw_4 ) = <API key>; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_5 ) = {<API key>, <API key>}; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_8 ) = {<API key>, <API key>}; DECLARE_ALIGNED(8, const uint64_t, ff_pw_15 ) = <API key>; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_16 ) = {<API key>, <API key>}; DECLARE_ALIGNED(8, const uint64_t, ff_pw_20 ) = <API key>; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_28 ) = {<API key>, <API key>}; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_32 ) = {<API key>, <API key>}; DECLARE_ALIGNED(8, const uint64_t, ff_pw_42 ) = <API key>; DECLARE_ALIGNED(16, const xmm_reg, ff_pw_64 ) = {<API key>, <API key>}; DECLARE_ALIGNED(8, const uint64_t, ff_pw_96 ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pw_128) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pw_255) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pb_1 ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pb_3 ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pb_7 ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pb_1F ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pb_3F ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pb_81 ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pb_A1 ) = <API key>; DECLARE_ALIGNED(8, const uint64_t, ff_pb_FC ) = <API key>; DECLARE_ALIGNED(16, const double, ff_pd_1)[2] = { 1.0, 1.0 }; DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 }; #define JUMPALIGN() __asm__ volatile (ASMALIGN(3)::) #define MOVQ_ZERO(regd) __asm__ volatile ("pxor %%" #regd ", %%" #regd ::) #define MOVQ_BFE(regd) \ __asm__ volatile ( \ "pcmpeqd %%" #regd ", %%" #regd " \n\t"\ "paddb %%" #regd ", %%" #regd " \n\t" ::) #ifndef PIC #define MOVQ_BONE(regd) __asm__ volatile ("movq %0, %%" #regd " \n\t" ::"m"(ff_bone)) #define MOVQ_WTWO(regd) __asm__ volatile ("movq %0, %%" #regd " \n\t" ::"m"(ff_wtwo)) #else // for shared library it's better to use this way for accessing constants // pcmpeqd -> -1 #define MOVQ_BONE(regd) \ __asm__ volatile ( \ "pcmpeqd %%" #regd ", %%" #regd " \n\t" \ "psrlw $15, %%" #regd " \n\t" \ "packuswb %%" #regd ", %%" #regd " \n\t" ::) #define MOVQ_WTWO(regd) \ __asm__ volatile ( \ "pcmpeqd %%" #regd ", %%" #regd " \n\t" \ "psrlw $15, %%" #regd " \n\t" \ "psllw $1, %%" #regd " \n\t"::) #endif // using regr as temporary and for the output result // first argument is unmodifed and second is trashed // regfe is supposed to contain 0xfefefefefefefefe #define PAVGB_MMX_NO_RND(rega, regb, regr, regfe) \ "movq " #rega ", " #regr " \n\t"\ "pand " #regb ", " #regr " \n\t"\ "pxor " #rega ", " #regb " \n\t"\ "pand " #regfe "," #regb " \n\t"\ "psrlq $1, " #regb " \n\t"\ "paddb " #regb ", " #regr " \n\t" #define PAVGB_MMX(rega, regb, regr, regfe) \ "movq " #rega ", " #regr " \n\t"\ "por " #regb ", " #regr " \n\t"\ "pxor " #rega ", " #regb " \n\t"\ "pand " #regfe "," #regb " \n\t"\ "psrlq $1, " #regb " \n\t"\ "psubb " #regb ", " #regr " \n\t" // mm6 is supposed to contain 0xfefefefefefefefe #define PAVGBP_MMX_NO_RND(rega, regb, regr, regc, regd, regp) \ "movq " #rega ", " #regr " \n\t"\ "movq " #regc ", " #regp " \n\t"\ "pand " #regb ", " #regr " \n\t"\ "pand " #regd ", " #regp " \n\t"\ "pxor " #rega ", " #regb " \n\t"\ "pxor " #regc ", " #regd " \n\t"\ "pand %%mm6, " #regb " \n\t"\ "pand %%mm6, " #regd " \n\t"\ "psrlq $1, " #regb " \n\t"\ "psrlq $1, " #regd " \n\t"\ "paddb " #regb ", " #regr " \n\t"\ "paddb " #regd ", " #regp " \n\t" #define PAVGBP_MMX(rega, regb, regr, regc, regd, regp) \ "movq " #rega ", " #regr " \n\t"\ "movq " #regc ", " #regp " \n\t"\ "por " #regb ", " #regr " \n\t"\ "por " #regd ", " #regp " \n\t"\ "pxor " #rega ", " #regb " \n\t"\ "pxor " #regc ", " #regd " \n\t"\ "pand %%mm6, " #regb " \n\t"\ "pand %%mm6, " #regd " \n\t"\ "psrlq $1, " #regd " \n\t"\ "psrlq $1, " #regb " \n\t"\ "psubb " #regb ", " #regr " \n\t"\ "psubb " #regd ", " #regp " \n\t" /* MMX no rounding */ #define DEF(x, y) x ## _no_rnd_ ## y ##_mmx #define SET_RND MOVQ_WONE #define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX_NO_RND(a, b, c, d, e, f) #define PAVGB(a, b, c, e) PAVGB_MMX_NO_RND(a, b, c, e) #define OP_AVG(a, b, c, e) PAVGB_MMX(a, b, c, e) #include "<API key>.c" #undef DEF #undef SET_RND #undef PAVGBP #undef PAVGB /* MMX rounding */ #define DEF(x, y) x ## _ ## y ##_mmx #define SET_RND MOVQ_WTWO #define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX(a, b, c, d, e, f) #define PAVGB(a, b, c, e) PAVGB_MMX(a, b, c, e) #include "<API key>.c" #undef DEF #undef SET_RND #undef PAVGBP #undef PAVGB #undef OP_AVG /* 3Dnow specific */ #define DEF(x) x ## _3dnow #define PAVGB "pavgusb" #define OP_AVG PAVGB #include "<API key>.c" #undef DEF #undef PAVGB #undef OP_AVG /* MMX2 specific */ #define DEF(x) x ## _mmx2 /* Introduced only in MMX2 set */ #define PAVGB "pavgb" #define OP_AVG PAVGB #include "<API key>.c" #undef DEF #undef PAVGB #undef OP_AVG #define <API key> put_pixels16_mmx #define <API key> put_pixels8_mmx #define put_pixels16_mmx2 put_pixels16_mmx #define put_pixels8_mmx2 put_pixels8_mmx #define put_pixels4_mmx2 put_pixels4_mmx #define <API key> <API key> #define <API key> <API key> #define put_pixels16_3dnow put_pixels16_mmx #define put_pixels8_3dnow put_pixels8_mmx #define put_pixels4_3dnow put_pixels4_mmx #define <API key> <API key> #define <API key> <API key> /* standard MMX */ void <API key>(const DCTELEM *block, uint8_t *pixels, int line_size) { const DCTELEM *p; uint8_t *pix; /* read the pixels */ p = block; pix = pixels; /* unrolled loop */ __asm__ volatile( "movq %3, %%mm0 \n\t" "movq 8%3, %%mm1 \n\t" "movq 16%3, %%mm2 \n\t" "movq 24%3, %%mm3 \n\t" "movq 32%3, %%mm4 \n\t" "movq 40%3, %%mm5 \n\t" "movq 48%3, %%mm6 \n\t" "movq 56%3, %%mm7 \n\t" "packuswb %%mm1, %%mm0 \n\t" "packuswb %%mm3, %%mm2 \n\t" "packuswb %%mm5, %%mm4 \n\t" "packuswb %%mm7, %%mm6 \n\t" "movq %%mm0, (%0) \n\t" "movq %%mm2, (%0, %1) \n\t" "movq %%mm4, (%0, %1, 2) \n\t" "movq %%mm6, (%0, %2) \n\t" ::"r" (pix), "r" ((x86_reg)line_size), "r" ((x86_reg)line_size*3), "m"(*p) :"memory"); pix += line_size*4; p += 32; // if here would be an exact copy of the code above // compiler would generate some very strange code // thus using "r" __asm__ volatile( "movq (%3), %%mm0 \n\t" "movq 8(%3), %%mm1 \n\t" "movq 16(%3), %%mm2 \n\t" "movq 24(%3), %%mm3 \n\t" "movq 32(%3), %%mm4 \n\t" "movq 40(%3), %%mm5 \n\t" "movq 48(%3), %%mm6 \n\t" "movq 56(%3), %%mm7 \n\t" "packuswb %%mm1, %%mm0 \n\t" "packuswb %%mm3, %%mm2 \n\t" "packuswb %%mm5, %%mm4 \n\t" "packuswb %%mm7, %%mm6 \n\t" "movq %%mm0, (%0) \n\t" "movq %%mm2, (%0, %1) \n\t" "movq %%mm4, (%0, %1, 2) \n\t" "movq %%mm6, (%0, %2) \n\t" ::"r" (pix), "r" ((x86_reg)line_size), "r" ((x86_reg)line_size*3), "r"(p) :"memory"); } DECLARE_ASM_CONST(8, uint8_t, ff_vector128)[8] = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; #define <API key>(off) \ "movq "#off"(%2), %%mm1 \n\t"\ "movq 16+"#off"(%2), %%mm2 \n\t"\ "movq 32+"#off"(%2), %%mm3 \n\t"\ "movq 48+"#off"(%2), %%mm4 \n\t"\ "packsswb 8+"#off"(%2), %%mm1 \n\t"\ "packsswb 24+"#off"(%2), %%mm2 \n\t"\ "packsswb 40+"#off"(%2), %%mm3 \n\t"\ "packsswb 56+"#off"(%2), %%mm4 \n\t"\ "paddb %%mm0, %%mm1 \n\t"\ "paddb %%mm0, %%mm2 \n\t"\ "paddb %%mm0, %%mm3 \n\t"\ "paddb %%mm0, %%mm4 \n\t"\ "movq %%mm1, (%0) \n\t"\ "movq %%mm2, (%0, %3) \n\t"\ "movq %%mm3, (%0, %3, 2) \n\t"\ "movq %%mm4, (%0, %1) \n\t" void <API key>(const DCTELEM *block, uint8_t *pixels, int line_size) { x86_reg line_skip = line_size; x86_reg line_skip3; __asm__ volatile ( "movq "MANGLE(ff_vector128)", %%mm0 \n\t" "lea (%3, %3, 2), %1 \n\t" <API key>(0) "lea (%0, %3, 4), %0 \n\t" <API key>(64) :"+&r" (pixels), "=&r" (line_skip3) :"r" (block), "r"(line_skip) :"memory"); } void <API key>(const DCTELEM *block, uint8_t *pixels, int line_size) { const DCTELEM *p; uint8_t *pix; int i; /* read the pixels */ p = block; pix = pixels; MOVQ_ZERO(mm7); i = 4; do { __asm__ volatile( "movq (%2), %%mm0 \n\t" "movq 8(%2), %%mm1 \n\t" "movq 16(%2), %%mm2 \n\t" "movq 24(%2), %%mm3 \n\t" "movq %0, %%mm4 \n\t" "movq %1, %%mm6 \n\t" "movq %%mm4, %%mm5 \n\t" "punpcklbw %%mm7, %%mm4 \n\t" "punpckhbw %%mm7, %%mm5 \n\t" "paddsw %%mm4, %%mm0 \n\t" "paddsw %%mm5, %%mm1 \n\t" "movq %%mm6, %%mm5 \n\t" "punpcklbw %%mm7, %%mm6 \n\t" "punpckhbw %%mm7, %%mm5 \n\t" "paddsw %%mm6, %%mm2 \n\t" "paddsw %%mm5, %%mm3 \n\t" "packuswb %%mm1, %%mm0 \n\t" "packuswb %%mm3, %%mm2 \n\t" "movq %%mm0, %0 \n\t" "movq %%mm2, %1 \n\t" :"+m"(*pix), "+m"(*(pix+line_size)) :"r"(p) :"memory"); pix += line_size*2; p += 16; } while (--i); } static void put_pixels4_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm__ volatile( "lea (%3, %3), %%"REG_a" \n\t" ASMALIGN(3) "1: \n\t" "movd (%1), %%mm0 \n\t" "movd (%1, %3), %%mm1 \n\t" "movd %%mm0, (%2) \n\t" "movd %%mm1, (%2, %3) \n\t" "add %%"REG_a", %1 \n\t" "add %%"REG_a", %2 \n\t" "movd (%1), %%mm0 \n\t" "movd (%1, %3), %%mm1 \n\t" "movd %%mm0, (%2) \n\t" "movd %%mm1, (%2, %3) \n\t" "add %%"REG_a", %1 \n\t" "add %%"REG_a", %2 \n\t" "subl $4, %0 \n\t" "jnz 1b \n\t" : "+g"(h), "+r" (pixels), "+r" (block) : "r"((x86_reg)line_size) : "%"REG_a, "memory" ); } static void put_pixels8_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm__ volatile( "lea (%3, %3), %%"REG_a" \n\t" ASMALIGN(3) "1: \n\t" "movq (%1), %%mm0 \n\t" "movq (%1, %3), %%mm1 \n\t" "movq %%mm0, (%2) \n\t" "movq %%mm1, (%2, %3) \n\t" "add %%"REG_a", %1 \n\t" "add %%"REG_a", %2 \n\t" "movq (%1), %%mm0 \n\t" "movq (%1, %3), %%mm1 \n\t" "movq %%mm0, (%2) \n\t" "movq %%mm1, (%2, %3) \n\t" "add %%"REG_a", %1 \n\t" "add %%"REG_a", %2 \n\t" "subl $4, %0 \n\t" "jnz 1b \n\t" : "+g"(h), "+r" (pixels), "+r" (block) : "r"((x86_reg)line_size) : "%"REG_a, "memory" ); } static void put_pixels16_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm__ volatile( "lea (%3, %3), %%"REG_a" \n\t" ASMALIGN(3) "1: \n\t" "movq (%1), %%mm0 \n\t" "movq 8(%1), %%mm4 \n\t" "movq (%1, %3), %%mm1 \n\t" "movq 8(%1, %3), %%mm5 \n\t" "movq %%mm0, (%2) \n\t" "movq %%mm4, 8(%2) \n\t" "movq %%mm1, (%2, %3) \n\t" "movq %%mm5, 8(%2, %3) \n\t" "add %%"REG_a", %1 \n\t" "add %%"REG_a", %2 \n\t" "movq (%1), %%mm0 \n\t" "movq 8(%1), %%mm4 \n\t" "movq (%1, %3), %%mm1 \n\t" "movq 8(%1, %3), %%mm5 \n\t" "movq %%mm0, (%2) \n\t" "movq %%mm4, 8(%2) \n\t" "movq %%mm1, (%2, %3) \n\t" "movq %%mm5, 8(%2, %3) \n\t" "add %%"REG_a", %1 \n\t" "add %%"REG_a", %2 \n\t" "subl $4, %0 \n\t" "jnz 1b \n\t" : "+g"(h), "+r" (pixels), "+r" (block) : "r"((x86_reg)line_size) : "%"REG_a, "memory" ); } static void put_pixels16_sse2(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm__ volatile( "1: \n\t" "movdqu (%1), %%xmm0 \n\t" "movdqu (%1,%3), %%xmm1 \n\t" "movdqu (%1,%3,2), %%xmm2 \n\t" "movdqu (%1,%4), %%xmm3 \n\t" "movdqa %%xmm0, (%2) \n\t" "movdqa %%xmm1, (%2,%3) \n\t" "movdqa %%xmm2, (%2,%3,2) \n\t" "movdqa %%xmm3, (%2,%4) \n\t" "subl $4, %0 \n\t" "lea (%1,%3,4), %1 \n\t" "lea (%2,%3,4), %2 \n\t" "jnz 1b \n\t" : "+g"(h), "+r" (pixels), "+r" (block) : "r"((x86_reg)line_size), "r"((x86_reg)3L*line_size) : "memory" ); } static void avg_pixels16_sse2(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm__ volatile( "1: \n\t" "movdqu (%1), %%xmm0 \n\t" "movdqu (%1,%3), %%xmm1 \n\t" "movdqu (%1,%3,2), %%xmm2 \n\t" "movdqu (%1,%4), %%xmm3 \n\t" "pavgb (%2), %%xmm0 \n\t" "pavgb (%2,%3), %%xmm1 \n\t" "pavgb (%2,%3,2), %%xmm2 \n\t" "pavgb (%2,%4), %%xmm3 \n\t" "movdqa %%xmm0, (%2) \n\t" "movdqa %%xmm1, (%2,%3) \n\t" "movdqa %%xmm2, (%2,%3,2) \n\t" "movdqa %%xmm3, (%2,%4) \n\t" "subl $4, %0 \n\t" "lea (%1,%3,4), %1 \n\t" "lea (%2,%3,4), %2 \n\t" "jnz 1b \n\t" : "+g"(h), "+r" (pixels), "+r" (block) : "r"((x86_reg)line_size), "r"((x86_reg)3L*line_size) : "memory" ); } #define CLEAR_BLOCKS(name,n) \ static void name(DCTELEM *blocks)\ {\ __asm__ volatile(\ "pxor %%mm7, %%mm7 \n\t"\ "mov %1, %%"REG_a" \n\t"\ "1: \n\t"\ "movq %%mm7, (%0, %%"REG_a") \n\t"\ "movq %%mm7, 8(%0, %%"REG_a") \n\t"\ "movq %%mm7, 16(%0, %%"REG_a") \n\t"\ "movq %%mm7, 24(%0, %%"REG_a") \n\t"\ "add $32, %%"REG_a" \n\t"\ " js 1b \n\t"\ : : "r" (((uint8_t *)blocks)+128*n),\ "i" (-128*n)\ : "%"REG_a\ );\ } CLEAR_BLOCKS(clear_blocks_mmx, 6) CLEAR_BLOCKS(clear_block_mmx, 1) static void clear_block_sse(DCTELEM *block) { __asm__ volatile( "xorps %%xmm0, %%xmm0 \n" "movaps %%xmm0, (%0) \n" "movaps %%xmm0, 16(%0) \n" "movaps %%xmm0, 32(%0) \n" "movaps %%xmm0, 48(%0) \n" "movaps %%xmm0, 64(%0) \n" "movaps %%xmm0, 80(%0) \n" "movaps %%xmm0, 96(%0) \n" "movaps %%xmm0, 112(%0) \n" :: "r"(block) : "memory" ); } static void clear_blocks_sse(DCTELEM *blocks) {\ __asm__ volatile( "xorps %%xmm0, %%xmm0 \n" "mov %1, %%"REG_a" \n" "1: \n" "movaps %%xmm0, (%0, %%"REG_a") \n" "movaps %%xmm0, 16(%0, %%"REG_a") \n" "movaps %%xmm0, 32(%0, %%"REG_a") \n" "movaps %%xmm0, 48(%0, %%"REG_a") \n" "movaps %%xmm0, 64(%0, %%"REG_a") \n" "movaps %%xmm0, 80(%0, %%"REG_a") \n" "movaps %%xmm0, 96(%0, %%"REG_a") \n" "movaps %%xmm0, 112(%0, %%"REG_a") \n" "add $128, %%"REG_a" \n" " js 1b \n" : : "r" (((uint8_t *)blocks)+128*6), "i" (-128*6) : "%"REG_a ); } static void add_bytes_mmx(uint8_t *dst, uint8_t *src, int w){ x86_reg i=0; __asm__ volatile( "jmp 2f \n\t" "1: \n\t" "movq (%1, %0), %%mm0 \n\t" "movq (%2, %0), %%mm1 \n\t" "paddb %%mm0, %%mm1 \n\t" "movq %%mm1, (%2, %0) \n\t" "movq 8(%1, %0), %%mm0 \n\t" "movq 8(%2, %0), %%mm1 \n\t" "paddb %%mm0, %%mm1 \n\t" "movq %%mm1, 8(%2, %0) \n\t" "add $16, %0 \n\t" "2: \n\t" "cmp %3, %0 \n\t" " js 1b \n\t" : "+r" (i) : "r"(src), "r"(dst), "r"((x86_reg)w-15) ); for(; i<w; i++) dst[i+0] += src[i+0]; } static void add_bytes_l2_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){ x86_reg i=0; __asm__ volatile( "jmp 2f \n\t" "1: \n\t" "movq (%2, %0), %%mm0 \n\t" "movq 8(%2, %0), %%mm1 \n\t" "paddb (%3, %0), %%mm0 \n\t" "paddb 8(%3, %0), %%mm1 \n\t" "movq %%mm0, (%1, %0) \n\t" "movq %%mm1, 8(%1, %0) \n\t" "add $16, %0 \n\t" "2: \n\t" "cmp %4, %0 \n\t" " js 1b \n\t" : "+r" (i) : "r"(dst), "r"(src1), "r"(src2), "r"((x86_reg)w-15) ); for(; i<w; i++) dst[i] = src1[i] + src2[i]; } #if HAVE_7REGS && HAVE_TEN_OPERANDS static void <API key>(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top) { x86_reg w2 = -w; x86_reg x; int l = *left & 0xff; int tl = *left_top & 0xff; int t; __asm__ volatile( "mov %7, %3 \n" "1: \n" "movzx (%3,%4), %2 \n" "mov %2, %k3 \n" "sub %b1, %b3 \n" "add %b0, %b3 \n" "mov %2, %1 \n" "cmp %0, %2 \n" "cmovg %0, %2 \n" "cmovg %1, %0 \n" "cmp %k3, %0 \n" "cmovg %k3, %0 \n" "mov %7, %3 \n" "cmp %2, %0 \n" "cmovl %2, %0 \n" "add (%6,%4), %b0 \n" "mov %b0, (%5,%4) \n" "inc %4 \n" "jl 1b \n" :"+&q"(l), "+&q"(tl), "=&r"(t), "=&q"(x), "+&r"(w2) :"r"(dst+w), "r"(diff+w), "rm"(top+w) ); *left = l; *left_top = tl; } #endif #define H263_LOOP_FILTER \ "pxor %%mm7, %%mm7 \n\t"\ "movq %0, %%mm0 \n\t"\ "movq %0, %%mm1 \n\t"\ "movq %3, %%mm2 \n\t"\ "movq %3, %%mm3 \n\t"\ "punpcklbw %%mm7, %%mm0 \n\t"\ "punpckhbw %%mm7, %%mm1 \n\t"\ "punpcklbw %%mm7, %%mm2 \n\t"\ "punpckhbw %%mm7, %%mm3 \n\t"\ "psubw %%mm2, %%mm0 \n\t"\ "psubw %%mm3, %%mm1 \n\t"\ "movq %1, %%mm2 \n\t"\ "movq %1, %%mm3 \n\t"\ "movq %2, %%mm4 \n\t"\ "movq %2, %%mm5 \n\t"\ "punpcklbw %%mm7, %%mm2 \n\t"\ "punpckhbw %%mm7, %%mm3 \n\t"\ "punpcklbw %%mm7, %%mm4 \n\t"\ "punpckhbw %%mm7, %%mm5 \n\t"\ "psubw %%mm2, %%mm4 \n\t"\ "psubw %%mm3, %%mm5 \n\t"\ "psllw $2, %%mm4 \n\t"\ "psllw $2, %%mm5 \n\t"\ "paddw %%mm0, %%mm4 \n\t"\ "paddw %%mm1, %%mm5 \n\t"\ "pxor %%mm6, %%mm6 \n\t"\ "pcmpgtw %%mm4, %%mm6 \n\t"\ "pcmpgtw %%mm5, %%mm7 \n\t"\ "pxor %%mm6, %%mm4 \n\t"\ "pxor %%mm7, %%mm5 \n\t"\ "psubw %%mm6, %%mm4 \n\t"\ "psubw %%mm7, %%mm5 \n\t"\ "psrlw $3, %%mm4 \n\t"\ "psrlw $3, %%mm5 \n\t"\ "packuswb %%mm5, %%mm4 \n\t"\ "packsswb %%mm7, %%mm6 \n\t"\ "pxor %%mm7, %%mm7 \n\t"\ "movd %4, %%mm2 \n\t"\ "punpcklbw %%mm2, %%mm2 \n\t"\ "punpcklbw %%mm2, %%mm2 \n\t"\ "punpcklbw %%mm2, %%mm2 \n\t"\ "psubusb %%mm4, %%mm2 \n\t"\ "movq %%mm2, %%mm3 \n\t"\ "psubusb %%mm4, %%mm3 \n\t"\ "psubb %%mm3, %%mm2 \n\t"\ "movq %1, %%mm3 \n\t"\ "movq %2, %%mm4 \n\t"\ "pxor %%mm6, %%mm3 \n\t"\ "pxor %%mm6, %%mm4 \n\t"\ "paddusb %%mm2, %%mm3 \n\t"\ "psubusb %%mm2, %%mm4 \n\t"\ "pxor %%mm6, %%mm3 \n\t"\ "pxor %%mm6, %%mm4 \n\t"\ "paddusb %%mm2, %%mm2 \n\t"\ "packsswb %%mm1, %%mm0 \n\t"\ "pcmpgtb %%mm0, %%mm7 \n\t"\ "pxor %%mm7, %%mm0 \n\t"\ "psubb %%mm7, %%mm0 \n\t"\ "movq %%mm0, %%mm1 \n\t"\ "psubusb %%mm2, %%mm0 \n\t"\ "psubb %%mm0, %%mm1 \n\t"\ "pand %5, %%mm1 \n\t"\ "psrlw $2, %%mm1 \n\t"\ "pxor %%mm7, %%mm1 \n\t"\ "psubb %%mm7, %%mm1 \n\t"\ "movq %0, %%mm5 \n\t"\ "movq %3, %%mm6 \n\t"\ "psubb %%mm1, %%mm5 \n\t"\ "paddb %%mm1, %%mm6 \n\t" static void <API key>(uint8_t *src, int stride, int qscale){ if(CONFIG_H263_DECODER || CONFIG_H263_ENCODER) { const int strength= <API key>[qscale]; __asm__ volatile( H263_LOOP_FILTER "movq %%mm3, %1 \n\t" "movq %%mm4, %2 \n\t" "movq %%mm5, %0 \n\t" "movq %%mm6, %3 \n\t" : "+m" (*(uint64_t*)(src - 2*stride)), "+m" (*(uint64_t*)(src - 1*stride)), "+m" (*(uint64_t*)(src + 0*stride)), "+m" (*(uint64_t*)(src + 1*stride)) : "g" (2*strength), "m"(ff_pb_FC) ); } } static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){ __asm__ volatile( //FIXME could save 1 instruction if done as 8x4 ... "movd %4, %%mm0 \n\t" "movd %5, %%mm1 \n\t" "movd %6, %%mm2 \n\t" "movd %7, %%mm3 \n\t" "punpcklbw %%mm1, %%mm0 \n\t" "punpcklbw %%mm3, %%mm2 \n\t" "movq %%mm0, %%mm1 \n\t" "punpcklwd %%mm2, %%mm0 \n\t" "punpckhwd %%mm2, %%mm1 \n\t" "movd %%mm0, %0 \n\t" "punpckhdq %%mm0, %%mm0 \n\t" "movd %%mm0, %1 \n\t" "movd %%mm1, %2 \n\t" "punpckhdq %%mm1, %%mm1 \n\t" "movd %%mm1, %3 \n\t" : "=m" (*(uint32_t*)(dst + 0*dst_stride)), "=m" (*(uint32_t*)(dst + 1*dst_stride)), "=m" (*(uint32_t*)(dst + 2*dst_stride)), "=m" (*(uint32_t*)(dst + 3*dst_stride)) : "m" (*(uint32_t*)(src + 0*src_stride)), "m" (*(uint32_t*)(src + 1*src_stride)), "m" (*(uint32_t*)(src + 2*src_stride)), "m" (*(uint32_t*)(src + 3*src_stride)) ); } static void <API key>(uint8_t *src, int stride, int qscale){ if(CONFIG_H263_DECODER || CONFIG_H263_ENCODER) { const int strength= <API key>[qscale]; DECLARE_ALIGNED(8, uint64_t, temp)[4]; uint8_t *btemp= (uint8_t*)temp; src -= 2; transpose4x4(btemp , src , 8, stride); transpose4x4(btemp+4, src + 4*stride, 8, stride); __asm__ volatile( H263_LOOP_FILTER // 5 3 4 6 : "+m" (temp[0]), "+m" (temp[1]), "+m" (temp[2]), "+m" (temp[3]) : "g" (2*strength), "m"(ff_pb_FC) ); __asm__ volatile( "movq %%mm5, %%mm1 \n\t" "movq %%mm4, %%mm0 \n\t" "punpcklbw %%mm3, %%mm5 \n\t" "punpcklbw %%mm6, %%mm4 \n\t" "punpckhbw %%mm3, %%mm1 \n\t" "punpckhbw %%mm6, %%mm0 \n\t" "movq %%mm5, %%mm3 \n\t" "movq %%mm1, %%mm6 \n\t" "punpcklwd %%mm4, %%mm5 \n\t" "punpcklwd %%mm0, %%mm1 \n\t" "punpckhwd %%mm4, %%mm3 \n\t" "punpckhwd %%mm0, %%mm6 \n\t" "movd %%mm5, (%0) \n\t" "punpckhdq %%mm5, %%mm5 \n\t" "movd %%mm5, (%0,%2) \n\t" "movd %%mm3, (%0,%2,2) \n\t" "punpckhdq %%mm3, %%mm3 \n\t" "movd %%mm3, (%0,%3) \n\t" "movd %%mm1, (%1) \n\t" "punpckhdq %%mm1, %%mm1 \n\t" "movd %%mm1, (%1,%2) \n\t" "movd %%mm6, (%1,%2,2) \n\t" "punpckhdq %%mm6, %%mm6 \n\t" "movd %%mm6, (%1,%3) \n\t" :: "r" (src), "r" (src + 4*stride), "r" ((x86_reg) stride ), "r" ((x86_reg)(3*stride)) ); } } /* draw the edges of width 'w' of an image of size width, height this mmx version can only handle w==8 || w==16 */ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, int w) { uint8_t *ptr, *last_line; int i; last_line = buf + (height - 1) * wrap; /* left and right */ ptr = buf; if(w==8) { __asm__ volatile( "1: \n\t" "movd (%0), %%mm0 \n\t" "punpcklbw %%mm0, %%mm0 \n\t" "punpcklwd %%mm0, %%mm0 \n\t" "punpckldq %%mm0, %%mm0 \n\t" "movq %%mm0, -8(%0) \n\t" "movq -8(%0, %2), %%mm1 \n\t" "punpckhbw %%mm1, %%mm1 \n\t" "punpckhwd %%mm1, %%mm1 \n\t" "punpckhdq %%mm1, %%mm1 \n\t" "movq %%mm1, (%0, %2) \n\t" "add %1, %0 \n\t" "cmp %3, %0 \n\t" " jb 1b \n\t" : "+r" (ptr) : "r" ((x86_reg)wrap), "r" ((x86_reg)width), "r" (ptr + wrap*height) ); } else { __asm__ volatile( "1: \n\t" "movd (%0), %%mm0 \n\t" "punpcklbw %%mm0, %%mm0 \n\t" "punpcklwd %%mm0, %%mm0 \n\t" "punpckldq %%mm0, %%mm0 \n\t" "movq %%mm0, -8(%0) \n\t" "movq %%mm0, -16(%0) \n\t" "movq -8(%0, %2), %%mm1 \n\t" "punpckhbw %%mm1, %%mm1 \n\t" "punpckhwd %%mm1, %%mm1 \n\t" "punpckhdq %%mm1, %%mm1 \n\t" "movq %%mm1, (%0, %2) \n\t" "movq %%mm1, 8(%0, %2) \n\t" "add %1, %0 \n\t" "cmp %3, %0 \n\t" " jb 1b \n\t" : "+r" (ptr) : "r" ((x86_reg)wrap), "r" ((x86_reg)width), "r" (ptr + wrap*height) ); } for(i=0;i<w;i+=4) { /* top and bottom (and hopefully also the corners) */ ptr= buf - (i + 1) * wrap - w; __asm__ volatile( "1: \n\t" "movq (%1, %0), %%mm0 \n\t" "movq %%mm0, (%0) \n\t" "movq %%mm0, (%0, %2) \n\t" "movq %%mm0, (%0, %2, 2) \n\t" "movq %%mm0, (%0, %3) \n\t" "add $8, %0 \n\t" "cmp %4, %0 \n\t" " jb 1b \n\t" : "+r" (ptr) : "r" ((x86_reg)buf - (x86_reg)ptr - w), "r" ((x86_reg)-wrap), "r" ((x86_reg)-wrap*3), "r" (ptr+width+2*w) ); ptr= last_line + (i + 1) * wrap - w; __asm__ volatile( "1: \n\t" "movq (%1, %0), %%mm0 \n\t" "movq %%mm0, (%0) \n\t" "movq %%mm0, (%0, %2) \n\t" "movq %%mm0, (%0, %2, 2) \n\t" "movq %%mm0, (%0, %3) \n\t" "add $8, %0 \n\t" "cmp %4, %0 \n\t" " jb 1b \n\t" : "+r" (ptr) : "r" ((x86_reg)last_line - (x86_reg)ptr - w), "r" ((x86_reg)wrap), "r" ((x86_reg)wrap*3), "r" (ptr+width+2*w) ); } } #define PAETH(cpu, abs3)\ static void <API key>##cpu(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp)\ {\ x86_reg i = -bpp;\ x86_reg end = w-3;\ __asm__ volatile(\ "pxor %%mm7, %%mm7 \n"\ "movd (%1,%0), %%mm0 \n"\ "movd (%2,%0), %%mm1 \n"\ "punpcklbw %%mm7, %%mm0 \n"\ "punpcklbw %%mm7, %%mm1 \n"\ "add %4, %0 \n"\ "1: \n"\ "movq %%mm1, %%mm2 \n"\ "movd (%2,%0), %%mm1 \n"\ "movq %%mm2, %%mm3 \n"\ "punpcklbw %%mm7, %%mm1 \n"\ "movq %%mm2, %%mm4 \n"\ "psubw %%mm1, %%mm3 \n"\ "psubw %%mm0, %%mm4 \n"\ "movq %%mm3, %%mm5 \n"\ "paddw %%mm4, %%mm5 \n"\ abs3\ "movq %%mm4, %%mm6 \n"\ "pminsw %%mm5, %%mm6 \n"\ "pcmpgtw %%mm6, %%mm3 \n"\ "pcmpgtw %%mm5, %%mm4 \n"\ "movq %%mm4, %%mm6 \n"\ "pand %%mm3, %%mm4 \n"\ "pandn %%mm3, %%mm6 \n"\ "pandn %%mm0, %%mm3 \n"\ "movd (%3,%0), %%mm0 \n"\ "pand %%mm1, %%mm6 \n"\ "pand %%mm4, %%mm2 \n"\ "punpcklbw %%mm7, %%mm0 \n"\ "movq %6, %%mm5 \n"\ "paddw %%mm6, %%mm0 \n"\ "paddw %%mm2, %%mm3 \n"\ "paddw %%mm3, %%mm0 \n"\ "pand %%mm5, %%mm0 \n"\ "movq %%mm0, %%mm3 \n"\ "packuswb %%mm3, %%mm3 \n"\ "movd %%mm3, (%1,%0) \n"\ "add %4, %0 \n"\ "cmp %5, %0 \n"\ "jle 1b \n"\ :"+r"(i)\ :"r"(dst), "r"(top), "r"(src), "r"((x86_reg)bpp), "g"(end),\ "m"(ff_pw_255)\ :"memory"\ );\ } #define ABS3_MMX2\ "psubw %%mm5, %%mm7 \n"\ "pmaxsw %%mm7, %%mm5 \n"\ "pxor %%mm6, %%mm6 \n"\ "pxor %%mm7, %%mm7 \n"\ "psubw %%mm3, %%mm6 \n"\ "psubw %%mm4, %%mm7 \n"\ "pmaxsw %%mm6, %%mm3 \n"\ "pmaxsw %%mm7, %%mm4 \n"\ "pxor %%mm7, %%mm7 \n" #define ABS3_SSSE3\ "pabsw %%mm3, %%mm3 \n"\ "pabsw %%mm4, %%mm4 \n"\ "pabsw %%mm5, %%mm5 \n" PAETH(mmx2, ABS3_MMX2) #if HAVE_SSSE3 PAETH(ssse3, ABS3_SSSE3) #endif #define QPEL_V_LOW(m3,m4,m5,m6, pw_20, pw_3, rnd, in0, in1, in2, in7, out, OP)\ "paddw " #m4 ", " #m3 " \n\t" \ "movq "MANGLE(ff_pw_20)", %%mm4 \n\t" \ "pmullw " #m3 ", %%mm4 \n\t" /* 20x1 */\ "movq "#in7", " #m3 " \n\t" \ "movq "#in0", %%mm5 \n\t" \ "paddw " #m3 ", %%mm5 \n\t" \ "psubw %%mm5, %%mm4 \n\t" /* 20x1 - x4 */\ "movq "#in1", %%mm5 \n\t" \ "movq "#in2", %%mm6 \n\t" \ "paddw " #m6 ", %%mm5 \n\t" \ "paddw " #m5 ", %%mm6 \n\t" \ "paddw %%mm6, %%mm6 \n\t" /* 2x2 */\ "psubw %%mm6, %%mm5 \n\t" /* -2x2 + x3 */\ "pmullw "MANGLE(ff_pw_3)", %%mm5 \n\t" /* -6x2 + 3x3 */\ "paddw " #rnd ", %%mm4 \n\t" \ "paddw %%mm4, %%mm5 \n\t" /* 20x1 - 6x2 + 3x3 - x4 */\ "psraw $5, %%mm5 \n\t"\ "packuswb %%mm5, %%mm5 \n\t"\ OP(%%mm5, out, %%mm7, d) #define QPEL_BASE(OPNAME, ROUNDER, RND, OP_MMX2, OP_3DNOW)\ static void OPNAME ## <API key>(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\ uint64_t temp;\ \ __asm__ volatile(\ "pxor %%mm7, %%mm7 \n\t"\ "1: \n\t"\ "movq (%0), %%mm0 \n\t" /* ABCDEFGH */\ "movq %%mm0, %%mm1 \n\t" /* ABCDEFGH */\ "movq %%mm0, %%mm2 \n\t" /* ABCDEFGH */\ "punpcklbw %%mm7, %%mm0 \n\t" /* 0A0B0C0D */\ "punpckhbw %%mm7, %%mm1 \n\t" /* 0E0F0G0H */\ "pshufw $0x90, %%mm0, %%mm5 \n\t" /* 0A0A0B0C */\ "pshufw $0x41, %%mm0, %%mm6 \n\t" /* 0B0A0A0B */\ "movq %%mm2, %%mm3 \n\t" /* ABCDEFGH */\ "movq %%mm2, %%mm4 \n\t" /* ABCDEFGH */\ "psllq $8, %%mm2 \n\t" /* 0ABCDEFG */\ "psllq $16, %%mm3 \n\t" /* 00ABCDEF */\ "psllq $24, %%mm4 \n\t" /* 000ABCDE */\ "punpckhbw %%mm7, %%mm2 \n\t" /* 0D0E0F0G */\ "punpckhbw %%mm7, %%mm3 \n\t" /* 0C0D0E0F */\ "punpckhbw %%mm7, %%mm4 \n\t" /* 0B0C0D0E */\ "paddw %%mm3, %%mm5 \n\t" \ "paddw %%mm2, %%mm6 \n\t" \ "paddw %%mm5, %%mm5 \n\t" \ "psubw %%mm5, %%mm6 \n\t" /* c - 2b */\ "pshufw $0x06, %%mm0, %%mm5 \n\t" /* 0C0B0A0A */\ "pmullw "MANGLE(ff_pw_3)", %%mm6 \n\t" /* 3c - 6b */\ "paddw %%mm4, %%mm0 \n\t" \ "paddw %%mm1, %%mm5 \n\t" \ "pmullw "MANGLE(ff_pw_20)", %%mm0 \n\t" /* 20a */\ "psubw %%mm5, %%mm0 \n\t" /* 20a - d */\ "paddw %6, %%mm6 \n\t"\ "paddw %%mm6, %%mm0 \n\t" /* 20a - 6b + 3c - d */\ "psraw $5, %%mm0 \n\t"\ "movq %%mm0, %5 \n\t"\ /* mm1=EFGH, mm2=DEFG, mm3=CDEF, mm4=BCDE, mm7=0 */\ \ "movq 5(%0), %%mm0 \n\t" /* FGHIJKLM */\ "movq %%mm0, %%mm5 \n\t" /* FGHIJKLM */\ "movq %%mm0, %%mm6 \n\t" /* FGHIJKLM */\ "psrlq $8, %%mm0 \n\t" /* GHIJKLM0 */\ "psrlq $16, %%mm5 \n\t" /* HIJKLM00 */\ "punpcklbw %%mm7, %%mm0 \n\t" /* 0G0H0I0J */\ "punpcklbw %%mm7, %%mm5 \n\t" /* 0H0I0J0K */\ "paddw %%mm0, %%mm2 \n\t" \ "paddw %%mm5, %%mm3 \n\t" \ "paddw %%mm2, %%mm2 \n\t" \ "psubw %%mm2, %%mm3 \n\t" /* c - 2b */\ "movq %%mm6, %%mm2 \n\t" /* FGHIJKLM */\ "psrlq $24, %%mm6 \n\t" /* IJKLM000 */\ "punpcklbw %%mm7, %%mm2 \n\t" /* 0F0G0H0I */\ "punpcklbw %%mm7, %%mm6 \n\t" /* 0I0J0K0L */\ "pmullw "MANGLE(ff_pw_3)", %%mm3 \n\t" /* 3c - 6b */\ "paddw %%mm2, %%mm1 \n\t" \ "paddw %%mm6, %%mm4 \n\t" \ "pmullw "MANGLE(ff_pw_20)", %%mm1 \n\t" /* 20a */\ "psubw %%mm4, %%mm3 \n\t" /* - 6b +3c - d */\ "paddw %6, %%mm1 \n\t"\ "paddw %%mm1, %%mm3 \n\t" /* 20a - 6b +3c - d */\ "psraw $5, %%mm3 \n\t"\ "movq %5, %%mm1 \n\t"\ "packuswb %%mm3, %%mm1 \n\t"\ OP_MMX2(%%mm1, (%1),%%mm4, q)\ /* mm0= GHIJ, mm2=FGHI, mm5=HIJK, mm6=IJKL, mm7=0 */\ \ "movq 9(%0), %%mm1 \n\t" /* JKLMNOPQ */\ "movq %%mm1, %%mm4 \n\t" /* JKLMNOPQ */\ "movq %%mm1, %%mm3 \n\t" /* JKLMNOPQ */\ "psrlq $8, %%mm1 \n\t" /* KLMNOPQ0 */\ "psrlq $16, %%mm4 \n\t" /* LMNOPQ00 */\ "punpcklbw %%mm7, %%mm1 \n\t" /* 0K0L0M0N */\ "punpcklbw %%mm7, %%mm4 \n\t" /* 0L0M0N0O */\ "paddw %%mm1, %%mm5 \n\t" \ "paddw %%mm4, %%mm0 \n\t" \ "paddw %%mm5, %%mm5 \n\t" \ "psubw %%mm5, %%mm0 \n\t" /* c - 2b */\ "movq %%mm3, %%mm5 \n\t" /* JKLMNOPQ */\ "psrlq $24, %%mm3 \n\t" /* MNOPQ000 */\ "pmullw "MANGLE(ff_pw_3)", %%mm0 \n\t" /* 3c - 6b */\ "punpcklbw %%mm7, %%mm3 \n\t" /* 0M0N0O0P */\ "paddw %%mm3, %%mm2 \n\t" \ "psubw %%mm2, %%mm0 \n\t" /* -6b + 3c - d */\ "movq %%mm5, %%mm2 \n\t" /* JKLMNOPQ */\ "punpcklbw %%mm7, %%mm2 \n\t" /* 0J0K0L0M */\ "punpckhbw %%mm7, %%mm5 \n\t" /* 0N0O0P0Q */\ "paddw %%mm2, %%mm6 \n\t" \ "pmullw "MANGLE(ff_pw_20)", %%mm6 \n\t" /* 20a */\ "paddw %6, %%mm0 \n\t"\ "paddw %%mm6, %%mm0 \n\t" /* 20a - 6b + 3c - d */\ "psraw $5, %%mm0 \n\t"\ /* mm1=KLMN, mm2=JKLM, mm3=MNOP, mm4=LMNO, mm5=NOPQ mm7=0 */\ \ "paddw %%mm5, %%mm3 \n\t" \ "pshufw $0xF9, %%mm5, %%mm6 \n\t" /* 0O0P0Q0Q */\ "paddw %%mm4, %%mm6 \n\t" \ "pshufw $0xBE, %%mm5, %%mm4 \n\t" /* 0P0Q0Q0P */\ "pshufw $0x6F, %%mm5, %%mm5 \n\t" /* 0Q0Q0P0O */\ "paddw %%mm1, %%mm4 \n\t" \ "paddw %%mm2, %%mm5 \n\t" \ "paddw %%mm6, %%mm6 \n\t" \ "psubw %%mm6, %%mm4 \n\t" /* c - 2b */\ "pmullw "MANGLE(ff_pw_20)", %%mm3 \n\t" /* 20a */\ "pmullw "MANGLE(ff_pw_3)", %%mm4 \n\t" /* 3c - 6b */\ "psubw %%mm5, %%mm3 \n\t" /* -6b + 3c - d */\ "paddw %6, %%mm4 \n\t"\ "paddw %%mm3, %%mm4 \n\t" /* 20a - 6b + 3c - d */\ "psraw $5, %%mm4 \n\t"\ "packuswb %%mm4, %%mm0 \n\t"\ OP_MMX2(%%mm0, 8(%1), %%mm4, q)\ \ "add %3, %0 \n\t"\ "add %4, %1 \n\t"\ "decl %2 \n\t"\ " jnz 1b \n\t"\ : "+a"(src), "+c"(dst), "+D"(h)\ : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(temp), "m"(ROUNDER)\ : "memory"\ );\ }\ \ static void OPNAME ## <API key>(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\ int i;\ int16_t temp[16];\ /* quick HACK, XXX FIXME MUST be optimized */\ for(i=0; i<h; i++)\ {\ temp[ 0]= (src[ 0]+src[ 1])*20 - (src[ 0]+src[ 2])*6 + (src[ 1]+src[ 3])*3 - (src[ 2]+src[ 4]);\ temp[ 1]= (src[ 1]+src[ 2])*20 - (src[ 0]+src[ 3])*6 + (src[ 0]+src[ 4])*3 - (src[ 1]+src[ 5]);\ temp[ 2]= (src[ 2]+src[ 3])*20 - (src[ 1]+src[ 4])*6 + (src[ 0]+src[ 5])*3 - (src[ 0]+src[ 6]);\ temp[ 3]= (src[ 3]+src[ 4])*20 - (src[ 2]+src[ 5])*6 + (src[ 1]+src[ 6])*3 - (src[ 0]+src[ 7]);\ temp[ 4]= (src[ 4]+src[ 5])*20 - (src[ 3]+src[ 6])*6 + (src[ 2]+src[ 7])*3 - (src[ 1]+src[ 8]);\ temp[ 5]= (src[ 5]+src[ 6])*20 - (src[ 4]+src[ 7])*6 + (src[ 3]+src[ 8])*3 - (src[ 2]+src[ 9]);\ temp[ 6]= (src[ 6]+src[ 7])*20 - (src[ 5]+src[ 8])*6 + (src[ 4]+src[ 9])*3 - (src[ 3]+src[10]);\ temp[ 7]= (src[ 7]+src[ 8])*20 - (src[ 6]+src[ 9])*6 + (src[ 5]+src[10])*3 - (src[ 4]+src[11]);\ temp[ 8]= (src[ 8]+src[ 9])*20 - (src[ 7]+src[10])*6 + (src[ 6]+src[11])*3 - (src[ 5]+src[12]);\ temp[ 9]= (src[ 9]+src[10])*20 - (src[ 8]+src[11])*6 + (src[ 7]+src[12])*3 - (src[ 6]+src[13]);\ temp[10]= (src[10]+src[11])*20 - (src[ 9]+src[12])*6 + (src[ 8]+src[13])*3 - (src[ 7]+src[14]);\ temp[11]= (src[11]+src[12])*20 - (src[10]+src[13])*6 + (src[ 9]+src[14])*3 - (src[ 8]+src[15]);\ temp[12]= (src[12]+src[13])*20 - (src[11]+src[14])*6 + (src[10]+src[15])*3 - (src[ 9]+src[16]);\ temp[13]= (src[13]+src[14])*20 - (src[12]+src[15])*6 + (src[11]+src[16])*3 - (src[10]+src[16]);\ temp[14]= (src[14]+src[15])*20 - (src[13]+src[16])*6 + (src[12]+src[16])*3 - (src[11]+src[15]);\ temp[15]= (src[15]+src[16])*20 - (src[14]+src[16])*6 + (src[13]+src[15])*3 - (src[12]+src[14]);\ __asm__ volatile(\ "movq (%0), %%mm0 \n\t"\ "movq 8(%0), %%mm1 \n\t"\ "paddw %2, %%mm0 \n\t"\ "paddw %2, %%mm1 \n\t"\ "psraw $5, %%mm0 \n\t"\ "psraw $5, %%mm1 \n\t"\ "packuswb %%mm1, %%mm0 \n\t"\ OP_3DNOW(%%mm0, (%1), %%mm1, q)\ "movq 16(%0), %%mm0 \n\t"\ "movq 24(%0), %%mm1 \n\t"\ "paddw %2, %%mm0 \n\t"\ "paddw %2, %%mm1 \n\t"\ "psraw $5, %%mm0 \n\t"\ "psraw $5, %%mm1 \n\t"\ "packuswb %%mm1, %%mm0 \n\t"\ OP_3DNOW(%%mm0, 8(%1), %%mm1, q)\ :: "r"(temp), "r"(dst), "m"(ROUNDER)\ : "memory"\ );\ dst+=dstStride;\ src+=srcStride;\ }\ }\ \ static void OPNAME ## <API key>(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\ __asm__ volatile(\ "pxor %%mm7, %%mm7 \n\t"\ "1: \n\t"\ "movq (%0), %%mm0 \n\t" /* ABCDEFGH */\ "movq %%mm0, %%mm1 \n\t" /* ABCDEFGH */\ "movq %%mm0, %%mm2 \n\t" /* ABCDEFGH */\ "punpcklbw %%mm7, %%mm0 \n\t" /* 0A0B0C0D */\ "punpckhbw %%mm7, %%mm1 \n\t" /* 0E0F0G0H */\ "pshufw $0x90, %%mm0, %%mm5 \n\t" /* 0A0A0B0C */\ "pshufw $0x41, %%mm0, %%mm6 \n\t" /* 0B0A0A0B */\ "movq %%mm2, %%mm3 \n\t" /* ABCDEFGH */\ "movq %%mm2, %%mm4 \n\t" /* ABCDEFGH */\ "psllq $8, %%mm2 \n\t" /* 0ABCDEFG */\ "psllq $16, %%mm3 \n\t" /* 00ABCDEF */\ "psllq $24, %%mm4 \n\t" /* 000ABCDE */\ "punpckhbw %%mm7, %%mm2 \n\t" /* 0D0E0F0G */\ "punpckhbw %%mm7, %%mm3 \n\t" /* 0C0D0E0F */\ "punpckhbw %%mm7, %%mm4 \n\t" /* 0B0C0D0E */\ "paddw %%mm3, %%mm5 \n\t" \ "paddw %%mm2, %%mm6 \n\t" \ "paddw %%mm5, %%mm5 \n\t" \ "psubw %%mm5, %%mm6 \n\t" /* c - 2b */\ "pshufw $0x06, %%mm0, %%mm5 \n\t" /* 0C0B0A0A */\ "pmullw "MANGLE(ff_pw_3)", %%mm6 \n\t" /* 3c - 6b */\ "paddw %%mm4, %%mm0 \n\t" \ "paddw %%mm1, %%mm5 \n\t" \ "pmullw "MANGLE(ff_pw_20)", %%mm0 \n\t" /* 20a */\ "psubw %%mm5, %%mm0 \n\t" /* 20a - d */\ "paddw %5, %%mm6 \n\t"\ "paddw %%mm6, %%mm0 \n\t" /* 20a - 6b + 3c - d */\ "psraw $5, %%mm0 \n\t"\ /* mm1=EFGH, mm2=DEFG, mm3=CDEF, mm4=BCDE, mm7=0 */\ \ "movd 5(%0), %%mm5 \n\t" /* FGHI */\ "punpcklbw %%mm7, %%mm5 \n\t" /* 0F0G0H0I */\ "pshufw $0xF9, %%mm5, %%mm6 \n\t" /* 0G0H0I0I */\ "paddw %%mm5, %%mm1 \n\t" \ "paddw %%mm6, %%mm2 \n\t" \ "pshufw $0xBE, %%mm5, %%mm6 \n\t" /* 0H0I0I0H */\ "pshufw $0x6F, %%mm5, %%mm5 \n\t" /* 0I0I0H0G */\ "paddw %%mm6, %%mm3 \n\t" \ "paddw %%mm5, %%mm4 \n\t" \ "paddw %%mm2, %%mm2 \n\t" \ "psubw %%mm2, %%mm3 \n\t" /* c - 2b */\ "pmullw "MANGLE(ff_pw_20)", %%mm1 \n\t" /* 20a */\ "pmullw "MANGLE(ff_pw_3)", %%mm3 \n\t" /* 3c - 6b */\ "psubw %%mm4, %%mm3 \n\t" /* -6b + 3c - d */\ "paddw %5, %%mm1 \n\t"\ "paddw %%mm1, %%mm3 \n\t" /* 20a - 6b + 3c - d */\ "psraw $5, %%mm3 \n\t"\ "packuswb %%mm3, %%mm0 \n\t"\ OP_MMX2(%%mm0, (%1), %%mm4, q)\ \ "add %3, %0 \n\t"\ "add %4, %1 \n\t"\ "decl %2 \n\t"\ " jnz 1b \n\t"\ : "+a"(src), "+c"(dst), "+d"(h)\ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER)\ : "memory"\ );\ }\ \ static void OPNAME ## <API key>(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\ int i;\ int16_t temp[8];\ /* quick HACK, XXX FIXME MUST be optimized */\ for(i=0; i<h; i++)\ {\ temp[ 0]= (src[ 0]+src[ 1])*20 - (src[ 0]+src[ 2])*6 + (src[ 1]+src[ 3])*3 - (src[ 2]+src[ 4]);\ temp[ 1]= (src[ 1]+src[ 2])*20 - (src[ 0]+src[ 3])*6 + (src[ 0]+src[ 4])*3 - (src[ 1]+src[ 5]);\ temp[ 2]= (src[ 2]+src[ 3])*20 - (src[ 1]+src[ 4])*6 + (src[ 0]+src[ 5])*3 - (src[ 0]+src[ 6]);\ temp[ 3]= (src[ 3]+src[ 4])*20 - (src[ 2]+src[ 5])*6 + (src[ 1]+src[ 6])*3 - (src[ 0]+src[ 7]);\ temp[ 4]= (src[ 4]+src[ 5])*20 - (src[ 3]+src[ 6])*6 + (src[ 2]+src[ 7])*3 - (src[ 1]+src[ 8]);\ temp[ 5]= (src[ 5]+src[ 6])*20 - (src[ 4]+src[ 7])*6 + (src[ 3]+src[ 8])*3 - (src[ 2]+src[ 8]);\ temp[ 6]= (src[ 6]+src[ 7])*20 - (src[ 5]+src[ 8])*6 + (src[ 4]+src[ 8])*3 - (src[ 3]+src[ 7]);\ temp[ 7]= (src[ 7]+src[ 8])*20 - (src[ 6]+src[ 8])*6 + (src[ 5]+src[ 7])*3 - (src[ 4]+src[ 6]);\ __asm__ volatile(\ "movq (%0), %%mm0 \n\t"\ "movq 8(%0), %%mm1 \n\t"\ "paddw %2, %%mm0 \n\t"\ "paddw %2, %%mm1 \n\t"\ "psraw $5, %%mm0 \n\t"\ "psraw $5, %%mm1 \n\t"\ "packuswb %%mm1, %%mm0 \n\t"\ OP_3DNOW(%%mm0, (%1), %%mm1, q)\ :: "r"(temp), "r"(dst), "m"(ROUNDER)\ :"memory"\ );\ dst+=dstStride;\ src+=srcStride;\ }\ } #define QPEL_OP(OPNAME, ROUNDER, RND, OP, MMX)\ \ static void OPNAME ## <API key> ## MMX(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ uint64_t temp[17*4];\ uint64_t *temp_ptr= temp;\ int count= 17;\ \ /*FIXME unroll */\ __asm__ volatile(\ "pxor %%mm7, %%mm7 \n\t"\ "1: \n\t"\ "movq (%0), %%mm0 \n\t"\ "movq (%0), %%mm1 \n\t"\ "movq 8(%0), %%mm2 \n\t"\ "movq 8(%0), %%mm3 \n\t"\ "punpcklbw %%mm7, %%mm0 \n\t"\ "punpckhbw %%mm7, %%mm1 \n\t"\ "punpcklbw %%mm7, %%mm2 \n\t"\ "punpckhbw %%mm7, %%mm3 \n\t"\ "movq %%mm0, (%1) \n\t"\ "movq %%mm1, 17*8(%1) \n\t"\ "movq %%mm2, 2*17*8(%1) \n\t"\ "movq %%mm3, 3*17*8(%1) \n\t"\ "add $8, %1 \n\t"\ "add %3, %0 \n\t"\ "decl %2 \n\t"\ " jnz 1b \n\t"\ : "+r" (src), "+r" (temp_ptr), "+r"(count)\ : "r" ((x86_reg)srcStride)\ : "memory"\ );\ \ temp_ptr= temp;\ count=4;\ \ /*FIXME reorder for speed */\ __asm__ volatile(\ /*"pxor %%mm7, %%mm7 \n\t"*/\ "1: \n\t"\ "movq (%0), %%mm0 \n\t"\ "movq 8(%0), %%mm1 \n\t"\ "movq 16(%0), %%mm2 \n\t"\ "movq 24(%0), %%mm3 \n\t"\ QPEL_V_LOW(%%mm0, %%mm1, %%mm2, %%mm3, %5, %6, %5, 16(%0), 8(%0), (%0), 32(%0), (%1), OP)\ QPEL_V_LOW(%%mm1, %%mm2, %%mm3, %%mm0, %5, %6, %5, 8(%0), (%0), (%0), 40(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm2, %%mm3, %%mm0, %%mm1, %5, %6, %5, (%0), (%0), 8(%0), 48(%0), (%1), OP)\ \ QPEL_V_LOW(%%mm3, %%mm0, %%mm1, %%mm2, %5, %6, %5, (%0), 8(%0), 16(%0), 56(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm0, %%mm1, %%mm2, %%mm3, %5, %6, %5, 8(%0), 16(%0), 24(%0), 64(%0), (%1), OP)\ QPEL_V_LOW(%%mm1, %%mm2, %%mm3, %%mm0, %5, %6, %5, 16(%0), 24(%0), 32(%0), 72(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm2, %%mm3, %%mm0, %%mm1, %5, %6, %5, 24(%0), 32(%0), 40(%0), 80(%0), (%1), OP)\ QPEL_V_LOW(%%mm3, %%mm0, %%mm1, %%mm2, %5, %6, %5, 32(%0), 40(%0), 48(%0), 88(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm0, %%mm1, %%mm2, %%mm3, %5, %6, %5, 40(%0), 48(%0), 56(%0), 96(%0), (%1), OP)\ QPEL_V_LOW(%%mm1, %%mm2, %%mm3, %%mm0, %5, %6, %5, 48(%0), 56(%0), 64(%0),104(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm2, %%mm3, %%mm0, %%mm1, %5, %6, %5, 56(%0), 64(%0), 72(%0),112(%0), (%1), OP)\ QPEL_V_LOW(%%mm3, %%mm0, %%mm1, %%mm2, %5, %6, %5, 64(%0), 72(%0), 80(%0),120(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm0, %%mm1, %%mm2, %%mm3, %5, %6, %5, 72(%0), 80(%0), 88(%0),128(%0), (%1), OP)\ \ QPEL_V_LOW(%%mm1, %%mm2, %%mm3, %%mm0, %5, %6, %5, 80(%0), 88(%0), 96(%0),128(%0), (%1, %3), OP)\ "add %4, %1 \n\t" \ QPEL_V_LOW(%%mm2, %%mm3, %%mm0, %%mm1, %5, %6, %5, 88(%0), 96(%0),104(%0),120(%0), (%1), OP)\ QPEL_V_LOW(%%mm3, %%mm0, %%mm1, %%mm2, %5, %6, %5, 96(%0),104(%0),112(%0),112(%0), (%1, %3), OP)\ \ "add $136, %0 \n\t"\ "add %6, %1 \n\t"\ "decl %2 \n\t"\ " jnz 1b \n\t"\ \ : "+r"(temp_ptr), "+r"(dst), "+g"(count)\ : "r"((x86_reg)dstStride), "r"(2*(x86_reg)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER), "g"(4-14*(x86_reg)dstStride)\ :"memory"\ );\ }\ \ static void OPNAME ## <API key> ## MMX(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ uint64_t temp[9*2];\ uint64_t *temp_ptr= temp;\ int count= 9;\ \ /*FIXME unroll */\ __asm__ volatile(\ "pxor %%mm7, %%mm7 \n\t"\ "1: \n\t"\ "movq (%0), %%mm0 \n\t"\ "movq (%0), %%mm1 \n\t"\ "punpcklbw %%mm7, %%mm0 \n\t"\ "punpckhbw %%mm7, %%mm1 \n\t"\ "movq %%mm0, (%1) \n\t"\ "movq %%mm1, 9*8(%1) \n\t"\ "add $8, %1 \n\t"\ "add %3, %0 \n\t"\ "decl %2 \n\t"\ " jnz 1b \n\t"\ : "+r" (src), "+r" (temp_ptr), "+r"(count)\ : "r" ((x86_reg)srcStride)\ : "memory"\ );\ \ temp_ptr= temp;\ count=2;\ \ /*FIXME reorder for speed */\ __asm__ volatile(\ /*"pxor %%mm7, %%mm7 \n\t"*/\ "1: \n\t"\ "movq (%0), %%mm0 \n\t"\ "movq 8(%0), %%mm1 \n\t"\ "movq 16(%0), %%mm2 \n\t"\ "movq 24(%0), %%mm3 \n\t"\ QPEL_V_LOW(%%mm0, %%mm1, %%mm2, %%mm3, %5, %6, %5, 16(%0), 8(%0), (%0), 32(%0), (%1), OP)\ QPEL_V_LOW(%%mm1, %%mm2, %%mm3, %%mm0, %5, %6, %5, 8(%0), (%0), (%0), 40(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm2, %%mm3, %%mm0, %%mm1, %5, %6, %5, (%0), (%0), 8(%0), 48(%0), (%1), OP)\ \ QPEL_V_LOW(%%mm3, %%mm0, %%mm1, %%mm2, %5, %6, %5, (%0), 8(%0), 16(%0), 56(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm0, %%mm1, %%mm2, %%mm3, %5, %6, %5, 8(%0), 16(%0), 24(%0), 64(%0), (%1), OP)\ \ QPEL_V_LOW(%%mm1, %%mm2, %%mm3, %%mm0, %5, %6, %5, 16(%0), 24(%0), 32(%0), 64(%0), (%1, %3), OP)\ "add %4, %1 \n\t"\ QPEL_V_LOW(%%mm2, %%mm3, %%mm0, %%mm1, %5, %6, %5, 24(%0), 32(%0), 40(%0), 56(%0), (%1), OP)\ QPEL_V_LOW(%%mm3, %%mm0, %%mm1, %%mm2, %5, %6, %5, 32(%0), 40(%0), 48(%0), 48(%0), (%1, %3), OP)\ \ "add $72, %0 \n\t"\ "add %6, %1 \n\t"\ "decl %2 \n\t"\ " jnz 1b \n\t"\ \ : "+r"(temp_ptr), "+r"(dst), "+g"(count)\ : "r"((x86_reg)dstStride), "r"(2*(x86_reg)dstStride), /*"m"(ff_pw_20), "m"(ff_pw_3),*/ "m"(ROUNDER), "g"(4-6*(x86_reg)dstStride)\ : "memory"\ );\ }\ \ static void OPNAME ## qpel8_mc00_ ## MMX (uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels8_ ## MMX(dst, src, stride, 8);\ }\ \ static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[8];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## <API key> ## MMX(half, src, 8, stride, 8);\ OPNAME ## pixels8_l2_ ## MMX(dst, src, half, stride, stride, 8);\ }\ \ static void OPNAME ## qpel8_mc20_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## <API key> ## MMX(dst, src, stride, stride, 8);\ }\ \ static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[8];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## <API key> ## MMX(half, src, 8, stride, 8);\ OPNAME ## pixels8_l2_ ## MMX(dst, src+1, half, stride, stride, 8);\ }\ \ static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[8];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## <API key> ## MMX(half, src, 8, stride);\ OPNAME ## pixels8_l2_ ## MMX(dst, src, half, stride, stride, 8);\ }\ \ static void OPNAME ## qpel8_mc02_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## <API key> ## MMX(dst, src, stride, stride);\ }\ \ static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[8];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## <API key> ## MMX(half, src, 8, stride);\ OPNAME ## pixels8_l2_ ## MMX(dst, src+stride, half, stride, stride, 8);\ }\ static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, stride, 9);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, stride, 8, 8);\ }\ static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## pixels8_l2_ ## MMX(halfH, src+1, halfH, 8, stride, 9);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, stride, 8, 8);\ }\ static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, stride, 9);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_ ## MMX(dst, halfH+8, halfHV, stride, 8, 8);\ }\ static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## pixels8_l2_ ## MMX(halfH, src+1, halfH, 8, stride, 9);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_ ## MMX(dst, halfH+8, halfHV, stride, 8, 8);\ }\ static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, stride, 8, 8);\ }\ static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_ ## MMX(dst, halfH+8, halfHV, stride, 8, 8);\ }\ static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, stride, 9);\ OPNAME ## <API key> ## MMX(dst, halfH, stride, 8);\ }\ static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## pixels8_l2_ ## MMX(halfH, src+1, halfH, 8, stride, 9);\ OPNAME ## <API key> ## MMX(dst, halfH, stride, 8);\ }\ static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[9];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 8, stride, 9);\ OPNAME ## <API key> ## MMX(dst, halfH, stride, 8);\ }\ static void OPNAME ## qpel16_mc00_ ## MMX (uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels16_ ## MMX(dst, src, stride, 16);\ }\ \ static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[32];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## <API key> ## MMX(half, src, 16, stride, 16);\ OPNAME ## pixels16_l2_ ## MMX(dst, src, half, stride, stride, 16);\ }\ \ static void OPNAME ## qpel16_mc20_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## <API key> ## MMX(dst, src, stride, stride, 16);\ }\ \ static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[32];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## <API key> ## MMX(half, src, 16, stride, 16);\ OPNAME ## pixels16_l2_ ## MMX(dst, src+1, half, stride, stride, 16);\ }\ \ static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[32];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## <API key> ## MMX(half, src, 16, stride);\ OPNAME ## pixels16_l2_ ## MMX(dst, src, half, stride, stride, 16);\ }\ \ static void OPNAME ## qpel16_mc02_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## <API key> ## MMX(dst, src, stride, stride);\ }\ \ static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[32];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## <API key> ## MMX(half, src, 16, stride);\ OPNAME ## pixels16_l2_ ## MMX(dst, src+stride, half, stride, stride, 16);\ }\ static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, stride, 17);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, stride, 16, 16);\ }\ static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## pixels16_l2_ ## MMX(halfH, src+1, halfH, 16, stride, 17);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, stride, 16, 16);\ }\ static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, stride, 17);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_ ## MMX(dst, halfH+16, halfHV, stride, 16, 16);\ }\ static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## pixels16_l2_ ## MMX(halfH, src+1, halfH, 16, stride, 17);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_ ## MMX(dst, halfH+16, halfHV, stride, 16, 16);\ }\ static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, stride, 16, 16);\ }\ static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## <API key> ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_ ## MMX(dst, halfH+16, halfHV, stride, 16, 16);\ }\ static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[17*2];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, stride, 17);\ OPNAME ## <API key> ## MMX(dst, halfH, stride, 16);\ }\ static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[17*2];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## pixels16_l2_ ## MMX(halfH, src+1, halfH, 16, stride, 17);\ OPNAME ## <API key> ## MMX(dst, halfH, stride, 16);\ }\ static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[17*2];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## <API key> ## MMX(halfH, src, 16, stride, 17);\ OPNAME ## <API key> ## MMX(dst, halfH, stride, 16);\ } #define PUT_OP(a,b,temp, size) "mov" #size " " #a ", " #b " \n\t" #define AVG_3DNOW_OP(a,b,temp, size) \ "mov" #size " " #b ", " #temp " \n\t"\ "pavgusb " #temp ", " #a " \n\t"\ "mov" #size " " #a ", " #b " \n\t" #define AVG_MMX2_OP(a,b,temp, size) \ "mov" #size " " #b ", " #temp " \n\t"\ "pavgb " #temp ", " #a " \n\t"\ "mov" #size " " #a ", " #b " \n\t" QPEL_BASE(put_ , ff_pw_16, _ , PUT_OP, PUT_OP) QPEL_BASE(avg_ , ff_pw_16, _ , AVG_MMX2_OP, AVG_3DNOW_OP) QPEL_BASE(put_no_rnd_, ff_pw_15, _no_rnd_, PUT_OP, PUT_OP) QPEL_OP(put_ , ff_pw_16, _ , PUT_OP, 3dnow) QPEL_OP(avg_ , ff_pw_16, _ , AVG_3DNOW_OP, 3dnow) QPEL_OP(put_no_rnd_, ff_pw_15, _no_rnd_, PUT_OP, 3dnow) QPEL_OP(put_ , ff_pw_16, _ , PUT_OP, mmx2) QPEL_OP(avg_ , ff_pw_16, _ , AVG_MMX2_OP, mmx2) QPEL_OP(put_no_rnd_, ff_pw_15, _no_rnd_, PUT_OP, mmx2) /* bilinear qpel: not compliant to any spec, only for -lavdopts fast */ #define QPEL_2TAP_XY(OPNAME, SIZE, MMX, XY, HPEL)\ static void OPNAME ## 2tap_qpel ## SIZE ## _mc ## XY ## _ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels ## SIZE ## HPEL(dst, src, stride, SIZE);\ } #define QPEL_2TAP_L3(OPNAME, SIZE, MMX, XY, S0, S1, S2)\ static void OPNAME ## 2tap_qpel ## SIZE ## _mc ## XY ## _ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## 2tap_qpel ## SIZE ## _l3_ ## MMX(dst, src+S0, stride, SIZE, S1, S2);\ } #define QPEL_2TAP(OPNAME, SIZE, MMX)\ QPEL_2TAP_XY(OPNAME, SIZE, MMX, 20, _x2_ ## MMX)\ QPEL_2TAP_XY(OPNAME, SIZE, MMX, 02, _y2_ ## MMX)\ QPEL_2TAP_XY(OPNAME, SIZE, MMX, 22, _xy2_mmx)\ static const qpel_mc_func OPNAME ## 2tap_qpel ## SIZE ## _mc00_ ## MMX =\ OPNAME ## qpel ## SIZE ## _mc00_ ## MMX;\ static const qpel_mc_func OPNAME ## 2tap_qpel ## SIZE ## _mc21_ ## MMX =\ OPNAME ## 2tap_qpel ## SIZE ## _mc20_ ## MMX;\ static const qpel_mc_func OPNAME ## 2tap_qpel ## SIZE ## _mc12_ ## MMX =\ OPNAME ## 2tap_qpel ## SIZE ## _mc02_ ## MMX;\ static void OPNAME ## 2tap_qpel ## SIZE ## _mc32_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels ## SIZE ## _y2_ ## MMX(dst, src+1, stride, SIZE);\ }\ static void OPNAME ## 2tap_qpel ## SIZE ## _mc23_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels ## SIZE ## _x2_ ## MMX(dst, src+stride, stride, SIZE);\ }\ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 10, 0, 1, 0)\ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 30, 1, -1, 0)\ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 01, 0, stride, 0)\ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 03, stride, -stride, 0)\ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 11, 0, stride, 1)\ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 31, 1, stride, -1)\ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 13, stride, -stride, 1)\ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 33, stride+1, -stride, -1)\ QPEL_2TAP(put_, 16, mmx2) QPEL_2TAP(avg_, 16, mmx2) QPEL_2TAP(put_, 8, mmx2) QPEL_2TAP(avg_, 8, mmx2) QPEL_2TAP(put_, 16, 3dnow) QPEL_2TAP(avg_, 16, 3dnow) QPEL_2TAP(put_, 8, 3dnow) QPEL_2TAP(avg_, 8, 3dnow) #if 0 static void just_return(void) { return; } #endif static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height){ const int w = 8; const int ix = ox>>(16+shift); const int iy = oy>>(16+shift); const int oxs = ox>>4; const int oys = oy>>4; const int dxxs = dxx>>4; const int dxys = dxy>>4; const int dyxs = dyx>>4; const int dyys = dyy>>4; const uint16_t r4[4] = {r,r,r,r}; const uint16_t dxy4[4] = {dxys,dxys,dxys,dxys}; const uint16_t dyy4[4] = {dyys,dyys,dyys,dyys}; const uint64_t shift2 = 2*shift; uint8_t edge_buf[(h+1)*stride]; int x, y; const int dxw = (dxx-(1<<(16+shift)))*(w-1); const int dyh = (dyy-(1<<(16+shift)))*(h-1); const int dxh = dxy*(h-1); const int dyw = dyx*(w-1); if( // non-constant fullpel offset (3% of blocks) ((ox^(ox+dxw)) | (ox^(ox+dxh)) | (ox^(ox+dxw+dxh)) | (oy^(oy+dyw)) | (oy^(oy+dyh)) | (oy^(oy+dyw+dyh))) >> (16+shift) // uses more than 16 bits of subpel mv (only at huge resolution) || (dxx|dxy|dyx|dyy)&15 ) { //FIXME could still use mmx for some of the rows ff_gmc_c(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy, shift, r, width, height); return; } src += ix + iy*stride; if( (unsigned)ix >= width-w || (unsigned)iy >= height-h ) { ff_emulated_edge_mc(edge_buf, src, stride, w+1, h+1, ix, iy, width, height); src = edge_buf; } __asm__ volatile( "movd %0, %%mm6 \n\t" "pxor %%mm7, %%mm7 \n\t" "punpcklwd %%mm6, %%mm6 \n\t" "punpcklwd %%mm6, %%mm6 \n\t" :: "r"(1<<shift) ); for(x=0; x<w; x+=4){ uint16_t dx4[4] = { oxs - dxys + dxxs*(x+0), oxs - dxys + dxxs*(x+1), oxs - dxys + dxxs*(x+2), oxs - dxys + dxxs*(x+3) }; uint16_t dy4[4] = { oys - dyys + dyxs*(x+0), oys - dyys + dyxs*(x+1), oys - dyys + dyxs*(x+2), oys - dyys + dyxs*(x+3) }; for(y=0; y<h; y++){ __asm__ volatile( "movq %0, %%mm4 \n\t" "movq %1, %%mm5 \n\t" "paddw %2, %%mm4 \n\t" "paddw %3, %%mm5 \n\t" "movq %%mm4, %0 \n\t" "movq %%mm5, %1 \n\t" "psrlw $12, %%mm4 \n\t" "psrlw $12, %%mm5 \n\t" : "+m"(*dx4), "+m"(*dy4) : "m"(*dxy4), "m"(*dyy4) ); __asm__ volatile( "movq %%mm6, %%mm2 \n\t" "movq %%mm6, %%mm1 \n\t" "psubw %%mm4, %%mm2 \n\t" "psubw %%mm5, %%mm1 \n\t" "movq %%mm2, %%mm0 \n\t" "movq %%mm4, %%mm3 \n\t" "pmullw %%mm1, %%mm0 \n\t" // (s-dx)*(s-dy) "pmullw %%mm5, %%mm3 \n\t" // dx*dy "pmullw %%mm5, %%mm2 \n\t" // (s-dx)*dy "pmullw %%mm4, %%mm1 \n\t" // dx*(s-dy) "movd %4, %%mm5 \n\t" "movd %3, %%mm4 \n\t" "punpcklbw %%mm7, %%mm5 \n\t" "punpcklbw %%mm7, %%mm4 \n\t" "pmullw %%mm5, %%mm3 \n\t" // src[1,1] * dx*dy "pmullw %%mm4, %%mm2 \n\t" // src[0,1] * (s-dx)*dy "movd %2, %%mm5 \n\t" "movd %1, %%mm4 \n\t" "punpcklbw %%mm7, %%mm5 \n\t" "punpcklbw %%mm7, %%mm4 \n\t" "pmullw %%mm5, %%mm1 \n\t" // src[1,0] * dx*(s-dy) "pmullw %%mm4, %%mm0 \n\t" // src[0,0] * (s-dx)*(s-dy) "paddw %5, %%mm1 \n\t" "paddw %%mm3, %%mm2 \n\t" "paddw %%mm1, %%mm0 \n\t" "paddw %%mm2, %%mm0 \n\t" "psrlw %6, %%mm0 \n\t" "packuswb %%mm0, %%mm0 \n\t" "movd %%mm0, %0 \n\t" : "=m"(dst[x+y*stride]) : "m"(src[0]), "m"(src[1]), "m"(src[stride]), "m"(src[stride+1]), "m"(*r4), "m"(shift2) ); src += stride; } src += 4-h*stride; } } #define PREFETCH(name, op) \ static void name(void *mem, int stride, int h){\ const uint8_t *p= mem;\ do{\ __asm__ volatile(#op" %0" :: "m"(*p));\ p+= stride;\ }while(--h);\ } PREFETCH(prefetch_mmx2, prefetcht0) PREFETCH(prefetch_3dnow, prefetch) #undef PREFETCH #include "h264dsp_mmx.c" #include "rv40dsp_mmx.c" /* CAVS specific */ void <API key>(uint8_t *dst, uint8_t *src, int stride) { put_pixels8_mmx(dst, src, stride, 8); } void <API key>(uint8_t *dst, uint8_t *src, int stride) { avg_pixels8_mmx(dst, src, stride, 8); } void <API key>(uint8_t *dst, uint8_t *src, int stride) { put_pixels16_mmx(dst, src, stride, 16); } void <API key>(uint8_t *dst, uint8_t *src, int stride) { avg_pixels16_mmx(dst, src, stride, 16); } /* VC1 specific */ void <API key>(uint8_t *dst, const uint8_t *src, int stride, int rnd) { put_pixels8_mmx(dst, src, stride, 8); } void <API key>(uint8_t *dst, const uint8_t *src, int stride, int rnd) { avg_pixels8_mmx2(dst, src, stride, 8); } /* XXX: those functions should be suppressed ASAP when all IDCTs are converted */ #if CONFIG_GPL static void <API key>(uint8_t *dest, int line_size, DCTELEM *block) { ff_mmx_idct (block); <API key>(block, dest, line_size); } static void <API key>(uint8_t *dest, int line_size, DCTELEM *block) { ff_mmx_idct (block); <API key>(block, dest, line_size); } static void <API key>(uint8_t *dest, int line_size, DCTELEM *block) { ff_mmxext_idct (block); <API key>(block, dest, line_size); } static void <API key>(uint8_t *dest, int line_size, DCTELEM *block) { ff_mmxext_idct (block); <API key>(block, dest, line_size); } #endif static void <API key>(uint8_t *dest, int line_size, DCTELEM *block) { ff_idct_xvid_mmx (block); <API key>(block, dest, line_size); } static void <API key>(uint8_t *dest, int line_size, DCTELEM *block) { ff_idct_xvid_mmx (block); <API key>(block, dest, line_size); } static void <API key>(uint8_t *dest, int line_size, DCTELEM *block) { ff_idct_xvid_mmx2 (block); <API key>(block, dest, line_size); } static void <API key>(uint8_t *dest, int line_size, DCTELEM *block) { ff_idct_xvid_mmx2 (block); <API key>(block, dest, line_size); } static void <API key>(float *mag, float *ang, int blocksize) { int i; __asm__ volatile("pxor %%mm7, %%mm7":); for(i=0; i<blocksize; i+=2) { __asm__ volatile( "movq %0, %%mm0 \n\t" "movq %1, %%mm1 \n\t" "movq %%mm0, %%mm2 \n\t" "movq %%mm1, %%mm3 \n\t" "pfcmpge %%mm7, %%mm2 \n\t" // m <= 0.0 "pfcmpge %%mm7, %%mm3 \n\t" // a <= 0.0 "pslld $31, %%mm2 \n\t" // keep only the sign bit "pxor %%mm2, %%mm1 \n\t" "movq %%mm3, %%mm4 \n\t" "pand %%mm1, %%mm3 \n\t" "pandn %%mm1, %%mm4 \n\t" "pfadd %%mm0, %%mm3 \n\t" // a = m + ((a<0) & (a ^ sign(m))) "pfsub %%mm4, %%mm0 \n\t" // m = m + ((a>0) & (a ^ sign(m))) "movq %%mm3, %1 \n\t" "movq %%mm0, %0 \n\t" :"+m"(mag[i]), "+m"(ang[i]) ::"memory" ); } __asm__ volatile("femms"); } static void <API key>(float *mag, float *ang, int blocksize) { int i; __asm__ volatile( "movaps %0, %%xmm5 \n\t" ::"m"(ff_pdw_80000000[0]) ); for(i=0; i<blocksize; i+=4) { __asm__ volatile( "movaps %0, %%xmm0 \n\t" "movaps %1, %%xmm1 \n\t" "xorps %%xmm2, %%xmm2 \n\t" "xorps %%xmm3, %%xmm3 \n\t" "cmpleps %%xmm0, %%xmm2 \n\t" // m <= 0.0 "cmpleps %%xmm1, %%xmm3 \n\t" // a <= 0.0 "andps %%xmm5, %%xmm2 \n\t" // keep only the sign bit "xorps %%xmm2, %%xmm1 \n\t" "movaps %%xmm3, %%xmm4 \n\t" "andps %%xmm1, %%xmm3 \n\t" "andnps %%xmm1, %%xmm4 \n\t" "addps %%xmm0, %%xmm3 \n\t" // a = m + ((a<0) & (a ^ sign(m))) "subps %%xmm4, %%xmm0 \n\t" // m = m + ((a>0) & (a ^ sign(m))) "movaps %%xmm3, %1 \n\t" "movaps %%xmm0, %0 \n\t" :"+m"(mag[i]), "+m"(ang[i]) ::"memory" ); } } #define IF1(x) x #define IF0(x) #define MIX5(mono,stereo)\ __asm__ volatile(\ "movss 0(%2), %%xmm5 \n"\ "movss 8(%2), %%xmm6 \n"\ "movss 24(%2), %%xmm7 \n"\ "shufps $0, %%xmm5, %%xmm5 \n"\ "shufps $0, %%xmm6, %%xmm6 \n"\ "shufps $0, %%xmm7, %%xmm7 \n"\ "1: \n"\ "movaps (%0,%1), %%xmm0 \n"\ "movaps 0x400(%0,%1), %%xmm1 \n"\ "movaps 0x800(%0,%1), %%xmm2 \n"\ "movaps 0xc00(%0,%1), %%xmm3 \n"\ "movaps 0x1000(%0,%1), %%xmm4 \n"\ "mulps %%xmm5, %%xmm0 \n"\ "mulps %%xmm6, %%xmm1 \n"\ "mulps %%xmm5, %%xmm2 \n"\ "mulps %%xmm7, %%xmm3 \n"\ "mulps %%xmm7, %%xmm4 \n"\ stereo("addps %%xmm1, %%xmm0 \n")\ "addps %%xmm1, %%xmm2 \n"\ "addps %%xmm3, %%xmm0 \n"\ "addps %%xmm4, %%xmm2 \n"\ mono("addps %%xmm2, %%xmm0 \n")\ "movaps %%xmm0, (%0,%1) \n"\ stereo("movaps %%xmm2, 0x400(%0,%1) \n")\ "add $16, %0 \n"\ "jl 1b \n"\ :"+&r"(i)\ :"r"(samples[0]+len), "r"(matrix)\ :"memory"\ ); #define MIX_MISC(stereo)\ __asm__ volatile(\ "1: \n"\ "movaps (%3,%0), %%xmm0 \n"\ stereo("movaps %%xmm0, %%xmm1 \n")\ "mulps %%xmm6, %%xmm0 \n"\ stereo("mulps %%xmm7, %%xmm1 \n")\ "lea 1024(%3,%0), %1 \n"\ "mov %5, %2 \n"\ "2: \n"\ "movaps (%1), %%xmm2 \n"\ stereo("movaps %%xmm2, %%xmm3 \n")\ "mulps (%4,%2), %%xmm2 \n"\ stereo("mulps 16(%4,%2), %%xmm3 \n")\ "addps %%xmm2, %%xmm0 \n"\ stereo("addps %%xmm3, %%xmm1 \n")\ "add $1024, %1 \n"\ "add $32, %2 \n"\ "jl 2b \n"\ "movaps %%xmm0, (%3,%0) \n"\ stereo("movaps %%xmm1, 1024(%3,%0) \n")\ "add $16, %0 \n"\ "jl 1b \n"\ :"+&r"(i), "=&r"(j), "=&r"(k)\ :"r"(samples[0]+len), "r"(matrix_simd+in_ch), "g"((intptr_t)-32*(in_ch-1))\ :"memory"\ ); static void ac3_downmix_sse(float (*samples)[256], float (*matrix)[2], int out_ch, int in_ch, int len) { int (*matrix_cmp)[2] = (int(*)[2])matrix; intptr_t i,j,k; i = -len*sizeof(float); if(in_ch == 5 && out_ch == 2 && !(matrix_cmp[0][1]|matrix_cmp[2][0]|matrix_cmp[3][1]|matrix_cmp[4][0]|(matrix_cmp[1][0]^matrix_cmp[1][1])|(matrix_cmp[0][0]^matrix_cmp[2][1]))) { MIX5(IF0,IF1); } else if(in_ch == 5 && out_ch == 1 && matrix_cmp[0][0]==matrix_cmp[2][0] && matrix_cmp[3][0]==matrix_cmp[4][0]) { MIX5(IF1,IF0); } else { DECLARE_ALIGNED(16, float, matrix_simd)[in_ch][2][4]; j = 2*in_ch*sizeof(float); __asm__ volatile( "1: \n" "sub $8, %0 \n" "movss (%2,%0), %%xmm6 \n" "movss 4(%2,%0), %%xmm7 \n" "shufps $0, %%xmm6, %%xmm6 \n" "shufps $0, %%xmm7, %%xmm7 \n" "movaps %%xmm6, (%1,%0,4) \n" "movaps %%xmm7, 16(%1,%0,4) \n" "jg 1b \n" :"+&r"(j) :"r"(matrix_simd), "r"(matrix) :"memory" ); if(out_ch == 2) { MIX_MISC(IF1); } else { MIX_MISC(IF0); } } } static void vector_fmul_3dnow(float *dst, const float *src, int len){ x86_reg i = (len-4)*4; __asm__ volatile( "1: \n\t" "movq (%1,%0), %%mm0 \n\t" "movq 8(%1,%0), %%mm1 \n\t" "pfmul (%2,%0), %%mm0 \n\t" "pfmul 8(%2,%0), %%mm1 \n\t" "movq %%mm0, (%1,%0) \n\t" "movq %%mm1, 8(%1,%0) \n\t" "sub $16, %0 \n\t" "jge 1b \n\t" "femms \n\t" :"+r"(i) :"r"(dst), "r"(src) :"memory" ); } static void vector_fmul_sse(float *dst, const float *src, int len){ x86_reg i = (len-8)*4; __asm__ volatile( "1: \n\t" "movaps (%1,%0), %%xmm0 \n\t" "movaps 16(%1,%0), %%xmm1 \n\t" "mulps (%2,%0), %%xmm0 \n\t" "mulps 16(%2,%0), %%xmm1 \n\t" "movaps %%xmm0, (%1,%0) \n\t" "movaps %%xmm1, 16(%1,%0) \n\t" "sub $32, %0 \n\t" "jge 1b \n\t" :"+r"(i) :"r"(dst), "r"(src) :"memory" ); } static void <API key>(float *dst, const float *src0, const float *src1, int len){ x86_reg i = len*4-16; __asm__ volatile( "1: \n\t" "pswapd 8(%1), %%mm0 \n\t" "pswapd (%1), %%mm1 \n\t" "pfmul (%3,%0), %%mm0 \n\t" "pfmul 8(%3,%0), %%mm1 \n\t" "movq %%mm0, (%2,%0) \n\t" "movq %%mm1, 8(%2,%0) \n\t" "add $16, %1 \n\t" "sub $16, %0 \n\t" "jge 1b \n\t" :"+r"(i), "+r"(src1) :"r"(dst), "r"(src0) ); __asm__ volatile("femms"); } static void <API key>(float *dst, const float *src0, const float *src1, int len){ x86_reg i = len*4-32; __asm__ volatile( "1: \n\t" "movaps 16(%1), %%xmm0 \n\t" "movaps (%1), %%xmm1 \n\t" "shufps $0x1b, %%xmm0, %%xmm0 \n\t" "shufps $0x1b, %%xmm1, %%xmm1 \n\t" "mulps (%3,%0), %%xmm0 \n\t" "mulps 16(%3,%0), %%xmm1 \n\t" "movaps %%xmm0, (%2,%0) \n\t" "movaps %%xmm1, 16(%2,%0) \n\t" "add $32, %1 \n\t" "sub $32, %0 \n\t" "jge 1b \n\t" :"+r"(i), "+r"(src1) :"r"(dst), "r"(src0) ); } static void <API key>(float *dst, const float *src0, const float *src1, const float *src2, int len){ x86_reg i = (len-4)*4; __asm__ volatile( "1: \n\t" "movq (%2,%0), %%mm0 \n\t" "movq 8(%2,%0), %%mm1 \n\t" "pfmul (%3,%0), %%mm0 \n\t" "pfmul 8(%3,%0), %%mm1 \n\t" "pfadd (%4,%0), %%mm0 \n\t" "pfadd 8(%4,%0), %%mm1 \n\t" "movq %%mm0, (%1,%0) \n\t" "movq %%mm1, 8(%1,%0) \n\t" "sub $16, %0 \n\t" "jge 1b \n\t" :"+r"(i) :"r"(dst), "r"(src0), "r"(src1), "r"(src2) :"memory" ); __asm__ volatile("femms"); } static void vector_fmul_add_sse(float *dst, const float *src0, const float *src1, const float *src2, int len){ x86_reg i = (len-8)*4; __asm__ volatile( "1: \n\t" "movaps (%2,%0), %%xmm0 \n\t" "movaps 16(%2,%0), %%xmm1 \n\t" "mulps (%3,%0), %%xmm0 \n\t" "mulps 16(%3,%0), %%xmm1 \n\t" "addps (%4,%0), %%xmm0 \n\t" "addps 16(%4,%0), %%xmm1 \n\t" "movaps %%xmm0, (%1,%0) \n\t" "movaps %%xmm1, 16(%1,%0) \n\t" "sub $32, %0 \n\t" "jge 1b \n\t" :"+r"(i) :"r"(dst), "r"(src0), "r"(src1), "r"(src2) :"memory" ); } static void <API key>(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len){ #if HAVE_6REGS if(add_bias == 0){ x86_reg i = -len*4; x86_reg j = len*4-8; __asm__ volatile( "1: \n" "pswapd (%5,%1), %%mm1 \n" "movq (%5,%0), %%mm0 \n" "pswapd (%4,%1), %%mm5 \n" "movq (%3,%0), %%mm4 \n" "movq %%mm0, %%mm2 \n" "movq %%mm1, %%mm3 \n" "pfmul %%mm4, %%mm2 \n" // src0[len+i]*win[len+i] "pfmul %%mm5, %%mm3 \n" // src1[ j]*win[len+j] "pfmul %%mm4, %%mm1 \n" // src0[len+i]*win[len+j] "pfmul %%mm5, %%mm0 \n" // src1[ j]*win[len+i] "pfadd %%mm3, %%mm2 \n" "pfsub %%mm0, %%mm1 \n" "pswapd %%mm2, %%mm2 \n" "movq %%mm1, (%2,%0) \n" "movq %%mm2, (%2,%1) \n" "sub $8, %1 \n" "add $8, %0 \n" "jl 1b \n" "femms \n" :"+r"(i), "+r"(j) :"r"(dst+len), "r"(src0+len), "r"(src1), "r"(win+len) ); }else #endif <API key>(dst, src0, src1, win, add_bias, len); } static void <API key>(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len){ #if HAVE_6REGS if(add_bias == 0){ x86_reg i = -len*4; x86_reg j = len*4-16; __asm__ volatile( "1: \n" "movaps (%5,%1), %%xmm1 \n" "movaps (%5,%0), %%xmm0 \n" "movaps (%4,%1), %%xmm5 \n" "movaps (%3,%0), %%xmm4 \n" "shufps $0x1b, %%xmm1, %%xmm1 \n" "shufps $0x1b, %%xmm5, %%xmm5 \n" "movaps %%xmm0, %%xmm2 \n" "movaps %%xmm1, %%xmm3 \n" "mulps %%xmm4, %%xmm2 \n" // src0[len+i]*win[len+i] "mulps %%xmm5, %%xmm3 \n" // src1[ j]*win[len+j] "mulps %%xmm4, %%xmm1 \n" // src0[len+i]*win[len+j] "mulps %%xmm5, %%xmm0 \n" // src1[ j]*win[len+i] "addps %%xmm3, %%xmm2 \n" "subps %%xmm0, %%xmm1 \n" "shufps $0x1b, %%xmm2, %%xmm2 \n" "movaps %%xmm1, (%2,%0) \n" "movaps %%xmm2, (%2,%1) \n" "sub $16, %1 \n" "add $16, %0 \n" "jl 1b \n" :"+r"(i), "+r"(j) :"r"(dst+len), "r"(src0+len), "r"(src1), "r"(win+len) ); }else #endif <API key>(dst, src0, src1, win, add_bias, len); } static void <API key>(float *dst, const int *src, float mul, int len) { x86_reg i = -4*len; __asm__ volatile( "movss %3, %%xmm4 \n" "shufps $0, %%xmm4, %%xmm4 \n" "1: \n" "cvtpi2ps (%2,%0), %%xmm0 \n" "cvtpi2ps 8(%2,%0), %%xmm1 \n" "cvtpi2ps 16(%2,%0), %%xmm2 \n" "cvtpi2ps 24(%2,%0), %%xmm3 \n" "movlhps %%xmm1, %%xmm0 \n" "movlhps %%xmm3, %%xmm2 \n" "mulps %%xmm4, %%xmm0 \n" "mulps %%xmm4, %%xmm2 \n" "movaps %%xmm0, (%1,%0) \n" "movaps %%xmm2, 16(%1,%0) \n" "add $32, %0 \n" "jl 1b \n" :"+r"(i) :"r"(dst+len), "r"(src+len), "m"(mul) ); } static void <API key>(float *dst, const int *src, float mul, int len) { x86_reg i = -4*len; __asm__ volatile( "movss %3, %%xmm4 \n" "shufps $0, %%xmm4, %%xmm4 \n" "1: \n" "cvtdq2ps (%2,%0), %%xmm0 \n" "cvtdq2ps 16(%2,%0), %%xmm1 \n" "mulps %%xmm4, %%xmm0 \n" "mulps %%xmm4, %%xmm1 \n" "movaps %%xmm0, (%1,%0) \n" "movaps %%xmm1, 16(%1,%0) \n" "add $32, %0 \n" "jl 1b \n" :"+r"(i) :"r"(dst+len), "r"(src+len), "m"(mul) ); } static void vector_clipf_sse(float *dst, const float *src, float min, float max, int len) { x86_reg i = (len-16)*4; __asm__ volatile( "movss %3, %%xmm4 \n" "movss %4, %%xmm5 \n" "shufps $0, %%xmm4, %%xmm4 \n" "shufps $0, %%xmm5, %%xmm5 \n" "1: \n\t" "movaps (%2,%0), %%xmm0 \n\t" // 3/1 on intel "movaps 16(%2,%0), %%xmm1 \n\t" "movaps 32(%2,%0), %%xmm2 \n\t" "movaps 48(%2,%0), %%xmm3 \n\t" "maxps %%xmm4, %%xmm0 \n\t" "maxps %%xmm4, %%xmm1 \n\t" "maxps %%xmm4, %%xmm2 \n\t" "maxps %%xmm4, %%xmm3 \n\t" "minps %%xmm5, %%xmm0 \n\t" "minps %%xmm5, %%xmm1 \n\t" "minps %%xmm5, %%xmm2 \n\t" "minps %%xmm5, %%xmm3 \n\t" "movaps %%xmm0, (%1,%0) \n\t" "movaps %%xmm1, 16(%1,%0) \n\t" "movaps %%xmm2, 32(%1,%0) \n\t" "movaps %%xmm3, 48(%1,%0) \n\t" "sub $64, %0 \n\t" "jge 1b \n\t" :"+&r"(i) :"r"(dst), "r"(src), "m"(min), "m"(max) :"memory" ); } static void <API key>(int16_t *dst, const float *src, long len){ x86_reg reglen = len; // not bit-exact: pf2id uses different rounding than C and SSE __asm__ volatile( "add %0 , %0 \n\t" "lea (%2,%0,2) , %2 \n\t" "add %0 , %1 \n\t" "neg %0 \n\t" "1: \n\t" "pf2id (%2,%0,2) , %%mm0 \n\t" "pf2id 8(%2,%0,2) , %%mm1 \n\t" "pf2id 16(%2,%0,2) , %%mm2 \n\t" "pf2id 24(%2,%0,2) , %%mm3 \n\t" "packssdw %%mm1 , %%mm0 \n\t" "packssdw %%mm3 , %%mm2 \n\t" "movq %%mm0 , (%1,%0) \n\t" "movq %%mm2 , 8(%1,%0) \n\t" "add $16 , %0 \n\t" " js 1b \n\t" "femms \n\t" :"+r"(reglen), "+r"(dst), "+r"(src) ); } static void float_to_int16_sse(int16_t *dst, const float *src, long len){ x86_reg reglen = len; __asm__ volatile( "add %0 , %0 \n\t" "lea (%2,%0,2) , %2 \n\t" "add %0 , %1 \n\t" "neg %0 \n\t" "1: \n\t" "cvtps2pi (%2,%0,2) , %%mm0 \n\t" "cvtps2pi 8(%2,%0,2) , %%mm1 \n\t" "cvtps2pi 16(%2,%0,2) , %%mm2 \n\t" "cvtps2pi 24(%2,%0,2) , %%mm3 \n\t" "packssdw %%mm1 , %%mm0 \n\t" "packssdw %%mm3 , %%mm2 \n\t" "movq %%mm0 , (%1,%0) \n\t" "movq %%mm2 , 8(%1,%0) \n\t" "add $16 , %0 \n\t" " js 1b \n\t" "emms \n\t" :"+r"(reglen), "+r"(dst), "+r"(src) ); } static void float_to_int16_sse2(int16_t *dst, const float *src, long len){ x86_reg reglen = len; __asm__ volatile( "add %0 , %0 \n\t" "lea (%2,%0,2) , %2 \n\t" "add %0 , %1 \n\t" "neg %0 \n\t" "1: \n\t" "cvtps2dq (%2,%0,2) , %%xmm0 \n\t" "cvtps2dq 16(%2,%0,2) , %%xmm1 \n\t" "packssdw %%xmm1 , %%xmm0 \n\t" "movdqa %%xmm0 , (%1,%0) \n\t" "add $16 , %0 \n\t" " js 1b \n\t" :"+r"(reglen), "+r"(dst), "+r"(src) ); } void <API key>(int16_t *dst, const float **src, int len); void <API key>(int16_t *dst, const float **src, int len); void <API key>(int16_t *dst, const float **src, int len); int32_t <API key>(int16_t *v1, int16_t *v2, int order, int shift); int32_t <API key>(int16_t *v1, int16_t *v2, int order, int shift); int32_t <API key>(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul); int32_t <API key>(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul); int32_t <API key>(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul); void <API key>(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top); int <API key>(uint8_t *dst, const uint8_t *src, int w, int left); int <API key>(uint8_t *dst, const uint8_t *src, int w, int left); void <API key>(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0); void <API key>(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0); void <API key>(uint8_t *pix, int stride, int alpha, int beta); void <API key>(uint8_t *pix, int stride, int alpha, int beta); void <API key>(uint8_t *pix, int stride, int alpha, int beta); #if HAVE_YASM && ARCH_X86_32 void <API key>(uint8_t *pix, int stride, int alpha, int beta); static void <API key>(uint8_t *pix, int stride, int alpha, int beta) { <API key>(pix+0, stride, alpha, beta); <API key>(pix+8, stride, alpha, beta); } #elif !HAVE_YASM #define <API key>(a,b,c) <API key>(a,b,c,6) #define <API key>(a,b,c) <API key>(a,b,c,6) #define <API key>(a,b,c) <API key>(a,b,c,6) #endif #define <API key> <API key> #define <API key>(cpu, body) \ /* gcc pessimizes register allocation if this is in the same function as <API key>*/\ static av_noinline void <API key>##cpu(int16_t *dst, const float **src, long len, int channels){\ DECLARE_ALIGNED(16, int16_t, tmp)[len];\ int i,j,c;\ for(c=0; c<channels; c++){\ float_to_int16_##cpu(tmp, src[c], len);\ for(i=0, j=c; i<len; i++, j+=channels)\ dst[j] = tmp[i];\ }\ }\ \ static void <API key>##cpu(int16_t *dst, const float **src, long len, int channels){\ if(channels==1)\ float_to_int16_##cpu(dst, src[0], len);\ else if(channels==2){\ x86_reg reglen = len; \ const float *src0 = src[0];\ const float *src1 = src[1];\ __asm__ volatile(\ "shl $2, %0 \n"\ "add %0, %1 \n"\ "add %0, %2 \n"\ "add %0, %3 \n"\ "neg %0 \n"\ body\ :"+r"(reglen), "+r"(dst), "+r"(src0), "+r"(src1)\ );\ }else if(channels==6){\ <API key>##cpu(dst, src, len);\ }else\ <API key>##cpu(dst, src, len, channels);\ } <API key>(3dnow, "1: \n" "pf2id (%2,%0), %%mm0 \n" "pf2id 8(%2,%0), %%mm1 \n" "pf2id (%3,%0), %%mm2 \n" "pf2id 8(%3,%0), %%mm3 \n" "packssdw %%mm1, %%mm0 \n" "packssdw %%mm3, %%mm2 \n" "movq %%mm0, %%mm1 \n" "punpcklwd %%mm2, %%mm0 \n" "punpckhwd %%mm2, %%mm1 \n" "movq %%mm0, (%1,%0)\n" "movq %%mm1, 8(%1,%0)\n" "add $16, %0 \n" "js 1b \n" "femms \n" ) <API key>(sse, "1: \n" "cvtps2pi (%2,%0), %%mm0 \n" "cvtps2pi 8(%2,%0), %%mm1 \n" "cvtps2pi (%3,%0), %%mm2 \n" "cvtps2pi 8(%3,%0), %%mm3 \n" "packssdw %%mm1, %%mm0 \n" "packssdw %%mm3, %%mm2 \n" "movq %%mm0, %%mm1 \n" "punpcklwd %%mm2, %%mm0 \n" "punpckhwd %%mm2, %%mm1 \n" "movq %%mm0, (%1,%0)\n" "movq %%mm1, 8(%1,%0)\n" "add $16, %0 \n" "js 1b \n" "emms \n" ) <API key>(sse2, "1: \n" "cvtps2dq (%2,%0), %%xmm0 \n" "cvtps2dq (%3,%0), %%xmm1 \n" "packssdw %%xmm1, %%xmm0 \n" "movhlps %%xmm0, %%xmm1 \n" "punpcklwd %%xmm1, %%xmm0 \n" "movdqa %%xmm0, (%1,%0) \n" "add $16, %0 \n" "js 1b \n" ) static void <API key>(int16_t *dst, const float **src, long len, int channels){ if(channels==6) <API key>(dst, src, len); else <API key>(dst, src, len, channels); } float <API key>(const float *v1, const float *v2, int order); void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) { mm_flags = mm_support(); if (avctx->dsp_mask) { if (avctx->dsp_mask & FF_MM_FORCE) mm_flags |= (avctx->dsp_mask & 0xffff); else mm_flags &= ~(avctx->dsp_mask & 0xffff); } #if 0 av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:"); if (mm_flags & FF_MM_MMX) av_log(avctx, AV_LOG_INFO, " mmx"); if (mm_flags & FF_MM_MMX2) av_log(avctx, AV_LOG_INFO, " mmx2"); if (mm_flags & FF_MM_3DNOW) av_log(avctx, AV_LOG_INFO, " 3dnow"); if (mm_flags & FF_MM_SSE) av_log(avctx, AV_LOG_INFO, " sse"); if (mm_flags & FF_MM_SSE2) av_log(avctx, AV_LOG_INFO, " sse2"); av_log(avctx, AV_LOG_INFO, "\n"); #endif if (mm_flags & FF_MM_MMX) { const int idct_algo= avctx->idct_algo; if(avctx->lowres==0){ if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SIMPLEMMX){ c->idct_put= <API key>; c->idct_add= <API key>; c->idct = ff_simple_idct_mmx; c-><API key>= FF_SIMPLE_IDCT_PERM; #if CONFIG_GPL }else if(idct_algo==FF_IDCT_LIBMPEG2MMX){ if(mm_flags & FF_MM_MMX2){ c->idct_put= <API key>; c->idct_add= <API key>; c->idct = ff_mmxext_idct; }else{ c->idct_put= <API key>; c->idct_add= <API key>; c->idct = ff_mmx_idct; } c-><API key>= <API key>; #endif }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER) && idct_algo==FF_IDCT_VP3){ if(mm_flags & FF_MM_SSE2){ c->idct_put= <API key>; c->idct_add= <API key>; c->idct = ff_vp3_idct_sse2; c-><API key>= <API key>; }else{ c->idct_put= ff_vp3_idct_put_mmx; c->idct_add= ff_vp3_idct_add_mmx; c->idct = ff_vp3_idct_mmx; c-><API key>= <API key>; } }else if(idct_algo==FF_IDCT_CAVS){ c-><API key>= <API key>; }else if(idct_algo==FF_IDCT_XVIDMMX){ if(mm_flags & FF_MM_SSE2){ c->idct_put= <API key>; c->idct_add= <API key>; c->idct = ff_idct_xvid_sse2; c-><API key>= FF_SSE2_IDCT_PERM; }else if(mm_flags & FF_MM_MMX2){ c->idct_put= <API key>; c->idct_add= <API key>; c->idct = ff_idct_xvid_mmx2; }else{ c->idct_put= <API key>; c->idct_add= <API key>; c->idct = ff_idct_xvid_mmx; } } } c->put_pixels_clamped = <API key>; c-><API key> = <API key>; c->add_pixels_clamped = <API key>; c->clear_block = clear_block_mmx; c->clear_blocks = clear_blocks_mmx; if ((mm_flags & FF_MM_SSE) && !(<API key> && avctx->xvmc_acceleration > 1)){ /* XvMCCreateBlocks() may not allocate 16-byte aligned blocks */ c->clear_block = clear_block_sse; c->clear_blocks = clear_blocks_sse; } #define SET_HPEL_FUNCS(PFX, IDX, SIZE, CPU) \ c->PFX ## _pixels_tab[IDX][0] = PFX ## _pixels ## SIZE ## _ ## CPU; \ c->PFX ## _pixels_tab[IDX][1] = PFX ## _pixels ## SIZE ## _x2_ ## CPU; \ c->PFX ## _pixels_tab[IDX][2] = PFX ## _pixels ## SIZE ## _y2_ ## CPU; \ c->PFX ## _pixels_tab[IDX][3] = PFX ## _pixels ## SIZE ## _xy2_ ## CPU SET_HPEL_FUNCS(put, 0, 16, mmx); SET_HPEL_FUNCS(put_no_rnd, 0, 16, mmx); SET_HPEL_FUNCS(avg, 0, 16, mmx); SET_HPEL_FUNCS(avg_no_rnd, 0, 16, mmx); SET_HPEL_FUNCS(put, 1, 8, mmx); SET_HPEL_FUNCS(put_no_rnd, 1, 8, mmx); SET_HPEL_FUNCS(avg, 1, 8, mmx); SET_HPEL_FUNCS(avg_no_rnd, 1, 8, mmx); c->gmc= gmc_mmx; c->add_bytes= add_bytes_mmx; c->add_bytes_l2= add_bytes_l2_mmx; c->draw_edges = draw_edges_mmx; if (CONFIG_H263_DECODER || CONFIG_H263_ENCODER) { c->h263_v_loop_filter= <API key>; c->h263_h_loop_filter= <API key>; } c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; c-><API key>[0]= <API key>; c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; if (CONFIG_VP6_DECODER) { c->vp6_filter_diag4 = <API key>; } if (mm_flags & FF_MM_MMX2) { c->prefetch = prefetch_mmx2; c->put_pixels_tab[0][1] = <API key>; c->put_pixels_tab[0][2] = <API key>; c->avg_pixels_tab[0][0] = avg_pixels16_mmx2; c->avg_pixels_tab[0][1] = <API key>; c->avg_pixels_tab[0][2] = <API key>; c->put_pixels_tab[1][1] = put_pixels8_x2_mmx2; c->put_pixels_tab[1][2] = put_pixels8_y2_mmx2; c->avg_pixels_tab[1][0] = avg_pixels8_mmx2; c->avg_pixels_tab[1][1] = avg_pixels8_x2_mmx2; c->avg_pixels_tab[1][2] = avg_pixels8_y2_mmx2; if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ c-><API key>[0][1] = <API key>; c-><API key>[0][2] = <API key>; c-><API key>[1][1] = <API key>; c-><API key>[1][2] = <API key>; c->avg_pixels_tab[0][3] = <API key>; c->avg_pixels_tab[1][3] = <API key>; if (CONFIG_VP3_DECODER) { c->vp3_v_loop_filter= <API key>; c->vp3_h_loop_filter= <API key>; } } if (CONFIG_VP3_DECODER) { c->vp3_idct_dc_add = <API key>; } if (CONFIG_VP3_DECODER && (avctx->codec_id == CODEC_ID_VP3 || avctx->codec_id == CODEC_ID_THEORA)) { c-><API key>[1][1] = <API key>; c-><API key>[1][2] = <API key>; } #define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU) \ c->PFX ## _pixels_tab[IDX][ 0] = PFX ## SIZE ## _mc00_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 1] = PFX ## SIZE ## _mc10_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 2] = PFX ## SIZE ## _mc20_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 3] = PFX ## SIZE ## _mc30_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 4] = PFX ## SIZE ## _mc01_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 5] = PFX ## SIZE ## _mc11_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 6] = PFX ## SIZE ## _mc21_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 7] = PFX ## SIZE ## _mc31_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 8] = PFX ## SIZE ## _mc02_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 9] = PFX ## SIZE ## _mc12_ ## CPU; \ c->PFX ## _pixels_tab[IDX][10] = PFX ## SIZE ## _mc22_ ## CPU; \ c->PFX ## _pixels_tab[IDX][11] = PFX ## SIZE ## _mc32_ ## CPU; \ c->PFX ## _pixels_tab[IDX][12] = PFX ## SIZE ## _mc03_ ## CPU; \ c->PFX ## _pixels_tab[IDX][13] = PFX ## SIZE ## _mc13_ ## CPU; \ c->PFX ## _pixels_tab[IDX][14] = PFX ## SIZE ## _mc23_ ## CPU; \ c->PFX ## _pixels_tab[IDX][15] = PFX ## SIZE ## _mc33_ ## CPU SET_QPEL_FUNCS(put_qpel, 0, 16, mmx2); SET_QPEL_FUNCS(put_qpel, 1, 8, mmx2); SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmx2); SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmx2); SET_QPEL_FUNCS(avg_qpel, 0, 16, mmx2); SET_QPEL_FUNCS(avg_qpel, 1, 8, mmx2); SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmx2); SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmx2); SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmx2); SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmx2); SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmx2); SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmx2); SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmx2); SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, mmx2); SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmx2); SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmx2); c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; c-><API key>[0]= <API key>; c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; c-><API key>[2]= <API key>; c-><API key>[2]= <API key>; #if HAVE_YASM c-><API key> = <API key>; #endif #if HAVE_7REGS && HAVE_TEN_OPERANDS if( mm_flags&FF_MM_3DNOW ) c-><API key> = <API key>; #endif if (CONFIG_CAVS_DECODER) <API key>(c, avctx); if (CONFIG_VC1_DECODER) ff_vc1dsp_init_mmx(c, avctx); c-><API key>= <API key>; } else if (mm_flags & FF_MM_3DNOW) { c->prefetch = prefetch_3dnow; c->put_pixels_tab[0][1] = <API key>; c->put_pixels_tab[0][2] = <API key>; c->avg_pixels_tab[0][0] = avg_pixels16_3dnow; c->avg_pixels_tab[0][1] = <API key>; c->avg_pixels_tab[0][2] = <API key>; c->put_pixels_tab[1][1] = <API key>; c->put_pixels_tab[1][2] = <API key>; c->avg_pixels_tab[1][0] = avg_pixels8_3dnow; c->avg_pixels_tab[1][1] = <API key>; c->avg_pixels_tab[1][2] = <API key>; if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ c-><API key>[0][1] = <API key>; c-><API key>[0][2] = <API key>; c-><API key>[1][1] = <API key>; c-><API key>[1][2] = <API key>; c->avg_pixels_tab[0][3] = <API key>; c->avg_pixels_tab[1][3] = <API key>; } if (CONFIG_VP3_DECODER && (avctx->codec_id == CODEC_ID_VP3 || avctx->codec_id == CODEC_ID_THEORA)) { c-><API key>[1][1] = <API key>; c-><API key>[1][2] = <API key>; } SET_QPEL_FUNCS(put_qpel, 0, 16, 3dnow); SET_QPEL_FUNCS(put_qpel, 1, 8, 3dnow); SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, 3dnow); SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, 3dnow); SET_QPEL_FUNCS(avg_qpel, 0, 16, 3dnow); SET_QPEL_FUNCS(avg_qpel, 1, 8, 3dnow); SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 3dnow); SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 3dnow); SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 3dnow); SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 3dnow); SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 3dnow); SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 3dnow); SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, 3dnow); SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, 3dnow); SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, 3dnow); SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, 3dnow); c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; if (CONFIG_CAVS_DECODER) <API key>(c, avctx); } #define H264_QPEL_FUNCS(x, y, CPU)\ c-><API key>[0][x+y*4] = put_h264_qpel16_mc##x##y##_##CPU;\ c-><API key>[1][x+y*4] = put_h264_qpel8_mc##x##y##_##CPU;\ c-><API key>[0][x+y*4] = avg_h264_qpel16_mc##x##y##_##CPU;\ c-><API key>[1][x+y*4] = avg_h264_qpel8_mc##x##y##_##CPU; if((mm_flags & FF_MM_SSE2) && !(mm_flags & FF_MM_3DNOW)){ // these functions are slower than mmx on AMD, but faster on Intel c->put_pixels_tab[0][0] = put_pixels16_sse2; c->avg_pixels_tab[0][0] = avg_pixels16_sse2; H264_QPEL_FUNCS(0, 0, sse2); } if(mm_flags & FF_MM_SSE2){ H264_QPEL_FUNCS(0, 1, sse2); H264_QPEL_FUNCS(0, 2, sse2); H264_QPEL_FUNCS(0, 3, sse2); H264_QPEL_FUNCS(1, 1, sse2); H264_QPEL_FUNCS(1, 2, sse2); H264_QPEL_FUNCS(1, 3, sse2); H264_QPEL_FUNCS(2, 1, sse2); H264_QPEL_FUNCS(2, 2, sse2); H264_QPEL_FUNCS(2, 3, sse2); H264_QPEL_FUNCS(3, 1, sse2); H264_QPEL_FUNCS(3, 2, sse2); H264_QPEL_FUNCS(3, 3, sse2); if (CONFIG_VP6_DECODER) { c->vp6_filter_diag4 = <API key>; } } #if HAVE_SSSE3 if(mm_flags & FF_MM_SSSE3){ H264_QPEL_FUNCS(1, 0, ssse3); H264_QPEL_FUNCS(1, 1, ssse3); H264_QPEL_FUNCS(1, 2, ssse3); H264_QPEL_FUNCS(1, 3, ssse3); H264_QPEL_FUNCS(2, 0, ssse3); H264_QPEL_FUNCS(2, 1, ssse3); H264_QPEL_FUNCS(2, 2, ssse3); H264_QPEL_FUNCS(2, 3, ssse3); H264_QPEL_FUNCS(3, 0, ssse3); H264_QPEL_FUNCS(3, 1, ssse3); H264_QPEL_FUNCS(3, 2, ssse3); H264_QPEL_FUNCS(3, 3, ssse3); c-><API key>[0]= <API key>; c-><API key>[0]= <API key>; c-><API key>[0]= <API key>; c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; c-><API key>[1]= <API key>; c-><API key>= <API key>; #if HAVE_YASM c-><API key> = <API key>; if (mm_flags & FF_MM_SSE4) // not really sse4, just slow on Conroe c-><API key> = <API key>; #endif } #endif if(mm_flags & FF_MM_3DNOW){ c-><API key> = <API key>; c->vector_fmul = vector_fmul_3dnow; if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ c->float_to_int16 = <API key>; c-><API key> = <API key>; } } if(mm_flags & FF_MM_3DNOWEXT){ c->vector_fmul_reverse = <API key>; c->vector_fmul_window = <API key>; if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ c-><API key> = <API key>; } } if(mm_flags & FF_MM_MMX2){ #if HAVE_YASM c->scalarproduct_int16 = <API key>; c-><API key> = <API key>; #endif } if(mm_flags & FF_MM_SSE){ c-><API key> = <API key>; c->ac3_downmix = ac3_downmix_sse; c->vector_fmul = vector_fmul_sse; c->vector_fmul_reverse = <API key>; c->vector_fmul_add = vector_fmul_add_sse; c->vector_fmul_window = <API key>; c-><API key> = <API key>; c->vector_clipf = vector_clipf_sse; c->float_to_int16 = float_to_int16_sse; c-><API key> = <API key>; #if HAVE_YASM c->scalarproduct_float = <API key>; #endif } if(mm_flags & FF_MM_3DNOW) c->vector_fmul_add = <API key>; // faster than sse if(mm_flags & FF_MM_SSE2){ c-><API key> = <API key>; c->float_to_int16 = float_to_int16_sse2; c-><API key> = <API key>; #if HAVE_YASM c->scalarproduct_int16 = <API key>; c-><API key> = <API key>; #endif } if((mm_flags & FF_MM_SSSE3) && !(mm_flags & (FF_MM_SSE42|FF_MM_3DNOW)) && HAVE_YASM) // cachesplit c-><API key> = <API key>; } if (CONFIG_ENCODERS) dsputilenc_init_mmx(c, avctx); #if 0 // for speed testing get_pixels = just_return; put_pixels_clamped = just_return; add_pixels_clamped = just_return; pix_abs16x16 = just_return; pix_abs16x16_x2 = just_return; pix_abs16x16_y2 = just_return; pix_abs16x16_xy2 = just_return; put_pixels_tab[0] = just_return; put_pixels_tab[1] = just_return; put_pixels_tab[2] = just_return; put_pixels_tab[3] = just_return; <API key>[0] = just_return; <API key>[1] = just_return; <API key>[2] = just_return; <API key>[3] = just_return; avg_pixels_tab[0] = just_return; avg_pixels_tab[1] = just_return; avg_pixels_tab[2] = just_return; avg_pixels_tab[3] = just_return; <API key>[0] = just_return; <API key>[1] = just_return; <API key>[2] = just_return; <API key>[3] = just_return; //av_fdct = just_return; //ff_idct = just_return; #endif } #if CONFIG_H264DSP void ff_h264dsp_init_x86(H264DSPContext *c) { mm_flags = mm_support(); if (mm_flags & FF_MM_MMX) { c->h264_idct_dc_add= c->h264_idct_add= <API key>; c->h264_idct8_dc_add= c->h264_idct8_add= <API key>; c->h264_idct_add16 = <API key>; c->h264_idct8_add4 = <API key>; c->h264_idct_add8 = <API key>; c-><API key>= <API key>; if (mm_flags & FF_MM_MMX2) { c->h264_idct_dc_add= <API key>; c->h264_idct8_dc_add= <API key>; c->h264_idct_add16 = <API key>; c->h264_idct8_add4 = <API key>; c->h264_idct_add8 = <API key>; c-><API key>= <API key>; c-><API key>= <API key>; c-><API key>= <API key>; c-><API key>= <API key>; c-><API key>= <API key>; c-><API key>= <API key>; c-><API key>= <API key>; c-><API key>= <API key>; c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; c-><API key>[2]= <API key>; c-><API key>[3]= <API key>; c-><API key>[4]= <API key>; c-><API key>[5]= <API key>; c-><API key>[6]= <API key>; c-><API key>[7]= <API key>; c-><API key>[0]= <API key>; c-><API key>[1]= <API key>; c-><API key>[2]= <API key>; c-><API key>[3]= <API key>; c-><API key>[4]= <API key>; c-><API key>[5]= <API key>; c-><API key>[6]= <API key>; c-><API key>[7]= <API key>; } if(mm_flags & FF_MM_SSE2){ c->h264_idct8_add = <API key>; c->h264_idct8_add4= <API key>; } #if CONFIG_GPL && HAVE_YASM if (mm_flags & FF_MM_MMX2){ #if ARCH_X86_32 c-><API key> = <API key>; c-><API key> = <API key>; #endif if( mm_flags&FF_MM_SSE2 ){ #if ARCH_X86_64 || !defined(__ICC) || __ICC > 1110 c-><API key> = <API key>; c-><API key> = <API key>; c-><API key> = <API key>; c-><API key> = <API key>; #endif c->h264_idct_add16 = <API key>; c->h264_idct_add8 = <API key>; c-><API key> = <API key>; } } #endif } } #endif /* CONFIG_H264DSP */
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.17.3 // source: github.com/google/cloudprober/surfacers/postgres/proto/config.proto package proto import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type SurfacerConf struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ConnectionString *string `protobuf:"bytes,1,req,name=connection_string,json=connectionString" json:"connection_string,omitempty"` MetricsTableName *string `protobuf:"bytes,2,req,name=metrics_table_name,json=metricsTableName" json:"metrics_table_name,omitempty"` MetricsBufferSize *int64 `protobuf:"varint,3,opt,name=metrics_buffer_size,json=metricsBufferSize,def=10000" json:"metrics_buffer_size,omitempty"` } // Default values for SurfacerConf fields. const ( <API key> = int64(10000) ) func (x *SurfacerConf) Reset() { *x = SurfacerConf{} if protoimpl.UnsafeEnabled { mi := &file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SurfacerConf) String() string { return protoimpl.X.MessageStringOf(x) } func (*SurfacerConf) ProtoMessage() {} func (x *SurfacerConf) ProtoReflect() protoreflect.Message { mi := &file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SurfacerConf.ProtoReflect.Descriptor instead. func (*SurfacerConf) Descriptor() ([]byte, []int) { return file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_rawDescGZIP(), []int{0} } func (x *SurfacerConf) GetConnectionString() string { if x != nil && x.ConnectionString != nil { return *x.ConnectionString } return "" } func (x *SurfacerConf) GetMetricsTableName() string { if x != nil && x.MetricsTableName != nil { return *x.MetricsTableName } return "" } func (x *SurfacerConf) <API key>() int64 { if x != nil && x.MetricsBufferSize != nil { return *x.MetricsBufferSize } return <API key> } var <API key> protoreflect.FileDescriptor var <API key> = []byte{ 0x0a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x3a, 0x05, 0x31, 0x30, 0x30, 0x30, 0x30, 0x52, 0x11, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, } var ( file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_rawDescOnce sync.Once file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_rawDescData = <API key> ) func file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_rawDescGZIP() []byte { file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_rawDescOnce.Do(func() { file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_rawDescData) }) return file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_rawDescData } var file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var <API key> = []interface{}{ (*SurfacerConf)(nil), // 0: cloudprober.surfacer.postgres.SurfacerConf } var <API key> = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name } func init() { <API key>() } func <API key>() { if <API key> != nil { return } if !protoimpl.UnsafeEnabled { file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SurfacerConf); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: <API key>, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: <API key>, DependencyIndexes: <API key>, MessageInfos: file_github_com_google_cloudprober_surfacers_postgres_proto_config_proto_msgTypes, }.Build() <API key> = out.File <API key> = nil <API key> = nil <API key> = nil }
/** * Server-side support classes for WebSocket requests. */ @NonNullApi @NonNullFields package org.springframework.web.reactive.socket.server.support; import org.springframework.lang.NonNullApi; import org.springframework.lang.NonNullFields;
package org.commcare.cases.ledger; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; import org.javarosa.core.services.storage.IMetaData; import org.javarosa.core.services.storage.Persistable; import org.javarosa.core.util.externalizable.<API key>; import org.javarosa.core.util.externalizable.ExtUtil; import org.javarosa.core.util.externalizable.ExtWrapMap; import org.javarosa.core.util.externalizable.PrototypeFactory; /** * A Ledger is a data model which tracks numeric data organized into * different sections with different meanings. * * @author ctsims * */ public class Ledger implements Persistable, IMetaData { //NOTE: Right now this is (lazily) implemented assuming that each ledger //object tracks _all_ of the sections for an entity, which will likely be a terrible way //to do things long-term. public static final String STORAGE_KEY = "ledger"; public static final String INDEX_ENTITY_ID = "entity-id"; String entityId; int recordId = -1; Hashtable<String, Hashtable<String, Integer>> sections; public Ledger() { } public Ledger(String entityId) { this.entityId = entityId; this.sections = new Hashtable<String, Hashtable<String, Integer>>(); } /** * Get the ID of the linked entity associated with this Ledger record * @return */ public String getEntiyId() { return entityId; } /** * Retrieve an entry from a specific section of the ledger. * * If no entry is defined, the ledger will return the value '0' * * @param sectionId The section containing the entry * @param entryId The Id of the entry to retrieve * @return the entry value. '0' if no entry exists. */ public int getEntry(String sectionId, String entryId) { if(!sections.containsKey(sectionId) || !sections.get(sectionId).containsKey(entryId)) { return 0; } return sections.get(sectionId).get(entryId).intValue(); } /** * @return The list of sections available in this ledger */ public String[] getSectionList() { String[] sectionList = new String[sections.size()]; int i = 0; for(Enumeration e = sections.keys(); e.hasMoreElements();) { sectionList[i] = (String)e.nextElement(); ++i; } return sectionList; } /** * Retrieves a list of all entries (by ID) defined in a * section of the ledger * * @param sectionId The ID of a section * @return The IDs of all entries defined in the provided section */ public String[] getListOfEntries(String sectionId) { Hashtable<String, Integer> entries = sections.get(sectionId); String[] entryList = new String[entries.size()]; int i = 0; for(Enumeration e = entries.keys(); e.hasMoreElements();) { entryList[i] = (String)e.nextElement(); ++i; } return entryList; } /* * (non-Javadoc) * @see org.javarosa.core.util.externalizable.Externalizable#readExternal(java.io.DataInputStream, org.javarosa.core.util.externalizable.PrototypeFactory) */ public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, <API key> { recordId = ExtUtil.readInt(in); entityId = ExtUtil.readString(in); sections = (Hashtable<String, Hashtable<String, Integer>>) ExtUtil.read(in, new ExtWrapMap(String.class, new ExtWrapMap(String.class, Integer.class))); } /* * (non-Javadoc) * @see org.javarosa.core.util.externalizable.Externalizable#writeExternal(java.io.DataOutputStream) */ public void writeExternal(DataOutputStream out) throws IOException { ExtUtil.writeNumeric(out, recordId); ExtUtil.writeString(out, entityId); ExtUtil.write(out, new ExtWrapMap(sections, new ExtWrapMap(String.class, Integer.class))); } /* * (non-Javadoc) * @see org.javarosa.core.services.storage.Persistable#setID(int) */ public void setID(int ID) { recordId = ID; } /* * (non-Javadoc) * @see org.javarosa.core.services.storage.Persistable#getID() */ public int getID() { return recordId; } /** * Sets the value of an entry in the specified section of this ledger * * @param sectionId * @param entryId * @param quantity */ public void setEntry(String sectionId, String entryId, int quantity) { if(!sections.containsKey(sectionId)) { sections.put(sectionId, new Hashtable<String, Integer>()); } sections.get(sectionId).put(entryId, new Integer(quantity)); } /* * (non-Javadoc) * @see org.javarosa.core.services.storage.IMetaData#getMetaDataFields() */ public String[] getMetaDataFields() { return new String[] {INDEX_ENTITY_ID}; } /* * (non-Javadoc) * @see org.javarosa.core.services.storage.IMetaData#getMetaData(java.lang.String) */ public Object getMetaData(String fieldName) { if(fieldName.equals(INDEX_ENTITY_ID)){ return entityId; } else { throw new <API key>("No metadata field " + fieldName + " in the ledger storage system"); } } }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_232) on Tue Sep 15 08:53:05 UTC 2020 --> <title>Uses of Class org.springframework.jmx.export.metadata.ManagedAttribute (Spring Framework 5.1.18.RELEASE API)</title> <meta name="date" content="2020-09-15"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.springframework.jmx.export.metadata.ManagedAttribute (Spring Framework 5.1.18.RELEASE API)"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Spring Framework</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/springframework/jmx/export/metadata/class-use/ManagedAttribute.html" target="_top">Frames</a></li> <li><a href="ManagedAttribute.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h2 title="Uses of Class org.springframework.jmx.export.metadata.ManagedAttribute" class="title">Uses of Class<br>org.springframework.jmx.export.metadata.ManagedAttribute</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.springframework.jmx.export.annotation">org.springframework.jmx.export.annotation</a></td> <td class="colLast"> <div class="block">Java 5 annotations for MBean exposure.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="#org.springframework.jmx.export.metadata">org.springframework.jmx.export.metadata</a></td> <td class="colLast"> <div class="block">Provides generic JMX metadata classes and basic support for reading JMX metadata in a provider-agnostic manner.</div> </td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.springframework.jmx.export.annotation"> </a> <h3>Uses of <a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a> in <a href="../../../../../../org/springframework/jmx/export/annotation/package-summary.html">org.springframework.jmx.export.annotation</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../org/springframework/jmx/export/annotation/package-summary.html">org.springframework.jmx.export.annotation</a> that return <a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a></code></td> <td class="colLast"><span class="typeNameLabel"><API key>.</span><code><span class="memberNameLink"><a href="../../../../../../org/springframework/jmx/export/annotation/<API key>.html </tr> </tbody> </table> </li> <li class="blockList"><a name="org.springframework.jmx.export.metadata"> </a> <h3>Uses of <a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a> in <a href="../../../../../../org/springframework/jmx/export/metadata/package-summary.html">org.springframework.jmx.export.metadata</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> <caption><span>Fields in <a href="../../../../../../org/springframework/jmx/export/metadata/package-summary.html">org.springframework.jmx.export.metadata</a> declared as <a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a></code></td> <td class="colLast"><span class="typeNameLabel">ManagedAttribute.</span><code><span class="memberNameLink"><a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html#EMPTY">EMPTY</a></span></code> <div class="block">Empty attributes.</div> </td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../org/springframework/jmx/export/metadata/package-summary.html">org.springframework.jmx.export.metadata</a> that return <a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">ManagedAttribute</a></code></td> <td class="colLast"><span class="typeNameLabel">JmxAttributeSource.</span><code><span class="memberNameLink"><a href="../../../../../../org/springframework/jmx/export/metadata/JmxAttributeSource.html <div class="block">Implementations should return an instance of <code>ManagedAttribute</code> if the supplied <code>Method</code> has the corresponding metadata.</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/springframework/jmx/export/metadata/ManagedAttribute.html" title="class in org.springframework.jmx.export.metadata">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Spring Framework</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/springframework/jmx/export/metadata/class-use/ManagedAttribute.html" target="_top">Frames</a></li> <li><a href="ManagedAttribute.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
<?php namespace NetSuite\Classes; class Customer extends Record { /** * @var \NetSuite\Classes\RecordRef */ public $customForm; /** * @var string */ public $entityId; /** * @var string */ public $altName; /** * @var boolean */ public $isPerson; /** * @var string */ public $phoneticName; /** * @var string */ public $salutation; /** * @var string */ public $firstName; /** * @var string */ public $middleName; /** * @var string */ public $lastName; /** * @var string */ public $companyName; /** * @var \NetSuite\Classes\RecordRef */ public $entityStatus; /** * @var \NetSuite\Classes\RecordRef */ public $parent; /** * @var string */ public $phone; /** * @var string */ public $fax; /** * @var string */ public $email; /** * @var string */ public $url; /** * @var string */ public $defaultAddress; /** * @var boolean */ public $isInactive; /** * @var \NetSuite\Classes\RecordRef */ public $category; /** * @var string */ public $title; /** * @var string */ public $printOnCheckAs; /** * @var string */ public $altPhone; /** * @var string */ public $homePhone; /** * @var string */ public $mobilePhone; /** * @var string */ public $altEmail; /** * @var \NetSuite\Classes\Language */ public $language; /** * @var string */ public $comments; /** * @var \NetSuite\Classes\<API key> */ public $numberFormat; /** * @var \NetSuite\Classes\<API key> */ public $<API key>; /** * @var string */ public $dateCreated; /** * @var \NetSuite\Classes\RecordRef */ public $image; /** * @var \NetSuite\Classes\EmailPreference */ public $emailPreference; /** * @var \NetSuite\Classes\RecordRef */ public $subsidiary; /** * @var \NetSuite\Classes\RecordRef */ public $<API key>; /** * @var \NetSuite\Classes\RecordRef */ public $salesRep; /** * @var \NetSuite\Classes\RecordRef */ public $territory; /** * @var string */ public $contribPct; /** * @var \NetSuite\Classes\RecordRef */ public $partner; /** * @var \NetSuite\Classes\RecordRef */ public $salesGroup; /** * @var string */ public $vatRegNumber; /** * @var string */ public $accountNumber; /** * @var boolean */ public $taxExempt; /** * @var \NetSuite\Classes\RecordRef */ public $terms; /** * @var float */ public $creditLimit; /** * @var \NetSuite\Classes\<API key> */ public $creditHoldOverride; /** * @var \NetSuite\Classes\<API key> */ public $monthlyClosing; /** * @var boolean */ public $<API key>; /** * @var string */ public $displaySymbol; /** * @var \NetSuite\Classes\<API key> */ public $symbolPlacement; /** * @var float */ public $balance; /** * @var float */ public $overdueBalance; /** * @var integer */ public $daysOverdue; /** * @var float */ public $unbilledOrders; /** * @var float */ public $<API key>; /** * @var float */ public $<API key>; /** * @var float */ public $<API key>; /** * @var float */ public $consolBalance; /** * @var float */ public $consolAging; /** * @var float */ public $consolAging1; /** * @var float */ public $consolAging2; /** * @var float */ public $consolAging3; /** * @var float */ public $consolAging4; /** * @var integer */ public $consolDaysOverdue; /** * @var \NetSuite\Classes\RecordRef */ public $priceLevel; /** * @var \NetSuite\Classes\RecordRef */ public $currency; /** * @var \NetSuite\Classes\RecordRef */ public $prefCCProcessor; /** * @var float */ public $depositBalance; /** * @var boolean */ public $shipComplete; /** * @var boolean */ public $taxable; /** * @var \NetSuite\Classes\RecordRef */ public $taxItem; /** * @var string */ public $resaleNumber; /** * @var float */ public $aging; /** * @var float */ public $aging1; /** * @var float */ public $aging2; /** * @var float */ public $aging3; /** * @var float */ public $aging4; /** * @var string */ public $startDate; /** * @var \NetSuite\Classes\<API key> */ public $<API key>; /** * @var string */ public $endDate; /** * @var integer */ public $reminderDays; /** * @var \NetSuite\Classes\RecordRef */ public $shippingItem; /** * @var string */ public $thirdPartyAcct; /** * @var string */ public $thirdPartyZipcode; /** * @var \NetSuite\Classes\Country */ public $thirdPartyCountry; /** * @var boolean */ public $giveAccess; /** * @var float */ public $estimatedBudget; /** * @var \NetSuite\Classes\RecordRef */ public $accessRole; /** * @var boolean */ public $sendEmail; /** * @var \NetSuite\Classes\RecordRef */ public $assignedWebSite; /** * @var string */ public $password; /** * @var string */ public $password2; /** * @var boolean */ public $requirePwdChange; /** * @var \NetSuite\Classes\RecordRef */ public $campaignCategory; /** * @var \NetSuite\Classes\RecordRef */ public $sourceWebSite; /** * @var \NetSuite\Classes\RecordRef */ public $leadSource; /** * @var \NetSuite\Classes\RecordRef */ public $receivablesAccount; /** * @var \NetSuite\Classes\RecordRef */ public $drAccount; /** * @var \NetSuite\Classes\RecordRef */ public $fxAccount; /** * @var float */ public $<API key>; /** * @var string */ public $webLead; /** * @var string */ public $referrer; /** * @var string */ public $keywords; /** * @var string */ public $clickStream; /** * @var string */ public $lastPageVisited; /** * @var integer */ public $visits; /** * @var string */ public $firstVisit; /** * @var string */ public $lastVisit; /** * @var boolean */ public $billPay; /** * @var float */ public $openingBalance; /** * @var string */ public $lastModifiedDate; /** * @var string */ public $openingBalanceDate; /** * @var \NetSuite\Classes\RecordRef */ public $<API key>; /** * @var \NetSuite\Classes\CustomerStage */ public $stage; /** * @var boolean */ public $emailTransactions; /** * @var boolean */ public $printTransactions; /** * @var boolean */ public $faxTransactions; /** * @var \NetSuite\Classes\RecordRef */ public $defaultTaxReg; /** * @var boolean */ public $syncPartnerTeams; /** * @var boolean */ public $isBudgetApproved; /** * @var \NetSuite\Classes\<API key> */ public $<API key>; /** * @var \NetSuite\Classes\RecordRef */ public $salesReadiness; /** * @var \NetSuite\Classes\<API key> */ public $salesTeamList; /** * @var \NetSuite\Classes\RecordRef */ public $buyingReason; /** * @var \NetSuite\Classes\<API key> */ public $downloadList; /** * @var \NetSuite\Classes\RecordRef */ public $buyingTimeFrame; /** * @var \NetSuite\Classes\<API key> */ public $addressbookList; /** * @var \NetSuite\Classes\SubscriptionsList */ public $subscriptionsList; /** * @var \NetSuite\Classes\<API key> */ public $contactRolesList; /** * @var \NetSuite\Classes\<API key> */ public $currencyList; /** * @var \NetSuite\Classes\<API key> */ public $creditCardsList; /** * @var \NetSuite\Classes\<API key> */ public $partnersList; /** * @var \NetSuite\Classes\<API key> */ public $groupPricingList; /** * @var \NetSuite\Classes\<API key> */ public $itemPricingList; /** * @var \NetSuite\Classes\<API key> */ public $taxRegistrationList; /** * @var \NetSuite\Classes\CustomFieldList */ public $customFieldList; /** * @var string */ public $internalId; /** * @var string */ public $externalId; static $paramtypesmap = array( "customForm" => "RecordRef", "entityId" => "string", "altName" => "string", "isPerson" => "boolean", "phoneticName" => "string", "salutation" => "string", "firstName" => "string", "middleName" => "string", "lastName" => "string", "companyName" => "string", "entityStatus" => "RecordRef", "parent" => "RecordRef", "phone" => "string", "fax" => "string", "email" => "string", "url" => "string", "defaultAddress" => "string", "isInactive" => "boolean", "category" => "RecordRef", "title" => "string", "printOnCheckAs" => "string", "altPhone" => "string", "homePhone" => "string", "mobilePhone" => "string", "altEmail" => "string", "language" => "Language", "comments" => "string", "numberFormat" => "<API key>", "<API key>" => "<API key>", "dateCreated" => "dateTime", "image" => "RecordRef", "emailPreference" => "EmailPreference", "subsidiary" => "RecordRef", "<API key>" => "RecordRef", "salesRep" => "RecordRef", "territory" => "RecordRef", "contribPct" => "string", "partner" => "RecordRef", "salesGroup" => "RecordRef", "vatRegNumber" => "string", "accountNumber" => "string", "taxExempt" => "boolean", "terms" => "RecordRef", "creditLimit" => "float", "creditHoldOverride" => "<API key>", "monthlyClosing" => "<API key>", "<API key>" => "boolean", "displaySymbol" => "string", "symbolPlacement" => "<API key>", "balance" => "float", "overdueBalance" => "float", "daysOverdue" => "integer", "unbilledOrders" => "float", "<API key>" => "float", "<API key>" => "float", "<API key>" => "float", "consolBalance" => "float", "consolAging" => "float", "consolAging1" => "float", "consolAging2" => "float", "consolAging3" => "float", "consolAging4" => "float", "consolDaysOverdue" => "integer", "priceLevel" => "RecordRef", "currency" => "RecordRef", "prefCCProcessor" => "RecordRef", "depositBalance" => "float", "shipComplete" => "boolean", "taxable" => "boolean", "taxItem" => "RecordRef", "resaleNumber" => "string", "aging" => "float", "aging1" => "float", "aging2" => "float", "aging3" => "float", "aging4" => "float", "startDate" => "dateTime", "<API key>" => "<API key>", "endDate" => "dateTime", "reminderDays" => "integer", "shippingItem" => "RecordRef", "thirdPartyAcct" => "string", "thirdPartyZipcode" => "string", "thirdPartyCountry" => "Country", "giveAccess" => "boolean", "estimatedBudget" => "float", "accessRole" => "RecordRef", "sendEmail" => "boolean", "assignedWebSite" => "RecordRef", "password" => "string", "password2" => "string", "requirePwdChange" => "boolean", "campaignCategory" => "RecordRef", "sourceWebSite" => "RecordRef", "leadSource" => "RecordRef", "receivablesAccount" => "RecordRef", "drAccount" => "RecordRef", "fxAccount" => "RecordRef", "<API key>" => "float", "webLead" => "string", "referrer" => "string", "keywords" => "string", "clickStream" => "string", "lastPageVisited" => "string", "visits" => "integer", "firstVisit" => "dateTime", "lastVisit" => "dateTime", "billPay" => "boolean", "openingBalance" => "float", "lastModifiedDate" => "dateTime", "openingBalanceDate" => "dateTime", "<API key>" => "RecordRef", "stage" => "CustomerStage", "emailTransactions" => "boolean", "printTransactions" => "boolean", "faxTransactions" => "boolean", "defaultTaxReg" => "RecordRef", "syncPartnerTeams" => "boolean", "isBudgetApproved" => "boolean", "<API key>" => "<API key>", "salesReadiness" => "RecordRef", "salesTeamList" => "<API key>", "buyingReason" => "RecordRef", "downloadList" => "<API key>", "buyingTimeFrame" => "RecordRef", "addressbookList" => "<API key>", "subscriptionsList" => "SubscriptionsList", "contactRolesList" => "<API key>", "currencyList" => "<API key>", "creditCardsList" => "<API key>", "partnersList" => "<API key>", "groupPricingList" => "<API key>", "itemPricingList" => "<API key>", "taxRegistrationList" => "<API key>", "customFieldList" => "CustomFieldList", "internalId" => "string", "externalId" => "string", ); }
namespace ts { describe("TransformAPI", () => { function <API key>(context: <API key>) { const <API key> = context.onSubstituteNode; context.enableSubstitution(SyntaxKind.Identifier); context.onSubstituteNode = (hint, node) => { node = <API key>(hint, node); if (hint === EmitHint.Expression && isIdentifier(node) && node.escapedText === "undefined") { node = <API key>( <API key>( setTextRange( createVoidZero(), node), SyntaxKind.<API key>, "undefined")); } return node; }; return (file: SourceFile) => file; } function replaceNumberWith2(context: <API key>) { function visitor(node: Node): Node { if (isNumericLiteral(node)) { return <API key>("2"); } return visitEachChild(node, visitor, context); } return (file: SourceFile) => visitNode(file, visitor); } function <API key>(context: <API key>) { const <API key> = context.onSubstituteNode; context.enableSubstitution(SyntaxKind.Identifier); context.onSubstituteNode = (hint, node) => { node = <API key>(hint, node); if (isIdentifier(node) && node.escapedText === "oldName") { node = setTextRange(createIdentifier("newName"), node); } return node; }; return (file: SourceFile) => file; } function <API key>(context: <API key>) { const visitor: Visitor = (node) => { if (isIdentifier(node) && node.text === "oldName") { return createIdentifier("newName"); } return visitEachChild(node, visitor, context); }; return (node: SourceFile) => visitNode(node, visitor); } function transformSourceFile(sourceText: string, transformers: TransformerFactory<SourceFile>[]) { const transformed = transform(createSourceFile("source.ts", sourceText, ScriptTarget.ES2015), transformers); const printer = createPrinter({ newLine: NewLineKind.<API key> }, { onEmitNode: transformed.<API key>, substituteNode: transformed.substituteNode }); const result = printer.printBundle(createBundle(transformed.transformed)); transformed.dispose(); return result; } function testBaseline(testName: string, test: () => string) { it(testName, () => { Harness.Baseline.runBaseline(`transformApi/transformsCorrectly.${testName}.js`, test()); }); } testBaseline("substitution", () => { return transformSourceFile(`var a = undefined;`, [<API key>]); }); testBaseline("types", () => { return transformSourceFile(`let a: () => void`, [ context => file => visitNode(file, function visitor(node: Node): VisitResult<Node> { return visitEachChild(node, visitor, context); }) ]); }); testBaseline("fromTranspileModule", () => { return transpileModule(`var oldName = undefined;`, { transformers: { before: [<API key>], after: [<API key>] }, compilerOptions: { newLine: NewLineKind.<API key> } }).outputText; }); testBaseline("issue27854", () => { return transpileModule(`oldName<{ a: string; }>\` ... \`;`, { transformers: { before: [<API key>] }, compilerOptions: { newLine: NewLineKind.<API key>, target: ScriptTarget.Latest } }).outputText; }); testBaseline("rewrittenNamespace", () => { return transpileModule(`namespace Reflect { const x = 1; }`, { transformers: { before: [<API key>], }, compilerOptions: { newLine: NewLineKind.<API key>, } }).outputText; }); testBaseline("<API key>", () => { return transpileModule(` class C { foo = 10; static bar = 20 } namespace C { export let x = 10; } `, { transformers: { before: [<API key>], }, compilerOptions: { target: ScriptTarget.ESNext, newLine: NewLineKind.<API key>, } }).outputText; }); testBaseline("<API key>", () => { return transpileModule(` export default (foo: string) => { return 1; } `, { transformers: { before: [replaceNumberWith2], }, compilerOptions: { target: ScriptTarget.ESNext, newLine: NewLineKind.<API key>, } }).outputText; }); testBaseline("<API key>", () => { return transpileModule("", { transformers: { before: [<API key>], }, compilerOptions: { target: ScriptTarget.ESNext, newLine: NewLineKind.<API key>, } }).outputText; function <API key>() { return (sourceFile: SourceFile) => { const result = getMutableClone(sourceFile); result.statements = createNodeArray([ <API key>(/*decorators*/ undefined, /*modifiers*/ undefined, "Foo", /*typeParameters*/ undefined, /*heritageClauses*/ undefined, /*members*/ undefined!), // TODO: GH#18217 <API key>(/*decorators*/ undefined, /*modifiers*/ undefined, createIdentifier("Foo"), createModuleBlock([<API key>()])) ]); return result; }; } }); function <API key>(context: <API key>) { return (sourceFile: SourceFile): SourceFile => { return visitNode(sourceFile); function visitNode<T extends Node>(node: T): T { if (node.kind === SyntaxKind.ModuleBlock) { const block = node as T & ModuleBlock; const statements = createNodeArray([...block.statements]); return updateModuleBlock(block, statements) as typeof block; } return visitEachChild(node, visitNode, context); } }; } testBaseline("<API key>", () => { return transpileModule("export * from './helper';", { transformers: { before: [expandExportStar], }, compilerOptions: { target: ScriptTarget.ESNext, newLine: NewLineKind.<API key>, } }).outputText; function expandExportStar(context: <API key>) { return (sourceFile: SourceFile): SourceFile => { return visitNode(sourceFile); function visitNode<T extends Node>(node: T): T { if (node.kind === SyntaxKind.ExportDeclaration) { const ed = node as Node as ExportDeclaration; const exports = [{ name: "x" }]; const exportSpecifiers = exports.map(e => <API key>(e.name, e.name)); const exportClause = createNamedExports(exportSpecifiers); const newEd = <API key>(ed, ed.decorators, ed.modifiers, exportClause, ed.moduleSpecifier); return newEd as Node as T; } return visitEachChild(node, visitNode, context); } }; } }); testBaseline("<API key>", () => { return transpileModule("", { transformers: { before: [<API key>], }, compilerOptions: { target: ScriptTarget.ES5, module: ModuleKind.System, newLine: NewLineKind.<API key>, } }).outputText; function <API key>(_context: <API key>) { return (sourceFile: SourceFile): SourceFile => { return visitNode(sourceFile); }; function visitNode(sf: SourceFile) { // produce `import * as i0 from './comp'; const importStar = <API key>( /*decorators*/ undefined, /*modifiers*/ undefined, /*importClause*/ createImportClause( /*name*/ undefined, <API key>(createIdentifier("i0")) ), /*moduleSpecifier*/ createLiteral("./comp1")); return <API key>(sf, [importStar]); } } }); testBaseline("<API key>", () => { return transpileModule("", { transformers: { before: [<API key>], }, compilerOptions: { target: ScriptTarget.ES5, newLine: NewLineKind.<API key>, } }).outputText; function <API key>(_context: <API key>) { return (sourceFile: SourceFile): SourceFile => { return visitNode(sourceFile); }; function visitNode(sf: SourceFile) { // produce `class Foo { @Bar baz() {} }`; const classDecl = <API key>([], [], "Foo", /*typeParameters*/ undefined, /*heritageClauses*/ undefined, [ createMethod([createDecorator(createIdentifier("Bar"))], [], undefined, "baz", undefined, undefined, [], undefined, createBlock([])) ]); return <API key>(sf, [classDecl]); } } }); testBaseline("<API key>", () => { return <API key>(`var oldName = undefined;`, { transformers: { afterDeclarations: [<API key>] }, compilerOptions: { newLine: NewLineKind.<API key>, declaration: true } }); }); function <API key>(text: string, opts: TranspileOptions) { const fs = vfs.<API key>(Harness.IO, /*caseSensitive*/ true, { documents: [new documents.TextDocument("/.src/index.ts", text)] }); const host = new fakes.CompilerHost(fs, opts.compilerOptions); const program = createProgram(["/.src/index.ts"], opts.compilerOptions!, host); program.emit(program.getSourceFile("/.src/index.ts"), (p, s, bom) => host.writeFile(p, s, bom), /*cancellationToken*/ undefined, /*onlyDts*/ true, opts.transformers); return fs.readFileSync("/.src/index.d.ts").toString(); } function addSyntheticComment(nodeFilter: (node: Node) => boolean) { return (context: <API key>) => { return (sourceFile: SourceFile): SourceFile => { return visitNode(sourceFile, rootTransform, isSourceFile); }; function rootTransform<T extends Node>(node: T): VisitResult<T> { if (nodeFilter(node)) { setEmitFlags(node, EmitFlags.NoLeadingComments); <API key>(node, [{ kind: SyntaxKind.<API key>, text: "comment", pos: -1, end: -1, hasTrailingNewLine: true }]); } return visitEachChild(node, rootTransform, context); } }; } testBaseline("<API key>", () => { return transpileModule(`const foo = () => void 0 `, { transformers: { before: [addSyntheticComment(isVoidExpression)], }, compilerOptions: { target: ScriptTarget.ES5, newLine: NewLineKind.<API key>, } }).outputText; }); testBaseline("<API key>", () => { return transpileModule(`export const exportedDirectly = 1; const exportedSeparately = 2; export {exportedSeparately}; `, { transformers: { before: [addSyntheticComment(isVariableStatement)], }, compilerOptions: { target: ScriptTarget.ES5, newLine: NewLineKind.<API key>, } }).outputText; }); testBaseline("<API key>", () => { return transpileModule(` // Previous comment on import. import {Value} from 'somewhere'; import * as X from 'somewhere'; // Previous comment on export. export { /* specifier comment */ X, Y} from 'somewhere'; export * from 'somewhere'; export {Value}; `, { transformers: { before: [addSyntheticComment(n => isImportDeclaration(n) || isExportDeclaration(n) || isImportSpecifier(n) || isExportSpecifier(n))], }, compilerOptions: { target: ScriptTarget.ES5, newLine: NewLineKind.<API key>, } }).outputText; }); testBaseline("<API key>", () => { return transpileModule(` // class comment. class Clazz { // original comment 1. static staticProp: number = 1; // original comment 2. instanceProp: number = 2; // original comment 3. constructor(readonly field = 1) {} } `, { transformers: { before: [addSyntheticComment(n => <API key>(n) || <API key>(n) || isClassDeclaration(n) || <API key>(n))], }, compilerOptions: { target: ScriptTarget.ES2015, newLine: NewLineKind.<API key>, } }).outputText; }); testBaseline("<API key>", () => { return transpileModule(` // namespace comment. namespace Foo { export const x = 1; } // another comment. namespace Foo { export const y = 1; } `, { transformers: { before: [addSyntheticComment(n => isModuleDeclaration(n))], }, compilerOptions: { target: ScriptTarget.ES2015, newLine: NewLineKind.<API key>, } }).outputText; }); }); }
package lm.com.framework.encrypt; import java.io.IOException; import java.security.SecureRandom; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESKeySpec; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; public class DESEncrypt { private final static String DES = "DES"; /** * des * * @param encryptString * @param key * @return * @throws Exception */ public static String encode(String encryptString, String key) throws Exception { byte[] bt = encrypt(encryptString.getBytes(), key.getBytes()); String strs = new BASE64Encoder().encode(bt); return strs; } /** * des * * @param decryptString * @param key * @return * @throws IOException * @throws Exception */ public static String decode(String decryptString, String key) throws IOException, Exception { if (decryptString == null || decryptString.trim().isEmpty()) return ""; BASE64Decoder decoder = new BASE64Decoder(); byte[] buf = decoder.decodeBuffer(decryptString); byte[] bt = decrypt(buf, key.getBytes()); return new String(bt); } private static byte[] encrypt(byte[] data, byte[] key) throws Exception { Cipher cipher = cipherInit(data, key, Cipher.ENCRYPT_MODE); return cipher.doFinal(data); } private static byte[] decrypt(byte[] data, byte[] key) throws Exception { Cipher cipher = cipherInit(data, key, Cipher.DECRYPT_MODE); return cipher.doFinal(data); } private static Cipher cipherInit(byte[] data, byte[] key, int cipherValue) throws Exception { SecureRandom sr = new SecureRandom(); /** DESKeySpec **/ DESKeySpec dks = new DESKeySpec(key); /** DESKeySpecSecretKey **/ SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES); SecretKey securekey = keyFactory.generateSecret(dks); /** Cipher **/ Cipher cipher = Cipher.getInstance(DES); /** Cipher **/ cipher.init(cipherValue, securekey, sr); return cipher; } }
package com.desple.view; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; public class PreviewImageCanvas extends JPanel { private BufferedImage image; public PreviewImageCanvas() { image = null; } public Dimension getPreferredSize() { return new Dimension(512, 512); } public void paintComponent(Graphics g) { super.paintComponent(g); if (this.image != null) { g.drawImage(this.image, 0, 0, 512, 512, this); } } public void loadImage(String imageLocation) throws IOException { this.image = ImageIO.read(new File(imageLocation)); repaint(); } public BufferedImage getImage() { return this.image; } public void setImage(BufferedImage image) { this.image = image; repaint(); } }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_79) on Wed Apr 29 14:47:00 PDT 2015 --> <title>org.apache.nutch.crawl (apache-nutch 1.10 API)</title> <meta name="date" content="2015-04-29"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <h1 class="bar"><a href="../../../../org/apache/nutch/crawl/package-summary.html" target="classFrame">org.apache.nutch.crawl</a></h1> <div class="indexContainer"> <h2 title="Interfaces">Interfaces</h2> <ul title="Interfaces"> <li><a href="FetchSchedule.html" title="interface in org.apache.nutch.crawl" target="classFrame"><i>FetchSchedule</i></a></li> </ul> <h2 title="Classes">Classes</h2> <ul title="Classes"> <li><a href="<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame"><API key></a></li> <li><a href="<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame"><API key></a></li> <li><a href="CrawlDatum.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDatum</a></li> <li><a href="CrawlDatum.Comparator.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDatum.Comparator</a></li> <li><a href="CrawlDb.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDb</a></li> <li><a href="CrawlDbFilter.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbFilter</a></li> <li><a href="CrawlDbMerger.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbMerger</a></li> <li><a href="CrawlDbMerger.Merger.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbMerger.Merger</a></li> <li><a href="CrawlDbReader.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader</a></li> <li><a href="CrawlDbReader.<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader.<API key></a></li> <li><a href="CrawlDbReader.<API key>.LineRecordWriter.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader.<API key>.LineRecordWriter</a></li> <li><a href="CrawlDbReader.CrawlDbDumpMapper.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader.CrawlDbDumpMapper</a></li> <li><a href="CrawlDbReader.CrawlDbStatCombiner.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader.CrawlDbStatCombiner</a></li> <li><a href="CrawlDbReader.CrawlDbStatMapper.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader.CrawlDbStatMapper</a></li> <li><a href="CrawlDbReader.CrawlDbStatReducer.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader.CrawlDbStatReducer</a></li> <li><a href="CrawlDbReader.CrawlDbTopNMapper.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader.CrawlDbTopNMapper</a></li> <li><a href="CrawlDbReader.CrawlDbTopNReducer.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReader.CrawlDbTopNReducer</a></li> <li><a href="CrawlDbReducer.html" title="class in org.apache.nutch.crawl" target="classFrame">CrawlDbReducer</a></li> <li><a href="DeduplicationJob.html" title="class in org.apache.nutch.crawl" target="classFrame">DeduplicationJob</a></li> <li><a href="DeduplicationJob.DBFilter.html" title="class in org.apache.nutch.crawl" target="classFrame">DeduplicationJob.DBFilter</a></li> <li><a href="DeduplicationJob.DedupReducer.html" title="class in org.apache.nutch.crawl" target="classFrame">DeduplicationJob.DedupReducer</a></li> <li><a href="DeduplicationJob.StatusUpdateReducer.html" title="class in org.apache.nutch.crawl" target="classFrame">DeduplicationJob.StatusUpdateReducer</a></li> <li><a href="<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame"><API key></a></li> <li><a href="<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame"><API key></a></li> <li><a href="Generator.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator</a></li> <li><a href="Generator.CrawlDbUpdater.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator.CrawlDbUpdater</a></li> <li><a href="Generator.<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator.<API key></a></li> <li><a href="Generator.<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator.<API key></a></li> <li><a href="Generator.HashComparator.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator.HashComparator</a></li> <li><a href="Generator.PartitionReducer.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator.PartitionReducer</a></li> <li><a href="Generator.Selector.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator.Selector</a></li> <li><a href="Generator.SelectorEntry.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator.SelectorEntry</a></li> <li><a href="Generator.<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame">Generator.<API key></a></li> <li><a href="Injector.html" title="class in org.apache.nutch.crawl" target="classFrame">Injector</a></li> <li><a href="Injector.InjectMapper.html" title="class in org.apache.nutch.crawl" target="classFrame">Injector.InjectMapper</a></li> <li><a href="Injector.InjectReducer.html" title="class in org.apache.nutch.crawl" target="classFrame">Injector.InjectReducer</a></li> <li><a href="Inlink.html" title="class in org.apache.nutch.crawl" target="classFrame">Inlink</a></li> <li><a href="Inlinks.html" title="class in org.apache.nutch.crawl" target="classFrame">Inlinks</a></li> <li><a href="LinkDb.html" title="class in org.apache.nutch.crawl" target="classFrame">LinkDb</a></li> <li><a href="LinkDbFilter.html" title="class in org.apache.nutch.crawl" target="classFrame">LinkDbFilter</a></li> <li><a href="LinkDbMerger.html" title="class in org.apache.nutch.crawl" target="classFrame">LinkDbMerger</a></li> <li><a href="LinkDbReader.html" title="class in org.apache.nutch.crawl" target="classFrame">LinkDbReader</a></li> <li><a href="LinkDbReader.LinkDBDumpMapper.html" title="class in org.apache.nutch.crawl" target="classFrame">LinkDbReader.LinkDBDumpMapper</a></li> <li><a href="MapWritable.html" title="class in org.apache.nutch.crawl" target="classFrame">MapWritable</a></li> <li><a href="MD5Signature.html" title="class in org.apache.nutch.crawl" target="classFrame">MD5Signature</a></li> <li><a href="<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame"><API key></a></li> <li><a href="NutchWritable.html" title="class in org.apache.nutch.crawl" target="classFrame">NutchWritable</a></li> <li><a href="Signature.html" title="class in org.apache.nutch.crawl" target="classFrame">Signature</a></li> <li><a href="SignatureComparator.html" title="class in org.apache.nutch.crawl" target="classFrame">SignatureComparator</a></li> <li><a href="SignatureFactory.html" title="class in org.apache.nutch.crawl" target="classFrame">SignatureFactory</a></li> <li><a href="TextMD5Signature.html" title="class in org.apache.nutch.crawl" target="classFrame">TextMD5Signature</a></li> <li><a href="<API key>.html" title="class in org.apache.nutch.crawl" target="classFrame"><API key></a></li> <li><a href="URLPartitioner.html" title="class in org.apache.nutch.crawl" target="classFrame">URLPartitioner</a></li> </ul> </div> </body> </html>
<?php class _Upload { private static $files = array(); /** * Takes a $_FILES array and standardizes it to be the same regardless of number of uploads * * @param array $files Files array to standardize * @return void */ public static function <API key>($files=array()) { if (!count($files)) { return $files; } // loop through files to standardize foreach ($files as $field => $data) { if (!isset(self::$files[$field]) || !is_array(self::$files[$field])) { self::$files[$field] = array(); } $data = array( 'name' => $data['name'], 'type' => $data['type'], 'tmp_name' => $data['tmp_name'], 'size' => $data['size'], 'error' => $data['error'] ); // loop through _FILES to standardize foreach ($data as $key => $value) { self::buildFileArray($key, $value, self::$files[$field], $field); } } // return our cleaner version return self::$files; } /** * Recursively builds an array of files * * @param string $key Upload key that we're processing * @param mixed $value Either a string or an array of the value * @param array $output The referenced array object for manipulation * @param string $path A string for colon-delimited path searching * @return void */ private static function buildFileArray($key, $value, &$output, $path) { if (is_array($value)) { foreach ($value as $sub_key => $sub_value) { if (!isset($output[$sub_key]) || !is_array($output[$sub_key])) { $output[$sub_key] = array(); } $new_path = (empty($path)) ? $sub_key : $path . ':' . $sub_key; self::buildFileArray($key, $sub_value, $output[$sub_key], $new_path); } } else { $output[$key] = $value; // add error message if ($key === 'error') { $error_message = self::<API key>($value); $success_status = ($value === UPLOAD_ERR_OK); $output['error_message'] = $error_message; $output['success'] = $success_status; } elseif ($key === 'size') { $human_readable_size = File::getHumanSize($value); $output['size_human_readable'] = $human_readable_size; } } } /** * Create friendly error messages for upload issues * * @param int $error Error int * @return string */ private static function <API key>($error) { // these errors are PHP-based if ($error === UPLOAD_ERR_OK) { return ''; } elseif ($error === UPLOAD_ERR_INI_SIZE) { return Localization::fetch('<API key>'); } elseif ($error === <API key>) { return Localization::fetch('<API key>'); } elseif ($error === UPLOAD_ERR_PARTIAL) { return Localization::fetch('<API key>'); } elseif ($error === UPLOAD_ERR_NO_FILE) { return Localization::fetch('<API key>'); } elseif ($error === <API key>) { return Localization::fetch('<API key>'); } elseif ($error === <API key>) { return Localization::fetch('<API key>'); } elseif ($error === <API key>) { return Localization::fetch('<API key>'); } else { // we should never, ever see this return Localization::fetch('<API key>'); } } /** * Upload file(s) * * @param string $destination Where the file is going * @param string $id The field took look at in the files array * @return array */ public static function uploadBatch($destination = null, $id = null) { $destination = $destination ?: Request::get('destination'); $id = $id ?: Request::get('id'); $files = self::<API key>($_FILES); $results = array(); // Resizing configuration if ($resize = Request::get('resize')) { $width = Request::get('width', null); $height = Request::get('height', null); $ratio = Request::get('ratio', true); $upsize = Request::get('upsize', false); $quality = Request::get('quality', '75'); } // If $files[$id][0] exists, it means there's an array of images. // If there's not, there's just one. We want to change this to an array. if ( ! isset($files[$id][0])) { $tmp = $files[$id]; unset($files[$id]); $files[$id][] = $tmp; } // Process each image foreach ($files[$id] as $file) { // Image data $path = File::upload($file, $destination); $name = basename($path); // Resize if ($resize) { $image = \Intervention\Image\Image::make(Path::assemble(BASE_PATH, $path)); $resize_folder = Path::assemble($image->dirname, 'resized'); if ( ! Folder::exists($resize_folder)) { Folder::make($resize_folder); } $resize_path = Path::assemble($resize_folder, $image->basename); $path = Path::toAsset($resize_path); $name = basename($path); $image->resize($width, $height, $ratio, $upsize)->save($resize_path, $quality); } $results[] = compact('path', 'name'); } return $results; } }
package example.multiview; import io.db.Connect; import io.db.ConnectFactory; import io.db.FormatResultSet; import io.json.JSONStructureMaker; import io.parcoord.db.MakeTableModel; import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.IOException; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.Map.Entry; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSlider; import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.JTable; import javax.swing.ListSelectionModel; import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.metal.MetalLookAndFeel; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; import model.graph.Edge; import model.graph.EdgeSetValueMaker; import model.graph.GraphFilter; import model.graph.GraphModel; import model.graph.impl.<API key>; import model.matrix.<API key>; import model.matrix.MatrixTableModel; import model.shared.selection.<API key>; import org.apache.log4j.Logger; import org.apache.log4j.<API key>; import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.<API key>; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.node.MissingNode; import org.codehaus.jackson.node.ObjectNode; import swingPlus.graph.GraphCellRenderer; import swingPlus.graph.JGraph; import swingPlus.graph.force.impl.<API key>; import swingPlus.graph.force.impl.<API key>; import swingPlus.matrix.JHeaderRenderer; import swingPlus.matrix.JMatrix; import swingPlus.parcoord.JColumnList; import swingPlus.parcoord.JColumnList2; import swingPlus.parcoord.JParCoord; import swingPlus.shared.MyFrame; import swingPlus.tablelist.ColumnSortControl; import swingPlus.tablelist.<API key>; import ui.StackedRowTableUI; import util.Messages; import util.colour.ColorUtilities; import util.ui.NewMetalTheme; import util.ui.VerticalLabelUI; import example.graph.renderers.node.<API key>; import example.multiview.renderers.edge.<API key>; import example.multiview.renderers.matrix.<API key>; import example.multiview.renderers.matrix.<API key>; import example.multiview.renderers.matrix.NumberShadeRenderer; import example.multiview.renderers.node.<API key>; import example.multiview.renderers.node.<API key>; import example.multiview.renderers.node.<API key>; import example.multiview.renderers.node.<API key>; import example.multiview.renderers.node.valuemakers.<API key>; import example.tablelist.renderers.<API key>; public class NapierDBVis { static final Logger LOGGER = Logger.getLogger (NapierDBVis.class); /** * @param args */ public static void main (final String[] args) { //final MetalLookAndFeel lf = new MetalLookAndFeel(); MetalLookAndFeel.setCurrentTheme (new NewMetalTheme()); <API key>.configure (Messages.makeProperties ("log4j")); new NapierDBVis (); } public NapierDBVis () { TableModel tableModel = null; GraphModel graph = null; TableModel listTableModel = null; MatrixTableModel matrixModel = null; Map<JsonNode, String> nodeTypeMap = null; final Properties <API key> = Messages.makeProperties ("dbconnect", this.getClass(), false); final Properties queryProperties = Messages.makeProperties ("queries", this.getClass(), false); final Connect connect = ConnectFactory.getConnect (<API key>); //ResultSet resultSet = null; Statement stmt; try { stmt = connect.getConnection().createStatement(); //final ResultSet resultSet = stmt.executeQuery ("Select * from people where peopleid>0;"); final String peopleDataQuery = queryProperties.get ("PeopleData").toString(); System.err.println (peopleDataQuery); final ResultSet peopleDataResultSet = stmt.executeQuery (peopleDataQuery); final MakeTableModel mtm2 = new MakeTableModel(); tableModel = mtm2.makeTable (peopleDataResultSet); //final ResultSet resultSet = stmt.executeQuery ("Select * from people where peopleid>0;"); final String pubJoinQuery = queryProperties.get ("PublicationJoin").toString(); System.err.println (pubJoinQuery); final ResultSet pubJoinResultSet = stmt.executeQuery (pubJoinQuery); //FormatResultSet.getInstance().printResultSet (resultSet); final MakeTableModel mtm = new MakeTableModel(); TableModel tableModel2 = mtm.makeTable (pubJoinResultSet); //final DatabaseMetaData dmd = connect.getConnection().getMetaData(); //final ResultSet resultSet2 = dmd.getProcedures (connect.getConnection().getCatalog(), null, "%"); //FormatResultSet.getInstance().printResultSet (resultSet2); final String pubsByYearQuery = queryProperties.get ("PubsByYear").toString(); System.err.println (pubsByYearQuery); final ResultSet pubsByYearResultSet = stmt.executeQuery (pubsByYearQuery); final MakeTableModel mtm3 = new MakeTableModel(); TableModel tableModel3 = mtm3.makeTable (pubsByYearResultSet); listTableModel = makePubByYearTable (tableModel3); Map<Object, KeyedData> keyDataMap = makeKeyedDataMap (tableModel, 0, 1); graph = makeGraph (keyDataMap, "peopleid", tableModel2); matrixModel = new <API key> (graph); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); connect.close(); } connect.close(); System.err.println (tableModel == null ? "no model" : "tableModel rows: "+tableModel.getRowCount()+", cols: "+tableModel.getColumnCount()); /* try { final ObjectMapper objMapper = new ObjectMapper (); final JsonNode rootNode = objMapper.readValue (new File (fileName), JsonNode.class); LOGGER.info ("rootnode: "+rootNode); final JSONStructureMaker structureMaker = new JSONStructureMaker (rootNode); graph = structureMaker.makeGraph (new String[] {"people"}, new String[] {"publications", "grants"}); //graph = structureMaker.makeGraph (new String[] {"grants"}, new String[] {"publications", "people"}); //graph = structureMaker.makeGraph (new String[] {"publications", "people", "grants"}, new String[] {"people"}); //tableModel = structureMaker.makeTable ("publications"); tableModel = structureMaker.makeTable ("people"); matrixModel = new <API key> (graph); nodeTypeMap = structureMaker.makeNodeTypeMap (new String[] {"publications", "people", "grants"}); } catch (JsonParseException e) { e.printStackTrace(); } catch (<API key> e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } */ Map<Object, Integer> keyRowMap = makeKeyRowMap (tableModel, 0); final JGraph jgraph = new JGraph (graph); final <API key> edgeWeighter = new <API key> (); jgraph.<API key> (edgeWeighter); jgraph.setShowEdges (true); final EdgeSetValueMaker weightedEdgeMaker = new <API key> (); //final GraphCellRenderer tableTupleRenderer = new <API key> (tableModel, keyRowMap); final GraphCellRenderer jsonGraphRenderer = new <API key> (nodeTypeMap); jgraph.<API key> (String.class, new <API key> (10.0)); jgraph.<API key> (JsonNode.class, jsonGraphRenderer); jgraph.<API key> (ObjectNode.class, jsonGraphRenderer); jgraph.<API key> (KeyedData.class, new <API key> (weightedEdgeMaker)); jgraph.<API key> (Integer.class, new <API key> ()); jgraph.<API key> (KeyedData.class, new <API key> ()); final JTable pubTable = new <API key> (listTableModel); //final JTable jtable3 = new JTable (dtm); pubTable.setSelectionMode (ListSelectionModel.<API key>); pubTable.<API key> (true); //jt2.<API key> (true); pubTable.setRowSorter (new TableRowSorter<DefaultTableModel> ((DefaultTableModel)listTableModel)); final StackedRowTableUI tlui = new StackedRowTableUI (); pubTable.setUI (tlui); tlui.setRelativeLayout (true); final Color[] columnColours = new Color [pubTable.getColumnCount() - 1]; for (int n = 0; n < columnColours.length; n++) { double perc = (double)n / columnColours.length; columnColours[n] = ColorUtilities.mixColours (Color.orange, new Color (0, 128, 255), (float)perc); } pubTable.getTableHeader().<API key>(true); pubTable.getTableHeader().setResizingAllowed(false); System.err.println ("ptc: "+pubTable.getColumnModel().getColumnCount()); for (int col = 1; col < pubTable.getColumnCount(); col++) { System.err.println ("col: "+col+", ptyc: "+pubTable.getColumnModel().getColumn(col)); pubTable.getColumnModel().getColumn(col).setCellRenderer (new <API key> (columnColours [(col - 1) % columnColours.length])); } final JColumnList jcl = new JColumnList (pubTable) { @Override public boolean isCellEditable (final int row, final int column) { return super.isCellEditable (row, column) && row > 0; } }; //jcl.addTable (pubTable); final JMatrix jmatrix = new JMatrix ((TableModel) matrixModel); //final JHeaderRenderer stringHeader = new <API key> (); //final JHeaderRenderer stringHeader2 = new <API key> (); final JHeaderRenderer stringHeader = new <API key> (); final JHeaderRenderer stringHeader2 = new <API key> (); jmatrix.getRowHeader().setDefaultRenderer (Object.class, stringHeader); jmatrix.getRowHeader().setDefaultRenderer (String.class, stringHeader); jmatrix.getColumnHeader().setDefaultRenderer (Object.class, stringHeader2); jmatrix.getColumnHeader().setDefaultRenderer (String.class, stringHeader2); ((JLabel)stringHeader2).setUI (new VerticalLabelUI (false)); stringHeader.<API key> (jmatrix.getRowHeader()); stringHeader2.<API key> (jmatrix.getColumnHeader()); //jmatrix.setDefaultRenderer (HashSet.class, stringHeader); jmatrix.setDefaultRenderer (String.class, stringHeader); jmatrix.setDefaultRenderer (Integer.class, new NumberShadeRenderer ()); final JTable table = new JParCoord (tableModel); table.setSelectionMode (ListSelectionModel.<API key>); table.<API key> (true); table.<API key> (true); table.<API key> (true); table.setForeground (Color.lightGray); table.<API key> (Color.orange); if (table instanceof JParCoord) { ((JParCoord)table).<API key> (Color.gray); ((JParCoord)table).<API key> (Color.red); ((JParCoord)table).setSelectedStroke (new BasicStroke (2.0f)); //((JParCoord)table).setBrushing (true); } table.setGridColor (Color.gray); table.<API key> (false); table.setBorder (BorderFactory.createEmptyBorder (24, 2, 24, 2)); if (table.getRowSorter() instanceof TableRowSorter) { final TableRowSorter<? extends TableModel> trs = (TableRowSorter<? extends TableModel>)table.getRowSorter(); } table.setAutoResizeMode (JTable.AUTO_RESIZE_OFF); /* jgraph.setPreferredSize (new Dimension (768, 640)); table.setPreferredSize (new Dimension (768, 384)); table.setMinimumSize (new Dimension (256, 128)); final <API key> selectionBridge = new <API key> (); selectionBridge.addJGraph (jgraph); selectionBridge.addJTable (table); selectionBridge.addJTable (jmatrix); */ SwingUtilities.invokeLater ( new Runnable () { @Override public void run() { final JFrame jf2 = new MyFrame ("JGraph Demo"); jf2.setSize (1024, 768); final JPanel optionPanel = new JPanel (); optionPanel.setLayout (new BoxLayout (optionPanel, BoxLayout.Y_AXIS)); final JSlider llengthSlider = new JSlider (20, 1000, (int)edgeWeighter.getLinkLength()); llengthSlider.addChangeListener( new ChangeListener () { @Override public void stateChanged (final ChangeEvent cEvent) { edgeWeighter.setLinkLength (llengthSlider.getValue()); } } ); final JSlider lstiffSlider = new JSlider (20, 1000, edgeWeighter.getStiffness()); lstiffSlider.addChangeListener( new ChangeListener () { @Override public void stateChanged (final ChangeEvent cEvent) { edgeWeighter.setStiffness (lstiffSlider.getValue()); } } ); final JSlider repulseSlider = new JSlider (1, 50, 10); repulseSlider.addChangeListener( new ChangeListener () { @Override public void stateChanged (final ChangeEvent cEvent) { ((<API key>)jgraph.<API key>()).setAttenuator (3.0 / repulseSlider.getValue()); } } ); final JCheckBox showSingletons = new JCheckBox ("Show singletons", true); showSingletons.addActionListener ( new ActionListener () { @Override public void actionPerformed (final ActionEvent e) { final Object source = e.getSource(); if (source instanceof JCheckBox) { final boolean selected = ((JCheckBox)source).isSelected(); final GraphFilter singletonFilter = new GraphFilter () { @Override public boolean includeNode (final Object obj) { return jgraph.getModel().getEdges(obj).size() > 0 || selected; } @Override public boolean includeEdge (final Edge edge) { return true; } }; jgraph.setGraphFilter (singletonFilter); } } } ); final JButton clearSelections = new JButton ("Clear Selections"); clearSelections.addActionListener ( new ActionListener () { @Override public void actionPerformed (ActionEvent e) { jgraph.getSelectionModel().clearSelection (); } } ); final JButton graphFreezer = new JButton ("Freeze Graph"); graphFreezer.addActionListener ( new ActionListener () { @Override public void actionPerformed (ActionEvent e) { jgraph.pauseWorker(); } } ); optionPanel.add (new JLabel ("Link Length:")); optionPanel.add (llengthSlider); optionPanel.add (new JLabel ("Link Stiffness:")); optionPanel.add (lstiffSlider); optionPanel.add (new JLabel ("Repulse Strength:")); optionPanel.add (repulseSlider); optionPanel.add (showSingletons); optionPanel.add (clearSelections); optionPanel.add (graphFreezer); JPanel listTablePanel = new JPanel (new BorderLayout ()); listTablePanel.add (new JScrollPane (pubTable), BorderLayout.CENTER); final Box pubControlPanel = Box.createVerticalBox(); final JScrollPane pubTableScrollPane = new JScrollPane (pubControlPanel); pubTableScrollPane.setPreferredSize (new Dimension (168, 400)); jcl.getColumnModel().getColumn(1).setWidth (30); listTablePanel.add (pubTableScrollPane, BorderLayout.WEST); JTable columnSorter = new ColumnSortControl (pubTable); pubControlPanel.add (jcl.getTableHeader()); pubControlPanel.add (jcl); pubControlPanel.add (columnSorter.getTableHeader()); pubControlPanel.add (columnSorter); JScrollPane parCoordsScrollPane = new JScrollPane (table); JScrollPane matrixScrollPane = new JScrollPane (jmatrix); JTabbedPane jtp = new JTabbedPane (); JPanel graphPanel = new JPanel (new BorderLayout ()); graphPanel.add (jgraph, BorderLayout.CENTER); graphPanel.add (optionPanel, BorderLayout.WEST); jtp.addTab ("Node-Link", graphPanel); jtp.addTab ("Matrix", matrixScrollPane); jtp.addTab ("Pubs", listTablePanel); jtp.addTab ("||-Coords", parCoordsScrollPane); jtp.setPreferredSize(new Dimension (800, 480)); //jf2.getContentPane().add (optionPanel, BorderLayout.EAST); jf2.getContentPane().add (jtp, BorderLayout.CENTER); //jf2.getContentPane().add (tableScrollPane, BorderLayout.SOUTH); jf2.setVisible (true); } } ); } public GraphModel makeGraph (final ResultSet nodeSet, final ResultSet edgeSet) throws SQLException { edgeSet.beforeFirst(); final GraphModel graph = new <API key> (); // Look through the rootnode for fields named 'nodeType' // Add that nodeTypes' subfields as nodes to a graph while (edgeSet.next()) { Object author1 = edgeSet.getObject(1); Object author2 = edgeSet.getObject(2); graph.addNode (author1); graph.addNode (author2); final Set<Edge> edges = graph.getEdges (author1, author2); if (edges.isEmpty()) { graph.addEdge (author1, author2, Integer.valueOf (1)); } else { final Iterator<Edge> edgeIter = edges.iterator(); final Edge firstEdge = edgeIter.next(); final Integer val = (Integer)firstEdge.getEdgeObject(); firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1)); //graph.removeEdge (firstEdge); //graph.addEdge (node1, node2, Integer.valueOf (val.intValue() + 1)); } } return graph; } public GraphModel makeGraph (final TableModel nodes, final String primaryKeyColumn, final TableModel edges) throws SQLException { final GraphModel graph = new <API key> (); final Map<Object, Integer> primaryKeyRowMap = new HashMap<Object, Integer> (); for (int row = 0; row < nodes.getRowCount(); row++) { primaryKeyRowMap.put (nodes.getValueAt (row, 0), Integer.valueOf (row)); } // Look through the rootnode for fields named 'nodeType' // Add that nodeTypes' subfields as nodes to a graph for (int row = 0; row < edges.getRowCount(); row++) { Object authorKey1 = edges.getValueAt (row, 0); Object authorKey2 = edges.getValueAt (row, 1); int authorIndex1 = (primaryKeyRowMap.get(authorKey1) == null ? -1 : primaryKeyRowMap.get(authorKey1).intValue()); int authorIndex2 = (primaryKeyRowMap.get(authorKey2) == null ? -1 : primaryKeyRowMap.get(authorKey2).intValue()); if (authorIndex1 >= 0 && authorIndex2 >= 0) { Object graphNode1 = nodes.getValueAt (authorIndex1, 1); Object graphNode2 = nodes.getValueAt (authorIndex2, 1); graph.addNode (graphNode1); graph.addNode (graphNode2); final Set<Edge> gedges = graph.getEdges (graphNode1, graphNode2); if (gedges.isEmpty()) { graph.addEdge (graphNode1, graphNode2, Integer.valueOf (1)); } else { final Iterator<Edge> edgeIter = gedges.iterator(); final Edge firstEdge = edgeIter.next(); final Integer val = (Integer)firstEdge.getEdgeObject(); firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1)); } } } return graph; } public GraphModel makeGraph (final Map<Object, KeyedData> keyDataMap, final String primaryKeyColumn, final TableModel edges) throws SQLException { final GraphModel graph = new <API key> (); // Look through the rootnode for fields named 'nodeType' // Add that nodeTypes' subfields as nodes to a graph for (int row = 0; row < edges.getRowCount(); row++) { Object authorKey1 = edges.getValueAt (row, 0); Object authorKey2 = edges.getValueAt (row, 1); if (authorKey1 != null && authorKey2 != null) { Object graphNode1 = keyDataMap.get (authorKey1); Object graphNode2 = keyDataMap.get (authorKey2); if (graphNode1 != null && graphNode2 != null) { graph.addNode (graphNode1); graph.addNode (graphNode2); final Set<Edge> gedges = graph.getEdges (graphNode1, graphNode2); if (gedges.isEmpty()) { graph.addEdge (graphNode1, graphNode2, Integer.valueOf (1)); } else { final Iterator<Edge> edgeIter = gedges.iterator(); final Edge firstEdge = edgeIter.next(); final Integer val = (Integer)firstEdge.getEdgeObject(); firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1)); } } } } return graph; } public Map<Object, Integer> makeKeyRowMap (final TableModel tableModel, final int columnPKIndex) { final Map<Object, Integer> primaryKeyRowMap = new HashMap<Object, Integer> (); for (int row = 0; row < tableModel.getRowCount(); row++) { primaryKeyRowMap.put (tableModel.getValueAt (row, 0), Integer.valueOf (row)); } return primaryKeyRowMap; } public Map<Object, KeyedData> makeKeyedDataMap (final TableModel tableModel, final int columnPKIndex, final int columnLabelIndex) { final Map<Object, KeyedData> primaryKeyDataMap = new HashMap<Object, KeyedData> (); for (int row = 0; row < tableModel.getRowCount(); row++) { primaryKeyDataMap.put (tableModel.getValueAt (row, columnPKIndex), makeKeyedData (tableModel, columnPKIndex, columnLabelIndex, row)); } return primaryKeyDataMap; } public KeyedData makeKeyedData (final TableModel tableModel, final int columnPKIndex, final int columnLabelIndex, final int rowIndex) { List<Object> data = new ArrayList<Object> (); for (int n = 0; n < tableModel.getColumnCount(); n++) { data.add (tableModel.getValueAt (rowIndex, n)); } KeyedData kd = new KeyedData (tableModel.getValueAt (rowIndex, columnPKIndex), data, columnLabelIndex); return kd; } /** * can't do pivot queries in ANSI SQL * @param sqlresult * @return */ public TableModel makePubByYearTable (final TableModel sqlresult) { DefaultTableModel tm = new DefaultTableModel () { public Class<?> getColumnClass(int columnIndex) { if (columnIndex > 0) { return Long.class; } return Integer.class; } public boolean isCellEditable (final int row, final int column) { return false; } }; Map<Object, List<Long>> yearsToTypes = new HashMap<Object, List<Long>> (); Map<Object, Integer> columnTypes = new HashMap<Object, Integer> (); tm.addColumn ("Year"); int col = 1; for (int sqlrow = 0; sqlrow < sqlresult.getRowCount(); sqlrow++) { Object type = sqlresult.getValueAt (sqlrow, 1); if (columnTypes.get(type) == null) { columnTypes.put(type, Integer.valueOf(col)); tm.addColumn (type); col++; } } System.err.println ("cols: "+columnTypes+", "+columnTypes.size()); for (int sqlrow = 0; sqlrow < sqlresult.getRowCount(); sqlrow++) { Object year = sqlresult.getValueAt (sqlrow, 0); if (year != null) { Object type = sqlresult.getValueAt (sqlrow, 1); Object val = sqlresult.getValueAt (sqlrow, 2); int colIndex = columnTypes.get(type).intValue(); List<Long> store = yearsToTypes.get (year); if (store == null) { Long[] storep = new Long [col - 1]; Arrays.fill (storep, Long.valueOf(0)); List<Long> longs = Arrays.asList (storep); store = new ArrayList (longs); //Collections.fill (store, Long.valueOf (0)); yearsToTypes.put (year, store); } store.set (colIndex - 1, (Long)val); } } for (Entry<Object, List<Long>> yearEntry : yearsToTypes.entrySet()) { Object[] rowData = new Object [col]; rowData[0] = yearEntry.getKey(); for (int n = 1; n < col; n++) { rowData[n] = yearEntry.getValue().get(n-1); } tm.addRow(rowData); } return tm; } }
Minio Gateway adds Amazon S3 compatibility to Backblaze B2 Cloud Storage. ## Run Minio Gateway for Backblaze B2 Cloud Storage Please follow this [guide](https: Using Docker docker run -p 9000:9000 --name b2-s3 \ -e "MINIO_ACCESS_KEY=b2_accound_id" \ -e "MINIO_SECRET_KEY=b2_application_key" \ minio/minio:edge gateway b2 ## Test using Minio Browser Minio Gateway comes with an embedded web based object browser. Point your web browser to http://127.0.0.1:9000 to ensure that your server has started successfully. ![Screenshot](https://raw.githubusercontent.com/minio/minio/master/docs/screenshots/<API key>.png) ## Test using Minio Client `mc` `mc` provides a modern alternative to UNIX commands such as ls, cat, cp, mirror, diff etc. It supports filesystems and Amazon S3 compatible cloud storage services. Configure `mc` mc config host add myb2 http://gateway-ip:9000 b2_account_id b2_application_key List buckets on Backblaze B2 mc ls myb2 [2017-02-22 01:50:43 PST] 0B ferenginar/ [2017-02-26 21:43:51 PST] 0B my-bucket/ [2017-02-26 22:10:11 PST] 0B test-bucket1/ Known limitations Gateway inherits the following B2 limitations: - No support for CopyObject S3 API (There are no equivalent APIs available on Backblaze B2). - No support for CopyObjectPart S3 API (There are no equivalent APIs available on Backblaze B2). - Only read-only bucket policy supported at bucket level, all other variations will return API Notimplemented error. - DeleteObject() might not delete the object right away on Backblaze B2, so you might see the object immediately after a Delete request. Other limitations: - Bucket notification APIs are not supported. ## Explore Further - [`mc` command-line interface](https://docs.minio.io/docs/<API key>) - [`aws` command-line interface](https://docs.minio.io/docs/aws-cli-with-minio) - [`minio-go` Go SDK](https://docs.minio.io/docs/<API key>)
import props from './props'; import './view.html'; class NoteClab { beforeRegister() { this.is = 'note-clab'; this.properties = props; } computeClasses(type) { var arr = ['input-note']; if (type != undefined) arr.push(type); return arr.join(' '); } } Polymer(NoteClab);
package com.umeng.soexample.run.step; public interface UpdateUiCallBack { /** * UI * * @param stepCount */ void updateUi(int stepCount); }
package org.template.similarproduct import io.prediction.controller.LServing import breeze.stats.mean import breeze.stats.meanAndVariance import breeze.stats.MeanAndVariance class Serving extends LServing[Query, PredictedResult] { override def serve(query: Query, predictedResults: Seq[PredictedResult]): PredictedResult = { // MODFIED val standard: Seq[Array[ItemScore]] = if (query.num == 1) { // if query 1 item, don't standardize predictedResults.map(_.itemScores) } else { // Standardize the score before combine val mvList: Seq[MeanAndVariance] = predictedResults.map { pr => meanAndVariance(pr.itemScores.map(_.score)) } predictedResults.zipWithIndex .map { case (pr, i) => pr.itemScores.map { is => // standardize score (z-score) // if standard deviation is 0 (when all items have the same score, // meaning all items are ranked equally), return 0. val score = if (mvList(i).stdDev == 0) { 0 } else { (is.score - mvList(i).mean) / mvList(i).stdDev } ItemScore(is.item, score) } } } // sum the standardized score if same item val combined = standard.flatten // Array of ItemScore .groupBy(_.item) // groupBy item id .mapValues(itemScores => itemScores.map(_.score).reduce(_ + _)) .toArray // array of (item id, score) .sortBy(_._2)(Ordering.Double.reverse) .take(query.num) .map { case (k,v) => ItemScore(k, v) } new PredictedResult(combined) } }
<layout name="layout" /> <div class="row"> <div class="panel panel-info"> <div class="panel-heading"> <h3 class="panel-title"> <{$arr.cate|getCatname=###}>-<b><{$arr.name}></b> <a href="__APP__/<{$JC}>/Servicelist/index/cate/<{$arr.cate}>" class="pull-right"></a> </h3> </div> <div class="panel-body"> <div class="col-md-3 "> <img src="__UPLOAD__<{$arr.path}><{$arr.img}>" alt="<{$arr.img}>" height="180px"> </div> <div class="col-md-7 "> <h5><{$arr.mark}></h5> <h4><{$arr.name}></h4> <h4><b><{$arr.money}></b>(<s><em><{$arr.smoney}></em></s>)</h4> <!--<h4><{$arr.wlmoney}></h4>--> <h5><{$arr.weight}></h5> <a href="#" class="btn btn-info btn-xs"></a> <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=<{$_SESSION[$JC]['qq']}>&amp;site=qq&amp;menu=yes" class="btn-xs" target="_blank"> <img border="0" title="" alt="" style="margin-top:0px;" src="http://wpa.qq.com/pa?p=2:<{$_SESSION[$JC]['qq']}>:41"> </a> </div> </div> </div> <div class="panel panel-info"> <div class="panel-heading"><h3 class="panel-title"></h3></div> <div class="panel-body"><p><{$arr.content}></p></div> </div> </div>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_91) on Mon Jun 06 14:51:11 EDT 2016 --> <title>Lists.Value (apache-cassandra API)</title> <meta name="date" content="2016-06-06"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Lists.Value (apache-cassandra API)"; } } catch(err) { } var methods = {"i0":10,"i1":9,"i2":10,"i3":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/Lists.Value.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/apache/cassandra/cql3/Lists.SetterByIndex.html" title="class in org.apache.cassandra.cql3"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../org/apache/cassandra/cql3/Maps.html" title="class in org.apache.cassandra.cql3"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/apache/cassandra/cql3/Lists.Value.html" target="_top">Frames</a></li> <li><a href="Lists.Value.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <div class="subTitle">org.apache.cassandra.cql3</div> <h2 title="Class Lists.Value" class="title">Class Lists.Value</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html" title="class in org.apache.cassandra.cql3">org.apache.cassandra.cql3.Term.Terminal</a></li> <li> <ul class="inheritance"> <li><a href="../../../../org/apache/cassandra/cql3/Term.MultiItemTerminal.html" title="class in org.apache.cassandra.cql3">org.apache.cassandra.cql3.Term.MultiItemTerminal</a></li> <li> <ul class="inheritance"> <li>org.apache.cassandra.cql3.Lists.Value</li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd><a href="../../../../org/apache/cassandra/cql3/Term.html" title="interface in org.apache.cassandra.cql3">Term</a></dd> </dl> <dl> <dt>Enclosing class:</dt> <dd><a href="../../../../org/apache/cassandra/cql3/Lists.html" title="class in org.apache.cassandra.cql3">Lists</a></dd> </dl> <hr> <br> <pre>public static class <span class="typeNameLabel">Lists.Value</span> extends <a href="../../../../org/apache/cassandra/cql3/Term.MultiItemTerminal.html" title="class in org.apache.cassandra.cql3">Term.MultiItemTerminal</a></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="nested.class.summary"> </a> <h3>Nested Class Summary</h3> <ul class="blockList"> <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.cassandra.cql3.Term"> </a> <h3>Nested classes/interfaces inherited from interface&nbsp;org.apache.cassandra.cql3.<a href="../../../../org/apache/cassandra/cql3/Term.html" title="interface in org.apache.cassandra.cql3">Term</a></h3> <code><a href="../../../../org/apache/cassandra/cql3/Term.MultiColumnRaw.html" title="class in org.apache.cassandra.cql3">Term.MultiColumnRaw</a>, <a href="../../../../org/apache/cassandra/cql3/Term.MultiItemTerminal.html" title="class in org.apache.cassandra.cql3">Term.MultiItemTerminal</a>, <a href="../../../../org/apache/cassandra/cql3/Term.NonTerminal.html" title="class in org.apache.cassandra.cql3">Term.NonTerminal</a>, <a href="../../../../org/apache/cassandra/cql3/Term.Raw.html" title="class in org.apache.cassandra.cql3">Term.Raw</a>, <a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html" title="class in org.apache.cassandra.cql3">Term.Terminal</a></code></li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="field.summary"> </a> <h3>Field Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>java.util.List&lt;java.nio.ByteBuffer&gt;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/cql3/Lists.Value.html#elements">elements</a></span></code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/cql3/Lists.Value.html#Value-java.util.List-">Value</a></span>(java.util.List&lt;java.nio.ByteBuffer&gt;&nbsp;elements)</code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method.summary"> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/cql3/Lists.Value.html#equals-org.apache.cassandra.db.marshal.ListType-org.apache.cassandra.cql3.Lists.Value-">equals</a></span>(<a href="../../../../org/apache/cassandra/db/marshal/ListType.html" title="class in org.apache.cassandra.db.marshal">ListType</a>&nbsp;lt, <a href="../../../../org/apache/cassandra/cql3/Lists.Value.html" title="class in org.apache.cassandra.cql3">Lists.Value</a>&nbsp;v)</code>&nbsp;</td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>static <a href="../../../../org/apache/cassandra/cql3/Lists.Value.html" title="class in org.apache.cassandra.cql3">Lists.Value</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/cql3/Lists.Value.html#fromSerialized-java.nio.ByteBuffer-org.apache.cassandra.db.marshal.ListType-int-">fromSerialized</a></span>(java.nio.ByteBuffer&nbsp;value, <a href="../../../../org/apache/cassandra/db/marshal/ListType.html" title="class in org.apache.cassandra.db.marshal">ListType</a>&nbsp;type, int&nbsp;version)</code>&nbsp;</td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>java.nio.ByteBuffer</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/cql3/Lists.Value.html#get-int-">get</a></span>(int&nbsp;protocolVersion)</code>&nbsp;</td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>java.util.List&lt;java.nio.ByteBuffer&gt;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cassandra/cql3/Lists.Value.html#getElements--">getElements</a></span>()</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.org.apache.cassandra.cql3.Term.Terminal"> </a> <h3>Methods inherited from class&nbsp;org.apache.cassandra.cql3.<a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html" title="class in org.apache.cassandra.cql3">Term.Terminal</a></h3> <code><a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html#addFunctionsTo-java.util.List-">addFunctionsTo</a>, <a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html#bind-org.apache.cassandra.cql3.QueryOptions-">bind</a>, <a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html#bindAndGet-org.apache.cassandra.cql3.QueryOptions-">bindAndGet</a>, <a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html#<API key>.apache.cassandra.cql3.<API key>-"><API key></a>, <a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html#containsBindMarker--">containsBindMarker</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="field.detail"> </a> <h3>Field Detail</h3> <a name="elements"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>elements</h4> <pre>public final&nbsp;java.util.List&lt;java.nio.ByteBuffer&gt; elements</pre> </li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> </a> <h3>Constructor Detail</h3> <a name="Value-java.util.List-"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>Value</h4> <pre>public&nbsp;Value(java.util.List&lt;java.nio.ByteBuffer&gt;&nbsp;elements)</pre> </li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method.detail"> </a> <h3>Method Detail</h3> <a name="fromSerialized-java.nio.ByteBuffer-org.apache.cassandra.db.marshal.ListType-int-"> </a> <ul class="blockList"> <li class="blockList"> <h4>fromSerialized</h4> <pre>public static&nbsp;<a href="../../../../org/apache/cassandra/cql3/Lists.Value.html" title="class in org.apache.cassandra.cql3">Lists.Value</a>&nbsp;fromSerialized(java.nio.ByteBuffer&nbsp;value, <a href="../../../../org/apache/cassandra/db/marshal/ListType.html" title="class in org.apache.cassandra.db.marshal">ListType</a>&nbsp;type, int&nbsp;version) throws <a href="../../../../org/apache/cassandra/exceptions/<API key>.html" title="class in org.apache.cassandra.exceptions"><API key></a></pre> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../org/apache/cassandra/exceptions/<API key>.html" title="class in org.apache.cassandra.exceptions"><API key></a></code></dd> </dl> </li> </ul> <a name="get-int-"> </a> <ul class="blockList"> <li class="blockList"> <h4>get</h4> <pre>public&nbsp;java.nio.ByteBuffer&nbsp;get(int&nbsp;protocolVersion)</pre> <dl> <dt><span class="<API key>">Specified by:</span></dt> <dd><code><a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html#get-int-">get</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cassandra/cql3/Term.Terminal.html" title="class in org.apache.cassandra.cql3">Term.Terminal</a></code></dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the serialized value of this terminal.</dd> </dl> </li> </ul> <a name="equals-org.apache.cassandra.db.marshal.ListType-org.apache.cassandra.cql3.Lists.Value-"> </a> <ul class="blockList"> <li class="blockList"> <h4>equals</h4> <pre>public&nbsp;boolean&nbsp;equals(<a href="../../../../org/apache/cassandra/db/marshal/ListType.html" title="class in org.apache.cassandra.db.marshal">ListType</a>&nbsp;lt, <a href="../../../../org/apache/cassandra/cql3/Lists.Value.html" title="class in org.apache.cassandra.cql3">Lists.Value</a>&nbsp;v)</pre> </li> </ul> <a name="getElements </a> <ul class="blockListLast"> <li class="blockList"> <h4>getElements</h4> <pre>public&nbsp;java.util.List&lt;java.nio.ByteBuffer&gt;&nbsp;getElements()</pre> <dl> <dt><span class="<API key>">Specified by:</span></dt> <dd><code><a href="../../../../org/apache/cassandra/cql3/Term.MultiItemTerminal.html#getElements--">getElements</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cassandra/cql3/Term.MultiItemTerminal.html" title="class in org.apache.cassandra.cql3">Term.MultiItemTerminal</a></code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/Lists.Value.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/apache/cassandra/cql3/Lists.SetterByIndex.html" title="class in org.apache.cassandra.cql3"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../org/apache/cassandra/cql3/Maps.html" title="class in org.apache.cassandra.cql3"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/apache/cassandra/cql3/Lists.Value.html" target="_top">Frames</a></li> <li><a href="Lists.Value.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> </a></div> <p class="legalCopy"><small>Copyright &copy; 2016 The Apache Software Foundation</small></p> </body> </html>
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/<API key>.proto #define <API key> #include <google/protobuf/<API key>.pb.h> #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/<API key>.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/<API key>.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> // @@<API key>(includes) namespace <API key> { class <API key> : public ::google::protobuf::internal::<API key><MyMessage> { public: int oneof_e_1_; int oneof_e_2_; } <API key>; namespace <API key> { namespace { ::google::protobuf::Metadata file_level_metadata[1]; const ::google::protobuf::EnumDescriptor* <API key>[1]; } // namespace <API key> ::google::protobuf::internal::ParseTableField const TableStruct::entries[] = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; <API key> ::google::protobuf::internal::<API key> const TableStruct::aux[] = { ::google::protobuf::internal::<API key>(), }; <API key> ::google::protobuf::internal::ParseTable const TableStruct::schema[] = { { NULL, NULL, 0, -1, -1, false }, }; const ::google::protobuf::uint32 TableStruct::offsets[] = { <API key>(MyMessage, _has_bits_), <API key>(MyMessage, _internal_metadata_), ~0u, // no _extensions_ <API key>(MyMessage, _oneof_case_[0]), ~0u, // no _weak_field_map_ <API key>(MyMessage, e_), <API key>(MyMessage, repeated_e_), <API key>(MyMessage, repeated_packed_e_), <API key>(MyMessage, <API key>), <API key>((&<API key>), oneof_e_1_), <API key>((&<API key>), oneof_e_2_), <API key>(MyMessage, o_), 0, ~0u, ~0u, ~0u, ~0u, ~0u, }; static const ::google::protobuf::internal::MigrationSchema schemas[] = { { 0, 12, sizeof(MyMessage)}, }; static ::google::protobuf::Message const * const <API key>[] = { reinterpret_cast<const ::google::protobuf::Message*>(&<API key>), }; namespace { void <API key>() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( "google/protobuf/<API key>.proto", schemas, <API key>, TableStruct::offsets, factory, file_level_metadata, <API key>, NULL); } void <API key>() { static <API key>(once); ::google::protobuf::GoogleOnceInit(&once, &<API key>); } void <API key>(const ::std::string&) <API key>; void <API key>(const ::std::string&) { <API key>(); ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); } } // namespace void TableStruct::Shutdown() { <API key>.Shutdown(); delete file_level_metadata[0].reflection; } void TableStruct::InitDefaultsImpl() { <API key>; ::google::protobuf::internal::<API key>(); <API key>.DefaultConstruct(); <API key>.oneof_e_1_ = 0; <API key>.oneof_e_2_ = 0; } void InitDefaults() { static <API key>(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] = { "\n5google/protobuf/<API key>" "own_enum2.proto\022%<API key>" "_enum_unittest\"\270\003\n\tMyMessage\0228\n\001e\030\001 \001(\0162" "-.<API key>." "MyEnum\022A\n\nrepeated_e\030\002 \003(\0162-.proto2_pres" "<API key>.MyEnum\022L\n\021rep" "eated_packed_e\030\003 \003(\0162-.proto2_preserve_u" "<API key>.MyEnumB\002\020\001\022S\n\034repea" "<API key>\030\004 \003(\0162-.proto2_p" "<API key>.MyEnum\022B\n\t" "oneof_e_1\030\005 \001(\0162-.<API key>" "n_enum_unittest.MyEnumH\000\022B\n\toneof_e_2\030\006 " "\001(\0162-.<API key>" "est.MyEnumH\000B\003\n\001o*#\n\006MyEnum\022\007\n\003FOO\020\000\022\007\n\003" "BAR\020\001\022\007\n\003BAZ\020\002" }; ::google::protobuf::DescriptorPool::<API key>( descriptor, 574); ::google::protobuf::MessageFactory::<API key>( "google/protobuf/<API key>.proto", &<API key>); ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } void AddDescriptors() { static <API key>(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } // Force AddDescriptors() to be called at static initialization time. struct <API key> { <API key>() { AddDescriptors(); } } <API key>; } // namespace <API key> const ::google::protobuf::EnumDescriptor* MyEnum_descriptor() { <API key>::<API key>(); return <API key>::<API key>[0]; } bool MyEnum_IsValid(int value) { switch (value) { case 0: case 1: case 2: return true; default: return false; } } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int MyMessage::kEFieldNumber; const int MyMessage::<API key>; const int MyMessage::<API key>; const int MyMessage::<API key>; const int MyMessage::kOneofE1FieldNumber; const int MyMessage::kOneofE2FieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MyMessage::MyMessage() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != <API key>())) { <API key>::InitDefaults(); } SharedCtor(); // @@<API key>(constructor:<API key>.MyMessage) } MyMessage::MyMessage(const MyMessage& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), _has_bits_(from._has_bits_), _cached_size_(0), repeated_e_(from.repeated_e_), repeated_packed_e_(from.repeated_packed_e_), <API key>(from.<API key>) { _internal_metadata_.MergeFrom(from._internal_metadata_); e_ = from.e_; clear_has_o(); switch (from.o_case()) { case kOneofE1: { set_oneof_e_1(from.oneof_e_1()); break; } case kOneofE2: { set_oneof_e_2(from.oneof_e_2()); break; } case O_NOT_SET: { break; } } // @@<API key>(copy_constructor:<API key>.MyMessage) } void MyMessage::SharedCtor() { _cached_size_ = 0; e_ = 0; clear_has_o(); } MyMessage::~MyMessage() { // @@<API key>(destructor:<API key>.MyMessage) SharedDtor(); } void MyMessage::SharedDtor() { if (has_o()) { clear_o(); } } void MyMessage::SetCachedSize(int size) const { <API key>(); _cached_size_ = size; <API key>(); } const ::google::protobuf::Descriptor* MyMessage::descriptor() { <API key>::<API key>(); return <API key>::file_level_metadata[<API key>].descriptor; } const MyMessage& MyMessage::default_instance() { <API key>::InitDefaults(); return *<API key>(); } MyMessage* MyMessage::New(::google::protobuf::Arena* arena) const { MyMessage* n = new MyMessage; if (arena != NULL) { arena->Own(n); } return n; } void MyMessage::clear_o() { // @@<API key>(one_of_clear_start:<API key>.MyMessage) switch (o_case()) { case kOneofE1: { // No need to clear break; } case kOneofE2: { // No need to clear break; } case O_NOT_SET: { break; } } _oneof_case_[0] = O_NOT_SET; } void MyMessage::Clear() { // @@<API key>(message_clear_start:<API key>.MyMessage) repeated_e_.Clear(); repeated_packed_e_.Clear(); <API key>.Clear(); e_ = 0; clear_o(); _has_bits_.Clear(); _internal_metadata_.Clear(); } bool MyMessage::<API key>( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@<API key>(parse_start:<API key>.MyMessage) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input-><API key>(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional .<API key>.MyEnum e = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::<API key>::MyEnum_IsValid(value)) { set_e(static_cast< ::<API key>::MyEnum >(value)); } else { <API key>()->AddVarint(1, value); } } else { goto handle_unusual; } break; } // repeated .<API key>.MyEnum repeated_e = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::<API key>::MyEnum_IsValid(value)) { add_repeated_e(static_cast< ::<API key>::MyEnum >(value)); } else { <API key>()->AddVarint(2, value); } } else if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u)) { DO_((::google::protobuf::internal::WireFormat::<API key>( input, 2, ::<API key>::MyEnum_IsValid, <API key>(), this->mutable_repeated_e()))); } else { goto handle_unusual; } break; } // repeated .<API key>.MyEnum repeated_packed_e = 3 [packed = true]; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u)) { ::google::protobuf::uint32 length; DO_(input->ReadVarint32(&length)); ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(length); while (input->BytesUntilLimit() > 0) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::<API key>::MyEnum_IsValid(value)) { <API key>(static_cast< ::<API key>::MyEnum >(value)); } else { <API key>()->AddVarint(3, value); } } input->PopLimit(limit); } else if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::<API key>::MyEnum_IsValid(value)) { <API key>(static_cast< ::<API key>::MyEnum >(value)); } else { <API key>()->AddVarint(3, value); } } else { goto handle_unusual; } break; } // repeated .<API key>.MyEnum <API key> = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::<API key>::MyEnum_IsValid(value)) { <API key>(static_cast< ::<API key>::MyEnum >(value)); } else { <API key>()->AddVarint(4, value); } } else if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u)) { DO_((::google::protobuf::internal::WireFormat::<API key>( input, 4, ::<API key>::MyEnum_IsValid, <API key>(), this-><API key>()))); } else { goto handle_unusual; } break; } // optional .<API key>.MyEnum oneof_e_1 = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(40u)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::<API key>::MyEnum_IsValid(value)) { set_oneof_e_1(static_cast< ::<API key>::MyEnum >(value)); } else { <API key>()->AddVarint(5, value); } } else { goto handle_unusual; } break; } // optional .<API key>.MyEnum oneof_e_2 = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(48u)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::<API key>::MyEnum_IsValid(value)) { set_oneof_e_2(static_cast< ::<API key>::MyEnum >(value)); } else { <API key>()->AddVarint(6, value); } } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, <API key>())); break; } } } success: // @@<API key>(parse_success:<API key>.MyMessage) return true; failure: // @@<API key>(parse_failure:<API key>.MyMessage) return false; #undef DO_ } void MyMessage::<API key>( ::google::protobuf::io::CodedOutputStream* output) const { // @@<API key>(serialize_start:<API key>.MyMessage) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional .<API key>.MyEnum e = 1; if (cached_has_bits & 0x00000001u) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->e(), output); } // repeated .<API key>.MyEnum repeated_e = 2; for (int i = 0, n = this->repeated_e_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 2, this->repeated_e(i), output); } // repeated .<API key>.MyEnum repeated_packed_e = 3 [packed = true]; if (this-><API key>() > 0) { ::google::protobuf::internal::WireFormatLite::WriteTag( 3, ::google::protobuf::internal::WireFormatLite::<API key>, output); output->WriteVarint32(<API key>); } for (int i = 0, n = this-><API key>(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag( this->repeated_packed_e(i), output); } // repeated .<API key>.MyEnum <API key> = 4; for (int i = 0, n = this-><API key>(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 4, this-><API key>(i), output); } switch (o_case()) { case kOneofE1: ::google::protobuf::internal::WireFormatLite::WriteEnum( 5, this->oneof_e_1(), output); break; case kOneofE2: ::google::protobuf::internal::WireFormatLite::WriteEnum( 6, this->oneof_e_2(), output); break; default: ; } if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::<API key>( unknown_fields(), output); } // @@<API key>(serialize_end:<API key>.MyMessage) } ::google::protobuf::uint8* MyMessage::<API key>( bool deterministic, ::google::protobuf::uint8* target) const { // @@<API key>(<API key>:<API key>.MyMessage) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional .<API key>.MyEnum e = 1; if (cached_has_bits & 0x00000001u) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->e(), target); } // repeated .<API key>.MyEnum repeated_e = 2; target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 2, this->repeated_e_, target); // repeated .<API key>.MyEnum repeated_packed_e = 3 [packed = true]; if (this-><API key>() > 0) { target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( 3, ::google::protobuf::internal::WireFormatLite::<API key>, target); target = ::google::protobuf::io::CodedOutputStream::<API key>( <API key>, target); target = ::google::protobuf::internal::WireFormatLite::<API key>( this->repeated_packed_e_, target); } // repeated .<API key>.MyEnum <API key> = 4; target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 4, this-><API key>, target); switch (o_case()) { case kOneofE1: target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 5, this->oneof_e_1(), target); break; case kOneofE2: target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 6, this->oneof_e_2(), target); break; default: ; } if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::<API key>( unknown_fields(), target); } // @@<API key>(<API key>:<API key>.MyMessage) return target; } size_t MyMessage::ByteSizeLong() const { // @@<API key>(<API key>:<API key>.MyMessage) size_t total_size = 0; if (_internal_metadata_.have_unknown_fields()) { total_size += ::google::protobuf::internal::WireFormat::<API key>( unknown_fields()); } // repeated .<API key>.MyEnum repeated_e = 2; { size_t data_size = 0; unsigned int count = this->repeated_e_size();for (unsigned int i = 0; i < count; i++) { data_size += ::google::protobuf::internal::WireFormatLite::EnumSize( this->repeated_e(i)); } total_size += (1UL * count) + data_size; } // repeated .<API key>.MyEnum repeated_packed_e = 3 [packed = true]; { size_t data_size = 0; unsigned int count = this-><API key>();for (unsigned int i = 0; i < count; i++) { data_size += ::google::protobuf::internal::WireFormatLite::EnumSize( this->repeated_packed_e(i)); } if (data_size > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); } int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); <API key>(); <API key> = cached_size; <API key>(); total_size += data_size; } // repeated .<API key>.MyEnum <API key> = 4; { size_t data_size = 0; unsigned int count = this-><API key>();for (unsigned int i = 0; i < count; i++) { data_size += ::google::protobuf::internal::WireFormatLite::EnumSize( this-><API key>(i)); } total_size += (1UL * count) + data_size; } // optional .<API key>.MyEnum e = 1; if (has_e()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->e()); } switch (o_case()) { // optional .<API key>.MyEnum oneof_e_1 = 5; case kOneofE1: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->oneof_e_1()); break; } // optional .<API key>.MyEnum oneof_e_2 = 6; case kOneofE2: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->oneof_e_2()); break; } case O_NOT_SET: { break; } } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); <API key>(); _cached_size_ = cached_size; <API key>(); return total_size; } void MyMessage::MergeFrom(const ::google::protobuf::Message& from) { // @@<API key>(<API key>:<API key>.MyMessage) GOOGLE_DCHECK_NE(&from, this); const MyMessage* source = ::google::protobuf::internal::<API key><const MyMessage>( &from); if (source == NULL) { // @@<API key>(<API key>:<API key>.MyMessage) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@<API key>(<API key>:<API key>.MyMessage) MergeFrom(*source); } } void MyMessage::MergeFrom(const MyMessage& from) { // @@<API key>(<API key>:<API key>.MyMessage) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; repeated_e_.MergeFrom(from.repeated_e_); repeated_packed_e_.MergeFrom(from.repeated_packed_e_); <API key>.MergeFrom(from.<API key>); if (from.has_e()) { set_e(from.e()); } switch (from.o_case()) { case kOneofE1: { set_oneof_e_1(from.oneof_e_1()); break; } case kOneofE2: { set_oneof_e_2(from.oneof_e_2()); break; } case O_NOT_SET: { break; } } } void MyMessage::CopyFrom(const ::google::protobuf::Message& from) { // @@<API key>(<API key>:<API key>.MyMessage) if (&from == this) return; Clear(); MergeFrom(from); } void MyMessage::CopyFrom(const MyMessage& from) { // @@<API key>(<API key>:<API key>.MyMessage) if (&from == this) return; Clear(); MergeFrom(from); } bool MyMessage::IsInitialized() const { return true; } void MyMessage::Swap(MyMessage* other) { if (other == this) return; InternalSwap(other); } void MyMessage::InternalSwap(MyMessage* other) { repeated_e_.InternalSwap(&other->repeated_e_); repeated_packed_e_.InternalSwap(&other->repeated_packed_e_); <API key>.InternalSwap(&other-><API key>); std::swap(e_, other->e_); std::swap(o_, other->o_); std::swap(_oneof_case_[0], other->_oneof_case_[0]); std::swap(_has_bits_[0], other->_has_bits_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata MyMessage::GetMetadata() const { <API key>::<API key>(); return <API key>::file_level_metadata[<API key>]; } #if <API key> // MyMessage // optional .<API key>.MyEnum e = 1; bool MyMessage::has_e() const { return (_has_bits_[0] & 0x00000001u) != 0; } void MyMessage::set_has_e() { _has_bits_[0] |= 0x00000001u; } void MyMessage::clear_has_e() { _has_bits_[0] &= ~0x00000001u; } void MyMessage::clear_e() { e_ = 0; clear_has_e(); } ::<API key>::MyEnum MyMessage::e() const { // @@<API key>(field_get:<API key>.MyMessage.e) return static_cast< ::<API key>::MyEnum >(e_); } void MyMessage::set_e(::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); set_has_e(); e_ = value; // @@<API key>(field_set:<API key>.MyMessage.e) } // repeated .<API key>.MyEnum repeated_e = 2; int MyMessage::repeated_e_size() const { return repeated_e_.size(); } void MyMessage::clear_repeated_e() { repeated_e_.Clear(); } ::<API key>::MyEnum MyMessage::repeated_e(int index) const { // @@<API key>(field_get:<API key>.MyMessage.repeated_e) return static_cast< ::<API key>::MyEnum >(repeated_e_.Get(index)); } void MyMessage::set_repeated_e(int index, ::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); repeated_e_.Set(index, value); // @@<API key>(field_set:<API key>.MyMessage.repeated_e) } void MyMessage::add_repeated_e(::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); repeated_e_.Add(value); // @@<API key>(field_add:<API key>.MyMessage.repeated_e) } const ::google::protobuf::RepeatedField<int>& MyMessage::repeated_e() const { // @@<API key>(field_list:<API key>.MyMessage.repeated_e) return repeated_e_; } ::google::protobuf::RepeatedField<int>* MyMessage::mutable_repeated_e() { // @@<API key>(field_mutable_list:<API key>.MyMessage.repeated_e) return &repeated_e_; } // repeated .<API key>.MyEnum repeated_packed_e = 3 [packed = true]; int MyMessage::<API key>() const { return repeated_packed_e_.size(); } void MyMessage::<API key>() { repeated_packed_e_.Clear(); } ::<API key>::MyEnum MyMessage::repeated_packed_e(int index) const { // @@<API key>(field_get:<API key>.MyMessage.repeated_packed_e) return static_cast< ::<API key>::MyEnum >(repeated_packed_e_.Get(index)); } void MyMessage::<API key>(int index, ::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); repeated_packed_e_.Set(index, value); // @@<API key>(field_set:<API key>.MyMessage.repeated_packed_e) } void MyMessage::<API key>(::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); repeated_packed_e_.Add(value); // @@<API key>(field_add:<API key>.MyMessage.repeated_packed_e) } const ::google::protobuf::RepeatedField<int>& MyMessage::repeated_packed_e() const { // @@<API key>(field_list:<API key>.MyMessage.repeated_packed_e) return repeated_packed_e_; } ::google::protobuf::RepeatedField<int>* MyMessage::<API key>() { // @@<API key>(field_mutable_list:<API key>.MyMessage.repeated_packed_e) return &repeated_packed_e_; } // repeated .<API key>.MyEnum <API key> = 4; int MyMessage::<API key>() const { return <API key>.size(); } void MyMessage::<API key>() { <API key>.Clear(); } ::<API key>::MyEnum MyMessage::<API key>(int index) const { // @@<API key>(field_get:<API key>.MyMessage.<API key>) return static_cast< ::<API key>::MyEnum >(<API key>.Get(index)); } void MyMessage::<API key>(int index, ::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); <API key>.Set(index, value); // @@<API key>(field_set:<API key>.MyMessage.<API key>) } void MyMessage::<API key>(::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); <API key>.Add(value); // @@<API key>(field_add:<API key>.MyMessage.<API key>) } const ::google::protobuf::RepeatedField<int>& MyMessage::<API key>() const { // @@<API key>(field_list:<API key>.MyMessage.<API key>) return <API key>; } ::google::protobuf::RepeatedField<int>* MyMessage::<API key>() { // @@<API key>(field_mutable_list:<API key>.MyMessage.<API key>) return &<API key>; } // optional .<API key>.MyEnum oneof_e_1 = 5; bool MyMessage::has_oneof_e_1() const { return o_case() == kOneofE1; } void MyMessage::set_has_oneof_e_1() { _oneof_case_[0] = kOneofE1; } void MyMessage::clear_oneof_e_1() { if (has_oneof_e_1()) { o_.oneof_e_1_ = 0; clear_has_o(); } } ::<API key>::MyEnum MyMessage::oneof_e_1() const { // @@<API key>(field_get:<API key>.MyMessage.oneof_e_1) if (has_oneof_e_1()) { return static_cast< ::<API key>::MyEnum >(o_.oneof_e_1_); } return static_cast< ::<API key>::MyEnum >(0); } void MyMessage::set_oneof_e_1(::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); if (!has_oneof_e_1()) { clear_o(); set_has_oneof_e_1(); } o_.oneof_e_1_ = value; // @@<API key>(field_set:<API key>.MyMessage.oneof_e_1) } // optional .<API key>.MyEnum oneof_e_2 = 6; bool MyMessage::has_oneof_e_2() const { return o_case() == kOneofE2; } void MyMessage::set_has_oneof_e_2() { _oneof_case_[0] = kOneofE2; } void MyMessage::clear_oneof_e_2() { if (has_oneof_e_2()) { o_.oneof_e_2_ = 0; clear_has_o(); } } ::<API key>::MyEnum MyMessage::oneof_e_2() const { // @@<API key>(field_get:<API key>.MyMessage.oneof_e_2) if (has_oneof_e_2()) { return static_cast< ::<API key>::MyEnum >(o_.oneof_e_2_); } return static_cast< ::<API key>::MyEnum >(0); } void MyMessage::set_oneof_e_2(::<API key>::MyEnum value) { assert(::<API key>::MyEnum_IsValid(value)); if (!has_oneof_e_2()) { clear_o(); set_has_oneof_e_2(); } o_.oneof_e_2_ = value; // @@<API key>(field_set:<API key>.MyMessage.oneof_e_2) } bool MyMessage::has_o() const { return o_case() != O_NOT_SET; } void MyMessage::clear_has_o() { _oneof_case_[0] = O_NOT_SET; } MyMessage::OCase MyMessage::o_case() const { return MyMessage::OCase(_oneof_case_[0]); } #endif // <API key> // @@<API key>(namespace_scope) } // namespace <API key> // @@<API key>(global_scope)
namespace Snippets3.Serialization { using NServiceBus; public class <API key> { public void Simple() { #region BinarySerialization Configure configure = Configure.With(); configure.BinarySerializer(); #endregion } } }
Ext.define('TaxRate', { extend: 'Ext.data.Model', fields: [{name: "id"}, {name: "date",type: 'date',dateFormat: 'Y-m-d'}, {name: "rate"}, {name: "remark"}, {name: "create_time",type: 'date',dateFormat: 'timestamp'}, {name: "update_time",type: 'date',dateFormat: 'timestamp'}, {name: "creater"}, {name: "updater"}] }); var taxRateStore = Ext.create('Ext.data.Store', { model: 'TaxRate', proxy: { type: 'ajax', reader: 'json', url: homePath+'/public/erp/setting_tax/gettaxrate/option/data' } }); var taxRateRowEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }); var taxRateWin = Ext.create('Ext.window.Window', { title: '', border: 0, height: 300, width: 600, modal: true, constrain: true, closeAction: 'hide', layout: 'fit', tools: [{ type: 'refresh', tooltip: 'Refresh', scope: this, handler: function(){taxRateStore.reload();} }], items: [{ xtype: 'gridpanel', id: 'taxRateGrid', columnLines: true, store: taxRateStore, selType: 'checkboxmodel', tbar: [{ xtype: 'hiddenfield', id: 'tax_id_to_rate' }, { text: '', iconCls: 'icon-add', scope: this, handler: function(){ taxRateRowEditing.cancelEdit(); var r = Ext.create('TaxRate', { date: Ext.util.Format.date(new Date(), 'Y-m-d'), rate: 1 }); taxRateStore.insert(0, r); taxRateRowEditing.startEdit(0, 0); } }, { text: '', iconCls: 'icon-delete', scope: this, handler: function(){ var selection = Ext.getCmp('taxRateGrid').getView().getSelectionModel().getSelection(); if(selection.length > 0){ taxRateStore.remove(selection); }else{ Ext.MessageBox.alert('', ''); } } }, { text: '', iconCls: 'icon-save', scope: this, handler: function(){ var updateRecords = taxRateStore.getUpdatedRecords(); var insertRecords = taxRateStore.getNewRecords(); var deleteRecords = taxRateStore.getRemovedRecords(); if(updateRecords.length + insertRecords.length + deleteRecords.length > 0){ var changeRows = { updated: [], inserted: [], deleted: [] } for(var i = 0; i < updateRecords.length; i++){ var data = updateRecords[i].data; changeRows.updated.push(data) } for(var i = 0; i < insertRecords.length; i++){ var data = insertRecords[i].data; changeRows.inserted.push(data) } for(var i = 0; i < deleteRecords.length; i++){ changeRows.deleted.push(deleteRecords[i].data) } Ext.MessageBox.confirm('', '', function(button, text){ if(button == 'yes'){ var json = Ext.JSON.encode(changeRows); var selection = Ext.getCmp('taxGrid').getView().getSelectionModel().getSelection(); Ext.Msg.wait('...', ''); Ext.Ajax.request({ url: homePath+'/public/erp/setting_tax/edittaxrate', params: {json: json, tax_id: Ext.getCmp('tax_id_to_rate').value}, method: 'POST', success: function(response, options) { var data = Ext.JSON.decode(response.responseText); if(data.success){ Ext.MessageBox.alert('', data.info); taxRateStore.reload(); taxStore.reload(); }else{ Ext.MessageBox.alert('', data.info); } }, failure: function(response){ Ext.MessageBox.alert('', ''); } }); } }); }else{ Ext.MessageBox.alert('', ''); } } }, '->', { text: '', iconCls: 'icon-refresh', handler: function(){ taxRateStore.reload(); } }], plugins: taxRateRowEditing, columns: [{ xtype: 'rownumberer' }, { text: 'ID', dataIndex: 'id', hidden: true, flex: 1 }, { text: '', dataIndex: 'date', renderer: Ext.util.Format.dateRenderer('Y-m-d'), editor: { xtype: 'datefield', editable: false, format: 'Y-m-d' }, flex: 3 }, { text: '', dataIndex: 'rate', editor: 'numberfield', flex: 2 }, { text: '', dataIndex: 'remark', editor: 'textfield', flex: 5 }, { text: '', hidden: true, dataIndex: 'creater', flex: 2 }, { text: '', hidden: true, dataIndex: 'create_time', renderer : Ext.util.Format.dateRenderer('Y-m-d H:i:s'), flex: 3 }, { text: '', hidden: true, dataIndex: 'updater', flex: 2 }, { text: '', hidden: true, dataIndex: 'update_time', renderer : Ext.util.Format.dateRenderer('Y-m-d H:i:s'), flex: 3 }] }] });
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_55) on Thu Jan 22 11:30:09 CST 2015 --> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <title>ICreate</title> <meta name="date" content="2015-01-22"> <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="ICreate"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/ICreate.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../../com/share/mod/pay/ali/wap/inter/ICallback.html" title="interface in com.share.mod.pay.ali.wap.inter"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../../../../com/share/mod/pay/ali/wap/inter/IInterrupt.html" title="interface in com.share.mod.pay.ali.wap.inter"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?com/share/mod/pay/ali/wap/inter/ICreate.html" target="_top">Frames</a></li> <li><a href="ICreate.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> </a></div> <div class="header"> <div class="subTitle">com.share.mod.pay.ali.wap.inter</div> <h2 title="Interface ICreate" class="title">Interface ICreate</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public interface <span class="strong">ICreate</span></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method_summary"> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../../../com/share/mod/pay/ali/wap/inter/ICreate.html#createOutTradeNo()">createOutTradeNo</a></strong>()</code> <div class="block"></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../../../com/share/mod/pay/ali/wap/inter/ICreate.html#handleException(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Exception)">handleException</a></strong>(javax.servlet.http.HttpServletRequest&nbsp;request, javax.servlet.http.HttpServletResponse&nbsp;response, java.lang.Exception&nbsp;e)</code> <div class="block"></div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../../../com/share/mod/pay/ali/wap/inter/ICreate.html#<API key>(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)"><API key></a></strong>(javax.servlet.http.HttpServletRequest&nbsp;request, javax.servlet.http.HttpServletResponse&nbsp;response)</code> <div class="block"></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../../../com/share/mod/pay/ali/wap/inter/ICreate.html#save(javax.servlet.http.HttpServletRequest)">save</a></strong>(javax.servlet.http.HttpServletRequest&nbsp;request)</code> <div class="block"></div> </td> </tr> </table> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method_detail"> </a> <h3>Method Detail</h3> <a name="createOutTradeNo()"> </a> <ul class="blockList"> <li class="blockList"> <h4>createOutTradeNo</h4> <pre>java.lang.String&nbsp;createOutTradeNo()</pre> <div class="block"></div> <dl><dt><span class="strong">Returns:</span></dt><dd></dd></dl> </li> </ul> <a name="<API key>(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>void&nbsp;<API key>(javax.servlet.http.HttpServletRequest&nbsp;request, javax.servlet.http.HttpServletResponse&nbsp;response) throws javax.servlet.ServletException, java.io.IOException</pre> <div class="block"></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - </dd><dd><code>response</code> - </dd> <dt><span class="strong">Throws:</span></dt> <dd><code>javax.servlet.ServletException</code></dd> <dd><code>java.io.IOException</code></dd></dl> </li> </ul> <a name="handleException(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Exception)"> </a> <ul class="blockList"> <li class="blockList"> <h4>handleException</h4> <pre>void&nbsp;handleException(javax.servlet.http.HttpServletRequest&nbsp;request, javax.servlet.http.HttpServletResponse&nbsp;response, java.lang.Exception&nbsp;e) throws javax.servlet.ServletException, java.io.IOException</pre> <div class="block"></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - </dd><dd><code>response</code> - </dd> <dt><span class="strong">Throws:</span></dt> <dd><code>javax.servlet.ServletException</code></dd> <dd><code>java.io.IOException</code></dd></dl> </li> </ul> <a name="save(javax.servlet.http.HttpServletRequest)"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>save</h4> <pre>void&nbsp;save(javax.servlet.http.HttpServletRequest&nbsp;request) throws javax.servlet.ServletException, java.io.IOException</pre> <div class="block"></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - </dd><dd><code>response</code> - </dd> <dt><span class="strong">Throws:</span></dt> <dd><code>javax.servlet.ServletException</code></dd> <dd><code>java.io.IOException</code></dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/ICreate.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../../com/share/mod/pay/ali/wap/inter/ICallback.html" title="interface in com.share.mod.pay.ali.wap.inter"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../../../../com/share/mod/pay/ali/wap/inter/IInterrupt.html" title="interface in com.share.mod.pay.ali.wap.inter"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?com/share/mod/pay/ali/wap/inter/ICreate.html" target="_top">Frames</a></li> <li><a href="ICreate.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> </a></div> </body> </html>
// <auto-generated> // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> namespace Aula2505.Views.Categorias { public partial class Excluir { } }
layout: post title: "2017" subtitle: "~" date: 2018-01-01 author: "Franary" tags: - Blog - - 2018 # 2017 ## Code - Github 218 - - - PHP CURL Laravel - Mysql - - [Image-spider](https://github.com/Chenjinyi/Image-spider) - () - API [MyWebApi](https://github.com/Chenjinyi/MyWebApi) - [Art_Online](https://github.com/Chenjinyi/Art_Online) - [Project_progress](https://github.com/Chenjinyi/Project_progress) - Shell Web () ## Hardware - Wacom CTH-490 ## Game - - - - 3 - WILL - Watch_Dogs22017DLC - HackNet8 - 3\ - 41 - - BattleBlock Theater - 121 - 14 - 42 - 152 - CSGO154 - 397 - 10 - 40 - Stick Fight The Game2 ## Coffee - - () - () - - - - - - - -
package ch.bfh.swos.bookapp.jpa.model; import javax.persistence.*; import java.io.Serializable; import java.util.Date; import static javax.persistence.GenerationType.IDENTITY; import static javax.persistence.TemporalType.DATE; /** * Entity implementation class for Entity: Book * */ @Entity public class Book implements Serializable { @Id @GeneratedValue(strategy = IDENTITY) private Long id; private String bookId; private String title; @Temporal(DATE) private Date releaseDate; private static final long serialVersionUID = 1L; @ManyToOne private Author author; public Book() { super(); } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public String getBookId() { return bookId; } public void setBookId(String bookId) { this.bookId = bookId; } public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } public Date getReleaseDate() { return this.releaseDate; } public void setReleaseDate(Date releaseDate) { this.releaseDate = releaseDate; } public Author getAuthor() { return author; } public void setAuthor(Author author) { this.author = author; } }
<?php namespace App\Util; use Illuminate\Support\Facades\DB; class Access { // list all perm public static function listPerm($userid, $appcode) { if (self::can_editPerm($userid, $appcode) == false) return []; $app = DB::table('apps')->where('code', $appcode)->first(); if ($app == null) return -3; return DB::table('user_app') ->join('users', 'user_app.userid', '=', 'users.id') ->where('user_app.appid', $app->id)->get(); } // used to delete user from app // return // -1 acess deny // -3 appid doesn't exist // -4 cannot delte owner public static function deletePerm($userid, $otherid, $appcode) { // get owner $app = DB::table('apps')->where('code', $appcode)->first(); if ($app == null) return -3; if ($otherid == $app->ownerid) return -4; if (self::can_editPerm($userid, $app->id)) { DB::table('user_app')->where('appid', $app->id)->where('userid', $otherid)->delete(); return 0; } return -1; } // used to add new user to app // or $userid set perm for $otheruserid, // if $can_perm is differ than null, then its value is valid // if $can_struct is differ than null, then its value is valid // if $can_reportis differ than null, then its value is valid // 0 means unset, 1 means set // return 0 if sucecss // -1: access deny // -2 other user not exist in app, must add first // -3 appid doesn't exist // -4 cannot set perm for owner // -5 if user doesn't exist public static function setPerm($userid, $otheruser, $appcode, $can_perm, $can_struct, $can_report) { //check if user existed if (DB::table('users')->where('id', $otheruser)->count() + DB::table('users')->where('id', $userid)->count() != 2) return -5; // get owner $app = DB::table('apps')->where('code', $appcode)->first(); if ($app == null) return -3; if (self::can_editPerm($userid, $appcode)) { $perm = DB::table('user_app')->where('appid', $app->id)->where('userid', $otheruser)->first(); if ($perm == null) { if ($app->ownerid == $otheruser) DB::table('user_app')->insert( ['appid' => $app->id, 'userid' => $otheruser, 'can_perm' => 1, 'can_struct' => 1, 'can_report' => 1] ); else DB::table('user_app')->insert( ['appid' => $app->id, 'userid' => $otheruser, 'can_perm' => 0, 'can_struct' => 0, 'can_report' => 1] ); } else { if ($app->ownerid == $otheruser) { return -4; } } $permrecord = []; if ($can_perm != null) $permrecord['can_perm'] = $can_perm; if ($can_struct != null) $permrecord['can_struct'] = $can_struct; if ($can_report != null) $permrecord['can_report'] = $can_report; if (count($permrecord) != 0) { DB::table('user_app')->where('appid', $app->id)->where('userid', $otheruser)->update($permrecord); } return 0; } abort(500, "sdfdf"); return -1; } public static function isBanned($id){ $user = DB::table('users')->where('id',$id)->first(); if($user == null) return true; if(!$user->banned) return false; return true; } public static function can_editPerm($userid, $appcode) { // full access for app owner $app = DB::table('apps')->where('code', $appcode)->first(); if ($app == null) return -3; if(self::isBanned($app->ownerid)) return false; if ($app->ownerid == $userid) return true; $perm = DB::table('user_app')->where('appid', $app->id)->where('userid', $userid)->first(); if ($perm == null) return false; if ($perm->can_perm == 1) return true; return false; } public static function can_editStruct($userid, $appcode) { // full access for app owner $app = DB::table('apps')->where('code', $appcode)->first(); if ($app == null) return -3; if(self::isBanned($app->ownerid)) return false; if ($app->ownerid == $userid) return true; $perm = DB::table('user_app')->where('appid', $app->id)->where('userid', $userid)->first(); if ($perm == null) return false; if ($perm->can_struct == 1) return true; return false; } public static function can_view($userid, $appcode) { // full access for app owner $app = DB::table('apps')->where('code', $appcode)->first(); if ($app == null) return -3; if(self::isBanned($app->ownerid)) return false; if ($app->ownerid == $userid) return true; $perm = DB::table('user_app')->where('appid', $app->id)->where('userid', $userid)->first(); if ($perm == null) return false; return true; } public static function can_editReport($userid, $appcode) { // full access for app owner $app = DB::table('apps')->where('code', $appcode)->first(); if ($app == null) return -3; if(self::isBanned($app->ownerid)) return false; if ($app->ownerid == $userid) return true; $perm = DB::table('user_app')->where('appid', $app->id)->where('userid', $userid)->first(); if ($perm == null) return false; if ($perm->can_report == 1) return true; return false; } }
package excelcom.api; import com.sun.jna.platform.win32.COM.COMException; import com.sun.jna.platform.win32.COM.<API key>; import com.sun.jna.platform.win32.COM.IDispatch; import com.sun.jna.platform.win32.OaIdl; import com.sun.jna.platform.win32.OleAuto; import com.sun.jna.platform.win32.Variant; import static com.sun.jna.platform.win32.Variant.VT_NULL; /** * Represents a Range */ class Range extends <API key> { Range(IDispatch iDispatch) throws COMException { super(iDispatch); } Variant.VARIANT getValue() { return this.invoke("Value"); } int getRow() { return this.invoke("Row").intValue(); } int getColumn() { return this.invoke("Column").intValue(); } void setInteriorColor(ExcelColor color) { new CellPane(this.<API key>("Interior", this)).setColorIndex(color); } ExcelColor getInteriorColor() { return ExcelColor.getColor(new CellPane(this.<API key>("Interior", this)).getColorIndex()); } void setFontColor(ExcelColor color) { new CellPane(this.<API key>("Font", this)).setColorIndex(color); } ExcelColor getFontColor() { return ExcelColor.getColor(new CellPane(this.<API key>("Font", this)).getColorIndex()); } void setBorderColor(ExcelColor color) { new CellPane(this.<API key>("Borders", this)).setColorIndex(color); } ExcelColor getBorderColor() { return ExcelColor.getColor(new CellPane(this.<API key>("Borders", this)).getColorIndex()); } void setComment(String comment) { this.invokeNoReply("ClearComments"); this.invoke("AddComment", new Variant.VARIANT(comment)); } String getComment() { return new <API key>(this.<API key>("Comment")) { private String getText() { return this.invoke("Text").stringValue(); } }.getText(); } FindResult find(Variant.VARIANT[] options) { IDispatch find = (IDispatch) this.invoke("Find", options).getValue(); if (find == null) { return null; } return new FindResult(find, this); } FindResult findNext(FindResult previous) { return new FindResult(this.<API key>("FindNext", this, previous.toVariant()), this); } /** * Can be Interior, Border or Font. Has methods for setting e.g. Color. */ private class CellPane extends <API key> { CellPane(IDispatch iDispatch) { super(iDispatch); } void setColorIndex(ExcelColor color) { this.setProperty("ColorIndex", color.getIndex()); } int getColorIndex() { Variant.VARIANT colorIndex = this.invoke("ColorIndex"); if(colorIndex.getVarType().intValue() == VT_NULL) { throw new <API key>("return type of colorindex is null. Maybe multiple colors in range?"); } return this.invoke("ColorIndex").intValue(); } } }
$packageName = 'kvrt' $url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe' $checksum = '<SHA1-like>' $checksumType = 'sha1' $toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $installFile = Join-Path $toolsPath "kvrt.exe" try { <API key> -PackageName "$packageName" ` -FileFullPath "$installFile" ` -Url "$url" ` -Checksum "$checksum" ` -ChecksumType "$checksumType" # create empty sidecars so shimgen only creates one shim Set-Content -Path ("$installFile.ignore") ` -Value $null # create batch to start executable $batchStart = Join-Path $toolsPath "kvrt.bat" 'start %~dp0\kvrt.exe -accepteula' | Out-File -FilePath $batchStart -Encoding ASCII Install-BinFile "kvrt" "$batchStart" } catch { throw $_.Exception }
<!DOCTYPE html> <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" /> <link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/> <link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/> <!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]--> <style type="text/css" media="all"> @import url('../../../../../style.css'); @import url('../../../../../tree.css'); </style> <script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script> <script src="../../../../../package-nodes-tree.js" type="text/javascript"></script> <script src="../../../../../clover-tree.js" type="text/javascript"></script> <script src="../../../../../clover.js" type="text/javascript"></script> <script src="../../../../../clover-descriptions.js" type="text/javascript"></script> <script src="../../../../../cloud.js" type="text/javascript"></script> <title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title> </head> <body> <div id="page"> <header id="header" role="banner"> <nav class="aui-header <API key>" role="navigation"> <div class="aui-header-inner"> <div class="aui-header-primary"> <h1 id="logo" class="aui-header-logo <API key>"> <a href="http://openclover.org" title="Visit OpenClover home page"><span class="<API key>">OpenClover</span></a> </h1> </div> <div class="<API key>"> <ul class="aui-nav"> <li id="system-help-menu"> <a class="aui-nav-link" title="Open online documentation" target="_blank" href="http://openclover.org/documentation"> <span class="aui-icon aui-icon-small aui-iconfont-help">&#160;Help</span> </a> </li> </ul> </div> </div> </nav> </header> <div class="aui-page-panel"> <div class="<API key>"> <div class="aui-page-panel-nav <API key>"> <div class="<API key>" style="margin-bottom: 20px;"> <div class="<API key>"> <a href="http://cardatechnologies.com" target="_top"> <div class="aui-avatar aui-avatar-large aui-avatar-project"> <div class="aui-avatar-inner"> <img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/> </div> </div> </a> </div> <div class="<API key>" > <h1> <a href="http://cardatechnologies.com" target="_top"> ABA Route Transit Number Validator 1.0.1-SNAPSHOT </a> </h1> </div> </div> <nav class="aui-navgroup <API key>"> <div class="aui-navgroup-inner"> <ul class="aui-nav"> <li class=""> <a href="../../../../../dashboard.html">Project overview</a> </li> </ul> <div class="aui-nav-heading <API key>"> <strong>Packages</strong> </div> <div class="aui-nav project-packages"> <form method="get" action="#" class="aui <API key>"> <input type="text" autocomplete="off" class="package-filter text" placeholder="Type to filter packages..." name="package-filter" id="package-filter" title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/> </form> <p class="<API key> hidden"> <small>No results found.</small> </p> <div class="<API key>" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator"> <div class="<API key>"></div> <div class="<API key>"></div> </div> </div> </div> </nav> </div> <section class="<API key>"> <div class="<API key>"> <div class="<API key>"><ol class="aui-nav aui-nav-breadcrumbs"> <li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li> <li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li> <li><a href="<API key>.html">Class <API key></a></li> </ol></div> <h1 class="aui-h2-clover"> Test <API key> </h1> <table class="aui"> <thead> <tr> <th>Test</th> <th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th> <th><label title="When the test execution was started">Start time</label></th> <th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th> <th><label title="A failure or error message if the test is not successful.">Message</label></th> </tr> </thead> <tbody> <tr> <td> <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/<API key>.html?line=45760#src-45760" ><API key></a> </td> <td> <span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span> </td> <td> 7 Aug 12:45:47 </td> <td> 0.0 </td> <td> <div></div> <div class="errorMessage"></div> </td> </tr> </tbody> </table> <div>&#160;</div> <table class="aui aui-table-sortable"> <thead> <tr> <th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th> <th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> <API key></th> </tr> </thead> <tbody> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/exceptions/<API key>.html?id=23167#<API key>" title="<API key>" name="sl-43">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></a> </td> <td> <span class="sortValue">0.5714286</span>57.1% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td> </tr> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/ErrorCodes.html?id=23167#ErrorCodes" title="ErrorCodes" name="sl-42">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</a> </td> <td> <span class="sortValue">0.5714286</span>57.1% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td> </tr> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=23167#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a> </td> <td> <span class="sortValue">0.29411766</span>29.4% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="29.4% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:29.4%"></div></div></div> </td> </tr> </tbody> </table> </div> <!-- class="<API key>" --> <footer id="footer" role="contentinfo"> <section class="footer-body"> <ul> <li> Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1 on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT. </li> </ul> <ul> <li>OpenClover is free and open-source software. </li> </ul> </section> </footer> </section> <!-- class="<API key>" --> </div> <!-- class="<API key>" --> </div> <!-- class="aui-page-panel" --> </div> <!-- id="page" --> </body> </html>
Administrator Guide {#admin_guide} ================= # Installation See the [Installation guide](installation.md). # Server Configuration See the [Server Configuration guide](<API key>.md). # General %Service Configuration Various aspects of how a service is presented to a user such as the display name of the parameters, default values, *etc.* can be adjusted by changing the service's configuration details on the Grassroots server. These are explained in the [Service Configuration guide](<API key>.md) # Services As well as these general configuration options, each service can have a number of service-specific configuration details that can be set by a server administrator. The services with extra configuration options are listed [below](#<API key>) # Linking %Services [Linked Services](linked_services.md) are when the output of running a %Service can be used to either fully or partially fill in the parameters of one or more other Services ready to be run by a user. The service-specific details for the linking of Services are listed below. # Specific Services Configuration {#<API key>} Links for the configuration for the following services are listed below: * [BLAST services](blast_service.md) * [SamTools service](samtools_service.md)
package com.iservport.et.service; import java.nio.charset.Charset; import org.apache.commons.codec.binary.Base64; import org.springframework.http.HttpHeaders; import org.springframework.web.util.<API key>; /** * Base class to Enterprise tester API calls. * * @author <API key> */ public class <API key> { private String scheme = "http"; private String host = "et2.primecontrol.com.br"; private int port = 8807; private String app = "/EnterpriseTester"; protected final <API key> getApiUriBuilder() { return <API key>.newInstance().scheme(scheme).host(host).port(port).path(app); } /** * Basic headers (for testing). * * @param username * @param password */ @SuppressWarnings("serial") protected HttpHeaders createHeaders(final String username, final String password ){ return new HttpHeaders(){ { String auth = username + ":" + password; byte[] encodedAuth = Base64.encodeBase64( auth.getBytes(Charset.forName("US-ASCII")) ); String authHeader = "Basic " + new String( encodedAuth ); set( "Authorization", authHeader ); } }; } }
from artnet import * import SocketServer import time, os, random, datetime, sys import argparse import socket import struct from subprocess import Popen, PIPE, STDOUT import glob DEBUG = False UDP_IP = "2.0.0.61" UDP_PORT = 6454
import React, { Component } from 'react'; import { Container, Content, Spinner } from 'native-base'; export default class Loading extends Component { render() { return ( <Container> <Content <API key>={{ flex: 1, flexDirection: 'row', justifyContent: 'center' }}> <Spinner color="blue"/> </Content> </Container> ); } }
package com.douwe.notes.resource.impl; import com.douwe.notes.entities.Cycle; import com.douwe.notes.resource.ICycleResource; import com.douwe.notes.service.ICycleService; import com.douwe.notes.service.<API key>; import com.douwe.notes.service.ServiceException; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.ejb.EJB; import javax.ws.rs.Path; /** * * @author Vincent Douwe <douwevincent@yahoo.fr> */ @Path("/cycles") public class CycleResource implements ICycleResource{ @EJB private <API key> <API key>; @EJB private ICycleService cycleService; public Cycle createCycle(Cycle cycle) { try { return cycleService.saveOrUpdateCycle(cycle); } catch (ServiceException ex) { Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex); return null; } } public List<Cycle> getAllCycle() { try { return cycleService.getAllCycles(); } catch (ServiceException ex) { Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex); return null; } } public Cycle getCycle(long id) { try { return cycleService.findCycleById(id); } catch (ServiceException ex) { Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex); return null; } } public Cycle updateCycle(long id, Cycle cycle) { try { Cycle c = cycleService.findCycleById(id); if(c != null){ c.setNom(cycle.getNom()); return cycleService.saveOrUpdateCycle(c); } return null; } catch (ServiceException ex) { Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex); return null; } } public void deleteCycle(long id) { try { cycleService.deleteCycle(id); } catch (ServiceException ex) { Logger.getLogger(CycleResource.class.getName()).log(Level.SEVERE, null, ex); } } public <API key> <API key>() { return <API key>; } public void <API key>(<API key> <API key>) { this.<API key> = <API key>; } public ICycleService getCycleService() { return cycleService; } public void setCycleService(ICycleService cycleService) { this.cycleService = cycleService; } }
//main javascript (function init() { // If we need to load requirejs before loading butter, make it so if (typeof define === "undefined") { var rscript = document.createElement("script"); rscript.onload = function () { init(); }; rscript.src = "require.js"; document.head.appendChild(rscript); return; } require.config({ baseUrl: 'js/', paths: { // the left side is the module ID, // the right side is the path to // the jQuery file, relative to baseUrl. // Also, the path should NOT include // the '.js' file extension. This example // is using jQuery 1.8.2 located at // js/jquery-1.8.2.js, relative to // the HTML page. jquery: 'lib/jquery-2.1.3.min', namedwebsockets: 'lib/namedwebsockets', qrcode: 'lib/qrcode.min', webcodecam:'lib/WebCodeCam.min', qrcodelib:'lib/qrcodelib', socketio: '/socket.io/socket.io', shake: 'lib/shake' } }); // Start the main app logic. define("mediascape", ["mediascape/Agentcontext/agentcontext", "mediascape/Association/association", "mediascape/Discovery/discovery", "mediascape/<API key>/<API key>", "mediascape/Sharedstate/sharedstate", "mediascape/Mappingservice/mappingservice", "mediascape/Applicationcontext/applicationcontext"], function ($, Modules) { //jQuery, modules and the discovery/modules module are all. //loaded and can be used here now. //creation of mediascape and discovery objects. var mediascape = {}; var moduleList = Array.prototype.slice.apply(arguments); mediascape.init = function (options) { mediascapeOptions = {}; _this = Object.create(mediascape); for (var i = 0; i < moduleList.length; i++) { var name = moduleList[i].__moduleName; var dontCall = ['sharedState', 'mappingService', 'applicationContext']; if (dontCall.indexOf(name) === -1) { mediascape[name] = new moduleList[i](mediascape, "gq" + i, mediascape); } else { mediascape[name] = moduleList[i]; } } return _this; }; mediascape.version = "0.0.1"; // See if we have any waiting init calls that happened before we loaded require. if (window.mediascape) { var args = window.mediascape.__waiting; delete window.mediascape; if (args) { mediascape.init.apply(this, args); } } window.mediascape = mediascape; //return of mediascape object with discovery and features objects and its functions return mediascape; }); require(["mediascape"], function (mediascape) { mediascape.init(); /** * * Polyfill for custonevents */ (function () { function CustomEvent(event, params) { params = params || { bubbles: false, cancelable: false, detail: undefined }; var evt = document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; }; CustomEvent.prototype = window.Event.prototype; window.CustomEvent = CustomEvent; })(); var event = new CustomEvent("mediascape-ready", { "detail": { "loaded": true } }); document.dispatchEvent(event); }); }());
// HKZStatusToolBar.h // Weibo #import <UIKit/UIKit.h> #import "HKZStatus.h" @interface HKZStatusToolBar : UIView @property(nonatomic,strong)HKZStatus *status; @end
import sys from drone.actions.emr_launcher import launch_emr_task from drone.actions.ssh_launcher import launch_ssh_task from drone.job_runner.dependency_manager import <API key> from drone.job_runner.<API key> import <API key> from drone.metadata.metadata import get_job_info, job_status, set_ready, set_running, set_failed task_launcher = {'ssh': launch_ssh_task, 'emr': launch_emr_task} def process(job_config, settings): for job_id, schedule_time, execution_time, status, runs, uid in get_job_info(job_config.get('id'), db_name=settings.metadata): if status == job_status.get('failed'): if (int(job_config.get('retry')) if job_config.get('retry') else 0) > int(runs): settings.logger.debug( '%s runs %s. set retries %s.' % (job_config.get('id'), runs, job_config.get('retry'))) if <API key>(job_config, schedule_time, settings): set_ready(job_config.get('id'), schedule_time, db_name=settings.metadata) settings.logger.info('Job "%s" "%s" set as ready' % (job_config.get('id'), schedule_time)) run(job_config, schedule_time, settings) continue else: continue else: continue elif status == job_status.get('running'): <API key>(job_config, schedule_time, uid, settings) continue elif status == job_status.get('ready'): run(job_config, schedule_time, settings) elif status == job_status.get('succeeded'): continue elif status == job_status.get('not_ready'): if <API key>(job_config, schedule_time, settings): set_ready(job_config.get('id'), schedule_time, db_name=settings.metadata) settings.logger.info('Job "%s" "%s" set as ready' % (job_config.get('id'), schedule_time)) run(job_config, schedule_time, settings) else: continue else: settings.logger.error('Unknown job status "%s"' % status) sys.exit(1) def run(job_config, schedule_time, settings): settings.logger.info('Starting job "%s" "%s"' % (job_config.get('id'), schedule_time)) job_type = job_config.get('type') try: assert job_type in settings.supported_job_types except: settings.logger.warning( 'Unsupported job type %s. Valid types are %s' % (job_type, str(settings.supported_job_types))) <API key>, uid = task_launcher.get(job_type)(job_config, schedule_time, settings) if <API key>: set_running(job_config.get('id'), schedule_time, uid, db_name=settings.metadata) settings.logger.info('Started job "%s" "%s"' % (job_config.get('id'), schedule_time)) else: set_failed(job_config.get('id'), schedule_time, db_name=settings.metadata) settings.logger.warning('Failed to start job "%s" "%s"' % (job_config.get('id'), schedule_time))
function Controller() { function __alloyId24() { __alloyId24.opts || {}; var models = __alloyId23.models; var len = models.length; var rows = []; for (var i = 0; len > i; i++) { var __alloyId9 = models[i]; __alloyId9.__transform = {}; var __alloyId10 = Ti.UI.createTableViewRow({ layout: "vertical", font: { fontSize: "16dp" }, height: "auto", title: "undefined" != typeof __alloyId9.__transform["nome"] ? __alloyId9.__transform["nome"] : __alloyId9.get("nome"), model: "undefined" != typeof __alloyId9.__transform["alloy_id"] ? __alloyId9.__transform["alloy_id"] : __alloyId9.get("alloy_id"), editable: "true" }); rows.push(__alloyId10); var __alloyId12 = Ti.UI.createView({ layout: "vertical" }); __alloyId10.add(__alloyId12); var __alloyId14 = Ti.UI.createLabel({ width: Ti.UI.SIZE, height: Ti.UI.SIZE, right: "10dp", color: "blue", font: { fontSize: "16dp" }, text: "undefined" != typeof __alloyId9.__transform["nome"] ? __alloyId9.__transform["nome"] : __alloyId9.get("nome") }); __alloyId12.add(__alloyId14); var __alloyId16 = Ti.UI.createView({ height: Ti.UI.SIZE, width: Ti.UI.FILL }); __alloyId12.add(__alloyId16); var __alloyId18 = Ti.UI.createScrollView({ scrollType: "horizontal", layout: "horizontal", horizontalWrap: "false" }); __alloyId16.add(__alloyId18); var __alloyId20 = Ti.UI.createImageView({ top: "15dp", image: "undefined" != typeof __alloyId9.__transform["foto1"] ? __alloyId9.__transform["foto1"] : __alloyId9.get("foto1"), height: "180dp", width: "320dp" }); __alloyId18.add(__alloyId20); var __alloyId22 = Ti.UI.createImageView({ top: "15dp", image: "undefined" != typeof __alloyId9.__transform["foto2"] ? __alloyId9.__transform["foto2"] : __alloyId9.get("foto2"), height: "180dp", width: "320dp" }); __alloyId18.add(__alloyId22); } $.__views.tableviewContatos.setData(rows); } function openAdd1() { var add1 = Alloy.createController("add1"); add1.getView().open({ modal: true }); } function maisDetalhes(e) { var contato = Alloy.Collections.contato.get(e.rowData.model); var ctrl = Alloy.createController("detalhesContato", contato); $.homeTab.open(ctrl.getView()); } require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments)); this.__controllerPath = "home"; arguments[0] ? arguments[0]["__parentSymbol"] : null; arguments[0] ? arguments[0]["$model"] : null; arguments[0] ? arguments[0]["__itemTemplate"] : null; var $ = this; var exports = {}; var __defers = {}; $.__views.homeWindow = Ti.UI.createWindow({ backgroundColor: "white", layout: "vertical", id: "homeWindow", titleid: "home" }); $.__views.contatosSearch = Ti.UI.createSearchBar({ hinttextid: "procurarText", height: "50dp", id: "contatosSearch", showCancel: "false" }); $.__views.homeWindow.add($.__views.contatosSearch); $.__views.Btadd = Ti.UI.createButton({ top: "10dp", width: "200dp", height: "auto", borderRadius: "10dp", font: { fontSize: "17dp" }, title: L("adicionar"), id: "Btadd" }); $.__views.homeWindow.add($.__views.Btadd); openAdd1 ? $.__views.Btadd.addEventListener("click", openAdd1) : __defers["$.__views.Btadd!click!openAdd1"] = true; $.__views.tableviewContatos = Ti.UI.createTableView({ id: "tableviewContatos" }); $.__views.homeWindow.add($.__views.tableviewContatos); var __alloyId23 = Alloy.Collections["contato"] || contato; __alloyId23.on("fetch destroy change add remove reset", __alloyId24); maisDetalhes ? $.__views.tableviewContatos.addEventListener("click", maisDetalhes) : __defers["$.__views.tableviewContatos!click!maisDetalhes"] = true; $.__views.homeTab = Ti.UI.createTab({ <API key>: "#C8C8C8 ", <API key>: "#999", icon: "/images/ic_home.png", window: $.__views.homeWindow, id: "homeTab", titleid: "home" }); $.__views.homeTab && $.addTopLevelView($.__views.homeTab); exports.destroy = function() { __alloyId23.off("fetch destroy change add remove reset", __alloyId24); }; _.extend($, $.__views); Alloy.Collections.contato.fetch(); var contatos = Alloy.Collections.contato; contatos.fetch(); $.tableviewContatos.search = $.contatosSearch; __defers["$.__views.Btadd!click!openAdd1"] && $.__views.Btadd.addEventListener("click", openAdd1); __defers["$.__views.tableviewContatos!click!maisDetalhes"] && $.__views.tableviewContatos.addEventListener("click", maisDetalhes); _.extend($, exports); } var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._; module.exports = Controller;
package com.xinfan.msgbox.service.dao.dialect; public class MysqlDialect extends Dialect { @Override public boolean supportsLimit() { return true; } @Override public boolean supportsLimitOffset() { return true; } @Override public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder) { sql = sql.trim(); boolean isForUpdate = false; if (sql.toLowerCase().endsWith(" for update")) { sql = sql.substring(0, sql.length() - 11); isForUpdate = true; } StringBuffer pagingSelect = new StringBuffer(sql.length() + 100); pagingSelect.append("select * from ( "); pagingSelect.append(sql); int endInt = Integer.parseInt(offsetPlaceholder) + + + Integer.parseInt(limitPlaceholder); pagingSelect.append(" ) _t limit " + offset + "," + endInt); if (isForUpdate) { pagingSelect.append(" for update"); } return pagingSelect.toString(); } public String getCountSql(String sql) { sql = sql.trim(); if (sql.toLowerCase().endsWith(" for update")) { sql = sql.substring(0, sql.length() - 11); } StringBuffer countSelect = new StringBuffer(sql.length() + 100); countSelect.append("select count(*) from ( "); countSelect.append(sql); countSelect.append(" ) _t "); return countSelect.toString(); } }
package uk.ac.ebi.embl.api.validation.fixer.entry; import uk.ac.ebi.embl.api.entry.Entry; import uk.ac.ebi.embl.api.entry.Text; import uk.ac.ebi.embl.api.entry.feature.Feature; import uk.ac.ebi.embl.api.entry.qualifier.Qualifier; import uk.ac.ebi.embl.api.entry.reference.Person; import uk.ac.ebi.embl.api.entry.reference.Reference; import uk.ac.ebi.embl.api.validation.Severity; import uk.ac.ebi.embl.api.validation.ValidationResult; import uk.ac.ebi.embl.api.validation.ValidationScope; import uk.ac.ebi.embl.api.validation.annotation.Description; import uk.ac.ebi.embl.api.validation.annotation.ExcludeScope; import uk.ac.ebi.embl.api.validation.check.entry.<API key>; import uk.ac.ebi.embl.api.validation.helper.Utils; /** * Fix works for certain non-ascii characters only. Check Utils.removeAccents limitations. * If it is not possible to transliterate certain chars, it will be caught in and rejected * by AsciiCharacterCheck. */ @Description("Non-ascii characters fixed from \"{0}\" to \"{1}\".") @ExcludeScope(validationScope = {ValidationScope.NCBI, ValidationScope.NCBI_MASTER}) public class <API key> extends <API key> { private static final String ASCII_CHARACTER_FIX = "AsciiCharacterFix_1"; public ValidationResult check(Entry entry) { result = new ValidationResult(); if (entry == null) return result; attemptFix(entry.getComment()); attemptFix(entry.getDescription()); for (Reference reference : entry.getReferences()) { if (reference.getPublication() != null) { String pubTitle = reference.getPublication().getTitle(); if (pubTitle != null) { String fixedPubTitle = fixedStr(pubTitle); if (!fixedPubTitle.equals(pubTitle)) { reference.getPublication().setTitle(fixedPubTitle); reportMessage(Severity.FIX, reference.getOrigin(), ASCII_CHARACTER_FIX, pubTitle, fixedPubTitle); } } if (reference.getPublication().getAuthors() != null) { for (Person author : reference.getPublication().getAuthors()) { String firstName = author.getFirstName(); if (firstName != null) { String fixedFirstName = fixedStr(firstName); if (!fixedFirstName.equals(firstName)) { author.setFirstName(fixedFirstName); reportMessage(Severity.FIX, reference.getOrigin(), ASCII_CHARACTER_FIX, firstName, fixedFirstName); } } String surname = author.getSurname(); if (surname != null) { String fixedSurname = fixedStr(surname); if (!fixedSurname.equals(surname)) { author.setSurname(fixedSurname); reportMessage(Severity.FIX, reference.getOrigin(), ASCII_CHARACTER_FIX, surname, fixedSurname); } } } } } } for (Feature feature : entry.getFeatures()) { for (Qualifier qualifier : feature.getQualifiers()) { if (qualifier.getName().equals(Qualifier.<API key>) || qualifier.getName().equals(Qualifier.<API key>) ) { String qualifierValue = qualifier.getValue(); if (qualifierValue != null) { String fixedVal = fixedStr(qualifierValue); if (!fixedVal.equals(qualifierValue)) { qualifier.setValue(fixedVal); reportMessage(Severity.FIX, qualifier.getOrigin(), ASCII_CHARACTER_FIX, qualifierValue, fixedVal); } } } } } return result; } private void attemptFix(Text text) { if (text != null && text.getText() != null) { if (Utils.hasNonAscii(text.getText())) { String fixed = Utils.removeAccents(text.getText()); if (!fixed.equals(text.getText())) { text.setText(fixed); reportMessage(Severity.FIX, text.getOrigin(), ASCII_CHARACTER_FIX, text.getText(), fixed); } } } } private String fixedStr(String str) { if (Utils.hasNonAscii(str)) { return Utils.removeAccents(str); } return str; } }
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part import copy import json import re VARIANT_JSON_REGEX = re.compile("product: ({.*}),") class ShendronesSpider(CrawlSpider): name = "shendrones" allowed_domains = ["shendrones.myshopify.com"] start_urls = ["http://shendrones.myshopify.com/collections/all"] rules = ( Rule(LinkExtractor(restrict_css=[".grid-item"]), callback='parse_item'), ) def parse_item(self, response): item = Part() item["site"] = self.name variant = {} item["variants"] = [variant] base_url = response.url item["manufacturer"] = "Shendrones" # Find the json info for variants. body = response.body_as_unicode() m = VARIANT_JSON_REGEX.search(body) if m: shopify_info = json.loads(m.group(1)) global_title = shopify_info["title"] preorder = False if global_title.endswith("Pre Order"): global_title = global_title[:-len("Pre Order")].strip() variant["stock_state"] = "backordered" preorder = True for v in shopify_info["variants"]: if v["title"] != "Default Title": item["name"] = global_title + " " + v["title"] variant["url"] = base_url + "?variant=" + str(v["id"]) else: item["name"] = global_title variant["url"] = base_url variant["price"] = "${:.2f}".format(v["price"] / 100) if not preorder: if v["inventory_quantity"] <= 0: if v["inventory_policy"] == "deny": variant["stock_state"] = "out_of_stock" else: variant["stock_state"] = "backordered" elif v["inventory_quantity"] < 3: variant["stock_state"] = "low_stock" variant["stock_text"] = "Only " + str(v["inventory_quantity"]) + " left!" else: variant["stock_state"] = "in_stock" yield item item = copy.deepcopy(item) variant = item["variants"][0]
import * as React from 'react'; import {camelCase} from 'change-case'; import {IVueComponent} from '../ReactifyVue'; import {createReactElement} from '../<API key>/CreateReactElements'; export const <API key> = (vueComponent: IVueComponent) => { if (vueComponent.methods) { Object.keys(vueComponent.methods) .forEach(methodName => vueComponent[methodName] = vueComponent.methods[methodName]); delete vueComponent.methods; } }; export const <API key> = (vueComponent: IVueComponent, props: any) => { if (props) { Object.keys(props) .forEach(propName => { if (typeof vueComponent[propName] !== 'function' || typeof vueComponent[propName] === 'function' && !vueComponent[propName]) { vueComponent[propName] = props[propName]; } }); } }; export const getComponentTag = (component: any) => { if (component.type && component.type.tag) { return component.type.tag; } else if (component.type && typeof component.type === 'string') { return component.type; } else { return undefined; } }; export const <API key> = (vueComponent: IVueComponent, slotMapping, props) => { const reactChildrenArray = props && props.children && React.Children.toArray(props.children) as (React.ReactElement<any>)[]; const slots = { default: (reactChildrenArray && reactChildrenArray.length) ? reactChildrenArray : null }; if (slotMapping && props) { Object.keys(slotMapping) .forEach(slotName => { slots[slotName] = props[slotMapping[slotName]] || []; }); } Object.keys(slots) .forEach(slotName => { const slot = slots[slotName]; if (Array.isArray(slot)) { slot.forEach((slotChild, index) => { if (typeof slotChild !== 'string') { slots[slotName][index] = {...slotChild, tag: getComponentTag(slotChild)}; } }); } }); vueComponent.$slots = slots; } export const <API key> = (vueComponent: IVueComponent, args: any) => { if (args) { Object.keys(args) .forEach(argName => vueComponent[argName] = args[argName]); } } export const <API key> = (vueComponent: IVueComponent, currentProps: any, nextProps: any) => { if (vueComponent.watch) { <API key>(vueComponent,nextProps); <API key>(vueComponent); Object.keys(vueComponent.watch) .forEach(watchedProperty => { if (currentProps[watchedProperty] !== nextProps[watchedProperty]) { vueComponent.watch[watchedProperty].apply(vueComponent, [nextProps[watchedProperty]]); } }); } }; export const <API key> = (vueComponent: IVueComponent) => { if (vueComponent.computed) { Object.keys(vueComponent.computed) .forEach(propertyName => { vueComponent[propertyName] = vueComponent.computed[propertyName].apply(vueComponent, []) }); } } export const getDefaultProps = (vueComponent: IVueComponent) => { if (vueComponent.props) { const defaultProps = Object.keys(vueComponent.props).reduce((defaultProps, propName) => { const propDef = vueComponent.props[propName]; if (propDef.default) { return { defaultProps, [camelCase(propName)]: propDef.default }; } else { return defaultProps; } }, {}); return Object.keys(defaultProps).length ? defaultProps : null; } else { return null; } }; export const <API key> = (vueComponent: any, createElement: Function) => { vueComponent._self = { _c: createElement.bind(vueComponent) }; vueComponent._t = (slotName: string, fallback) => { const slotValue = vueComponent.$slots[slotName]; if (fallback && (!slotValue || !slotValue.length)) { return fallback; } else { return slotValue; } }; vueComponent._v = (text: string) => text || ''; vueComponent._s = (text: string) => text || ''; vueComponent._e = () => null; }; export const <API key> = (<API key>, <API key>, vueComponent) => { return (element, args, children) => { if (typeof args !== 'object' || Array.isArray(args)) { //Children passed in as second argument return createReactElement(element, {}, args, <API key>, vueComponent); } else { return createReactElement(element, args, children, <API key>, vueComponent); } }; }; export const <API key> = (reactElement: React.ReactElement<any>, tag: string, self) => { const refFunc = (e: HTMLElement) => { (reactElement as any).ref(e); self.element = e; self.nextTickCallbacks.forEach(callback => callback.apply(this.vueComponent, [])); self.nextTickCallbacks = []; self.<API key> = false; }; const <API key> = {...reactElement, props: { ...reactElement.props}, tag: tag, ref: refFunc}; if (self.vueComponent.className) { const existingClassName = <API key>.props.className || ''; <API key>.props.className = [existingClassName, ' ', self.vueComponent.className].join(''); } if (self.vueComponent.style) { const existingStyles = <API key>.props.style || {}; <API key>.props.style = { existingStyles, self.vueComponent.style }; } if (self.vueComponent.id) { <API key>.props.id = self.vueComponent.id; } return <API key>; }; export const initData = (vueComponent) => { let state = null; if (vueComponent.data) { state = vueComponent.data(); Object.keys(state).forEach(stateKey => { vueComponent[stateKey] = state[stateKey]; }); } return state; };
using System; using System.Linq; namespace NBi.Core.Analysis.Request { public class CaptionFilter: IFilter { protected readonly string captionFilter; protected readonly DiscoveryTarget targetFilter; public CaptionFilter(string caption, DiscoveryTarget target) { captionFilter = caption; targetFilter = target; } public string Value { get { return captionFilter; } } public DiscoveryTarget Target { get { return targetFilter; } } } }
<!DOCTYPE HTML> <html xmlns:th="http: xmlns:layout="http: <head th:replace="fragments/head :: head"> <title>BioSamples &lt; EMBL-EBI</title> <!-- A few keywords that relate to the content of THIS PAGE (not the whole project) --> <meta name="keywords" content="biosamples, europe, EBI" /> <!-- Describe what this page is about --> <meta name="description" content="EMBL-EBI" /> <meta name="ebi:last-review" content="2016-12-20" /> <!-- The last time the content was reviewed --> <meta name="ebi:expiry" content="2017-12-20" /> <!-- When this content is no longer relevant --> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> <script>hljs.<API key>();</script> </head> <body> <div th:insert="fragments/header :: header"></div> <div layout:fragment="content" id="content"> <th:block th:include="fragments/header :: masterhead"></th:block> <div id="main-content-area" class="row padding-top-xlarge"> <div class="small-12 medium-9 columns" th:insert="asciidoc/ref_api_submit :: div"></div> <div th:insert="fragments/help :: sidebar(active='refs/api/submit', recipes=${recipes})"></div> </div> </div> <div th:insert="fragments/footer :: footer"></div> </body> </html>
// Generated by the J2ObjC translator. DO NOT EDIT! // source: /Volumes/Personal/Documents/raspi-config/client-framework/build/j2oSources/com/google/common/util/concurrent/<API key>.java #include "J2ObjC_header.h" #pragma push_macro("<API key>") #ifdef <API key> #define <API key> 0 #else #define <API key> 1 #endif #undef <API key> #if __has_feature(nullability) #pragma clang diagnostic push #pragma GCC diagnostic ignored "-<API key>" #endif #if !defined (<API key>) && (<API key> || defined(<API key>)) #define <API key> @protocol <API key>; @protocol <API key>; @interface <API key> : NSObject #pragma mark Public - (instancetype)init; - (id<<API key>>)build; - (<API key> *)<API key>:(jboolean)daemon; - (<API key> *)<API key>:(NSString *)nameFormat; - (<API key> *)setPriorityWithInt:(jint)priority; - (<API key> *)<API key>:(id<<API key>>)<API key>; - (<API key> *)<API key>:(id<<API key>>)<API key>; @end <API key>(<API key>) FOUNDATION_EXPORT void <API key>(<API key> *self); FOUNDATION_EXPORT <API key> *<API key>() NS_RETURNS_RETAINED; FOUNDATION_EXPORT <API key> *<API key>(); <API key>(<API key>) #endif #if __has_feature(nullability) #pragma clang diagnostic pop #endif #pragma pop_macro("<API key>")
package org.gsonformat.intellij.process; import com.intellij.psi.*; import org.apache.http.util.TextUtils; import org.gsonformat.intellij.config.Config; import org.gsonformat.intellij.config.Constant; import org.gsonformat.intellij.entity.FieldEntity; import org.gsonformat.intellij.entity.ClassEntity; import java.util.regex.Pattern; class AutoValueProcessor extends Processor { @Override public void onStarProcess(ClassEntity classEntity, PsiElementFactory factory, PsiClass cls,IProcessor visitor) { super.onStarProcess(classEntity, factory, cls, visitor); <API key>(factory, cls); } private void <API key>(PsiElementFactory factory, PsiClass cls) { PsiModifierList modifierList = cls.getModifierList(); PsiElement firstChild = modifierList.getFirstChild(); Pattern pattern = Pattern.compile("@.*?AutoValue"); if (firstChild != null && !pattern.matcher(firstChild.getText()).find()) { PsiAnnotation annotationFromText = factory.<API key>("@com.google.auto.value.AutoValue", cls); modifierList.addBefore(annotationFromText, firstChild); } if (!modifierList.hasModifierProperty(PsiModifier.ABSTRACT)) { modifierList.setModifierProperty(PsiModifier.ABSTRACT, true); } } @Override public void generateField(PsiElementFactory factory, FieldEntity fieldEntity, PsiClass cls, ClassEntity classEntity) { if (fieldEntity.isGenerate()) { StringBuilder fieldSb = new StringBuilder(); String filedName = fieldEntity.<API key>(); if (!TextUtils.isEmpty(classEntity.getExtra())) { fieldSb.append(classEntity.getExtra()).append("\n"); classEntity.setExtra(null); } if (fieldEntity.getTargetClass() != null) { fieldEntity.getTargetClass().setGenerate(true); } fieldSb.append(String.format("public abstract %s %s() ; ", fieldEntity.getFullNameType(), filedName)); cls.add(factory.<API key>(fieldSb.toString(), cls)); } } @Override public void <API key>(PsiElementFactory factory, PsiClass cls, ClassEntity classEntity) { } @Override public void <API key>(PsiElementFactory factory, PsiClass cls, ClassEntity classEntity) { super.<API key>(factory, cls, classEntity); createMethod(factory, Constant.<API key>.replace("$className$", cls.getName()).trim(), cls); } @Override protected void onEndGenerateClass(PsiElementFactory factory, ClassEntity classEntity, PsiClass parentClass, PsiClass generateClass, IProcessor visitor) { super.onEndGenerateClass(factory, classEntity, parentClass, generateClass, visitor); <API key>(factory, generateClass); } }
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <ctype.h> #include <sys/un.h> #include <sys/socket.h> #define SV_SOCK_PATH "/tmp/us_xfr" #define BUF_SIZE 10 #define BACKLOG 5 int main(void) { struct sockaddr_un svaddr,claddr; int sfd,j; ssize_t numRead; socklen_t len; char buf[BUF_SIZE]; sfd = socket(AF_UNIX , SOCK_DGRAM, 0); if (sfd == -1) exit(-1); if(unlink(SV_SOCK_PATH) == -1 && errno != ENOENT) exit(-2); memset(&svaddr, 0, sizeof(struct sockaddr_un)); svaddr.sun_family = AF_UNIX; strncpy(svaddr.sun_path, SV_SOCK_PATH, sizeof(svaddr.sun_path) -1 ); if(bind(sfd, (struct sockaddr *)&svaddr, sizeof(struct sockaddr_un))== -1) exit(-3); for(;;) { len = sizeof(struct sockaddr_un); numRead = recvfrom(sfd, buf, BUF_SIZE, 0, (struct sockaddr *)&claddr, &len); if(numRead == -1) exit(-4); printf("server recved %ld bytes from %s\n",(long) numRead, claddr.sun_path); for(j = 0; j<numRead; j++) buf[j] = toupper((unsigned char )buf[j]); if (sendto(sfd, buf, numRead, 0, (struct sockaddr *)&claddr, len) != numRead) perror("sendto "); } return 0; }
#include <bits/stdc++.h> template<typename T> T gcd(T a, T b) { if(!b) return a; return gcd(b, a % b); } template<typename T> T lcm(T a, T b) { return a * b / gcd(a, b); } template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; } template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; } int in() { int x; scanf("%d", &x); return x; } using namespace std; typedef long long Int; typedef unsigned uint; int TL[10]; char S[110]; int map_key[10]; string key[10]; int main(void) { key[1] = ""; key[2] = "abc"; key[3] = "def"; key[4] = "ghi"; key[5] = "jkl"; key[6] = "mno"; key[7] = "pqrs"; key[8] = "tuv"; key[9] = "wxyz"; for (int i = 1; i <= 9; i++) { scanf("%d", &TL[i]); map_key[i] = TL[i]; } scanf("%s", S); int N = strlen(S); int last = -1; for (int i = 0; i < N; i++) { int id = -1, press = 0; bool sharp = false; for (int j = 1; j <= 9; j++) { if (key[map_key[j]].find(S[i]) != string::npos) { //cout << "\n" << j << " " << S[i] << " " << key[map_key[j]] << "\n"; id = j; for (int k = 0; k < key[map_key[j]].size(); k++) { if (key[map_key[j]][k] == S[i]) { press = k; break; } } if (i > 0) { if (id == last) { sharp = true; } } last = j; break; } } if (sharp) { putchar(' } for (int i = 0; i <= press; i++) { printf("%d", id); } } printf("\n"); return 0; }
package org.semanticweb.HermiT.datatypes.owlreal; public final class PlusInfinity extends Number { private static final long serialVersionUID = -205551124673073593L; public static final PlusInfinity INSTANCE = new PlusInfinity(); private PlusInfinity() { } public boolean equals(Object that) { return this == that; } public String toString() { return "+INF"; } public double doubleValue() { throw new <API key>(); } public float floatValue() { throw new <API key>(); } public int intValue() { throw new <API key>(); } public long longValue() { throw new <API key>(); } protected Object readResolve() { return INSTANCE; } }
package com.nhpatt.myconference.entities; import com.google.gson.JsonArray; /** * @author Javier Gamarra */ public class TalkEvent { private final JsonArray talks; public TalkEvent(JsonArray talks) { this.talks = talks; } public JsonArray getTalks() { return talks; } }
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE html PUBLIC "- <html> <head> <title>AndIncludeWord - ScalaTest 2.1.7 - org.scalatest.matchers.MatcherFactory1.AndIncludeWord</title> <meta name="description" content="AndIncludeWord - ScalaTest 2.1.7 - org.scalatest.matchers.MatcherFactory1.AndIncludeWord" /> <meta name="keywords" content="AndIncludeWord ScalaTest 2.1.7 org.scalatest.matchers.MatcherFactory1.AndIncludeWord" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link href="../../../lib/template.css" media="screen" type="text/css" rel="stylesheet" /> <link href="../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" /> <script type="text/javascript" src="../../../lib/jquery.js" id="jquery-js"></script> <script type="text/javascript" src="../../../lib/jquery-ui.js"></script> <script type="text/javascript" src="../../../lib/template.js"></script> <script type="text/javascript" src="../../../lib/tools.tooltip.js"></script> <script type="text/javascript"> if(top === self) { var url = '../../../index.html'; var hash = 'org.scalatest.matchers.MatcherFactory1$AndIncludeWord'; var anchor = window.location.hash; var anchor_opt = ''; if (anchor.length >= 1) anchor_opt = '@' + anchor.substring(1); window.location.href = url + '#' + hash + anchor_opt; } </script> <script> (function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script',' ga('create', 'UA-71294502-3', 'auto'); ga('send', 'pageview'); </script> </head> <body class="type"> <!-- Top of doc.scalatest.org [javascript] --> <script type="text/javascript"> var rnd = window.rnd || Math.floor(Math.random()*10e6); var pid204546 = window.pid204546 || rnd; var plc204546 = window.plc204546 || 0; var abkw = window.abkw || ''; var absrc = 'http://ab167933.adbutler-ikon.com/adserve/;ID=167933;size=468x60;setID=204546;type=js;sw='+screen.width+';sh='+screen.height+';spr='+window.devicePixelRatio+';kw='+abkw+';pid='+pid204546+';place='+(plc204546++)+';rnd='+rnd+';click=<API key>'; document.write('<scr'+'ipt src="'+absrc+'" type="text/javascript"></scr'+'ipt>'); </script> <div id="definition"> <img src="../../../lib/class_big.png" /> <p id="owner"><a href="../../package.html" class="extype" name="org">org</a>.<a href="../package.html" class="extype" name="org.scalatest">scalatest</a>.<a href="package.html" class="extype" name="org.scalatest.matchers">matchers</a>.<a href="MatcherFactory1.html" class="extype" name="org.scalatest.matchers.MatcherFactory1">MatcherFactory1</a></p> <h1>AndIncludeWord</h1> </div> <h4 id="signature" class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">class</span> </span> <span class="symbol"> <span class="name">AndIncludeWord</span><span class="result"> extends <span class="extype" name="scala.AnyRef">AnyRef</span></span> </span> </h4> <div id="comment" class="fullcommenttop"><div class="comment cmt"><p>This class is part of the ScalaTest matchers DSL. Please see the documentation for <a href="../Matchers.html"><code>Matchers</code></a> for an overview of the matchers DSL. </p></div><dl class="attributes block"> <dt>Source</dt><dd><a href="https://github.com/scalatest/scalatest/tree/release-2.1.7-for-scala-2.10/src/main/scala/org/scalatest/matchers/MatcherFactory1.scala" target="_blank">MatcherFactory1.scala</a></dd></dl><div class="toggleContainer block"> <span class="toggle">Linear Supertypes</span> <div class="superTypes hiddenContent"><span class="extype" name="scala.AnyRef">AnyRef</span>, <span class="extype" name="scala.Any">Any</span></div> </div></div> <div id="mbrsel"> <div id="textfilter"><span class="pre"></span><span class="input"><input id="mbrsel-input" type="text" accesskey="/" /></span><span class="post"></span></div> <div id="order"> <span class="filtertype">Ordering</span> <ol> <li class="alpha in"><span>Alphabetic</span></li> <li class="inherit out"><span>By inheritance</span></li> </ol> </div> <div id="ancestors"> <span class="filtertype">Inherited<br /> </span> <ol id="linearization"> <li class="in" name="org.scalatest.matchers.MatcherFactory1.AndIncludeWord"><span>AndIncludeWord</span></li><li class="in" name="scala.AnyRef"><span>AnyRef</span></li><li class="in" name="scala.Any"><span>Any</span></li> </ol> </div><div id="ancestors"> <span class="filtertype"></span> <ol> <li class="hideall out"><span>Hide All</span></li> <li class="showall in"><span>Show all</span></li> </ol> <a href="http://docs.scala-lang.org/overviews/scaladoc/usage.html#members" target="_blank">Learn more about member selection</a> </div> <div id="visbl"> <span class="filtertype">Visibility</span> <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol> </div> </div> <div id="template"> <div id="allMembers"> <div id="constructors" class="members"> <h3>Instance Constructors</h3> <ol><li name="org.scalatest.matchers.MatcherFactory1.AndIncludeWord#&lt;init&gt;" visbl="pub" data-isabs="false" fullComment="no" group="Ungrouped"> <a id="&lt;init&gt;():MatcherFactory1.this.AndIncludeWord"></a> <a id="&lt;init&gt;:AndIncludeWord"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">new</span> </span> <span class="symbol"> <span class="name">AndIncludeWord</span><span class="params">()</span> </span> </h4> </li></ol> </div> <div id="values" class="values members"> <h3>Value Members</h3> <ol><li name="scala.AnyRef#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="!=(x$1:AnyRef):Boolean"></a> <a id="!=(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.Any#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="!=(x$1:Any):Boolean"></a> <a id="!=(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef###" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="##():Int"></a> <a id="##():Int"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $hash$hash" class="name">##</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="==(x$1:AnyRef):Boolean"></a> <a id="==(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.Any#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="==(x$1:Any):Boolean"></a> <a id="==(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.Any#asInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="asInstanceOf[T0]:T0"></a> <a id="asInstanceOf[T0]:T0"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">asInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Any.asInstanceOf.T0">T0</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef#clone" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="clone():Object"></a> <a id="clone():AnyRef"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">clone</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.AnyRef">AnyRef</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li><li name="scala.AnyRef#eq" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="eq(x$1:AnyRef):Boolean"></a> <a id="eq(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">eq</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#equals" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="equals(x$1:Any):Boolean"></a> <a id="equals(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">equals</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#finalize" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="finalize():Unit"></a> <a id="finalize():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">finalize</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li><li name="scala.AnyRef#getClass" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="getClass():Class[_]"></a> <a id="getClass():Class[_]"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">getClass</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.Class">Class</span>[_]</span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#hashCode" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="hashCode():Int"></a> <a id="hashCode():Int"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">hashCode</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.Any#isInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="isInstanceOf[T0]:Boolean"></a> <a id="isInstanceOf[T0]:Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">isInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef#ne" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="ne(x$1:AnyRef):Boolean"></a> <a id="ne(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">ne</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#notify" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="notify():Unit"></a> <a id="notify():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">notify</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#notifyAll" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="notifyAll():Unit"></a> <a id="notifyAll():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">notifyAll</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="org.scalatest.matchers.MatcherFactory1.AndIncludeWord#regex" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="regex(regex:scala.util.matching.Regex):org.scalatest.matchers.MatcherFactory1[SCwithString,TC1]"></a> <a id="regex(Regex):MatcherFactory1[SCwithString,TC1]"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">regex</span><span class="params">(<span name="regex">regex: <span class="extype" name="scala.util.matching.Regex">Regex</span></span>)</span><span class="result">: <a href="MatcherFactory1.html" class="extype" name="org.scalatest.matchers.MatcherFactory1">MatcherFactory1</a>[<span class="extype" name="org.scalatest.matchers.MatcherFactory1.SC">SC</span> with <span class="extype" name="scala.Predef.String">String</span>, <span class="extype" name="org.scalatest.matchers.MatcherFactory1.TC1">TC1</span>]</span> </span> </h4> <p class="shortcomment cmt">This method enables the following syntax given a <code>MatcherFactory1</code>:</p><div class="fullcomment"><div class="comment cmt"><p>This method enables the following syntax given a <code>MatcherFactory1</code>:</p><p><pre class="stHighlighted"> aMatcherFactory and include regex (decimalRegex) ^ </pre> </p></div></div> </li><li name="org.scalatest.matchers.MatcherFactory1.AndIncludeWord#regex" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="regex(regexWithGroups:org.scalatest.words.RegexWithGroups):org.scalatest.matchers.MatcherFactory1[SCwithString,TC1]"></a> <a id="regex(RegexWithGroups):MatcherFactory1[SCwithString,TC1]"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">regex</span><span class="params">(<span name="regexWithGroups">regexWithGroups: <a href="../words/RegexWithGroups.html" class="extype" name="org.scalatest.words.RegexWithGroups">RegexWithGroups</a></span>)</span><span class="result">: <a href="MatcherFactory1.html" class="extype" name="org.scalatest.matchers.MatcherFactory1">MatcherFactory1</a>[<span class="extype" name="org.scalatest.matchers.MatcherFactory1.SC">SC</span> with <span class="extype" name="scala.Predef.String">String</span>, <span class="extype" name="org.scalatest.matchers.MatcherFactory1.TC1">TC1</span>]</span> </span> </h4> <p class="shortcomment cmt">This method enables the following syntax given a <code>MatcherFactory1</code>:</p><div class="fullcomment"><div class="comment cmt"><p>This method enables the following syntax given a <code>MatcherFactory1</code>:</p><p><pre class="stHighlighted"> aMatcherFactory and include regex (<span class="stQuotedString">&quot;a(b*)c&quot;</span> withGroup <span class="stQuotedString">&quot;bb&quot;</span>) ^ </pre> </p></div></div> </li><li name="org.scalatest.matchers.MatcherFactory1.AndIncludeWord#regex" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="regex(regexString:String):org.scalatest.matchers.MatcherFactory1[SCwithString,TC1]"></a> <a id="regex(String):MatcherFactory1[SCwithString,TC1]"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">regex</span><span class="params">(<span name="regexString">regexString: <span class="extype" name="scala.Predef.String">String</span></span>)</span><span class="result">: <a href="MatcherFactory1.html" class="extype" name="org.scalatest.matchers.MatcherFactory1">MatcherFactory1</a>[<span class="extype" name="org.scalatest.matchers.MatcherFactory1.SC">SC</span> with <span class="extype" name="scala.Predef.String">String</span>, <span class="extype" name="org.scalatest.matchers.MatcherFactory1.TC1">TC1</span>]</span> </span> </h4> <p class="shortcomment cmt">This method enables the following syntax given a <code>MatcherFactory1</code>:</p><div class="fullcomment"><div class="comment cmt"><p>This method enables the following syntax given a <code>MatcherFactory1</code>:</p><p><pre class="stHighlighted"> aMatcherFactory and include regex (decimal) ^ </pre> </p></div></div> </li><li name="scala.AnyRef#synchronized" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="synchronized[T0](x$1:=&gt;T0):T0"></a> <a id="synchronized[T0](⇒T0):T0"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">synchronized</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">(<span name="arg0">arg0: ⇒ <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span>)</span><span class="result">: <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#toString" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="toString():String"></a> <a id="toString():String"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">toString</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait():Unit"></a> <a id="wait():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait(x$1:Long,x$2:Int):Unit"></a> <a id="wait(Long,Int):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>, <span name="arg1">arg1: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait(x$1:Long):Unit"></a> <a id="wait(Long):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li></ol> </div> </div> <div id="inheritedMembers"> <div class="parent" name="scala.AnyRef"> <h3>Inherited from <span class="extype" name="scala.AnyRef">AnyRef</span></h3> </div><div class="parent" name="scala.Any"> <h3>Inherited from <span class="extype" name="scala.Any">Any</span></h3> </div> </div> <div id="groupedMembers"> <div class="group" name="Ungrouped"> <h3>Ungrouped</h3> </div> </div> </div> <div id="tooltip"></div> <div id="footer"> </div> </body> </html>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_162) on Sat Feb 02 18:57:44 CET 2019 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class com.communote.plugins.api.rest.v24.resource.topic.property.<API key> (Communote 3.5 API)</title> <meta name="date" content="2019-02-02"> <link rel="stylesheet" type="text/css" href="../../../../../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class com.communote.plugins.api.rest.v24.resource.topic.property.<API key> (Communote 3.5 API)"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../../../../com/communote/plugins/api/rest/v24/resource/topic/property/<API key>.html" title="class in com.communote.plugins.api.rest.v24.resource.topic.property">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../../../../index.html?com/communote/plugins/api/rest/v24/resource/topic/property/class-use/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h2 title="Uses of Class com.communote.plugins.api.rest.v24.resource.topic.property.<API key>" class="title">Uses of Class<br>com.communote.plugins.api.rest.v24.resource.topic.property.<API key></h2> </div> <div class="classUseContainer">No usage of com.communote.plugins.api.rest.v24.resource.topic.property.<API key></div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../../../../com/communote/plugins/api/rest/v24/resource/topic/property/<API key>.html" title="class in com.communote.plugins.api.rest.v24.resource.topic.property">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../../../../index.html?com/communote/plugins/api/rest/v24/resource/topic/property/class-use/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> <p class="legalCopy"><small>Copyright & </body> </html>
package fr.javatronic.blog.massive.annotation1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_175 { }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_111) on Wed Jan 04 22:31:29 EST 2017 --> <title>Uses of Class org.drip.spline.bspline.<API key></title> <meta name="date" content="2017-01-04"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.drip.spline.bspline.<API key>"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/drip/spline/bspline/<API key>.html" title="class in org.drip.spline.bspline">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/drip/spline/bspline/class-use/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h2 title="Uses of Class org.drip.spline.bspline.<API key>" class="title">Uses of Class<br>org.drip.spline.bspline.<API key></h2> </div> <div class="classUseContainer">No usage of org.drip.spline.bspline.<API key></div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/drip/spline/bspline/<API key>.html" title="class in org.drip.spline.bspline">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/drip/spline/bspline/class-use/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
// ATTENTION: The code in this file is highly EXPERIMENTAL. // Adventurous users should note that the APIs will probably change. #pragma once #include "onnx/common/ir.h" #include "onnx/common/ir_pb_converter.h" #include "onnx/common/stl_backports.h" #include "onnx/optimizer/passes/eliminate_deadend.h" #include "onnx/optimizer/passes/eliminate_identity.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/eliminate_nop_pad.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/fuse_bn_into_conv.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/fuse_pad_into_conv.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/<API key>.h" #include "onnx/optimizer/passes/nop.h" #include "onnx/optimizer/passes/split.h" #include "onnx/proto_utils.h" #include <unordered_set> #include <vector> namespace ONNX_NAMESPACE { namespace optimization { // Registry containing all passes available in ONNX. struct GlobalPassRegistry { std::map<std::string, std::shared_ptr<Pass>> passes; GlobalPassRegistry() { // Register the optimization passes to the optimizer. registerPass<NopEmptyPass>(); registerPass<EliminateDeadEnd>(); registerPass<EliminateNopDropout>(); registerPass<EliminateIdentity>(); registerPass<<API key>>(); registerPass<EliminateNopPad>(); registerPass<<API key>>(); registerPass<<API key>>(); registerPass<<API key>>(); registerPass<FuseAddBiasIntoConv>(); registerPass<FuseBNIntoConv>(); registerPass<<API key>>(); registerPass<<API key>>(); registerPass<<API key>>(); registerPass<<API key>>(); registerPass<<API key>>(); registerPass<<API key>>(); registerPass<FusePadIntoConv>(); registerPass<<API key>>(); registerPass<<API key>>(); registerPass<SplitInit>(); registerPass<SplitPredict>(); } ~GlobalPassRegistry() { this->passes.clear(); } std::shared_ptr<Pass> find(std::string pass_name) { auto it = this->passes.find(pass_name); ONNX_ASSERTM( it != this->passes.end(), "pass %s is unknown.", pass_name.c_str()); return it->second; } const std::vector<std::string> GetAvailablePasses(); template <typename T> void registerPass() { static_assert(std::is_base_of<Pass, T>::value, "T must inherit from Pass"); std::shared_ptr<Pass> pass(new T()); passes[pass->getPassName()] = pass; } }; } // namespace optimization } // namespace ONNX_NAMESPACE
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_112) on Thu Apr 06 08:02:44 MST 2017 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>org.wildfly.swarm.keycloak.server (Public javadocs 2017.4.0 API)</title> <meta name="date" content="2017-04-06"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.wildfly.swarm.keycloak.server (Public javadocs 2017.4.0 API)"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li class="navBarCell1Rev">Package</li> <li>Class</li> <li><a href="package-use.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 2017.4.0</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/wildfly/swarm/keycloak/deployment/package-summary.html">Prev&nbsp;Package</a></li> <li><a href="../../../../../org/wildfly/swarm/logging/package-summary.html">Next&nbsp;Package</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/wildfly/swarm/keycloak/server/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h1 title="Package" class="title">Package&nbsp;org.wildfly.swarm.keycloak.server</h1> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation"> <caption><span>Interface Summary</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Interface</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="../../../../../org/wildfly/swarm/keycloak/server/<API key>.html" title="interface in org.wildfly.swarm.keycloak.server"><API key></a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> <caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Class</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="../../../../../org/wildfly/swarm/keycloak/server/<API key>.html" title="class in org.wildfly.swarm.keycloak.server"><API key></a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> </ul> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li class="navBarCell1Rev">Package</li> <li>Class</li> <li><a href="package-use.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 2017.4.0</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/wildfly/swarm/keycloak/deployment/package-summary.html">Prev&nbsp;Package</a></li> <li><a href="../../../../../org/wildfly/swarm/logging/package-summary.html">Next&nbsp;Package</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/wildfly/swarm/keycloak/server/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> <p class="legalCopy"><small>Copyright & </body> </html>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_151) on Fri Apr 06 09:47:11 MST 2018 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title><API key> (BOM: * : All 2018.4.2 API)</title> <meta name="date" content="2018-04-06"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="<API key> (BOM: * : All 2018.4.2 API)"; } } catch(err) { } var methods = {"i0":18}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],16:["t5","Default Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/<API key>.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 2018.4.2</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/wildfly/swarm/messaging/EnhancedServer.html" title="class in org.wildfly.swarm.messaging"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../org/wildfly/swarm/messaging/MessagingFraction.html" title="class in org.wildfly.swarm.messaging"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/wildfly/swarm/messaging/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <div class="subTitle">org.wildfly.swarm.messaging</div> <h2 title="Interface <API key>" class="title">Interface <API key></h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Superinterfaces:</dt> <dd><a href="../../../../org/wildfly/swarm/config/messaging/activemq/ServerConsumer.html" title="interface in org.wildfly.swarm.config.messaging.activemq">ServerConsumer</a>&lt;<a href="../../../../org/wildfly/swarm/messaging/EnhancedServer.html" title="class in org.wildfly.swarm.messaging">EnhancedServer</a>&gt;</dd> </dl> <dl> <dt>Functional Interface:</dt> <dd>This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.</dd> </dl> <hr> <br> <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/FunctionalInterface.html?is-external=true" title="class or interface in java.lang">@FunctionalInterface</a> public interface <span class="typeNameLabel"><API key></span> extends <a href="../../../../org/wildfly/swarm/config/messaging/activemq/ServerConsumer.html" title="interface in org.wildfly.swarm.config.messaging.activemq">ServerConsumer</a>&lt;<a href="../../../../org/wildfly/swarm/messaging/EnhancedServer.html" title="class in org.wildfly.swarm.messaging">EnhancedServer</a>&gt;</pre> <dl> <dt><span class="simpleTagLabel">Author:</span></dt> <dd>Bob McWhirter</dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method.summary"> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>default <a href="../../../../org/wildfly/swarm/messaging/<API key>.html" title="interface in org.wildfly.swarm.messaging"><API key></a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/wildfly/swarm/messaging/<API key>.html#then-org.wildfly.swarm.messaging.<API key>-">then</a></span>(<a href="../../../../org/wildfly/swarm/messaging/<API key>.html" title="interface in org.wildfly.swarm.messaging"><API key></a>&nbsp;after)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.org.wildfly.swarm.config.messaging.activemq.ServerConsumer"> </a> <h3>Methods inherited from interface&nbsp;org.wildfly.swarm.config.messaging.activemq.<a href="../../../../org/wildfly/swarm/config/messaging/activemq/ServerConsumer.html" title="interface in org.wildfly.swarm.config.messaging.activemq">ServerConsumer</a></h3> <code><a href="../../../../org/wildfly/swarm/config/messaging/activemq/ServerConsumer.html#accept-T-">accept</a>, <a href="../../../../org/wildfly/swarm/config/messaging/activemq/ServerConsumer.html#andThen-org.wildfly.swarm.config.messaging.activemq.ServerConsumer-">andThen</a></code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method.detail"> </a> <h3>Method Detail</h3> <a name="then-org.wildfly.swarm.messaging.<API key>-"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>then</h4> <pre>default&nbsp;<a href="../../../../org/wildfly/swarm/messaging/<API key>.html" title="interface in org.wildfly.swarm.messaging"><API key></a>&nbsp;then(<a href="../../../../org/wildfly/swarm/messaging/<API key>.html" title="interface in org.wildfly.swarm.messaging"><API key></a>&nbsp;after)</pre> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/<API key>.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 2018.4.2</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/wildfly/swarm/messaging/EnhancedServer.html" title="class in org.wildfly.swarm.messaging"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../org/wildfly/swarm/messaging/MessagingFraction.html" title="class in org.wildfly.swarm.messaging"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/wildfly/swarm/messaging/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> </a></div> <p class="legalCopy"><small>Copyright & </body> </html>
package io.sensesecure.hadoop.xz; import java.io.BufferedInputStream; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import org.apache.hadoop.io.SequenceFile; import org.apache.hadoop.io.compress.<API key>; import org.tukaani.xz.XZInputStream; /** * * @author yongtang */ public class <API key> extends <API key> { private BufferedInputStream bufferedIn; private XZInputStream xzIn; private boolean resetStateNeeded; public <API key>(InputStream in) throws IOException { super(in); resetStateNeeded = false; bufferedIn = new BufferedInputStream(super.in); } @Override public int read(byte[] b, int off, int len) throws IOException { if (resetStateNeeded) { resetStateNeeded = false; bufferedIn = new BufferedInputStream(super.in); xzIn = null; } return getInputStream().read(b, off, len); } @Override public void resetState() throws IOException { resetStateNeeded = true; } @Override public int read() throws IOException { byte b[] = new byte[1]; int result = this.read(b, 0, 1); return (result < 0) ? result : (b[0] & 0xff); } @Override public void close() throws IOException { if (!resetStateNeeded) { if (xzIn != null) { xzIn.close(); xzIn = null; } resetStateNeeded = true; } } /** * This compression stream ({@link #xzIn}) is initialized lazily, in case * the data is not available at the time of initialization. This is * necessary for the codec to be used in a {@link SequenceFile.Reader}, as * it constructs the {@link <API key>} before putting data * into its buffer. Eager initialization of {@link #xzIn} there results in * an {@link EOFException}. */ private XZInputStream getInputStream() throws IOException { if (xzIn == null) { xzIn = new XZInputStream(bufferedIn); } return xzIn; } }
#include "../control/ControlSystem_Peep.hpp" #include "../control/ControlSystem_Teach.hpp" #include <iostream> #include "../types.hpp" using namespace pathos::peepingpanel; std::vector<ControlSystem_Peep*> CreateControlSystem(AllConfigArray configData, SensorsAreasArray sensorsArea_1, SensorsAreasArray sensorsArea_2, SensorsAreasArray sensorsArea_3, SensorsAreasArray sensorsArea_4, SensorsThread* sensorsThread) { std::vector<ControlSystem_Peep*> controlSystems; int config = configData[0]; if(config == 0) throw eeros::EEROSException("No motor connected"); else if(config == 1 ){ // 0 0 0 1 std::cout << "motor 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc4", "dac4", sensorsThread, sensorsArea_4)); } else if(config == 2 ){ // 0 0 1 0 std::cout << "motor 3 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc3", "dac3", sensorsThread, sensorsArea_3)); } else if(config == 3 ){ // 0 0 1 1 std::cout << "motor 3 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc3", "dac3", sensorsThread, sensorsArea_3)); controlSystems.push_back(new ControlSystem_Peep("enc4", "dac4", sensorsThread, sensorsArea_4)); } else if(config == 4 ){ // 0 1 0 0 std::cout << "motor 2 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc2", "dac2", sensorsThread, sensorsArea_2)); } else if(config == 5 ){ // 0 1 0 1 std::cout << "motor 2 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc2", "dac2", sensorsThread, sensorsArea_2)); controlSystems.push_back(new ControlSystem_Peep("enc4", "dac4", sensorsThread, sensorsArea_4)); } else if(config == 6 ){ // 0 1 1 0 std::cout << "motor 2 and 3 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc2", "dac2", sensorsThread, sensorsArea_2)); controlSystems.push_back(new ControlSystem_Peep("enc3", "dac3", sensorsThread, sensorsArea_3)); } else if(config == 7 ){ // 0 1 1 1 std::cout << "motor 2, 3 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc2", "dac2", sensorsThread, sensorsArea_2)); controlSystems.push_back(new ControlSystem_Peep("enc3", "dac3", sensorsThread, sensorsArea_3)); controlSystems.push_back(new ControlSystem_Peep("enc4", "dac4", sensorsThread, sensorsArea_4)); } else if(config == 8 ){ // 1 0 0 0 std::cout << "motor 1 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc1", "dac1", sensorsThread, sensorsArea_1)); } else if(config == 9 ){ // 1 0 0 1 std::cout << "motor 1 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc1", "dac1", sensorsThread, sensorsArea_1)); controlSystems.push_back(new ControlSystem_Peep("enc4", "dac4", sensorsThread, sensorsArea_4)); } else if(config == 10){ // 1 0 1 0 std::cout << "motor 1 and 3 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc1", "dac1", sensorsThread, sensorsArea_1)); controlSystems.push_back(new ControlSystem_Peep("enc3", "dac3", sensorsThread, sensorsArea_3)); } else if(config == 11){ // 1 0 1 1 std::cout << "motor 1, 3 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc1", "dac1", sensorsThread, sensorsArea_1)); controlSystems.push_back(new ControlSystem_Peep("enc3", "dac3", sensorsThread, sensorsArea_3)); controlSystems.push_back(new ControlSystem_Peep("enc4", "dac4", sensorsThread, sensorsArea_4)); } else if(config == 12){ // 1 1 0 0 std::cout << "motor 1 and 2 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc1", "dac1", sensorsThread, sensorsArea_1)); controlSystems.push_back(new ControlSystem_Peep("enc2", "dac2", sensorsThread, sensorsArea_2)); } else if(config == 13){ // 1 1 0 1 std::cout << "motor 1, 2 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc1", "dac1", sensorsThread, sensorsArea_1)); controlSystems.push_back(new ControlSystem_Peep("enc2", "dac2", sensorsThread, sensorsArea_2)); controlSystems.push_back(new ControlSystem_Peep("enc4", "dac4", sensorsThread, sensorsArea_4)); } else if(config == 14){ // 1 1 1 0 std::cout << "motor 1, 2 and 3 connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc1", "dac1", sensorsThread, sensorsArea_1)); controlSystems.push_back(new ControlSystem_Peep("enc2", "dac2", sensorsThread, sensorsArea_2)); controlSystems.push_back(new ControlSystem_Peep("enc3", "dac3", sensorsThread, sensorsArea_3)); } else if(config == 15){ // 1 1 1 1 std::cout << "all motors connected" << std::endl; controlSystems.push_back(new ControlSystem_Peep("enc1", "dac1", sensorsThread, sensorsArea_1)); controlSystems.push_back(new ControlSystem_Peep("enc2", "dac2", sensorsThread, sensorsArea_2)); controlSystems.push_back(new ControlSystem_Peep("enc3", "dac3", sensorsThread, sensorsArea_3)); controlSystems.push_back(new ControlSystem_Peep("enc4", "dac4", sensorsThread, sensorsArea_4)); } else throw eeros::EEROSException("Invalid motor config value"); return controlSystems; } std::vector<ControlSystem_Teach*> <API key>(AllConfigArray configData) { std::vector<ControlSystem_Teach*> controlSystems; int config = configData[0]; if(config == 0) throw eeros::EEROSException("No motor connected"); else if(config == 1 ){ // 0 0 0 1 std::cout << "motor 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc4", "dac4")); } else if(config == 2 ){ // 0 0 1 0 std::cout << "motor 3 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc3", "dac3")); } else if(config == 3 ){ // 0 0 1 1 std::cout << "motor 3 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc3", "dac3")); controlSystems.push_back(new ControlSystem_Teach("enc4", "dac4")); } else if(config == 4 ){ // 0 1 0 0 std::cout << "motor 2 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc2", "dac2")); } else if(config == 5 ){ // 0 1 0 1 std::cout << "motor 2 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc2", "dac2")); controlSystems.push_back(new ControlSystem_Teach("enc4", "dac4")); } else if(config == 6 ){ // 0 1 1 0 std::cout << "motor 2 and 3 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc2", "dac2")); controlSystems.push_back(new ControlSystem_Teach("enc3", "dac3")); } else if(config == 7 ){ // 0 1 1 1 std::cout << "motor 2, 3 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc2", "dac2")); controlSystems.push_back(new ControlSystem_Teach("enc3", "dac3")); controlSystems.push_back(new ControlSystem_Teach("enc4", "dac4")); } else if(config == 8 ){ // 1 0 0 0 std::cout << "motor 1 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc1", "dac1")); } else if(config == 9 ){ // 1 0 0 1 std::cout << "motor 1 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc1", "dac1")); controlSystems.push_back(new ControlSystem_Teach("enc4", "dac4")); } else if(config == 10){ // 1 0 1 0 std::cout << "motor 1 and 3 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc1", "dac1")); controlSystems.push_back(new ControlSystem_Teach("enc3", "dac3")); } else if(config == 11){ // 1 0 1 1 std::cout << "motor 1, 3 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc1", "dac1")); controlSystems.push_back(new ControlSystem_Teach("enc3", "dac3")); controlSystems.push_back(new ControlSystem_Teach("enc4", "dac4")); } else if(config == 12){ // 1 1 0 0 std::cout << "motor 1 and 2 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc1", "dac1")); controlSystems.push_back(new ControlSystem_Teach("enc2", "dac2")); } else if(config == 13){ // 1 1 0 1 std::cout << "motor 1, 2 and 4 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc1", "dac1")); controlSystems.push_back(new ControlSystem_Teach("enc2", "dac2")); controlSystems.push_back(new ControlSystem_Teach("enc4", "dac4")); } else if(config == 14){ // 1 1 1 0 std::cout << "motor 1, 2 and 3 connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc1", "dac1")); controlSystems.push_back(new ControlSystem_Teach("enc2", "dac2")); controlSystems.push_back(new ControlSystem_Teach("enc3", "dac3")); } else if(config == 15){ // 1 1 1 1 std::cout << "all motors connected" << std::endl; controlSystems.push_back(new ControlSystem_Teach("enc1", "dac1")); controlSystems.push_back(new ControlSystem_Teach("enc2", "dac2")); controlSystems.push_back(new ControlSystem_Teach("enc3", "dac3")); controlSystems.push_back(new ControlSystem_Teach("enc4", "dac4")); } else throw eeros::EEROSException("Invalid motor config value"); return controlSystems; }
package generics; //: generics/SuperTypeWildcards.java import java.util.*; public class SuperTypeWildcards { static void writeTo(List<? super Apple> apples) { apples.add(new Apple()); apples.add(new Jonathan()); // apples.add(new Fruit()); // Error } }
package org.giwi.geotracker.routes.priv; import io.vertx.core.Vertx; import io.vertx.ext.web.Router; import io.vertx.ext.web.RoutingContext; import org.giwi.geotracker.annotation.VertxRoute; import org.giwi.geotracker.beans.AuthUtils; import org.giwi.geotracker.exception.BusinessException; import org.giwi.geotracker.services.ParamService; import javax.inject.Inject; /** * The type Param route. */ @VertxRoute(rootPath = "/api/1/private/param") public class ParamRoute implements VertxRoute.Route { @Inject private ParamService paramService; @Inject private AuthUtils authUtils; /** * Init router. * * @param vertx the vertx * @return the router */ @Override public Router init(Vertx vertx) { Router router = Router.router(vertx); router.get("/roles").handler(this::getRoles); return router; } /** * @api {get} /api/1/private/param/roles Get roles * @apiName getRoles * @apiGroup Params * @apiDescription Get roles * @apiHeader {String} secureToken User secureToken * @apiSuccess {Array} roles Role[] */ private void getRoles(RoutingContext ctx) { paramService.getRoles(res -> { if (res.succeeded()) { ctx.response().end(res.result().encode()); } else { ctx.fail(new BusinessException(res.cause())); } }); } }
describe("", function() { var rootEl; beforeEach(function() { rootEl = browser.rootEl; browser.get("build/docs/examples/example-example60/index.html"); }); it('should check ng-bind', function() { var nameInput = element(by.model('name')); expect(element(by.binding('name')).getText()).toBe('Whirled'); nameInput.clear(); nameInput.sendKeys('world'); expect(element(by.binding('name')).getText()).toBe('world'); }); });
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE html PUBLIC "- <html> <head> <title>Filter - ScalaTest 2.2.4 - org.scalatest.Filter</title> <meta name="description" content="Filter - ScalaTest 2.2.4 - org.scalatest.Filter" /> <meta name="keywords" content="Filter ScalaTest 2.2.4 org.scalatest.Filter" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link href="../../lib/template.css" media="screen" type="text/css" rel="stylesheet" /> <link href="../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" /> <script type="text/javascript" src="../../lib/jquery.js" id="jquery-js"></script> <script type="text/javascript" src="../../lib/jquery-ui.js"></script> <script type="text/javascript" src="../../lib/template.js"></script> <script type="text/javascript" src="../../lib/tools.tooltip.js"></script> <script type="text/javascript"> if(top === self) { var url = '../../index.html'; var hash = 'org.scalatest.Filter$'; var anchor = window.location.hash; var anchor_opt = ''; if (anchor.length >= 1) anchor_opt = '@' + anchor.substring(1); window.location.href = url + '#' + hash + anchor_opt; } </script> <script> (function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script',' ga('create', 'UA-71294502-3', 'auto'); ga('send', 'pageview'); </script> </head> <body class="value"> <!-- Top of doc.scalatest.org [javascript] --> <script type="text/javascript"> var rnd = window.rnd || Math.floor(Math.random()*10e6); var pid204546 = window.pid204546 || rnd; var plc204546 = window.plc204546 || 0; var abkw = window.abkw || ''; var absrc = 'http://ab167933.adbutler-ikon.com/adserve/;ID=167933;size=468x60;setID=204546;type=js;sw='+screen.width+';sh='+screen.height+';spr='+window.devicePixelRatio+';kw='+abkw+';pid='+pid204546+';place='+(plc204546++)+';rnd='+rnd+';click=<API key>'; document.write('<scr'+'ipt src="'+absrc+'" type="text/javascript"></scr'+'ipt>'); </script> <div id="definition"> <a href="Filter.html" title="Go to companion"><img src="../../lib/object_to_class_big.png" /></a> <p id="owner"><a href="../package.html" class="extype" name="org">org</a>.<a href="package.html" class="extype" name="org.scalatest">scalatest</a></p> <h1><a href="Filter.html" title="Go to companion">Filter</a></h1> </div> <h4 id="signature" class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">object</span> </span> <span class="symbol"> <span class="name">Filter</span><span class="result"> extends <span class="extype" name="scala.Serializable">Serializable</span></span> </span> </h4> <div id="comment" class="fullcommenttop"><dl class="attributes block"> <dt>Source</dt><dd><a href="https://github.com/scalatest/scalatest/tree/release-2.2.4-for-scala-2.11-and-2.10/src/main/scala/org/scalatest/Filter.scala" target="_blank">Filter.scala</a></dd></dl><div class="toggleContainer block"> <span class="toggle">Linear Supertypes</span> <div class="superTypes hiddenContent"><span class="extype" name="scala.Serializable">Serializable</span>, <span class="extype" name="java.io.Serializable">Serializable</span>, <span class="extype" name="scala.AnyRef">AnyRef</span>, <span class="extype" name="scala.Any">Any</span></div> </div></div> <div id="mbrsel"> <div id="textfilter"><span class="pre"></span><span class="input"><input id="mbrsel-input" type="text" accesskey="/" /></span><span class="post"></span></div> <div id="order"> <span class="filtertype">Ordering</span> <ol> <li class="alpha in"><span>Alphabetic</span></li> <li class="inherit out"><span>By inheritance</span></li> </ol> </div> <div id="ancestors"> <span class="filtertype">Inherited<br /> </span> <ol id="linearization"> <li class="in" name="org.scalatest.Filter"><span>Filter</span></li><li class="in" name="scala.Serializable"><span>Serializable</span></li><li class="in" name="java.io.Serializable"><span>Serializable</span></li><li class="in" name="scala.AnyRef"><span>AnyRef</span></li><li class="in" name="scala.Any"><span>Any</span></li> </ol> </div><div id="ancestors"> <span class="filtertype"></span> <ol> <li class="hideall out"><span>Hide All</span></li> <li class="showall in"><span>Show all</span></li> </ol> <a href="http://docs.scala-lang.org/overviews/scaladoc/usage.html#members" target="_blank">Learn more about member selection</a> </div> <div id="visbl"> <span class="filtertype">Visibility</span> <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol> </div> </div> <div id="template"> <div id="allMembers"> <div id="values" class="values members"> <h3>Value Members</h3> <ol><li name="scala.AnyRef#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="!=(x$1:AnyRef):Boolean"></a> <a id="!=(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.Any#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="!=(x$1:Any):Boolean"></a> <a id="!=(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef###" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="##():Int"></a> <a id="##():Int"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $hash$hash" class="name">##</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="==(x$1:AnyRef):Boolean"></a> <a id="==(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.Any#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="==(x$1:Any):Boolean"></a> <a id="==(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="org.scalatest.Filter#apply" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="apply(tagsToInclude:Option[Set[String]],tagsToExclude:Set[String],excludeNestedSuites:Boolean,dynaTags:org.scalatest.DynaTags):org.scalatest.Filter"></a> <a id="apply(Option[Set[String]],Set[String],Boolean,DynaTags):Filter"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">apply</span><span class="params">(<span name="tagsToInclude">tagsToInclude: <span class="extype" name="scala.Option">Option</span>[<span class="extype" name="scala.Predef.Set">Set</span>[<span class="extype" name="scala.Predef.String">String</span>]] = <span class="symbol">None</span></span>, <span name="tagsToExclude">tagsToExclude: <span class="extype" name="scala.Predef.Set">Set</span>[<span class="extype" name="scala.Predef.String">String</span>] = <span class="symbol">Set(IgnoreTag)</span></span>, <span name="excludeNestedSuites">excludeNestedSuites: <span class="extype" name="scala.Boolean">Boolean</span> = <span class="symbol">false</span></span>, <span name="dynaTags">dynaTags: <a href="DynaTags.html" class="extype" name="org.scalatest.DynaTags">DynaTags</a> = <span class="symbol">DynaTags(Map.empty, Map.empty)</span></span>)</span><span class="result">: <a href="Filter.html" class="extype" name="org.scalatest.Filter">Filter</a></span> </span> </h4> <p class="shortcomment cmt">Factory method for a <code>Filter</code> initialized with the passed <code>tagsToInclude</code> and <code>tagsToExclude</code>.</p><div class="fullcomment"><div class="comment cmt"><p>Factory method for a <code>Filter</code> initialized with the passed <code>tagsToInclude</code> and <code>tagsToExclude</code>. </p></div><dl class="paramcmts block"><dt class="param">tagsToInclude</dt><dd class="cmt"><p>an optional <code>Set</code> of <code>String</code> tag names to include (<em>i.e.</em>, not filter out) when filtering tests</p></dd><dt class="param">tagsToExclude</dt><dd class="cmt"><p>a <code>Set</code> of <code>String</code> tag names to exclude (<em>i.e.</em>, filter out) when filtering tests</p></dd><dt class="param">excludeNestedSuites</dt><dd class="cmt"><p>a <code>Boolean</code> to indicate whether to run nested suites</p></dd><dt class="param">dynaTags</dt><dd class="cmt"><p>dynamic tags for the filter </p></dd></dl><dl class="attributes block"> <dt>Exceptions thrown</dt><dd><span class="cmt"><API key><p>if <code>tagsToInclude</code> is defined, but contains an empty set </p></span><span class="cmt"><API key><p>if either <code>tagsToInclude</code> or <code>tagsToExclude</code> are null</p></span></dd></dl></div> </li><li name="scala.Any#asInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="asInstanceOf[T0]:T0"></a> <a id="asInstanceOf[T0]:T0"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">asInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Any.asInstanceOf.T0">T0</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef#clone" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="clone():Object"></a> <a id="clone():AnyRef"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">clone</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.AnyRef">AnyRef</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li><li name="org.scalatest.Filter#default" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="default:org.scalatest.Filter"></a> <a id="default:Filter"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">default</span><span class="result">: <a href="Filter.html" class="extype" name="org.scalatest.Filter">Filter</a></span> </span> </h4> <p class="shortcomment cmt">Factory method for a default <code>Filter</code>, for which <code>tagsToInclude is <code>None</code>, <code>tagsToExclude</code> is <code>Set("org.scalatest.Ignore")</code>, and <code>excludeNestedSuites</code> is false. </p><div class="fullcomment"><div class="comment cmt"><p>Factory method for a default <code>Filter</code>, for which <code>tagsToInclude is <code>None</code>, <code>tagsToExclude</code> is <code>Set("org.scalatest.Ignore")</code>, and <code>excludeNestedSuites</code> is false. </p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p>a default <code>Filter</code> </p></dd></dl></div> </li><li name="scala.AnyRef#eq" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="eq(x$1:AnyRef):Boolean"></a> <a id="eq(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">eq</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#equals" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="equals(x$1:Any):Boolean"></a> <a id="equals(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">equals</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#finalize" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="finalize():Unit"></a> <a id="finalize():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">finalize</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li><li name="scala.AnyRef#getClass" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="getClass():Class[_]"></a> <a id="getClass():Class[_]"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">getClass</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.Class">Class</span>[_]</span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#hashCode" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="hashCode():Int"></a> <a id="hashCode():Int"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">hashCode</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.Any#isInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="isInstanceOf[T0]:Boolean"></a> <a id="isInstanceOf[T0]:Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">isInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef#ne" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="ne(x$1:AnyRef):Boolean"></a> <a id="ne(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">ne</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#notify" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="notify():Unit"></a> <a id="notify():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">notify</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#notifyAll" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="notifyAll():Unit"></a> <a id="notifyAll():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">notifyAll</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#synchronized" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="synchronized[T0](x$1:=&gt;T0):T0"></a> <a id="synchronized[T0](⇒T0):T0"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">synchronized</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">(<span name="arg0">arg0: ⇒ <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span>)</span><span class="result">: <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#toString" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="toString():String"></a> <a id="toString():String"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">toString</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait():Unit"></a> <a id="wait():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait(x$1:Long,x$2:Int):Unit"></a> <a id="wait(Long,Int):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>, <span name="arg1">arg1: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait(x$1:Long):Unit"></a> <a id="wait(Long):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">()</span> </dd></dl></div> </li></ol> </div> </div> <div id="inheritedMembers"> <div class="parent" name="scala.Serializable"> <h3>Inherited from <span class="extype" name="scala.Serializable">Serializable</span></h3> </div><div class="parent" name="java.io.Serializable"> <h3>Inherited from <span class="extype" name="java.io.Serializable">Serializable</span></h3> </div><div class="parent" name="scala.AnyRef"> <h3>Inherited from <span class="extype" name="scala.AnyRef">AnyRef</span></h3> </div><div class="parent" name="scala.Any"> <h3>Inherited from <span class="extype" name="scala.Any">Any</span></h3> </div> </div> <div id="groupedMembers"> <div class="group" name="Ungrouped"> <h3>Ungrouped</h3> </div> </div> </div> <div id="tooltip"></div> <div id="footer"> </div> </body> </html>
<?php namespace Circle314\Component\Data\Persistence\Operation\Cache; use Circle314\Component\Data\Persistence\Operation\Response\ResponseInterface; use Circle314\Concept\Identification\<API key>; interface QueryInterface extends <API key> { /** * Gets an existing Response for the Query. * * @param $responseID * @return ResponseInterface */ public function getResponse($responseID); /** * Whether or not there is an existing Response for the Query. * * @param $responseID * @return bool */ public function hasResponse($responseID); /** * Saves a Response against the Query. * * @param $responseID * @param $response */ public function saveResponse($responseID, $response); }
import React from 'react'; import { action } from '@storybook/addon-actions'; import Checkbox from '.'; const onChange = action('onChange'); const defaultProps = { id: 'id1', onChange, }; const intermediate = { id: 'id2', onChange, intermediate: true, }; const checked = { id: 'id3', onChange, checked: true, }; const disabled = { id: 'id4', onChange, disabled: true, }; const withLabel = { id: 'id5', onChange, label: 'Some label', }; export default { title: 'Form/Controls/Checkbox', }; export const Default = () => ( <div style={{ padding: 30 }}> <h1>Checkbox</h1> <h2>Definition</h2> <p>The Checkbox component is basically a fancy checkbox like you have in your iphone</p> <h2>Examples</h2> <form> <h3>Default Checkbox</h3> <Checkbox {...defaultProps} /> <h3> Checkbox with <code>intermediate: true</code> </h3> <Checkbox {...intermediate} /> <h3> Checkbox with <code>checked: true</code> </h3> <Checkbox {...checked} /> <h3> Checkbox with <code>disabled: true</code> </h3> <Checkbox {...disabled} /> <h3> Checkbox with <code>label: Some label</code> </h3> <Checkbox {...withLabel} /> </form> </div> );
<table class="table table-striped" style="max-width: 800px;"> <thead> <tr> <th> <th>Name</th> <th>IBAN</th> <th>Bank</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Rabo personal</td> <td>NL15 RABO 01398 1237</td> <td>Rabobank</td> <td><button type="button" class="btn btn-danger"> Disconnect </button></td> </tr> <tr> <th scope="row">2</th> <td>Danska</td> <td>FI14 DANS 02130 1233</td> <td>Danska Bank</td> <td> <button type="button" class="btn btn-danger"> Disconnect </button> </td> </tr> </tbody> </table> <form> <p> <button type="button" class="btn btn-default"> <span class="glyphicon glyphicon-plus-sign"></span> Connect another bank account </button> </p> </form> <div class="panel panel-default" style="max-width: 800px;"> <div class="panel-body"> <form> <div class="form-group"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email" value="money@doekoe.com" > </div> <div class="form-group"> <label for="<API key>">Password</label> <input type="password" class="form-control" id="<API key>" placeholder="Password"> </div> <button type="submit" class="btn btn-default">Submit</button> </form> </div> </div>
from karld.loadump import <API key> from karld.loadump import ensure_dir from karld.loadump import <API key> from karld.loadump import i_get_csv_data from karld.loadump import is_file_csv from karld.loadump import i_get_json_data from karld.loadump import is_file_json from karld.loadump import raw_line_reader from karld.loadump import split_csv_file from karld.loadump import split_file from karld.loadump import split_file_output from karld.loadump import <API key> from karld.loadump import <API key> from karld.loadump import write_as_csv from karld.loadump import write_as_json
package com.fantasy.lulutong.activity.me; import android.os.Bundle; import android.view.View; import android.widget.RelativeLayout; import com.fantasy.lulutong.R; import com.fantasy.lulutong.activity.BaseActivity; public class RegisterActivity extends BaseActivity { private RelativeLayout relativeBack; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layout_register); relativeBack = (RelativeLayout) findViewById(R.id.<API key>); relativeBack.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); } }
package com.blackducksoftware.integration.hub.detect.tool.bazel; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Test; public class <API key> { @Test public void testTargetOnly() { <API key> substitutor = new <API key>("//foo:foolib"); final List<String> origArgs = new ArrayList<>(); origArgs.add("query"); origArgs.add("filter(\"@.*:jar\", deps(${detect.bazel.target}))"); final List<String> adjustedArgs = substitutor.substitute(origArgs); assertEquals(2, adjustedArgs.size()); assertEquals("query", adjustedArgs.get(0)); assertEquals("filter(\"@.*:jar\", deps(//foo:foolib))", adjustedArgs.get(1)); } @Test public void testBoth() { <API key> substitutor = new <API key>("//foo:foolib", "//external:<API key>"); final List<String> origArgs = new ArrayList<>(); origArgs.add("query"); origArgs.add("filter(\"@.*:jar\", deps(${detect.bazel.target}))"); origArgs.add("kind(maven_jar, ${detect.bazel.target.dependency})"); final List<String> adjustedArgs = substitutor.substitute(origArgs); assertEquals(3, adjustedArgs.size()); assertEquals("query", adjustedArgs.get(0)); assertEquals("filter(\"@.*:jar\", deps(//foo:foolib))", adjustedArgs.get(1)); assertEquals("kind(maven_jar, //external:<API key>)", adjustedArgs.get(2)); } }
package com.dyhpoon.fodex.navigationDrawer; import android.content.Context; import android.view.View; import android.view.ViewGroup; import com.dyhpoon.fodex.R; public class <API key> extends SectionAdapter { private Context mContext; public class ViewType { public static final int PROFILE = 0; public static final int WHITESPACE = 1; public static final int PAGE = 2; public static final int DIVIDER = 3; public static final int UTILITY = 4; } public <API key>(Context context) { mContext = context; } @Override public int getSectionCount() { return 5; // all view types } @Override public Boolean isSectionEnabled(int section) { switch (section) { case ViewType.PROFILE: return false; case ViewType.WHITESPACE: return false; case ViewType.PAGE: return true; case ViewType.DIVIDER: return false; case ViewType.UTILITY: return true; default: throw new <API key>( "Unhandled section number in navigation drawer adapter, found: " + section); } } @Override public int <API key>(int section) { switch (section) { case ViewType.PROFILE: return 1; case ViewType.WHITESPACE: return 1; case ViewType.PAGE: return <API key>.getPageItems(mContext).size(); case ViewType.DIVIDER: return 1; case ViewType.UTILITY: return <API key>.getUtilityItems(mContext).size(); default: throw new <API key>( "Unhandled section number in navigation drawer adapter, found: " + section); } } @Override public View getView(int section, int position, View convertView, ViewGroup parent) { switch (section) { case 0: convertView = inflateProfile(convertView); break; case 1: convertView = inflateWhiteSpace(convertView); break; case 2: convertView = inflatePageItem(convertView, position); break; case 3: convertView = inflateListDivider(convertView); break; case 4: convertView = inflateUtilityItem(convertView, position); break; default: throw new <API key>( "Unhandled section/position number in navigation drawer adapter, " + "found section: " + section + " position: " + position); } return convertView; } private View inflateProfile(View convertView) { if (convertView == null) { convertView = View.inflate(mContext, R.layout.list_item_profile, null); } return convertView; } private View inflateWhiteSpace(View convertView) { if (convertView == null) { convertView = View.inflate(mContext, R.layout.<API key>, null); } return convertView; } private View inflatePageItem(View convertView, int position) { if (convertView == null) { convertView = new <API key>(mContext); } <API key> info = <API key>.getPageItem(mContext, position); ((<API key>)convertView).iconImageView.setImageDrawable(info.drawable); ((<API key>)convertView).titleTextView.setText(info.title); return convertView; } private View inflateUtilityItem(View convertView, int position) { if (convertView == null) { convertView = new <API key>(mContext); } <API key> info = <API key>.getUtilityItem(mContext, position); ((<API key>)convertView).iconImageView.setImageDrawable(info.drawable); ((<API key>)convertView).titleTextView.setText(info.title); return convertView; } private View inflateListDivider(View convertView) { if (convertView == null) { convertView = View.inflate(mContext, R.layout.list_item_divider, null); } return convertView; } }
package hctaEpc.mmeSgsn.interface_.ge;
# tldbinit tldbinit initialize PostgrSQL database environment droping, creating tables: * symbols * quotes # Environment * Operating System: openSUSE 13.1 * Development tool: KDevelop 4.5.2 for KDE 4.11.5 * Languaje: C++ * Program directory; HOME/TradingLab/tldbinit * PostgreSQL lib: libpqxx
#ifndef LMS7002M_COMMANDS_H #define LMS7002M_COMMANDS_H const int LMS_RST_PULSE = 2; enum eCMD_LMS { CMD_GET_INFO = 0x00, Writes data to SI5356 synthesizer via I2C CMD_SI5356_WR = 0x11, Reads data from SI5356 synthesizer via I2C CMD_SI5356_RD = 0x12, Writes data to SI5351 synthesizer via I2C CMD_SI5351_WR = 0x13, Reads data from SI5351 synthesizer via I2C CMD_SI5351_RD = 0x14, Sets new LMS7002M chip’s RESET pin level (0, 1, pulse) CMD_LMS7002_RST = 0x20, Writes data to LMS7002M chip via SPI CMD_LMS7002_WR = 0x21, Reads data from LMS7002M chip via SPI CMD_LMS7002_RD = 0x22, CMD_PROG_MCU = 0x2A, Writes data to ADF4002 chip via SPI CMD_ADF4002_WR = 0x31, CMD_LMS6002_WR = 0x23, CMD_LMS6002_RD = 0x24, CMD_PE636040_WR = 0x41, CMD_PE636040_RD = 0x42, CMD_MYRIAD_GPIO_WR = 0x51, CMD_MYRIAD_GPIO_RD = 0x52 }; enum eCMD_STATUS { STATUS_UNDEFINED, <API key>, STATUS_UNKNOWN_CMD, STATUS_BUSY_CMD, <API key>, STATUS_ERROR_CMD }; #endif // LMS7002M_COMMANDS_H
package com.jukusoft.libgdx.rpg.engine.story.impl; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.jukusoft.libgdx.rpg.engine.story.StoryPart; import com.jukusoft.libgdx.rpg.engine.story.StoryTeller; import com.jukusoft.libgdx.rpg.engine.time.GameTime; import com.jukusoft.libgdx.rpg.engine.utils.ArrayUtils; import com.jukusoft.libgdx.rpg.engine.utils.FileUtils; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; public class DefaultStoryTeller implements StoryTeller { /** * all story parts */ List<StoryPart> storyParts = new ArrayList<>(); protected volatile StoryPart currentPart = null; protected int currentPartIndex = 0; protected BitmapFont font = null; public DefaultStoryTeller (BitmapFont font) { this.font = font; } @Override public void load(String storyFile) throws IOException { String[] lines = ArrayUtils.<API key>(FileUtils.readLines(storyFile, StandardCharsets.UTF_8)); StoryPart part = new StoryPart(); this.currentPart = part; //parse lines for (String line : lines) { if (line.startsWith(" //next part storyParts.add(part); part = new StoryPart(); continue; } part.addLine(line); } storyParts.add(part); } @Override public void start() { this.currentPart.start(); } @Override public int countParts() { return this.storyParts.size(); } @Override public StoryPart getCurrentPart() { return this.currentPart; } @Override public float getPartProgress(long now) { if (currentPart == null) { return 1f; } else { return currentPart.getPartProgress(now); } } @Override public void update(GameTime time) { if (currentPart.hasFinished(time.getTime())) { //switch to next part this.currentPartIndex++; if (this.currentPartIndex < this.storyParts.size()) { this.currentPart = this.storyParts.get(this.currentPartIndex); this.currentPart.start(); System.out.println("next story part: " + this.currentPartIndex); } else { System.out.println("story finished!"); } } } @Override public void draw(GameTime time, SpriteBatch batch, float x, float y, float spacePerLine) { if (currentPart == null) { return; } String[] lines = this.currentPart.getLineArray(); for (int i = 0; i < lines.length; i++) { this.font.draw(batch, lines[i], /*(game.getViewportWidth() - 80) / 2*/x, y - (i * spacePerLine)); } } @Override public boolean hasFinished() { return this.currentPartIndex > this.storyParts.size(); } }
extern crate ai_behavior; extern crate find_folder; extern crate gfx_device_gl; extern crate graphics; extern crate nalgebra; extern crate ncollide; extern crate piston_window; extern crate rand; extern crate sprite; extern crate uuid; mod mobs; use gfx_device_gl::Resources; use graphics::Image; use graphics::rectangle::square; use piston_window::*; use mobs::{Hero, Star}; use sprite::*; pub struct Game { scene: Scene<Texture<Resources>>, player: Hero, stars: Vec<Star>, diag: bool, pause: bool, victory: bool, loss: bool, } const TILE_SIZE: u32 = 64; impl Game { pub fn new(w: &mut PistonWindow) -> Game { let mut scene = Scene::new(); let mut stars: Vec<Star> = vec![]; for number in 1..7 { let color = match number % 4 { 1 => "yellow", 2 => "green", 3 => "blue", _ => "pink", }; stars.push(Star::new(color, w, &mut scene)); } let player = Hero::new(w, &mut scene); Game { scene: scene, player: player, stars: stars, diag: false, pause: false, victory: false, loss: false, } } pub fn on_update(&mut self, e: &Input, upd: UpdateArgs, w: &PistonWindow) { if self.pause || self.victory || self.loss { return; } self.scene.event(e); let mut grew = false; for mut star in &mut self.stars { if !star.destroyed && self.player.collides(&star) { star.destroy(&mut self.scene, upd.dt); self.player.grow(&mut self.scene, upd.dt); grew = true; } else { star.mov(w, &mut self.scene, upd.dt); } } if self.stars.iter().all(|star| star.destroyed) { self.victory = true; self.loss = false; return; } if !grew { self.player.shrink(&mut self.scene, upd.dt); } if self.player.size > 0.0 { self.player.mov(w, &mut self.scene, upd.dt); } else { self.loss = true; self.victory = false; } } pub fn on_draw(&mut self, e: &Input, _: RenderArgs, w: &mut PistonWindow) { let assets = find_folder::Search::ParentsThenKids(3, 3) .for_folder("assets") .unwrap(); let ref font = assets.join("Fresca-Regular.ttf"); let factory = w.factory.clone(); let mut glyphs = Glyphs::new(font, factory).unwrap(); let Size { height, width } = w.size(); let image = Image::new().rect(square(0.0, 0.0, width as f64)); let bg = Texture::from_path(&mut w.factory, assets.join("bg.png"), Flip::None, &TextureSettings::new()).unwrap(); w.draw_2d(e, |c, g| { clear([1.0, 1.0, 1.0, 1.0], g); let cols = width / TILE_SIZE; // 4:3 means rows will be fractional so add one to cover completely let tile_count = cols * (height / TILE_SIZE + 1); for number in 0..tile_count { let x: f64 = (number % cols * TILE_SIZE).into(); let y: f64 = (number / cols * TILE_SIZE).into(); image.draw(&bg, &Default::default(), c.transform.trans(x, y).zoom(1.0 / cols as f64), g); } if self.victory { text::Text::new_color([0.0, 1.0, 0.0, 1.0], height / 10).draw( "Hurray! You win!", &mut glyphs, &c.draw_state, c.transform.trans(width as f64 / 2.0 - width as f64 / 4.5, height as f64 / 2.0), g ); return; } else if self.loss { text::Text::new_color([0.0, 1.0, 0.0, 1.0], height / 10).draw( "Aw! You lose!", &mut glyphs, &c.draw_state, c.transform.trans(width as f64 / 2.0 - width as f64 / 4.5, height as f64 / 2.0), g ); return; } if self.diag { text::Text::new_color([0.0, 1.0, 0.0, 1.0], 10).draw( &format!("{}", self.player.diag()), &mut glyphs, &c.draw_state, c.transform.trans(10.0, 10.0), g ); } self.scene.draw(c.transform, g); }); } // TODO use an enum to track requested movement direction pub fn on_input(&mut self, inp: Input) { match inp { Input::Press(but) => { match but { Button::Keyboard(Key::Up) => { self.player.dir = (self.player.dir.0, -1.0); } Button::Keyboard(Key::Down) => { self.player.dir = (self.player.dir.0, 1.0); } Button::Keyboard(Key::Left) => { self.player.dir = (-1.0, self.player.dir.1); } Button::Keyboard(Key::Right) => { self.player.dir = (1.0, self.player.dir.1); } _ => {} } } Input::Release(but) => { match but { Button::Keyboard(Key::Up) => { self.player.dir = (self.player.dir.0, 0.0); } Button::Keyboard(Key::Down) => { self.player.dir = (self.player.dir.0, 0.0); } Button::Keyboard(Key::Left) => { self.player.dir = (0.0, self.player.dir.1); } Button::Keyboard(Key::Right) => { self.player.dir = (0.0, self.player.dir.1); } Button::Keyboard(Key::H) => { self.diag = !self.diag; } Button::Keyboard(Key::P) => { self.pause = !self.pause; } _ => {} } } _ => {} } } }
var editMode = portal.request.mode == 'edit'; var content = portal.content; var component = portal.component; var layoutRegions = portal.layoutRegions; var body = system.thymeleaf.render('view/layout-70-30.html', { title: content.displayName, path: content.path, name: content.name, editable: editMode, resourcesPath: portal.url.createResourceUrl(''), component: component, leftRegion: layoutRegions.getRegion("left"), rightRegion: layoutRegions.getRegion("right") }); portal.response.body = body; portal.response.contentType = 'text/html'; portal.response.status = 200;
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Arch.CMessaging.Client.Impl.Consumer { public interface IDisposed { bool IsDispose { get; } } }
SqlDataModel ========= A small example of implementing a SQL CRUD in Qt that can be used in a DataModel (already integrated and functional in a DataModel).
Ext.define("seava.ad.ui.extjs.frame.DateFormatMask_Ui", { extend: "e4e.ui.AbstractUi", alias: "widget.DateFormatMask_Ui", /** * Data-controls definition */ _defineDcs_: function() { this._getBuilder_().addDc("mask", Ext.create(seava.ad.ui.extjs.dc.DateFormatMask_Dc,{multiEdit: true})) ; }, /** * Components definition */ _defineElements_: function() { this._getBuilder_() .addDcFilterFormView("mask", {name:"maskFilter", xtype:"<API key>$Filter"}) .addDcEditGridView("mask", {name:"maskEditList", xtype:"<API key>$EditList", frame:true}) .addPanel({name:"main", layout:"border", defaults:{split:true}}); }, /** * Combine the components */ _linkElements_: function() { this._getBuilder_() .addChildrenTo("main", ["maskFilter", "maskEditList"], ["north", "center"]) .addToolbarTo("main", "tlbMaskList"); }, /** * Create toolbars */ _defineToolbars_: function() { this._getBuilder_() .beginToolbar("tlbMaskList", {dc: "mask"}) .addTitle().addSeparator().addSeparator() .addQuery().addSave().addCancel() .addReports() .end(); } });