text
stringlengths
2
1.04M
meta
dict
package de.lessvoid.nifty.examples.progressbar; import de.lessvoid.nifty.Nifty; import de.lessvoid.nifty.controls.Controller; import de.lessvoid.nifty.controls.Parameters; import de.lessvoid.nifty.elements.Element; import de.lessvoid.nifty.elements.render.TextRenderer; import de.lessvoid.nifty.examples.NiftyExample; import de.lessvoid.nifty.input.NiftyInputEvent; import de.lessvoid.nifty.screen.Screen; import de.lessvoid.nifty.tools.SizeValue; import javax.annotation.Nonnull; import javax.annotation.Nullable; public class ProgressbarControl implements Controller, NiftyExample { @Nullable private Element progressBarElement; @Nullable private Element progressTextElement; @Override public void bind( @Nonnull final Nifty nifty, @Nonnull final Screen screenParam, @Nonnull final Element element, @Nonnull final Parameters parameter) { progressBarElement = element.findElementById("#progress"); progressTextElement = element.findElementById("#progress-text"); } @Override public void init(@Nonnull final Parameters parameter) { } @Override public void onStartScreen() { } @Override public void onFocus(final boolean getFocus) { } @Override public boolean inputEvent(@Nonnull final NiftyInputEvent inputEvent) { return false; } public void setProgress(final float progressValue) { float progress = progressValue; if (progress < 0.0f) { progress = 0.0f; } else if (progress > 1.0f) { progress = 1.0f; } final int MIN_WIDTH = 32; int pixelWidth = (int) (MIN_WIDTH + (progressBarElement.getParent().getWidth() - MIN_WIDTH) * progress); progressBarElement.setConstraintWidth(new SizeValue(pixelWidth + "px")); progressBarElement.getParent().layoutElements(); String progressText = String.format("%3.0f%%", progress * 100); progressTextElement.getRenderer(TextRenderer.class).setText(progressText); } @Nonnull @Override public String getStartScreen() { return "start"; } @Nonnull @Override public String getMainXML() { return "progressbar/progressbar.xml"; } @Nonnull @Override public String getTitle() { return "Nifty Progressbar Example"; } @Override public void prepareStart(Nifty nifty) { // nothing } }
{ "content_hash": "5b9c142106d2f69d30f07be7c865df6b", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 108, "avg_line_length": 26.39080459770115, "alnum_prop": 0.7286585365853658, "repo_name": "mkaring/nifty-gui", "id": "0708e6cd533b40ef6d13fb0633fbd364350ee607", "size": "2296", "binary": false, "copies": "5", "ref": "refs/heads/1.4", "path": "nifty-examples/src/main/java/de/lessvoid/nifty/examples/progressbar/ProgressbarControl.java", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "F#", "bytes": "474" }, { "name": "Java", "bytes": "3177909" } ], "symlink_target": "" }
package com.ogamelib.building; import java.io.IOException; import java.lang.reflect.Modifier; import java.util.List; import org.junit.Test; import static org.junit.Assert.*; import com.ogamelib.Introspection; import com.ogamelib.building.Building; import com.ogamelib.building.BuildingSet; public class BuildingSetTest { @Test public void testContainsAllBuildings() throws ClassNotFoundException, IOException { BuildingSet set = new BuildingSet(); // get the possible building implementations List<Class<?>> classes = Introspection .getClasses("org.ogameoptimizer.ogame.building"); // remove the tests, abstract/interface classes and the BuildingSet // itself for (Class<?> clazz : classes.toArray(new Class[classes.size()])) { if (clazz.getSimpleName().endsWith("Test") || Modifier.isAbstract(clazz.getModifiers()) || Modifier.isInterface(clazz.getModifiers()) || clazz.equals(BuildingSet.class)) { classes.remove(clazz); } } // the test for (Class<?> clazz : classes) { boolean isPresent = false; for (Building building : set) { if (building.getClass().equals(clazz)) { isPresent = true; break; } } if (!isPresent) { fail(clazz.getSimpleName() + " is not retrieved in the set."); } } } }
{ "content_hash": "92a72b0c6fb006d380e90746e1c3d774", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 70, "avg_line_length": 25.8, "alnum_prop": 0.7, "repo_name": "matthieu-vergne/Ogame-Library", "id": "3ffe44d65540960e899cb934f9938c7418a69497", "size": "1290", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/test/java/com/ogamelib/building/BuildingSetTest.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Java", "bytes": "106226" } ], "symlink_target": "" }
import random from faker import Faker from . import College, Essay, Major, RecommendationLetter, TestScore, ChecklistItem, Acceptance, StudentScholarship from .. import db from sqlalchemy.orm import validates student_colleges = db.Table('student_colleges', db.Column('college_id', db.Integer, db.ForeignKey('college.id')), db.Column('student_profile_id', db.Integer, db.ForeignKey('student_profile.id'))) student_interests = db.Table('student_interests', db.Column('interest_id', db.Integer, db.ForeignKey('interest.id')), db.Column('student_profile_id', db.Integer, db.ForeignKey('student_profile.id'))) student_majors = db.Table('student_majors', db.Column('major_id', db.Integer, db.ForeignKey('major.id')), db.Column('student_profile_id', db.Integer, db.ForeignKey('student_profile.id'))) class StudentProfile(db.Model): id = db.Column(db.Integer, primary_key=True) user = db.relationship("User", back_populates="student_profile") # PERSONAL INFO phone_number = db.Column(db.String(15), index=True) high_school = db.Column(db.String, index=True) district = db.Column(db.String, index=True) city = db.Column(db.String, index=True) state = db.Column(db.String, index=True) graduation_year = db.Column(db.String, index=True) grade = db.Column(db.Integer, index=True) # ACADEMIC INFO unweighted_gpa = db.Column(db.Float, index=True) weighted_gpa = db.Column(db.Float, index=True) test_scores = db.relationship( 'TestScore', backref='student_profile', lazy=True) majors = db.relationship( 'Major', secondary=student_majors, backref=db.backref('student_profiles', lazy='dynamic')) colleges = db.relationship( 'College', secondary=student_colleges, backref=db.backref('student_profiles', lazy='dynamic')) interests = db.relationship( 'Interest', secondary=student_interests, backref=db.backref('student_profiles', lazy='dynamic')) # APPLICATION INFO # either 'Incomplete' or 'Complete' fafsa_status = db.Column(db.String, index=True, default='Incomplete') common_app_essay = db.Column( db.String, index=True, default='') # link to common app essay common_app_essay_status = db.Column( db.String, index=True, default='Incomplete') early_deadline = db.Column(db.Boolean, default=False) essays = db.relationship('Essay') recommendation_letters = db.relationship('RecommendationLetter') acceptances = db.relationship('Acceptance') scholarships = db.relationship('StudentScholarship') scholarship_amount = db.Column(db.Float, index=True) checklist = db.relationship('ChecklistItem') cal_token = db.Column(db.String, index=True) cal_refresh_token = db.Column(db.String, index=True) cal_token_uri = db.Column(db.String, index=True) cal_client_id = db.Column(db.String, index=True) cal_client_secret = db.Column(db.String, index=True) cal_scopes = db.Column(db.String, index=True) cal_state = db.Column(db.String, index=True) @validates('common_app_essay_status') def validate_status(self, key, status): assert status in [ 'Incomplete', 'Waiting', 'Reviewed', 'Edited', 'Done' ] return status @staticmethod def generate_fake(): fake = Faker() year = random.choice([['2018', '12'], ['2019', '11'], ['2020', '10']]) fafsa_status = random.choice(['Incomplete', 'Complete']) essay_status = random.choice( ['Incomplete', 'Waiting', 'Reviewed', 'Edited', 'Done']) profile = StudentProfile( high_school='{} High School'.format(fake.street_name()), district='{} District'.format(fake.city()), city=fake.city(), state=fake.state(), graduation_year=year[0], grade=year[1], unweighted_gpa=round(random.uniform(2, 4), 2), weighted_gpa=round(random.uniform(2,5), 2), test_scores=TestScore.generate_fake(), majors=random.sample(Major.query.all(), 3), colleges=random.sample(College.query.all(), 3), fafsa_status=fafsa_status, common_app_essay='https://google.com', common_app_essay_status=essay_status, early_deadline=bool(random.getrandbits(1)), essays=Essay.generate_fake(), recommendation_letters=RecommendationLetter.generate_fake(), acceptances=Acceptance.generate_fake(), scholarships=StudentScholarship.generate_fake(), scholarship_amount=0, checklist=ChecklistItem.generate_fake()) for i in profile.scholarships: profile.scholarship_amount = profile.scholarship_amount + i.award_amount return profile def __repr__(self): s = '<Student Profile\n' s += 'High School: {}\n'.format(self.high_school) s += 'District: {}\n'.format(self.district) s += 'City, State: {}, {}\n'.format(self.city, self.state) s += 'Gradution Year: {}\n'.format(self.graduation_year) s += 'Grade: {}\n'.format(self.grade) s += 'Unweighted GPA: {}\n'.format(self.unweighted_gpa) s += 'Weighted GPA: {}\n'.format(self.weighted_gpa) s += 'Test Scores: {}\n'.format(self.test_scores) s += 'Majors: {}\n'.format(','.join([m.name for m in self.majors])) s += 'Colleges: {}\n'.format(','.join([c.name for c in self.colleges])) s += 'FAFSA Status {}\n'.format(self.fafsa_status) s += 'Common App Essay: {}\n'.format(self.common_app_essay) s += 'Essays: {}\n'.format(self.essays) s += 'Recommendation Letters: {}'.format( self.recommendation_letters) + '>' s += 'Acceptances: {}'.format( self.acceptances) + '>' return s
{ "content_hash": "ae941fc8120b34ca35cd1cc575aa138c", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 115, "avg_line_length": 47.02255639097744, "alnum_prop": 0.5940198273105213, "repo_name": "hack4impact/next-gen-scholars", "id": "23c8337fc6e2ae3f0ee4f7f38e56dfcc208e6a37", "size": "6254", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/models/student_profile.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "44495" }, { "name": "HTML", "bytes": "191164" }, { "name": "JavaScript", "bytes": "763273" }, { "name": "Python", "bytes": "213104" } ], "symlink_target": "" }
/** * notes on PseudoNCList needed for porting Trellis data loading to jbrowse_1.7 branch * mostly need to override ID assignment based on position in NCList, * and replace with unique IDs already present in feature arrays * * inherit from jbrowse Store/NCList, but override: _decorate_feature: function(accessors, feature, id, parent) { feature.get = accessors.get; if (config.uniqueIdField) { otherid = feature.get(uniqueIdField) } var uid; if (otherid) { uid = otherid; } else { uid = id; } this.inherited( accessors, feature, uid, parent ); } */
{ "content_hash": "b45de535b6c20488b7625e92dfa7dcb4", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 87, "avg_line_length": 28.636363636363637, "alnum_prop": 0.6492063492063492, "repo_name": "agua/agua", "id": "5af85286aab04b9707762e2857b6f3055cbedcfd", "size": "630", "binary": false, "copies": "9", "ref": "refs/heads/master", "path": "html/plugins/view/jbrowse/plugins/WebApollo/js/Store/SeqFeature/PseudoNCList.js", "mode": "33188", "license": "mit", "language": [ { "name": "ActionScript", "bytes": "21071" }, { "name": "C", "bytes": "929361" }, { "name": "C++", "bytes": "47947" }, { "name": "CSS", "bytes": "3453393" }, { "name": "Java", "bytes": "137781" }, { "name": "JavaScript", "bytes": "32393155" }, { "name": "Lua", "bytes": "23713" }, { "name": "PHP", "bytes": "616960" }, { "name": "Perl", "bytes": "3453598" }, { "name": "Puppet", "bytes": "4423" }, { "name": "Python", "bytes": "60419" }, { "name": "Ruby", "bytes": "1521" }, { "name": "Shell", "bytes": "44467" }, { "name": "TeX", "bytes": "4217" }, { "name": "XQuery", "bytes": "799" }, { "name": "XSLT", "bytes": "104131" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using Aspose.Email.Exchange; using Aspose.Email.Mail; namespace Aspose.Email.Examples.CSharp.Exchange { class PagingSupportForListingAppointments { static void Run() { // ExStart: PagingSupportForListingAppointments using (IEWSClient client = EWSClient.GetEWSClient("exchange.domain.com", "username", "password")) { try { Appointment[] appts = client.ListAppointments(); Console.WriteLine(appts.Length); DateTime date = DateTime.Now; DateTime startTime = new DateTime(date.Year, date.Month, date.Day, date.Hour, 0, 0); DateTime endTime = startTime.AddHours(1); int appNumber = 10; Dictionary<string, Appointment> appointmentsDict = new Dictionary<string, Appointment>(); for (int i = 0; i < appNumber; i++) { startTime = startTime.AddHours(1); endTime = endTime.AddHours(1); string timeZone = "America/New_York"; Appointment appointment = new Appointment( "Room 112", startTime, endTime, "from@domain.com", "to@domain.com"); appointment.SetTimeZone(timeZone); appointment.Summary = "NETWORKNET-35157_3 - " + Guid.NewGuid().ToString(); appointment.Description = "EMAILNET-35157 Move paging parameters to separate class"; string uid = client.CreateAppointment(appointment); appointmentsDict.Add(uid, appointment); } AppointmentCollection totalAppointmentCol = client.ListAppointments(); ///// LISTING APPOINTMENTS WITH PAGING SUPPORT /////// int itemsPerPage = 2; List<AppointmentPageInfo> pages = new List<AppointmentPageInfo>(); AppointmentPageInfo pagedAppointmentCol = client.ListAppointmentsByPage(itemsPerPage); Console.WriteLine(pagedAppointmentCol.Items.Count); pages.Add(pagedAppointmentCol); while (!pagedAppointmentCol.LastPage) { pagedAppointmentCol = client.ListAppointmentsByPage(itemsPerPage, pagedAppointmentCol.PageOffset + 1); pages.Add(pagedAppointmentCol); } int retrievedItems = 0; foreach (AppointmentPageInfo folderCol in pages) retrievedItems += folderCol.Items.Count; } finally { } } // ExEnd: PagingSupportForListingAppointments } } }
{ "content_hash": "86e6adafe2793c87db54f8f9b53161f5", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 126, "avg_line_length": 47.246153846153845, "alnum_prop": 0.51579290133507, "repo_name": "jawadaspose/Aspose.Email-for-.NET", "id": "1dad5d6e6611d8fdd9afd4fc9906964d324909b0", "size": "3073", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Examples/CSharp/Exchange/PagingSupportForListingAppointments.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "110578" } ], "symlink_target": "" }
angular.module('hrApp') .controller('EmployeesController', ["UserService", "EmployeeService", "GroupService", "ReviewService", function(UserService, EmployeeService, GroupService, ReviewService) { var self = this; self.employees = [ { type : "RF", title : "Dr.", firstname : "Alice", lastname: "Acropolis" }, { type : "RF", title : "Mr.", firstname : "Bob", lastname: "Berkeley" }, { type : "RF", title : "Mr.", firstname : "Chris", lastname: "Carlson" } ]; self.getEmployees = function() { return employees; // return $http.get("/employee/").then( // function(response) { // self.employees = response.data; // }, function(errResponse) { // console.error("Error loading employee list"); // }); }; self.addEmployee = function() { // window.open("employee.html"); } // self.getEmployees(); }]) .controller('MainCtrl', ["UserService", "EmployeeService", "GroupService", "ReviewService", function(UserService, EmployeeService, GroupService, ReviewService) { var self = this; self.userService = UserService; self.employeeService = EmployeeService; self.groupService = GroupService; self.reviewService = ReviewService; }]) .controller('EmployeeController', ["UserService", "EmployeeService", "GroupService", "ReviewService", function(UserService, EmployeeService, GroupService, ReviewService) { var self = this; self.edit = false; self.employee = { firstname: "Diana", lastname: "Prince", middlename: "Amazon", title: "Dr.", type: "PM" }; self.setEdit = function(allowEdit) { self.edit = allowEdit; }; self.submit = function() { }; self.reset = function() { }; self.readonly = function() { return !self.edit; } var employeeId = $location.search("id"); if (employeeId) { self.employee = $http.get("/employee/" + employeeId); } }]) .controller('GroupCtrl', ["UserService", "EmployeeService", "GroupService", "ReviewService", function(UserService, EmployeeService, GroupService, ReviewService) { var self = this; }]) .controller('GroupsCtrl', ["UserService", "EmployeeService", "GroupService", "ReviewService", function(UserService, EmployeeService, GroupService, ReviewService) { var self = this; }]) .controller('ReviewCtrl', ["UserService", "EmployeeService", "GroupService", "ReviewService", function(UserService, EmployeeService, GroupService, ReviewService) { var self = this; }]) .controller('EvalBuildController', ["UserService", "EmployeeService", "GroupService", "ReviewService", function(UserService, EmployeeService, GroupService, ReviewService) { var self = this; var ug = [ { "description" : "Brew the best milkshake in the group" }, { "description" : "Win the biggest teddy bear at the company fair" }, { "description" : "Own the widest belt in the company" } ]; var fg = [ { "name" : "Admin", "description" : "Use sharp pencils." }, { "name" : "Civics", "description" : "Be polite on elevators." }, { "name" : "Security", "description" : "Be safe at all times." } ]; self.userGoals = function() { return self.ug; } self.fixedGoals = function() { return self.fg; } self.submit = function() { }; self.done = function() { }; self.cancel = function() { }; }]) .controller('UserCtrl', ["UserService", "EmployeeService", "GroupService", "ReviewService", function(UserService, EmployeeService, GroupService, ReviewService) { var self = this; }]);
{ "content_hash": "03f92148b3f71b6bc3c02793de886462", "timestamp": "", "source": "github", "line_count": 115, "max_line_length": 95, "avg_line_length": 30.991304347826087, "alnum_prop": 0.6430976430976431, "repo_name": "jleete97/hr", "id": "dad7d86852263478c9c46087b20ed6af96ee4663", "size": "3580", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "hr/src/main/resources/public/js/controllers.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "5545" }, { "name": "HTML", "bytes": "15393" }, { "name": "Java", "bytes": "28633" }, { "name": "JavaScript", "bytes": "249749" } ], "symlink_target": "" }
<div> <table class="table table-striped"> <tr ng-repeat="doc in docs | limitTo:pageSize"> <td> <div class="time-ago" title="{{doc.date_dt}}">{{doc.date_dt|truncate:10}}</div> <div><a translation-url ng-href="{{doc.url_ss[0]}}">{{doc.title_t}}</a></div> </td> </tr> <tr ng-hide="isPagerVisible() || !fullListUrl"> <td> <div ng-show="hasRecords()" class="text-right"><a translation-url ng-href="{{fullListUrl}}" class="morelinks">More News</a></div> <div ng-hide="hasRecords()">Sorry, there are no news currently available.</div> </td> </tr> </table> <div class="pager" ng-show="isPagerVisible()"> <button style="width: 50px;" class="btn" ng-class="{disabled: disablePrevious()}" ng-disabled="disablePrevious()" ng-click="currentPage=currentPage-1" type="button">&laquo;</button> <span style="padding: 0px 10px;">{{currentPage+1}}/{{numberOfPages()}}</span> <button style="width: 50px;" class="btn" ng-class="{disabled: disableNext()}" ng-disabled="disableNext()" ng-click="currentPage=currentPage+1" type="button">&raquo;</button> </div> </div>
{ "content_hash": "5dd568d3508db2da04f6dba0aae0c736", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 190, "avg_line_length": 58.57142857142857, "alnum_prop": 0.5788617886178862, "repo_name": "scbd/chm.cbd.int", "id": "29fcb4169ee401024eaf4bd19a1222e3d23c6552", "size": "1232", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/directives/news.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "74194" }, { "name": "Dockerfile", "bytes": "1224" }, { "name": "EJS", "bytes": "9748" }, { "name": "HTML", "bytes": "1753013" }, { "name": "JavaScript", "bytes": "1495387" }, { "name": "Less", "bytes": "672" }, { "name": "Shell", "bytes": "2952" } ], "symlink_target": "" }
package org.apache.beam.runners.fnexecution.wire; import static org.apache.beam.runners.core.construction.BeamUrns.getUrn; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.MoreObjects.firstNonNull; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList.toImmutableList; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.instanceOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.fail; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.google.auto.value.AutoValue; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; import org.apache.beam.fn.harness.Caches; import org.apache.beam.fn.harness.state.BeamFnStateClient; import org.apache.beam.fn.harness.state.StateBackedIterable; import org.apache.beam.model.fnexecution.v1.BeamFnApi.StateGetResponse; import org.apache.beam.model.fnexecution.v1.BeamFnApi.StateRequest; import org.apache.beam.model.fnexecution.v1.BeamFnApi.StateResponse; import org.apache.beam.model.pipeline.v1.RunnerApi.StandardCoders; import org.apache.beam.model.pipeline.v1.SchemaApi; import org.apache.beam.runners.core.construction.CoderTranslation.TranslationContext; import org.apache.beam.runners.core.construction.CoderTranslator; import org.apache.beam.runners.core.construction.ModelCoderRegistrar; import org.apache.beam.runners.core.construction.Timer; import org.apache.beam.sdk.coders.BooleanCoder; import org.apache.beam.sdk.coders.ByteCoder; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.Coder.Context; import org.apache.beam.sdk.coders.CoderException; import org.apache.beam.sdk.coders.DoubleCoder; import org.apache.beam.sdk.coders.IterableCoder; import org.apache.beam.sdk.coders.IterableLikeCoder; import org.apache.beam.sdk.coders.KvCoder; import org.apache.beam.sdk.coders.RowCoder; import org.apache.beam.sdk.coders.StringUtf8Coder; import org.apache.beam.sdk.coders.TimestampPrefixingWindowCoder; import org.apache.beam.sdk.coders.VarLongCoder; import org.apache.beam.sdk.schemas.Schema; import org.apache.beam.sdk.schemas.SchemaTranslation; import org.apache.beam.sdk.transforms.windowing.BoundedWindow; import org.apache.beam.sdk.transforms.windowing.GlobalWindow; import org.apache.beam.sdk.transforms.windowing.IntervalWindow; import org.apache.beam.sdk.transforms.windowing.IntervalWindow.IntervalWindowCoder; import org.apache.beam.sdk.transforms.windowing.PaneInfo; import org.apache.beam.sdk.util.CoderUtils; import org.apache.beam.sdk.util.ShardedKey; import org.apache.beam.sdk.util.WindowedValue; import org.apache.beam.sdk.values.KV; import org.apache.beam.sdk.values.Row; import org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString; import org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.InvalidProtocolBufferException; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.MoreObjects; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Splitter; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableBiMap; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.CharStreams; import org.checkerframework.checker.nullness.qual.Nullable; import org.joda.time.Duration; import org.joda.time.Instant; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; /** Tests that Java SDK coders standardized by the Fn API meet the common spec. */ @RunWith(Parameterized.class) @SuppressWarnings({ "rawtypes", // TODO(https://issues.apache.org/jira/browse/BEAM-10556) }) public class CommonCoderTest { private static final String STANDARD_CODERS_YAML_PATH = "/org/apache/beam/model/fnexecution/v1/standard_coders.yaml"; private static final Map<String, Class<?>> coders = ImmutableMap.<String, Class<?>>builder() .put(getUrn(StandardCoders.Enum.BYTES), ByteCoder.class) .put(getUrn(StandardCoders.Enum.BOOL), BooleanCoder.class) .put(getUrn(StandardCoders.Enum.STRING_UTF8), StringUtf8Coder.class) .put(getUrn(StandardCoders.Enum.KV), KvCoder.class) .put(getUrn(StandardCoders.Enum.VARINT), VarLongCoder.class) .put(getUrn(StandardCoders.Enum.INTERVAL_WINDOW), IntervalWindowCoder.class) .put(getUrn(StandardCoders.Enum.ITERABLE), IterableCoder.class) .put(getUrn(StandardCoders.Enum.TIMER), Timer.Coder.class) .put(getUrn(StandardCoders.Enum.GLOBAL_WINDOW), GlobalWindow.Coder.class) .put(getUrn(StandardCoders.Enum.DOUBLE), DoubleCoder.class) .put( getUrn(StandardCoders.Enum.WINDOWED_VALUE), WindowedValue.FullWindowedValueCoder.class) .put( getUrn(StandardCoders.Enum.PARAM_WINDOWED_VALUE), WindowedValue.ParamWindowedValueCoder.class) .put(getUrn(StandardCoders.Enum.ROW), RowCoder.class) .put(getUrn(StandardCoders.Enum.SHARDED_KEY), ShardedKey.Coder.class) .put(getUrn(StandardCoders.Enum.CUSTOM_WINDOW), TimestampPrefixingWindowCoder.class) .put(getUrn(StandardCoders.Enum.STATE_BACKED_ITERABLE), StateBackedIterable.Coder.class) .build(); @AutoValue abstract static class CommonCoder { abstract String getUrn(); abstract List<CommonCoder> getComponents(); @SuppressWarnings("mutable") abstract byte[] getPayload(); abstract Boolean getNonDeterministic(); abstract Map<ByteString, ByteString> getState(); @JsonCreator static CommonCoder create( @JsonProperty("urn") String urn, @JsonProperty("components") @Nullable List<CommonCoder> components, @JsonProperty("payload") @Nullable String payload, @JsonProperty("non_deterministic") @Nullable Boolean nonDeterministic, @JsonProperty("state") @Nullable Map<String, String> state) { if (state == null) { state = Collections.emptyMap(); } Map<ByteString, ByteString> transformedState = new HashMap<>(); for (Map.Entry<String, String> entry : state.entrySet()) { transformedState.put( ByteString.copyFromUtf8(entry.getKey()), ByteString.copyFrom(entry.getValue().getBytes(StandardCharsets.ISO_8859_1))); } return new AutoValue_CommonCoderTest_CommonCoder( checkNotNull(urn, "urn"), firstNonNull(components, Collections.emptyList()), firstNonNull(payload, "").getBytes(StandardCharsets.ISO_8859_1), firstNonNull(nonDeterministic, Boolean.FALSE), transformedState); } } @AutoValue abstract static class CommonCoderTestSpec { abstract CommonCoder getCoder(); abstract @Nullable Boolean getNested(); abstract Map<String, Object> getExamples(); @JsonCreator static CommonCoderTestSpec create( @JsonProperty("coder") CommonCoder coder, @JsonProperty("nested") @Nullable Boolean nested, @JsonProperty("examples") Map<String, Object> examples) { return new AutoValue_CommonCoderTest_CommonCoderTestSpec(coder, nested, examples); } } @AutoValue abstract static class OneCoderTestSpec { abstract CommonCoder getCoder(); abstract boolean getNested(); @SuppressWarnings("mutable") abstract byte[] getSerialized(); abstract Object getValue(); static OneCoderTestSpec create( CommonCoder coder, boolean nested, byte[] serialized, Object value) { return new AutoValue_CommonCoderTest_OneCoderTestSpec(coder, nested, serialized, value); } } private static List<OneCoderTestSpec> loadStandardCodersSuite() throws IOException { InputStream stream = CommonCoderTest.class.getResourceAsStream(STANDARD_CODERS_YAML_PATH); if (stream == null) { fail("Could not load standard coder specs as resource:" + STANDARD_CODERS_YAML_PATH); } // Would like to use the InputStream directly with Jackson, but Jackson does not seem to // support streams of multiple entities. Instead, read the entire YAML as a String and split // it up manually, passing each to Jackson. String specString = CharStreams.toString(new InputStreamReader(stream, StandardCharsets.UTF_8)); Iterable<String> specs = Splitter.on("\n---\n").split(specString); List<OneCoderTestSpec> ret = new ArrayList<>(); for (String spec : specs) { CommonCoderTestSpec coderTestSpec = parseSpec(spec); CommonCoder coder = coderTestSpec.getCoder(); for (Map.Entry<String, Object> oneTestSpec : coderTestSpec.getExamples().entrySet()) { byte[] serialized = oneTestSpec.getKey().getBytes(StandardCharsets.ISO_8859_1); Object value = oneTestSpec.getValue(); if (coderTestSpec.getNested() == null) { // Missing nested means both ret.add(OneCoderTestSpec.create(coder, true, serialized, value)); ret.add(OneCoderTestSpec.create(coder, false, serialized, value)); } else { ret.add(OneCoderTestSpec.create(coder, coderTestSpec.getNested(), serialized, value)); } } } return ImmutableList.copyOf(ret); } @Parameters(name = "{1}") public static Iterable<Object[]> data() throws IOException { ImmutableList.Builder<Object[]> ret = ImmutableList.builder(); for (OneCoderTestSpec test : loadStandardCodersSuite()) { // Some tools cannot handle Unicode in test names, so omit the problematic value field. String testname = MoreObjects.toStringHelper(OneCoderTestSpec.class) .add("coder", test.getCoder()) .add("nested", test.getNested()) .add("serialized", test.getSerialized()) .toString(); ret.add(new Object[] {test, testname}); } return ret.build(); } @Parameter(0) public OneCoderTestSpec testSpec; @Parameter(1) public String ignoredTestName; private static CommonCoderTestSpec parseSpec(String spec) throws IOException { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); return mapper.readValue(spec, CommonCoderTestSpec.class); } private static void assertCoderIsKnown(CommonCoder coder) { assertThat("not a known coder", coders.keySet(), hasItem(coder.getUrn())); for (CommonCoder component : coder.getComponents()) { assertCoderIsKnown(component); } } /** Converts from JSON-auto-deserialized types into the proper Java types for the known coders. */ private static Object convertValue(Object value, CommonCoder coderSpec, Coder coder) { String s = coderSpec.getUrn(); if (s.equals(getUrn(StandardCoders.Enum.BYTES))) { return ((String) value).getBytes(StandardCharsets.ISO_8859_1); } else if (s.equals(getUrn(StandardCoders.Enum.BOOL))) { return value; } else if (s.equals(getUrn(StandardCoders.Enum.STRING_UTF8))) { return value; } else if (s.equals(getUrn(StandardCoders.Enum.KV))) { Coder keyCoder = ((KvCoder) coder).getKeyCoder(); Coder valueCoder = ((KvCoder) coder).getValueCoder(); Map<String, Object> kvMap = (Map<String, Object>) value; Object k = convertValue(kvMap.get("key"), coderSpec.getComponents().get(0), keyCoder); Object v = convertValue(kvMap.get("value"), coderSpec.getComponents().get(1), valueCoder); return KV.of(k, v); } else if (s.equals(getUrn(StandardCoders.Enum.VARINT))) { return ((Number) value).longValue(); } else if (s.equals(getUrn(StandardCoders.Enum.TIMER))) { Map<String, Object> kvMap = (Map<String, Object>) value; Coder<?> keyCoder = ((Timer.Coder) coder).getValueCoder(); Coder<? extends BoundedWindow> windowCoder = ((Timer.Coder) coder).getWindowCoder(); List<BoundedWindow> windows = new ArrayList<>(); for (Object window : (List<Object>) kvMap.get("windows")) { windows.add( (BoundedWindow) convertValue(window, coderSpec.getComponents().get(1), windowCoder)); } if ((boolean) kvMap.get("clearBit")) { return Timer.cleared( convertValue(kvMap.get("userKey"), coderSpec.getComponents().get(0), keyCoder), (String) kvMap.get("dynamicTimerTag"), windows); } Map<String, Object> paneInfoMap = (Map<String, Object>) kvMap.get("pane"); PaneInfo paneInfo = PaneInfo.createPane( (boolean) paneInfoMap.get("is_first"), (boolean) paneInfoMap.get("is_last"), PaneInfo.Timing.valueOf((String) paneInfoMap.get("timing")), (int) paneInfoMap.get("index"), (int) paneInfoMap.get("on_time_index")); return Timer.of( convertValue(kvMap.get("userKey"), coderSpec.getComponents().get(0), keyCoder), (String) kvMap.get("dynamicTimerTag"), windows, new Instant(((Number) kvMap.get("fireTimestamp")).longValue()), new Instant(((Number) kvMap.get("holdTimestamp")).longValue()), paneInfo); } else if (s.equals(getUrn(StandardCoders.Enum.INTERVAL_WINDOW))) { Map<String, Object> kvMap = (Map<String, Object>) value; Instant end = new Instant(((Number) kvMap.get("end")).longValue()); Duration span = Duration.millis(((Number) kvMap.get("span")).longValue()); return new IntervalWindow(end.minus(span), span); } else if (s.equals(getUrn(StandardCoders.Enum.ITERABLE)) || s.equals(getUrn(StandardCoders.Enum.STATE_BACKED_ITERABLE))) { Coder elementCoder = ((IterableLikeCoder) coder).getElemCoder(); List<Object> elements = (List<Object>) value; List<Object> convertedElements = new ArrayList<>(); for (Object element : elements) { convertedElements.add( convertValue(element, coderSpec.getComponents().get(0), elementCoder)); } return convertedElements; } else if (s.equals(getUrn(StandardCoders.Enum.GLOBAL_WINDOW))) { return GlobalWindow.INSTANCE; } else if (s.equals(getUrn(StandardCoders.Enum.WINDOWED_VALUE)) || s.equals(getUrn(StandardCoders.Enum.PARAM_WINDOWED_VALUE))) { Map<String, Object> kvMap = (Map<String, Object>) value; Coder valueCoder = ((WindowedValue.FullWindowedValueCoder) coder).getValueCoder(); Coder windowCoder = ((WindowedValue.FullWindowedValueCoder) coder).getWindowCoder(); Object windowValue = convertValue(kvMap.get("value"), coderSpec.getComponents().get(0), valueCoder); Instant timestamp = new Instant(((Number) kvMap.get("timestamp")).longValue()); List<BoundedWindow> windows = new ArrayList<>(); for (Object window : (List<Object>) kvMap.get("windows")) { windows.add( (BoundedWindow) convertValue(window, coderSpec.getComponents().get(1), windowCoder)); } Map<String, Object> paneInfoMap = (Map<String, Object>) kvMap.get("pane"); PaneInfo paneInfo = PaneInfo.createPane( (boolean) paneInfoMap.get("is_first"), (boolean) paneInfoMap.get("is_last"), PaneInfo.Timing.valueOf((String) paneInfoMap.get("timing")), (int) paneInfoMap.get("index"), (int) paneInfoMap.get("on_time_index")); return WindowedValue.of(windowValue, timestamp, windows, paneInfo); } else if (s.equals(getUrn(StandardCoders.Enum.DOUBLE))) { return Double.parseDouble((String) value); } else if (s.equals(getUrn(StandardCoders.Enum.ROW))) { Schema schema; try { schema = SchemaTranslation.schemaFromProto(SchemaApi.Schema.parseFrom(coderSpec.getPayload())); } catch (InvalidProtocolBufferException e) { throw new RuntimeException("Failed to parse schema payload for row coder", e); } return parseField(value, Schema.FieldType.row(schema)); } else if (s.equals(getUrn(StandardCoders.Enum.SHARDED_KEY))) { Map<String, Object> kvMap = (Map<String, Object>) value; Coder<?> keyCoder = ((ShardedKey.Coder) coder).getKeyCoder(); byte[] shardId = ((String) kvMap.get("shardId")).getBytes(StandardCharsets.ISO_8859_1); return ShardedKey.of( convertValue(kvMap.get("key"), coderSpec.getComponents().get(0), keyCoder), shardId); } else if (s.equals(getUrn(StandardCoders.Enum.CUSTOM_WINDOW))) { Map<String, Object> kvMap = (Map<String, Object>) value; Coder windowCoder = ((TimestampPrefixingWindowCoder) coder).getWindowCoder(); return convertValue(kvMap.get("window"), coderSpec.getComponents().get(0), windowCoder); } else { throw new IllegalStateException("Unknown coder URN: " + coderSpec.getUrn()); } } private static Object parseField(Object value, Schema.FieldType fieldType) { if (value == null) { return null; } switch (fieldType.getTypeName()) { case BYTE: return ((Number) value).byteValue(); case INT16: return ((Number) value).shortValue(); case INT32: return ((Number) value).intValue(); case INT64: return ((Number) value).longValue(); case FLOAT: return Float.parseFloat((String) value); case DOUBLE: return Double.parseDouble((String) value); case STRING: return (String) value; case BOOLEAN: return (Boolean) value; case BYTES: // extract String as byte[] return ((String) value).getBytes(StandardCharsets.ISO_8859_1); case ARRAY: return ((List<Object>) value) .stream() .map((element) -> parseField(element, fieldType.getCollectionElementType())) .collect(toImmutableList()); case MAP: Map<Object, Object> kvMap = new HashMap<>(); ((Map<Object, Object>) value) .entrySet().stream() .forEach( (entry) -> kvMap.put( parseField(entry.getKey(), fieldType.getMapKeyType()), parseField(entry.getValue(), fieldType.getMapValueType()))); return kvMap; case ROW: // Clone map so we don't mutate the underlying value Map<String, Object> rowMap = new HashMap<>((Map<String, Object>) value); Schema schema = fieldType.getRowSchema(); Row.Builder row = Row.withSchema(schema); for (Schema.Field field : schema.getFields()) { Object element = rowMap.remove(field.getName()); if (element != null) { element = parseField(element, field.getType()); } row.addValue(element); } if (!rowMap.isEmpty()) { throw new IllegalArgumentException( "Value contains keys that are not in the schema: " + rowMap.keySet()); } return row.build(); case LOGICAL_TYPE: // Logical types are represented as their representation types in YAML. Parse as the // representation type, then convert to the base type. return fieldType .getLogicalType() .toInputType(parseField(value, fieldType.getLogicalType().getBaseType())); default: // DECIMAL, DATETIME throw new IllegalArgumentException("Unsupported type name: " + fieldType.getTypeName()); } } private static Coder<?> instantiateCoder(CommonCoder coder) { List<Coder<?>> components = new ArrayList<>(); for (CommonCoder innerCoder : coder.getComponents()) { components.add(instantiateCoder(innerCoder)); } // We construct the state backed iterable coder explicitly instead of relying on the model // translator since we need to interact with a fake state client. if (coder.getUrn().equals(getUrn(StandardCoders.Enum.STATE_BACKED_ITERABLE))) { BeamFnStateClient stateClient = new BeamFnStateClient() { @Override public CompletableFuture<StateResponse> handle(StateRequest.Builder requestBuilder) { checkState(requestBuilder.hasGet()); checkState(requestBuilder.hasStateKey()); checkState(requestBuilder.getStateKey().hasRunner()); StateResponse.Builder rval = StateResponse.newBuilder(); rval.setId(requestBuilder.getId()); rval.setGet( StateGetResponse.newBuilder() .setData( coder .getState() .getOrDefault( requestBuilder.getStateKey().getRunner().getKey(), ByteString.EMPTY))); return CompletableFuture.completedFuture(rval.build()); } }; return new StateBackedIterable.Coder<>( () -> Caches.noop(), stateClient, () -> "instructionId", (Coder) Iterables.getOnlyElement(components)); } Class<? extends Coder> coderType = ImmutableBiMap.copyOf(new ModelCoderRegistrar().getCoderURNs()) .inverse() .get(coder.getUrn()); checkNotNull(coderType, "Unknown coder URN: " + coder.getUrn()); CoderTranslator<?> translator = new ModelCoderRegistrar().getCoderTranslators().get(coderType); checkNotNull( translator, "No translator found for common coder class: " + coderType.getSimpleName()); return translator.fromComponents(components, coder.getPayload(), new TranslationContext() {}); } @Test public void executeSingleTest() throws IOException { assertCoderIsKnown(testSpec.getCoder()); Coder coder = instantiateCoder(testSpec.getCoder()); Object testValue = convertValue(testSpec.getValue(), testSpec.getCoder(), coder); Context context = testSpec.getNested() ? Context.NESTED : Context.OUTER; byte[] encoded = CoderUtils.encodeToByteArray(coder, testValue, context); Object decodedValue = CoderUtils.decodeFromByteArray(coder, testSpec.getSerialized(), context); if (!testSpec.getCoder().getNonDeterministic()) { assertThat(testSpec.toString(), encoded, equalTo(testSpec.getSerialized())); } verifyDecodedValue(testSpec.getCoder(), decodedValue, testValue); } private void verifyDecodedValue(CommonCoder coder, Object expectedValue, Object actualValue) { String s = coder.getUrn(); if (s.equals(getUrn(StandardCoders.Enum.BYTES))) { assertThat(expectedValue, equalTo(actualValue)); } else if (s.equals(getUrn(StandardCoders.Enum.BOOL))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.STRING_UTF8))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.KV))) { assertThat(actualValue, instanceOf(KV.class)); verifyDecodedValue( coder.getComponents().get(0), ((KV) expectedValue).getKey(), ((KV) actualValue).getKey()); verifyDecodedValue( coder.getComponents().get(0), ((KV) expectedValue).getValue(), ((KV) actualValue).getValue()); } else if (s.equals(getUrn(StandardCoders.Enum.VARINT))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.INTERVAL_WINDOW))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.ITERABLE)) || s.equals(getUrn(StandardCoders.Enum.STATE_BACKED_ITERABLE))) { assertThat(actualValue, instanceOf(Iterable.class)); CommonCoder componentCoder = coder.getComponents().get(0); Iterator<Object> expectedValueIterator = ((Iterable<Object>) expectedValue).iterator(); for (Object value : (Iterable<Object>) actualValue) { verifyDecodedValue(componentCoder, expectedValueIterator.next(), value); } assertFalse(expectedValueIterator.hasNext()); } else if (s.equals(getUrn(StandardCoders.Enum.TIMER))) { assertEquals((Timer) expectedValue, (Timer) actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.GLOBAL_WINDOW))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.WINDOWED_VALUE))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.PARAM_WINDOWED_VALUE))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.DOUBLE))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.ROW))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.SHARDED_KEY))) { assertEquals(expectedValue, actualValue); } else if (s.equals(getUrn(StandardCoders.Enum.CUSTOM_WINDOW))) { assertEquals(expectedValue, actualValue); } else { throw new IllegalStateException("Unknown coder URN: " + coder.getUrn()); } } /** * Utility for adding new entries to the common coder spec -- prints the serialized bytes of the * given value in the given context using JSON-escaped strings. */ @SuppressWarnings("unused") private static <T> String jsonByteString(Coder<T> coder, T value, Context context) throws CoderException { byte[] bytes = CoderUtils.encodeToByteArray(coder, value, context); ObjectMapper mapper = new ObjectMapper(); mapper.configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true); try { return mapper.writeValueAsString(new String(bytes, StandardCharsets.ISO_8859_1)); } catch (JsonProcessingException e) { throw new CoderException(String.format("Unable to encode %s with coder %s", value, coder), e); } } }
{ "content_hash": "3615ea8c15c294a84683000fdb4cd53d", "timestamp": "", "source": "github", "line_count": 583, "max_line_length": 109, "avg_line_length": 46.16123499142367, "alnum_prop": 0.6904726516052319, "repo_name": "robertwb/incubator-beam", "id": "c5f2283e41b0a76665d783eb515cbe334c25e139", "size": "27717", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "runners/java-fn-execution/src/test/java/org/apache/beam/runners/fnexecution/wire/CommonCoderTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "1598" }, { "name": "C", "bytes": "3869" }, { "name": "CSS", "bytes": "4957" }, { "name": "Cython", "bytes": "59582" }, { "name": "Dart", "bytes": "541526" }, { "name": "Dockerfile", "bytes": "48191" }, { "name": "FreeMarker", "bytes": "7933" }, { "name": "Go", "bytes": "4688736" }, { "name": "Groovy", "bytes": "888171" }, { "name": "HCL", "bytes": "101646" }, { "name": "HTML", "bytes": "164685" }, { "name": "Java", "bytes": "38649211" }, { "name": "JavaScript", "bytes": "105966" }, { "name": "Jupyter Notebook", "bytes": "55818" }, { "name": "Kotlin", "bytes": "209531" }, { "name": "Lua", "bytes": "3620" }, { "name": "Python", "bytes": "9785295" }, { "name": "SCSS", "bytes": "312814" }, { "name": "Sass", "bytes": "19336" }, { "name": "Scala", "bytes": "1429" }, { "name": "Shell", "bytes": "336583" }, { "name": "Smarty", "bytes": "2618" }, { "name": "Thrift", "bytes": "3260" }, { "name": "TypeScript", "bytes": "181369" } ], "symlink_target": "" }
package ru.atom.threads.examples; import org.jetbrains.annotations.NotNull; /** * @author apomosov */ public class CreateThreadExample { public static class HelloRunnable implements Runnable { public void run() { System.out.println("Hello from a thread, created via Runnable implementation!"); } } public void createThreadWithRunnableInstance() { (new Thread(new HelloRunnable())).start(); } public void createThreadWithInnerClass() { (new Thread(new Runnable(){ @Override public void run() { System.out.println("Hello from a thread created via inner class!"); } })).start(); } public void createThreadWithLambda() { (new Thread(() -> System.out.println("Hello from a thread created via lambda!"))).start(); } }
{ "content_hash": "317832414e3ad95e6b9d8f4264999d49", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 94, "avg_line_length": 25.516129032258064, "alnum_prop": 0.6738305941845765, "repo_name": "SaenkoDmitry/atom", "id": "db5150f6f73a38ba8d6750769cfa1447bdf27039", "size": "791", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "lecture4/source/src/main/java/ru/atom/threads/examples/CreateThreadExample.java", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1279" }, { "name": "HTML", "bytes": "3596" }, { "name": "Java", "bytes": "528602" }, { "name": "JavaScript", "bytes": "54267" }, { "name": "XSLT", "bytes": "2573" } ], "symlink_target": "" }
using namespace PS; using namespace LM; TEST(GradientDescent, LogistRegression) { // load data typedef double V; Config cf; readFileToProtoOrDie("../src/test/grad_desc.conf", &cf); auto data = readMatricesOrDie<V>(cf.training_data()); CHECK_EQ(data.size(), 2); auto X = data[1]; // allocate memories SArray<V> w(X->cols()), Xw(X->rows()), g(X->cols()); w.setZero(); auto loss = Loss<V>::create(cf.loss()); V eta = cf.learning_rate().eta(); for (int i = 0; i < 11; ++i) { Xw.eigenArray() = *X * w.eigenArray(); loss->compute({data[0], data[1], Xw.matrix()}, {g.matrix()}); w.eigenArray() -= eta * g.eigenArray(); V objv = loss->evaluate({data[0], Xw.matrix()}); LL << objv; } }
{ "content_hash": "ecf508b603085b0dca160148123d74b8", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 69, "avg_line_length": 28, "alnum_prop": 0.5947802197802198, "repo_name": "hjk41/parameter_server", "id": "8a780bc4f6db43c5b8b2fa2ed1208152dcedd9fd", "size": "833", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/test/grad_desc_test.cc", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "1086" }, { "name": "C++", "bytes": "415217" }, { "name": "Makefile", "bytes": "3189" }, { "name": "Matlab", "bytes": "6985" }, { "name": "Objective-C", "bytes": "13" }, { "name": "Protocol Buffer", "bytes": "15296" }, { "name": "Python", "bytes": "16207" }, { "name": "Shell", "bytes": "8575" } ], "symlink_target": "" }
const DrawCard = require('../../drawcard.js'); class ShinjoScout extends DrawCard { setupCardAbilities(ability) { this.reaction({ title: 'Gain 1 fate', when: { onPassDuringDynasty: (event, context) => event.player === context.player && event.firstToPass }, gameAction: ability.actions.gainFate() }); } } ShinjoScout.id = 'shinjo-scout'; module.exports = ShinjoScout;
{ "content_hash": "ec52e99d6b9a5313e133ad431c18222d", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 109, "avg_line_length": 26.941176470588236, "alnum_prop": 0.5829694323144105, "repo_name": "gryffon/ringteki", "id": "2baffd2994fd02047ca4419aaf569dcd608f739e", "size": "458", "binary": false, "copies": "2", "ref": "refs/heads/develop", "path": "server/game/cards/02.6-MotE/ShinjoScout.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "65156" }, { "name": "HTML", "bytes": "1193" }, { "name": "JavaScript", "bytes": "5557234" }, { "name": "TypeScript", "bytes": "267428" } ], "symlink_target": "" }
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using NUnit.Framework; using Usergrid.Sdk.Model; namespace Usergrid.Sdk.IntegrationTests { [TestFixture] public class LoginTests : BaseTest { [Test] public void ShouldLoginSuccessfullyWithClientCredentials() { var client = new Client(Organization, Application); client.Login(ClientId, ClientSecret, AuthType.Organization); } [Test] public void ShouldThrowWithInvalidOrganizationCredentials() { var client = new Client (Organization, Application); try { client.Login("Invalid_User_Name", "Invalid_Password", AuthType.Organization); Assert.True(true, "Was expecting login to throw UserGridException"); } catch (UsergridException e) { Assert.That (e.Message, Is.EqualTo ("invalid username or password")); Assert.That(e.ErrorCode, Is.EqualTo("invalid_grant")); } } [Test] public void ShouldLoginSuccessfullyWithApplicationCredentials() { var client = new Client(Organization, Application); client.Login(ApplicationId, ApplicationSecret, AuthType.Application); } [Test] public void ShouldThrowWithInvalidApplicationCredentials() { var client = new Client (Organization, Application); try { client.Login("Invalid_User_Name", "Invalid_Password", AuthType.Application); Assert.True(true, "Was expecting login to throw UserGridException"); } catch (UsergridException e) { Assert.That (e.Message, Is.EqualTo ("invalid username or password")); Assert.That(e.ErrorCode, Is.EqualTo("invalid_grant")); } } [Test] public void ShouldLoginSuccessfullyWithUserCredentials() { var client = new Client(Organization, Application); client.Login(UserId, UserSecret, AuthType.User); } [Test] public void ShouldThrowWithInvalidUserCredentials() { var client = new Client(Organization, Application); try { client.Login("Invalid_User_Name", "Invalid_Password", AuthType.User); Assert.True(true, "Was expecting login to throw UserGridException"); } catch (UsergridException e) { Assert.That (e.Message, Is.EqualTo ("invalid username or password")); Assert.That(e.ErrorCode, Is.EqualTo("invalid_grant")); } } } }
{ "content_hash": "3c500e233ab891a6ab12fcca2486569d", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 85, "avg_line_length": 32.791666666666664, "alnum_prop": 0.6861499364675985, "repo_name": "mesosphere/usergrid", "id": "aa4e1de3af239dfe24702dd4f37d2084d55f2aa8", "size": "3150", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "sdks/dotnet/Usergrid.Sdk.IntegrationTests/LoginTests.cs", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
@implementation NSString (ZZFramework) @end
{ "content_hash": "9301560393d37ea0c830ef4b0e978d5b", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 38, "avg_line_length": 15, "alnum_prop": 0.8, "repo_name": "AllisonWangJiaoJiao/Knowledge-oc", "id": "833226f8857f9455c112e0749705187eedc54dc5", "size": "226", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "9.iOS工具收集/ZZFramework_MVC/ZZFramework_MVC/Tools/Category/NSString+ZZFramework.m", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "253" }, { "name": "Objective-C", "bytes": "1543482" }, { "name": "Ruby", "bytes": "1237" } ], "symlink_target": "" }
<?php namespace Box\Mod\Invoice; class ServiceSubscriptionTest extends \PHPUnit_Framework_TestCase { /** * @var \Box\Mod\Invoice\ServiceSubscription */ protected $service = null; public function setup() { $this->service = new \Box\Mod\Invoice\ServiceSubscription(); } public function testgetDi() { $di = new \Box_Di(); $this->service->setDi($di); $getDi = $this->service->getDi(); $this->assertEquals($di, $getDi); } public function testcreate() { $subscriptionModel = new \Model_Subscription(); $subscriptionModel->loadBean(new \RedBeanPHP\OODBBean()); $newId = 10; $dbMock = $this->getMockBuilder('\Box_Database') ->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('dispense') ->will($this->returnValue($subscriptionModel)); $dbMock->expects($this->atLeastOnce()) ->method('store') ->will($this->returnValue($newId)); $eventsMock = $this->getMockBuilder('\Box_EventManager') ->getMock(); $eventsMock->expects($this->atLeastOnce()) ->method('fire'); $di = new \Box_Di(); $di['db'] = $dbMock; $di['logger'] = new \Box_Log(); $di['events_manager'] = $eventsMock; $this->service->setDi($di); $data = array( 'client_id' => 1, 'gateway_id' => 2, ); $result = $this->service->create(new \Model_Client(), new \Model_PayGateway(), $data); $this->assertInternalType('int', $result); $this->assertEquals($newId, $result); } public function testupdate() { $subscriptionModel = new \Model_Subscription(); $subscriptionModel->loadBean(new \RedBeanPHP\OODBBean()); $data = array( 'status' => '', 'sid' => '', 'period' => '', 'amount' => '', 'currency' => '', ); $dbMock = $this->getMockBuilder('\Box_Database') ->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('store'); $di = new \Box_Di(); $di['db'] = $dbMock; $di['logger'] = new \Box_Log(); $this->service->setDi($di); $result = $this->service->update($subscriptionModel, $data); $this->assertTrue($result); } public function testtoApiArray() { $subscriptionModel = new \Model_Subscription(); $subscriptionModel->loadBean(new \RedBeanPHP\OODBBean()); $clientModel = new \Model_Client(); $clientModel->loadBean(new \RedBeanPHP\OODBBean()); $gatewayModel = new \Model_PayGateway(); $gatewayModel->loadBean(new \RedBeanPHP\OODBBean()); $dbMock = $this->getMockBuilder('\Box_Database')->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('load') ->will($this->onConsecutiveCalls($clientModel, $gatewayModel)); $clientServiceMock = $this->getMockBuilder('\Box\Mod\Client\Service') ->getMock(); $clientServiceMock->expects($this->atLeastOnce()) ->method('toApiArray') ->will($this->returnValue(array())); $payGatewayService = $this->getMockBuilder('\Box\Mod\Invoice\ServicePayGateway') ->getMock(); $payGatewayService->expects($this->atLeastOnce()) ->method('toApiArray') ->will($this->returnValue(array())); $di = new \Box_Di(); $di['mod_service'] = $di->protect(function ($serviceName, $sub = '') use ($clientServiceMock, $payGatewayService) { if ($serviceName == 'Client') { return $clientServiceMock; } if ($sub == 'PayGateway') { return $payGatewayService; } }); $di['db'] = $dbMock; $this->service->setDi($di); $expected = array( 'id' => '', 'sid' => '', 'period' => '', 'amount' => '', 'currency' => '', 'status' => '', 'created_at' => '', 'updated_at' => '', 'client' => array(), 'gateway' => array(), ); $result = $this->service->toApiArray($subscriptionModel); $this->assertInternalType('array', $result); $this->assertInternalType('array', $result['client']); $this->assertInternalType('array', $result['gateway']); $this->assertEquals($expected, $result); } public function testdelete() { $subscriptionModel = new \Model_Subscription(); $subscriptionModel->loadBean(new \RedBeanPHP\OODBBean()); $dbMock = $this->getMockBuilder('\Box_Database') ->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('trash'); $eventsMock = $this->getMockBuilder('\Box_EventManager') ->getMock(); $eventsMock->expects($this->atLeastOnce()) ->method('fire'); $di = new \Box_Di(); $di['db'] = $dbMock; $di['logger'] = new \Box_Log(); $di['events_manager'] = $eventsMock; $this->service->setDi($di); $result = $this->service->delete($subscriptionModel); $this->assertTrue($result); } public function searchQueryData() { return array( array( array(), 'FROM subscription', array(), ), array( array('status' => 'active'), 'AND status = :status', array('status' => 'active'), ), array( array('invoice_id' => '1'), 'AND invoice_id = :invoice_id', array('invoice_id' => '1'), ), array( array('gateway_id' => '2'), 'AND gateway_id = :gateway_id', array('gateway_id' => '2'), ), array( array('client_id' => '3'), 'AMD client_id = :client_id', array('client_id' => '3'), ), array( array('currency' => 'EUR'), 'AND currency = :currency', array('currency' => 'EUR'), ), array( array('date_from' => '1234567'), 'AND UNIX_TIMESTAMP(m.created_at) >= :date_from', array('date_from' => '1234567'), ), array( array('date_to' => '1234567'), 'AND UNIX_TIMESTAMP(m.created_at) <= :date_to', array('date_to' => '1234567'), ), array( array('id' => '10'), 'AND id = :id', array('id' => '10'), ), array( array('sid' => '10'), 'AND sid = :sid', array('sid' => '10'), ), ); } /** * @dataProvider searchQueryData */ public function testgetSearchQuery($data, $expectedSqlPart, $expectedParams) { $result = $this->service->getSearchQuery($data); $this->assertInternalType('array', $result); $this->assertInternalType('string', $result[0]); $this->assertInternalType('array', $result[1]); $this->assertEquals($expectedParams, $result[1]); $this->assertTrue(strpos($result[0], $expectedSqlPart) !== false); } public function testisSubscribableisNotSusbcribable() { $dbMock = $this->getMockBuilder('\Box_Database') ->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('getCell') ->will($this->returnValue(array(''))); $di = new \Box_Di(); $di['db'] = $dbMock; $this->service->setDi($di); $invoice_id = 2; $result = $this->service->isSubscribable($invoice_id); $this->assertInternalType('bool', $result); $this->assertFalse($result); } public function testisSubscribable() { $dbMock = $this->getMockBuilder('\Box_Database') ->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('getCell') ->will($this->returnValue(null)); $getAllResults = array( 0 => array('period' => '1W'), ); $dbMock->expects($this->atLeastOnce()) ->method('getAll') ->will($this->returnValue($getAllResults)); $di = new \Box_Di(); $di['db'] = $dbMock; $this->service->setDi($di); $invoice_id = 2; $result = $this->service->isSubscribable($invoice_id); $this->assertInternalType('bool', $result); $this->assertTrue($result); } public function testgetSubscriptionPeriod() { $serviceMock = $this->getMockBuilder('\Box\Mod\Invoice\ServiceSubscription') ->setMethods(array('isSubscribable')) ->getMock(); $serviceMock->expects($this->atLeastOnce()) ->method('isSubscribable') ->will($this->returnValue(true)); $period = '1W'; $dbMock = $this->getMockBuilder('\Box_Database')->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('getCell') ->will($this->returnValue($period)); $di = new \Box_Di(); $di['db'] = $dbMock; $serviceMock->setDi($di); $invoiceModel = new \Model_Invoice(); $invoiceModel->loadBean(new \RedBeanPHP\OODBBean()); $result = $serviceMock->getSubscriptionPeriod($invoiceModel); $this->assertInternalType('string', $result); $this->assertEquals($period, $result); } public function testunsubscribe() { $subscribtionModel = new \Model_Subscription(); $subscribtionModel->loadBean(new \RedBeanPHP\OODBBean()); $dbMock = $this->getMockBuilder('\Box_Database')->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('store'); $di = new \Box_Di(); $di['db'] = $dbMock; $this->service->setDi($di); $this->service->unsubscribe($subscribtionModel); } }
{ "content_hash": "36ed3f2b6d816193c57541a5f85a8ec8", "timestamp": "", "source": "github", "line_count": 312, "max_line_length": 131, "avg_line_length": 32.69551282051282, "alnum_prop": 0.5080874424076071, "repo_name": "4Giedrius/boxbilling", "id": "9650e1a0c93166b30f7811f7defd727289276a86", "size": "10201", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tests/bb-modules/Invoice/ServiceSubscriptionTest.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ApacheConf", "bytes": "67" }, { "name": "CSS", "bytes": "2834832" }, { "name": "HTML", "bytes": "1469860" }, { "name": "JavaScript", "bytes": "2883027" }, { "name": "Makefile", "bytes": "983" }, { "name": "Nginx", "bytes": "912" }, { "name": "PHP", "bytes": "5345923" }, { "name": "Shell", "bytes": "2817" } ], "symlink_target": "" }
<?php return [ /* |-------------------------------------------------------------------------- | Authentication Defaults |-------------------------------------------------------------------------- | | This option controls the default authentication "guard" and password | reset options for your application. You may change these defaults | as required, but they're a perfect start for most applications. | */ 'defaults' => [ 'guard' => 'web', 'passwords' => 'users', ], /* |-------------------------------------------------------------------------- | Authentication Guards |-------------------------------------------------------------------------- | | Next, you may define every authentication guard for your application. | Of course, a great default configuration has been defined for you | here which uses session storage and the Eloquent user provider. | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | Supported: "session", "token" | */ 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', ], 'api' => [ // 'driver' => 'token', 'driver' => 'passport', 'provider' => 'users', ], ], /* |-------------------------------------------------------------------------- | User Providers |-------------------------------------------------------------------------- | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | If you have multiple user tables or models you may configure multiple | sources which represent each model / table. These sources may then | be assigned to any extra authentication guards you have defined. | | Supported: "database", "eloquent" | */ 'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => App\User::class, ], // 'users' => [ // 'driver' => 'database', // 'table' => 'users', // ], ], /* |-------------------------------------------------------------------------- | Resetting Passwords |-------------------------------------------------------------------------- | | You may specify multiple password reset configurations if you have more | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | | The expire time is the number of minutes that the reset token should be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | */ 'passwords' => [ 'users' => [ 'provider' => 'users', 'table' => 'password_resets', 'expire' => 60, ], ], ];
{ "content_hash": "7f11ae2fd915f3a79bf7315c44b2c023", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 77, "avg_line_length": 29.611650485436893, "alnum_prop": 0.5013114754098361, "repo_name": "cncgl/laravel53-vue2", "id": "6a5d7c6151bc236afd9152437920f78bfda8d55c", "size": "3050", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "config/auth.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "553" }, { "name": "HTML", "bytes": "23777" }, { "name": "JavaScript", "bytes": "2469153" }, { "name": "PHP", "bytes": "82857" }, { "name": "Vue", "bytes": "27637" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_151) on Wed Jul 17 09:39:59 MST 2019 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>CacheConsumer (BOM: * : All 2.4.1.Final-SNAPSHOT API)</title> <meta name="date" content="2019-07-17"> <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="CacheConsumer (BOM: * : All 2.4.1.Final-SNAPSHOT API)"; } } catch(err) { } //--> var methods = {"i0":6,"i1":18}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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> <!-- ========= START OF TOP NAVBAR ======= --> <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/CacheConsumer.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">Thorntail API, 2.4.1.Final-SNAPSHOT</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/wildfly/swarm/config/ejb3/Cache.html" title="class in org.wildfly.swarm.config.ejb3"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../../org/wildfly/swarm/config/ejb3/CacheSupplier.html" title="interface in org.wildfly.swarm.config.ejb3"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/wildfly/swarm/config/ejb3/CacheConsumer.html" target="_top">Frames</a></li> <li><a href="CacheConsumer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); 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> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.wildfly.swarm.config.ejb3</div> <h2 title="Interface CacheConsumer" class="title">Interface CacheConsumer&lt;T extends <a href="../../../../../org/wildfly/swarm/config/ejb3/Cache.html" title="class in org.wildfly.swarm.config.ejb3">Cache</a>&lt;T&gt;&gt;</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <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="https://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">CacheConsumer&lt;T extends <a href="../../../../../org/wildfly/swarm/config/ejb3/Cache.html" title="class in org.wildfly.swarm.config.ejb3">Cache</a>&lt;T&gt;&gt;</span></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ========== METHOD SUMMARY =========== --> <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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html#accept-T-">accept</a></span>(<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="type parameter in CacheConsumer">T</a>&nbsp;value)</code> <div class="block">Configure a pre-constructed instance of Cache resource</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>default <a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="interface in org.wildfly.swarm.config.ejb3">CacheConsumer</a>&lt;<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="type parameter in CacheConsumer">T</a>&gt;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html#andThen-org.wildfly.swarm.config.ejb3.CacheConsumer-">andThen</a></span>(<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="interface in org.wildfly.swarm.config.ejb3">CacheConsumer</a>&lt;<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="type parameter in CacheConsumer">T</a>&gt;&nbsp;after)</code>&nbsp;</td> </tr> </table> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="accept-org.wildfly.swarm.config.ejb3.Cache-"> <!-- --> </a><a name="accept-T-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>accept</h4> <pre>void&nbsp;accept(<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="type parameter in CacheConsumer">T</a>&nbsp;value)</pre> <div class="block">Configure a pre-constructed instance of Cache resource</div> </li> </ul> <a name="andThen-org.wildfly.swarm.config.ejb3.CacheConsumer-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>andThen</h4> <pre>default&nbsp;<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="interface in org.wildfly.swarm.config.ejb3">CacheConsumer</a>&lt;<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="type parameter in CacheConsumer">T</a>&gt;&nbsp;andThen(<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="interface in org.wildfly.swarm.config.ejb3">CacheConsumer</a>&lt;<a href="../../../../../org/wildfly/swarm/config/ejb3/CacheConsumer.html" title="type parameter in CacheConsumer">T</a>&gt;&nbsp;after)</pre> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <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/CacheConsumer.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">Thorntail API, 2.4.1.Final-SNAPSHOT</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/wildfly/swarm/config/ejb3/Cache.html" title="class in org.wildfly.swarm.config.ejb3"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../../org/wildfly/swarm/config/ejb3/CacheSupplier.html" title="interface in org.wildfly.swarm.config.ejb3"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/wildfly/swarm/config/ejb3/CacheConsumer.html" target="_top">Frames</a></li> <li><a href="CacheConsumer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); 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> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2019 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p> </body> </html>
{ "content_hash": "8022e9c5ca5576a6e9076f1d6415be32", "timestamp": "", "source": "github", "line_count": 248, "max_line_length": 588, "avg_line_length": 43.875, "alnum_prop": 0.6436908372392244, "repo_name": "wildfly-swarm/wildfly-swarm-javadocs", "id": "1f2606fc76dcee3a6b10d6b1318618e8acc6f581", "size": "10881", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "2.4.1.Final-SNAPSHOT/apidocs/org/wildfly/swarm/config/ejb3/CacheConsumer.html", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
Test for hangul to jamo conversion filter --FILE-- <?php $filters = array( 'hangul_to_jamo', 'jamo_transliterate' ); $string = iconv("utf-8", "ucs-2", file_get_contents(__DIR__.'/hangul-to-jamo.txt')); $res = transliterate($string, $filters); echo iconv('ucs-2', 'utf-8', $res); ?> --EXPECT-- don Quijote nge ngosinkeosngeur hwanngyeonghapnita! sonnimngi seupenginkwa ratinngamerikangui keungeoneuhagkyoreur seontaeghangyeo hagseuphateunji sonnimngeun hantanragngui bokwihan kyeongryeogngeur ngeodke toerkeosngita. ngurineun sonnimngi ngyokunge ttara sonnimngi seupenginngikeona ratinngamerikajungui hagseupkwajeongngeur nganbaehangyeo jurkeosngita. don Quijotengui ngyungirhan mogpyoneun baro pumjirngeur bojeunghaneunte ngissta. nguriteurro hangyeokeum jarangseureopke saengkaghaneun keosngeun nguringui saerongun hagngwonngui 50%ka kijonhagngwonteurngi chucheonhan keosngiraneun keosngita
{ "content_hash": "91720e187f597525990c9b950fe0b8a4", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 121, "avg_line_length": 49.666666666666664, "alnum_prop": 0.8232662192393736, "repo_name": "derickr/pecl-translit", "id": "7803cba8b02922e5cd59b07f57e3b61d59b9e05b", "size": "903", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tests/hangul-to-jamo.phpt", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "C", "bytes": "1029101" }, { "name": "GDB", "bytes": "103" }, { "name": "JavaScript", "bytes": "620" }, { "name": "M4", "bytes": "883" }, { "name": "Objective-C", "bytes": "1924" }, { "name": "PHP", "bytes": "32388" }, { "name": "Shell", "bytes": "1000" } ], "symlink_target": "" }
import events = require("events"); import minimatch = require("minimatch"); declare function G(pattern: string, cb: (err: Error | null, matches: string[]) => void): G.IGlob; declare function G(pattern: string, options: G.IOptions, cb: (err: Error | null, matches: string[]) => void): G.IGlob; declare namespace G { function __promisify__(pattern: string, options?: IOptions): Promise<string[]>; function sync(pattern: string, options?: IOptions): string[]; function hasMagic(pattern: string, options?: IOptions): boolean; let glob: typeof G; let Glob: IGlobStatic; let GlobSync: IGlobSyncStatic; interface IOptions extends minimatch.IOptions { cwd?: string | undefined; root?: string | undefined; dot?: boolean | undefined; nomount?: boolean | undefined; mark?: boolean | undefined; nosort?: boolean | undefined; stat?: boolean | undefined; silent?: boolean | undefined; strict?: boolean | undefined; cache?: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> } | undefined; statCache?: { [path: string]: false | { isDirectory(): boolean} | undefined } | undefined; symlinks?: { [path: string]: boolean | undefined } | undefined; realpathCache?: { [path: string]: string } | undefined; sync?: boolean | undefined; nounique?: boolean | undefined; nonull?: boolean | undefined; debug?: boolean | undefined; nobrace?: boolean | undefined; noglobstar?: boolean | undefined; noext?: boolean | undefined; nocase?: boolean | undefined; matchBase?: any; nodir?: boolean | undefined; ignore?: string | ReadonlyArray<string> | undefined; follow?: boolean | undefined; realpath?: boolean | undefined; nonegate?: boolean | undefined; nocomment?: boolean | undefined; absolute?: boolean | undefined; } interface IGlobStatic extends events.EventEmitter { new (pattern: string, cb?: (err: Error | null, matches: string[]) => void): IGlob; new (pattern: string, options: IOptions, cb?: (err: Error | null, matches: string[]) => void): IGlob; prototype: IGlob; } interface IGlobSyncStatic { new (pattern: string, options?: IOptions): IGlobBase; prototype: IGlobBase; } interface IGlobBase { minimatch: minimatch.IMinimatch; options: IOptions; aborted: boolean; cache: { [path: string]: boolean | 'DIR' | 'FILE' | ReadonlyArray<string> }; statCache: { [path: string]: false | { isDirectory(): boolean; } | undefined }; symlinks: { [path: string]: boolean | undefined }; realpathCache: { [path: string]: string }; found: string[]; } interface IGlob extends IGlobBase, events.EventEmitter { pause(): void; resume(): void; abort(): void; } } export = G;
{ "content_hash": "c096a243da24c4125f3e5b5959ceb63d", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 118, "avg_line_length": 37.77215189873418, "alnum_prop": 0.6099195710455764, "repo_name": "cloudfoundry-community/asp.net5-buildpack", "id": "8213c43da1204e92db61cd9af6018362986f0ad9", "size": "3409", "binary": false, "copies": "8", "ref": "refs/heads/master", "path": "fixtures/node_apps/angular_dotnet/ClientApp/node_modules/@types/glob/index.d.ts", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "Ruby", "bytes": "61792" } ], "symlink_target": "" }
layout: home description: headline: tags: [Riley, Childs] --- {% if site.paginate %} {% for post in paginator.posts %} {% if site.wpm %} {% assign readtime = post.content | strip_html | number_of_words | append: '.0' | divided_by:site.wpm %} {% else %} {% assign readtime = post.content | strip_html | number_of_words | append: '.0' | divided_by:180 %} {% endif %} {% assign modifiedtime = post.modified | date: "%Y%m%d" %} {% assign posttime = post.date | date: "%Y%m%d" %} {% if post.type == 'quote' %} <div class="row"> <article class="post col-md-10 col-md-offset-1"> <header class="post-header"> <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}"><i class="icon-quote-left"></i> {{ post.excerpt | strip_html }}</a> </h2> <p class="light small text-center"> Share this Quote </p> <ul class="social-mini text-center"> <li> <a href="https://twitter.com/intent/tweet?text=&quot;{{ post.title }}&quot;%20{{ site.url }}{{ post.url }}%20via%20&#64;{{ site.owner.twitter }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;" data-toggle="tooltip" title="Share on Twitter"> <i class="icon-twitter"></i> </a> </li> <li> <a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ post.url }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;" data-toggle="tooltip" title="Share on Facebook"> <i class="icon-facebook"></i> </a> </li> <li> <a href="https://plus.google.com/share?url={{ site.url }}{{ post.url }}" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;" data-toggle="tooltip" title="Share on Google plus"> <i class="icon-google-plus"></i> </a> </li> </ul> <div class="post-body bordered-bottom text-center"> {% if post.description %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="{{ post.description }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> permalink... </a> {% else %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="Read more about {{ post.title }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> permalink... </a> {% endif %} </div> </header> </article> </div> {% endif %} {% if post.type == 'status' %} <div class="row"> <article class="post col-md-10 col-md-offset-1"> <header class="post-header"> <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}" style="color: #c91b26"><i class="icon-retweet"></i> "{{ post.excerpt | strip_html }}"</a> </h2> <p class="light small text-center"> Share this Status </p> <ul class="social-mini text-center"> <li> <a href="https://twitter.com/intent/tweet?text=&quot;{{ post.title }}&quot;%20{{ site.url }}{{ post.url }}%20via%20&#64;{{ site.owner.twitter }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;" data-toggle="tooltip" title="Share on Twitter"> <i class="icon-twitter"></i> </a> </li> <li> <a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ post.url }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;" data-toggle="tooltip" title="Share on Facebook"> <i class="icon-facebook"></i> </a> </li> <li> <a href="https://plus.google.com/share?url={{ site.url }}{{ post.url }}" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;" data-toggle="tooltip" title="Share on Google plus"> <i class="icon-google-plus"></i> </a> </li> </ul> <div class="post-info text-center small"> Status posted @ <time datetime="{{ post.date | date_to_xmlschema }}" class="post-time">{{ post.date | date: "%d %b %Y" }}</time>{% if post.modified %}{% if modifiedtime != posttime %} and <code>last modified on <time datetime="{{ post.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ post.modified | date: "%d %b %Y" }}</time></code>{% endif %}{% endif %} in <span class="post-tags">{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ post.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>{% unless forloop.last %}&nbsp;&bull;&nbsp;{% endunless %}{% endfor %}</span>&nbsp;<span class="post-tags">by {{ site.owner.name }}</span> <div class="post-body bordered-bottom"></div> </div> </header> </article> </div> {% endif %} {% if post.type == 'video' %} <div class="row"> <article class="post post col-md-8 col-md-offset-2"> <header class="post-header"> {% if post.link %} <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}" style="color: #fff; background-color: #45ADA8; border-radius: 4px; padding: 10px"><i class="icon-play-circle"></i> {{ post.title }}</a> {% else %} <h2 class="post-title text-center super lighter bordered-bottom"> <a href="{{ site.url }}{{ post.url }}"><i class="icon-play-circle"></i> {{ post.title }}</a> {% endif %} </h2> <div class="post-info text-center small"> <time datetime="{{ post.date | date_to_xmlschema }}" class="post-time">{{ post.date | date: "%d %b %Y" }}</time>{% if post.modified %}{% if modifiedtime != posttime %} and <code>last modified on <time datetime="{{ post.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ post.modified | date: "%d %b %Y" }}</time></code>{% endif %}{% endif %} in <span class="post-tags">{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ post.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>{% unless forloop.last %}&nbsp;&bull;&nbsp;{% endunless %}{% endfor %}</span>{% if site.readtime %}&nbsp;<span class="post-tags"><i class="icon-time"></i>&nbsp;{% if readtime > 1 and readtime < 1.5 %}1 minute read{% endif %}{% if readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes read{% endif %}{% if readtime < 1 %}Less than 1 minute read{% endif %}</span>{% endif %} </div> </header> <div class="post-body bordered-bottom"> {% if post.video %} {% assign video_embed = post.video | remove:'https://www.youtube.com/watch?v=' %} <p><iframe width="940" height="529" src="//www.youtube.com/embed/{{ video_embed }}?theme=light&amp;color=white" frameborder="0" allowfullscreen> </iframe></p> <p class="lead">{{ post.content | strip_html | truncatewords:100 }}&hellip;</p> {% else %} <p class="lead">{{ post.excerpt }}&hellip;</p> {% endif %} <div class="text-center"> {% if post.description %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="{{ post.description }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> see more... </a> {% else %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="Read more about {{ post.title }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> see more... </a> {% endif %} </div> </div> </article> </div> {% endif %} {% if post.type == 'photo' %} <div class="row"> <article class="post post col-md-8 col-md-offset-2"> <header class="post-header"> {% if post.photo %}<figure><a href="{{ site.url }}{{ post.url }}"><img src="{{ site.url }}/images/{{ post.photo }}" alt="{{ post.title }}" itemprop="image"></a></figure>{% else %}<figure><a href="{{ site.url }}{{ post.url }}"><img src="{{ site.url }}/images/{{ post.imagefeature }}" alt="{{ post.title }}" itemprop="image"></a></figure>{% endif %} {% if post.link %} <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}" style="color: #fff; background-color: #45ADA8; border-radius: 4px; padding: 10px"><i class="icon-picture"></i> {{ post.title }}</a> {% else %} <h2 class="post-title text-center super lighter bordered-bottom"> <a href="{{ site.url }}{{ post.url }}"><i class="icon-picture"></i> {{ post.title }}</a> {% endif %} </h2> <div class="post-info text-center small"> <time datetime="{{ post.date | date_to_xmlschema }}" class="post-time">{{ post.date | date: "%d %b %Y" }}</time>{% if post.modified %}{% if modifiedtime != posttime %} and <code>last modified on <time datetime="{{ post.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ post.modified | date: "%d %b %Y" }}</time></code>{% endif %}{% endif %} in <span class="post-tags">{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ post.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>{% unless forloop.last %}&nbsp;&bull;&nbsp;{% endunless %}{% endfor %}</span>{% if site.readtime %}&nbsp;<span class="post-tags"><i class="icon-time"></i>&nbsp;{% if readtime > 1 and readtime < 1.5 %}1 minute read{% endif %}{% if readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes read{% endif %}{% if readtime < 1 %}Less than 1 minute read{% endif %}</span>{% endif %} </div> </header> <div class="post-body bordered-bottom"> <p>{{ post.content | strip_html | truncatewords:100 }}&hellip;</p> <div class="text-center"> {% if post.description %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="{{ post.description }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> read more... </a> {% else %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="Read more about {{ post.title }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> read more... </a> {% endif %} </div> </div> </article> </div> {% endif %} {% if post.type != 'video' and post.type != 'status' and post.type != 'quote' and post.type != 'photo' %} <div class="row"> <article class="post post col-md-8 col-md-offset-2"> <header class="post-header"> {% if post.featured %}<div class="cursive">this post is featured</div>{% endif %} {% if post.link %} <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}" style="color: #fff; background-color: #45ADA8; border-radius: 4px; padding: 10px"><i class="icon-link"></i> {{ post.title }}</a> {% else %} <h2 class="post-title text-center super lighter bordered-bottom"> <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a> {% endif %} </h2> <div class="post-info text-center small"> <time datetime="{{ post.date | date_to_xmlschema }}" class="post-time">{{ post.date | date: "%d %b %Y" }}</time>{% if post.modified %}{% if modifiedtime != posttime %} and <code>last modified on <time datetime="{{ post.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ post.modified | date: "%d %b %Y" }}</time></code>{% endif %}{% endif %} in <span class="post-tags">{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ post.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>{% unless forloop.last %}&nbsp;&bull;&nbsp;{% endunless %}{% endfor %}</span>{% if site.readtime %}&nbsp;<span class="post-tags"><i class="icon-time"></i>&nbsp;{% if readtime > 1 and readtime < 1.5 %}1 minute read{% endif %}{% if readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes read{% endif %}{% if readtime < 1 %}Less than 1 minute read{% endif %}</span>{% endif %} </div> </header> <div class="post-body bordered-bottom"> {% assign excerptsize = post.excerpt | number_of_words %} {% if excerptsize <= 100 and excerptsize >= 50 %}<p class = "lead">{{ post.excerpt | strip_html }}&hellip;</p>{% else %} <p>{{ post.content | strip_html | truncatewords:100 }}&hellip;</p>{% endif %} <div class="text-center"> {% if post.description %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="{{ post.description }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> read more... </a> {% else %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="Read more about {{ post.title }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> read more... </a> {% endif %} </div> </div> </article> </div> {% endif %} {% endfor %} {% if paginator.total_pages > 1 %} <div class="row text-center text-caps"> <div class="col-md-8 col-md-offset-2"> <nav class="pagination" role="navigation"> {% if paginator.previous_page %} {% if paginator.previous_page == 1 %} <a class="newer-posts" href="{{ site.url }}">&larr; Newer Posts</a> {% else %} <a class="newer-posts" href="{{ site.url }}/page{{ paginator.previous_page }}">&larr; Newer Posts</a> {% endif %} {% endif %} <span class="page-number">Page {{ paginator.page }} of {{ paginator.total_pages }}</span> {% if paginator.next_page %} <a class="older-posts" href="{{ site.url }}/page{{ paginator.next_page }}">Older Posts &rarr;</a> {% endif %} </nav> </div> </div> {% endif %} {% else %} {% for post in site.posts %} {% assign readtime = post.content | strip_html | number_of_words | append: '.0' | divided_by:site.wpm %} {% assign modifiedtime = post.modified | date: "%Y%m%d" %} {% assign posttime = post.date | date: "%Y%m%d" %} {% if post.type == 'quote' %} <div class="row"> <article class="post col-md-10 col-md-offset-1"> <header class="post-header"> <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}"><i class="icon-quote-left"></i> {{ post.excerpt | strip_html }}</a> </h2> <p class="light small text-center"> Share this Quote </p> <ul class="social-mini text-center"> <li> <a href="https://twitter.com/intent/tweet?text=&quot;{{ post.title }}&quot;%20{{ site.url }}{{ post.url }}%20via%20&#64;{{ site.owner.twitter }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;" data-toggle="tooltip" title="Share on Twitter"> <i class="icon-twitter"></i> </a> </li> <li> <a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ post.url }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;" data-toggle="tooltip" title="Share on Facebook"> <i class="icon-facebook"></i> </a> </li> <li> <a href="https://plus.google.com/share?url={{ site.url }}{{ post.url }}" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;" data-toggle="tooltip" title="Share on Google plus"> <i class="icon-google-plus"></i> </a> </li> </ul> <div class="post-body bordered-bottom text-center"> {% if post.description %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="{{ post.description }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> permalink... </a> {% else %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="Read more about {{ post.title }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> permalink... </a> {% endif %} </div> </header> </article> </div> {% endif %} {% if post.type == 'status' %} <div class="row"> <article class="post col-md-10 col-md-offset-1"> <header class="post-header"> <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}" style="color: #c91b26"><i class="icon-retweet"></i> "{{ post.excerpt | strip_html }}"</a> </h2> <p class="light small text-center"> Share this Status </p> <ul class="social-mini text-center"> <li> <a href="https://twitter.com/intent/tweet?text=&quot;{{ post.title }}&quot;%20{{ site.url }}{{ post.url }}%20via%20&#64;{{ site.owner.twitter }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;" data-toggle="tooltip" title="Share on Twitter"> <i class="icon-twitter"></i> </a> </li> <li> <a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ post.url }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;" data-toggle="tooltip" title="Share on Facebook"> <i class="icon-facebook"></i> </a> </li> <li> <a href="https://plus.google.com/share?url={{ site.url }}{{ post.url }}" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;" data-toggle="tooltip" title="Share on Google plus"> <i class="icon-google-plus"></i> </a> </li> </ul> <div class="post-info text-center small"> Status posted @ <time datetime="{{ post.date | date_to_xmlschema }}" class="post-time">{{ post.date | date: "%d %b %Y" }}</time>{% if post.modified %}{% if modifiedtime != posttime %} and <code>last modified on <time datetime="{{ post.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ post.modified | date: "%d %b %Y" }}</time></code>{% endif %}{% endif %} in <span class="post-tags">{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ post.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>{% unless forloop.last %}&nbsp;&bull;&nbsp;{% endunless %}{% endfor %}</span>&nbsp;<span class="post-tags">by {{ site.owner.name }}</span> <div class="post-body bordered-bottom"></div> </div> </header> </article> </div> {% endif %} {% if post.type == 'video' %} <div class="row"> <article class="post post col-md-8 col-md-offset-2"> <header class="post-header"> {% if post.link %} <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}" style="color: #fff; background-color: #45ADA8; border-radius: 4px; padding: 10px"><i class="icon-play-circle"></i> {{ post.title }}</a> {% else %} <h2 class="post-title text-center super lighter bordered-bottom"> <a href="{{ site.url }}{{ post.url }}"><i class="icon-play-circle"></i> {{ post.title }}</a> {% endif %} </h2> <div class="post-info text-center small"> <time datetime="{{ post.date | date_to_xmlschema }}" class="post-time">{{ post.date | date: "%d %b %Y" }}</time>{% if post.modified %}{% if modifiedtime != posttime %} and <code>last modified on <time datetime="{{ post.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ post.modified | date: "%d %b %Y" }}</time></code>{% endif %}{% endif %} in <span class="post-tags">{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ post.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>{% unless forloop.last %}&nbsp;&bull;&nbsp;{% endunless %}{% endfor %}</span>{% if site.readtime %}&nbsp;<span class="post-tags"><i class="icon-time"></i>&nbsp;{% if readtime > 1 and readtime < 1.5 %}1 minute read{% endif %}{% if readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes read{% endif %}{% if readtime < 1 %}Less than 1 minute read{% endif %}</span>{% endif %} </div> </header> <div class="post-body bordered-bottom"> {% if post.video %} {% assign video_embed = post.video | remove:'https://www.youtube.com/watch?v=' %} <p><iframe width="940" height="529" src="//www.youtube.com/embed/{{ video_embed }}?theme=light&amp;color=white" frameborder="0" allowfullscreen> </iframe></p> <p class="lead">{{ post.content | strip_html | truncatewords:100 }}&hellip;</p> {% else %} <p class="lead">{{ post.excerpt }}&hellip;</p> {% endif %} <div class="text-center"> {% if post.description %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="{{ post.description }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> see more... </a> {% else %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="Read more about {{ post.title }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> see more... </a> {% endif %} </div> </div> </article> </div> {% endif %} {% if post.type == 'photo' %} <div class="row"> <article class="post post col-md-8 col-md-offset-2"> <header class="post-header"> {% if post.photo %}<figure><a href="{{ site.url }}{{ post.url }}"><img src="{{ site.url }}/images/{{ post.photo }}" alt="{{ post.title }}" itemprop="image"></a></figure>{% else %}<figure><a href="{{ site.url }}{{ post.url }}"><img src="{{ site.url }}/images/{{ post.imagefeature }}" alt="{{ post.title }}" itemprop="image"></a></figure>{% endif %} {% if post.link %} <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}" style="color: #fff; background-color: #45ADA8; border-radius: 4px; padding: 10px"><i class="icon-picture"></i> {{ post.title }}</a> {% else %} <h2 class="post-title text-center super lighter bordered-bottom"> <a href="{{ site.url }}{{ post.url }}"><i class="icon-picture"></i> {{ post.title }}</a> {% endif %} </h2> <div class="post-info text-center small"> <time datetime="{{ post.date | date_to_xmlschema }}" class="post-time">{{ post.date | date: "%d %b %Y" }}</time>{% if post.modified %}{% if modifiedtime != posttime %} and <code>last modified on <time datetime="{{ post.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ post.modified | date: "%d %b %Y" }}</time></code>{% endif %}{% endif %} in <span class="post-tags">{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ post.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>{% unless forloop.last %}&nbsp;&bull;&nbsp;{% endunless %}{% endfor %}</span>{% if site.readtime %}&nbsp;<span class="post-tags"><i class="icon-time"></i>&nbsp;{% if readtime > 1 and readtime < 1.5 %}1 minute read{% endif %}{% if readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes read{% endif %}{% if readtime < 1 %}Less than 1 minute read{% endif %}</span>{% endif %} </div> </header> <div class="post-body bordered-bottom"> <p>{{ post.content | strip_html | truncatewords:100 }}&hellip;</p> <div class="text-center"> {% if post.description %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="{{ post.description }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> read more... </a> {% else %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="Read more about {{ post.title }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> read more... </a> {% endif %} </div> </div> </article> </div> {% endif %} {% if post.type != 'video' and post.type != 'status' and post.type != 'quote' and post.type != 'photo' %} <div class="row"> <article class="post post col-md-8 col-md-offset-2"> <header class="post-header"> {% if post.featured %}<div class="cursive">this post is featured</div>{% endif %} {% if post.link %} <h2 class="post-title text-center super lighter"> <a href="{{ site.url }}{{ post.url }}" style="color: #fff; background-color: #45ADA8; border-radius: 4px; padding: 10px"><i class="icon-link"></i> {{ post.title }}</a> {% else %} <h2 class="post-title text-center super lighter bordered-bottom"> <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a> {% endif %} </h2> <div class="post-info text-center small"> <time datetime="{{ post.date | date_to_xmlschema }}" class="post-time">{{ post.date | date: "%d %b %Y" }}</time>{% if post.modified %}{% if modifiedtime != posttime %} and <code>last modified on <time datetime="{{ post.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ post.modified | date: "%d %b %Y" }}</time></code>{% endif %}{% endif %} in <span class="post-tags">{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ post.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>{% unless forloop.last %}&nbsp;&bull;&nbsp;{% endunless %}{% endfor %}</span>{% if site.readtime %}&nbsp;<span class="post-tags"><i class="icon-time"></i>&nbsp;{% if readtime > 1 and readtime < 1.5 %}1 minute read{% endif %}{% if readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes read{% endif %}{% if readtime < 1 %}Less than 1 minute read{% endif %}</span>{% endif %} </div> </header> <div class="post-body bordered-bottom"> {% assign excerptsize = post.excerpt | number_of_words %} {% if excerptsize <= 100 and excerptsize >= 50 %}<p class = "lead">{{ post.excerpt | strip_html }}&hellip;</p>{% else %} <p>{{ post.content | strip_html | truncatewords:100 }}&hellip;</p>{% endif %} <div class="text-center"> {% if post.description %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="{{ post.description }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> read more... </a> {% else %} <a href="{{ site.url }}{{ post.url }}" data-toggle="tooltip" title="Read more about {{ post.title }}" class="more-link btn btn-danger btn-large"> <i class="icon-link"></i> read more... </a> {% endif %} </div> </div> </article> </div> {% endif %} {% endfor %} {% endif %}
{ "content_hash": "96dcdbb0d25b03244911d43b384899c6", "timestamp": "", "source": "github", "line_count": 433, "max_line_length": 669, "avg_line_length": 75.18475750577367, "alnum_prop": 0.48050990631239443, "repo_name": "RowdyChildren/uwrt1103.rileychilds.me", "id": "b05d2ee19a75f1fbb4eaa39a33c3f3e8b336f9b8", "size": "32559", "binary": false, "copies": "2", "ref": "refs/heads/gh-pages", "path": "index.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "74639" }, { "name": "HTML", "bytes": "83589" }, { "name": "JavaScript", "bytes": "52215" }, { "name": "Ruby", "bytes": "3086" } ], "symlink_target": "" }
<?php namespace Magento\Framework\Console; /** * Locator for Console commands */ class CommandLocator { /** * @var string[] */ private static $commands = []; /** * @param string $commandListClass * @return void */ public static function register($commandListClass) { self::$commands[] = $commandListClass; } /** * @return string[] */ public static function getCommands() { return self::$commands; } }
{ "content_hash": "32a6ab4c8485e2e6623c673f36794090", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 54, "avg_line_length": 16.06451612903226, "alnum_prop": 0.5602409638554217, "repo_name": "j-froehlich/magento2_wk", "id": "a6b38ca1d4c0b93eb9fd685e2ff049fd9d9f6365", "size": "606", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "vendor/magento/framework/Console/CommandLocator.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "13636" }, { "name": "CSS", "bytes": "2076720" }, { "name": "HTML", "bytes": "6151072" }, { "name": "JavaScript", "bytes": "2488727" }, { "name": "PHP", "bytes": "12466046" }, { "name": "Shell", "bytes": "6088" }, { "name": "XSLT", "bytes": "19979" } ], "symlink_target": "" }
<?php namespace Fisharebest\Localization\Locale; use Fisharebest\Localization\Territory\TerritoryCo; class LocaleEsCo extends LocaleEs { protected function percentFormat() { return '%s' . self::PERCENT; } public function territory() { return new TerritoryCo; } }
{ "content_hash": "bc2eea4c53fca8456dbfe01abf224dd8", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 51, "avg_line_length": 19.642857142857142, "alnum_prop": 0.7563636363636363, "repo_name": "fweber1/Annies-Ancestors", "id": "166f3101a19c800c6a468b7d633e9b228e8c002d", "size": "417", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "webtrees/vendor/fisharebest/localization/src/Locale/LocaleEsCo.php", "mode": "33261", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "1064" }, { "name": "Awk", "bytes": "4697" }, { "name": "Batchfile", "bytes": "6467" }, { "name": "CSS", "bytes": "1554235" }, { "name": "ColdFusion", "bytes": "51038" }, { "name": "HTML", "bytes": "2801894" }, { "name": "JavaScript", "bytes": "7729578" }, { "name": "Makefile", "bytes": "7342" }, { "name": "PHP", "bytes": "36634191" }, { "name": "Python", "bytes": "16289" }, { "name": "Roff", "bytes": "29" }, { "name": "Shell", "bytes": "755" }, { "name": "Smarty", "bytes": "38024" }, { "name": "XSLT", "bytes": "11742" } ], "symlink_target": "" }
'use strict'; (function(module) { try { module = angular.module('tink.validation'); } catch (e) { module = angular.module('tink.validation', []); } module.directive('tinkValidation', ['$compile',function ($compile) { return { restrict: 'E', scope: { label: '@', information:'@', errors:'=' }, templateUrl:'templates/transclude.html', transclude: true, replace: true, require:'^form', compile: function(){ }, compile: function compile(tElement, tAttrs, transclude) { var errors; return function preLink(scope, iElement, iAttrs, controller) { //give controller to scope. scope.form = controller; //form string name var formName = controller.$name; //access name of the element with form var elementAccess; //Get de ng transclusion information transclude(scope, function (clone, scope) { //the element that needs to be validated var validationElement = clone.filter('[ng-model]'); // set the name with the form attribute elementAccess = formName+'.'+validationElement.attr('name'); //add de ngmodel option only update on blur $(validationElement).attr('ng-model-options','{ updateOn: \'blur\' }'); //add the ng-class to add the proper css iElement.attr('data-ng-class',"{'has-error':("+elementAccess+".$dirty|| "+formName+".submitted) && "+elementAccess+".$invalid && !"+elementAccess+".$focused ,'has-success':("+elementAccess+".$dirty|| "+formName+".submitted) && "+elementAccess+".$valid && !"+elementAccess+".$focused }"); //get the errors errors = clone.filter('errors'); //replace with the new input iElement.find('[ng-model]').replaceWith(validationElement); }); //remove the ng transclude to build the new element iElement.find('[ng-transclude]').removeAttr('ng-transclude'); //add the proper elements iElement.find('.errors_show').attr('data-ng-show',"("+elementAccess+".$dirty|| "+formName+".submitted) && "+elementAccess+".$invalid && !"+elementAccess+".$focused"); //add the error handeling iElement.find('.errors_show').append(errors.children().clone()); //remove the errors element iElement.find('errors').remove(); //compile the directive $compile(iElement)(scope.$parent); } } }; }]); })();
{ "content_hash": "6da0503324abee6b3c32420b35f92b89", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 301, "avg_line_length": 42.01587301587302, "alnum_prop": 0.5647903286739705, "repo_name": "tinkkit/tink-validation-angular", "id": "78f1689ab167987787870a8b775b4f2abeb474f6", "size": "2647", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/scripts/directives/tink-validation-angular.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "2421" }, { "name": "JavaScript", "bytes": "16170" } ], "symlink_target": "" }
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/dbus/update_engine_client.h" #include "base/bind.h" #include "base/callback.h" #include "base/command_line.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_util.h" #include "chromeos/chromeos_switches.h" #include "dbus/bus.h" #include "dbus/message.h" #include "dbus/object_path.h" #include "dbus/object_proxy.h" #include "third_party/cros_system_api/dbus/service_constants.h" namespace chromeos { namespace { const char kReleaseChannelDev[] = "dev-channel"; const char kReleaseChannelBeta[] = "beta-channel"; const char kReleaseChannelStable[] = "stable-channel"; // Delay between successive state transitions during AU. const int kStateTransitionDefaultDelayMs = 3000; // Delay between successive notifications about downloading progress // during fake AU. const int kStateTransitionDownloadingDelayMs = 250; // Size of parts of a "new" image which are downloaded each // |kStateTransitionDownloadingDelayMs| during fake AU. const int64_t kDownloadSizeDelta = 1 << 19; // Returns UPDATE_STATUS_ERROR on error. UpdateEngineClient::UpdateStatusOperation UpdateStatusFromString( const std::string& str) { VLOG(1) << "UpdateStatusFromString got " << str << " as input."; if (str == update_engine::kUpdateStatusIdle) return UpdateEngineClient::UPDATE_STATUS_IDLE; if (str == update_engine::kUpdateStatusCheckingForUpdate) return UpdateEngineClient::UPDATE_STATUS_CHECKING_FOR_UPDATE; if (str == update_engine::kUpdateStatusUpdateAvailable) return UpdateEngineClient::UPDATE_STATUS_UPDATE_AVAILABLE; if (str == update_engine::kUpdateStatusDownloading) return UpdateEngineClient::UPDATE_STATUS_DOWNLOADING; if (str == update_engine::kUpdateStatusVerifying) return UpdateEngineClient::UPDATE_STATUS_VERIFYING; if (str == update_engine::kUpdateStatusFinalizing) return UpdateEngineClient::UPDATE_STATUS_FINALIZING; if (str == update_engine::kUpdateStatusUpdatedNeedReboot) return UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT; if (str == update_engine::kUpdateStatusReportingErrorEvent) return UpdateEngineClient::UPDATE_STATUS_REPORTING_ERROR_EVENT; if (str == update_engine::kUpdateStatusAttemptingRollback) return UpdateEngineClient::UPDATE_STATUS_ATTEMPTING_ROLLBACK; return UpdateEngineClient::UPDATE_STATUS_ERROR; } // Used in UpdateEngineClient::EmptyUpdateCheckCallback(). void EmptyUpdateCheckCallbackBody( UpdateEngineClient::UpdateCheckResult unused_result) { } bool IsValidChannel(const std::string& channel) { return channel == kReleaseChannelDev || channel == kReleaseChannelBeta || channel == kReleaseChannelStable; } } // namespace // The UpdateEngineClient implementation used in production. class UpdateEngineClientImpl : public UpdateEngineClient { public: UpdateEngineClientImpl() : update_engine_proxy_(NULL), last_status_(), weak_ptr_factory_(this) {} virtual ~UpdateEngineClientImpl() { } // UpdateEngineClient implementation: virtual void AddObserver(Observer* observer) OVERRIDE { observers_.AddObserver(observer); } virtual void RemoveObserver(Observer* observer) OVERRIDE { observers_.RemoveObserver(observer); } virtual bool HasObserver(Observer* observer) OVERRIDE { return observers_.HasObserver(observer); } virtual void RequestUpdateCheck( const UpdateCheckCallback& callback) OVERRIDE { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kAttemptUpdate); dbus::MessageWriter writer(&method_call); writer.AppendString(""); // Unused. writer.AppendString(""); // Unused. VLOG(1) << "Requesting an update check"; update_engine_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&UpdateEngineClientImpl::OnRequestUpdateCheck, weak_ptr_factory_.GetWeakPtr(), callback)); } virtual void RebootAfterUpdate() OVERRIDE { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kRebootIfNeeded); VLOG(1) << "Requesting a reboot"; update_engine_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&UpdateEngineClientImpl::OnRebootAfterUpdate, weak_ptr_factory_.GetWeakPtr())); } virtual void Rollback() OVERRIDE { VLOG(1) << "Requesting a rollback"; dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kAttemptRollback); dbus::MessageWriter writer(&method_call); writer.AppendBool(true /* powerwash */); update_engine_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&UpdateEngineClientImpl::OnRollback, weak_ptr_factory_.GetWeakPtr())); } virtual void CanRollbackCheck( const RollbackCheckCallback& callback) OVERRIDE { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kCanRollback); VLOG(1) << "Requesting to get rollback availability status"; update_engine_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&UpdateEngineClientImpl::OnCanRollbackCheck, weak_ptr_factory_.GetWeakPtr(), callback)); } virtual Status GetLastStatus() OVERRIDE { return last_status_; } virtual void SetChannel(const std::string& target_channel, bool is_powerwash_allowed) OVERRIDE { if (!IsValidChannel(target_channel)) { LOG(ERROR) << "Invalid channel name: " << target_channel; return; } dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kSetChannel); dbus::MessageWriter writer(&method_call); writer.AppendString(target_channel); writer.AppendBool(is_powerwash_allowed); VLOG(1) << "Requesting to set channel: " << "target_channel=" << target_channel << ", " << "is_powerwash_allowed=" << is_powerwash_allowed; update_engine_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&UpdateEngineClientImpl::OnSetChannel, weak_ptr_factory_.GetWeakPtr())); } virtual void GetChannel(bool get_current_channel, const GetChannelCallback& callback) OVERRIDE { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kGetChannel); dbus::MessageWriter writer(&method_call); writer.AppendBool(get_current_channel); VLOG(1) << "Requesting to get channel, get_current_channel=" << get_current_channel; update_engine_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&UpdateEngineClientImpl::OnGetChannel, weak_ptr_factory_.GetWeakPtr(), callback)); } protected: virtual void Init(dbus::Bus* bus) OVERRIDE { update_engine_proxy_ = bus->GetObjectProxy( update_engine::kUpdateEngineServiceName, dbus::ObjectPath(update_engine::kUpdateEngineServicePath)); // Monitor the D-Bus signal for brightness changes. Only the power // manager knows the actual brightness level. We don't cache the // brightness level in Chrome as it will make things less reliable. update_engine_proxy_->ConnectToSignal( update_engine::kUpdateEngineInterface, update_engine::kStatusUpdate, base::Bind(&UpdateEngineClientImpl::StatusUpdateReceived, weak_ptr_factory_.GetWeakPtr()), base::Bind(&UpdateEngineClientImpl::StatusUpdateConnected, weak_ptr_factory_.GetWeakPtr())); // Get update engine status for the initial status. Update engine won't // send StatusUpdate signal unless there is a status change. If chrome // crashes after UPDATE_STATUS_UPDATED_NEED_REBOOT status is set, // restarted chrome would not get this status. See crbug.com/154104. GetUpdateEngineStatus(); } private: void GetUpdateEngineStatus() { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kGetStatus); update_engine_proxy_->CallMethodWithErrorCallback( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::Bind(&UpdateEngineClientImpl::OnGetStatus, weak_ptr_factory_.GetWeakPtr()), base::Bind(&UpdateEngineClientImpl::OnGetStatusError, weak_ptr_factory_.GetWeakPtr())); } // Called when a response for RequestUpdateCheck() is received. void OnRequestUpdateCheck(const UpdateCheckCallback& callback, dbus::Response* response) { if (!response) { LOG(ERROR) << "Failed to request update check"; callback.Run(UPDATE_RESULT_FAILED); return; } callback.Run(UPDATE_RESULT_SUCCESS); } // Called when a response for RebootAfterUpdate() is received. void OnRebootAfterUpdate(dbus::Response* response) { if (!response) { LOG(ERROR) << "Failed to request rebooting after update"; return; } } // Called when a response for Rollback() is received. void OnRollback(dbus::Response* response) { if (!response) { LOG(ERROR) << "Failed to rollback"; return; } } // Called when a response for CanRollbackCheck() is received. void OnCanRollbackCheck(const RollbackCheckCallback& callback, dbus::Response* response) { if (!response) { LOG(ERROR) << "Failed to request rollback availability status"; callback.Run(false); return; } dbus::MessageReader reader(response); bool can_rollback; if (!reader.PopBool(&can_rollback)) { LOG(ERROR) << "Incorrect response: " << response->ToString(); callback.Run(false); return; } VLOG(1) << "Rollback availability status received: " << can_rollback; callback.Run(can_rollback); } // Called when a response for GetStatus is received. void OnGetStatus(dbus::Response* response) { if (!response) { LOG(ERROR) << "Failed to get response for GetStatus request."; return; } dbus::MessageReader reader(response); std::string current_operation; Status status; if (!(reader.PopInt64(&status.last_checked_time) && reader.PopDouble(&status.download_progress) && reader.PopString(&current_operation) && reader.PopString(&status.new_version) && reader.PopInt64(&status.new_size))) { LOG(ERROR) << "GetStatus had incorrect response: " << response->ToString(); return; } status.status = UpdateStatusFromString(current_operation); last_status_ = status; FOR_EACH_OBSERVER(Observer, observers_, UpdateStatusChanged(status)); } // Called when GetStatus call failed. void OnGetStatusError(dbus::ErrorResponse* error) { LOG(ERROR) << "GetStatus request failed with error: " << (error ? error->ToString() : ""); } // Called when a response for SetReleaseChannel() is received. void OnSetChannel(dbus::Response* response) { if (!response) { LOG(ERROR) << "Failed to request setting channel"; return; } VLOG(1) << "Succeeded to set channel"; } // Called when a response for GetChannel() is received. void OnGetChannel(const GetChannelCallback& callback, dbus::Response* response) { if (!response) { LOG(ERROR) << "Failed to request getting channel"; callback.Run(""); return; } dbus::MessageReader reader(response); std::string channel; if (!reader.PopString(&channel)) { LOG(ERROR) << "Incorrect response: " << response->ToString(); callback.Run(""); return; } VLOG(1) << "The channel received: " << channel; callback.Run(channel); } // Called when a status update signal is received. void StatusUpdateReceived(dbus::Signal* signal) { VLOG(1) << "Status update signal received: " << signal->ToString(); dbus::MessageReader reader(signal); int64 last_checked_time = 0; double progress = 0.0; std::string current_operation; std::string new_version; int64_t new_size = 0; if (!(reader.PopInt64(&last_checked_time) && reader.PopDouble(&progress) && reader.PopString(&current_operation) && reader.PopString(&new_version) && reader.PopInt64(&new_size))) { LOG(ERROR) << "Status changed signal had incorrect parameters: " << signal->ToString(); return; } Status status; status.last_checked_time = last_checked_time; status.download_progress = progress; status.status = UpdateStatusFromString(current_operation); status.new_version = new_version; status.new_size = new_size; last_status_ = status; FOR_EACH_OBSERVER(Observer, observers_, UpdateStatusChanged(status)); } // Called when the status update signal is initially connected. void StatusUpdateConnected(const std::string& interface_name, const std::string& signal_name, bool success) { LOG_IF(WARNING, !success) << "Failed to connect to status updated signal."; } dbus::ObjectProxy* update_engine_proxy_; ObserverList<Observer> observers_; Status last_status_; // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<UpdateEngineClientImpl> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(UpdateEngineClientImpl); }; // The UpdateEngineClient implementation used on Linux desktop, // which does nothing. class UpdateEngineClientStubImpl : public UpdateEngineClient { // UpdateEngineClient implementation: virtual void Init(dbus::Bus* bus) OVERRIDE {} virtual void AddObserver(Observer* observer) OVERRIDE {} virtual void RemoveObserver(Observer* observer) OVERRIDE {} virtual bool HasObserver(Observer* observer) OVERRIDE { return false; } virtual void RequestUpdateCheck( const UpdateCheckCallback& callback) OVERRIDE { callback.Run(UPDATE_RESULT_NOTIMPLEMENTED); } virtual void RebootAfterUpdate() OVERRIDE {} virtual void Rollback() OVERRIDE {} virtual void CanRollbackCheck( const RollbackCheckCallback& callback) OVERRIDE { callback.Run(true); } virtual Status GetLastStatus() OVERRIDE { return Status(); } virtual void SetChannel(const std::string& target_channel, bool is_powerwash_allowed) OVERRIDE { VLOG(1) << "Requesting to set channel: " << "target_channel=" << target_channel << ", " << "is_powerwash_allowed=" << is_powerwash_allowed; } virtual void GetChannel(bool get_current_channel, const GetChannelCallback& callback) OVERRIDE { VLOG(1) << "Requesting to get channel, get_current_channel=" << get_current_channel; callback.Run(kReleaseChannelBeta); } }; // The UpdateEngineClient implementation used on Linux desktop, which // tries to emulate real update engine client. class UpdateEngineClientFakeImpl : public UpdateEngineClientStubImpl { public: UpdateEngineClientFakeImpl() : weak_factory_(this) { } virtual ~UpdateEngineClientFakeImpl() { } // UpdateEngineClient implementation: virtual void AddObserver(Observer* observer) OVERRIDE { if (observer) observers_.AddObserver(observer); } virtual void RemoveObserver(Observer* observer) OVERRIDE { if (observer) observers_.RemoveObserver(observer); } virtual bool HasObserver(Observer* observer) OVERRIDE { return observers_.HasObserver(observer); } virtual void RequestUpdateCheck( const UpdateCheckCallback& callback) OVERRIDE { if (last_status_.status != UPDATE_STATUS_IDLE) { callback.Run(UPDATE_RESULT_FAILED); return; } callback.Run(UPDATE_RESULT_SUCCESS); last_status_.status = UPDATE_STATUS_CHECKING_FOR_UPDATE; last_status_.download_progress = 0.0; last_status_.last_checked_time = 0; last_status_.new_size = 0; base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&UpdateEngineClientFakeImpl::StateTransition, weak_factory_.GetWeakPtr()), base::TimeDelta::FromMilliseconds(kStateTransitionDefaultDelayMs)); } virtual Status GetLastStatus() OVERRIDE { return last_status_; } private: void StateTransition() { UpdateStatusOperation next_status = UPDATE_STATUS_ERROR; int delay_ms = kStateTransitionDefaultDelayMs; switch (last_status_.status) { case UPDATE_STATUS_ERROR: case UPDATE_STATUS_IDLE: case UPDATE_STATUS_UPDATED_NEED_REBOOT: case UPDATE_STATUS_REPORTING_ERROR_EVENT: case UPDATE_STATUS_ATTEMPTING_ROLLBACK: return; case UPDATE_STATUS_CHECKING_FOR_UPDATE: next_status = UPDATE_STATUS_UPDATE_AVAILABLE; break; case UPDATE_STATUS_UPDATE_AVAILABLE: next_status = UPDATE_STATUS_DOWNLOADING; break; case UPDATE_STATUS_DOWNLOADING: if (last_status_.download_progress >= 1.0) { next_status = UPDATE_STATUS_VERIFYING; } else { next_status = UPDATE_STATUS_DOWNLOADING; last_status_.download_progress += 0.01; last_status_.new_size = kDownloadSizeDelta; delay_ms = kStateTransitionDownloadingDelayMs; } break; case UPDATE_STATUS_VERIFYING: next_status = UPDATE_STATUS_FINALIZING; break; case UPDATE_STATUS_FINALIZING: next_status = UPDATE_STATUS_IDLE; break; } last_status_.status = next_status; FOR_EACH_OBSERVER(Observer, observers_, UpdateStatusChanged(last_status_)); if (last_status_.status != UPDATE_STATUS_IDLE) { base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&UpdateEngineClientFakeImpl::StateTransition, weak_factory_.GetWeakPtr()), base::TimeDelta::FromMilliseconds(delay_ms)); } } ObserverList<Observer> observers_; Status last_status_; base::WeakPtrFactory<UpdateEngineClientFakeImpl> weak_factory_; DISALLOW_COPY_AND_ASSIGN(UpdateEngineClientFakeImpl); }; UpdateEngineClient::UpdateEngineClient() { } UpdateEngineClient::~UpdateEngineClient() { } // static UpdateEngineClient::UpdateCheckCallback UpdateEngineClient::EmptyUpdateCheckCallback() { return base::Bind(&EmptyUpdateCheckCallbackBody); } // static UpdateEngineClient* UpdateEngineClient::Create( DBusClientImplementationType type) { if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) return new UpdateEngineClientImpl(); DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestAutoUpdateUI)) return new UpdateEngineClientFakeImpl(); else return new UpdateEngineClientStubImpl(); } } // namespace chromeos
{ "content_hash": "8eb6925f597a43570afe2551a20f15ff", "timestamp": "", "source": "github", "line_count": 552, "max_line_length": 79, "avg_line_length": 35.23550724637681, "alnum_prop": 0.6811311053984576, "repo_name": "sencha/chromium-spacewalk", "id": "fd1bc2a251e990d3f876ba692f187354d1d94c3f", "size": "19450", "binary": false, "copies": "17", "ref": "refs/heads/master", "path": "chromeos/dbus/update_engine_client.cc", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
class RenameLibrarianToEditor < ActiveRecord::Migration[4.2] def change rename_column :project_users, :librarian, :editor end end
{ "content_hash": "b8ac9affd321e15d5148420e0a2cc890", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 60, "avg_line_length": 27.6, "alnum_prop": 0.7608695652173914, "repo_name": "remomueller/slice", "id": "cf9ac4cfd988655c06d814c46a5eb37266761414", "size": "138", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "db/migrate/20130321141401_rename_librarian_to_editor.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "127591" }, { "name": "CoffeeScript", "bytes": "89104" }, { "name": "HTML", "bytes": "947188" }, { "name": "JavaScript", "bytes": "33748" }, { "name": "Ruby", "bytes": "1489298" } ], "symlink_target": "" }
<?php namespace TYPO3\Flow\Configuration; use TYPO3\Flow\Annotations as Flow; use TYPO3\Flow\Core\ApplicationContext; use TYPO3\Flow\Package\PackageInterface; use TYPO3\Flow\Utility\Arrays; use TYPO3\Flow\Utility\Files; use TYPO3\Flow\Utility\OpcodeCacheHelper; use TYPO3\Flow\Utility\PositionalArraySorter; /** * A general purpose configuration manager * * @Flow\Scope("singleton") * @Flow\Proxy(FALSE) * @api */ class ConfigurationManager { /** * The maximum number of recursions when merging subroute configurations. * * @var integer */ const MAXIMUM_SUBROUTE_RECURSIONS = 99; /** * Contains a list of caches which are registered automatically. Caches defined in this configuration file are * registered in an early stage of the boot process and profit from mechanisms such as automatic flushing by the * File Monitor. See the chapter about the Cache Framework for details. * * @var string */ const CONFIGURATION_TYPE_CACHES = 'Caches'; /** * Contains object configuration, i.e. options which configure objects and the combination of those on a lower * level. See the Object Framework chapter for more information. * * @var string */ const CONFIGURATION_TYPE_OBJECTS = 'Objects'; /** * Contains routes configuration. This routing information is parsed and used by the MVC Web Routing mechanism. * Refer to the Routing chapter for more information. * * @var string */ const CONFIGURATION_TYPE_ROUTES = 'Routes'; /** * Contains the configuration of the security policies of the system. See the Security chapter for details. * * @var string */ const CONFIGURATION_TYPE_POLICY = 'Policy'; /** * Contains user-level settings, i.e. configuration options the users or administrators are meant to change. * Settings are the highest level of system configuration. * * @var string */ const CONFIGURATION_TYPE_SETTINGS = 'Settings'; /** * This is the default processing, which merges configurations similar to how CONFIGURATION_PROCESSING_TYPE_SETTINGS * are merged (except that for settings an empty array is initialized for each package) * * @var string */ const CONFIGURATION_PROCESSING_TYPE_DEFAULT = 'DefaultProcessing'; /** * Appends all configurations, prefixed by the PackageKey of the configuration source * * @var string */ const CONFIGURATION_PROCESSING_TYPE_OBJECTS = 'ObjectsProcessing'; /** * Loads and merges configurations from Packages (global Policy-configurations are not allowed) * * @var string */ const CONFIGURATION_PROCESSING_TYPE_POLICY = 'PolicyProcessing'; /** * Loads and appends global configurations and resolves SubRoutes, creating a combined flat array of all Routes * * @var string */ const CONFIGURATION_PROCESSING_TYPE_ROUTES = 'RoutesProcessing'; /** * Similar to CONFIGURATION_PROCESSING_TYPE_DEFAULT, but for every active package an empty array is initialized. * Besides this sets "TYPO3.Flow.core.context" to the current context * * @var string */ const CONFIGURATION_PROCESSING_TYPE_SETTINGS = 'SettingsProcessing'; /** * Appends all configurations to one flat array * * @var string */ const CONFIGURATION_PROCESSING_TYPE_APPEND = 'AppendProcessing'; /** * Defines which Configuration Type is processed by which logic * * @var array */ protected $configurationTypes = [ self::CONFIGURATION_TYPE_CACHES => ['processingType' => self::CONFIGURATION_PROCESSING_TYPE_DEFAULT, 'allowSplitSource' => false], self::CONFIGURATION_TYPE_OBJECTS => ['processingType' => self::CONFIGURATION_PROCESSING_TYPE_OBJECTS, 'allowSplitSource' => false], self::CONFIGURATION_TYPE_ROUTES => ['processingType' => self::CONFIGURATION_PROCESSING_TYPE_ROUTES, 'allowSplitSource' => false], self::CONFIGURATION_TYPE_POLICY => ['processingType' => self::CONFIGURATION_PROCESSING_TYPE_POLICY, 'allowSplitSource' => false], self::CONFIGURATION_TYPE_SETTINGS => ['processingType' => self::CONFIGURATION_PROCESSING_TYPE_SETTINGS, 'allowSplitSource' => false] ]; /** * The application context of the configuration to manage * * @var ApplicationContext */ protected $context; /** * An array of context name strings, from the most generic one to the most special one. * Example: * Development, Development/Foo, Development/Foo/Bar * * @var array */ protected $orderedListOfContextNames = []; /** * @var Source\YamlSource */ protected $configurationSource; /** * @var string */ protected $includeCachedConfigurationsPathAndFilename; /** * Storage of the raw special configurations * * @var array */ protected $configurations = [ self::CONFIGURATION_TYPE_SETTINGS => [], ]; /** * Active packages to load the configuration for * * @var array<TYPO3\Flow\Package\PackageInterface> */ protected $packages = []; /** * @var boolean */ protected $cacheNeedsUpdate = false; /** * Counts how many SubRoutes have been loaded. If this number exceeds MAXIMUM_SUBROUTE_RECURSIONS, an exception is thrown * * @var integer */ protected $subRoutesRecursionLevel = 0; /** * An absolute file path to store configuration caches in. If null no cache will be active. * * @var string */ protected $temporaryDirectoryPath; /** * Constructs the configuration manager * * @param ApplicationContext $context The application context to fetch configuration for */ public function __construct(ApplicationContext $context) { $this->context = $context; $orderedListOfContextNames = []; $currentContext = $context; do { $orderedListOfContextNames[] = (string)$currentContext; } while ($currentContext = $currentContext->getParent()); $this->orderedListOfContextNames = array_reverse($orderedListOfContextNames); $this->includeCachedConfigurationsPathAndFilename = FLOW_PATH_CONFIGURATION . (string)$context . '/IncludeCachedConfigurations.php'; } /** * Injects the configuration source * * @param Source\YamlSource $configurationSource * @return void */ public function injectConfigurationSource(Source\YamlSource $configurationSource) { $this->configurationSource = $configurationSource; } /** * Set an absolute file path to store configuration caches in. If null no cache will be active. * * @param string $temporaryDirectoryPath */ public function setTemporaryDirectoryPath($temporaryDirectoryPath) { $this->temporaryDirectoryPath = $temporaryDirectoryPath; } /** * Sets the active packages to load the configuration for * * @param array<TYPO3\Flow\Package\PackageInterface> $packages * @return void */ public function setPackages(array $packages) { $this->packages = $packages; } /** * Get the available configuration-types * * @return array<string> array of configuration-type identifier strings */ public function getAvailableConfigurationTypes() { return array_keys($this->configurationTypes); } /** * Resolve the processing type for the configuration type. * * This returns the CONFIGURATION_PROCESSING_TYPE_* to use for the given * $configurationType. * * @param string $configurationType * @return string * @throws Exception\InvalidConfigurationTypeException on non-existing configurationType */ public function resolveConfigurationProcessingType($configurationType) { if (!isset($this->configurationTypes[$configurationType])) { throw new Exception\InvalidConfigurationTypeException('Configuration type "' . $configurationType . '" is not registered. You can Register it by calling $configurationManager->registerConfigurationType($configurationType).', 1339166495); } return $this->configurationTypes[$configurationType]['processingType']; } /** * Check the allowSplitSource setting for the configuration type. * * @param string $configurationType * @return boolean * @throws Exception\InvalidConfigurationTypeException on non-existing configurationType */ public function isSplitSourceAllowedForConfigurationType($configurationType) { if (!isset($this->configurationTypes[$configurationType])) { throw new Exception\InvalidConfigurationTypeException('Configuration type "' . $configurationType . '" is not registered. You can Register it by calling $configurationManager->registerConfigurationType($configurationType).', 1359998400); } return $this->configurationTypes[$configurationType]['allowSplitSource']; } /** * Registers a new configuration type with the given configuration processing type. * * The processing type must be supported by the ConfigurationManager, see * CONFIGURATION_PROCESSING_TYPE_* for what is available. * * @param string $configurationType The type to register, may be anything * @param string $configurationProcessingType One of CONFIGURATION_PROCESSING_TYPE_*, defaults to CONFIGURATION_PROCESSING_TYPE_DEFAULT * @param boolean $allowSplitSource If TRUE, the type will be used as a "prefix" when looking for split configuration. Only supported for DEFAULT and SETTINGS processing types! * @throws \InvalidArgumentException on invalid configuration processing type * @return void */ public function registerConfigurationType($configurationType, $configurationProcessingType = self::CONFIGURATION_PROCESSING_TYPE_DEFAULT, $allowSplitSource = false) { $configurationProcessingTypes = [ self::CONFIGURATION_PROCESSING_TYPE_DEFAULT, self::CONFIGURATION_PROCESSING_TYPE_OBJECTS, self::CONFIGURATION_PROCESSING_TYPE_POLICY, self::CONFIGURATION_PROCESSING_TYPE_ROUTES, self::CONFIGURATION_PROCESSING_TYPE_SETTINGS, self::CONFIGURATION_PROCESSING_TYPE_APPEND ]; if (!in_array($configurationProcessingType, $configurationProcessingTypes)) { throw new \InvalidArgumentException(sprintf('Specified invalid configuration processing type "%s" while registering custom configuration type "%s"', $configurationProcessingType, $configurationType), 1365496111); } $this->configurationTypes[$configurationType] = ['processingType' => $configurationProcessingType, 'allowSplitSource' => $allowSplitSource]; } /** * Emits a signal after The ConfigurationManager has been loaded * * @param \TYPO3\Flow\Configuration\ConfigurationManager $configurationManager * @return void * @Flow\Signal */ protected function emitConfigurationManagerReady($configurationManager) { } /** * Returns the specified raw configuration. * The actual configuration will be merged from different sources in a defined order. * * Note that this is a low level method and mostly makes sense to be used by Flow internally. * If possible just use settings and have them injected. * * @param string $configurationType The kind of configuration to fetch - must be one of the CONFIGURATION_TYPE_* constants * @param string $configurationPath The path inside the configuration to fetch * @return array The configuration * @throws Exception\InvalidConfigurationTypeException on invalid configuration types */ public function getConfiguration($configurationType, $configurationPath = null) { $configurationProcessingType = $this->resolveConfigurationProcessingType($configurationType); $configuration = []; switch ($configurationProcessingType) { case self::CONFIGURATION_PROCESSING_TYPE_DEFAULT: case self::CONFIGURATION_PROCESSING_TYPE_ROUTES: case self::CONFIGURATION_PROCESSING_TYPE_POLICY: case self::CONFIGURATION_PROCESSING_TYPE_APPEND: if (!isset($this->configurations[$configurationType])) { $this->loadConfiguration($configurationType, $this->packages); } if (isset($this->configurations[$configurationType])) { $configuration = &$this->configurations[$configurationType]; } break; case self::CONFIGURATION_PROCESSING_TYPE_SETTINGS: if (!isset($this->configurations[$configurationType]) || $this->configurations[$configurationType] === []) { $this->configurations[$configurationType] = []; $this->loadConfiguration($configurationType, $this->packages); } if (isset($this->configurations[$configurationType])) { $configuration = &$this->configurations[$configurationType]; } break; case self::CONFIGURATION_PROCESSING_TYPE_OBJECTS: if (!isset($this->configurations[$configurationType]) || $this->configurations[$configurationType] === []) { $this->loadConfiguration($configurationType, $this->packages); } if (isset($this->configurations[$configurationType])) { $configuration = &$this->configurations[$configurationType]; } break; } if ($configurationPath !== null && $configuration !== null) { return (Arrays::getValueByPath($configuration, $configurationPath)); } else { return $configuration; } } /** * Shuts down the configuration manager. * This method writes the current configuration into a cache file if Flow was configured to do so. * * @return void */ public function shutdown() { if ($this->cacheNeedsUpdate === true) { $this->saveConfigurationCache(); } } /** * Warms up the complete configuration cache, i.e. fetching every configured configuration type * in order to be able to store it into the cache, if configured to do so. * * @see \TYPO3\Flow\Configuration\ConfigurationManager::shutdown * @return void */ public function warmup() { foreach ($this->getAvailableConfigurationTypes() as $configurationType) { $this->getConfiguration($configurationType); } } /** * Loads special configuration defined in the specified packages and merges them with * those potentially existing in the global configuration folders. The result is stored * in the configuration manager's configuration registry and can be retrieved with the * getConfiguration() method. * * @param string $configurationType The kind of configuration to load - must be one of the CONFIGURATION_TYPE_* constants * @param array $packages An array of Package objects (indexed by package key) to consider * @throws Exception\InvalidConfigurationTypeException * @throws Exception\InvalidConfigurationException * @return void */ protected function loadConfiguration($configurationType, array $packages) { $this->cacheNeedsUpdate = true; $configurationProcessingType = $this->resolveConfigurationProcessingType($configurationType); $allowSplitSource = $this->isSplitSourceAllowedForConfigurationType($configurationType); switch ($configurationProcessingType) { case self::CONFIGURATION_PROCESSING_TYPE_SETTINGS: // Make sure that the Flow package is the first item of the packages array: if (isset($packages['TYPO3.Flow'])) { $flowPackage = $packages['TYPO3.Flow']; unset($packages['TYPO3.Flow']); $packages = array_merge(['TYPO3.Flow' => $flowPackage], $packages); unset($flowPackage); } $settings = []; /** @var $package PackageInterface */ foreach ($packages as $packageKey => $package) { if (Arrays::getValueByPath($settings, $packageKey) === null) { $settings = Arrays::setValueByPath($settings, $packageKey, []); } $settings = Arrays::arrayMergeRecursiveOverrule($settings, $this->configurationSource->load($package->getConfigurationPath() . $configurationType, $allowSplitSource)); } $settings = Arrays::arrayMergeRecursiveOverrule($settings, $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $configurationType, $allowSplitSource)); foreach ($this->orderedListOfContextNames as $contextName) { /** @var $package PackageInterface */ foreach ($packages as $package) { $settings = Arrays::arrayMergeRecursiveOverrule($settings, $this->configurationSource->load($package->getConfigurationPath() . $contextName . '/' . $configurationType, $allowSplitSource)); } $settings = Arrays::arrayMergeRecursiveOverrule($settings, $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $contextName . '/' . $configurationType, $allowSplitSource)); } if ($this->configurations[$configurationType] !== []) { $this->configurations[$configurationType] = Arrays::arrayMergeRecursiveOverrule($this->configurations[$configurationType], $settings); } else { $this->configurations[$configurationType] = $settings; } $this->configurations[$configurationType]['TYPO3']['Flow']['core']['context'] = (string)$this->context; break; case self::CONFIGURATION_PROCESSING_TYPE_OBJECTS: $this->configurations[$configurationType] = []; /** @var $package PackageInterface */ foreach ($packages as $packageKey => $package) { $configuration = $this->configurationSource->load($package->getConfigurationPath() . $configurationType); $configuration = Arrays::arrayMergeRecursiveOverrule($configuration, $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $configurationType)); foreach ($this->orderedListOfContextNames as $contextName) { $configuration = Arrays::arrayMergeRecursiveOverrule($configuration, $this->configurationSource->load($package->getConfigurationPath() . $contextName . '/' . $configurationType)); $configuration = Arrays::arrayMergeRecursiveOverrule($configuration, $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $contextName . '/' . $configurationType)); } $this->configurations[$configurationType][$packageKey] = $configuration; } break; case self::CONFIGURATION_PROCESSING_TYPE_POLICY: if ($this->context->isTesting()) { $testingPolicyPathAndFilename = $this->temporaryDirectoryPath . 'Policy'; if ($this->configurationSource->has($testingPolicyPathAndFilename)) { $this->configurations[$configurationType] = $this->configurationSource->load($testingPolicyPathAndFilename); break; } } $this->configurations[$configurationType] = []; /** @var $package PackageInterface */ foreach ($packages as $package) { $packagePolicyConfiguration = $this->configurationSource->load($package->getConfigurationPath() . $configurationType, $allowSplitSource); $this->validatePolicyConfiguration($packagePolicyConfiguration, $package); $this->configurations[$configurationType] = $this->mergePolicyConfiguration($this->configurations[$configurationType], $packagePolicyConfiguration); } $this->configurations[$configurationType] = $this->mergePolicyConfiguration($this->configurations[$configurationType], $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $configurationType, $allowSplitSource)); foreach ($this->orderedListOfContextNames as $contextName) { /** @var $package PackageInterface */ foreach ($packages as $package) { $packagePolicyConfiguration = $this->configurationSource->load($package->getConfigurationPath() . $contextName . '/' . $configurationType, $allowSplitSource); $this->validatePolicyConfiguration($packagePolicyConfiguration, $package); $this->configurations[$configurationType] = $this->mergePolicyConfiguration($this->configurations[$configurationType], $packagePolicyConfiguration); } $this->configurations[$configurationType] = $this->mergePolicyConfiguration($this->configurations[$configurationType], $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $contextName . '/' . $configurationType, $allowSplitSource)); } break; case self::CONFIGURATION_PROCESSING_TYPE_DEFAULT: $this->configurations[$configurationType] = []; /** @var $package PackageInterface */ foreach ($packages as $package) { $this->configurations[$configurationType] = Arrays::arrayMergeRecursiveOverrule($this->configurations[$configurationType], $this->configurationSource->load($package->getConfigurationPath() . $configurationType, $allowSplitSource)); } $this->configurations[$configurationType] = Arrays::arrayMergeRecursiveOverrule($this->configurations[$configurationType], $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $configurationType, $allowSplitSource)); foreach ($this->orderedListOfContextNames as $contextName) { /** @var $package PackageInterface */ foreach ($packages as $package) { $this->configurations[$configurationType] = Arrays::arrayMergeRecursiveOverrule($this->configurations[$configurationType], $this->configurationSource->load($package->getConfigurationPath() . $contextName . '/' . $configurationType, $allowSplitSource)); } $this->configurations[$configurationType] = Arrays::arrayMergeRecursiveOverrule($this->configurations[$configurationType], $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $contextName . '/' . $configurationType, $allowSplitSource)); } break; case self::CONFIGURATION_PROCESSING_TYPE_ROUTES: // load main routes $this->configurations[$configurationType] = []; foreach (array_reverse($this->orderedListOfContextNames) as $contextName) { $this->configurations[$configurationType] = array_merge($this->configurations[$configurationType], $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $contextName . '/' . $configurationType)); } $this->configurations[$configurationType] = array_merge($this->configurations[$configurationType], $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $configurationType)); // load subroutes from Routes.yaml and Settings.yaml and merge them with main routes recursively $this->includeSubRoutesFromSettings($this->configurations[$configurationType]); $this->mergeRoutesWithSubRoutes($this->configurations[$configurationType]); break; case self::CONFIGURATION_PROCESSING_TYPE_APPEND: $this->configurations[$configurationType] = []; /** @var $package PackageInterface */ foreach ($packages as $package) { $this->configurations[$configurationType] = array_merge($this->configurations[$configurationType], $this->configurationSource->load($package->getConfigurationPath() . $configurationType, $allowSplitSource)); } $this->configurations[$configurationType] = array_merge($this->configurations[$configurationType], $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $configurationType, $allowSplitSource)); foreach ($this->orderedListOfContextNames as $contextName) { foreach ($packages as $package) { $this->configurations[$configurationType] = array_merge($this->configurations[$configurationType], $this->configurationSource->load($package->getConfigurationPath() . $contextName . '/' . $configurationType, $allowSplitSource)); } $this->configurations[$configurationType] = array_merge($this->configurations[$configurationType], $this->configurationSource->load(FLOW_PATH_CONFIGURATION . $contextName . '/' . $configurationType, $allowSplitSource)); } break; default: throw new Exception\InvalidConfigurationTypeException('Configuration type "' . $configurationType . '" cannot be loaded with loadConfiguration().', 1251450613); } $this->postProcessConfiguration($this->configurations[$configurationType]); } /** * If a cache file with previously saved configuration exists, it is loaded. * * @return boolean If cached configuration was loaded or not */ public function loadConfigurationCache() { if (is_file($this->includeCachedConfigurationsPathAndFilename)) { $this->configurations = require($this->includeCachedConfigurationsPathAndFilename); return true; } return false; } /** * If a cache file with previously saved configuration exists, it is removed. * * @return void * @throws Exception */ public function flushConfigurationCache() { $this->configurations = [self::CONFIGURATION_TYPE_SETTINGS => []]; if ($this->temporaryDirectoryPath === null) { return; } $configurationCachePath = $this->temporaryDirectoryPath . 'Configuration/'; $cachePathAndFilename = $configurationCachePath . str_replace('/', '_', (string)$this->context) . 'Configurations.php'; if (is_file($cachePathAndFilename)) { if (unlink($cachePathAndFilename) === false) { throw new Exception(sprintf('Could not delete configuration cache file "%s". Check file permissions for the parent directory.', $cachePathAndFilename), 1341999203); } OpcodeCacheHelper::clearAllActive($cachePathAndFilename); } } /** * Saves the current configuration into a cache file and creates a cache inclusion script * in the context's Configuration directory. * * @return void * @throws Exception */ protected function saveConfigurationCache() { // Make sure that all configuration types are loaded before writing configuration caches. foreach (array_keys($this->configurationTypes) as $configurationType) { $this->getConfiguration($configurationType); } if ($this->temporaryDirectoryPath === null) { return; } $configurationCachePath = $this->temporaryDirectoryPath . 'Configuration/'; if (!file_exists($configurationCachePath)) { Files::createDirectoryRecursively($configurationCachePath); } $cachePathAndFilename = $configurationCachePath . str_replace('/', '_', (string)$this->context) . 'Configurations.php'; $flowRootPath = FLOW_PATH_ROOT; $includeCachedConfigurationsCode = <<< "EOD" <?php if (FLOW_PATH_ROOT !== '$flowRootPath' || !file_exists('$cachePathAndFilename')) { @unlink(__FILE__); return array(); } return require '$cachePathAndFilename'; EOD; file_put_contents($cachePathAndFilename, '<?php return ' . var_export($this->configurations, true) . ';'); OpcodeCacheHelper::clearAllActive($cachePathAndFilename); if (!is_dir(dirname($this->includeCachedConfigurationsPathAndFilename)) && !is_link(dirname($this->includeCachedConfigurationsPathAndFilename))) { Files::createDirectoryRecursively(dirname($this->includeCachedConfigurationsPathAndFilename)); } file_put_contents($this->includeCachedConfigurationsPathAndFilename, $includeCachedConfigurationsCode); if (!is_file($this->includeCachedConfigurationsPathAndFilename)) { throw new Exception(sprintf('Could not write configuration cache file "%s". Check file permissions for the parent directory.', $this->includeCachedConfigurationsPathAndFilename), 1323339284); } OpcodeCacheHelper::clearAllActive($this->includeCachedConfigurationsPathAndFilename); } /** * Post processes the given configuration array by replacing constants with their * actual value. * * @param array &$configurations The configuration to post process. The results are stored directly in the given array * @return void */ protected function postProcessConfiguration(array &$configurations) { foreach ($configurations as $key => $configuration) { if (is_array($configuration)) { $this->postProcessConfiguration($configurations[$key]); } if (!is_string($configuration)) { continue; } $configurations[$key] = $this->replaceVariablesInValue($configuration); } } /** * Replaces variables (in the format %CONSTANT% or %ENV::ENVIRONMENT_VARIABLE) * in the given (configuration) value string. * * @param string $value * @return mixed */ protected function replaceVariablesInValue($value) { $matches = []; $replacements = []; preg_match_all('/ (?P<fullMatch>% # an expression is indicated by % (?P<expression> (?:(?:\\\?[\d\w_\\\]+\:\:) # either a class name followed by :: | # or (?:(?P<prefix>[a-z]+)\:) # a prefix followed by : (like "env:") )? (?P<name>[A-Z_0-9]+)) # the actual variable name in all upper %) # concluded by % /mx', $value, $matches, PREG_SET_ORDER); foreach ($matches as $matchGroup) { if (isset($matchGroup['prefix']) && $matchGroup['prefix'] === 'env') { $replacements[$matchGroup['fullMatch']] = getenv($matchGroup['name']); } if (defined($matchGroup['expression'])) { $replacements[$matchGroup['fullMatch']] = constant($matchGroup['expression']); } } $replacementCount = count($replacements); if ($replacementCount === 0) { return $value; } if ($replacementCount === 1 && array_keys($replacements)[0] === $value) { // the replacement spans the complete directive, assign directly to keep CONSTANT/ENV variable type return reset($replacements); } return str_replace(array_keys($replacements), $replacements, $value); } /** * Loads specified sub routes and builds composite routes. * * @param array $routesConfiguration * @return void * @throws Exception\ParseErrorException * @throws Exception\RecursionException */ protected function mergeRoutesWithSubRoutes(array &$routesConfiguration) { $mergedRoutesConfiguration = []; foreach ($routesConfiguration as $routeConfiguration) { if (!isset($routeConfiguration['subRoutes'])) { $mergedRoutesConfiguration[] = $routeConfiguration; continue; } $mergedSubRoutesConfiguration = [$routeConfiguration]; foreach ($routeConfiguration['subRoutes'] as $subRouteKey => $subRouteOptions) { if (!isset($subRouteOptions['package'])) { throw new Exception\ParseErrorException(sprintf('Missing package configuration for SubRoute in Route "%s".', (isset($routeConfiguration['name']) ? $routeConfiguration['name'] : 'unnamed Route')), 1318414040); } if (!isset($this->packages[$subRouteOptions['package']])) { throw new Exception\ParseErrorException(sprintf('The SubRoute Package "%s" referenced in Route "%s" is not available.', $subRouteOptions['package'], (isset($routeConfiguration['name']) ? $routeConfiguration['name'] : 'unnamed Route')), 1318414040); } /** @var $package PackageInterface */ $package = $this->packages[$subRouteOptions['package']]; $subRouteFilename = 'Routes'; if (isset($subRouteOptions['suffix'])) { $subRouteFilename .= '.' . $subRouteOptions['suffix']; } $subRouteConfiguration = []; foreach (array_reverse($this->orderedListOfContextNames) as $contextName) { $subRouteFilePathAndName = $package->getConfigurationPath() . $contextName . '/' . $subRouteFilename; $subRouteConfiguration = array_merge($subRouteConfiguration, $this->configurationSource->load($subRouteFilePathAndName)); } $subRouteFilePathAndName = $package->getConfigurationPath() . $subRouteFilename; $subRouteConfiguration = array_merge($subRouteConfiguration, $this->configurationSource->load($subRouteFilePathAndName)); if ($this->subRoutesRecursionLevel > self::MAXIMUM_SUBROUTE_RECURSIONS) { throw new Exception\RecursionException(sprintf('Recursion level of SubRoutes exceed ' . self::MAXIMUM_SUBROUTE_RECURSIONS . ', probably because of a circular reference. Last successfully loaded route configuration is "%s".', $subRouteFilePathAndName), 1361535753); } $this->subRoutesRecursionLevel++; $this->mergeRoutesWithSubRoutes($subRouteConfiguration); $this->subRoutesRecursionLevel--; $mergedSubRoutesConfiguration = $this->buildSubRouteConfigurations($mergedSubRoutesConfiguration, $subRouteConfiguration, $subRouteKey, $subRouteOptions); } $mergedRoutesConfiguration = array_merge($mergedRoutesConfiguration, $mergedSubRoutesConfiguration); } $routesConfiguration = $mergedRoutesConfiguration; } /** * Merges all routes in $routesConfiguration with the sub routes in $subRoutesConfiguration * * @param array $routesConfiguration * @param array $subRoutesConfiguration * @param string $subRouteKey the key of the sub route: <subRouteKey> * @param array $subRouteOptions * @return array the merged route configuration * @throws Exception\ParseErrorException */ protected function buildSubRouteConfigurations(array $routesConfiguration, array $subRoutesConfiguration, $subRouteKey, array $subRouteOptions) { $variables = isset($subRouteOptions['variables']) ? $subRouteOptions['variables'] : []; $mergedSubRoutesConfigurations = []; foreach ($subRoutesConfiguration as $subRouteConfiguration) { foreach ($routesConfiguration as $routeConfiguration) { $mergedSubRouteConfiguration = $subRouteConfiguration; $mergedSubRouteConfiguration['name'] = sprintf('%s :: %s', isset($routeConfiguration['name']) ? $routeConfiguration['name'] : 'Unnamed Route', isset($subRouteConfiguration['name']) ? $subRouteConfiguration['name'] : 'Unnamed Subroute'); $mergedSubRouteConfiguration['name'] = $this->replacePlaceholders($mergedSubRouteConfiguration['name'], $variables); if (!isset($mergedSubRouteConfiguration['uriPattern'])) { throw new Exception\ParseErrorException('No uriPattern defined in route configuration "' . $mergedSubRouteConfiguration['name'] . '".', 1274197615); } if ($mergedSubRouteConfiguration['uriPattern'] !== '') { $mergedSubRouteConfiguration['uriPattern'] = $this->replacePlaceholders($mergedSubRouteConfiguration['uriPattern'], $variables); $mergedSubRouteConfiguration['uriPattern'] = $this->replacePlaceholders($routeConfiguration['uriPattern'], [$subRouteKey => $mergedSubRouteConfiguration['uriPattern']]); } else { $mergedSubRouteConfiguration['uriPattern'] = rtrim($this->replacePlaceholders($routeConfiguration['uriPattern'], [$subRouteKey => '']), '/'); } if (isset($mergedSubRouteConfiguration['defaults'])) { foreach ($mergedSubRouteConfiguration['defaults'] as $key => $defaultValue) { $mergedSubRouteConfiguration['defaults'][$key] = $this->replacePlaceholders($defaultValue, $variables); } } $mergedSubRouteConfiguration = Arrays::arrayMergeRecursiveOverrule($routeConfiguration, $mergedSubRouteConfiguration); unset($mergedSubRouteConfiguration['subRoutes']); $mergedSubRoutesConfigurations[] = $mergedSubRouteConfiguration; } } return $mergedSubRoutesConfigurations; } /** * Merges routes from TYPO3.Flow.mvc.routes settings into $routeDefinitions * NOTE: Routes from settings will always be appended to existing route definitions from the main Routes configuration! * * @param array $routeDefinitions * @return void */ protected function includeSubRoutesFromSettings(&$routeDefinitions) { $routeSettings = $this->getConfiguration(self::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow.mvc.routes'); if ($routeSettings === null) { return; } $sortedRouteSettings = (new PositionalArraySorter($routeSettings))->toArray(); foreach ($sortedRouteSettings as $packageKey => $routeFromSettings) { if ($routeFromSettings === false) { continue; } $subRoutesName = $packageKey . 'SubRoutes'; $subRoutesConfiguration = ['package' => $packageKey]; if (isset($routeFromSettings['variables'])) { $subRoutesConfiguration['variables'] = $routeFromSettings['variables']; } if (isset($routeFromSettings['suffix'])) { $subRoutesConfiguration['suffix'] = $routeFromSettings['suffix']; } $routeDefinitions[] = [ 'name' => $packageKey, 'uriPattern' => '<' . $subRoutesName . '>', 'subRoutes' => [ $subRoutesName => $subRoutesConfiguration ] ]; } } /** * Replaces placeholders in the format <variableName> with the corresponding variable of the specified $variables collection. * * @param string $string * @param array $variables * @return string */ protected function replacePlaceholders($string, array $variables) { foreach ($variables as $variableName => $variableValue) { $string = str_replace('<' . $variableName . '>', $variableValue, $string); } return $string; } /** * Merges two policy configuration arrays. * * @param array $firstConfigurationArray * @param array $secondConfigurationArray * @return array */ protected function mergePolicyConfiguration(array $firstConfigurationArray, array $secondConfigurationArray) { $result = Arrays::arrayMergeRecursiveOverrule($firstConfigurationArray, $secondConfigurationArray); if (!isset($result['roles'])) { return $result; } foreach ($result['roles'] as $roleIdentifier => $roleConfiguration) { if (!isset($firstConfigurationArray['roles'][$roleIdentifier]['privileges']) || !isset($secondConfigurationArray['roles'][$roleIdentifier]['privileges'])) { continue; } $result['roles'][$roleIdentifier]['privileges'] = array_merge($firstConfigurationArray['roles'][$roleIdentifier]['privileges'], $secondConfigurationArray['roles'][$roleIdentifier]['privileges']); } return $result; } /** * Validates the given $policyConfiguration and throws an exception if its not valid * * @param array $policyConfiguration * @param PackageInterface $package * @return void * @throws Exception */ protected function validatePolicyConfiguration(array $policyConfiguration, PackageInterface $package) { $errors = []; if (isset($policyConfiguration['resources'])) { $errors[] = 'deprecated "resources" options'; } if (isset($policyConfiguration['acls'])) { $errors[] = 'deprecated "acls" options'; } if ($errors !== []) { throw new Exception(sprintf('The policy configuration for package "%s" is not valid.%sIt contains following error(s):%s Make sure to run all code migrations.', $package->getPackageKey(), chr(10), chr(10) . ' * ' . implode(chr(10) . ' * ', $errors) . chr(10)), 1415717875); } } }
{ "content_hash": "f8c5c0d59c5b630e98750468ed8586e4", "timestamp": "", "source": "github", "line_count": 886, "max_line_length": 286, "avg_line_length": 47.636568848758465, "alnum_prop": 0.6406198170876178, "repo_name": "mkeitsch/flow-development-collection", "id": "8378be62879b220f83e8b4d138fa4ee6115bfb10", "size": "42489", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "TYPO3.Flow/Classes/TYPO3/Flow/Configuration/ConfigurationManager.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "1976" }, { "name": "Batchfile", "bytes": "804" }, { "name": "CSS", "bytes": "3355" }, { "name": "Cucumber", "bytes": "10599" }, { "name": "HTML", "bytes": "38052" }, { "name": "PHP", "bytes": "8015009" }, { "name": "PLpgSQL", "bytes": "579" }, { "name": "Shell", "bytes": "3987" } ], "symlink_target": "" }
/* @flow */ import { renderSync } from './sass'; import assertions from './assertions'; import normalize from './normalizer'; import path from 'path'; type SassFunc = { called: Function, calledWithArgs: Function }; type SassFuncWrap = (name: string) => SassFunc; export default function func(file: string, assert: ?Assert): SassFuncWrap { return (name: string) => ({ called: called(name, file, assert), calledWithArgs: calledWithArgs(name, file, assert), }); } const call = ({ name, file, args = '' }) => { const data = ` @import '${path.basename(file, '.scss')}' /* #{call('${name}'${args ? ', ' + args : ''})} */ `; return renderSync({ file, data, normalize: normalize(2, -2) }); }; const called = (name: string, file: string, assert: ?Assert) => () => { const result = call({ name, file }); return assertions(result, assert); }; type SassArg = Number | String | Boolean; const calledWithArgs = (name: string, file: string, assert: Assert) => (...args: SassArg[]) => { const result = call({ name, file, args: args.join(',') }); return assertions(result, assert); };
{ "content_hash": "e7854d3e83451134bc864ea40980d82a", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 75, "avg_line_length": 24.48936170212766, "alnum_prop": 0.6038227628149435, "repo_name": "zephraph/sasspec", "id": "2139097eeb084d69dee4131aa67b521001d71fc0", "size": "1151", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/func.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "7128" } ], "symlink_target": "" }
@interface ElizaViewController : DetailsViewController <UITableViewDelegate, SGBubbleTableViewDataSource> @end
{ "content_hash": "6731565c2860048e511c8b0c5a63b104", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 105, "avg_line_length": 37.333333333333336, "alnum_prop": 0.875, "repo_name": "BeamApp/Transit", "id": "2e85c3fee356615f48b329d987a16927b5981122", "size": "503", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "examples/objc-ios/TransitExampleIOS/Eliza/ElizaViewController.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "30712" }, { "name": "CSS", "bytes": "24611" }, { "name": "Java", "bytes": "125598" }, { "name": "JavaScript", "bytes": "269228" }, { "name": "Mercury", "bytes": "18847" }, { "name": "Objective-C", "bytes": "1439854" }, { "name": "Perl", "bytes": "890" }, { "name": "Python", "bytes": "2713" }, { "name": "Ruby", "bytes": "8204" }, { "name": "Shell", "bytes": "38287" }, { "name": "TeX", "bytes": "2704" } ], "symlink_target": "" }
class AddNameToBillingAccount < ActiveRecord::Migration def change add_column :billing_accounts, :name, :string end end
{ "content_hash": "4b1992f848ba123d6713301ba54968b6", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 55, "avg_line_length": 25.6, "alnum_prop": 0.765625, "repo_name": "AlexVangelov/billing", "id": "039822a788953f64d63526830811b98dd6b2865a", "size": "128", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "db/migrate/20140729083050_add_name_to_billing_account.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "683" }, { "name": "HTML", "bytes": "4883" }, { "name": "JavaScript", "bytes": "599" }, { "name": "Ruby", "bytes": "88778" } ], "symlink_target": "" }
Improve overall data quality by validating user input for accuracy and completeness. This page shows how to validate user input in the UI and display useful validation messages using both reactive and template-driven forms. It assumes some basic knowledge of the two forms modules. <div class="alert is-helpful"> If you're new to forms, start by reviewing the [Forms](guide/forms) and [Reactive Forms](guide/reactive-forms) guides. </div> ## Template-driven validation To add validation to a template-driven form, you add the same validation attributes as you would with [native HTML form validation](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation). Angular uses directives to match these attributes with validator functions in the framework. Every time the value of a form control changes, Angular runs validation and generates either a list of validation errors, which results in an INVALID status, or null, which results in a VALID status. You can then inspect the control's state by exporting `ngModel` to a local template variable. The following example exports `NgModel` into a variable called `name`: <code-example path="form-validation/src/app/template/hero-form-template.component.html" region="name-with-error-msg" header="template/hero-form-template.component.html (name)" linenums="false"> </code-example> Note the following: * The `<input>` element carries the HTML validation attributes: `required` and `minlength`. It also carries a custom validator directive, `forbiddenName`. For more information, see [Custom validators](guide/form-validation#custom-validators) section. * `#name="ngModel"` exports `NgModel` into a local variable called `name`. `NgModel` mirrors many of the properties of its underlying `FormControl` instance, so you can use this in the template to check for control states such as `valid` and `dirty`. For a full list of control properties, see the [AbstractControl](api/forms/AbstractControl) API reference. * The `*ngIf` on the `<div>` element reveals a set of nested message `divs` but only if the `name` is invalid and the control is either `dirty` or `touched`. * Each nested `<div>` can present a custom message for one of the possible validation errors. There are messages for `required`, `minlength`, and `forbiddenName`. <div class="alert is-helpful"> #### Why check _dirty_ and _touched_? You may not want your application to display errors before the user has a chance to edit the form. The checks for `dirty` and `touched` prevent errors from showing until the user does one of two things: changes the value, turning the control dirty; or blurs the form control element, setting the control to touched. </div> ## Reactive form validation In a reactive form, the source of truth is the component class. Instead of adding validators through attributes in the template, you add validator functions directly to the form control model in the component class. Angular then calls these functions whenever the value of the control changes. ### Validator functions There are two types of validator functions: sync validators and async validators. * **Sync validators**: functions that take a control instance and immediately return either a set of validation errors or `null`. You can pass these in as the second argument when you instantiate a `FormControl`. * **Async validators**: functions that take a control instance and return a Promise or Observable that later emits a set of validation errors or `null`. You can pass these in as the third argument when you instantiate a `FormControl`. Note: for performance reasons, Angular only runs async validators if all sync validators pass. Each must complete before errors are set. ### Built-in validators You can choose to [write your own validator functions](guide/form-validation#custom-validators), or you can use some of Angular's built-in validators. The same built-in validators that are available as attributes in template-driven forms, such as `required` and `minlength`, are all available to use as functions from the `Validators` class. For a full list of built-in validators, see the [Validators](api/forms/Validators) API reference. To update the hero form to be a reactive form, you can use some of the same built-in validators&mdash;this time, in function form. See below: {@a reactive-component-class} <code-example path="form-validation/src/app/reactive/hero-form-reactive.component.1.ts" region="form-group" header="reactive/hero-form-reactive.component.ts (validator functions)" linenums="false"> </code-example> Note that: * The name control sets up two built-in validators&mdash;`Validators.required` and `Validators.minLength(4)`&mdash;and one custom validator, `forbiddenNameValidator`. For more details see the [Custom validators](guide/form-validation#custom-validators) section in this guide. * As these validators are all sync validators, you pass them in as the second argument. * Support multiple validators by passing the functions in as an array. * This example adds a few getter methods. In a reactive form, you can always access any form control through the `get` method on its parent group, but sometimes it's useful to define getters as shorthands for the template. If you look at the template for the name input again, it is fairly similar to the template-driven example. <code-example path="form-validation/src/app/reactive/hero-form-reactive.component.html" region="name-with-error-msg" header="reactive/hero-form-reactive.component.html (name with error msg)" linenums="false"> </code-example> Key takeaways: * The form no longer exports any directives, and instead uses the `name` getter defined in the component class. * The `required` attribute is still present. While it's not necessary for validation purposes, you may want to keep it in your template for CSS styling or accessibility reasons. ## Custom validators Since the built-in validators won't always match the exact use case of your application, sometimes you'll want to create a custom validator. Consider the `forbiddenNameValidator` function from previous [examples](guide/form-validation#reactive-component-class) in this guide. Here's what the definition of that function looks like: <code-example path="form-validation/src/app/shared/forbidden-name.directive.ts" region="custom-validator" header="shared/forbidden-name.directive.ts (forbiddenNameValidator)" linenums="false"> </code-example> The function is actually a factory that takes a regular expression to detect a _specific_ forbidden name and returns a validator function. In this sample, the forbidden name is "bob", so the validator will reject any hero name containing "bob". Elsewhere it could reject "alice" or any name that the configuring regular expression matches. The `forbiddenNameValidator` factory returns the configured validator function. That function takes an Angular control object and returns _either_ null if the control value is valid _or_ a validation error object. The validation error object typically has a property whose name is the validation key, `'forbiddenName'`, and whose value is an arbitrary dictionary of values that you could insert into an error message, `{name}`. Custom async validators are similar to sync validators, but they must instead return a Promise or Observable that later emits null or a validation error object. In the case of an Observable, the Observable must complete, at which point the form uses the last value emitted for validation. ### Adding to reactive forms In reactive forms, custom validators are fairly simple to add. All you have to do is pass the function directly to the `FormControl`. <code-example path="form-validation/src/app/reactive/hero-form-reactive.component.1.ts" region="custom-validator" header="reactive/hero-form-reactive.component.ts (validator functions)" linenums="false"> </code-example> ### Adding to template-driven forms In template-driven forms, you don't have direct access to the `FormControl` instance, so you can't pass the validator in like you can for reactive forms. Instead, you need to add a directive to the template. The corresponding `ForbiddenValidatorDirective` serves as a wrapper around the `forbiddenNameValidator`. Angular recognizes the directive's role in the validation process because the directive registers itself with the `NG_VALIDATORS` provider, a provider with an extensible collection of validators. <code-example path="form-validation/src/app/shared/forbidden-name.directive.ts" region="directive-providers" header="shared/forbidden-name.directive.ts (providers)" linenums="false"> </code-example> The directive class then implements the `Validator` interface, so that it can easily integrate with Angular forms. Here is the rest of the directive to help you get an idea of how it all comes together: <code-example path="form-validation/src/app/shared/forbidden-name.directive.ts" region="directive" header="shared/forbidden-name.directive.ts (directive)"> </code-example> Once the `ForbiddenValidatorDirective` is ready, you can simply add its selector, `appForbiddenName`, to any input element to activate it. For example: <code-example path="form-validation/src/app/template/hero-form-template.component.html" region="name-input" header="template/hero-form-template.component.html (forbidden-name-input)" linenums="false"> </code-example> <div class="alert is-helpful"> You may have noticed that the custom validation directive is instantiated with `useExisting` rather than `useClass`. The registered validator must be _this instance_ of the `ForbiddenValidatorDirective`&mdash;the instance in the form with its `forbiddenName` property bound to “bob". If you were to replace `useExisting` with `useClass`, then you’d be registering a new class instance, one that doesn’t have a `forbiddenName`. </div> ## Control status CSS classes Like in AngularJS, Angular automatically mirrors many control properties onto the form control element as CSS classes. You can use these classes to style form control elements according to the state of the form. The following classes are currently supported: * `.ng-valid` * `.ng-invalid` * `.ng-pending` * `.ng-pristine` * `.ng-dirty` * `.ng-untouched` * `.ng-touched` The hero form uses the `.ng-valid` and `.ng-invalid` classes to set the color of each form control's border. <code-example path="form-validation/src/assets/forms.css" header="forms.css (status classes)"> </code-example> ## Cross field validation This section shows how to perform cross field validation. It assumes some basic knowledge of creating custom validators. <div class="alert is-helpful"> If you haven't created custom validators before, start by reviewing the [custom validators section](guide/form-validation#custom-validators). </div> In the following section, we will make sure that our heroes do not reveal their true identities by filling out the Hero Form. We will do that by validating that the hero names and alter egos do not match. ### Adding to reactive forms The form has the following structure: ```javascript const heroForm = new FormGroup({ 'name': new FormControl(), 'alterEgo': new FormControl(), 'power': new FormControl() }); ``` Notice that the name and alterEgo are sibling controls. To evaluate both controls in a single custom validator, we should perform the validation in a common ancestor control: the `FormGroup`. That way, we can query the `FormGroup` for the child controls which will allow us to compare their values. To add a validator to the `FormGroup`, pass the new validator in as the second argument on creation. ```javascript const heroForm = new FormGroup({ 'name': new FormControl(), 'alterEgo': new FormControl(), 'power': new FormControl() }, { validators: identityRevealedValidator }); ``` The validator code is as follows: <code-example path="form-validation/src/app/shared/identity-revealed.directive.ts" region="cross-validation-validator" header="shared/identity-revealed.directive.ts" linenums="false"> </code-example> The identity validator implements the `ValidatorFn` interface. It takes an Angular control object as an argument and returns either null if the form is valid, or `ValidationErrors` otherwise. First we retrieve the child controls by calling the `FormGroup`'s [get](api/forms/AbstractControl#get) method. Then we simply compare the values of the `name` and `alterEgo` controls. If the values do not match, the hero's identity remains secret, and we can safely return null. Otherwise, the hero's identity is revealed and we must mark the form as invalid by returning an error object. Next, to provide better user experience, we show an appropriate error message when the form is invalid. <code-example path="form-validation/src/app/reactive/hero-form-reactive.component.html" region="cross-validation-error-message" header="reactive/hero-form-template.component.html" linenums="false"> </code-example> Note that we check if: - the `FormGroup` has the cross validation error returned by the `identityRevealed` validator, - the user is yet to [interact](guide/form-validation#why-check-dirty-and-touched) with the form. ### Adding to template driven forms First we must create a directive that will wrap the validator function. We provide it as the validator using the `NG_VALIDATORS` token. If you are not sure why, or you do not fully understand the syntax, revisit the previous [section](guide/form-validation#adding-to-template-driven-forms). <code-example path="form-validation/src/app/shared/identity-revealed.directive.ts" region="cross-validation-directive" header="shared/identity-revealed.directive.ts" linenums="false"> </code-example> Next, we have to add the directive to the html template. Since the validator must be registered at the highest level in the form, we put the directive on the `form` tag. <code-example path="form-validation/src/app/template/hero-form-template.component.html" region="cross-validation-register-validator" header="template/hero-form-template.component.html" linenums="false"> </code-example> To provide better user experience, we show an appropriate error message when the form is invalid. <code-example path="form-validation/src/app/template/hero-form-template.component.html" region="cross-validation-error-message" header="template/hero-form-template.component.html" linenums="false"> </code-example> Note that we check if: - the form has the cross validation error returned by the `identityRevealed` validator, - the user is yet to [interact](guide/form-validation#why-check-dirty-and-touched) with the form. This completes the cross validation example. We managed to: - validate the form based on the values of two sibling controls, - show a descriptive error message after the user interacted with the form and the validation failed. ## Async Validation This section shows how to create asynchronous validators. It assumes some basic knowledge of creating [custom validators](guide/form-validation#custom-validators). ### The Basics Just like synchronous validators have the `ValidatorFn` and `Validator` interfaces, asynchronous validators have their own counterparts: `AsyncValidatorFn` and `AsyncValidator`. They are very similar with the only difference being: * They must return a Promise or an Observable, * The observable returned must be finite, meaning it must complete at some point. To convert an infinite observable into a finite one, pipe the observable through a filtering operator such as `first`, `last`, `take`, or `takeUntil`. It is important to note that the asynchronous validation happens after the synchronous validation, and is performed only if the synchronous validation is successful. This check allows forms to avoid potentially expensive async validation processes such as an HTTP request if more basic validation methods fail. After asynchronous validation begins, the form control enters a `pending` state. You can inspect the control's `pending` property and use it to give visual feedback about the ongoing validation. A common UI pattern is to show a spinner while the async validation is being performed. The following example presents how to achieve this with template-driven forms: ```html <input [(ngModel)]="name" #model="ngModel" appSomeAsyncValidator> <app-spinner *ngIf="model.pending"></app-spinner> ``` ### Implementing Custom Async Validator In the following section, validation is performed asynchronously to ensure that our heroes pick an alter ego that is not already taken. New heroes are constantly enlisting and old heroes are leaving the service. That means that we do not have the list of available alter egos ahead of time. To validate the potential alter ego, we need to consult a central database of all currently enlisted heroes. The process is asynchronous, so we need a special validator for that. Let's start by creating the validator class. <code-example path="form-validation/src/app/shared/alter-ego.directive.ts" region="async-validator" linenums="false"></code-example> As you can see, the `UniqueAlterEgoValidator` class implements the `AsyncValidator` interface. In the constructor, we inject the `HeroesService` that has the following interface: ```typescript interface HeroesService { isAlterEgoTaken: (alterEgo: string) => Observable<boolean>; } ``` In a real world application, the `HeroesService` is responsible for making an HTTP request to the hero database to check if the alter ego is available. From the validator's point of view, the actual implementation of the service is not important, so we can just code against the `HeroesService` interface. As the validation begins, the `UniqueAlterEgoValidator` delegates to the `HeroesService` `isAlterEgoTaken()` method with the current control value. At this point the control is marked as `pending` and remains in this state until the observable chain returned from the `validate()` method completes. The `isAlterEgoTaken()` method dispatches an HTTP request that checks if the alter ego is available, and returns `Observable<boolean>` as the result. We pipe the response through the `map` operator and transform it into a validation result. As always, we return `null` if the form is valid, and `ValidationErrors` if it is not. We make sure to handle any potential errors with the `catchError` operator. Here we decided that `isAlterEgoTaken()` error is treated as a successful validation, because failure to make a validation request does not necessarily mean that the alter ego is invalid. You could handle the error differently and return the `ValidationError` object instead. After some time passes, the observable chain completes and the async validation is done. The `pending` flag is set to `false`, and the form validity is updated. ### Note on performance By default, all validators are run after every form value change. With synchronous validators, this will not likely have a noticeable impact on application performance. However, it's common for async validators to perform some kind of HTTP request to validate the control. Dispatching an HTTP request after every keystroke could put a strain on the backend API, and should be avoided if possible. We can delay updating the form validity by changing the `updateOn` property from `change` (default) to `submit` or `blur`. With template-driven forms: ```html <input [(ngModel)]="name" [ngModelOptions]="{updateOn: 'blur'}"> ``` With reactive forms: ```typescript new FormControl('', {updateOn: 'blur'}); ``` **You can run the <live-example></live-example> to see the complete reactive and template-driven example code.**
{ "content_hash": "c21bdca557a6539dbf7de9b4bb8f0d0a", "timestamp": "", "source": "github", "line_count": 349, "max_line_length": 403, "avg_line_length": 56.429799426934096, "alnum_prop": 0.7861785315324464, "repo_name": "IgorMinar/angular", "id": "2f364d5e34fb9f043b510c3fec9b0e0f556aa3c3", "size": "19722", "binary": false, "copies": "8", "ref": "refs/heads/master", "path": "aio/content/guide/form-validation.md", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "493" }, { "name": "CSS", "bytes": "338993" }, { "name": "Dockerfile", "bytes": "14627" }, { "name": "HTML", "bytes": "332398" }, { "name": "JSONiq", "bytes": "619" }, { "name": "JavaScript", "bytes": "803881" }, { "name": "PHP", "bytes": "7222" }, { "name": "PowerShell", "bytes": "4229" }, { "name": "Python", "bytes": "335234" }, { "name": "Shell", "bytes": "70110" }, { "name": "TypeScript", "bytes": "17532572" } ], "symlink_target": "" }
package com.sots.util.registries; import java.util.ArrayList; import java.util.List; import com.sots.pipe.BlockGenericPipe; import com.sots.pipe.NetworkCore; import com.sots.pipe.PipeBasic; import com.sots.pipe.PipeBlocking; import com.sots.pipe.PipeChassisMkI; import com.sots.pipe.PipeRouted; import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.GameRegistry; public class PipeRegistry { public static List<BlockGenericPipe> registry = new ArrayList<BlockGenericPipe>(); public static BlockGenericPipe network_core; public static BlockGenericPipe pipe_basic; public static BlockGenericPipe pipe_routed; public static BlockGenericPipe pipe_blocking; public static BlockGenericPipe pipe_chassis_mki; public static void init() { network_core = new NetworkCore(); pipe_basic = new PipeBasic(); pipe_routed = new PipeRouted(); pipe_blocking = new PipeBlocking(); pipe_chassis_mki = new PipeChassisMkI(); registry.add(network_core); registry.add(pipe_basic); registry.add(pipe_routed); registry.add(pipe_blocking); registry.add(pipe_chassis_mki); for(BlockGenericPipe pipe : registry) { GameRegistry.register(pipe); GameRegistry.register(new ItemBlock(pipe), pipe.getRegistryName()); } } public static void initModels() { for(BlockGenericPipe pipe : registry) { pipe.initModel(); } } }
{ "content_hash": "ed10cf05b438ac7084e7ff3c15f2144e", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 83, "avg_line_length": 25.74074074074074, "alnum_prop": 0.7561151079136691, "repo_name": "Bitterholz/LP2", "id": "f41edead3ab07a431484068094b5c0f61afd2443", "size": "1390", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/sots/util/registries/PipeRegistry.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "211143" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Text; namespace WebApiContribTests.Helpers { public class DeepComparer { public static IEnumerable<string> Compare<T>(T a, T b) { var errors = new List<string>(); RecursiveCompare(string.Empty, a, b, errors); return errors; } private static void RecursiveCompare(string name, object a, object b, List<string> errors) { if(name.Split('.').Count()>=10) return; if(a == b) return; if(a ==null) { errors.AddError(name, "null", b); return; } else if(b==null) { errors.AddError(name, a, "null"); return; } if(a.Equals(b)) return; if (a.GetType() != b.GetType()) throw new InvalidOperationException("Comparing objects with different type"); var type = a.GetType(); if(type.IsValueType && a is IConvertible) { RecursiveCompare(name, Convert.ChangeType(a, typeof(string)), Convert.ChangeType(b, typeof(string)), errors); return; } if(type==typeof(string)) { errors.AddError(name, a, b); return; } if(type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) { CompareNullableTypeValues(type.GetGenericArguments()[0], name, a, b, errors); return; } int propCount = 0; foreach (var propertyInfo in type.GetProperties( BindingFlags.Public | BindingFlags.Instance)) { var methodInfo = propertyInfo.GetGetMethod(); if(methodInfo.GetParameters().Length==0) RecursiveCompare(name +"." + propertyInfo.Name, methodInfo.Invoke(a, null), methodInfo.Invoke(b, null), errors ); propCount++; } if(propCount==0) errors.AddError(name, a, b); } private static void CompareNullableTypeValues(Type type, string name, object a, object b, List<string> errors) { var methodInfo = typeof(Nullable<>).GetProperty("Value") .GetGetMethod().MakeGenericMethod(type); RecursiveCompare(name, methodInfo.Invoke(a, null), methodInfo.Invoke(b, null), errors); } private static bool IsPrimitive(Type t) { return t == typeof (string) || t == typeof (float) || t == typeof (byte) || t == typeof (Int16) || t == typeof (Int32) || t == typeof (Int64) || t == typeof (double) || t == typeof (decimal) || t == typeof (DateTime) || t == typeof (DateTimeOffset) || t == typeof (bool) || t == typeof (char); } } public static class ListOfStringExtensions { public static void AddError(this List<string> list, string name, object a, object b) { list.Add(string.Format("{0} -> a:{1} b:{2}", name, a, b)); } } }
{ "content_hash": "9655ec5d585909b8574bb6fa8f588263", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 112, "avg_line_length": 23.358333333333334, "alnum_prop": 0.6154120585087406, "repo_name": "modulexcite/WebAPIContrib", "id": "432fc6500811cddfaf270a5729ac58cd7c6213e2", "size": "2805", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "test/WebApiContribTests/Helpers/DeepComparer.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "294" }, { "name": "C#", "bytes": "169112" }, { "name": "F#", "bytes": "7646" }, { "name": "Shell", "bytes": "861" } ], "symlink_target": "" }
<?php namespace Zen\ApiBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class ZenApiBundle extends Bundle { }
{ "content_hash": "969bc4f076c8d942b265657b060bfd94", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 47, "avg_line_length": 13.333333333333334, "alnum_prop": 0.7916666666666666, "repo_name": "dumblob/zen-server-app", "id": "15353737eabdaa812366c8aeba34cb9c970ce8ba", "size": "120", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Zen/ApiBundle/ZenApiBundle.php", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
from __future__ import absolute_import from ..client import MultiClient from ..shell import MultiShell class MultiCinder(MultiClient): def __init__(self): super(MultiCinder, self).__init__() self.default_executable = 'cinder' self.prefix_list += ["cinder_", "cinderclient_"] def main_client(): multistack_shell = MultiShell(MultiCinder) multistack_shell.run_client()
{ "content_hash": "475e5cbebce27d2e192c5e8258932d82", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 56, "avg_line_length": 24.058823529411764, "alnum_prop": 0.6748166259168704, "repo_name": "testeddoughnut/multistack", "id": "808f91c4c021a394fccdc960aca2389425bf7f6b", "size": "1034", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "multistack/clients/cinder.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Python", "bytes": "37138" } ], "symlink_target": "" }
/* * Do not modify this file. This file is generated from the elasticache-2015-02-02.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.ElastiCache.Model { /// <summary> /// Represents the output of one of the following actions: /// /// <ul> <li> <i>ModifyCacheParameterGroup</i> </li> <li> <i>ResetCacheParameterGroup</i> /// </li> </ul> /// </summary> public partial class ResetCacheParameterGroupResponse : AmazonWebServiceResponse { private string _cacheParameterGroupName; /// <summary> /// Gets and sets the property CacheParameterGroupName. /// <para> /// The name of the cache parameter group. /// </para> /// </summary> public string CacheParameterGroupName { get { return this._cacheParameterGroupName; } set { this._cacheParameterGroupName = value; } } // Check to see if CacheParameterGroupName property is set internal bool IsSetCacheParameterGroupName() { return this._cacheParameterGroupName != null; } } }
{ "content_hash": "ab8b9c074d5433b60021444786a051fa", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 109, "avg_line_length": 27.869565217391305, "alnum_prop": 0.6388455538221529, "repo_name": "mwilliamson-firefly/aws-sdk-net", "id": "4156097a2f999fb46778013830378c78200007ea", "size": "1869", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "sdk/src/Services/ElastiCache/Generated/Model/ResetCacheParameterGroupResponse.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "73553647" }, { "name": "CSS", "bytes": "18119" }, { "name": "HTML", "bytes": "24362" }, { "name": "JavaScript", "bytes": "6576" }, { "name": "PowerShell", "bytes": "12587" }, { "name": "XSLT", "bytes": "7010" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2005-2014 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <data xmlns="ns:workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ns:workflow resource:WorkflowData"> <ruleTemplates xmlns="ns:workflow/RuleTemplate" xsi:schemaLocation="ns:workflow/RuleTemplate resource:RuleTemplate"> <ruleTemplate> <name>KualiAccountTemplate</name> <description>Kuali Account Template</description> <attributes> <attribute> <name>KualiAccountAttribute</name> <required>true</required> </attribute> </attributes> </ruleTemplate> <ruleTemplate> <name>KualiChartTemplate</name> <description>KualiChartTemplate</description> <attributes> <attribute> <name>KualiChartAttribute</name> <required>false</required> </attribute> </attributes> </ruleTemplate> <ruleTemplate allowOverwrite="true"> <name>KualiOrgReviewTemplate</name> <description>Kuali Org Review Template</description> <attributes> <attribute> <name>KualiOrgReviewAttribute</name> <required>true</required> </attribute> </attributes> </ruleTemplate> <ruleTemplate> <name>TestKualiTemplate</name> <description>Test Kuali Template</description> <delegationTemplate>KualiChartTemplate</delegationTemplate> <attributes> <attribute> <name>KualiAccountAttribute</name> <required>false</required> </attribute> </attributes> </ruleTemplate> </ruleTemplates> </data>
{ "content_hash": "e94414ec63f418587f9cfc7443226b14", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 85, "avg_line_length": 31.704225352112676, "alnum_prop": 0.669035984007108, "repo_name": "ricepanda/rice-git2", "id": "2a6e7adf0b8245f033c7244365d1ca29c1726fde", "size": "2251", "binary": false, "copies": "23", "ref": "refs/heads/master", "path": "rice-middleware/it/kew/src/test/resources/org/kuali/rice/kew/batch/data/RuleTemplateContent.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "800079" }, { "name": "Groovy", "bytes": "2237959" }, { "name": "Java", "bytes": "35408880" }, { "name": "JavaScript", "bytes": "2665736" }, { "name": "PHP", "bytes": "15766" }, { "name": "Shell", "bytes": "13217" }, { "name": "XSLT", "bytes": "107818" } ], "symlink_target": "" }
package data import _ "embed" // Mark this file as using embeds. // DOS33masterDSK is a DOS 3.3 Master Disk image. //go:embed disks/dos33master.dsk var DOS33masterDSK []byte // DOS33masterWOZ is a DOS 3.3 Master Disk, as a .woz file. //go:embed disks/dos33master.woz var DOS33masterWOZ []byte // ProDOS242PO is John Brooks' update to ProDOS. // Website: https://prodos8.com // Announcements: https://www.callapple.org/author/jbrooks/ //go:embed disks/ProDOS_2_4_2.po var ProDOS242PO []byte // ProDOSNewBootSector0 is the new ProDOS sector 0, used on and after the IIGS System 4.0. Understands sparse PRODOS.SYSTEM files. //go:embed boot/prodos-new-boot0.bin var ProDOSNewBootSector0 []byte // ProDOSOldBootSector0 is the old ProDOS sector 0, used before the IIGS System 4.0 system disk. //go:embed boot/prodos-old-boot0.bin var ProDOSOldBootSector0 []byte
{ "content_hash": "fe956c0087a5e0e62829d8b9716ac705", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 130, "avg_line_length": 34.48, "alnum_prop": 0.7610208816705336, "repo_name": "zellyn/diskii", "id": "1db16d4539a15d0cc8032ea1cab96417687d935b", "size": "917", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "data/data.go", "mode": "33188", "license": "mit", "language": [ { "name": "Go", "bytes": "164109" }, { "name": "Shell", "bytes": "204" } ], "symlink_target": "" }
<template name="ModalQueueEdit"> <div class="modal-queue-edit modal"> <div class="modal-dialog animated fadeInUp"> <div class="modal-content"> <!-- Modal Header --> <div class="modal-header"> <h4 class="modal-title">Edit Queue</h4> <button type="button" class="close" data-dismiss="modal"> <i class="material-icons">close</i> </button> </div> <!-- Modal Body --> <div class="modal-body"> <form id="js-modal-queue-edit-form"> <div class="row"> <!-- Course --> <div class="form-group col-md-4"> <label for="courseId">Course</label> <select name="courseId" class="form-control" disabled> <option value="{{queue.course._id}}" selected>{{queue.course.name}}</option> </select> </div> <!-- Name --> <div class="form-group col-md-8 pl-md-0"> <label for="name">Name</label> <input type="text" name="name" value="{{queue.name}}" class="form-control"> </div> </div> <div class="row"> <!-- Location --> <div class="form-group col-md-8"> <label for="locationId">Location</label> <select name="locationId" class="form-control"> {{#each location in locations}} <option value="{{location._id}}" selected={{isCurrentLocation queue location}}>{{location.name}}</option> {{/each}} </select> </div> <!-- End Time --> <div class="form-group col-md-4 pl-md-0"> <label for="endTime">End Time</label> <select name="endTime" class="form-control"> {{#each time in queueEndTimes}} <option value="{{time.ISOString}}" selected={{isCurrentEndTime queue time}}>{{time.formattedString}}</option> {{/each}} </select> </div> </div> </form> </div> <!-- Modal Footer --> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="submit" form="js-modal-queue-edit-form" class="btn btn-primary">Save</button> </div> </div> </div> </div> </template>
{ "content_hash": "2ced117b51c2af3f43dbaafaf27ed6e9", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 129, "avg_line_length": 38.828125, "alnum_prop": 0.48370221327967805, "repo_name": "signmeup/signmeup", "id": "f3ad36ee645911117990b6ec31944f093626cd29", "size": "2485", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "imports/ui/components/modals/modal-queue-edit/modal-queue-edit.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "8320" }, { "name": "HTML", "bytes": "52721" }, { "name": "JavaScript", "bytes": "138769" } ], "symlink_target": "" }
// // Copyright (C) 2003-2015 Rational Discovery LLC // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <RDGeneral/export.h> #ifndef _RD_GASTEIGERPARAMS_H #define _RD_GASTEIGERPARAMS_H #include <RDGeneral/types.h> #include <RDGeneral/Exceptions.h> #include <string> #include <map> namespace RDKit { extern std::string paramData; extern std::string additionalParamData; // this is a constant used during the iteration procedure for the hydrogen atoms // for the remaining atoms it is computed on the fly const double IONXH = 20.02; const double DAMP_SCALE = 0.5; const double DAMP = 0.5; class RDKIT_PARTIALCHARGES_EXPORT GasteigerParams { /* \brief Container for all the partial charge parameters * * It is filled by the paramData string defined in GasteigerParams.cpp * The main data member is a STL map that take a pair<std::string, *std::string> * of element name and mode (hybridization or bonding mode) and return a *vector * of three parameters, used in the iterative partial charges equalization *procedure */ public: static const GasteigerParams *getParams(const std::string &paramData = ""); ~GasteigerParams() { d_paramMap.clear(); } DOUBLE_VECT getParams(std::string elem, std::string mode, bool throwOnFailure = false) const { std::pair<std::string, std::string> query(elem, mode); std::map<std::pair<std::string, std::string>, DOUBLE_VECT>::const_iterator iter; iter = d_paramMap.find(query); if (iter != d_paramMap.end()) { return iter->second; } else { if (throwOnFailure) { std::string message = "ERROR: No Gasteiger Partial Charge parameters for Element: "; message += elem; message += " Mode: "; message += mode; throw ValueErrorException(message); } else { iter = d_paramMap.find(std::make_pair(std::string("X"), std::string("*"))); if (iter != d_paramMap.end()) { return iter->second; } else { std::string message = "ERROR: Default Gasteiger Partial Charge parameters are missing"; throw ValueErrorException(message); } } } } GasteigerParams(std::string paramData = ""); private: std::map<std::pair<std::string, std::string>, DOUBLE_VECT> d_paramMap; static class GasteigerParams *ds_instance; }; }; // namespace RDKit #endif
{ "content_hash": "38403ca396c7c381a4d5c44e6d0491f3", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 80, "avg_line_length": 30.372093023255815, "alnum_prop": 0.6550535987748851, "repo_name": "greglandrum/rdkit", "id": "42b6cac2ccbc9976d16e148fe2f9aa5ed90cbca3", "size": "2612", "binary": false, "copies": "7", "ref": "refs/heads/master", "path": "Code/GraphMol/PartialCharges/GasteigerParams.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "1591813" }, { "name": "C#", "bytes": "10167" }, { "name": "C++", "bytes": "13785283" }, { "name": "CMake", "bytes": "761568" }, { "name": "Dockerfile", "bytes": "2590" }, { "name": "Fortran", "bytes": "7590" }, { "name": "HTML", "bytes": "43059667" }, { "name": "Java", "bytes": "364206" }, { "name": "JavaScript", "bytes": "51591" }, { "name": "Jupyter Notebook", "bytes": "498341" }, { "name": "LLVM", "bytes": "40048" }, { "name": "Lex", "bytes": "4508" }, { "name": "Makefile", "bytes": "10851" }, { "name": "Python", "bytes": "4155754" }, { "name": "QMake", "bytes": "389" }, { "name": "SMT", "bytes": "3010" }, { "name": "SWIG", "bytes": "341305" }, { "name": "Shell", "bytes": "3822" }, { "name": "Smarty", "bytes": "5864" }, { "name": "Yacc", "bytes": "61432" } ], "symlink_target": "" }
var PopularityBarManager = cc.Class.extend({ ctor: function (popularityBar, popularity, largestPopularity) { this.popularityBar = popularityBar; this.popularity = popularity; this.largestPopularity = largestPopularity; }, getTargetPercent: function () { if (this.largestPopularity > 0) { return Math.abs(this.popularity) / this.largestPopularity * 100; } else { return 0; } }, isFinished: function () { return this.popularityBar.getPercent() >= this.getTargetPercent(); }, isPositive: function () { return this.popularity > 0; }, increasePercent: function () { var newPercent = this.popularityBar.getPercent() + PopularityBarManager.INCREMENT; this.popularityBar.setPercent(Math.min(newPercent, this.getTargetPercent())); }, }); PopularityBarManager.INCREMENT = 3;
{ "content_hash": "a80c23139f8571f4e4ddf9f60ad74e9f", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 90, "avg_line_length": 30.433333333333334, "alnum_prop": 0.6418400876232202, "repo_name": "AI-comp/SamurAICoding2014", "id": "c8cee3dad44a232b3e0dee178da54395ef0721c4", "size": "913", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "client/replayer/src/popularityBarManager.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "143" }, { "name": "C++", "bytes": "1353" }, { "name": "CSS", "bytes": "104" }, { "name": "HTML", "bytes": "2517" }, { "name": "Java", "bytes": "2019" }, { "name": "JavaScript", "bytes": "3656678" }, { "name": "PHP", "bytes": "2852" }, { "name": "Python", "bytes": "1812" }, { "name": "Scala", "bytes": "1827" }, { "name": "Shell", "bytes": "1194" } ], "symlink_target": "" }
/*! \file binary.hpp \brief Binary input and output archives */ /* Copyright (c) 2014, Randolph Voorhies, Shane Grant All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of cereal nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RANDOLPH VOORHIES OR SHANE GRANT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CEREAL_ARCHIVES_PORTABLE_BINARY_HPP_ #define CEREAL_ARCHIVES_PORTABLE_BINARY_HPP_ #include <cereal/cereal.hpp> #include <sstream> #include <limits> namespace cereal { namespace portable_binary_detail { //! Returns true if the current machine is little endian /*! @ingroup Internal */ inline bool is_little_endian() { static std::int32_t test = 1; return *reinterpret_cast<std::int8_t*>( &test ) == 1; } //! Swaps the order of bytes for some chunk of memory /*! @param data The data as a uint8_t pointer @tparam DataSize The true size of the data @ingroup Internal */ template <std::size_t DataSize> inline void swap_bytes( std::uint8_t * data ) { for( std::size_t i = 0, end = DataSize / 2; i < end; ++i ) std::swap( data[i], data[DataSize - i - 1] ); } } // end namespace portable_binary_detail // ###################################################################### //! An output archive designed to save data in a compact binary representation portable over different architectures /*! This archive outputs data to a stream in an extremely compact binary representation with as little extra metadata as possible. This archive will record the endianness of the data as well as the desired in/out endianness and assuming that the user takes care of ensuring serialized types are the same size across machines, is portable over different architectures. When using a binary archive and a file stream, you must use the std::ios::binary format flag to avoid having your data altered inadvertently. \warning This archive has not been thoroughly tested across different architectures. Please report any issues, optimizations, or feature requests at <a href="www.github.com/USCiLab/cereal">the project github</a>. \ingroup Archives */ class PortableBinaryOutputArchive : public OutputArchive<PortableBinaryOutputArchive, AllowEmptyClassElision> { public: //! A class containing various advanced options for the PortableBinaryOutput archive class Options { public: //! Represents desired endianness enum class Endianness : std::uint8_t { big, little }; //! Default options, preserve system endianness static Options Default(){ return Options(); } //! Save as little endian static Options LittleEndian(){ return Options( Endianness::little ); } //! Save as big endian static Options BigEndian(){ return Options( Endianness::big ); } //! Specify specific options for the PortableBinaryOutputArchive /*! @param outputEndian The desired endianness of saved (output) data */ explicit Options( Endianness outputEndian = getEndianness() ) : itsOutputEndianness( outputEndian ) { } private: //! Gets the endianness of the system inline static Endianness getEndianness() { return portable_binary_detail::is_little_endian() ? Endianness::little : Endianness::big; } //! Checks if Options is set for little endian inline bool is_little_endian() const { return itsOutputEndianness == Endianness::little; } friend class PortableBinaryOutputArchive; Endianness itsOutputEndianness; }; //! Construct, outputting to the provided stream /*! @param stream The stream to output to. Should be opened with std::ios::binary flag. @param options The PortableBinary specific options to use. See the Options struct for the values of default parameters */ PortableBinaryOutputArchive(std::ostream & stream, Options const & options = Options::Default()) : OutputArchive<PortableBinaryOutputArchive, AllowEmptyClassElision>(this), itsStream(stream), itsConvertEndianness( portable_binary_detail::is_little_endian() ^ options.is_little_endian() ) { this->operator()( options.is_little_endian() ); } //! Writes size bytes of data to the output stream template <std::size_t DataSize> inline void saveBinary( const void * data, std::size_t size ) { std::size_t writtenSize = 0; if( itsConvertEndianness ) for( std::size_t i = 0; i < DataSize; ++i ) writtenSize += static_cast<std::size_t>( itsStream.rdbuf()->sputn( reinterpret_cast<const char*>( data ) + DataSize - i - 1, 1 ) ); else writtenSize = static_cast<std::size_t>( itsStream.rdbuf()->sputn( reinterpret_cast<const char*>( data ), size ) ); if(writtenSize != size) throw Exception("Failed to write " + std::to_string(size) + " bytes to output stream! Wrote " + std::to_string(writtenSize)); } private: std::ostream & itsStream; const bool itsConvertEndianness; //!< If set to true, we will need to swap bytes upon saving }; // ###################################################################### //! An input archive designed to load data saved using PortableBinaryOutputArchive /*! This archive outputs data to a stream in an extremely compact binary representation with as little extra metadata as possible. This archive will load the endianness of the serialized data and if necessary transform it to match that of the local machine. This comes at a significant performance cost compared to non portable archives if the transformation is necessary, and also causes a small performance hit even if it is not necessary. It is recommended to use portable archives only if you know that you will be sending binary data to machines with different endianness. The archive will do nothing to ensure types are the same size - that is the responsibility of the user. When using a binary archive and a file stream, you must use the std::ios::binary format flag to avoid having your data altered inadvertently. \warning This archive has not been thoroughly tested across different architectures. Please report any issues, optimizations, or feature requests at <a href="www.github.com/USCiLab/cereal">the project github</a>. \ingroup Archives */ class PortableBinaryInputArchive : public InputArchive<PortableBinaryInputArchive, AllowEmptyClassElision> { public: //! A class containing various advanced options for the PortableBinaryInput archive class Options { public: //! Represents desired endianness enum class Endianness : std::uint8_t { big, little }; //! Default options, preserve system endianness static Options Default(){ return Options(); } //! Load into little endian static Options LittleEndian(){ return Options( Endianness::little ); } //! Load into big endian static Options BigEndian(){ return Options( Endianness::big ); } //! Specify specific options for the PortableBinaryInputArchive /*! @param inputEndian The desired endianness of loaded (input) data */ explicit Options( Endianness inputEndian = getEndianness() ) : itsInputEndianness( inputEndian ) { } private: //! Gets the endianness of the system inline static Endianness getEndianness() { return portable_binary_detail::is_little_endian() ? Endianness::little : Endianness::big; } //! Checks if Options is set for little endian inline bool is_little_endian() const { return itsInputEndianness == Endianness::little; } friend class PortableBinaryInputArchive; Endianness itsInputEndianness; }; //! Construct, loading from the provided stream /*! @param stream The stream to read from. Should be opened with std::ios::binary flag. @param options The PortableBinary specific options to use. See the Options struct for the values of default parameters */ PortableBinaryInputArchive(std::istream & stream, Options const & options = Options::Default()) : InputArchive<PortableBinaryInputArchive, AllowEmptyClassElision>(this), itsStream(stream), itsConvertEndianness( false ) { bool streamLittleEndian; this->operator()( streamLittleEndian ); itsConvertEndianness = options.is_little_endian() ^ streamLittleEndian; } //! Reads size bytes of data from the input stream /*! @param data The data to save @param size The number of bytes in the data @tparam DataSize T The size of the actual type of the data elements being loaded */ template <std::size_t DataSize> inline void loadBinary( void * const data, std::size_t size ) { // load data auto const readSize = static_cast<std::size_t>( itsStream.rdbuf()->sgetn( reinterpret_cast<char*>( data ), size ) ); if(readSize != size) throw Exception("Failed to read " + std::to_string(size) + " bytes from input stream! Read " + std::to_string(readSize)); // flip bits if needed if( itsConvertEndianness ) { std::uint8_t * ptr = reinterpret_cast<std::uint8_t*>( data ); for( std::size_t i = 0; i < size; i += DataSize ) portable_binary_detail::swap_bytes<DataSize>( ptr ); } } private: std::istream & itsStream; bool itsConvertEndianness; //!< If set to true, we will need to swap bytes upon loading }; // ###################################################################### // Common BinaryArchive serialization functions //! Saving for POD types to portable binary template<class T> inline typename std::enable_if<std::is_arithmetic<T>::value, void>::type CEREAL_SAVE_FUNCTION_NAME(PortableBinaryOutputArchive & ar, T const & t) { static_assert( !std::is_floating_point<T>::value || (std::is_floating_point<T>::value && std::numeric_limits<T>::is_iec559), "Portable binary only supports IEEE 754 standardized floating point" ); ar.template saveBinary<sizeof(T)>(std::addressof(t), sizeof(t)); } //! Loading for POD types from portable binary template<class T> inline typename std::enable_if<std::is_arithmetic<T>::value, void>::type CEREAL_LOAD_FUNCTION_NAME(PortableBinaryInputArchive & ar, T & t) { static_assert( !std::is_floating_point<T>::value || (std::is_floating_point<T>::value && std::numeric_limits<T>::is_iec559), "Portable binary only supports IEEE 754 standardized floating point" ); ar.template loadBinary<sizeof(T)>(std::addressof(t), sizeof(t)); } //! Serializing NVP types to portable binary template <class Archive, class T> inline CEREAL_ARCHIVE_RESTRICT(PortableBinaryInputArchive, PortableBinaryOutputArchive) CEREAL_SERIALIZE_FUNCTION_NAME( Archive & ar, NameValuePair<T> & t ) { ar( t.value ); } //! Serializing SizeTags to portable binary template <class Archive, class T> inline CEREAL_ARCHIVE_RESTRICT(PortableBinaryInputArchive, PortableBinaryOutputArchive) CEREAL_SERIALIZE_FUNCTION_NAME( Archive & ar, SizeTag<T> & t ) { ar( t.size ); } //! Saving binary data to portable binary template <class T> inline void CEREAL_SAVE_FUNCTION_NAME(PortableBinaryOutputArchive & ar, BinaryData<T> const & bd) { typedef typename std::remove_pointer<T>::type TT; static_assert( !std::is_floating_point<TT>::value || (std::is_floating_point<TT>::value && std::numeric_limits<TT>::is_iec559), "Portable binary only supports IEEE 754 standardized floating point" ); ar.template saveBinary<sizeof(TT)>( bd.data, static_cast<std::size_t>( bd.size ) ); } //! Loading binary data from portable binary template <class T> inline void CEREAL_LOAD_FUNCTION_NAME(PortableBinaryInputArchive & ar, BinaryData<T> & bd) { typedef typename std::remove_pointer<T>::type TT; static_assert( !std::is_floating_point<TT>::value || (std::is_floating_point<TT>::value && std::numeric_limits<TT>::is_iec559), "Portable binary only supports IEEE 754 standardized floating point" ); ar.template loadBinary<sizeof(TT)>( bd.data, static_cast<std::size_t>( bd.size ) ); } } // namespace cereal // register archives for polymorphic support CEREAL_REGISTER_ARCHIVE(cereal::PortableBinaryOutputArchive) CEREAL_REGISTER_ARCHIVE(cereal::PortableBinaryInputArchive) // tie input and output archives together CEREAL_SETUP_ARCHIVE_TRAITS(cereal::PortableBinaryInputArchive, cereal::PortableBinaryOutputArchive) #endif // CEREAL_ARCHIVES_PORTABLE_BINARY_HPP_
{ "content_hash": "4f29f45a3b57f13a2ca67b18e448fcc8", "timestamp": "", "source": "github", "line_count": 327, "max_line_length": 143, "avg_line_length": 44.5565749235474, "alnum_prop": 0.665888812628689, "repo_name": "Segs/Segs", "id": "69c02c0723e45e60ec00fe7aebaa4b0e84b9787b", "size": "14570", "binary": false, "copies": "4", "ref": "refs/heads/develop", "path": "3rd_party/cereal/include/cereal/archives/portable_binary.hpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "14052" }, { "name": "C#", "bytes": "5777" }, { "name": "C++", "bytes": "2597767" }, { "name": "CMake", "bytes": "90611" }, { "name": "CSS", "bytes": "9046" }, { "name": "Dockerfile", "bytes": "159" }, { "name": "GLSL", "bytes": "9402" }, { "name": "Java", "bytes": "10189" }, { "name": "Lua", "bytes": "565226" }, { "name": "NSIS", "bytes": "3505" }, { "name": "PHP", "bytes": "3660" }, { "name": "Ruby", "bytes": "6654" }, { "name": "Shell", "bytes": "4498" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_45) on Mon Nov 18 22:32:06 EST 2013 --> <title>PlayerPane</title> <meta name="date" content="2013-11-18"> <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="PlayerPane"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <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="../../../mgci/jhdap/shogi/package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/PlayerPane.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="../../../mgci/jhdap/shogi/Piece.html" title="class in mgci.jhdap.shogi"><span class="strong">Prev Class</span></a></li> <li><a href="../../../mgci/jhdap/shogi/PromotablePiece.html" title="class in mgci.jhdap.shogi"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?mgci/jhdap/shogi/PlayerPane.html" target="_top">Frames</a></li> <li><a href="PlayerPane.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); 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> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">mgci.jhdap.shogi</div> <h2 title="Class PlayerPane" class="title">Class PlayerPane</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>mgci.jhdap.shogi.PlayerPane</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="strong">PlayerPane</span> extends java.lang.Object</pre> <div class="block">The Class representing the info box of one player in the statistics panel present in the shogi GUI.</div> <dl><dt><span class="strong">Author:</span></dt> <dd>Jiayin Huang, Dmitry Andreevich Paramonov</dd></dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <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>long</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#dt">dt</a></strong></code> <div class="block">Delta time; the total amount of time that this player has used up.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected long</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#localStart">localStart</a></strong></code> <div class="block">The System.currentTimeMillis() value of the last time update.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#name">name</a></strong></code> <div class="block">The name of this player.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.awt.Font</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#notPlayingFont">notPlayingFont</a></strong></code> <div class="block">The font of the player pane if it is not their turn to play.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#playing">playing</a></strong></code> <div class="block">If true, then it is their turn to play.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.awt.Font</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#playingFont">playingFont</a></strong></code> <div class="block">The font of the player pane if it is their turn to play.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>javax.swing.JTextArea</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#txt">txt</a></strong></code> <div class="block">The JTextArea object that contains all of the text for this player pane.</div> </td> </tr> </table> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <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="../../../mgci/jhdap/shogi/PlayerPane.html#PlayerPane(java.lang.String)">PlayerPane</a></strong>(java.lang.String&nbsp;name)</code> <div class="block">Constructs a new player pane of the given player name.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <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>void</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#reset()">reset</a></strong>()</code> <div class="block">Resets this player plane.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#setNotPlaying()">setNotPlaying</a></strong>()</code> <div class="block">Sets it so that this player is not playing.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#setPlaying()">setPlaying</a></strong>()</code> <div class="block">Sets it so that this player is playing.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../mgci/jhdap/shogi/PlayerPane.html#updateTime()">updateTime</a></strong>()</code> <div class="block">Updates the JTextArea with the total elapsed time.</div> </td> </tr> </table> <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"> <!-- ============ FIELD DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="field_detail"> <!-- --> </a> <h3>Field Detail</h3> <a name="playingFont"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>playingFont</h4> <pre>public static final&nbsp;java.awt.Font playingFont</pre> <div class="block">The font of the player pane if it is their turn to play.</div> </li> </ul> <a name="notPlayingFont"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>notPlayingFont</h4> <pre>public static final&nbsp;java.awt.Font notPlayingFont</pre> <div class="block">The font of the player pane if it is not their turn to play.</div> </li> </ul> <a name="playing"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>playing</h4> <pre>public&nbsp;boolean playing</pre> <div class="block">If true, then it is their turn to play.</div> </li> </ul> <a name="txt"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>txt</h4> <pre>public&nbsp;javax.swing.JTextArea txt</pre> <div class="block">The JTextArea object that contains all of the text for this player pane.</div> </li> </ul> <a name="name"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>name</h4> <pre>public&nbsp;java.lang.String name</pre> <div class="block">The name of this player.</div> </li> </ul> <a name="dt"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>dt</h4> <pre>public&nbsp;long dt</pre> <div class="block">Delta time; the total amount of time that this player has used up.</div> </li> </ul> <a name="localStart"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>localStart</h4> <pre>protected&nbsp;long localStart</pre> <div class="block">The System.currentTimeMillis() value of the last time update.</div> </li> </ul> </li> </ul> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="PlayerPane(java.lang.String)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>PlayerPane</h4> <pre>public&nbsp;PlayerPane(java.lang.String&nbsp;name)</pre> <div class="block">Constructs a new player pane of the given player name.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the name of the player</dd></dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="setPlaying()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setPlaying</h4> <pre>public&nbsp;void&nbsp;setPlaying()</pre> <div class="block">Sets it so that this player is playing. This resumes the timer, sets the pane outline to red, and sets the text to the playingFont.</div> </li> </ul> <a name="setNotPlaying()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setNotPlaying</h4> <pre>public&nbsp;void&nbsp;setNotPlaying()</pre> <div class="block">Sets it so that this player is not playing. This pauses the timer, sets the pane outline to black, and sets the text to the notPlayingFont.</div> </li> </ul> <a name="updateTime()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>updateTime</h4> <pre>public&nbsp;void&nbsp;updateTime()</pre> <div class="block">Updates the JTextArea with the total elapsed time.</div> </li> </ul> <a name="reset()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>reset</h4> <pre>public&nbsp;void&nbsp;reset()</pre> <div class="block">Resets this player plane. This calls the setNotPlaying method, and sets dt to 0.</div> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../mgci/jhdap/shogi/package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/PlayerPane.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="../../../mgci/jhdap/shogi/Piece.html" title="class in mgci.jhdap.shogi"><span class="strong">Prev Class</span></a></li> <li><a href="../../../mgci/jhdap/shogi/PromotablePiece.html" title="class in mgci.jhdap.shogi"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?mgci/jhdap/shogi/PlayerPane.html" target="_top">Frames</a></li> <li><a href="PlayerPane.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); 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> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "content_hash": "c31c94b5bd7c975be333fb30606742f6", "timestamp": "", "source": "github", "line_count": 457, "max_line_length": 172, "avg_line_length": 32.586433260393875, "alnum_prop": 0.6451786193929626, "repo_name": "doome1337/Shogi", "id": "f1401b9f3e7fdf6a57ff2e64a01b2066f03eee7a", "size": "14892", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "doc/mgci/jhdap/shogi/PlayerPane.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "11139" }, { "name": "Java", "bytes": "162376" } ], "symlink_target": "" }
namespace YAPA.Plugins.SoundSettings.SoundNotifications { public partial class SoundNotificationSettingWindow { public SoundNotificationSettingWindow(SoundNotificationsSettings settings) { settings.DeferChanges(); InitializeComponent(); DataContext = settings; } } }
{ "content_hash": "327c68522b17df51c6d5ad9a85102b80", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 82, "avg_line_length": 26.23076923076923, "alnum_prop": 0.6656891495601173, "repo_name": "YetAnotherPomodoroApp/YAPA-2", "id": "a4b32b7a960e63ad6a207c9049c7c11573e0cabe", "size": "343", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "YAPA/Plugins/SoundSettings/SoundNotifications/SoundNotificationSettingWindow.xaml.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "249" }, { "name": "C#", "bytes": "348952" }, { "name": "PowerShell", "bytes": "1629" } ], "symlink_target": "" }
package org.conqat.engine.sourcecode.analysis.shallowparsed; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.conqat.engine.commons.pattern.PatternList; import org.conqat.engine.core.core.AConQATFieldParameter; import org.conqat.engine.core.core.AConQATProcessor; import org.conqat.engine.core.core.ConQATException; import org.conqat.engine.resource.text.filter.base.Deletion; import org.conqat.engine.resource.text.filter.base.TextFilterBase; import org.conqat.engine.sourcecode.shallowparser.ShallowParserFactory; import org.conqat.engine.sourcecode.shallowparser.framework.EShallowEntityType; import org.conqat.engine.sourcecode.shallowparser.framework.IShallowEntityVisitor; import org.conqat.engine.sourcecode.shallowparser.framework.ShallowEntity; import org.conqat.engine.sourcecode.shallowparser.framework.ShallowEntityTraversalUtils; import org.conqat.lib.commons.string.StringUtils; import org.conqat.lib.scanner.ELanguage; import org.conqat.lib.scanner.IToken; import org.conqat.lib.scanner.ScannerException; import org.conqat.lib.scanner.ScannerFactory; import org.conqat.lib.scanner.ScannerUtils; /** * {@ConQAT.Doc} * * @author $Author: hummelb $ * @version $Rev: 46378 $ * @ConQAT.Rating GREEN Hash: 040F0463818EFAE2411F9A0A9A7C44C2 */ @AConQATProcessor(description = "Filters out methods whose name matches against the specified regular expressions. This filter creates filter gaps.") public class MethodFilter extends TextFilterBase { /** {@ConQAT.Doc} */ @AConQATFieldParameter(parameter = "method-name-patterns", attribute = "ref", description = "Methods whose names match against one of these patterns are removed.", optional = false) public PatternList methodNamePatterns; /** {@ConQAT.Doc} */ @AConQATFieldParameter(parameter = "language", attribute = "name", description = "Programming language on which this filter works.", optional = false) public ELanguage language; /** {@inheritDoc} */ @Override public List<Deletion> getDeletions(String rawContent, String elementUniformPath) throws ConQATException { List<IToken> tokens = createTokens(rawContent, elementUniformPath); List<ShallowEntity> entities = createShallowEntities( elementUniformPath, tokens); MethodFilterVisitor visitor = new MethodFilterVisitor( elementUniformPath); ShallowEntity.traverse(entities, visitor); return visitor.deletions; } /** Creates tokens for the raw content and logs scanner problems */ private List<IToken> createTokens(String rawContent, String elementUniformPath) throws AssertionError { List<IToken> tokens = new ArrayList<IToken>(); List<ScannerException> exceptions = new ArrayList<ScannerException>(); try { ScannerUtils.readTokens(ScannerFactory.newScanner(language, rawContent, elementUniformPath), tokens, exceptions); } catch (IOException e) { throw new AssertionError( "We are reading from a String. An IOException should not occurr here."); } if (exceptions.size() > 0) { getLogger().debug( "Found " + exceptions.size() + " scanner problems in element" + elementUniformPath); } return tokens; } /** Creates ShallowEntities from the tokens and logs parser problems */ private List<ShallowEntity> createShallowEntities( String elementUniformPath, List<IToken> tokens) throws ConQATException { List<ShallowEntity> entities = ShallowParserFactory.createParser( language).parseTopLevel(tokens); ShallowEntity incomplete = ShallowEntityTraversalUtils .findIncompleteEntity(entities); if (incomplete != null) { getLogger() .debug("Incompletely parsed node: " + incomplete.toLocalString() + " in element: " + elementUniformPath + " (element could contain further parsing errors)."); } return entities; } /** Visitor that filters methods by name. */ public class MethodFilterVisitor implements IShallowEntityVisitor { /** List of Deletions. Constructed during traversal. */ private final List<Deletion> deletions = new ArrayList<Deletion>(); /** Uniform path of element that gets visited */ private final String elementUniformPath; /** Constructor */ public MethodFilterVisitor(String elementUniformPath) { this.elementUniformPath = elementUniformPath; } /** {@inheritDoc} */ @Override public boolean visit(ShallowEntity entity) { if (entity.getType() == EShallowEntityType.METHOD) { String methodName = entity.getName(); if (!StringUtils.isEmpty(methodName) && methodNamePatterns.matchesAny(methodName)) { filterRegionFor(entity); return false; } } return true; } /** Create a region for a filtered entity */ private void filterRegionFor(ShallowEntity entity) { int startOffset = entity.getStartOffset(); int endOffset = entity.getEndOffset(); // log and skip incompletely parsed methods if (entity.getEndTokenIndex() < 0) { getLogger().warn( "Could not filter method in line " + entity.getStartLine() + " in file " + elementUniformPath + " since it was incompletely parsed."); return; } // increment to convert inclusive endOffset to exclusive. not // required for startOffset Deletion deletion = new Deletion(startOffset, endOffset + 1, true); deletions.add(deletion); logDeletion(deletion, elementUniformPath); } /** {@inheritDoc} */ @Override public void endVisit(ShallowEntity entity) { // Nothing to do } } }
{ "content_hash": "32ec117774fd79ff3e3fbbec323a9775", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 182, "avg_line_length": 33.79754601226994, "alnum_prop": 0.7455073516064622, "repo_name": "vimaier/conqat", "id": "42f7821c41df5447e78845db48b9a47ca57d11e4", "size": "6740", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "org.conqat.engine.sourcecode/src/org/conqat/engine/sourcecode/analysis/shallowparsed/MethodFilter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ABAP", "bytes": "83459" }, { "name": "Ada", "bytes": "294088" }, { "name": "C", "bytes": "35787" }, { "name": "C#", "bytes": "2180092" }, { "name": "C++", "bytes": "41027" }, { "name": "CSS", "bytes": "1066" }, { "name": "DOT", "bytes": "865" }, { "name": "Java", "bytes": "12354598" }, { "name": "JavaScript", "bytes": "563333" }, { "name": "Matlab", "bytes": "2070" }, { "name": "Perl", "bytes": "1612" }, { "name": "Python", "bytes": "1646" }, { "name": "Scilab", "bytes": "9" }, { "name": "Shell", "bytes": "404" }, { "name": "Visual Basic", "bytes": "183" }, { "name": "XSLT", "bytes": "128360" } ], "symlink_target": "" }
var ConfigParser = require('../../built/configParser').default; var path = require('path'); describe('the config parser', function() { it('should have a default config', function() { var config = new ConfigParser().getConfig(); expect(config.specs).toEqual([]); expect(config.rootElement).toEqual('body'); }); it('should merge in config from an object', function() { var toAdd = { rootElement: '.mydiv' }; var config = new ConfigParser().addConfig(toAdd).getConfig(); expect(config.specs).toEqual([]); expect(config.rootElement).toEqual('.mydiv'); }); it('should merge in config from a file', function() { var config = new ConfigParser(). addFileConfig(__dirname + '/data/config.js'). getConfig(); expect(config.rootElement).toEqual('.mycontainer'); expect(config.onPrepare.indexOf(path.normalize('/spec/unit/data/foo/bar.js'))).not.toEqual(-1); expect(config.specs.length).toEqual(1); expect(config.specs[0]).toEqual('fakespec[AB].js'); }); it('should keep filepaths relative to the cwd when merging', function() { var toAdd = { onPrepare: 'baz/qux.js' }; var config = new ConfigParser().addConfig(toAdd).getConfig(); expect(config.onPrepare).toEqual(path.normalize(process.cwd() + '/baz/qux.js')); }); describe('getSpecs()', function() { it('should return all the specs from "config.suites" if no other sources are provided', function() { var config = { specs: [], suites: { foo: 'foo.spec.js', bar: 'bar.spec.js' } }; var specs = ConfigParser.getSpecs(config); expect(specs).toEqual(['foo.spec.js', 'bar.spec.js']); }); }); describe('resolving globs', function() { it('should resolve relative to the cwd', function() { spyOn(process, 'cwd').and.returnValue(__dirname + '/'); var toAdd = { specs: 'data/*spec[AB].js' }; var config = new ConfigParser().addConfig(toAdd).getConfig(); var specs = ConfigParser.resolveFilePatterns(config.specs); expect(specs.length).toEqual(2); expect(specs[0].indexOf(path.normalize('unit/data/fakespecA.js'))).not.toEqual(-1); expect(specs[1].indexOf(path.normalize('unit/data/fakespecB.js'))).not.toEqual(-1); }); it('should resolve relative to the config file dir', function() { var config = new ConfigParser(). addFileConfig(__dirname + '/data/config.js'). getConfig(); var specs = ConfigParser.resolveFilePatterns( config.specs, false, config.configDir); expect(specs.length).toEqual(2); expect(specs[0].indexOf(path.normalize('unit/data/fakespecA.js'))).not.toEqual(-1); expect(specs[1].indexOf(path.normalize('unit/data/fakespecB.js'))).not.toEqual(-1); }); }); });
{ "content_hash": "2a468ced66765c62eac9bd8361edbb18", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 104, "avg_line_length": 34.71951219512195, "alnum_prop": 0.6269757639620653, "repo_name": "sjelin/protractor", "id": "23d488563bb6b348a1a6220d4441c4077c08206d", "size": "2847", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/unit/config_test.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "4636" }, { "name": "HTML", "bytes": "30776" }, { "name": "JavaScript", "bytes": "4873465" }, { "name": "Shell", "bytes": "4586" }, { "name": "TypeScript", "bytes": "24110" } ], "symlink_target": "" }
<?php /** * This class defines attributes, valid values, and usage which is generated * from a given json schema. * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5 * * @author Chirag Shah <chirags@google.com> * */ class W3TCG_Google_Model implements ArrayAccess { protected $internal_gapi_mappings = array(); protected $modelData = array(); protected $processed = array(); /** * Polymorphic - accepts a variable number of arguments dependent * on the type of the model subclass. */ final public function __construct() { if (func_num_args() == 1 && is_array(func_get_arg(0))) { // Initialize the model with the array's contents. $array = func_get_arg(0); $this->mapTypes($array); } $this->gapiInit(); } /** * Getter that handles passthrough access to the data array, and lazy object creation. * @param string $key Property name. * @return mixed The value if any, or null. */ public function __get($key) { $keyTypeName = $this->keyType($key); $keyDataType = $this->dataType($key); if (isset($this->$keyTypeName) && !isset($this->processed[$key])) { if (isset($this->modelData[$key])) { $val = $this->modelData[$key]; } else if (isset($this->$keyDataType) && ($this->$keyDataType == 'array' || $this->$keyDataType == 'map')) { $val = array(); } else { $val = null; } if ($this->isAssociativeArray($val)) { if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) { foreach ($val as $arrayKey => $arrayItem) { $this->modelData[$key][$arrayKey] = $this->createObjectFromName($keyTypeName, $arrayItem); } } else { $this->modelData[$key] = $this->createObjectFromName($keyTypeName, $val); } } else if (is_array($val)) { $arrayObject = array(); foreach ($val as $arrayIndex => $arrayItem) { $arrayObject[$arrayIndex] = $this->createObjectFromName($keyTypeName, $arrayItem); } $this->modelData[$key] = $arrayObject; } $this->processed[$key] = true; } return isset($this->modelData[$key]) ? $this->modelData[$key] : null; } /** * Initialize this object's properties from an array. * * @param array $array Used to seed this object's properties. * @return void */ protected function mapTypes($array) { // Hard initilise simple types, lazy load more complex ones. foreach ($array as $key => $val) { if ( !property_exists($this, $this->keyType($key)) && property_exists($this, $key)) { $this->$key = $val; unset($array[$key]); } elseif (property_exists($this, $camelKey = W3TCG_Google_Utils::camelCase($key))) { // For backwards compatibility, this checks if property exists as camelCase, leaving // it in array as snake_case $this->$camelKey = $val; } } $this->modelData = $array; } /** * Blank initialiser to be used in subclasses to do post-construction initialisation - this * avoids the need for subclasses to have to implement the variadics handling in their * constructors. */ protected function gapiInit() { return; } /** * Create a simplified object suitable for straightforward * conversion to JSON. This is relatively expensive * due to the usage of reflection, but shouldn't be called * a whole lot, and is the most straightforward way to filter. */ public function toSimpleObject() { $object = new stdClass(); // Process all other data. foreach ($this->modelData as $key => $val) { $result = $this->getSimpleValue($val); if ($result !== null) { $object->$key = $result; } } // Process all public properties. $reflect = new ReflectionObject($this); $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); foreach ($props as $member) { $name = $member->getName(); $result = $this->getSimpleValue($this->$name); if ($result !== null) { $name = $this->getMappedName($name); $object->$name = $result; } } return $object; } /** * Handle different types of values, primarily * other objects and map and array data types. */ private function getSimpleValue($value) { if ($value instanceof W3TCG_Google_Model) { return $value->toSimpleObject(); } else if (is_array($value)) { $return = array(); foreach ($value as $key => $a_value) { $a_value = $this->getSimpleValue($a_value); if ($a_value !== null) { $key = $this->getMappedName($key); $return[$key] = $a_value; } } return $return; } return $value; } /** * If there is an internal name mapping, use that. */ private function getMappedName($key) { if (isset($this->internal_gapi_mappings) && isset($this->internal_gapi_mappings[$key])) { $key = $this->internal_gapi_mappings[$key]; } return $key; } /** * Returns true only if the array is associative. * @param array $array * @return bool True if the array is associative. */ protected function isAssociativeArray($array) { if (!is_array($array)) { return false; } $keys = array_keys($array); foreach ($keys as $key) { if (is_string($key)) { return true; } } return false; } /** * Given a variable name, discover its type. * * @param $name * @param $item * @return object The object from the item. */ private function createObjectFromName($name, $item) { $type = $this->$name; return new $type($item); } /** * Verify if $obj is an array. * @throws W3TCG_Google_Exception Thrown if $obj isn't an array. * @param array $obj Items that should be validated. * @param string $method Method expecting an array as an argument. */ public function assertIsArray($obj, $method) { if ($obj && !is_array($obj)) { throw new W3TCG_Google_Exception( "Incorrect parameter type passed to $method(). Expected an array." ); } } public function offsetExists($offset) { return isset($this->$offset) || isset($this->modelData[$offset]); } public function offsetGet($offset) { return isset($this->$offset) ? $this->$offset : $this->__get($offset); } public function offsetSet($offset, $value) { if (property_exists($this, $offset)) { $this->$offset = $value; } else { $this->modelData[$offset] = $value; $this->processed[$offset] = true; } } public function offsetUnset($offset) { unset($this->modelData[$offset]); } protected function keyType($key) { return $key . "Type"; } protected function dataType($key) { return $key . "DataType"; } public function __isset($key) { return isset($this->modelData[$key]); } public function __unset($key) { unset($this->modelData[$key]); } }
{ "content_hash": "096831dd70b1d85d1abe103404ffead4", "timestamp": "", "source": "github", "line_count": 267, "max_line_length": 94, "avg_line_length": 26.655430711610485, "alnum_prop": 0.58887171561051, "repo_name": "jikamens/w3-total-cache-fixed", "id": "872c6b5c9aef5051c607729c0c74697e915eef75", "size": "7711", "binary": false, "copies": "52", "ref": "refs/heads/v0.9.5.x", "path": "lib/Google/Model.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "37126" }, { "name": "HTML", "bytes": "235" }, { "name": "Java", "bytes": "14870" }, { "name": "JavaScript", "bytes": "150906" }, { "name": "Modelica", "bytes": "10338" }, { "name": "PHP", "bytes": "4925869" }, { "name": "Perl", "bytes": "1953" }, { "name": "Shell", "bytes": "4011" } ], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="ApiGen 2.8.0" /> <title>Namespace Symfony\Component\DependencyInjection\ParameterBag | seip</title> <script type="text/javascript" src="resources/combined.js?784181472"></script> <script type="text/javascript" src="elementlist.js?3927760630"></script> <link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" /> </head> <body> <div id="left"> <div id="menu"> <a href="index.html" title="Overview"><span>Overview</span></a> <div id="groups"> <h3>Namespaces</h3> <ul> <li><a href="namespace-Acme.html">Acme<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.html">DemoBundle<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Command.html">Command</a> </li> <li><a href="namespace-Acme.DemoBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Acme.DemoBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Acme.DemoBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Acme.DemoBundle.Form.html">Form</a> </li> <li><a href="namespace-Acme.DemoBundle.Proxy.html">Proxy<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.html">__CG__<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.html">Symfony<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.html">Component<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.html">Acl<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.Tests.Domain.html">Domain</a> </li> </ul></li></ul></li> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.Tests.Util.html">Util</a> </li> </ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Acme.DemoBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Tests.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-Acme.DemoBundle.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Twig.Extension.html">Extension</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Alpha.html">Alpha</a> </li> <li><a href="namespace-Apc.html">Apc<span></span></a> <ul> <li><a href="namespace-Apc.NamespaceCollision.html">NamespaceCollision<span></span></a> <ul> <li><a href="namespace-Apc.NamespaceCollision.A.html">A<span></span></a> <ul> <li><a href="namespace-Apc.NamespaceCollision.A.B.html">B</a> </li> </ul></li></ul></li> <li><a href="namespace-Apc.Namespaced.html">Namespaced</a> </li> </ul></li> <li><a href="namespace-Assetic.html">Assetic<span></span></a> <ul> <li><a href="namespace-Assetic.Asset.html">Asset<span></span></a> <ul> <li><a href="namespace-Assetic.Asset.Iterator.html">Iterator</a> </li> </ul></li> <li><a href="namespace-Assetic.Cache.html">Cache</a> </li> <li><a href="namespace-Assetic.Exception.html">Exception</a> </li> <li><a href="namespace-Assetic.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Assetic.Extension.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-Assetic.Factory.html">Factory<span></span></a> <ul> <li><a href="namespace-Assetic.Factory.Loader.html">Loader</a> </li> <li><a href="namespace-Assetic.Factory.Resource.html">Resource</a> </li> <li><a href="namespace-Assetic.Factory.Worker.html">Worker</a> </li> </ul></li> <li><a href="namespace-Assetic.Filter.html">Filter<span></span></a> <ul> <li><a href="namespace-Assetic.Filter.GoogleClosure.html">GoogleClosure</a> </li> <li><a href="namespace-Assetic.Filter.Sass.html">Sass</a> </li> <li><a href="namespace-Assetic.Filter.Yui.html">Yui</a> </li> </ul></li> <li><a href="namespace-Assetic.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Bazinga.html">Bazinga<span></span></a> <ul> <li><a href="namespace-Bazinga.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.html">JsTranslationBundle<span></span></a> <ul> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Command.html">Command</a> </li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Dumper.html">Dumper</a> </li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Finder.html">Finder</a> </li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Tests.html">Tests</a> </li> </ul></li></ul></li> <li><a href="namespace-Bazinga.JsTranslationBundle.html">JsTranslationBundle<span></span></a> <ul> <li><a href="namespace-Bazinga.JsTranslationBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Bazinga.JsTranslationBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Bazinga.JsTranslationBundle.Tests.Finder.html">Finder</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Beta.html">Beta</a> </li> <li><a href="namespace-Blameable.html">Blameable<span></span></a> <ul> <li><a href="namespace-Blameable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Blameable.Fixture.Document.html">Document</a> </li> <li><a href="namespace-Blameable.Fixture.Entity.html">Entity</a> </li> </ul></li></ul></li> <li><a href="namespace-ClassesWithParents.html">ClassesWithParents</a> </li> <li><a href="namespace-ClassLoaderTest.html">ClassLoaderTest</a> </li> <li><a href="namespace-ClassMap.html">ClassMap</a> </li> <li><a href="namespace-Composer.html">Composer<span></span></a> <ul> <li><a href="namespace-Composer.Autoload.html">Autoload</a> </li> </ul></li> <li><a href="namespace-Container14.html">Container14</a> </li> <li><a href="namespace-Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.html">DoctrineBundle<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Command.html">Command<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Command.Proxy.html">Proxy</a> </li> </ul></li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Mapping.html">Mapping</a> </li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> </ul></li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-Doctrine.Bundle.FixturesBundle.html">FixturesBundle<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.FixturesBundle.Command.html">Command</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.Common.html">Common<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Annotations.html">Annotations<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Annotations.Annotation.html">Annotation</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.Cache.html">Cache</a> </li> <li><a href="namespace-Doctrine.Common.Collections.html">Collections<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Collections.Expr.html">Expr</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.DataFixtures.html">DataFixtures<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.DataFixtures.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.DataFixtures.Event.Listener.html">Listener</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.DataFixtures.Exception.html">Exception</a> </li> <li><a href="namespace-Doctrine.Common.DataFixtures.Executor.html">Executor</a> </li> <li><a href="namespace-Doctrine.Common.DataFixtures.Purger.html">Purger</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.Inflector.html">Inflector</a> </li> <li><a href="namespace-Doctrine.Common.Lexer.html">Lexer</a> </li> <li><a href="namespace-Doctrine.Common.Persistence.html">Persistence<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Persistence.Event.html">Event</a> </li> <li><a href="namespace-Doctrine.Common.Persistence.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Persistence.Mapping.Driver.html">Driver</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.Common.Proxy.html">Proxy<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Proxy.Exception.html">Exception</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.Reflection.html">Reflection</a> </li> <li><a href="namespace-Doctrine.Common.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.html">DBAL<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Cache.html">Cache</a> </li> <li><a href="namespace-Doctrine.DBAL.Connections.html">Connections</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.html">Driver<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Driver.DrizzlePDOMySql.html">DrizzlePDOMySql</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.IBMDB2.html">IBMDB2</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.Mysqli.html">Mysqli</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.OCI8.html">OCI8</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOIbm.html">PDOIbm</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOMySql.html">PDOMySql</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOOracle.html">PDOOracle</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOPgSql.html">PDOPgSql</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOSqlite.html">PDOSqlite</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOSqlsrv.html">PDOSqlsrv</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.SQLSrv.html">SQLSrv</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Event.Listeners.html">Listeners</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Id.html">Id</a> </li> <li><a href="namespace-Doctrine.DBAL.Logging.html">Logging</a> </li> <li><a href="namespace-Doctrine.DBAL.Platforms.html">Platforms<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Platforms.Keywords.html">Keywords</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Portability.html">Portability</a> </li> <li><a href="namespace-Doctrine.DBAL.Query.html">Query<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Query.Expression.html">Expression</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Schema.html">Schema<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Schema.Synchronizer.html">Synchronizer</a> </li> <li><a href="namespace-Doctrine.DBAL.Schema.Visitor.html">Visitor</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Sharding.html">Sharding<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Sharding.ShardChoser.html">ShardChoser</a> </li> <li><a href="namespace-Doctrine.DBAL.Sharding.SQLAzure.html">SQLAzure<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Sharding.SQLAzure.Schema.html">Schema</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.DBAL.Tools.html">Tools<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Tools.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Tools.Console.Command.html">Command</a> </li> <li><a href="namespace-Doctrine.DBAL.Tools.Console.Helper.html">Helper</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.DBAL.Types.html">Types</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.html">ORM<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Decorator.html">Decorator</a> </li> <li><a href="namespace-Doctrine.ORM.Event.html">Event</a> </li> <li><a href="namespace-Doctrine.ORM.Id.html">Id</a> </li> <li><a href="namespace-Doctrine.ORM.Internal.html">Internal<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Internal.Hydration.html">Hydration</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Mapping.Builder.html">Builder</a> </li> <li><a href="namespace-Doctrine.ORM.Mapping.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Persisters.html">Persisters</a> </li> <li><a href="namespace-Doctrine.ORM.Proxy.html">Proxy</a> </li> <li><a href="namespace-Doctrine.ORM.Query.html">Query<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Query.AST.html">AST<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Query.AST.Functions.html">Functions</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Query.Exec.html">Exec</a> </li> <li><a href="namespace-Doctrine.ORM.Query.Expr.html">Expr</a> </li> <li><a href="namespace-Doctrine.ORM.Query.Filter.html">Filter</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Repository.html">Repository</a> </li> <li><a href="namespace-Doctrine.ORM.Tools.html">Tools<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Tools.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Tools.Console.Command.html">Command<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Tools.Console.Command.ClearCache.html">ClearCache</a> </li> <li><a href="namespace-Doctrine.ORM.Tools.Console.Command.SchemaTool.html">SchemaTool</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Tools.Console.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Tools.Event.html">Event</a> </li> <li><a href="namespace-Doctrine.ORM.Tools.Export.html">Export<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Tools.Export.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Tools.Pagination.html">Pagination</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.html">Common<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.html">Annotations<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Bar.html">Bar</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Fixtures.Annotation.html">Annotation</a> </li> </ul></li> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Foo.html">Foo</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Annotations.FooBar.html">FooBar</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.html">Ticket<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.ORM.html">ORM<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.ORM.Mapping.html">Mapping</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Doctrine.Tests.Common.Cache.html">Cache</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Collections.html">Collections</a> </li> <li><a href="namespace-Doctrine.Tests.Common.DataFixtures.html">DataFixtures<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.DataFixtures.Executor.html">Executor</a> </li> <li><a href="namespace-Doctrine.Tests.Common.DataFixtures.TestEntity.html">TestEntity</a> </li> <li><a href="namespace-Doctrine.Tests.Common.DataFixtures.TestFixtures.html">TestFixtures</a> </li> </ul></li> <li><a href="namespace-Doctrine.Tests.Common.Inflector.html">Inflector</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Persistence.html">Persistence<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Persistence.Mapping.html">Mapping</a> </li> </ul></li> <li><a href="namespace-Doctrine.Tests.Common.Proxy.html">Proxy</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Reflection.html">Reflection<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Reflection.Dummies.html">Dummies</a> </li> </ul></li> <li><a href="namespace-Doctrine.Tests.Common.Util.html">Util</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.html">Bundles<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.AnnotationsBundle.html">AnnotationsBundle<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.AnnotationsBundle.Entity.html">Entity</a> </li> </ul></li> <li><a href="namespace-Fixtures.Bundles.Vendor.html">Vendor<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.Vendor.AnnotationsBundle.html">AnnotationsBundle<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.Vendor.AnnotationsBundle.Entity.html">Entity</a> </li> </ul></li></ul></li> <li><a href="namespace-Fixtures.Bundles.XmlBundle.html">XmlBundle<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.XmlBundle.Entity.html">Entity</a> </li> </ul></li> <li><a href="namespace-Fixtures.Bundles.YamlBundle.html">YamlBundle<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.YamlBundle.Entity.html">Entity</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Foo.html">Foo<span></span></a> <ul> <li><a href="namespace-Foo.Bar.html">Bar</a> </li> </ul></li> <li><a href="namespace-FOS.html">FOS<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.html">RestBundle<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Controller.html">Controller<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Controller.Annotations.html">Annotations</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Decoder.html">Decoder</a> </li> <li><a href="namespace-FOS.RestBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-FOS.RestBundle.Examples.html">Examples</a> </li> <li><a href="namespace-FOS.RestBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Form.Extension.html">Extension</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Normalizer.html">Normalizer<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Normalizer.Exception.html">Exception</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Request.html">Request</a> </li> <li><a href="namespace-FOS.RestBundle.Response.html">Response<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Response.AllowedMethodsLoader.html">AllowedMethodsLoader</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Routing.html">Routing<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Routing.Loader.html">Loader<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Routing.Loader.Reader.html">Reader</a> </li> </ul></li></ul></li> <li><a href="namespace-FOS.RestBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.Controller.html">Controller<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.Controller.Annotations.html">Annotations</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Tests.Decoder.html">Decoder</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.Fixtures.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Tests.Normalizer.html">Normalizer</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.Request.html">Request</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.Routing.html">Routing<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.Routing.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Tests.Util.html">Util</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.View.html">View</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Util.html">Util<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Util.Inflector.html">Inflector</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.View.html">View</a> </li> </ul></li> <li><a href="namespace-FOS.UserBundle.html">UserBundle<span></span></a> <ul> <li><a href="namespace-FOS.UserBundle.Command.html">Command</a> </li> <li><a href="namespace-FOS.UserBundle.Controller.html">Controller</a> </li> <li><a href="namespace-FOS.UserBundle.CouchDocument.html">CouchDocument</a> </li> <li><a href="namespace-FOS.UserBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-FOS.UserBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-FOS.UserBundle.Doctrine.html">Doctrine</a> </li> <li><a href="namespace-FOS.UserBundle.Document.html">Document</a> </li> <li><a href="namespace-FOS.UserBundle.Entity.html">Entity</a> </li> <li><a href="namespace-FOS.UserBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-FOS.UserBundle.Form.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-FOS.UserBundle.Form.Handler.html">Handler</a> </li> <li><a href="namespace-FOS.UserBundle.Form.Model.html">Model</a> </li> <li><a href="namespace-FOS.UserBundle.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-FOS.UserBundle.Mailer.html">Mailer</a> </li> <li><a href="namespace-FOS.UserBundle.Model.html">Model</a> </li> <li><a href="namespace-FOS.UserBundle.Propel.html">Propel</a> </li> <li><a href="namespace-FOS.UserBundle.Security.html">Security</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-FOS.UserBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.Doctrine.html">Doctrine</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.Model.html">Model</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.Security.html">Security</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-FOS.UserBundle.Util.html">Util</a> </li> <li><a href="namespace-FOS.UserBundle.Validator.html">Validator</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.html">Gedmo<span></span></a> <ul> <li><a href="namespace-Gedmo.Blameable.html">Blameable<span></span></a> <ul> <li><a href="namespace-Gedmo.Blameable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Blameable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Blameable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Blameable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Blameable.Traits.html">Traits</a> </li> </ul></li> <li><a href="namespace-Gedmo.Exception.html">Exception</a> </li> <li><a href="namespace-Gedmo.IpTraceable.html">IpTraceable<span></span></a> <ul> <li><a href="namespace-Gedmo.IpTraceable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.IpTraceable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.IpTraceable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.IpTraceable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.IpTraceable.Traits.html">Traits</a> </li> </ul></li> <li><a href="namespace-Gedmo.Loggable.html">Loggable<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Document.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Loggable.Document.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Loggable.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Entity.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Loggable.Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Loggable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Loggable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Annotation.html">Annotation</a> </li> <li><a href="namespace-Gedmo.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li> <li><a href="namespace-Gedmo.Mapping.Mock.html">Mock<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.html">Encoder<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Mapping.Mock.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Mapping.Xml.html">Xml</a> </li> </ul></li> <li><a href="namespace-Gedmo.ReferenceIntegrity.html">ReferenceIntegrity<span></span></a> <ul> <li><a href="namespace-Gedmo.ReferenceIntegrity.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.ReferenceIntegrity.Mapping.Driver.html">Driver</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.References.html">References<span></span></a> <ul> <li><a href="namespace-Gedmo.References.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.References.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.References.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.References.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Sluggable.html">Sluggable<span></span></a> <ul> <li><a href="namespace-Gedmo.Sluggable.Handler.html">Handler</a> </li> <li><a href="namespace-Gedmo.Sluggable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Sluggable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Sluggable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Sluggable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Sluggable.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Gedmo.SoftDeleteable.html">SoftDeleteable<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Filter.html">Filter<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Filter.ODM.html">ODM</a> </li> </ul></li> <li><a href="namespace-Gedmo.SoftDeleteable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.SoftDeleteable.Query.html">Query<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Query.TreeWalker.html">TreeWalker<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Query.TreeWalker.Exec.html">Exec</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.SoftDeleteable.Traits.html">Traits</a> </li> </ul></li> <li><a href="namespace-Gedmo.Sortable.html">Sortable<span></span></a> <ul> <li><a href="namespace-Gedmo.Sortable.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Gedmo.Sortable.Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Sortable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Sortable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Sortable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Sortable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Timestampable.html">Timestampable<span></span></a> <ul> <li><a href="namespace-Gedmo.Timestampable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Timestampable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Timestampable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Timestampable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Timestampable.Traits.html">Traits</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tool.html">Tool<span></span></a> <ul> <li><a href="namespace-Gedmo.Tool.Logging.html">Logging<span></span></a> <ul> <li><a href="namespace-Gedmo.Tool.Logging.DBAL.html">DBAL</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tool.Wrapper.html">Wrapper</a> </li> </ul></li> <li><a href="namespace-Gedmo.Translatable.html">Translatable<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Document.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Translatable.Document.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Translatable.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Entity.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Translatable.Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Translatable.Hydrator.html">Hydrator<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Hydrator.ORM.html">ORM</a> </li> </ul></li> <li><a href="namespace-Gedmo.Translatable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Translatable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Translatable.Query.html">Query<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Query.TreeWalker.html">TreeWalker</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Translator.html">Translator<span></span></a> <ul> <li><a href="namespace-Gedmo.Translator.Document.html">Document</a> </li> <li><a href="namespace-Gedmo.Translator.Entity.html">Entity</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tree.html">Tree<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Document.MongoDB.html">MongoDB<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Document.MongoDB.Repository.html">Repository</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Tree.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Entity.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Tree.Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tree.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Tree.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Tree.Strategy.html">Strategy<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Strategy.ODM.html">ODM<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Strategy.ODM.MongoDB.html">MongoDB</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tree.Strategy.ORM.html">ORM</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Uploadable.html">Uploadable<span></span></a> <ul> <li><a href="namespace-Gedmo.Uploadable.Event.html">Event</a> </li> <li><a href="namespace-Gedmo.Uploadable.FileInfo.html">FileInfo</a> </li> <li><a href="namespace-Gedmo.Uploadable.FilenameGenerator.html">FilenameGenerator</a> </li> <li><a href="namespace-Gedmo.Uploadable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Uploadable.Mapping.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-Gedmo.Uploadable.MimeType.html">MimeType</a> </li> <li><a href="namespace-Gedmo.Uploadable.Stub.html">Stub</a> </li> </ul></li></ul></li> <li><a href="namespace-Incenteev.html">Incenteev<span></span></a> <ul> <li><a href="namespace-Incenteev.ParameterHandler.html">ParameterHandler<span></span></a> <ul> <li><a href="namespace-Incenteev.ParameterHandler.Tests.html">Tests</a> </li> </ul></li></ul></li> <li><a href="namespace-IpTraceable.html">IpTraceable<span></span></a> <ul> <li><a href="namespace-IpTraceable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-IpTraceable.Fixture.Document.html">Document</a> </li> </ul></li></ul></li> <li><a href="namespace-JMS.html">JMS<span></span></a> <ul> <li><a href="namespace-JMS.Parser.html">Parser<span></span></a> <ul> <li><a href="namespace-JMS.Parser.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.html">Serializer<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Annotation.html">Annotation</a> </li> <li><a href="namespace-JMS.Serializer.Builder.html">Builder</a> </li> <li><a href="namespace-JMS.Serializer.Construction.html">Construction</a> </li> <li><a href="namespace-JMS.Serializer.EventDispatcher.html">EventDispatcher<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.EventDispatcher.Subscriber.html">Subscriber</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Exception.html">Exception</a> </li> <li><a href="namespace-JMS.Serializer.Exclusion.html">Exclusion</a> </li> <li><a href="namespace-JMS.Serializer.Handler.html">Handler</a> </li> <li><a href="namespace-JMS.Serializer.Metadata.html">Metadata<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Metadata.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Naming.html">Naming</a> </li> <li><a href="namespace-JMS.Serializer.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Exclusion.html">Exclusion</a> </li> <li><a href="namespace-JMS.Serializer.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Fixtures.Discriminator.html">Discriminator</a> </li> <li><a href="namespace-JMS.Serializer.Tests.Fixtures.Doctrine.html">Doctrine</a> </li> <li><a href="namespace-JMS.Serializer.Tests.Fixtures.DoctrinePHPCR.html">DoctrinePHPCR</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Tests.Handler.html">Handler</a> </li> <li><a href="namespace-JMS.Serializer.Tests.Metadata.html">Metadata<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Metadata.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Tests.Serializer.html">Serializer<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Serializer.EventDispatcher.html">EventDispatcher<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Serializer.EventDispatcher.Subscriber.html">Subscriber</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Tests.Serializer.Naming.html">Naming</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Tests.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Twig.html">Twig</a> </li> <li><a href="namespace-JMS.Serializer.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-JMS.SerializerBundle.html">SerializerBundle<span></span></a> <ul> <li><a href="namespace-JMS.SerializerBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-JMS.SerializerBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-JMS.SerializerBundle.Serializer.html">Serializer</a> </li> <li><a href="namespace-JMS.SerializerBundle.Templating.html">Templating</a> </li> <li><a href="namespace-JMS.SerializerBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-JMS.SerializerBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-JMS.SerializerBundle.Tests.DependencyInjection.Fixture.html">Fixture</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.html">TranslationBundle<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Annotation.html">Annotation</a> </li> <li><a href="namespace-JMS.TranslationBundle.Command.html">Command</a> </li> <li><a href="namespace-JMS.TranslationBundle.Controller.html">Controller</a> </li> <li><a href="namespace-JMS.TranslationBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-JMS.TranslationBundle.Exception.html">Exception</a> </li> <li><a href="namespace-JMS.TranslationBundle.Logger.html">Logger</a> </li> <li><a href="namespace-JMS.TranslationBundle.Model.html">Model</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Functional.html">Functional<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Functional.TestBundle.html">TestBundle<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Functional.TestBundle.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.Tests.Model.html">Model</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.html">Translation<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Comparison.html">Comparison</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Dumper.html">Dumper</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.html">Extractor<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.File.html">File<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.File.Fixture.html">Fixture</a> </li> </ul></li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.html">SimpleTest<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.Controller.html">Controller</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.Form.html">Form</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Loader.html">Loader<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Loader.Symfony.html">Symfony</a> </li> </ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.Tests.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-JMS.TranslationBundle.Translation.html">Translation<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Translation.Comparison.html">Comparison</a> </li> <li><a href="namespace-JMS.TranslationBundle.Translation.Dumper.html">Dumper</a> </li> <li><a href="namespace-JMS.TranslationBundle.Translation.Extractor.html">Extractor<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Translation.Extractor.File.html">File</a> </li> </ul></li> <li><a href="namespace-JMS.TranslationBundle.Translation.Loader.html">Loader<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Translation.Loader.Symfony.html">Symfony</a> </li> </ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.Twig.html">Twig</a> </li> <li><a href="namespace-JMS.TranslationBundle.Util.html">Util</a> </li> </ul></li></ul></li> <li><a href="namespace-Knp.html">Knp<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.html">MenuBundle<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Provider.html">Provider</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Renderer.html">Renderer</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Templating.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Provider.html">Provider</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Renderer.html">Renderer</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.html">Stubs<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Child.html">Child<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Child.Menu.html">Menu</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Menu.html">Menu</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Templating.html">Templating</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Knp.Menu.html">Menu<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Factory.html">Factory</a> </li> <li><a href="namespace-Knp.Menu.Integration.html">Integration<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Integration.Silex.html">Silex</a> </li> <li><a href="namespace-Knp.Menu.Integration.Symfony.html">Symfony</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Iterator.html">Iterator</a> </li> <li><a href="namespace-Knp.Menu.Loader.html">Loader</a> </li> <li><a href="namespace-Knp.Menu.Matcher.html">Matcher<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Matcher.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Provider.html">Provider</a> </li> <li><a href="namespace-Knp.Menu.Renderer.html">Renderer</a> </li> <li><a href="namespace-Knp.Menu.Silex.html">Silex<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Silex.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Tests.Factory.html">Factory</a> </li> <li><a href="namespace-Knp.Menu.Tests.Integration.html">Integration<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Tests.Integration.Silex.html">Silex</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Tests.Iterator.html">Iterator</a> </li> <li><a href="namespace-Knp.Menu.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Knp.Menu.Tests.Matcher.html">Matcher<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Tests.Matcher.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Tests.Provider.html">Provider</a> </li> <li><a href="namespace-Knp.Menu.Tests.Renderer.html">Renderer</a> </li> <li><a href="namespace-Knp.Menu.Tests.Silex.html">Silex</a> </li> <li><a href="namespace-Knp.Menu.Tests.Twig.html">Twig</a> </li> <li><a href="namespace-Knp.Menu.Tests.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Twig.html">Twig</a> </li> <li><a href="namespace-Knp.Menu.Util.html">Util</a> </li> </ul></li></ul></li> <li><a href="namespace-Loggable.html">Loggable<span></span></a> <ul> <li><a href="namespace-Loggable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Loggable.Fixture.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Loggable.Fixture.Document.Log.html">Log</a> </li> </ul></li> <li><a href="namespace-Loggable.Fixture.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Loggable.Fixture.Entity.Log.html">Log</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Lunetics.html">Lunetics<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.html">LocaleBundle<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Cookie.html">Cookie</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Event.html">Event</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.Type.html">Type</a> </li> </ul></li></ul></li> <li><a href="namespace-Lunetics.LocaleBundle.LocaleGuesser.html">LocaleGuesser</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.LocaleInformation.html">LocaleInformation</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Matcher.html">Matcher</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Session.html">Session</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Switcher.html">Switcher</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Templating.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Event.html">Event</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.Type.html">Type</a> </li> </ul></li></ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.LocaleGuesser.html">LocaleGuesser</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.LocaleInformation.html">LocaleInformation</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Templating.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Twig.Extension.html">Extension</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Validator.html">Validator</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Twig.Extension.html">Extension</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Validator.html">Validator</a> </li> </ul></li></ul></li> <li><a href="namespace-Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Mapping.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Mapping.Fixture.Compatibility.html">Compatibility</a> </li> <li><a href="namespace-Mapping.Fixture.Document.html">Document</a> </li> <li><a href="namespace-Mapping.Fixture.Unmapped.html">Unmapped</a> </li> <li><a href="namespace-Mapping.Fixture.Xml.html">Xml</a> </li> <li><a href="namespace-Mapping.Fixture.Yaml.html">Yaml</a> </li> </ul></li></ul></li> <li><a href="namespace-Metadata.html">Metadata<span></span></a> <ul> <li><a href="namespace-Metadata.Cache.html">Cache</a> </li> <li><a href="namespace-Metadata.Driver.html">Driver</a> </li> <li><a href="namespace-Metadata.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Cache.html">Cache</a> </li> <li><a href="namespace-Metadata.Tests.Driver.html">Driver<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Driver.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Driver.Fixture.A.html">A</a> </li> <li><a href="namespace-Metadata.Tests.Driver.Fixture.B.html">B</a> </li> <li><a href="namespace-Metadata.Tests.Driver.Fixture.C.html">C<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Driver.Fixture.C.SubDir.html">SubDir</a> </li> </ul></li> <li><a href="namespace-Metadata.Tests.Driver.Fixture.T.html">T</a> </li> </ul></li></ul></li> <li><a href="namespace-Metadata.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Fixtures.ComplexHierarchy.html">ComplexHierarchy</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Monolog.html">Monolog<span></span></a> <ul> <li><a href="namespace-Monolog.Formatter.html">Formatter</a> </li> <li><a href="namespace-Monolog.Handler.html">Handler<span></span></a> <ul> <li><a href="namespace-Monolog.Handler.FingersCrossed.html">FingersCrossed</a> </li> <li><a href="namespace-Monolog.Handler.SyslogUdp.html">SyslogUdp</a> </li> </ul></li> <li><a href="namespace-Monolog.Processor.html">Processor</a> </li> </ul></li> <li><a href="namespace-MyProject.html">MyProject<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.html">Proxies<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.html">__CG__<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.Common.html">Common<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.Common.Util.html">Util</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.html">OtherProject<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.html">Proxies<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.html">__CG__<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.Common.html">Common<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.Common.Util.html">Util</a> </li> </ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-NamespaceCollision.html">NamespaceCollision<span></span></a> <ul> <li><a href="namespace-NamespaceCollision.A.html">A<span></span></a> <ul> <li><a href="namespace-NamespaceCollision.A.B.html">B</a> </li> </ul></li> <li><a href="namespace-NamespaceCollision.C.html">C<span></span></a> <ul> <li><a href="namespace-NamespaceCollision.C.B.html">B</a> </li> </ul></li></ul></li> <li><a href="namespace-Namespaced.html">Namespaced</a> </li> <li><a href="namespace-Namespaced2.html">Namespaced2</a> </li> <li><a href="namespace-Negotiation.html">Negotiation<span></span></a> <ul> <li><a href="namespace-Negotiation.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-None.html">None</a> </li> <li><a href="namespace-Pequiven.html">Pequiven<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.html">SEIPBundle<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.DataFixtures.html">DataFixtures</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.Entity.html">Entity</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Pequiven.SEIPBundle.Menu.html">Menu<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Menu.Template.html">Template<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Menu.Template.Developer.html">Developer</a> </li> </ul></li></ul></li> <li><a href="namespace-Pequiven.SEIPBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Tests.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-PHP.html">PHP</a> </li> <li><a href="namespace-PhpCollection.html">PhpCollection<span></span></a> <ul> <li><a href="namespace-PhpCollection.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-PhpOption.html">PhpOption<span></span></a> <ul> <li><a href="namespace-PhpOption.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Proxies.html">Proxies<span></span></a> <ul> <li><a href="namespace-Proxies.__CG__.html">__CG__<span></span></a> <ul> <li><a href="namespace-Proxies.__CG__.Pequiven.html">Pequiven<span></span></a> <ul> <li><a href="namespace-Proxies.__CG__.Pequiven.SEIPBundle.html">SEIPBundle<span></span></a> <ul> <li><a href="namespace-Proxies.__CG__.Pequiven.SEIPBundle.Entity.html">Entity</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Psr.html">Psr<span></span></a> <ul> <li><a href="namespace-Psr.Log.html">Log<span></span></a> <ul> <li><a href="namespace-Psr.Log.Test.html">Test</a> </li> </ul></li></ul></li> <li><a href="namespace-ReferenceIntegrity.html">ReferenceIntegrity<span></span></a> <ul> <li><a href="namespace-ReferenceIntegrity.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.html">Document<span></span></a> <ul> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.ManyNullify.html">ManyNullify</a> </li> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.ManyRestrict.html">ManyRestrict</a> </li> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.OneNullify.html">OneNullify</a> </li> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.OneRestrict.html">OneRestrict</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-References.html">References<span></span></a> <ul> <li><a href="namespace-References.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-References.Fixture.ODM.html">ODM<span></span></a> <ul> <li><a href="namespace-References.Fixture.ODM.MongoDB.html">MongoDB</a> </li> </ul></li> <li><a href="namespace-References.Fixture.ORM.html">ORM</a> </li> </ul></li></ul></li> <li><a href="namespace-Sensio.html">Sensio<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.DistributionBundle.html">DistributionBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Composer.html">Composer</a> </li> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.html">Configurator<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.Form.html">Form</a> </li> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.Step.html">Step</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Sensio.Bundle.DistributionBundle.DependencyInjection.html">DependencyInjection</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.html">FrameworkExtraBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Configuration.html">Configuration</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Request.html">Request<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Request.ParamConverter.html">ParamConverter</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Routing.html">Routing</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Security.html">Security</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Templating.html">Templating</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Configuration.html">Configuration</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.EventListener.html">EventListener<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.EventListener.Fixture.html">Fixture</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Request.html">Request<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Request.ParamConverter.html">ParamConverter</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Routing.html">Routing</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.BarBundle.html">BarBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.BarBundle.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBarBundle.html">FooBarBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBarBundle.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBundle.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.html">GeneratorBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Command.html">Command<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Command.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Generator.html">Generator</a> </li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Manipulator.html">Manipulator</a> </li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.Command.html">Command</a> </li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.Generator.html">Generator</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Sluggable.html">Sluggable<span></span></a> <ul> <li><a href="namespace-Sluggable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Sluggable.Fixture.Doctrine.html">Doctrine</a> </li> <li><a href="namespace-Sluggable.Fixture.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Sluggable.Fixture.Document.Handler.html">Handler</a> </li> </ul></li> <li><a href="namespace-Sluggable.Fixture.Handler.html">Handler<span></span></a> <ul> <li><a href="namespace-Sluggable.Fixture.Handler.People.html">People</a> </li> </ul></li> <li><a href="namespace-Sluggable.Fixture.Inheritance.html">Inheritance</a> </li> <li><a href="namespace-Sluggable.Fixture.Inheritance2.html">Inheritance2</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue104.html">Issue104</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue116.html">Issue116</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue131.html">Issue131</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue449.html">Issue449</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue633.html">Issue633</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue827.html">Issue827</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue939.html">Issue939</a> </li> <li><a href="namespace-Sluggable.Fixture.MappedSuperclass.html">MappedSuperclass</a> </li> </ul></li></ul></li> <li><a href="namespace-SoftDeleteable.html">SoftDeleteable<span></span></a> <ul> <li><a href="namespace-SoftDeleteable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-SoftDeleteable.Fixture.Document.html">Document</a> </li> <li><a href="namespace-SoftDeleteable.Fixture.Entity.html">Entity</a> </li> </ul></li></ul></li> <li><a href="namespace-Sortable.html">Sortable<span></span></a> <ul> <li><a href="namespace-Sortable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Sortable.Fixture.Transport.html">Transport</a> </li> </ul></li></ul></li> <li><a href="namespace-Stof.html">Stof<span></span></a> <ul> <li><a href="namespace-Stof.DoctrineExtensionsBundle.html">DoctrineExtensionsBundle<span></span></a> <ul> <li><a href="namespace-Stof.DoctrineExtensionsBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Stof.DoctrineExtensionsBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Stof.DoctrineExtensionsBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Stof.DoctrineExtensionsBundle.Uploadable.html">Uploadable</a> </li> </ul></li></ul></li> <li class="active"><a href="namespace-Symfony.html">Symfony<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.html">Bridge<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.DataFixtures.html">DataFixtures</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.CompilerPass.html">CompilerPass</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.Security.UserProvider.html">UserProvider</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.ExpressionLanguage.html">ExpressionLanguage</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.HttpFoundation.html">HttpFoundation</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Logger.html">Logger</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Security.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Security.User.html">User</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Test.html">Test</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DataFixtures.html">DataFixtures</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DependencyInjection.CompilerPass.html">CompilerPass</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.ExpressionLanguage.html">ExpressionLanguage</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.HttpFoundation.html">HttpFoundation</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Logger.html">Logger</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Security.User.html">User</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Validator.Constraints.html">Constraints</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Validator.Constraints.html">Constraints</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Monolog.html">Monolog<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Monolog.Formatter.html">Formatter</a> </li> <li><a href="namespace-Symfony.Bridge.Monolog.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Bridge.Monolog.Processor.html">Processor</a> </li> <li><a href="namespace-Symfony.Bridge.Monolog.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Monolog.Tests.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Bridge.Monolog.Tests.Processor.html">Processor</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Propel1.html">Propel1<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.Security.UserProvider.html">UserProvider</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Propel1.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.Form.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Form.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Form.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Propel1.Logger.html">Logger</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.Security.User.html">User</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.DataTransformer.html">DataTransformer</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.ProxyManager.html">ProxyManager<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.html">LazyProxy<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.Instantiator.html">Instantiator</a> </li> <li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.PhpDumper.html">PhpDumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.html">LazyProxy<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.Instantiator.html">Instantiator</a> </li> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.PhpDumper.html">PhpDumper</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Twig.Extension.html">Extension</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Form.html">Form</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.NodeVisitor.html">NodeVisitor</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Twig.Tests.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Twig.Tests.Extension.Fixtures.html">Fixtures</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.NodeVisitor.html">NodeVisitor</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.TokenParser.html">TokenParser</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.Translation.html">Translation</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Twig.TokenParser.html">TokenParser</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Translation.html">Translation</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.html">AsseticBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Config.html">Config</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.html">Factory<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Resource.html">Resource</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Worker.html">Worker</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Routing.html">Routing</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Templating.html">Templating</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Factory.html">Factory<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Factory.Resource.html">Resource</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Templating.html">Templating</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.TestBundle.html">TestBundle</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.html">FrameworkBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.Descriptor.html">Descriptor</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Fragment.html">Fragment</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.HttpCache.html">HttpCache</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Routing.html">Routing</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Asset.html">Asset</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Test.html">Test</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Console.Descriptor.html">Descriptor</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fixtures.BaseBundle.html">BaseBundle</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fragment.html">Fragment</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.html">Functional<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.app.html">app</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.TestBundle.html">TestBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.TestBundle.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Routing.html">Routing</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Helper.html">Helper<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Helper.Fixtures.html">Fixtures</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Translation.html">Translation</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Validator.html">Validator</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Translation.html">Translation</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Validator.html">Validator</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.MonologBundle.html">MonologBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.MonologBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.MonologBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.html">SecurityBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Compiler.html">Compiler</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.Factory.html">Factory</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.UserProvider.html">UserProvider</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Security.html">Security</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Templating.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.Security.Factory.html">Factory</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.html">Functional<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.app.html">app</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.html">CsrfFormLoginBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.Form.html">Form</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.html">FormLoginBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.Security.html">Security</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Twig.Extension.html">Extension</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.html">SwiftmailerBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.TwigBundle.html">TwigBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.TwigBundle.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Debug.html">Debug</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.TwigBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Extension.html">Extension</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.TokenParser.html">TokenParser</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.TwigBundle.TokenParser.html">TokenParser</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.html">WebProfilerBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Profiler.html">Profiler</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.Profiler.html">Profiler</a> </li> </ul></li></ul></li></ul></li> <li class="active"><a href="namespace-Symfony.Component.html">Component<span></span></a> <ul> <li><a href="namespace-Symfony.Component.BrowserKit.html">BrowserKit<span></span></a> <ul> <li><a href="namespace-Symfony.Component.BrowserKit.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.ClassLoader.html">ClassLoader<span></span></a> <ul> <li><a href="namespace-Symfony.Component.ClassLoader.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.html">Config<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Definition.html">Definition<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Definition.Builder.html">Builder</a> </li> <li><a href="namespace-Symfony.Component.Config.Definition.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.Config.Definition.Exception.html">Exception</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Config.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Config.Resource.html">Resource</a> </li> <li><a href="namespace-Symfony.Component.Config.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Tests.Definition.html">Definition<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Tests.Definition.Builder.html">Builder</a> </li> <li><a href="namespace-Symfony.Component.Config.Tests.Definition.Dumper.html">Dumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Tests.Fixtures.Configuration.html">Configuration</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Config.Tests.Resource.html">Resource</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Console.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Component.Console.Descriptor.html">Descriptor</a> </li> <li><a href="namespace-Symfony.Component.Console.Event.html">Event</a> </li> <li><a href="namespace-Symfony.Component.Console.Formatter.html">Formatter</a> </li> <li><a href="namespace-Symfony.Component.Console.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Component.Console.Input.html">Input</a> </li> <li><a href="namespace-Symfony.Component.Console.Output.html">Output</a> </li> <li><a href="namespace-Symfony.Component.Console.Tester.html">Tester</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Console.Tests.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Descriptor.html">Descriptor</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Formatter.html">Formatter</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Input.html">Input</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Output.html">Output</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Tester.html">Tester</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.CssSelector.html">CssSelector<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Parser.html">Parser<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.Parser.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Parser.Shortcut.html">Shortcut</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Parser.Tokenizer.html">Tokenizer</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.CssSelector.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.Tests.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.html">Parser<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.Shortcut.html">Shortcut</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.CssSelector.Tests.XPath.html">XPath</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.CssSelector.XPath.html">XPath<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.XPath.Extension.html">Extension</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Debug.html">Debug<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Debug.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Debug.FatalErrorHandler.html">FatalErrorHandler</a> </li> <li><a href="namespace-Symfony.Component.Debug.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Debug.Tests.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Debug.Tests.FatalErrorHandler.html">FatalErrorHandler</a> </li> <li><a href="namespace-Symfony.Component.Debug.Tests.Fixtures.html">Fixtures</a> </li> </ul></li></ul></li> <li class="active"><a href="namespace-Symfony.Component.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DependencyInjection.Compiler.html">Compiler</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Dump.html">Dump</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Extension.html">Extension</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.html">LazyProxy<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.Instantiator.html">Instantiator</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.PhpDumper.html">PhpDumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.DependencyInjection.Loader.html">Loader</a> </li> <li class="active"><a href="namespace-Symfony.Component.DependencyInjection.ParameterBag.html">ParameterBag</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Compiler.html">Compiler</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Extension.html">Extension</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.html">LazyProxy<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.Instantiator.html">Instantiator</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.PhpDumper.html">PhpDumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.ParameterBag.html">ParameterBag</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.DomCrawler.html">DomCrawler<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DomCrawler.Field.html">Field</a> </li> <li><a href="namespace-Symfony.Component.DomCrawler.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DomCrawler.Tests.Field.html">Field</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.EventDispatcher.html">EventDispatcher<span></span></a> <ul> <li><a href="namespace-Symfony.Component.EventDispatcher.Debug.html">Debug</a> </li> <li><a href="namespace-Symfony.Component.EventDispatcher.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.ExpressionLanguage.html">ExpressionLanguage<span></span></a> <ul> <li><a href="namespace-Symfony.Component.ExpressionLanguage.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Component.ExpressionLanguage.ParserCache.html">ParserCache</a> </li> <li><a href="namespace-Symfony.Component.ExpressionLanguage.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.ExpressionLanguage.Tests.Node.html">Node</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Filesystem.html">Filesystem<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Filesystem.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Filesystem.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Finder.html">Finder<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Finder.Adapter.html">Adapter</a> </li> <li><a href="namespace-Symfony.Component.Finder.Comparator.html">Comparator</a> </li> <li><a href="namespace-Symfony.Component.Finder.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Finder.Expression.html">Expression</a> </li> <li><a href="namespace-Symfony.Component.Finder.Iterator.html">Iterator</a> </li> <li><a href="namespace-Symfony.Component.Finder.Shell.html">Shell</a> </li> <li><a href="namespace-Symfony.Component.Finder.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Finder.Tests.Comparator.html">Comparator</a> </li> <li><a href="namespace-Symfony.Component.Finder.Tests.Expression.html">Expression</a> </li> <li><a href="namespace-Symfony.Component.Finder.Tests.FakeAdapter.html">FakeAdapter</a> </li> <li><a href="namespace-Symfony.Component.Finder.Tests.Iterator.html">Iterator</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.Core.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.DataMapper.html">DataMapper</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.Type.html">Type</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.View.html">View</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Extension.Csrf.html">Csrf<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.Csrf.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Csrf.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.html">DataCollector<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.Proxy.html">Proxy</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Extension.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.HttpFoundation.html">HttpFoundation<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.HttpFoundation.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Extension.Templating.html">Templating</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.Constraints.html">Constraints</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.Type.html">Type</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.ViolationMapper.html">ViolationMapper</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Form.Guess.html">Guess</a> </li> <li><a href="namespace-Symfony.Component.Form.Test.html">Test</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.DataMapper.html">DataMapper</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.html">Csrf<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.CsrfProvider.html">CsrfProvider</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.DataCollector.html">DataCollector<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.DataCollector.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.HttpFoundation.html">HttpFoundation<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.HttpFoundation.EventListener.html">EventListener</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Constraints.html">Constraints</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Type.html">Type</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.ViolationMapper.html">ViolationMapper</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Guess.html">Guess</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpFoundation.html">HttpFoundation<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.File.html">File<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.File.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.File.MimeType.html">MimeType</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.html">Session<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Attribute.html">Attribute</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Flash.html">Flash</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.html">Storage<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.Proxy.html">Proxy</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.File.html">File<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.File.MimeType.html">MimeType</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.html">Session<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Attribute.html">Attribute</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Flash.html">Flash</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.html">Storage<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.Proxy.html">Proxy</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.HttpKernel.html">HttpKernel<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Bundle.html">Bundle</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.CacheClearer.html">CacheClearer</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Config.html">Config</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.DataCollector.html">DataCollector<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.DataCollector.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpKernel.Debug.html">Debug</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Event.html">Event</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Fragment.html">Fragment</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.HttpCache.html">HttpCache</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Log.html">Log</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Profiler.html">Profiler</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Bundle.html">Bundle</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.CacheClearer.html">CacheClearer</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Config.html">Config</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Debug.html">Debug</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionAbsentBundle.html">ExtensionAbsentBundle</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionLoadedBundle.html">ExtensionLoadedBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionLoadedBundle.DependencyInjection.html">DependencyInjection</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.html">ExtensionPresentBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.DependencyInjection.html">DependencyInjection</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fragment.html">Fragment</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.HttpCache.html">HttpCache</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Profiler.html">Profiler<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Profiler.Mock.html">Mock</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.Icu.html">Icu<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Icu.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.html">Intl<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Collator.html">Collator</a> </li> <li><a href="namespace-Symfony.Component.Intl.DateFormatter.html">DateFormatter<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.DateFormatter.DateFormat.html">DateFormat</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Intl.Globals.html">Globals</a> </li> <li><a href="namespace-Symfony.Component.Intl.Locale.html">Locale</a> </li> <li><a href="namespace-Symfony.Component.Intl.NumberFormatter.html">NumberFormatter</a> </li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.html">ResourceBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Compiler.html">Compiler</a> </li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Reader.html">Reader</a> </li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Transformer.html">Transformer<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Transformer.Rule.html">Rule</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Writer.html">Writer</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.Collator.html">Collator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.Collator.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.DateFormatter.html">DateFormatter<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.DateFormatter.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.Globals.html">Globals<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.Globals.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.Locale.html">Locale<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.Locale.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.NumberFormatter.html">NumberFormatter<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.NumberFormatter.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.html">ResourceBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Reader.html">Reader</a> </li> <li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Writer.html">Writer</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Locale.html">Locale<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Locale.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Locale.Tests.Stub.html">Stub</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.OptionsResolver.html">OptionsResolver<span></span></a> <ul> <li><a href="namespace-Symfony.Component.OptionsResolver.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.OptionsResolver.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Process.html">Process<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Process.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Process.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.PropertyAccess.html">PropertyAccess<span></span></a> <ul> <li><a href="namespace-Symfony.Component.PropertyAccess.Exception.html">Exception</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.html">Routing<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Annotation.html">Annotation</a> </li> <li><a href="namespace-Symfony.Component.Routing.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Routing.Generator.html">Generator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Generator.Dumper.html">Dumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Routing.Matcher.html">Matcher<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Matcher.Dumper.html">Dumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Tests.Annotation.html">Annotation</a> </li> <li><a href="namespace-Symfony.Component.Routing.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Tests.Fixtures.AnnotatedClasses.html">AnnotatedClasses</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.Tests.Generator.html">Generator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Tests.Generator.Dumper.html">Dumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Routing.Tests.Matcher.html">Matcher<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Tests.Matcher.Dumper.html">Dumper</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Acl.html">Acl<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Acl.Dbal.html">Dbal</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Domain.html">Domain</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Model.html">Model</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Permission.html">Permission</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.Dbal.html">Dbal</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.Domain.html">Domain</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.Permission.html">Permission</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Acl.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Authentication.html">Authentication<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Authentication.Provider.html">Provider</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Authentication.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Authentication.Token.html">Token</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.Authorization.html">Authorization<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Authorization.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.Encoder.html">Encoder</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Event.html">Event</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Role.html">Role</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.html">Authentication<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.Provider.html">Provider</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.Token.html">Token</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authorization.html">Authorization<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authorization.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Encoder.html">Encoder</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Role.html">Role</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.User.html">User</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Validator.Constraints.html">Constraints</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Security.Core.User.html">User</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Validator.Constraints.html">Constraints</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Security.Csrf.html">Csrf<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Csrf.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Security.Csrf.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Csrf.Tests.TokenGenerator.html">TokenGenerator</a> </li> <li><a href="namespace-Symfony.Component.Security.Csrf.Tests.TokenStorage.html">TokenStorage</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Csrf.TokenGenerator.html">TokenGenerator</a> </li> <li><a href="namespace-Symfony.Component.Security.Csrf.TokenStorage.html">TokenStorage</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Http.html">Http<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Http.Authentication.html">Authentication</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Authorization.html">Authorization</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.EntryPoint.html">EntryPoint</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Event.html">Event</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Firewall.html">Firewall</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Logout.html">Logout</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Session.html">Session</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Http.Tests.Authentication.html">Authentication</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.EntryPoint.html">EntryPoint</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.Firewall.html">Firewall</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.Logout.html">Logout</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.Session.html">Session</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Security.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Tests.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Tests.Core.Authentication.html">Authentication<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Tests.Core.Authentication.Token.html">Token</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Tests.Core.User.html">User</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Tests.Http.html">Http<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Tests.Http.Firewall.html">Firewall</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.Serializer.html">Serializer<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Serializer.Encoder.html">Encoder</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Normalizer.html">Normalizer</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Serializer.Tests.Encoder.html">Encoder</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Tests.Normalizer.html">Normalizer</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Stopwatch.html">Stopwatch</a> </li> <li><a href="namespace-Symfony.Component.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Templating.Asset.html">Asset</a> </li> <li><a href="namespace-Symfony.Component.Templating.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Component.Templating.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Templating.Storage.html">Storage</a> </li> <li><a href="namespace-Symfony.Component.Templating.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Templating.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Templating.Tests.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Component.Templating.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Templating.Tests.Storage.html">Storage</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Translation.html">Translation<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Translation.Catalogue.html">Catalogue</a> </li> <li><a href="namespace-Symfony.Component.Translation.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.Translation.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Translation.Extractor.html">Extractor</a> </li> <li><a href="namespace-Symfony.Component.Translation.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Translation.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Translation.Tests.Catalogue.html">Catalogue</a> </li> <li><a href="namespace-Symfony.Component.Translation.Tests.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.Translation.Tests.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Translation.Writer.html">Writer</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Validator.Constraints.html">Constraints</a> </li> <li><a href="namespace-Symfony.Component.Validator.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Validator.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Validator.Mapping.Cache.html">Cache</a> </li> <li><a href="namespace-Symfony.Component.Validator.Mapping.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Validator.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Validator.Tests.Constraints.html">Constraints</a> </li> <li><a href="namespace-Symfony.Component.Validator.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.Cache.html">Cache</a> </li> <li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.Loader.html">Loader</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.Yaml.html">Yaml<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Yaml.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Yaml.Tests.html">Tests</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.html">Tecnocreaciones<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.html">AjaxFOSUserBundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Event.html">Event</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Handler.html">Handler</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Tests.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.html">InstallBundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Command.html">Command</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Tests.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.html">TemplateBundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.html">Menu<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.Template.html">Template<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.Template.Developer.html">Developer</a> </li> </ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Tests.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Vzla.html">Vzla<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.html">GovernmentBundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.html">Menu<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.Template.html">Template<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.Template.Developer.html">Developer</a> </li> </ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Model.html">Model</a> </li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Tests.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Twig.Extension.html">Extension</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-TestBundle.html">TestBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.Fabpot.html">Fabpot<span></span></a> <ul> <li><a href="namespace-TestBundle.Fabpot.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.Fabpot.FooBundle.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-TestBundle.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.FooBundle.Controller.html">Controller<span></span></a> <ul> <li><a href="namespace-TestBundle.FooBundle.Controller.Sub.html">Sub</a> </li> <li><a href="namespace-TestBundle.FooBundle.Controller.Test.html">Test</a> </li> </ul></li></ul></li> <li><a href="namespace-TestBundle.Sensio.html">Sensio<span></span></a> <ul> <li><a href="namespace-TestBundle.Sensio.Cms.html">Cms<span></span></a> <ul> <li><a href="namespace-TestBundle.Sensio.Cms.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.Sensio.Cms.FooBundle.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-TestBundle.Sensio.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.Sensio.FooBundle.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-TestFixtures.html">TestFixtures</a> </li> <li><a href="namespace-Timestampable.html">Timestampable<span></span></a> <ul> <li><a href="namespace-Timestampable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Timestampable.Fixture.Document.html">Document</a> </li> </ul></li></ul></li> <li><a href="namespace-Tool.html">Tool</a> </li> <li><a href="namespace-Translatable.html">Translatable<span></span></a> <ul> <li><a href="namespace-Translatable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Translatable.Fixture.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Translatable.Fixture.Document.Personal.html">Personal</a> </li> </ul></li> <li><a href="namespace-Translatable.Fixture.Issue114.html">Issue114</a> </li> <li><a href="namespace-Translatable.Fixture.Issue138.html">Issue138</a> </li> <li><a href="namespace-Translatable.Fixture.Issue165.html">Issue165</a> </li> <li><a href="namespace-Translatable.Fixture.Issue173.html">Issue173</a> </li> <li><a href="namespace-Translatable.Fixture.Issue75.html">Issue75</a> </li> <li><a href="namespace-Translatable.Fixture.Issue922.html">Issue922</a> </li> <li><a href="namespace-Translatable.Fixture.Personal.html">Personal</a> </li> <li><a href="namespace-Translatable.Fixture.Template.html">Template</a> </li> <li><a href="namespace-Translatable.Fixture.Type.html">Type</a> </li> </ul></li></ul></li> <li><a href="namespace-Translator.html">Translator<span></span></a> <ul> <li><a href="namespace-Translator.Fixture.html">Fixture</a> </li> </ul></li> <li><a href="namespace-Tree.html">Tree<span></span></a> <ul> <li><a href="namespace-Tree.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Tree.Fixture.Closure.html">Closure</a> </li> <li><a href="namespace-Tree.Fixture.Document.html">Document</a> </li> <li><a href="namespace-Tree.Fixture.Genealogy.html">Genealogy</a> </li> <li><a href="namespace-Tree.Fixture.Mock.html">Mock</a> </li> <li><a href="namespace-Tree.Fixture.Repository.html">Repository</a> </li> <li><a href="namespace-Tree.Fixture.Transport.html">Transport</a> </li> </ul></li></ul></li> <li><a href="namespace-Uploadable.html">Uploadable<span></span></a> <ul> <li><a href="namespace-Uploadable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Uploadable.Fixture.Entity.html">Entity</a> </li> </ul></li></ul></li> <li><a href="namespace-Wrapper.html">Wrapper<span></span></a> <ul> <li><a href="namespace-Wrapper.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Wrapper.Fixture.Document.html">Document</a> </li> <li><a href="namespace-Wrapper.Fixture.Entity.html">Entity</a> </li> </ul></li></ul></li> </ul> </div> <hr /> <div id="elements"> <h3>Classes</h3> <ul> <li><a href="class-Symfony.Component.DependencyInjection.ParameterBag.FrozenParameterBag.html">FrozenParameterBag</a></li> <li><a href="class-Symfony.Component.DependencyInjection.ParameterBag.ParameterBag.html">ParameterBag</a></li> </ul> <h3>Interfaces</h3> <ul> <li><a href="class-Symfony.Component.DependencyInjection.ParameterBag.ParameterBagInterface.html">ParameterBagInterface</a></li> </ul> </div> </div> </div> <div id="splitter"></div> <div id="right"> <div id="rightInner"> <form id="search"> <input type="hidden" name="cx" value="" /> <input type="hidden" name="ie" value="UTF-8" /> <input type="text" name="q" class="text" /> <input type="submit" value="Search" /> </form> <div id="navigation"> <ul> <li> <a href="index.html" title="Overview"><span>Overview</span></a> </li> <li class="active"> <span>Namespace</span> </li> <li> <span>Class</span> </li> </ul> <ul> <li> <a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a> </li> </ul> <ul> </ul> </div> <div id="content" class="namespace"> <h1>Namespace <a href="namespace-Symfony.html">Symfony</a>\<a href="namespace-Symfony.Component.html">Component</a>\<a href="namespace-Symfony.Component.DependencyInjection.html">DependencyInjection</a>\ParameterBag</h1> <table class="summary" id="classes"> <caption>Classes summary</caption> <tr> <td class="name"><a href="class-Symfony.Component.DependencyInjection.ParameterBag.FrozenParameterBag.html">FrozenParameterBag</a></td> <td>Holds read-only parameters.</td> </tr> <tr> <td class="name"><a href="class-Symfony.Component.DependencyInjection.ParameterBag.ParameterBag.html">ParameterBag</a></td> <td>Holds parameters.</td> </tr> </table> <table class="summary" id="interfaces"> <caption>Interfaces summary</caption> <tr> <td class="name"><a href="class-Symfony.Component.DependencyInjection.ParameterBag.ParameterBagInterface.html">ParameterBagInterface</a></td> <td>ParameterBagInterface.</td> </tr> </table> </div> <div id="footer"> seip API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a> </div> </div> </div> </body> </html>
{ "content_hash": "89809d88b5819633a0540b672c834bd3", "timestamp": "", "source": "github", "line_count": 3357, "max_line_length": 221, "avg_line_length": 46.06732201370271, "alnum_prop": 0.6496301277740417, "repo_name": "Tecnocreaciones/VzlaGovernmentTemplateDeveloperSeed", "id": "bc57091184297bdab796563e16e2d79526b17e0c", "size": "154648", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "api/namespace-Symfony.Component.DependencyInjection.ParameterBag.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "10864" }, { "name": "JavaScript", "bytes": "131316" }, { "name": "PHP", "bytes": "211008" }, { "name": "Perl", "bytes": "2621" } ], "symlink_target": "" }
<?php namespace Oro\Bundle\SoapBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; /** * Replace annotation readers to sets name="" for FOS Rest routing annotations. * @todo remove this class when https://github.com/FriendsOfSymfony/FOSRestBundle/issues/1086 will be fixed */ class FixRestAnnotationsPass implements CompilerPassInterface { const ROUTING_LOADER_SERVICE = 'sensio_framework_extra.routing.loader.annot_class'; const REST_ROUTING_LOADER_SERVICE = 'fos_rest.routing.loader.reader.action'; const ANNOTATION_READER_SERVICE_SUFFIX = '.annotation_reader'; const ANNOTATION_READER_CLASS = 'Oro\Bundle\SoapBundle\Routing\RestAnnotationReader'; /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if ($container->has(self::ROUTING_LOADER_SERVICE) && $container->has(self::REST_ROUTING_LOADER_SERVICE)) { $this->replaceAnnotationReader( $container, self::ROUTING_LOADER_SERVICE, 0 ); $this->replaceAnnotationReader( $container, self::REST_ROUTING_LOADER_SERVICE, 0 ); } } /** * @param ContainerBuilder $container * @param string $routingLoaderServiceId * @param string $annotationReaderArgumentId */ protected function replaceAnnotationReader( ContainerBuilder $container, $routingLoaderServiceId, $annotationReaderArgumentId ) { $routingLoaderDef = $container->getDefinition($routingLoaderServiceId); $annotationReaderServiceId = $routingLoaderServiceId . self::ANNOTATION_READER_SERVICE_SUFFIX; $annotationReaderDef = new Definition( self::ANNOTATION_READER_CLASS, [$routingLoaderDef->getArgument($annotationReaderArgumentId)] ); $annotationReaderDef->setPublic(false); $container->addDefinitions([$annotationReaderServiceId => $annotationReaderDef]); $routingLoaderDef->replaceArgument( $annotationReaderArgumentId, new Reference($annotationReaderServiceId) ); } }
{ "content_hash": "07eb7fe5525a763852c9f08483019f35", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 114, "avg_line_length": 36.26865671641791, "alnum_prop": 0.6786008230452675, "repo_name": "trustify/oroplatform", "id": "caa7c022ebd5bf54e55a3e755192700df151ab5c", "size": "2430", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "src/Oro/Bundle/SoapBundle/DependencyInjection/Compiler/FixRestAnnotationsPass.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "723257" }, { "name": "Cucumber", "bytes": "8610" }, { "name": "HTML", "bytes": "1597517" }, { "name": "JavaScript", "bytes": "5554468" }, { "name": "PHP", "bytes": "29776857" } ], "symlink_target": "" }
package com.cubicb.ssm.projectile; import com.cubicb.ssm.events.UpdateEvent; import com.cubicb.ssm.events.UpdateType; import org.bukkit.Bukkit; import org.bukkit.Sound; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.plugin.Plugin; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * Created by Brad S on 5/25/2017. */ public class ProjectileManager implements Listener { private HashMap<Entity, ProjectileData> thrown = new HashMap<Entity, ProjectileData>(); public ProjectileManager(Plugin plugin){ Bukkit.getPluginManager().registerEvents(this, plugin); } public void addThrow(Entity thrownE, LivingEntity thrower, Throwable callback, long time, boolean hP, boolean hB, boolean idle, boolean pickup, double hitboxGrow, Sound sound, float pitch, float volume, UpdateType refresh){ this.thrown.put(thrownE, new ProjectileData(this, thrownE, thrower, callback, System.currentTimeMillis()+time, hP, hB, idle, pickup, hitboxGrow, sound, pitch, volume, refresh)); } @EventHandler public void update(UpdateEvent e){ //update projectiles tracked in thrown hashmap if(e.getType() == UpdateType.TICK){ //check if projectile is dead or invalid //check if projectile has collided for (Iterator<Map.Entry<Entity, ProjectileData>> iterator = thrown.entrySet().iterator(); iterator.hasNext();) { Map.Entry<Entity, ProjectileData> entry = iterator.next(); Entity cur = entry.getKey(); if (cur.isDead() || !cur.isValid()) { //remove if is dead or invalid iterator.remove(); continue; } else if (thrown.get(cur).collision()) //remove if projectile has collided iterator.remove(); } } //display effect for each projectile for(ProjectileData cur : thrown.values()){ cur.effect(e); } } @EventHandler public void pickup(PlayerPickupItemEvent e){ //listen for when a tracked projectile is pickup up if(e.isCancelled()){ return; } //check if projectile can be picked up by player and check if projectile is allowed to be picked up if(thrown.containsKey(e.getItem())){ if(!thrown.get(e.getItem()).canPickup(e.getPlayer())){ e.setCancelled(true); } } } }
{ "content_hash": "402495e3e532c5d7e6e0f74a1db36ffb", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 159, "avg_line_length": 34.8125, "alnum_prop": 0.6186714542190305, "repo_name": "CubicB/Super-Smash-Mobs-Reborn", "id": "bd4696d487cba9ade0429d3cb4934ba1ff69d69d", "size": "2785", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/com/cubicb/ssm/projectile/ProjectileManager.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "547906" } ], "symlink_target": "" }
require "embrace" module Embrace module Brackets module_function def from_brackets(opening, closing) ->(text) { "#{opening}#{text}#{closing}" } end def from_str(style) i = style.size / 2 from_brackets(style[0...i], style[i..-1]) end end module_function def Brackets(style_or_opening, *closing) return Brackets.from_brackets(style_or_opening, *closing) unless closing.empty? case style_or_opening when Proc then style_or_opening when Array then Brackets.from_brackets(*style_or_opening) else Brackets.from_str(style_or_opening.to_s) end end end
{ "content_hash": "116a90e896d66002fc6fe4a0b55ed6ea", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 83, "avg_line_length": 21.689655172413794, "alnum_prop": 0.6581875993640699, "repo_name": "johncarney/embrace", "id": "2ff69f1b38e2104d80c58bcd1a320ea3458870c5", "size": "629", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/embrace/brackets.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "15162" }, { "name": "Shell", "bytes": "131" } ], "symlink_target": "" }
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include "mscorlib_System_MulticastDelegate3201952435.h" #include "mscorlib_System_Void1841601450.h" // System.Object struct Il2CppObject; // System.AssemblyLoadEventArgs struct AssemblyLoadEventArgs_t4233815743; // System.IAsyncResult struct IAsyncResult_t1999651008; // System.AsyncCallback struct AsyncCallback_t163412349; #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.AssemblyLoadEventHandler struct AssemblyLoadEventHandler_t2169307382 : public MulticastDelegate_t3201952435 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif
{ "content_hash": "6c2f401e02d54804412c40d1160eb1d5", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 84, "avg_line_length": 18.772727272727273, "alnum_prop": 0.788135593220339, "repo_name": "WestlakeAPC/unity-game", "id": "adaabc88df1f2500b71a6ba8d7cd656c64583d8c", "size": "828", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Xcode Project/Classes/Native/mscorlib_System_AssemblyLoadEventHandler2169307382.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "2203895" }, { "name": "C++", "bytes": "30788244" }, { "name": "Objective-C", "bytes": "60881" }, { "name": "Objective-C++", "bytes": "297711" }, { "name": "Shell", "bytes": "1736" } ], "symlink_target": "" }
import sympy import collections import stepprinter from stepprinter import functionnames, replace_u_var from sympy.core.function import AppliedUndef from sympy.functions.elementary.trigonometric import TrigonometricFunction from sympy.strategies.core import switch, identity def Rule(name, props=""): return collections.namedtuple(name, props + " context symbol") ConstantRule = Rule("ConstantRule", "number") ConstantTimesRule = Rule("ConstantTimesRule", "constant other substep") PowerRule = Rule("PowerRule", "base exp") AddRule = Rule("AddRule", "substeps") MulRule = Rule("MulRule", "terms substeps") DivRule = Rule("DivRule", "numerator denominator numerstep denomstep") ChainRule = Rule("ChainRule", "substep inner u_var innerstep") TrigRule = Rule("TrigRule", "f") ExpRule = Rule("ExpRule", "f base") LogRule = Rule("LogRule", "arg base") FunctionRule = Rule("FunctionRule") AlternativeRule = Rule("AlternativeRule", "alternatives") DontKnowRule = Rule("DontKnowRule") RewriteRule = Rule("RewriteRule", "rewritten substep") DerivativeInfo = collections.namedtuple('DerivativeInfo', 'expr symbol') evaluators = {} def evaluates(rule): def _evaluates(func): func.rule = rule evaluators[rule] = func return func return _evaluates def power_rule(derivative): expr, symbol = derivative.expr, derivative.symbol base, exp = expr.as_base_exp() if not base.has(symbol): if isinstance(exp, sympy.Symbol): return ExpRule(expr, base, expr, symbol) else: u = sympy.Dummy() f = base ** u return ChainRule( ExpRule(f, base, f, u), exp, u, diff_steps(exp, symbol), expr, symbol ) elif not exp.has(symbol): if isinstance(base, sympy.Symbol): return PowerRule(base, exp, expr, symbol) else: u = sympy.Dummy() f = u ** exp return ChainRule( PowerRule(u, exp, f, u), base, u, diff_steps(base, symbol), expr, symbol ) else: return DontKnowRule(expr, symbol) def add_rule(derivative): expr, symbol = derivative.expr, derivative.symbol return AddRule([diff_steps(arg, symbol) for arg in expr.args], expr, symbol) def constant_rule(derivative): expr, symbol = derivative.expr, derivative.symbol return ConstantRule(expr, expr, symbol) def mul_rule(derivative): expr, symbol = derivative terms = expr.args is_div = 1 / sympy.Wild("denominator") coeff, f = expr.as_independent(symbol) if coeff != 1: return ConstantTimesRule(coeff, f, diff_steps(f, symbol), expr, symbol) numerator, denominator = expr.as_numer_denom() if denominator != 1: return DivRule(numerator, denominator, diff_steps(numerator, symbol), diff_steps(denominator, symbol), expr, symbol) return MulRule(terms, [diff_steps(g, symbol) for g in terms], expr, symbol) def trig_rule(derivative): expr, symbol = derivative arg = expr.args[0] default = TrigRule(expr, expr, symbol) if not isinstance(arg, sympy.Symbol): u = sympy.Dummy() default = ChainRule( TrigRule(expr.func(u), expr.func(u), u), arg, u, diff_steps(arg, symbol), expr, symbol) if isinstance(expr, (sympy.sin, sympy.cos)): return default elif isinstance(expr, sympy.tan): f_r = sympy.sin(arg) / sympy.cos(arg) return AlternativeRule([ default, RewriteRule(f_r, diff_steps(f_r, symbol), expr, symbol) ], expr, symbol) elif isinstance(expr, sympy.csc): f_r = 1 / sympy.sin(arg) return AlternativeRule([ default, RewriteRule(f_r, diff_steps(f_r, symbol), expr, symbol) ], expr, symbol) elif isinstance(expr, sympy.sec): f_r = 1 / sympy.cos(arg) return AlternativeRule([ default, RewriteRule(f_r, diff_steps(f_r, symbol), expr, symbol) ], expr, symbol) elif isinstance(expr, sympy.cot): f_r_1 = 1 / sympy.tan(arg) f_r_2 = sympy.cos(arg) / sympy.sin(arg) return AlternativeRule([ default, RewriteRule(f_r_1, diff_steps(f_r_1, symbol), expr, symbol), RewriteRule(f_r_2, diff_steps(f_r_2, symbol), expr, symbol) ], expr, symbol) else: return DontKnowRule(f, symbol) def exp_rule(derivative): expr, symbol = derivative exp = expr.args[0] if isinstance(exp, sympy.Symbol): return ExpRule(expr, sympy.E, expr, symbol) else: u = sympy.Dummy() f = sympy.exp(u) return ChainRule(ExpRule(f, sympy.E, f, u), exp, u, diff_steps(exp, symbol), expr, symbol) def log_rule(derivative): expr, symbol = derivative arg = expr.args[0] if len(expr.args) == 2: base = expr.args[1] else: base = sympy.E if isinstance(arg, sympy.Symbol): return LogRule(arg, base, expr, symbol) else: u = sympy.Dummy() return ChainRule(LogRule(u, base, sympy.log(u, base), u), arg, u, diff_steps(arg, symbol), expr, symbol) def function_rule(derivative): return FunctionRule(derivative.expr, derivative.symbol) @evaluates(ConstantRule) def eval_constant(*args): return 0 @evaluates(ConstantTimesRule) def eval_constanttimes(constant, other, substep, expr, symbol): return constant * diff(substep) @evaluates(AddRule) def eval_add(substeps, expr, symbol): results = [diff(step) for step in substeps] return sum(results) @evaluates(DivRule) def eval_div(numer, denom, numerstep, denomstep, expr, symbol): d_numer = diff(numerstep) d_denom = diff(denomstep) return (denom * d_numer - numer * d_denom) / (denom **2) @evaluates(ChainRule) def eval_chain(substep, inner, u_var, innerstep, expr, symbol): return diff(substep).subs(u_var, inner) * diff(innerstep) @evaluates(PowerRule) @evaluates(ExpRule) @evaluates(LogRule) @evaluates(DontKnowRule) @evaluates(FunctionRule) def eval_default(*args): func, symbol = args[-2], args[-1] if isinstance(func, sympy.Symbol): func = sympy.Pow(func, 1, evaluate=False) # Automatically derive and apply the rule (don't use diff() directly as # chain rule is a separate step) substitutions = [] mapping = {} constant_symbol = sympy.Dummy() for arg in func.args: if symbol in arg.free_symbols: mapping[symbol] = arg substitutions.append(symbol) else: mapping[constant_symbol] = arg substitutions.append(constant_symbol) rule = func.func(*substitutions).diff(symbol) return rule.subs(mapping) @evaluates(MulRule) def eval_mul(terms, substeps, expr, symbol): diffs = map(diff, substeps) result = sympy.S.Zero for i in range(len(terms)): subresult = diffs[i] for index, term in enumerate(terms): if index != i: subresult *= term result += subresult return result @evaluates(TrigRule) def eval_default_trig(*args): return sympy.trigsimp(eval_default(*args)) @evaluates(RewriteRule) def eval_rewrite(rewritten, substep, expr, symbol): return diff(substep) @evaluates(AlternativeRule) def eval_alternative(alternatives, expr, symbol): return diff(alternatives[1]) def diff_steps(expr, symbol): deriv = DerivativeInfo(expr, symbol) def key(deriv): expr = deriv.expr if isinstance(expr, TrigonometricFunction): return TrigonometricFunction elif isinstance(expr, AppliedUndef): return AppliedUndef elif not expr.has(symbol): return 'constant' else: return expr.func return switch(key, { sympy.Pow: power_rule, sympy.Symbol: power_rule, sympy.Dummy: power_rule, sympy.Add: add_rule, sympy.Mul: mul_rule, TrigonometricFunction: trig_rule, sympy.exp: exp_rule, sympy.log: log_rule, AppliedUndef: function_rule, 'constant': constant_rule })(deriv) def diff(rule): try: return evaluators[rule.__class__](*rule) except KeyError: raise ValueError("Cannot evaluate derivative") class DiffPrinter(object): def __init__(self, rule): self.print_rule(rule) self.rule = rule def print_rule(self, rule): if isinstance(rule, PowerRule): self.print_Power(rule) elif isinstance(rule, ChainRule): self.print_Chain(rule) elif isinstance(rule, ConstantRule): self.print_Number(rule) elif isinstance(rule, ConstantTimesRule): self.print_ConstantTimes(rule) elif isinstance(rule, AddRule): self.print_Add(rule) elif isinstance(rule, MulRule): self.print_Mul(rule) elif isinstance(rule, DivRule): self.print_Div(rule) elif isinstance(rule, TrigRule): self.print_Trig(rule) elif isinstance(rule, ExpRule): self.print_Exp(rule) elif isinstance(rule, LogRule): self.print_Log(rule) elif isinstance(rule, DontKnowRule): self.print_DontKnow(rule) elif isinstance(rule, AlternativeRule): self.print_Alternative(rule) elif isinstance(rule, RewriteRule): self.print_Rewrite(rule) elif isinstance(rule, FunctionRule): self.print_Function(rule) else: self.append(repr(rule)) def print_Power(self, rule): with self.new_step(): self.append("Apply the power rule: {0} goes to {1}".format( self.format_math(rule.context), self.format_math(diff(rule)))) def print_Number(self, rule): with self.new_step(): self.append("The derivative of the constant {} is zero.".format( self.format_math(rule.number))) def print_ConstantTimes(self, rule): with self.new_step(): self.append("The derivative of a constant times a function " "is the constant times the derivative of the function.") with self.new_level(): self.print_rule(rule.substep) self.append("So, the result is: {}".format( self.format_math(diff(rule)))) def print_Add(self, rule): with self.new_step(): self.append("Differentiate {} term by term:".format( self.format_math(rule.context))) with self.new_level(): for substep in rule.substeps: self.print_rule(substep) self.append("The result is: {}".format( self.format_math(diff(rule)))) def print_Mul(self, rule): with self.new_step(): self.append("Apply the product rule:".format( self.format_math(rule.context))) fnames = map(lambda n: sympy.Function(n)(rule.symbol), functionnames(len(rule.terms))) derivatives = map(lambda f: sympy.Derivative(f, rule.symbol), fnames) ruleform = [] for index in range(len(rule.terms)): buf = [] for i in range(len(rule.terms)): if i == index: buf.append(derivatives[i]) else: buf.append(fnames[i]) ruleform.append(reduce(lambda a,b: a*b, buf)) self.append(self.format_math_display( sympy.Eq(sympy.Derivative(reduce(lambda a,b: a*b, fnames), rule.symbol), sum(ruleform)))) for fname, deriv, term, substep in zip(fnames, derivatives, rule.terms, rule.substeps): self.append("{}; to find {}:".format( self.format_math(sympy.Eq(fname, term)), self.format_math(deriv) )) with self.new_level(): self.print_rule(substep) self.append("The result is: " + self.format_math(diff(rule))) def print_Div(self, rule): with self.new_step(): f, g = rule.numerator, rule.denominator fp, gp = f.diff(rule.symbol), g.diff(rule.symbol) x = rule.symbol ff = sympy.Function("f")(x) gg = sympy.Function("g")(x) qrule_left = sympy.Derivative(ff / gg, rule.symbol) qrule_right = sympy.ratsimp(sympy.diff(sympy.Function("f")(x) / sympy.Function("g")(x))) qrule = sympy.Eq(qrule_left, qrule_right) self.append("Apply the quotient rule, which is:") self.append(self.format_math_display(qrule)) self.append("{} and {}.".format(self.format_math(sympy.Eq(ff, f)), self.format_math(sympy.Eq(gg, g)))) self.append("To find {}:".format(self.format_math(ff.diff(rule.symbol)))) with self.new_level(): self.print_rule(rule.numerstep) self.append("To find {}:".format(self.format_math(gg.diff(rule.symbol)))) with self.new_level(): self.print_rule(rule.denomstep) self.append("Now plug in to the quotient rule:") self.append(self.format_math(diff(rule))) def print_Chain(self, rule): with self.new_step(), self.new_u_vars() as (u, du): self.append("Let {}.".format(self.format_math(sympy.Eq(u, rule.inner)))) self.print_rule(replace_u_var(rule.substep, rule.u_var, u)) with self.new_step(): if isinstance(rule.innerstep, FunctionRule): self.append( "Then, apply the chain rule. Multiply by {}:".format( self.format_math( sympy.Derivative(rule.inner, rule.symbol)))) self.append(self.format_math_display(diff(rule))) else: self.append( "Then, apply the chain rule. Multiply by {}:".format( self.format_math( sympy.Derivative(rule.inner, rule.symbol)))) with self.new_level(): self.print_rule(rule.innerstep) self.append("The result of the chain rule is:") self.append(self.format_math_display(diff(rule))) def print_Trig(self, rule): with self.new_step(): if isinstance(rule.f, sympy.sin): self.append("The derivative of sine is cosine:") elif isinstance(rule.f, sympy.cos): self.append("The derivative of cosine is negative sine:") elif isinstance(rule.f, sympy.sec): self.append("The derivative of secant is secant times tangent:") elif isinstance(rule.f, sympy.csc): self.append("The derivative of cosecant is negative cosecant times cotangent:") self.append("{}".format( self.format_math_display(sympy.Eq( sympy.Derivative(rule.f, rule.symbol), diff(rule))))) def print_Exp(self, rule): with self.new_step(): if rule.base == sympy.E: self.append("The derivative of {} is itself.".format( self.format_math(sympy.exp(rule.symbol)))) else: self.append( self.format_math(sympy.Eq(sympy.Derivative(rule.f, rule.symbol), diff(rule)))) def print_Log(self, rule): with self.new_step(): if rule.base == sympy.E: self.append("The derivative of {} is {}.".format( self.format_math(rule.context), self.format_math(diff(rule)) )) else: # This case shouldn't come up often, seeing as SymPy # automatically applies the change-of-base identity self.append("The derivative of {} is {}.".format( self.format_math(sympy.log(rule.symbol, rule.base, evaluate=False)), self.format_math(1/(rule.arg * sympy.ln(rule.base))))) self.append("So {}".format( self.format_math(sympy.Eq( sympy.Derivative(rule.context, rule.symbol), diff(rule))))) def print_Alternative(self, rule): with self.new_step(): self.append("There are multiple ways to do this derivative.") self.append("One way:") with self.new_level(): self.print_rule(rule.alternatives[0]) def print_Rewrite(self, rule): with self.new_step(): self.append("Rewrite the function to be differentiated:") self.append(self.format_math_display( sympy.Eq(rule.context, rule.rewritten))) self.print_rule(rule.substep) def print_Function(self, rule): with self.new_step(): self.append("Trivial:") self.append(self.format_math_display( sympy.Eq(sympy.Derivative(rule.context, rule.symbol), diff(rule)))) def print_DontKnow(self, rule): with self.new_step(): self.append("Don't know the steps in finding this derivative.") self.append("But the derivative is") self.append(self.format_math_display(diff(rule))) class HTMLPrinter(DiffPrinter, stepprinter.HTMLPrinter): def __init__(self, rule): self.alternative_functions_printed = set() stepprinter.HTMLPrinter.__init__(self) DiffPrinter.__init__(self, rule) def print_Alternative(self, rule): if rule.context.func in self.alternative_functions_printed: self.print_rule(rule.alternatives[0]) elif len(rule.alternatives) == 2: self.alternative_functions_printed.add(rule.context.func) self.print_rule(rule.alternatives[1]) else: self.alternative_functions_printed.add(rule.context.func) with self.new_step(): self.append("There are multiple ways to do this derivative.") for index, r in enumerate(rule.alternatives[1:]): with self.new_collapsible(): self.append_header("Method #{}".format(index + 1)) with self.new_level(): self.print_rule(r) def finalize(self): answer = diff(self.rule) if answer: simp = sympy.simplify(answer) if simp != answer: answer = simp with self.new_step(): self.append("Now simplify:") self.append(self.format_math_display(simp)) self.lines.append('</ol>') self.lines.append('<hr/>') self.level = 0 self.append('The answer is:') self.append(self.format_math_display(answer)) return '\n'.join(self.lines) def print_html_steps(function, symbol): a = HTMLPrinter(diff_steps(function, symbol)) return a.finalize()
{ "content_hash": "67197d60ceee11db1fa0a54c3097fb94", "timestamp": "", "source": "github", "line_count": 534, "max_line_length": 95, "avg_line_length": 36.92134831460674, "alnum_prop": 0.5679651044836681, "repo_name": "iScienceLuvr/sympy_gamma", "id": "9294ffeac57cfa5444d0260545fe3d987bfaed3c", "size": "19716", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "app/logic/diffsteps.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "17636" }, { "name": "HTML", "bytes": "10800" }, { "name": "JavaScript", "bytes": "109690" }, { "name": "Python", "bytes": "128516" } ], "symlink_target": "" }
package com.prowidesoftware.swift.model.mt.mt3xx; import com.prowidesoftware.Generated; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Collections; import org.apache.commons.lang3.StringUtils; import com.prowidesoftware.swift.model.*; import com.prowidesoftware.swift.internal.*; import com.prowidesoftware.swift.internal.SequenceStyle.Type; import com.prowidesoftware.swift.model.field.*; import com.prowidesoftware.swift.model.mt.AbstractMT; import com.prowidesoftware.swift.utils.Lib; import java.io.File; import java.io.InputStream; import java.io.IOException; /** * MT 340 - Forward Rate Agreement Confirmation. * * <p> * SWIFT MT340 (ISO 15022) message structure: * <div class="scheme"><ul> <li class="sequence"> Sequence A (M)<ul><li class="field">Field 15 A (M)</li> <li class="field">Field 20 (M)</li> <li class="field">Field 21 (O)</li> <li class="field">Field 22 A (M)</li> <li class="field">Field 94 A (O)</li> <li class="field">Field 22 C (M)</li> <li class="field">Field 23 D (M)</li> <li class="field">Field 21 N (O)</li> <li class="field">Field 21 B (O)</li> <li class="field">Field 82 A,D (M)</li> <li class="field">Field 87 A,D (M)</li> <li class="field">Field 77 H (M)</li> <li class="field">Field 14 C (O)</li> </ul></li> <li class="sequence"> Sequence B (M)<ul><li class="field">Field 15 B (M)</li> <li class="field">Field 30 T (M)</li> <li class="field">Field 32 B (M)</li> <li class="field">Field 30 F (M)</li> <li class="field">Field 30 P (M)</li> <li class="field">Field 37 M (M)</li> <li class="field">Field 14 F (M)</li> <li class="sequence"> Sequence B1 (O)<ul><li class="field">Field 30 V (M)</li> <li class="field">Field 38 D (M)</li> </ul></li> <li class="sequence"> Sequence B2 (M)<ul><li class="field">Field 38 G (M)</li> <li class="field">Field 14 D (M)</li> <li class="field">Field 17 F (M)</li> <li class="field">Field 18 A (M)</li> <li class="field">Field 22 B (M) (repetitive)</li> </ul></li> <li class="field">Field 39 M (O)</li> </ul></li> <li class="sequence"> Sequence C (M)<ul><li class="field">Field 15 C (M)</li> <li class="field">Field 53 A,D,J (O)</li> <li class="field">Field 86 A,D,J (O)</li> <li class="field">Field 56 A,D,J (O)</li> <li class="field">Field 57 A,D,J (M)</li> <li class="field">Field 58 A,D,J (O)</li> </ul></li> <li class="sequence"> Sequence D (M)<ul><li class="field">Field 15 D (M)</li> <li class="field">Field 53 A,D,J (O)</li> <li class="field">Field 86 A,D,J (O)</li> <li class="field">Field 56 A,D,J (O)</li> <li class="field">Field 57 A,D,J (M)</li> <li class="field">Field 58 A,D,J (O)</li> </ul></li> <li class="sequence"> Sequence E (O)<ul><li class="field">Field 15 E (M)</li> <li class="field">Field 29 A (O)</li> <li class="field">Field 24 D (O)</li> <li class="field">Field 88 A,D (O)</li> <li class="field">Field 71 F (O)</li> <li class="field">Field 21 G (O)</li> <li class="field">Field 72 (O)</li> </ul></li> <li class="sequence"> Sequence F (O)<ul><li class="field">Field 15 F (M)</li> <li class="field">Field 18 A (M)</li> <li class="sequence"> Sequence _F1 (M) (repetitive)<ul><li class="field">Field 30 F (M)</li> <li class="field">Field 32 H (M)</li> </ul></li> <li class="field">Field 53 A,D,J (O)</li> <li class="field">Field 86 A,D,J (O)</li> <li class="field">Field 56 A,D,J (O)</li> <li class="field">Field 57 A,D,J (M)</li> </ul></li> <li class="sequence"> Sequence G (O)<ul><li class="field">Field 15 G (M)</li> <li class="sequence"> Sequence G1 (O) (repetitive)<ul><li class="field">Field 22 L (M)</li> <li class="field">Field 91 A,D,J (O)</li> <li class="sequence"> Sequence G1a (O) (repetitive)<ul><li class="field">Field 22 M (M)</li> <li class="field">Field 22 N (M)</li> <li class="sequence"> Sequence G1a1 (O) (repetitive)<ul><li class="field">Field 22 P (M)</li> <li class="field">Field 22 R (M)</li> </ul></li> </ul></li> </ul></li> <li class="field">Field 96 A,D,J (O)</li> <li class="field">Field 22 S (O) (repetitive)</li> <li class="field">Field 22 T (O)</li> <li class="field">Field 17 E (O)</li> <li class="field">Field 22 U (O)</li> <li class="field">Field 35 B (O)</li> <li class="field">Field 17 H (O)</li> <li class="field">Field 17 P (O)</li> <li class="field">Field 22 V (O)</li> <li class="field">Field 98 D (O)</li> <li class="field">Field 17 W (O)</li> <li class="field">Field 17 Y (O)</li> <li class="field">Field 17 Z (O)</li> <li class="field">Field 22 Q (O)</li> <li class="field">Field 17 L (O)</li> <li class="field">Field 17 M (O)</li> <li class="field">Field 17 Q (O)</li> <li class="field">Field 17 S (O)</li> <li class="field">Field 17 X (O)</li> <li class="field">Field 34 C (O)</li> <li class="field">Field 77 A (O)</li> </ul></li> </ul></div> * * <p> * This source code is specific to release <strong>SRU 2022</strong> * <p> * For additional resources check <a href="https://www.prowidesoftware.com/resources">https://www.prowidesoftware.com/resources</a> */ @Generated public class MT340 extends AbstractMT implements Serializable { /** * Constant identifying the SRU to which this class belongs to. */ public static final int SRU = 2022; private static final long serialVersionUID = 1L; private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(MT340.class.getName()); /** * Constant for MT name, this is part of the classname, after MT. */ public static final String NAME = "340"; /** * Creates an MT340 initialized with the parameter SwiftMessage. * @param m swift message with the MT340 content */ public MT340(final SwiftMessage m) { super(m); sanityCheck(m); } /** * Creates an MT340 initialized with the parameter MtSwiftMessage. * @param m swift message with the MT340 content, the parameter can not be null * @see #MT340(String) */ public MT340(final MtSwiftMessage m) { this(m.message()); } /** * Creates an MT340 initialized with the parameter MtSwiftMessage. * * @param m swift message with the MT340 content * @return the created object or null if the parameter is null * @see #MT340(String) * @since 7.7 */ public static MT340 parse(final MtSwiftMessage m) { if (m == null) { return null; } return new MT340(m); } /** * Creates and initializes a new MT340 input message setting TEST BICS as sender and receiver. * All mandatory header attributes are completed with default values. * * @since 7.6 */ public MT340() { this(BIC.TEST8, BIC.TEST8); } /** * Creates and initializes a new MT340 input message from sender to receiver. * All mandatory header attributes are completed with default values. * In particular the sender and receiver addresses will be filled with proper default LT identifier * and branch codes if not provided, * * @param sender the sender address as a bic8, bic11 or full logical terminal consisting of 12 characters * @param receiver the receiver address as a bic8, bic11 or full logical terminal consisting of 12 characters * @since 7.7 */ public MT340(final String sender, final String receiver) { super(340, sender, receiver); } /** * Creates a new MT340 by parsing a String with the message content in its swift FIN format. * If the fin parameter is null or the message cannot be parsed, the internal message object * will be initialized (blocks will be created) but empty. * If the string contains multiple messages, only the first one will be parsed. * * @param fin a string with the MT message in its FIN swift format * @since 7.7 */ public MT340(final String fin) { super(); if (fin != null) { final SwiftMessage parsed = read(fin); if (parsed != null) { super.m = parsed; sanityCheck(parsed); } } } private void sanityCheck(final SwiftMessage param) { if (param.isServiceMessage()) { log.warning("Creating an MT340 object from FIN content with a Service Message. Check if the MT340 you are intended to read is prepended with and ACK."); } else if (!StringUtils.equals(param.getType(), "340")) { log.warning("Creating an MT340 object from FIN content with message type "+param.getType()); } } /** * Creates a new MT340 by parsing a String with the message content in its swift FIN format. * If the fin parameter cannot be parsed, the returned MT340 will have its internal message object * initialized (blocks will be created) but empty. * If the string contains multiple messages, only the first one will be parsed. * * @param fin a string with the MT message in its FIN swift format. <em>fin may be null in which case this method returns null</em> * @return a new instance of MT340 or null if fin is null * @since 7.7 */ public static MT340 parse(final String fin) { if (fin == null) { return null; } return new MT340(fin); } /** * Creates a new MT340 by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding. * If the message content is null or cannot be parsed, the internal message object * will be initialized (blocks will be created) but empty. * If the stream contains multiple messages, only the first one will be parsed. * * @param stream an input stream in UTF-8 encoding with the MT message in its FIN swift format. * @throws IOException if the stream data cannot be read * @since 7.7 */ public MT340(final InputStream stream) throws IOException { this(Lib.readStream(stream)); } /** * Creates a new MT340 by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding. * If the stream contains multiple messages, only the first one will be parsed. * * @param stream an input stream in UTF-8 encoding with the MT message in its FIN swift format. * @return a new instance of MT340 or null if stream is null or the message cannot be parsed * @throws IOException if the stream data cannot be read * @since 7.7 */ public static MT340 parse(final InputStream stream) throws IOException { if (stream == null) { return null; } return new MT340(stream); } /** * Creates a new MT340 by parsing a file with the message content in its swift FIN format. * If the file content is null or cannot be parsed as a message, the internal message object * will be initialized (blocks will be created) but empty. * If the file contains multiple messages, only the first one will be parsed. * * @param file a file with the MT message in its FIN swift format. * @throws IOException if the file content cannot be read * @since 7.7 */ public MT340(final File file) throws IOException { this(Lib.readFile(file)); } /** * Creates a new MT340 by parsing a file with the message content in its swift FIN format. * If the file contains multiple messages, only the first one will be parsed. * * @param file a file with the MT message in its FIN swift format. * @return a new instance of MT340 or null if; file is null, does not exist, can't be read, is not a file or the message cannot be parsed * @throws IOException if the file content cannot be read * @since 7.7 */ public static MT340 parse(final File file) throws IOException { if (file == null) { return null; } return new MT340(file); } /** * Returns this MT number. * @return the message type number of this MT * @since 6.4 */ @Override public String getMessageType() { return "340"; } /** * Add all tags from block to the end of the block4. * * @param block to append * @return this object to allow method chaining * @since 7.6 */ @Override public MT340 append(final SwiftTagListBlock block) { super.append(block); return this; } /** * Add all tags to the end of the block4. * * @param tags to append * @return this object to allow method chaining * @since 7.6 */ @Override public MT340 append(final Tag... tags) { super.append(tags); return this; } /** * Add all the fields to the end of the block4. * * @param fields to append * @return this object to allow method chaining * @since 7.6 */ @Override public MT340 append(final Field... fields) { super.append(fields); return this; } /** * Creates an MT340 messages from its JSON representation. * <p> * For generic conversion of JSON into the corresponding MT instance * see {@link AbstractMT#fromJson(String)} * * @param json a JSON representation of an MT340 message * @return a new instance of MT340 * @since 7.10.3 */ public static MT340 fromJson(final String json) { return (MT340) AbstractMT.fromJson(json); } /** * Iterates through block4 fields and return the first one whose name matches 15A, * or null if none is found. * The first occurrence of field 15A at MT340 is expected to be the only one. * * @return a Field15A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field15A getField15A() { final Tag t = tag("15A"); if (t != null) { return new Field15A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 20, * or null if none is found. * The first occurrence of field 20 at MT340 is expected to be the only one. * * @return a Field20 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field20 getField20() { final Tag t = tag("20"); if (t != null) { return new Field20(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 21, * or null if none is found. * The first occurrence of field 21 at MT340 is expected to be the only one. * * @return a Field21 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field21 getField21() { final Tag t = tag("21"); if (t != null) { return new Field21(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 22A, * or null if none is found. * The first occurrence of field 22A at MT340 is expected to be the only one. * * @return a Field22A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field22A getField22A() { final Tag t = tag("22A"); if (t != null) { return new Field22A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 94A, * or null if none is found. * The first occurrence of field 94A at MT340 is expected to be the only one. * * @return a Field94A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field94A getField94A() { final Tag t = tag("94A"); if (t != null) { return new Field94A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 22C, * or null if none is found. * The first occurrence of field 22C at MT340 is expected to be the only one. * * @return a Field22C object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field22C getField22C() { final Tag t = tag("22C"); if (t != null) { return new Field22C(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 23D, * or null if none is found. * The first occurrence of field 23D at MT340 is expected to be the only one. * * @return a Field23D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field23D getField23D() { final Tag t = tag("23D"); if (t != null) { return new Field23D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 21N, * or null if none is found. * The first occurrence of field 21N at MT340 is expected to be the only one. * * @return a Field21N object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field21N getField21N() { final Tag t = tag("21N"); if (t != null) { return new Field21N(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 21B, * or null if none is found. * The first occurrence of field 21B at MT340 is expected to be the only one. * * @return a Field21B object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field21B getField21B() { final Tag t = tag("21B"); if (t != null) { return new Field21B(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 82A, * or null if none is found. * The first occurrence of field 82A at MT340 is expected to be the only one. * * @return a Field82A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field82A getField82A() { final Tag t = tag("82A"); if (t != null) { return new Field82A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 82D, * or null if none is found. * The first occurrence of field 82D at MT340 is expected to be the only one. * * @return a Field82D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field82D getField82D() { final Tag t = tag("82D"); if (t != null) { return new Field82D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 87A, * or null if none is found. * The first occurrence of field 87A at MT340 is expected to be the only one. * * @return a Field87A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field87A getField87A() { final Tag t = tag("87A"); if (t != null) { return new Field87A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 87D, * or null if none is found. * The first occurrence of field 87D at MT340 is expected to be the only one. * * @return a Field87D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field87D getField87D() { final Tag t = tag("87D"); if (t != null) { return new Field87D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 77H, * or null if none is found. * The first occurrence of field 77H at MT340 is expected to be the only one. * * @return a Field77H object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field77H getField77H() { final Tag t = tag("77H"); if (t != null) { return new Field77H(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 14C, * or null if none is found. * The first occurrence of field 14C at MT340 is expected to be the only one. * * @return a Field14C object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field14C getField14C() { final Tag t = tag("14C"); if (t != null) { return new Field14C(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 15B, * or null if none is found. * The first occurrence of field 15B at MT340 is expected to be the only one. * * @return a Field15B object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field15B getField15B() { final Tag t = tag("15B"); if (t != null) { return new Field15B(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 30T, * or null if none is found. * The first occurrence of field 30T at MT340 is expected to be the only one. * * @return a Field30T object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field30T getField30T() { final Tag t = tag("30T"); if (t != null) { return new Field30T(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 32B, * or null if none is found. * The first occurrence of field 32B at MT340 is expected to be the only one. * * @return a Field32B object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field32B getField32B() { final Tag t = tag("32B"); if (t != null) { return new Field32B(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 30P, * or null if none is found. * The first occurrence of field 30P at MT340 is expected to be the only one. * * @return a Field30P object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field30P getField30P() { final Tag t = tag("30P"); if (t != null) { return new Field30P(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 37M, * or null if none is found. * The first occurrence of field 37M at MT340 is expected to be the only one. * * @return a Field37M object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field37M getField37M() { final Tag t = tag("37M"); if (t != null) { return new Field37M(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 14F, * or null if none is found. * The first occurrence of field 14F at MT340 is expected to be the only one. * * @return a Field14F object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field14F getField14F() { final Tag t = tag("14F"); if (t != null) { return new Field14F(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 30V, * or null if none is found. * The first occurrence of field 30V at MT340 is expected to be the only one. * * @return a Field30V object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field30V getField30V() { final Tag t = tag("30V"); if (t != null) { return new Field30V(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 38D, * or null if none is found. * The first occurrence of field 38D at MT340 is expected to be the only one. * * @return a Field38D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field38D getField38D() { final Tag t = tag("38D"); if (t != null) { return new Field38D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 38G, * or null if none is found. * The first occurrence of field 38G at MT340 is expected to be the only one. * * @return a Field38G object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field38G getField38G() { final Tag t = tag("38G"); if (t != null) { return new Field38G(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 14D, * or null if none is found. * The first occurrence of field 14D at MT340 is expected to be the only one. * * @return a Field14D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field14D getField14D() { final Tag t = tag("14D"); if (t != null) { return new Field14D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17F, * or null if none is found. * The first occurrence of field 17F at MT340 is expected to be the only one. * * @return a Field17F object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17F getField17F() { final Tag t = tag("17F"); if (t != null) { return new Field17F(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 39M, * or null if none is found. * The first occurrence of field 39M at MT340 is expected to be the only one. * * @return a Field39M object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field39M getField39M() { final Tag t = tag("39M"); if (t != null) { return new Field39M(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 15C, * or null if none is found. * The first occurrence of field 15C at MT340 is expected to be the only one. * * @return a Field15C object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field15C getField15C() { final Tag t = tag("15C"); if (t != null) { return new Field15C(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 15D, * or null if none is found. * The first occurrence of field 15D at MT340 is expected to be the only one. * * @return a Field15D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field15D getField15D() { final Tag t = tag("15D"); if (t != null) { return new Field15D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 15E, * or null if none is found. * The first occurrence of field 15E at MT340 is expected to be the only one. * * @return a Field15E object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field15E getField15E() { final Tag t = tag("15E"); if (t != null) { return new Field15E(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 29A, * or null if none is found. * The first occurrence of field 29A at MT340 is expected to be the only one. * * @return a Field29A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field29A getField29A() { final Tag t = tag("29A"); if (t != null) { return new Field29A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 24D, * or null if none is found. * The first occurrence of field 24D at MT340 is expected to be the only one. * * @return a Field24D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field24D getField24D() { final Tag t = tag("24D"); if (t != null) { return new Field24D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 88A, * or null if none is found. * The first occurrence of field 88A at MT340 is expected to be the only one. * * @return a Field88A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field88A getField88A() { final Tag t = tag("88A"); if (t != null) { return new Field88A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 88D, * or null if none is found. * The first occurrence of field 88D at MT340 is expected to be the only one. * * @return a Field88D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field88D getField88D() { final Tag t = tag("88D"); if (t != null) { return new Field88D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 71F, * or null if none is found. * The first occurrence of field 71F at MT340 is expected to be the only one. * * @return a Field71F object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field71F getField71F() { final Tag t = tag("71F"); if (t != null) { return new Field71F(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 21G, * or null if none is found. * The first occurrence of field 21G at MT340 is expected to be the only one. * * @return a Field21G object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field21G getField21G() { final Tag t = tag("21G"); if (t != null) { return new Field21G(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 72, * or null if none is found. * The first occurrence of field 72 at MT340 is expected to be the only one. * * @return a Field72 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field72 getField72() { final Tag t = tag("72"); if (t != null) { return new Field72(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 15F, * or null if none is found. * The first occurrence of field 15F at MT340 is expected to be the only one. * * @return a Field15F object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field15F getField15F() { final Tag t = tag("15F"); if (t != null) { return new Field15F(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 15G, * or null if none is found. * The first occurrence of field 15G at MT340 is expected to be the only one. * * @return a Field15G object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field15G getField15G() { final Tag t = tag("15G"); if (t != null) { return new Field15G(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 96A, * or null if none is found. * The first occurrence of field 96A at MT340 is expected to be the only one. * * @return a Field96A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field96A getField96A() { final Tag t = tag("96A"); if (t != null) { return new Field96A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 96D, * or null if none is found. * The first occurrence of field 96D at MT340 is expected to be the only one. * * @return a Field96D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field96D getField96D() { final Tag t = tag("96D"); if (t != null) { return new Field96D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 96J, * or null if none is found. * The first occurrence of field 96J at MT340 is expected to be the only one. * * @return a Field96J object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field96J getField96J() { final Tag t = tag("96J"); if (t != null) { return new Field96J(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 22T, * or null if none is found. * The first occurrence of field 22T at MT340 is expected to be the only one. * * @return a Field22T object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field22T getField22T() { final Tag t = tag("22T"); if (t != null) { return new Field22T(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17E, * or null if none is found. * The first occurrence of field 17E at MT340 is expected to be the only one. * * @return a Field17E object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17E getField17E() { final Tag t = tag("17E"); if (t != null) { return new Field17E(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 22U, * or null if none is found. * The first occurrence of field 22U at MT340 is expected to be the only one. * * @return a Field22U object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field22U getField22U() { final Tag t = tag("22U"); if (t != null) { return new Field22U(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 35B, * or null if none is found. * The first occurrence of field 35B at MT340 is expected to be the only one. * * @return a Field35B object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field35B getField35B() { final Tag t = tag("35B"); if (t != null) { return new Field35B(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17H, * or null if none is found. * The first occurrence of field 17H at MT340 is expected to be the only one. * * @return a Field17H object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17H getField17H() { final Tag t = tag("17H"); if (t != null) { return new Field17H(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17P, * or null if none is found. * The first occurrence of field 17P at MT340 is expected to be the only one. * * @return a Field17P object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17P getField17P() { final Tag t = tag("17P"); if (t != null) { return new Field17P(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 22V, * or null if none is found. * The first occurrence of field 22V at MT340 is expected to be the only one. * * @return a Field22V object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field22V getField22V() { final Tag t = tag("22V"); if (t != null) { return new Field22V(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 98D, * or null if none is found. * The first occurrence of field 98D at MT340 is expected to be the only one. * * @return a Field98D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field98D getField98D() { final Tag t = tag("98D"); if (t != null) { return new Field98D(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17W, * or null if none is found. * The first occurrence of field 17W at MT340 is expected to be the only one. * * @return a Field17W object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17W getField17W() { final Tag t = tag("17W"); if (t != null) { return new Field17W(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17Y, * or null if none is found. * The first occurrence of field 17Y at MT340 is expected to be the only one. * * @return a Field17Y object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17Y getField17Y() { final Tag t = tag("17Y"); if (t != null) { return new Field17Y(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17Z, * or null if none is found. * The first occurrence of field 17Z at MT340 is expected to be the only one. * * @return a Field17Z object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17Z getField17Z() { final Tag t = tag("17Z"); if (t != null) { return new Field17Z(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 22Q, * or null if none is found. * The first occurrence of field 22Q at MT340 is expected to be the only one. * * @return a Field22Q object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field22Q getField22Q() { final Tag t = tag("22Q"); if (t != null) { return new Field22Q(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17L, * or null if none is found. * The first occurrence of field 17L at MT340 is expected to be the only one. * * @return a Field17L object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17L getField17L() { final Tag t = tag("17L"); if (t != null) { return new Field17L(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17M, * or null if none is found. * The first occurrence of field 17M at MT340 is expected to be the only one. * * @return a Field17M object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17M getField17M() { final Tag t = tag("17M"); if (t != null) { return new Field17M(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17Q, * or null if none is found. * The first occurrence of field 17Q at MT340 is expected to be the only one. * * @return a Field17Q object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17Q getField17Q() { final Tag t = tag("17Q"); if (t != null) { return new Field17Q(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17S, * or null if none is found. * The first occurrence of field 17S at MT340 is expected to be the only one. * * @return a Field17S object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17S getField17S() { final Tag t = tag("17S"); if (t != null) { return new Field17S(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 17X, * or null if none is found. * The first occurrence of field 17X at MT340 is expected to be the only one. * * @return a Field17X object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field17X getField17X() { final Tag t = tag("17X"); if (t != null) { return new Field17X(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 34C, * or null if none is found. * The first occurrence of field 34C at MT340 is expected to be the only one. * * @return a Field34C object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field34C getField34C() { final Tag t = tag("34C"); if (t != null) { return new Field34C(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return the first one whose name matches 77A, * or null if none is found. * The first occurrence of field 77A at MT340 is expected to be the only one. * * @return a Field77A object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field77A getField77A() { final Tag t = tag("77A"); if (t != null) { return new Field77A(t.getValue()); } else { return null; } } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 22B, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 22B at MT340 are expected at one sequence or across several sequences. * * @return a List of Field22B objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field22B> getField22B() { final List<Field22B> result = new ArrayList<>(); final Tag[] tags = tags("22B"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field22B(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 53A, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 53A at MT340 are expected at one sequence or across several sequences. * * @return a List of Field53A objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field53A> getField53A() { final List<Field53A> result = new ArrayList<>(); final Tag[] tags = tags("53A"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field53A(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 53D, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 53D at MT340 are expected at one sequence or across several sequences. * * @return a List of Field53D objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field53D> getField53D() { final List<Field53D> result = new ArrayList<>(); final Tag[] tags = tags("53D"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field53D(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 53J, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 53J at MT340 are expected at one sequence or across several sequences. * * @return a List of Field53J objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field53J> getField53J() { final List<Field53J> result = new ArrayList<>(); final Tag[] tags = tags("53J"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field53J(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 86A, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 86A at MT340 are expected at one sequence or across several sequences. * * @return a List of Field86A objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field86A> getField86A() { final List<Field86A> result = new ArrayList<>(); final Tag[] tags = tags("86A"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field86A(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 86D, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 86D at MT340 are expected at one sequence or across several sequences. * * @return a List of Field86D objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field86D> getField86D() { final List<Field86D> result = new ArrayList<>(); final Tag[] tags = tags("86D"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field86D(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 86J, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 86J at MT340 are expected at one sequence or across several sequences. * * @return a List of Field86J objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field86J> getField86J() { final List<Field86J> result = new ArrayList<>(); final Tag[] tags = tags("86J"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field86J(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 56A, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 56A at MT340 are expected at one sequence or across several sequences. * * @return a List of Field56A objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field56A> getField56A() { final List<Field56A> result = new ArrayList<>(); final Tag[] tags = tags("56A"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field56A(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 56D, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 56D at MT340 are expected at one sequence or across several sequences. * * @return a List of Field56D objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field56D> getField56D() { final List<Field56D> result = new ArrayList<>(); final Tag[] tags = tags("56D"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field56D(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 56J, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 56J at MT340 are expected at one sequence or across several sequences. * * @return a List of Field56J objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field56J> getField56J() { final List<Field56J> result = new ArrayList<>(); final Tag[] tags = tags("56J"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field56J(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 57A, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 57A at MT340 are expected at one sequence or across several sequences. * * @return a List of Field57A objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field57A> getField57A() { final List<Field57A> result = new ArrayList<>(); final Tag[] tags = tags("57A"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field57A(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 57D, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 57D at MT340 are expected at one sequence or across several sequences. * * @return a List of Field57D objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field57D> getField57D() { final List<Field57D> result = new ArrayList<>(); final Tag[] tags = tags("57D"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field57D(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 57J, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 57J at MT340 are expected at one sequence or across several sequences. * * @return a List of Field57J objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field57J> getField57J() { final List<Field57J> result = new ArrayList<>(); final Tag[] tags = tags("57J"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field57J(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 58A, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 58A at MT340 are expected at one sequence or across several sequences. * * @return a List of Field58A objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field58A> getField58A() { final List<Field58A> result = new ArrayList<>(); final Tag[] tags = tags("58A"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field58A(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 58D, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 58D at MT340 are expected at one sequence or across several sequences. * * @return a List of Field58D objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field58D> getField58D() { final List<Field58D> result = new ArrayList<>(); final Tag[] tags = tags("58D"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field58D(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 58J, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 58J at MT340 are expected at one sequence or across several sequences. * * @return a List of Field58J objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field58J> getField58J() { final List<Field58J> result = new ArrayList<>(); final Tag[] tags = tags("58J"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field58J(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 18A, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 18A at MT340 are expected at one sequence or across several sequences. * * @return a List of Field18A objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field18A> getField18A() { final List<Field18A> result = new ArrayList<>(); final Tag[] tags = tags("18A"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field18A(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 30F, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 30F at MT340 are expected at one sequence or across several sequences. * * @return a List of Field30F objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field30F> getField30F() { final List<Field30F> result = new ArrayList<>(); final Tag[] tags = tags("30F"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field30F(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 32H, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 32H at MT340 are expected at one sequence or across several sequences. * * @return a List of Field32H objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field32H> getField32H() { final List<Field32H> result = new ArrayList<>(); final Tag[] tags = tags("32H"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field32H(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 22L, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 22L at MT340 are expected at one sequence or across several sequences. * * @return a List of Field22L objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field22L> getField22L() { final List<Field22L> result = new ArrayList<>(); final Tag[] tags = tags("22L"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field22L(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 91A, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 91A at MT340 are expected at one sequence or across several sequences. * * @return a List of Field91A objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field91A> getField91A() { final List<Field91A> result = new ArrayList<>(); final Tag[] tags = tags("91A"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field91A(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 91D, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 91D at MT340 are expected at one sequence or across several sequences. * * @return a List of Field91D objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field91D> getField91D() { final List<Field91D> result = new ArrayList<>(); final Tag[] tags = tags("91D"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field91D(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 91J, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 91J at MT340 are expected at one sequence or across several sequences. * * @return a List of Field91J objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field91J> getField91J() { final List<Field91J> result = new ArrayList<>(); final Tag[] tags = tags("91J"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field91J(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 22M, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 22M at MT340 are expected at one sequence or across several sequences. * * @return a List of Field22M objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field22M> getField22M() { final List<Field22M> result = new ArrayList<>(); final Tag[] tags = tags("22M"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field22M(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 22N, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 22N at MT340 are expected at one sequence or across several sequences. * * @return a List of Field22N objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field22N> getField22N() { final List<Field22N> result = new ArrayList<>(); final Tag[] tags = tags("22N"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field22N(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 22P, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 22P at MT340 are expected at one sequence or across several sequences. * * @return a List of Field22P objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field22P> getField22P() { final List<Field22P> result = new ArrayList<>(); final Tag[] tags = tags("22P"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field22P(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 22R, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 22R at MT340 are expected at one sequence or across several sequences. * * @return a List of Field22R objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field22R> getField22R() { final List<Field22R> result = new ArrayList<>(); final Tag[] tags = tags("22R"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field22R(tag.getValue())); } } return result; } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 22S, * or <code>Collections.emptyList()</code> if none is found. * Multiple occurrences of field 22S at MT340 are expected at one sequence or across several sequences. * * @return a List of Field22S objects or <code>Collections.emptyList()</code> if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List<Field22S> getField22S() { final List<Field22S> result = new ArrayList<>(); final Tag[] tags = tags("22S"); if (tags != null && tags.length > 0) { for (Tag tag : tags) { result.add(new Field22S(tag.getValue())); } } return result; } /** * Class to model Sequence "A" in MT 340. */ @SequenceStyle(Type.SPLIT_BY_15) public static class SequenceA extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceA() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceA(final SwiftTagListBlock content) { super(content.getTags()); } public static final Tag START_TAG = Field15A.emptyTag(); /** * Creates a new instance of this sequence with the given tags inside. * @param tags may be null, an empty sequence containing only start and end sequence tags will be returned * @return a new instance of the sequence, initialized with the parameter tags * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public static SequenceA newInstance(final Tag... tags) { final SequenceA result = new SequenceA(); result.append(START_TAG); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } return result; } /** * Create an empty $sequenceClassname. * This method is intended to avoid disambiguation for the newInstance() with variable list of blocks or tags * @return a new instance of the sequence * @since 7.7 */ public static SequenceA newInstance() { final SequenceA result = new SequenceA(); result.append(START_TAG); return result; } /** * Create a new instance of $sequenceClassname and add the contents of all sequences given inside. * Mainly intended to create a sequence by adding subsequences * @param sequences a list of blocks to set as the new sequence content * @return a new instance of the sequence, initialized with the parameter sequences content * @since 7.7 */ public static SequenceA newInstance(final SwiftTagListBlock... sequences) { final SequenceA result = new SequenceA(); result.append(START_TAG); if (sequences != null && sequences.length > 0) { for (final SwiftTagListBlock s : sequences) { result.addTags(s.getTags()); } } return result; } } /** * Get the single occurrence of SequenceA using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @since 7.7 * @return a new sequence that may be empty, <em>never returns null</em> */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceA getSequenceA() { return getSequenceA(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceA using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @param parentSequence a not null parent sequence to find SequenceA within it * @return the found sequence or an empty sequence if none is found, <em>never returns null</em> * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceA getSequenceA(SwiftTagListBlock parentSequence) { final java.util.Map<String, SwiftTagListBlock> map = SwiftMessageUtils.splitByField15(parentSequence); if (map.containsKey("A")) { return new SequenceA(map.get("A")); } return new SequenceA(); } /** * Class to model Sequence "B" in MT 340. */ @SequenceStyle(Type.SPLIT_BY_15) public static class SequenceB extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceB() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceB(final SwiftTagListBlock content) { super(content.getTags()); } public static final Tag START_TAG = Field15B.emptyTag(); /** * Creates a new instance of this sequence with the given tags inside. * @param tags may be null, an empty sequence containing only start and end sequence tags will be returned * @return a new instance of the sequence, initialized with the parameter tags * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public static SequenceB newInstance(final Tag... tags) { final SequenceB result = new SequenceB(); result.append(START_TAG); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } return result; } /** * Create an empty $sequenceClassname. * This method is intended to avoid disambiguation for the newInstance() with variable list of blocks or tags * @return a new instance of the sequence * @since 7.7 */ public static SequenceB newInstance() { final SequenceB result = new SequenceB(); result.append(START_TAG); return result; } /** * Create a new instance of $sequenceClassname and add the contents of all sequences given inside. * Mainly intended to create a sequence by adding subsequences * @param sequences a list of blocks to set as the new sequence content * @return a new instance of the sequence, initialized with the parameter sequences content * @since 7.7 */ public static SequenceB newInstance(final SwiftTagListBlock... sequences) { final SequenceB result = new SequenceB(); result.append(START_TAG); if (sequences != null && sequences.length > 0) { for (final SwiftTagListBlock s : sequences) { result.addTags(s.getTags()); } } return result; } } /** * Get the single occurrence of SequenceB using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @since 7.7 * @return a new sequence that may be empty, <em>never returns null</em> */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceB getSequenceB() { return getSequenceB(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceB using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @param parentSequence a not null parent sequence to find SequenceB within it * @return the found sequence or an empty sequence if none is found, <em>never returns null</em> * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceB getSequenceB(SwiftTagListBlock parentSequence) { final java.util.Map<String, SwiftTagListBlock> map = SwiftMessageUtils.splitByField15(parentSequence); if (map.containsKey("B")) { return new SequenceB(map.get("B")); } return new SequenceB(); } /** * Class to model Sequence "B1" in MT 340. */ public static class SequenceB1 extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceB1() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceB1(final SwiftTagListBlock content) { super(content.getTags()); } /** * First mandatory tag name of the sequence: <em>"30V" </em>. * Array format is for cases when more than one letter options is allowed */ public static final String[] START = { "30V" } ; /** * Last mandatory tag name of the sequence: <em>"38D" </em> * Array format is for cases when more than one letter options is allowed */ protected static final String[] END = { "38D" }; /** * List of optional tags after the last mandatory tag. */ protected static final String[] TAIL = new String[]{ }; /** * Same as {@link #newInstance(int, int, Tag...)} using zero for the indexes. * @param tags the list of tags to set as sequence content * @return a new instance of the sequence, initialized with the parameter tags */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static SequenceB1 newInstance(final Tag... tags) { return newInstance(0, 0, tags); } /** * Creates a sequence with starting and ending tags set to the indicated tags in from the * {@link #START} and {@link #END} lists of mandatory fields, and with the content between * the starting and ending tag initialized with the given optional tags. * * @param start a zero-based index within the list of mandatory starting tags in the sequence * @param end a zero-based index within the list of mandatory ending tags in the sequence * @param tags the list of tags to set as sequence content * @return a new instance of the sequence, initialized with the parameter tags */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static SequenceB1 newInstance(final int start, final int end, final Tag... tags) { final SequenceB1 result = new SequenceB1(); result.append(new Tag(START[start], "")); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } result.append(new Tag(END[end], "")); return result; } } /** * Get the single occurrence of SequenceB1 delimited by leading tag and end, with an optional tail. * The presence of this method indicates that this sequence can occur only once according to the Standard. * If block 4 is empty this method returns null. * * @return the found sequence or an empty sequence if none is found * @see SwiftTagListBlock#getSubBlockDelimitedWithOptionalTail(String[], String[], String[]) */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public SequenceB1 getSequenceB1() { return getSequenceB1(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceB1 delimited by leading tag and end, with an optional tail. * The presence of this method indicates that this sequence can occur only once according to the Standard. * If block 4 is empty this method returns null. * * @see SwiftTagListBlock#getSubBlockDelimitedWithOptionalTail(String[], String[], String[]) * @param parentSequence a not null parent sequence to find SequenceB1 within it * @return the found sequence or an empty sequence if none is found, or null if the parent sequence is null or empty * @since 7.7 */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public SequenceB1 getSequenceB1(SwiftTagListBlock parentSequence) { if (parentSequence != null && !parentSequence.isEmpty()) { final SwiftTagListBlock content = parentSequence.getSubBlockDelimitedWithOptionalTail(SequenceB1.START, SequenceB1.END, SequenceB1.TAIL); if (log.isLoggable(java.util.logging.Level.FINE)) { if (content == null) { log.fine("content for sequence SequenceB1: is null"); } else { log.fine("content for sequence SequenceB1: "+content.tagNamesList()); } } if (content == null) { return new SequenceB1(); } else { return new SequenceB1(content); } } return null; } /** * Class to model Sequence "B2" in MT 340. */ public static class SequenceB2 extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceB2() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceB2(final SwiftTagListBlock content) { super(content.getTags()); } /** * First mandatory tag name of the sequence: <em>"38G" </em>. * Array format is for cases when more than one letter options is allowed */ public static final String[] START = { "38G" } ; /** * Last mandatory tag name of the sequence: <em>"22B" </em> * Array format is for cases when more than one letter options is allowed */ protected static final String[] END = { "22B" }; /** * List of optional tags after the last mandatory tag. */ protected static final String[] TAIL = new String[]{ }; /** * Same as {@link #newInstance(int, int, Tag...)} using zero for the indexes. * @param tags the list of tags to set as sequence content * @return a new instance of the sequence, initialized with the parameter tags */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static SequenceB2 newInstance(final Tag... tags) { return newInstance(0, 0, tags); } /** * Creates a sequence with starting and ending tags set to the indicated tags in from the * {@link #START} and {@link #END} lists of mandatory fields, and with the content between * the starting and ending tag initialized with the given optional tags. * * @param start a zero-based index within the list of mandatory starting tags in the sequence * @param end a zero-based index within the list of mandatory ending tags in the sequence * @param tags the list of tags to set as sequence content * @return a new instance of the sequence, initialized with the parameter tags */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static SequenceB2 newInstance(final int start, final int end, final Tag... tags) { final SequenceB2 result = new SequenceB2(); result.append(new Tag(START[start], "")); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } result.append(new Tag(END[end], "")); return result; } } /** * Get the single occurrence of SequenceB2 delimited by leading tag and end, with an optional tail. * The presence of this method indicates that this sequence can occur only once according to the Standard. * If block 4 is empty this method returns null. * * @return the found sequence or an empty sequence if none is found * @see SwiftTagListBlock#getSubBlockDelimitedWithOptionalTail(String[], String[], String[]) */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public SequenceB2 getSequenceB2() { return getSequenceB2(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceB2 delimited by leading tag and end, with an optional tail. * The presence of this method indicates that this sequence can occur only once according to the Standard. * If block 4 is empty this method returns null. * * @see SwiftTagListBlock#getSubBlockDelimitedWithOptionalTail(String[], String[], String[]) * @param parentSequence a not null parent sequence to find SequenceB2 within it * @return the found sequence or an empty sequence if none is found, or null if the parent sequence is null or empty * @since 7.7 */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public SequenceB2 getSequenceB2(SwiftTagListBlock parentSequence) { if (parentSequence != null && !parentSequence.isEmpty()) { final SwiftTagListBlock content = parentSequence.getSubBlockDelimitedWithOptionalTail(SequenceB2.START, SequenceB2.END, SequenceB2.TAIL); if (log.isLoggable(java.util.logging.Level.FINE)) { if (content == null) { log.fine("content for sequence SequenceB2: is null"); } else { log.fine("content for sequence SequenceB2: "+content.tagNamesList()); } } if (content == null) { return new SequenceB2(); } else { return new SequenceB2(content); } } return null; } /** * Class to model Sequence "C" in MT 340. */ @SequenceStyle(Type.SPLIT_BY_15) public static class SequenceC extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceC() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceC(final SwiftTagListBlock content) { super(content.getTags()); } public static final Tag START_TAG = Field15C.emptyTag(); /** * Creates a new instance of this sequence with the given tags inside. * @param tags may be null, an empty sequence containing only start and end sequence tags will be returned * @return a new instance of the sequence, initialized with the parameter tags * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public static SequenceC newInstance(final Tag... tags) { final SequenceC result = new SequenceC(); result.append(START_TAG); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } return result; } /** * Create an empty $sequenceClassname. * This method is intended to avoid disambiguation for the newInstance() with variable list of blocks or tags * @return a new instance of the sequence * @since 7.7 */ public static SequenceC newInstance() { final SequenceC result = new SequenceC(); result.append(START_TAG); return result; } /** * Create a new instance of $sequenceClassname and add the contents of all sequences given inside. * Mainly intended to create a sequence by adding subsequences * @param sequences a list of blocks to set as the new sequence content * @return a new instance of the sequence, initialized with the parameter sequences content * @since 7.7 */ public static SequenceC newInstance(final SwiftTagListBlock... sequences) { final SequenceC result = new SequenceC(); result.append(START_TAG); if (sequences != null && sequences.length > 0) { for (final SwiftTagListBlock s : sequences) { result.addTags(s.getTags()); } } return result; } } /** * Get the single occurrence of SequenceC using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @since 7.7 * @return a new sequence that may be empty, <em>never returns null</em> */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceC getSequenceC() { return getSequenceC(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceC using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @param parentSequence a not null parent sequence to find SequenceC within it * @return the found sequence or an empty sequence if none is found, <em>never returns null</em> * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceC getSequenceC(SwiftTagListBlock parentSequence) { final java.util.Map<String, SwiftTagListBlock> map = SwiftMessageUtils.splitByField15(parentSequence); if (map.containsKey("C")) { return new SequenceC(map.get("C")); } return new SequenceC(); } /** * Class to model Sequence "D" in MT 340. */ @SequenceStyle(Type.SPLIT_BY_15) public static class SequenceD extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceD() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceD(final SwiftTagListBlock content) { super(content.getTags()); } public static final Tag START_TAG = Field15D.emptyTag(); /** * Creates a new instance of this sequence with the given tags inside. * @param tags may be null, an empty sequence containing only start and end sequence tags will be returned * @return a new instance of the sequence, initialized with the parameter tags * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public static SequenceD newInstance(final Tag... tags) { final SequenceD result = new SequenceD(); result.append(START_TAG); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } return result; } /** * Create an empty $sequenceClassname. * This method is intended to avoid disambiguation for the newInstance() with variable list of blocks or tags * @return a new instance of the sequence * @since 7.7 */ public static SequenceD newInstance() { final SequenceD result = new SequenceD(); result.append(START_TAG); return result; } /** * Create a new instance of $sequenceClassname and add the contents of all sequences given inside. * Mainly intended to create a sequence by adding subsequences * @param sequences a list of blocks to set as the new sequence content * @return a new instance of the sequence, initialized with the parameter sequences content * @since 7.7 */ public static SequenceD newInstance(final SwiftTagListBlock... sequences) { final SequenceD result = new SequenceD(); result.append(START_TAG); if (sequences != null && sequences.length > 0) { for (final SwiftTagListBlock s : sequences) { result.addTags(s.getTags()); } } return result; } } /** * Get the single occurrence of SequenceD using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @since 7.7 * @return a new sequence that may be empty, <em>never returns null</em> */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceD getSequenceD() { return getSequenceD(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceD using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @param parentSequence a not null parent sequence to find SequenceD within it * @return the found sequence or an empty sequence if none is found, <em>never returns null</em> * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceD getSequenceD(SwiftTagListBlock parentSequence) { final java.util.Map<String, SwiftTagListBlock> map = SwiftMessageUtils.splitByField15(parentSequence); if (map.containsKey("D")) { return new SequenceD(map.get("D")); } return new SequenceD(); } /** * Class to model Sequence "E" in MT 340. */ @SequenceStyle(Type.SPLIT_BY_15) public static class SequenceE extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceE() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceE(final SwiftTagListBlock content) { super(content.getTags()); } public static final Tag START_TAG = Field15E.emptyTag(); /** * Creates a new instance of this sequence with the given tags inside. * @param tags may be null, an empty sequence containing only start and end sequence tags will be returned * @return a new instance of the sequence, initialized with the parameter tags * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public static SequenceE newInstance(final Tag... tags) { final SequenceE result = new SequenceE(); result.append(START_TAG); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } return result; } /** * Create an empty $sequenceClassname. * This method is intended to avoid disambiguation for the newInstance() with variable list of blocks or tags * @return a new instance of the sequence * @since 7.7 */ public static SequenceE newInstance() { final SequenceE result = new SequenceE(); result.append(START_TAG); return result; } /** * Create a new instance of $sequenceClassname and add the contents of all sequences given inside. * Mainly intended to create a sequence by adding subsequences * @param sequences a list of blocks to set as the new sequence content * @return a new instance of the sequence, initialized with the parameter sequences content * @since 7.7 */ public static SequenceE newInstance(final SwiftTagListBlock... sequences) { final SequenceE result = new SequenceE(); result.append(START_TAG); if (sequences != null && sequences.length > 0) { for (final SwiftTagListBlock s : sequences) { result.addTags(s.getTags()); } } return result; } } /** * Get the single occurrence of SequenceE using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @since 7.7 * @return a new sequence that may be empty, <em>never returns null</em> */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceE getSequenceE() { return getSequenceE(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceE using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @param parentSequence a not null parent sequence to find SequenceE within it * @return the found sequence or an empty sequence if none is found, <em>never returns null</em> * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceE getSequenceE(SwiftTagListBlock parentSequence) { final java.util.Map<String, SwiftTagListBlock> map = SwiftMessageUtils.splitByField15(parentSequence); if (map.containsKey("E")) { return new SequenceE(map.get("E")); } return new SequenceE(); } /** * Class to model Sequence "F" in MT 340. */ @SequenceStyle(Type.SPLIT_BY_15) public static class SequenceF extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceF() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceF(final SwiftTagListBlock content) { super(content.getTags()); } public static final Tag START_TAG = Field15F.emptyTag(); /** * Creates a new instance of this sequence with the given tags inside. * @param tags may be null, an empty sequence containing only start and end sequence tags will be returned * @return a new instance of the sequence, initialized with the parameter tags * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public static SequenceF newInstance(final Tag... tags) { final SequenceF result = new SequenceF(); result.append(START_TAG); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } return result; } /** * Create an empty $sequenceClassname. * This method is intended to avoid disambiguation for the newInstance() with variable list of blocks or tags * @return a new instance of the sequence * @since 7.7 */ public static SequenceF newInstance() { final SequenceF result = new SequenceF(); result.append(START_TAG); return result; } /** * Create a new instance of $sequenceClassname and add the contents of all sequences given inside. * Mainly intended to create a sequence by adding subsequences * @param sequences a list of blocks to set as the new sequence content * @return a new instance of the sequence, initialized with the parameter sequences content * @since 7.7 */ public static SequenceF newInstance(final SwiftTagListBlock... sequences) { final SequenceF result = new SequenceF(); result.append(START_TAG); if (sequences != null && sequences.length > 0) { for (final SwiftTagListBlock s : sequences) { result.addTags(s.getTags()); } } return result; } } /** * Get the single occurrence of SequenceF using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @since 7.7 * @return a new sequence that may be empty, <em>never returns null</em> */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceF getSequenceF() { return getSequenceF(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceF using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @param parentSequence a not null parent sequence to find SequenceF within it * @return the found sequence or an empty sequence if none is found, <em>never returns null</em> * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceF getSequenceF(SwiftTagListBlock parentSequence) { final java.util.Map<String, SwiftTagListBlock> map = SwiftMessageUtils.splitByField15(parentSequence); if (map.containsKey("F")) { return new SequenceF(map.get("F")); } return new SequenceF(); } /** * Class to model Sequence "G" in MT 340. */ @SequenceStyle(Type.SPLIT_BY_15) public static class SequenceG extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceG() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceG(final SwiftTagListBlock content) { super(content.getTags()); } public static final Tag START_TAG = Field15G.emptyTag(); /** * Creates a new instance of this sequence with the given tags inside. * @param tags may be null, an empty sequence containing only start and end sequence tags will be returned * @return a new instance of the sequence, initialized with the parameter tags * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public static SequenceG newInstance(final Tag... tags) { final SequenceG result = new SequenceG(); result.append(START_TAG); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } return result; } /** * Create an empty $sequenceClassname. * This method is intended to avoid disambiguation for the newInstance() with variable list of blocks or tags * @return a new instance of the sequence * @since 7.7 */ public static SequenceG newInstance() { final SequenceG result = new SequenceG(); result.append(START_TAG); return result; } /** * Create a new instance of $sequenceClassname and add the contents of all sequences given inside. * Mainly intended to create a sequence by adding subsequences * @param sequences a list of blocks to set as the new sequence content * @return a new instance of the sequence, initialized with the parameter sequences content * @since 7.7 */ public static SequenceG newInstance(final SwiftTagListBlock... sequences) { final SequenceG result = new SequenceG(); result.append(START_TAG); if (sequences != null && sequences.length > 0) { for (final SwiftTagListBlock s : sequences) { result.addTags(s.getTags()); } } return result; } } /** * Get the single occurrence of SequenceG using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @since 7.7 * @return a new sequence that may be empty, <em>never returns null</em> */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceG getSequenceG() { return getSequenceG(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the single occurrence of SequenceG using field field 15 as sequence boundary. * The presence of this method indicates that this sequence can occur only once according to the Standard. * * @param parentSequence a not null parent sequence to find SequenceG within it * @return the found sequence or an empty sequence if none is found, <em>never returns null</em> * @since 7.7 */ @SequenceStyle(Type.SPLIT_BY_15) public SequenceG getSequenceG(SwiftTagListBlock parentSequence) { final java.util.Map<String, SwiftTagListBlock> map = SwiftMessageUtils.splitByField15(parentSequence); if (map.containsKey("G")) { return new SequenceG(map.get("G")); } return new SequenceG(); } /** * Class to model Sequence "G1" in MT 340. */ public static class SequenceG1 extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceG1() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceG1(final SwiftTagListBlock content) { super(content.getTags()); } /** * The name of the first tag in the sequence which must be mandatory. * May be null if we cannot determine this safely */ public static final String START_NAME = "22L" ; } /** * Class to model Sequence "G1a" in MT 340. */ public static class SequenceG1a extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceG1a() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceG1a(final SwiftTagListBlock content) { super(content.getTags()); } /** * First mandatory tag name of the sequence: <em>"22M" </em>. * Array format is for cases when more than one letter options is allowed */ public static final String[] START = { "22M" } ; /** * Last mandatory tag name of the sequence: <em>"22N" </em> * Array format is for cases when more than one letter options is allowed */ protected static final String[] END = { "22N" }; /** * List of optional tags after the last mandatory tag. */ protected static final String[] TAIL = new String[]{ }; /** * Same as {@link #newInstance(int, int, Tag...)} using zero for the indexes. * @param tags the list of tags to set as sequence content * @return a new instance of the sequence, initialized with the parameter tags */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static SequenceG1a newInstance(final Tag... tags) { return newInstance(0, 0, tags); } /** * Creates a sequence with starting and ending tags set to the indicated tags in from the * {@link #START} and {@link #END} lists of mandatory fields, and with the content between * the starting and ending tag initialized with the given optional tags. * * @param start a zero-based index within the list of mandatory starting tags in the sequence * @param end a zero-based index within the list of mandatory ending tags in the sequence * @param tags the list of tags to set as sequence content * @return a new instance of the sequence, initialized with the parameter tags */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static SequenceG1a newInstance(final int start, final int end, final Tag... tags) { final SequenceG1a result = new SequenceG1a(); result.append(new Tag(START[start], "")); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } result.append(new Tag(END[end], "")); return result; } } /** * Get the list of SequenceG1a delimited by leading tag and end, with an optional tail. * The presence of this method indicates that this sequence can occur more than once according to the Standard. * If message is empty or no sequences are found <em>an empty list</em> is returned. * * @return the found sequences or an empty list if none is found * @see SwiftTagListBlock#getSubBlocksDelimitedWithOptionalTail(String[], String[], String[]) */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public List<SequenceG1a> getSequenceG1aList() { return getSequenceG1aList(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the list of SequenceG1a delimited by leading tag and end, with an optional tail. * The presence of this method indicates that this sequence can occur more than once according to the Standard. * If message is empty or no sequences are found <em>an empty list</em> is returned. * * @see SwiftTagListBlock#getSubBlocksDelimitedWithOptionalTail(String[], String[], String[]) * @param parentSequence a not null parent sequence to find SequenceG1a within it * @return the found sequences or an empty list if none is found or parent sequence is null * @since 7.7 */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static List<SequenceG1a> getSequenceG1aList(final SwiftTagListBlock parentSequence) { if (parentSequence != null) { final List<SwiftTagListBlock> blocks = parentSequence.getSubBlocksDelimitedWithOptionalTail(SequenceG1a.START, SequenceG1a.END, SequenceG1a.TAIL); if (blocks != null && !blocks.isEmpty()) { final List<SequenceG1a> result = new ArrayList<>(blocks.size()); for (final SwiftTagListBlock b : blocks) { result.add(new SequenceG1a(b)); } return result; } } return Collections.emptyList(); } /** * Class to model Sequence "G1a1" in MT 340. */ public static class SequenceG1a1 extends SwiftTagListBlock { private static final long serialVersionUID = 1L; /** * Constructs an empty sequence. */ private SequenceG1a1() { super(new ArrayList<>()); } /** * Creates a sequence with the given content. * @see SwiftTagListBlock */ private SequenceG1a1(final SwiftTagListBlock content) { super(content.getTags()); } /** * First mandatory tag name of the sequence: <em>"22P" </em>. * Array format is for cases when more than one letter options is allowed */ public static final String[] START = { "22P" } ; /** * Last mandatory tag name of the sequence: <em>"22R" </em> * Array format is for cases when more than one letter options is allowed */ protected static final String[] END = { "22R" }; /** * List of optional tags after the last mandatory tag. */ protected static final String[] TAIL = new String[]{ }; /** * Same as {@link #newInstance(int, int, Tag...)} using zero for the indexes. * @param tags the list of tags to set as sequence content * @return a new instance of the sequence, initialized with the parameter tags */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static SequenceG1a1 newInstance(final Tag... tags) { return newInstance(0, 0, tags); } /** * Creates a sequence with starting and ending tags set to the indicated tags in from the * {@link #START} and {@link #END} lists of mandatory fields, and with the content between * the starting and ending tag initialized with the given optional tags. * * @param start a zero-based index within the list of mandatory starting tags in the sequence * @param end a zero-based index within the list of mandatory ending tags in the sequence * @param tags the list of tags to set as sequence content * @return a new instance of the sequence, initialized with the parameter tags */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static SequenceG1a1 newInstance(final int start, final int end, final Tag... tags) { final SequenceG1a1 result = new SequenceG1a1(); result.append(new Tag(START[start], "")); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.append(t); } } result.append(new Tag(END[end], "")); return result; } } /** * Get the list of SequenceG1a1 delimited by leading tag and end, with an optional tail. * The presence of this method indicates that this sequence can occur more than once according to the Standard. * If message is empty or no sequences are found <em>an empty list</em> is returned. * * @return the found sequences or an empty list if none is found * @see SwiftTagListBlock#getSubBlocksDelimitedWithOptionalTail(String[], String[], String[]) */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public List<SequenceG1a1> getSequenceG1a1List() { return getSequenceG1a1List(super.getSwiftMessageNotNullOrException().getBlock4()); } /** * Get the list of SequenceG1a1 delimited by leading tag and end, with an optional tail. * The presence of this method indicates that this sequence can occur more than once according to the Standard. * If message is empty or no sequences are found <em>an empty list</em> is returned. * * @see SwiftTagListBlock#getSubBlocksDelimitedWithOptionalTail(String[], String[], String[]) * @param parentSequence a not null parent sequence to find SequenceG1a1 within it * @return the found sequences or an empty list if none is found or parent sequence is null * @since 7.7 */ @SequenceStyle(Type.GENERATED_FIXED_WITH_OPTIONAL_TAIL) public static List<SequenceG1a1> getSequenceG1a1List(final SwiftTagListBlock parentSequence) { if (parentSequence != null) { final List<SwiftTagListBlock> blocks = parentSequence.getSubBlocksDelimitedWithOptionalTail(SequenceG1a1.START, SequenceG1a1.END, SequenceG1a1.TAIL); if (blocks != null && !blocks.isEmpty()) { final List<SequenceG1a1> result = new ArrayList<>(blocks.size()); for (final SwiftTagListBlock b : blocks) { result.add(new SequenceG1a1(b)); } return result; } } return Collections.emptyList(); } }
{ "content_hash": "e77d3135a77eb5aadcc88f8c6d5a6515", "timestamp": "", "source": "github", "line_count": 3248, "max_line_length": 161, "avg_line_length": 33.923645320197046, "alnum_prop": 0.6872413417556088, "repo_name": "prowide/prowide-core", "id": "6f141c21dffb7b50446dda3a44b5879e17896e6a", "size": "110779", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "src/generated/java/com/prowidesoftware/swift/model/mt/mt3xx/MT340.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "43156" }, { "name": "Java", "bytes": "25397388" } ], "symlink_target": "" }
@interface WMFPicOfTheDayTableViewCell : UITableViewCell - (void)setImageURL:(NSURL*)imageURL; - (void)setDisplayTitle:(NSString*)displayTitle; @end
{ "content_hash": "ac63a8e1e29e12d38e232d891cd26af9", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 56, "avg_line_length": 21.714285714285715, "alnum_prop": 0.7960526315789473, "repo_name": "jindulys/Wikipedia", "id": "592f16a1aab4c563cd5cb28657fed3f855992827", "size": "342", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Wikipedia/Code/WMFPicOfTheDayTableViewCell.h", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "8241" }, { "name": "C++", "bytes": "3272" }, { "name": "CSS", "bytes": "8885" }, { "name": "HTML", "bytes": "1001171" }, { "name": "JavaScript", "bytes": "41272" }, { "name": "Makefile", "bytes": "5442" }, { "name": "Objective-C", "bytes": "2046041" }, { "name": "Objective-C++", "bytes": "12196" }, { "name": "PHP", "bytes": "5433" }, { "name": "Ruby", "bytes": "16758" }, { "name": "Shell", "bytes": "6960" }, { "name": "Swift", "bytes": "128550" } ], "symlink_target": "" }
#include "third_party/blink/renderer/modules/service_worker/service_worker.h" #include <memory> #include <utility> #include "mojo/public/cpp/bindings/pending_associated_receiver.h" #include "mojo/public/cpp/bindings/pending_associated_remote.h" #include "third_party/blink/public/mojom/service_worker/service_worker_state.mojom-blink.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/core/v8/serialization/post_message_helper.h" #include "third_party/blink/renderer/bindings/core/v8/v8_post_message_options.h" #include "third_party/blink/renderer/core/dom/events/event.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/messaging/blink_transferable_message.h" #include "third_party/blink/renderer/core/messaging/message_port.h" #include "third_party/blink/renderer/modules/event_target_modules.h" #include "third_party/blink/renderer/modules/service_worker/service_worker_container.h" #include "third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/bindings/script_state.h" namespace blink { const AtomicString& ServiceWorker::InterfaceName() const { return event_target_names::kServiceWorker; } void ServiceWorker::postMessage(ScriptState* script_state, const ScriptValue& message, HeapVector<ScriptValue>& transfer, ExceptionState& exception_state) { PostMessageOptions* options = PostMessageOptions::Create(); if (!transfer.IsEmpty()) options->setTransfer(transfer); postMessage(script_state, message, options, exception_state); } void ServiceWorker::postMessage(ScriptState* script_state, const ScriptValue& message, const PostMessageOptions* options, ExceptionState& exception_state) { if (!GetExecutionContext()) { exception_state.ThrowDOMException( DOMExceptionCode::kInvalidStateError, "Failed to post a message: No associated provider is available."); return; } Transferables transferables; scoped_refptr<SerializedScriptValue> serialized_message = PostMessageHelper::SerializeMessageByCopy(script_state->GetIsolate(), message, options, transferables, exception_state); if (exception_state.HadException()) return; DCHECK(serialized_message); BlinkTransferableMessage msg; msg.message = serialized_message; msg.sender_origin = GetExecutionContext()->GetSecurityOrigin()->IsolatedCopy(); msg.ports = MessagePort::DisentanglePorts( ExecutionContext::From(script_state), transferables.message_ports, exception_state); if (exception_state.HadException()) return; if (msg.message->IsLockedToAgentCluster()) { msg.locked_agent_cluster_id = GetExecutionContext()->GetAgentClusterID(); } else { msg.locked_agent_cluster_id = absl::nullopt; } // Defer postMessage() from a prerendered page until page activation. // https://wicg.github.io/nav-speculation/prerendering.html#patch-service-workers if (GetExecutionContext()->IsWindow()) { Document* document = To<LocalDOMWindow>(GetExecutionContext())->document(); if (document->IsPrerendering()) { document->AddPostPrerenderingActivationStep( WTF::Bind(&ServiceWorker::PostMessageInternal, WrapWeakPersistent(this), std::move(msg))); return; } } PostMessageInternal(std::move(msg)); } void ServiceWorker::PostMessageInternal(BlinkTransferableMessage message) { host_->PostMessageToServiceWorker(std::move(message)); } ScriptPromise ServiceWorker::InternalsTerminate(ScriptState* script_state) { auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state); ScriptPromise promise = resolver->Promise(); host_->TerminateForTesting( WTF::Bind([](ScriptPromiseResolver* resolver) { resolver->Resolve(); }, WrapPersistent(resolver))); return promise; } void ServiceWorker::StateChanged(mojom::blink::ServiceWorkerState new_state) { state_ = new_state; DispatchEvent(*Event::Create(event_type_names::kStatechange)); } String ServiceWorker::scriptURL() const { return url_.GetString(); } String ServiceWorker::state() const { switch (state_) { case mojom::blink::ServiceWorkerState::kParsed: return "parsed"; case mojom::blink::ServiceWorkerState::kInstalling: return "installing"; case mojom::blink::ServiceWorkerState::kInstalled: return "installed"; case mojom::blink::ServiceWorkerState::kActivating: return "activating"; case mojom::blink::ServiceWorkerState::kActivated: return "activated"; case mojom::blink::ServiceWorkerState::kRedundant: return "redundant"; } NOTREACHED(); return g_null_atom; } ServiceWorker* ServiceWorker::From( ExecutionContext* context, mojom::blink::ServiceWorkerObjectInfoPtr info) { if (!info) return nullptr; return From(context, WebServiceWorkerObjectInfo(info->version_id, info->state, info->url, std::move(info->host_remote), std::move(info->receiver))); } ServiceWorker* ServiceWorker::From(ExecutionContext* context, WebServiceWorkerObjectInfo info) { if (!context) return nullptr; if (info.version_id == mojom::blink::kInvalidServiceWorkerVersionId) return nullptr; if (auto* scope = DynamicTo<ServiceWorkerGlobalScope>(context)) { return scope->GetOrCreateServiceWorker(std::move(info)); } return ServiceWorkerContainer::From(*To<LocalDOMWindow>(context)) ->GetOrCreateServiceWorker(std::move(info)); } bool ServiceWorker::HasPendingActivity() const { if (was_stopped_) return false; return state_ != mojom::blink::ServiceWorkerState::kRedundant; } void ServiceWorker::ContextLifecycleStateChanged( mojom::FrameLifecycleState state) {} void ServiceWorker::ContextDestroyed() { was_stopped_ = true; } ServiceWorker::ServiceWorker(ExecutionContext* execution_context, WebServiceWorkerObjectInfo info) : AbstractWorker(execution_context), url_(info.url), state_(info.state), host_(execution_context), receiver_(this, execution_context) { DCHECK_NE(mojom::blink::kInvalidServiceWorkerVersionId, info.version_id); host_.Bind( std::move(info.host_remote), execution_context->GetTaskRunner(blink::TaskType::kInternalDefault)); receiver_.Bind( mojo::PendingAssociatedReceiver<mojom::blink::ServiceWorkerObject>( std::move(info.receiver)), execution_context->GetTaskRunner(blink::TaskType::kInternalDefault)); } ServiceWorker::~ServiceWorker() = default; void ServiceWorker::Trace(Visitor* visitor) const { visitor->Trace(host_); visitor->Trace(receiver_); AbstractWorker::Trace(visitor); } } // namespace blink
{ "content_hash": "13fc7187ce1ce20aa73ded702b77cde0", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 91, "avg_line_length": 37.52261306532663, "alnum_prop": 0.6972010178117048, "repo_name": "scheib/chromium", "id": "801c7d8d9670635e3bd22ecafa32282f271a1c54", "size": "9029", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "third_party/blink/renderer/modules/service_worker/service_worker.cc", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
<?php // =================================================================================================== // _ __ _ _ // | |/ /__ _| | |_ _ _ _ _ __ _ // | ' </ _` | | _| || | '_/ _` | // |_|\_\__,_|_|\__|\_,_|_| \__,_| // // This file is part of the Kaltura Collaborative Media Suite which allows users // to do with audio, video, and animation what Wiki platfroms allow them to do with // text. // // Copyright (C) 2006-2011 Kaltura Inc. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // @ignore // =================================================================================================== /** * @namespace */ namespace Kaltura\Client\Type; /** * @package Kaltura * @subpackage Client */ class ApiParameterPermissionItem extends PermissionItem { public function getKalturaObjectType() { return 'KalturaApiParameterPermissionItem'; } public function __construct(\SimpleXMLElement $xml = null) { parent::__construct($xml); if(is_null($xml)) return; $this->object = (string)$xml->object; $this->parameter = (string)$xml->parameter; $this->action = (string)$xml->action; } /** * * @var string */ public $object = null; /** * * @var string */ public $parameter = null; /** * * @var \Kaltura\Client\Enum\ApiParameterPermissionItemAction */ public $action = null; }
{ "content_hash": "a2a51516157b7aae969816d4fff69865", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 102, "avg_line_length": 27.653333333333332, "alnum_prop": 0.5530376084860174, "repo_name": "FansWorldTV/web", "id": "d9c683085ffef23b402ce2e48e71a79f54797efb", "size": "2074", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/Kaltura/Client/Type/ApiParameterPermissionItem.php", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "13582" }, { "name": "CSS", "bytes": "645663" }, { "name": "JavaScript", "bytes": "1767573" }, { "name": "PHP", "bytes": "4666998" }, { "name": "Perl", "bytes": "448" } ], "symlink_target": "" }
using System; using System.Linq; using System.Threading.Tasks; using System.Web; using System.Web.Mvc; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.Owin; using Microsoft.Owin.Security; using TourOfTemplateV2CustomStore.Models; using System.Collections.Generic; using System.Security.Claims; namespace TourOfTemplateV2CustomStore.Controllers { [Authorize] public class ManageController : Controller { private ApplicationSignInManager _signInManager; private ApplicationUserManager _userManager; public ManageController() { } public ManageController(ApplicationUserManager userManager, ApplicationSignInManager signInManager) { UserManager = userManager; SignInManager = signInManager; } public ApplicationSignInManager SignInManager { get { return _signInManager ?? HttpContext.GetOwinContext().Get<ApplicationSignInManager>(); } private set { _signInManager = value; } } public ApplicationUserManager UserManager { get { return _userManager ?? HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>(); } private set { _userManager = value; } } // // GET: /Manage/Index public async Task<ActionResult> Index(ManageMessageId? message) { ViewBag.StatusMessage = message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed." : message == ManageMessageId.SetPasswordSuccess ? "Your password has been set." : message == ManageMessageId.SetTwoFactorSuccess ? "Your two-factor authentication provider has been set." : message == ManageMessageId.Error ? "An error has occurred." : message == ManageMessageId.AddPhoneSuccess ? "Your phone number was added." : message == ManageMessageId.RemovePhoneSuccess ? "Your phone number was removed." : ""; var userId = User.Identity.GetUserId(); var model = new IndexViewModel { HasPassword = HasPassword(), PhoneNumber = await UserManager.GetPhoneNumberAsync(userId), TwoFactor = await UserManager.GetTwoFactorEnabledAsync(userId), Logins = await UserManager.GetLoginsAsync(userId), BrowserRemembered = await AuthenticationManager.TwoFactorBrowserRememberedAsync(userId) }; // Attention 19 - Added this code, so that a user can see their claims var claims = new List<string>(); var user = User as ClaimsPrincipal; foreach (var claim in user.Claims) { claims.Add(string.Format("{0} | {1} | {2}", claim.Issuer, claim.Type, claim.Value)); } ViewBag.Claims = claims; return View(model); } // // POST: /Manage/RemoveLogin [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> RemoveLogin(string loginProvider, string providerKey) { ManageMessageId? message; var result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey)); if (result.Succeeded) { var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user != null) { await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false); } message = ManageMessageId.RemoveLoginSuccess; } else { message = ManageMessageId.Error; } return RedirectToAction("ManageLogins", new { Message = message }); } // // GET: /Manage/AddPhoneNumber public ActionResult AddPhoneNumber() { return View(); } // // POST: /Manage/AddPhoneNumber [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> AddPhoneNumber(AddPhoneNumberViewModel model) { if (!ModelState.IsValid) { return View(model); } // Generate the token and send it var code = await UserManager.GenerateChangePhoneNumberTokenAsync(User.Identity.GetUserId(), model.Number); if (UserManager.SmsService != null) { var message = new IdentityMessage { Destination = model.Number, Body = "Your security code is: " + code }; await UserManager.SmsService.SendAsync(message); } return RedirectToAction("VerifyPhoneNumber", new { PhoneNumber = model.Number }); } // // POST: /Manage/EnableTwoFactorAuthentication [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> EnableTwoFactorAuthentication() { await UserManager.SetTwoFactorEnabledAsync(User.Identity.GetUserId(), true); var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user != null) { await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false); } return RedirectToAction("Index", "Manage"); } // // POST: /Manage/DisableTwoFactorAuthentication [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> DisableTwoFactorAuthentication() { await UserManager.SetTwoFactorEnabledAsync(User.Identity.GetUserId(), false); var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user != null) { await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false); } return RedirectToAction("Index", "Manage"); } // // GET: /Manage/VerifyPhoneNumber public async Task<ActionResult> VerifyPhoneNumber(string phoneNumber) { var code = await UserManager.GenerateChangePhoneNumberTokenAsync(User.Identity.GetUserId(), phoneNumber); // Send an SMS through the SMS provider to verify the phone number return phoneNumber == null ? View("Error") : View(new VerifyPhoneNumberViewModel { PhoneNumber = phoneNumber }); } // // POST: /Manage/VerifyPhoneNumber [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> VerifyPhoneNumber(VerifyPhoneNumberViewModel model) { if (!ModelState.IsValid) { return View(model); } var result = await UserManager.ChangePhoneNumberAsync(User.Identity.GetUserId(), model.PhoneNumber, model.Code); if (result.Succeeded) { var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user != null) { await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false); } return RedirectToAction("Index", new { Message = ManageMessageId.AddPhoneSuccess }); } // If we got this far, something failed, redisplay form ModelState.AddModelError("", "Failed to verify phone"); return View(model); } // // GET: /Manage/RemovePhoneNumber public async Task<ActionResult> RemovePhoneNumber() { var result = await UserManager.SetPhoneNumberAsync(User.Identity.GetUserId(), null); if (!result.Succeeded) { return RedirectToAction("Index", new { Message = ManageMessageId.Error }); } var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user != null) { await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false); } return RedirectToAction("Index", new { Message = ManageMessageId.RemovePhoneSuccess }); } // // GET: /Manage/ChangePassword public ActionResult ChangePassword() { return View(); } // // POST: /Manage/ChangePassword [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> ChangePassword(ChangePasswordViewModel model) { if (!ModelState.IsValid) { return View(model); } var result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.OldPassword, model.NewPassword); if (result.Succeeded) { var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user != null) { await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false); } return RedirectToAction("Index", new { Message = ManageMessageId.ChangePasswordSuccess }); } AddErrors(result); return View(model); } // // GET: /Manage/SetPassword public ActionResult SetPassword() { return View(); } // // POST: /Manage/SetPassword [HttpPost] [ValidateAntiForgeryToken] public async Task<ActionResult> SetPassword(SetPasswordViewModel model) { if (ModelState.IsValid) { var result = await UserManager.AddPasswordAsync(User.Identity.GetUserId(), model.NewPassword); if (result.Succeeded) { var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user != null) { await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false); } return RedirectToAction("Index", new { Message = ManageMessageId.SetPasswordSuccess }); } AddErrors(result); } // If we got this far, something failed, redisplay form return View(model); } // // GET: /Manage/ManageLogins public async Task<ActionResult> ManageLogins(ManageMessageId? message) { ViewBag.StatusMessage = message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed." : message == ManageMessageId.Error ? "An error has occurred." : ""; var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user == null) { return View("Error"); } var userLogins = await UserManager.GetLoginsAsync(User.Identity.GetUserId()); var otherLogins = AuthenticationManager.GetExternalAuthenticationTypes().Where(auth => userLogins.All(ul => auth.AuthenticationType != ul.LoginProvider)).ToList(); ViewBag.ShowRemoveButton = user.PasswordHash != null || userLogins.Count > 1; return View(new ManageLoginsViewModel { CurrentLogins = userLogins, OtherLogins = otherLogins }); } // // POST: /Manage/LinkLogin [HttpPost] [ValidateAntiForgeryToken] public ActionResult LinkLogin(string provider) { // Request a redirect to the external login provider to link a login for the current user return new AccountController.ChallengeResult(provider, Url.Action("LinkLoginCallback", "Manage"), User.Identity.GetUserId()); } // // GET: /Manage/LinkLoginCallback public async Task<ActionResult> LinkLoginCallback() { var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(XsrfKey, User.Identity.GetUserId()); if (loginInfo == null) { return RedirectToAction("ManageLogins", new { Message = ManageMessageId.Error }); } var result = await UserManager.AddLoginAsync(User.Identity.GetUserId(), loginInfo.Login); return result.Succeeded ? RedirectToAction("ManageLogins") : RedirectToAction("ManageLogins", new { Message = ManageMessageId.Error }); } protected override void Dispose(bool disposing) { if (disposing && _userManager != null) { _userManager.Dispose(); _userManager = null; } base.Dispose(disposing); } #region Helpers // Used for XSRF protection when adding external logins private const string XsrfKey = "XsrfId"; private IAuthenticationManager AuthenticationManager { get { return HttpContext.GetOwinContext().Authentication; } } private void AddErrors(IdentityResult result) { foreach (var error in result.Errors) { ModelState.AddModelError("", error); } } private bool HasPassword() { var user = UserManager.FindById(User.Identity.GetUserId()); if (user != null) { return user.PasswordHash != null; } return false; } private bool HasPhoneNumber() { var user = UserManager.FindById(User.Identity.GetUserId()); if (user != null) { return user.PhoneNumber != null; } return false; } public enum ManageMessageId { AddPhoneSuccess, ChangePasswordSuccess, SetTwoFactorSuccess, SetPasswordSuccess, RemoveLoginSuccess, RemovePhoneSuccess, Error } #endregion } }
{ "content_hash": "42a3448ddca86632df54941605db2b23", "timestamp": "", "source": "github", "line_count": 401, "max_line_length": 175, "avg_line_length": 36.33167082294264, "alnum_prop": 0.5663394879538747, "repo_name": "peteratseneca/bti420winter2017", "id": "deafc401b8510fe545d04a062f999184b2f316d8", "size": "14571", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Week_08/TourOfTemplateV2CustomStore/TourOfTemplateV2CustomStore/Controllers/ManageController.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "3161" }, { "name": "C#", "bytes": "2357981" }, { "name": "CSS", "bytes": "15390" }, { "name": "HTML", "bytes": "153810" }, { "name": "JavaScript", "bytes": "6581181" } ], "symlink_target": "" }
package org.opengroup.osdu.workflow.provider.interfaces; import org.opengroup.osdu.core.common.exception.UnauthorizedException; import org.opengroup.osdu.core.common.model.http.DpsHeaders; import org.opengroup.osdu.workflow.model.GetStatusRequest; import org.opengroup.osdu.workflow.model.GetStatusResponse; import org.opengroup.osdu.workflow.model.UpdateStatusRequest; import org.opengroup.osdu.workflow.model.UpdateStatusResponse; public interface IWorkflowStatusService { /** * GetWorkflowStatus returns status of workflow specified. * * @param request getStatus request * @param headers headers * @return workflow status. * @throws UnauthorizedException if token and partitionID are missing or, invalid */ GetStatusResponse getWorkflowStatus(GetStatusRequest request, DpsHeaders headers); /** * Update Workflow Status returns status of workflow specified. * * @param request update status request * @param headers headers * @return workflow status. * @throws UnauthorizedException if token and partitionID are missing or, invalid */ UpdateStatusResponse updateWorkflowStatus(UpdateStatusRequest request, DpsHeaders headers); }
{ "content_hash": "468d4ef3201b71149a01128204871896", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 93, "avg_line_length": 34.94117647058823, "alnum_prop": 0.7912457912457912, "repo_name": "google/framework-for-osdu", "id": "93f6e0f5be1c61579d9ca7e9fe5c3bbfb630ca18", "size": "1781", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "osdu-r2/os-workflow/workflow-core/src/main/java/org/opengroup/osdu/workflow/provider/interfaces/IWorkflowStatusService.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "3847" }, { "name": "HCL", "bytes": "12193" }, { "name": "Java", "bytes": "2059984" }, { "name": "Python", "bytes": "53662" }, { "name": "Shell", "bytes": "5972" } ], "symlink_target": "" }
package org.drools.compiler.kie.builder.impl; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import com.google.protobuf.ByteString; import org.drools.compiler.builder.impl.KnowledgeBuilderImpl; import org.drools.compiler.commons.jci.stores.ResourceStore; import org.drools.compiler.compiler.PackageRegistry; import org.drools.compiler.kproject.models.KieModuleModelImpl; import org.drools.core.factmodel.ClassDefinition; import org.drools.core.rule.JavaDialectRuntimeData; import org.drools.core.rule.KieModuleMetaInfo; import org.drools.core.rule.TypeDeclaration; import org.drools.core.rule.TypeMetaInfo; import org.drools.core.util.IoUtils; import org.kie.api.builder.model.KieModuleModel; import org.kie.api.definition.KiePackage; import org.kie.api.definition.rule.Rule; import org.kie.api.definition.type.FactType; public class KieMetaInfoBuilder { private final InternalKieModule kModule; public KieMetaInfoBuilder(InternalKieModule kModule) { this.kModule = kModule; } public void writeKieModuleMetaInfo(ResourceStore trgMfs) { KieModuleMetaInfo info = generateKieModuleMetaInfo(trgMfs); trgMfs.write( KieModuleModelImpl.KMODULE_INFO_JAR_PATH, info.marshallMetaInfos().getBytes( IoUtils.UTF8_CHARSET ), true ); } public KieModuleMetaInfo getKieModuleMetaInfo(){ return generateKieModuleMetaInfo(null); } public KieModuleMetaInfo generateKieModuleMetaInfo(ResourceStore trgMfs) { // TODO: I think this method is wrong because it is only inspecting packages that are included // in at least one kbase, but I believe it should inspect all packages, even if not included in // any kbase, as they could be included in the future Map<String, TypeMetaInfo> typeInfos = new HashMap<String, TypeMetaInfo>(); Map<String, Set<String>> rulesPerPackage = new HashMap<String, Set<String>>(); KieModuleModel kieModuleModel = kModule.getKieModuleModel(); for ( String kieBaseName : kieModuleModel.getKieBaseModels().keySet() ) { KnowledgeBuilderImpl kBuilder = (KnowledgeBuilderImpl) kModule.getKnowledgeBuilderForKieBase( kieBaseName ); Map<String, PackageRegistry> pkgRegistryMap = kBuilder.getPackageRegistry(); KieModuleCache.KModuleCache.Builder _kmoduleCacheBuilder = createCacheBuilder(); KieModuleCache.CompilationData.Builder _compData = createCompilationData(); for ( KiePackage kPkg : kBuilder.getKnowledgePackages() ) { PackageRegistry pkgRegistry = pkgRegistryMap.get( kPkg.getName() ); JavaDialectRuntimeData runtimeData = (JavaDialectRuntimeData) pkgRegistry.getDialectRuntimeRegistry().getDialectData( "java" ); List<String> types = new ArrayList<String>(); for ( FactType factType : kPkg.getFactTypes() ) { Class< ? > typeClass = ((ClassDefinition) factType).getDefinedClass(); TypeDeclaration typeDeclaration = pkgRegistry.getPackage().getTypeDeclaration( typeClass ); if ( typeDeclaration != null ) { typeInfos.put( typeClass.getName(), new TypeMetaInfo(typeDeclaration) ); } String className = factType.getName(); String internalName = className.replace('.', '/') + ".class"; if (trgMfs != null) { byte[] bytes = runtimeData.getBytecode( internalName ); if ( bytes != null ) { trgMfs.write( internalName, bytes, true ); } } types.add( internalName ); } Set<String> rules = rulesPerPackage.get( kPkg.getName() ); if( rules == null ) { rules = new HashSet<String>(); } for ( Rule rule : kPkg.getRules() ) { if( !rules.contains( rule.getName() ) ) { rules.add(rule.getName()); } } if (!rules.isEmpty()) { rulesPerPackage.put(kPkg.getName(), rules); } addToCompilationData(_compData, runtimeData, types); } _kmoduleCacheBuilder.addCompilationData( _compData.build() ); if (trgMfs != null) { writeCompilationDataToTrg( _kmoduleCacheBuilder.build(), kieBaseName, trgMfs ); } } return new KieModuleMetaInfo(typeInfos, rulesPerPackage); } private KieModuleCache.KModuleCache.Builder createCacheBuilder() { return KieModuleCache.KModuleCache.newBuilder(); } private KieModuleCache.CompilationData.Builder createCompilationData() { // Create compilation data cache return KieModuleCache.CompilationData.newBuilder().setDialect("java"); } private void addToCompilationData(KieModuleCache.CompilationData.Builder _cdata, JavaDialectRuntimeData runtimeData, List<String> types) { for ( Map.Entry<String, byte[]> entry : runtimeData.getStore().entrySet() ) { if ( !types.contains( entry.getKey() ) ) { KieModuleCache.CompDataEntry _entry = KieModuleCache.CompDataEntry.newBuilder() .setId( entry.getKey() ) .setData( ByteString.copyFrom(entry.getValue()) ) .build(); _cdata.addEntry( _entry ); } } } private void writeCompilationDataToTrg(KieModuleCache.KModuleCache _kmoduleCache, String kieBaseName, ResourceStore trgMfs) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); KieModuleCacheHelper.writeToStreamWithHeader( out, _kmoduleCache ); String compilatonDataPath = "META-INF/" + kieBaseName.replace( '.', '/' ) + "/kbase.cache"; trgMfs.write( compilatonDataPath, out.toByteArray(), true ); } catch ( IOException e ) { // what to do here? } } }
{ "content_hash": "2fe7116aeb05ec2c6dd5451bd5bdc701", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 143, "avg_line_length": 45.57931034482758, "alnum_prop": 0.6118928733545166, "repo_name": "reynoldsm88/drools", "id": "004c5acfce3e1d7f31f882cfe4ac02093f2cc9c0", "size": "7186", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieMetaInfoBuilder.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "14766" }, { "name": "Batchfile", "bytes": "2554" }, { "name": "CSS", "bytes": "1412" }, { "name": "GAP", "bytes": "197080" }, { "name": "HTML", "bytes": "6832" }, { "name": "Java", "bytes": "27734331" }, { "name": "Protocol Buffer", "bytes": "13855" }, { "name": "Python", "bytes": "4555" }, { "name": "Ruby", "bytes": "491" }, { "name": "Shell", "bytes": "1120" }, { "name": "XSLT", "bytes": "24302" } ], "symlink_target": "" }
package org.springframework.http; import java.io.ByteArrayOutputStream; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.ZonedDateTime; import java.time.format.DateTimeParseException; import java.util.ArrayList; import java.util.Base64; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; import org.springframework.util.StreamUtils; import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.nio.charset.StandardCharsets.US_ASCII; import static java.nio.charset.StandardCharsets.UTF_8; import static java.time.format.DateTimeFormatter.RFC_1123_DATE_TIME; /** * Representation of the Content-Disposition type and parameters as defined in RFC 6266. * * @author Sebastien Deleuze * @author Juergen Hoeller * @author Rossen Stoyanchev * @author Sergey Tsypanov * @since 5.0 * @see <a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a> */ public final class ContentDisposition { private final static Pattern BASE64_ENCODED_PATTERN = Pattern.compile("=\\?([0-9a-zA-Z-_]+)\\?B\\?([+/0-9a-zA-Z]+=*)\\?="); private final static Pattern QUOTED_PRINTABLE_ENCODED_PATTERN = Pattern.compile("=\\?([0-9a-zA-Z-_]+)\\?Q\\?([!->@-~]+)\\?="); // Printable ASCII other than "?" or SPACE private static final String INVALID_HEADER_FIELD_PARAMETER_FORMAT = "Invalid header field parameter format (as defined in RFC 5987)"; @Nullable private final String type; @Nullable private final String name; @Nullable private final String filename; @Nullable private final Charset charset; @Nullable private final Long size; @Nullable private final ZonedDateTime creationDate; @Nullable private final ZonedDateTime modificationDate; @Nullable private final ZonedDateTime readDate; /** * Private constructor. See static factory methods in this class. */ private ContentDisposition(@Nullable String type, @Nullable String name, @Nullable String filename, @Nullable Charset charset, @Nullable Long size, @Nullable ZonedDateTime creationDate, @Nullable ZonedDateTime modificationDate, @Nullable ZonedDateTime readDate) { this.type = type; this.name = name; this.filename = filename; this.charset = charset; this.size = size; this.creationDate = creationDate; this.modificationDate = modificationDate; this.readDate = readDate; } /** * Return whether the {@link #getType() type} is {@literal "attachment"}. * @since 5.3 */ public boolean isAttachment() { return (this.type != null && this.type.equalsIgnoreCase("attachment")); } /** * Return whether the {@link #getType() type} is {@literal "form-data"}. * @since 5.3 */ public boolean isFormData() { return (this.type != null && this.type.equalsIgnoreCase("form-data")); } /** * Return whether the {@link #getType() type} is {@literal "inline"}. * @since 5.3 */ public boolean isInline() { return (this.type != null && this.type.equalsIgnoreCase("inline")); } /** * Return the disposition type. * @see #isAttachment() * @see #isFormData() * @see #isInline() */ @Nullable public String getType() { return this.type; } /** * Return the value of the {@literal name} parameter, or {@code null} if not defined. */ @Nullable public String getName() { return this.name; } /** * Return the value of the {@literal filename} parameter, possibly decoded * from BASE64 encoding based on RFC 2047, or of the {@literal filename*} * parameter, possibly decoded as defined in the RFC 5987. */ @Nullable public String getFilename() { return this.filename; } /** * Return the charset defined in {@literal filename*} parameter, or {@code null} if not defined. */ @Nullable public Charset getCharset() { return this.charset; } /** * Return the value of the {@literal size} parameter, or {@code null} if not defined. * @deprecated since 5.2.3 as per * <a href="https://tools.ietf.org/html/rfc6266#appendix-B">RFC 6266, Appendix B</a>, * to be removed in a future release. */ @Deprecated @Nullable public Long getSize() { return this.size; } /** * Return the value of the {@literal creation-date} parameter, or {@code null} if not defined. * @deprecated since 5.2.3 as per * <a href="https://tools.ietf.org/html/rfc6266#appendix-B">RFC 6266, Appendix B</a>, * to be removed in a future release. */ @Deprecated @Nullable public ZonedDateTime getCreationDate() { return this.creationDate; } /** * Return the value of the {@literal modification-date} parameter, or {@code null} if not defined. * @deprecated since 5.2.3 as per * <a href="https://tools.ietf.org/html/rfc6266#appendix-B">RFC 6266, Appendix B</a>, * to be removed in a future release. */ @Deprecated @Nullable public ZonedDateTime getModificationDate() { return this.modificationDate; } /** * Return the value of the {@literal read-date} parameter, or {@code null} if not defined. * @deprecated since 5.2.3 as per * <a href="https://tools.ietf.org/html/rfc6266#appendix-B">RFC 6266, Appendix B</a>, * to be removed in a future release. */ @Deprecated @Nullable public ZonedDateTime getReadDate() { return this.readDate; } @Override public boolean equals(@Nullable Object other) { if (this == other) { return true; } if (!(other instanceof ContentDisposition otherCd)) { return false; } return (ObjectUtils.nullSafeEquals(this.type, otherCd.type) && ObjectUtils.nullSafeEquals(this.name, otherCd.name) && ObjectUtils.nullSafeEquals(this.filename, otherCd.filename) && ObjectUtils.nullSafeEquals(this.charset, otherCd.charset) && ObjectUtils.nullSafeEquals(this.size, otherCd.size) && ObjectUtils.nullSafeEquals(this.creationDate, otherCd.creationDate)&& ObjectUtils.nullSafeEquals(this.modificationDate, otherCd.modificationDate)&& ObjectUtils.nullSafeEquals(this.readDate, otherCd.readDate)); } @Override public int hashCode() { int result = ObjectUtils.nullSafeHashCode(this.type); result = 31 * result + ObjectUtils.nullSafeHashCode(this.name); result = 31 * result + ObjectUtils.nullSafeHashCode(this.filename); result = 31 * result + ObjectUtils.nullSafeHashCode(this.charset); result = 31 * result + ObjectUtils.nullSafeHashCode(this.size); result = 31 * result + (this.creationDate != null ? this.creationDate.hashCode() : 0); result = 31 * result + (this.modificationDate != null ? this.modificationDate.hashCode() : 0); result = 31 * result + (this.readDate != null ? this.readDate.hashCode() : 0); return result; } /** * Return the header value for this content disposition as defined in RFC 6266. * @see #parse(String) */ @Override public String toString() { StringBuilder sb = new StringBuilder(); if (this.type != null) { sb.append(this.type); } if (this.name != null) { sb.append("; name=\""); sb.append(this.name).append('\"'); } if (this.filename != null) { if (this.charset == null || StandardCharsets.US_ASCII.equals(this.charset)) { sb.append("; filename=\""); sb.append(encodeQuotedPairs(this.filename)).append('\"'); } else { sb.append("; filename*="); sb.append(encodeFilename(this.filename, this.charset)); } } if (this.size != null) { sb.append("; size="); sb.append(this.size); } if (this.creationDate != null) { sb.append("; creation-date=\""); sb.append(RFC_1123_DATE_TIME.format(this.creationDate)); sb.append('\"'); } if (this.modificationDate != null) { sb.append("; modification-date=\""); sb.append(RFC_1123_DATE_TIME.format(this.modificationDate)); sb.append('\"'); } if (this.readDate != null) { sb.append("; read-date=\""); sb.append(RFC_1123_DATE_TIME.format(this.readDate)); sb.append('\"'); } return sb.toString(); } /** * Return a builder for a {@code ContentDisposition} of type {@literal "attachment"}. * @since 5.3 */ public static Builder attachment() { return builder("attachment"); } /** * Return a builder for a {@code ContentDisposition} of type {@literal "form-data"}. * @since 5.3 */ public static Builder formData() { return builder("form-data"); } /** * Return a builder for a {@code ContentDisposition} of type {@literal "inline"}. * @since 5.3 */ public static Builder inline() { return builder("inline"); } /** * Return a builder for a {@code ContentDisposition}. * @param type the disposition type like for example {@literal inline}, * {@literal attachment}, or {@literal form-data} * @return the builder */ public static Builder builder(String type) { return new BuilderImpl(type); } /** * Return an empty content disposition. */ public static ContentDisposition empty() { return new ContentDisposition("", null, null, null, null, null, null, null); } /** * Parse a {@literal Content-Disposition} header value as defined in RFC 2183. * @param contentDisposition the {@literal Content-Disposition} header value * @return the parsed content disposition * @see #toString() */ public static ContentDisposition parse(String contentDisposition) { List<String> parts = tokenize(contentDisposition); String type = parts.get(0); String name = null; String filename = null; Charset charset = null; Long size = null; ZonedDateTime creationDate = null; ZonedDateTime modificationDate = null; ZonedDateTime readDate = null; for (int i = 1; i < parts.size(); i++) { String part = parts.get(i); int eqIndex = part.indexOf('='); if (eqIndex != -1) { String attribute = part.substring(0, eqIndex); String value = (part.startsWith("\"", eqIndex + 1) && part.endsWith("\"") ? part.substring(eqIndex + 2, part.length() - 1) : part.substring(eqIndex + 1)); if (attribute.equals("name") ) { name = value; } else if (attribute.equals("filename*") ) { int idx1 = value.indexOf('\''); int idx2 = value.indexOf('\'', idx1 + 1); if (idx1 != -1 && idx2 != -1) { charset = Charset.forName(value.substring(0, idx1).trim()); Assert.isTrue(UTF_8.equals(charset) || ISO_8859_1.equals(charset), "Charset must be UTF-8 or ISO-8859-1"); filename = decodeFilename(value.substring(idx2 + 1), charset); } else { // US ASCII filename = decodeFilename(value, StandardCharsets.US_ASCII); } } else if (attribute.equals("filename") && (filename == null)) { if (value.startsWith("=?") ) { Matcher matcher = BASE64_ENCODED_PATTERN.matcher(value); if (matcher.find()) { Base64.Decoder decoder = Base64.getDecoder(); StringBuilder builder = new StringBuilder(); do { charset = Charset.forName(matcher.group(1)); byte[] decoded = decoder.decode(matcher.group(2)); builder.append(new String(decoded, charset)); } while (matcher.find()); filename = builder.toString(); } else { matcher = QUOTED_PRINTABLE_ENCODED_PATTERN.matcher(value); if (matcher.find()) { StringBuilder builder = new StringBuilder(); do { charset = Charset.forName(matcher.group(1)); String decoded = decodeQuotedPrintableFilename(matcher.group(2), charset); builder.append(decoded); } while (matcher.find()); filename = builder.toString(); } else { filename = value; } } } else if (value.indexOf('\\') != -1) { filename = decodeQuotedPairs(value); } else { filename = value; } } else if (attribute.equals("size") ) { size = Long.parseLong(value); } else if (attribute.equals("creation-date")) { try { creationDate = ZonedDateTime.parse(value, RFC_1123_DATE_TIME); } catch (DateTimeParseException ex) { // ignore } } else if (attribute.equals("modification-date")) { try { modificationDate = ZonedDateTime.parse(value, RFC_1123_DATE_TIME); } catch (DateTimeParseException ex) { // ignore } } else if (attribute.equals("read-date")) { try { readDate = ZonedDateTime.parse(value, RFC_1123_DATE_TIME); } catch (DateTimeParseException ex) { // ignore } } } else { throw new IllegalArgumentException("Invalid content disposition format"); } } return new ContentDisposition(type, name, filename, charset, size, creationDate, modificationDate, readDate); } private static List<String> tokenize(String headerValue) { int index = headerValue.indexOf(';'); String type = (index >= 0 ? headerValue.substring(0, index) : headerValue).trim(); if (type.isEmpty()) { throw new IllegalArgumentException("Content-Disposition header must not be empty"); } List<String> parts = new ArrayList<>(); parts.add(type); if (index >= 0) { do { int nextIndex = index + 1; boolean quoted = false; boolean escaped = false; while (nextIndex < headerValue.length()) { char ch = headerValue.charAt(nextIndex); if (ch == ';') { if (!quoted) { break; } } else if (!escaped && ch == '"') { quoted = !quoted; } escaped = (!escaped && ch == '\\'); nextIndex++; } String part = headerValue.substring(index + 1, nextIndex).trim(); if (!part.isEmpty()) { parts.add(part); } index = nextIndex; } while (index < headerValue.length()); } return parts; } /** * Decode the given header field param as described in RFC 5987. * <p>Only the US-ASCII, UTF-8 and ISO-8859-1 charsets are supported. * @param filename the filename * @param charset the charset for the filename * @return the encoded header field param * @see <a href="https://tools.ietf.org/html/rfc5987">RFC 5987</a> */ private static String decodeFilename(String filename, Charset charset) { Assert.notNull(filename, "'filename' must not be null"); Assert.notNull(charset, "'charset' must not be null"); byte[] value = filename.getBytes(charset); ByteArrayOutputStream baos = new ByteArrayOutputStream(); int index = 0; while (index < value.length) { byte b = value[index]; if (isRFC5987AttrChar(b)) { baos.write((char) b); index++; } else if (b == '%' && index < value.length - 2) { char[] array = new char[]{(char) value[index + 1], (char) value[index + 2]}; try { baos.write(Integer.parseInt(String.valueOf(array), 16)); } catch (NumberFormatException ex) { throw new IllegalArgumentException(INVALID_HEADER_FIELD_PARAMETER_FORMAT, ex); } index+=3; } else { throw new IllegalArgumentException(INVALID_HEADER_FIELD_PARAMETER_FORMAT); } } return StreamUtils.copyToString(baos, charset); } private static boolean isRFC5987AttrChar(byte c) { return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '!' || c == '#' || c == '$' || c == '&' || c == '+' || c == '-' || c == '.' || c == '^' || c == '_' || c == '`' || c == '|' || c == '~'; } /** * Decode the given header field param as described in RFC 2047. * @param filename the filename * @param charset the charset for the filename * @return the encoded header field param * @see <a href="https://tools.ietf.org/html/rfc2047">RFC 2047</a> */ private static String decodeQuotedPrintableFilename(String filename, Charset charset) { Assert.notNull(filename, "'filename' must not be null"); Assert.notNull(charset, "'charset' must not be null"); byte[] value = filename.getBytes(US_ASCII); ByteArrayOutputStream baos = new ByteArrayOutputStream(); int index = 0; while (index < value.length) { byte b = value[index]; if (b == '_') { baos.write(' '); index++; } else if (b == '=' && index < value.length - 2) { int i1 = Character.digit((char) value[index + 1], 16); int i2 = Character.digit((char) value[index + 2], 16); if (i1 == -1 || i2 == -1) { throw new IllegalArgumentException("Not a valid hex sequence: " + filename.substring(index)); } baos.write((i1 << 4) | i2); index += 3; } else { baos.write(b); index++; } } return StreamUtils.copyToString(baos, charset); } private static String encodeQuotedPairs(String filename) { if (filename.indexOf('"') == -1 && filename.indexOf('\\') == -1) { return filename; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < filename.length() ; i++) { char c = filename.charAt(i); if (c == '"' || c == '\\') { sb.append('\\'); } sb.append(c); } return sb.toString(); } private static String decodeQuotedPairs(String filename) { StringBuilder sb = new StringBuilder(); int length = filename.length(); for (int i = 0; i < length; i++) { char c = filename.charAt(i); if (filename.charAt(i) == '\\' && i + 1 < length) { i++; sb.append(filename.charAt(i)); } else { sb.append(c); } } return sb.toString(); } /** * Encode the given header field param as describe in RFC 5987. * @param input the header field param * @param charset the charset of the header field param string, * only the US-ASCII, UTF-8 and ISO-8859-1 charsets are supported * @return the encoded header field param * @see <a href="https://tools.ietf.org/html/rfc5987">RFC 5987</a> */ private static String encodeFilename(String input, Charset charset) { Assert.notNull(input, "'input' must not be null"); Assert.notNull(charset, "'charset' must not be null"); Assert.isTrue(!StandardCharsets.US_ASCII.equals(charset), "ASCII does not require encoding"); Assert.isTrue(UTF_8.equals(charset) || ISO_8859_1.equals(charset), "Only UTF-8 and ISO-8859-1 are supported"); byte[] source = input.getBytes(charset); int len = source.length; StringBuilder sb = new StringBuilder(len << 1); sb.append(charset.name()); sb.append("''"); for (byte b : source) { if (isRFC5987AttrChar(b)) { sb.append((char) b); } else { sb.append('%'); char hex1 = Character.toUpperCase(Character.forDigit((b >> 4) & 0xF, 16)); char hex2 = Character.toUpperCase(Character.forDigit(b & 0xF, 16)); sb.append(hex1); sb.append(hex2); } } return sb.toString(); } /** * A mutable builder for {@code ContentDisposition}. */ public interface Builder { /** * Set the value of the {@literal name} parameter. */ Builder name(String name); /** * Set the value of the {@literal filename} parameter. The given * filename will be formatted as quoted-string, as defined in RFC 2616, * section 2.2, and any quote characters within the filename value will * be escaped with a backslash, e.g. {@code "foo\"bar.txt"} becomes * {@code "foo\\\"bar.txt"}. */ Builder filename(String filename); /** * Set the value of the {@code filename} that will be encoded as * defined in RFC 5987. Only the US-ASCII, UTF-8, and ISO-8859-1 * charsets are supported. * <p><strong>Note:</strong> Do not use this for a * {@code "multipart/form-data"} request since * <a href="https://tools.ietf.org/html/rfc7578#section-4.2">RFC 7578, Section 4.2</a> * and also RFC 5987 mention it does not apply to multipart requests. */ Builder filename(String filename, Charset charset); /** * Set the value of the {@literal size} parameter. * @deprecated since 5.2.3 as per * <a href="https://tools.ietf.org/html/rfc6266#appendix-B">RFC 6266, Appendix B</a>, * to be removed in a future release. */ @Deprecated Builder size(Long size); /** * Set the value of the {@literal creation-date} parameter. * @deprecated since 5.2.3 as per * <a href="https://tools.ietf.org/html/rfc6266#appendix-B">RFC 6266, Appendix B</a>, * to be removed in a future release. */ @Deprecated Builder creationDate(ZonedDateTime creationDate); /** * Set the value of the {@literal modification-date} parameter. * @deprecated since 5.2.3 as per * <a href="https://tools.ietf.org/html/rfc6266#appendix-B">RFC 6266, Appendix B</a>, * to be removed in a future release. */ @Deprecated Builder modificationDate(ZonedDateTime modificationDate); /** * Set the value of the {@literal read-date} parameter. * @deprecated since 5.2.3 as per * <a href="https://tools.ietf.org/html/rfc6266#appendix-B">RFC 6266, Appendix B</a>, * to be removed in a future release. */ @Deprecated Builder readDate(ZonedDateTime readDate); /** * Build the content disposition. */ ContentDisposition build(); } private static class BuilderImpl implements Builder { private final String type; @Nullable private String name; @Nullable private String filename; @Nullable private Charset charset; @Nullable private Long size; @Nullable private ZonedDateTime creationDate; @Nullable private ZonedDateTime modificationDate; @Nullable private ZonedDateTime readDate; public BuilderImpl(String type) { Assert.hasText(type, "'type' must not be not empty"); this.type = type; } @Override public Builder name(String name) { this.name = name; return this; } @Override public Builder filename(String filename) { Assert.hasText(filename, "No filename"); this.filename = filename; return this; } @Override public Builder filename(String filename, Charset charset) { Assert.hasText(filename, "No filename"); this.filename = filename; this.charset = charset; return this; } @Override @SuppressWarnings("deprecation") public Builder size(Long size) { this.size = size; return this; } @Override @SuppressWarnings("deprecation") public Builder creationDate(ZonedDateTime creationDate) { this.creationDate = creationDate; return this; } @Override @SuppressWarnings("deprecation") public Builder modificationDate(ZonedDateTime modificationDate) { this.modificationDate = modificationDate; return this; } @Override @SuppressWarnings("deprecation") public Builder readDate(ZonedDateTime readDate) { this.readDate = readDate; return this; } @Override public ContentDisposition build() { return new ContentDisposition(this.type, this.name, this.filename, this.charset, this.size, this.creationDate, this.modificationDate, this.readDate); } } }
{ "content_hash": "26ecb1cd219adf1ef5d829a576c01c27", "timestamp": "", "source": "github", "line_count": 778, "max_line_length": 112, "avg_line_length": 28.983290488431876, "alnum_prop": 0.6571023105237482, "repo_name": "spring-projects/spring-framework", "id": "6cc33fe8def86d509f7baacf5c61d4f1e68bd9da", "size": "23170", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "spring-web/src/main/java/org/springframework/http/ContentDisposition.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AspectJ", "bytes": "32003" }, { "name": "CSS", "bytes": "1019" }, { "name": "Dockerfile", "bytes": "257" }, { "name": "FreeMarker", "bytes": "30820" }, { "name": "Groovy", "bytes": "6902" }, { "name": "HTML", "bytes": "1203" }, { "name": "Java", "bytes": "43939386" }, { "name": "JavaScript", "bytes": "280" }, { "name": "Kotlin", "bytes": "571613" }, { "name": "PLpgSQL", "bytes": "305" }, { "name": "Python", "bytes": "254" }, { "name": "Ruby", "bytes": "1060" }, { "name": "Shell", "bytes": "5374" }, { "name": "Smarty", "bytes": "700" }, { "name": "XSLT", "bytes": "2945" } ], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{ "content_hash": "f8e83e71f865bc807c48377a13d78b5c", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "d4aa74a6d8afd784a541e712c15f235ac0e55b33", "size": "179", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Lamiaceae/Thymus/Thymus mandschuricus/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<div> <h2>Usando ngModelChange</h2> <form action=""> <label for="nombre">Dime tu nombre </label> <input type="text" id="nombre" name="nombre" [(ngModel)] = "nombre"> <button (click)='btnBorrar($event)'>Borrar</button> </form> <p>Hola {{nombre.toUpperCase()}}</p> </div>
{ "content_hash": "1d135099d3197022b22b0eeb96265dc1", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 59, "avg_line_length": 32.2, "alnum_prop": 0.5527950310559007, "repo_name": "silvamolinaf/Curso-Angular", "id": "c6024041fe9796f173e7c974e5b6d3d6a53c0b33", "size": "322", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "04_componentes/binding/src/app/formulario_bnb/formulario.component.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "11958" }, { "name": "HTML", "bytes": "42343" }, { "name": "JavaScript", "bytes": "2237367" }, { "name": "TypeScript", "bytes": "279389" } ], "symlink_target": "" }
#ifdef _WIN32_WCE #define _CRTDBG_MAP_ALLOC #include <math.h> #include <winerror.h> #include <stdlib.h> #include <stdio.h> #include <stddef.h> #include <string.h> #include <winsock.h> #include <wininet.h> #include <windows.h> #include <winioctl.h> #include <winbase.h> #elif WIN32 #define _CRTDBG_MAP_ALLOC #include <math.h> #include <winerror.h> #include <stdlib.h> #include <stdio.h> #include <stddef.h> #include <string.h> #ifdef WINSOCK2 #include <winsock2.h> #include <ws2tcpip.h> #else #include <winsock.h> #include <wininet.h> #endif #include <windows.h> #include <winioctl.h> #include <winbase.h> #include <crtdbg.h> #elif _POSIX #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/time.h> #include <netdb.h> #include <string.h> #include <sys/ioctl.h> #include <net/if.h> #include <sys/utsname.h> #include <sys/socket.h> #include <netinet/in.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #endif #ifdef WIN32 #define sem_t HANDLE #define sem_init(p_semaphore,y,initialValue) *p_semaphore=CreateSemaphore(NULL,initialValue,FD_SETSIZE,NULL) #define sem_destroy(x) (CloseHandle(*x)==0?1:0) #define sem_wait(x) WaitForSingleObject(*x,INFINITE) #define sem_trywait(x) ((WaitForSingleObject(*x,0)==WAIT_OBJECT_0)?0:1) #define sem_post(x) ReleaseSemaphore(*x,1,NULL) #define strncasecmp(x,y,z) _strnicmp(x,y,z) #elif _WIN32_WCE #define sem_t HANDLE #define sem_init(x,y,z) *x=CreateSemaphore(NULL,z,FD_SETSIZE,NULL) #define sem_destroy(x) (CloseHandle(*x)==0?1:0) #define sem_wait(x) WaitForSingleObject(*x,INFINITE) #define sem_trywait(x) ((WaitForSingleObject(*x,0)==WAIT_OBJECT_0)?0:1) #define sem_post(x) ReleaseSemaphore(*x,1,NULL) #define strncasecmp(x,y,z) _strnicmp(x,y,z) #else #include <semaphore.h> #endif #include <memory.h> #include <math.h> #include "ILibParsers.h" #include "ILibWebClient.h" #include "ILibAsyncSocket.h" #include "Utility.h" #define MAX_IDLE_SESSIONS 20 #define HTTP_SESSION_IDLE_TIMEOUT 3 #define HTTP_CONNECT_RETRY_COUNT 4 #define INITIAL_BUFFER_SIZE 8192 #define PIPELINE_UNKNOWN 0 #define PIPELINE_YES 1 #define PIPELINE_NO 2 #define STARTCHUNK 0 #define ENDCHUNK 1 #define DATACHUNK 2 #define FOOTERCHUNK 3 struct ILibWebRequest { char **Buffer; int *BufferLength; int *UserFree; int NumberOfBuffers; struct sockaddr_in remote; void *user1,*user2; void (*OnResponse)( void *WebReaderToken, int InterruptFlag, struct packetheader *header, char *bodyBuffer, int *beginPointer, int endPointer, int done, void *user1, void *user2, int *PAUSE); }; struct ILibWebClientManager { void (*PreSelect)(void* object,fd_set *readset, fd_set *writeset, fd_set *errorset, int* blocktime); void (*PostSelect)(void* object,int slct, fd_set *readset, fd_set *writeset, fd_set *errorset); void (*Destroy)(void* object); void **socks; int socksLength; void *DataTable; void *idleTable; void *backlogQueue; void *timer; int idleCount; void *Chain; sem_t QLock; }; struct ILibWebClient_ChunkData { int Flag; char *buffer; int offset; int mallocSize; int bytesLeft; }; struct ILibWebClientDataObject { int PipelineFlag; int ActivityCounter; struct sockaddr_in remote; struct ILibWebClientManager *Parent; int FinHeader; int Chunked; int BytesLeft; int WaitForClose; int Closing; int Server; int HeaderLength; int ExponentialBackoff; struct ILibWebClient_ChunkData *chunk; struct packetheader *header; int InitialRequestAnswered; void* RequestQueue; void *SOCK; int LocalIP; int PAUSE; }; void ILibWebClient_DestroyWebClientDataObject(void *token) { struct ILibWebClientDataObject *wcdo = (struct ILibWebClientDataObject*)token; struct ILibWebRequest *wr; int i; int zero=0; if(wcdo->Closing<0) { return; } if(wcdo->SOCK!=NULL && ILibAsyncSocket_IsFree(wcdo->SOCK)==0) { wcdo->Closing = -1; ILibAsyncSocket_Disconnect(wcdo->SOCK); } if(wcdo->header!=NULL) { ILibDestructPacket(wcdo->header); } if(wcdo->chunk!=NULL) { if(wcdo->chunk->buffer!=NULL) {FREE(wcdo->chunk->buffer);} FREE(wcdo->chunk); } wr = ILibQueue_DeQueue(wcdo->RequestQueue); while(wr!=NULL) { for(i=0;i<wr->NumberOfBuffers;++i) { if(wr->UserFree[i]==0) {FREE(wr->Buffer[i]);} } FREE(wr->Buffer); FREE(wr->BufferLength); FREE(wr->UserFree); if(wcdo->Server==0 && wr->OnResponse!=NULL) { wr->OnResponse( NULL, WEBCLIENT_DESTROYED, NULL, NULL, NULL, 0, -1, wr->user1, wr->user2, &zero); } FREE(wr); wr = ILibQueue_DeQueue(wcdo->RequestQueue); } ILibQueue_Destroy(wcdo->RequestQueue); FREE(wcdo); } void ILibDestroyWebClient(void *object) { struct ILibWebClientManager *manager = (struct ILibWebClientManager*)object; void *en; void *wcdo; char *key; int keyLength,i; struct ILibWebRequest *wr; int zero=0; en = ILibHashTree_GetEnumerator(manager->DataTable); while(ILibHashTree_MoveNext(en)==0) { ILibHashTree_GetValue(en,&key,&keyLength,&wcdo); ILibWebClient_DestroyWebClientDataObject(wcdo); } ILibHashTree_DestroyEnumerator(en); wr = ILibQueue_DeQueue(manager->backlogQueue); while(wr!=NULL) { if(wr->OnResponse!=NULL) { wr->OnResponse( NULL, WEBCLIENT_DESTROYED, NULL, NULL, NULL, 0, -1, wr->user1, wr->user2, &zero); } for(i=0;i<wr->NumberOfBuffers;++i) { if(wr->UserFree[i]==0) {FREE(wr->Buffer[i]);} FREE(wr->Buffer); FREE(wr->BufferLength); FREE(wr->UserFree); } wr = ILibQueue_DeQueue(manager->backlogQueue); } ILibQueue_Destroy(manager->backlogQueue); ILibDestroyHashTree(manager->idleTable); ILibDestroyHashTree(manager->DataTable); sem_destroy(&(manager->QLock)); FREE(manager->socks); } void ILibWebClient_TimerInterruptSink(void *object) { } void ILibWebClient_TimerSink(void *object) { void *enumerator; char IPV4Address[22]; int IPV4AddressLength; struct ILibWebClientDataObject *wcdo = (struct ILibWebClientDataObject*)object; char *key; int keyLength; void *data; void *DisconnectSocket = NULL; sem_wait(&(wcdo->Parent->QLock)); if(ILibQueue_IsEmpty(wcdo->RequestQueue)!=0) { // Still Idle if(wcdo->SOCK!=NULL && ILibAsyncSocket_IsFree(wcdo->SOCK)==0) { wcdo->Closing = 1; DisconnectSocket = wcdo->SOCK; } if(wcdo->Parent->idleCount>MAX_IDLE_SESSIONS) { --wcdo->Parent->idleCount; enumerator = ILibHashTree_GetEnumerator(wcdo->Parent->idleTable); ILibHashTree_MoveNext(enumerator); ILibHashTree_GetValue(enumerator,&key,&keyLength,&data); ILibHashTree_DestroyEnumerator(enumerator); ILibDeleteEntry(wcdo->Parent->idleTable,key,keyLength); ILibDeleteEntry(wcdo->Parent->DataTable,key,keyLength); ILibWebClient_DestroyWebClientDataObject(wcdo); } IPV4AddressLength = sprintf(IPV4Address,"%s:%d", inet_ntoa(wcdo->remote.sin_addr), ntohs(wcdo->remote.sin_port)); ILibAddEntry(wcdo->Parent->idleTable,IPV4Address,IPV4AddressLength,wcdo); ++wcdo->Parent->idleCount; wcdo->SOCK = NULL; } sem_post(&(wcdo->Parent->QLock)); if(DisconnectSocket!=NULL) { ILibAsyncSocket_Disconnect(DisconnectSocket); } } void ILibWebClient_FinishedResponse_Server(void *_wcdo) { struct ILibWebClientDataObject *wcdo = (struct ILibWebClientDataObject*)_wcdo; if(wcdo->chunk!=NULL) { FREE(wcdo->chunk->buffer); FREE(wcdo->chunk); wcdo->chunk = NULL; } if(wcdo->header!=NULL) { ILibDestructPacket(wcdo->header); } wcdo->Chunked = 0; wcdo->header = NULL; wcdo->FinHeader = 0; wcdo->WaitForClose = 0; wcdo->InitialRequestAnswered = 1; } void ILibWebClient_FinishedResponse(void *socketModule, struct ILibWebClientDataObject *wcdo) { struct ILibWebRequest *wr; int i; if(ILibAsyncSocket_IsFree(socketModule)!=0 || wcdo->Server!=0) {return;} if(wcdo->chunk!=NULL) { FREE(wcdo->chunk->buffer); FREE(wcdo->chunk); wcdo->chunk = NULL; } if(wcdo->header!=NULL) { ILibDestructPacket(wcdo->header); } wcdo->header = NULL; wcdo->FinHeader = 0; wcdo->WaitForClose = 0; wcdo->Chunked = 0; wcdo->InitialRequestAnswered = 1; sem_wait(&(wcdo->Parent->QLock)); wr = ILibQueue_DeQueue(wcdo->RequestQueue); for(i=0;i<wr->NumberOfBuffers;++i) { if(wr->UserFree[i]==0) {FREE(wr->Buffer[i]);} } FREE(wr->Buffer); FREE(wr->BufferLength); FREE(wr->UserFree); FREE(wr); wr = ILibQueue_PeekQueue(wcdo->RequestQueue); if(wr!=NULL) { // Send Another Request if(wcdo->PipelineFlag!=PIPELINE_NO) { wcdo->PipelineFlag = PIPELINE_YES; for(i=0;i<wr->NumberOfBuffers;++i) { ILibAsyncSocket_Send(wcdo->SOCK,wr->Buffer[i],wr->BufferLength[i],-1); } } } else { // Queue Is Empty ILibLifeTime_Add(wcdo->Parent->timer,wcdo,HTTP_SESSION_IDLE_TIMEOUT,&ILibWebClient_TimerSink,&ILibWebClient_TimerInterruptSink); } sem_post(&(wcdo->Parent->QLock)); } void ILibWebClient_ProcessChunk(struct ILibWebClientDataObject *wcdo, char *buffer, int *p_beginPointer, int endPointer) { char *hex; int i; struct parser_result *pr; struct ILibWebRequest *wr; int bp; sem_wait(&(wcdo->Parent->QLock)); wr = ILibQueue_PeekQueue(wcdo->RequestQueue); sem_post(&(wcdo->Parent->QLock)); if(wcdo->chunk==NULL) { wcdo->chunk = (struct ILibWebClient_ChunkData*)MALLOC(sizeof(struct ILibWebClient_ChunkData)); memset(wcdo->chunk,0,sizeof(struct ILibWebClient_ChunkData)); wcdo->chunk->buffer = (char*)MALLOC(INITIAL_BUFFER_SIZE); wcdo->chunk->mallocSize = INITIAL_BUFFER_SIZE; } switch(wcdo->chunk->Flag) { case STARTCHUNK: // Reading Chunk Header if(endPointer<3){return;} for(i=2;i<endPointer;++i) { if(buffer[i-2]=='\r' && buffer[i-1]=='\n') { pr = ILibParseString(buffer,0,i-2,";",1); pr->FirstResult->data[pr->FirstResult->datalength] = '\0'; wcdo->chunk->bytesLeft = (int)strtol(pr->FirstResult->data,&hex,16); *p_beginPointer = i; wcdo->chunk->Flag=wcdo->chunk->bytesLeft==0?FOOTERCHUNK:DATACHUNK; ILibDestructParserResults(pr); break; } } break; case ENDCHUNK: if(endPointer>=2) { *p_beginPointer = 2; wcdo->chunk->Flag = STARTCHUNK; } break; case DATACHUNK: if(endPointer>=wcdo->chunk->bytesLeft) { wcdo->chunk->Flag = ENDCHUNK; i = wcdo->chunk->bytesLeft; } else { i=endPointer; } if(wcdo->chunk->offset+endPointer>wcdo->chunk->mallocSize) { wcdo->chunk->buffer = (char*)realloc(wcdo->chunk->buffer,wcdo->chunk->mallocSize+INITIAL_BUFFER_SIZE); } memcpy(wcdo->chunk->buffer+wcdo->chunk->offset,buffer,i); wcdo->chunk->bytesLeft-=i; wcdo->chunk->offset+=i; bp = 0; if(wr->OnResponse!=NULL) { wr->OnResponse( wcdo->SOCK, 0, wcdo->header, wcdo->chunk->buffer, &bp, wcdo->chunk->offset, 0, wr->user1, wr->user2, &(wcdo->PAUSE)); } if(bp==i) { wcdo->chunk->offset = 0; } else if(bp!=0) { memcpy(wcdo->chunk->buffer+bp,wcdo->chunk->buffer,i-bp); wcdo->chunk->offset -= bp; } *p_beginPointer = i; break; case FOOTERCHUNK: if(endPointer>=2) { for(i=2;i<=endPointer;++i) { if(buffer[i-2]=='\r' && buffer[i-1]=='\n') { if(i==2) { // FINISHED if(wr->OnResponse!=NULL) { wr->OnResponse( wcdo->SOCK, 0, wcdo->header, wcdo->chunk->buffer, p_beginPointer, wcdo->chunk->offset, -1, wr->user1, wr->user2, &(wcdo->PAUSE)); } if(wcdo->chunk->buffer!=NULL) {FREE(wcdo->chunk->buffer);} FREE(wcdo->chunk); wcdo->chunk = NULL; ILibWebClient_FinishedResponse(wcdo->SOCK,wcdo); *p_beginPointer = 2; } else { // Add Headers } } } } break; } } void ILibWebClient_OnData(void* socketModule,char* buffer,int *p_beginPointer, int endPointer,void (**InterruptPtr)(void *socketModule, void *user), void **user, int *PAUSE) { struct ILibWebClientDataObject *wcdo = (struct ILibWebClientDataObject*)(*user); struct ILibWebRequest *wr; struct packetheader *tph; struct packetheader_field_node *phfn; int i=0; int zero = 0; int Fini; if(wcdo->Server==0) { sem_wait(&(wcdo->Parent->QLock)); } wr = (struct ILibWebRequest*)ILibQueue_PeekQueue(wcdo->RequestQueue); if(wcdo->Server==0) { sem_post(&(wcdo->Parent->QLock)); } if(wr==NULL) { *p_beginPointer = endPointer; return; } if(wcdo->FinHeader==0) { //Still Reading Headers if(endPointer - (*p_beginPointer)>=4) { while(i <= (endPointer - (*p_beginPointer))-4) { if(buffer[*p_beginPointer+i]=='\r' && buffer[*p_beginPointer+i+1]=='\n' && buffer[*p_beginPointer+i+2]=='\r' && buffer[*p_beginPointer+i+3]=='\n') { wcdo->HeaderLength = i+3; wcdo->WaitForClose=1; wcdo->BytesLeft=-1; wcdo->FinHeader=1; wcdo->header = ILibParsePacketHeader(buffer,*p_beginPointer,endPointer-(*p_beginPointer)); if(wcdo->header!=NULL) { wcdo->header->ReceivingAddress = wcdo->LocalIP; //Introspect Request phfn = wcdo->header->FirstField; while(phfn!=NULL) { if(phfn->FieldLength==17 && strncasecmp(phfn->Field,"transfer-encoding",17)==0) { if(phfn->FieldDataLength==7 && strncasecmp(phfn->FieldData,"chunked",7)==0) { wcdo->WaitForClose=0; wcdo->Chunked = 1; } } if(phfn->FieldLength==14 && strncasecmp(phfn->Field,"content-length",14)==0) { wcdo->WaitForClose=0; phfn->FieldData[phfn->FieldDataLength] = '\0'; wcdo->BytesLeft = atoi(phfn->FieldData); } phfn = phfn->NextField; } if(wcdo->Server!=0 && wcdo->BytesLeft==-1) { wcdo->BytesLeft=0; // Request with no body } if(wcdo->BytesLeft==0) { // Complete Response if(wr->OnResponse!=NULL) { wr->OnResponse( socketModule, 0, wcdo->header, NULL, &zero, 0, -1, wr->user1, wr->user2, &(wcdo->PAUSE)); } *p_beginPointer = *p_beginPointer + i + 4; ILibWebClient_FinishedResponse(socketModule,wcdo); } else { //Check to see if any of the body arrived if(wcdo->Chunked==0) { // Normal Encoding if(wcdo->BytesLeft!=-1 && (endPointer-(*p_beginPointer)) - (i+4) >= wcdo->BytesLeft) { // Read The Entire Packet if(wr->OnResponse!=NULL) { wr->OnResponse( socketModule, 0, wcdo->header, buffer+i+4, &zero, wcdo->BytesLeft, -1, wr->user1, wr->user2, &(wcdo->PAUSE)); } *p_beginPointer = *p_beginPointer + i + 4 + (zero==0?wcdo->BytesLeft:zero); ILibWebClient_FinishedResponse(socketModule,wcdo); } else { if(wr->OnResponse!=NULL) { wr->OnResponse( socketModule, 0, wcdo->header, buffer+i+4, &zero, (endPointer - (*p_beginPointer) - (i+4)), 0, wr->user1, wr->user2, &(wcdo->PAUSE)); } wcdo->HeaderLength = 0; *p_beginPointer = i+4+zero; wcdo->BytesLeft -= zero; tph = ILibClonePacket(wcdo->header); ILibDestructPacket(wcdo->header); wcdo->header = tph; } } else { // Chunked ILibWebClient_ProcessChunk(wcdo,buffer+i+4,&zero,(endPointer - (*p_beginPointer) - (i+4))); *p_beginPointer = i+4+zero; tph = ILibClonePacket(wcdo->header); ILibDestructPacket(wcdo->header); wcdo->header = tph; } } } else { //ERROR } break; } ++i; } } } else { //Just Process the Body if(wcdo->Chunked==0) { Fini = ((endPointer - (*p_beginPointer))>=wcdo->BytesLeft)?-1:0; zero = *p_beginPointer; // Normal if(wr->OnResponse!=NULL) { wr->OnResponse( socketModule, 0, wcdo->header, buffer, &zero, ((endPointer - (*p_beginPointer))>=wcdo->BytesLeft)?wcdo->BytesLeft:(endPointer - (*p_beginPointer)), Fini, wr->user1, wr->user2, &(wcdo->PAUSE)); } if(ILibAsyncSocket_IsFree(socketModule)==0) { wcdo->BytesLeft -= *p_beginPointer; if(Fini!=0) { *p_beginPointer += wcdo->HeaderLength; *p_beginPointer = *p_beginPointer + wcdo->BytesLeft; } else { wcdo->BytesLeft -= zero; } if(Fini!=0) { ILibWebClient_FinishedResponse(socketModule,wcdo); } } } else { // Chunked ILibWebClient_ProcessChunk(wcdo,buffer,p_beginPointer,endPointer); } } if(ILibAsyncSocket_IsFree(socketModule)==0) { *PAUSE = wcdo->PAUSE; } } void ILibWebClient_RetrySink(void *object) { char key[22]; int keyLength; struct ILibWebClientDataObject *wcdo = (struct ILibWebClientDataObject*)object; struct ILibWebClientManager *wcm = wcdo->Parent; wcdo->ExponentialBackoff = wcdo->ExponentialBackoff==0?1:wcdo->ExponentialBackoff * 2; sem_wait(&(wcm->QLock)); if(wcdo->ExponentialBackoff==(int)pow((double)2,(double)HTTP_CONNECT_RETRY_COUNT)) { // Retried enough times, give up keyLength = sprintf(key,"%s:%d",inet_ntoa(wcdo->remote.sin_addr),(int)ntohs(wcdo->remote.sin_port)); ILibDeleteEntry(wcdo->Parent->DataTable,key,keyLength); ILibDeleteEntry(wcdo->Parent->idleTable,key,keyLength); ILibWebClient_DestroyWebClientDataObject(wcdo); } else { ILibQueue_EnQueue(wcdo->Parent->backlogQueue,wcdo); } sem_post(&(wcm->QLock)); } void ILibWebClient_OnConnect(void* socketModule, int Connected, void *user) { struct ILibWebClientDataObject *wcdo = (struct ILibWebClientDataObject*)user; struct ILibWebRequest *r; int i; wcdo->SOCK = socketModule; wcdo->InitialRequestAnswered=0; if(Connected!=0) { //Success: Send First Request wcdo->LocalIP = ILibAsyncSocket_GetLocalInterface(socketModule); wcdo->ExponentialBackoff=1; sem_wait(&(wcdo->Parent->QLock)); r = ILibQueue_PeekQueue(wcdo->RequestQueue); sem_post(&(wcdo->Parent->QLock)); for(i=0;i<r->NumberOfBuffers;++i) { ILibAsyncSocket_Send(socketModule,r->Buffer[i],r->BufferLength[i],-1); } } else { //ToDo: Exponential Backoff / ReTry wcdo->Closing=2; //This is required, so we don't notify the user yet ILibAsyncSocket_Disconnect(socketModule); wcdo->Closing=0; wcdo->PipelineFlag = PIPELINE_UNKNOWN; ILibLifeTime_Add(wcdo->Parent->timer,wcdo,wcdo->ExponentialBackoff,&ILibWebClient_RetrySink,NULL); } } void ILibWebClient_OnDisconnect(void* socketModule, void *user) { struct ILibWebClientDataObject *wcdo = (struct ILibWebClientDataObject*)user; struct ILibWebRequest *wr; char *buffer; int BeginPointer,EndPointer; if(wcdo->Closing==0) { //ToDo: This should only be set if there are pending requests wcdo->PipelineFlag = PIPELINE_NO; } if(wcdo->WaitForClose!=0) { // Finish this session ILibAsyncSocket_GetBuffer(socketModule,&buffer,&BeginPointer,&EndPointer); sem_wait(&(wcdo->Parent->QLock)); wr = ILibQueue_PeekQueue(wcdo->RequestQueue); sem_post(&(wcdo->Parent->QLock)); if(wr->OnResponse!=NULL) { wr->OnResponse( socketModule, 0, wcdo->header, buffer, &BeginPointer, EndPointer, -1, wr->user1, wr->user2, &(wcdo->PAUSE)); ILibWebClient_FinishedResponse(socketModule,wcdo); } } if(wcdo->Closing!=0){return;} sem_wait(&(wcdo->Parent->QLock)); wr = ILibQueue_PeekQueue(wcdo->RequestQueue); sem_post(&(wcdo->Parent->QLock)); if(wr!=NULL) { // Still Requests to be made if(wcdo->InitialRequestAnswered==0) { //Error wr->OnResponse( socketModule, 0, NULL, NULL, NULL, 0, -1, wr->user1, wr->user2, &(wcdo->PAUSE)); ILibWebClient_FinishedResponse(socketModule,wcdo); sem_wait(&(wcdo->Parent->QLock)); wr = ILibQueue_PeekQueue(wcdo->RequestQueue); sem_post(&(wcdo->Parent->QLock)); if(wr==NULL){return;} } // Make Another Connection and Continue wcdo->Closing = 0; ILibAsyncSocket_ConnectTo( socketModule, INADDR_ANY, wr->remote.sin_addr.s_addr, (int)ntohs(wr->remote.sin_port), NULL, wcdo); } } void ILibWebClient_OnSendOK(void *socketModule, void *user) { } //void ILibWebClient_PreProcess(void* WebClientModule,int slct, fd_set *readset, fd_set *writeset, fd_set *errorset) void ILibWebClient_PreProcess(void* WebClientModule,fd_set *readset, fd_set *writeset, fd_set *errorset, int* blocktime) { struct ILibWebClientManager *wcm = (struct ILibWebClientManager*)WebClientModule; struct ILibWebClientDataObject *wcdo; int i; int OK=0; sem_wait(&(wcm->QLock)); while(OK==0 && ILibQueue_IsEmpty(wcm->backlogQueue)==0) { OK=1; for(i=0;i<wcm->socksLength;++i) { if(ILibAsyncSocket_IsFree(wcm->socks[i])!=0) { OK=0; wcdo = ILibQueue_DeQueue(wcm->backlogQueue); wcdo->Closing = 0; ILibAsyncSocket_ConnectTo( wcm->socks[i], INADDR_ANY, wcdo->remote.sin_addr.s_addr, (int)ntohs(wcdo->remote.sin_port), NULL, wcdo); } if(ILibQueue_IsEmpty(wcm->backlogQueue)!=0) {break;} } } sem_post(&(wcm->QLock)); } void *ILibCreateWebClientEx(void (*OnResponse)( void *WebReaderToken, int InterruptFlag, struct packetheader *header, char *bodyBuffer, int *beginPointer, int endPointer, int done, void *user1, void *user2, int *PAUSE), void *socketModule, void *user1, void *user2) { struct ILibWebClientDataObject *wcdo = (struct ILibWebClientDataObject*)MALLOC(sizeof(struct ILibWebClientDataObject)); struct ILibWebRequest *wr; memset(wcdo,0,sizeof(struct ILibWebClientDataObject)); wcdo->Parent = NULL; wcdo->RequestQueue = ILibQueue_Create(); wcdo->Server = 1; wcdo->SOCK = socketModule; wr = (struct ILibWebRequest*)MALLOC(sizeof(struct ILibWebRequest)); memset(wr,0,sizeof(struct ILibWebRequest)); wr->OnResponse = OnResponse; ILibQueue_EnQueue(wcdo->RequestQueue,wr); wr->user1 = user1; wr->user2 = user2; return(wcdo); } void *ILibCreateWebClient(int PoolSize,void *Chain) { int i; struct ILibWebClientManager *RetVal = (struct ILibWebClientManager*)MALLOC(sizeof(struct ILibWebClientManager)); memset(RetVal,0,sizeof(struct ILibWebClientManager)); RetVal->Destroy = &ILibDestroyWebClient; RetVal->PreSelect = &ILibWebClient_PreProcess; //RetVal->PostSelect = &ILibWebClient_PreProcess; RetVal->socksLength = PoolSize; RetVal->socks = (void**)MALLOC(PoolSize*sizeof(void*)); sem_init(&(RetVal->QLock),0,1); RetVal->Chain = Chain; RetVal->backlogQueue = ILibQueue_Create(); RetVal->DataTable = ILibInitHashTree(); RetVal->idleTable = ILibInitHashTree(); RetVal->timer = ILibCreateLifeTime(Chain); ILibAddToChain(Chain,RetVal); for(i=0;i<PoolSize;++i) { RetVal->socks[i] = ILibCreateAsyncSocketModule( Chain, INITIAL_BUFFER_SIZE, &ILibWebClient_OnData, &ILibWebClient_OnConnect, &ILibWebClient_OnDisconnect, &ILibWebClient_OnSendOK); } return((void*)RetVal); } void ILibWebClient_PipelineRequest( void *WebClient, struct sockaddr_in *RemoteEndpoint, struct packetheader *packet, void (*OnResponse)( void *WebReaderToken, int InterruptFlag, struct packetheader *header, char *bodyBuffer, int *beginPointer, int endPointer, int done, void *user1, void *user2, int *PAUSE), void *user1, void *user2) { int ForceUnBlock=0; char IPV4Address[22]; int IPV4AddressLength; struct ILibWebClientManager *wcm = (struct ILibWebClientManager*)WebClient; struct ILibWebClientDataObject *wcdo; struct ILibWebRequest *request = (struct ILibWebRequest*)MALLOC(sizeof(struct ILibWebRequest)); int i; request->NumberOfBuffers = 1; request->Buffer = (char**)MALLOC(1*sizeof(char*)); request->BufferLength = (int*)MALLOC(1*sizeof(int)); request->UserFree = (int*)MALLOC(1*sizeof(int)); request->BufferLength[0] = ILibGetRawPacket(packet,&(request->Buffer[0])); request->UserFree[0] = 0; request->OnResponse = OnResponse; request->remote.sin_port = RemoteEndpoint->sin_port; request->remote.sin_addr.s_addr = RemoteEndpoint->sin_addr.s_addr; request->user1 = user1; request->user2 = user2; IPV4AddressLength = sprintf(IPV4Address,"%s:%d", inet_ntoa(RemoteEndpoint->sin_addr), ntohs(RemoteEndpoint->sin_port)); sem_wait(&(wcm->QLock)); if(ILibHasEntry(wcm->DataTable,IPV4Address,IPV4AddressLength)!=0) { // Entry Found wcdo = (struct ILibWebClientDataObject*)ILibGetEntry(wcm->DataTable,IPV4Address,IPV4AddressLength); if(ILibQueue_IsEmpty(wcdo->RequestQueue)!=0) { // Take out of Idle State --wcm->idleCount; ILibDeleteEntry(wcm->idleTable,IPV4Address,IPV4AddressLength); ILibLifeTime_Remove(wcm->timer,wcdo); if(wcdo->SOCK==NULL || ILibAsyncSocket_IsFree(wcdo->SOCK)!=0) { ILibQueue_EnQueue(wcm->backlogQueue,wcdo); ForceUnBlock=1; } else { for(i=0;i<request->NumberOfBuffers;++i) { ILibAsyncSocket_Send(wcdo->SOCK,request->Buffer[i],request->BufferLength[i],1); } } } ILibQueue_EnQueue(wcdo->RequestQueue,request); } else { // Need to queue Entry wcdo = (struct ILibWebClientDataObject*)MALLOC(sizeof(struct ILibWebClientDataObject)); memset(wcdo,0,sizeof(struct ILibWebClientDataObject)); wcdo->Parent = wcm; wcdo->RequestQueue = ILibQueue_Create(); wcdo->remote.sin_port = RemoteEndpoint->sin_port; wcdo->remote.sin_addr.s_addr = RemoteEndpoint->sin_addr.s_addr; ILibQueue_EnQueue(wcdo->RequestQueue,request); ILibAddEntry(wcm->DataTable,IPV4Address,IPV4AddressLength,wcdo); ILibQueue_EnQueue(wcm->backlogQueue,wcdo); ForceUnBlock=1; } sem_post(&(wcm->QLock)); if(ForceUnBlock!=0) { ILibForceUnBlockChain(wcm->Chain); } ILibDestructPacket(packet); } void ILibWebClient_PipelineRequestEx( void *WebClient, struct sockaddr_in *RemoteEndpoint, char *headerBuffer, int headerBufferLength, int headerBuffer_FREE, char *bodyBuffer, int bodyBufferLength, int bodyBuffer_FREE, void (*OnResponse)( void *WebReaderToken, int InterruptFlag, struct packetheader *header, char *bodyBuffer, int *beginPointer, int endPointer, int done, void *user1, void *user2, int *PAUSE), void *user1, void *user2) { int ForceUnBlock=0; char IPV4Address[22]; int IPV4AddressLength; struct ILibWebClientManager *wcm = (struct ILibWebClientManager*)WebClient; struct ILibWebClientDataObject *wcdo; struct ILibWebRequest *request = (struct ILibWebRequest*)MALLOC(sizeof(struct ILibWebRequest)); int i; request->NumberOfBuffers = bodyBuffer!=NULL?2:1; request->Buffer = (char**)MALLOC(request->NumberOfBuffers*sizeof(char*)); request->BufferLength = (int*)MALLOC(request->NumberOfBuffers*sizeof(int)); request->UserFree = (int*)MALLOC(request->NumberOfBuffers*sizeof(int)); request->Buffer[0] = headerBuffer; request->BufferLength[0] = headerBufferLength; request->UserFree[0] = headerBuffer_FREE; if(bodyBuffer!=NULL) { request->Buffer[1] = bodyBuffer; request->BufferLength[1] = bodyBufferLength; request->UserFree[1] = bodyBuffer_FREE; } request->OnResponse = OnResponse; request->remote.sin_port = RemoteEndpoint->sin_port; request->remote.sin_addr.s_addr = RemoteEndpoint->sin_addr.s_addr; request->user1 = user1; request->user2 = user2; IPV4AddressLength = sprintf(IPV4Address,"%s:%d", inet_ntoa(RemoteEndpoint->sin_addr), ntohs(RemoteEndpoint->sin_port)); sem_wait(&(wcm->QLock)); if(ILibHasEntry(wcm->DataTable,IPV4Address,IPV4AddressLength)!=0) { // Entry Found wcdo = (struct ILibWebClientDataObject*)ILibGetEntry(wcm->DataTable,IPV4Address,IPV4AddressLength); if(ILibQueue_IsEmpty(wcdo->RequestQueue)!=0) { // Take out of Idle State --wcm->idleCount; ILibDeleteEntry(wcm->idleTable,IPV4Address,IPV4AddressLength); ILibLifeTime_Remove(wcm->timer,wcdo); if(wcdo->SOCK==NULL) { ILibQueue_EnQueue(wcm->backlogQueue,wcdo); ForceUnBlock=1; } else { for(i=0;i<request->NumberOfBuffers;++i) { ILibAsyncSocket_Send(wcdo->SOCK,request->Buffer[i],request->BufferLength[i],1); } } } ILibQueue_EnQueue(wcdo->RequestQueue,request); } else { // Need to queue Entry wcdo = (struct ILibWebClientDataObject*)MALLOC(sizeof(struct ILibWebClientDataObject)); memset(wcdo,0,sizeof(struct ILibWebClientDataObject)); wcdo->Parent = wcm; wcdo->RequestQueue = ILibQueue_Create(); wcdo->remote.sin_port = RemoteEndpoint->sin_port; wcdo->remote.sin_addr.s_addr = RemoteEndpoint->sin_addr.s_addr; ILibQueue_EnQueue(wcdo->RequestQueue,request); ILibAddEntry(wcm->DataTable,IPV4Address,IPV4AddressLength,wcdo); ILibQueue_EnQueue(wcm->backlogQueue,wcdo); ForceUnBlock=1; } sem_post(&(wcm->QLock)); if(ForceUnBlock!=0) { ILibForceUnBlockChain(wcm->Chain); } } struct packetheader *ILibWebClient_GetHeaderFromDataObject(void *token) { return(((struct ILibWebClientDataObject*)token)->header); } void ILibWebClient_DeleteRequests(void *WebClientToken,char *IP,int Port) { struct ILibWebClientManager *wcm = (struct ILibWebClientManager*)WebClientToken; char IPV4Address[25]; struct ILibWebClientDataObject *wcdo; int IPV4AddressLength; struct ILibWebRequest *wr; int i; int zero = 0; void *RemoveQ = ILibQueue_Create(); IPV4AddressLength = sprintf(IPV4Address,"%s:%d",IP,Port); sem_wait(&(wcm->QLock)); if(ILibHasEntry(wcm->DataTable,IPV4Address,IPV4AddressLength)!=0) { // Entry Found wcdo = (struct ILibWebClientDataObject*)ILibGetEntry(wcm->DataTable,IPV4Address,IPV4AddressLength); while(ILibQueue_IsEmpty(wcdo->RequestQueue)==0) { wr = (struct ILibWebRequest*)ILibQueue_DeQueue(wcdo->RequestQueue); ILibQueue_EnQueue(RemoveQ,wr); } } sem_post(&(wcm->QLock)); while(ILibQueue_IsEmpty(RemoveQ)==0) { wr = (struct ILibWebRequest*)ILibQueue_DeQueue(RemoveQ); if(wr->OnResponse!=NULL) wr->OnResponse( WebClientToken, WEBCLIENT_DELETED, NULL, NULL, NULL, 0, -1, wr->user1, wr->user2, &zero); for(i=0;i<wr->NumberOfBuffers;++i) { if(wr->UserFree[i]==0) {FREE(wr->Buffer[i]);} } FREE(wr->Buffer); FREE(wr->BufferLength); FREE(wr->UserFree); FREE(wr); } ILibQueue_Destroy(RemoveQ); } void ILibWebClient_Resume(void *wcdo) { struct ILibWebClientDataObject *d = (struct ILibWebClientDataObject*)wcdo; d->PAUSE = 0; ILibAsyncSocket_Resume(d->SOCK); }
{ "content_hash": "d5d0b7c070129ec59db3f7c575a44d15", "timestamp": "", "source": "github", "line_count": 1263, "max_line_length": 173, "avg_line_length": 24.530482977038798, "alnum_prop": 0.6606739397069266, "repo_name": "dlna/DeveloperToolsForUPnP", "id": "ded0ca10e8639b00235e8e513d01db4d1ddf530e", "size": "31554", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Samples/EmbeddedSamples/MicroSTB/DeviceBuilder/Win32_Winsock1_ILib/ILibWebClient.c", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "3005" }, { "name": "C", "bytes": "912997" }, { "name": "C#", "bytes": "7800408" }, { "name": "C++", "bytes": "84194" }, { "name": "Java", "bytes": "3259" }, { "name": "Makefile", "bytes": "891" }, { "name": "Objective-C", "bytes": "262" } ], "symlink_target": "" }
#ifndef INCLUDE_blame_h__ #define INCLUDE_blame_h__ #include "common.h" #include "git2/blame.h" #include "vector.h" #include "diff.h" #include "array.h" #include "git2/oid.h" /* * One blob in a commit that is being suspected */ typedef struct git_blame__origin { int refcnt; struct git_blame__origin *previous; git_commit *commit; git_blob *blob; char path[GIT_FLEX_ARRAY]; } git_blame__origin; /* * Each group of lines is described by a git_blame__entry; it can be split * as we pass blame to the parents. They form a linked list in the * scoreboard structure, sorted by the target line number. */ typedef struct git_blame__entry { struct git_blame__entry *prev; struct git_blame__entry *next; /* the first line of this group in the final image; * internally all line numbers are 0 based. */ size_t lno; /* how many lines this group has */ size_t num_lines; /* the commit that introduced this group into the final image */ git_blame__origin *suspect; /* true if the suspect is truly guilty; false while we have not * checked if the group came from one of its parents. */ bool guilty; /* true if the entry has been scanned for copies in the current parent */ bool scanned; /* the line number of the first line of this group in the * suspect's file; internally all line numbers are 0 based. */ size_t s_lno; /* how significant this entry is -- cached to avoid * scanning the lines over and over. */ unsigned score; /* Whether this entry has been tracked to a boundary commit. */ bool is_boundary; } git_blame__entry; struct git_blame { char *path; git_repository *repository; git_mailmap *mailmap; git_blame_options options; git_vector hunks; git_vector paths; git_blob *final_blob; git_array_t(size_t) line_index; size_t current_diff_line; git_blame_hunk *current_hunk; /* Scoreboard fields */ git_commit *final; git_blame__entry *ent; int num_lines; const char *final_buf; git_off_t final_buf_size; }; git_blame *git_blame__alloc( git_repository *repo, git_blame_options opts, const char *path); #endif
{ "content_hash": "f94d8bfa3a03dac1e9196da2631bf3de", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 74, "avg_line_length": 22.021052631578947, "alnum_prop": 0.7007648183556405, "repo_name": "GuapoTaco/chigraph", "id": "b31d2dc20f0de6b6f7659d1f50548462599b610b", "size": "2092", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "third_party/libgit2/src/blame.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "365956" }, { "name": "CMake", "bytes": "4030" }, { "name": "LLVM", "bytes": "180" }, { "name": "Shell", "bytes": "647" } ], "symlink_target": "" }
<?php /** * Class mybb16 * Settings for the MyBB 1.6 system. */ class mybb16 extends Importers\AbstractSourceImporter { protected $setting_file = '/inc/config.php'; public function getName() { return 'MyBB 1.6'; } public function getVersion() { return 'ElkArte 1.0'; } public function getPrefix() { // @todo Convert the use of globals to a scan of the file or something similar. global $config; return '`' . $this->getDbName() . '`.' . $config['database']['table_prefix']; } public function getDbName() { // @todo Convert the use of globals to a scan of the file or something similar. global $config; return $config['database']['database']; } public function getTableTest() { return 'users'; } }
{ "content_hash": "c616cc24235551e285b68a2d2cbb916a", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 81, "avg_line_length": 17.666666666666668, "alnum_prop": 0.6630727762803235, "repo_name": "OpenImporter/openimporter", "id": "074a24f78fc233cdf649c3023d5297d80a122622", "size": "898", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "importer/Importers/elkarte1.0/mybb16_importer.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "PHP", "bytes": "253219" } ], "symlink_target": "" }
package deploymentmanager // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // // See the License for the specific language governing permissions and // limitations under the License. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" "net/http" ) // ServiceTopologiesClient is the REST APIs for orchestrating deployments using the Azure Deployment Manager (ADM). See // https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview for more information. type ServiceTopologiesClient struct { BaseClient } // NewServiceTopologiesClient creates an instance of the ServiceTopologiesClient client. func NewServiceTopologiesClient(subscriptionID string) ServiceTopologiesClient { return NewServiceTopologiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } // NewServiceTopologiesClientWithBaseURI creates an instance of the ServiceTopologiesClient client. func NewServiceTopologiesClientWithBaseURI(baseURI string, subscriptionID string) ServiceTopologiesClient { return ServiceTopologiesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate synchronously creates a new service topology or updates an existing service topology. // Parameters: // serviceTopologyInfo - source topology object defines the resource. // resourceGroupName - the name of the resource group. The name is case insensitive. // serviceTopologyName - the name of the service topology . func (client ServiceTopologiesClient) CreateOrUpdate(ctx context.Context, serviceTopologyInfo ServiceTopologyResource, resourceGroupName string, serviceTopologyName string) (result ServiceTopologyResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: serviceTopologyInfo, Constraints: []validation.Constraint{{Target: "serviceTopologyInfo.ServiceTopologyResourceProperties", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("deploymentmanager.ServiceTopologiesClient", "CreateOrUpdate", err.Error()) } req, err := client.CreateOrUpdatePreparer(ctx, serviceTopologyInfo, resourceGroupName, serviceTopologyName) if err != nil { err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "CreateOrUpdate", nil, "Failure preparing request") return } resp, err := client.CreateOrUpdateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "CreateOrUpdate", resp, "Failure sending request") return } result, err = client.CreateOrUpdateResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "CreateOrUpdate", resp, "Failure responding to request") } return } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. func (client ServiceTopologiesClient) CreateOrUpdatePreparer(ctx context.Context, serviceTopologyInfo ServiceTopologyResource, resourceGroupName string, serviceTopologyName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceTopologyName": autorest.Encode("path", serviceTopologyName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2018-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}", pathParameters), autorest.WithJSON(serviceTopologyInfo), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ServiceTopologiesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. func (client ServiceTopologiesClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceTopologyResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } // Delete sends the delete request. // Parameters: // resourceGroupName - the name of the resource group. The name is case insensitive. // serviceTopologyName - the name of the service topology . func (client ServiceTopologiesClient) Delete(ctx context.Context, resourceGroupName string, serviceTopologyName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("deploymentmanager.ServiceTopologiesClient", "Delete", err.Error()) } req, err := client.DeletePreparer(ctx, resourceGroupName, serviceTopologyName) if err != nil { err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "Delete", nil, "Failure preparing request") return } resp, err := client.DeleteSender(req) if err != nil { result.Response = resp err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "Delete", resp, "Failure sending request") return } result, err = client.DeleteResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "Delete", resp, "Failure responding to request") } return } // DeletePreparer prepares the Delete request. func (client ServiceTopologiesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceTopologyName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceTopologyName": autorest.Encode("path", serviceTopologyName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2018-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ServiceTopologiesClient) DeleteSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. func (client ServiceTopologiesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } // Get sends the get request. // Parameters: // resourceGroupName - the name of the resource group. The name is case insensitive. // serviceTopologyName - the name of the service topology . func (client ServiceTopologiesClient) Get(ctx context.Context, resourceGroupName string, serviceTopologyName string) (result ServiceTopologyResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("deploymentmanager.ServiceTopologiesClient", "Get", err.Error()) } req, err := client.GetPreparer(ctx, resourceGroupName, serviceTopologyName) if err != nil { err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "deploymentmanager.ServiceTopologiesClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. func (client ServiceTopologiesClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceTopologyName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceTopologyName": autorest.Encode("path", serviceTopologyName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2018-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ServiceTopologiesClient) GetSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. func (client ServiceTopologiesClient) GetResponder(resp *http.Response) (result ServiceTopologyResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return }
{ "content_hash": "60c4e67bbb05a14ff588ab1bbce6f6c2", "timestamp": "", "source": "github", "line_count": 271, "max_line_length": 218, "avg_line_length": 45.71955719557196, "alnum_prop": 0.7765940274414851, "repo_name": "sferich888/origin", "id": "67e1dd5b6c717bb9da4ed5f69ca154c76948d48f", "size": "12390", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "vendor/github.com/Azure/azure-sdk-for-go/services/preview/deploymentmanager/mgmt/2018-09-01-preview/deploymentmanager/servicetopologies.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Awk", "bytes": "921" }, { "name": "DIGITAL Command Language", "bytes": "117" }, { "name": "Dockerfile", "bytes": "9805" }, { "name": "Go", "bytes": "13133534" }, { "name": "Makefile", "bytes": "8268" }, { "name": "Python", "bytes": "16068" }, { "name": "Shell", "bytes": "825010" } ], "symlink_target": "" }
RARIC1 ;HISC/GJC-Check to see if Imaging package exists ;3/4/96 15:43 ;;5.0;Radiology/Nuclear Medicine;**23,93**;Mar 16, 1998;Build 3 ; 07/15/2008 BAY/KAM rem call 249750 RA*5*93 Correct DIK Calls ; ; API's STUFPHY and DELIMGPT are supported by DBIA#3317 ; IMAGE() ; check to see if Imaging package exists ; called from RACNLU, RAPTLU and RART1 ; 1 = exists ; 0 = doesn't exist S X="MAGBAPI" X ^%ZOSF("TEST") I '$T Q 0 S X="MAGGTIA" X ^%ZOSF("TEST") I '$T Q 0 Q $S($O(^MAG(2005,0)):1,1:0) ; ; STUFPHY(RAVERF,RASR,RARTN) ; stuff physician duz ;RASR should be rtn MAGJUPD1's RIST, =15 if staff, =12 if resident ;RAVERF=duz of physician (primary staff or primary resident) S RARTN="STUFPHY called" I '$D(DA(2))!'$D(DA(1))!'($D(DA)#2) S RARTN="Missing DA references" Q I 'RASR S RARTN="Missing RASR value" Q N RAERR,RAFLD,RAMDIV,RAMDV,RAMLC,RAESIG,RACOD ; ; check loc access S RACOD=$S(RASR=15:"S",RASR=12:"R",1:"") I RACOD="" S RARTN="Can't determine staff/resident code" Q I '$$SCRN^RAUTL8(.DA,RACOD,RAVERF,"PRI") S RARTN="Failed loc access" Q ; ; check verifier access I $D(^RADPT(DA(2),"DT",DA(1),0)) S RAMDIV=^(0),RAMLC=+$P(RAMDIV,"^",4),RAMDIV=+$P(RAMDIV,"^",3),RAMDV=$S($D(^RA(79,RAMDIV,.1)):^(.1),1:""),RAMDV=$S(RAMDV="":RAMDV,1:$TR(RAMDV,"YyNn",1100)) I '$D(RAMDV) S RARTN="Can't determine RAMDV" Q D VERCHK^RAHLO3 ;returns RAERR text string I $G(RAERR)]"" S RARTN="Failed verifier: "_RAERR Q ; ; stuff data S DIE="^RADPT("_DA(2)_",""DT"","_DA(1)_",""P""," S DR=RASR_"////"_RAVERF D ^DIE K DI,DIC,DE,DQ,DIE,DR S RARTN=1 ; ;delete 2nd staff/resident if it matches the primary staff/resident S RAFLD=$S(RASR=15:60,RASR=12:70,1:"") I 'RAFLD K DA Q ;can't determine secondary field to check/delete D EN^RAUTL8(RAVERF,RAFLD,.DA) K DA Q DELIMGPT(RAIE74,RAIE2005) ;delete imaging pointer ;input RAIE74 is File 74's ien ;input RAIE2005 is File 2005's ien ; quit if either input value is 0 or null or non-numeric Q:'RAIE74 Q:'RAIE2005 ; quit if report doesn't have this RAIE2005 value N DA,DIK S DA=$O(^RARPT(RAIE74,2005,"B",RAIE2005,0)) Q:'DA ; delete this 2005 pointer record ;07/17/2008 modified setting DIK in next line S DA(1)=RAIE74,DIK="^RARPT("_DA(1)_",2005," D ^DIK Q EHVC ; Executable Help for File 72's VISTARAD CATEGORY field N RATXT,I F I=1:1:12 S RATXT(I)=$P($T(EHVCTXT+I),";;",2) D EN^DDIOL(.RATXT) Q EHVCTXT ; ;;This field is only needed for sites that will be using VistaRad for soft-copy ;;reading of images. This information is used by VistaRad software to prepare ;;the various types of exam lists that are displayed on the VistaRad workstation, ;;and to properly manage exam locking for the radiologists. ;; ;;If this Examination Status is to be used for exams that will be ;;read with VistaRad, then enter a value that corresponds to it ;;from the following list. Note that not all status codes should ;;be assigned a VistaRad Category value, but only those that apply. ;; ;;All other Exam Status codes that may be defined in the Radiology ;;Exam Status file should NOT be entered into this field. Q
{ "content_hash": "665ffd9a6d9a5bde4fa583244b03f51a", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 189, "avg_line_length": 40.22077922077922, "alnum_prop": 0.6884081369066839, "repo_name": "OSEHRA-Sandbox/VistA-M", "id": "9b55fb0f68938368d1ceee5c81d50af9bcbe847f", "size": "3097", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "Packages/Radiology Nuclear Medicine/Routines/RARIC1.m", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "M", "bytes": "117976276" }, { "name": "MATLAB", "bytes": "41" } ], "symlink_target": "" }
""" Flickrsaver: A screensaver for Flickr enthusiasts See README for more information. Copyright (c) 2010, Johannes H. Jensen. License: BSD, see LICENSE for more details. """ import time import os import signal import logging import urllib2 from random import randint from threading import Thread, Event, Condition, RLock import flickrapi import glib import gobject from gtk import gdk import clutter import clutter.x11 gobject.threads_init() clutter.threads_init() log = logging.getLogger('flickrsaver') log.setLevel(logging.DEBUG) API_KEY = "59b92bf5694c292121537c3a754d7b85" flickr = flickrapi.FlickrAPI(API_KEY) """ Where we keep photos """ cache_dir = os.path.join(glib.get_user_cache_dir(), 'flickrsaver') class PhotoSource(object): def get_photo(self): """ Return the (filename, fp) of a photo from the source, where fp is an open file descriptor. """ raise NotImplementedError class FlickrSource(PhotoSource): """ Flickr photo source """ common_args = {'extras': 'url_s,url_m,url_z,url_l,url_o', 'per_page': 500} def __init__(self): """ Flickr photo source """ PhotoSource.__init__(self) self.results = None def get_tree(self): raise NotImplementedError() def get_photo(self): if not self.results: log.debug("Downloading list...") tree = self.get_tree() self.results = tree.find('photos').findall('photo') url = None while not url: r = randint(0, len(self.results) - 1) p = self.results.pop(r) if 'url_o' in p.attrib: url = p.attrib['url_o'] elif 'url_l' in p.attrib: url = p.attrib['url_l'] elif 'url_z' in p.attrib: url = p.attrib['url_z'] elif 'url_m' in p.attrib: url = p.attrib['url_m'] elif 'url_s' in p.attrib: url = p.attrib['url_s'] else: log.warn("No suitable URL found for photo #%s", p.attrib['id']) continue log.debug("Downloading %s...", url) fp = urllib2.urlopen(url) filename = os.path.basename(url) return filename, fp class Interestingness(FlickrSource): def get_tree(self): return flickr.interestingness_getList(**self.common_args) def __repr__(self): return 'Interestingness()' class Photostream(FlickrSource): def __init__(self, user_id): FlickrSource.__init__(self) self.user_id = user_id def get_tree(self): return flickr.people_getPublicPhotos(user_id=self.user_id, **self.common_args) def __repr__(self): return 'Photostream(%r)' % (self.user_id) class Group(FlickrSource): def __init__(self, group_id): FlickrSource.__init__(self) self.group_id = group_id def get_tree(self): return flickr.groups_pools_getPhotos(group_id=self.group_id, **self.common_args) def __repr__(self): return 'Group(%r)' % (self.group_id) class Search(FlickrSource): def __init__(self, text): FlickrSource.__init__(self) self.text = text def get_tree(self): return flickr.photos_search(text=self.text, sort='relevance', **self.common_args) def __repr__(self): return 'Search(%r)' % (self.text) class PhotoPool(Thread): """ A pool of photos! """ def __init__(self, num_photos=10, sources=[], pool_dir=cache_dir): Thread.__init__(self) self.num_photos = num_photos self.sources = sources self.dir = pool_dir # Make sure cache dir exists if not os.path.exists(self.dir): os.mkdir(self.dir) # Clean cache directory self.clean_cache() # Load cached photos self.photos = os.listdir(self.dir) # Delete queue self.trash = [] # Condition when a new photo is added self.added = Condition() # Condition when a photo is removed self.removed = Condition() # Event for stopping the pool self._stop = Event() def add_source(self, source): self.sources.append(source) def is_empty(self): return len(self.photos) == 0 def is_full(self): return len(self.photos) >= self.num_photos def add(self, filename): """ Add a photo to the pool """ with self.added: self.photos.append(filename) self.added.notifyAll() def pop(self, filename=None): """ Pop a photo from the pool If filename is not set, a random photo will be returned """ if not self.photos and self.trash: # Recycle log.debug("Recycling...") self.add(self.trash.pop(0)) while not self.photos and not self._stop.is_set(): with self.added: # Wait for a photo to be produced self.added.wait(0.1) if self._stop.is_set(): return None # TODO: filename arg? with self.removed: r = randint(0, len(self.photos) - 1) p = self.photos.pop(r) self.removed.notify() log.debug("Photo %s consumed", p) return p def delete(self, filename): """ Mark file as deleted """ self.trash.append(filename) ''' if os.path.isabs(filename): assert os.path.dirname(filename) == cache_dir else: filename = os.path.join(self.dir, filename) os.remove(filename) ''' def run(self): src = 0 while not self._stop.is_set(): if self.is_full(): with self.removed: self.removed.wait(0.1) if not self.is_full() and self.sources: source = self.sources[src] log.debug("Photo source: %r", source) try: # Copy photo to pool name, fp = source.get_photo() filename = os.path.join(self.dir, name) partial_filename = filename + '.part' f = open(partial_filename, 'wb') completed = False while not completed and not self._stop.is_set(): d = fp.read(1024) if d: f.write(d) else: completed = True f.close() if completed: os.rename(partial_filename, filename) log.debug("Completed %s", filename) self.add(filename) except Exception as e: log.warning("Source '%s' failed: %s", source, e) time.sleep(1) # Next source src = (src + 1) % len(self.sources) # Empty trash while self.trash and len(self.photos) + len(self.trash) > self.num_photos: f = self.trash.pop() log.debug("Deleting %s...", f) os.remove(os.path.join(self.dir, f)) # In case of no sources, don't clog up the CPU time.sleep(0.1) log.debug("Pool stopped") def clean_cache(self): log.debug("Cleaning cache...") # Remove partials from cache for f in os.listdir(self.dir): if f.endswith('.part'): log.debug("Deleting partial: %s", f) os.unlink(os.path.join(self.dir, f)) def stop(self): log.info("Stopping pool...") self._stop.set() class PhotoUpdater(Thread): def __init__(self, saver, photo_pool, interval=10): Thread.__init__(self) self.saver = saver self.photo_pool = photo_pool self.interval = interval self._stop = Event() def run(self): ts = 0 while not self._stop.is_set(): if time.time() - ts >= self.interval: log.debug("Updater: Next!") p = self.photo_pool.pop() if p: filename = os.path.join(self.photo_pool.dir, p) self.saver.set_photo(filename, None) ts = time.time() time.sleep(0.1) log.debug("Updater stopped") def stop(self): log.debug("Stopping updater...") self._stop.set() class FlickrSaver(object): def __init__(self, photo_sources=[]): # Update queueing self.update_id = 0 self.filename = None # Set up Clutter stage and actors self.stage = clutter.Stage() self.stage.set_title('Flickrsaver') self.stage.set_color('#000000') self.stage.set_size(400, 400) self.stage.set_user_resizable(True) self.stage.connect('destroy', self.quit) self.stage.connect('notify::allocation', self.size_changed) self.stage.connect('key-press-event', self.key_pressed) if 'XSCREENSAVER_WINDOW' in os.environ: xwin = int(os.environ['XSCREENSAVER_WINDOW'], 0) clutter.x11.set_stage_foreign(self.stage, xwin) # Allow SIGINT to pass through, allowing the screensaver host # to properly shut down the screensaver when needed signal.signal(signal.SIGINT, signal.SIG_DFL) self.photo1 = clutter.Texture() self.photo1.set_opacity(0) self.stage.add(self.photo1) self.photo2 = clutter.Texture() self.photo2.set_opacity(0) self.stage.add(self.photo2) self.photo = self.photo2 # Animation self.timeline = clutter.Timeline(duration=2000) self.alpha = clutter.Alpha(self.timeline, clutter.EASE_IN_CUBIC) self.fade_in = clutter.BehaviourOpacity(0, 255, self.alpha) self.fade_out = clutter.BehaviourOpacity(255, 0, self.alpha) self.stage.show_all() # Photo pool self.photo_pool = PhotoPool() # Photo sources for ps in photo_sources: self.photo_pool.add_source(ps) # Photo updater self.updater = PhotoUpdater(self, self.photo_pool) # gobject.timeout_add_seconds(5, self.next_photo) def update(self): """ Update actors to new photo Note: must not be called from other than the main thread! """ log.debug("Displaying %s", self.filename) prev = self.photo if self.photo == self.photo1: self.photo = self.photo2 else: self.photo = self.photo1 try: self.load_photo() self.rotate_photo() self.scale_photo() self.fade_in.remove_all() self.fade_out.remove_all() self.fade_in.apply(self.photo) self.fade_out.apply(prev) self.timeline.rewind() self.timeline.start() except glib.GError as e: log.warning("Could not load photo: %s", e) self.photo = prev finally: # Finished, clear update_id self.update_id = 0 # Mark file for deletion if self.filename: self.photo_pool.delete(self.filename) return False def queue_update(self): """ Queue an update of the graph """ if not self.update_id: # No previous updates pending self.update_id = gobject.idle_add(self.update) def set_photo(self, filename, info): self.filename = filename self.queue_update() def load_photo(self): """ Load and position photo """ self.photo.set_from_file(self.filename) w, h = self.photo.get_size() sw, sh = self.stage.get_size() # Set anchor to center of image self.photo.set_anchor_point(w/2, h/2) # Position center of image to center of stage self.photo.set_position(sw/2, sh/2) def rotate_photo(self): """ Rotate photo based on orientation info """ # Clear rotation self.photo.set_rotation(clutter.X_AXIS, 0, 0, 0, 0) self.photo.set_rotation(clutter.Y_AXIS, 0, 0, 0, 0) self.photo.set_rotation(clutter.Z_AXIS, 0, 0, 0, 0) # Read metadata log.debug("rotate_photo: Reading metadata... %s", self.filename) pixbuf = gdk.pixbuf_new_from_file(self.filename) orientation = pixbuf.get_option('orientation') if not orientation: return orientation = int(orientation) log.debug("rotate_photo: Orientation = %d", orientation) if orientation == 1: # (row #0 - col #0) # top - left: No rotation necessary log.debug("rotate_photo: No rotation") elif orientation == 2: # top - right: Flip horizontal log.debug("rotate_photo: Flip horizontal") self.photo.set_rotation(clutter.Y_AXIS, 180, 0, 0, 0) elif orientation == 3: # bottom - right: Rotate 180 log.debug("rotate_photo: Rotate 180") self.photo.set_rotation(clutter.Z_AXIS, 180, 0, 0, 0) elif orientation == 4: # bottom - left: Flip vertical log.debug("rotate_photo: Flip vertical") self.photo.set_rotation(clutter.X_AXIS, 180, 0, 0, 0) elif orientation == 5: # left - top: Transpose log.debug("rotate_photo: Transpose") self.photo.set_rotation(clutter.Y_AXIS, 180, 0, 0, 0) self.photo.set_rotation(clutter.Z_AXIS, -90, 0, 0, 0) elif orientation == 6: # right - top: Rotate 90 log.debug("rotate_photo: Rotate 90") self.photo.set_rotation(clutter.Z_AXIS, 90, 0, 0, 0) elif orientation == 7: # right - bottom: Transverse log.debug("rotate_photo: Transpose") self.photo.set_rotation(clutter.Y_AXIS, 180, 0, 0, 0) self.photo.set_rotation(clutter.Z_AXIS, 90, 0, 0, 0) elif orientation == 8: # left - bottom: Rotate -90 log.debug("rotate_photo: Rotate -90") self.photo.set_rotation(clutter.Z_AXIS, -90, 0, 0, 0) def scale_photo(self): """ Scale photo to fit stage size """ # Clear scale self.photo.set_scale(1, 1) width, height = self.stage.get_size() ow, oh = self.photo.get_transformed_size() w = ow h = oh log.debug("scale_photo: Stage: %sx%s, Photo: %sx%s", width, height, ow, oh) if ow > width or oh > height: scale = width / ow h = oh * scale if h > height: scale = height / oh self.photo.set_scale(scale, scale) log.debug("Downscaling photo by %s%%", scale * 100) def size_changed(self, *args): """ Stage size changed """ width, height = self.stage.get_size() log.debug("Stage size: %dx%d", width, height) # Update photo position and scale if self.filename: self.load_photo() self.scale_photo() def key_pressed(self, stage, event): if event.keyval == clutter.keysyms.space: log.debug("NEXT PHOTO!") self.next_photo() def main(self): self.photo_pool.start() self.updater.start() clutter.main() def quit(self, *args): log.info("Exiting...") self.updater.stop() self.photo_pool.stop() self.updater.join() self.photo_pool.join() clutter.main_quit() if __name__ == '__main__': import argparse ''' if 'XSCREENSAVER_WINDOW' in os.environ: f = open('/tmp/foo', 'w') f.write('XSCREENSAVER_WINDOW=' + os.environ['XSCREENSAVER_WINDOW'] + '\n') f.close() ''' # Parse command-line arguments #Photostream('7353466@N08') parser = argparse.ArgumentParser(description='A screensaver for Flickr enthusiasts') sg = parser.add_argument_group('Photo sources') sg.add_argument('-u', '--user', action='append', default=[], metavar='USER_ID', help="Show photos from user's Photostream") sg.add_argument('-g', '--group', action='append', default=[], metavar='GROUP_ID', help="Show photos from group's Photostream") sg.add_argument('-i', '--interesting', action='store_true', help="Show interesting photos") sg.add_argument('-s', '--search', action='append', default=[], metavar='TEXT', help="Show photos matching text") #parser.add_argument('-d', '--days', type=int, # help="Only show photos newer than the specified number of days") args = parser.parse_args() photo_sources = [] # User's photostream for user_id in args.user: source = Photostream(user_id) photo_sources.append(source) # Group's photostream for group_id in args.group: source = Group(group_id) photo_sources.append(source) # Search text for text in args.search: source = Search(text) photo_sources.append(source) # Default: Interestingness if args.interesting or not photo_sources: source = Interestingness() photo_sources.append(source) # Fire up the screensaver fs = FlickrSaver(photo_sources) fs.main()
{ "content_hash": "def4762ca05eb19a14b2d304d205bdef", "timestamp": "", "source": "github", "line_count": 593, "max_line_length": 89, "avg_line_length": 31.160202360876898, "alnum_prop": 0.5224050221885486, "repo_name": "joh/Flickrsaver", "id": "9eb3e52319107c27b81665686897d7335aedbf65", "size": "18500", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "flickrsaver.py", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "Python", "bytes": "19231" } ], "symlink_target": "" }
package org.apache.flume.source; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.Map; import java.util.Set; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import com.google.common.annotations.VisibleForTesting; import org.apache.flume.ChannelException; import org.apache.flume.Context; import org.apache.flume.Event; import org.apache.flume.EventDrivenSource; import org.apache.flume.conf.Configurable; import org.apache.flume.conf.Configurables; import org.apache.flume.instrumentation.SourceCounter; import org.jboss.netty.bootstrap.ConnectionlessBootstrap; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.channel.AdaptiveReceiveBufferSizePredictorFactory; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.channel.ChannelPipelineFactory; import org.jboss.netty.channel.Channels; import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.SimpleChannelHandler; import org.jboss.netty.channel.socket.oio.OioDatagramChannelFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SyslogUDPSource extends AbstractSource implements EventDrivenSource, Configurable { private int port; private int maxsize = 1 << 16; // 64k is max allowable in RFC 5426 private String host = null; private Channel nettyChannel; private Map<String, String> formaterProp; private Set<String> keepFields; private String clientIPHeader; private String clientHostnameHeader; private static final Logger logger = LoggerFactory.getLogger(SyslogUDPSource.class); private SourceCounter sourceCounter; // Default Min size public static final int DEFAULT_MIN_SIZE = 2048; public static final int DEFAULT_INITIAL_SIZE = DEFAULT_MIN_SIZE; public class syslogHandler extends SimpleChannelHandler { private SyslogUtils syslogUtils = new SyslogUtils(DEFAULT_INITIAL_SIZE, null, true); private String clientIPHeader; private String clientHostnameHeader; public void setFormater(Map<String, String> prop) { syslogUtils.addFormats(prop); } public void setKeepFields(Set<String> keepFields) { syslogUtils.setKeepFields(keepFields); } public void setClientIPHeader(String clientIPHeader) { this.clientIPHeader = clientIPHeader; } public void setClientHostnameHeader(String clientHostnameHeader) { this.clientHostnameHeader = clientHostnameHeader; } @Override public void messageReceived(ChannelHandlerContext ctx, MessageEvent mEvent) { try { syslogUtils.setEventSize(maxsize); Event e = syslogUtils.extractEvent((ChannelBuffer)mEvent.getMessage()); if (e == null) { return; } if (clientIPHeader != null) { e.getHeaders().put(clientIPHeader, SyslogUtils.getIP(mEvent.getRemoteAddress())); } if (clientHostnameHeader != null) { e.getHeaders().put(clientHostnameHeader, SyslogUtils.getHostname(mEvent.getRemoteAddress())); } sourceCounter.incrementEventReceivedCount(); getChannelProcessor().processEvent(e); sourceCounter.incrementEventAcceptedCount(); } catch (ChannelException ex) { logger.error("Error writting to channel", ex); sourceCounter.incrementChannelWriteFail(); return; } catch (RuntimeException ex) { logger.error("Error parsing event from syslog stream, event dropped", ex); sourceCounter.incrementEventReadFail(); return; } } } @Override public void start() { // setup Netty server ConnectionlessBootstrap serverBootstrap = new ConnectionlessBootstrap( new OioDatagramChannelFactory(Executors.newCachedThreadPool())); final syslogHandler handler = new syslogHandler(); handler.setFormater(formaterProp); handler.setKeepFields(keepFields); handler.setClientIPHeader(clientIPHeader); handler.setClientHostnameHeader(clientHostnameHeader); serverBootstrap.setOption("receiveBufferSizePredictorFactory", new AdaptiveReceiveBufferSizePredictorFactory(DEFAULT_MIN_SIZE, DEFAULT_INITIAL_SIZE, maxsize)); serverBootstrap.setPipelineFactory(new ChannelPipelineFactory() { @Override public ChannelPipeline getPipeline() { return Channels.pipeline(handler); } }); if (host == null) { nettyChannel = serverBootstrap.bind(new InetSocketAddress(port)); } else { nettyChannel = serverBootstrap.bind(new InetSocketAddress(host, port)); } sourceCounter.start(); super.start(); } @Override public void stop() { logger.info("Syslog UDP Source stopping..."); logger.info("Metrics: {}", sourceCounter); if (nettyChannel != null) { nettyChannel.close(); try { nettyChannel.getCloseFuture().await(60, TimeUnit.SECONDS); } catch (InterruptedException e) { logger.warn("netty server stop interrupted", e); } finally { nettyChannel = null; } } sourceCounter.stop(); super.stop(); } @Override public void configure(Context context) { Configurables.ensureRequiredNonNull( context, SyslogSourceConfigurationConstants.CONFIG_PORT); port = context.getInteger(SyslogSourceConfigurationConstants.CONFIG_PORT); host = context.getString(SyslogSourceConfigurationConstants.CONFIG_HOST); formaterProp = context.getSubProperties( SyslogSourceConfigurationConstants.CONFIG_FORMAT_PREFIX); keepFields = SyslogUtils.chooseFieldsToKeep( context.getString( SyslogSourceConfigurationConstants.CONFIG_KEEP_FIELDS, SyslogSourceConfigurationConstants.DEFAULT_KEEP_FIELDS)); clientIPHeader = context.getString(SyslogSourceConfigurationConstants.CONFIG_CLIENT_IP_HEADER); clientHostnameHeader = context.getString(SyslogSourceConfigurationConstants.CONFIG_CLIENT_HOSTNAME_HEADER); if (sourceCounter == null) { sourceCounter = new SourceCounter(getName()); } } @VisibleForTesting InetSocketAddress getBoundAddress() { SocketAddress localAddress = nettyChannel.getLocalAddress(); if (!(localAddress instanceof InetSocketAddress)) { throw new IllegalArgumentException("Not bound to an internet address"); } return (InetSocketAddress) localAddress; } @VisibleForTesting SourceCounter getSourceCounter() { return sourceCounter; } }
{ "content_hash": "8b3c4a2ac1364c1443c6fefa69e52a03", "timestamp": "", "source": "github", "line_count": 194, "max_line_length": 92, "avg_line_length": 34.22680412371134, "alnum_prop": 0.7296686746987951, "repo_name": "szaboferee/flume", "id": "fac067bf24a31e09990c4934487079decf634604", "size": "7445", "binary": false, "copies": "1", "ref": "refs/heads/trunk", "path": "flume-ng-core/src/main/java/org/apache/flume/source/SyslogUDPSource.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "936" }, { "name": "HTML", "bytes": "865" }, { "name": "Java", "bytes": "4791494" }, { "name": "PowerShell", "bytes": "16467" }, { "name": "Python", "bytes": "14046" }, { "name": "Rich Text Format", "bytes": "65517" }, { "name": "Shell", "bytes": "23808" }, { "name": "Thrift", "bytes": "4019" } ], "symlink_target": "" }
import sys from .testconfig import dsn from .testutils import unittest from . import test_async from . import test_bugX000 from . import test_bug_gc from . import test_cancel from . import test_connection from . import test_copy from . import test_cursor from . import test_dates from . import test_extras_dictcursor from . import test_green from . import test_lobject from . import test_module from . import test_notify from . import test_psycopg2_dbapi20 from . import test_quote from . import test_transaction from . import test_types_basic from . import test_types_extras if sys.version_info[:2] >= (2, 5): from . import test_with else: test_with = None def test_suite(): # If connection to test db fails, bail out early. import psycopg2 try: cnn = psycopg2.connect(dsn) except Exception as e: print("Failed connection to test db:", e.__class__.__name__, e) print("Please set env vars 'PSYCOPG2_TESTDB*' to valid values.") sys.exit(1) else: cnn.close() suite = unittest.TestSuite() suite.addTest(test_async.test_suite()) suite.addTest(test_bugX000.test_suite()) suite.addTest(test_bug_gc.test_suite()) suite.addTest(test_cancel.test_suite()) suite.addTest(test_connection.test_suite()) suite.addTest(test_copy.test_suite()) suite.addTest(test_cursor.test_suite()) suite.addTest(test_dates.test_suite()) suite.addTest(test_extras_dictcursor.test_suite()) suite.addTest(test_green.test_suite()) suite.addTest(test_lobject.test_suite()) suite.addTest(test_module.test_suite()) suite.addTest(test_notify.test_suite()) suite.addTest(test_psycopg2_dbapi20.test_suite()) suite.addTest(test_quote.test_suite()) suite.addTest(test_transaction.test_suite()) suite.addTest(test_types_basic.test_suite()) suite.addTest(test_types_extras.test_suite()) if test_with: suite.addTest(test_with.test_suite()) return suite if __name__ == '__main__': unittest.main(defaultTest='test_suite')
{ "content_hash": "5950e119813d753c01e14e9d44d6a1af", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 72, "avg_line_length": 31.446153846153845, "alnum_prop": 0.6952054794520548, "repo_name": "pabulumm/neighbors", "id": "ae32ac216498cb1741b9e34aed342284517a70dd", "size": "3038", "binary": false, "copies": "7", "ref": "refs/heads/master", "path": "lib/python3.4/site-packages/psycopg2/tests/__init__.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "167622" }, { "name": "HTML", "bytes": "221496" }, { "name": "JavaScript", "bytes": "325471" }, { "name": "Python", "bytes": "7896264" }, { "name": "Shell", "bytes": "12645" }, { "name": "Smarty", "bytes": "789" } ], "symlink_target": "" }
<form class="keyboard-save" role="form" method="POST" id="settings" action="{{ url('admin/settings') }}"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> <br> <div class="form-group"> <div class="fg-line"> <label class="fg-label">Blog Title</label> <input type="text" class="form-control" name="blog_title" id="blog_title" value="{{ $data['blogTitle'] }}" placeholder="Blog Title"> </div> </div> <br> <div class="form-group"> <div class="fg-line"> <label class="fg-label">Blog Subtitle</label> <input type="text" class="form-control" name="blog_subtitle" id="blog_subtitle" value="{{ $data['blogSubtitle'] }}" placeholder="Blog Subtitle"> </div> <small>In a few words, explain what this site is about.</small> </div> <br> <div class="form-group"> <div class="fg-line"> <label class="fg-label">Blog Description</label> <input type="text" class="form-control" name="blog_description" id="blog_description" value="{{ $data['blogDescription'] }}" placeholder="Blog Description"> </div> <small>Set the blog description that you would like to add to the <code>description</code> meta tag.</small> </div> <br> <div class="form-group"> <div class="fg-line"> <label class="fg-label">Blog SEO</label> <input type="text" class="form-control" name="blog_seo" id="blog_seo" value="{{ $data['blogSeo'] }}" placeholder="Blog SEO"> </div> <small>Define in comma-delimited form the blog SEO tags that you want in the <code>keywords</code> meta tag.</small> </div> <br> <div class="form-group"> <div class="fg-line"> <label class="fg-label">Blog Author</label> <input type="text" class="form-control" name="blog_author" id="blog_author" value="{{ $data['blogAuthor'] }}" placeholder="Blog Author"> </div> <small>Set the name that you want to appear in the <code>author</code> meta tag.</small> </div> <br> <div class="form-group"> <div class="fg-line"> <label class="fg-label">Disqus</label> <input type="text" class="form-control" name="disqus_name" id="disqus_name" value="{{ $data['disqus'] }}" placeholder="Disqus Shortname"> </div> <small>Enter your Disqus shortname to enable comments in your blog posts or <a href="https://github.com/austintoddj/canvas#advanced-options" target="_blank">learn more about this option</a>.</small> </div> <br> <div class="form-group"> <div class="fg-line"> <label class="fg-label">Google Analytics</label> <input type="text" class="form-control" name="ga_id" id="ga_id" value="{{ $data['analytics'] }}" placeholder="Google Analytics Tracking ID"> </div> <small>Enter your Google Analytics Tracking ID or <a href="https://github.com/austintoddj/canvas#advanced-options" target="_blank">learn more about this option</a>.</small> </div> <br> <div class="form-group"> <button type="submit" class="btn btn-primary btn-icon-text"><i class="zmdi zmdi-floppy"></i> Save</button> </div> </form>
{ "content_hash": "dc1f9c12ce2e9bb1824486f0fe173ece", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 206, "avg_line_length": 41.94871794871795, "alnum_prop": 0.5999388753056235, "repo_name": "KangYoosam/canvas", "id": "ad5e9a1566e9bc14b0935b0d47ce18213953ebeb", "size": "3272", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "resources/views/backend/settings/partials/form/settings.blade.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "412" }, { "name": "PHP", "bytes": "226815" } ], "symlink_target": "" }
import {Suite, assertThat} from "../TestUtil.js" import {WidgetPainter} from "../../src/draw/WidgetPainter.js" import {Format} from "../../src/base/Format.js" import {Complex} from "../../src/math/Complex.js" let suite = new Suite("WidgetPainter"); suite.test("describeAxis", () => { let s = Math.sqrt(2); assertThat(WidgetPainter.describeAxis([1, 0, 0], Format.SIMPLIFIED)).isEqualTo("X"); assertThat(WidgetPainter.describeAxis([0, 1, 0], Format.SIMPLIFIED)).isEqualTo("Y"); assertThat(WidgetPainter.describeAxis([0, 0, 1], Format.SIMPLIFIED)).isEqualTo("Z"); assertThat(WidgetPainter.describeAxis([s, s, 0], Format.SIMPLIFIED)).isEqualTo("X + Y"); assertThat(WidgetPainter.describeAxis([0, s, s], Format.SIMPLIFIED)).isEqualTo("Y + Z"); assertThat(WidgetPainter.describeAxis([s, 0, s], Format.SIMPLIFIED)).isEqualTo("X + Z"); assertThat(WidgetPainter.describeAxis([-s, s, 0], Format.SIMPLIFIED)).isEqualTo("-X + Y"); assertThat(WidgetPainter.describeAxis([0, -s, s], Format.SIMPLIFIED)).isEqualTo("-Y + Z"); assertThat(WidgetPainter.describeAxis([s, 0, -s], Format.SIMPLIFIED)).isEqualTo("X - Z"); assertThat(WidgetPainter.describeAxis([1, -1, 1], Format.SIMPLIFIED)).isEqualTo("X - Y + Z"); assertThat(WidgetPainter.describeAxis([1, 0.5, 0.25], Format.SIMPLIFIED)).isEqualTo("X + ½·Y + ¼·Z"); assertThat(WidgetPainter.describeAxis([1, 0.5, 0.25], Format.CONSISTENT)).isEqualTo("X + 0.50·Y + 0.25·Z"); }); suite.test("describeKet", () => { assertThat(WidgetPainter.describeKet(1, 0, 1, Format.SIMPLIFIED)).isEqualTo('|0⟩'); assertThat(WidgetPainter.describeKet(1, 1, 1, Format.SIMPLIFIED)).isEqualTo('|1⟩'); assertThat(WidgetPainter.describeKet(2, 0, 1, Format.SIMPLIFIED)).isEqualTo('|00⟩'); assertThat(WidgetPainter.describeKet(2, 1, 1, Format.SIMPLIFIED)).isEqualTo('|01⟩'); assertThat(WidgetPainter.describeKet(2, 2, 1, Format.SIMPLIFIED)).isEqualTo('|10⟩'); assertThat(WidgetPainter.describeKet(2, 3, 1, Format.SIMPLIFIED)).isEqualTo('|11⟩'); assertThat(WidgetPainter.describeKet(2, 0, new Complex(-1, 0), Format.SIMPLIFIED)).isEqualTo('-|00⟩'); assertThat(WidgetPainter.describeKet(2, 1, Complex.I, Format.SIMPLIFIED)).isEqualTo('i|01⟩'); assertThat(WidgetPainter.describeKet(2, 2, new Complex(0, -1), Format.SIMPLIFIED)).isEqualTo('-i|10⟩'); assertThat(WidgetPainter.describeKet(2, 3, new Complex(1, 1), Format.SIMPLIFIED)).isEqualTo('(1+i)·|11⟩'); });
{ "content_hash": "02d64df1dc40fa869f41f4715264da0e", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 111, "avg_line_length": 54.82222222222222, "alnum_prop": 0.6903121199837859, "repo_name": "Strilanc/Quirk", "id": "5420695ef547a705e7ab88150ba0e9f57430c910", "size": "3089", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/ui/WidgetPainter.test.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "27728" }, { "name": "JavaScript", "bytes": "1484526" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Aspose.CAD.Live.Demos.UI.Models { public class UploadFileModel { public bool AcceptMultipleFiles { get; set; } public string FileDropKey { get; set; } public string AcceptedExtentions { get; set; } public Dictionary<string, string> Resources { get; } public string UploadId { get; set; } = $"{Guid.NewGuid()}"; public UploadFileModel(Dictionary<string, string> resources) { this.Resources = resources; } } }
{ "content_hash": "9c2b8804c1d4b017448303ac7da2abcf", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 62, "avg_line_length": 24.09090909090909, "alnum_prop": 0.7188679245283018, "repo_name": "aspose-cad/Aspose.CAD-for-.NET", "id": "28517785308b099de28963b1bed4fb0f5195b60b", "size": "530", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Demos/src/Aspose.CAD.Live.Demos.UI/Models/UploadFileModel.cs", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="dpl-info" content="status=plan"> <title>XML</title> <script src="../../System/Core/assets/scripts/Base.js" type="text/javascript"></script> <script src="../../System/Core/assets/scripts/Xml.js" type="text/javascript"></script> <script src="../../../assets/demo/demo.js" type="text/javascript"></script> </head> <body> <article class="demo"> <script> Demo.writeExamples({ 'XML.parse': 'XML.parse("<a></a>")', 'XML.stringify': 'XML.stringify(XML.parse("<a></a>"))' }); </script> </article> </body> </html>
{ "content_hash": "207a00582a125c252b5cc26c8025bff5", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 91, "avg_line_length": 30.347826086956523, "alnum_prop": 0.5315186246418339, "repo_name": "jplusui/jplusui.github.com", "id": "45d174101c0c4783328c5a688d313414fe6c4c30", "size": "698", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/System/Data/Xml.html", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ASP", "bytes": "224" }, { "name": "Batchfile", "bytes": "3203" }, { "name": "C#", "bytes": "79170" }, { "name": "CSS", "bytes": "930584" }, { "name": "HTML", "bytes": "3404396" }, { "name": "JavaScript", "bytes": "9327029" }, { "name": "Shell", "bytes": "957" }, { "name": "XSLT", "bytes": "4668" } ], "symlink_target": "" }
RobotMixTape ============ Robot Mix Tape : Android Testbed
{ "content_hash": "fe24ada8edc2c2b0e2860cc5e0d775a2", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 32, "avg_line_length": 15, "alnum_prop": 0.6333333333333333, "repo_name": "unstablesun/RobotMixTape", "id": "4669a41a76ba2b44d5660212ebb0d97477a9a6e0", "size": "60", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "355" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.7"/> <title>App Engine Python SDK: google.appengine._internal.antlr3.tree.RewriteCardinalityException Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="common.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="gae-python.logo.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">App Engine Python SDK &#160;<span id="projectnumber">v1.6.9 rev.445</span> </div> <div id="projectbrief">The Python runtime is available as an experimental Preview feature.</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.7 --> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><b>google</b></li><li class="navelem"><b>appengine</b></li><li class="navelem"><b>_internal</b></li><li class="navelem"><a class="el" href="namespacegoogle_1_1appengine_1_1__internal_1_1antlr3.html">antlr3</a></li><li class="navelem"><a class="el" href="namespacegoogle_1_1appengine_1_1__internal_1_1antlr3_1_1tree.html">tree</a></li><li class="navelem"><a class="el" href="classgoogle_1_1appengine_1_1__internal_1_1antlr3_1_1tree_1_1_rewrite_cardinality_exception.html">RewriteCardinalityException</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="#pub-attribs">Public Attributes</a> &#124; <a href="classgoogle_1_1appengine_1_1__internal_1_1antlr3_1_1tree_1_1_rewrite_cardinality_exception-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">google.appengine._internal.antlr3.tree.RewriteCardinalityException Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>tree related exceptions <a href="classgoogle_1_1appengine_1_1__internal_1_1antlr3_1_1tree_1_1_rewrite_cardinality_exception.html#details">More...</a></p> <div class="dynheader"> Inheritance diagram for google.appengine._internal.antlr3.tree.RewriteCardinalityException:</div> <div class="dyncontent"> <div class="center"> <img src="classgoogle_1_1appengine_1_1__internal_1_1antlr3_1_1tree_1_1_rewrite_cardinality_exception.png" usemap="#google.appengine._internal.antlr3.tree.RewriteCardinalityException_map" alt=""/> <map id="google.appengine._internal.antlr3.tree.RewriteCardinalityException_map" name="google.appengine._internal.antlr3.tree.RewriteCardinalityException_map"> <area href="classgoogle_1_1appengine_1_1__internal_1_1antlr3_1_1tree_1_1_rewrite_early_exit_exception.html" alt="google.appengine._internal.antlr3.tree.RewriteEarlyExitException" shape="rect" coords="0,112,402,136"/> <area href="classgoogle_1_1appengine_1_1__internal_1_1antlr3_1_1tree_1_1_rewrite_empty_stream_exception.html" alt="google.appengine._internal.antlr3.tree.RewriteEmptyStreamException" shape="rect" coords="412,112,814,136"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a53cfb75b476f5bac32164fdd5b763041"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a53cfb75b476f5bac32164fdd5b763041"></a> def&#160;</td><td class="memItemRight" valign="bottom"><b>__init__</b></td></tr> <tr class="separator:a53cfb75b476f5bac32164fdd5b763041"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2717e48c3d92663347d98f0e9dd40b05"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2717e48c3d92663347d98f0e9dd40b05"></a> def&#160;</td><td class="memItemRight" valign="bottom"><b>getMessage</b></td></tr> <tr class="separator:a2717e48c3d92663347d98f0e9dd40b05"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> Public Attributes</h2></td></tr> <tr class="memitem:a1752a2151c3f4f4f19927fbdf4ca6059"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1752a2151c3f4f4f19927fbdf4ca6059"></a> &#160;</td><td class="memItemRight" valign="bottom"><b>elementDescription</b></td></tr> <tr class="separator:a1752a2151c3f4f4f19927fbdf4ca6059"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>tree related exceptions </p> <pre class="fragment">@brief Base class for all exceptions thrown during AST rewrite construction. This signifies a case where the cardinality of two or more elements in a subrule are different: (ID INT)+ where |ID|!=|INT| </pre> </div><hr/>The documentation for this class was generated from the following file:<ul> <li>code/googleappengine-read-only/python/google/appengine/_internal/antlr3/tree.py</li> </ul> </div><!-- contents --> <address class="footer"> <small>Maintained by <a href="http://www.tzmartin.com">tzmartin</a></small> </address>
{ "content_hash": "9f49f115d5017630ea24c7c9fbf31eac", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 534, "avg_line_length": 64.82954545454545, "alnum_prop": 0.7267309377738825, "repo_name": "tzmartin/gae-python.docset", "id": "7097c77f57ab7a224008278ea8432d54de161938", "size": "5705", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Contents/Resources/Documents/classgoogle_1_1appengine_1_1__internal_1_1antlr3_1_1tree_1_1_rewrite_cardinality_exception.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "26526" }, { "name": "JavaScript", "bytes": "3140" } ], "symlink_target": "" }
package org.onosproject.net.flow.criteria; import static com.google.common.base.MoreObjects.toStringHelper; import java.util.Objects; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.criteria.Criterion.Type; import org.onlab.packet.IpPrefix; import org.onlab.packet.MacAddress; import org.onlab.packet.VlanId; /** * Factory class to create various traffic selection criteria. */ public final class Criteria { //TODO: incomplete type implementation. Need to implement complete list from Criterion // Ban construction private Criteria() { } /** * Creates a match on IN_PORT field using the specified value. * * @param port inport value * @return match criterion */ public static Criterion matchInPort(PortNumber port) { return new PortCriterion(port); } /** * Creates a match on ETH_SRC field using the specified value. This value * may be a wildcard mask. * * @param mac MAC address value or wildcard mask * @return match criterion */ public static Criterion matchEthSrc(MacAddress mac) { return new EthCriterion(mac, Type.ETH_SRC); } /** * Creates a match on ETH_DST field using the specified value. This value * may be a wildcard mask. * * @param mac MAC address value or wildcard mask * @return match criterion */ public static Criterion matchEthDst(MacAddress mac) { return new EthCriterion(mac, Type.ETH_DST); } /** * Creates a match on ETH_TYPE field using the specified value. * * @param ethType eth type value * @return match criterion */ public static Criterion matchEthType(Short ethType) { return new EthTypeCriterion(ethType); } /** * Creates a match on VLAN ID field using the specified value. * * @param vlanId vlan id value * @return match criterion */ public static Criterion matchVlanId(VlanId vlanId) { return new VlanIdCriterion(vlanId); } /** * Creates a match on VLAN PCP field using the specified value. * * @param vlanPcp vlan pcp value * @return match criterion */ public static Criterion matchVlanPcp(Byte vlanPcp) { return new VlanPcpCriterion(vlanPcp); } /** * Creates a match on IP proto field using the specified value. * * @param proto ip protocol value * @return match criterion */ public static Criterion matchIPProtocol(Byte proto) { return new IPProtocolCriterion(proto); } /** * Creates a match on IP source field using the specified value. * * @param ip ip source value * @return match criterion */ public static Criterion matchIPSrc(IpPrefix ip) { return new IPCriterion(ip, Type.IPV4_SRC); } /** * Creates a match on IP destination field using the specified value. * * @param ip ip source value * @return match criterion */ public static Criterion matchIPDst(IpPrefix ip) { return new IPCriterion(ip, Type.IPV4_DST); } /** * Creates a match on TCP source port field using the specified value. * * @param tcpPort TCP source port * @return match criterion */ public static Criterion matchTcpSrc(Short tcpPort) { return new TcpPortCriterion(tcpPort, Type.TCP_SRC); } /** * Creates a match on TCP destination port field using the specified value. * * @param tcpPort TCP destination port * @return match criterion */ public static Criterion matchTcpDst(Short tcpPort) { return new TcpPortCriterion(tcpPort, Type.TCP_DST); } /** * Creates a match on MPLS label. * @param mplsLabel MPLS label * @return match criterion */ public static Criterion matchMplsLabel(Integer mplsLabel) { return new MplsCriterion(mplsLabel); } /** * Creates a match on lambda field using the specified value. * * @param lambda lambda to match on * @return match criterion */ public static Criterion matchLambda(Short lambda) { return new LambdaCriterion(lambda, Type.OCH_SIGID); } /** * Creates a match on optical signal type using the specified value. * * @param sigType optical signal type * @return match criterion */ public static Criterion matchOpticalSignalType(Short sigType) { return new OpticalSignalTypeCriterion(sigType, Type.OCH_SIGTYPE); } /** * Implementation of input port criterion. */ public static final class PortCriterion implements Criterion { private final PortNumber port; public PortCriterion(PortNumber port) { this.port = port; } @Override public Type type() { return Type.IN_PORT; } public PortNumber port() { return this.port; } @Override public String toString() { return toStringHelper(type().toString()) .add("port", port).toString(); } @Override public int hashCode() { return Objects.hash(type(), port); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof PortCriterion) { PortCriterion that = (PortCriterion) obj; return Objects.equals(port, that.port) && Objects.equals(this.type(), that.type()); } return false; } } /** * Implementation of MAC address criterion. */ public static final class EthCriterion implements Criterion { private final MacAddress mac; private final Type type; public EthCriterion(MacAddress mac, Type type) { this.mac = mac; this.type = type; } @Override public Type type() { return this.type; } public MacAddress mac() { return this.mac; } @Override public String toString() { return toStringHelper(type().toString()) .add("mac", mac).toString(); } @Override public int hashCode() { return Objects.hash(type, mac); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof EthCriterion) { EthCriterion that = (EthCriterion) obj; return Objects.equals(mac, that.mac) && Objects.equals(type, that.type); } return false; } } /** * Implementation of Ethernet type criterion. */ public static final class EthTypeCriterion implements Criterion { private final Short ethType; public EthTypeCriterion(Short ethType) { this.ethType = ethType; } @Override public Type type() { return Type.ETH_TYPE; } public Short ethType() { return ethType; } @Override public String toString() { return toStringHelper(type().toString()) .add("ethType", Long.toHexString(ethType & 0xffff)) .toString(); } @Override public int hashCode() { return Objects.hash(type(), ethType); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof EthTypeCriterion) { EthTypeCriterion that = (EthTypeCriterion) obj; return Objects.equals(ethType, that.ethType) && Objects.equals(this.type(), that.type()); } return false; } } /** * Implementation of IP address criterion. */ public static final class IPCriterion implements Criterion { private final IpPrefix ip; private final Type type; public IPCriterion(IpPrefix ip, Type type) { this.ip = ip; this.type = type; } @Override public Type type() { return this.type; } public IpPrefix ip() { return this.ip; } @Override public String toString() { return toStringHelper(type().toString()) .add("ip", ip).toString(); } @Override public int hashCode() { return Objects.hash(type, ip); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof IPCriterion) { IPCriterion that = (IPCriterion) obj; return Objects.equals(ip, that.ip) && Objects.equals(type, that.type); } return false; } } /** * Implementation of Internet Protocol Number criterion. */ public static final class IPProtocolCriterion implements Criterion { private final Byte proto; public IPProtocolCriterion(Byte protocol) { this.proto = protocol; } @Override public Type type() { return Type.IP_PROTO; } public Byte protocol() { return proto; } @Override public String toString() { return toStringHelper(type().toString()) .add("protocol", Long.toHexString(proto & 0xff)) .toString(); } @Override public int hashCode() { return Objects.hash(type(), proto); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof IPProtocolCriterion) { IPProtocolCriterion that = (IPProtocolCriterion) obj; return Objects.equals(proto, that.proto); } return false; } } /** * Implementation of VLAN priority criterion. */ public static final class VlanPcpCriterion implements Criterion { private final Byte vlanPcp; public VlanPcpCriterion(Byte vlanPcp) { this.vlanPcp = vlanPcp; } @Override public Type type() { return Type.VLAN_PCP; } public Byte priority() { return vlanPcp; } @Override public String toString() { return toStringHelper(type().toString()) .add("pcp", Long.toHexString(vlanPcp)).toString(); } @Override public int hashCode() { return Objects.hash(type(), vlanPcp); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof VlanPcpCriterion) { VlanPcpCriterion that = (VlanPcpCriterion) obj; return Objects.equals(vlanPcp, that.vlanPcp) && Objects.equals(this.type(), that.type()); } return false; } } /** * Implementation of VLAN ID criterion. */ public static final class VlanIdCriterion implements Criterion { private final VlanId vlanId; public VlanIdCriterion(VlanId vlanId) { this.vlanId = vlanId; } @Override public Type type() { return Type.VLAN_VID; } public VlanId vlanId() { return vlanId; } @Override public String toString() { return toStringHelper(type().toString()) .add("id", vlanId).toString(); } @Override public int hashCode() { return Objects.hash(type(), vlanId); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof VlanIdCriterion) { VlanIdCriterion that = (VlanIdCriterion) obj; return Objects.equals(vlanId, that.vlanId) && Objects.equals(this.type(), that.type()); } return false; } } /** * Implementation of TCP port criterion. */ public static final class TcpPortCriterion implements Criterion { private final Short tcpPort; private final Type type; public TcpPortCriterion(Short tcpPort, Type type) { this.tcpPort = tcpPort; this.type = type; } @Override public Type type() { return this.type; } public Short tcpPort() { return this.tcpPort; } @Override public String toString() { return toStringHelper(type().toString()) .add("tcpPort", tcpPort & 0xffff).toString(); } @Override public int hashCode() { return Objects.hash(type, tcpPort); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof TcpPortCriterion) { TcpPortCriterion that = (TcpPortCriterion) obj; return Objects.equals(tcpPort, that.tcpPort) && Objects.equals(type, that.type); } return false; } } /** * Implementation of MPLS tag criterion. */ public static final class MplsCriterion implements Criterion { private final Integer mplsLabel; public MplsCriterion(Integer mplsLabel) { this.mplsLabel = mplsLabel; } @Override public Type type() { return Type.MPLS_LABEL; } public Integer label() { return mplsLabel; } @Override public String toString() { return toStringHelper(type().toString()) .add("mpls", mplsLabel & 0xffffffffL).toString(); } @Override public int hashCode() { return Objects.hash(mplsLabel, type()); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof MplsCriterion) { MplsCriterion that = (MplsCriterion) obj; return Objects.equals(mplsLabel, that.mplsLabel) && Objects.equals(this.type(), that.type()); } return false; } } /** * Implementation of lambda (wavelength) criterion. */ public static final class LambdaCriterion implements Criterion { private final short lambda; private final Type type; public LambdaCriterion(short lambda, Type type) { this.lambda = lambda; this.type = type; } @Override public Type type() { return this.type; } public Short lambda() { return this.lambda; } @Override public String toString() { return toStringHelper(type().toString()) .add("lambda", lambda & 0xffff).toString(); } @Override public int hashCode() { return Objects.hash(type, lambda); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof LambdaCriterion) { LambdaCriterion that = (LambdaCriterion) obj; return Objects.equals(lambda, that.lambda) && Objects.equals(type, that.type); } return false; } } /** * Implementation of optical signal type criterion. */ public static final class OpticalSignalTypeCriterion implements Criterion { private final Short signalType; private final Type type; public OpticalSignalTypeCriterion(Short signalType, Type type) { this.signalType = signalType; this.type = type; } @Override public Type type() { return this.type; } public Short signalType() { return this.signalType; } @Override public String toString() { return toStringHelper(type().toString()) .add("signalType", signalType & 0xffff).toString(); } @Override public int hashCode() { return Objects.hash(type, signalType); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof OpticalSignalTypeCriterion) { OpticalSignalTypeCriterion that = (OpticalSignalTypeCriterion) obj; return Objects.equals(signalType, that.signalType) && Objects.equals(type, that.type); } return false; } } }
{ "content_hash": "3e6bbb6a4b1ab0479ce1535fdca70abd", "timestamp": "", "source": "github", "line_count": 699, "max_line_length": 90, "avg_line_length": 25.223175965665234, "alnum_prop": 0.5380296069423175, "repo_name": "hd5970/ONOS", "id": "dcc7edcdab57cc35dd951f2f53994c143f2a4650", "size": "18240", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/api/src/main/java/org/onosproject/net/flow/criteria/Criteria.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "17720" }, { "name": "HTML", "bytes": "36547" }, { "name": "Java", "bytes": "4671507" }, { "name": "JavaScript", "bytes": "161482" } ], "symlink_target": "" }
package website.automate.teamcity.server.global; import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.when; import java.io.IOException; import jetbrains.buildServer.serverSide.ServerPaths; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import website.automate.teamcity.server.global.ServerConfigPersistenceManager; import website.automate.teamcity.server.io.model.AccountSerializable; import website.automate.teamcity.server.io.model.ProjectSerializable; import website.automate.teamcity.server.io.model.ScenarioSerializable; @RunWith(MockitoJUnitRunner.class) public class ServerConfigPersistenceManagerTest { private static final String USERNAME = "random bill", PASSWORD = "secr3t", PROJECT_ID = "a6757131-bafb-4642-afe7-6d41e5266f7f", PROJECT_TITLE = "Awesome project", SCENARIO_ID = "f6757131-bafb-4642-afe7-6d41e5266f7f", SCENARIO_TITLE = "Awesome scenario"; @Mock private ServerPaths serverPaths; private ServerConfigPersistenceManager manager; @Rule public TemporaryFolder folder = new TemporaryFolder(); @Before public void init(){ when(serverPaths.getConfigDir()).thenReturn(folder.getRoot().getAbsolutePath()); manager = new ServerConfigPersistenceManager(serverPaths); } @Test public void createdAccountShouldBeSavedAndLoaded() throws IOException{ AccountSerializable expectedAccount = manager.createAccount(USERNAME, PASSWORD); expectedAccount.addProject(createProject()); manager.saveConfiguration(); manager.loadConfiguration(); AccountSerializable actualAccount = manager.getAccount(expectedAccount.getId()); assertEquals(expectedAccount, actualAccount); } private ProjectSerializable createProject(){ ProjectSerializable project = new ProjectSerializable(); project.setTitle(PROJECT_TITLE); project.setId(PROJECT_ID); project.setScenarios(asList(createScenario())); return project; } private ScenarioSerializable createScenario(){ ScenarioSerializable scenario = new ScenarioSerializable(); scenario.setName(SCENARIO_TITLE); scenario.setId(SCENARIO_ID); return scenario; } }
{ "content_hash": "bbf19fa2e0d02fa05dfabec2c92ee822", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 88, "avg_line_length": 33.8, "alnum_prop": 0.7313609467455622, "repo_name": "automate-website/teamcity-plugin", "id": "985898237124d5744b147b804c42c73f8c2d1bf4", "size": "2535", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "server/src/test/java/website/automate/teamcity/server/global/ServerConfigPersistenceManagerTest.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "72050" }, { "name": "Shell", "bytes": "722" } ], "symlink_target": "" }
namespace webdriver { class ExecuteAsyncScriptCommandHandler : public ExecuteScriptCommandHandler { public: ExecuteAsyncScriptCommandHandler(void) { } virtual ~ExecuteAsyncScriptCommandHandler(void) { } protected: void ExecuteInternal(const IECommandExecutor& executor, const LocatorMap& locator_parameters, const ParametersMap& command_parameters, Response* response) { ParametersMap::const_iterator script_parameter_iterator = command_parameters.find("script"); ParametersMap::const_iterator args_parameter_iterator = command_parameters.find("args"); if (script_parameter_iterator == command_parameters.end()) { response->SetErrorResponse(400, "Missing parameter: script"); return; } else if (args_parameter_iterator == command_parameters.end()) { response->SetErrorResponse(400, "Missing parameter: args"); return; } else { wchar_t page_id_buffer[GUID_STRING_LEN] = {0}; GUID page_id_guid; ::CoCreateGuid(&page_id_guid); ::StringFromGUID2(page_id_guid, page_id_buffer, GUID_STRING_LEN); std::wstring page_id = &page_id_buffer[0]; wchar_t pending_id_buffer[GUID_STRING_LEN] = {0}; GUID pending_id_guid; ::CoCreateGuid(&pending_id_guid); ::StringFromGUID2(pending_id_guid, pending_id_buffer, GUID_STRING_LEN); std::wstring pending_id = &pending_id_buffer[0]; Json::Value json_args = args_parameter_iterator->second; int timeout_value = executor.async_script_timeout(); std::wstring timeout = StringUtilities::ToWString(timeout_value); std::wstring script_body = StringUtilities::ToWString(script_parameter_iterator->second.asString()); std::wstring async_script = L"(function() { return function(){\n"; async_script += L"document.__$webdriverAsyncExecutor = {\n"; async_script += L" pageId: '" + page_id + L"',\n"; async_script += L" asyncTimeout: 0\n"; async_script += L"};\n"; async_script += L"var timeoutId = window.setTimeout(function() {\n"; async_script += L" window.setTimeout(function() {\n"; async_script += L" document.__$webdriverAsyncExecutor.asyncTimeout = 1;\n"; async_script += L" }, 0);\n"; async_script += L"}," + timeout + L");\n"; async_script += L"var callback = function(value) {\n"; async_script += L" document.__$webdriverAsyncExecutor.asyncTimeout = 0;\n"; async_script += L" document.__$webdriverAsyncExecutor.asyncScriptResult = value;\n"; async_script += L" window.clearTimeout(timeoutId);\n"; async_script += L"};\n"; async_script += L"var argsArray = Array.prototype.slice.call(arguments);\n"; async_script += L"argsArray.push(callback);\n"; async_script += L"if (document.__$webdriverAsyncExecutor.asyncScriptResult !== undefined) {\n"; async_script += L" delete document.__$webdriverAsyncExecutor.asyncScriptResult;\n"; async_script += L"}\n"; async_script += L"(function() {" + script_body + L"}).apply(null, argsArray);\n"; async_script += L"};})();"; std::wstring polling_script = L"(function() { return function(){\n"; polling_script += L"var pendingId = '" + pending_id + L"';\n"; polling_script += L"if ('__$webdriverAsyncExecutor' in document) {\n"; polling_script += L" if (document.__$webdriverAsyncExecutor.pageId != '" + page_id + L"') {\n"; polling_script += L" return [pendingId, -1];\n"; polling_script += L" } else if ('asyncScriptResult' in document.__$webdriverAsyncExecutor) {\n"; polling_script += L" var value = document.__$webdriverAsyncExecutor.asyncScriptResult;\n"; polling_script += L" delete document.__$webdriverAsyncExecutor.asyncScriptResult;\n"; polling_script += L" return value;\n"; polling_script += L" } else {\n"; polling_script += L" return [pendingId, document.__$webdriverAsyncExecutor.asyncTimeout];\n"; polling_script += L" }\n"; polling_script += L"} else {\n"; polling_script += L" return [pendingId, -1];\n"; polling_script += L"}\n"; polling_script += L"};})();"; BrowserHandle browser_wrapper; int status_code = executor.GetCurrentBrowser(&browser_wrapper); if (status_code != WD_SUCCESS) { response->SetErrorResponse(status_code, "Unable to get browser"); return; } CComPtr<IHTMLDocument2> doc; browser_wrapper->GetDocument(&doc); Script async_script_wrapper(doc, async_script, json_args.size()); status_code = this->PopulateArgumentArray(executor, async_script_wrapper, json_args); if (status_code != WD_SUCCESS) { response->SetErrorResponse(status_code, "Error setting arguments for script"); return; } status_code = async_script_wrapper.Execute(); if (status_code != WD_SUCCESS) { response->SetErrorResponse(status_code, "JavaScript error in async script."); return; } else { Script polling_script_wrapper(doc, polling_script, 0); while (true) { Json::Value polling_result; status_code = polling_script_wrapper.Execute(); if (status_code != WD_SUCCESS) { // Assume that if the polling script errors, it's because // of a page reload. Note that experience shows this to // happen most frequently when a refresh occurs, since // the document object is not yet ready for accessing. // However, this is still a big assumption,and could be faulty. response->SetErrorResponse(EUNEXPECTEDJSERROR, "Page reload detected during async script"); break; } polling_script_wrapper.ConvertResultToJsonValue(executor, &polling_result); Json::UInt index = 0; std::string narrow_pending_id = StringUtilities::ToString(pending_id); if (polling_result.isArray() && polling_result.size() == 2 && polling_result[index].isString() && polling_result[index].asString() == narrow_pending_id) { int timeout_flag = polling_result[1].asInt(); if (timeout_flag < 0) { response->SetErrorResponse(EUNEXPECTEDJSERROR, "Page reload detected during async script"); break; } if (timeout_flag > 0) { response->SetErrorResponse(ESCRIPTTIMEOUT, "Timeout expired waiting for async script"); break; } } else { response->SetSuccessResponse(polling_result); break; } } return; } } } }; } // namespace webdriver #endif // WEBDRIVER_IE_EXECUTEASYNCSCRIPTCOMMANDHANDLER_H_
{ "content_hash": "e6961d36a835d00ee0893db81730970d", "timestamp": "", "source": "github", "line_count": 158, "max_line_length": 106, "avg_line_length": 45.12658227848101, "alnum_prop": 0.5963534361851333, "repo_name": "vinay-qa/vinayit-android-server-apk", "id": "e86787415d09e39c10fb0a3b9cab8f34a67575f0", "size": "8009", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "cpp/IEDriver/CommandHandlers/ExecuteAsyncScriptCommandHandler.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "825" }, { "name": "ApacheConf", "bytes": "4611" }, { "name": "AppleScript", "bytes": "2614" }, { "name": "C", "bytes": "53125" }, { "name": "C#", "bytes": "2285259" }, { "name": "C++", "bytes": "1563363" }, { "name": "CSS", "bytes": "23976" }, { "name": "Diff", "bytes": "4559" }, { "name": "HTML", "bytes": "2073306" }, { "name": "Java", "bytes": "8246107" }, { "name": "JavaScript", "bytes": "4336506" }, { "name": "Makefile", "bytes": "4655" }, { "name": "Objective-C", "bytes": "320338" }, { "name": "Objective-C++", "bytes": "21847" }, { "name": "Python", "bytes": "642887" }, { "name": "Ragel in Ruby Host", "bytes": "3086" }, { "name": "Ruby", "bytes": "796608" }, { "name": "Shell", "bytes": "6702" }, { "name": "XSLT", "bytes": "1047" } ], "symlink_target": "" }
lang_csharp Cookbook ==================== TODO: Enter the cookbook description here. e.g. This cookbook makes your favorite breakfast sandwich. Requirements ------------ TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc. e.g. #### packages - `toaster` - lang_csharp needs toaster to brown your bagel. Attributes ---------- TODO: List your cookbook attributes here. e.g. #### lang_csharp::default <table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['lang_csharp']['bacon']</tt></td> <td>Boolean</td> <td>whether to include bacon</td> <td><tt>true</tt></td> </tr> </table> Usage ----- #### lang_csharp::default TODO: Write usage instructions for each cookbook. e.g. Just include `lang_csharp` in your node's `run_list`: ```json { "name":"my_node", "run_list": [ "recipe[lang_csharp]" ] } ``` Contributing ------------ TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. e.g. 1. Fork the repository on Github 2. Create a named feature branch (like `add_component_x`) 3. Write your change 4. Write tests for your change (if applicable) 5. Run the tests, ensuring they all pass 6. Submit a Pull Request using Github License and Authors ------------------- Authors: TODO: List authors
{ "content_hash": "c12ff881adce71b515db4dded4e92f85", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 168, "avg_line_length": 21.88235294117647, "alnum_prop": 0.6599462365591398, "repo_name": "adarqui/polybooks", "id": "6fc3ba663c5394cb971238169e536f5440863f07", "size": "1488", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "cookbooks/lang_csharp/README.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Ruby", "bytes": "179848" }, { "name": "Shell", "bytes": "84" } ], "symlink_target": "" }
package org.sagebionetworks.repo.web.service; import org.sagebionetworks.repo.model.LogEntry; /** * Abstraction for a AsynchronousJobServices * * @author marcel-blonk * */ public interface LogService { /** * Log an entry */ void log(LogEntry logEntry, String userAgent); }
{ "content_hash": "fb4bc585c999f3a3a0123ddacb25e123", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 47, "avg_line_length": 17.941176470588236, "alnum_prop": 0.6819672131147541, "repo_name": "Sage-Bionetworks/Synapse-Repository-Services", "id": "e33906cd48e54b033bb8b0fe52e63be6217232c9", "size": "305", "binary": false, "copies": "4", "ref": "refs/heads/develop", "path": "services/repository/src/main/java/org/sagebionetworks/repo/web/service/LogService.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "47960" }, { "name": "Java", "bytes": "21087205" }, { "name": "Python", "bytes": "2379" }, { "name": "Rich Text Format", "bytes": "31728" }, { "name": "Roff", "bytes": "54" }, { "name": "Shell", "bytes": "32205" }, { "name": "Velocity Template Language", "bytes": "3416" } ], "symlink_target": "" }
import test from "tape" import card from "../../../src/utils/cardUtils" test("getAutoCompleteMonth should prefix single digit months", assert => { //Arrange let formattedMonth, formattedIncompleteMonth const month = "3" const incompleteMonth = "1" //Act formattedMonth = card.getAutoCompleteMonth(month) formattedIncompleteMonth = card.getAutoCompleteMonth(incompleteMonth) //Assert assert.equal(formattedMonth, "03", "Prefixes single digit month with a zero") assert.equal(formattedIncompleteMonth, "1", "Doesn't prefix month starting in 1") assert.end() })
{ "content_hash": "25c79dd27fb6d1c2867bc99f48b3be3a", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 85, "avg_line_length": 31.894736842105264, "alnum_prop": 0.7194719471947195, "repo_name": "danbahrami/cardsy", "id": "b60a00fee1178b9977f715a0b734cf46b26786ce", "size": "606", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tests/utils/getAutoCompleteMonth/shouldPrefixSingleDigitMonths.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "56091" } ], "symlink_target": "" }
import argparse import re import requests import urlparse import os import json from keystoneclient.v2_0 import Client as keystoneclient class NailgunClient(object): def __init__(self, admin_node_ip, **kwargs): self.url = "http://{0}:8000".format(admin_node_ip) keystone_url = "http://{0}:5000/v2.0".format(admin_node_ip) ksclient = keystoneclient(auth_url=keystone_url, **kwargs) self.headers = {"X-Auth-Token": ksclient.auth_token, "Content-Type": "application/json"} def _get_cluster_list(self): endpoint = urlparse.urljoin(self.url, "api/clusters") return requests.get(endpoint, headers=self.headers).json() def _get_cluster(self, cluster_id): endpoint = urlparse.urljoin(self.url, "api/clusters/{0}".format(cluster_id)) return requests.get(endpoint, headers=self.headers).json() def _get_cluster_attributes(self, cluster_id): endpoint = urlparse.urljoin(self.url, "api/clusters/{0}/attributes".format( cluster_id)) return requests.get(endpoint, headers=self.headers).json() def _get_list_nodes(self): endpoint = urlparse.urljoin(self.url, "api/nodes") return requests.get(endpoint, headers=self.headers).json() def _get_list_networks(self, cluster_id): net_provider = self._get_cluster(cluster_id)["net_provider"] endpoint = urlparse.urljoin(self.url, "/api/clusters/{0}" "/network_configuration/{1}".format( cluster_id, net_provider)) return requests.get(endpoint, headers=self.headers).json() def _create_cluster(self, data): endpoint = urlparse.urljoin(self.url, "api/clusters") return requests.post(endpoint, headers=self.headers, data=json.dumps(data)) def list_cluster_nodes(self, cluster_id): endpoint = urlparse.urljoin( self.url, "api/nodes/?cluster_id={}".format(cluster_id)) return requests.get(endpoint, headers=self.headers).json() def update_cluster_attributes(self, cluster_id, attrs): endpoint = urlparse.urljoin( self.url, "api/clusters/{}/attributes".format(cluster_id)) return requests.put(endpoint, headers=self.headers, data=json.dumps(attrs)) def update_node(self, node_id, data): endpoint = urlparse.urljoin(self.url, "api/nodes/{}".format(node_id)) return requests.put(endpoint, headers=self.headers, data=json.dumps(data)) def get_node_interfaces(self, node_id): endpoint = urlparse.urljoin(self.url, "api/nodes/{}/interfaces".format(node_id)) return requests.get(endpoint, headers=self.headers).json() def put_node_interfaces(self, data): """ :param data: [{'id': node_id, 'interfaces': interfaces}] :return: response """ endpoint = urlparse.urljoin(self.url, "api/nodes/interfaces") return requests.put(endpoint, headers=self.headers, data=json.dumps(data)) def update_cluster_networks(self, cluster_id, data): net_provider = self._get_cluster(cluster_id)["net_provider"] endpoint = urlparse.urljoin( self.url, "api/clusters/{}/network_configuration/{}".format(cluster_id, net_provider)) return requests.put(endpoint, headers=self.headers, data=json.dumps(data)) def get_node_disks(self, node_id): endpoint = urlparse.urljoin(self.url, "api/nodes/{}/disks".format(node_id)) return requests.get(endpoint, headers=self.headers).json() def put_node_disks(self, node_id, data): endpoint = urlparse.urljoin(self.url, "api/nodes/{}/disks".format(node_id)) return requests.put(endpoint, headers=self.headers, data=json.dumps(data)) def get_cluster_id(cluster_name): for cluster in client._get_cluster_list(): if cluster["name"] == cluster_name: return cluster["id"] else: raise NameError("Can not find cluster with specified name") parser = argparse.ArgumentParser( description="Script for dump/restore cluster config") parser.add_argument('admin_node_ip', metavar='10.20.0.2', type=str, help='IP of fuel master node') parser.add_argument("-fuel_user", dest='fuel_user', type=str, help="Fuel username", default='admin') parser.add_argument("-fuel_password", dest='fuel_password', type=str, help="Fuel password", default='admin') parser.add_argument("-fuel_tenant", dest='fuel_tenant', type=str, help="Fuel tenant", default='admin') parser.add_argument('-dump_cluster', dest='dump_cluster', type=str, default="", help='Name of cluster which configuration need to dump') parser.add_argument("-dump_folder", dest="dump_folder", type=str, default="", help="Folder where cluster config will store") parser.add_argument("-restore_cluster", dest="restore_cluster", type=str, default="", help="Folder which contains cluster config") args = parser.parse_args() client = NailgunClient(args.admin_node_ip, username=args.fuel_user, password=args.fuel_password, tenant_name=args.fuel_tenant) if args.dump_cluster: cluster_id = get_cluster_id(args.dump_cluster) if args.dump_folder: if not os.path.exists(args.dump_folder): os.makedirs(args.dump_folder) folder = args.dump_folder else: os.makedirs(args.dump_cluster) folder = args.dump_cluster with open("{}/cluster.json".format(folder), "w") as cluster: json.dump(client._get_cluster(cluster_id), cluster, sort_keys=False, indent=4) with open("{}/cluster_attributes.json".format(folder), "w") as cluster_attrs: json.dump(client._get_cluster_attributes(cluster_id), cluster_attrs, sort_keys=False, indent=4) with open("{}/cluster_networks.json".format(folder), "w") as cluster_net: json.dump(client._get_list_networks(cluster_id), cluster_net, sort_keys=False, indent=4) for node in client.list_cluster_nodes(cluster_id): with open("{}/node-{}.json".format(folder, node["id"]), "w") as node_cfg: json.dump(node, node_cfg, sort_keys=False, indent=4) with open( "{}/node-{}-networks.json".format(folder, node["id"]), "w") as node_net: json.dump(client.get_node_interfaces(node["id"]), node_net, sort_keys=False, indent=4) with open( "{}/node-{}-disks.json".format(folder, node["id"]), "w") as node_disks: json.dump(client.get_node_disks(node["id"]), node_disks, sort_keys=False, indent=4) if args.restore_cluster: if not os.path.exists(args.restore_cluster): raise NameError("This folder does not exist") folder = args.restore_cluster if os.path.isfile("{}/cluster.json".format(folder)): with open("{}/cluster.json".format(folder)) as cluster: cluster_data = json.load(cluster) new_cluster_data = { "name": cluster_data["name"], "release": cluster_data["release_id"], "mode": cluster_data["mode"], "net_provider": cluster_data["net_provider"] } if cluster_data.get("net_segment_type"): new_cluster_data["net_segment_type"] = cluster_data[ "net_segment_data"] elif os.path.isfile("{}/cluster_networks.json".format(folder)): with open( "{}/cluster_networks.json".format(folder)) as cluster_nets: cluster_nets_data = json.load(cluster_nets) if cluster_data["net_provider"] == "neutron": new_cluster_data["net_segment_type"] = \ cluster_nets_data["networking_parameters"][ "segmentation_type"] else: new_cluster_data["net_manager"] = \ cluster_nets_data["networking_parameters"][ "net_manager"] new_clust = client._create_cluster(new_cluster_data).json() else: raise NameError("Can not find cluster.json") if os.path.isfile("{}/cluster_attributes.json".format(folder)): with open( "{}/cluster_attributes.json".format(folder)) as cluster_attrs: cluster_attrs_data = json.load(cluster_attrs) new_cluster_attrs = client.update_cluster_attributes( new_clust["id"], cluster_attrs_data) if os.path.isfile("{}/cluster_networks.json".format(folder)): with open("{}/cluster_networks.json".format(folder)) as cluster_nets: cluster_nets_data = json.load(cluster_nets) restore_cluster_nets_data = client._get_list_networks(new_clust["id"]) for key, value in cluster_nets_data["networking_parameters"].items(): if key == "base_mac": continue restore_cluster_nets_data["networking_parameters"][key] = value for net in cluster_nets_data["networks"]: if net["name"] == "fuelweb_admin": continue for new_net in restore_cluster_nets_data["networks"]: if net["name"] == new_net["name"]: for key, value in net.items(): if key in ["cluster_id", "id"]: continue new_net[key] = value client.update_cluster_networks(new_clust["id"], restore_cluster_nets_data) _nodes = re.compile('-(\d+)\.json$') nodes = [ node.split('.')[0] for node in os.listdir(folder) if _nodes.search(node)] for node in nodes: with open("{}/{}.json".format(folder, node)) as node_base: node_base_cfg = json.load(node_base) available_nodes = [nod for nod in client._get_list_nodes() if not nod["cluster"] and nod["online"]] for available_node in available_nodes: if (node_base_cfg["manufacturer"] != available_node["manufacturer"]): continue if os.path.isfile("{}/{}-networks.json".format(folder, node)): with open("{}/{}-networks.json".format( folder, node)) as node_net: node_net_cfg = json.load(node_net) new_interfaces = client.get_node_interfaces( available_node["id"]) if len(node_net_cfg) != len(new_interfaces): continue if os.path.isfile("{}/{}-disks.json".format(folder, node)): with open("{}/{}-disks.json".format( folder, node)) as node_disks: node_disk_cfg = json.load(node_disks) new_disks = client.get_node_disks(available_node["id"]) if len(node_disk_cfg) != len(new_disks): continue good_disks = [] for disk in sorted(node_disk_cfg, key=lambda k: k['size'], reverse=True): needed_size = 0 for volume in disk["volumes"]: needed_size += volume["size"] for new_disk in new_disks: if needed_size <= new_disk["size"]: new_disk["volumes"] = disk["volumes"] appr_disk = new_disk break else: raise Exception("All disks are to small") good_disks.append(new_disks.pop( new_disks.index(appr_disk))) good_node = available_node break else: raise Exception("Can not find appropriate node") data = { "cluster_id": new_clust["id"], "pending_roles": node_base_cfg["pending_roles"], "pending_addition": True, } client.update_node(good_node["id"], data) if os.path.isfile("{}/{}-networks.json".format(folder, node)): all_nets = {} new_interfaces = client.get_node_interfaces(good_node["id"]) for netw in new_interfaces: all_nets.update( {net["name"]: net for net in netw["assigned_networks"]}) for interface in node_net_cfg: for new_interface in new_interfaces: if interface["name"] == new_interface["name"]: ass_interfaces = [ all_nets[i["name"]] for i in interface[ "assigned_networks"]] new_interface["assigned_networks"] = ass_interfaces resp = client.put_node_interfaces( [{"id": good_node["id"], "interfaces": new_interfaces}] ) print resp print resp.content if os.path.isfile("{}/{}-disks.json".format(folder, node)): resp = client.put_node_disks(good_node["id"], good_disks)
{ "content_hash": "d262c18cb03463f4d5a1aba5b351bbd0", "timestamp": "", "source": "github", "line_count": 341, "max_line_length": 79, "avg_line_length": 41.14076246334311, "alnum_prop": 0.5372442797063226, "repo_name": "smurashov/test-infra", "id": "586f34465679c15dff383eccaf2bb579d86d9616", "size": "14029", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "fuel/nailgun.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Python", "bytes": "45339" }, { "name": "Shell", "bytes": "3893" } ], "symlink_target": "" }
body { margin: 0; border: 0; width: 100%; height: 100%; } /* * the bulk of the page where the content goes * includes the following: * header * body (container) * footer */ section#main { padding: 5px; margin: 0 auto; width: 100% auto; height: 100%; } /* * the header of the page */ header#outer { background: none; background-color: darkgrey; padding: 0px 10px 0px 10px; text-align: left; color: grey; } img#headerImage { width: auto; height: 80px; margin: 0 auto; } label#headertitle { font-family: Georgia, serif; font-weight: bold; font-size: 24pt; } label#headertagline { margin: 20px; float: right; vertical-align: bottom; text-align: right; font-family: Times, serif; font-style: italic; font-size: 12pt; } /* * the bulk of the page where the content goes * includes the following: * body widget pre * body primary area (body section) * body widget post */ section#bodycontainer { float: left; overflow: hidden; background: darkgrey; display: inline-flex; margin: 5px; width: 100%; } section#bodysection { background: darkgrey; width: 100%; height: 100%; } section#bodywidgetpre, section#bodywidgetpost { visibility: hidden; } footer#footer { padding: 10px 10px 10px 10px; overflow: hidden; text-align: right; } a#footerauthor { font-style: italic; font-family: Times, serif; font-size: 12pt; } section#footerwidget { margin: 10px 0 10px 0; padding: 10px 10px 10px 10px; width: 99%; background-color: black; overflow: hidden; border-radius: 10px; box-shadow: 5px 5px 5px rgba(0, 0, 50, 0.7); } hr.extensionline { color: grey; height: 2px; } divx.extensiontitle { background: grey; padding: 3px 0px 3px 3px; text-align: center; vertical-align: middle; font-family: Georgia, serif; font-weight: bold; font-size: 8pt; font-variant: small-caps; border-radius: 10px; box-shadow: 5px 5px 5px rgba(0, 0, 50, 0.7); }
{ "content_hash": "d98805fef65980cd7e2fafb8d9f76fc1", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 47, "avg_line_length": 14.601503759398497, "alnum_prop": 0.6750772399588053, "repo_name": "milligan22963/PageBuilder", "id": "674e7c206bf65fa8d129fff8dc8dc66f79b4ae01", "size": "1942", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "assets/themes/default/default.css", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "20030" }, { "name": "HTML", "bytes": "5896" }, { "name": "JavaScript", "bytes": "209181" }, { "name": "PHP", "bytes": "514833" }, { "name": "XSLT", "bytes": "663" } ], "symlink_target": "" }
set -eu -o pipefail #if [[ "$(uname)" == Darwin ]]; then #export CC=clang #export CXX=clang++ #export CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include/c++/v1" #export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib" #fi mkdir -p $PREFIX/bin mkdir -p $PREFIX/lib mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=RELEASE -DCONDA_BUILD=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DBOOST_ROOT=$PREFIX -DBoost_NO_SYSTEM_PATHS=ON .. make install CFLAGS="-L${PREFIX}/lib -I${PREFIX}/include"
{ "content_hash": "634fe36addb258d9fbb44b8ea0ccdee2", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 173, "avg_line_length": 32.9375, "alnum_prop": 0.7020872865275142, "repo_name": "CGATOxford/bioconda-recipes", "id": "82e289fe6e0ba2f192f6e60c995c83b206777060", "size": "539", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "recipes/salmon/build.sh", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "237" }, { "name": "C", "bytes": "102020" }, { "name": "Java", "bytes": "286" }, { "name": "M4", "bytes": "726" }, { "name": "Perl", "bytes": "97886" }, { "name": "Perl 6", "bytes": "23942" }, { "name": "Prolog", "bytes": "1044" }, { "name": "Python", "bytes": "367897" }, { "name": "Roff", "bytes": "996" }, { "name": "Shell", "bytes": "1462139" } ], "symlink_target": "" }
 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Kooboo.CMS.Search.Models { public class ResultObject { public string Title { get; set; } public string HighlightedTitle { get; set; } public string Body { get; set; } public string HighlightedBody { get; set; } public string Url { get; set; } public object NativeObject { get; set; } } }
{ "content_hash": "ebe37d300795ccee594f48efecdd9cd3", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 52, "avg_line_length": 22.45, "alnum_prop": 0.6369710467706013, "repo_name": "Epitomy/CMS", "id": "b259f4074166df0221f23ae12160694026a34906", "size": "451", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Kooboo.CMS/Kooboo.CMS.Search/Models/ResultObject.cs", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ASP", "bytes": "1438191" }, { "name": "C#", "bytes": "4602076" }, { "name": "JavaScript", "bytes": "6347088" }, { "name": "Shell", "bytes": "9165" }, { "name": "Visual Basic", "bytes": "1200" } ], "symlink_target": "" }
.PHONEY: all binary test ut ut-circle st clean setup-env run-etcd install-completion fast-st SRCDIR=calico_containers PYCALICO=$(wildcard $(SRCDIR)/calico_ctl/*.py) $(wildcard $(SRCDIR)/*.py) BUILD_DIR=build_calicoctl BUILD_FILES=$(BUILD_DIR)/Dockerfile $(BUILD_DIR)/requirements.txt # There are subdirectories so use shell rather than wildcard NODE_FILESYSTEM=$(shell find node_filesystem/ -type f) NODE_FILES=Dockerfile $(wildcard image/*) $(NODE_FILESYSTEM) WHEEL_VERSION=0.0.0 # These variables can be overridden by setting an environment variable. LOCAL_IP_ENV?=$(shell ip route get 8.8.8.8 | head -1 | cut -d' ' -f8) ST_TO_RUN?=calico_containers/tests/st/ default: all all: test binary: dist/calicoctl node: caliconode.created caliconode.created: $(PYCALICO) $(NODE_FILES) docker build -t calico/node . touch caliconode.created calicobuild.created: $(BUILD_FILES) cd build_calicoctl; docker build -t calico/build . touch calicobuild.created dist/calicoctl: $(PYCALICO) calicobuild.created mkdir -p dist chmod 777 dist # Ignore errors on both docker commands. CircleCI throws an benign error # from the use of the --rm flag # mount calico_containers and dist under /code work directory. Don't use /code # as the mountpoint directly since the host permissions may not allow the # `user` account in the container to write to it. -docker run -v `pwd`/calico_containers:/code/calico_containers \ -v `pwd`/dist:/code/dist --rm \ calico/build \ pyinstaller calico_containers/calicoctl.py -ayF test: st ut ut: calicobuild.created # Use the `root` user, since code coverage requires the /code directory to # be writable. It may not be writable for the `user` account inside the # container. docker run --rm -v `pwd`/calico_containers:/code -u root \ calico/build bash -c \ '/tmp/etcd -data-dir=/tmp/default.etcd/ >/dev/null 2>&1 & \ nosetests tests/unit -c nose.cfg' # UT runs on Cicle need to create the calicoctl binary ut-circle: calicobuild.created dist/calicoctl # Can't use --rm on circle # Circle also requires extra options for reporting. docker run \ -v `pwd`:/code \ -v $(CIRCLE_TEST_REPORTS):/circle_output \ -e COVERALLS_REPO_TOKEN=$(COVERALLS_REPO_TOKEN) \ calico/build bash -c \ '/tmp/etcd -data-dir=/tmp/default.etcd/ >/dev/null 2>&1 & \ cd calico_containers; nosetests tests/unit -c nose.cfg \ --with-xunit --xunit-file=/circle_output/output.xml; RC=$$?;\ [[ ! -z "$$COVERALLS_REPO_TOKEN" ]] && coveralls || true; exit $$RC' calico_containers/busybox.tar: docker pull busybox:latest docker save --output calico_containers/busybox.tar busybox:latest calico_containers/routereflector.tar: docker pull calico/routereflector:latest docker save --output calico_containers/routereflector.tar calico/routereflector:latest calico_containers/calico-node.tar: caliconode.created docker save --output calico_containers/calico-node.tar calico/node st: binary calico_containers/busybox.tar calico_containers/routereflector.tar calico_containers/calico-node.tar run-etcd run-consul dist/calicoctl checksystem --fix nosetests $(ST_TO_RUN) -sv --nologcapture --with-timer fast-st: calico_containers/busybox.tar calico_containers/routereflector.tar calico_containers/calico-node.tar run-etcd run-consul # This runs the tests by calling python directory without using the # calicoctl binary CALICOCTL=$(CURDIR)/calico_containers/calicoctl.py nosetests $(ST_TO_RUN) \ -sv --nologcapture --with-timer -a '!slow' run-etcd: @-docker rm -f calico-etcd docker run --detach \ --net=host \ --name calico-etcd quay.io/coreos/etcd:v2.0.11 \ --advertise-client-urls "http://$(LOCAL_IP_ENV):2379,http://127.0.0.1:4001" \ --listen-client-urls "http://0.0.0.0:2379,http://0.0.0.0:4001" run-consul: @-docker rm -f calico-consul docker run --detach \ --net=host \ --name calico-consul progrium/consul \ -server -bootstrap-expect 1 -client $(LOCAL_IP_ENV) create-dind: @echo "You may want to load calico-node with" @echo "docker load --input /code/calico_containers/calico-node.tar" @ID=$$(docker run --privileged -v `pwd`:/code \ -e DOCKER_DAEMON_ARGS=--kv-store=consul:$(LOCAL_IP_ENV):8500 \ -tid calico/dind) ;\ docker exec -ti $$ID bash;\ docker rm -f $$ID clean: -rm -f *.created find . -name '*.pyc' -exec rm -f {} + -rm -rf dist -rm -rf build -rm -f calico_containers/busybox.tar -rm -f calico_containers/calico-node.tar -rm -f calico_containers/routereflector.tar -docker rm -f calico-build -docker rm -f calico-node -docker rmi calico/node -docker rmi calico/build -docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes setup-env: virtualenv venv venv/bin/pip install --upgrade -r build_calicoctl/requirements.txt @echo "run\n. venv/bin/activate"
{ "content_hash": "1f754a102695154cb43bb1dddf541be3", "timestamp": "", "source": "github", "line_count": 132, "max_line_length": 131, "avg_line_length": 36.45454545454545, "alnum_prop": 0.7329592684954281, "repo_name": "dalanlan/calico-docker", "id": "f960c0a7979140b379b2a842fe9b9c834dbd9357", "size": "4812", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Makefile", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Makefile", "bytes": "4812" }, { "name": "Python", "bytes": "316095" }, { "name": "Shell", "bytes": "4541" } ], "symlink_target": "" }
package com.spotify.heroic.metric; import static org.junit.Assert.assertNotNull; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.spotify.heroic.common.GroupSet; import com.spotify.heroic.common.Groups; import com.spotify.heroic.common.OptionalLimit; import com.spotify.heroic.metadata.MetadataManager; import com.spotify.heroic.querylogging.QueryLogger; import com.spotify.heroic.querylogging.QueryLoggerFactory; import com.spotify.heroic.statistics.MetricBackendReporter; import eu.toolchain.async.AsyncFramework; import eu.toolchain.async.AsyncFuture; import java.util.Collections; import java.util.Optional; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; /* * Start of a test for LocalMetricManager */ @RunWith(MockitoJUnitRunner.class) public class LocalMetricManagerTest { private LocalMetricManager manager; @Mock private AsyncFramework async; @Mock private MetadataManager metadataManager; @Mock private MetricBackendReporter reporter; @Mock private MetadataManager metadata; @Mock private MetricBackend metricBackend; @Mock private AsyncFuture<FetchData> fetchDataFuture; @Before public void setup() { final OptionalLimit groupLimit = OptionalLimit.empty(); final OptionalLimit seriesLimit = OptionalLimit.empty(); final OptionalLimit aggregationLimit = OptionalLimit.empty(); final OptionalLimit dataLimit = OptionalLimit.empty(); final OptionalLimit concurrentQueriesBackoff = OptionalLimit.empty(); final int fetchParallelism = 20; final boolean failOnLimits = true; final Groups groups = Groups.of("foo"); doReturn(groups).when(metricBackend).groups(); final GroupSet<MetricBackend> groupSet = GroupSet.build(Collections.singletonList(metricBackend), Optional.empty()); final QueryLogger queryLogger = mock(QueryLogger.class); final QueryLoggerFactory queryLoggerFactory = mock(QueryLoggerFactory.class); when(queryLoggerFactory.create(any())).thenReturn(queryLogger); manager = new LocalMetricManager(groupLimit, seriesLimit, aggregationLimit, dataLimit, concurrentQueriesBackoff, fetchParallelism, failOnLimits, async, groupSet, metadata, reporter, queryLoggerFactory); } @Test public void testUseDefaultBackend() { assertNotNull(manager.useDefaultGroup()); } }
{ "content_hash": "afb26fc13e16d43966f70826d1938d1d", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 96, "avg_line_length": 34.05128205128205, "alnum_prop": 0.754894578313253, "repo_name": "OdenTech/heroic", "id": "ca7f0b7c3df060a1216e785c11208fb02efeaaef", "size": "2656", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "heroic-core/src/test/java/com/spotify/heroic/metric/LocalMetricManagerTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "4574" }, { "name": "Java", "bytes": "3021407" } ], "symlink_target": "" }
{% load i18n %} <div class="contribute"> Cobra is <a href="http://en.wikipedia.org/wiki/Open-source_software">Open Source Software</a> <a href="https://github.com/lyoniionly/django-cobra" class="btn btn-small">{% trans "Contribute" %}</a> <a href="" class="btn btn-small">{% trans "Translate" %}</a> </div> <div class="version">Cobra {% if display_version %}{{ version }}{% endif %} </div> <div class="credits">Handcrafted by the <a href="">Li yang </a> and <a href="">ideal team</a> from changchun </div>
{ "content_hash": "4f5751c9ab0ba48f4069e1596b234a09", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 105, "avg_line_length": 46.81818181818182, "alnum_prop": 0.6524271844660194, "repo_name": "lyoniionly/django-cobra", "id": "e3f29b4b3c65b35e7351d636e53122e2d88c8cad", "size": "515", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/cobra/templates/cobra/partials/footer.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "745958" }, { "name": "HTML", "bytes": "254436" }, { "name": "JavaScript", "bytes": "2679541" }, { "name": "Python", "bytes": "1440198" }, { "name": "Shell", "bytes": "893" }, { "name": "XSLT", "bytes": "24882" } ], "symlink_target": "" }
/* ======================================================================== * DOM-based Routing * Based on http://goo.gl/EUTi53 by Paul Irish * * Only fires on body classes that match. If a body class contains a dash, * replace the dash with an underscore when adding it to the object below. * * .noConflict() * The routing is enclosed within an anonymous function so that you can * always reference jQuery with $, even when in .noConflict() mode. * ======================================================================== */ (function($) { // Use this variable to set up the common and page specific functions. If you // rename this variable, you will also need to rename the namespace below. var Sage = { // All pages 'common': { init: function() { $('.lang-switcher a,.lang-sel a').click(function(e) { $.cookie("bios_current_language", $(this).data("lang"), { expires: 365, path: "/", domain: document.location.host }); }); }, finalize: function() { // JavaScript to be fired on all pages, after page specific JS is fired } }, 'woocommerce': { init: function() { var quantity = $('.product .cart .qty'); if (quantity.length) { quantity.change(function(event) { var button = $('.add_to_cart_button'); if (button.attr('data-quantity') !== undefined) button.attr('data-quantity', quantity.val()); }); } } }, 'single_product': { init: function() { function get_first_uri_part() { var first = $(location).attr('pathname'); first.indexOf(1); first.toLowerCase(); first = first.split("/")[1]; return first; } var cookie_opts = { wildcardDomain: true, onEnable: function() { $('.fb-share').toggleClass('frame ok'); } }; if (get_first_uri_part() !== 'en') { cookie_opts['iframesPlaceholderHTML'] = '<p><span>Condividi su Facebook - </span> Per vedere questo contenuto è necessario ' + '<a href="#" class="ce-accept">accetare un cookie di terze parti</a>' + '</p>' } else { cookie_opts['iframesPlaceholderHTML'] = '<p><span>Share on Facebook - </span> To view this content you need to' + '<a href="#" class="ce-accept"> enable cookies</a>' + '</p>'; } COOKIES_ENABLER.init(cookie_opts); } }, // Home page 'home': { init: function() { if ('ontouchstart' in window || navigator.msMaxTouchPoints) $('.aree_tera_list_link').fadeTo(0, 1); }, finalize: function() { // JavaScript to be fired on the home page, after the init JS } }, // About us page, note the change from about-us to about_us. 'about_us': { init: function() { // JavaScript to be fired on the about us page } } }; // The routing fires all common scripts, followed by the page specific scripts. // Add additional events for more control over timing e.g. a finalize event var UTIL = { fire: function(func, funcname, args) { var fire; var namespace = Sage; funcname = (funcname === undefined) ? 'init' : funcname; fire = func !== ''; fire = fire && namespace[func]; fire = fire && typeof namespace[func][funcname] === 'function'; if (fire) { namespace[func][funcname](args); } }, loadEvents: function() { // Fire common init JS UTIL.fire('common'); // Fire page-specific init JS, and then finalize JS $.each(document.body.className.replace(/-/g, '_').split(/\s+/), function(i, classnm) { UTIL.fire(classnm); UTIL.fire(classnm, 'finalize'); }); // Fire common finalize JS UTIL.fire('common', 'finalize'); } }; // Load Events $(document).ready(UTIL.loadEvents); })(jQuery); // Fully reference jQuery after this point.
{ "content_hash": "2096ad5ce216e658ac90ba378ec50096", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 267, "avg_line_length": 39.224137931034484, "alnum_prop": 0.4808791208791209, "repo_name": "Kilbourne/biosphaera", "id": "5d34d814b4baf0e80363a59a9a6358a9c04dba18", "size": "4551", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "web/app/themes/biosphaera/assets/scripts/main.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "223361" }, { "name": "HTML", "bytes": "40850" }, { "name": "JavaScript", "bytes": "44809" }, { "name": "PHP", "bytes": "173651" } ], "symlink_target": "" }
START_ATF_NAMESPACE struct tagEMRCREATEDIBPATTERNBRUSHPT { tagEMR emr; unsigned int ihBrush; unsigned int iUsage; unsigned int offBmi; unsigned int cbBmi; unsigned int offBits; unsigned int cbBits; }; END_ATF_NAMESPACE
{ "content_hash": "585a5d8634232c1ed79b6e88d0e0d1d0", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 40, "avg_line_length": 23.916666666666668, "alnum_prop": 0.6236933797909407, "repo_name": "goodwinxp/Yorozuya", "id": "6acd8a3c91feb6ab970972d5a2c729ce2878a057", "size": "461", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "library/ATF/tagEMRCREATEDIBPATTERNBRUSHPT.hpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "207291" }, { "name": "C++", "bytes": "21670817" } ], "symlink_target": "" }
Adds an AWS::KinesisAnalytics::Application.JSONMappingParameters resource property to the template. Provides additional mapping information when JSON is the record format on the streaming source. ## SYNTAX ``` Add-VSKinesisAnalyticsApplicationJSONMappingParameters [-RecordRowPath] <Object> [<CommonParameters>] ``` ## DESCRIPTION Adds an AWS::KinesisAnalytics::Application.JSONMappingParameters resource property to the template. Provides additional mapping information when JSON is the record format on the streaming source. ## PARAMETERS ### -RecordRowPath Path to the top-level parent that contains the records. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-jsonmappingparameters.html#cfn-kinesisanalytics-application-jsonmappingparameters-recordrowpath PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: True Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### Vaporshell.Resource.KinesisAnalytics.Application.JSONMappingParameters ## NOTES ## RELATED LINKS [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-jsonmappingparameters.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-jsonmappingparameters.html)
{ "content_hash": "eea0b25ef76d84d5280ad7c1c2403936", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 315, "avg_line_length": 37.166666666666664, "alnum_prop": 0.820627802690583, "repo_name": "scrthq/Vaporshell", "id": "6b523bbca1933e563109295b2c5aaedd591079b9", "size": "1854", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/docs/glossary/Add-VSKinesisAnalyticsApplicationJSONMappingParameters.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "PowerShell", "bytes": "3830055" }, { "name": "Shell", "bytes": "6187" } ], "symlink_target": "" }
 using System; namespace OpenQA.Selenium { /// <summary> /// Represents the known and supported Platforms that WebDriver runs on. /// </summary> /// <remarks>The <see cref="Platform"/> class maps closely to the Operating System, /// but differs slightly, because this class is used to extract information such as /// program locations and line endings. </remarks> public enum PlatformType { /// <summary> /// Any platform. This value is never returned by a driver, but can be used to find /// drivers with certain capabilities. /// </summary> Any, /// <summary> /// Any version of Microsoft Windows. This value is never returned by a driver, /// but can be used to find drivers with certain capabilities. /// </summary> Windows, /// <summary> /// Versions of Microsoft Windows that are compatible with Windows XP. /// </summary> XP, /// <summary> /// Versions of Microsoft Windows that are compatible with Windows Vista. /// </summary> Vista, /// <summary> /// Any version of the Macintosh OS X /// </summary> MacOSX, /// <summary> /// Any version of the Unix operating system. /// </summary> Unix, /// <summary> /// Any version of the Linux operating system. /// </summary> Linux } /// <summary> /// Represents the platform on which tests are to be run. /// </summary> public class Platform { private static Platform current; private PlatformType platformTypeValue; private int major; private int minor; /// <summary> /// Initializes a new instance of the <see cref="Platform"/> class for a specific platform type. /// </summary> /// <param name="typeValue">The platform type.</param> public Platform(PlatformType typeValue) { platformTypeValue = typeValue; } private Platform() { major = Environment.OSVersion.Version.Major; minor = Environment.OSVersion.Version.Minor; switch (Environment.OSVersion.Platform) { case PlatformID.Win32NT: if (major == 5) { platformTypeValue = PlatformType.XP; } else if (major == 6) { platformTypeValue = PlatformType.Vista; } break; // Thanks to a bug in Mono Mac and Linux will be treated the same https://bugzilla.novell.com/show_bug.cgi?id=515570 but adding this in case case PlatformID.MacOSX: platformTypeValue = PlatformType.MacOSX; break; case PlatformID.Unix: platformTypeValue = PlatformType.Unix; break; } } /// <summary> /// Gets the current platform. /// </summary> public static Platform CurrentPlatform { get { if (current == null) { current = new Platform(); } return current; } } /// <summary> /// Gets the major version of the platform operating system. /// </summary> public int MajorVersion { get { return major; } } /// <summary> /// Gets the major version of the platform operating system. /// </summary> public int MinorVersion { get { return minor; } } /// <summary> /// Gets the type of the platform. /// </summary> public PlatformType Type { get { return platformTypeValue; } } /// <summary> /// Compares the platform to the specified type. /// </summary> /// <param name="compareTo">A <see cref="PlatformType"/> value to compare to.</param> /// <returns><see langword="true"/> if the platforms match; otherwise <see langword="false"/>.</returns> public bool IsPlatformType(PlatformType compareTo) { bool platformIsType = false; switch (compareTo) { case PlatformType.Any: platformIsType = true; break; case PlatformType.Windows: platformIsType = platformTypeValue == PlatformType.Windows || platformTypeValue == PlatformType.XP || platformTypeValue == PlatformType.Vista; break; case PlatformType.Vista: platformIsType = platformTypeValue == PlatformType.Windows || platformTypeValue == PlatformType.Vista; break; case PlatformType.XP: platformIsType = platformTypeValue == PlatformType.Windows || platformTypeValue == PlatformType.XP; break; // Thanks to a bug in Mono Mac and Linux need to be treated the same https://bugzilla.novell.com/show_bug.cgi?id=515570 but adding this in case case PlatformType.MacOSX: platformIsType = platformTypeValue == PlatformType.MacOSX; break; case PlatformType.Linux: platformIsType = platformTypeValue == PlatformType.Linux || platformTypeValue == PlatformType.Unix; break; default: platformIsType = platformTypeValue == compareTo; break; } return platformIsType; } } }
{ "content_hash": "6ef0f38c0c3c7aedd4664744f4c0a6b3", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 162, "avg_line_length": 32.994594594594595, "alnum_prop": 0.5034403669724771, "repo_name": "brownman/selenium-webdriver", "id": "fcccd6cfd4802947b1da9f54705c9a8563eb4fc4", "size": "6797", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "common/src/csharp/webdriver-common/Platform.cs", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package client import ( "github.com/fission/fission/pkg/controller/client/rest" v1 "github.com/fission/fission/pkg/controller/client/v1" ) type ( Interface interface { V1() v1.V1Interface ServerURL() string } Clientset struct { restClient rest.Interface v1 v1.V1Interface } ) func MakeClientset(restClient rest.Interface) Interface { return &Clientset{ restClient: restClient, v1: v1.MakeV1Client(restClient), } } func (c *Clientset) V1() v1.V1Interface { return c.v1 } func (c *Clientset) ServerURL() string { return c.restClient.ServerURL() }
{ "content_hash": "d11f44359635dcbcf1409e485f82c80d", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 57, "avg_line_length": 16.885714285714286, "alnum_prop": 0.7089678510998308, "repo_name": "fission/fission", "id": "d7c2eb1dbbfe8ac4d509da4a5aafaf2f1077110b", "size": "1157", "binary": false, "copies": "3", "ref": "refs/heads/main", "path": "pkg/controller/client/client.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "601" }, { "name": "Go", "bytes": "1671619" }, { "name": "HCL", "bytes": "1275" }, { "name": "JavaScript", "bytes": "3342" }, { "name": "Makefile", "bytes": "4121" }, { "name": "Mustache", "bytes": "3370" }, { "name": "Python", "bytes": "429" }, { "name": "Shell", "bytes": "197139" }, { "name": "Smarty", "bytes": "7789" } ], "symlink_target": "" }
package com.aelchemy.maven.plugin.codingame.compiler.java; import java.util.HashSet; import java.util.Set; /** * {@link JavaDTO} is a DTO containing the package name, name and fully qualified imports contained within a .java file. * * @author Aelexe * */ public class JavaDTO { private String sPackage, name, sInterface, base; private final Set<String> imports = new HashSet<String>(); private String code; private boolean containsMainMethod; private boolean isAbstract, extendsAbstract; private boolean isInterface, implementsInterface; private boolean isEnum; public String getPackage() { return sPackage; } public void setPackage(final String sPackage) { this.sPackage = sPackage; } public String getName() { return name; } /** * Returns the concatenated package name and class name, or class name if package name is null. * * @return The concatenated package name and class name. */ public String getFullName() { return sPackage != null ? sPackage + "." + name : name; } public void setName(final String name) { this.name = name; } public String getInterface() { return sInterface; } public void setInterface(final String sInterface) { this.sInterface = sInterface; implementsInterface = true; } public String getBase() { return base; } public void setBase(String base) { this.base = base; extendsAbstract = true; } public Set<String> getImports() { return imports; } public void addImport(final String sImport) { imports.add(sImport); } public String getCode() { return code; } public void setCode(final String code) { this.code = code; } public boolean containsMainMethod() { return containsMainMethod; } public void setContainsMainMethod(final boolean containsMainMethod) { this.containsMainMethod = containsMainMethod; } public boolean isAbstract() { return isAbstract; } public void setIsAbstract(final boolean isAbstract) { this.isAbstract = isAbstract; } public boolean extendsAbstract() { return extendsAbstract; } public boolean isInterface() { return isInterface; } public void setIsInterface(final boolean isInterface) { this.isInterface = isInterface; } public boolean implementsInterface() { return implementsInterface; } public void setIsEnum(boolean isEnum) { this.isEnum = isEnum; } public boolean isEnum() { return isEnum; } }
{ "content_hash": "dde2243585ead4e90eaf71cea4e3c82b", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 120, "avg_line_length": 20.793388429752067, "alnum_prop": 0.6895866454689984, "repo_name": "Aelexe/codingame-compiler-maven-plugin", "id": "e40ea3aae1f962966a26a6b688e151dc765b483f", "size": "2516", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/aelchemy/maven/plugin/codingame/compiler/java/JavaDTO.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "51775" } ], "symlink_target": "" }
require 'net/http' require 'uri' #:nodoc: module Cinch #:nodoc: module Plugins ## # The Ping plugin allows you to check whether a website is down for you only # or for everyone else too. The plugin is similar to # downforeveryoneorjustme.com. # # Usage: # # [TRIGGER]ping [URL] # # Example: # # $ping http://www.google.com/ # # @author Abdelrahman Mahmoud # @since 23-07-2011 # class Ping include Cinch::Plugin include ForrstBot::Helper::Help plugin 'ping' help "Checks if the website is down or not." \ + "\nExample: $ping http://google.com/" match(/(ping|up)\s+(.+)/) match(/(ping|up)$/, :method => :show_help) ## # Executes the plugin. # # @author Abdelrahman Mahmoud # @since 23-07-2011 # @param [Cinch::Message] message # @param [String] cmd The cmd that was called, either "ping" or "up". # @param [String] url The URL you want to ping. # def execute(message, cmd, url) # URI.parse always requires a scheme url = 'http://' + url if !url.match(/^http/) begin url = URI.parse(url) rescue => e return message.reply("The URL is invalid: #{e.message}", true) end return message.reply('The URL is invalid', true) if url.host.nil? begin duration = Time.new.to_f Timeout.timeout(5) do Net::HTTP.start(url.host) do |http| http.get('/') end end duration = ((Time.new.to_f - duration) * 100).round(2) if duration >= 1000 duration = "#{duration} s" else duration = "#{duration} ms" end return message.reply( "It's just you, the website is up. Response time: #{duration}", true ) rescue => e return message.reply( "It's not just you, the website appears to be down: #{e.message}", true ) end end end # Ping end # Plugins end # Cinch
{ "content_hash": "dd8f265fee63e738cf062c22f2612e20", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 80, "avg_line_length": 25.03488372093023, "alnum_prop": 0.5215977705527172, "repo_name": "farstarinc/forrst-bot", "id": "9af2df17f875971fc628b5739a627949f51ab60a", "size": "2153", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "plugins/ping.rb", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
/** * */ package io.sanjeevsachdev; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; /** * @author Sanjeev Sachdev * */ public class WebApplicationInitializerImpl extends AbstractAnnotationConfigDispatcherServletInitializer { @Override protected Class<?>[] getRootConfigClasses() { return null; } @Override protected Class<?>[] getServletConfigClasses() { return new Class[] { WebApplicationConfig.class }; } @Override protected String[] getServletMappings() { return new String[] { "/" }; } }
{ "content_hash": "7309088b1bb757d2a2c902a56fa835f8", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 105, "avg_line_length": 20.428571428571427, "alnum_prop": 0.7465034965034965, "repo_name": "sanjeevsachdev/microservices-workshop", "id": "192e42e2237a66b4ffbd347436ee325c9a287615", "size": "572", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "hello-world-rest-interface/src/main/java/io/sanjeevsachdev/WebApplicationInitializerImpl.java", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "14982" }, { "name": "Java", "bytes": "12948" }, { "name": "Shell", "bytes": "19404" } ], "symlink_target": "" }
using Microsoft.Deployment.WindowsInstaller; namespace SccmTools.Library.Module.Common.Msi { public interface IMsiHelper { string GetProperty(Database msiDatabase, string propertyName); } }
{ "content_hash": "14ef9888844d6a684c90b096a91c75d7", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 70, "avg_line_length": 23.555555555555557, "alnum_prop": 0.75, "repo_name": "trondr/SccmTools", "id": "8791a81d32fb4ae9daba52b20738a3d66ddbd5f8", "size": "214", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/SccmTools.Library/Module/Common/Msi/IMsiHelper.cs", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Batchfile", "bytes": "3464" }, { "name": "C#", "bytes": "268948" }, { "name": "HTML", "bytes": "6020" }, { "name": "PowerShell", "bytes": "13396" } ], "symlink_target": "" }
package org.instantlogic.designer.codegenerator.jvmbytecode; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; public class EmptySubclassBytecodeTemplate implements Opcodes { public static byte[] dump(String className, String extendsFromClassName) { String internalName = className.replace('.', '/'); String extendsFromInternalName = extendsFromClassName.replace('.', '/'); ClassWriter cw = new ClassWriter(0); MethodVisitor mv; cw.visit(V1_7, ACC_PUBLIC + ACC_SUPER, internalName, null, extendsFromInternalName, null); { mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null); mv.visitCode(); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn( INVOKESPECIAL, extendsFromInternalName, "<init>", "()V"); mv.visitInsn(RETURN); mv.visitMaxs(1, 1); mv.visitEnd(); } cw.visitEnd(); return cw.toByteArray(); } }
{ "content_hash": "736f9859122a5ab84aa8039fa27f67ce", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 75, "avg_line_length": 25.54054054054054, "alnum_prop": 0.7026455026455026, "repo_name": "johan-gorter/Instantlogic", "id": "f1361950642fe43d39623a943e3d528c879d6921", "size": "945", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "webapps/designer/src/main/java/org/instantlogic/designer/codegenerator/jvmbytecode/EmptySubclassBytecodeTemplate.java", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "196" }, { "name": "CSS", "bytes": "17961" }, { "name": "FreeMarker", "bytes": "30056" }, { "name": "HTML", "bytes": "65473" }, { "name": "Java", "bytes": "1672816" }, { "name": "JavaScript", "bytes": "331610" }, { "name": "Shell", "bytes": "186" } ], "symlink_target": "" }
import Ember from 'ember'; import layout from '../templates/components/md-card'; const { Component } = Ember; export default Component.extend({ layout, classNames: ['card'], classNameBindings: ['class'] });
{ "content_hash": "ad36794ef243f45c0eee512aa4d98492", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 53, "avg_line_length": 21.5, "alnum_prop": 0.6976744186046512, "repo_name": "dortort/ember-cli-materialize", "id": "24bc3abcb7b979cd5caa6297d758a9acf4b8f218", "size": "215", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "addon/components/md-card.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3559" }, { "name": "HTML", "bytes": "56170" }, { "name": "JavaScript", "bytes": "142045" }, { "name": "Shell", "bytes": "346" } ], "symlink_target": "" }
layout: organization category: local title: Merrill Park Civic Association impact_area: The Elderly keywords: location_services: location_offices: website: description: mission: | Provides services for seniors cash_grants: grants: service_opp: services: learn: cont_relationship: salutation: first_name: last_name: title_contact_person: city: Queens state: NY address: | 137-57 Farmers Boulevard Queens NY 11434 lat: 40.672405 lng: -73.763768 phone: 718-978-8352 ext: fax: email: preferred_contact: contact_person_intro: ---
{ "content_hash": "5e614a2eed8b4b2037527ad3caa0561c", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 38, "avg_line_length": 13.707317073170731, "alnum_prop": 0.7348754448398577, "repo_name": "flipside-org/penny-harvest", "id": "6f2e984a5f662f1db6e610d25bba2e345b8aba9c", "size": "566", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/organizations/2015-01-12-O803.md", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "392900" }, { "name": "JavaScript", "bytes": "30565" } ], "symlink_target": "" }